Fixes build. Scripts are still being updated.
This commit is contained in:
@@ -120,7 +120,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.FelbloodKaelthas
|
||||
{
|
||||
Talk(TextIds.SayFlameStrike);
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 40.0f, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.FlameStrike);
|
||||
task.Repeat();
|
||||
});
|
||||
@@ -284,7 +284,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.FelbloodKaelthas
|
||||
public override void SpellHitTarget(WorldObject target, SpellInfo spellInfo)
|
||||
{
|
||||
Unit unitTarget = target.ToUnit();
|
||||
if (!unitTarget)
|
||||
if (unitTarget == null)
|
||||
return;
|
||||
|
||||
switch (spellInfo.Id)
|
||||
@@ -318,7 +318,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.FelbloodKaelthas
|
||||
{
|
||||
case CreatureIds.ArcaneSphere:
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 70.0f, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
summon.GetMotionMaster().MoveFollow(target, 0.0f, 0.0f);
|
||||
break;
|
||||
case CreatureIds.FlameStrike:
|
||||
@@ -382,10 +382,10 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.FelbloodKaelthas
|
||||
DoCastSelf(SpellIds.EmberBlast);
|
||||
// DoCastSelf(SpellSummonPhoenixEgg); -- We do a manual summon for now. Feel free to move it to spelleffect_dbc
|
||||
Creature egg = DoSummon(CreatureIds.PhoenixEgg, me.GetPosition(), TimeSpan.FromSeconds(0));
|
||||
if (egg)
|
||||
if (egg != null)
|
||||
{
|
||||
Creature kaelthas = _instance.GetCreature(DataTypes.KaelthasSunstrider);
|
||||
if (kaelthas)
|
||||
if (kaelthas != null)
|
||||
{
|
||||
kaelthas.GetAI().JustSummoned(egg);
|
||||
_eggGUID = egg.GetGUID();
|
||||
@@ -395,7 +395,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.FelbloodKaelthas
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(15), task =>
|
||||
{
|
||||
Creature egg = ObjectAccessor.GetCreature(me, _eggGUID);
|
||||
if (egg)
|
||||
if (egg != null)
|
||||
egg.DespawnOrUnsummon();
|
||||
|
||||
me.RemoveAllAuras();
|
||||
@@ -445,7 +445,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.FelbloodKaelthas
|
||||
void AfterRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
Unit target = GetTarget();
|
||||
if (target)
|
||||
if (target != null)
|
||||
target.CastSpell(target, SpellIds.FlameStrikeDamage);
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace
|
||||
if (_kaelthasPreTrashGUIDs.Count == 0)
|
||||
{
|
||||
Creature kaelthas = GetCreature(DataTypes.KaelthasSunstrider);
|
||||
if (kaelthas)
|
||||
if (kaelthas != null)
|
||||
kaelthas.GetAI().SetData(DataTypes.KaelthasIntro, (uint)EncounterState.InProgress);
|
||||
}
|
||||
}
|
||||
@@ -223,7 +223,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace
|
||||
public override void ProcessEvent(WorldObject obj, uint eventId, WorldObject invoker)
|
||||
{
|
||||
if (eventId == MiscConst.EventSpawnKalecgos)
|
||||
if (!GetCreature(DataTypes.Kalecgos) && _events.Empty())
|
||||
if (GetCreature(DataTypes.Kalecgos) == null && _events.Empty())
|
||||
_events.ScheduleEvent(MiscConst.EventSpawnKalecgos, TimeSpan.FromMinutes(1));
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace
|
||||
if (_events.ExecuteEvent() == MiscConst.EventSpawnKalecgos)
|
||||
{
|
||||
Creature kalecgos = instance.SummonCreature(CreatureIds.Kalecgos, MiscConst.KalecgosSpawnPos);
|
||||
if (kalecgos)
|
||||
if (kalecgos != null)
|
||||
{
|
||||
kalecgos.GetMotionMaster().MovePath(MiscConst.PathKalecgosFlight, false);
|
||||
kalecgos.GetAI().Talk(MiscConst.SayKalecgosSpawn);
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
}
|
||||
}
|
||||
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.DispelMagic);
|
||||
|
||||
task.Repeat(TimeSpan.FromSeconds(12));
|
||||
@@ -261,7 +261,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
foreach (var lackeyGuid in m_auiLackeyGUID)
|
||||
{
|
||||
Unit pAdd = Global.ObjAccessor.GetUnit(me, lackeyGuid);
|
||||
if (pAdd && !pAdd.IsEngaged())
|
||||
if (pAdd != null && !pAdd.IsEngaged())
|
||||
AddThreat(who, 0.0f, pAdd);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
Unit pAdd = Global.ObjAccessor.GetUnit(me, m_auiLackeyGUID[j]);
|
||||
|
||||
//object already removed, not exist
|
||||
if (!pAdd)
|
||||
if (pAdd == null)
|
||||
{
|
||||
pAdd = me.SummonCreature(guid, MiscConst.LackeyLocations[j][0], MiscConst.LackeyLocations[j][1], MiscConst.fZLocation, MiscConst.fOrientation, TempSummonType.CorpseDespawn);
|
||||
if (pAdd != null)
|
||||
@@ -380,7 +380,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
|
||||
// in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her)
|
||||
Creature delrissa = instance.GetCreature(DataTypes.PriestessDelrissa);
|
||||
if (delrissa)
|
||||
if (delrissa != null)
|
||||
{
|
||||
if (!delrissa.IsAlive())
|
||||
delrissa.Respawn();
|
||||
@@ -389,7 +389,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
|
||||
public override void JustEngagedWith(Unit who)
|
||||
{
|
||||
if (!who)
|
||||
if (who == null)
|
||||
return;
|
||||
|
||||
foreach (var guid in m_auiLackeyGUIDs)
|
||||
@@ -400,7 +400,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
}
|
||||
|
||||
Creature delrissa = instance.GetCreature(DataTypes.PriestessDelrissa);
|
||||
if (delrissa)
|
||||
if (delrissa != null)
|
||||
if (delrissa.IsAlive() && !delrissa.IsEngaged())
|
||||
AddThreat(who, 0.0f, delrissa);
|
||||
}
|
||||
@@ -410,7 +410,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
Creature delrissa = instance.GetCreature(DataTypes.PriestessDelrissa);
|
||||
uint uiLackeyDeathCount = instance.GetData(DataTypes.DelrissaDeathCount);
|
||||
|
||||
if (!delrissa)
|
||||
if (delrissa == null)
|
||||
return;
|
||||
|
||||
//should delrissa really yell if dead?
|
||||
@@ -436,14 +436,14 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
public override void KilledUnit(Unit victim)
|
||||
{
|
||||
Creature delrissa = instance.GetCreature(DataTypes.PriestessDelrissa);
|
||||
if (delrissa)
|
||||
if (delrissa != null)
|
||||
delrissa.GetAI().KilledUnit(victim);
|
||||
}
|
||||
|
||||
void AcquireGUIDs()
|
||||
{
|
||||
Creature delrissa = instance.GetCreature(DataTypes.PriestessDelrissa);
|
||||
if (delrissa)
|
||||
if (delrissa != null)
|
||||
{
|
||||
for (byte i = 0; i < MiscConst.MaxActiveLackey; ++i)
|
||||
m_auiLackeyGUIDs[i] = (delrissa.GetAI() as boss_priestess_delrissa).m_auiLackeyGUID[i];
|
||||
@@ -493,7 +493,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
|
||||
ResetThreatList();
|
||||
|
||||
if (unit)
|
||||
if (unit != null)
|
||||
AddThreat(unit, 1000.0f);
|
||||
|
||||
InVanish = true;
|
||||
@@ -565,7 +565,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(2), task =>
|
||||
{
|
||||
Unit unit = SelectTarget(SelectTargetMethod.Random, 0);
|
||||
if (unit)
|
||||
if (unit != null)
|
||||
DoCast(unit, SpellIds.SeedOfCorruption);
|
||||
|
||||
task.Repeat(TimeSpan.FromSeconds(10));
|
||||
@@ -573,7 +573,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(1), task =>
|
||||
{
|
||||
Unit unit = SelectTarget(SelectTargetMethod.Random, 0);
|
||||
if (unit)
|
||||
if (unit != null)
|
||||
DoCast(unit, SpellIds.CurseOfAgony);
|
||||
|
||||
task.Repeat(TimeSpan.FromSeconds(13));
|
||||
@@ -582,7 +582,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(10), task =>
|
||||
{
|
||||
Unit unit = SelectTarget(SelectTargetMethod.Random, 0);
|
||||
if (unit)
|
||||
if (unit != null)
|
||||
DoCast(unit, SpellIds.Fear);
|
||||
|
||||
task.Repeat();
|
||||
@@ -671,7 +671,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(1), task =>
|
||||
{
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0);
|
||||
if (target)
|
||||
if (target != null)
|
||||
{
|
||||
DoCast(target, SpellIds.Polymorph);
|
||||
task.Repeat(TimeSpan.FromSeconds(20));
|
||||
@@ -680,7 +680,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(8), task =>
|
||||
{
|
||||
Unit unit = SelectTarget(SelectTargetMethod.Random, 0);
|
||||
if (unit)
|
||||
if (unit != null)
|
||||
DoCast(unit, SpellIds.Blizzard);
|
||||
|
||||
task.Repeat();
|
||||
@@ -771,7 +771,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
if (!InMeleeRange)
|
||||
{
|
||||
Unit unit = SelectTarget(SelectTargetMethod.Random, 0);
|
||||
if (unit)
|
||||
if (unit != null)
|
||||
DoCast(unit, SpellIds.InterceptStun);
|
||||
}
|
||||
|
||||
@@ -873,7 +873,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
GameObject go = me.GetGameObject(SpellIds.FreezingTrap);
|
||||
|
||||
//if we have a go, we need to wait (only one trap at a time)
|
||||
if (go)
|
||||
if (go != null)
|
||||
task.Repeat(TimeSpan.FromSeconds(2.5));
|
||||
else
|
||||
{
|
||||
@@ -889,7 +889,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
Initialize();
|
||||
|
||||
Unit pPet = Global.ObjAccessor.GetUnit(me, m_uiPetGUID);
|
||||
if (!pPet)
|
||||
if (pPet == null)
|
||||
me.SummonCreature(CreatureIds.Sliver, 0.0f, 0.0f, 0.0f, 0.0f, TempSummonType.CorpseDespawn);
|
||||
|
||||
base.Reset();
|
||||
@@ -942,7 +942,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.PriestessDelrissa
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(8), task =>
|
||||
{
|
||||
Unit unit = SelectTarget(SelectTargetMethod.Random, 0);
|
||||
if (unit)
|
||||
if (unit != null)
|
||||
DoCast(unit, SpellIds.Purge);
|
||||
|
||||
task.Repeat(TimeSpan.FromSeconds(15));
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.SelinFireheart
|
||||
void SelectNearestCrystal()
|
||||
{
|
||||
Creature crystal = me.FindNearestCreature(CreatureIds.FelCrystal, 250.0f);
|
||||
if (crystal)
|
||||
if (crystal != null)
|
||||
{
|
||||
Talk(TextIds.SayEnergy);
|
||||
Talk(TextIds.EmoteCrystal);
|
||||
@@ -197,7 +197,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.SelinFireheart
|
||||
Talk(TextIds.SayEmpowered);
|
||||
|
||||
Creature CrystalChosen = ObjectAccessor.GetCreature(me, CrystalGUID);
|
||||
if (CrystalChosen && CrystalChosen.IsAlive())
|
||||
if (CrystalChosen != null && CrystalChosen.IsAlive())
|
||||
CrystalChosen.KillSelf();
|
||||
|
||||
CrystalGUID.Clear();
|
||||
@@ -247,7 +247,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.SelinFireheart
|
||||
if (instance != null)
|
||||
{
|
||||
Creature selin = instance.GetCreature(DataTypes.SelinFireheart);
|
||||
if (selin && selin.IsAlive())
|
||||
if (selin != null && selin.IsAlive())
|
||||
selin.GetAI().DoAction(MiscConst.ActionSwitchPhase);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,14 +73,14 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.Vexallus
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(8), task =>
|
||||
{
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.ChainLightning);
|
||||
task.Repeat();
|
||||
});
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(5), task =>
|
||||
{
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 20.0f, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.ArcaneShock);
|
||||
task.Repeat(TimeSpan.FromSeconds(8));
|
||||
});
|
||||
@@ -89,7 +89,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.Vexallus
|
||||
public override void JustSummoned(Creature summoned)
|
||||
{
|
||||
Unit temp = SelectTarget(SelectTargetMethod.Random, 0);
|
||||
if (temp)
|
||||
if (temp != null)
|
||||
summoned.GetMotionMaster().MoveFollow(temp, 0, 0);
|
||||
|
||||
summons.Summon(summoned);
|
||||
@@ -150,7 +150,7 @@ namespace Scripts.EasternKingdoms.MagistersTerrace.Vexallus
|
||||
|
||||
public override void JustDied(Unit killer)
|
||||
{
|
||||
if (killer)
|
||||
if (killer != null)
|
||||
killer.CastSpell(killer, SpellIds.EnergyFeedback, true);
|
||||
me.RemoveAurasDueToSpell(SpellIds.PureEnergyPassive);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user