mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
refactor(Scripts/Areatrigger): Move Scholazar Waygate script to SAI (#18054)
* refactor(Scripts/Areatrigger): Move Scholazar Waygate script to SAI * Update rev_1703449890835634600.sql
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
--
|
||||
DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5046, 5047);
|
||||
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
|
||||
(5046, 'SmartTrigger'),
|
||||
(5047, 'SmartTrigger');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5046) AND (`source_type` = 2) AND (`id` IN (0));
|
||||
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
|
||||
(5046, 2, 0, 0, 46, 0, 100, 0, 5046, 0, 0, 0, 0, 0, 134, 52056, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Cast \'Sholazar to Un`goro Teleport\'');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5047) AND (`source_type` = 2) AND (`id` IN (0));
|
||||
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
|
||||
(5047, 2, 0, 0, 46, 0, 100, 0, 5047, 0, 0, 0, 0, 0, 134, 52057, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Cast \'Un`goro to Sholazar Teleport\'');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=1 AND `SourceEntry` IN (5046, 5047) AND `SourceId`=2;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(22, 1, 5046, 2, 0, 36, 0, 0, 0, 0, 0, 0, 0, '', 'Player must be alive'),
|
||||
(22, 1, 5046, 2, 0, 14, 0, 13956, 0, 0, 1, 0, 0, '', 'Cast Teleport to Un\'goro if Meeting a Great One (13956) status is not none.'),
|
||||
(22, 1, 5046, 2, 1, 36, 0, 0, 0, 0, 0, 0, 0, '', 'Player must be alive'),
|
||||
(22, 1, 5046, 2, 1, 8, 0, 12613, 0, 0, 0, 0, 0, '', 'Cast Teleport to Un\'goro if The Makers Overlook (12613) has been rewarded.'),
|
||||
(22, 1, 5046, 2, 1, 8, 0, 12559, 0, 0, 0, 0, 0, '', 'Cast Teleport to Un\'goro if The Makers Perch (12559) has been rewarded.');
|
||||
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(22, 1, 5047, 2, 0, 36, 0, 0, 0, 0, 0, 0, 0, '', 'Player must be alive'),
|
||||
(22, 1, 5047, 2, 0, 14, 0, 13956, 0, 0, 1, 0, 0, '', 'Cast Teleport to Sholazar if Meeting a Great One (13956) status is not none.'),
|
||||
(22, 1, 5047, 2, 1, 36, 0, 0, 0, 0, 0, 0, 0, '', 'Player must be alive'),
|
||||
(22, 1, 5047, 2, 1, 8, 0, 12613, 0, 0, 0, 0, 0, '', 'Cast Teleport to Sholazar if The Makers Overlook (12613) has been rewarded.'),
|
||||
(22, 1, 5047, 2, 1, 8, 0, 12559, 0, 0, 0, 0, 0, '', 'Cast Teleport to Sholazar if The Makers Perch (12559) has been rewarded.');
|
||||
@@ -245,49 +245,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## at_sholazar_waygate
|
||||
######*/
|
||||
|
||||
enum Waygate
|
||||
{
|
||||
SPELL_SHOLAZAR_TO_UNGORO_TELEPORT = 52056,
|
||||
SPELL_UNGORO_TO_SHOLAZAR_TELEPORT = 52057,
|
||||
|
||||
AT_SHOLAZAR = 5046,
|
||||
AT_UNGORO = 5047,
|
||||
|
||||
QUEST_THE_MAKERS_OVERLOOK = 12613,
|
||||
QUEST_THE_MAKERS_PERCH = 12559,
|
||||
QUEST_MEETING_A_GREAT_ONE = 13956,
|
||||
};
|
||||
|
||||
class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
AreaTrigger_at_sholazar_waygate() : AreaTriggerScript("at_sholazar_waygate") { }
|
||||
|
||||
bool OnTrigger(Player* player, AreaTrigger const* trigger) override
|
||||
{
|
||||
if (!player->isDead() && (player->GetQuestStatus(QUEST_MEETING_A_GREAT_ONE) != QUEST_STATUS_NONE ||
|
||||
(player->GetQuestStatus(QUEST_THE_MAKERS_OVERLOOK) == QUEST_STATUS_REWARDED && player->GetQuestStatus(QUEST_THE_MAKERS_PERCH) == QUEST_STATUS_REWARDED)))
|
||||
{
|
||||
switch (trigger->entry)
|
||||
{
|
||||
case AT_SHOLAZAR:
|
||||
player->CastSpell(player, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, true);
|
||||
break;
|
||||
|
||||
case AT_UNGORO:
|
||||
player->CastSpell(player, SPELL_UNGORO_TO_SHOLAZAR_TELEPORT, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## at_nats_landing
|
||||
######*/
|
||||
@@ -490,7 +447,6 @@ void AddSC_areatrigger_scripts()
|
||||
new AreaTrigger_at_stormwright_shelf();
|
||||
new AreaTrigger_at_scent_larkorwi();
|
||||
new AreaTrigger_at_last_rites();
|
||||
new AreaTrigger_at_sholazar_waygate();
|
||||
new AreaTrigger_at_nats_landing();
|
||||
new AreaTrigger_at_sentry_point();
|
||||
new AreaTrigger_at_brewfest();
|
||||
|
||||
Reference in New Issue
Block a user