aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dep/PackageList.txt2
-rw-r--r--dep/utf8cpp/utf8/checked.h6
-rw-r--r--dep/utf8cpp/utf8/unchecked.h2
-rw-r--r--sql/updates/world/2013_07_20_00_world_gameonject.sql15
-rw-r--r--sql/updates/world/2013_07_20_01_world_misc.sql170
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp9
-rw-r--r--src/server/game/Handlers/ItemHandler.cpp5
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp11
-rw-r--r--src/server/scripts/Northrend/zone_icecrown.cpp13
9 files changed, 208 insertions, 25 deletions
diff --git a/dep/PackageList.txt b/dep/PackageList.txt
index 4f52dfca906..f932591ae32 100644
--- a/dep/PackageList.txt
+++ b/dep/PackageList.txt
@@ -30,7 +30,7 @@ SFMT (SIMD-oriented Fast Mersenne Twister)
utf8-cpp (UTF-8 with C++ in a Portable Way)
http://utfcpp.sourceforge.net/
- Version: 2.3.2
+ Version: 2.3.4
zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library)
http://www.zlib.net/
diff --git a/dep/utf8cpp/utf8/checked.h b/dep/utf8cpp/utf8/checked.h
index 3b00644444c..13311551381 100644
--- a/dep/utf8cpp/utf8/checked.h
+++ b/dep/utf8cpp/utf8/checked.h
@@ -109,13 +109,13 @@ namespace utf8
case internal::NOT_ENOUGH_ROOM:
throw not_enough_room();
case internal::INVALID_LEAD:
- utf8::append (replacement, out);
+ out = utf8::append (replacement, out);
++start;
break;
case internal::INCOMPLETE_SEQUENCE:
case internal::OVERLONG_SEQUENCE:
case internal::INVALID_CODE_POINT:
- utf8::append (replacement, out);
+ out = utf8::append (replacement, out);
++start;
// just one replacement mark for the sequence
while (start != end && utf8::internal::is_trail(*start))
@@ -270,7 +270,7 @@ namespace utf8
octet_iterator range_start;
octet_iterator range_end;
public:
- iterator () {};
+ iterator () {}
explicit iterator (const octet_iterator& octet_it,
const octet_iterator& range_start,
const octet_iterator& range_end) :
diff --git a/dep/utf8cpp/utf8/unchecked.h b/dep/utf8cpp/utf8/unchecked.h
index b4547fad945..cb2427166b1 100644
--- a/dep/utf8cpp/utf8/unchecked.h
+++ b/dep/utf8cpp/utf8/unchecked.h
@@ -179,7 +179,7 @@ namespace utf8
class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
octet_iterator it;
public:
- iterator () {};
+ iterator () {}
explicit iterator (const octet_iterator& octet_it): it(octet_it) {}
// the default "big three" are OK
octet_iterator base () const { return it; }
diff --git a/sql/updates/world/2013_07_20_00_world_gameonject.sql b/sql/updates/world/2013_07_20_00_world_gameonject.sql
new file mode 100644
index 00000000000..7262b76ffef
--- /dev/null
+++ b/sql/updates/world/2013_07_20_00_world_gameonject.sql
@@ -0,0 +1,15 @@
+-- DTK instance entrance portals
+DELETE FROM `gameobject` WHERE `guid`=151225;
+SET @OGUID := 6120; -- (need 3)
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+2;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@OGUID+0,192585,571,1,1,4774.532,-2020.723,232.3105,-1.579522,0,0,0.9999905,0.004363241,120,255,1),
+(@OGUID+1,192776,571,1,1,4774.532,-2020.723,232.3105,-1.579522,0,0,0.9999905,0.004363241,120,255,1),
+(@OGUID+2,192775,571,1,1,4774.532,-2020.723,232.3105,-1.579522,0,0,0.9999905,0.004363241,120,255,1);
+
+-- Gundrak south instance entrance portals
+SET @OGUID := 5287; -- (need 2)
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+1;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@OGUID+0,192635,571,1,1,6700.195,-4662.38,446.7864,3.909541,0,0,0.3746067,0.9271838,120,255,1),
+(@OGUID+1,192170,571,1,1,6700.195,-4662.38,446.7864,3.909541,0,0,0.3746067,0.9271838,120,255,1);
diff --git a/sql/updates/world/2013_07_20_01_world_misc.sql b/sql/updates/world/2013_07_20_01_world_misc.sql
new file mode 100644
index 00000000000..273d9070930
--- /dev/null
+++ b/sql/updates/world/2013_07_20_01_world_misc.sql
@@ -0,0 +1,170 @@
+/*
+ # Collection of Feedback-PatchFixes / 20.07.2013
+ #
+ # Including sql codestyle updates and check for accuracy. (one by one)
+ # by FireEmerald / Thx @DDuarte for the base pull request.
+ #
+ # Including:
+ # DB/Spell: Update: Correct Spell Power Coefficient (107.43%) for Tranquility | by lendan (@6232)
+ # DB/LOS: Add: Ignore LOS for Ignite Horde Siege Engine | by dr-j (@6718)
+ # DB/SmartAI: Update: Correct casted spell by Defias Rogue Wizard | by Rochet2 (@9976)
+ # DB/Quest: Fix: Bloody Imp-ossible! (10924) | by Kirkhammett (@10276)
+ # DB/Quest: Fix: Mistcaller Yngvar (14102) / Add missing event script and conditions. | (@3563)
+ # DB/SmartAI: Update: Give quest credit for The Ring of Blood: The Final Challenge (9977) | by JunkyBulgaria (@7724)
+ # DB/Waypoints: Add: Missing waypoints for Mmmrrrggglll | by Hobbilis (@9602)
+ # DB/Conditions: Add: Missing conditions for Displacing Temporal Rift | by FireEmerald
+*/
+
+-- DB/Spell: Update: Correct Spell Power Coefficient (107.43%) for Tranquility | by lendan (@6232)
+SET @SPELL := 44203; -- Tranquility
+
+UPDATE `spell_bonus_data` SET `direct_bonus` = 1.0743 WHERE `entry` = @SPELL;
+
+-- DB/Quest: Fix: A Dire Situation (10506) | by Rohlik & Exodius (@6283)
+SET @WOLF := 20058; -- Bloodmaul Dire Wolf
+SET @SPELL_INVIS := 18950; -- Invisibility and Stealth Detection
+SET @WOLF_TRIGGER := 21176; -- Bloodmaul Dire Wolf Trigger
+SET @SPELL_POWDER := 36310; -- Rina's Diminution Powder
+
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` = @WOLF;
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = @WOLF;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @WOLF AND `source_type` = 0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(@WOLF, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 75, @SPELL_INVIS, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Bloodmaul Dire Wolf - On spawn - Add Invisibility and Stealth Detection Aura on self');
+
+DELETE FROM `event_scripts` WHERE `id` = 13584;
+INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`) VALUES
+(13584, 2, 8, @WOLF_TRIGGER);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceEntry` = @SPELL_POWDER;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(17,0,@SPELL_POWDER,0,31,1,3,@WOLF,0,0,0,'', 'Rina''s Diminution Powder can be used only on Bloodmaul Dire Wolf');
+
+-- DB/LOS: Add: Ignore LOS for Ignite Horde Siege Engine | by dr-j (@6718)
+SET @IGNITE := 32979; -- Ignite Horde Siege Engine
+
+DELETE FROM `disables` WHERE `sourceType` = 0 AND `entry` = @IGNITE;
+INSERT INTO `disables`(`sourceType`,`entry`,`flags`,`comment`) VALUES
+(0,@IGNITE,64,'Ignore LOS on Ignite Horde Siege Engine');
+
+-- DB/SmartAI: Update: Correct casted spell by Defias Rogue Wizard | by Rochet2 (@9976)
+SET @WIZARD := 474; -- Rogue Wizard
+SET @SPELL := 13322; -- Frostbolt
+
+UPDATE `smart_scripts` SET `action_param2`= @SPELL WHERE `entryorguid` = @WIZARD AND `source_type` = 0 AND `id` = 0 AND `link` = 0;
+
+-- DB/Quest: Fix: Bloody Imp-ossible! (10924) | by Kirkhammett (@10276)
+SET @CHASER := 18884; -- Warp Chaser
+SET @ZEPPIT := 22484; -- Zeppit
+SET @SPELL_INVIS := 32942; -- Phasing Invisibility
+SET @SPELL_CHARGE := 37417; -- Warp Charge
+SET @SPELL_BITE := 32739; -- Venomous Bite
+SET @SPELL_BLOOD := 39244; -- Gather Warp Chaser Blood
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = @CHASER;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` = @CHASER;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @CHASER;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@CHASER,0,0,0,11,0,100,0,0,0,0,0,11,@SPELL_INVIS,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warp Chaser - On Spawn - Cast Phasing Invisibility'),
+(@CHASER,0,1,0,0,0,100,0,500,2000,7000,15000,11,@SPELL_CHARGE,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warp Chaser - In Combat - Cast Charge'),
+(@CHASER,0,2,0,0,0,100,0,3000,5000,10000,15000,11,@SPELL_BITE,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warp Chaser - In Combat - Cast Venomous Bite'),
+(@CHASER,0,3,0,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,@ZEPPIT,10,0,0,0,0,0, 'Warp Chaser - On Death - Set Data on Zeppit');
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = @ZEPPIT;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id` = @ZEPPIT;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @ZEPPIT;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ZEPPIT,0,0,0,38,0,100,0,1,1,0,0,11,@SPELL_BLOOD,0,0,0,0,0,21,10,0,0,0,0,0,0, 'Zeppit - On Data Set - Cast on Master');
+
+-- DB/Quest: Fix: Mistcaller Yngvar (14102) / Add missing event script and conditions. | (@3563)
+SET @ENTRY := 34965; -- Mistcaller Yngvar
+SET @SPELL := 66621; -- Summon the Mistcaller
+SET @QUEST := 14102; -- Mistcaller Yngvar (Quest)
+
+DELETE FROM `event_scripts` WHERE `id` = 21997 AND `command` = 10;
+INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
+(21997, 2, 10, @ENTRY, 120000, 0, 10181.96, 1183.417, 76.12115, 5.934119);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceEntry` = @SPELL;
+INSERT INTO `conditions` (SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, comment ) VALUES
+(17, 0, @SPELL, 0, 0, 29, @ENTRY, 40, 0, 1, 0, "Cant use Mistcallers Charm within 40 yards of Yngvar"),
+(17, 0, @SPELL, 0, 0, 28, @QUEST, 0, 0, 1, 0, "Cant use Mistcallers Charm, if player has quest objective completed, but not yet rewarded.");
+
+-- DB/SmartAI: Update: Give quest credit for The Ring of Blood: The Final Challenge (9977) | by JunkyBulgaria (@7724)
+SET @MOGOR := 18069; -- Mogor <Hero of the Warmaul>
+SET @QUEST := 9977; -- The Ring of Blood: The Final Challenge
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = @MOGOR AND `source_type` = 0 AND `id` = 14;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(@MOGOR, 0, 14, 0, 6, 0, 100, 1, 0, 0, 0, 0, 15, @QUEST, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 'Mogor - On Death - Give Quest Credit');
+
+-- DB/Waypoints: Add: Missing waypoints for Mmmrrrggglll | by Hobbilis (@9602)
+SET @MURLOC := 15937; -- Mmmrrrggglll
+SET @GUID := 41792;
+SET @PATH := 417920;
+
+-- Set creature location
+UPDATE `creature` SET `MovementType`=2,`position_x`=8869.872,`position_y`=-5775.960,`position_z`=0.405, `spawnDist`=0, `currentwaypoint`=1 WHERE `guid`=@GUID;
+DELETE FROM `creature_addon` WHERE `guid`=@GUID;
+INSERT INTO `creature_addon` (`guid`, `path_id`, `bytes2`) VALUES (@GUID, @PATH, 1);
+
+-- Waypoint Data
+DELETE FROM `waypoint_data` WHERE `id`=@PATH;
+INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES
+(@PATH, 1, 8880.688, -5754.608, 0.25531, 0, 0, 0, 0, 100, 0),
+(@PATH, 2, 8873.341, -5735.012, 0.43308, 0, 0, 0, 0, 100, 0),
+(@PATH, 3, 8862.790, -5722.625, 0.42263, 0, 0, 0, 0, 100, 0),
+(@PATH, 4, 8846.429, -5720.661, 0.49396, 0, 0, 0, 0, 100, 0),
+(@PATH, 5, 8836.920, -5726.737, 0.83736, 0, 0, 0, 0, 100, 0),
+(@PATH, 6, 8828.789, -5743.622, 0.82590, 0, 0, 0, 0, 100, 0),
+(@PATH, 7, 8818.041, -5755.890, 0.64673, 0, 0, 0, 0, 100, 0),
+(@PATH, 8, 8804.548, -5762.792, 0.51199, 0, 0, 0, 0, 100, 0),
+(@PATH, 9, 8791.789, -5762.271, 0.45083, 0, 0, 0, 0, 100, 0),
+(@PATH, 10, 8777.225, -5753.970, 0.55571, 0, 0, 0, 0, 100, 0),
+(@PATH, 11, 8776.860, -5738.229, 0.61609, 0, 0, 0, 0, 100, 0),
+(@PATH, 12, 8785.234, -5722.790, 0.75764, 0, 0, 0, 0, 100, 0),
+(@PATH, 13, 8786.402, -5701.790, 0.67103, 0, 0, 0, 0, 100, 0),
+(@PATH, 14, 8771.277, -5696.080, 0.67596, 0, 0, 0, 0, 100, 0),
+(@PATH, 15, 8758.604, -5694.220, 0.55669, 0, 0, 0, 0, 100, 0),
+(@PATH, 16, 8746.010, -5704.514, 0.50786, 0, 0, 0, 0, 100, 0),
+(@PATH, 17, 8735.815, -5722.942, 0.94607, 0, 0, 0, 0, 100, 0),
+(@PATH, 18, 8720.269, -5730.856, 0.89406, 0, 0, 0, 0, 100, 0),
+(@PATH, 19, 8706.965, -5730.076, 0.77437, 0, 0, 0, 0, 100, 0),
+(@PATH, 20, 8693.575, -5720.971, 0.86999, 0, 0, 0, 0, 100, 0),
+(@PATH, 21, 8679.183, -5710.540, 1.10842, 0, 0, 0, 0, 100, 0),
+(@PATH, 22, 8656.022, -5704.337, 1.80973, 0, 0, 0, 0, 100, 0),
+(@PATH, 23, 8640.976, -5691.507, 0.47690, 0, 0, 0, 0, 100, 0),
+(@PATH, 24, 8635.418, -5689.706, 0.53144, 0, 0, 0, 0, 100, 0),
+(@PATH, 25, 8620.438, -5687.679, 0.86486, 0, 0, 0, 0, 100, 0),
+(@PATH, 26, 8601.687, -5688.443, 0.49338, 1.930, 36000, 0, 0, 100, 0),
+(@PATH, 27, 8619.985, -5679.970, 0.75128, 0, 0, 0, 0, 100, 0),
+(@PATH, 28, 8635.668, -5671.577, 0.53144, 0, 0, 0, 0, 100, 0),
+(@PATH, 29, 8648.297, -5670.150, 0.49488, 0, 0, 0, 0, 100, 0),
+(@PATH, 30, 8664.989, -5679.421, 0.55752, 0, 0, 0, 0, 100, 0),
+(@PATH, 31, 8679.183, -5710.540, 1.10842, 0, 0, 0, 0, 100, 0),
+(@PATH, 32, 8693.575, -5720.971, 0.86999, 0, 0, 0, 0, 100, 0),
+(@PATH, 33, 8706.965, -5730.076, 0.77437, 0, 0, 0, 0, 100, 0),
+(@PATH, 34, 8721.716, -5745.012, 0.62278, 0, 0, 0, 0, 100, 0),
+(@PATH, 35, 8735.529, -5753.923, 1.24721, 0, 0, 0, 0, 100, 0),
+(@PATH, 36, 8767.193, -5758.179, 0.50536, 0, 0, 0, 0, 100, 0),
+(@PATH, 37, 8791.789, -5762.271, 0.45083, 0, 0, 0, 0, 100, 0),
+(@PATH, 38, 8804.548, -5762.792, 0.51199, 0, 0, 0, 0, 100, 0),
+(@PATH, 39, 8818.041, -5755.890, 0.64673, 0, 0, 0, 0, 100, 0),
+(@PATH, 40, 8828.789, -5743.622, 0.82590, 0, 0, 0, 0, 100, 0),
+(@PATH, 41, 8836.920, -5726.737, 0.83736, 0, 0, 0, 0, 100, 0),
+(@PATH, 42, 8846.429, -5720.661, 0.49396, 0, 0, 0, 0, 100, 0),
+(@PATH, 43, 8873.341, -5735.012, 0.43308, 0, 0, 0, 0, 100, 0),
+(@PATH, 44, 8880.688, -5754.608, 0.25531, 6.105, 60000, 0, 0, 100, 0);
+
+-- DB/Conditions: Add: Missing conditions for Displacing Temporal Rift | by FireEmerald
+SET @PARASITE := 10717; -- Temporal Parasite
+SET @SPELL := 16613; -- Displacing Temporal Rift
+SET @QUEST := 4971; -- A Matter of Time
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceEntry` = @SPELL;
+INSERT INTO `conditions` (SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, comment ) VALUES
+(17, 0, @SPELL, 0, 0, 29, @PARASITE, 100, 0, 1, 0, "Cant use Temporal Displacer within 100 yards of Temporal Parasite"),
+(17, 0, @SPELL, 0, 0, 28, @QUEST, 0, 0, 1, 0, "Cant use Temporal Displacer, if player has quest objective completed, but not yet rewarded");
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 8a970963c37..817aafb18dc 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -8362,15 +8362,6 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
return false;
}
- if (vItems->GetItemCount() >= MAX_VENDOR_ITEMS)
- {
- if (player)
- ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
- else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry);
- return false;
- }
-
return true;
}
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index 90c1bc4599f..5f458edbb07 100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -784,8 +784,6 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
continue;
}
- ++count;
-
// reputation discount
int32 price = item->IsGoldRequired(itemTemplate) ? uint32(floor(itemTemplate->BuyPrice * discountMod)) : 0;
@@ -797,6 +795,9 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
data << uint32(itemTemplate->MaxDurability);
data << uint32(itemTemplate->BuyCount);
data << uint32(item->ExtendedCost);
+
+ if (++count >= MAX_VENDOR_ITEMS)
+ break;
}
}
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index ddcd4c7d824..2895e85de71 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -545,11 +545,12 @@ public:
bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
- uint8 SpectralPlayers = 0;
Map* map = go->GetMap();
if (!map->IsDungeon())
return true;
+#if MAX_PLAYERS_IN_SPECTRAL_REALM > 0
+ uint8 SpectralPlayers = 0;
Map::PlayerList const &PlayerList = map->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
@@ -558,9 +559,13 @@ public:
}
if (player->HasAura(AURA_SPECTRAL_EXHAUSTION) || SpectralPlayers >= MAX_PLAYERS_IN_SPECTRAL_REALM)
+ {
player->GetSession()->SendNotification(GO_FAILED);
- else
- player->CastSpell(player, SPELL_TELEPORT_SPECTRAL, true);
+ return true;
+ }
+#endif
+
+ player->CastSpell(player, SPELL_TELEPORT_SPECTRAL, true);
return true;
}
};
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp
index a5d3ed7d0d5..24452a5fb5f 100644
--- a/src/server/scripts/Northrend/zone_icecrown.cpp
+++ b/src/server/scripts/Northrend/zone_icecrown.cpp
@@ -1035,11 +1035,12 @@ class npc_margrave_dhakar : public CreatureScript
if (Creature* morbidus = me->FindNearestCreature(NPC_MORBIDUS, 50.0f, true))
{
- Creature* lichKing = me->SummonCreature(NPC_LICH_KING, morbidus->GetPositionX()+10, morbidus->GetPositionY(), morbidus->GetPositionZ());
- _lichKingGuid = lichKing->GetGUID();
- lichKing = me->SummonCreature(NPC_LICH_KING, morbidus->GetPositionX()+10, morbidus->GetPositionY(), morbidus->GetPositionZ());
- lichKing->SetFacingTo(morbidus->GetOrientation());
- lichKing->CastSpell(lichKing, SPELL_SIMPLE_TELEPORT, true);
+ if (Creature* lichKing = me->SummonCreature(NPC_LICH_KING, morbidus->GetPositionX() + 10.0f, morbidus->GetPositionY(), morbidus->GetPositionZ()))
+ {
+ _lichKingGuid = lichKing->GetGUID();
+ lichKing->SetFacingTo(morbidus->GetOrientation());
+ lichKing->CastSpell(lichKing, SPELL_SIMPLE_TELEPORT, true);
+ }
}
_events.ScheduleEvent(EVENT_LK_SAY_1, 5000);
@@ -1109,8 +1110,8 @@ class npc_margrave_dhakar : public CreatureScript
private:
EventMap _events;
- uint64 _lichKingGuid;
SummonList _summons;
+ uint64 _lichKingGuid;
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE