aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_02_15_00_world_quest_template.sql1
-rw-r--r--sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql13
-rw-r--r--sql/updates/world/2012_02_15_02_world_item_template.sql3
-rw-r--r--sql/updates/world/2012_02_15_03_world_quest_template.sql18
-rw-r--r--sql/updates/world/2012_02_15_04_world_quest_template.sql17
-rw-r--r--sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql3
-rw-r--r--sql/updates/world/2012_02_15_07_00_world_creature.sql57
-rw-r--r--sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql147
-rw-r--r--sql/updates/world/2012_02_15_07_02_world_misc.sql120
-rw-r--r--src/server/collision/Management/VMapManager2.cpp3
-rwxr-xr-xsrc/server/collision/Management/VMapManager2.h2
-rw-r--r--src/server/collision/Maps/MapTree.cpp8
-rw-r--r--src/server/collision/Models/WorldModel.cpp3
-rwxr-xr-xsrc/server/collision/Models/WorldModel.h1
-rwxr-xr-xsrc/server/game/AI/CoreAI/CombatAI.cpp2
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.h1
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp10
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.h1
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp14
-rwxr-xr-xsrc/server/game/Entities/Player/Player.h2
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.h28
-rwxr-xr-xsrc/server/game/Handlers/AuctionHouseHandler.cpp260
-rwxr-xr-xsrc/server/game/Handlers/PetitionsHandler.cpp5
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp55
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp2
-rw-r--r--src/server/scripts/Kalimdor/silithus.cpp2
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp3
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp10
-rwxr-xr-xsrc/server/shared/Database/MySQLConnection.h7
-rwxr-xr-xsrc/server/worldserver/TCSoap/TCSoap.cpp2
30 files changed, 653 insertions, 147 deletions
diff --git a/sql/updates/world/2012_02_15_00_world_quest_template.sql b/sql/updates/world/2012_02_15_00_world_quest_template.sql
new file mode 100644
index 00000000000..e26f52fd0fe
--- /dev/null
+++ b/sql/updates/world/2012_02_15_00_world_quest_template.sql
@@ -0,0 +1 @@
+UPDATE `quest_template` SET `OfferRewardText` = 'Good, $C. You have done well in serving the Dark Lady. Your continued perseverance and ambition will be of great use to the Lady''s subjects. Return to me again in the future. Perhaps I will have other tasks for you that will aid the Dark Lady in her attempts at overtaking the Lich King and completely freeing the Scourge.', `RequestItemsText` = 'There are a hundred other tasks awaiting my attention, $C. Do you have the books?' WHERE `Id` = 14356;
diff --git a/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql b/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql
new file mode 100644
index 00000000000..1c3d45dc490
--- /dev/null
+++ b/sql/updates/world/2012_02_15_01_world_areatrigger_tavern.sql
@@ -0,0 +1,13 @@
+DELETE FROM `areatrigger_tavern` WHERE `id` IN (98, 4109, 4300, 4378, 4380, 4498, 4608, 5314, 5315, 5316, 5317);
+INSERT INTO `areatrigger_tavern` (`id`, `name`) VALUES
+(98, 'Nesingwary''s Expedition'),
+(4109, 'Tranquillen - Upper level Inn'),
+(4300, 'Cenarion Refugee - Outside Inn'),
+(4378, 'Stonebreaker Hold Inn'),
+(4380, 'Falcon Watch Inn'),
+(4498, 'Old Hillsbrad Foothills Inn'),
+(4608, 'Sanctum Of The Stars - Upper level Inn'),
+(5314, 'Wyrmrest Temple'),
+(5315, 'Wyrmrest Temple'),
+(5316, 'Wyrmrest Temple'),
+(5317, 'Wyrmrest Temple');
diff --git a/sql/updates/world/2012_02_15_02_world_item_template.sql b/sql/updates/world/2012_02_15_02_world_item_template.sql
new file mode 100644
index 00000000000..463d43368cd
--- /dev/null
+++ b/sql/updates/world/2012_02_15_02_world_item_template.sql
@@ -0,0 +1,3 @@
+DELETE FROM `item_template` WHERE `entry`=49867;
+INSERT INTO `item_template` (`entry`, `class`, `subclass`, `unk0`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `Duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `WDBVerified`) VALUES
+(49867, 12, 0, -1, 'Crown Chemical Co. Supplies', 11448, 1, 0, 8192, 1, 0, 0, 0, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 0, 0, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 0, 0, NULL, 0, -1, 0, -1, 4, 'You can hear the clink of glass... dont drop it!', 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 423, 0, 0, 0, 0, 14545);
diff --git a/sql/updates/world/2012_02_15_03_world_quest_template.sql b/sql/updates/world/2012_02_15_03_world_quest_template.sql
new file mode 100644
index 00000000000..833d36b246c
--- /dev/null
+++ b/sql/updates/world/2012_02_15_03_world_quest_template.sql
@@ -0,0 +1,18 @@
+-- Love is in the Air
+-- Quests Missing Text ... By Albis
+
+UPDATE `quest_template` SET `RequestItemsText` ='The cologne isn''t going to give itself out, you know.$B$BGet spraying!' , `OfferRewardText` ='Nice work, $N! People will be buying Crown colognes by the crate-load now that they''ve had a chance to try them.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24635;
+UPDATE `quest_template` SET `RequestItemsText` ='That perfume''s not going to spray itself, you know.$B$BGet going!' , `OfferRewardText` ='Great work, $N! People will come running to buy Crown perfumes now that they''ve had a chance to sample their wonders.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24629;
+UPDATE `quest_template` SET `RequestItemsText` ='You know, those chocolates aren''t going to fling themselves at people.$B$BYou need to get to work!' , `OfferRewardText` ='Lovely work, $N! People will be tripping over one another to get Crown chocolates now that they''ve had a chance to taste those sweet, romantic treats.$B$BHere''s a little something for helping us out.' WHERE `Id` = 24636;
+UPDATE `quest_template` SET `OfferRewardText` ='Hey. You got some time on your hands? I could use someone like you.' WHERE `Id` IN (24804,24805);
+UPDATE `quest_template` SET `RequestItemsText` ='You analyze that reek yet, kid?' , `OfferRewardText` ='Hey, thanks, kid. Give it over, let''s take a look.$B$B<He takes the device from you and fiddles with it.>$B$BOh, that ain''t good.' WHERE `Id` IN (24655,24536);
+UPDATE `quest_template` SET `RequestItemsText` ='Did they toss ya a crate to deliver?' , `OfferRewardText` ='You got it, huh? Good job, kid. Top notch. Let''s see what we what we got here.$B$B<He cracks open the crate and rummages around inside.' WHERE `Id` IN (24656,24541);
+UPDATE `quest_template` SET `OfferRewardText` ='You... You''re not Snivel. Did he send you? He''s so late, I had started to give up hope...$B$B<Tears start welling up in the woman''s eyes once she realizes that you aren''t there to deliver a message from Snivel.>$B$BThat''s not like my Snivel, but what choice is there?' WHERE `Id` = 24848;
+UPDATE `quest_template` SET `OfferRewardText` ='You''re not Snivel. He was supposed to be here an hour ago! What have you done with him?$B$B<Roka seems to calm down when you tell her that you''re looking for Snivel, too. Then the tears start to well up in her eyes.>$B$BThis isn''t like my Snivel. Do you think something''s happened to him?' WHERE `Id` = 24850;
+UPDATE `quest_template` SET `RequestItemsText` ='Who are you?' , `OfferRewardText` ='All he talked about was leaving town with all his money? Then he really has abandoned me, hasn''t he?$B$BOh, $N. I was such a fool to fall for him, but how could I help myself? He was so irresistible!' WHERE `Id` = 24849;
+UPDATE `quest_template` SET `RequestItemsText` ='Who are you?' , `OfferRewardText` ='All he talked about was leaving town with all his money? Then he really has abandoned me, hasn''t he?$B$BI can''t believe I fell for such a horrible goblin! But he was so irresistible when we first met.' WHERE `Id` = 24851;
+UPDATE `quest_template` SET `RequestItemsText` ='Did you find the guy, or did he crawl under a rock?' , `OfferRewardText` ='You got his ledger? Really? That''s great, $N. There''s probably loads of good information in here.' WHERE `Id` IN (24657,24576);
+UPDATE `quest_template` SET `OfferRewardText` ='Fantastic. Help is exactly what I need.' WHERE `Id` IN (24792,24793);
+UPDATE `quest_template` SET `RequestItemsText` ='I don''t remember ordering a cleaing service... why yes, I am Apothecary Hummel.$B$B...wait, what is the meaning of this? You think these meaningless papers can stop me? Hah!' , `OfferRewardText` ='What we do here is none of your business...' WHERE `Id` = 11488;
+UPDATE `quest_template` SET `RequestItemsText` ='Did you take care of those no-good scheming villains?' , `OfferRewardText` ='What''ve you got there?$B$BOh hey, this is big. Real big. Most of the crazy details in one little package. Thanks - you really helped us reel this all in. Good working with ya.' WHERE `Id` IN (24745,14483);
+UPDATE `quest_template` SET `RequestItemsText` ='Did you teach ''em a lesson?' , `OfferRewardText` ='Good job, kid. You deserve a little somethin''. And hey, come back tomorrow if you get the time; I might have a job for ya.' WHERE `Id` IN (24658,24665,24666,24664,24663,24659,24660,24662,24647,24638,24651,24652,24650,24649,24645,24648);
diff --git a/sql/updates/world/2012_02_15_04_world_quest_template.sql b/sql/updates/world/2012_02_15_04_world_quest_template.sql
new file mode 100644
index 00000000000..8b6ad1d2cf9
--- /dev/null
+++ b/sql/updates/world/2012_02_15_04_world_quest_template.sql
@@ -0,0 +1,17 @@
+-- Horde
+UPDATE `quest_template` SET `PrevQuestId`=24805 WHERE `Id`=24536; -- Uncommon Scents completed before starting Something Stinks
+UPDATE `quest_template` SET `PrevQuestId`=24536 WHERE `Id`=24541; -- Something Stinks completed before starting Pilfering Perfume
+UPDATE `quest_template` SET `PrevQuestId`=24541 WHERE `Id`=24850; -- Pilfering Perfume completed before starting Snivel's Sweetheart
+UPDATE `quest_template` SET `PrevQuestId`=24850 WHERE `Id`=24851; -- Snivel's Sweetheart completed before starting Hot On The Trail
+UPDATE `quest_template` SET `PrevQuestId`=24851 WHERE `Id`=24576; -- Hot On The Trail completed before starting A Friendly Chat...
+
+UPDATE `quest_template` SET `PrevQuestId`=24576 WHERE `Id` IN (24638,24645,24647,24648,24649,24650,24651,24652); -- A Friendly Chat... completed before starting Crushing the Crown
+
+-- Alliance
+UPDATE `quest_template` SET `PrevQuestId`=24804 WHERE `Id`=24655; -- Uncommon Scents completed before starting Something Stinks
+UPDATE `quest_template` SET `PrevQuestId`=24655 WHERE `Id`=24656; -- Something Stinks completed before starting Pilfering Perfume
+UPDATE `quest_template` SET `PrevQuestId`=24656 WHERE `Id`=24848; -- Pilfering Perfume completed before starting Snivel's Sweetheart
+UPDATE `quest_template` SET `PrevQuestId`=24848 WHERE `Id`=24849; -- Snivel's Sweetheart completed before starting Hot On The Trail
+UPDATE `quest_template` SET `PrevQuestId`=24849 WHERE `Id`=24657; -- Hot On The Trail completed before starting A Friendly Chat...
+
+UPDATE `quest_template` SET `PrevQuestId`=24657 WHERE `Id` IN (24658,24659,24660,24662,24663,24664,24665,24666); -- A Friendly Chat... completed before starting Crushing the Crown
diff --git a/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql b/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql
new file mode 100644
index 00000000000..431e23b53b8
--- /dev/null
+++ b/sql/updates/world/2012_02_15_06_world_creature_involvedrelation.sql
@@ -0,0 +1,3 @@
+DELETE FROM `creature_involvedrelation` WHERE `quest`=24745;
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
+(38066, 24745); -- A - Something is in the Air (and it Ain't Love) - Inspector Snip Snagglebolt
diff --git a/sql/updates/world/2012_02_15_07_00_world_creature.sql b/sql/updates/world/2012_02_15_07_00_world_creature.sql
new file mode 100644
index 00000000000..75beec97d67
--- /dev/null
+++ b/sql/updates/world/2012_02_15_07_00_world_creature.sql
@@ -0,0 +1,57 @@
+SET @GUID := 40489;
+SET @NPC :=3254;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+7;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,1,1,1,0,0, 10.3997021, -2316.43555, 92.1945343, 2.91896486,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,1,1,1,0,0,346.736572 , -2606.38916, 91.7916641, 1.58010352,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,1,1,1,0,0, 83.07206 , -2545.2085 , 98.107666 , 1.86412442,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,1,1,1,0,0,-93.53362 , -2287.0835 , 92.35358 , 0.8518014 ,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,1,1,1,0,0,-618.9995,-2738.234,91.91664,4.303216,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,1,1,1,0,0,-491.2982,-2473.443,93.66666,2.670027,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,1,1,1,0,0,-614.9523,-2721.66 ,93.85735,1.412064,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,1,1,1,0,0,-617.4864,-2710.463,96.7657 ,1.582084,120,0,0,1,0,0,0,0,0);
+
+SET @NPC1=@GUID*10;
+SET @NPC2=(@GUID+1)*10;
+SET @NPC3=(@GUID+2)*10;
+SET @NPC4=(@GUID+3)*10;
+SET @NPC5=(@GUID+6)*10;
+SET @NPC6=(@GUID+7)*10;
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@NPC1,@NPC2,@NPC3,@NPC4,@NPC5,@NPC6);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@NPC1,1,6.336712,-2322.309,92.16663,0,0,0,0,100,0),
+-- 2nd
+(@NPC2,1,346.4289,-2573.332,91.79166,0,0,0,0,100,0),
+-- 3rd
+(@NPC3,1,81.53384,-2540.826,97.38716,0,0,0,0,100,0),
+(@NPC3,2,80.28384,-2537.076,96.63716,0,0,0,0,100,0),
+(@NPC3,3,79.03384,-2533.326,95.38716,0,0,0,0,100,0),
+(@NPC3,4,78.28384,-2530.326,94.63716,0,0,0,0,100,0),
+(@NPC3,5,77.03384,-2526.576,93.63716,0,0,0,0,100,0),
+(@NPC3,6,76.49564,-2523.443,93.66665,0,0,0,0,100,0),
+-- 4th
+(@NPC4,1,-88.46167,-2281.137,92.69763,0,0,0,0,100,0),
+(@NPC4,2,-92.46167,-2285.637,91.94763,0,0,0,0,100,0),
+-- 5th
+(@NPC5,1,-614.9318,-2720.435,94.01199,0,0,0,0,100,0),
+-- 6th
+(@NPC6,1,-617.2921,-2722.99,93.41664,0,0,0,0,100,0),
+(@NPC6,2,-617.3077,-2721.99,93.41664,0,0,0,0,100,0),
+(@NPC6,3,-617.3398,-2719.99,94.16664,0,0,0,0,100,0),
+(@NPC6,4,-617.3867,-2716.99,95.04164,0,0,0,0,100,0),
+(@NPC6,5,-617.4336,-2713.99,95.91664,0,0,0,0,100,0),
+(@NPC6,6,-617.4805,-2710.99,96.66664,0,0,0,0,100,0),
+(@NPC6,7,-617.503,-2708.995,97.04164,0,0,0,0,100,0),
+(@NPC6,8,-617.503,-2708.995,97.04164,0,0,0,0,100,0);
+
+DELETE FROM `creature_addon` WHERE `guid` IN (@GUID,@GUID+1,@GUID+2,@GUID+3,@GUID+6,@GUID+7);
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@NPC1,0,0,0,0,''),
+(@GUID+1,@NPC2,0,0,0,0,''),
+(@GUID+2,@NPC3,0,0,0,0,''),
+(@GUID+3,@NPC4,0,0,0,0,''),
+(@GUID+6,@NPC5,0,0,0,0,''),
+(@GUID+7,@NPC6,0,0,0,0,'');
diff --git a/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql b/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql
new file mode 100644
index 00000000000..e47572b2074
--- /dev/null
+++ b/sql/updates/world/2012_02_15_07_01_world_waypoint_data.sql
@@ -0,0 +1,147 @@
+SET @NPC := 26841;
+SET @GUID := 40497; -- need 9
+
+SET @SPAWN0 := (@GUID )*10;
+SET @SPAWN1 := (@GUID+1)*10;
+SET @SPAWN2 := (@GUID+2)*10;
+SET @SPAWN3 := (@GUID+3)*10;
+SET @SPAWN4 := (@GUID+4)*10;
+SET @SPAWN5 := (@GUID+5)*10;
+SET @SPAWN6 := (@GUID+6)*10;
+SET @SPAWN7 := (@GUID+7)*10;
+SET @SPAWN8 := (@GUID+8)*10;
+
+DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO creature (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@GUID ,@NPC,571,1,1,0,0,4690.292,859.291,154.1271,2.914072,120,0,0,1,0,0,0,0,0),
+(@GUID+1,@NPC,571,1,1,0,0,4362.418,750.5102,123.7846,6.194367,120,0,0,1,0,0,0,0,0),
+(@GUID+2,@NPC,571,1,1,0,0,4191.03,645.8215,109.6868,0.4027403,120,0,0,1,0,0,0,0,0),
+(@GUID+3,@NPC,571,1,1,0,0,4098.345,657.0866,99.36436,5.185792,120,0,0,1,0,0,0,0,0),
+(@GUID+4,@NPC,571,1,1,0,0,4065.753,709.2308,108.47,1.153499,120,0,0,1,0,0,0,0,0),
+(@GUID+5,@NPC,571,1,1,0,0,4012.895,495.4877,82.1595,0.8684024,120,0,0,1,0,0,0,0,0),
+(@GUID+6,@NPC,571,1,1,0,0,3941.605,552.9745,144.0994,0.06546114,120,0,0,1,0,0,0,0,0),
+(@GUID+7,@NPC,571,1,1,0,0,3995.586,447.6094,88.55691,1.320955,120,0,0,1,0,0,0,0,0),
+(@GUID+8,@NPC,571,1,1,0,0,3869.004,707.384,134.3378,4.695541,120,0,0,1,0,0,0,0,0);
+
+DELETE FROM `creature_addon` WHERE `guid` BETWEEN @GUID AND @GUID+8;
+INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@GUID ,@SPAWN0,0,0,0,0,''),
+(@GUID+1,@SPAWN1,0,0,0,0,''),
+(@GUID+2,@SPAWN2,0,0,0,0,''),
+(@GUID+3,@SPAWN3,0,0,0,0,''),
+(@GUID+4,@SPAWN4,0,0,0,0,''),
+(@GUID+5,@SPAWN5,0,0,0,0,''),
+(@GUID+6,@SPAWN6,0,0,0,0,''),
+(@GUID+7,@SPAWN7,0,0,0,0,''),
+(@GUID+8,@SPAWN8,0,0,0,0,'');
+
+DELETE FROM `waypoint_data` WHERE `id` IN (@SPAWN0,@SPAWN1,@SPAWN2,@SPAWN3,@SPAWN4,@SPAWN5,@SPAWN6,@SPAWN7,@SPAWN8);
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+-- 1st
+(@SPAWN0,0,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,1,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,2,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+(@SPAWN0,3,4532.678,762.772,130.1951,0,0,0,0,100,0),
+(@SPAWN0,4,4566.182,662.6984,132.7506,0,0,0,0,100,0),
+(@SPAWN0,5,4592.511,595.6938,130.1674,0,0,0,0,100,0),
+(@SPAWN0,6,4732.632,631.5569,164.584,0,0,0,0,100,0),
+(@SPAWN0,7,4716.777,833.6211,169.0006,0,0,0,0,100,0),
+(@SPAWN0,8,4643.756,855.9798,132.5562,0,0,0,0,100,0),
+(@SPAWN0,9,4550.864,812.4362,133.6673,0,0,0,0,100,0),
+-- 2nd
+(@SPAWN1,0,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,1,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,2,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+(@SPAWN1,3,4112.486,636.6321,86.95068,0,0,0,0,100,0),
+(@SPAWN1,4,4141.771,704.1605,67.97847,0,0,0,0,100,0),
+(@SPAWN1,5,4191.388,726.6014,98.11736,0,0,0,0,100,0),
+(@SPAWN1,6,4247.502,724.9836,182.4229,0,0,0,0,100,0),
+(@SPAWN1,7,4295.807,746.8245,210.1174,0,0,0,0,100,0),
+(@SPAWN1,8,4387.15,744.5955,93.08962,0,0,0,0,100,0),
+(@SPAWN1,9,4428.509,680.8868,91.33962,0,0,0,0,100,0),
+(@SPAWN1,10,4431.805,596.8371,157.1775,0,0,0,0,100,0),
+(@SPAWN1,11,4128.16,507.4055,198.8118,0,0,0,0,100,0),
+(@SPAWN1,12,4102.405,567.1112,198.8118,0,0,0,0,100,0),
+-- 3rd
+(@SPAWN2,0,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,1,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,2,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+(@SPAWN2,3,4378.531,451.3199,54.28299,0,0,0,0,100,0),
+(@SPAWN2,4,4277.019,345.219,121.2274,0,0,0,0,100,0),
+(@SPAWN2,5,4185.893,458.5754,118.5608,0,0,0,0,100,0),
+(@SPAWN2,6,4170.111,627.0887,100.283,0,0,0,0,100,0),
+(@SPAWN2,7,4265.816,644.1154,136.2274,0,0,0,0,100,0),
+(@SPAWN2,8,4272.799,551.5093,50.92185,0,0,0,0,100,0),
+-- 4th
+(@SPAWN3,0,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,1,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,2,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+(@SPAWN3,3,4382.415,794.0613,99.36437,0,0,0,0,100,0),
+(@SPAWN3,4,4312.128,808.5213,99.36437,0,0,0,0,100,0),
+(@SPAWN3,5,4206.404,817.2534,99.36437,0,0,0,0,100,0),
+(@SPAWN3,6,4089.363,771.5425,99.36437,0,0,0,0,100,0),
+(@SPAWN3,7,4114.452,637.4808,99.36437,0,0,0,0,100,0),
+(@SPAWN3,8,4265.095,661.3358,99.36437,0,0,0,0,100,0),
+(@SPAWN3,9,4366.876,678.4272,99.36437,0,0,0,0,100,0),
+(@SPAWN3,10,4433.122,674.1555,99.36437,0,0,0,0,100,0),
+(@SPAWN3,11,4464.15,712.9612,99.36437,0,0,0,0,100,0),
+(@SPAWN3,12,4466.412,769.1019,99.36437,0,0,0,0,100,0),
+(@SPAWN3,13,4427.949,785.3342,99.36437,0,0,0,0,100,0),
+-- 5th
+(@SPAWN4,0,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,1,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,2,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+(@SPAWN4,3,4156.661,638.471,129.439,0,0,0,0,100,0),
+(@SPAWN4,4,4062.89,681.9251,102.9113,0,0,0,0,100,0),
+(@SPAWN4,5,4096.761,758.9566,123.5501,0,0,0,0,100,0),
+(@SPAWN4,6,4134.598,799.989,109.8835,0,0,0,0,100,0),
+(@SPAWN4,7,4189.475,840.5444,114.6335,0,0,0,0,100,0),
+(@SPAWN4,8,4274.875,812.3191,101.3001,0,0,0,0,100,0),
+(@SPAWN4,9,4331.604,778.9,114.7446,0,0,0,0,100,0),
+(@SPAWN4,10,4270.823,698.3784,130.4668,0,0,0,0,100,0),
+(@SPAWN4,11,4232.598,681.8058,126.7724,0,0,0,0,100,0),
+-- 6th
+(@SPAWN5,0,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,1,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,2,3926.388,447.295,82.1595,0,0,0,0,100,0),
+(@SPAWN5,3,4017.082,501.3171,82.1595,0,0,0,0,100,0),
+(@SPAWN5,4,4015.132,597.8423,82.1595,0,0,0,0,100,0),
+(@SPAWN5,5,3923.788,576.8113,82.1595,0,0,0,0,100,0),
+(@SPAWN5,6,3865.991,561.2335,82.1595,0,0,0,0,100,0),
+(@SPAWN5,7,3795.942,538.189,82.1595,0,0,0,0,100,0),
+(@SPAWN5,8,3769.598,454.0081,82.1595,0,0,0,0,100,0),
+(@SPAWN5,9,3879.825,441.5815,82.1595,0,0,0,0,100,0),
+(@SPAWN5,10,3926.388,447.295,82.1595,0,0,0,0,100,0),
+-- 7th
+(@SPAWN6,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN6,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN6,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN6,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN6,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN6,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN6,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN6,9,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+-- 8th
+(@SPAWN7,0,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,1,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,2,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+(@SPAWN7,3,4056.414,373.3088,88.55692,0,0,0,0,100,0),
+(@SPAWN7,4,3994.193,440.1974,88.55692,0,0,0,0,100,0),
+(@SPAWN7,5,4076.892,564.8895,88.55692,0,0,0,0,100,0),
+(@SPAWN7,6,4178.652,558.3406,88.55692,0,0,0,0,100,0),
+(@SPAWN7,7,4187.318,438.9777,88.55692,0,0,0,0,100,0),
+(@SPAWN7,8,4151.397,351.4095,88.55692,0,0,0,0,100,0),
+(@SPAWN7,9,4106.679,347.3126,88.55692,0,0,0,0,100,0),
+-- 9th
+(@SPAWN8,0,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,1,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,2,3883.254,607.1956,134.3378,0,0,0,0,100,0),
+(@SPAWN8,3,3904.998,559.2425,134.3378,0,0,0,0,100,0),
+(@SPAWN8,4,3969.396,561.8792,148.5877,0,0,0,0,100,0),
+(@SPAWN8,5,4010.678,638.0726,130.6155,0,0,0,0,100,0),
+(@SPAWN8,6,3976.813,756.3585,134.3378,0,0,0,0,100,0),
+(@SPAWN8,7,3886.876,810.7806,134.3378,0,0,0,0,100,0),
+(@SPAWN8,8,3868.72,688.4549,134.3378,0,0,0,0,100,0),
+(@SPAWN8,9,3883.254,607.1956,134.3378,0,0,0,0,100,0);
diff --git a/sql/updates/world/2012_02_15_07_02_world_misc.sql b/sql/updates/world/2012_02_15_07_02_world_misc.sql
new file mode 100644
index 00000000000..e7ffe54e922
--- /dev/null
+++ b/sql/updates/world/2012_02_15_07_02_world_misc.sql
@@ -0,0 +1,120 @@
+-- Love is in the Air
+SET @OGUID := 24399;
+SET @CGUID := 40506;
+SET @OLDGUID := 40489; -- wrong guids
+SET @EVENT := 8;
+
+-- Quest chain
+DELETE FROM `creature_questrelation` WHERE `quest` IN (24804,24657,24656,24848,24849);
+INSERT INTO `creature_questrelation` (`id`, `quest`) VALUES
+(38293, 24804), -- A - Uncommon Scents - Junior Inspector
+(38325, 24657), -- A - Friendly Chat... - Marion Sutton
+(38066, 24656), -- A - Pilfering Perfume - Inspector Snip Snagglebolt
+(38066, 24848), -- A - Fireworks At The Gilded Rose - Inspector Snip Snagglebolt
+(38325, 24849); -- A - Hot On The Trail - Marion Sutton
+
+DELETE FROM `creature_involvedrelation` WHERE `quest` IN (24804,24657,24656,24848,24849);
+INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
+(38066, 24804), -- A - Uncommon Scents - Inspector Snip Snagglebolt
+(38066, 24657), -- A - Friendly Chat... - Inspector Snip Snagglebolt
+(38066, 24656), -- A - Pilfering Perfume - Inspector Snip Snagglebolt
+(38325, 24848), -- A - Fireworks At The Gilded Rose - Marion Sutton
+(38325, 24849); -- A - Hot On The Trail - Marion Sutton
+
+-- Loot: Crown Chemical Co. Supplies
+DELETE FROM `gameobject_loot_template` WHERE `entry`=27766;
+INSERT INTO `gameobject_loot_template` VALUES
+(27766, 49867, -100, 1, 0, 1, 1); -- Crown Chemical Co. Supplies
+
+-- GO spawns
+DELETE FROM `gameobject` WHERE `id` IN (181086,201752,201778) AND `guid` BETWEEN @OGUID+0 AND @OGUID+42;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+-- Valentine Arch
+(@OGUID+0, 181086, 1, 1, 1, 9869.12, 2493.13, 1315.88, 6.16653, 0, 0, 0.0582931, -0.9983, 300, 0, 1),
+(@OGUID+1, 181086, 530, 1, 1, -4004.66, -11844.5, 0.19541, 4.93701, 0, 0, 0.623403, -0.7819, 300, 0, 1),
+(@OGUID+2, 181086, 0, 1, 1, -4918.78, -983.208, 501.455, 2.30465, 0, 0, 0.913711, 0.406364, 300, 0, 1),
+(@OGUID+3, 181086, 0, 1, 1, -8869.51, 636.686, 95.7873, 0.794388, 0, 0, 0.386832, 0.92215, 300, 0, 1),
+(@OGUID+4, 181086, 1, 1, 1, 1653.44, -4437.37, 18.1863, 1.72627, 0, 0, 0.759883, 0.65006, 300, 0, 1),
+(@OGUID+5, 181086, 1, 1, 1, -1224.34, 68.3642, 129.71, 3.17285, 0, 0, 0.999878, -0.015627, 300, 0, 1),
+(@OGUID+6, 181086, 530, 1, 1, 9612.28, -7184.77, 14.285, 1.82938, 0, 0, 0.792374, 0.610036, 300, 0, 1),
+(@OGUID+7, 181086, 0, 1, 1, 1629.62, 240.116, 63.8516, 0.155664, 0, 0, 0.0777534, 0.996973, 300, 0, 1),
+-- Large Crate
+(@OGUID+8, 201752, 0, 1, 1, -9029.77, 353.325, 92.923, 0.8808, 0, 0, 0.426301, 0.904581, 300, 0, 1),
+(@OGUID+9, 201752, 0, 1, 1, -9029.87, 351.542, 92.9248, 0.489671, 0, 0, 0.242397, 0.970177, 300, 0, 1),
+(@OGUID+10, 201752, 0, 1, 1, -9028.41, 352.69, 92.9163, 0.721364, 0, 0, 0.352912, 0.935656, 300, 0, 1),
+(@OGUID+11, 201752, 0, 1, 1, -9027.7, 351.062, 92.9193, 0.689162, 0, 0, 0.337803, 0.941217, 300, 0, 1),
+(@OGUID+12, 201752, 0, 1, 1, -9029.08, 349.917, 92.932, 0.657746, 0, 0, 0.322977, 0.946407, 300, 0, 1),
+(@OGUID+13, 201752, 0, 1, 1, -9028.77, 352.62, 94.1596, 6.02202, 0, 0, 0.130214, -0.991486, 300, 0, 1),
+(@OGUID+14, 201752, 0, 1, 1, -9028.84, 350.443, 94.1755, 0.771628, 0, 0, 0.376314, 0.926492, 300, 0, 1),
+(@OGUID+15, 201752, 0, 1, 1, -9026.5, 348.864, 93.0359, 2.17356, 0, 0, 0.885134, 0.465337, 300, 0, 1),
+(@OGUID+16, 201752, 0, 1, 1, -9028.21, 348.744, 93.024, 0.889436, 0, 0, 0.430203, 0.902732, 300, 0, 1),
+(@OGUID+17, 201752, 1, 1, 1, 1381.97, -4431.17, 30.6588, 5.49617, 0, 0, 0.383432, -0.923569, 300, 0, 1),
+(@OGUID+18, 201752, 1, 1, 1, 1380.98, -4432.28, 30.6586, 5.55507, 0, 0, 0.356069, -0.93446, 300, 0, 1),
+(@OGUID+19, 201752, 1, 1, 1, 1379.73, -4433.4, 30.6569, 5.69644, 0, 0, 0.28918, -0.957275, 300, 0, 1),
+(@OGUID+20, 201752, 1, 1, 1, 1377.96, -4432.16, 30.6489, 5.58649, 0, 0, 0.341345, -0.939938, 300, 0, 1),
+(@OGUID+21, 201752, 1, 1, 1, 1379.23, -4431.41, 30.6768, 5.559, 0, 0, 0.354231, -0.935158, 300, 0, 1),
+(@OGUID+22, 201752, 1, 1, 1, 1379.85, -4432.91, 31.8999, 5.66896, 0, 0, 0.302309, -0.95321, 300, 0, 1),
+(@OGUID+23, 201752, 1, 1, 1, 1380.81, -4431.58, 31.902, 5.64147, 0, 0, 0.315381, -0.948965, 300, 0, 1),
+(@OGUID+24, 201752, 1, 1, 1, 1377.67, -4434.36, 30.6055, 5.36265, 0, 0, 0.444186, -0.895935, 300, 0, 1),
+-- Crown Chemical Co. Supplies
+(@OGUID+25, 201778, 0, 1, 1, -9031.18, 354.399, 92.9752, 6.12019, 0, 0, 0.0814081, -0.996681, 300, 0, 1),
+(@OGUID+26, 201778, 0, 1, 1, -9028.76, 352.525, 95.4034, 0.503804, 0, 0, 0.249246, 0.96844, 300, 0, 1),
+(@OGUID+27, 201778, 0, 1, 1, -9030.19, 351.409, 94.1683, 0.134668, 0, 0, 0.067283, 0.997734, 300, 0, 1),
+(@OGUID+28, 201778, 0, 1, 1, -9031.52, 349.739, 92.9068, 0.338872, 0, 0, 0.168626, 0.98568, 300, 0, 1),
+(@OGUID+29, 201778, 0, 1, 1, -9030.55, 347.899, 92.9635, 0.751206, 0, 0, 0.366833, 0.930287, 300, 0, 1),
+(@OGUID+30, 201778, 0, 1, 1, -9027.59, 348.911, 94.2683, 1.784, 0, 0, 0.77833, 0.627855, 300, 0, 1),
+(@OGUID+31, 201778, 0, 1, 1, -9028.87, 349.971, 95.4191, 1.82327, 0, 0, 0.790507, 0.612452, 300, 0, 1),
+(@OGUID+32, 201778, 0, 1, 1, -9031.75, 354.82, 92.9939, 6.0605, 0, 0, 0.111113, -0.993808, 300, 0, 1),
+(@OGUID+33, 201778, 0, 1, 1, -9032.22, 352.779, 92.9627, 6.0605, 0, 0, 0.111113, -0.993808, 300, 0, 1),
+(@OGUID+34, 201778, 1, 1, 1, 1375.84, -4432.46, 30.5735, 5.69645, 0, 0, 0.289178, -0.957275, 300, 0, 1),
+(@OGUID+35, 201778, 1, 1, 1, 1377.99, -4431.81, 31.8923, 5.5001, 0, 0, 0.381614, -0.924322, 300, 0, 1),
+(@OGUID+36, 201778, 1, 1, 1, 1379.21, -4430.58, 31.9198, 4.81681, 0, 0, 0.669241, -0.743045, 300, 0, 1),
+(@OGUID+37, 201778, 1, 1, 1, 1379.35, -4432.78, 33.143, 5.61791, 0, 0, 0.326536, -0.945185, 300, 0, 1),
+(@OGUID+38, 201778, 1, 1, 1, 1380.87, -4431.5, 33.1452, 4.66994, 0, 0, 0.721955, -0.69194, 300, 0, 1),
+(@OGUID+39, 201778, 1, 1, 1, 1380.96, -4429.36, 30.6772, 4.6503, 0, 0, 0.728713, -0.68482, 300, 0, 1),
+(@OGUID+40, 201778, 1, 1, 1, 1383.08, -4429.42, 30.651, 4.53642, 0, 0, 0.766505, -0.642238, 300, 0, 1),
+(@OGUID+41, 201778, 1, 1, 1, 1378.64, -4428.42, 30.6846, 5.23543, 0, 0, 0.500243, -0.865885, 300, 0, 1),
+(@OGUID+42, 201778, 1, 1, 1, 1377.05, -4429.39, 30.6467, 5.31397, 0, 0, 0.465863, -0.884857, 300, 0, 1);
+
+DELETE FROM `game_event_gameobject` WHERE `eventEntry`=@EVENT AND `guid` BETWEEN @OGUID AND @OGUID+42;
+INSERT INTO `game_event_gameobject` (`guid`, `eventEntry`) VALUES
+(@OGUID, @EVENT),(@OGUID+1, @EVENT),(@OGUID+2, @EVENT),
+(@OGUID+3, @EVENT),(@OGUID+4, @EVENT),(@OGUID+5, @EVENT),
+(@OGUID+6, @EVENT),(@OGUID+7, @EVENT),(@OGUID+8, @EVENT),
+(@OGUID+9, @EVENT),(@OGUID+10, @EVENT),(@OGUID+11, @EVENT),
+(@OGUID+12, @EVENT),(@OGUID+13, @EVENT),(@OGUID+14, @EVENT),
+(@OGUID+15, @EVENT),(@OGUID+16, @EVENT),(@OGUID+17, @EVENT),
+(@OGUID+18, @EVENT),(@OGUID+19, @EVENT),(@OGUID+20, @EVENT),
+(@OGUID+21, @EVENT),(@OGUID+22, @EVENT),(@OGUID+23, @EVENT),
+(@OGUID+24, @EVENT),(@OGUID+25, @EVENT),(@OGUID+26, @EVENT),
+(@OGUID+27, @EVENT),(@OGUID+28, @EVENT),(@OGUID+29, @EVENT),
+(@OGUID+30, @EVENT),(@OGUID+31, @EVENT),(@OGUID+32, @EVENT),
+(@OGUID+33, @EVENT),(@OGUID+34, @EVENT),(@OGUID+35, @EVENT),
+(@OGUID+36, @EVENT),(@OGUID+37, @EVENT),(@OGUID+38, @EVENT),
+(@OGUID+39, @EVENT),(@OGUID+40, @EVENT),(@OGUID+41, @EVENT),
+(@OGUID+42, @EVENT);
+
+-- [Q]: Pilfering Perfume
+-- Note: this is EndText (misleading field name), NOT ObjectiveText1
+UPDATE `quest_template` SET `EndText` = 'Steal perfume package from Crown Chemical Co. outside Stormind' WHERE `Id` = 24656; -- Alliance
+UPDATE `quest_template` SET `EndText` = 'Steal perfume package from Crown Chemical Co. outside Orgrimmar' WHERE `Id` = 24541; -- Horde
+
+-- Creature templates and spawns
+UPDATE `creature_template` SET `minlevel`=70, `maxlevel`=75 WHERE `entry`=37671; -- Crown Supply Guard
+UPDATE `creature_template` SET `npcflag`=`npcflag`|1, `gossip_menu_id`=10991 WHERE `entry`=38293; -- Junior Inspector (gossip menu not confirmed)
+
+DELETE FROM `creature` WHERE `id` IN (38293,38065,37671) AND `guid` BETWEEN @CGUID+0 AND @CGUID+3;
+DELETE FROM `creature` WHERE `id` IN (38293,38065,37671) AND `guid` BETWEEN @OLDGUID+0 AND @OLDGUID+3;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@CGUID+0, 38293, 530, 1, 1, 0, 0, -4022.81, -11842.7, 0.0062171, 5.89912, 300, 0, 0, 955, 0, 0, 0, 0, 0), -- Junior Inspector
+(@CGUID+1, 38065, 1, 1, 1, 0, 0, 1380.22, -4426.79, 30.6681, 2.03572, 300, 0, 0, 12600, 0, 0, 0, 0, 0), -- Crown Supply Sentry <Crown Chemical Co.>
+(@CGUID+2, 37671, 0, 1, 1, 30912, 0, -9033.01, 356.408, 93.1543, 2.09345, 300, 0, 0, 42, 0, 0, 0, 0, 0), -- Crown Supply Guard
+(@CGUID+3, 37671, 0, 1, 1, 30912, 0, -9028.63, 344.994, 93.2389, 3.37679, 300, 0, 0, 42, 0, 0, 0, 0, 0); -- Crown Supply Guard
+
+DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+3 AND `eventEntry`=@EVENT;
+DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @OLDGUID+0 AND @OLDGUID+3 AND `eventEntry`=@EVENT;
+INSERT INTO `game_event_creature` (`guid`, `eventEntry`) VALUES
+(@CGUID+0, @EVENT),
+(@CGUID+1, @EVENT),
+(@CGUID+2, @EVENT),
+(@CGUID+3, @EVENT);
diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp
index 62abc31831a..81b97f5f352 100644
--- a/src/server/collision/Management/VMapManager2.cpp
+++ b/src/server/collision/Management/VMapManager2.cpp
@@ -245,7 +245,7 @@ namespace VMAP
return false;
}
- WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename)
+ WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags/* Only used when creating the model */)
{
//! Critical section, thread safe access to iLoadedModelFiles
TRINITY_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
@@ -261,6 +261,7 @@ namespace VMAP
return NULL;
}
sLog->outDebug(LOG_FILTER_MAPS, "VMapManager2: loading file '%s%s'", basepath.c_str(), filename.c_str());
+ worldmodel->Flags = flags;
model = iLoadedModelFiles.insert(std::pair<std::string, ManagedModel>(filename, ManagedModel())).first;
model->second.setModel(worldmodel);
}
diff --git a/src/server/collision/Management/VMapManager2.h b/src/server/collision/Management/VMapManager2.h
index 1fba108388a..4b66a2e9fc7 100755
--- a/src/server/collision/Management/VMapManager2.h
+++ b/src/server/collision/Management/VMapManager2.h
@@ -103,7 +103,7 @@ namespace VMAP
bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type) const;
- WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename);
+ WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags = 0);
void releaseModelInstance(const std::string& filename);
// what's the use of this? o.O
diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp
index fda0535e8a7..f94f9bbf52b 100644
--- a/src/server/collision/Maps/MapTree.cpp
+++ b/src/server/collision/Maps/MapTree.cpp
@@ -127,7 +127,7 @@ namespace VMAP
StaticMapTree::StaticMapTree(uint32 mapID, const std::string &basePath):
iMapID(mapID), iTreeValues(0), iBasePath(basePath)
{
- if (iBasePath.length() > 0 && (iBasePath[iBasePath.length()-1] != '/' || iBasePath[iBasePath.length()-1] != '\\'))
+ if (iBasePath.length() > 0 && iBasePath[iBasePath.length()-1] != '/' && iBasePath[iBasePath.length()-1] != '\\')
{
iBasePath.push_back('/');
}
@@ -241,7 +241,7 @@ namespace VMAP
bool StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY)
{
std::string basePath = vmapPath;
- if (basePath.length() > 0 && (basePath[basePath.length()-1] != '/' || basePath[basePath.length()-1] != '\\'))
+ if (basePath.length() > 0 && basePath[basePath.length()-1] != '/' && basePath[basePath.length()-1] != '\\')
basePath.push_back('/');
std::string fullname = basePath + VMapManager2::getMapFileName(mapID);
bool success = true;
@@ -309,7 +309,7 @@ namespace VMAP
#endif
if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn))
{
- WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
+ WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags);
sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : loading %s", spawn.name.c_str());
if (model)
{
@@ -380,7 +380,7 @@ namespace VMAP
if (result)
{
// acquire model instance
- WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
+ WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags);
if (!model)
sLog->outError("StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp
index a7de37d41e6..b49538a485d 100644
--- a/src/server/collision/Models/WorldModel.cpp
+++ b/src/server/collision/Models/WorldModel.cpp
@@ -420,6 +420,9 @@ namespace VMAP
bool WorldModel::IntersectRay(const G3D::Ray &ray, float &distance, bool stopAtFirstHit) const
{
+ // M2 models are not taken into account for LoS calculation
+ if (Flags & MOD_M2)
+ return false;
// small M2 workaround, maybe better make separate class with virtual intersection funcs
// in any case, there's no need to use a bound tree if we only have one submodel
if (groupModels.size() == 1)
diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h
index ebf828e4935..dbaccb58573 100755
--- a/src/server/collision/Models/WorldModel.h
+++ b/src/server/collision/Models/WorldModel.h
@@ -113,6 +113,7 @@ namespace VMAP
bool GetLocationInfo(const G3D::Vector3 &p, const G3D::Vector3 &down, float &dist, LocationInfo &info) const;
bool writeFile(const std::string &filename);
bool readFile(const std::string &filename);
+ uint32 Flags;
protected:
uint32 RootWMOID;
std::vector<GroupModel> groupModels;
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index d8def36f999..86f2c6a28b7 100755
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -326,7 +326,7 @@ void VehicleAI::CheckConditions(const uint32 diff)
{
if (Player* player = passenger->ToPlayer())
{
- if (!sConditionMgr->IsObjectMeetToConditions(player, conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(player, me, conditions))
{
player->ExitVehicle();
return;//check other pessanger in next tick
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h
index f81393be761..190fbcc5107 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.h
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h
@@ -30,6 +30,7 @@ class Player;
class WorldPacket;
#define MIN_AUCTION_TIME (12*HOUR)
+#define MAX_AUCTION_ITEMS 160
enum AuctionError
{
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index bcdc6c26524..f52cb96501f 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -343,6 +343,10 @@ uint32 Condition::GetMaxAvailableConditionTargets()
switch(SourceType)
{
case CONDITION_SOURCE_TYPE_SPELL:
+ case CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE:
+ case CONDITION_SOURCE_TYPE_VEHICLE_SPELL:
+ case CONDITION_SOURCE_TYPE_GOSSIP_MENU:
+ case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION:
return 2;
case CONDITION_SOURCE_TYPE_SMART_EVENT:
return 2;
@@ -418,6 +422,12 @@ bool ConditionMgr::IsObjectMeetToConditions(WorldObject* object, ConditionList c
return IsObjectMeetToConditions(srcInfo, conditions);
}
+bool ConditionMgr::IsObjectMeetToConditions(WorldObject* object1, WorldObject* object2, ConditionList const& conditions)
+{
+ ConditionSourceInfo srcInfo = ConditionSourceInfo(object1, object2);
+ return IsObjectMeetToConditions(srcInfo, conditions);
+}
+
bool ConditionMgr::IsObjectMeetToConditions(ConditionSourceInfo& sourceInfo, ConditionList const& conditions)
{
if (conditions.empty())
diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h
index dc204ccd0ec..c0bc5635838 100755
--- a/src/server/game/Conditions/ConditionMgr.h
+++ b/src/server/game/Conditions/ConditionMgr.h
@@ -199,6 +199,7 @@ class ConditionMgr
ConditionList GetConditionReferences(uint32 refId);
bool IsObjectMeetToConditions(WorldObject* object, ConditionList const& conditions);
+ bool IsObjectMeetToConditions(WorldObject* object1, WorldObject* object2, ConditionList const& conditions);
bool IsObjectMeetToConditions(ConditionSourceInfo& sourceInfo, ConditionList const& conditions);
ConditionList GetConditionsForNotGroupedEntry(ConditionSourceType sourceType, uint32 entry);
ConditionList GetConditionsForSmartEvent(int32 entryOrGuid, uint32 eventId, uint32 sourceType);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 64b0e542467..80511f49a64 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14089,7 +14089,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
for (GossipMenuItemsContainer::const_iterator itr = menuItemBounds.first; itr != menuItemBounds.second; ++itr)
{
bool canTalk = true;
- if (!sConditionMgr->IsObjectMeetToConditions(this, itr->second.Conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(this, source, itr->second.Conditions))
continue;
if (source->GetTypeId() == TYPEID_UNIT)
@@ -14233,7 +14233,7 @@ void Player::SendPreparedGossip(WorldObject* source)
uint32 textId = GetGossipTextId(source);
if (uint32 menuId = PlayerTalkClass->GetGossipMenu().GetMenuId())
- textId = GetGossipTextId(menuId);
+ textId = GetGossipTextId(menuId, source);
PlayerTalkClass->SendGossipMenu(textId, source->GetGUID());
}
@@ -14378,10 +14378,10 @@ uint32 Player::GetGossipTextId(WorldObject* source)
if (!source)
return DEFAULT_GOSSIP_MESSAGE;
- return GetGossipTextId(GetDefaultGossipMenuForSource(source));
+ return GetGossipTextId(GetDefaultGossipMenuForSource(source), source);
}
-uint32 Player::GetGossipTextId(uint32 menuId)
+uint32 Player::GetGossipTextId(uint32 menuId, WorldObject* source)
{
uint32 textId = DEFAULT_GOSSIP_MESSAGE;
@@ -14391,8 +14391,10 @@ uint32 Player::GetGossipTextId(uint32 menuId)
GossipMenusMapBounds menuBounds = sObjectMgr->GetGossipMenusMapBounds(menuId);
for (GossipMenusContainer::const_iterator itr = menuBounds.first; itr != menuBounds.second; ++itr)
- if (sConditionMgr->IsObjectMeetToConditions(this, itr->second.conditions))
+ {
+ if (sConditionMgr->IsObjectMeetToConditions(this, source, itr->second.conditions))
textId = itr->second.text_id;
+ }
return textId;
}
@@ -19862,7 +19864,7 @@ void Player::VehicleSpellInitialize()
}
ConditionList conditions = sConditionMgr->GetConditionsForVehicleSpell(veh->GetEntry(), spellId);
- if (!sConditionMgr->IsObjectMeetToConditions(this, conditions))
+ if (!sConditionMgr->IsObjectMeetToConditions(this, veh, conditions))
{
sLog->outDebug(LOG_FILTER_CONDITIONSYS, "VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", veh->ToCreature()->GetEntry(), spellId);
data << uint16(0) << uint8(0) << uint8(i+8);
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 0fb2a6fb75d..7f08f03b5f8 100755
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1383,7 +1383,7 @@ class Player : public Unit, public GridObject<Player>
void SendPreparedGossip(WorldObject* source);
void OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 menuId);
- uint32 GetGossipTextId(uint32 menuId);
+ uint32 GetGossipTextId(uint32 menuId, WorldObject* source);
uint32 GetGossipTextId(WorldObject* source);
static uint32 GetDefaultGossipMenuForSource(WorldObject* source);
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index e3029a1be65..4112711ad3c 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -530,20 +530,38 @@ namespace Trinity
class RaiseDeadObjectCheck
{
public:
- RaiseDeadObjectCheck(Unit* funit, float range) : i_funit(funit), i_range(range) {}
+ RaiseDeadObjectCheck(Unit* source, float range) : _source(source), i_range(range) {}
bool operator()(Creature* u)
{
- if (i_funit->GetTypeId() != TYPEID_PLAYER || !((Player*)i_funit)->isHonorOrXPTarget(u) ||
- u->getDeathState() != CORPSE || u->isInFlight() ||
+ if (_source->GetTypeId() != TYPEID_PLAYER || !((Player*)_source)->isHonorOrXPTarget(u) ||
+ u->getDeathState() != CORPSE ||
(u->GetCreatureTypeMask() & (1 << (CREATURE_TYPE_HUMANOID-1))) == 0 ||
(u->GetDisplayId() != u->GetNativeDisplayId()))
return false;
- return i_funit->IsWithinDistInMap(u, i_range);
+ return _source->IsWithinDistInMap(u, i_range);
+ }
+
+ bool operator()(Player* u)
+ {
+ if (_source == u || _source->GetTypeId() != TYPEID_PLAYER || !((Player*)_source)->isHonorOrXPTarget(u) ||
+ u->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST) || u->isInFlight() || !u->isDead() ||
+ (u->GetCreatureTypeMask() & (1 << (CREATURE_TYPE_HUMANOID-1))) == 0)
+ return false;
+
+ return _source->IsWithinDistInMap(u, i_range);
+ }
+
+ bool operator()(Corpse* u)
+ {
+ if (_source->GetTypeId() != TYPEID_PLAYER || u->GetType() == CORPSE_BONES)
+ return false;
+
+ return _source->IsWithinDistInMap(u, i_range);
}
template<class NOT_INTERESTED> bool operator()(NOT_INTERESTED*) { return false; }
private:
- Unit* const i_funit;
+ Unit* const _source;
float i_range;
};
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 8a98b038efd..fc87d3ed8d6 100755
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -115,42 +115,53 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
//this void creates new auction and adds auction to some auctionhouse
void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_SELL_ITEM");
-
- uint64 auctioneer, item;
- uint32 etime, bid, buyout, count;
+ uint64 auctioneer;
+ uint32 itemsCount, etime, bid, buyout;
recv_data >> auctioneer;
- recv_data.read_skip<uint32>(); // const 1?
- recv_data >> item;
- recv_data >> count; // 3.2.2, number of items being auctioned
+ recv_data >> itemsCount;
+
+ uint64 itemGUIDs[MAX_AUCTION_ITEMS]; // 160 slot = 4x 36 slot bag + backpack 16 slot
+ uint32 count[MAX_AUCTION_ITEMS];
+
+ for (uint32 i = 0; i < itemsCount; ++i)
+ {
+ recv_data >> itemGUIDs[i];
+ recv_data >> count[i];
+
+ if (!itemGUIDs[i] || !count[i] || count[i] > 1000 )
+ return;
+ }
+
recv_data >> bid;
recv_data >> buyout;
recv_data >> etime;
- Player* player = GetPlayer();
-
- if (!item || !bid || !etime)
- return; //check for cheaters
+ if (!bid || !etime)
+ return;
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(auctioneer));
return;
}
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->getFaction());
if (!auctionHouseEntry)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", uint32(GUID_LOPART(auctioneer)));
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", GUID_LOPART(auctioneer));
+ return;
+ }
+
+ if (itemsCount > MAX_AUCTION_ITEMS)
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
- // client send time in minutes, convert to common used sec time
etime *= MINUTE;
- // client understand only 3 auction time
- switch (etime)
+ switch(etime)
{
case 1*MIN_AUCTION_TIME:
case 2*MIN_AUCTION_TIME:
@@ -160,96 +171,181 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
return;
}
- // remove fake death
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- Item* it = player->GetItemByGuid(item);
- //do not allow to sell already auctioned items
- if (sAuctionMgr->GetAItem(GUID_LOPART(item)))
- {
- sLog->outError("AuctionError, player %s is sending item id: %u, but item is already in another auction", player->GetName(), GUID_LOPART(item));
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
- return;
- }
- // prevent sending bag with items (cheat: can be placed in bag after adding equiped empty bag to auction)
- if (!it)
+ Item* items[MAX_AUCTION_ITEMS];
+
+ uint32 finalCount = 0;
+
+ for (uint32 i = 0; i < itemsCount; ++i)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_ITEM_NOT_FOUND);
- return;
+ Item* item = _player->GetItemByGuid(itemGUIDs[i]);
+
+ if (!item)
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_ITEM_NOT_FOUND);
+ return;
+ }
+
+ if (sAuctionMgr->GetAItem(item->GetGUIDLow()) || !item->CanBeTraded() || item->IsNotEmptyBag() ||
+ item->GetTemplate()->Flags & ITEM_PROTO_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
+ item->GetCount() < count[i])
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
+
+ items[i] = item;
+ finalCount += count[i];
}
- if (!it->CanBeTraded())
+ if (!finalCount)
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
- if (it->GetTemplate()->Flags & ITEM_PROTO_FLAG_CONJURED || it->GetUInt32Value(ITEM_FIELD_DURATION))
+ for (uint32 i = 0; i < itemsCount; ++i)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
- return;
+ Item* item = items[i];
+
+ if (item->GetMaxStackCount() < finalCount)
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
}
- if (it->IsNotEmptyBag())
+ for (uint32 i = 0; i < itemsCount; ++i)
{
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
- return;
- }
+ Item* item = items[i];
- AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
+ uint32 auctionTime = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
- //we have to take deposit :
- uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, it, count);
- if (!player->HasEnoughMoney(deposit))
- {
- SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
- return;
- }
+ uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, item, finalCount);
+ if (!_player->HasEnoughMoney(deposit))
+ {
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
+ return;
+ }
- if (AccountMgr::IsGMAccount(GetSecurity()) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
- {
- sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
- GetPlayerName(), GetAccountId(), it->GetTemplate()->Name1.c_str(), it->GetEntry(), count);
- }
+ _player->ModifyMoney(-int32(deposit));
- player->ModifyMoney(-int32(deposit));
+ AuctionEntry* AH = new AuctionEntry;
+ AH->Id = sObjectMgr->GenerateAuctionID();
- uint32 auction_time = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
+ if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
+ AH->auctioneer = 23442;
+ else
+ AH->auctioneer = GUID_LOPART(auctioneer);
- AuctionEntry* AH = new AuctionEntry;
- AH->Id = sObjectMgr->GenerateAuctionID();
- if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
- AH->auctioneer = 23442;
- else
- AH->auctioneer = GUID_LOPART(auctioneer);
- AH->item_guidlow = GUID_LOPART(item);
- AH->item_template = it->GetEntry();
- AH->owner = player->GetGUIDLow();
- AH->startbid = bid;
- AH->bidder = 0;
- AH->bid = 0;
- AH->buyout = buyout;
- AH->expire_time = time(NULL) + auction_time;
- AH->deposit = deposit;
- AH->auctionHouseEntry = auctionHouseEntry;
-
- sLog->outDetail("selling item %u to auctioneer %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", GUID_LOPART(item), AH->auctioneer, bid, buyout, auction_time, AH->GetHouseId());
- sAuctionMgr->AddAItem(it);
- auctionHouse->AddAuction(AH);
-
- player->MoveItemFromInventory(it->GetBagSlot(), it->GetSlot(), true);
+ if (itemsCount == 1 && item->GetCount() == count[i])
+ {
+ if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
+ {
+ sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
+ GetPlayerName(), GetAccountId(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetCount());
+ }
- SQLTransaction trans = CharacterDatabase.BeginTransaction();
- it->DeleteFromInventoryDB(trans);
- it->SaveToDB(trans); // recursive and not have transaction guard into self, not in inventiory and can be save standalone
- AH->SaveToDB(trans);
- player->SaveInventoryAndGoldToDB(trans);
- CharacterDatabase.CommitTransaction(trans);
+ AH->item_guidlow = item->GetGUIDLow();
+ AH->item_template = item->GetEntry();
+ AH->owner = _player->GetGUIDLow();
+ AH->startbid = bid;
+ AH->bidder = 0;
+ AH->bid = 0;
+ AH->buyout = buyout;
+ AH->expire_time = time(NULL) + auctionTime;
+ AH->deposit = deposit;
+ AH->auctionHouseEntry = auctionHouseEntry;
+
+ sLog->outDetail("CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ sAuctionMgr->AddAItem(item);
+ auctionHouse->AddAuction(AH);
+
+ _player->MoveItemFromInventory(item->GetBagSlot(), item->GetSlot(), true);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ item->DeleteFromInventoryDB(trans);
+ item->SaveToDB(trans);
+ AH->SaveToDB(trans);
+ _player->SaveInventoryAndGoldToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
+
+ SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+
+ GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
+ return;
+ }
+ else
+ {
+ Item* newItem = item->CloneItem(finalCount, _player);
+ if (!newItem)
+ {
+ sLog->outError("CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
+ SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
+ return;
+ }
- SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+ if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
+ {
+ sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
+ GetPlayerName(), GetAccountId(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetCount());
+ }
+
+ AH->item_guidlow = newItem->GetGUIDLow();
+ AH->item_template = newItem->GetEntry();
+ AH->owner = _player->GetGUIDLow();
+ AH->startbid = bid;
+ AH->bidder = 0;
+ AH->bid = 0;
+ AH->buyout = buyout;
+ AH->expire_time = time(NULL) + auctionTime;
+ AH->deposit = deposit;
+ AH->auctionHouseEntry = auctionHouseEntry;
+
+ sLog->outDetail("CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ sAuctionMgr->AddAItem(newItem);
+ auctionHouse->AddAuction(AH);
+
+ for (uint32 i = 0; i < itemsCount; ++i)
+ {
+ Item* item = items[i];
+
+ if (item->GetCount() == count[i])
+ {
+ _player->MoveItemFromInventory(item->GetBagSlot(), item->GetSlot(), true);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ item->DeleteFromInventoryDB(trans);
+ item->SaveToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
+ }
+ else
+ {
+ item->SetCount(item->GetCount() - count[i]);
+ item->SetState(ITEM_CHANGED, _player);
+ _player->ItemRemovedQuestCheck(item->GetEntry(), count[i]);
+ item->SendUpdateToPlayer(_player);
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ item->SaveToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
+ }
+ }
+
+ SQLTransaction trans = CharacterDatabase.BeginTransaction();
+ AH->SaveToDB(trans);
+ _player->SaveInventoryAndGoldToDB(trans);
+ CharacterDatabase.CommitTransaction(trans);
- GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
+ SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
+
+ GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
+ return;
+ }
+ }
}
//this function is called when client bids or buys out auction
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index b4c07811598..38d17d8c3b6 100755
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -241,9 +241,8 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
CharacterDatabase.CommitTransaction(trans);
}
-void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
+void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recv_data)
{
- // ok
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SHOW_SIGNATURES");
uint8 signs = 0;
@@ -256,7 +255,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
QueryResult result = CharacterDatabase.PQuery("SELECT type FROM petition WHERE petitionguid = '%u'", petitionguid_low);
if (!result)
{
- sLog->outError("Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
+ sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
return;
}
Field* fields = result->Fetch();
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 670b743d725..6cacf5e7e5a 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -598,24 +598,10 @@ WorldObject* Spell::FindCorpseUsing()
// non-standard target selection
float max_range = m_spellInfo->GetMaxRange(false);
- CellCoord p(Trinity::ComputeCellCoord(m_caster->GetPositionX(), m_caster->GetPositionY()));
- Cell cell(p);
- cell.SetNoCreate();
-
WorldObject* result = NULL;
-
T u_check(m_caster, max_range);
Trinity::WorldObjectSearcher<T> searcher(m_caster, result, u_check);
-
- TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, GridTypeMapContainer > grid_searcher(searcher);
- cell.Visit(p, grid_searcher, *m_caster->GetMap(), *m_caster, max_range);
-
- if (!result)
- {
- TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, WorldTypeMapContainer > world_searcher(searcher);
- cell.Visit(p, world_searcher, *m_caster->GetMap(), *m_caster, max_range);
- }
-
+ m_caster->GetMap()->VisitFirstFound(m_caster->GetPositionX(), m_caster->GetPositionY(), max_range, searcher);
return result;
}
@@ -2554,11 +2540,15 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
{
case 46584: // Raise Dead
{
- if (WorldObject* result = FindCorpseUsing<Trinity::RaiseDeadObjectCheck> ())
+ if (WorldObject* result = FindCorpseUsing<Trinity::RaiseDeadObjectCheck>())
{
switch (result->GetTypeId())
{
case TYPEID_UNIT:
+ case TYPEID_PLAYER:
+ unitList.push_back(result->ToUnit());
+ // no break;
+ case TYPEID_CORPSE: // wont work until corpses are allowed in target lists, but at least will send dest in packet
m_targets.SetDst(*result);
break;
default:
@@ -2582,7 +2572,7 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
{
CleanupTargetList();
- WorldObject* result = FindCorpseUsing <Trinity::ExplodeCorpseObjectCheck> ();
+ WorldObject* result = FindCorpseUsing<Trinity::ExplodeCorpseObjectCheck>();
if (result)
{
@@ -2824,12 +2814,12 @@ uint32 Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
unitList.remove(m_targets.GetUnitTarget());
Trinity::RandomResizeList(unitList, maxTargets);
}
+ }
- CallScriptAfterUnitTargetSelectHandlers(unitList, SpellEffIndex(i));
+ CallScriptAfterUnitTargetSelectHandlers(unitList, SpellEffIndex(i));
- for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
- AddUnitTarget(*itr, effectMask, false);
- }
+ for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
+ AddUnitTarget(*itr, effectMask, false);
if (!gobjectList.empty())
{
@@ -3725,6 +3715,27 @@ void Spell::SendCastResult(Player* caster, SpellInfo const* spellInfo, uint8 cas
case SPELL_FAILED_CUSTOM_ERROR:
data << uint32(customError);
break;
+ case SPELL_FAILED_REAGENTS:
+ {
+ uint32 missingItem = 0;
+ for (uint32 i = 0; i < MAX_SPELL_REAGENTS; i++)
+ {
+ if (spellInfo->Reagent[i] <= 0)
+ continue;
+
+ uint32 itemid = spellInfo->Reagent[i];
+ uint32 itemcount = spellInfo->ReagentCount[i];
+
+ if (!caster->HasItemCount(itemid, itemcount))
+ {
+ missingItem = itemid;
+ break;
+ }
+ }
+
+ data << uint32(missingItem); // first missing item
+ break;
+ }
default:
break;
}
@@ -5926,7 +5937,7 @@ SpellCastResult Spell::CheckItems()
}
}
if (!p_caster->HasItemCount(itemid, itemcount))
- return SPELL_FAILED_ITEM_NOT_READY; //0x54
+ return SPELL_FAILED_REAGENTS;
}
}
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index ef5f32b5575..a8f6ece7102 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5665,7 +5665,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/)
if (target->isInFlight())
return;
- target->TeleportTo(target->GetStartPosition(), m_caster == m_caster ? TELE_TO_SPELL : 0);
+ target->TeleportTo(target->GetStartPosition(), TELE_TO_SPELL);
// homebind location is loaded always
// target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation(), (m_caster == m_caster ? TELE_TO_SPELL : 0));
diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp
index e6322591bf3..fac56021c3a 100644
--- a/src/server/scripts/Kalimdor/silithus.cpp
+++ b/src/server/scripts/Kalimdor/silithus.cpp
@@ -1425,7 +1425,7 @@ class go_wind_stone : public GameObjectScript
break;
}
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(gossipId), go->GetGUID());
+ player->SEND_GOSSIP_MENU(player->GetGossipTextId(gossipId, go), go->GetGUID());
return true;
}
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
index 4e1b9da0adb..2789bc48a4c 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -402,7 +402,8 @@ public:
if (!CAST_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerok)
CAST_AI(boss_jedoga_shadowseeker::boss_jedoga_shadowseekerAI, boss->AI())->bOpFerokFail = true;
- boss->AI()->DoAction(ACTION_INITIAND_KILLED);
+ if (Killer->GetTypeId() == TYPEID_PLAYER)
+ boss->AI()->DoAction(ACTION_INITIAND_KILLED);
}
instance->SetData64(DATA_ADD_JEDOGA_OPFER, 0);
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index fc01ad2efea..6cd049967c1 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -68,7 +68,6 @@ enum BossSpells
{
SPELL_LEGION_FLAME = 66197, // player should run away from raid because he triggers Legion Flame
SPELL_LEGION_FLAME_EFFECT = 66201, // used by trigger npc
- SPELL_TOUCH_OF_JARAXXUS = 66209, // used only in 25H
SPELL_NETHER_POWER = 66228, // +20% of spell damage per stack, stackable up to 5/10 times, must be dispelled/stealed
SPELL_FEL_LIGHTING = 66528, // jumps to nearby targets
SPELL_FEL_FIREBALL = 66532, // does heavy damage to the tank, interruptable
@@ -120,7 +119,6 @@ public:
uint32 m_uiIncinerateFleshTimer;
uint32 m_uiNetherPowerTimer;
uint32 m_uiLegionFlameTimer;
- uint32 m_uiTouchOfJaraxxusTimer;
uint32 m_uiSummonNetherPortalTimer;
uint32 m_uiSummonInfernalEruptionTimer;
@@ -134,7 +132,6 @@ public:
m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
m_uiNetherPowerTimer = 40*IN_MILLISECONDS;
m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
- m_uiTouchOfJaraxxusTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
m_uiSummonNetherPortalTimer = 1*MINUTE*IN_MILLISECONDS;
m_uiSummonInfernalEruptionTimer = 2*MINUTE*IN_MILLISECONDS;
Summons.DespawnAll();
@@ -240,13 +237,6 @@ public:
m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
} else m_uiLegionFlameTimer -= uiDiff;
- if (GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC && m_uiTouchOfJaraxxusTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_TOUCH_OF_JARAXXUS);
- m_uiTouchOfJaraxxusTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else m_uiTouchOfJaraxxusTimer -= uiDiff;
-
DoMeleeAttackIfReady();
}
};
diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h
index 46e14d81a5e..c05c4e62c96 100755
--- a/src/server/shared/Database/MySQLConnection.h
+++ b/src/server/shared/Database/MySQLConnection.h
@@ -62,13 +62,6 @@ struct MySQLConnectionInfo
std::string port_or_socket;
};
-struct PreparedStatementTable
-{
- uint32 index;
- const char* query;
- ConnectionFlags type;
-};
-
typedef std::map<uint32 /*index*/, std::pair<const char* /*query*/, ConnectionFlags /*sync/async*/> > PreparedStatementMap;
#define PREPARE_STATEMENT(a, b, c) m_queries[a] = std::make_pair(strdup(b), c);
diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp
index 8b7d8c19071..26b28b25fbb 100755
--- a/src/server/worldserver/TCSoap/TCSoap.cpp
+++ b/src/server/worldserver/TCSoap/TCSoap.cpp
@@ -30,7 +30,7 @@ void TCSoapRunnable::run()
soap.accept_timeout = 3;
soap.recv_timeout = 5;
soap.send_timeout = 5;
- if (soap_bind(&soap, m_host.c_str(), m_port, 100) < 0)
+ if (!soap_valid_socket(soap_bind(&soap, m_host.c_str(), m_port, 100)))
{
sLog->outError("TCSoap: couldn't bind to %s:%d", m_host.c_str(), m_port);
exit(-1);