mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 01:37:04 +00:00
[11637] Implement 10% healing reduction on BGs and arenas
This commit is contained in:
parent
75c4578be8
commit
5776c09ad8
3 changed files with 20 additions and 5 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue