diff options
author | Machiavelli <none@none> | 2009-11-03 18:27:35 +0100 |
---|---|---|
committer | Machiavelli <none@none> | 2009-11-03 18:27:35 +0100 |
commit | 412fe99319d0cada3db1e0559c7e923a00656453 (patch) | |
tree | 3ff29d94a7c844b0ea33e97221d1e9fd210e68d9 | |
parent | b82cf57807506de1ff81c4ca4dfc1e1f910fc4b2 (diff) |
Hopefuly correctly fix a crash in Player::KilledMonsterCredit now
--HG--
branch : trunk
-rw-r--r-- | src/game/Player.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 30b83e41dce..782ba7c562c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -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 ) |