diff options
author | SnapperRy <snapperryen@gmail.com> | 2016-10-06 11:14:36 +0200 |
---|---|---|
committer | SnapperRy <snapperryen@gmail.com> | 2016-10-06 11:16:05 +0200 |
commit | 79c1b5942c00636485c035c7b0b5b2d9de7d3d65 (patch) | |
tree | 7e2e6a2a24f204fc096b57e051dd9298b308d959 | |
parent | 5417a1a37f28d2746e83a7423f82abc46e2b4a4a (diff) |
Revert "Core/Creature: don't give kill and achievement credit if a creature kills itself."
Causes an issue where a creature killed by a reflected spell will not give credits.
Thanks Aokromes for noticing. Reverting this until a better solution is found.
This reverts commit 5417a1a37f28d2746e83a7423f82abc46e2b4a4a.
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 07d4413565f..4dcb9a505ea 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11642,9 +11642,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss) } } - // Don't give kill credit if creature killed itself - if (this != victim) - player->RewardPlayerAndGroupAtKill(victim, false); + player->RewardPlayerAndGroupAtKill(victim, false); } // Do KILL and KILLED procs. KILL proc is called only for the unit who landed the killing blow (and its owner - for pets and totems) regardless of who tapped the victim @@ -11661,11 +11659,10 @@ void Unit::Kill(Unit* victim, bool durabilityLoss) // Proc auras on death - must be before aura/combat remove victim->ProcSkillsAndAuras(victim, PROC_FLAG_NONE, PROC_FLAG_DEATH, PROC_SPELL_TYPE_MASK_ALL, PROC_SPELL_PHASE_NONE, PROC_HIT_NONE, nullptr, nullptr, nullptr); - // update get killing blow achievements (only if creature did not kill itself), must be done before setDeathState to be able to require auras on target + // update get killing blow achievements, must be done before setDeathState to be able to require auras on target // and before Spirit of Redemption as it also removes auras - if (this != victim) - if (Player* killerPlayer = GetCharmerOrOwnerPlayerOrPlayerItself()) - killerPlayer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, victim); + if (Player* killerPlayer = GetCharmerOrOwnerPlayerOrPlayerItself()) + killerPlayer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, victim); // if talent known but not triggered (check priest class for speedup check) bool spiritOfRedemption = false; |