mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/scripts: Add generic script to prevent cannon movement.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- Add Generic Harpoon gun script to prevent movement
|
||||
UPDATE `creature_template` SET `ScriptName`= 'npc_generic_harpoon_cannon' WHERE `entry` IN (27714,30066,30337);
|
||||
@@ -2988,6 +2988,32 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_generic_harpoon_cannon
|
||||
######*/
|
||||
|
||||
class npc_generic_harpoon_cannon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_generic_harpoon_cannon() : CreatureScript("npc_generic_harpoon_cannon") { }
|
||||
|
||||
struct npc_generic_harpoon_cannonAI : public ScriptedAI
|
||||
{
|
||||
npc_generic_harpoon_cannonAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_ROOT);
|
||||
me->SetExtraUnitMovementFlags(MOVEMENTFLAG2_NO_STRAFE | MOVEMENTFLAG2_NO_JUMPING | MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_generic_harpoon_cannonAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_npcs_special()
|
||||
{
|
||||
new npc_air_force_bots();
|
||||
@@ -3020,4 +3046,5 @@ void AddSC_npcs_special()
|
||||
new npc_earth_elemental();
|
||||
new npc_firework();
|
||||
new npc_spring_rabbit();
|
||||
new npc_generic_harpoon_cannon();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user