refactor(Scripts/Zone): move crystalsong_forest to new system (#9700)

This commit is contained in:
Kitzunu
2021-12-17 18:07:28 +01:00
committed by GitHub
parent 8e1e305e8d
commit 9be67e508b
@@ -39,16 +39,9 @@ enum ePreparationsForWar
TRANSPORT_THE_SKYBREAKER = 192242 TRANSPORT_THE_SKYBREAKER = 192242
}; };
class npc_preparations_for_war_vehicle : public CreatureScript struct npc_preparations_for_war_vehicle : public NullCreatureAI
{ {
public: npc_preparations_for_war_vehicle(Creature* creature) : NullCreatureAI(creature) { }
npc_preparations_for_war_vehicle() : CreatureScript("npc_preparations_for_war_vehicle") { }
struct npc_preparations_for_war_vehicleAI : public NullCreatureAI
{
npc_preparations_for_war_vehicleAI(Creature* creature) : NullCreatureAI(creature)
{
}
uint8 pointId; uint8 pointId;
uint32 searchForShipTimer; uint32 searchForShipTimer;
@@ -139,12 +132,6 @@ public:
} }
} }
} }
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_preparations_for_war_vehicleAI(creature);
}
}; };
/******************************************************* /*******************************************************
@@ -164,14 +151,9 @@ enum NPCs
NPC_WARMAGE_ILSUDRIA = 32372 NPC_WARMAGE_ILSUDRIA = 32372
}; };
class npc_warmage_violetstand : public CreatureScript struct npc_warmage_violetstand : public ScriptedAI
{ {
public: npc_warmage_violetstand(Creature* creature) : ScriptedAI(creature)
npc_warmage_violetstand() : CreatureScript("npc_warmage_violetstand") { }
struct npc_warmage_violetstandAI : public ScriptedAI
{
npc_warmage_violetstandAI(Creature* creature) : ScriptedAI(creature)
{ {
SetCombatMovement(false); SetCombatMovement(false);
} }
@@ -220,16 +202,10 @@ public:
if (Creature* pOrb = ObjectAccessor::GetCreature(*me, targetGUID)) if (Creature* pOrb = ObjectAccessor::GetCreature(*me, targetGUID))
DoCast(pOrb, SPELL_TRANSITUS_SHIELD_BEAM); DoCast(pOrb, SPELL_TRANSITUS_SHIELD_BEAM);
} }
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_warmage_violetstandAI(creature);
}
}; };
void AddSC_crystalsong_forest() void AddSC_crystalsong_forest()
{ {
new npc_preparations_for_war_vehicle(); RegisterCreatureAI(npc_preparations_for_war_vehicle);
new npc_warmage_violetstand(); RegisterCreatureAI(npc_warmage_violetstand);
} }