Fix build. (scripts are fixed but most need updated tho)

This commit is contained in:
hondacrx
2019-08-18 23:23:18 -04:00
parent aa71a8926a
commit b3faf9685a
61 changed files with 1611 additions and 1442 deletions
@@ -86,7 +86,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.HeraldVolazj
public override void DamageTaken(Unit pAttacker, ref uint damage)
{
if (me.HasFlag(UnitFields.Flags, UnitFlags.NotSelectable))
if (me.HasUnitFlag(UnitFlags.NotSelectable))
damage = 0;
if ((GetHealthPct(0) >= 66 && GetHealthPct(damage) < 66) ||
@@ -110,7 +110,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.HeraldVolazj
// Channel visual
DoCast(me, SpellIds.InsanityVisual, true);
// Unattackable
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NotSelectable);
me.SetControlled(true, UnitState.Stunned);
}
@@ -167,7 +167,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.HeraldVolazj
// Cleanup
Summons.DespawnAll();
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NotSelectable);
me.SetControlled(false, UnitState.Stunned);
}
@@ -231,7 +231,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.HeraldVolazj
return;
insanityHandled = 0;
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NotSelectable);
me.SetControlled(false, UnitState.Stunned);
me.RemoveAurasDueToSpell(SpellIds.InsanityVisual);
}
@@ -184,7 +184,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.JedogaShadowseeker
me.GetMotionMaster().MovePoint(1, Misc.JedogaPosition[1]);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
me.RemoveUnitFlag(UnitFlags.NotSelectable | UnitFlags.NonAttackable);
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
@@ -214,7 +214,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.JedogaShadowseeker
{
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, true);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NotSelectable | UnitFlags.NonAttackable);
me.AttackStop();
me.RemoveAllAuras();
@@ -350,14 +350,14 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.JedogaShadowseeker
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
me.RemoveUnitFlag(UnitFlags.NotSelectable | UnitFlags.NonAttackable);
}
else
{
DoCast(me, SpellIds.SphereVisual, false);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, true);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NotSelectable | UnitFlags.NonAttackable);
}
}
@@ -434,7 +434,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.JedogaShadowseeker
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
me.RemoveUnitFlag(UnitFlags.NotSelectable | UnitFlags.NonAttackable);
float distance = me.GetDistance(Misc.JedogaPosition[1]);
@@ -456,14 +456,14 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.JedogaShadowseeker
me.RemoveAurasDueToSpell(SpellIds.SphereVisual);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, false);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, false);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
me.RemoveUnitFlag(UnitFlags.NotSelectable | UnitFlags.NonAttackable);
}
if (instance.GetBossState(DataTypes.JedogaShadowseeker) == EncounterState.InProgress && !me.HasAura(SpellIds.SphereVisual))
{
DoCast(me, SpellIds.SphereVisual, false);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Normal, true);
me.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NotSelectable | UnitFlags.NonAttackable);
}
}
bCheckTimer = 2 * Time.InMilliseconds;
@@ -262,7 +262,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.PrinceTaldaram
void RemovePrison()
{
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NotSelectable);
me.RemoveAurasDueToSpell(SpellIds.BeamVisual);
me.SetHomePosition(me.GetPositionX(), me.GetPositionY(), Misc.DataGroundPositionZ, me.GetOrientation());
DoCast(SpellIds.HoverFall);
@@ -373,7 +373,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.PrinceTaldaram
Creature PrinceTaldaram = ObjectAccessor.GetCreature(go, instance.GetGuidData(DataTypes.PrinceTaldaram));
if (PrinceTaldaram && PrinceTaldaram.IsAlive())
{
go.SetFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.AddFlag(GameObjectFlags.NotSelectable);
go.SetGoState(GameObjectState.Active);
switch (go.GetEntry())
@@ -135,19 +135,19 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet
if (SpheresState[0] != 0)
{
go.SetGoState(GameObjectState.Active);
go.SetFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.AddFlag(GameObjectFlags.NotSelectable);
}
else
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
break;
case GameObjectIds.Sphere2:
if (SpheresState[1] != 0)
{
go.SetGoState(GameObjectState.Active);
go.SetFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.AddFlag(GameObjectFlags.NotSelectable);
}
else
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
break;
case GameObjectIds.PrinceTaldaramGate:
AddDoor(go, true);
@@ -105,7 +105,7 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub.Anubarak
public override void Reset()
{
base.Reset();
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
instance.DoStopCriteriaTimer(CriteriaTimedTypes.Event, Misc.AchievGottaGoStartEvent);
_nextSubmerge = 75;
_petCount = 0;
@@ -332,7 +332,7 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub.Anubarak
{
me.RemoveAurasDueToSpell(SpellIds.Submerge);
me.RemoveAurasDueToSpell(SpellIds.ImpaleAura);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
DoCastSelf(SpellIds.Emerge);
_events.SetPhase(Misc.PhaseEmerge);
_events.ScheduleEvent(EventIds.Pound, TimeSpan.FromSeconds(13), TimeSpan.FromSeconds(18), 0, Misc.PhaseEmerge);
@@ -363,7 +363,7 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub.Anubarak
{
if (spell.Id == SpellIds.Submerge)
{
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveAurasDueToSpell(SpellIds.LeechingSwarm);
DoCastSelf(SpellIds.ImpaleAura, true);
@@ -356,8 +356,8 @@ namespace Scripts.Northrend.AzjolNerub.AzjolNerub.Nadronox
public void Initialize()
{
me.SetFloatValue(UnitFields.BoundingRadius, 9.0f);
me.SetFloatValue(UnitFields.CombatReach, 9.0f);
me.SetBoundingRadius(9.0f);
me.SetCombatReach(9.0f);
_enteredCombat = false;
_doorsWebbed = false;
_lastPlayerCombatState = false;
@@ -242,7 +242,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
me.SetReactState(ReactStates.Passive);
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.ImmuneToPc);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.ImmuneToPc);
}
public abstract void Initialize();
@@ -320,7 +320,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
if (player.IsAlive())
{
temp.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.ImmuneToPc);
temp.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.ImmuneToPc);
temp.SetReactState(ReactStates.Aggressive);
temp.SetInCombatWith(player);
player.SetInCombatWith(temp);
@@ -155,7 +155,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
if (pAnnouncer)
{
pAnnouncer.GetMotionMaster().MovePoint(0, 748.309f, 619.487f, 411.171f);
pAnnouncer.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
pAnnouncer.AddNpcFlag(NPCFlags.Gossip);
pAnnouncer.SummonGameObject(instance.IsHeroic() ? GameObjectIds.CHAMPIONS_LOOT_H : GameObjectIds.CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, Quaternion.fromEulerAnglesZYX(1.42f, 0.0f, 0.0f), 90000);
}
}
@@ -169,7 +169,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
if (pBoss)
{
pBoss.GetMotionMaster().MovePoint(0, 746.88f, 618.74f, 411.06f);
pBoss.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
pBoss.RemoveUnitFlag(UnitFlags.NonAttackable);
pBoss.SetReactState(ReactStates.Aggressive);
}
}
@@ -181,7 +181,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
if (pAnnouncer)
{
pAnnouncer.GetMotionMaster().MovePoint(0, 748.309f, 619.487f, 411.171f);
pAnnouncer.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
pAnnouncer.AddNpcFlag(NPCFlags.Gossip);
pAnnouncer.SummonGameObject(instance.IsHeroic() ? GameObjectIds.EADRIC_LOOT_H : GameObjectIds.EADRIC_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, Quaternion.fromEulerAnglesZYX(1.42f, 0.0f, 0.0f), 90000);
}
}
@@ -193,7 +193,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
if (pAnnouncer)
{
pAnnouncer.GetMotionMaster().MovePoint(0, 748.309f, 619.487f, 411.171f);
pAnnouncer.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
pAnnouncer.AddNpcFlag(NPCFlags.Gossip);
pAnnouncer.SummonGameObject(instance.IsHeroic() ? GameObjectIds.PALETRESS_LOOT_H : GameObjectIds.PALETRESS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, Quaternion.fromEulerAnglesZYX(1.42f, 0.0f, 0.0f), 90000);
}
}
@@ -170,8 +170,8 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
uiTimer = 0;
me.SetReactState(ReactStates.Passive);
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
me.AddUnitFlag(UnitFlags.NonAttackable);
me.AddNpcFlag(NPCFlags.Gossip);
SetGrandChampionsForEncounter();
SetArgentChampion();
@@ -409,7 +409,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
public void StartEncounter()
{
me.RemoveFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
me.RemoveNpcFlag(NPCFlags.Gossip);
if (instance.GetData((uint)Data.BOSS_BLACK_KNIGHT) == (uint)EncounterState.NotStarted)
{
@@ -444,7 +444,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
if (player.IsAlive())
{
temp.SetHomePosition(me.GetPositionX(), me.GetPositionY(), me.GetPositionZ(), me.GetOrientation());
temp.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
temp.RemoveUnitFlag(UnitFlags.NonAttackable);
temp.SetReactState(ReactStates.Aggressive);
temp.SetInCombatWith(player);
player.SetInCombatWith(temp);
@@ -494,7 +494,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheChampion
{
if (instance.GetData((uint)Data.BOSS_GRAND_CHAMPIONS) == (uint)EncounterState.NotStarted)
{
summon.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
summon.AddUnitFlag(UnitFlags.NonAttackable);
summon.SetReactState(ReactStates.Passive);
}
}
@@ -106,7 +106,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
_JustReachedHome();
instance.SetBossState(DataTypes.BossJaraxxus, EncounterState.Fail);
DoCast(me, Spells.JaraxxusChains);
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NonAttackable);
}
public override void KilledUnit(Unit who)
@@ -218,7 +218,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
public override void Reset()
{
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetInCombatWithZone();
DoCast(Jaraxxus.SpellLegionFlameEffect);
}
@@ -247,9 +247,9 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
me.SetReactState(ReactStates.Passive);
if (!IsHeroic())
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
else
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
_summons.DespawnAll();
}
@@ -332,9 +332,9 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
me.SetReactState(ReactStates.Passive);
if (!IsHeroic())
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
else
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Pacified);
_summons.DespawnAll();
}
@@ -182,7 +182,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
if (snobold)
{
snobold.ExitVehicle();
snobold.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
snobold.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
snobold.ToCreature().GetAI().DoAction(Actions.DisableFireBomb);
snobold.CastSpell(me, SpellIds.JumpToHand, true);
break;
@@ -209,7 +209,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
{
case 0:
instance.DoUseDoorOrButton(instance.GetGuidData(GameObjectIds.MainGateDoor));
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Aggressive);
me.SetInCombatWithZone();
break;
@@ -300,7 +300,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
public override void Reset()
{
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetInCombatWithZone();
_events.ScheduleEvent(Events.CheckMount, TimeSpan.FromSeconds(1));
_events.ScheduleEvent(Events.FireBomb, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30));
@@ -530,7 +530,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
if (!Enraged && instance.GetData(DataTypes.NorthrendBeasts) == NorthrendBeasts.SnakesSpecial)
{
me.RemoveAurasDueToSpell(SpellIds.Submerge);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
DoCast(SpellIds.Enrage);
Enraged = true;
Talk(TextIds.EmoteEnrage);
@@ -567,7 +567,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
Creature acidmaw = me.SummonCreature(CreatureIds.Acidmaw, MiscData.ToCCommonLoc[9].GetPositionX(), MiscData.ToCCommonLoc[9].GetPositionY(), MiscData.ToCCommonLoc[9].GetPositionZ(), 5, TempSummonType.ManualDespawn);
if (acidmaw)
{
acidmaw.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
acidmaw.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
acidmaw.SetReactState(ReactStates.Aggressive);
acidmaw.SetInCombatWithZone();
acidmaw.CastSpell(acidmaw, SpellIds.Emerge);
@@ -603,7 +603,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
me.SetInCombatWithZone();
_events.SetPhase(Misc.PhaseSubmerged);
_events.ScheduleEvent(Events.Emerge, TimeSpan.FromSeconds(5), 0, Misc.PhaseSubmerged);
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.GetMotionMaster().MovePoint(0, MiscData.ToCCommonLoc[1].GetPositionX() + RandomHelper.FRand(-40.0f, 40.0f), MiscData.ToCCommonLoc[1].GetPositionY() + RandomHelper.FRand(-40.0f, 40.0f), MiscData.ToCCommonLoc[1].GetPositionZ());
WasMobile = !WasMobile;
}
@@ -615,7 +615,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
me.SetDisplayId(ModelMobile);
me.RemoveAurasDueToSpell(SpellIds.Submerge);
me.RemoveAurasDueToSpell(SpellIds.GroundVisual0);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
// if the worm was mobile before submerging, make him stationary now
if (WasMobile)
@@ -710,7 +710,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
{
case 0:
instance.DoUseDoorOrButton(instance.GetGuidData(GameObjectIds.MainGateDoor));
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Aggressive);
me.SetInCombatWithZone();
break;
@@ -840,7 +840,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
break;
case 2:
instance.DoUseDoorOrButton(instance.GetGuidData(GameObjectIds.MainGateDoor));
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Aggressive);
me.SetInCombatWithZone();
break;
@@ -944,7 +944,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
me.SetTarget(_trampleTargetGUID);
_trampleCast = false;
SetCombatMovement(false);
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NonAttackable);
me.SetControlled(true, UnitState.Root);
me.GetMotionMaster().Clear();
me.GetMotionMaster().MoveIdle();
@@ -1033,7 +1033,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
Talk(TextIds.EmoteTrampleFail);
}
_movementStarted = false;
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.RemoveUnitFlag(UnitFlags.NonAttackable);
SetCombatMovement(true);
me.GetMotionMaster().MovementExpired();
me.GetMotionMaster().Clear();
@@ -254,7 +254,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
GameObject cache = instance.GetGameObject(CrusadersCacheGUID);
if (cache)
cache.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
cache.RemoveFlag(GameObjectFlags.NotSelectable);
EventStage = 3100;
break;
default:
@@ -398,7 +398,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
{
Unit announcer = instance.GetCreature(GetGuidData(CreatureIds.Barrent));
if (announcer)
announcer.SetFlag64(UnitFields.NpcFlags, NPCFlags.Gossip);
announcer.AddNpcFlag(NPCFlags.Gossip);
Save();
}
}
@@ -783,14 +783,14 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
public override void Reset()
{
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NonAttackable);
Creature pAlly = GetClosestCreatureWithEntry(me, CreatureIds.Thrall, 300.0f);
if (pAlly)
pAlly.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
pAlly.AddUnitFlag(UnitFlags.NonAttackable);
pAlly = GetClosestCreatureWithEntry(me, CreatureIds.Proudmoore, 300.0f);
if (pAlly)
pAlly.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
pAlly.AddUnitFlag(UnitFlags.NonAttackable);
}
public override void AttackStart(Unit who) { }
@@ -846,7 +846,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
if (jaraxxus)
{
jaraxxus.RemoveAurasDueToSpell(Spells.JaraxxusChains);
jaraxxus.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
jaraxxus.RemoveUnitFlag(UnitFlags.NonAttackable);
jaraxxus.SetReactState(ReactStates.Defensive);
jaraxxus.SetInCombatWithZone();
}
@@ -887,7 +887,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
if (creature.IsVisible())
creature.SetVisible(false);
}
creature.RemoveFlag64(UnitFields.NpcFlags, NPCFlags.Gossip);
creature.RemoveNpcFlag(NPCFlags.Gossip);
return true;
}
@@ -959,12 +959,12 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
break;
case 5030:
Talk(Texts.Stage_4_04);
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.StateTalk);
me.SetEmoteState(Emote.StateTalk);
_updateTimer = 10 * Time.InMilliseconds;
_instance.SetData(DataTypes.Event, 5040);
break;
case 5040:
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotNone);
me.SetEmoteState(Emote.OneshotNone);
me.GetMotionMaster().MovePoint(1, MiscData.LichKingLoc[1]);
_updateTimer = 1 * Time.InMilliseconds;
_instance.SetData(DataTypes.Event, 0);
@@ -991,7 +991,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
if (go)
{
go.SetDisplayId(MiscData.DisplayIdDestroyedFloor);
go.SetFlag(GameObjectFields.Flags, GameObjectFlags.Damaged | GameObjectFlags.NoDespawn);
go.AddFlag(GameObjectFlags.Damaged | GameObjectFlags.NoDespawn);
go.SetGoState(GameObjectState.Active);
}
@@ -1039,7 +1039,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
Creature temp = ObjectAccessor.GetCreature(me, _instance.GetGuidData(CreatureIds.Jaraxxus));
if (temp)
{
temp.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
temp.RemoveUnitFlag(UnitFlags.NonAttackable);
temp.SetReactState(ReactStates.Aggressive);
temp.SetInCombatWithZone();
}
@@ -1144,7 +1144,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
Creature temp = me.SummonCreature(CreatureIds.Jaraxxus, MiscData.ToCCommonLoc[1].GetPositionX(), MiscData.ToCCommonLoc[1].GetPositionY(), MiscData.ToCCommonLoc[1].GetPositionZ(), 5.0f, TempSummonType.CorpseTimedDespawn, MiscData.DespawnTime);
if (temp)
{
temp.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
temp.AddUnitFlag(UnitFlags.NonAttackable);
temp.SetReactState(ReactStates.Passive);
temp.GetMotionMaster().MovePoint(0, MiscData.ToCCommonLoc[1].GetPositionX(), MiscData.ToCCommonLoc[1].GetPositionY() - 10, MiscData.ToCCommonLoc[1].GetPositionZ());
}
@@ -1233,20 +1233,20 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
switch (_instance.GetData(DataTypes.Event))
{
case 110:
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotTalk);
me.SetEmoteState(Emote.OneshotTalk);
Talk(Texts.Stage_0_01);
_updateTimer = 22 * Time.InMilliseconds;
_instance.SetData(DataTypes.Event, 120);
break;
case 140:
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotTalk);
me.SetEmoteState(Emote.OneshotTalk);
Talk(Texts.Stage_0_02);
_updateTimer = 5 * Time.InMilliseconds;
_instance.SetData(DataTypes.Event, 150);
break;
case 150:
{
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotNone);
me.SetEmoteState(Emote.OneshotNone);
if (_instance.GetBossState(DataTypes.BossBeasts) != EncounterState.Done)
{
_instance.DoUseDoorOrButton(_instance.GetGuidData(GameObjectIds.MainGateDoor));
@@ -1255,7 +1255,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
if (temp)
{
temp.GetMotionMaster().MovePoint(0, MiscData.ToCCommonLoc[5].GetPositionX(), MiscData.ToCCommonLoc[5].GetPositionY(), MiscData.ToCCommonLoc[5].GetPositionZ());
temp.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
temp.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
temp.SetReactState(ReactStates.Passive);
}
}
@@ -1279,7 +1279,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
if (temp)
{
temp.GetMotionMaster().MovePoint(0, MiscData.ToCCommonLoc[5].GetPositionX(), MiscData.ToCCommonLoc[5].GetPositionY(), MiscData.ToCCommonLoc[5].GetPositionZ());
temp.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
temp.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
temp.SetReactState(ReactStates.Passive);
}
}
@@ -1300,7 +1300,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
if (temp)
{
temp.GetMotionMaster().MovePoint(2, MiscData.ToCCommonLoc[5].GetPositionX(), MiscData.ToCCommonLoc[5].GetPositionY(), MiscData.ToCCommonLoc[5].GetPositionZ());
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Passive);
}
}
@@ -1543,13 +1543,13 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
switch (_instance.GetData(DataTypes.Event))
{
case 130:
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotTalk);
me.SetEmoteState(Emote.OneshotTalk);
Talk(Texts.Stage_0_03h);
_updateTimer = 3 * Time.InMilliseconds;
_instance.SetData(DataTypes.Event, 132);
break;
case 132:
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotNone);
me.SetEmoteState(Emote.OneshotNone);
_updateTimer = 5 * Time.InMilliseconds;
_instance.SetData(DataTypes.Event, 140);
break;
@@ -1617,13 +1617,13 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
switch (_instance.GetData(DataTypes.Event))
{
case 120:
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotTalk);
me.SetEmoteState(Emote.OneshotTalk);
Talk(Texts.Stage_0_03a);
_updateTimer = 2 * Time.InMilliseconds;
_instance.SetData(DataTypes.Event, 122);
break;
case 122:
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotNone);
me.SetEmoteState(Emote.OneshotNone);
_updateTimer = 3 * Time.InMilliseconds;
_instance.SetData(DataTypes.Event, 130);
break;
+1 -1
View File
@@ -59,7 +59,7 @@ namespace Scripts.Northrend
{
public npc_mageguard_dalaran(Creature creature) : base(creature)
{
creature.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
creature.AddUnitFlag(UnitFlags.NonAttackable);
creature.ApplySpellImmune(0, SpellImmunity.Damage, (uint)SpellSchools.Normal, true);
creature.ApplySpellImmune(0, SpellImmunity.Damage, SpellSchoolMask.Magic, true);
}
@@ -30,7 +30,7 @@ namespace Scripts.Northrend.DraktharonKeep.KingDred
public const uint GrievousBite = 48920;
public const uint ManglingSlash = 48873; // Cast On The Current Tank; Adds Debuf
public const uint FearsomeRoar = 48849;
public const uint PiercingSlash = 48878; // Debuff --> Armor Reduced By 75%
public const uint PiercingSlash = 48878; // Debuff -. Armor Reduced By 75%
public const uint RaptorCall = 59416; // Dummy
public const uint GutRip = 49710;
public const uint Rend = 13738;
@@ -229,15 +229,15 @@ namespace Scripts.Northrend.DraktharonKeep.Novos
_bubbled = state;
if (!state)
{
if (me.HasFlag(UnitFields.Flags, UnitFlags.NonAttackable))
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
if (me.HasUnitFlag(UnitFlags.NonAttackable))
me.RemoveUnitFlag(UnitFlags.NonAttackable);
if (me.HasUnitState(UnitState.Casting))
me.CastStop();
}
else
{
if (!me.HasFlag(UnitFields.Flags, UnitFlags.NonAttackable))
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
if (!me.HasUnitFlag(UnitFlags.NonAttackable))
me.AddUnitFlag(UnitFlags.NonAttackable);
DoCast(SpellIds.ArcaneField);
}
}
@@ -182,7 +182,7 @@ namespace Scripts.Northrend.DraktharonKeep.Trollgore
if (type == MovementGeneratorType.Point && pointId == Misc.PointLanding)
{
me.Dismount();
me.RemoveFlag(UnitFields.Flags, UnitFlags.ImmuneToPc | UnitFlags.ImmuneToNpc);
me.RemoveUnitFlag(UnitFlags.ImmuneToPc | UnitFlags.ImmuneToNpc);
DoCastAOE(SpellIds.InvaderTaunt);
}
}
@@ -206,7 +206,7 @@ namespace Scripts.Northrend.FrozenHalls.ForgeOfSouls
public npc_sylvanas_fos(Creature creature) : base(creature)
{
Initialize();
me.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
me.AddNpcFlag(NPCFlags.Gossip);
}
void Initialize()
@@ -226,7 +226,7 @@ namespace Scripts.Northrend.FrozenHalls.ForgeOfSouls
{
player.CLOSE_GOSSIP_MENU();
phase = Phase.Intro;
me.RemoveFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
me.RemoveNpcFlag(NPCFlags.Gossip);
_events.Reset();
_events.ScheduleEvent(EventIds.Intro1, 1000);
@@ -290,7 +290,7 @@ namespace Scripts.Northrend.FrozenHalls.ForgeOfSouls
public npc_jaina_fos(Creature creature) : base(creature)
{
Initialize();
me.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
me.AddNpcFlag(NPCFlags.Gossip);
}
void Initialize()
@@ -310,7 +310,7 @@ namespace Scripts.Northrend.FrozenHalls.ForgeOfSouls
{
player.CLOSE_GOSSIP_MENU();
phase = Phase.Intro;
me.RemoveFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
me.RemoveNpcFlag(NPCFlags.Gossip);
_events.Reset();
_events.ScheduleEvent(EventIds.Intro1, 1000);
}
@@ -299,7 +299,7 @@ namespace Scripts.Northrend.FrozenHalls.PitOfSaron.BossKrickAndIck
Initialize();
me.SetReactState(ReactStates.Passive);
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NonAttackable);
}
Creature GetIck()
@@ -87,7 +87,7 @@ namespace Scripts.Northrend.Gundrak.DrakkariColossus
if (GetData(Misc.DataIntroDone) != 0)
{
me.SetReactState(ReactStates.Aggressive);
me.RemoveFlag(UnitFields.Flags, UnitFlags.ImmuneToPc);
me.RemoveUnitFlag(UnitFlags.ImmuneToPc);
me.RemoveAura(SpellIds.FreezeAnim);
}
@@ -125,7 +125,7 @@ namespace Scripts.Northrend.Gundrak.DrakkariColossus
me.GetMotionMaster().MoveIdle();
me.SetReactState(ReactStates.Passive);
me.SetFlag(UnitFields.Flags, UnitFlags.ImmuneToPc);
me.AddUnitFlag(UnitFlags.ImmuneToPc);
DoCast(me, SpellIds.FreezeAnim);
break;
case Misc.ActionUnfreezeColossus:
@@ -133,7 +133,7 @@ namespace Scripts.Northrend.Gundrak.DrakkariColossus
return;
me.SetReactState(ReactStates.Aggressive);
me.RemoveFlag(UnitFields.Flags, UnitFlags.ImmuneToPc);
me.RemoveUnitFlag(UnitFlags.ImmuneToPc);
me.RemoveAura(SpellIds.FreezeAnim);
me.SetInCombatWithZone();
@@ -146,7 +146,7 @@ namespace Scripts.Northrend.Gundrak.DrakkariColossus
public override void DamageTaken(Unit attacker, ref uint damage)
{
if (me.HasFlag(UnitFields.Flags, UnitFlags.ImmuneToPc))
if (me.HasUnitFlag(UnitFlags.ImmuneToPc))
damage = 0;
if (phase == Misc.ColossusPhaseNormal ||
+1 -1
View File
@@ -33,7 +33,7 @@ namespace Scripts.Northrend.Gundrak.EckTheFerocious
public const uint Berserk = 55816; // Eck goes berserk, increasing his attack speed by 150% and all damage he deals by 500%.
public const uint Bite = 55813; // Eck bites down hard, inflicting 150% of his normal damage to an enemy.
public const uint Spit = 55814; // Eck spits toxic bile at enemies in a cone in front of him, inflicting 2970 Nature damage and draining 220 mana every 1 sec for 3 sec.
public const uint Spring1 = 55815; // Eck leaps at a distant target. --> Drops aggro and charges a random player. Tank can simply taunt him back.
public const uint Spring1 = 55815; // Eck leaps at a distant target. -. Drops aggro and charges a random player. Tank can simply taunt him back.
public const uint Spring2 = 55837; // Eck leaps at a distant target.
}
@@ -163,7 +163,7 @@ namespace Scripts.Northrend.Gundrak
if (GetBossState(GDDataTypes.SladRan) == EncounterState.Done)
{
if (SladRanStatueState == GameObjectState.Active)
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
else
go.SetGoState(GameObjectState.Active);
}
@@ -172,7 +172,7 @@ namespace Scripts.Northrend.Gundrak
if (GetBossState(GDDataTypes.Moorabi) == EncounterState.Done)
{
if (MoorabiStatueState == GameObjectState.Active)
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
else
go.SetGoState(GameObjectState.Active);
}
@@ -181,7 +181,7 @@ namespace Scripts.Northrend.Gundrak
if (GetBossState(GDDataTypes.DrakkariColossus) == EncounterState.Done)
{
if (DrakkariColossusStatueState == GameObjectState.Active)
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
else
go.SetGoState(GameObjectState.Active);
}
@@ -239,7 +239,7 @@ namespace Scripts.Northrend.Gundrak
{
GameObject go = GetGameObject(GDDataTypes.SladRanAltar);
if (go)
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
}
break;
case GDDataTypes.DrakkariColossus:
@@ -247,7 +247,7 @@ namespace Scripts.Northrend.Gundrak
{
GameObject go = GetGameObject(GDDataTypes.DrakkariColossusAltar);
if (go)
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
}
break;
case GDDataTypes.Moorabi:
@@ -255,7 +255,7 @@ namespace Scripts.Northrend.Gundrak
{
GameObject go = GetGameObject(GDDataTypes.MoorabiAltar);
if (go)
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
}
break;
default:
@@ -423,7 +423,7 @@ namespace Scripts.Northrend.Gundrak
public override bool OnGossipHello(Player player, GameObject go)
{
go.SetFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.AddFlag(GameObjectFlags.NotSelectable);
go.SetGoState(GameObjectState.Active);
InstanceScript instance = go.GetInstanceScript();
@@ -957,7 +957,7 @@ namespace Scripts.Northrend.IcecrownCitadel
public override void sGossipSelect(Player player, uint menuId, uint gossipListId)
{
me.RemoveFlag64(UnitFields.NpcFlags, NPCFlags.Gossip);
me.RemoveNpcFlag(NPCFlags.Gossip);
me.GetTransport().EnableMovement(true);
_events.SetPhase(GunshipMiscData.PhaseIntro);
_events.ScheduleEvent(GunshipEvents.IntroH1, 5000, 0, GunshipMiscData.PhaseIntro);
@@ -1202,7 +1202,7 @@ namespace Scripts.Northrend.IcecrownCitadel
public override void sGossipSelect(Player player, uint menuId, uint gossipListId)
{
me.RemoveFlag64(UnitFields.NpcFlags, NPCFlags.Gossip);
me.RemoveNpcFlag(NPCFlags.Gossip);
me.GetTransport().EnableMovement(true);
_events.SetPhase(GunshipMiscData.PhaseIntro);
_events.ScheduleEvent(GunshipEvents.IntroA1, 5000);
@@ -502,6 +502,7 @@ namespace Scripts.Northrend.IcecrownCitadel
Creature crok = ObjectAccessor.GetCreature(me, instance.GetGuidData(DataTypes.CrokScourgebane));
if (crok)
crok.GetAI().Talk(Texts.SayCrokCombatSvalna);
DoCastSelf(InstanceSpells.DivineSurge, true);
_events.ScheduleEvent(EventTypes.SvalnaCombat, 9000);
_events.ScheduleEvent(EventTypes.ImpalingSpear, RandomHelper.URand(40000, 50000));
_events.ScheduleEvent(EventTypes.AetherShield, RandomHelper.URand(100000, 110000));
@@ -550,7 +551,7 @@ namespace Scripts.Northrend.IcecrownCitadel
case Actions.StartGauntlet:
me.setActive(true);
_isEventInProgress = true;
me.SetFlag(UnitFields.Flags, UnitFlags.ImmuneToPc | UnitFlags.ImmuneToNpc);
me.AddUnitFlag(UnitFlags.ImmuneToPc | UnitFlags.ImmuneToNpc);
_events.ScheduleEvent(EventTypes.SvalnaStart, 25000);
break;
case Actions.ResurrectCaptains:
@@ -584,7 +585,7 @@ namespace Scripts.Northrend.IcecrownCitadel
_isEventInProgress = false;
me.setActive(false);
me.RemoveFlag(UnitFields.Flags, UnitFlags.ImmuneToPc | UnitFlags.ImmuneToNpc);
me.RemoveUnitFlag(UnitFlags.ImmuneToPc | UnitFlags.ImmuneToNpc);
me.SetDisableGravity(false);
me.SetHover(false);
}
@@ -602,7 +603,7 @@ namespace Scripts.Northrend.IcecrownCitadel
{
Talk(Texts.EmoteSvalnaImpale, target);
summon.CastCustomSpell(SharedConst.VehicleSpellRideHardcoded, SpellValueMod.BasePoint0, 1, target, false);
summon.SetFlag(UnitFields.Flags2, UnitFlags2.Unk1 | UnitFlags2.AllowEnemyInteract);
summon.AddUnitFlag2(UnitFlags2.Unk1 | UnitFlags2.AllowEnemyInteract);
}
break;
default:
@@ -744,6 +745,7 @@ namespace Scripts.Northrend.IcecrownCitadel
{
// pause pathing until trash pack is cleared
case 0:
me.RemoveUnitFlag(UnitFlags.ImmuneToNpc);
Talk(Texts.SayCrokCombatWp0);
if (!_aliveTrash.Empty())
SetEscortPaused(true);
@@ -1392,8 +1394,8 @@ namespace Scripts.Northrend.IcecrownCitadel
if (target)
{
target.SetReactState(ReactStates.Passive);
target.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.ImmuneToPc);
target.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotCustomSpell02);
target.AddUnitFlag(UnitFlags.NotSelectable | UnitFlags.ImmuneToPc);
target.SetEmoteState(Emote.OneshotCustomSpell02);
}
}
@@ -1403,8 +1405,8 @@ namespace Scripts.Northrend.IcecrownCitadel
if (target)
{
target.SetReactState(ReactStates.Aggressive);
target.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.ImmuneToPc);
target.SetUInt32Value(UnitFields.NpcEmotestate, 0);
target.RemoveUnitFlag(UnitFlags.NotSelectable | UnitFlags.ImmuneToPc);
target.SetEmoteState(Emote.StateCustomSpell02);
}
}
@@ -136,6 +136,7 @@ namespace Scripts.Northrend.IcecrownCitadel
public const uint ImpalingSpear = 71443;
public const uint AetherShield = 71463;
public const uint HurlSpear = 71466;
public const uint DivineSurge = 71465;
// Captain Arnath
public const uint DominateMind = 14515;
@@ -159,12 +159,12 @@ namespace Scripts.Northrend.IcecrownCitadel
{
if (usable)
{
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
go.SetGoState(GameObjectState.Active);
}
else
{
go.SetFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.AddFlag(GameObjectFlags.NotSelectable);
go.SetGoState(GameObjectState.Ready);
}
}
@@ -639,7 +639,7 @@ namespace Scripts.Northrend.IcecrownCitadel
Creature valithria = instance.GetCreature(ValithriaDreamwalkerGUID);
if (valithria)
go.SetLootRecipient(valithria.GetLootRecipient(), valithria.GetLootRecipientGroup());
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.Locked | GameObjectFlags.NotSelectable | GameObjectFlags.NoDespawn);
go.RemoveFlag(GameObjectFlags.Locked | GameObjectFlags.NotSelectable | GameObjectFlags.NoDespawn);
break;
case GameObjectIds.ArthasPlatform:
ArthasPlatformGUID = go.GetGUID();
@@ -851,7 +851,7 @@ namespace Scripts.Northrend.IcecrownCitadel
GameObject loot = instance.GetGameObject(GunshipArmoryGUID);
if (loot)
loot.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.Locked | GameObjectFlags.NotSelectable | GameObjectFlags.NoDespawn);
loot.RemoveFlag(GameObjectFlags.Locked | GameObjectFlags.NotSelectable | GameObjectFlags.NoDespawn);
}
else if (state == EncounterState.Fail)
_events.ScheduleEvent(TimedEvents.RespawnGunship, 30000);
@@ -867,7 +867,7 @@ namespace Scripts.Northrend.IcecrownCitadel
Creature deathbringer = instance.GetCreature(DeathbringerSaurfangGUID);
if (deathbringer)
loot.SetLootRecipient(deathbringer.GetLootRecipient(), deathbringer.GetLootRecipientGroup());
loot.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.Locked | GameObjectFlags.NotSelectable | GameObjectFlags.NoDespawn);
loot.RemoveFlag(GameObjectFlags.Locked | GameObjectFlags.NotSelectable | GameObjectFlags.NoDespawn);
}
GameObject teleporter = instance.GetGameObject(TeleporterUpperSpireGUID);
File diff suppressed because it is too large Load Diff
@@ -131,7 +131,7 @@ namespace Scripts.Northrend.Nexus.EyeOfEternity
GameObject platform = instance.GetGameObject(platformGUID);
if (platform)
platform.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.Destroyed);
platform.RemoveFlag(GameObjectFlags.Destroyed);
}
else if (state == EncounterState.Done)
SpawnGameObject(InstanceGameObjects.ExitPortal, exitPortalPosition);
@@ -218,7 +218,7 @@ namespace Scripts.Northrend.Nexus.EyeOfEternity
GameObject iris = instance.GetGameObject(irisGUID);
if (iris)
iris.SetFlag(GameObjectFields.Flags, GameObjectFlags.InUse);
iris.AddFlag(GameObjectFlags.InUse);
Creature malygos = instance.GetCreature(malygosGUID);
if (malygos)
@@ -99,7 +99,7 @@ namespace Scripts.Northrend.Nexus.Nexus
Initialize();
_intenseColdList.Clear();
me.RemoveFlag(UnitFields.Flags, UnitFlags.Stunned);
me.RemoveUnitFlag(UnitFlags.Stunned);
RemovePrison(CheckContainmentSpheres());
_Reset();
@@ -141,15 +141,15 @@ namespace Scripts.Northrend.Nexus.Nexus
{
if (remove)
{
me.RemoveFlag(UnitFields.Flags, UnitFlags.ImmuneToPc);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.RemoveUnitFlag(UnitFlags.ImmuneToPc);
me.RemoveUnitFlag(UnitFlags.NonAttackable);
if (me.HasAura(KeristraszaConst.SpellFrozenPrison))
me.RemoveAurasDueToSpell(KeristraszaConst.SpellFrozenPrison);
}
else
{
me.SetFlag(UnitFields.Flags, UnitFlags.ImmuneToPc);
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.ImmuneToPc);
me.AddUnitFlag(UnitFlags.NonAttackable);
DoCast(me, KeristraszaConst.SpellFrozenPrison, false);
}
}
@@ -202,7 +202,7 @@ namespace Scripts.Northrend.Nexus.Nexus
if (pKeristrasza && pKeristrasza.IsAlive())
{
// maybe these are hacks :(
go.SetFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.AddFlag(GameObjectFlags.NotSelectable);
go.SetGoState(GameObjectState.Active);
((boss_keristrasza)pKeristrasza.GetAI()).CheckContainmentSpheres(true);
@@ -86,7 +86,7 @@ namespace Scripts.Northrend.Nexus.Nexus
{
Initialize();
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NotSelectable);
instance.SetBossState(DataTypes.MagusTelestra, EncounterState.NotStarted);
@@ -135,7 +135,7 @@ namespace Scripts.Northrend.Nexus.Nexus
if (uiIsWaitingToAppearTimer <= diff)
{
me.CastSpell(me, 47714, true);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NotSelectable);
bIsWaitingToAppear = false;
InVanish = false;
me.SendAIReaction(AiReaction.Hostile);
@@ -174,7 +174,7 @@ namespace Scripts.Northrend.Nexus.Nexus
me.CastStop();
me.RemoveAllAuras();
me.CastSpell(me, 47710, false);
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NotSelectable);
bFireMagusDead = false;
bFrostMagusDead = false;
bArcaneMagusDead = false;
@@ -188,7 +188,7 @@ namespace Scripts.Northrend.Nexus.Nexus
Phase = 3;
me.CastStop();
me.RemoveAllAuras();
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NotSelectable);
bFireMagusDead = false;
bFrostMagusDead = false;
bArcaneMagusDead = false;
@@ -135,17 +135,17 @@ namespace Scripts.Northrend.Nexus.Nexus
case GameObjectIds.AnomalusContainmetSphere:
AnomalusContainmentSphere = go.GetGUID();
if (GetBossState(DataTypes.Anomalus) == EncounterState.Done)
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
break;
case GameObjectIds.OrmoroksContainmetSphere:
OrmoroksContainmentSphere = go.GetGUID();
if (GetBossState(DataTypes.Ormorok) == EncounterState.Done)
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
break;
case GameObjectIds.TelestrasContainmetSphere:
TelestrasContainmentSphere = go.GetGUID();
if (GetBossState(DataTypes.MagusTelestra) == EncounterState.Done)
go.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.RemoveFlag(GameObjectFlags.NotSelectable);
break;
default:
break;
@@ -164,7 +164,7 @@ namespace Scripts.Northrend.Nexus.Nexus
{
GameObject sphere = instance.GetGameObject(TelestrasContainmentSphere);
if (sphere)
sphere.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
sphere.RemoveFlag(GameObjectFlags.NotSelectable);
}
break;
case DataTypes.Anomalus:
@@ -172,7 +172,7 @@ namespace Scripts.Northrend.Nexus.Nexus
{
GameObject sphere = instance.GetGameObject(AnomalusContainmentSphere);
if (sphere)
sphere.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
sphere.RemoveFlag(GameObjectFlags.NotSelectable);
}
break;
case DataTypes.Ormorok:
@@ -180,7 +180,7 @@ namespace Scripts.Northrend.Nexus.Nexus
{
GameObject sphere = instance.GetGameObject(OrmoroksContainmentSphere);
if (sphere)
sphere.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
sphere.RemoveFlag(GameObjectFlags.NotSelectable);
}
break;
default:
@@ -75,7 +75,7 @@ namespace Scripts.Northrend.Nexus.Oculus
BelgaristraszGUID = creature.GetGUID();
if (GetBossState(DATA_DRAKOS) == EncounterState.Done)
{
creature.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
creature.AddNpcFlag(NPCFlags.Gossip);
creature.Relocate(BelgaristraszMove);
}
break;
@@ -83,7 +83,7 @@ namespace Scripts.Northrend.Nexus.Oculus
EternosGUID = creature.GetGUID();
if (GetBossState(DATA_DRAKOS) == EncounterState.Done)
{
creature.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
creature.AddNpcFlag(NPCFlags.Gossip);
creature.Relocate(EternosMove);
}
break;
@@ -91,7 +91,7 @@ namespace Scripts.Northrend.Nexus.Oculus
VerdisaGUID = creature.GetGUID();
if (GetBossState(DATA_DRAKOS) == EncounterState.Done)
{
creature.SetFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
creature.AddNpcFlag(NPCFlags.Gossip);
creature.Relocate(VerdisaMove);
}
break;
@@ -232,7 +232,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
DoCast(Spells.InvisAndStealthDetect);
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Stunned);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Stunned);
me.SetReactState(ReactStates.Passive);
}
@@ -513,7 +513,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
me.SetHomePosition(Leviathan.Center);
me.GetMotionMaster().MoveCharge(Leviathan.Center.GetPositionX(), Leviathan.Center.GetPositionY(), Leviathan.Center.GetPositionZ()); // position center
me.SetReactState(ReactStates.Aggressive);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Stunned);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable | UnitFlags.Stunned);
return;
}
break;
@@ -585,8 +585,8 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
Creature turret = turretPassenger.ToCreature();
if (turret)
{
turret.SetFaction(me.GetVehicleBase().getFaction());
turret.SetUInt32Value(UnitFields.Flags, 0); // unselectable
turret.SetFaction(me.GetVehicleBase().GetFaction());
turret.SetUnitFlags(0);
turret.GetAI().AttackStart(who);
}
}
@@ -596,12 +596,12 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
Creature device = devicePassenger.ToCreature();
if (device)
{
device.SetFlag64(UnitFields.NpcFlags, NPCFlags.SpellClick);
device.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
device.AddNpcFlag(NPCFlags.SpellClick);
device.RemoveUnitFlag(UnitFlags.NotSelectable);
}
}
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NotSelectable);
}
else if (seatId == Seats.Turret)
{
@@ -611,8 +611,8 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
Unit device = vehicle.GetPassenger(Seats.Device);
if (device)
{
device.SetFlag64(UnitFields.NpcFlags, NPCFlags.SpellClick);
device.SetUInt32Value(UnitFields.Flags, 0); // unselectable
device.AddNpcFlag(NPCFlags.SpellClick);
device.SetUnitFlags(0); // unselectable
}
}
}
@@ -694,8 +694,8 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
if (me.GetVehicle())
{
me.RemoveFlag64(UnitFields.NpcFlags, NPCFlags.SpellClick);
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveNpcFlag(NPCFlags.SpellClick);
me.AddUnitFlag(UnitFlags.NotSelectable);
Unit player = me.GetVehicle().GetPassenger(Seats.Player);
if (player)
@@ -792,7 +792,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
public npc_pool_of_tar(Creature creature)
: base(creature)
{
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Passive);
me.CastSpell(me, Spells.TarPassive, true);
}
@@ -843,7 +843,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
public npc_thorims_hammer(Creature creature)
: base(creature)
{
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NotSelectable);
me.CastSpell(me, Spells.DummyBlue, true);
}
@@ -872,7 +872,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
public npc_mimirons_inferno(Creature creature)
: base(creature)
{
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.CastSpell(me, Spells.DummyYellow, true);
me.SetReactState(ReactStates.Passive);
}
@@ -921,7 +921,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
public npc_hodirs_fury(Creature creature)
: base(creature)
{
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NotSelectable);
me.CastSpell(me, Spells.DummyGreen, true);
}
@@ -1038,7 +1038,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
{
if (menuId == GossipIds.MenuLoreKeeper && gossipListId == GossipIds.OptionLoreKeeper)
{
me.RemoveFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
me.RemoveNpcFlag(NPCFlags.Gossip);
player.PlayerTalkClass.SendCloseGossip();
me.GetMap().LoadGrid(364, -16); // make sure leviathan is loaded
@@ -1055,9 +1055,9 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
Creature brann = _instance.GetCreature(InstanceData.BrannBronzebeardIntro);
if (brann)
{
brann.RemoveFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
brann.RemoveNpcFlag(NPCFlags.Gossip);
delorah.GetMotionMaster().MovePoint(0, brann.GetPositionX() - 4, brann.GetPositionY(), brann.GetPositionZ());
// @todo delorah->AI()->Talk(xxxx, brann->GetGUID()); when reached at branz
// @todo delorah.AI().Talk(xxxx, brann.GetGUID()); when reached at branz
}
}
}
@@ -1356,7 +1356,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
//! This could probably in the SPELL_EFFECT_SEND_EVENT handler too:
owner.AddUnitState(UnitState.Stunned | UnitState.Root);
owner.SetFlag(UnitFields.Flags, UnitFlags.Stunned);
owner.AddUnitFlag(UnitFlags.Stunned);
owner.RemoveAurasDueToSpell(Spells.GatheringSpeed);
}
@@ -1366,7 +1366,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
if (!owner)
return;
owner.RemoveFlag(UnitFields.Flags, UnitFlags.Stunned);
owner.RemoveUnitFlag(UnitFlags.Stunned);
}
public override void Register()
+26 -26
View File
@@ -389,7 +389,7 @@ namespace Scripts.Northrend.Ulduar
{
_Reset();
me.SetReactState(ReactStates.Passive);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.RemoveUnitFlag(UnitFlags.NonAttackable);
GameObject elevator = ObjectAccessor.GetGameObject(me, instance.GetGuidData(InstanceData.MimironElevator));
if (elevator)
@@ -406,7 +406,7 @@ namespace Scripts.Northrend.Ulduar
if (button)
{
button.SetGoState(GameObjectState.Ready);
button.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
button.RemoveFlag(GameObjectFlags.NotSelectable);
}
_fireFighter = false;
@@ -457,13 +457,13 @@ namespace Scripts.Northrend.Ulduar
//PLay Sound number 15612
_EnterCombat();
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NonAttackable);
me.RemoveAurasDueToSpell(Spells.Weld);
DoCast(me.GetVehicleBase(), Spells.Seat6);
GameObject button = ObjectAccessor.GetGameObject(me, instance.GetGuidData(InstanceData.MimironButton));
if (button)
button.SetFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
button.AddFlag(GameObjectFlags.NotSelectable);
if (_fireFighter)
_events.ScheduleEvent(Events.SummonFlames, 3000);
@@ -528,7 +528,7 @@ namespace Scripts.Northrend.Ulduar
{
DoCast(mkii, Spells.Seat7);
mkii.RemoveAurasDueToSpell(Spells.FreezeAnim);
mkii.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
mkii.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
}
_events.ScheduleEvent(Events.Intro3, 2000);
}
@@ -676,7 +676,7 @@ namespace Scripts.Northrend.Ulduar
if (aerial)
{
aerial.GetMotionMaster().MoveLand(0, new Position(aerial.GetPositionX(), aerial.GetPositionY(), aerial.GetPositionZMinusOffset()));
aerial.SetByteValue(UnitFields.Bytes1, UnitBytes1Offsets.AnimTier, 0);
aerial.SetAnimTier(UnitBytes1Flags.None, false);
aerial.CastSpell(vx001, Spells.MountVx001);
aerial.CastSpell(aerial, Spells.HalfHeal);
}
@@ -725,7 +725,7 @@ namespace Scripts.Northrend.Ulduar
break;
case Events.Outtro3:
DoCast(me, Spells.TeleportVisual);
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NotSelectable);
me.DespawnOrUnsummon(1000); // sniffs say 6 sec after, but it doesnt matter.
break;
default:
@@ -756,7 +756,7 @@ namespace Scripts.Northrend.Ulduar
void SetupEncounter()
{
_Reset();
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Passive);
_fireFighter = false;
_setupMine = true;
@@ -770,7 +770,7 @@ namespace Scripts.Northrend.Ulduar
if (damage >= me.GetHealth())
{
damage = (uint)(me.GetHealth() - 1); // Let creature fall to 1 hp, but do not let it die or damage itself with SetHealth().
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NonAttackable);
DoCast(me, Spells.VehicleDamaged, true);
me.AttackStop();
me.SetReactState(ReactStates.Passive);
@@ -821,7 +821,7 @@ namespace Scripts.Northrend.Ulduar
break;
case Actions.AssembledCombat:
me.SetStandState(UnitStandStateType.Stand);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Aggressive);
_events.SetPhase(Phases.Vol7ron);
@@ -874,7 +874,7 @@ namespace Scripts.Northrend.Ulduar
{
case Waypoints.MkiiP1Idle:
{
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NotSelectable);
DoCast(me, Spells.HalfHeal);
Creature mimiron = ObjectAccessor.GetCreature(me, instance.GetGuidData(BossIds.Mimiron));
@@ -999,7 +999,7 @@ namespace Scripts.Northrend.Ulduar
public boss_vx_001(Creature creature) : base(creature, BossIds.Mimiron)
{
me.SetDisableGravity(true); // This is the unfold visual state of VX-001, it has to be set on create as it requires an objectupdate if set later.
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.StateSpecialUnarmed); // This is a hack to force the yet to be unfolded visual state.
me.SetEmoteState(Emote.StateSpecialUnarmed); // This is a hack to force the yet to be unfolded visual state.
me.SetReactState(ReactStates.Passive);
_fireFighter = false;
}
@@ -1017,7 +1017,7 @@ namespace Scripts.Northrend.Ulduar
if (_events.IsInPhase(Phases.Vx001))
{
me.CastStop();
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
DoCast(me, Spells.HalfHeal); // has no effect, wat
DoCast(me, Spells.TorsoDisabled);
Creature mimiron = ObjectAccessor.GetCreature(me, instance.GetGuidData(BossIds.Mimiron));
@@ -1027,7 +1027,7 @@ namespace Scripts.Northrend.Ulduar
else if (_events.IsInPhase(Phases.Vol7ron))
{
me.SetStandState(UnitStandStateType.Dead);
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NonAttackable);
if (MimironConst.IsEncounterFinished(who))
return;
@@ -1050,9 +1050,9 @@ namespace Scripts.Northrend.Ulduar
_events.ScheduleEvent(Events.FlameSuppressantVx, 6000);
goto case Actions.StartVx001;
case Actions.StartVx001:
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveAurasDueToSpell(Spells.FreezeAnim);
me.SetUInt32Value(UnitFields.NpcEmotestate, (uint)Emote.OneshotNone); // Remove emotestate.
me.SetEmoteState(Emote.OneshotNone); // Remove emotestate.
//me.SetuintValue(UnitFields.Bytes1, UnitBytes1Offsets.AnimTier, UnitBytes1Flags.AlwaysStand | UnitBytes1Flags.Hover); Blizzard handles hover animation like this it seems.
DoCast(me, Spells.HeatWaveAura);
@@ -1063,7 +1063,7 @@ namespace Scripts.Northrend.Ulduar
break;
case Actions.AssembledCombat:
me.SetStandState(UnitStandStateType.Stand);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
_events.SetPhase(Phases.Vol7ron);
_events.ScheduleEvent(Events.RocketStrike, 20000);
@@ -1115,7 +1115,7 @@ namespace Scripts.Northrend.Ulduar
// Handle rotation during SPELL_SPINNING_UP, SPELL_P3WX2_LASER_BARRAGE, SPELL_RAPID_BURST, and SPELL_HAND_PULSE_LEFT/RIGHT
if (me.HasUnitState(UnitState.Casting))
{
List<ObjectGuid> channelObjects = me.GetChannelObjects();
List<ObjectGuid> channelObjects = me.m_unitData.ChannelObjects;
Unit channelTarget = (channelObjects.Count == 1 ? Global.ObjAccessor.GetUnit(me, channelObjects[0]) : null);
if (channelTarget)
me.SetFacingToObject(channelTarget);
@@ -1191,7 +1191,7 @@ namespace Scripts.Northrend.Ulduar
if (damage >= me.GetHealth())
{
damage = (uint)(me.GetHealth() - 1); // Let creature fall to 1 hp, but do not let it die or damage itself with SetHealth().
me.SetFlag(UnitFields.Flags, UnitFlags.NonAttackable);
me.AddUnitFlag(UnitFlags.NonAttackable);
me.AttackStop();
me.SetReactState(ReactStates.Passive);
DoCast(me, Spells.VehicleDamaged, true);
@@ -1226,7 +1226,7 @@ namespace Scripts.Northrend.Ulduar
_events.ScheduleEvent(Events.SummonFireBots, 1000, 0, Phases.AerialCommandUnit);
goto case Actions.StartAerial;
case Actions.StartAerial:
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Aggressive);
_events.SetPhase(Phases.AerialCommandUnit);
@@ -1245,7 +1245,7 @@ namespace Scripts.Northrend.Ulduar
me.SetReactState(ReactStates.Aggressive);
break;
case Actions.AssembledCombat:
me.RemoveFlag(UnitFields.Flags, UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NonAttackable | UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Aggressive);
me.SetStandState(UnitStandStateType.Stand);
_events.SetPhase(Phases.Vol7ron);
@@ -1281,7 +1281,7 @@ namespace Scripts.Northrend.Ulduar
{
if (type == MovementGeneratorType.Point && point == Waypoints.AerialP4Pos)
{
me.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.AddUnitFlag(UnitFlags.NotSelectable);
Creature mimiron = ObjectAccessor.GetCreature(me, instance.GetGuidData(BossIds.Mimiron));
if (mimiron)
@@ -1596,7 +1596,7 @@ namespace Scripts.Northrend.Ulduar
public override bool OnGossipHello(Player player, GameObject go)
{
if (go.HasFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable))
if (go.HasFlag(GameObjectFlags.NotSelectable))
return true;
InstanceScript instance = go.GetInstanceScript();
@@ -1607,7 +1607,7 @@ namespace Scripts.Northrend.Ulduar
if (computer)
computer.GetAI().DoAction(Actions.ActivateComputer);
go.SetGoState(GameObjectState.Active);
go.SetFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
go.AddFlag(GameObjectFlags.NotSelectable);
return true;
}
}
@@ -1634,7 +1634,7 @@ namespace Scripts.Northrend.Ulduar
Creature target = GetHitCreature();
if (target)
{
target.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable | UnitFlags.Pacified);
target.AddUnitFlag(UnitFlags.NotSelectable | UnitFlags.Pacified);
target.DespawnOrUnsummon(1000);
}
}
@@ -1741,7 +1741,7 @@ namespace Scripts.Northrend.Ulduar
{
void FilterTargets(List<WorldObject> targets)
{
targets.RemoveAll(obj => obj.ToUnit() && (obj.ToUnit().GetVehicleBase() || obj.HasFlag(UnitFields.Flags, UnitFlags.NonAttackable)));
targets.RemoveAll(obj => obj.IsUnit() && (obj.ToUnit().GetVehicleBase() || obj.ToUnit().HasUnitFlag(UnitFlags.NonAttackable)));
}
public override void Register()
+14 -14
View File
@@ -77,12 +77,12 @@ namespace Scripts.Northrend.Ulduar
{
case ACTION_HARPOON_BUILD:
events.ScheduleEvent(EVENT_BUILD_HARPOON_1, 50000);
if (me->GetMap()->GetSpawnMode() == DIFFICULTY_25_N)
if (me.GetMap().GetSpawnMode() == DIFFICULTY_25_N)
events.ScheduleEvent(EVENT_BUILD_HARPOON_3, 90000);
break;
case ACTION_PLACE_BROKEN_HARPOON:
for (uint8 n = 0; n < RAID_MODE(2, 4); n++)
me->SummonGameObject(GO_RAZOR_BROKEN_HARPOON, PosHarpoon[n].GetPositionX(), PosHarpoon[n].GetPositionY(), PosHarpoon[n].GetPositionZ(), 2.286f, 0, 0, 0, 0, 180);
me.SummonGameObject(GO_RAZOR_BROKEN_HARPOON, PosHarpoon[n].GetPositionX(), PosHarpoon[n].GetPositionY(), PosHarpoon[n].GetPositionZ(), 2.286f, 0, 0, 0, 0, 180);
break;
}
}
@@ -97,39 +97,39 @@ namespace Scripts.Northrend.Ulduar
{
case EVENT_BUILD_HARPOON_1:
Talk(EMOTE_HARPOON);
if (GameObject * Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, 0.0f, 0.0f, 0.0f, 0.0f, uint32(me->GetRespawnTime())))
if (GameObject * Harpoon = me.SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, 0.0f, 0.0f, 0.0f, 0.0f, uint32(me.GetRespawnTime())))
{
if (GameObject * BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) //only nearest broken harpoon
BrokenHarpoon->RemoveFromWorld();
if (GameObject * BrokenHarpoon = Harpoon.FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) //only nearest broken harpoon
BrokenHarpoon.RemoveFromWorld();
events.ScheduleEvent(EVENT_BUILD_HARPOON_2, 20000);
events.CancelEvent(EVENT_BUILD_HARPOON_1);
}
return;
case EVENT_BUILD_HARPOON_2:
Talk(EMOTE_HARPOON);
if (GameObject * Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
if (GameObject * Harpoon = me.SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, 0, 0, 0, 0, uint32(me.GetRespawnTime())))
{
if (GameObject * BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
BrokenHarpoon->RemoveFromWorld();
if (GameObject * BrokenHarpoon = Harpoon.FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
BrokenHarpoon.RemoveFromWorld();
events.CancelEvent(EVENT_BUILD_HARPOON_2);
}
return;
case EVENT_BUILD_HARPOON_3:
Talk(EMOTE_HARPOON);
if (GameObject * Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
if (GameObject * Harpoon = me.SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, 0, 0, 0, 0, uint32(me.GetRespawnTime())))
{
if (GameObject * BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
BrokenHarpoon->RemoveFromWorld();
if (GameObject * BrokenHarpoon = Harpoon.FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
BrokenHarpoon.RemoveFromWorld();
events.ScheduleEvent(EVENT_BUILD_HARPOON_4, 20000);
events.CancelEvent(EVENT_BUILD_HARPOON_3);
}
return;
case EVENT_BUILD_HARPOON_4:
Talk(EMOTE_HARPOON);
if (GameObject * Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
if (GameObject * Harpoon = me.SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, 0, 0, 0, 0, uint32(me.GetRespawnTime())))
{
if (GameObject * BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
BrokenHarpoon->RemoveFromWorld();
if (GameObject * BrokenHarpoon = Harpoon.FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
BrokenHarpoon.RemoveFromWorld();
events.CancelEvent(EVENT_BUILD_HARPOON_4);
}
return;
@@ -68,7 +68,7 @@ namespace Scripts.Northrend.Ulduar
if (_algalonTimer != 0 && _algalonTimer <= 60)
algalon.GetAI().DoAction((int)InstanceEvents.ActionInitAlgalon);
else
algalon.RemoveFlag(UnitFields.Flags, UnitFlags.ImmuneToPc);
algalon.RemoveUnitFlag(UnitFlags.ImmuneToPc);
}
// Keepers at Observation Ring
@@ -435,7 +435,7 @@ namespace Scripts.Northrend.Ulduar
case InstanceGameObjectIds.CelestialPlanetariumAccess10:
case InstanceGameObjectIds.CelestialPlanetariumAccess25:
if (_algalonSummoned)
gameObject.SetFlag(GameObjectFields.Flags, GameObjectFlags.InUse);
gameObject.AddFlag(GameObjectFlags.InUse);
break;
case InstanceGameObjectIds.DoodadUlSigildoor01:
AlgalonSigilDoorGUID[0] = gameObject.GetGUID();
@@ -610,7 +610,7 @@ namespace Scripts.Northrend.Ulduar
if (vehicle != null)
{
vehicle.RemoveAllPassengers();
vehicleCreature.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
vehicleCreature.AddUnitFlag(UnitFlags.NotSelectable);
vehicleCreature.DespawnOrUnsummon(5 * Time.Minute * Time.InMilliseconds);
}
}
@@ -640,7 +640,7 @@ namespace Scripts.Northrend.Ulduar
if (gameObject)
{
gameObject.SetRespawnTime((int)gameObject.GetRespawnDelay());
gameObject.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
gameObject.RemoveFlag(GameObjectFlags.NotSelectable);
}
HandleGameObject(KologarnBridgeGUID, false);
}
@@ -651,7 +651,7 @@ namespace Scripts.Northrend.Ulduar
GameObject HodirRareCache = instance.GetGameObject(HodirRareCacheGUID);
if (HodirRareCache)
if (GetData(InstanceData.HodirRareCache) != 0)
HodirRareCache.RemoveFlag(GameObjectFields.Flags, GameObjectFlags.NotSelectable);
HodirRareCache.RemoveFlag(GameObjectFlags.NotSelectable);
GameObject HodirChest = instance.GetGameObject(HodirChestGUID);
if (HodirChest)
HodirChest.SetRespawnTime((int)HodirChest.GetRespawnDelay());
+16 -19
View File
@@ -24,6 +24,7 @@ using Game.Scripting;
using Game.Spells;
using System;
using System.Collections.Generic;
using Game.Network.Packets;
namespace Scripts.Northrend.Ulduar.Xt002
{
@@ -143,7 +144,7 @@ namespace Scripts.Northrend.Ulduar.Xt002
{
_Reset();
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Aggressive);
DoCastSelf(SpellIds.Stand);
@@ -225,7 +226,7 @@ namespace Scripts.Northrend.Ulduar.Xt002
{
Talk(Texts.Death);
_JustDied();
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NotSelectable);
}
public override void DamageTaken(Unit attacker, ref uint damage)
@@ -306,8 +307,8 @@ namespace Scripts.Northrend.Ulduar.Xt002
heart.CastSpell(me, SpellIds.HeartLightningTether);
heart.CastSpell(heart, SpellIds.HeartHealToFull, true);
heart.CastSpell(me, SpellIds.RideVehicleExposed, true);
heart.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
heart.SetFlag(UnitFields.Flags, UnitFlags.Unk29);
heart.RemoveUnitFlag(UnitFlags.NotSelectable);
heart.AddUnitFlag(UnitFlags.Unk29);
}
_scheduler.DelayGroup(Misc.PhaseOneGroup, TimeSpan.FromSeconds(30));
@@ -330,7 +331,7 @@ namespace Scripts.Northrend.Ulduar.Xt002
Talk(Texts.HeartClosed);
Talk(Texts.EmoteHeartClosed);
me.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
me.RemoveUnitFlag(UnitFlags.NotSelectable);
me.SetReactState(ReactStates.Aggressive);
DoCastSelf(SpellIds.Stand);
@@ -343,8 +344,8 @@ namespace Scripts.Northrend.Ulduar.Xt002
return;
heart.CastSpell(me, SpellIds.HeartRideVehicle, true);
heart.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
heart.RemoveFlag(UnitFields.Flags, UnitFlags.Unk29);
heart.AddUnitFlag(UnitFlags.NotSelectable);
heart.RemoveUnitFlag(UnitFlags.Unk29);
heart.RemoveAurasDueToSpell(SpellIds.ExposedHeart);
if (!_hardMode)
@@ -529,12 +530,6 @@ namespace Scripts.Northrend.Ulduar.Xt002
DoCast(SpellIds.AuraBoombot); // For achievement
// HACK/workaround:
// these values aren't confirmed - lack of data - and the values in DB are incorrect
// these values are needed for correct damage of Boom spell
me.SetFloatValue(UnitFields.MinDamage, 15000.0f);
me.SetFloatValue(UnitFields.MaxDamage, 18000.0f);
// @todo proper waypoints?
Creature pXT002 = ObjectAccessor.GetCreature(me, _instance.GetGuidData(BossIds.Xt002));
if (pXT002)
@@ -547,20 +542,22 @@ namespace Scripts.Northrend.Ulduar.Xt002
{
_boomed = true; // Prevent recursive calls
//me.SendSpellInstakillLog(Spells.Boom, me);
SpellInstakillLog instakill = new SpellInstakillLog();
instakill.Caster = me.GetGUID();
instakill.Target = me.GetGUID();
instakill.SpellID = SpellIds.Boom;
me.SendMessageToSet(instakill, false);
//me.DealDamage(me, me.GetHealth(), null, DamageEffectType.NoDamage, SpellSchoolMask.Normal, null, false);
me.DealDamage(me, (uint)me.GetHealth(), null, DamageEffectType.NoDamage, SpellSchoolMask.Normal, null, false);
damage = 0;
me.CastSpell(me, SpellIds.Boom, false);
// Visual only seems to work if the instant kill event is delayed or the spell itself is delayed
// Casting done from player and caster source has the same targetinfo flags,
// so that can't be the issue
// See BoomEvent class
// Schedule 1s delayed
//me.m_Events.AddEvent(new BoomEvent(me), me.m_Events.CalculateTime(1 * Time.InMilliseconds));
me.m_Events.AddEvent(new BoomEvent(me), me.m_Events.CalculateTime(1 * Time.InMilliseconds));
}
}
@@ -801,7 +798,7 @@ namespace Scripts.Northrend.Ulduar.Xt002
if (!target)
return;
target.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
target.AddUnitFlag(UnitFlags.NotSelectable);
target.SetStandState(UnitStandStateType.Submerged);
}