From 90c60a5a6f6098fc0958030b956e9ef92f714c2b Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Jun 2014 02:39:56 +0200 Subject: DB/Quest: Fix some missing quest texts By Crysicle, closes #12214 closes #12209 --- sql/updates/world/2014_06_06_00_world_quest_template.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2014_06_06_00_world_quest_template.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_06_06_00_world_quest_template.sql b/sql/updates/world/2014_06_06_00_world_quest_template.sql new file mode 100644 index 00000000000..6d174f9a7b0 --- /dev/null +++ b/sql/updates/world/2014_06_06_00_world_quest_template.sql @@ -0,0 +1,4 @@ +-- +UPDATE `quest_template` SET `RequestItemsText` = 'Supposedly this Malcin is outside Razorfen Downs. There''s no question - he has to die.$b$bMy contacts in Orgrimmar tell me their scouts have found signs of the Plague down there. The quilboar are showing signs of being plagued, too; they''re much more powerful. Whatever the Scourge are doing down there needs to end. Now.$b$bFind this Malcin and kill him. Report back here when he''s dead.' WHERE `id` = 14353; +UPDATE `quest_template` SET `OfferRewardText` = 'Good work, $C!$b$bYou''ve done the Horde proud by stopping the Scourge from setting down roots on our soil. An act like that deserves a reward, and the Forsaken have enough lying around that I''m sure they can spare a few things.$b$bWe may not know everything they''ve done in the Downs, but we''ll find out. They can''t slink around in the dark forever.' WHERE `id` = 14353; +UPDATE `quest_template` SET `OfferRewardText` = 'I''m sure Sylvanas will be glad to have that problem taken care of, $N. The task I gave you wasn''t easy, but here you stand, victorious. That commands respect, and what you''ve done won''t be forgotten.' WHERE `id` = 14355; -- cgit v1.2.3 From 78f1cbfba522882acdfd5ddea2edefd88881c3c6 Mon Sep 17 00:00:00 2001 From: Trisjdc Date: Fri, 6 Jun 2014 11:01:36 +0100 Subject: Scripts/Items: Imp in a Ball --- sql/updates/world/2014_06_06_00_world_misc.sql | 92 ++++++++++++++++++++++++++ src/server/game/Texts/CreatureTextMgr.cpp | 13 ++++ src/server/scripts/World/npcs_special.cpp | 56 ++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 sql/updates/world/2014_06_06_00_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_06_06_00_world_misc.sql b/sql/updates/world/2014_06_06_00_world_misc.sql new file mode 100644 index 00000000000..a1d4dd621c0 --- /dev/null +++ b/sql/updates/world/2014_06_06_00_world_misc.sql @@ -0,0 +1,92 @@ + +UPDATE creature_template SET ScriptName="npc_imp_in_a_ball" WHERE entry=23224; + +SET @COUNT := 0; +DELETE FROM creature_text WHERE entry=23224; +INSERT INTO creature_text (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(23224, 0, @COUNT := @COUNT + 1, 'Yes, unless I have anything to do with it.', 15, 0, 100, 0, 0, 0, '', 21157), +(23224, 0, @COUNT := @COUNT + 1, 'I see that happening sometime between tomorrow and the next decade. Definitely.', 15, 0, 100, 0, 0, 0, '', 21158), +(23224, 0, @COUNT := @COUNT + 1, 'Looks good for you...and bad for me.', 15, 0, 100, 0, 0, 0, '', 21160), +(23224, 0, @COUNT := @COUNT + 1, 'I\'ve consulted my fellow imps, and we think YES, except for that one imp.', 15, 0, 100, 0, 0, 0, '', 21161), +(23224, 0, @COUNT := @COUNT + 1, 'The outlook is positive, but I\'m still negative.', 15, 0, 100, 0, 0, 0, '', 21162), +(23224, 0, @COUNT := @COUNT + 1, 'It pains me to say this, but "Yes".', 15, 0, 100, 0, 0, 0, '', 21163), +(23224, 0, @COUNT := @COUNT + 1, 'When dwarves fly! They do? Then yes!', 15, 0, 100, 0, 0, 0, '', 21164), +(23224, 0, @COUNT := @COUNT + 1, 'Sure, but you\'re not going to like it.', 15, 0, 100, 0, 0, 0, '', 21165), +(23224, 0, @COUNT := @COUNT + 1, 'Be quiet \'bout what you hear and see around here, $r.', 15, 0, 100, 0, 0, 0, '', 21166), +(23224, 0, @COUNT := @COUNT + 1, 'Unfortunately... yes.', 15, 0, 100, 0, 0, 0, '', 21169), +(23224, 0, @COUNT := @COUNT + 1, 'I can\'t see why not, although, I can\'t see a lot of things right now.', 15, 0, 100, 0, 0, 0, '', 21170), +(23224, 0, @COUNT := @COUNT + 1, 'I would bet your soul on it.', 15, 0, 100, 0, 0, 0, '', 21171), +(23224, 0, @COUNT := @COUNT + 1, 'Yes, but if anyone asks... It wasn\'t me who told you.', 15, 0, 100, 0, 0, 0, '', 21172), +(23224, 0, @COUNT := @COUNT + 1, 'Didn\'t you already ask that once? Yes already!', 15, 0, 100, 0, 0, 0, '', 21173), +(23224, 0, @COUNT := @COUNT + 1, 'Please... Is Kil\'jaeden red?', 15, 0, 100, 0, 0, 0, '', 21175), +(23224, 0, @COUNT := @COUNT + 1, 'Yeah, sure. You just keep thinking that.', 15, 0, 100, 0, 0, 0, '', 21176), +(23224, 0, @COUNT := @COUNT + 1, 'I suppose.', 15, 0, 100, 0, 0, 0, '', 21177), +(23224, 0, @COUNT := @COUNT + 1, 'Definitely.', 15, 0, 100, 0, 0, 0, '', 21178), +(23224, 0, @COUNT := @COUNT + 1, 'Jump three times and dance for ten minutes and it will definitely happen!', 15, 0, 100, 0, 0, 0, '', 21179), +(23224, 0, @COUNT := @COUNT + 1, 'Word on the peninsula is YES!', 15, 0, 100, 0, 0, 0, '', 21180), +(23224, 0, @COUNT := @COUNT + 1, 'Oh, that one\'s for sure.', 15, 0, 100, 0, 0, 0, '', 21181), +(23224, 0, @COUNT := @COUNT + 1, 'Yes, but not in the way you imagine.', 15, 0, 100, 0, 0, 0, '', 21182), +(23224, 0, @COUNT := @COUNT + 1, 'Yes, yes, a thousand times, yes already!', 15, 0, 100, 0, 0, 0, '', 21183), +(23224, 0, @COUNT := @COUNT + 1, 'Yes, now stop pestering me!', 15, 0, 100, 0, 0, 0, '', 21184), +(23224, 0, @COUNT := @COUNT + 1, 'The answer will be a yes if you let me out of here.', 15, 0, 100, 0, 0, 0, '', 21185), +(23224, 0, @COUNT := @COUNT + 1, 'It\'s as sure as the warts on my backside!', 15, 0, 100, 0, 0, 0, '', 21186), +(23224, 0, @COUNT := @COUNT + 1, 'The answer is yes in here, I don\'t see why it would be any different out there.', 15, 0, 100, 0, 0, 0, '', 21187), +(23224, 0, @COUNT := @COUNT + 1, 'Three words - "ab - so - lutely"!', 15, 0, 100, 0, 0, 0, '', 21188), +(23224, 0, @COUNT := @COUNT + 1, 'Yes, but I hoped I would never have to answer that.', 15, 0, 100, 0, 0, 0, '', 21189), +(23224, 0, @COUNT := @COUNT + 1, 'Ask me again later - I\'m trying to scratch my nose and it\'s hard to concentrate.', 15, 0, 100, 0, 0, 0, '', 21190), +(23224, 0, @COUNT := @COUNT + 1, 'Why should I answer that? Do you tell fortunes when people shake YOU?', 15, 0, 100, 0, 0, 0, '', 21191), +(23224, 0, @COUNT := @COUNT + 1, 'Yes, it will rain. That\'s not what you asked? Too bad!', 15, 0, 100, 0, 0, 0, '', 21192), +(23224, 0, @COUNT := @COUNT + 1, 'I\'m sorry, I can only speak Demonic.', 15, 0, 100, 0, 0, 0, '', 21193), +(23224, 0, @COUNT := @COUNT + 1, 'Yes! I mean no! I mean... which answer gets me out of here?', 15, 0, 100, 0, 0, 0, '', 21194), +(23224, 0, @COUNT := @COUNT + 1, 'Yes, No, Maybe so.', 15, 0, 100, 0, 0, 0, '', 21195), +(23224, 0, @COUNT := @COUNT + 1, 'It won\'t matter, you\'ll be dead by tomorrow.', 15, 0, 100, 0, 0, 0, '', 21196), +(23224, 0, @COUNT := @COUNT + 1, 'You should be asking "Is that rogue behind me going to kill me?"', 15, 0, 100, 0, 0, 0, '', 21197), +(23224, 0, @COUNT := @COUNT + 1, 'It\'s times like these that I wish I had a longer cooldown.', 15, 0, 100, 0, 0, 0, '', 21198), +(23224, 0, @COUNT := @COUNT + 1, '%s shrugs. Who knows?', 15, 0, 100, 0, 0, 0, '', 21199), +(23224, 0, @COUNT := @COUNT + 1, 'It\'s like my mother always said: [Demonic] "Razxx khaj jhashxx xashjx."', 15, 0, 100, 0, 0, 0, '', 21205), +(23224, 0, @COUNT := @COUNT + 1, '%s is ignoring you.', 15, 0, 100, 0, 0, 0, '', 21206), +(23224, 0, @COUNT := @COUNT + 1, 'Why me? Why not a goblin, or a gnome...', 15, 0, 100, 0, 0, 0, '', 21207), +(23224, 0, @COUNT := @COUNT + 1, 'What happens in the twisting nether, stays in the twisting nether.', 15, 0, 100, 0, 0, 0, '', 21208), +(23224, 0, @COUNT := @COUNT + 1, 'Avoid taking unnecessary gambles. Your lucky numbers are two, two and half, and eleven-teen.', 15, 0, 100, 0, 0, 0, '', 21209), +(23224, 0, @COUNT := @COUNT + 1, 'Wouldn\'t you like to know?', 15, 0, 100, 0, 0, 0, '', 21210), +(23224, 0, @COUNT := @COUNT + 1, 'Oh, oh, oh! I can see this one clearly... Nah, lost it.', 15, 0, 100, 0, 0, 0, '', 21211), +(23224, 0, @COUNT := @COUNT + 1, 'This was NOT in my contract!', 15, 0, 100, 0, 0, 0, '', 21212), +(23224, 0, @COUNT := @COUNT + 1, 'XRA RAHKI MAZIZRA!', 15, 0, 100, 0, 0, 0, '', 21213), +(23224, 0, @COUNT := @COUNT + 1, '4 8 15 16 23 42', 15, 0, 100, 0, 0, 0, '', 21214), +(23224, 0, @COUNT := @COUNT + 1, 'Are you making fun of me?', 15, 0, 100, 0, 0, 0, '', 21215), +(23224, 0, @COUNT := @COUNT + 1, 'What kind of imp do you think I am?', 15, 0, 100, 0, 0, 0, '', 21216), +(23224, 0, @COUNT := @COUNT + 1, 'Say please.', 15, 0, 100, 0, 0, 0, '', 21217), +(23224, 0, @COUNT := @COUNT + 1, 'Want to trade places?', 15, 0, 100, 0, 0, 0, '', 21218), +(23224, 0, @COUNT := @COUNT + 1, 'Do you ask this question to everything that\'s trapped in a ball?', 15, 0, 100, 0, 0, 0, '', 21219), +(23224, 0, @COUNT := @COUNT + 1, 'Hey! You try arranging furniture with some jerk shaking your house!', 15, 0, 100, 0, 0, 0, '', 21220), +(23224, 0, @COUNT := @COUNT + 1, 'I can make that happen. Just sign below the dotted line...', 15, 0, 100, 0, 0, 0, '', 21221), +(23224, 0, @COUNT := @COUNT + 1, 'Reply hazy and slightly damp. Dry thoroughly and try again.', 15, 0, 100, 0, 0, 0, '', 21222), +(23224, 0, @COUNT := @COUNT + 1, 'Concentrate (on releasing me from this infernal prison) and try again later.', 15, 0, 100, 0, 0, 0, '', 21223), +(23224, 0, @COUNT := @COUNT + 1, 'Please insert 25 silver pieces and try again.', 15, 0, 100, 0, 0, 0, '', 21224), +(23224, 0, @COUNT := @COUNT + 1, 'Are you my pal, Danny?', 15, 0, 100, 0, 0, 0, '', 21225), +(23224, 0, @COUNT := @COUNT + 1, 'You remember the time you tried to drill that hole in your head?', 15, 0, 100, 0, 0, 0, '', 21226), +(23224, 0, @COUNT := @COUNT + 1, 'Oh that\'s right, don\'t make any effort to make your own fortune!', 15, 0, 100, 0, 0, 0, '', 21227), +(23224, 0, @COUNT := @COUNT + 1, 'Two words - imp-possible!', 15, 0, 100, 0, 0, 0, '', 21228), +(23224, 0, @COUNT := @COUNT + 1, 'You need Arcane Intellect, because that answer is obvious! NO!', 15, 0, 100, 0, 0, 0, '', 21229), +(23224, 0, @COUNT := @COUNT + 1, 'Not on your life!', 15, 0, 100, 0, 0, 0, '', 21230), +(23224, 0, @COUNT := @COUNT + 1, 'I don\'t have to be a fortune-telling imp to know the answer to that one - NO!', 15, 0, 100, 0, 0, 0, '', 21231), +(23224, 0, @COUNT := @COUNT + 1, 'The odds are 32.33 (repeating of course) percent chance of success.', 15, 0, 100, 0, 0, 0, '', 21232), +(23224, 0, @COUNT := @COUNT + 1, 'When Blackrock freezes over!', 15, 0, 100, 0, 0, 0, '', 21233), +(23224, 0, @COUNT := @COUNT + 1, 'Hahahaha, you\'re kidding right?', 15, 0, 100, 0, 0, 0, '', 21234), +(23224, 0, @COUNT := @COUNT + 1, 'Inconceivable!', 15, 0, 100, 0, 0, 0, '', 21235), +(23224, 0, @COUNT := @COUNT + 1, 'My sources say "no". Before the torture, that is.', 15, 0, 100, 0, 0, 0, '', 21236), +(23224, 0, @COUNT := @COUNT + 1, 'That\'s about as likely as me getting out of this ball.', 15, 0, 100, 0, 0, 0, '', 21237), +(23224, 0, @COUNT := @COUNT + 1, 'You picked the wrong time to shake me today, buddy! Prepare for disappointment.', 15, 0, 100, 0, 0, 0, '', 21238), +(23224, 0, @COUNT := @COUNT + 1, 'Not unless you\'re some kind of super-person. And don\'t kid yourself, you\'re not.', 15, 0, 100, 0, 0, 0, '', 21239), +(23224, 0, @COUNT := @COUNT + 1, 'That\'s about as likely as me getting a date with a succubus.', 15, 0, 100, 0, 0, 0, '', 21240), +(23224, 0, @COUNT := @COUNT + 1, 'My fortune telling powers are immeasurable - your chances are though: NO CHANCE', 15, 0, 100, 0, 0, 0, '', 21241), +(23224, 0, @COUNT := @COUNT + 1, 'NO - and don\'t try shaking me again for a better answer!', 15, 0, 100, 0, 0, 0, '', 21242), +(23224, 0, @COUNT := @COUNT + 1, 'Yes is my answer...', 15, 0, 100, 0, 0, 0, '', 21243), +(23224, 0, @COUNT := @COUNT + 1, '...NOT!', 15, 0, 100, 0, 0, 0, '', 21244), +(23224, 0, @COUNT := @COUNT + 1, 'I\'m gonna have to give this one the big N-O.', 15, 0, 100, 0, 0, 0, '', 21245), +(23224, 0, @COUNT := @COUNT + 1, 'The outlook is very bad - for YOU that is! Haha, take it!', 15, 0, 100, 0, 0, 0, '', 21246), +(23224, 0, @COUNT := @COUNT + 1, 'Survey says: BZZZT!', 15, 0, 100, 0, 0, 0, '', 21247); + +DELETE FROM spell_linked_spell WHERE spell_trigger=40527 AND spell_effect=40528; +INSERT INTO spell_linked_spell (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(40527, 40528, 0, 'Imp in a Bottle'); diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 57690d7e5c1..8bd7a5a5e71 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -24,6 +24,7 @@ #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "CreatureTextMgr.h" +#include "Group.h" class CreatureTextBuilder { @@ -346,6 +347,18 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket* data, } break; } + case CHAT_MSG_MONSTER_PARTY: + if (!whisperTarget) + return; + + if (Player const* player = whisperTarget->ToPlayer()) + { + if (Group* group = const_cast(player->GetGroup())) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) + if (Player* member = itr->GetSource()) + member->GetSession()->SendPacket(data); + } + return; default: break; } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index bb7da1b7042..c32edff09bc 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -56,6 +56,7 @@ EndContentData */ #include "CellImpl.h" #include "SpellAuras.h" #include "Pet.h" +#include "CreatureTextMgr.h" /*######## # npc_air_force_bots @@ -2353,6 +2354,60 @@ public: }; }; +class npc_imp_in_a_ball : public CreatureScript +{ +private: + enum + { + SAY_RANDOM, + + EVENT_TALK = 1, + }; + +public: + npc_imp_in_a_ball() : CreatureScript("npc_imp_in_a_ball") { } + + struct npc_imp_in_a_ballAI : public ScriptedAI + { + npc_imp_in_a_ballAI(Creature* creature) : ScriptedAI(creature) + { + summonerGUID = 0; + } + + void IsSummonedBy(Unit* summoner) override + { + if (summoner->GetTypeId() == TYPEID_PLAYER) + { + summonerGUID = summoner->GetGUID(); + events.ScheduleEvent(EVENT_TALK, 3000); + } + } + + void UpdateAI(uint32 diff) override + { + events.Update(diff); + + if (events.ExecuteEvent() == EVENT_TALK) + { + if (Player* owner = ObjectAccessor::GetPlayer(*me, summonerGUID)) + { + sCreatureTextMgr->SendChat(me, SAY_RANDOM, owner, + owner->GetGroup() ? CHAT_MSG_MONSTER_PARTY : CHAT_MSG_MONSTER_WHISPER, LANG_ADDON, TEXT_RANGE_NORMAL); + } + } + } + + private: + EventMap events; + uint64 summonerGUID; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_imp_in_a_ballAI(creature); + } +}; + void AddSC_npcs_special() { new npc_air_force_bots(); @@ -2375,4 +2430,5 @@ void AddSC_npcs_special() new npc_experience(); new npc_firework(); new npc_spring_rabbit(); + new npc_imp_in_a_ball(); } -- cgit v1.2.3 From ba0b4dc06deae90997e91ac9f497b25a4e36b8c3 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 7 Jun 2014 11:17:50 +0200 Subject: DB/Creature: Fix Eva Sarkhoff By dr-j, closes #12224 --- sql/updates/world/2014_06_07_00_world_misc.sql | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sql/updates/world/2014_06_07_00_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_06_07_00_world_misc.sql b/sql/updates/world/2014_06_07_00_world_misc.sql new file mode 100644 index 00000000000..ff09f8f552e --- /dev/null +++ b/sql/updates/world/2014_06_07_00_world_misc.sql @@ -0,0 +1,31 @@ +UPDATE `creature_template` SET `gossip_menu_id`=3310 WHERE `entry`=11216; + +DELETE FROM `gossip_menu_option` WHERE `menu_id` in(3310,3309,3308,3307,3306,3305,3304,3303,3302,3301); +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 +(3310, 0, 0, 'The pleasure is mine, madam. Might I ask what it is that you are doing here?', 6645, 1, 1, 3309, 0, 0, 0, '', 0), +(3310, 1, 0, 'Eva, I have lost the Spectral Essence. I need another.', 6799, 1, 1, 0, 0, 0, 0, '', 0), +(3309, 0, 0, 'Until what, Eva? I must know.', 6647, 1, 1, 3308, 0, 0, 0, '', 0), +(3308, 0, 0, 'What do you mean?', 6649, 1, 1, 3307, 0, 0, 0, '', 0), +(3307, 0, 0, 'Why didn''t you just leave?', 6651, 1, 1, 3306, 0, 0, 0, '', 0), +(3306, 0, 0, 'So what happened?', 6653, 1, 1, 3305, 0, 0, 0, '', 0), +(3305, 0, 0, 'No restraints? Just a circle?', 6655, 1, 1, 3304, 0, 0, 0, '', 0), +(3304, 0, 0, 'Tell me more', 6657, 1, 1, 3303, 0, 0, 0, '', 0), +(3303, 0, 0, 'This is an atrocity.', 6659, 1, 1, 3302, 0, 0, 0, '', 0), +(3302, 0, 0, 'I feel sick', 6661, 1, 1, 3301, 0, 0, 0, '', 0), +(3301, 0, 0, 'What can I do to help?', 45678, 1, 1, 0, 0, 0, 0, '', 0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (3310); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 3310, 0, 0, 0, 8, 0, 5382, 0, 0, 1, 0, 0, '', 'Gossip Option requires Doctor Theolen Krastinov, the Butcher not rewarded'), +(15, 3310, 0, 0, 0, 9, 0, 5382, 0, 0, 1, 0, 0, '', 'Gossip Option requires Doctor Theolen Krastinov, the Butcher not taken'), +(15, 3310, 0, 0, 0, 28, 0, 5382, 0, 0, 1, 0, 0, '', 'Gossip Option requires Doctor Theolen Krastinov, the Butcher not complete'), +(15, 3310, 1, 0, 0, 8, 0, 5384, 0, 0, 0, 0, 0, '', 'Gossip Option requires Kirtonos the Herald Rewarded'), +(15, 3310, 1, 0, 0, 2, 0, 13544, 1, 0, 1, 0, 0, '', 'Gossip Option requires Player does not have Spectral Essence'); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (11216); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(11216) 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 +(11216,0,0,1,62,0,100,0,3310,1,0,0,85,17672,2,0,0,0,0,7,0,0,0,0,0,0,0,'Eva Sarkhoff - On Gossip Option 1 Selected - Cast Summon Spectral Essence'), +(11216,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Eva Sarkhoff - Link - Close Gossip'), +(11216,0,3,4,62,0,100,0,3301,0,0,0,7,5382,0,0,0,0,0,7,0,0,0,0,0,0,0,'Eva Sarkhoff - On Gossip Option 0 Selected - Add Quest Doctor Theolen Krastinov, the Butcher'), +(11216,0,4,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Eva Sarkhoff - Link - Close Gossip'); -- cgit v1.2.3 From ae1fbba3cc6d12455827dfa865a6d472324b1ae3 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sun, 8 Jun 2014 01:20:47 +0200 Subject: DB/Conditions: Fix conditions for Xink gossip --- sql/updates/world/2014_06_08_00_world_conditions.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/2014_06_08_00_world_conditions.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_06_08_00_world_conditions.sql b/sql/updates/world/2014_06_08_00_world_conditions.sql new file mode 100644 index 00000000000..a0a885d5def --- /dev/null +++ b/sql/updates/world/2014_06_08_00_world_conditions.sql @@ -0,0 +1 @@ +UPDATE `conditions` SET `ConditionTypeOrReference`=2,`ConditionValue2`=1,`NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9422 AND `ConditionTypeOrReference`=26 AND `ConditionValue1`=36734; -- cgit v1.2.3 From 0cc94300d96c52b77caa1025593f7fb45555ce31 Mon Sep 17 00:00:00 2001 From: Kinzcool Date: Sun, 8 Jun 2014 00:02:20 -0400 Subject: DB/GameObjects: Fixed some phasing of certain gameobjects in Northrend and DK's area --- sql/updates/world/2014_06_08_01_world_gameobject.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sql/updates/world/2014_06_08_01_world_gameobject.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_06_08_01_world_gameobject.sql b/sql/updates/world/2014_06_08_01_world_gameobject.sql new file mode 100644 index 00000000000..844d32ed393 --- /dev/null +++ b/sql/updates/world/2014_06_08_01_world_gameobject.sql @@ -0,0 +1,17 @@ +UPDATE `gameobject` SET `phaseMask`=1 WHERE `id` IN (192161, 192162); +UPDATE `gameobject` SET `phaseMask`=9 WHERE `id`=193985; +UPDATE `gameobject` SET `phaseMask`=12 WHERE `id` IN (190791, 190792, 190793, 190919, 190920, 190921, 190922, 190923, 190924, 190925, 190926, 190927, 190928, 190929); +UPDATE `gameobject` SET `phaseMask`=19 WHERE `id` IN (190799, 190859, 190860, 190861, 190862, 190863, 190864, 190865, 190866, 190867, 190868, 190869, 190870, 190871, 190872, 190873, 190874, 190875, 190876, 190877, 190878, 190879, 190880, 190881, 190882, 190883, 190884, 190885, 190886, 190887, 190888, 190889, 190890, 190891, 190892, 190893, 190898, 190899, 190900, 190901, 190902, 190903, 190904, 190905, 190906, 190907, 190908, 190909, 190910, 190911, 190930, 190931, 190932, 190933, 190934); +UPDATE `gameobject` SET `phaseMask`=32 WHERE `id` IN (192273, 192274, 192406, 192407, 192416, 192417, 192418, 192433); +UPDATE `gameobject` SET `phaseMask`=35 WHERE `id` IN (190800, 191166, 191167, 191169, 191171, 191172, 191173, 191178, 191191); +UPDATE `gameobject` SET `phaseMask`=51 WHERE `id`=190789; +UPDATE `gameobject` SET `phaseMask`=64 WHERE `id` IN (192269, 192277, 192278, 192414, 192429, 193110, 193111, 193112, 193113, 193114, 193115, 193116, 193117, 193118, 193119, 193120, 193121, 193122, 193123); +UPDATE `gameobject` SET `phaseMask`=66 WHERE `id`=192579; +UPDATE `gameobject` SET `phaseMask`=128 WHERE `id` IN (191261, 191262, 191263, 191264, 191265, 191266, 191267, 191268, 191269, 191270, 191271); +UPDATE `gameobject` SET `phaseMask`=129 WHERE `id` IN (192575, 192578); +UPDATE `gameobject` SET `phaseMask`=193 WHERE `id` IN (192576, 192577); +UPDATE `gameobject` SET `phaseMask`=198 WHERE `id` IN (192934, 192935, 192936, 192937, 192938, 192953, 192954, 192955, 192956, 192957, 192981); +UPDATE `gameobject` SET `phaseMask`=204 WHERE `id` IN (190801, 190802, 190804, 190805, 190806, 190807, 190808, 190809, 190810, 190811, 190812, 190813, 190814, 190815, 190894, 190895, 190896, 190912, 190913, 190935, 191165, 191168, 191170, 191174, 191175, 191176, 191177, 191190); +UPDATE `gameobject` SET `phaseMask`=257 WHERE `id`=192038; +UPDATE `gameobject` SET `phaseMask`=510 WHERE `id` IN (192958, 192959, 192960, 192961, 192962, 192963, 192964, 192965, 192966, 192967, 192968, 192969, 192970, 192971, 192972, 192973, 192974, 192975, 192976, 192977, 192978, 192979, 192980, 192982, 192983, 192985, 192986, 192987, 192988, 192989, 192990, 192991, 192992, 192993, 192994, 192995, 192996, 192997, 192999, 193000, 193001, 193002); +UPDATE `gameobject` SET `phaseMask`=511 WHERE `id` IN (192522, 192787); -- cgit v1.2.3 From ae18b84c735607b44efdd3aa18c19d84e363853f Mon Sep 17 00:00:00 2001 From: Kinzcool Date: Sun, 8 Jun 2014 03:11:36 -0400 Subject: DB/GameObjects: Fixed the phasing of the remaining flags in WinterGrasp --- .../world/2014_06_08_02_world_gameobject.sql | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sql/updates/world/2014_06_08_02_world_gameobject.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_06_08_02_world_gameobject.sql b/sql/updates/world/2014_06_08_02_world_gameobject.sql new file mode 100644 index 00000000000..5b5bfa9a90c --- /dev/null +++ b/sql/updates/world/2014_06_08_02_world_gameobject.sql @@ -0,0 +1,40 @@ +SET @OGUID := 75166; + +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+28; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`) VALUES +(@OGUID+0, 192252, 571, 128, 5154.37, 2853.23, 409.183, 3.14159, 0, 0, 1, 0), -- Alliance Banner +(@OGUID+1, 192253, 571, 128, 5154.42, 2828.93, 409.189, 3.14159, 0, 0, 1, 0), -- Alliance Banner +(@OGUID+2, 192266, 571, 64, 4452.8, 2639, 358.552, 1.4748, 0, 0, -0.672366, 0.740219), -- Alliance Banner +(@OGUID+3, 192267, 571, 128, 4452.76, 2639.14, 358.444, 1.67552, 0, 0, 0.743145, 0.66913), -- Horde Banner +(@OGUID+4, 192268, 571, 128, 4526.51, 2810.18, 390.986, 3.26377, 0, 0, 0.998135, -0.061049), -- Horde Banner +(@OGUID+5, 192270, 571, 64, 4424.71, 2975.6, 367.387, 1.69297, 0, 0, 0.748955, 0.662621), -- Alliance Banner +(@OGUID+6, 192271, 571, 128, 4424.74, 2975.6, 367.227, 1.7017, 0, 0, 0.75184, 0.659346), -- Horde Banner +(@OGUID+7, 192272, 571, 16, 4417.93, 2324.81, 371.219, 3.09796, 0, 0, 0.999762, 0.021815), -- Horde Banner +(@OGUID+8, 192275, 571, 16, 4424.03, 3286.61, 371.418, 3.14159, 0, 0, 1, 0), -- Horde Banner +(@OGUID+9, 192276, 571, 128, 4572.94, 3475.42, 362.805, 1.37881, 0, 0, 0.636078, 0.771625), -- Horde Banner +(@OGUID+10, 192279, 571, 128, 4433.92, 3534.2, 359.942, 1.91113, 0, 0, -0.816641, 0.577146), -- Horde Banner +(@OGUID+11, 192408, 571, 16, 4399.64, 3231.54, 368.898, 1.49226, 0, 0, 0.678801, 0.734322), -- Horde Banner +(@OGUID+12, 192409, 571, 32, 4399.59, 3231.43, 369.216, 1.67552, 0, 0, -0.743145, 0.66913), -- Alliance Banner +(@OGUID+13, 192415, 571, 64, 4517.79, 2716.99, 387.57, 1.53589, 0, 0, -0.694658, 0.71934), -- Alliance Banner +(@OGUID+14, 192423, 571, 64, 4563.73, 2171.15, 367.68, 1.30027, 0, 0, 0.605294, 0.796002), -- Alliance Banner +(@OGUID+15, 192424, 571, 128, 4563.7, 2171.03, 367.607, 1.82387, 0, 0, -0.79069, 0.612217), -- Horde Banner +(@OGUID+16, 192430, 571, 64, 4434.56, 2883.45, 406.025, 0.759216, 0, 0, 0.370557, 0.92881), -- Alliance Banner +(@OGUID+17, 192431, 571, 64, 4349.9, 2885.56, 406.105, 1.6057, 0, 0, 0.71934, 0.694658), -- Alliance Banner +(@OGUID+18, 192432, 571, 16, 4401.62, 3377.48, 363.12, 1.53589, 0, 0, 0.694658, 0.71934), -- Horde Banner +(@OGUID+19, 192440, 571, 128, 4438.38, 3361.01, 371.814, 0.0348707, 0, 0, -0.017452, 0.999848), -- Horde Banner +(@OGUID+20, 192441, 571, 16, 4448.15, 3235.61, 370.617, 1.56207, 0, 0, -0.704015, 0.710185), -- Horde Banner +(@OGUID+21, 192442, 571, 128, 4350.04, 2885.61, 406.329, 1.58825, 0, 0, 0.713251, 0.700909), -- Horde Banner +(@OGUID+22, 192443, 571, 128, 4434.33, 2883.24, 406.346, 0.767944, 0, 0, 0.374607, 0.927184), -- Horde Banner +(@OGUID+23, 192444, 571, 128, 4464.17, 2855.32, 406.391, 0.802851, 0, 0, 0.390731, 0.920505), -- Horde Banner +(@OGUID+24, 192449, 571, 128, 4517.75, 2717.23, 387.812, 1.53589, 0, 0, -0.694658, 0.71934), -- Horde Banner +(@OGUID+25, 192450, 571, 128, 4387.59, 2719.9, 390.201, 1.51843, 0, 0, -0.688354, 0.725375), -- Horde Banner +(@OGUID+26, 192451, 571, 16, 4408.65, 2422.67, 377.454, 1.58825, 0, 0, 0.713251, 0.700909), -- Horde Banner +(@OGUID+27, 192452, 571, 128, 4416.8, 2414.04, 377.487, 0.00895035, 0, 0, 0.004363, 0.99999), -- Horde Banner +(@OGUID+28, 192453, 571, 16, 4417.56, 2301.07, 377.43, 0.017442, 0, 0, 0.008727, 0.999962); -- Horde Banner + + +UPDATE `gameobject` SET `position_x`=4526.46, `position_y`=2810.18, `position_z`=391.2, `orientation`=3.28995 WHERE `id`=192269; -- Horde Banner +UPDATE `gameobject` SET `position_x`=4991.04, `position_y`=2525.72, `position_z`=340.366, `orientation`=4.04916 WHERE `id`=192290; -- Horde Banner +UPDATE `gameobject` SET `position_x`=4991.08, `position_y`=2525.76, `position_z`=340.918, `orientation`=4.04044 WHERE `id`=192291; -- Alliance Banner +UPDATE `gameobject` SET `position_x`=5352.15, `position_y`=3054.77, `position_z`=444.61, `orientation`=1.57952 WHERE `id`=192376; -- Horde Banner +UPDATE `gameobject` SET `position_x`=4408.57, `position_y`=2422.61, `position_z`=377.179, `orientation`=1.58825 WHERE `id`=192416; -- Alliance Banner -- cgit v1.2.3 From 9d481fd64ddec25d55940a986eaef4bb5f95895f Mon Sep 17 00:00:00 2001 From: Kinzcool Date: Sun, 8 Jun 2014 03:13:18 -0400 Subject: DB/GameObjects: Deleted no longer needed gameobjects spawns since their phaseMask correction --- sql/updates/world/2014_06_08_03_world_gameobject.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/2014_06_08_03_world_gameobject.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_06_08_03_world_gameobject.sql b/sql/updates/world/2014_06_08_03_world_gameobject.sql new file mode 100644 index 00000000000..8fe57fa39b5 --- /dev/null +++ b/sql/updates/world/2014_06_08_03_world_gameobject.sql @@ -0,0 +1 @@ +DELETE FROM `gameobject` WHERE `guid` IN (66459, 66460, 66461, 66462, 66463, 66464, 66465, 66466, 66467, 66468, 66469, 66470, 66478, 66479, 66516, 66518, 66520, 66600, 66601, 66602, 66603, 66604, 66605, 66606, 66607, 66608, 66609, 66610, 74688, 74690, 74696, 74698, 74702, 74704, 74706, 74712, 74714, 74720, 74722, 74724, 74726, 74728, 74730, 74732, 74734, 74736, 74738, 74740, 74742, 74744, 74746, 74748, 74750, 74752, 74754, 74756, 74758, 74760, 74762, 74764, 74766, 74768, 74770, 74772); -- cgit v1.2.3 From d66d1af271823170b4a910b81fdd20626aa1e00f Mon Sep 17 00:00:00 2001 From: Aokromes Date: Mon, 9 Jun 2014 10:11:56 +0200 Subject: DB/Quest: Fix some missing quest texts By crysicle, closes #12167 --- sql/updates/world/2014_06_09_00_world_quest_template.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/2014_06_09_00_world_quest_template.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_06_09_00_world_quest_template.sql b/sql/updates/world/2014_06_09_00_world_quest_template.sql new file mode 100644 index 00000000000..240dd4a75d2 --- /dev/null +++ b/sql/updates/world/2014_06_09_00_world_quest_template.sql @@ -0,0 +1,3 @@ +-- +UPDATE `quest_template` SET `RequestItemsText` = 'What business is it you wish to speak of, $N? You must feel it is important if you continue to pester me.' WHERE `id` = 6522; +UPDATE `quest_template` SET `OfferRewardText` = 'I recognize the insignia on this scroll, $N. You found this on that crone who reigns over Razorfen Kraul? Interesting.$b$bThe Scourge aren''t content with one continent it seems. This Ambassador Malcin--the one who wrote the note--is one of the Scourge''s plagued servants, a human diplomat to the kingdom of Lordaeron before things... changed.$b$bIf the Scourge are trying to gain a foothold in Kalimdor, then it is up to us to act.' WHERE `id` = 6522; -- cgit v1.2.3 From 52c0fc96bb4a8a62218bd383f360c0e1350ef62a Mon Sep 17 00:00:00 2001 From: Unholychick Date: Wed, 11 Jun 2014 19:59:50 +0200 Subject: Move pestilence to spellscripts Fixes crash and warnings introduced in d4bbc26261d7ce1e01292470f77390ab3c2f5e98 Fixes a bug that allowed dks to spread diseases using another dks diseases Closes: https://github.com/TrinityCore/TrinityCore/issues/12245 --- .../2014_06_11_01_world_spell_script_names.sql | 3 + src/server/game/Spells/Auras/SpellAuraEffects.cpp | 3 +- src/server/game/Spells/SpellEffects.cpp | 45 ----------- src/server/scripts/Spells/spell_dk.cpp | 89 ++++++++++++++++++++++ 4 files changed, 94 insertions(+), 46 deletions(-) create mode 100644 sql/updates/world/2014_06_11_01_world_spell_script_names.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_06_11_01_world_spell_script_names.sql b/sql/updates/world/2014_06_11_01_world_spell_script_names.sql new file mode 100644 index 00000000000..433f1cf8b09 --- /dev/null +++ b/sql/updates/world/2014_06_11_01_world_spell_script_names.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id` = 50842; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (50842, 'spell_dk_pestilence'); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index a0883c895d3..8b9d581cd10 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -379,8 +379,9 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]= AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32 *baseAmount, Unit* caster): m_base(base), m_spellInfo(base->GetSpellInfo()), m_baseAmount(baseAmount ? *baseAmount : m_spellInfo->Effects[effIndex].BasePoints), +m_damage(0), m_critChance(0.0f), m_donePct(1.0f), m_spellmod(NULL), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex), -m_canBeRecalculated(true), m_damage(0), m_critChance(0.0f), m_donePct(1.0f), m_isPeriodic(false) +m_canBeRecalculated(true), m_isPeriodic(false) { CalculatePeriodic(caster, true, false); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 48c73cf39ca..1b1730c9aaa 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -4049,51 +4049,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) } break; } - case SPELLFAMILY_DEATHKNIGHT: - { - // Pestilence - if (m_spellInfo->SpellFamilyFlags[1]&0x10000) - { - // Get diseases on target of spell - if (m_targets.GetUnitTarget() && // Glyph of Disease - cast on unit target too to refresh aura - (m_targets.GetUnitTarget() != unitTarget || m_caster->HasAura(63334))) - { - // And spread them on target - // Blood Plague - if (m_targets.GetUnitTarget()->HasAura(55078)) - { - AuraEffect* aurEffOld = m_targets.GetUnitTarget()->GetAura(55078)->GetEffect(0); - float donePct = aurEffOld->GetDonePct(); - float critChance = aurEffOld->GetCritChance(); - - m_caster->CastSpell(unitTarget, 55078, true); - - if (unitTarget->HasAura(55078)) - if (AuraEffect* aurEffNew = unitTarget->GetAura(55078)->GetEffect(0)) - { - aurEffNew->SetCritChance(critChance); // Blood Plague can crit if caster has T9. - aurEffNew->SetDonePct(donePct); - aurEffNew->SetDamage(m_caster->SpellDamageBonusDone(unitTarget, aurEffNew->GetSpellInfo(), std::max(aurEffNew->GetAmount(), 0), DOT) * donePct); - } - } - // Frost Fever - if (m_targets.GetUnitTarget()->HasAura(55095)) - { - float donePct = m_targets.GetUnitTarget()->GetAura(55095)->GetEffect(0)->GetDonePct(); - - m_caster->CastSpell(unitTarget, 55095, true); - - if (unitTarget->HasAura(55095)) - if (AuraEffect* aurEffNew = unitTarget->GetAura(55095)->GetEffect(0)) - { - aurEffNew->SetDonePct(donePct); - aurEffNew->SetDamage(m_caster->SpellDamageBonusDone(unitTarget, aurEffNew->GetSpellInfo(), std::max(aurEffNew->GetAmount(), 0), DOT) * donePct); - } - } - } - } - break; - } } // normal DB scripted effect diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 5ae0e1601c5..cc32e773b60 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -39,9 +39,11 @@ enum DeathKnightSpells SPELL_DK_DEATH_COIL_DAMAGE = 47632, SPELL_DK_DEATH_COIL_HEAL = 47633, SPELL_DK_DEATH_STRIKE_HEAL = 45470, + SPELL_DK_FROST_FEVER = 55095, SPELL_DK_FROST_PRESENCE = 48263, SPELL_DK_FROST_PRESENCE_TRIGGERED = 61261, SPELL_DK_GHOUL_EXPLODE = 47496, + SPELL_DK_GLYPH_OF_DISEASE = 63334, SPELL_DK_GLYPH_OF_ICEBOUND_FORTITUDE = 58625, SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1 = 50365, SPELL_DK_IMPROVED_FROST_PRESENCE_R1 = 50384, @@ -51,6 +53,7 @@ enum DeathKnightSpells SPELL_DK_ITEM_SIGIL_VENGEFUL_HEART = 64962, SPELL_DK_ITEM_T8_MELEE_4P_BONUS = 64736, SPELL_DK_MASTER_OF_GHOULS = 52143, + SPELL_DK_BLOOD_PLAGUE = 55078, SPELL_DK_RAISE_DEAD_USE_REAGENT = 48289, SPELL_DK_RUNIC_POWER_ENERGIZE = 49088, SPELL_DK_SCENT_OF_BLOOD = 50422, @@ -933,6 +936,91 @@ class spell_dk_improved_unholy_presence : public SpellScriptLoader } }; +// ID - 50842 Pestilence +class spell_dk_pestilence : public SpellScriptLoader +{ + public: + spell_dk_pestilence() : SpellScriptLoader("spell_dk_pestilence") { } + + class spell_dk_pestilence_SpellScript : public SpellScript + { + PrepareSpellScript(spell_dk_pestilence_SpellScript); + + bool Validate(SpellInfo const* spellInfo) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DK_GLYPH_OF_DISEASE) + || !sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_PLAGUE) + || !sSpellMgr->GetSpellInfo(SPELL_DK_FROST_FEVER)) + return false; + return true; + } + + void OnHit(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + Unit* hitUnit = GetHitUnit(); + Unit* victim = GetExplTargetUnit(); + + if (!victim) + return; + + if (victim != hitUnit || caster->HasAura(SPELL_DK_GLYPH_OF_DISEASE)) + { + if (Aura* aurOld = victim->GetAura(SPELL_DK_BLOOD_PLAGUE, caster->GetGUID())) // Check Blood Plague application on victim. + { + if (AuraEffect* aurEffOld = aurOld->GetEffect(EFFECT_0)) + { + float donePct = aurEffOld->GetDonePct(); + float critChance = aurEffOld->GetCritChance(); + + caster->CastSpell(hitUnit, SPELL_DK_BLOOD_PLAGUE, true); // Spread the disease to hitUnit. + + if (Aura* aurNew = hitUnit->GetAura(SPELL_DK_BLOOD_PLAGUE, caster->GetGUID())) // Check Blood Plague application on hitUnit. + { + if (AuraEffect* aurEffNew = aurNew->GetEffect(EFFECT_0)) + { + aurEffNew->SetCritChance(critChance); // Blood Plague can crit if caster has T9. + aurEffNew->SetDonePct(donePct); + aurEffNew->SetDamage(caster->SpellDamageBonusDone(hitUnit, aurEffNew->GetSpellInfo(), std::max(aurEffNew->GetAmount(), NULL), DOT) * donePct); + } + } + } + } + + if (Aura* aurOld = victim->GetAura(SPELL_DK_FROST_FEVER, caster->GetGUID())) // Check Frost Fever application on victim. + { + if (AuraEffect* aurEffOld = aurOld->GetEffect(EFFECT_0)) + { + float donePct = aurEffOld->GetDonePct(); + + caster->CastSpell(hitUnit, SPELL_DK_FROST_FEVER, true); // Spread the disease to hitUnit. + + if (Aura* aurNew = hitUnit->GetAura(SPELL_DK_FROST_FEVER, caster->GetGUID())) // Check Frost Fever application on hitUnit. + { + if (AuraEffect* aurEffNew = aurNew->GetEffect(EFFECT_0)) + { + aurEffNew->SetDonePct(donePct); + aurEffNew->SetDamage(caster->SpellDamageBonusDone(hitUnit, aurEffNew->GetSpellInfo(), std::max(aurEffNew->GetAmount(), NULL), DOT) * donePct); + } + } + } + } + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_dk_pestilence_SpellScript::OnHit, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_dk_pestilence_SpellScript(); + } +}; + + // 48266 - Blood Presence // 48263 - Frost Presence // 48265 - Unholy Presence @@ -1467,6 +1555,7 @@ void AddSC_deathknight_spell_scripts() new spell_dk_improved_blood_presence(); new spell_dk_improved_frost_presence(); new spell_dk_improved_unholy_presence(); + new spell_dk_pestilence(); new spell_dk_presence(); new spell_dk_raise_dead(); new spell_dk_rune_tap_party(); -- cgit v1.2.3