Hopefuly correctly fix a crash in Player::KilledMonsterCredit now

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2009-11-03 18:27:35 +01:00
parent b82cf57807
commit 412fe99319
+5 -3
View File
@@ -14022,9 +14022,11 @@ void Player::KilledMonsterCredit( uint32 entry, uint64 guid )
uint32 addkillcount = 1;
uint32 real_entry = entry;
if (guid)
if (Creature *killed = GetMap()->GetCreature(guid) )
if (killed->GetEntry())
real_entry = killed->GetEntry();
{
Creature *killed = GetMap()->GetCreature(guid);
if (killed && killed->GetEntry())
real_entry = killed->GetEntry();
}
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, real_entry, addkillcount);
for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )