mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 11:33:48 +00:00
fix(Scripts/Icecrown): Don't despawn Tirion's Gambit NPCs prematurely (#24337)
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_summon_groups` SET `summonType` = 6, `summonTime` = 60000 WHERE `summonerId` = 32239 AND `summonerType` = 0 AND `groupId` = 1;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 32312);
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(32312, 0, 0, 0, 0, 0, 100, 0, 3000, 4000, 10000, 10000, 0, 0, 11, 58843, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - In Combat - Cast \'Plague Strike\''),
|
||||||
|
(32312, 0, 1, 0, 0, 0, 100, 0, 7000, 8000, 10000, 10000, 0, 0, 11, 59011, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - In Combat - Cast \'Icy Touch\''),
|
||||||
|
(32312, 0, 2, 0, 1, 0, 100, 512, 3600, 3600, 3600, 3600, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 32239, 20, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - Out of Combat - Set Data 1 1');
|
||||||
@@ -681,23 +681,28 @@ public:
|
|||||||
|
|
||||||
struct npc_tirions_gambit_tirionAI : npc_escortAI
|
struct npc_tirions_gambit_tirionAI : npc_escortAI
|
||||||
{
|
{
|
||||||
npc_tirions_gambit_tirionAI(Creature* creature) : npc_escortAI(creature), summons(me)
|
npc_tirions_gambit_tirionAI(Creature* creature) : npc_escortAI(creature), summons(me), _eventOver(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
EventMap events;
|
EventMap events;
|
||||||
SummonList summons;
|
SummonList summons;
|
||||||
|
bool _eventOver;
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
me->setActive(false);
|
me->setActive(false);
|
||||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
|
_eventOver = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetData(uint32 type, uint32 data) override
|
void SetData(uint32 type, uint32 data) override
|
||||||
{
|
{
|
||||||
if (type == 1 && data == 1)
|
if (type == 1 && data == 1 && !_eventOver)
|
||||||
|
{
|
||||||
events.ScheduleEvent(EVENT_SCENE_0 + 30, 10s);
|
events.ScheduleEvent(EVENT_SCENE_0 + 30, 10s);
|
||||||
|
_eventOver = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(int32 param) override
|
void DoAction(int32 param) override
|
||||||
@@ -747,7 +752,7 @@ public:
|
|||||||
switch (pointId)
|
switch (pointId)
|
||||||
{
|
{
|
||||||
case 6:
|
case 6:
|
||||||
me->SummonCreature(NPC_INVOKER_BASALEPH, 6130.26f, 2764.83f, 573.92f, 5.19f, TEMPSUMMON_TIMED_DESPAWN, 10 * MINUTE * IN_MILLISECONDS);
|
me->SummonCreature(NPC_INVOKER_BASALEPH, 6130.26f, 2764.83f, 573.92f, 5.19f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||||
Talk(1);
|
Talk(1);
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
@@ -812,9 +817,9 @@ public:
|
|||||||
Talk(2);
|
Talk(2);
|
||||||
DoSummonAction(NPC_DISGUISED_CRUSADER, ACTION_SUMMON_ORIENTATION, 200);
|
DoSummonAction(NPC_DISGUISED_CRUSADER, ACTION_SUMMON_ORIENTATION, 200);
|
||||||
|
|
||||||
me->SummonCreature(NPC_CHOSEN_ZEALOT, 6160.74f, 2695.90f, 573.92f, 2.04f, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS);
|
me->SummonCreature(NPC_CHOSEN_ZEALOT, 6160.74f, 2695.90f, 573.92f, 2.04f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||||
me->SummonCreature(NPC_CHOSEN_ZEALOT, 6164.98f, 2697.90f, 573.92f, 2.04f, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS);
|
me->SummonCreature(NPC_CHOSEN_ZEALOT, 6164.98f, 2697.90f, 573.92f, 2.04f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||||
me->SummonCreature(NPC_CHOSEN_ZEALOT, 6161.26f, 2700.05f, 573.92f, 2.04f, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS);
|
me->SummonCreature(NPC_CHOSEN_ZEALOT, 6161.26f, 2700.05f, 573.92f, 2.04f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000);
|
||||||
|
|
||||||
DoSummonAction(NPC_CHOSEN_ZEALOT, ACTION_SUMMON_MOVE_STRAIGHT, 27);
|
DoSummonAction(NPC_CHOSEN_ZEALOT, ACTION_SUMMON_MOVE_STRAIGHT, 27);
|
||||||
events.ScheduleEvent(EVENT_SCENE_0, 30s);
|
events.ScheduleEvent(EVENT_SCENE_0, 30s);
|
||||||
@@ -835,7 +840,7 @@ public:
|
|||||||
break;
|
break;
|
||||||
case EVENT_SCENE_0+3:
|
case EVENT_SCENE_0+3:
|
||||||
Talk(3);
|
Talk(3);
|
||||||
if (Creature* cr = me->SummonCreature(NPC_TIRION_LICH_KING, 6161.26f, 2700.05f, 573.92f, 2.04f, TEMPSUMMON_TIMED_DESPAWN, 5 * MINUTE * IN_MILLISECONDS))
|
if (Creature* cr = me->SummonCreature(NPC_TIRION_LICH_KING, 6161.26f, 2700.05f, 573.92f, 2.04f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000))
|
||||||
cr->GetMotionMaster()->MovePoint(2, 6131.93f, 2756.84f, 573.92f);
|
cr->GetMotionMaster()->MovePoint(2, 6131.93f, 2756.84f, 573.92f);
|
||||||
events.ScheduleEvent(EVENT_SCENE_0 + 4, 4s);
|
events.ScheduleEvent(EVENT_SCENE_0 + 4, 4s);
|
||||||
break;
|
break;
|
||||||
@@ -976,7 +981,6 @@ public:
|
|||||||
if (target)
|
if (target)
|
||||||
(*itr)->AI()->AttackStart(target);
|
(*itr)->AI()->AttackStart(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EVENT_SCENE_0+30:
|
case EVENT_SCENE_0+30:
|
||||||
|
|||||||
Reference in New Issue
Block a user