Fixes build. Scripts are still being updated.
This commit is contained in:
@@ -205,7 +205,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair
|
||||
var players = me.GetMap().GetPlayers();
|
||||
foreach (var player in players)
|
||||
{
|
||||
if (player)
|
||||
if (player != null)
|
||||
{
|
||||
DoCast(player, RandomHelper.RAND(SpellIds.BroodafBlue, SpellIds.BroodafBlack, SpellIds.BroodafRed, SpellIds.BroodafBronze, SpellIds.BroodafGreen), new CastSpellExtraArgs(true));
|
||||
|
||||
@@ -265,11 +265,11 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair
|
||||
_instance.SetBossState(DataTypes.Chromaggus, EncounterState.InProgress);
|
||||
|
||||
Creature creature = _instance.GetCreature(DataTypes.Chromaggus);
|
||||
if (creature)
|
||||
if (creature != null)
|
||||
creature.GetAI().JustEngagedWith(player);
|
||||
|
||||
GameObject go = _instance.GetGameObject(DataTypes.GoChromaggusDoor);
|
||||
if (go)
|
||||
if (go != null)
|
||||
_instance.HandleGameObject(ObjectGuid.Empty, true, go);
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -253,7 +253,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair
|
||||
foreach (var guid in EggList)
|
||||
{
|
||||
GameObject egg = instance.GetGameObject(guid);
|
||||
if (egg)
|
||||
if (egg != null)
|
||||
egg.SetLootState(LootState.JustDeactivated);
|
||||
}
|
||||
}
|
||||
@@ -264,7 +264,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair
|
||||
{
|
||||
case EncounterState.NotStarted:
|
||||
Creature nefarian = GetCreature(DataTypes.Nefarian);
|
||||
if (nefarian)
|
||||
if (nefarian != null)
|
||||
nefarian.DespawnOrUnsummon();
|
||||
break;
|
||||
case EncounterState.Fail:
|
||||
@@ -299,7 +299,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair
|
||||
if (++EggCount == 15)
|
||||
{
|
||||
Creature razor = GetCreature(DataTypes.RazorgoreTheUntamed);
|
||||
if (razor)
|
||||
if (razor != null)
|
||||
{
|
||||
SetData(BWLMisc.DataEggEvent, (uint)EncounterState.Done);
|
||||
razor.RemoveAurasDueToSpell(42013); // MindControl
|
||||
@@ -337,7 +337,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair
|
||||
for (uint i = RandomHelper.URand(2, 5); i > 0; --i)
|
||||
{
|
||||
Creature summon = instance.SummonCreature(BWLMisc.Entry[RandomHelper.URand(0, 4)], BWLMisc.SummonPosition[RandomHelper.URand(0, 7)]);
|
||||
if (summon)
|
||||
if (summon != null)
|
||||
summon.GetAI().DoZoneInCombat();
|
||||
}
|
||||
_events.ScheduleEvent(EventIds.RazorSpawn, TimeSpan.FromSeconds(12), TimeSpan.FromSeconds(17));
|
||||
@@ -345,12 +345,12 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair
|
||||
case EventIds.RazorPhaseTwo:
|
||||
_events.CancelEvent(EventIds.RazorSpawn);
|
||||
Creature razor = GetCreature(DataTypes.RazorgoreTheUntamed);
|
||||
if (razor)
|
||||
if (razor != null)
|
||||
razor.GetAI().DoAction(BWLMisc.ActionPhaseTwo);
|
||||
break;
|
||||
case EventIds.RespawnNefarius:
|
||||
Creature nefarius = GetCreature(DataTypes.LordVictorNefarius);
|
||||
if (nefarius)
|
||||
if (nefarius != null)
|
||||
{
|
||||
nefarius.SetActive(true);
|
||||
nefarius.SetFarVisible(true);
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
|
||||
if (me.GetMapId() == 469)
|
||||
{
|
||||
if (!me.FindNearestCreature(BWLCreatureIds.Nefarian, 1000.0f, true))
|
||||
if (me.FindNearestCreature(BWLCreatureIds.Nefarian, 1000.0f, true) == null)
|
||||
_Reset();
|
||||
|
||||
me.SetVisible(true);
|
||||
@@ -240,7 +240,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
break;
|
||||
case EventIds.Chaos1:
|
||||
Creature gyth = me.FindNearestCreature(CreatureIds.Gyth, 75.0f, true);
|
||||
if (gyth)
|
||||
if (gyth != null)
|
||||
{
|
||||
me.SetFacingToObject(gyth);
|
||||
Talk(TextIds.SayChaosSpell);
|
||||
@@ -253,15 +253,15 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
break;
|
||||
case EventIds.Success1:
|
||||
Unit player = me.SelectNearestPlayer(60.0f);
|
||||
if (player)
|
||||
if (player != null)
|
||||
{
|
||||
me.SetFacingToObject(player);
|
||||
Talk(TextIds.SaySuccess);
|
||||
GameObject portcullis1 = me.FindNearestGameObject(GameObjectIds.PortcullisActive, 65.0f);
|
||||
if (portcullis1)
|
||||
if (portcullis1 != null)
|
||||
portcullis1.SetGoState(GameObjectState.Active);
|
||||
GameObject portcullis2 = me.FindNearestGameObject(GameObjectIds.PortcullisTobossrooms, 80.0f);
|
||||
if (portcullis2)
|
||||
if (portcullis2 != null)
|
||||
portcullis2.SetGoState(GameObjectState.Active);
|
||||
}
|
||||
_events.ScheduleEvent(EventIds.Success2, TimeSpan.FromSeconds(4));
|
||||
@@ -300,7 +300,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
break;
|
||||
case 1:
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 40, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.Shadowbolt);
|
||||
break;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
case EventIds.Fear:
|
||||
{
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 40, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.Fear);
|
||||
_events.ScheduleEvent(EventIds.Fear, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(20));
|
||||
break;
|
||||
@@ -318,7 +318,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
case EventIds.MindControl:
|
||||
{
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 40, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
DoCast(target, SpellIds.ShadowCommand);
|
||||
_events.ScheduleEvent(EventIds.MindControl, TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(35));
|
||||
break;
|
||||
@@ -332,7 +332,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
else
|
||||
CreatureID = MiscConst.Entry[RandomHelper.URand(0, 4)];
|
||||
Creature dragon = me.SummonCreature(CreatureID, MiscConst.DrakeSpawnLoc[i]);
|
||||
if (dragon)
|
||||
if (dragon != null)
|
||||
{
|
||||
dragon.SetFaction((uint)FactionTemplates.DragonflightBlack);
|
||||
dragon.GetAI().AttackStart(me.GetVictim());
|
||||
@@ -341,7 +341,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
if (++SpawnedAdds >= 42)
|
||||
{
|
||||
Creature nefarian = me.SummonCreature(BWLCreatureIds.Nefarian, MiscConst.NefarianLoc[0]);
|
||||
if (nefarian)
|
||||
if (nefarian != null)
|
||||
{
|
||||
nefarian.SetActive(true);
|
||||
nefarian.SetFarVisible(true);
|
||||
@@ -441,7 +441,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
if (id == 1)
|
||||
{
|
||||
DoZoneInCombat();
|
||||
if (me.GetVictim())
|
||||
if (me.GetVictim() != null)
|
||||
AttackStart(me.GetVictim());
|
||||
}
|
||||
}
|
||||
@@ -497,7 +497,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.VictorNefarius
|
||||
break;
|
||||
case EventIds.Classcall:
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 0, 100.0f, true);
|
||||
if (target)
|
||||
if (target != null)
|
||||
switch (target.GetClass())
|
||||
{
|
||||
case Class.Mage:
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.Razorgore
|
||||
if (instance.GetData(BWLMisc.DataEggEvent) != (uint)EncounterState.Done)
|
||||
{
|
||||
Creature razorgore = instance.GetCreature(DataTypes.RazorgoreTheUntamed);
|
||||
if (razorgore)
|
||||
if (razorgore != null)
|
||||
{
|
||||
razorgore.Attack(player, true);
|
||||
player.CastSpell(razorgore, SpellIds.Mindcontrol);
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.Vaelastrasz
|
||||
{
|
||||
//selects a random target that isn't the current victim and is a mana user (selects mana users) but not pets
|
||||
//it also ignores targets who have the aura. We don't want to place the debuff on the same target twice.
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 1, u => { return u && !u.IsPet() && u.GetPowerType() == PowerType.Mana && !u.HasAura(SpellIds.Burningadrenaline); });
|
||||
Unit target = SelectTarget(SelectTargetMethod.Random, 1, u => { return u != null && !u.IsPet() && u.GetPowerType() == PowerType.Mana && !u.HasAura(SpellIds.Burningadrenaline); });
|
||||
if (target != null)
|
||||
me.CastSpell(target, SpellIds.Burningadrenaline, true);
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Scripts.EasternKingdoms.BlackrockMountain.BlackwingLair.Vaelastrasz
|
||||
{
|
||||
me.SetFaction((uint)FactionTemplates.DragonflightBlack);
|
||||
Player player = Global.ObjAccessor.GetPlayer(me, PlayerGUID);
|
||||
if (player)
|
||||
if (player != null)
|
||||
AttackStart(player);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user