mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 19:37:01 +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,11 +1015,20 @@ void BattleGround::RemovePlayerAtLeave(ObjectGuid guid, bool Transport, bool Sen
|
||||||
if (plr && plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
if (plr && plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||||
plr->RemoveSpellsCausingAura(SPELL_AURA_MOD_SHAPESHIFT);
|
plr->RemoveSpellsCausingAura(SPELL_AURA_MOD_SHAPESHIFT);
|
||||||
|
|
||||||
if(plr && !plr->isAlive()) // resurrect on exit
|
if (plr)
|
||||||
|
{
|
||||||
|
// 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->ResurrectPlayer(1.0f);
|
||||||
plr->SpawnCorpseBones();
|
plr->SpawnCorpseBones();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RemovePlayer(plr, guid); // BG subclass specific code
|
RemovePlayer(plr, guid); // BG subclass specific code
|
||||||
|
|
||||||
|
|
@ -1217,11 +1226,15 @@ void BattleGround::AddPlayer(Player *plr)
|
||||||
plr->SetHealth(plr->GetMaxHealth());
|
plr->SetHealth(plr->GetMaxHealth());
|
||||||
plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
|
plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plr->CastSpell(plr, SPELL_ARENA_DAMPENING, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(GetStatus() == STATUS_WAIT_JOIN) // not started yet
|
if(GetStatus() == STATUS_WAIT_JOIN) // not started yet
|
||||||
plr->CastSpell(plr, SPELL_PREPARATION, true); // reduces all mana cost of spells.
|
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());
|
plr->GetAchievementMgr().ResetAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE, ACHIEVEMENT_CRITERIA_CONDITION_MAP, GetMapId());
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,9 @@ enum BattleGroundSpells
|
||||||
SPELL_HORDE_GREEN_FLAG = 35775,
|
SPELL_HORDE_GREEN_FLAG = 35775,
|
||||||
SPELL_PREPARATION = 44521, // Preparation
|
SPELL_PREPARATION = 44521, // Preparation
|
||||||
SPELL_RECENTLY_DROPPED_FLAG = 42792, // Recently Dropped Flag
|
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
|
enum BattleGroundTimeIntervals
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11636"
|
#define REVISION_NR "11637"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue