From 234e1e5668aa658af4edddc2ef9271900318f99c Mon Sep 17 00:00:00 2001 From: Chaz Brown Date: Mon, 27 Jul 2009 06:49:25 -0400 Subject: [PATCH 1/3] Fix CRLF in two files --HG-- branch : trunk --- sql/updates/4602_world_spell_bonus_data.txt | 12 +-- sql/updates/4603_world_tmp.txt | 106 ++++++++++---------- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/sql/updates/4602_world_spell_bonus_data.txt b/sql/updates/4602_world_spell_bonus_data.txt index 6e39d948f3..85975accd3 100644 --- a/sql/updates/4602_world_spell_bonus_data.txt +++ b/sql/updates/4602_world_spell_bonus_data.txt @@ -1,7 +1,7 @@ -DELETE FROM `spell_bonus_data` WHERE `entry`=779; -INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES -('779', '-1', '-1', '0.063', '-1', 'Druid - Swipe (Bear)'); - -DELETE FROM `spell_bonus_data` WHERE `entry`=50256; -INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES +DELETE FROM `spell_bonus_data` WHERE `entry`=779; +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES +('779', '-1', '-1', '0.063', '-1', 'Druid - Swipe (Bear)'); + +DELETE FROM `spell_bonus_data` WHERE `entry`=50256; +INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES (50256, -1, -1, 0.08, -1, 'Pet Skills - Bear (Swipe)'); \ No newline at end of file diff --git a/sql/updates/4603_world_tmp.txt b/sql/updates/4603_world_tmp.txt index 222a8efa78..4ce1593c9c 100644 --- a/sql/updates/4603_world_tmp.txt +++ b/sql/updates/4603_world_tmp.txt @@ -1,54 +1,54 @@ -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=11898; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=11899; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=149045; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=149046; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=164871; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=175080; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176080; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176081; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176082; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176083; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176084; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176085; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176086; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176231; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176244; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176310; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176495; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=177233; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=181056; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=181646; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183169; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183177; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183202; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183203; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183407; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183490; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183788; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=184330; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20649; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20650; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20651; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20652; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20653; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20654; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20655; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20656; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20657; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20808; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=210335; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=210336; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=210349; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211023; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211024; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211050; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211051; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211052; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211053; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=4170; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=4171; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=47296; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=47297; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=80022; -UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=80023; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=11898; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=11899; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=149045; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=149046; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=164871; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=175080; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176080; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176081; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176082; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176083; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176084; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176085; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176086; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176231; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176244; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176310; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=176495; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=177233; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=181056; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=181646; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183169; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183177; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183202; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183203; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183407; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183490; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=183788; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=184330; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20649; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20650; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20651; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20652; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20653; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20654; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20655; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20656; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20657; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=20808; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=210335; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=210336; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=210349; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211023; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211024; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211050; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211051; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211052; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=211053; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=4170; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=4171; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=47296; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=47297; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=80022; +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=80023; UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=85556; \ No newline at end of file From d418e351c187a4a476fd6a66236fa6ef0d579b64 Mon Sep 17 00:00:00 2001 From: Chaz Brown Date: Mon, 27 Jul 2009 06:50:58 -0400 Subject: [PATCH 2/3] Rename two files from .txt to .sql --HG-- branch : trunk rename : sql/updates/4602_world_spell_bonus_data.txt => sql/updates/4602_world_spell_bonus_data.sql rename : sql/updates/4603_world_tmp.txt => sql/updates/4603_world_tmp.sql --- ...world_spell_bonus_data.txt => 4602_world_spell_bonus_data.sql} | 0 sql/updates/{4603_world_tmp.txt => 4603_world_tmp.sql} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename sql/updates/{4602_world_spell_bonus_data.txt => 4602_world_spell_bonus_data.sql} (100%) rename sql/updates/{4603_world_tmp.txt => 4603_world_tmp.sql} (100%) diff --git a/sql/updates/4602_world_spell_bonus_data.txt b/sql/updates/4602_world_spell_bonus_data.sql similarity index 100% rename from sql/updates/4602_world_spell_bonus_data.txt rename to sql/updates/4602_world_spell_bonus_data.sql diff --git a/sql/updates/4603_world_tmp.txt b/sql/updates/4603_world_tmp.sql similarity index 100% rename from sql/updates/4603_world_tmp.txt rename to sql/updates/4603_world_tmp.sql From 0aa4879ecc5d044902647634177e9cc5d1e2efd3 Mon Sep 17 00:00:00 2001 From: Kudlaty Date: Mon, 27 Jul 2009 13:21:35 +0200 Subject: [PATCH 3/3] Script for quest 12570. Author: manuel --HG-- branch : trunk --- sql/FULL/world_script_texts.sql | 6 + sql/FULL/world_script_waypoints.sql | 32 ++++ sql/FULL/world_scripts_full.sql | 3 + sql/updates/4610_world_scripts.sql | 38 ++++ src/bindings/scripts/CMakeLists.txt | 1 + src/bindings/scripts/ScriptMgr.cpp | 6 + src/bindings/scripts/VC80/80ScriptDev2.vcproj | 4 + src/bindings/scripts/VC90/90ScriptDev2.vcproj | 4 + .../zone/sholazar_basin/sholazar_basin.cpp | 180 ++++++++++++++++++ 9 files changed, 274 insertions(+) create mode 100644 sql/updates/4610_world_scripts.sql create mode 100644 src/bindings/scripts/scripts/zone/sholazar_basin/sholazar_basin.cpp diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql index dd083aa1df..f707faae1c 100644 --- a/sql/FULL/world_script_texts.sql +++ b/sql/FULL/world_script_texts.sql @@ -1536,6 +1536,12 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content (-1568022, 'Da Amani gonna rule again!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12076, 1, 0, 0, 'nalorakk SAY_SLAY2'), (-1568023, 'I... be waitin'' on da udda side....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12077, 1, 0, 0, 'nalorakk SAY_DEATH'); +-- -1 571 000 SHOLAZAR BASIN +INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) +(-1571000, 'You save me! We thank you. We going to go back to village now. You come too... you can stay with us! Puppy-men kind of mean anyway. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_END_IRO'), +(-1571001, 'Let me know when you ready to go, okay?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_QUEST_ACCEPT_IRO '), +(-1571002, 'Home time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_START_IRO'); + -- -1 574 000 UTGARDE KEEP INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES (-1574000, 'Your blood is mine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13221, 1, 0, 0, 'keleseth SAY_AGGRO'), diff --git a/sql/FULL/world_script_waypoints.sql b/sql/FULL/world_script_waypoints.sql index 1b073b8f33..f6530b487e 100644 --- a/sql/FULL/world_script_waypoints.sql +++ b/sql/FULL/world_script_waypoints.sql @@ -719,4 +719,36 @@ INSERT INTO `script_waypoint` VALUES (2917, 41, 4671.924316, 599.752197, 16.01242, 5000, 'SAY_REM_REMEMBER'), (2917, 42, 4676.976074, 600.649780, 17.82566, 5000, 'EMOTE_REM_END'); +DELETE FROM `script_waypoint` WHERE `entry` = 28217; +INSERT INTO `script_waypoint` VALUES +(28217, 0, 5399.96,4509.07,-131.053, 0, ''), +(28217, 1, 5396.95,4514.84,-131.791, 0, ''), +(28217, 2, 5395.16,4524.06,-132.335, 0, ''), +(28217, 3, 5400.15,4526.84,-136.058, 0, ''), +(28217, 4, 5403.53,4527.2,-138.907, 0, ''), +(28217, 5, 5406.51,4527.47,-141.983, 0, ''), +(28217, 6, 5409.16,4526.37,-143.902, 0, ''), +(28217, 7, 5412.04,4523.05,-143.998, 0, ''), +(28217, 8, 5415.23,4521.19,-143.961, 0, ''), +(28217, 9, 5417.74,4519.74,-144.292, 0, ''), +(28217, 10, 5421.77,4519.79,-145.36, 0, ''), +(28217, 11, 5426.75,4520.53,-147.931, 0, ''), +(28217, 12, 5429.06,4521.82,-148.919, 0, ''), +(28217, 13, 5436.52,4534.63,-149.618, 0, ''), +(28217, 14, 5441.52,4542.23,-149.367, 0, ''), +(28217, 15, 5449.06,4553.47,-149.187, 0, ''), +(28217, 16, 5453.5,4565.61,-147.526, 0, ''), +(28217, 17, 5455.04,4578.6,-147.147, 0, ''), +(28217, 18, 5462.32,4591.69,-147.738,0, ''), +(28217, 19, 5470.04,4603.04,-146.044,0, ''), +(28217, 20, 5475.93,4608.86,-143.152, 0, ''), +(28217, 21, 5484.48,4613.78,-139.19, 0, ''), +(28217, 22, 5489.03,4616.56,-137.796, 0, ''), +(28217, 23, 5497.92,4629.89,-135.556, 0, ''), +(28217, 24, 5514.48,4638.82,-136.19, 0, ''), +(28217, 25, 5570,4654.5,-134.947, 0, ''), +(28217, 26, 5578.32,4653.29,-136.896, 0, ''), +(28217, 27, 5596.56,4642.26,-136.593, 0, ''), +(28217, 28, 5634.02,4600.35,-137.291,2000,''); + /* EOF */ diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 02b7159d57..fa184c16cb 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -814,6 +814,9 @@ UPDATE `creature_template` SET `ScriptName`='npc_dirty_larry' WHERE `entry`=1972 UPDATE `creature_template` SET `ScriptName`='npc_ishanah' WHERE `entry`=18538; UPDATE `creature_template` SET `ScriptName`='npc_khadgar' WHERE `entry`=18166; +/* Sholazar Basin */ +UPDATE `creature_template` SET `ScriptName`='npc_injured_rainspeaker_oracle' WHERE `entry`=28217; + /* SILITHUS */ UPDATE `creature_template` SET `ScriptName`='npcs_rutgar_and_frankal' WHERE `entry` IN (15170,15171); UPDATE `creature_template` SET `ScriptName`='npc_highlord_demitrian' WHERE `entry`=14347; diff --git a/sql/updates/4610_world_scripts.sql b/sql/updates/4610_world_scripts.sql new file mode 100644 index 0000000000..5195f12410 --- /dev/null +++ b/sql/updates/4610_world_scripts.sql @@ -0,0 +1,38 @@ +UPDATE `creature_template` SET `ScriptName`='npc_injured_rainspeaker_oracle' WHERE `entry`=28217; + +DELETE FROM `script_waypoint` WHERE `entry` = 28217; +INSERT INTO `script_waypoint` VALUES +(28217, 0, 5399.96,4509.07,-131.053, 0, ''), +(28217, 1, 5396.95,4514.84,-131.791, 0, ''), +(28217, 2, 5395.16,4524.06,-132.335, 0, ''), +(28217, 3, 5400.15,4526.84,-136.058, 0, ''), +(28217, 4, 5403.53,4527.2,-138.907, 0, ''), +(28217, 5, 5406.51,4527.47,-141.983, 0, ''), +(28217, 6, 5409.16,4526.37,-143.902, 0, ''), +(28217, 7, 5412.04,4523.05,-143.998, 0, ''), +(28217, 8, 5415.23,4521.19,-143.961, 0, ''), +(28217, 9, 5417.74,4519.74,-144.292, 0, ''), +(28217, 10, 5421.77,4519.79,-145.36, 0, ''), +(28217, 11, 5426.75,4520.53,-147.931, 0, ''), +(28217, 12, 5429.06,4521.82,-148.919, 0, ''), +(28217, 13, 5436.52,4534.63,-149.618, 0, ''), +(28217, 14, 5441.52,4542.23,-149.367, 0, ''), +(28217, 15, 5449.06,4553.47,-149.187, 0, ''), +(28217, 16, 5453.5,4565.61,-147.526, 0, ''), +(28217, 17, 5455.04,4578.6,-147.147, 0, ''), +(28217, 18, 5462.32,4591.69,-147.738,0, ''), +(28217, 19, 5470.04,4603.04,-146.044,0, ''), +(28217, 20, 5475.93,4608.86,-143.152, 0, ''), +(28217, 21, 5484.48,4613.78,-139.19, 0, ''), +(28217, 22, 5489.03,4616.56,-137.796, 0, ''), +(28217, 23, 5497.92,4629.89,-135.556, 0, ''), +(28217, 24, 5514.48,4638.82,-136.19, 0, ''), +(28217, 25, 5570,4654.5,-134.947, 0, ''), +(28217, 26, 5578.32,4653.29,-136.896, 0, ''), +(28217, 27, 5596.56,4642.26,-136.593, 0, ''), +(28217, 28, 5634.02,4600.35,-137.291,2000,''); + +INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) +(-1571000, 'You save me! We thank you. We going to go back to village now. You come too... you can stay with us! Puppy-men kind of mean anyway. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_END_IRO'), +(-1571001, 'Let me know when you ready to go, okay?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_QUEST_ACCEPT_IRO '), +(-1571002, 'Home time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_START_IRO'); diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 6fe9c0e1ec..dab90812b5 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -294,6 +294,7 @@ SET(trinityscript_LIB_SRCS scripts/zone/shadowmoon_valley/boss_doomwalker.cpp scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp scripts/zone/shattrath/shattrath_city.cpp + scripts/zone/sholazar_basin/sholazar_basin.cpp scripts/zone/silithus/silithus.cpp scripts/zone/silvermoon/silvermoon_city.cpp scripts/zone/silverpine_forest/silverpine_forest.cpp diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index f81edfdfb0..27835f8e23 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -476,6 +476,9 @@ extern void AddSC_shadowmoon_valley(); //Shattrath extern void AddSC_shattrath_city(); +//Sholazar Basin +extern void AddSC_sholazar_basin(); + //Silithus extern void AddSC_silithus(); @@ -1381,6 +1384,9 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf") //Shattrath AddSC_shattrath_city(); + //Sholazar Basin + AddSC_sholazar_basin(); + //Silithus AddSC_silithus(); diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 53a1624820..1ff051ed85 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -2457,6 +2457,10 @@ + + + + + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Sholazar_Basin +SD%Complete: 100 +SDComment: Quest support: 12570 +SDCategory: Sholazar_Basin +EndScriptData */ + +/* ContentData +npc_injured_rainspeaker_oracle +EndContentData */ + +#include "precompiled.h" +#include "../../npc/npc_escortAI.h" + +/*###### +## npc_injured_rainspeaker_oracle +######*/ + +#define GOSSIP_ITEM1 "I am ready to travel to your village now." + +enum +{ + SAY_START_IRO = -1571000, + SAY_QUEST_ACCEPT_IRO = -1571001, + SAY_END_IRO = -1571002, + + QUEST_FORTUNATE_MISUNDERSTANDINGS = 12570, + FACTION_ESCORTEE_A = 774, + FACTION_ESCORTEE_H = 775 +}; + +struct TRINITY_DLL_DECL npc_injured_rainspeaker_oracleAI : public npc_escortAI +{ + npc_injured_rainspeaker_oracleAI(Creature* c) : npc_escortAI(c) { c_guid = c->GetGUID(); } + + uint64 c_guid; + + void Reset() + { + me->RestoreFaction(); + // if we will have other way to assign this to only one npc remove this part + if(GUID_LOPART(me->GetGUID()) != 101030) + { + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + } + + void WaypointReached(uint32 i) + { + Player* player = Unit::GetPlayer(PlayerGUID); + + if(!player) + return; + + switch(i) + { + case 1: SetRun(); break; + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING); + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_JUMPING); + m_creature->SetSpeed(MOVE_SWIM, 0.85f, true); + m_creature->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING + MOVEMENTFLAG_LEVITATING); + break; + case 19: + m_creature->SetUnitMovementFlags(MOVEMENTFLAG_JUMPING); + break; + case 28: + if(Player* pPlayer = Unit::GetPlayer( PlayerGUID)) + player->GroupEventHappens(QUEST_FORTUNATE_MISUNDERSTANDINGS, m_creature); + // me->RestoreFaction(); + DoScriptText(SAY_END_IRO,m_creature); + SetRun(false); + break; + } + } + + void JustDied(Unit* killer) + { + if (!IsBeingEscorted) + return; + + if(Player* pPlayer = Unit::GetPlayer(PlayerGUID)) + { + if(pPlayer->GetQuestStatus(QUEST_FORTUNATE_MISUNDERSTANDINGS) != QUEST_STATUS_COMPLETE) + pPlayer->FailQuest(QUEST_FORTUNATE_MISUNDERSTANDINGS); + } + } + + void UpdateAI(Player *player, Creature *_Creature,const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + } +}; + + +bool GossipHello_npc_injured_rainspeaker_oracle(Player *player, Creature *_Creature ) +{ + if( _Creature->isQuestGiver() ) + player->PrepareQuestMenu( _Creature->GetGUID() ); + + if( player->GetQuestStatus(QUEST_FORTUNATE_MISUNDERSTANDINGS) == QUEST_STATUS_INCOMPLETE ) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_injured_rainspeaker_oracle(Player *player, Creature *_Creature, uint32 sender, uint32 action ) +{ + if( action == GOSSIP_ACTION_INFO_DEF+1 ) + { + CAST_AI(npc_escortAI, (_Creature->AI()))->Start(true, true, false, player->GetGUID()); + CAST_AI(npc_escortAI, (_Creature->AI()))->SetMaxPlayerDistance(35.0f); + _Creature->SetUnitMovementFlags(MOVEMENTFLAG_JUMPING); + DoScriptText(SAY_START_IRO,_Creature); + + switch (player->GetTeam()){ + case ALLIANCE: + _Creature->setFaction(FACTION_ESCORTEE_A); + break; + case HORDE: + _Creature->setFaction(FACTION_ESCORTEE_H); + break; + } + } + return true; +} + +bool QuestAccept_npc_injured_rainspeaker_oracle(Player *player, Creature *_Creature, Quest const *_Quest) +{ + DoScriptText(SAY_QUEST_ACCEPT_IRO,_Creature); + return false; +} + +CreatureAI* GetAI_npc_injured_rainspeaker_oracle(Creature *_Creature) +{ + npc_injured_rainspeaker_oracleAI* thisAI = new npc_injured_rainspeaker_oracleAI(_Creature); + + thisAI->FillPointMovementListForCreature(); + + return thisAI; +} + +void AddSC_sholazar_basin() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "npc_injured_rainspeaker_oracle"; + newscript->GetAI = &GetAI_npc_injured_rainspeaker_oracle; + newscript->pGossipHello = &GossipHello_npc_injured_rainspeaker_oracle; + newscript->pGossipSelect = &GossipSelect_npc_injured_rainspeaker_oracle; + newscript->pQuestAccept = &QuestAccept_npc_injured_rainspeaker_oracle; + newscript->RegisterSelf(); +}