mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
refactor(Core/World): Create WorldSessionMgr to split session logic out of World (#21400)
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include "SpellMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSessionMgr.h"
|
||||
|
||||
bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
{
|
||||
@@ -728,7 +729,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
|
||||
data << GetPlayer()->GetGUID();
|
||||
data << uint32(achievement->ID);
|
||||
data << uint32(0); // display name as plain string in chat (always 0 for guild)
|
||||
sWorld->SendGlobalMessage(&data);
|
||||
sWorldSessionMgr->SendGlobalMessage(&data);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -741,10 +742,10 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
|
||||
data << uint32(achievement->ID);
|
||||
std::size_t linkTypePos = data.wpos();
|
||||
data << uint32(1); // display name as clickable link in chat
|
||||
sWorld->SendGlobalMessage(&data, nullptr, teamId);
|
||||
sWorldSessionMgr->SendGlobalMessage(&data, nullptr, teamId);
|
||||
|
||||
data.put<uint32>(linkTypePos, 0); // display name as plain string in chat
|
||||
sWorld->SendGlobalMessage(&data, nullptr, teamId == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE);
|
||||
sWorldSessionMgr->SendGlobalMessage(&data, nullptr, teamId == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE);
|
||||
}
|
||||
}
|
||||
// if player is in world he can tell his friends about new achievement
|
||||
|
||||
Reference in New Issue
Block a user