fix(Scripts/TerokkarForest): fix behaviour of skull piles in Skettis (#18371)

* initial

* fix

* include ancient skull pile

* fix

* fix with debug

* finalise
This commit is contained in:
Dan
2024-02-21 07:41:06 +01:00
committed by GitHub
parent 151aafa2d8
commit 7e80d8e6bb
2 changed files with 23 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
--
UPDATE `gameobject` SET `spawntimesecs` = 300 WHERE `id` = 185913 AND `guid` IN (14146, 14147, 14217, 14227, 14694, 14731, 14989);
UPDATE `gameobject` SET `spawntimesecs` = 900 WHERE `id` = 185928 AND `guid` = 14141;
DELETE FROM `smart_scripts` WHERE `entryorguid` = 185928 AND `source_type` = 1;
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
(185928, 1, 0, 1, 62, 0, 100, 0, 8687, 1, 0, 0, 0, 0, 134, 41004, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Terokk summon'),
(185928, 1, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Terokk summon - linked close gossip'),
(185928, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 900, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Terokk summon - despawn');

View File

@@ -632,24 +632,33 @@ public:
return true;
}
void SendActionMenu(Player* player, GameObject* /*go*/, uint32 action)
void SendActionMenu(Player* player, GameObject* go, uint32 action)
{
switch (action)
{
case GOSSIP_ACTION_INFO_DEF + 1:
player->CastSpell(player, SPELL_SUMMON_GEZZARAK_THE_HUNTRESS, false);
_result = player->CastSpell(player, SPELL_SUMMON_GEZZARAK_THE_HUNTRESS, false);
break;
case GOSSIP_ACTION_INFO_DEF + 2:
player->CastSpell(player, SPELL_SUMMON_DARKSCREECHER_AKKARAI, false);
_result = player->CastSpell(player, SPELL_SUMMON_DARKSCREECHER_AKKARAI, false);
break;
case GOSSIP_ACTION_INFO_DEF + 3:
player->CastSpell(player, SPELL_SUMMON_KARROG, false);
_result = player->CastSpell(player, SPELL_SUMMON_KARROG, false);
break;
case GOSSIP_ACTION_INFO_DEF + 4:
player->CastSpell(player, SPELL_SUMMON_VAKKIZ_THE_WINDRAGER, false);
_result = player->CastSpell(player, SPELL_SUMMON_VAKKIZ_THE_WINDRAGER, false);
break;
default:
_result = SPELL_CAST_OK;
break;
}
if (_result == SPELL_CAST_OK)
{
go->DespawnOrUnsummon();
}
}
private:
SpellCastResult _result;
};
/*######