Removed SPELL_AURA_MOUNTED when BG end and player leave

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-26 16:45:43 +01:00
parent 9c6859332c
commit 37d255d70f
4 changed files with 285 additions and 205 deletions
+5 -2
View File
@@ -737,7 +737,7 @@ void BattleGround::EndBattleGround(uint32 winner)
}
// should remove spirit of redemption
if(plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
if (plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
plr->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
if (!plr->isAlive())
@@ -996,9 +996,12 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
Player *plr = objmgr.GetPlayer(guid);
// should remove spirit of redemption
if(plr && plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
if (plr && plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
plr->RemoveAurasByType(SPELL_AURA_MOD_SHAPESHIFT);
if (plr->HasAuraType(SPELL_AURA_MOUNTED))
plr->RemoveAurasByType(SPELL_AURA_MOUNTED);
if(plr && !plr->isAlive()) // resurrect on exit
{
plr->ResurrectPlayer(1.0f);
+5
View File
@@ -2378,6 +2378,7 @@ void AuraEffect::HandleAddModifier(bool apply, bool Real, bool changeAmount)
// Auras with charges do not mod amount of passive auras
if (GetParentAura()->GetAuraCharges())
return;
// reapply some passive spells after add/remove related spellmods
// Warning: it is a dead loop if 2 auras each other amount-shouldn't happen
switch (modOp)
@@ -2425,6 +2426,10 @@ void AuraEffect::HandleAddModifier(bool apply, bool Real, bool changeAmount)
default:
break;
}
if (m_spellProto->Id == 11129 && !apply)
{
m_target->RemoveAurasDueToSpell(28682);
}
}
void AuraEffect::TriggerSpell()
+5 -1
View File
@@ -5566,6 +5566,10 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// Combustion
case 11129:
{
Unit *caster = triggeredByAura->GetCaster();
if (!caster || !damage)
return false;
//last charge and crit
if (triggeredByAura->GetParentAura()->GetAuraCharges() <= 1 && (procEx & PROC_EX_CRITICAL_HIT) )
{
@@ -5573,7 +5577,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
return true; // charge counting (will removed)
}
CastSpell(this, 11129, true, castItem, triggeredByAura);
CastSpell(this, 28682, true, castItem, triggeredByAura);
return (procEx & PROC_EX_CRITICAL_HIT);// charge update only at crit hits, no hidden cooldowns
}
// Glyph of Ice Block