Core/Auras: Implement SpellAuraInterruptFlags2::EndOfEncounter
Port From (https://github.com/TrinityCore/TrinityCore/commit/998ee363c5e41141da158ea39c0dae0814967fba)
This commit is contained in:
@@ -852,6 +852,8 @@ namespace Game.BattleGrounds
|
|||||||
player.RemoveAura(BattlegroundConst.SpellMercenaryShapeshift);
|
player.RemoveAura(BattlegroundConst.SpellMercenaryShapeshift);
|
||||||
player.RemovePlayerFlagEx(PlayerFlagsEx.MercenaryMode);
|
player.RemovePlayerFlagEx(PlayerFlagsEx.MercenaryMode);
|
||||||
|
|
||||||
|
player.AtEndOfEncounter();
|
||||||
|
|
||||||
player.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.LeaveArenaOrBattleground);
|
player.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.LeaveArenaOrBattleground);
|
||||||
|
|
||||||
if (!player.IsAlive()) // resurrect on exit
|
if (!player.IsAlive()) // resurrect on exit
|
||||||
|
|||||||
@@ -591,6 +591,11 @@ namespace Game.Entities
|
|||||||
Unit.ProcSkillsAndAuras(this, null, new ProcFlagsInit(ProcFlags.EncounterStart), new ProcFlagsInit(), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
|
Unit.ProcSkillsAndAuras(this, null, new ProcFlagsInit(ProcFlags.EncounterStart), new ProcFlagsInit(), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AtEndOfEncounter()
|
||||||
|
{
|
||||||
|
RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.EndOfEncounter);
|
||||||
|
}
|
||||||
|
|
||||||
public void _RegisterDynObject(DynamicObject dynObj)
|
public void _RegisterDynObject(DynamicObject dynObj)
|
||||||
{
|
{
|
||||||
m_dynObj.Add(dynObj);
|
m_dynObj.Add(dynObj);
|
||||||
|
|||||||
@@ -372,6 +372,8 @@ namespace Game.Maps
|
|||||||
case EncounterState.Fail:
|
case EncounterState.Fail:
|
||||||
ResetCombatResurrections();
|
ResetCombatResurrections();
|
||||||
SendEncounterEnd();
|
SendEncounterEnd();
|
||||||
|
|
||||||
|
instance.DoOnPlayers(player => player.AtEndOfEncounter());
|
||||||
break;
|
break;
|
||||||
case EncounterState.Done:
|
case EncounterState.Done:
|
||||||
ResetCombatResurrections();
|
ResetCombatResurrections();
|
||||||
@@ -382,6 +384,8 @@ namespace Game.Maps
|
|||||||
DoUpdateCriteria(CriteriaType.DefeatDungeonEncounter, dungeonEncounter.Id);
|
DoUpdateCriteria(CriteriaType.DefeatDungeonEncounter, dungeonEncounter.Id);
|
||||||
SendBossKillCredit(dungeonEncounter.Id);
|
SendBossKillCredit(dungeonEncounter.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
instance.DoOnPlayers(player => player.AtEndOfEncounter());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user