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);