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:
Shauren
2010-08-13 13:48:59 +02:00
parent 9bd2619425
commit 30468a106f
11 changed files with 175 additions and 54 deletions
+5
View File
@@ -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);