Moved battleground achievement scripted checks into scripts
Call ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL updates in code Implemented achievements: Save the Day, Quick Cap, Warsong Expedience --HG-- branch : trunk
This commit is contained in:
@@ -715,7 +715,12 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||
DEBUG_LOG("DealDamage: victim just died");
|
||||
|
||||
if (pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
pVictim->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, health);
|
||||
// call before auras are removed
|
||||
if (Player* killer = ToPlayer())
|
||||
killer->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL, 0, 0, pVictim);
|
||||
}
|
||||
|
||||
Kill(pVictim, durabilityLoss);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user