diff options
-rw-r--r-- | sql/FULL/world_scripts_full.sql | 8 | ||||
-rw-r--r-- | sql/updates/7988_world_scriptname.sql | 6 | ||||
-rw-r--r-- | src/scripts/world/areatrigger_scripts.cpp | 42 |
3 files changed, 54 insertions, 2 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 968e03bd0c5..dda34db4d11 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -7,7 +7,7 @@ UPDATE `creature_template` SET `ScriptName`=''; UPDATE `gameobject_template` SET `ScriptName`=''; /* AREA TRIGGERS */ -DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5284,5285,5286,5287,4871,4872,4873,5108); +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5284,5285,5286,5287,4871,4872,4873,5108,5332,5338,5334,5340); INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES (5284, 'at_aldurthar_gate'), (5285, 'at_aldurthar_gate'), @@ -16,7 +16,11 @@ INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES (4871, 'at_warsong_farms'), (4872, 'at_warsong_farms'), (4873, 'at_warsong_farms'), -(5108, 'at_stormwright_shelf'); +(5108, 'at_stormwright_shelf'), +(5332,'at_last_rites'), +(5338,'at_last_rites'), +(5334,'at_last_rites'), +(5340,'at_last_rites'); /* WORLD BOSS */ UPDATE `creature_template` SET `ScriptName`='boss_ysondre' WHERE `entry`=14887; diff --git a/sql/updates/7988_world_scriptname.sql b/sql/updates/7988_world_scriptname.sql new file mode 100644 index 00000000000..1b90f914ea0 --- /dev/null +++ b/sql/updates/7988_world_scriptname.sql @@ -0,0 +1,6 @@ +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5332,5338,5334,5340); +INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES +(5332,'at_last_rites'), +(5338,'at_last_rites'), +(5334,'at_last_rites'), +(5340,'at_last_rites'); diff --git a/src/scripts/world/areatrigger_scripts.cpp b/src/scripts/world/areatrigger_scripts.cpp index 87253e8c181..a6d5de41c2e 100644 --- a/src/scripts/world/areatrigger_scripts.cpp +++ b/src/scripts/world/areatrigger_scripts.cpp @@ -181,6 +181,43 @@ bool AreaTrigger_at_stormwright_shelf(Player* pPlayer, const AreaTriggerEntry* / return true; } +/*##### +## at_last_rites +#####*/ + +enum eAtLastRites +{ + QUEST_LAST_RITES = 12019 +}; + +bool AreaTrigger_at_last_rites(Player* pPlayer, const AreaTriggerEntry* pAt) +{ + if (pPlayer->GetQuestStatus(QUEST_LAST_RITES) != QUEST_STATUS_INCOMPLETE) + return false; + + WorldLocation pPosition; + + switch(pAt->id) + { + case 5332: + case 5338: + pPosition = WorldLocation(571,3733.68,3563.25,290.812,3.665192); + break; + case 5334: + pPosition = WorldLocation(571,3802.38,3585.95,49.5765,0); + break; + case 5340: + pPosition = WorldLocation(571,3687.91,3577.28,473.342,0); + break; + default: + return false; + } + + pPlayer->TeleportTo(pPosition); + + return false; +} + void AddSC_areatrigger_scripts() { Script* newscript; @@ -214,4 +251,9 @@ void AddSC_areatrigger_scripts() newscript->Name = "at_stormwright_shelf"; newscript->pAreaTrigger = &AreaTrigger_at_stormwright_shelf; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_last_rites"; + newscript->pAreaTrigger = &AreaTrigger_at_last_rites; + newscript->RegisterSelf(); } |