From 9d8b66cf93d82c7d0775078febb94515841bd953 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 22 Jul 2010 13:08:43 +0400 Subject: [PATCH] [10246] Restore work killCredit and kill achievements in regular difficulty instances. --- src/game/Creature.cpp | 2 -- src/game/Group.cpp | 3 ++- src/game/Player.cpp | 4 +++- src/shared/revision_nr.h | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index e54c13a19..a2864e81b 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -2032,8 +2032,6 @@ void Creature::AllLootRemovedFromCorpse() { uint32 nDeathTimer; - CreatureInfo const *cinfo = GetCreatureInfo(); - // corpse was not skinned -> apply corpse looted timer if (!lootForSkin) nDeathTimer = (uint32)((m_corpseDelay * IN_MILLISECONDS) * sWorld.getConfig(CONFIG_FLOAT_RATE_CORPSE_DECAY_LOOTED)); diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 856a084e7..aa3cc947a 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -1842,7 +1842,8 @@ static void RewardGroupAtKill_helper(Player* pGroupGuy, Unit* pVictim, uint32 co { // normal creature (not pet/etc) can be only in !PvP case if(pVictim->GetTypeId()==TYPEID_UNIT) - pGroupGuy->KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetObjectGuid()); + if(CreatureInfo const* normalInfo = ObjectMgr::GetCreatureTemplate(pVictim->GetEntry())) + pGroupGuy->KilledMonster(normalInfo, pVictim->GetObjectGuid()); } } } diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 4c6f2841e..bcb00b475 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -6262,6 +6262,7 @@ void Player::RewardReputation(Unit *pVictim, float rate) if(!pVictim || pVictim->GetTypeId() == TYPEID_PLAYER) return; + // used current difficulty creature entry instead normal version (GetEntry()) ReputationOnKillEntry const* Rep = sObjectMgr.GetReputationOnKilEntry(((Creature*)pVictim)->GetCreatureInfo()->Entry); if(!Rep) @@ -20260,7 +20261,8 @@ void Player::RewardSinglePlayerAtKill(Unit* pVictim) // normal creature (not pet/etc) can be only in !PvP case if(pVictim->GetTypeId()==TYPEID_UNIT) - KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetObjectGuid()); + if(CreatureInfo const* normalInfo = ObjectMgr::GetCreatureTemplate(pVictim->GetEntry())) + KilledMonster(normalInfo, pVictim->GetObjectGuid()); } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8a90b4a8c..9212fa34c 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10245" + #define REVISION_NR "10246" #endif // __REVISION_NR_H__