Core/Units: Added helper functions to modify UNIT_FLAG_UNINTERACTIBLE
Port From (https://github.com/TrinityCore/TrinityCore/commit/88ff97c1f96381565c47f8ca1993bdc7fce19fd6)
This commit is contained in:
@@ -131,7 +131,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Curator
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(2), task =>
|
||||
{
|
||||
me.SetReactState(ReactStates.Aggressive);
|
||||
me.RemoveUnitFlag(UnitFlags.Uninteractible);
|
||||
me.SetUninteractible(false);
|
||||
DoZoneInCombat();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Scripts.EasternKingdoms.Karazhan.Nightbane
|
||||
phase = NightbanePhases.Intro;
|
||||
me.SetActive(true);
|
||||
me.SetFarVisible(true);
|
||||
me.RemoveUnitFlag(UnitFlags.Uninteractible);
|
||||
me.SetUninteractible(false);
|
||||
me.GetMotionMaster().MoveAlongSplineChain(PointIds.IntroStart, SplineChainIds.IntroStart, false);
|
||||
HandleTerraceDoors(false);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
creature.InterruptNonMeleeSpells(true);
|
||||
creature.RemoveAllAuras();
|
||||
creature.SetHealth(0);
|
||||
creature.SetUnitFlag(UnitFlags.Uninteractible);
|
||||
creature.SetUninteractible(true);
|
||||
creature.GetMotionMaster().Clear();
|
||||
creature.GetMotionMaster().MoveIdle();
|
||||
creature.SetStandState(UnitStandStateType.Dead);
|
||||
@@ -158,7 +158,7 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
|
||||
public static void Resurrect(Creature target)
|
||||
{
|
||||
target.RemoveUnitFlag(UnitFlags.Uninteractible);
|
||||
target.SetUninteractible(false);
|
||||
target.SetFullHealth();
|
||||
target.SetStandState(UnitStandStateType.Stand);
|
||||
target.CastSpell(target, SpellIds.ResVisual, true);
|
||||
@@ -1070,7 +1070,7 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
Creature Romulo = ObjectAccessor.GetCreature(me, RomuloGUID);
|
||||
if (Romulo)
|
||||
{
|
||||
Romulo.RemoveUnitFlag(UnitFlags.Uninteractible);
|
||||
Romulo.SetUninteractible(false);
|
||||
Romulo.GetMotionMaster().Clear();
|
||||
Romulo.SetDeathState(DeathState.JustDied);
|
||||
Romulo.CombatStop(true);
|
||||
@@ -1320,7 +1320,7 @@ namespace Scripts.EasternKingdoms.Karazhan.EsOpera
|
||||
Creature Julianne = ObjectAccessor.GetCreature(me, JulianneGUID);
|
||||
if (Julianne)
|
||||
{
|
||||
Julianne.RemoveUnitFlag(UnitFlags.Uninteractible);
|
||||
Julianne.SetUninteractible(false);
|
||||
Julianne.GetMotionMaster().Clear();
|
||||
Julianne.SetDeathState(DeathState.JustDied);
|
||||
Julianne.CombatStop(true);
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Scripts.EasternKingdoms.Karazhan.PrinceMalchezaar
|
||||
if (spellInfo.Id == SpellIds.InfernalRelay)
|
||||
{
|
||||
me.SetDisplayId(me.GetNativeDisplayId());
|
||||
me.SetUnitFlag(UnitFlags.Uninteractible);
|
||||
me.SetUninteractible(true);
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(4), task => DoCast(me, SpellIds.Hellfire));
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(170), task =>
|
||||
@@ -402,7 +402,7 @@ namespace Scripts.EasternKingdoms.Karazhan.PrinceMalchezaar
|
||||
Creature axe = me.SummonCreature(MiscConst.MalchezarsAxe, me.GetPositionX(), me.GetPositionY(), me.GetPositionZ(), 0, TempSummonType.TimedDespawnOutOfCombat, TimeSpan.FromSeconds(1));
|
||||
if (axe)
|
||||
{
|
||||
axe.SetUnitFlag(UnitFlags.Uninteractible);
|
||||
axe.SetUninteractible(true);
|
||||
axe.SetFaction(me.GetFaction());
|
||||
axes[i] = axe.GetGUID();
|
||||
if (target)
|
||||
|
||||
Reference in New Issue
Block a user