mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 16:26:08 +00:00
fix(Scripts/SlavePens): Added waypoint movement to Quagmirran. (#15582)
* fix(Scripts/SlavePens): Added waypoint movement to Quagmirran. Fixes #8559 * buildfix.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
--
|
||||
DELETE FROM `areatrigger_scripts` WHERE `entry`=4295;
|
||||
INSERT INTO `areatrigger_scripts` VALUES
|
||||
(4295,'at_quagmirran_lair');
|
||||
|
||||
-- Pathing for Quagmirran Entry: 17942
|
||||
SET @PATH := 1794200;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-272.12997,-671.50586,8.970236,NULL,0,0,0,100,0),
|
||||
(@PATH,2,-261.6143,-675.77155,10.541557,NULL,0,0,0,100,0),
|
||||
(@PATH,3,-246.73248,-683.1629,15.529007,NULL,0,0,0,100,0),
|
||||
(@PATH,4,-238.07864,-686.42316,18.473059,NULL,0,0,0,100,0),
|
||||
(@PATH,5,-227.73457,-690.909,22.025816,NULL,0,0,0,100,0),
|
||||
(@PATH,6,-217.95325,-695.7503,26.769361,NULL,0,0,0,100,0),
|
||||
(@PATH,7,-204.01328,-702.2695,37.230885,NULL,0,0,0,100,0),
|
||||
(@PATH,8,-199.49352,-705.59766,37.802734,NULL,0,0,0,100,0);
|
||||
@@ -28,6 +28,11 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "the_slave_pens.h"
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ NPC_QUAGMIRRAN, DATA_QUAGMIRRAN }
|
||||
};
|
||||
|
||||
class instance_the_slave_pens : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -38,6 +43,7 @@ public:
|
||||
instance_the_slave_pens_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
counter = DATA_FLAMECALLER_000;
|
||||
}
|
||||
|
||||
@@ -82,6 +88,8 @@ public:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
InstanceScript::OnCreatureCreate(creature);
|
||||
}
|
||||
|
||||
void SetGuidData(uint32 data, ObjectGuid guid) override
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by the
|
||||
* Free Software Foundation; either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "the_slave_pens.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
class at_quagmirran_lair : public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
at_quagmirran_lair() : AreaTriggerScript("at_quagmirran_lair") {}
|
||||
|
||||
bool OnTrigger(Player* player, AreaTrigger const* /*trigger*/) override
|
||||
{
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
{
|
||||
if (Creature* quagmirran = instance->GetCreature(DATA_QUAGMIRRAN))
|
||||
{
|
||||
quagmirran->GetMotionMaster()->MovePath(quagmirran->GetEntry() * 100, true);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_the_slave_pens()
|
||||
{
|
||||
new at_quagmirran_lair();
|
||||
}
|
||||
@@ -64,7 +64,8 @@ enum SPCreaturesIds
|
||||
NPC_SHAMAN_BEAM_BUNNY_001 = 25965,
|
||||
NPC_SHAMAN_BEAM_BUNNY_002 = 25966,
|
||||
NPC_WHISP_DEST_BUNNY = 26120,
|
||||
NPC_WHISP_SOURCE_BUNNY = 26121
|
||||
NPC_WHISP_SOURCE_BUNNY = 26121,
|
||||
NPC_QUAGMIRRAN = 17942
|
||||
};
|
||||
|
||||
enum SPGameObjectIds
|
||||
|
||||
@@ -56,6 +56,7 @@ void AddSC_boss_hungarfen();
|
||||
void AddSC_boss_ghazan();
|
||||
void AddSC_boss_the_black_stalker();
|
||||
void AddSC_instance_the_underbog();
|
||||
void AddSC_the_slave_pens(); // The Slave Pens
|
||||
void AddSC_boss_ahune();
|
||||
void AddSC_instance_the_slave_pens();
|
||||
void AddSC_boss_gruul(); //Gruul's Lair
|
||||
@@ -153,6 +154,7 @@ void AddOutlandScripts()
|
||||
AddSC_boss_ghazan();
|
||||
AddSC_boss_the_black_stalker();
|
||||
AddSC_instance_the_underbog();
|
||||
AddSC_the_slave_pens(); // The Slave Pens
|
||||
AddSC_boss_ahune();
|
||||
AddSC_instance_the_slave_pens();
|
||||
AddSC_boss_gruul(); //Gruul's Lair
|
||||
|
||||
Reference in New Issue
Block a user