diff options
-rw-r--r-- | sql/updates/world/2014_09_13_05_world_misc_335.sql (renamed from sql/updates/world/2014_09_13_05world_misc_335.sql) | 0 | ||||
-rw-r--r-- | sql/updates/world/2014_09_14_01_world_misc.sql | 50 | ||||
-rw-r--r-- | sql/updates/world/2014_09_14_02_world_spellscriptnames.sql | 1 | ||||
-rw-r--r-- | sql/updates/world/2014_09_14_03_world_creature_scriptname.sql | 2 | ||||
-rw-r--r-- | src/server/scripts/Kalimdor/zone_felwood.cpp | 89 | ||||
-rw-r--r-- | src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp | 32 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 32 | ||||
-rw-r--r-- | src/tools/map_extractor/System.cpp | 14 | ||||
-rw-r--r-- | src/tools/vmap4_extractor/vmapexport.cpp | 8 |
9 files changed, 189 insertions, 39 deletions
diff --git a/sql/updates/world/2014_09_13_05world_misc_335.sql b/sql/updates/world/2014_09_13_05_world_misc_335.sql index eb701a48cc4..eb701a48cc4 100644 --- a/sql/updates/world/2014_09_13_05world_misc_335.sql +++ b/sql/updates/world/2014_09_13_05_world_misc_335.sql diff --git a/sql/updates/world/2014_09_14_01_world_misc.sql b/sql/updates/world/2014_09_14_01_world_misc.sql new file mode 100644 index 00000000000..49fa75e37de --- /dev/null +++ b/sql/updates/world/2014_09_14_01_world_misc.sql @@ -0,0 +1,50 @@ +SET @CGUID := 74512; + +UPDATE `creature_template` SET `gossip_menu_id`=10200 WHERE `entry`=32239; +UPDATE`creature_template` SET `gossip_menu_id`=9928, `minlevel`=82, `maxlevel`=82, `npcflag`=1, `speed_walk`=4.8, `speed_run`=3.142857, `unit_flags2`=2099200 WHERE `entry`=30399; +UPDATE `creature_template` SET `faction`=14, `speed_walk`=1.6, `speed_run`=1.857143, `unit_flags`=320, `unit_flags2`=2099200 WHERE `entry`=30396; +UPDATE `creature_template` SET `speed_walk`=3.2, `speed_run`=1.428571, `unit_flags`=33088, `unit_flags2`=2099200, `HoverHeight`=2.1 WHERE `entry`=30420; +UPDATE `creature_template` SET `faction`=2102, `unit_flags`=320 WHERE `entry`=30429; + + +DELETE FROM `gossip_menu` WHERE `entry` IN(9928,10200); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(10200, 14160), -- 32239 +(9928, 13800); -- 30399 + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN(9928,10200); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(10200, 0, 0, 'I\'m ready, Highlord.', 32933, 1, 1, 0, 0, 0, 0, '', 0), +(9928, 0, 0, 'I\'m with you, Thorim.', 31225, 1, 1, 0, 0, 0, 0, '', 0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN(9928,10200); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10200, 0, 0, 0, 9, 0, 13364, 0, 0, 0, 0, 0, '', 'Highlord Tirion Fordring - Show Gossip if Tirions Gambit Taken'), +(15, 10200, 0, 0, 1, 9, 0, 13403, 0, 0, 0, 0, 0, '', 'Highlord Tirion Fordring - Show Gossip if Tirions Gambit Taken'), +(15, 10200, 0, 0, 0, 1, 0, 61131, 0, 0, 0, 0, 0, '', 'Highlord Tirion Fordring - Show Gossip if player has aura Cultist Hood'), +(15, 10200, 0, 0, 1, 1, 0, 61131, 0, 0, 0, 0, 0, '', 'Highlord Tirion Fordring - Show Gossip if player has aura Cultist Hood'), +(15, 9928, 0, 0, 0, 9, 0, 13047, 0, 0, 0, 0, 0, '', 'Thorim - SHow Gossip if the reckoning taken'); + +DELETE FROM `creature_template_addon` WHERE `entry` IN(32239,32241,30399,30396,30420); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(32239, 0, 0x10000, 0x101, '49414'), -- 32239 - 49414 +(32241, 0, 0x10000, 0x1, '49414'), -- 32241 - 49414 +(30399, 0, 0x10000, 0x1, '54503'), -- 30399 - 54503 +(30396, 0, 0x1, 0x1, ''), -- 30396 +(30420, 0, 0x3010000, 0x1, '54503'); -- 30420 - 54503 + +DELETE FROM `creature` WHERE `id` IN(32239,32241,30399,30420); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 32239, 571, 1, 1, 6240.595, 2658.845, 570.3328, 5.864306, 120, 0, 0), -- 32239 (Area: 210) +(@CGUID+1, 32241, 571, 1, 1, 6243.453, 2667.72, 570.3328, 5.410521, 120, 0, 0), -- 32241 (Area: 210) +(@CGUID+2, 32241, 571, 1, 1, 6250.451, 2656.436, 570.3328, 2.199115, 120, 0, 0), -- 32241 (Area: 210) +(@CGUID+3, 32241, 571, 1, 1, 6252.46, 2665.359, 570.3328, 3.979351, 120, 0, 0), -- 32241 (Area: 210) +(@CGUID+4, 30399, 571, 1, 1, 8703.806, -714.0443, 934.9764, 2.321288, 120, 0, 0), -- 30399 (Area: 67) +(@CGUID+5, 30420, 571, 1, 1, 8711.395, -754.7941, 955.1224, 2.338741, 120, 0, 0); -- 30420 (Area: 67) + +DELETE FROM `spell_area` WHERE `spell` IN(49416,54504) AND `area` IN(4543,4445,4521); +INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES +(54504, 4543, 13047, 13047, 0, 0, 2, 1, 74, 11), +(54504, 4445, 13047, 13047, 0, 0, 2, 1, 74, 11), +(49416, 4521, 13364, 13364, 0, 0, 2, 1, 74, 11), +(49416, 4521, 13403, 13403, 0, 0, 2, 1, 74, 11); diff --git a/sql/updates/world/2014_09_14_02_world_spellscriptnames.sql b/sql/updates/world/2014_09_14_02_world_spellscriptnames.sql new file mode 100644 index 00000000000..96ebc93961f --- /dev/null +++ b/sql/updates/world/2014_09_14_02_world_spellscriptnames.sql @@ -0,0 +1 @@ +UPDATE `spell_script_names` SET `ScriptName`= 'spell_gen_stand' WHERE `spell_id`=37752; diff --git a/sql/updates/world/2014_09_14_03_world_creature_scriptname.sql b/sql/updates/world/2014_09_14_03_world_creature_scriptname.sql new file mode 100644 index 00000000000..098cb81e36c --- /dev/null +++ b/sql/updates/world/2014_09_14_03_world_creature_scriptname.sql @@ -0,0 +1,2 @@ +-- Whisperwind Lasher Scriptname +UPDATE `creature_template` SET `AIName`="", `ScriptName`="npc_whisperwind_lasher" WHERE `entry`=47747; diff --git a/src/server/scripts/Kalimdor/zone_felwood.cpp b/src/server/scripts/Kalimdor/zone_felwood.cpp index 7e698348a0c..f8d9d1bbc2a 100644 --- a/src/server/scripts/Kalimdor/zone_felwood.cpp +++ b/src/server/scripts/Kalimdor/zone_felwood.cpp @@ -25,6 +25,94 @@ #include "GridNotifiersImpl.h" #include "SpellScript.h" +/*###### +## npc_whisperwind_lasher +######*/ + +enum WhisperwindLasher +{ + EVENT_CHECK_OOC = 1, + SPELL_INFECTED_WOULD = 52225, + SPELL_STAND = 37752, + NPC_WHISPERWIND_LASHER = 47747, + NPC_CORRUPTED_LASHER = 48387, + FACTION_HOSTILE = 14, + CHANCE_HOSTILE = 30 +}; + +class npc_whisperwind_lasher : public CreatureScript +{ +public: + npc_whisperwind_lasher() : CreatureScript("npc_whisperwind_lasher") { } + + struct npc_whisperwind_lasherAI : public ScriptedAI + { + npc_whisperwind_lasherAI(Creature* creature) : ScriptedAI(creature) { } + + void Reset() override + { + lasher_clicked = false; + } + + void OnSpellClick(Unit* clicker, bool& result) override + { + if (!result) + return; + + if (roll_chance_i(CHANCE_HOSTILE)) + { + me->CastSpell(me, SPELL_INFECTED_WOULD); + me->SetEntry(NPC_CORRUPTED_LASHER); + me->setFaction(FACTION_HOSTILE); + } + else + { + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); + me->CastSpell(me, SPELL_STAND); + me->GetMotionMaster()->MoveRandom(8.0f); + events.ScheduleEvent(EVENT_CHECK_OOC, 20000); + lasher_clicked = true; + + if (Player* player = clicker->ToPlayer()) + player->KilledMonsterCredit(NPC_WHISPERWIND_LASHER, 0); + } + + void UpdateAI(uint32 diff) override + { + if (!lasher_clicked) + return; + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_CHECK_OOC: + if (!me->IsInCombat()) + me->DespawnOrUnsummon(); + else + events.ScheduleEvent(EVENT_CHECK_OOC, 5000); + break; + } + } + DoMeleeAttackIfReady(); + } + + private: + EventMap events; + bool lasher_clicked; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_whisperwind_lasherAI(creature); + } +}; + /*##### # Spell 88254 "Swipe Honey" scripted for quest 27989 "Ruumbo Demands Honey" #####*/ @@ -174,6 +262,7 @@ public: spell_ruumbos_silly_dance() : SpellScriptLoader("spell_ruumbos_silly_dan void AddSC_felwood() { + new npc_whisperwind_lasher(); new spell_swipe_honey(); new spell_beesbees(); new spell_ruumbos_silly_dance(); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp index 3ec5109cbb9..0be61cc2ec8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp @@ -1037,37 +1037,6 @@ class spell_xt002_submerged : public SpellScriptLoader } }; -class spell_xt002_stand : public SpellScriptLoader -{ - public: - spell_xt002_stand() : SpellScriptLoader("spell_xt002_stand") { } - - class spell_xt002_stand_SpellScript : public SpellScript - { - PrepareSpellScript(spell_xt002_stand_SpellScript); - - void HandleScript(SpellEffIndex /*eff*/) - { - Creature* target = GetHitCreature(); - if (!target) - return; - - target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - target->SetByteValue(UNIT_FIELD_BYTES_1, 0, UNIT_STAND_STATE_STAND); - } - - void Register() override - { - OnEffectHitTarget += SpellEffectFn(spell_xt002_stand_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); - } - }; - - SpellScript* GetSpellScript() const override - { - return new spell_xt002_stand_SpellScript(); - } -}; - class achievement_nerf_engineering : public AchievementCriteriaScript { public: @@ -1126,7 +1095,6 @@ void AddSC_boss_xt002() new spell_xt002_heart_overload_periodic(); new spell_xt002_tympanic_tantrum(); new spell_xt002_submerged(); - new spell_xt002_stand(); new achievement_nerf_engineering(); new achievement_heartbreaker(); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 35d3985cfa1..94d2a95f618 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -3670,6 +3670,37 @@ class spell_gen_gm_freeze : public SpellScriptLoader } }; +class spell_gen_stand : public SpellScriptLoader +{ +public: + spell_gen_stand() : SpellScriptLoader("spell_gen_stand") { } + + class spell_gen_stand_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_stand_SpellScript); + + void HandleScript(SpellEffIndex /*eff*/) + { + Creature* target = GetHitCreature(); + if (!target) + return; + + target->SetByteValue(UNIT_FIELD_BYTES_1, 0, UNIT_STAND_STATE_STAND); + target->HandleEmoteCommand(EMOTE_STATE_NONE); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_gen_stand_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_gen_stand_SpellScript(); + } +}; + void AddSC_generic_spell_scripts() { new spell_gen_absorb0_hitlimit1(); @@ -3753,4 +3784,5 @@ void AddSC_generic_spell_scripts() new spell_gen_whisper_gulch_yogg_saron_whisper(); new spell_gen_eject_all_passengers(); new spell_gen_gm_freeze(); + new spell_gen_stand(); } diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index a4de6f92a8d..ab3ebda584d 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -111,17 +111,21 @@ uint32 const Builds[] = {13164, 13205, 13287, 13329, 13596, 13623, 13914, 14007, #define LAST_DBC_IN_DATA_BUILD 13623 // after this build mpqs with dbc are back to locale folder #define NEW_BASE_SET_BUILD 15211 -char const* Locales[] = +#define LOCALES_COUNT 15 + +char const* Locales[LOCALES_COUNT] = { "enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", - "esMX", "ruRU" + "esMX", "ruRU", + "ptBR", "ptPT", + "itIT" }; -TCHAR const* LocalesT[] = +TCHAR const* LocalesT[LOCALES_COUNT] = { _T("enGB"), _T("enUS"), _T("deDE"), _T("esES"), @@ -129,10 +133,10 @@ TCHAR const* LocalesT[] = _T("zhCN"), _T("zhTW"), _T("enCN"), _T("enTW"), _T("esMX"), _T("ruRU"), + _T("ptBR"), _T("ptPT"), + _T("itIT"), }; -#define LOCALES_COUNT 12 - void CreateDir(std::string const& path) { if (chdir(path.c_str()) == 0) diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp index fbb7cb87ebe..92878e680dc 100644 --- a/src/tools/vmap4_extractor/vmapexport.cpp +++ b/src/tools/vmap4_extractor/vmapexport.cpp @@ -77,7 +77,7 @@ uint32 const Builds[] = {13164, 13205, 13287, 13329, 13596, 13623, 13914, 14007, #define LAST_DBC_IN_DATA_BUILD 13623 // after this build mpqs with dbc are back to locale folder #define NEW_BASE_SET_BUILD 15211 -#define LOCALES_COUNT 12 +#define LOCALES_COUNT 15 char const* Locales[LOCALES_COUNT] = { @@ -86,7 +86,9 @@ char const* Locales[LOCALES_COUNT] = "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", - "esMX", "ruRU" + "esMX", "ruRU", + "ptBR", "ptPT", + "itIT" }; TCHAR const* LocalesT[LOCALES_COUNT] = @@ -97,6 +99,8 @@ TCHAR const* LocalesT[LOCALES_COUNT] = _T("zhCN"), _T("zhTW"), _T("enCN"), _T("enTW"), _T("esMX"), _T("ruRU"), + _T("ptBR"), _T("ptPT"), + _T("itIT"), }; typedef struct |