[11637] Implement 10% healing reduction on BGs and arenas

This commit is contained in:
zergtmn 2011-06-18 00:08:33 +06:00
parent 75c4578be8
commit 5776c09ad8
3 changed files with 20 additions and 5 deletions

View file

@ -1015,10 +1015,19 @@ void BattleGround::RemovePlayerAtLeave(ObjectGuid guid, bool Transport, bool Sen
if (plr && plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
plr->RemoveSpellsCausingAura(SPELL_AURA_MOD_SHAPESHIFT);
if(plr && !plr->isAlive()) // resurrect on exit
if (plr)
{
plr->ResurrectPlayer(1.0f);
plr->SpawnCorpseBones();
// should remove spirit of redemption
if (plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
plr->RemoveSpellsCausingAura(SPELL_AURA_MOD_SHAPESHIFT);
plr->RemoveAurasDueToSpell(isArena() ? SPELL_ARENA_DAMPENING : SPELL_BATTLEGROUND_DAMPENING);
if (!plr->isAlive()) // resurrect on exit
{
plr->ResurrectPlayer(1.0f);
plr->SpawnCorpseBones();
}
}
RemovePlayer(plr, guid); // BG subclass specific code
@ -1217,11 +1226,15 @@ void BattleGround::AddPlayer(Player *plr)
plr->SetHealth(plr->GetMaxHealth());
plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
}
plr->CastSpell(plr, SPELL_ARENA_DAMPENING, true);
}
else
{
if(GetStatus() == STATUS_WAIT_JOIN) // not started yet
plr->CastSpell(plr, SPELL_PREPARATION, true); // reduces all mana cost of spells.
plr->CastSpell(plr, SPELL_BATTLEGROUND_DAMPENING, true);
}
plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE, ACHIEVEMENT_CRITERIA_CONDITION_MAP, GetMapId());

View file

@ -96,7 +96,9 @@ enum BattleGroundSpells
SPELL_HORDE_GREEN_FLAG = 35775,
SPELL_PREPARATION = 44521, // Preparation
SPELL_RECENTLY_DROPPED_FLAG = 42792, // Recently Dropped Flag
SPELL_AURA_PLAYER_INACTIVE = 43681 // Inactive
SPELL_AURA_PLAYER_INACTIVE = 43681, // Inactive
SPELL_ARENA_DAMPENING = 74410, // Arena - Dampening
SPELL_BATTLEGROUND_DAMPENING = 74411, // Battleground - Dampening
};
enum BattleGroundTimeIntervals

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11636"
#define REVISION_NR "11637"
#endif // __REVISION_NR_H__