[9012] fix crash when achievement is completed and player isn't in world

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-17 19:09:40 +01:00
parent 6b405c63cc
commit 3e133c4786
6 changed files with 18 additions and 5 deletions
+2 -1
View File
@@ -592,7 +592,8 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
data << uint32(0); // 1=link supplied string as player name, 0=display plain string
sWorld.SendGlobalMessage(&data);
}
else
// if player is in world he can tell his friends about new achievement
else if (GetPlayer()->IsInWorld())
{
CellPair p = MaNGOS::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());