aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--THANKS38
-rw-r--r--sql/updates/world/2012_10_11_00_world_gameobject.sql92
-rw-r--r--sql/updates/world/2012_10_13_00_world_creature_template.sql25
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.cpp16
-rwxr-xr-xsrc/server/game/AI/CoreAI/PetAI.h2
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp23
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.h109
-rwxr-xr-xsrc/server/game/Battlegrounds/Battleground.cpp29
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp1
-rw-r--r--src/server/game/Entities/Player/Player.cpp10
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp2
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.h2
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp4
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp2
-rw-r--r--src/server/game/Spells/SpellMgr.cpp4
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp29
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp2
-rwxr-xr-xsrc/server/shared/Utilities/Util.cpp31
-rwxr-xr-xsrc/server/shared/Utilities/Util.h2
20 files changed, 264 insertions, 161 deletions
diff --git a/THANKS b/THANKS
index ad7b8be68f4..d43b40b9ba5 100644
--- a/THANKS
+++ b/THANKS
@@ -14,7 +14,9 @@ Thanks to the WCell team (especially Ralek) for research on realm reconnect
sequence, item scaling stats algorithm, gameobject rotation issues.
Thanks go out to the following people for various patches/code (listed in the
-order they were added): w12x, dythzer, XEQT, death420, balrok, TOM_RUS,
+order they were added) (there may be duplicates or invalid names, most of them
+were extracted from commits):
+w12x, dythzer, XEQT, death420, balrok, TOM_RUS,
runningnak3d, Seline, KingPin, raczman, bogie, Neo2003, NoFantasy, Derex,
freghar, toilet1, megamage, MadJack, WarHead, gvcoman, Ntsc, arrai, jrkpote,
Seraphim, vagoth, KerchumA222, Rognar, Blaymoira, DragonHunter, Molius, ApoC,
@@ -33,9 +35,9 @@ teacher4, zhenya, Albrecht de Endrau, Phacops, Naicisum, thenecromancer, shax,
cryingcloud, freeganja, Foks, daveh, Az@zel, evilstar, Corfen, Astellar, Maxxie,
DEN_North, StarJoker, Nezemnoy, X-Savior, subhuman_bob, Ambal, Brueggus, sparc,
jojo, Trojan, tvaroh, Genars, BombermaG, Bulkin, nesocip, xILOSWag, SilverIce,
-Uruviel, timmit, SeT, Seizerkiller, Stokrotka, JoN0, Tanatos, Hunteee, Alyen,
+Uruviel, timmit, Seizerkiller, Stokrotka, JoN0, Tanatos, Hunteee, Alyen,
Farah, Them, DaGNU, arthurcik, BudIcePenguin, Amok, Amit86, onkelz28, Azrael,
-Larva, Roland, DerDyddye, Vicos, PSZ, CRAZyBUg, irish, Sephiroth1984, hunuza,
+Larva, Roland, DerDyddye, Vicos, PSZ, CRAZyBUg, irish, Sephiroth1984,
mike753, Xlybriem, Paytheo, ArticDevil, FearX, Beaste, bufferoverflow, Jeniczek,
Den, bobaz, crackm, seirge, D_Skywalk, mknjc, Christyan, Saeba, Nevan, tlexii,
liszt, duckman, Joro, Charlie, smellbee, bigjohnson4, maxdestroyer, Destalker,
@@ -64,7 +66,7 @@ footman, elron103, make_the_king, destros, MetaphysicalDrama, disassebler,
Malcrom, Vladmimír Lipták, retriman, hyriuu, Smakapotatis, PainKiller,
bkhorizon, n0n4m3, Chesterfield, Frankir, Wowka321, Morpheux, p0wer,
Ouden, toshik, laise, yavi, Splinter, Syntec, Arthas, denyde, unholy,
-Vaughner, blackmanos, edrinn, Liberate, Shauren, dr.tenma, click, silverice,
+Vaughner, blackmanos, edrinn, Liberate, Shauren, dr.tenma, click,
SupaBad, Xanadu, Socolin, Shocker, Silinoron, 0xFuture, xK1, Ramus, menke,
wowgargamel, Dark0r, Kierkegaard, Leak, ge0rg, StormByte, joshwhedon,
BlackCat0110, JuliuSZS, n4rk0, filip.havlicek, m.ax, laviniu, LordJZ, Scazzato88,
@@ -72,5 +74,29 @@ svannon, jurkovic.nikola, Willian Krueger, BioHazard, Ille000, Erocoloco,
terrorbringer, antihrists, Havenard, scarymovie87, D3VIL, FaTe753, PrinceCreed,
spgm, Dakeyras, sombre88, 19Maxx83, moriquendu, Ille, breakerfly,
zthoreen, clement.roussel, p.alexej, Ceris, Nayre, Kiper, announce, thmarth,
-Ner'zhul, DarkXuan, leak, linencloth, SnakeIce, Supabad, Tome, Nay, Kaelima,
-Svannon
+Ner'zhul, DarkXuan, linencloth, SnakeIce, Tome, Nay, Kaelima,
+Subv, Tuxity, tibbi, Gigatotem, Nexflame, trickerer, zxbiohazardzx, w1sht0l1v3,
+Warpten, CeIa, Kandera, horn, Dimitro, thesensei, Sovak, Vincent-Michael,
+Xanvial, faq, Gacko, Geodar, hexa-, MacWarrior, cyberbrest, Myran2, Northstrider,
+AFROM, CrYser, Kretol, Bizzy, nelegalno, Kinzcool, armano2, Tomas, Aristoo, Trista,
+e@cacaw.net, oMadMano, Kiddie, blub, Santiago, tobmaps, Mik43l, danik, Souler,
+joschiwald, CDawg, WishToDie, gecko32, gadge, neuro_999, Stefo, dr.skull, NTX, Hexit,
+Stalker-Riddick, thomas33, Manuel Carrasco, Imprtat, Chaplain, teyrnon, zorix, Greymane,
+Venugh, e000, Amit, Alternative, Exodius, Jorge, shlomi1515, tharaca, Alestaan, Valcorb,
+Odyssey, Chipsi, Pesthuf, stfx, Yaki Khadafi, David Klepáček, SignFinder, unknown,
+NNN666, AliveShiro, 4m1g0, mweinelt, Abdollah Hasan, Xees, zori, warriorpoetex, qaywsx,
+ghost, Discovered, faq_, Jildor, The Game, Kezo90, Helias, Frca, Ramusik, elecyb, Joni,
+Multivitamin, faramir118, cookta2012, Gyx, ShinDarth, Lopin, Martin Weinelt,
+Bezo, frozenarmor, E. van Harten, LiMCrosS, Albis, Go6o, Pitcrawler, Matthew Goff, neurorulez,
+Ka0z, glkrlos, zwerg, Merlin2010, furion, Giuseppe Montesanto, LihO, Bootz, PKX, burnham,
+Drake Fish, Vlad, Discover, Heisenberg, Kapoeira, Emo Norfik, tREAk, zoidmann, Wilds, weclub,
+Jon, Cron, Alexander, Vinolentus, LaserJet, mns, Stalker_Riddick, Yelvann, draco, Geekotron,
+bytewarrior, Fredi Machado, Studioworks, 3kids, idostyle@zoit, Sebastián Orellana, DemiDroL,
+n4ndo, et2012, Rochet2, Grobi, Google, Wispeckt, hacknowledge, wonopon, Naga,
+Joeri Thissen, Payn, Fest, insider42, DrTenma, L30m4nc3r, Akama, Jesper Meyer, Kiperr,
+maanuel, vcrx6, Furion89, Mark07, lost-illusion, SeTM, TCKiper, vlad852, tehmarto, boom,
+Per Wilhelmsen, telsamat, Various, erimioa, Sawiner, zergtmn, SimonDMII, pek2011, alexbolotsin,
+laly, mrquickfx, Koord, amnell, GWRde, EdwinDW, gildor, darkstalker, Feanordev, _manuel_,
+thymuswisewood, sohrab, Lazzalf, Taser, Ottowayne, Exordian, nucleartux, John Holiver, j4r0d,
+Trazom62, Brian, enjoi, teacher, Alex Bolotsin, Troy, silver1ce, nihal, arcanzic, Chaz Brown,
+pendragon, aven_coda, cca220v, ArcticDevil, derex_tri \ No newline at end of file
diff --git a/sql/updates/world/2012_10_11_00_world_gameobject.sql b/sql/updates/world/2012_10_11_00_world_gameobject.sql
new file mode 100644
index 00000000000..0c08d9d5622
--- /dev/null
+++ b/sql/updates/world/2012_10_11_00_world_gameobject.sql
@@ -0,0 +1,92 @@
+SET @GUID = 74685;
+SET @MAP = 571;
+DELETE FROM `gameobject` WHERE (`id` IN (192254,192255,192269,192284,192285,192336,192338,192339,192349,192350,192351,192352,192353,192354,192355,192356,192357,192358,192359,192360,192361,192362,192363,192364,192366,192367,192368,192369,192370,192371,192372,192373,192374,192375,192378,192379,192416,192488,192501) AND `guid` != 67250) OR `guid` BETWEEN @GUID AND @GUID+87;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`) VALUES
+(@GUID+0, 192488, @MAP, 64, 5262.540039, 3047.949951, 432.054993, 3.106650), -- Flag on tower
+(@GUID+1, 192501, @MAP, 128, 5262.540039, 3047.949951, 432.054993, 3.106650), -- Flag on tower
+(@GUID+2, 192374, @MAP, 64, 5272.939941, 2976.550049, 444.492004, 3.124120), -- Flag on Wall Intersect
+(@GUID+3, 192416, @MAP, 128, 5272.939941, 2976.550049, 444.492004, 3.124120), -- Flag on Wall Intersect
+(@GUID+4, 192375, @MAP, 64, 5235.189941, 2941.899902, 444.278015, 1.588250), -- Flag on Wall Intersect
+(@GUID+5, 192416, @MAP, 128, 5235.189941, 2941.899902, 444.278015, 1.588250), -- Flag on Wall Intersect
+(@GUID+6, 192488, @MAP, 64, 5163.129883, 2952.590088, 433.502991, 1.535890), -- Flag on tower
+(@GUID+7, 192501, @MAP, 128, 5163.129883, 2952.590088, 433.502991, 1.535890), -- Flag on tower
+(@GUID+8, 192488, @MAP, 64, 5145.109863, 2935.000000, 433.385986, 3.141590), -- Flag on tower
+(@GUID+9, 192501, @MAP, 128, 5145.109863, 2935.000000, 433.385986, 3.141590), -- Flag on tower
+(@GUID+10, 192488, @MAP, 64, 5158.810059, 2883.129883, 431.618011, 3.141590), -- Flag on wall
+(@GUID+11, 192416, @MAP, 128, 5158.810059, 2883.129883, 431.618011, 3.141590), -- Flag on wall
+(@GUID+12, 192336, @MAP, 64, 5154.490234, 2862.149902, 445.011993, 3.141590), -- Flag on Wall Intersect
+(@GUID+13, 192416, @MAP, 128, 5154.490234, 2862.149902, 445.011993, 3.141590), -- Flag on Wall Intersect
+(@GUID+14, 192255, @MAP, 64, 5154.520020, 2853.310059, 409.183014, 3.141590), -- Flag on the floor
+(@GUID+15, 192269, @MAP, 128, 5154.520020, 2853.310059, 409.183014, 3.141590), -- Flag on the floor
+(@GUID+16, 192254, @MAP, 64, 5154.459961, 2828.939941, 409.188995, 3.141590), -- Flag on the floor
+(@GUID+17, 192269, @MAP, 128, 5154.459961, 2828.939941, 409.188995, 3.141590), -- Flag on the floor
+(@GUID+18, 192349, @MAP, 64, 5155.310059, 2820.739990, 444.979004, -3.13286), -- Flag on wall intersect
+(@GUID+19, 192416, @MAP, 128, 5155.310059, 2820.739990, 444.979004, -3.13286), -- Flag on wall intersect
+(@GUID+20, 192488, @MAP, 64, 5160.339844, 2798.610107, 430.769012, 3.141590), -- Flag on wall
+(@GUID+21, 192416, @MAP, 128, 5160.339844, 2798.610107, 430.769012, 3.141590), -- Flag on wall
+(@GUID+22, 192488, @MAP, 64, 5146.040039, 2747.209961, 433.584015, 3.071770), -- Flag on tower
+(@GUID+23, 192501, @MAP, 128, 5146.040039, 2747.209961, 433.584015, 3.071770), -- Flag on tower
+(@GUID+24, 192488, @MAP, 64, 5163.779785, 2729.679932, 433.394012, -1.58825), -- Flag on tower
+(@GUID+25, 192501, @MAP, 128, 5163.779785, 2729.679932, 433.394012, -1.58825), -- Flag on tower
+(@GUID+26, 192366, @MAP, 64, 5236.270020, 2739.459961, 444.992004, -1.59698), -- Flag on wall intersect
+(@GUID+27, 192416, @MAP, 128, 5236.270020, 2739.459961, 444.992004, -1.59698), -- Flag on wall intersect
+(@GUID+28, 192367, @MAP, 64, 5271.799805, 2704.870117, 445.183014, -3.13286), -- Flag on wall intersect
+(@GUID+29, 192416, @MAP, 128, 5271.799805, 2704.870117, 445.183014, -3.13286), -- Flag on wall intersect
+(@GUID+30, 192488, @MAP, 64, 5260.819824, 2631.800049, 433.324005, 3.054330), -- Flag on tower
+(@GUID+31, 192501, @MAP, 128, 5260.819824, 2631.800049, 433.324005, 3.054330), -- Flag on tower
+(@GUID+32, 192488, @MAP, 64, 5278.379883, 2613.830078, 433.408997, -1.58825), -- Flag on tower
+(@GUID+33, 192501, @MAP, 128, 5278.379883, 2613.830078, 433.408997, -1.58825), -- Flag on tower
+(@GUID+34, 192364, @MAP, 64, 5350.879883, 2622.719971, 444.686005, -1.57080), -- Flag on wall intersect
+(@GUID+35, 192416, @MAP, 128, 5350.879883, 2622.719971, 444.686005, -1.57080), -- Flag on wall intersect
+(@GUID+36, 192370, @MAP, 64, 5392.270020, 2639.739990, 435.330994, 1.509710), -- Flag on wall intersect
+(@GUID+37, 192416, @MAP, 128, 5392.270020, 2639.739990, 435.330994, 1.509710), -- Flag on wall intersect
+(@GUID+38, 192369, @MAP, 64, 5350.950195, 2640.360107, 435.407990, 1.570800), -- Flag on wall intersect
+(@GUID+39, 192416, @MAP, 128, 5350.950195, 2640.360107, 435.407990, 1.570800), -- Flag on wall intersect
+(@GUID+40, 192368, @MAP, 64, 5289.459961, 2704.679932, 435.875000, -0.01745), -- Flag on wall intersect
+(@GUID+41, 192416, @MAP, 128, 5289.459961, 2704.679932, 435.875000, -0.01745), -- Flag on wall intersect
+(@GUID+42, 192362, @MAP, 64, 5322.120117, 2763.610107, 444.973999, -1.55334), -- Flag on wall intersect
+(@GUID+43, 192416, @MAP, 128, 5322.120117, 2763.610107, 444.973999, -1.55334), -- Flag on wall intersect
+(@GUID+44, 192363, @MAP, 64, 5363.609863, 2763.389893, 445.023987, -1.54462), -- Flag on wall intersect
+(@GUID+45, 192416, @MAP, 128, 5363.609863, 2763.389893, 445.023987, -1.54462), -- Flag on wall intersect
+(@GUID+46, 192379, @MAP, 64, 5363.419922, 2781.030029, 435.763000, 1.570800), -- Flag on wall intersect
+(@GUID+47, 192416, @MAP, 128, 5363.419922, 2781.030029, 435.763000, 1.570800), -- Flag on wall intersect
+(@GUID+48, 192378, @MAP, 64, 5322.020020, 2781.129883, 435.811005, 1.570800), -- Flag on wall intersect
+(@GUID+49, 192416, @MAP, 128, 5322.020020, 2781.129883, 435.811005, 1.570800), -- Flag on wall intersect
+(@GUID+50, 192355, @MAP, 64, 5288.919922, 2820.219971, 435.721008, 0.017452), -- Flag on wall intersect
+(@GUID+51, 192416, @MAP, 128, 5288.919922, 2820.219971, 435.721008, 0.017452), -- Flag on wall intersect
+(@GUID+52, 192354, @MAP, 64, 5288.410156, 2861.790039, 435.721008, 0.017452), -- Flag on wall intersect
+(@GUID+53, 192416, @MAP, 128, 5288.410156, 2861.790039, 435.721008, 0.017452), -- Flag on wall intersect
+(@GUID+54, 192358, @MAP, 64, 5322.229980, 2899.429932, 435.808014, -1.58825), -- Flag on wall intersect
+(@GUID+55, 192416, @MAP, 128, 5322.229980, 2899.429932, 435.808014, -1.58825), -- Flag on wall intersect
+(@GUID+56, 192359, @MAP, 64, 5364.350098, 2899.399902, 435.838989, -1.57080), -- Flag on wall intersect
+(@GUID+57, 192416, @MAP, 128, 5364.350098, 2899.399902, 435.838989, -1.57080), -- Flag on wall intersect
+(@GUID+58, 192338, @MAP, 64, 5397.759766, 2873.080078, 455.460999, 3.106650), -- Flag on keep
+(@GUID+59, 192416, @MAP, 128, 5397.759766, 2873.080078, 455.460999, 3.106650), -- Flag on keep
+(@GUID+60, 192339, @MAP, 64, 5397.390137, 2809.330078, 455.343994, 3.106650), -- Flag on keep
+(@GUID+61, 192416, @MAP, 128, 5397.390137, 2809.330078, 455.343994, 3.106650), -- Flag on keep
+(@GUID+62, 192284, @MAP, 64, 5372.479980, 2862.500000, 409.049011, 3.141590), -- Flag on floor
+(@GUID+63, 192269, @MAP, 128, 5372.479980, 2862.500000, 409.049011, 3.141590), -- Flag on floor
+(@GUID+64, 192285, @MAP, 64, 5371.490234, 2820.800049, 409.177002, 3.141590), -- Flag on floor
+(@GUID+65, 192269, @MAP, 128, 5371.490234, 2820.800049, 409.177002, 3.141590), -- Flag on floor
+(@GUID+66, 192371, @MAP, 64, 5364.290039, 2916.939941, 445.330994, 1.579520), -- Flag on wall intersect
+(@GUID+67, 192416, @MAP, 128, 5364.290039, 2916.939941, 445.330994, 1.579520), -- Flag on wall intersect
+(@GUID+68, 192372, @MAP, 64, 5322.859863, 2916.949951, 445.153992, 1.562070), -- Flag on wall intersect
+(@GUID+69, 192416, @MAP, 128, 5322.859863, 2916.949951, 445.153992, 1.562070), -- Flag on wall intersect
+(@GUID+70, 192373, @MAP, 64, 5290.350098, 2976.560059, 435.221008, 0.017452), -- Flag on wall intersect
+(@GUID+71, 192416, @MAP, 128, 5290.350098, 2976.560059, 435.221008, 0.017452), -- Flag on wall intersect
+(@GUID+72, 192360, @MAP, 64, 5352.370117, 3037.090088, 435.252014, -1.57080), -- Flag on wall intersect
+(@GUID+73, 192416, @MAP, 128, 5352.370117, 3037.090088, 435.252014, -1.57080), -- Flag on wall intersect
+(@GUID+74, 192361, @MAP, 64, 5392.649902, 3037.110107, 433.713013, -1.52716), -- Flag on wall intersect
+(@GUID+75, 192416, @MAP, 128, 5392.649902, 3037.110107, 433.713013, -1.52716), -- Flag on wall intersect
+(@GUID+76, 192356, @MAP, 64, 5237.069824, 2757.030029, 435.795990, 1.518440), -- Flag on wall intersect
+(@GUID+77, 192416, @MAP, 128, 5237.069824, 2757.030029, 435.795990, 1.518440), -- Flag on wall intersect
+(@GUID+78, 192352, @MAP, 64, 5173.020020, 2820.929932, 435.720001, 0.017452), -- Flag on wall intersect
+(@GUID+79, 192416, @MAP, 128, 5173.020020, 2820.929932, 435.720001, 0.017452), -- Flag on wall intersect
+(@GUID+80, 192353, @MAP, 64, 5172.109863, 2862.570068, 435.721008, 0.017452), -- Flag on wall intersect
+(@GUID+81, 192416, @MAP, 128, 5172.109863, 2862.570068, 435.721008, 0.017452), -- Flag on wall intersect
+(@GUID+82, 192357, @MAP, 64, 5235.339844, 2924.340088, 435.040009, -1.57080), -- Flag on wall intersect
+(@GUID+83, 192416, @MAP, 128, 5235.339844, 2924.340088, 435.040009, -1.57080), -- Flag on wall intersect
+(@GUID+84, 192350, @MAP, 64, 5270.689941, 2861.780029, 445.058014, -3.11539), -- Flag on wall intersect
+(@GUID+85, 192416, @MAP, 128, 5270.689941, 2861.780029, 445.058014, -3.11539), -- Flag on wall intersect
+(@GUID+86, 192351, @MAP, 64, 5271.279785, 2820.159912, 445.200989, -3.13286), -- Flag on wall intersect
+(@GUID+87, 192416, @MAP, 128, 5271.279785, 2820.159912, 445.200989, -3.13286); -- Flag on wall intersect
diff --git a/sql/updates/world/2012_10_13_00_world_creature_template.sql b/sql/updates/world/2012_10_13_00_world_creature_template.sql
new file mode 100644
index 00000000000..7dc7a463f3f
--- /dev/null
+++ b/sql/updates/world/2012_10_13_00_world_creature_template.sql
@@ -0,0 +1,25 @@
+-- Orb rotation focus
+UPDATE `creature_template` SET `modelid1`=11868,`modelid2`=169,`minlevel`=80,`maxlevel`=80,`faction_A`=14,`faction_H`=14,`speed_walk`=2.2,`speed_run`=0.785714,`baseattacktime`=2000,`unit_flags`=33554688 WHERE `entry` IN(43280,43281,43282);
+UPDATE `creature_template` SET `difficulty_entry_1`=43280, `difficulty_entry_2`=43281,`difficulty_entry_3`=43282 WHERE `entry`=40091;
+
+-- Orb carrier
+UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=2,`faction_A`=14,`faction_H`=14,`speed_walk`=1.2,`speed_run`=1.14286,`baseattacktime`=2000 WHERE `entry` IN(40470,40471,40472);
+UPDATE `creature_template` SET `difficulty_entry_1`=40470, `difficulty_entry_2`=40471,`difficulty_entry_3`=40472 WHERE `entry`=40081;
+
+-- Saviana Ragefire
+UPDATE `creature_template` SET `exp`=2 WHERE `entry`=39823;
+
+-- General Zarithrian
+UPDATE `creature_template` SET `exp`=2 WHERE `entry`=39805;
+
+-- Twilight Halion
+UPDATE `creature_template` SET `difficulty_entry_1`=40143, `difficulty_entry_2`=40144,`difficulty_entry_3`=40145 WHERE `entry`=40142;
+UPDATE `creature_template` SET `minlevel`=83,`maxlevel`=83,`speed_walk`=1.6,`speed_run`=1.42857,`baseattacktime`=1800,`unit_flags`=559168,`dynamicflags`=12 WHERE `entry` IN(40143,40144,40145);
+
+-- Halion
+UPDATE `creature_template` SET `speed_walk`=1.6,`speed_run`=1.42857,`baseattacktime`=1500,`unit_flags`=32832,`dynamicflags`=12,`flags_extra`=1 WHERE `entry` IN(39864,39944,39945);
+UPDATE `creature_template` SET `dmg_multiplier`=50 WHERE `entry`=39944;
+UPDATE `creature_template` SET `dmg_multiplier`=85 WHERE `entry`=39945;
+
+-- Onyx Flamecaller
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`faction_A`=103,`faction_H`=103,`exp`=2,`speed_walk`=0.88888,`speed_run`=1.42857,`baseattacktime`=2000,`unit_flags`=32768,`equipment_id`=2468 WHERE `entry`=39815;
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 99cf1cda4fc..6802c109401 100755
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -71,6 +71,8 @@ void PetAI::_stopAttack()
}
me->AttackStop();
+ me->InterruptNonMeleeSpells(false);
+ me->SendMeleeAttackStop(); // Should stop pet's attack button from flashing
me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement();
}
@@ -89,7 +91,8 @@ void PetAI::UpdateAI(const uint32 diff)
m_updateAlliesTimer -= diff;
// me->getVictim() can't be used for check in case stop fighting, me->getVictim() clear at Unit death etc.
- if (me->getVictim())
+ // Must also check if victim is alive
+ if (me->getVictim() && me->getVictim()->isAlive())
{
// is only necessary to stop casting, the pet must not exit combat
if (me->getVictim()->HasBreakableByDamageCrowdControlAura(me))
@@ -121,10 +124,16 @@ void PetAI::UpdateAI(const uint32 diff)
if (nextTarget)
AttackStart(nextTarget);
else
+ {
+ me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement();
+ }
}
else
+ {
+ me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement();
+ }
}
else if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW)) // no charm info and no victim
HandleReturnMovement();
@@ -301,7 +310,7 @@ void PetAI::KilledUnit(Unit* victim)
// Can't use _stopAttack() because that activates movement handlers and ignores
// next target selection
me->AttackStop();
- me->GetCharmInfo()->SetIsCommandAttack(false);
+ me->InterruptNonMeleeSpells(false);
me->SendMeleeAttackStop(); // Stops the pet's 'Attack' button from flashing
Unit* nextTarget = SelectNextTarget();
@@ -309,7 +318,10 @@ void PetAI::KilledUnit(Unit* victim)
if (nextTarget)
AttackStart(nextTarget);
else
+ {
+ me->GetCharmInfo()->SetIsCommandAttack(false);
HandleReturnMovement(); // Return
+ }
}
void PetAI::AttackStart(Unit* target)
diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
index 8e5311fa000..d7f1dca3fbf 100755
--- a/src/server/game/AI/CoreAI/PetAI.h
+++ b/src/server/game/AI/CoreAI/PetAI.h
@@ -32,8 +32,6 @@ class PetAI : public CreatureAI
explicit PetAI(Creature* c);
void EnterEvadeMode();
- void JustDied(Unit* /*who*/) { _stopAttack(); }
-
void UpdateAI(const uint32);
static int Permissible(const Creature*);
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index 119880bae8d..59dc6761583 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -188,29 +188,6 @@ bool BattlefieldWG::SetupBattlefield()
go->SetUInt32Value(GAMEOBJECT_FACTION, WintergraspFaction[GetDefenderTeam()]);
}
- // Spawn banners in the keep
- for (uint8 i = 0; i < WG_KEEPGAMEOBJECT_MAX; i++)
- {
- if (GameObject* go = SpawnGameObject(WGKeepGameObject[i].entryHorde, WGKeepGameObject[i].x, WGKeepGameObject[i].y, WGKeepGameObject[i].z, WGKeepGameObject[i].o))
- {
- go->SetRespawnTime(GetDefenderTeam()? RESPAWN_ONE_DAY : RESPAWN_IMMEDIATELY);
- m_KeepGameObject[1].insert(go);
- }
- if (GameObject* go = SpawnGameObject(WGKeepGameObject[i].entryAlliance, WGKeepGameObject[i].x, WGKeepGameObject[i].y, WGKeepGameObject[i].z, WGKeepGameObject[i].o))
- {
- go->SetRespawnTime(GetDefenderTeam()? RESPAWN_IMMEDIATELY : RESPAWN_ONE_DAY);
- m_KeepGameObject[0].insert(go);
- }
- }
-
- // Show defender banner in keep
- for (GameObjectSet::const_iterator itr = m_KeepGameObject[GetDefenderTeam()].begin(); itr != m_KeepGameObject[GetDefenderTeam()].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_IMMEDIATELY);
-
- // Hide attackant banner in keep
- for (GameObjectSet::const_iterator itr = m_KeepGameObject[GetAttackerTeam()].begin(); itr != m_KeepGameObject[GetAttackerTeam()].end(); ++itr)
- (*itr)->SetRespawnTime(RESPAWN_ONE_DAY);
-
UpdateCounterVehicle(true);
return true;
}
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h
index 323f7f2b13d..49ea25a5e04 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -440,10 +440,9 @@ uint32 const VehNumWorldState[] = { 3680, 3490 };
uint32 const MaxVehNumWorldState[] = { 3681, 3491 };
uint32 const ClockWorldState[] = { 3781, 4354 };
uint32 const WintergraspFaction[] = { 1732, 1735, 35 };
-float const WintergraspStalkerPos[] = { 0, 0, 0, 0 };
+float const WintergraspStalkerPos[] = { 4948.985f, 2937.789f, 550.5172f, 1.815142f };
uint8 const WG_MAX_OBJ = 32;
-uint8 const WG_KEEPGAMEOBJECT_MAX = 44;
uint8 const WG_MAX_TURRET = 15;
uint8 const WG_MAX_KEEP_NPC = 39;
uint8 const WG_MAX_OUTSIDE_NPC = 14;
@@ -580,6 +579,19 @@ struct WintergraspBuildingSpawnData
uint32 nameId;
};
+struct WintergraspRebuildableBuildingData
+{
+ uint32 entry;
+ uint64 Guid;
+ uint32 WorldState;
+ float x;
+ float y;
+ float z;
+ float o;
+ uint32 type;
+ uint32 nameId;
+};
+
const WintergraspBuildingSpawnData WGGameObjectBuilding[WG_MAX_OBJ] =
{
// Wall (Not spawned in db)
@@ -628,99 +640,6 @@ const WintergraspBuildingSpawnData WGGameObjectBuilding[WG_MAX_OBJ] =
{ GO_WINTERGRASP_VAULT_GATE, 3773, 5397.11f, 2841.54f, 425.899f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST, 0 },
};
-
-// *********************************************************
-// **********Keep Element(GameObject,Creature)**************
-// *********************************************************
-
-// Keep gameobject
-// 192488 : 10 in sql, 19 in header
-// 192501 : 12 in sql, 17 in header
-// 192416 : 1 in sql, 33 in header
-// 192374 : 1 in sql, 1 in header
-// 192375 : 1 in sql, 1 in header
-// 192336 : 1 in sql, 1 in header
-// 192255 : 1 in sql, 1 in header
-// 192269 : 1 in sql, 7 in header
-// 192254 : 1 in sql, 1 in header
-// 192349 : 1 in sql, 1 in header
-// 192366 : 1 in sql, 3 in header
-// 192367 : 1 in sql, 1 in header
-// 192364 : 1 in sql, 1 in header
-// 192370 : 1 in sql, 1 in header
-// 192369 : 1 in sql, 1 in header
-// 192368 : 1 in sql, 1 in header
-// 192362 : 1 in sql, 1 in header
-// 192363 : 1 in sql, 1 in header
-// 192379 : 1 in sql, 1 in header
-// 192378 : 1 in sql, 1 in header
-// 192355 : 1 in sql, 1 in header
-// 192354 : 1 in sql, 1 in header
-// 192358 : 1 in sql, 1 in header
-// 192359 : 1 in sql, 1 in header
-// 192338 : 1 in sql, 1 in header
-// 192339 : 1 in sql, 1 in header
-// 192284 : 1 in sql, 1 in header
-// 192285 : 1 in sql, 1 in header
-// 192371 : 1 in sql, 1 in header
-// 192372 : 1 in sql, 1 in header
-// 192373 : 1 in sql, 1 in header
-// 192360 : 1 in sql, 1 in header
-// 192361 : 1 in sql, 1 in header
-// 192356 : 1 in sql, 1 in header
-// 192352 : 1 in sql, 1 in header
-// 192353 : 1 in sql, 1 in header
-// 192357 : 1 in sql, 1 in header
-// 192350 : 1 in sql, 1 in header
-// 192351 : 1 in sql, 1 in header
-const WintergraspObjectPositionData WGKeepGameObject[WG_KEEPGAMEOBJECT_MAX] =
-{
- { 5262.540039f, 3047.949951f, 432.054993f, 3.106650f, 192488, 192501 }, // Flag on tower
- { 5272.939941f, 2976.550049f, 444.492004f, 3.124120f, 192374, 192416 }, // Flag on Wall Intersect
- { 5235.189941f, 2941.899902f, 444.278015f, 1.588250f, 192375, 192416 }, // Flag on Wall Intersect
- { 5163.129883f, 2952.590088f, 433.502991f, 1.535890f, 192488, 192501 }, // Flag on tower
- { 5145.109863f, 2935.000000f, 433.385986f, 3.141590f, 192488, 192501 }, // Flag on tower
- { 5158.810059f, 2883.129883f, 431.618011f, 3.141590f, 192488, 192416 }, // Flag on wall
- { 5154.490234f, 2862.149902f, 445.011993f, 3.141590f, 192336, 192416 }, // Flag on Wall Intersect
- { 5154.520020f, 2853.310059f, 409.183014f, 3.141590f, 192255, 192269 }, // Flag on the floor
- { 5154.459961f, 2828.939941f, 409.188995f, 3.141590f, 192254, 192269 }, // Flag on the floor
- { 5155.310059f, 2820.739990f, 444.979004f, -3.13286f, 192349, 192416 }, // Flag on wall intersect
- { 5160.339844f, 2798.610107f, 430.769012f, 3.141590f, 192488, 192416 }, // Flag on wall
- { 5146.040039f, 2747.209961f, 433.584015f, 3.071770f, 192488, 192501 }, // Flag on tower
- { 5163.779785f, 2729.679932f, 433.394012f, -1.58825f, 192488, 192501 }, // Flag on tower
- { 5236.270020f, 2739.459961f, 444.992004f, -1.59698f, 192366, 192416 }, // Flag on wall intersect
- { 5271.799805f, 2704.870117f, 445.183014f, -3.13286f, 192367, 192416 }, // Flag on wall intersect
- { 5260.819824f, 2631.800049f, 433.324005f, 3.054330f, 192488, 192501 }, // Flag on tower
- { 5278.379883f, 2613.830078f, 433.408997f, -1.58825f, 192488, 192501 }, // Flag on tower
- { 5350.879883f, 2622.719971f, 444.686005f, -1.57080f, 192364, 192416 }, // Flag on wall intersect
- { 5392.270020f, 2639.739990f, 435.330994f, 1.509710f, 192370, 192416 }, // Flag on wall intersect
- { 5350.950195f, 2640.360107f, 435.407990f, 1.570800f, 192369, 192416 }, // Flag on wall intersect
- { 5289.459961f, 2704.679932f, 435.875000f, -0.01745f, 192368, 192416 }, // Flag on wall intersect
- { 5322.120117f, 2763.610107f, 444.973999f, -1.55334f, 192362, 192416 }, // Flag on wall intersect
- { 5363.609863f, 2763.389893f, 445.023987f, -1.54462f, 192363, 192416 }, // Flag on wall intersect
- { 5363.419922f, 2781.030029f, 435.763000f, 1.570800f, 192379, 192416 }, // Flag on wall intersect
- { 5322.020020f, 2781.129883f, 435.811005f, 1.570800f, 192378, 192416 }, // Flag on wall intersect
- { 5288.919922f, 2820.219971f, 435.721008f, 0.017452f, 192355, 192416 }, // Flag on wall intersect
- { 5288.410156f, 2861.790039f, 435.721008f, 0.017452f, 192354, 192416 }, // Flag on wall intersect
- { 5322.229980f, 2899.429932f, 435.808014f, -1.58825f, 192358, 192416 }, // Flag on wall intersect
- { 5364.350098f, 2899.399902f, 435.838989f, -1.57080f, 192359, 192416 }, // Flag on wall intersect
- { 5397.759766f, 2873.080078f, 455.460999f, 3.106650f, 192338, 192416 }, // Flag on keep
- { 5397.390137f, 2809.330078f, 455.343994f, 3.106650f, 192339, 192416 }, // Flag on keep
- { 5372.479980f, 2862.500000f, 409.049011f, 3.141590f, 192284, 192269 }, // Flag on floor
- { 5371.490234f, 2820.800049f, 409.177002f, 3.141590f, 192285, 192269 }, // Flag on floor
- { 5364.290039f, 2916.939941f, 445.330994f, 1.579520f, 192371, 192416 }, // Flag on wall intersect
- { 5322.859863f, 2916.949951f, 445.153992f, 1.562070f, 192372, 192416 }, // Flag on wall intersect
- { 5290.350098f, 2976.560059f, 435.221008f, 0.017452f, 192373, 192416 }, // Flag on wall intersect
- { 5352.370117f, 3037.090088f, 435.252014f, -1.57080f, 192360, 192416 }, // Flag on wall intersect
- { 5392.649902f, 3037.110107f, 433.713013f, -1.52716f, 192361, 192416 }, // Flag on wall intersect
- { 5237.069824f, 2757.030029f, 435.795990f, 1.518440f, 192356, 192416 }, // Flag on wall intersect
- { 5173.020020f, 2820.929932f, 435.720001f, 0.017452f, 192352, 192416 }, // Flag on wall intersect
- { 5172.109863f, 2862.570068f, 435.721008f, 0.017452f, 192353, 192416 }, // Flag on wall intersect
- { 5235.339844f, 2924.340088f, 435.040009f, -1.57080f, 192357, 192416 }, // Flag on wall intersect
- { 5270.689941f, 2861.780029f, 445.058014f, -3.11539f, 192350, 192416 }, // Flag on wall intersect
- { 5271.279785f, 2820.159912f, 445.200989f, -3.13286f, 192351, 192416 } // Flag on wall intersect
-};
-
const Position WGTurret[WG_MAX_TURRET] =
{
{ 5391.19f, 3060.8f, 419.616f, 1.69557f },
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 1b303760095..699445f8ccc 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -530,20 +530,23 @@ inline void Battleground::_ProcessJoin(uint32 diff)
player->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
player->ResetAllPowers();
- // remove auras with duration lower than 30s
- Unit::AuraApplicationMap & auraMap = player->GetAppliedAuras();
- for (Unit::AuraApplicationMap::iterator iter = auraMap.begin(); iter != auraMap.end();)
+ if (!player->isGameMaster())
{
- AuraApplication * aurApp = iter->second;
- Aura* aura = aurApp->GetBase();
- if (!aura->IsPermanent()
- && aura->GetDuration() <= 30*IN_MILLISECONDS
- && aurApp->IsPositive()
- && (!(aura->GetSpellInfo()->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY))
- && (!aura->HasEffectType(SPELL_AURA_MOD_INVISIBILITY)))
- player->RemoveAura(iter);
- else
- ++iter;
+ // remove auras with duration lower than 30s
+ Unit::AuraApplicationMap & auraMap = player->GetAppliedAuras();
+ for (Unit::AuraApplicationMap::iterator iter = auraMap.begin(); iter != auraMap.end();)
+ {
+ AuraApplication * aurApp = iter->second;
+ Aura* aura = aurApp->GetBase();
+ if (!aura->IsPermanent()
+ && aura->GetDuration() <= 30*IN_MILLISECONDS
+ && aurApp->IsPositive()
+ && (!(aura->GetSpellInfo()->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY))
+ && (!aura->HasEffectType(SPELL_AURA_MOD_INVISIBILITY)))
+ player->RemoveAura(iter);
+ else
+ ++iter;
+ }
}
}
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 5a5e4c5c848..d152dc5642f 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -217,6 +217,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa
SetDisplayId(goinfo->displayId);
+ m_model = GameObjectModel::Create(*this);
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
SetGoType(GameobjectTypes(goinfo->type));
SetGoState(go_state);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index ddd52ff352f..9a0b21194cd 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -1564,6 +1564,16 @@ void Player::Update(uint32 p_time)
// check every second
if (now > m_Last_tick + 1)
UpdateSoulboundTradeItems();
+
+ // If mute expired, remove it from the DB
+ if (GetSession()->m_muteTime && GetSession()->m_muteTime < now)
+ {
+ GetSession()->m_muteTime = 0;
+ PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME);
+ stmt->setInt64(0, 0); // Set the mute time to 0
+ stmt->setUInt32(1, GetSession()->GetAccountId());
+ LoginDatabase.Execute(stmt);
+ }
if (!m_timedquests.empty())
{
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 669f89a1b8d..3945d3b76fe 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -7565,7 +7565,7 @@ SpellScriptsBounds ObjectMgr::GetSpellScriptsBounds(uint32 spell_id)
}
// this allows calculating base reputations to offline players, just by race and class
-int32 ObjectMgr::GetBaseReputation(FactionEntry const* factionEntry, uint8 race, uint8 playerClass)
+int32 ObjectMgr::GetBaseReputationOff(FactionEntry const* factionEntry, uint8 race, uint8 playerClass)
{
if (!factionEntry)
return 0;
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index e727b9724e5..61094d60c55 100755
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -743,7 +743,7 @@ class ObjectMgr
return NULL;
}
- int32 GetBaseReputation(FactionEntry const* factionEntry, uint8 race, uint8 playerClass);
+ int32 GetBaseReputationOff(FactionEntry const* factionEntry, uint8 race, uint8 playerClass);
RepSpilloverTemplate const* GetRepSpilloverTemplate(uint32 factionId) const
{
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index a37362ce7bc..77d1c05abf2 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -2122,10 +2122,10 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
FactionEntry const* factionEntry = sFactionStore.LookupEntry(oldReputation);
// old base reputation
- int32 oldBaseRep = sObjectMgr->GetBaseReputation(factionEntry, oldRace, playerClass);
+ int32 oldBaseRep = sObjectMgr->GetBaseReputationOff(factionEntry, oldRace, playerClass);
// new base reputation
- int32 newBaseRep = sObjectMgr->GetBaseReputation(sFactionStore.LookupEntry(newReputation), race, playerClass);
+ int32 newBaseRep = sObjectMgr->GetBaseReputationOff(sFactionStore.LookupEntry(newReputation), race, playerClass);
// final reputation shouldnt change
int32 FinalRep = oldDBRep + oldBaseRep;
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index c092776bc14..04a371ba776 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5655,7 +5655,7 @@ SpellCastResult Spell::CheckCasterAuras() const
break;
}
}
- if (foundNotStun)
+ if (foundNotStun && m_spellInfo->Id != 22812)
prevented_reason = SPELL_FAILED_STUNNED;
}
else
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index ab6c2b1df8b..eb5c26a1c71 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3514,6 +3514,10 @@ void SpellMgr::LoadDbcDataCorrections()
case 71085: // Mana Void (periodic aura)
spellInfo->DurationIndex = 9; // 30 seconds (missing)
break;
+ case 72015: // Frostbolt Volley (only heroic)
+ case 72016: // Frostbolt Volley (only heroic)
+ spellInfo->EffectRadiusIndex[2] = EFFECT_RADIUS_40_YARDS;
+ break;
case 70936: // Summon Suppressor (needs target selection script)
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_TARGET_ANY;
spellInfo->EffectImplicitTargetB[0] = 0;
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index f527d7fb275..c370c70a94a 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -1003,15 +1003,19 @@ public:
if (handler->HasLowerSecurity(target, 0))
return false;
- int32 addmoney = atoi((char*)args);
+ int64 moneyToAdd = 0;
+ if (strchr(args, 'g') || strchr(args, 's') || strchr(args, 'c'))
+ moneyToAdd = MoneyStringToMoney(std::string(args));
+ else
+ moneyToAdd = atol(args);
- uint64 moneyuser = target->GetMoney();
+ uint64 targetMoney = target->GetMoney();
- if (addmoney < 0)
+ if (moneyToAdd < 0)
{
- int64 newmoney = int32(moneyuser) + addmoney;
+ int64 newmoney = int64(targetMoney) + moneyToAdd;
- sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_MONEY), moneyuser, addmoney, newmoney);
+ sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_MONEY), uint32(targetMoney), int32(moneyToAdd), uint32(newmoney));
if (newmoney <= 0)
{
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
@@ -1025,25 +1029,26 @@ public:
if (newmoney > MAX_MONEY_AMOUNT)
newmoney = MAX_MONEY_AMOUNT;
- handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, abs(addmoney), handler->GetNameLink(target).c_str());
+ handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, uint32(abs(moneyToAdd)), handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), abs(addmoney));
+ (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), uint32(abs(moneyToAdd)));
target->SetMoney(newmoney);
}
}
else
{
- handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, uint32(addmoney), handler->GetNameLink(target).c_str());
+ handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, uint32(moneyToAdd), handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
- (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), uint32(addmoney));
+ (ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), uint32(moneyToAdd));
- if (addmoney >=MAX_MONEY_AMOUNT)
+ if (moneyToAdd >= MAX_MONEY_AMOUNT)
target->SetMoney(MAX_MONEY_AMOUNT);
else
- target->ModifyMoney(int64(addmoney));
+ target->ModifyMoney(moneyToAdd);
}
- sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_NEW_MONEY), moneyuser, uint32(addmoney), target->GetMoney());
+ sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_NEW_MONEY), uint32(targetMoney), nt32(moneyToAdd), uint32(target->GetMoney()));
+
return true;
}
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 0508d95a60b..ef810b50b6f 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -1844,7 +1844,7 @@ class spell_item_unusual_compass : public SpellScriptLoader
{
Unit* caster = GetCaster();
caster->SetOrientation(frand(0.0f, 62832.0f) / 10000.0f);
- caster->SendMovementFlagUpdate();
+ caster->SendMovementFlagUpdate(true);
}
void Register()
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 3e3e18b1c80..f689d2f29ac 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2121,8 +2121,6 @@ class npc_shadowfiend : public CreatureScript
if (Unit* owner = me->ToTempSummon()->GetSummoner())
if (owner->HasAura(GLYPH_OF_SHADOWFIEND))
owner->CastSpell(owner, GLYPH_OF_SHADOWFIEND_MANA, true);
-
- PetAI::JustDied(killer);
}
};
diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp
index 0897c8814ab..b3176beb50b 100755
--- a/src/server/shared/Utilities/Util.cpp
+++ b/src/server/shared/Utilities/Util.cpp
@@ -150,6 +150,37 @@ std::string secsToTimeString(uint64 timeInSecs, bool shortText, bool hoursOnly)
return ss.str();
}
+int64 MoneyStringToMoney(const std::string& moneyString)
+{
+ int64 money = 0;
+
+ if (!(std::count(moneyString.begin(), moneyString.end(), 'g') == 1 ||
+ std::count(moneyString.begin(), moneyString.end(), 's') == 1 ||
+ std::count(moneyString.begin(), moneyString.end(), 'c') == 1))
+ return 0; // Bad format
+
+ Tokenizer tokens(moneyString, ' ');
+ for (Tokenizer::const_iterator itr = tokens.begin(); itr != tokens.end(); ++itr)
+ {
+ std::string tokenString(*itr);
+ uint32 gCount = std::count(tokenString.begin(), tokenString.end(), 'g');
+ uint32 sCount = std::count(tokenString.begin(), tokenString.end(), 's');
+ uint32 cCount = std::count(tokenString.begin(), tokenString.end(), 'c');
+ if (gCount + sCount + cCount != 1)
+ return 0;
+
+ uint64 amount = atol(*itr);
+ if (gCount == 1)
+ money += amount * 100 * 100;
+ else if (sCount == 1)
+ money += amount * 100;
+ else if (cCount == 1)
+ money += amount;
+ }
+
+ return money;
+}
+
uint32 TimeStringToSecs(const std::string& timestring)
{
uint32 secs = 0;
diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h
index f84e5155bb1..949fa67008f 100755
--- a/src/server/shared/Utilities/Util.h
+++ b/src/server/shared/Utilities/Util.h
@@ -66,6 +66,8 @@ private:
void stripLineInvisibleChars(std::string &src);
+int64 MoneyStringToMoney(const std::string& moneyString);
+
std::string secsToTimeString(uint64 timeInSecs, bool shortText = false, bool hoursOnly = false);
uint32 TimeStringToSecs(const std::string& timestring);
std::string TimeToTimestampStr(time_t t);