Fixes build. Scripts are still being updated.

This commit is contained in:
hondacrx
2024-01-24 12:02:23 -05:00
parent 1c6563718e
commit 6f4b7ddd9d
51 changed files with 268 additions and 268 deletions
@@ -41,14 +41,14 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.BaronGeddon
_scheduler.Schedule(TimeSpan.FromSeconds(30), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true, true, -(int)SpellIds.IgniteMana);
if (target)
if (target != null)
DoCast(target, SpellIds.IgniteMana);
task.Repeat(TimeSpan.FromSeconds(30));
});
_scheduler.Schedule(TimeSpan.FromSeconds(35), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true);
if (target)
if (target != null)
DoCast(target, SpellIds.LivingBomb);
task.Repeat(TimeSpan.FromSeconds(35));
});
@@ -64,7 +64,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Garr
_scheduler.Schedule(TimeSpan.FromSeconds(4), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 0);
if (target)
if (target != null)
DoCast(target, SpellIds.Immolate);
task.Repeat(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(10));
@@ -74,7 +74,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Garr
// ...and enrage if he is not.
_scheduler.Schedule(TimeSpan.FromSeconds(3), task =>
{
if (!me.FindNearestCreature(MCCreatureIds.Garr, 20.0f))
if (me.FindNearestCreature(MCCreatureIds.Garr, 20.0f) == null)
DoCastSelf(SpellIds.SeparationAnxiety);
else if (me.HasAura(SpellIds.SeparationAnxiety))
me.RemoveAurasDueToSpell(SpellIds.SeparationAnxiety);
@@ -33,14 +33,14 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Gehennas
_scheduler.Schedule(TimeSpan.FromSeconds(10), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 0);
if (target)
if (target != null)
DoCast(target, SpellIds.RainOfFire);
task.Repeat(TimeSpan.FromSeconds(4), TimeSpan.FromSeconds(12));
});
_scheduler.Schedule(TimeSpan.FromSeconds(6), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 1);
if (target)
if (target != null)
DoCast(target, SpellIds.ShadowBolt);
task.Repeat(TimeSpan.FromSeconds(7));
});
@@ -46,7 +46,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Golemagg
_scheduler.Schedule(TimeSpan.FromSeconds(7), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 0);
if (target)
if (target != null)
DoCast(target, SpellIds.Pyroblast);
task.Repeat(TimeSpan.FromSeconds(7));
});
@@ -104,7 +104,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Golemagg
return;
Creature pGolemagg = ObjectAccessor.GetCreature(me, _instance.GetGuidData(DataTypes.GolemaggTheIncinerator));
if (pGolemagg)
if (pGolemagg != null)
{
if (pGolemagg.IsAlive())
{
@@ -214,7 +214,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore
else
{
TempSummon summon = instance.SummonCreature(MCCreatureIds.MajordomoExecutus, MCMiscConst.RagnarosTelePos);
if (summon)
if (summon != null)
summon.GetAI().DoAction(ActionIds.StartRagnarosAlt);
}
}
@@ -52,7 +52,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Magmadar
_scheduler.Schedule(TimeSpan.FromSeconds(12), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true, true, -(int)SpellIds.LavaBomb);
if (target)
if (target != null)
DoCast(target, SpellIds.LavaBomb);
task.Repeat(TimeSpan.FromSeconds(12));
});
@@ -69,7 +69,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Majordomo
_scheduler.Schedule(TimeSpan.FromSeconds(20), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 1);
if (target)
if (target != null)
DoCast(target, SpellIds.Teleport);
task.Repeat(TimeSpan.FromSeconds(20));
});
@@ -84,7 +84,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Majordomo
if (!UpdateVictim())
return;
if (!me.FindNearestCreature(MCCreatureIds.FlamewakerHealer, 100.0f) && !me.FindNearestCreature(MCCreatureIds.FlamewakerElite, 100.0f))
if (me.FindNearestCreature(MCCreatureIds.FlamewakerHealer, 100.0f) == null && me.FindNearestCreature(MCCreatureIds.FlamewakerElite, 100.0f) == null)
{
instance.UpdateEncounterStateForKilledCreature(me.GetEntry(), me);
me.SetFaction((uint)FactionTemplates.Friendly);
@@ -140,7 +140,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore
case EventIds.Intro4:
Talk(TextIds.SayArrival5Rag);
Creature executus = ObjectAccessor.GetCreature(me, instance.GetGuidData(DataTypes.MajordomoExecutus));
if (executus)
if (executus != null)
Unit.Kill(me, executus);
break;
case EventIds.Intro5:
@@ -165,7 +165,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore
me.SetEmoteState(Emote.OneshotNone);
me.HandleEmoteCommand(Emote.OneshotEmerge);
Unit target = SelectTarget(SelectTargetMethod.Random, 0);
if (target)
if (target != null)
AttackStart(target);
instance.SetData(MCMiscConst.DataRagnarosAdds, 0);
@@ -70,7 +70,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Shazzrah
break;
case EventIds.ShazzrahCurse:
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true, true, -(int)SpellIds.ShazzrahCurse);
if (target)
if (target != null)
DoCast(target, SpellIds.ShazzrahCurse);
_events.ScheduleEvent(EventIds.ShazzrahCurse, TimeSpan.FromSeconds(25), TimeSpan.FromSeconds(30));
break;
@@ -123,11 +123,11 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Shazzrah
void HandleScript(uint effIndex)
{
Unit target = GetHitUnit();
if (target)
if (target != null)
{
target.CastSpell(GetCaster(), SpellIds.ShazzrahGate, true);
Creature creature = GetCaster().ToCreature();
if (creature)
if (creature != null)
creature.GetAI().AttackStart(target); // Attack the target which caster will teleport to.
}
}
@@ -61,7 +61,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Sulfuron
_scheduler.Schedule(TimeSpan.FromSeconds(2), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true);
if (target)
if (target != null)
DoCast(target, SpellIds.Flamespear);
task.Repeat(TimeSpan.FromSeconds(12), TimeSpan.FromSeconds(16));
});
@@ -100,21 +100,21 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.MoltenCore.Sulfuron
_scheduler.Schedule(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(30), task =>
{
Unit target = DoSelectLowestHpFriendly(60.0f, 1);
if (target)
if (target != null)
DoCast(target, SpellIds.Heal);
task.Repeat(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(20));
});
_scheduler.Schedule(TimeSpan.FromSeconds(2), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true, true, -(int)SpellIds.Shadowwordpain);
if (target)
if (target != null)
DoCast(target, SpellIds.Shadowwordpain);
task.Repeat(TimeSpan.FromSeconds(18), TimeSpan.FromSeconds(26));
});
_scheduler.Schedule(TimeSpan.FromSeconds(8), task =>
{
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 0.0f, true, true, -(int)SpellIds.Immolate);
if (target)
if (target != null)
DoCast(target, SpellIds.Immolate);
task.Repeat(TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(25));
});