Fixes build. Scripts are still being updated.
This commit is contained in:
@@ -92,10 +92,10 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.Gyth
|
||||
{
|
||||
me.AddAura(SpellIds.RendMounts, me);
|
||||
GameObject portcullis = me.FindNearestGameObject(GameObjectsIds.DrPortcullis, 40.0f);
|
||||
if (portcullis)
|
||||
if (portcullis != null)
|
||||
portcullis.UseDoorOrButton();
|
||||
Creature victor = me.FindNearestCreature(CreaturesIds.LordVictorNefarius, 75.0f, true);
|
||||
if (victor)
|
||||
if (victor != null)
|
||||
victor.GetAI().SetData(1, 1);
|
||||
|
||||
task.Schedule(TimeSpan.FromSeconds(2), summonTask2 =>
|
||||
|
||||
+12
-12
@@ -365,7 +365,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
if (GetBossState(DataTypes.PyrogaurdEmberseer) == EncounterState.NotStarted)
|
||||
{
|
||||
Creature Emberseer = instance.GetCreature(PyroguardEmberseer);
|
||||
if (Emberseer)
|
||||
if (Emberseer != null)
|
||||
Emberseer.GetAI().SetData(1, 1);
|
||||
}
|
||||
break;
|
||||
@@ -395,7 +395,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
foreach (var itr in _incarceratorList)
|
||||
{
|
||||
Creature creature = instance.GetCreature(itr);
|
||||
if (creature)
|
||||
if (creature != null)
|
||||
creature.Respawn();
|
||||
}
|
||||
break;
|
||||
@@ -513,13 +513,13 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
runecreaturelist[i].Clear();
|
||||
|
||||
GameObject rune = instance.GetGameObject(go_roomrunes[i]);
|
||||
if (rune)
|
||||
if (rune != null)
|
||||
{
|
||||
for (byte j = 0; j < 3; ++j)
|
||||
{
|
||||
List<Creature> creatureList = rune.GetCreatureListWithEntryInGrid(BRSMiscConst.DragonspireMobs[j], 15.0f);
|
||||
foreach (var creature in creatureList)
|
||||
if (creature)
|
||||
if (creature != null)
|
||||
runecreaturelist[i].Add(creature.GetGUID());
|
||||
}
|
||||
}
|
||||
@@ -535,7 +535,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
{
|
||||
bool _mobAlive = false;
|
||||
rune = instance.GetGameObject(go_roomrunes[i]);
|
||||
if (!rune)
|
||||
if (rune == null)
|
||||
continue;
|
||||
|
||||
if (rune.GetGoState() == GameObjectState.Active)
|
||||
@@ -543,7 +543,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
foreach (ObjectGuid guid in runecreaturelist[i])
|
||||
{
|
||||
mob = instance.GetCreature(guid);
|
||||
if (mob && mob.IsAlive())
|
||||
if (mob != null && mob.IsAlive())
|
||||
_mobAlive = true;
|
||||
}
|
||||
}
|
||||
@@ -587,10 +587,10 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
{
|
||||
SetBossState(DataTypes.DragonspireRoom, EncounterState.Done);
|
||||
GameObject door1 = instance.GetGameObject(go_emberseerin);
|
||||
if (door1)
|
||||
if (door1 != null)
|
||||
HandleGameObject(ObjectGuid.Empty, true, door1);
|
||||
GameObject door2 = instance.GetGameObject(go_doors);
|
||||
if (door2)
|
||||
if (door2 != null)
|
||||
HandleGameObject(ObjectGuid.Empty, true, door2);
|
||||
}
|
||||
}
|
||||
@@ -636,7 +636,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
|
||||
public override bool OnTrigger(Player player, AreaTriggerRecord areaTrigger)
|
||||
{
|
||||
if (player && player.IsAlive())
|
||||
if (player != null && player.IsAlive())
|
||||
{
|
||||
InstanceScript instance = player.GetInstanceScript();
|
||||
if (instance != null)
|
||||
@@ -657,14 +657,14 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
|
||||
public override bool OnTrigger(Player player, AreaTriggerRecord areaTrigger)
|
||||
{
|
||||
if (player && player.IsAlive())
|
||||
if (player != null && player.IsAlive())
|
||||
{
|
||||
InstanceScript instance = player.GetInstanceScript();
|
||||
if (instance == null)
|
||||
return false;
|
||||
|
||||
Creature rend = player.FindNearestCreature(CreaturesIds.WarchiefRendBlackhand, 50.0f);
|
||||
if (rend)
|
||||
if (rend != null)
|
||||
{
|
||||
rend.GetAI().SetData(BRSMiscConst.Areatrigger, BRSMiscConst.AreatriggerBlackrockStadium);
|
||||
return true;
|
||||
@@ -688,7 +688,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire
|
||||
if (instance != null)
|
||||
{
|
||||
Creature infiltrator = ObjectAccessor.GetCreature(player, instance.GetGuidData(DataTypes.ScarshieldInfiltrator));
|
||||
if (infiltrator)
|
||||
if (infiltrator != null)
|
||||
{
|
||||
if (player.GetLevel() >= 57)
|
||||
infiltrator.GetAI().SetData(1, 1);
|
||||
|
||||
+3
-3
@@ -86,13 +86,13 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.OverlordWyrmt
|
||||
if (!Summoned && HealthBelowPct(51))
|
||||
{
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 100, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
{
|
||||
Creature warlord = me.SummonCreature(MiscConst.NpcSpirestoneWarlord, MiscConst.SummonLocation1, TempSummonType.TimedDespawn, TimeSpan.FromMinutes(5));
|
||||
if (warlord)
|
||||
if (warlord != null)
|
||||
warlord.GetAI().AttackStart(target);
|
||||
Creature berserker = me.SummonCreature(MiscConst.NpcSmolderthornBerserker, MiscConst.SummonLocation2, TempSummonType.TimedDespawn, TimeSpan.FromMinutes(5));
|
||||
if (berserker)
|
||||
if (berserker != null)
|
||||
berserker.GetAI().AttackStart(target);
|
||||
Summoned = true;
|
||||
}
|
||||
|
||||
+10
-10
@@ -96,7 +96,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.PyroguardEmbe
|
||||
List<Creature> creatureList = me.GetCreatureListWithEntryInGrid(CreaturesIds.BlackhandIncarcerator, 35.0f);
|
||||
foreach (var creature in creatureList)
|
||||
{
|
||||
if (creature)
|
||||
if (creature != null)
|
||||
{
|
||||
creature.SetImmuneToAll(false);
|
||||
creature.InterruptSpell(CurrentSpellTypes.Channeled);
|
||||
@@ -136,7 +136,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.PyroguardEmbe
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(14), task =>
|
||||
{
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 100, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.Pyroblast);
|
||||
task.Repeat(TimeSpan.FromSeconds(15));
|
||||
});
|
||||
@@ -186,25 +186,25 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.PyroguardEmbe
|
||||
{
|
||||
// update all runes
|
||||
GameObject rune1 = ObjectAccessor.GetGameObject(me, instance.GetGuidData(GameObjectsIds.EmberseerRune1));
|
||||
if (rune1)
|
||||
if (rune1 != null)
|
||||
rune1.SetGoState(state);
|
||||
GameObject rune2 = ObjectAccessor.GetGameObject(me, instance.GetGuidData(GameObjectsIds.EmberseerRune2));
|
||||
if (rune2)
|
||||
if (rune2 != null)
|
||||
rune2.SetGoState(state);
|
||||
GameObject rune3 = ObjectAccessor.GetGameObject(me, instance.GetGuidData(GameObjectsIds.EmberseerRune3));
|
||||
if (rune3)
|
||||
if (rune3 != null)
|
||||
rune3.SetGoState(state);
|
||||
GameObject rune4 = ObjectAccessor.GetGameObject(me, instance.GetGuidData(GameObjectsIds.EmberseerRune4));
|
||||
if (rune4)
|
||||
if (rune4 != null)
|
||||
rune4.SetGoState(state);
|
||||
GameObject rune5 = ObjectAccessor.GetGameObject(me, instance.GetGuidData(GameObjectsIds.EmberseerRune5));
|
||||
if (rune5)
|
||||
if (rune5 != null)
|
||||
rune5.SetGoState(state);
|
||||
GameObject rune6 = ObjectAccessor.GetGameObject(me, instance.GetGuidData(GameObjectsIds.EmberseerRune6));
|
||||
if (rune6)
|
||||
if (rune6 != null)
|
||||
rune6.SetGoState(state);
|
||||
GameObject rune7 = ObjectAccessor.GetGameObject(me, instance.GetGuidData(GameObjectsIds.EmberseerRune7));
|
||||
if (rune7)
|
||||
if (rune7 != null)
|
||||
rune7.SetGoState(state);
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.PyroguardEmbe
|
||||
// Had to do this because CallForHelp will ignore any npcs without Los
|
||||
List<Creature> creatureList = me.GetCreatureListWithEntryInGrid(CreaturesIds.BlackhandIncarcerator, 60.0f);
|
||||
foreach (var creature in creatureList)
|
||||
if (creature)
|
||||
if (creature != null)
|
||||
DoZoneInCombat(creature); // GetAI().AttackStart(me.GetVictim());
|
||||
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(8), TimeSpan.FromSeconds(16), task =>
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.RendBlackhand
|
||||
break;
|
||||
case 11:
|
||||
Creature gyth = me.FindNearestCreature(CreaturesIds.Gyth, 10.0f, true);
|
||||
if (gyth)
|
||||
if (gyth != null)
|
||||
gyth.GetAI().SetData(1, 1);
|
||||
me.DespawnOrUnsummon(TimeSpan.FromSeconds(1), TimeSpan.FromDays(7));
|
||||
break;
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.ShadowHunterV
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(8), task =>
|
||||
{
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 100, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.Hex);
|
||||
task.Repeat(TimeSpan.FromSeconds(15));
|
||||
});
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackrockSpire.Thebeast
|
||||
_scheduler.Schedule(TimeSpan.FromSeconds(3), task =>
|
||||
{
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 100, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.Immolate);
|
||||
task.Repeat(TimeSpan.FromSeconds(8));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user