From 8fd1f461929d78054b72f00483ad057d0e80a238 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sat, 31 Aug 2013 17:52:47 +0200 Subject: Scripted: Fix warning --- src/server/scripts/Pet/CMakeLists.txt | 1 + src/server/scripts/Pet/pet_generic.cpp | 90 ++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 src/server/scripts/Pet/pet_generic.cpp (limited to 'src/server/scripts/Pet') diff --git a/src/server/scripts/Pet/CMakeLists.txt b/src/server/scripts/Pet/CMakeLists.txt index b4a8eea77d8..87bbfd63c69 100644 --- a/src/server/scripts/Pet/CMakeLists.txt +++ b/src/server/scripts/Pet/CMakeLists.txt @@ -11,6 +11,7 @@ set(scripts_STAT_SRCS ${scripts_STAT_SRCS} Pet/pet_dk.cpp + Pet/pet_generic.cpp Pet/pet_hunter.cpp Pet/pet_mage.cpp Pet/pet_priest.cpp diff --git a/src/server/scripts/Pet/pet_generic.cpp b/src/server/scripts/Pet/pet_generic.cpp new file mode 100644 index 00000000000..f4327ef8daa --- /dev/null +++ b/src/server/scripts/Pet/pet_generic.cpp @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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, see . + */ + +/* + * Ordered alphabetically using scriptname. + * Scriptnames of files in this file should be prefixed with "npc_pet_gen_". + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "Player.h" + +enum Mojo +{ + SAY_MOJO = 0, + + SPELL_FEELING_FROGGY = 43906, + SPELL_SEDUCTION_VISUAL = 43919 +}; + +class npc_pet_gen_mojo : public CreatureScript +{ + public: + npc_pet_gen_mojo() : CreatureScript("npc_pet_gen_mojo") { } + + struct npc_pet_gen_mojoAI : public ScriptedAI + { + npc_pet_gen_mojoAI(Creature* creature) : ScriptedAI(creature) { } + + void Reset() OVERRIDE + { + _victimGUID = 0; + + if (Unit* owner = me->GetOwner()) + me->GetMotionMaster()->MoveFollow(owner, 0.0f, 0.0f); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE { } + void UpdateAI(uint32 /*diff*/) OVERRIDE { } + + void ReceiveEmote(Player* player, uint32 emote) OVERRIDE + { + me->HandleEmoteCommand(emote); + Unit* owner = me->GetOwner(); + if (emote != TEXT_EMOTE_KISS || !owner || owner->GetTypeId() != TYPEID_PLAYER || + owner->ToPlayer()->GetTeam() != player->GetTeam()) + { + return; + } + + Talk(SAY_MOJO, player->GetGUID()); + + if (_victimGUID) + if (Player* victim = ObjectAccessor::GetPlayer(*me, _victimGUID)) + victim->RemoveAura(SPELL_FEELING_FROGGY); + + _victimGUID = player->GetGUID(); + + DoCast(player, SPELL_FEELING_FROGGY, true); + DoCast(me, SPELL_SEDUCTION_VISUAL, true); + me->GetMotionMaster()->MoveFollow(player, 0.0f, 0.0f); + } + + private: + uint64 _victimGUID; + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_pet_gen_mojoAI(creature); + } +}; + +void AddSC_shaman_pet_scripts() +{ +} -- cgit v1.2.3 From e753a47162b0417ee74b91e2ec04fe7716c16c99 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sat, 31 Aug 2013 18:29:51 +0200 Subject: DB/Sai: Fix quest credit for quest "Blessing of Incineratus" --- sql/updates/world/2013_08_31_06_world_smart_scripts.sql | 10 ++++++++++ src/server/scripts/Pet/pet_generic.cpp | 1 + 2 files changed, 11 insertions(+) create mode 100644 sql/updates/world/2013_08_31_06_world_smart_scripts.sql (limited to 'src/server/scripts/Pet') diff --git a/sql/updates/world/2013_08_31_06_world_smart_scripts.sql b/sql/updates/world/2013_08_31_06_world_smart_scripts.sql new file mode 100644 index 00000000000..9376bb62951 --- /dev/null +++ b/sql/updates/world/2013_08_31_06_world_smart_scripts.sql @@ -0,0 +1,10 @@ +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18110,18142,18143,18144) AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18110, 0, 0, 1, 8, 0, 100, 1, 31927, 0, 0, 0, 80, 1811000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Windyreed Quest Credit - On Spellhit - Run Script'), +(18110, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 33, 18110, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Windyreed Quest Credit - On Spellhit (Link) - Quest Credit'), +(18142, 0, 0, 1, 8, 0, 100, 1, 31927, 0, 0, 0, 80, 1814200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Windyreed Quest Credit - On Spellhit - Run Script'), +(18142, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 33, 18142, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Windyreed Quest Credit - On Spellhit (Link) - Quest Credit'), +(18143, 0, 0, 1, 8, 0, 100, 1, 31927, 0, 0, 0, 80, 1814300, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Windyreed Quest Credit - On Spellhit - Run Script'), +(18143, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 33, 18143, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Windyreed Quest Credit - On Spellhit (Link) - Quest Credit'), +(18144, 0, 0, 1, 8, 0, 100, 1, 31927, 0, 0, 0, 80, 1814400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Windyreed Quest Credit - On Spellhit - Run Script'), +(18144, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 33, 18144, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Windyreed Quest Credit - On Spellhit (Link) - Quest Credit'); diff --git a/src/server/scripts/Pet/pet_generic.cpp b/src/server/scripts/Pet/pet_generic.cpp index f4327ef8daa..b8df19f4216 100644 --- a/src/server/scripts/Pet/pet_generic.cpp +++ b/src/server/scripts/Pet/pet_generic.cpp @@ -87,4 +87,5 @@ class npc_pet_gen_mojo : public CreatureScript void AddSC_shaman_pet_scripts() { + new npc_pet_gen_mojo(); } -- cgit v1.2.3 From 22b71244a0e9caccf7d9ab9ed770f27f6486d904 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sat, 31 Aug 2013 19:33:14 +0200 Subject: DB/Creature: Fix cords for quest "Death Comes From On High" --- sql/updates/world/2013_08_31_07_world_creature.sql | 26 ++++++++++++++++++++++ src/server/game/Scripting/ScriptLoader.cpp | 2 ++ src/server/scripts/Pet/pet_generic.cpp | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/2013_08_31_07_world_creature.sql (limited to 'src/server/scripts/Pet') diff --git a/sql/updates/world/2013_08_31_07_world_creature.sql b/sql/updates/world/2013_08_31_07_world_creature.sql new file mode 100644 index 00000000000..04f844d68c0 --- /dev/null +++ b/sql/updates/world/2013_08_31_07_world_creature.sql @@ -0,0 +1,26 @@ +UPDATE `creature` SET + `position_x`=1814.592, + `position_y`=-5988.646, + `position_z`=125.4968, + `orientation`=3.228859 +WHERE `id`=28525; + +UPDATE `creature` SET + `position_x`=1590.806, + `position_y`=-5731.661, + `position_z`=143.8694, + `orientation`=0.9075712 +WHERE `id`=28543; + +UPDATE `creature` SET + `position_x`= 1651.211, + `position_y`=-5994.667, + `position_z`=133.5836 +WHERE `id`=28542; + +UPDATE `creature` SET `position_x`= 1385.928, + `position_x`=1385.928, + `position_y`= -5702.061, + `position_z`= 146.3048, + `orientation`=4.153883 +WHERE `id`=28544; diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 426d83ef837..3456041ddb2 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -654,6 +654,7 @@ void AddSC_event_childrens_week(); // Pets void AddSC_deathknight_pet_scripts(); +void AddSC_generic_pet_scripts(); void AddSC_hunter_pet_scripts(); void AddSC_mage_pet_scripts(); void AddSC_priest_pet_scripts(); @@ -1359,6 +1360,7 @@ void AddPetScripts() { #ifdef SCRIPTS AddSC_deathknight_pet_scripts(); + AddSC_generic_pet_scripts(); AddSC_hunter_pet_scripts(); AddSC_mage_pet_scripts(); AddSC_priest_pet_scripts(); diff --git a/src/server/scripts/Pet/pet_generic.cpp b/src/server/scripts/Pet/pet_generic.cpp index b8df19f4216..f10a14716c6 100644 --- a/src/server/scripts/Pet/pet_generic.cpp +++ b/src/server/scripts/Pet/pet_generic.cpp @@ -85,7 +85,7 @@ class npc_pet_gen_mojo : public CreatureScript } }; -void AddSC_shaman_pet_scripts() +void AddSC_generic_pet_scripts() { new npc_pet_gen_mojo(); } -- cgit v1.2.3