aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_04_13_00_world_sai.sql25
-rw-r--r--sql/updates/world/2012_04_13_01_world_misc.sql219
-rw-r--r--sql/updates/world/2012_04_13_02_world_misc.sql18
-rw-r--r--sql/updates/world/2012_04_13_03_world_bg_template.sql7
-rw-r--r--sql/updates/world/2012_04_13_04_world_spell_proc_event.sql4
-rw-r--r--sql/updates/world/2012_04_14_00_world_gameobject_loot_template.sql3
-rw-r--r--sql/updates/world/2012_04_14_01_world_gameobject_loot_template.sql11
-rw-r--r--sql/updates/world/2012_04_14_02_world_creature_template_addon.sql3
-rw-r--r--sql/updates/world/2012_04_14_03_world_spell_bonus_data.sql1
-rw-r--r--sql/updates/world/2012_04_14_04_world_spell_proc_event.sql3
-rw-r--r--sql/updates/world/2012_04_14_05_world_spell_proc_event.sql1
-rw-r--r--sql/updates/world/2012_04_16_00_world_game_event.sql4
-rw-r--r--src/server/game/AI/CoreAI/GameObjectAI.h23
-rwxr-xr-xsrc/server/game/AI/CreatureAISelector.cpp3
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h2
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.cpp39
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.h4
-rwxr-xr-xsrc/server/game/Battlegrounds/BattlegroundMgr.cpp28
-rwxr-xr-xsrc/server/game/Battlegrounds/BattlegroundMgr.h1
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.cpp7
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp9
-rwxr-xr-xsrc/server/game/Entities/Unit/StatSystem.cpp2
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp83
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.h2
-rwxr-xr-xsrc/server/game/Miscellaneous/SharedDefines.h28
-rwxr-xr-xsrc/server/game/Movement/MotionMaster.cpp3
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp2
-rwxr-xr-xsrc/server/game/Reputation/ReputationMgr.h4
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.cpp8
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.h5
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp34
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp30
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.cpp6
-rw-r--r--src/server/game/Warden/Warden.cpp4
-rw-r--r--src/server/game/Warden/WardenCheckMgr.cpp11
-rw-r--r--src/server/game/Warden/WardenCheckMgr.h2
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp2
-rwxr-xr-xsrc/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp158
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp1
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp19
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp48
-rwxr-xr-xsrc/server/shared/Database/DatabaseWorkerPool.h4
44 files changed, 699 insertions, 176 deletions
diff --git a/sql/updates/world/2012_04_13_00_world_sai.sql b/sql/updates/world/2012_04_13_00_world_sai.sql
new file mode 100644
index 00000000000..0fd4bdddd9b
--- /dev/null
+++ b/sql/updates/world/2012_04_13_00_world_sai.sql
@@ -0,0 +1,25 @@
+UPDATE `smart_scripts` SET `target_type`=`action_param6` WHERE
+(`entryorguid`=369200 AND `source_type`=9 AND `id`=3) OR
+(`entryorguid`=369201 AND `source_type`=9 AND `id`=3) OR
+(`entryorguid`=3692 AND `source_type`=0 AND `id`=2) OR
+(`entryorguid`=3692 AND `source_type`=0 AND `id`=3) OR
+(`entryorguid`=3584 AND `source_type`=0 AND `id`=3) OR
+(`entryorguid`=3584 AND `source_type`=0 AND `id`=4) OR
+(`entryorguid`=954600 AND `source_type`=9 AND `id`=2) OR
+(`entryorguid`=954600 AND `source_type`=9 AND `id`=3) OR
+(`entryorguid`=7207 AND `source_type`=0 AND `id`=1) OR
+(`entryorguid`=7207 AND `source_type`=0 AND `id`=2) OR
+(`entryorguid`=911700 AND `source_type`=9 AND `id`=3);
+
+UPDATE `smart_scripts` SET `action_param6`=0 WHERE
+(`entryorguid`=369200 AND `source_type`=9 AND `id`=3) OR
+(`entryorguid`=369201 AND `source_type`=9 AND `id`=3) OR
+(`entryorguid`=3692 AND `source_type`=0 AND `id`=2) OR
+(`entryorguid`=3692 AND `source_type`=0 AND `id`=3) OR
+(`entryorguid`=3584 AND `source_type`=0 AND `id`=3) OR
+(`entryorguid`=3584 AND `source_type`=0 AND `id`=4) OR
+(`entryorguid`=954600 AND `source_type`=9 AND `id`=2) OR
+(`entryorguid`=954600 AND `source_type`=9 AND `id`=3) OR
+(`entryorguid`=7207 AND `source_type`=0 AND `id`=1) OR
+(`entryorguid`=7207 AND `source_type`=0 AND `id`=2) OR
+(`entryorguid`=911700 AND `source_type`=9 AND `id`=3);
diff --git a/sql/updates/world/2012_04_13_01_world_misc.sql b/sql/updates/world/2012_04_13_01_world_misc.sql
new file mode 100644
index 00000000000..e4d04449a3f
--- /dev/null
+++ b/sql/updates/world/2012_04_13_01_world_misc.sql
@@ -0,0 +1,219 @@
+-- Gnomish Playback Device (item 52709) Targeting condition -- by norfik closes #2169
+DELETE FROM `conditions` WHERE `SourceEntry`=74222 AND `ConditionValue2` IN (1268, 7955, 6119);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, 74222, 1, 31, 3, 1268, 0, 63, '', 'Gnomish Playback Device on Ozzie Togglevolt'),
+(17, 0, 74222, 2, 31, 3, 7955, 0, 63, '', 'Gnomish Playback Device on Milli Featherwhistle'),
+(17, 0, 74222, 3, 31, 3, 6119, 0, 63, '', 'Gnomish Playback Device on Tog Rustsprocket');
+
+-- fix revenge ap coeff -- by ric101 closes #3344
+UPDATE `spell_bonus_data` SET `ap_bonus` = 0.310 WHERE `entry` = 6572;
+
+-- fix life seed sp coeff -- by warpten closes #4162
+DELETE FROM `spell_bonus_data` WHERE `entry`=48503;
+INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
+(48503,0,0,0,0, 'Druid - Living Seed Heal');
+
+-- fix glyph of shadowflame proc only allow on damage. by kandera closes #3530
+UPDATE `spell_proc_event` SET `procEx` = procEx|262144 WHERE`entry` = 63310; -- Glyph of shadowflame fix
+
+-- Disable deprecated quests /in 2.4/ from Midsummer Festival - The Festival of Fire {A/H} by trista closes #5982
+DELETE FROM `disables` WHERE `sourceType` = 1 AND `entry` in (9367,9368);
+INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
+(1,9367,0,0,0,'Disable quest The Festival of Fire {A}/Deprecated after 2.4 Midsummer Festival revamp/'),
+(1,9368,0,0,0,'Disable quest The Festival of Fire {H}/Deprecated after 2.4 Midsummer Festival revamp/');
+
+-- fix gameobject spawn for just maces sign -- by mrsmite closes #5849
+DELETE FROM `gameobject` WHERE `guid` = 10714;
+UPDATE `gameobject` SET `guid` = 10714 WHERE `guid` = 61895 AND `id` = 2157;
+
+-- update npc texts. by helias closes #6098
+DELETE FROM `npc_text` WHERE `ID` IN (10719,10782,10783,10787,10788,2838,9072,9110,10310,13293,13641,14089,15077,15155,15240,15412,15866,15873,15877,8663,8244,8254,8255,8282,8291,8296,8298,11093,3464,4776,4713,12130,13002,9984,12977,12978,10918,10999,10986,10991);
+INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`) VALUES
+(10719, '<The chime of A"dal"s voice echoes reassuringly through your mind.>$B$BWorry not, child. Look in your pack and you will find it once more.', NULL, 0, 1, 0, 0, 0, 0, 0, 0),
+(10782, 'Sayoc, da ugly orc here, teach you daggers. You want teaching in other places, you talk to Ileda in da Farstrider Square of Silvermoon or Archibald in the War Quarter of Undercity, hokay?', 'Sayoc, da ugly orc here, teach you daggers. You want teaching in other places, you talk to Ileda in da Farstrider Square of Silvermoon or Archibald in the War Quarter of Undercity, hokay?', 1, 1, 0, 0, 0, 0, 0, 0),
+(10783, 'You want to punch things, yah? Talk to Sayoc right here. He teach you.', 'You want to punch things, yah? Talk to Sayoc right here. He teach you.', 1, 1, 0, 0, 0, 0, 0, 0),
+(10787, 'Ileda of da blood elves, in Farstrider Square of Silvermoon, train her students in both one and two-handed swords. Archibald, da Undercity"s weapon master, also train you, mon. He in da War Quarter.', 'Ileda of da blood elves, in Farstrider Square of Silvermoon, train her students in both one and two-handed swords. Archibald, da Undercity"s weapon master, also train you, mon. He in da War Quarter.', 1, 1, 0, 0, 0, 0, 0, 0),
+(10788, 'Hanashi here knows staves. If you want a sturdier instructor, go to Thunder Bluff. Ansekhwa will teach you on the lower central rise there.', '', 1, 1, 0, 0, 0, 0, 0, 0),
+(2838, '', 'Sure thing, $N. Here"s another for you.', 0, 1, 0, 0, 0, 0, 0, 0),
+(9072, 'A search of the corpse"s clothing and equipment reveals the insignia you need, undamaged by the battle and foul environment.', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(9110, 'Say, you happen to see that arch in the lake to the west? I wonder where that goes? I should go divin" over there.', '', 0, 1, 0, 1, 0, 0, 0, 0),
+(10310, 'You must be exalted with the blood elves before I will teach you a riding skill, $c.', '', 1, 1, 0, 1, 0, 0, 0, 0),
+(13293, 'Please hurry, $N. I am in a great deal of pain and time is running out.', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(13641, '<Brann looks at you expectantly.>', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(14089, 'I"ve got a lead on Norgannon"s keystone, which guards access to Ulduar"s archives, but the Titans divided it into two pieces and secreted them away.$B$BOne of the pieces, the keystone"s shell, is held within the Inventor"s Library on the northern coast, south of Ulduar itself. The first thing you"ll need to do is retrieve the fragments of an access disk from the library"s guardians.', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(15077, 'There you are! I was beginning to think that the Sunreavers had intercepted you. Are you ready to deliver the tome to our representatives in Icecrown?', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(15155, 'These appear to be the remains of Thalorien Dawnseeker, the last wielder of Quel"Delar.', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(15240, 'I will escort you into the Sunwell when you"re ready.', 'I will escort you into the Sunwell when you"re ready.', 0, 1, 0, 0, 0, 0, 0, 0),
+(15412, 'We got the final barrier blockin" entry to Frostwing Halls down, $g lad:lass;. Only Sindragosa stands between the Lich King and divine retribution! What are ye waitin" for?!', '', 0, 1, 0, 5, 0, 0, 0, 0),
+(15866, 'De Darkspears have a home again! An" we couldn"t have done it wit"out ya helpin", $N. Now, we celebrate!', '', 0, 1, 0, 1, 0, 1, 0, 0),
+(15873, 'Vol"jin told me ta keep hittin" da drum till he gets back. If ya be waitin" for him, he"d be back soon to take back da Isles.$B$BJust wait here and enjoy da music!', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(15877, 'We require da help of allies on da islands.$B$BZen"tabra has been watching over da animals of de Islands for some time now. We"d need her help and da help of da animal creatures.$B$BBwonsamdi is a powerful loa dat controls de spirits of de dead on da islands. His blessing is crucial for our attack.$B$BOnce our allies have joined us, Zalazane and his army of mind-controlled trolls will have no chance! Then, da Echo Isles will be de Darkspears!', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(8663, 'Thank you for delivering that list! My leg is almost recovered enough that I"ll be able to walk back to the crash site.', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(8244, 'We"ve been so wrapped up in this war, some of us forgot to make time for love.', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(8254, 'You work with machines for so long, sometimes you forget about real hearts.', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(8255, '', 'When you have lived as long as I, it becomes easy to forget about love for years. It is always good to be reminded.', 0, 1, 0, 0, 0, 0, 0, 0),
+(8282, '', 'You look like you"ve had your heart broken. Come back when you"re not so sad.', 0, 1, 0, 25, 0, 153, 0, 0),
+(8291, 'What, you don"t have a token to give me? Don"t you love me?', '', 0, 1, 0, 18, 0, 0, 0, 0),
+(8296, 'It looks like you"ve already found love. You can give me a love token, but I"m not giving you anything nice. I"m waiting for someone special.', 'It looks like you"ve already found love. You can give me a love token, but I"m not giving you anything nice. I"m waiting for someone special.', 0, 1, 0, 1, 0, 0, 0, 0),
+(8298, 'I"d like you better if you would apply some perfume.', 'I"d like you better if you would apply some perfume.', 0, 1, 0, 24, 0, 0, 0, 0),
+(11093, 'Let"s get out of here!', '', 0, 1, 0, 5, 0, 0, 0, 0),
+(3464, '', 'You do fine work, but it"s a bit rough around the edges. Don"t worry about it, it will come with practice. Speaking of which, how about we see what you"ve been working on?', 7, 1, 0, 0, 0, 0, 0, 0),
+(4776, 'The battle is over, and the people of Darrowshire are saved.', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(4713, 'The Nightmare is finally over! Darrowshire, forgive me!', '', 0, 1, 0, 15, 0, 0, 0, 0),
+(12130, '<Old Icefin eyes you warily, his fishy eye blinking as he bobs his head up and down once in a curt dismissal.>', '', 0, 1, 0, 0, 0, 0, 0, 0),
+(13002, 'There ya go, mon. Try ta be more careful with this one, won"t ya?$b$bNow head down ta Drak"Zin Ruins and drink it near the pedestal!', NULL, 0, 1, 0, 0, 0, 0, 0, 0),
+(9984, 'What are ye doin" here?! Get yer chatty self ta Alterac Vallery, where ye"re needed!', '', 7, 1, 1, 5, 0, 0, 0, 0),
+(12977, 'Blight, Blight, Blight... that"s all I hear about around here. I miss the diversity!$b$bHere, here. You have pets, yes? Of course you do. Of course. Little pets. I have a mixture for them. It will make them ca-- ah, clever and strong creatures, yes. Yes. ', '', 1, 1, 396, 5, 0, 0, 0, 0),
+(12978, 'Careful with it. It"s unstable and loses its potency quickly. Use it soon! And... preferably within eyesight, yes...', '', 1, 1, 5, 0, 0, 0, 0, 0),
+(10918, 'The boy"s too stupid still to say it -- not enough crystal exposure yet -- but, he"s thankful for what you did in getting him those flasks.$B$BNow, only nine more sons to go. Gah!$B$B<Both of Torkus"s heads sigh.>$B$BWant to take one of them off of our hands? We"ll sell him to you cheap.', '', 0, 1, 0, 1, 0, 5, 0, 6),
+(10999, 'Friend! It"s been too long. What can we get for you?', '', 0, 1, 1, 1, 0, 0, 0, 0),
+(10986, 'Our drinks should quench even the mightiest of thirsts.', '', 0, 1, 1, 396, 0, 0, 0, 0),
+(10991, 'What can I say, $N? Yer the finest o" the Sha"tari Skyguard!$B$BJust don"t be lettin" that go ta yer head. I can still teach ya a thing or two, $G lad : lass;!$B$B<Sky Commander Keller grins at you and winks.>', '', 0, 0, 0, 0, 0, 0, 0, 0);
+
+-- Fix Kor'kron War Rider flying by trista closes #5569
+UPDATE `creature_template` SET `inhabittype`=5,`speed_walk`=1, `speed_run`=1 WHERE `entry`=26813;
+
+-- Gretta the Arbiter (Storm Peaks, Brunhilldar) by mweinelt closes #5493
+-- Daily Quest Pooling
+-- Source: http://www.wowwiki.com/Gretta_the_Arbiter
+SET @pool_id := 354;
+
+DELETE FROM `pool_template` WHERE `entry` = @pool_id;
+INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
+(@pool_id, 1, 'Gretta the Arbiter - Daily Quests');
+
+DELETE FROM `pool_quest` WHERE `entry` IN (13424, 13423, 13422, 13425);
+INSERT INTO `pool_quest` (`entry`, `pool_entry`, `description`) VALUES
+(13424, @pool_id, 'Back to the Pit'),
+(13423, @pool_id, 'Defending Your Title'),
+(13422, @pool_id, 'Maintaining Discipline'),
+(13425, @pool_id, 'The Aberrations Must Die');
+
+-- Pathing for Arzeth the Merciless Entry: 19354 by kiperr closes #5510
+SET @NPC := 69051;
+SET @PATH := @NPC * 10;
+UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-617.6182,`position_y`=4800.323,`position_z`=38.53064 WHERE `guid`=@NPC;
+DELETE FROM `creature_addon` WHERE `guid`=@NPC;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, '');
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH,1,-546.5514,4799.893,33.83914,0,0,0,100,0),
+(@PATH,2,-512.5808,4799.929,32.09928,0,0,0,100,0),
+(@PATH,3,-480.9247,4799.97,28.25657,0,0,0,100,0),
+(@PATH,4,-512.6269,4799.873,32.09928,0,0,0,100,0),
+(@PATH,5,-542.1885,4799.724,33.71414,0,0,0,100,0),
+(@PATH,6,-570.3811,4800.449,34.60215,0,0,0,100,0),
+(@PATH,7,-592.3809,4800.299,35.85215,0,0,0,100,0),
+(@PATH,8,-617.6182,4800.323,38.53064,0,0,0,100,0),
+(@PATH,9,-659.4124,4799.819,49.09505,0,0,0,100,0),
+(@PATH,10,-582.4199,4800.242,34.97715,0,0,0,100,0),
+(@PATH,11,-546.5514,4799.893,33.83914,0,0,0,100,0),
+(@PATH,12,-542.1885,4799.724,33.71414,0,0,0,100,0),
+(@PATH,13,-570.3811,4800.449,34.60215,0,0,0,100,0),
+(@PATH,14,-592.3809,4800.299,35.85215,0,0,0,100,0),
+(@PATH,15,-617.6182,4800.323,38.53064,0,0,0,100,0),
+(@PATH,16,-659.4124,4799.819,49.09505,0,0,0,100,0),
+(@PATH,17,-512.5808,4799.929,32.09928,0,0,0,100,0),
+(@PATH,18,-480.9247,4799.97,28.25657,0,0,0,100,0),
+(@PATH,19,-512.6269,4799.873,32.09928,0,0,0,100,0),
+(@PATH,20,-542.1885,4799.724,33.71414,0,0,0,100,0),
+(@PATH,21,-570.3811,4800.449,34.60215,0,0,0,100,0),
+(@PATH,22,-592.3809,4800.299,35.85215,0,0,0,100,0),
+(@PATH,23,-617.6182,4800.323,38.53064,0,0,0,100,0),
+(@PATH,24,-659.4124,4799.819,49.09505,0,0,0,100,0),
+(@PATH,25,-582.4199,4800.242,34.97715,0,0,0,100,0),
+(@PATH,26,-512.6269,4799.873,32.09928,0,0,0,100,0),
+(@PATH,27,-542.1885,4799.724,33.71414,0,0,0,100,0),
+(@PATH,28,-570.3811,4800.449,34.60215,0,0,0,100,0),
+(@PATH,29,-592.3809,4800.299,35.85215,0,0,0,100,0),
+(@PATH,30,-617.6182,4800.323,38.53064,0,0,0,100,0);
+
+-- Dark Portal - corrects the entry position and orientation by cdawg closes #5470
+UPDATE `areatrigger_teleport` SET `target_position_x`=-248.149292, `target_position_y`=921.874953, `target_position_z`=84.388448, `target_orientation`=1.584155 WHERE `id`=4354;
+
+-- Add pamphlets to mail loot by gecko32 closes #5408
+DELETE FROM `mail_loot_template` WHERE `entry` BETWEEN 224 AND 233;
+INSERT INTO `mail_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+(224, 46875, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Elwynn Forest
+(225, 46876, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Darnassus
+(226, 46877, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Dun Morogh drawf
+(227, 46879, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Azuremyst Isle
+(228, 46878, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Dun Morogh gnome
+(229, 46884, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Mulgore
+(230, 46883, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Durator
+(231, 46880, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Orgrimmar
+(232, 46882, 100, 1, 0, 1, 1), -- Riding Training Pamphlet Eversong Woods
+(233, 46881, 100, 1, 0, 1, 1); -- Riding Training Pamphlet Tirisfal Glades
+
+-- fix coordinates for cannoneer whessan by mosoo closes #5406
+UPDATE `creature` SET `position_x`=-2093.53, `position_y`=-3496.47, `position_z`=130.084, `orientation`=3.008 WHERE `id`=3455 LIMIT 1;
+
+-- fix quest requirement for the last of her kind by shlomi 1515 closes #4875
+UPDATE `quest_template` SET `PrevQuestID` = 12900 WHERE `id` = 12983;
+
+-- Add rep reward to ICC25 Trash by gecko32 closes #5457
+DELETE FROM `creature_onkill_reputation` WHERE `creature_id` IN (37655,38031,38057,38058,38059,38061,38062,38063,38064,38072,38073,38074,38075,38076,38098,38099,38100,38101,38102,38103,38105,38108,38110,38126,38130,38131,38132,38133,38139,38151,38219,38220,38418,38445,38446,38479,38480,38481);
+INSERT INTO `creature_onkill_reputation` (`creature_id`, `RewOnKillRepFaction1`, `RewOnKillRepFaction2`, `MaxStanding1`, `IsTeamAward1`, `RewOnKillRepValue1`, `MaxStanding2`, `IsTeamAward2`, `RewOnKillRepValue2`, `TeamDependent`) VALUES
+(37655, 1156, 0, 7, 0, 45, 0, 0, 0, 0), -- Decaying colossus
+(38031, 1156, 0, 7, 0, 45, 0, 0, 0, 0), -- Deathbound Ward
+(38057, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Servant of the throne
+(38058, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Nerub'ar Broodkeeper
+(38059, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Ancient Skeletal Soldier
+(38061, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- The Damned
+(38062, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Plague Scientist
+(38063, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Vengeful Fleshreaper
+(38064, 1156, 0, 7, 0, 150, 0, 0, 0, 0), -- Stinky
+(38072, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Deathspeacker Attedent
+(38073, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Deathspeacker Disciple
+(38074, 1156, 0, 7, 0, 45, 0, 0, 0, 0), -- Deathspeacker High Preist
+(38075, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Deathspeacker Servant
+(38076, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Deathspeacker Zealot
+(38098, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Darkfallen Advisor
+(38099, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Darkfallen Archmage
+(38100, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Darkfallen Blood Knight
+(38101, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Darkfallen Lieutenant
+(38102, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Darkfallen Commander
+(38103, 1156, 0, 7, 0, 150, 0, 0, 0, 0), -- Precious
+(38105, 1156, 0, 7, 0, 2, 0, 0, 0, 0), -- Plagued Zombie
+(38108, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Blighted Abomination
+(38110, 1156, 0, 7, 0, 30, 0, 0, 0, 0), -- Pustulating Horror
+(38126, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Ymirjar Frostbinder
+(38130, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Ymirjar Deathbringer
+(38131, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Ymirjar Huntress
+(38132, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Ymirjar Battle-Maiden
+(38133, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Ymirjar Warlord
+(38139, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Frostwarden Handler
+(38151, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Frostwing Whelp
+(38219, 1156, 0, 7, 0, 150, 0, 0, 0, 0), -- Spinestalker
+(38220, 1156, 0, 7, 0, 150, 0, 0, 0, 0), -- Rimefang
+(38418, 1156, 0, 7, 0, 45, 0, 0, 0, 0), -- Val'kyr Herald
+(38445, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Spire Minion
+(38446, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Frenzied Abomination
+(38479, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Darkfallen Tactician
+(38480, 1156, 0, 7, 0, 15, 0, 0, 0, 0), -- Darkfallen Noble
+(38481, 1156, 0, 7, 0, 15, 0, 0, 0, 0); -- Spire Gargoyle
+
+-- fix procs by warpten closes #4467 for
+-- Needle-Encrusted Scorpion
+DELETE FROM `spell_proc_event` WHERE `entry`=71404;
+INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
+(71404,0,0,0,0,0,0,2,0,0,50);
+
+-- Black Magic
+DELETE FROM `spell_proc_event` WHERE `entry`=59630;
+INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
+(59630,0,0,0,0,0,0,0,0,0,35);
+
+-- Environment Creature Hight Update by shlomi1515 closes #4043
+UPDATE `creature` SET `position_z`=558.210022 WHERE `guid` IN (85141,85143,85154,85153,85142,85151,85152,85150);
+UPDATE `creature` SET `position_z`=586.302 WHERE `guid` IN (85145,85144,85146);
+UPDATE `creature` SET `position_z`=586.263 WHERE `guid` IN (85147,85148,85149);
+
+-- fix winterskorn raider not landing by nayd closes #3899
+UPDATE `creature_template` SET `InhabitType`=`InhabitType`|1 WHERE `entry`=23665;
+
+-- fix head of onyxia's loot closes by kandera #3851
+UPDATE `item_template` SET `flags` = flags|4096 WHERE `entry` IN (18422,18423,49644,49643);
+
+-- fix visual for plagued dragonsflayer tribesman by shlomi1515 closes #3518
+DELETE FROM `creature_addon` WHERE `guid` = 97540;
diff --git a/sql/updates/world/2012_04_13_02_world_misc.sql b/sql/updates/world/2012_04_13_02_world_misc.sql
new file mode 100644
index 00000000000..7c71af78cd7
--- /dev/null
+++ b/sql/updates/world/2012_04_13_02_world_misc.sql
@@ -0,0 +1,18 @@
+UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (38308,38309,37824); -- Professor Putricide triggers
+UPDATE `creature_template` SET `ScriptName`='npc_gas_cloud' WHERE `entry`=37562; -- Gas Cloud
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_putricide_ooze_summon';
+DELETE FROM `spell_target_position` WHERE `id` IN (71413,71414);
+INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
+(71414,631,4335.00,3206.75,389.399,0),
+(71413,631,4380.43,3206.55,389.398,0);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (71615,71618,71412,71415);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`Comment`) VALUES
+(13,4,71615,31,3,37690,'Putricide - Tear Gas on Slime Puddle'),
+(13,1,71618,31,3,37562,'Putricide - Tear Gas on Gas Cloud'),
+(13,2,71618,31,3,37697,'Putricide - Tear Gas on Volatile Ooze'),
+(13,4,71618,31,3,38159,'Putricide - Tear Gas on Choking Gas Bomb');
+
+UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_clear_aura_effect_value' WHERE `ScriptName`='spell_putricide_clear_mutated_plague';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(71620,'spell_putricide_clear_aura_effect_value');
diff --git a/sql/updates/world/2012_04_13_03_world_bg_template.sql b/sql/updates/world/2012_04_13_03_world_bg_template.sql
new file mode 100644
index 00000000000..a426d7c6831
--- /dev/null
+++ b/sql/updates/world/2012_04_13_03_world_bg_template.sql
@@ -0,0 +1,7 @@
+ALTER TABLE `battleground_template` ADD `StartMaxDist` float NOT NULL DEFAULT 0 AFTER `HordeStartO`;
+
+UPDATE `battleground_template` SET `StartMaxDist`=200 WHERE `id`=30; -- IC
+UPDATE `battleground_template` SET `StartMaxDist`=100 WHERE `id`=1; -- AV
+UPDATE `battleground_template` SET `StartMaxDist`=75 WHERE `id` IN (2,3,7); -- WSG, AB, EotS
+
+UPDATE `battleground_template` SET `MinLvl`=1 WHERE `id`=32;
diff --git a/sql/updates/world/2012_04_13_04_world_spell_proc_event.sql b/sql/updates/world/2012_04_13_04_world_spell_proc_event.sql
new file mode 100644
index 00000000000..3ea68187687
--- /dev/null
+++ b/sql/updates/world/2012_04_13_04_world_spell_proc_event.sql
@@ -0,0 +1,4 @@
+-- Blackened Naaru Silver proc cooldown
+DELETE FROM `spell_proc_event` WHERE `entry`=45355;
+INSERT INTO `spell_proc_event`(`entry`,`schoolmask`,`spellfamilyname`,`spellfamilymask0`,`spellfamilymask1`,`spellfamilymask2`,`procflags`,`procex`,`ppmrate`,`customchance`,`cooldown`) VALUES
+(45355,0,0,0,0,0,0,0,0,0,45); \ No newline at end of file
diff --git a/sql/updates/world/2012_04_14_00_world_gameobject_loot_template.sql b/sql/updates/world/2012_04_14_00_world_gameobject_loot_template.sql
new file mode 100644
index 00000000000..dea4b771068
--- /dev/null
+++ b/sql/updates/world/2012_04_14_00_world_gameobject_loot_template.sql
@@ -0,0 +1,3 @@
+-- Add Bogblossom to this Bogblossom object for the druid quest (other one already contains it)
+DELETE FROM `gameobject_loot_template` WHERE (`entry`=10961) AND (`item`=31950);
+INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES (10961,31950,-100,0,0,1,1);
diff --git a/sql/updates/world/2012_04_14_01_world_gameobject_loot_template.sql b/sql/updates/world/2012_04_14_01_world_gameobject_loot_template.sql
new file mode 100644
index 00000000000..a3dd0c39865
--- /dev/null
+++ b/sql/updates/world/2012_04_14_01_world_gameobject_loot_template.sql
@@ -0,0 +1,11 @@
+-- Add missing gameobject_loot_templates to prevent startup errors
+DELETE FROM `gameobject_loot_template` WHERE `entry` IN (3458,3459,3460,3461,15920,16841,26878,27725);
+INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(3458,4594,100,0,0,1,1), -- Rockscale Cod on Feast Fish
+(3459,3771,100,0,0,1,1), -- Wild Hog Shank On Feast Boar
+(3460,4538,100,0,0,1,1), -- Snapvine Watermelon on Feast Fruit
+(3461,1708,100,0,0,1,1), -- Sweet Nectar on Feast Goblet
+(15920,17822,-100,0,0,1,1), -- Weird Map on weird object
+(16841,18950,-100,0,0,1,1), -- Chambermaid Pillaclenchers Pillow on Pillaclencher's Ornate Pillow
+(26878,45062,100,0,0,1,1), -- Dusty Journal on Dusty Journal (different ID)
+(27725,49648,100,0,0,1,1); -- Borrowed Tabard on Clean Laundry (might need condition!)
diff --git a/sql/updates/world/2012_04_14_02_world_creature_template_addon.sql b/sql/updates/world/2012_04_14_02_world_creature_template_addon.sql
new file mode 100644
index 00000000000..6aaa7da383e
--- /dev/null
+++ b/sql/updates/world/2012_04_14_02_world_creature_template_addon.sql
@@ -0,0 +1,3 @@
+UPDATE `creature_template_addon` SET `auras`='50453' WHERE `entry`=28017;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28017;
+UPDATE `creature_template` SET `ainame` = '' WHERE `entry`=28017; \ No newline at end of file
diff --git a/sql/updates/world/2012_04_14_03_world_spell_bonus_data.sql b/sql/updates/world/2012_04_14_03_world_spell_bonus_data.sql
new file mode 100644
index 00000000000..ee081c17078
--- /dev/null
+++ b/sql/updates/world/2012_04_14_03_world_spell_bonus_data.sql
@@ -0,0 +1 @@
+UPDATE `spell_bonus_data` SET `direct_bonus`=0.8930 WHERE `entry`=51505;
diff --git a/sql/updates/world/2012_04_14_04_world_spell_proc_event.sql b/sql/updates/world/2012_04_14_04_world_spell_proc_event.sql
new file mode 100644
index 00000000000..78a869e655a
--- /dev/null
+++ b/sql/updates/world/2012_04_14_04_world_spell_proc_event.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_proc_event` WHERE `entry`=53601;
+INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES
+(53601, 0, 0, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0, 0, 6);
diff --git a/sql/updates/world/2012_04_14_05_world_spell_proc_event.sql b/sql/updates/world/2012_04_14_05_world_spell_proc_event.sql
new file mode 100644
index 00000000000..8cb2b1d3d2b
--- /dev/null
+++ b/sql/updates/world/2012_04_14_05_world_spell_proc_event.sql
@@ -0,0 +1 @@
+DELETE FROM `spell_proc_event` WHERE `entry` IN (51486,51485,51483);
diff --git a/sql/updates/world/2012_04_16_00_world_game_event.sql b/sql/updates/world/2012_04_16_00_world_game_event.sql
new file mode 100644
index 00000000000..1dc3fe3ad91
--- /dev/null
+++ b/sql/updates/world/2012_04_16_00_world_game_event.sql
@@ -0,0 +1,4 @@
+SET @Event = 26; -- Pilgrim's Bounty
+DELETE FROM `game_event` WHERE `eventEntry`=@Event;
+INSERT INTO `game_event` (`eventEntry`,`start_time`,`end_time`,`occurence`,`length`,`holiday`,`description`,`world_event`) VALUES
+(@Event,'2012-11-18 01:00:00','2020-12-31 05:00:00',525600,10020,404,'Pilgrim\'s Bounty',0);
diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h
index b9d385ba675..f4555649210 100644
--- a/src/server/game/AI/CoreAI/GameObjectAI.h
+++ b/src/server/game/AI/CoreAI/GameObjectAI.h
@@ -33,21 +33,24 @@ class GameObjectAI
explicit GameObjectAI(GameObject* g) : go(g) {}
virtual ~GameObjectAI() {}
- virtual void UpdateAI(const uint32 /*diff*/) {}
+ virtual void UpdateAI(uint32 /*diff*/) {}
virtual void InitializeAI() { Reset(); }
virtual void Reset() {};
- static int Permissible(const GameObject* go);
+ static int Permissible(GameObject const* go);
- virtual bool GossipHello(Player* /*player*/) {return false;}
- virtual bool GossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) {return false;}
- virtual bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) {return false;}
- virtual bool QuestAccept(Player* /*player*/, Quest const* /*quest*/) {return false;}
- virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) {return false;}
- virtual uint32 GetDialogStatus(Player* /*player*/) {return 100;}
+ virtual bool GossipHello(Player* /*player*/) { return false; }
+ virtual bool GossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) { return false; }
+ virtual bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, char const* /*code*/) { return false; }
+ virtual bool QuestAccept(Player* /*player*/, Quest const* /*quest*/) { return false; }
+ virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; }
+ virtual uint32 GetDialogStatus(Player* /*player*/) { return 100; }
virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {}
+ virtual uint32 GetData(uint32 /*id*/) { return 0; }
+ virtual void SetData64(uint32 /*id*/, uint64 /*value*/) {}
+ virtual uint64 GetData64(uint32 /*id*/) { return 0; }
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) { }
@@ -58,8 +61,8 @@ class NullGameObjectAI : public GameObjectAI
public:
explicit NullGameObjectAI(GameObject* g);
- void UpdateAI(const uint32 /*diff*/) {}
+ void UpdateAI(uint32 /*diff*/) {}
- static int Permissible(const GameObject* /*go*/) { return PERMIT_BASE_IDLE; }
+ static int Permissible(GameObject const* /*go*/) { return PERMIT_BASE_IDLE; }
};
#endif
diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp
index ebe14c0d7d0..1a0c6652e74 100755
--- a/src/server/game/AI/CreatureAISelector.cpp
+++ b/src/server/game/AI/CreatureAISelector.cpp
@@ -133,6 +133,9 @@ namespace FactorySelector
const GameObjectAICreator* ai_factory = NULL;
GameObjectAIRegistry& ai_registry(*GameObjectAIRepository::instance());
+ if (GameObjectAI* scriptedAI = sScriptMgr->GetGameObjectAI(go))
+ return scriptedAI;
+
ai_factory = ai_registry.GetRegistryItem(go->GetAIName());
//future goAI types go here
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 4eb7f8a7f50..2a412bffb22 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -854,7 +854,7 @@ int SmartGameObjectAI::Permissible(const GameObject* g)
return PERMIT_BASE_NO;
}
-void SmartGameObjectAI::UpdateAI(const uint32 diff)
+void SmartGameObjectAI::UpdateAI(uint32 diff)
{
GetScript()->OnUpdate(diff);
}
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 94e5e65cf8b..bfd1c7b9d41 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -239,7 +239,7 @@ public:
SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) {}
~SmartGameObjectAI() {}
- void UpdateAI(const uint32 diff);
+ void UpdateAI(uint32 diff);
void InitializeAI();
void Reset();
SmartScript* GetScript() { return &mScript; }
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index d6bfde021e7..44192a74123 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -144,6 +144,7 @@ Battleground::Battleground()
m_Winner = 2;
m_StartTime = 0;
m_ResetStatTimer = 0;
+ m_ValidStartPositionTimer = 0;
m_Events = 0;
m_IsRated = false;
m_BuffChange = false;
@@ -177,6 +178,8 @@ Battleground::Battleground()
m_ArenaTeamIds[BG_TEAM_ALLIANCE] = 0;
m_ArenaTeamIds[BG_TEAM_HORDE] = 0;
+ m_StartMaxDist = 0.0f;
+
m_ArenaTeamRatingChanges[BG_TEAM_ALLIANCE] = 0;
m_ArenaTeamRatingChanges[BG_TEAM_HORDE] = 0;
@@ -291,6 +294,7 @@ void Battleground::Update(uint32 diff)
// Update start time and reset stats timer
m_StartTime += diff;
m_ResetStatTimer += diff;
+ m_ValidStartPositionTimer += diff;
PostUpdateImpl(diff);
}
@@ -422,7 +426,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
// *********************************************************
ModifyStartDelayTime(diff);
- if (m_ResetStatTimer <= 5000)
+ if (m_ResetStatTimer > 5000)
{
m_ResetStatTimer = 0;
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
@@ -453,19 +457,19 @@ inline void Battleground::_ProcessJoin(uint32 diff)
// First start warning - 2 or 1 minute
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
- // After 1 minute or 30 seconds, warning is signalled
+ // After 1 minute or 30 seconds, warning is signaled
else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_SECOND] && !(m_Events & BG_STARTING_EVENT_2))
{
m_Events |= BG_STARTING_EVENT_2;
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_SECOND], CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
- // After 30 or 15 seconds, warning is signalled
+ // After 30 or 15 seconds, warning is signaled
else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_THIRD] && !(m_Events & BG_STARTING_EVENT_3))
{
m_Events |= BG_STARTING_EVENT_3;
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_THIRD], CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
- // Delay expired (atfer 2 or 1 minute)
+ // Delay expired (after 2 or 1 minute)
else if (GetStartDelayTime() <= 0 && !(m_Events & BG_STARTING_EVENT_4))
{
m_Events |= BG_STARTING_EVENT_4;
@@ -526,6 +530,33 @@ inline void Battleground::_ProcessJoin(uint32 diff)
sWorld->SendWorldText(LANG_BG_STARTED_ANNOUNCE_WORLD, GetName(), GetMinLevel(), GetMaxLevel());
}
}
+
+ // Find if the player left our start zone; if so, teleport it back
+ if (m_ValidStartPositionTimer > 1000)
+ {
+ m_ValidStartPositionTimer = 0;
+ float maxDist = GetStartMaxDist();
+ if (maxDist > 0.0f)
+ {
+ for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
+ {
+ if (Player *plr = ObjectAccessor::FindPlayer(itr->first))
+ {
+ float x, y, z, o;
+ uint32 team = plr->GetBGTeam();
+ GetTeamStartLoc(team, x, y, z, o);
+
+ float dist = plr->GetDistance(x, y, z);
+
+ if (dist >= maxDist)
+ {
+ sLog->outError("BATTLEGROUND: Sending %s back to start location (possible exploit)", plr->GetName());
+ plr->TeleportTo(GetMapId(), x, y, z, o);
+ }
+ }
+ }
+ }
+ }
}
inline void Battleground::_ProcessLeave(uint32 diff)
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index 32f6ebc92de..01dfbb23033 100755
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -443,6 +443,8 @@ class Battleground
Z = m_TeamStartLocZ[idx];
O = m_TeamStartLocO[idx];
}
+ void SetStartMaxDist(float startMaxDist) { m_StartMaxDist = startMaxDist; }
+ float GetStartMaxDist() const { return m_StartMaxDist; }
// Packet Transfer
// method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!)
@@ -617,6 +619,7 @@ class Battleground
uint32 m_ClientInstanceID; // the instance-id which is sent to the client and without any other internal use
uint32 m_StartTime;
uint32 m_ResetStatTimer;
+ uint32 m_ValidStartPositionTimer;
int32 m_EndTime; // it is set to 120000 when bg is ending and it decreases itself
uint32 m_LastResurrectTime;
BattlegroundBracketId m_BracketId;
@@ -698,6 +701,7 @@ class Battleground
float m_TeamStartLocY[BG_TEAMS_COUNT];
float m_TeamStartLocZ[BG_TEAMS_COUNT];
float m_TeamStartLocO[BG_TEAMS_COUNT];
+ float m_StartMaxDist;
uint32 ScriptId;
};
#endif
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index e1b99cbdcb9..a106f11ae82 100755
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -660,6 +660,7 @@ uint32 BattlegroundMgr::CreateBattleground(CreateBattlegroundData& data)
bg->SetName(data.BattlegroundName);
bg->SetTeamStartLoc(ALLIANCE, data.Team1StartLocX, data.Team1StartLocY, data.Team1StartLocZ, data.Team1StartLocO);
bg->SetTeamStartLoc(HORDE, data.Team2StartLocX, data.Team2StartLocY, data.Team2StartLocZ, data.Team2StartLocO);
+ bg->SetStartMaxDist(data.StartMaxDist);
bg->SetLevelRange(data.LevelMin, data.LevelMax);
bg->SetScriptId(data.scriptId);
@@ -677,8 +678,8 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
uint8 selectionWeight;
BattlemasterListEntry const* bl;
- // 0 1 2 3 4 5 6 7 8 9 10
- QueryResult result = WorldDatabase.Query("SELECT id, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, AllianceStartLoc, AllianceStartO, HordeStartLoc, HordeStartO, Weight, ScriptName FROM battleground_template");
+ // 0 1 2 3 4 5 6 7 8 9 10 11
+ QueryResult result = WorldDatabase.Query("SELECT id, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, AllianceStartLoc, AllianceStartO, HordeStartLoc, HordeStartO, StartMaxDist, Weight, ScriptName FROM battleground_template");
if (!result)
{
@@ -712,17 +713,20 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
data.MaxPlayersPerTeam = fields[2].GetUInt16();
data.LevelMin = fields[3].GetUInt8();
data.LevelMax = fields[4].GetUInt8();
- //check values from DB
- if (data.MaxPlayersPerTeam == 0 || data.MinPlayersPerTeam == 0 || data.MinPlayersPerTeam > data.MaxPlayersPerTeam)
+
+ // check values from DB
+ if (data.MaxPlayersPerTeam == 0 || data.MinPlayersPerTeam > data.MaxPlayersPerTeam)
{
- data.MinPlayersPerTeam = 0; // by default now expected strong full bg requirement
- data.MaxPlayersPerTeam = 40;
+ sLog->outErrorDb("Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
+ data.bgTypeId, data.MinPlayersPerTeam, data.MaxPlayersPerTeam);
+ continue;
}
+
if (data.LevelMin == 0 || data.LevelMax == 0 || data.LevelMin > data.LevelMax)
{
- //TO-DO: FIX ME
- data.LevelMin = 0;//bl->minlvl;
- data.LevelMax = 80;//bl->maxlvl;
+ sLog->outErrorDb("Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
+ data.bgTypeId, data.LevelMin, data.LevelMax);
+ continue;
}
startId = fields[5].GetUInt32();
@@ -767,8 +771,10 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
continue;
}
- selectionWeight = fields[9].GetUInt8();
- data.scriptId = sObjectMgr->GetScriptId(fields[10].GetCString());
+ data.StartMaxDist = fields[9].GetFloat();
+
+ selectionWeight = fields[10].GetUInt8();
+ data.scriptId = sObjectMgr->GetScriptId(fields[11].GetCString());
data.BattlegroundName = bl->name[sWorld->GetDefaultDbcLocale()];
data.MapID = bl->mapid[0];
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h
index 88559d07993..7afb83da0a6 100755
--- a/src/server/game/Battlegrounds/BattlegroundMgr.h
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.h
@@ -50,6 +50,7 @@ struct CreateBattlegroundData
float Team2StartLocY;
float Team2StartLocZ;
float Team2StartLocO;
+ float StartMaxDist;
uint32 scriptId;
};
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index fcb89e33dc1..586f09bd79c 100755
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -1041,6 +1041,13 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
break;
}
+ case 28017: // Bloodworms
+ {
+ SetCreateHealth(4 * petlevel);
+ SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.006f));
+ SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - 30 - (petlevel / 4)));
+ SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel - 30 + (petlevel / 4)));
+ }
}
break;
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 26ea7c110d2..31bd17ffc8f 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -6830,11 +6830,6 @@ bool Player::UpdatePosition(float x, float y, float z, float orientation, bool t
if (GetGroup())
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
- // code block for underwater state update
- // Unit::UpdatePosition() checks for validity and updates our coordinates
- // so we re-fetch them instead of using "raw" coordinates from function params
- UpdateUnderwaterState(GetMap(), GetPositionX(), GetPositionY(), GetPositionZ());
-
if (GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE))
GetSession()->SendCancelTrade();
@@ -17657,7 +17652,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
ItemPosCountVec dest;
err = CanStoreItem(itr->second->GetSlot(), slot, dest, item);
if (err == EQUIP_ERR_OK)
- itr->second->StoreItem(slot, item, true);
+ item = StoreItem(dest, item, true);
}
}
@@ -18318,10 +18313,10 @@ void Player::UnbindInstance(BoundInstancesMap::iterator &itr, Difficulty difficu
CharacterDatabase.Execute(stmt);
}
- itr->second.save->RemovePlayer(this); // save can become invalid
if (itr->second.perm)
GetSession()->SendCalendarRaidLockout(itr->second.save, false);
+ itr->second.save->RemovePlayer(this); // save can become invalid
m_boundInstances[difficulty].erase(itr++);
}
}
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index 69771129ac9..2da1c1b88cb 100755
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -1068,6 +1068,7 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType)
#define ENTRY_TREANT 1964
#define ENTRY_FIRE_ELEMENTAL 15438
#define ENTRY_GHOUL 26125
+#define ENTRY_BLOODWORM 28017
bool Guardian::UpdateStats(Stats stat)
{
@@ -1229,6 +1230,7 @@ void Guardian::UpdateMaxHealth()
case ENTRY_SUCCUBUS: multiplicator = 9.1f; break;
case ENTRY_FELHUNTER: multiplicator = 9.5f; break;
case ENTRY_FELGUARD: multiplicator = 11.0f; break;
+ case ENTRY_BLOODWORM: multiplicator = 1.0f; break;
default: multiplicator = 10.0f; break;
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index eebfd25e3d4..da23a7ba010 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -252,6 +252,7 @@ m_HostileRefManager(this)
_focusSpell = NULL;
_targetLocked = false;
+ _lastLiquid = NULL;
}
////////////////////////////////////////////////////////////
@@ -1542,7 +1543,7 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
// Magic damage, check for resists
// Ignore spells that cant be resisted
- if ((schoolMask & SPELL_SCHOOL_MASK_NORMAL) == 0 && (spellInfo && (spellInfo->AttributesEx4 & SPELL_ATTR4_IGNORE_RESISTANCES) == 0))
+ if ((schoolMask & SPELL_SCHOOL_MASK_NORMAL) == 0 && (!spellInfo || (spellInfo->AttributesEx4 & SPELL_ATTR4_IGNORE_RESISTANCES) == 0))
{
float victimResistance = float(victim->GetResistance(schoolMask));
victimResistance += float(GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, schoolMask));
@@ -3089,6 +3090,48 @@ bool Unit::IsUnderWater() const
return GetBaseMap()->IsUnderWater(GetPositionX(), GetPositionY(), GetPositionZ());
}
+void Unit::UpdateUnderwaterState(Map* m, float x, float y, float z)
+{
+ if (!isPet() && !IsVehicle())
+ return;
+
+ LiquidData liquid_status;
+ ZLiquidStatus res = m->getLiquidStatus(x, y, z, MAP_ALL_LIQUIDS, &liquid_status);
+ if (!res)
+ {
+ if (_lastLiquid && _lastLiquid->SpellId)
+ RemoveAurasDueToSpell(_lastLiquid->SpellId);
+
+ RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_UNDERWATER);
+ _lastLiquid = NULL;
+ return;
+ }
+
+ if (uint32 liqEntry = liquid_status.entry)
+ {
+ LiquidTypeEntry const* liquid = sLiquidTypeStore.LookupEntry(liqEntry);
+ if (_lastLiquid && _lastLiquid->SpellId && _lastLiquid->Id != liqEntry)
+ RemoveAurasDueToSpell(_lastLiquid->SpellId);
+
+ if (liquid && liquid->SpellId)
+ {
+ if (res & (LIQUID_MAP_UNDER_WATER | LIQUID_MAP_IN_WATER))
+ CastSpell(this, liquid->SpellId, true);
+ else
+ RemoveAurasDueToSpell(liquid->SpellId);
+ }
+
+ RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_ABOVEWATER);
+ _lastLiquid = liquid;
+ }
+ else if (_lastLiquid && _lastLiquid->SpellId)
+ {
+ RemoveAurasDueToSpell(_lastLiquid->SpellId);
+ RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_UNDERWATER);
+ _lastLiquid = NULL;
+ }
+}
+
void Unit::DeMorph()
{
SetDisplayId(GetNativeDisplayId());
@@ -6000,6 +6043,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Siphon Life
case 63108:
{
+ if (!damage)
+ break;
// Glyph of Siphon Life
if (HasAura(56216))
triggerAmount += triggerAmount / 4;
@@ -7354,20 +7399,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
triggered_spell_id = 63685;
break;
}
- // Storm, Earth and Fire
- if (dummySpell->SpellIconID == 3063)
- {
- // Earthbind Totem summon only
- if (procSpell->Id != 2484)
- return false;
-
- float chance = (float)triggerAmount;
- if (!roll_chance_f(chance))
- return false;
-
- triggered_spell_id = 64695;
- break;
- }
// Ancestral Awakening
if (dummySpell->SpellIconID == 3065)
{
@@ -7396,8 +7427,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
if (GetTypeId() != TYPEID_PLAYER || !victim || !victim->isAlive() || !castItem || !castItem->IsEquipped())
return false;
- Player* player = ToPlayer();
- WeaponAttackType attType = WeaponAttackType(player->GetAttackBySlot(castItem->GetSlot()));
+ WeaponAttackType attType = WeaponAttackType(Player::GetAttackBySlot(castItem->GetSlot()));
if ((attType != BASE_ATTACK && attType != OFF_ATTACK)
|| (attType == BASE_ATTACK && procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK)
|| (attType == OFF_ATTACK && procFlag & PROC_FLAG_DONE_MAINHAND_ATTACK))
@@ -7985,11 +8015,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
for (uint8 i = 1; i < stack; ++i)
dmg += mod * stack;
if (Unit* caster = triggeredByAura->GetCaster())
- {
caster->CastCustomSpell(70701, SPELLVALUE_BASE_POINT0, dmg);
- if (Creature* creature = caster->ToCreature())
- creature->DespawnOrUnsummon(1);
- }
break;
}
// Ball of Flames Proc
@@ -8200,6 +8226,16 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
CastCustomSpell(this, 70845, &basepoints0, NULL, NULL, true);
break;
}
+ // Recklessness
+ case 1719:
+ {
+ //! Possible hack alert
+ //! Don't drop charges on proc, they will be dropped on SpellMod removal
+ //! Before this change, it was dropping two charges per attack, one in ProcDamageAndSpellFor, and one in RemoveSpellMods.
+ //! The reason of this behaviour is Recklessness having three auras, 2 of them can not proc (isTriggeredAura array) but the other one can, making the whole spell proc.
+ *handled = true;
+ break;
+ }
default:
break;
}
@@ -17262,6 +17298,9 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel
else if (turn)
UpdateOrientation(orientation);
+ // code block for underwater state update
+ UpdateUnderwaterState(GetMap(), x, y, z);
+
return (relocated || turn);
}
@@ -17566,7 +17605,7 @@ bool Unit::SetWalk(bool enable)
return true;
}
-bool Unit::SetDisableGravity(bool disable, bool packetOnly /*= false*/)
+bool Unit::SetDisableGravity(bool disable, bool /*packetOnly = false*/)
{
if (disable == IsLevitating())
return false;
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 00d66518d3f..828d87216df 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1580,6 +1580,7 @@ class Unit : public WorldObject
virtual bool IsInWater() const;
virtual bool IsUnderWater() const;
+ virtual void UpdateUnderwaterState(Map* m, float x, float y, float z);
bool isInAccessiblePlaceFor(Creature const* c) const;
void SendHealSpellLog(Unit* victim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false);
@@ -2353,6 +2354,7 @@ class Unit : public WorldObject
uint32 m_state; // Even derived shouldn't modify
uint32 m_CombatTimer;
uint32 m_lastManaUse; // msecs
+ LiquidTypeEntry const* _lastLiquid;
TimeTrackerSmall m_movesplineTimer;
Diminishing m_Diminishing;
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 22f0ea35413..0386e6b4214 100755
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -3294,20 +3294,20 @@ enum BanReturn
// indexes of BattlemasterList.dbc
enum BattlegroundTypeId
{
- BATTLEGROUND_TYPE_NONE = 0,
- BATTLEGROUND_AV = 1,
- BATTLEGROUND_WS = 2,
- BATTLEGROUND_AB = 3,
- BATTLEGROUND_NA = 4,
- BATTLEGROUND_BE = 5,
- BATTLEGROUND_AA = 6,
- BATTLEGROUND_EY = 7,
- BATTLEGROUND_RL = 8,
- BATTLEGROUND_SA = 9,
- BATTLEGROUND_DS = 10,
- BATTLEGROUND_RV = 11,
- BATTLEGROUND_IC = 30,
- BATTLEGROUND_RB = 32
+ BATTLEGROUND_TYPE_NONE = 0, // None
+ BATTLEGROUND_AV = 1, // Alterac Valley
+ BATTLEGROUND_WS = 2, // Warsong Gulch
+ BATTLEGROUND_AB = 3, // Arathi Basin
+ BATTLEGROUND_NA = 4, // Nagrand Arena
+ BATTLEGROUND_BE = 5, // Blade's Edge Arena
+ BATTLEGROUND_AA = 6, // All Arenas
+ BATTLEGROUND_EY = 7, // Eye of the Storm
+ BATTLEGROUND_RL = 8, // Ruins of Lordaernon
+ BATTLEGROUND_SA = 9, // Strand of the Ancients
+ BATTLEGROUND_DS = 10, // Dalaran Sewers
+ BATTLEGROUND_RV = 11, // Ring of Valor
+ BATTLEGROUND_IC = 30, // Isle of Conquest
+ BATTLEGROUND_RB = 32 // Random Battleground
};
#define MAX_BATTLEGROUND_TYPE_ID 33
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index b0ac0b710c1..c0e1eb842ae 100755
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -114,6 +114,9 @@ void MotionMaster::UpdateMotion(uint32 diff)
_cleanFlag &= ~MMCF_RESET;
}
+
+ // probably not the best place to pu this but im not really sure where else to put it.
+ _owner->UpdateUnderwaterState(_owner->GetMap(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ());
}
void MotionMaster::DirectClean(bool reset)
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index eb61db8b4ba..fdff5a92564 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -135,7 +135,7 @@ bool TargetedMovementGeneratorMedium<T,D>::Update(T &owner, const uint32 & time_
}
// prevent movement while casting spells with cast time or channel time
- if (owner.IsNonMeleeSpellCasted(false, false, true))
+ if (owner.HasUnitState(UNIT_STATE_CASTING))
{
if (!owner.IsStopped())
owner.StopMoving();
diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h
index 401503783b9..a073845ea73 100755
--- a/src/server/game/Reputation/ReputationMgr.h
+++ b/src/server/game/Reputation/ReputationMgr.h
@@ -132,6 +132,9 @@ class ReputationMgr
void ApplyForceReaction(uint32 faction_id, ReputationRank rank, bool apply);
+ //! Public for chat command needs
+ bool SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental);
+
public: // senders
void SendInitialReputations();
void SendForceReactions();
@@ -142,7 +145,6 @@ class ReputationMgr
void Initialize();
uint32 GetDefaultStateFlags(FactionEntry const* factionEntry) const;
bool SetReputation(FactionEntry const* factionEntry, int32 standing, bool incremental);
- bool SetOneFactionReputation(FactionEntry const* factionEntry, int32 standing, bool incremental);
void SetVisible(FactionState* faction);
void SetAtWar(FactionState* faction, bool atWar) const;
void SetInactive(FactionState* faction, bool inactive) const;
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index aac615180c8..01d56cf8060 100755
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -954,6 +954,14 @@ bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effInd
return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
}
+GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go)
+{
+ ASSERT(go);
+
+ GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, NULL);
+ return tmpscript->GetAI(go);
+}
+
bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger)
{
ASSERT(player);
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 3b65a5cf256..6fe058d336a 100755
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -39,6 +39,7 @@ class Creature;
class CreatureAI;
class DynamicObject;
class GameObject;
+class GameObjectAI;
class Guild;
class GridMap;
class Group;
@@ -471,6 +472,9 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
// Called when the game object is damaged (destructible buildings only).
virtual void OnDamaged(GameObject* /*go*/, Player* /*player*/) { }
+
+ // Called when a GameObjectAI object is needed for the gameobject.
+ virtual GameObjectAI* GetAI(GameObject* /*go*/) const { return NULL; }
};
class AreaTriggerScript : public ScriptObject
@@ -911,6 +915,7 @@ class ScriptMgr
void OnGameObjectDestroyed(GameObject* go, Player* player);
void OnGameObjectDamaged(GameObject* go, Player* player);
void OnGameObjectUpdate(GameObject* go, uint32 diff);
+ GameObjectAI* GetGameObjectAI(GameObject* go);
public: /* AreaTriggerScript */
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 1ad6fe557f9..dbbd89c7533 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1474,6 +1474,23 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
if (spellInfo->Stances & (1<<(GetMiscValue()-1)))
target->CastSpell(target, itr->first, true, NULL, this);
}
+
+ // Also do it for Glyphs
+ for (uint32 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
+ {
+ if (uint32 glyphId = target->ToPlayer()->GetGlyph(i))
+ {
+ if (GlyphPropertiesEntry const* glyph = sGlyphPropertiesStore.LookupEntry(glyphId))
+ {
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellId);
+ if (!spellInfo || !(spellInfo->Attributes & (SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE)))
+ continue;
+ if (spellInfo->Stances & (1<<(GetMiscValue()-1)))
+ target->CastSpell(target, glyph->SpellId, true, NULL, this);
+ }
+ }
+ }
+
// Leader of the Pack
if (target->ToPlayer()->HasSpell(17007))
{
@@ -1583,10 +1600,25 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
}
}
+ const Unit::AuraEffectList& shapeshifts = target->GetAuraEffectsByType(SPELL_AURA_MOD_SHAPESHIFT);
+ AuraEffect* newAura = NULL;
+ // Iterate through all the shapeshift auras that the target has, if there is another aura with SPELL_AURA_MOD_SHAPESHIFT, then this aura is being removed due to that one being applied
+ for (Unit::AuraEffectList::const_iterator itr = shapeshifts.begin(); itr != shapeshifts.end(); ++itr)
+ {
+ if ((*itr) != this)
+ {
+ newAura = *itr;
+ break;
+ }
+ }
Unit::AuraApplicationMap& tAuras = target->GetAppliedAuras();
for (Unit::AuraApplicationMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
{
- if (itr->second->GetBase()->IsRemovedOnShapeLost(target))
+ // Use the new aura to see on what stance the target will be
+ uint32 newStance = (1<<((newAura ? newAura->GetMiscValue() : 0)-1));
+
+ // If the stances are not compatible with the spell, remove it
+ if (itr->second->GetBase()->IsRemovedOnShapeLost(target) && !(itr->second->GetBase()->GetSpellInfo()->Stances & newStance))
target->RemoveAura(itr);
else
++itr;
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index af3f53e2369..df2b9c35320 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3427,36 +3427,6 @@ void Spell::_handle_immediate_phase()
// process items
for (std::list<ItemTargetInfo>::iterator ihit= m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
DoAllEffectOnTarget(&(*ihit));
-
- if (!m_originalCaster)
- return;
- // Handle procs on cast
- // TODO: finish new proc system:P
- if (m_UniqueTargetInfo.empty())
- {
- uint32 procAttacker = m_procAttacker;
- if (!procAttacker)
- {
- bool positive = m_spellInfo->IsPositive();
- switch (m_spellInfo->DmgClass)
- {
- case SPELL_DAMAGE_CLASS_MAGIC:
- if (positive)
- procAttacker |= PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS;
- else
- procAttacker |= PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG;
- break;
- case SPELL_DAMAGE_CLASS_NONE:
- if (positive)
- procAttacker |= PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS;
- else
- procAttacker |= PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG;
- break;
- }
- }
- // Proc damage for spells which have only dest targets (2484 should proc 51486 for example)
- m_originalCaster->ProcDamageAndSpell(NULL, procAttacker, 0, m_procEx | PROC_EX_NORMAL_HIT, 0, BASE_ATTACK, m_spellInfo, m_triggeredByAuraSpell);
- }
}
void Spell::_handle_finish_phase()
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 80ed1972a5d..05431ef0a16 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3347,9 +3347,9 @@ void SpellMgr::LoadDbcDataCorrections()
case 70460: // Coldflame Jets (Traps after Saurfang)
spellInfo->DurationIndex = 1; // 10 seconds
break;
- case 71413: // Green Ooze Summon (Professor Putricide)
- case 71414: // Orange Ooze Summon (Professor Putricide)
- spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST;
+ case 71412: // Green Ooze Summon (Professor Putricide)
+ case 71415: // Orange Ooze Summon (Professor Putricide)
+ spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_TARGET_ANY;
break;
case 71159: // Awaken Plagued Zombies
spellInfo->DurationIndex = 21;
diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp
index fa30adde72a..0734e0a0f63 100644
--- a/src/server/game/Warden/Warden.cpp
+++ b/src/server/game/Warden/Warden.cpp
@@ -187,7 +187,9 @@ std::string Warden::Penalty(WardenCheck* check /*= NULL*/)
duration << sWorld->getIntConfig(CONFIG_WARDEN_CLIENT_BAN_DURATION) << "s";
std::string accountName;
AccountMgr::GetName(_session->GetAccountId(), accountName);
- sWorld->BanAccount(BAN_ACCOUNT, accountName, duration.str(), "Warden Anticheat violation","Server");
+ std::stringstream banReason;
+ banReason << "Warden Anticheat Violation: " << check->Comment << " (CheckId: " << check->CheckId << ")";
+ sWorld->BanAccount(BAN_ACCOUNT, accountName, duration.str(), banReason.str(),"Server");
return "Ban";
break;
diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp
index 90d1cfc0140..f4c7a5069cf 100644
--- a/src/server/game/Warden/WardenCheckMgr.cpp
+++ b/src/server/game/Warden/WardenCheckMgr.cpp
@@ -63,8 +63,8 @@ void WardenCheckMgr::LoadWardenChecks()
CheckStore.resize(maxCheckId + 1);
- // 0 1 2 3 4 5 6
- result = WorldDatabase.Query("SELECT id, type, data, result, address, length, str FROM warden_checks ORDER BY id ASC");
+ // 0 1 2 3 4 5 6 7
+ result = WorldDatabase.Query("SELECT id, type, data, result, address, length, str, comment FROM warden_checks ORDER BY id ASC");
uint32 count = 0;
do
@@ -78,9 +78,11 @@ void WardenCheckMgr::LoadWardenChecks()
uint32 address = fields[4].GetUInt32();
uint8 length = fields[5].GetUInt8();
std::string str = fields[6].GetString();
+ std::string comment = fields[7].GetString();
WardenCheck* wardenCheck = new WardenCheck();
wardenCheck->Type = checkType;
+ wardenCheck->CheckId = id;
// Initialize action with default action from config
wardenCheck->Action = WardenActions(sWorld->getIntConfig(CONFIG_WARDEN_CLIENT_FAIL_ACTION));
@@ -134,6 +136,11 @@ void WardenCheckMgr::LoadWardenChecks()
CheckResultStore[id] = wr;
}
+ if (comment.empty())
+ wardenCheck->Comment = "Undocumented Check";
+ else
+ wardenCheck->Comment = comment;
+
++count;
}
while (result->NextRow());
diff --git a/src/server/game/Warden/WardenCheckMgr.h b/src/server/game/Warden/WardenCheckMgr.h
index 45de18081c2..7a83d8f0c6d 100644
--- a/src/server/game/Warden/WardenCheckMgr.h
+++ b/src/server/game/Warden/WardenCheckMgr.h
@@ -36,6 +36,8 @@ struct WardenCheck
uint32 Address; // PROC_CHECK, MEM_CHECK, PAGE_CHECK
uint8 Length; // PROC_CHECK, MEM_CHECK, PAGE_CHECK
std::string Str; // LUA, MPQ, DRIVER
+ std::string Comment;
+ uint16 CheckId;
enum WardenActions Action;
};
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index 32ee96dacfe..bb3a4d65b76 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -1234,7 +1234,7 @@ public:
return false;
}
- target->GetReputationMgr().SetReputation(factionEntry, amount);
+ target->GetReputationMgr().SetOneFactionReputation(factionEntry, amount, false);
handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->name[handler->GetSessionDbcLocale()], factionId,
handler->GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry));
return true;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 541e52fb922..273f2a20b4b 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -64,6 +64,9 @@ enum Spells
SPELL_MALLEABLE_GOO = 70852,
SPELL_UNSTABLE_EXPERIMENT = 70351,
SPELL_TEAR_GAS = 71617, // phase transition
+ SPELL_TEAR_GAS_CREATURE = 71618,
+ SPELL_TEAR_GAS_CANCEL = 71620,
+ SPELL_TEAR_GAS_PERIODIC_TRIGGER = 73170,
SPELL_CREATE_CONCOCTION = 71621,
SPELL_GUZZLE_POTIONS = 71893,
SPELL_OOZE_TANK_PROTECTION = 71770, // protects the tank
@@ -86,6 +89,7 @@ enum Spells
SPELL_GASEOUS_BLOAT_PROC = 70215,
SPELL_GASEOUS_BLOAT = 70672,
SPELL_GASEOUS_BLOAT_PROTECTION = 70812,
+ SPELL_EXPUNGED_GAS = 70701,
// Volatile Ooze
SPELL_OOZE_ERUPTION = 70492,
@@ -595,13 +599,15 @@ class boss_professor_putricide : public CreatureScript
break;
case EVENT_TEAR_GAS:
me->GetMotionMaster()->MovePoint(POINT_TABLE, tablePos);
+ DoCast(me, SPELL_TEAR_GAS_PERIODIC_TRIGGER, true);
break;
case EVENT_RESUME_ATTACK:
me->SetReactState(REACT_DEFENSIVE);
AttackStart(me->getVictim());
// remove Tear Gas
+ me->RemoveAurasDueToSpell(SPELL_TEAR_GAS_PERIODIC_TRIGGER);
instance->DoRemoveAurasDueToSpellOnPlayers(71615);
- instance->DoRemoveAurasDueToSpellOnPlayers(71618);
+ DoCastAOE(SPELL_TEAR_GAS_CANCEL);
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_GAS_VARIABLE);
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_OOZE_VARIABLE);
break;
@@ -699,27 +705,36 @@ class npc_volatile_ooze : public CreatureScript
public:
npc_volatile_ooze() : CreatureScript("npc_volatile_ooze") { }
- struct npc_volatile_oozeAI : public ScriptedAI
+ struct npc_putricide_oozeAI : public ScriptedAI
{
- npc_volatile_oozeAI(Creature* creature) : ScriptedAI(creature)
+ npc_putricide_oozeAI(Creature* creature) : ScriptedAI(creature)
{
_newTargetSelectTimer = 0;
}
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell)
{
- if (!_newTargetSelectTimer && sSpellMgr->GetSpellDifficultyId(spell->Id) == sSpellMgr->GetSpellDifficultyId(SPELL_OOZE_ERUPTION))
+ if (!_newTargetSelectTimer && spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_OOZE_ERUPTION, me))
+ _newTargetSelectTimer = 1000;
+ }
+
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
+ {
+ if (spell->Id == SPELL_TEAR_GAS_CREATURE)
_newTargetSelectTimer = 1000;
}
void UpdateAI(uint32 const diff)
{
- if (!UpdateVictim())
+ if (!UpdateVictim() && !_newTargetSelectTimer)
return;
if (!_newTargetSelectTimer)
return;
+ if (me->HasAura(SPELL_TEAR_GAS_CREATURE))
+ return;
+
if (_newTargetSelectTimer <= diff)
{
_newTargetSelectTimer = 0;
@@ -730,13 +745,68 @@ class npc_volatile_ooze : public CreatureScript
}
private:
- // no need to use EventMap for just one event
uint32 _newTargetSelectTimer;
};
CreatureAI* GetAI(Creature* creature) const
{
- return GetIcecrownCitadelAI<npc_volatile_oozeAI>(creature);
+ return GetIcecrownCitadelAI<npc_putricide_oozeAI>(creature);
+ }
+};
+
+class npc_gas_cloud : public CreatureScript
+{
+ public:
+ npc_gas_cloud() : CreatureScript("npc_gas_cloud") { }
+
+ struct npc_gas_cloudAI : public ScriptedAI
+ {
+ npc_gas_cloudAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _newTargetSelectTimer = 0;
+ }
+
+ void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell)
+ {
+ if (!_newTargetSelectTimer && spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_EXPUNGED_GAS, me))
+ _newTargetSelectTimer = 1000;
+ }
+
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
+ {
+ if (spell->Id == SPELL_TEAR_GAS_CREATURE)
+ _newTargetSelectTimer = 1000;
+ }
+
+ void UpdateAI(uint32 const diff)
+ {
+ if (!UpdateVictim() && !_newTargetSelectTimer)
+ return;
+
+ DoMeleeAttackIfReady();
+
+ if (!_newTargetSelectTimer)
+ return;
+
+ if (me->HasAura(SPELL_TEAR_GAS_CREATURE))
+ return;
+
+ if (_newTargetSelectTimer <= diff)
+ {
+ _newTargetSelectTimer = 0;
+ me->CastCustomSpell(SPELL_GASEOUS_BLOAT, SPELLVALUE_AURA_STACK, 10, me, false);
+ }
+ else
+ _newTargetSelectTimer -= diff;
+ }
+
+ private:
+ uint32 _newTargetSelectTimer;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return GetIcecrownCitadelAI<npc_gas_cloudAI>(creature);
}
};
@@ -755,8 +825,8 @@ class spell_putricide_gaseous_bloat : public SpellScriptLoader
if (Unit* caster = GetCaster())
{
target->RemoveAuraFromStack(GetSpellInfo()->Id, GetCasterGUID());
- if (!target->HasAura(GetId())&& caster->GetTypeId() == TYPEID_UNIT)
- caster->ToCreature()->DespawnOrUnsummon();
+ if (!target->HasAura(GetId()))
+ caster->CastCustomSpell(SPELL_GASEOUS_BLOAT, SPELLVALUE_AURA_STACK, 10, caster, false);
}
}
@@ -823,7 +893,19 @@ class spell_putricide_ooze_channel : public SpellScriptLoader
void StartAttack()
{
GetCaster()->ClearUnitState(UNIT_STATE_CASTING);
+ GetCaster()->DeleteThreatList();
GetCaster()->ToCreature()->AI()->AttackStart(GetHitUnit());
+ GetCaster()->AddThreat(GetHitUnit(), 500000000.0f); // value seen in sniff
+ }
+
+ // temporary, until SelectTarget are not called on empty lists
+ void CheckTarget()
+ {
+ if (_target)
+ return;
+
+ FinishCast(SPELL_FAILED_NO_VALID_TARGETS);
+ GetCaster()->ToCreature()->DespawnOrUnsummon(1); // despawn next update
}
void Register()
@@ -832,6 +914,7 @@ class spell_putricide_ooze_channel : public SpellScriptLoader
OnUnitTargetSelect += SpellUnitTargetFn(spell_putricide_ooze_channel_SpellScript::SetTarget, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
OnUnitTargetSelect += SpellUnitTargetFn(spell_putricide_ooze_channel_SpellScript::SetTarget, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY);
AfterHit += SpellHitFn(spell_putricide_ooze_channel_SpellScript::StartAttack);
+ OnCast += SpellCastFn(spell_putricide_ooze_channel_SpellScript::CheckTarget);
}
Unit* _target;
@@ -931,13 +1014,13 @@ class spell_putricide_unstable_experiment : public SpellScriptLoader
uint32 stage = GetCaster()->ToCreature()->AI()->GetData(DATA_EXPERIMENT_STAGE);
Creature* target = NULL;
std::list<Creature*> creList;
- GetCreatureListWithEntryInGrid(creList, GetCaster(), NPC_ABOMINATION_WING_MAD_SCIENTIST_STALKER, 100.0f);
+ GetCreatureListWithEntryInGrid(creList, GetCaster(), NPC_ABOMINATION_WING_MAD_SCIENTIST_STALKER, 200.0f);
// 2 of them are spawned at green place - weird trick blizz
for (std::list<Creature*>::iterator itr = creList.begin(); itr != creList.end(); ++itr)
{
target = *itr;
std::list<Creature*> tmp;
- GetCreatureListWithEntryInGrid(tmp, target, NPC_ABOMINATION_WING_MAD_SCIENTIST_STALKER, 1.0f);
+ GetCreatureListWithEntryInGrid(tmp, target, NPC_ABOMINATION_WING_MAD_SCIENTIST_STALKER, 10.0f);
if ((!stage && tmp.size() > 1) || (stage && tmp.size() == 1))
break;
}
@@ -957,42 +1040,6 @@ class spell_putricide_unstable_experiment : public SpellScriptLoader
}
};
-class spell_putricide_ooze_summon : public SpellScriptLoader
-{
- public:
- spell_putricide_ooze_summon() : SpellScriptLoader("spell_putricide_ooze_summon") { }
-
- class spell_putricide_ooze_summon_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_putricide_ooze_summon_AuraScript);
-
- void HandleTriggerSpell(AuraEffect const* aurEff)
- {
- PreventDefaultAction();
- if (Unit* caster = GetCaster())
- {
- uint32 triggerSpellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
- float x, y, z;
- GetTarget()->GetPosition(x, y, z);
- z = GetTarget()->GetMap()->GetHeight(GetTarget()->GetPhaseMask(), x, y, z, true, 25.0f);
- x += 10.0f * cosf(caster->GetOrientation());
- y += 10.0f * sinf(caster->GetOrientation());
- caster->CastSpell(x, y, z, triggerSpellId, true, NULL, NULL, GetCasterGUID());
- }
- }
-
- void Register()
- {
- OnEffectPeriodic += AuraEffectPeriodicFn(spell_putricide_ooze_summon_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
- }
- };
-
- AuraScript* GetAuraScript() const
- {
- return new spell_putricide_ooze_summon_AuraScript();
- }
-};
-
class spell_putricide_ooze_eruption_searcher : public SpellScriptLoader
{
public:
@@ -1455,14 +1502,15 @@ class spell_putricide_regurgitated_ooze : public SpellScriptLoader
}
};
-class spell_putricide_clear_mutated_plague : public SpellScriptLoader
+// Removes aura with id stored in effect value
+class spell_putricide_clear_aura_effect_value : public SpellScriptLoader
{
public:
- spell_putricide_clear_mutated_plague() : SpellScriptLoader("spell_putricide_clear_mutated_plague") { }
+ spell_putricide_clear_aura_effect_value() : SpellScriptLoader("spell_putricide_clear_aura_effect_value") { }
- class spell_putricide_clear_mutated_plague_SpellScript : public SpellScript
+ class spell_putricide_clear_aura_effect_value_SpellScript : public SpellScript
{
- PrepareSpellScript(spell_putricide_clear_mutated_plague_SpellScript);
+ PrepareSpellScript(spell_putricide_clear_aura_effect_value_SpellScript);
void HandleScript(SpellEffIndex effIndex)
{
@@ -1473,13 +1521,13 @@ class spell_putricide_clear_mutated_plague : public SpellScriptLoader
void Register()
{
- OnEffectHitTarget += SpellEffectFn(spell_putricide_clear_mutated_plague_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ OnEffectHitTarget += SpellEffectFn(spell_putricide_clear_aura_effect_value_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
{
- return new spell_putricide_clear_mutated_plague_SpellScript();
+ return new spell_putricide_clear_aura_effect_value_SpellScript();
}
};
@@ -1518,12 +1566,12 @@ void AddSC_boss_professor_putricide()
{
new boss_professor_putricide();
new npc_volatile_ooze();
+ new npc_gas_cloud();
new spell_putricide_gaseous_bloat();
new spell_putricide_ooze_channel();
new spell_putricide_slime_puddle();
new spell_putricide_slime_puddle_aura();
new spell_putricide_unstable_experiment();
- new spell_putricide_ooze_summon();
new spell_putricide_ooze_eruption_searcher();
new spell_putricide_choking_gas_bomb();
new spell_putricide_unbound_plague();
@@ -1534,6 +1582,6 @@ void AddSC_boss_professor_putricide()
new spell_putricide_mutated_transformation();
new spell_putricide_mutated_transformation_dmg();
new spell_putricide_regurgitated_ooze();
- new spell_putricide_clear_mutated_plague();
+ new spell_putricide_clear_aura_effect_value();
new spell_stinky_precious_decimate();
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
index e12393f047f..22858cf69e5 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp
@@ -234,7 +234,6 @@ class instance_ulduar : public InstanceMapScript
case NPC_ALGALON:
AlgalonGUID = creature->GetGUID();
break;
-
// Hodir's Helper NPCs
case NPC_EIVI_NIGHTFEATHER:
if (TeamInInstance == HORDE)
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 1a0f4576fea..84e3bd8d604 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -35,6 +35,9 @@ enum ShamanSpells
SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349,
SHAMAN_SPELL_SATED = 57724,
SHAMAN_SPELL_EXHAUSTION = 57723,
+
+ SHAMAN_SPELL_STORM_EARTH_AND_FIRE = 51483,
+ EARTHBIND_TOTEM_SPELL_EARTHGRAB = 64695,
// For Earthen Power
SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474,
@@ -221,9 +224,25 @@ class spell_sha_earthbind_totem : public SpellScriptLoader
caster->CastSpell(caster, SHAMAN_TOTEM_SPELL_EARTHEN_POWER, true, NULL, aurEff);
}
+ void Apply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (!GetCaster())
+ return;
+ Player* owner = GetCaster()->GetCharmerOrOwnerPlayerOrPlayerItself();
+ if (!owner)
+ return;
+ // Storm, Earth and Fire
+ if (AuraEffect* aurEff = owner->GetAuraEffectOfRankedSpell(SHAMAN_SPELL_STORM_EARTH_AND_FIRE, EFFECT_1))
+ {
+ if (roll_chance_i(aurEff->GetAmount()))
+ GetCaster()->CastSpell(GetCaster(), EARTHBIND_TOTEM_SPELL_EARTHGRAB, false);
+ }
+ }
+
void Register()
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_earthbind_totem_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ OnEffectApply += AuraEffectApplyFn(spell_sha_earthbind_totem_AuraScript::Apply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index 66e44112b8a..3e4c043ae47 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -365,7 +365,7 @@ class spell_warr_concussion_blow : public SpellScriptLoader
void HandleDummy(SpellEffIndex /* effIndex */)
{
- SetHitDamage(GetHitDamage() + CalculatePctF(GetHitDamage(),GetCaster()->GetTotalAttackPowerValue(BASE_ATTACK)));
+ SetHitDamage(CalculatePctN(GetCaster()->GetTotalAttackPowerValue(BASE_ATTACK), GetEffectValue()));
}
void Register()
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 6858827ed8e..61b997bba35 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2400,6 +2400,9 @@ enum eLockSmith
QUEST_HOTTER_THAN_HELL_H = 10764,
QUEST_RETURN_TO_KHAGDAR = 9837,
QUEST_CONTAINMENT = 13159,
+ QUEST_ETERNAL_VIGILANCE = 11011,
+ QUEST_KEY_TO_THE_FOCUSING_IRIS = 13372,
+ QUEST_HC_KEY_TO_THE_FOCUSING_IRIS = 13375,
ITEM_ARCATRAZ_KEY = 31084,
ITEM_SHADOWFORGE_KEY = 11000,
@@ -2407,21 +2410,28 @@ enum eLockSmith
ITEM_SHATTERED_HALLS_KEY = 28395,
ITEM_THE_MASTERS_KEY = 24490,
ITEM_VIOLET_HOLD_KEY = 42482,
+ ITEM_ESSENCE_INFUSED_MOONSTONE = 32449,
+ ITEM_KEY_TO_THE_FOCUSING_IRIS = 44582,
+ ITEM_HC_KEY_TO_THE_FOCUSING_IRIS = 44581,
SPELL_ARCATRAZ_KEY = 54881,
SPELL_SHADOWFORGE_KEY = 54882,
SPELL_SKELETON_KEY = 54883,
SPELL_SHATTERED_HALLS_KEY = 54884,
SPELL_THE_MASTERS_KEY = 54885,
- SPELL_VIOLET_HOLD_KEY = 67253
+ SPELL_VIOLET_HOLD_KEY = 67253,
+ SPELL_ESSENCE_INFUSED_MOONSTONE = 40173,
};
-#define GOSSIP_LOST_ARCATRAZ_KEY "I've lost my key to the Arcatraz."
-#define GOSSIP_LOST_SHADOWFORGE_KEY "I've lost my key to the Blackrock Depths."
-#define GOSSIP_LOST_SKELETON_KEY "I've lost my key to the Scholomance."
-#define GOSSIP_LOST_SHATTERED_HALLS_KEY "I've lost my key to the Shattered Halls."
-#define GOSSIP_LOST_THE_MASTERS_KEY "I've lost my key to the Karazhan."
-#define GOSSIP_LOST_VIOLET_HOLD_KEY "I've lost my key to the Violet Hold."
+#define GOSSIP_LOST_ARCATRAZ_KEY "I've lost my key to the Arcatraz."
+#define GOSSIP_LOST_SHADOWFORGE_KEY "I've lost my key to the Blackrock Depths."
+#define GOSSIP_LOST_SKELETON_KEY "I've lost my key to the Scholomance."
+#define GOSSIP_LOST_SHATTERED_HALLS_KEY "I've lost my key to the Shattered Halls."
+#define GOSSIP_LOST_THE_MASTERS_KEY "I've lost my key to the Karazhan."
+#define GOSSIP_LOST_VIOLET_HOLD_KEY "I've lost my key to the Violet Hold."
+#define GOSSIP_LOST_ESSENCE_INFUSED_MOONSTONE "I've lost my Essence-Infused Moonstone."
+#define GOSSIP_LOST_KEY_TO_THE_FOCUSING_IRIS "I've lost my Key to the Focusing Iris."
+#define GOSSIP_LOST_HC_KEY_TO_THE_FOCUSING_IRIS "I've lost my Heroic Key to the Focusing Iris."
class npc_locksmith : public CreatureScript
{
@@ -2456,6 +2466,18 @@ public:
if (player->GetQuestRewardStatus(QUEST_CONTAINMENT) && !player->HasItemCount(ITEM_VIOLET_HOLD_KEY, 1, true))
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_VIOLET_HOLD_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
+ // Essence-Infused Moonstone
+ if (player->GetQuestRewardStatus(QUEST_ETERNAL_VIGILANCE) && !player->HasItemCount(ITEM_ESSENCE_INFUSED_MOONSTONE, 1, true))
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_ESSENCE_INFUSED_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
+
+ // Key to the Focusing Iris
+ if (player->GetQuestRewardStatus(QUEST_KEY_TO_THE_FOCUSING_IRIS) && !player->HasItemCount(ITEM_KEY_TO_THE_FOCUSING_IRIS, 1, true))
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_KEY_TO_THE_FOCUSING_IRIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
+
+ // Heroic Key to the Focusing Iris
+ if (player->GetQuestRewardStatus(QUEST_HC_KEY_TO_THE_FOCUSING_IRIS) && !player->HasItemCount(ITEM_HC_KEY_TO_THE_FOCUSING_IRIS, 1, true))
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_HC_KEY_TO_THE_FOCUSING_IRIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
+
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
return true;
@@ -2490,6 +2512,18 @@ public:
player->CLOSE_GOSSIP_MENU();
player->CastSpell(player, SPELL_VIOLET_HOLD_KEY, false);
break;
+ case GOSSIP_ACTION_INFO_DEF + 7:
+ player->CLOSE_GOSSIP_MENU();
+ player->CastSpell(player, SPELL_ESSENCE_INFUSED_MOONSTONE, false);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 8:
+ player->CLOSE_GOSSIP_MENU();
+ player->AddItem(ITEM_KEY_TO_THE_FOCUSING_IRIS,1);
+ break;
+ case GOSSIP_ACTION_INFO_DEF + 9:
+ player->CLOSE_GOSSIP_MENU();
+ player->AddItem(ITEM_HC_KEY_TO_THE_FOCUSING_IRIS,1);
+ break;
}
return true;
}
diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h
index 8b69accfc23..314d196cc06 100755
--- a/src/server/shared/Database/DatabaseWorkerPool.h
+++ b/src/server/shared/Database/DatabaseWorkerPool.h
@@ -102,7 +102,7 @@ class DatabaseWorkerPool
//! Shuts down delaythreads for this connection pool by underlying deactivate().
//! The next dequeue attempt in the worker thread tasks will result in an error,
- //! ultimately ending the worker thread task.
+ //! ultimately ending the worker thread task.
_queue->queue()->close();
for (uint8 i = 0; i < _connectionCount[IDX_ASYNC]; ++i)
@@ -114,7 +114,7 @@ class DatabaseWorkerPool
t->Close(); //! Closes the actualy MySQL connection.
}
- sLog->outSQLDriver("Asynchronous connections on DatabasePool '%s' terminated. Proceeding with synchronous connections.",
+ sLog->outSQLDriver("Asynchronous connections on DatabasePool '%s' terminated. Proceeding with synchronous connections.",
GetDatabaseName());
//! Shut down the synchronous connections