Skip to content

Commit

Permalink
Scripts/Sholazar Basin: Add support for areatrigger conditions for Qu…
Browse files Browse the repository at this point in the history
…est: The Etymidian (12548)

Closes #896
Closes #1638
  • Loading branch information
crackm authored and tobmaps committed Jul 23, 2011
1 parent 57c042e commit d06d174
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sql/scripts/world_scripts_full.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(1738, 'at_scent_larkorwi'),
(1739, 'at_scent_larkorwi'),
(1740, 'at_scent_larkorwi'),
(5046, 'at_sholazar_waygate'),
(5047, 'at_sholazar_waygate'),
(5369, 'at_RX_214_repair_o_matic_station'),
(5423, 'at_RX_214_repair_o_matic_station'),
(5633, 'at_tyrannus_event_starter'),
Expand Down
4 changes: 4 additions & 0 deletions sql/updates/world/2011_07_23_00_world_areatrigger_scripts.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5046,5047);
INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(5046,'at_sholazar_waygate'),
(5047,'at_sholazar_waygate');
44 changes: 44 additions & 0 deletions src/server/scripts/World/areatrigger_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ at_warsong_grainery
at_torp_farm
at_warsong_farms q11686
at_stormwright_shelf q12741
at_last_rites q12019
at_sholozar_waygate q12548

This comment has been minimized.

Copy link
@horn

horn Jul 23, 2011

Contributor

at_sholazar_waygate :) and line 331 again

EndContentData */

#include "ScriptPCH.h"
Expand Down Expand Up @@ -325,6 +327,47 @@ class AreaTrigger_at_last_rites : public AreaTriggerScript
}
};

/*######
## at_sholozar_waygate
######*/

enum eWaygate
{
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,
};

class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript
{
public:

AreaTrigger_at_sholazar_waygate()
: AreaTriggerScript("at_sholazar_waygate")
{
}

bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
{
if (player->GetQuestStatus(QUEST_THE_MAKERS_OVERLOOK) == QUEST_STATUS_REWARDED && !player->isDead() &&
player->GetQuestStatus(QUEST_THE_MAKERS_PERCH) == QUEST_STATUS_REWARDED)
{
switch(trigger->id)
{
case AT_SHOLAZAR: player->CastSpell(player, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, false); break;
case AT_UNGORO: player->CastSpell(player, SPELL_UNGORO_TO_SHOLAZAR_TELEPORT, false); break;
}
}

return false;
}
};

void AddSC_areatrigger_scripts()
{
new AreaTrigger_at_aldurthar_gate();
Expand All @@ -335,4 +378,5 @@ void AddSC_areatrigger_scripts()
new AreaTrigger_at_stormwright_shelf();
new AreaTrigger_at_scent_larkorwi();
new AreaTrigger_at_last_rites();
new AreaTrigger_at_sholazar_waygate();
}

0 comments on commit d06d174

Please sign in to comment.