Misc Script Fixes.
This commit is contained in:
@@ -62,7 +62,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.Alizabal
|
||||
InstanceScript instance = player.GetInstanceScript();
|
||||
if (instance != null)
|
||||
{
|
||||
Creature alizabal = ObjectAccessor.GetCreature(player, instance.GetGuidData(DataTypes.Alizabal));
|
||||
Creature alizabal = ObjectAccessor.GetCreature(player, instance.GetGuidData((uint)DataTypes.Alizabal));
|
||||
if (alizabal != null)
|
||||
alizabal.GetAI().DoAction(ActionIds.Intro);
|
||||
}
|
||||
@@ -77,7 +77,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.Alizabal
|
||||
bool _hate;
|
||||
bool _skewer;
|
||||
|
||||
public boss_alizabal(Creature creature) : base(creature, DataTypes.Alizabal) { }
|
||||
public boss_alizabal(Creature creature) : base(creature, (uint)DataTypes.Alizabal) { }
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
@@ -250,5 +250,4 @@ namespace Scripts.EasternKingdoms.BaradinHold.Alizabal
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,35 +5,48 @@ using Framework.Constants;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using Game.Scripting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Scripts.EasternKingdoms.BaradinHold
|
||||
{
|
||||
struct DataTypes
|
||||
enum DataTypes
|
||||
{
|
||||
public const uint Argaloth = 0;
|
||||
public const uint Occuthar = 1;
|
||||
public const uint Alizabal = 2;
|
||||
Argaloth = 0,
|
||||
Occuthar = 1,
|
||||
Alizabal = 2,
|
||||
|
||||
// Encounter Related
|
||||
ExtinuishFelFlames
|
||||
}
|
||||
|
||||
struct CreatureIds
|
||||
enum CreatureIds
|
||||
{
|
||||
public const uint EyeOfOccuthar = 52389;
|
||||
public const uint FocusFireDummy = 52369;
|
||||
public const uint OccutharEye = 52368;
|
||||
// Bosses
|
||||
Argaloth = 47120,
|
||||
Occuthar = 52363,
|
||||
Alizabal = 55869,
|
||||
|
||||
// Encounter Related Creatures
|
||||
/*Argaloth*/
|
||||
FelFlames = 47829,
|
||||
|
||||
EyeOfOccuthar = 52389,
|
||||
FocusFireDummy = 52369,
|
||||
OccutharEye = 52368
|
||||
}
|
||||
|
||||
struct BossIds
|
||||
enum GameObjectIds
|
||||
{
|
||||
public const uint Argaloth = 47120;
|
||||
public const uint Occuthar = 52363;
|
||||
public const uint Alizabal = 55869;
|
||||
ArgalothDoor = 207619,
|
||||
OccutharDoor = 208953,
|
||||
AlizabalDoor = 209849
|
||||
}
|
||||
|
||||
struct GameObjectIds
|
||||
enum SpellIds
|
||||
{
|
||||
public const uint ArgalothDoor = 207619;
|
||||
public const uint OccutharDoor = 208953;
|
||||
public const uint AlizabalDoor = 209849;
|
||||
// Fel Flames
|
||||
FelFlames = 88999
|
||||
}
|
||||
|
||||
[Script]
|
||||
@@ -41,89 +54,68 @@ namespace Scripts.EasternKingdoms.BaradinHold
|
||||
{
|
||||
static DoorData[] doorData =
|
||||
{
|
||||
new DoorData(GameObjectIds.ArgalothDoor, DataTypes.Argaloth, EncounterDoorBehavior.OpenWhenNotInProgress),
|
||||
new DoorData(GameObjectIds.OccutharDoor, DataTypes.Occuthar, EncounterDoorBehavior.OpenWhenNotInProgress),
|
||||
new DoorData(GameObjectIds.AlizabalDoor, DataTypes.Alizabal, EncounterDoorBehavior.OpenWhenNotInProgress),
|
||||
new DoorData((uint)GameObjectIds.ArgalothDoor, (uint)DataTypes.Argaloth, EncounterDoorBehavior.OpenWhenNotInProgress),
|
||||
new DoorData((uint)GameObjectIds.OccutharDoor, (uint)DataTypes.Occuthar, EncounterDoorBehavior.OpenWhenNotInProgress),
|
||||
new DoorData((uint)GameObjectIds.AlizabalDoor, (uint)DataTypes.Alizabal, EncounterDoorBehavior.OpenWhenNotInProgress),
|
||||
};
|
||||
|
||||
static ObjectData[] creatureData =
|
||||
{
|
||||
new ObjectData((uint)CreatureIds.Argaloth, (uint)DataTypes.Argaloth),
|
||||
new ObjectData((uint)CreatureIds.Occuthar, (uint)DataTypes.Occuthar),
|
||||
new ObjectData((uint)CreatureIds.Alizabal, (uint)DataTypes.Alizabal),
|
||||
};
|
||||
|
||||
static DungeonEncounterData[] encounters =
|
||||
{
|
||||
new DungeonEncounterData(DataTypes.Argaloth, 1033),
|
||||
new DungeonEncounterData(DataTypes.Occuthar, 1250),
|
||||
new DungeonEncounterData(DataTypes.Alizabal, 1332)
|
||||
new DungeonEncounterData((uint)DataTypes.Argaloth, 1033),
|
||||
new DungeonEncounterData((uint)DataTypes.Occuthar, 1250),
|
||||
new DungeonEncounterData((uint)DataTypes.Alizabal, 1332)
|
||||
};
|
||||
|
||||
public instance_baradin_hold() : base(nameof(instance_baradin_hold), 757) { }
|
||||
|
||||
class instance_baradin_hold_InstanceMapScript : InstanceScript
|
||||
{
|
||||
ObjectGuid ArgalothGUID;
|
||||
ObjectGuid OccutharGUID;
|
||||
ObjectGuid AlizabalGUID;
|
||||
List<ObjectGuid> _felFlameGUIDs = new();
|
||||
|
||||
public instance_baradin_hold_InstanceMapScript(InstanceMap map) : base(map)
|
||||
{
|
||||
SetHeaders("BH");
|
||||
SetBossNumber(3);
|
||||
LoadObjectData(creatureData, null);
|
||||
LoadDoorData(doorData);
|
||||
LoadDungeonEncounterData(encounters);
|
||||
}
|
||||
|
||||
public override void OnCreatureCreate(Creature creature)
|
||||
{
|
||||
switch (creature.GetEntry())
|
||||
switch ((CreatureIds)creature.GetEntry())
|
||||
{
|
||||
case BossIds.Argaloth:
|
||||
ArgalothGUID = creature.GetGUID();
|
||||
break;
|
||||
case BossIds.Occuthar:
|
||||
OccutharGUID = creature.GetGUID();
|
||||
break;
|
||||
case BossIds.Alizabal:
|
||||
AlizabalGUID = creature.GetGUID();
|
||||
case CreatureIds.FelFlames:
|
||||
_felFlameGUIDs.Add(creature.GetGUID());
|
||||
creature.m_Events.AddEventAtOffset(() => creature.CastSpell(null, (uint)SpellIds.FelFlames), TimeSpan.FromSeconds(1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGameObjectCreate(GameObject go)
|
||||
public override void SetData(uint type, uint value)
|
||||
{
|
||||
switch (go.GetEntry())
|
||||
switch ((DataTypes)type)
|
||||
{
|
||||
case GameObjectIds.ArgalothDoor:
|
||||
case GameObjectIds.OccutharDoor:
|
||||
case GameObjectIds.AlizabalDoor:
|
||||
AddDoor(go, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
case DataTypes.ExtinuishFelFlames:
|
||||
foreach (ObjectGuid guid in _felFlameGUIDs)
|
||||
{
|
||||
Creature felFlame = instance.GetCreature(guid);
|
||||
if (felFlame != null)
|
||||
felFlame.RemoveAllAuras();
|
||||
}
|
||||
|
||||
public override ObjectGuid GetGuidData(uint data)
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
case DataTypes.Argaloth:
|
||||
return ArgalothGUID;
|
||||
case DataTypes.Occuthar:
|
||||
return OccutharGUID;
|
||||
case DataTypes.Alizabal:
|
||||
return AlizabalGUID;
|
||||
_felFlameGUIDs.Clear();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ObjectGuid.Empty;
|
||||
}
|
||||
|
||||
public override void OnGameObjectRemove(GameObject go)
|
||||
{
|
||||
switch (go.GetEntry())
|
||||
{
|
||||
case GameObjectIds.ArgalothDoor:
|
||||
case GameObjectIds.OccutharDoor:
|
||||
case GameObjectIds.AlizabalDoor:
|
||||
AddDoor(go, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
{
|
||||
Vehicle _vehicle;
|
||||
|
||||
public boss_occuthar(Creature creature) : base(creature, DataTypes.Occuthar)
|
||||
public boss_occuthar(Creature creature) : base(creature, (uint)DataTypes.Occuthar)
|
||||
{
|
||||
_vehicle = me.GetVehicleKit();
|
||||
Cypher.Assert(_vehicle != null);
|
||||
@@ -78,7 +78,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
{
|
||||
summons.Summon(summon);
|
||||
|
||||
if (summon.GetEntry() == CreatureIds.FocusFireDummy)
|
||||
if (summon.GetEntry() == (uint)CreatureIds.FocusFireDummy)
|
||||
{
|
||||
DoCast(summon, SpellIds.FocusedFire);
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
public override void IsSummonedBy(WorldObject summoner)
|
||||
{
|
||||
// player is the spellcaster so register summon manually
|
||||
Creature occuthar = ObjectAccessor.GetCreature(me, _instance.GetGuidData(DataTypes.Occuthar));
|
||||
Creature occuthar = ObjectAccessor.GetCreature(me, _instance.GetGuidData((uint)DataTypes.Occuthar));
|
||||
if (occuthar != null)
|
||||
occuthar.GetAI().JustSummoned(me);
|
||||
}
|
||||
@@ -169,7 +169,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
}
|
||||
|
||||
[Script] // 96872 - Focused Fire
|
||||
class spell_occuthar_focused_fire_SpellScript : SpellScript
|
||||
class spell_occuthar_focused_fire : SpellScript
|
||||
{
|
||||
void FilterTargets(List<WorldObject> targets)
|
||||
{
|
||||
@@ -189,7 +189,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
}
|
||||
|
||||
[Script] // Id - 96931 Eyes of Occu'thar
|
||||
class spell_occuthar_eyes_of_occuthar_SpellScript : SpellScript
|
||||
class spell_occuthar_eyes_of_occuthar : SpellScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
@@ -222,7 +222,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
}
|
||||
|
||||
[Script] // Id - 96932 Eyes of Occu'thar
|
||||
class spell_occuthar_eyes_of_occuthar_vehicle_SpellScript : SpellScript
|
||||
class spell_occuthar_eyes_of_occuthar_vehicle : SpellScript
|
||||
{
|
||||
public override bool Load()
|
||||
{
|
||||
@@ -237,10 +237,10 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
{
|
||||
Position pos = GetHitUnit().GetPosition();
|
||||
|
||||
Creature occuthar = ObjectAccessor.GetCreature(GetCaster(), GetCaster().GetInstanceScript().GetGuidData(DataTypes.Occuthar));
|
||||
Creature occuthar = ObjectAccessor.GetCreature(GetCaster(), GetCaster().GetInstanceScript().GetGuidData((uint)DataTypes.Occuthar));
|
||||
if (occuthar != null)
|
||||
{
|
||||
Creature creature = occuthar.SummonCreature(CreatureIds.EyeOfOccuthar, pos);
|
||||
Creature creature = occuthar.SummonCreature((uint)CreatureIds.EyeOfOccuthar, pos);
|
||||
if (creature != null)
|
||||
creature.CastSpell(GetHitUnit(), SpellIds.GazeOfOccuthar, false);
|
||||
}
|
||||
@@ -253,7 +253,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
}
|
||||
|
||||
[Script] // 96942 / 101009 - Gaze of Occu'thar
|
||||
class spell_occuthar_occuthars_destruction_AuraScript : AuraScript
|
||||
class spell_occuthar_occuthars_destruction : AuraScript
|
||||
{
|
||||
public override bool Load()
|
||||
{
|
||||
@@ -277,5 +277,4 @@ namespace Scripts.EasternKingdoms.BaradinHold.Occuthar
|
||||
OnEffectRemove.Add(new EffectApplyHandler(OnRemove, 2, AuraType.PeriodicTriggerSpell, AuraEffectHandleModes.Real));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace Scripts.EasternKingdoms.BaradinHold.PitLordArgaloth
|
||||
[Script]
|
||||
class boss_pit_lord_argaloth : BossAI
|
||||
{
|
||||
boss_pit_lord_argaloth(Creature creature) : base(creature, DataTypes.Argaloth) { }
|
||||
public boss_pit_lord_argaloth(Creature creature) : base(creature, (uint)DataTypes.Argaloth) { }
|
||||
|
||||
public override void JustEngagedWith(Unit who)
|
||||
{
|
||||
@@ -112,5 +112,4 @@ namespace Scripts.EasternKingdoms.BaradinHold.PitLordArgaloth
|
||||
OnHit.Add(new HitHandler(SplitDamage));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user