Skip to content

Commit

Permalink
[10246] Restore work killCredit and kill achievements in regular diff…
Browse files Browse the repository at this point in the history
…iculty instances.
  • Loading branch information
VladimirMangos committed Jul 22, 2010
1 parent ea37b26 commit 424989c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/game/Creature.cpp
Expand Up @@ -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));
Expand Down
3 changes: 2 additions & 1 deletion src/game/Group.cpp
Expand Up @@ -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());
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/game/Player.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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());
}
}

Expand Down
2 changes: 1 addition & 1 deletion 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__

0 comments on commit 424989c

Please sign in to comment.