From 7c509e465ff45ae69447bfe2256746276b71ad38 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Mon, 22 Dec 2008 21:04:46 +0100 Subject: *Add support for quest 9212 - patch provided by Lighguard --HG-- branch : trunk --- sql/updates/583_world_scripts.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/583_world_scripts.sql (limited to 'sql') diff --git a/sql/updates/583_world_scripts.sql b/sql/updates/583_world_scripts.sql new file mode 100644 index 00000000000..45f8d80a244 --- /dev/null +++ b/sql/updates/583_world_scripts.sql @@ -0,0 +1 @@ +UPDATE creature_template SET Scriptname='npc_ranger_lilatha' WHERE entry=16295; \ No newline at end of file -- cgit v1.2.3 From 5313601ea60bc00eaf484dd642230b6182460433 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Mon, 22 Dec 2008 21:20:04 +0100 Subject: *Add support for quest 1819 - by Anubisss --HG-- branch : trunk --- sql/updates/586_world_scripts.sql | 2 + .../zone/tirisfal_glades/tirisfal_glades.cpp | 74 +++++++++++++++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 sql/updates/586_world_scripts.sql (limited to 'sql') diff --git a/sql/updates/586_world_scripts.sql b/sql/updates/586_world_scripts.sql new file mode 100644 index 00000000000..a86cec4951b --- /dev/null +++ b/sql/updates/586_world_scripts.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject_template` SET `ScriptName` = 'go_mausoleum_trigger' WHERE `entry` = 104593; +UPDATE `gameobject_template` SET `ScriptName` = 'go_mausoleum_door' WHERE `entry` = 176594; \ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp b/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp index d037b2b7e14..9f2a8e6d30e 100644 --- a/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp +++ b/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp @@ -17,12 +17,14 @@ /* ScriptData SDName: Tirisfal_Glades SD%Complete: 100 -SDComment: Quest support: 590 +SDComment: Quest support: 590, 1819 SDCategory: Tirisfal Glades EndScriptData */ /* ContentData npc_calvin_montague +go_mausoleum_door +go_mausoleum_trigger EndContentData */ #include "precompiled.h" @@ -76,6 +78,66 @@ bool QuestAccept_npc_calvin_montague(Player* player, Creature* creature, Quest c return true; } +/*###### +## go_mausoleum_door +## go_mausoleum_trigger +######*/ + +#define QUEST_ULAG 1819 +#define C_ULAG 6390 +#define GO_TRIGGER 104593 +#define GO_DOOR 176594 + +GameObject* SearchMausoleumGo(Unit *source, uint32 entry, float range) +{ + GameObject* pGo = NULL; + + CellPair pair(Trinity::ComputeCellPair(source->GetPositionX(), source->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + Trinity::NearestGameObjectEntryInObjectRangeCheck go_check(*source, entry, range); + Trinity::GameObjectLastSearcher searcher(pGo, go_check); + + TypeContainerVisitor, GridTypeMapContainer> go_searcher(searcher); + + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, go_searcher,*(source->GetMap())); + + return pGo; +} + +bool GOHello_go_mausoleum_door(Player *player, GameObject* _GO) +{ + if (player->GetQuestStatus(QUEST_ULAG) != QUEST_STATUS_INCOMPLETE) + return false; + + if (GameObject *trigger = SearchMausoleumGo(player, GO_TRIGGER, 30)) + { + trigger->SetGoState(1); + player->SummonCreature(C_ULAG, 2390.26, 336.47, 40.01, 2.26, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + return false; + } + + return false; +} + +bool GOHello_go_mausoleum_trigger(Player *player, GameObject* _GO) +{ + if (player->GetQuestStatus(QUEST_ULAG) != QUEST_STATUS_INCOMPLETE) + return false; + + if (GameObject *door = SearchMausoleumGo(player, GO_DOOR, 30)) + { + _GO->SetGoState(0); + door->RemoveFlag(GAMEOBJECT_FLAGS,GO_FLAG_INTERACT_COND); + return true; + } + + return false; +} + void AddSC_tirisfal_glades() { Script *newscript; @@ -84,5 +146,15 @@ void AddSC_tirisfal_glades() newscript->Name="npc_calvin_montague"; newscript->GetAI = GetAI_npc_calvin_montague; newscript->pQuestAccept = &QuestAccept_npc_calvin_montague; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_mausoleum_door"; + newscript->pGOHello = &GOHello_go_mausoleum_door; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_mausoleum_trigger"; + newscript->pGOHello = &GOHello_go_mausoleum_trigger; newscript->RegisterSelf(); } -- cgit v1.2.3 From 8668244a6d57bb04aaebeda13f87547cabe20efc Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Mon, 22 Dec 2008 22:05:04 +0100 Subject: *Missed a row change and added missing sql --HG-- branch : trunk --- sql/updates/588_world.sql | 7 +++++++ src/game/Level3.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 sql/updates/588_world.sql (limited to 'sql') diff --git a/sql/updates/588_world.sql b/sql/updates/588_world.sql new file mode 100644 index 00000000000..e85a034f344 --- /dev/null +++ b/sql/updates/588_world.sql @@ -0,0 +1,7 @@ +DELETE FROM `trinity_string`WHERE `entry` in ('6613', '6614', '6615'); +INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES ('6613','|cfff00000[GM Announcement]: %s|r'); +INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES ('6614','Notification to GM\'s - '); +INSERT INTO `trinity_string` (`entry`,`content_default`) VALUES ('6615','|cffffff00[|c1f40af20GM Announce by|r |cffff0000%s|cffffff00]:|r %s|r'); +INSERT INTO `command` (`name`,`security`,`help`) VALUES ('gmnotify', 2, 'Syntax: .gmnotify $notification\r\nDisplays a notification on the screen of all online GM\'s.'); +INSERT INTO `command` (`name`,`security`,`help`) VALUES ('gmnameannounce', 2, 'Syntax: .gmnameannounce $announcement.\r\nSend an announcement to all online GM\'s, displaying the name of the sender.'); +INSERT INTO `command` (`name`,`security`,`help`) VALUES ('gmannounce', 4, 'Syntax: .gmannounce $announcement\r\nSend an announcement to online Gamemasters.'); \ No newline at end of file diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index f8bcce11608..c507df4c858 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -558,7 +558,7 @@ bool ChatHandler::HandleReloadWpScriptsCommand(const char* arg) objmgr.LoadWaypointScripts(); if(*arg!='a') - SendGlobalSysMessage("DB table `waypoint_scripts` reloaded."); + SendGlobalGMSysMessage("DB table `waypoint_scripts` reloaded."); return true; } -- cgit v1.2.3