From 1c19aa7b71ffc6782c94a64ce4aa3d178994e6a7 Mon Sep 17 00:00:00 2001 From: Keader Date: Tue, 24 Apr 2018 21:18:07 -0300 Subject: [PATCH 1/7] Core/Handlers: Fixed equipament manager with empty slots. Yes kids, dont use drugs ! Followup: 42be04898c6fd001160ee4fdf00fc2ba5c5c1ee3 --- src/server/game/Handlers/CharacterHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 5ad626e5d62..bf892dc798a 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1707,7 +1707,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData) InventoryResult msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, sDest, uItem, false); if (msg == EQUIP_ERR_OK) { - if (_player->CanEquipItem(NULL_SLOT, dstpos, uItem, false) != EQUIP_ERR_OK) + if (_player->CanUnequipItem(dstpos, true) != EQUIP_ERR_OK) continue; _player->RemoveItem(INVENTORY_SLOT_BAG_0, i, true); @@ -1722,7 +1722,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData) if (item->GetPos() == dstpos) continue; - if (_player->CanUnequipItem(dstpos, true) != EQUIP_ERR_OK) + if (_player->CanEquipItem(NULL_SLOT, dstpos, item, false) != EQUIP_ERR_OK) continue; _player->SwapItem(item->GetPos(), dstpos); From e27ee9fcea13b21aaa96b35e16309c2fcee6ad96 Mon Sep 17 00:00:00 2001 From: Keader Date: Wed, 25 Apr 2018 18:21:16 -0300 Subject: [PATCH 2/7] Core/Handlers: Fixed a Equipament Manager typo --- src/server/game/Handlers/CharacterHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index bf892dc798a..70d8b2e1d1c 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1722,7 +1722,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData) if (item->GetPos() == dstpos) continue; - if (_player->CanEquipItem(NULL_SLOT, dstpos, item, false) != EQUIP_ERR_OK) + if (_player->CanEquipItem(NULL_SLOT, dstpos, item, true) != EQUIP_ERR_OK) continue; _player->SwapItem(item->GetPos(), dstpos); From f423264e29d250574f9006f7997b4565ed1f1b22 Mon Sep 17 00:00:00 2001 From: Killyana Date: Thu, 26 Apr 2018 16:23:49 +0200 Subject: [PATCH 3/7] DB/SAI: Coilfang Sorceress and Coilfang Siren Closes #21886 --- sql/updates/world/3.3.5/2018_04_26_00_world.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_04_26_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_04_26_00_world.sql b/sql/updates/world/3.3.5/2018_04_26_00_world.sql new file mode 100644 index 00000000000..afa97a5c7af --- /dev/null +++ b/sql/updates/world/3.3.5/2018_04_26_00_world.sql @@ -0,0 +1,14 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (17722,17801) 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`,`event_param5`,`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 +(17722, 0, 0, 0, 0, 0, 100, 2, 1000, 1000, 2400, 3800, 0, 11, 12675, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Coilfang Sorceress - IC CMC - Cast 'Frostbolt' (Normal Dungeon)"), +(17722, 0, 1, 0, 0, 0, 100, 4, 1000, 1000, 2400, 3800, 0, 11, 37930, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Coilfang Sorceress - IC CMC - Cast 'Frostbolt' (Heroic Dungeon)"), +(17722, 0, 2, 0, 0, 0, 100, 2, 18000, 20000, 25000, 27000, 0, 11, 31581, 1, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, "Coilfang Sorceress - In Combat - Cast 'Blizzard' (No Repeat) (Normal Dungeon)"), +(17722, 0, 3, 0, 0, 0, 100, 4, 18000, 20000, 25000, 27000, 0, 11, 39416, 1, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, "Coilfang Sorceress - In Combat - Cast 'Blizzard' (Heroic Dungeon)"), +(17722, 0, 4, 0, 0, 0, 100, 2, 6000, 8000, 15000, 15000, 0, 11, 15063, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Coilfang Sorceress - In Combat - Cast 'Frost Nova' (Normal Dungeon)"), +(17722, 0, 5, 0, 0, 0, 100, 4, 6000, 8000, 15000, 15000, 0, 11, 15531, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Coilfang Sorceress - In Combat - Cast 'Frost Nova' (Heroic Dungeon)"), +(17801, 0, 0, 0, 0, 0, 100, 2, 1000, 1000, 4400, 5800, 0, 11, 15234, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Coilfang Siren - IC CMC - Cast 'Lightning Bolt' (Normal Dungeon)"), +(17801, 0, 1, 0, 0, 0, 100, 4, 1000, 1000, 3400, 4800, 0, 11, 37664, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Coilfang Siren - IC CMC - Cast 'Lightning Bolt' (Heroic Dungeon)"), +(17801, 0, 2, 0, 0, 0, 100, 2, 12000, 15000, 15000, 19000, 0, 11, 35106, 1, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, "Coilfang Siren - In Combat - Cast 'Arcane Flare'(NormalDungeon)"), +(17801, 0, 3, 0, 0, 0, 100, 4, 9000, 12000, 15000, 17000, 0, 11, 37856, 1, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, "Coilfang Siren - In Combat - Cast 'Arcane Flare' (HeroicDungeon)"), +(17801, 0, 4, 0, 0, 0, 100, 6, 9000, 13000, 10000, 14000, 0, 11, 38660, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, "Coilfang Siren - In Combat - Cast 'Fear' (Dungeon)"); From e6d8b0842be624ddf8aee554ba22c5f557790663 Mon Sep 17 00:00:00 2001 From: Gooyeth Date: Fri, 27 Apr 2018 01:41:50 -0600 Subject: [PATCH 4/7] Core/Player: Skip the cinematic of the first login if the character is teleported before. (#21776) --- .../database/Database/Implementation/CharacterDatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index 48b3ea94a89..ade729424c0 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -430,7 +430,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_INS_CHARACTER_SOCIAL, "INSERT INTO character_social (guid, friend, flags) VALUES (?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHARACTER_SOCIAL, "DELETE FROM character_social WHERE guid = ? AND friend = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHARACTER_SOCIAL_NOTE, "UPDATE character_social SET note = ? WHERE guid = ? AND friend = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_CHARACTER_POSITION, "UPDATE characters SET position_x = ?, position_y = ?, position_z = ?, orientation = ?, map = ?, zone = ?, trans_x = 0, trans_y = 0, trans_z = 0, transguid = 0, taxi_path = '' WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_CHARACTER_POSITION, "UPDATE characters SET position_x = ?, position_y = ?, position_z = ?, orientation = ?, map = ?, zone = ?, trans_x = 0, trans_y = 0, trans_z = 0, transguid = 0, taxi_path = '', cinematic = 1 WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_AURA_FROZEN, "SELECT characters.name, character_aura.remainTime FROM characters LEFT JOIN character_aura ON (characters.guid = character_aura.guid) WHERE character_aura.spell = 9454", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHARACTER_ONLINE, "SELECT name, account, map, zone FROM characters WHERE online > 0", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_DEL_INFO_BY_GUID, "SELECT guid, deleteInfos_Name, deleteInfos_Account, deleteDate FROM characters WHERE deleteDate IS NOT NULL AND guid = ?", CONNECTION_SYNCH); From 7df6a6bbcbc2844f6671c6022a9eef0dfa868543 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Fri, 27 Apr 2018 21:25:14 +0200 Subject: [PATCH 5/7] Dep/Boost: Fix crash in Boost Work around a NULL dereference exception happening in boost::asio::ip::tcp::resolver::results_type, resulting in a crash when trying to bind on an address that cannot be resolved. Fixes #21884 --- src/common/Asio/Resolver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Asio/Resolver.h b/src/common/Asio/Resolver.h index 5106421ee5e..953913442c8 100644 --- a/src/common/Asio/Resolver.h +++ b/src/common/Asio/Resolver.h @@ -32,7 +32,7 @@ namespace Trinity boost::system::error_code ec; #if BOOST_VERSION >= 106600 boost::asio::ip::tcp::resolver::results_type results = resolver.resolve(protocol, host, service, ec); - if (results.empty() || ec) + if (results.begin() == results.end() || ec) return {}; return results.begin()->endpoint(); From dcc1cfe44d7c5456ce66801b817bcaf1226a6580 Mon Sep 17 00:00:00 2001 From: Keader Date: Sun, 29 Apr 2018 11:25:18 -0300 Subject: [PATCH 6/7] Core/Handlers: Fixed Equipament Manager (for real this time) --- src/server/game/Handlers/CharacterHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 70d8b2e1d1c..b34b3d295f1 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1722,7 +1722,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData) if (item->GetPos() == dstpos) continue; - if (_player->CanEquipItem(NULL_SLOT, dstpos, item, true) != EQUIP_ERR_OK) + if (_player->CanEquipItem(i, dstpos, item, true) != EQUIP_ERR_OK) continue; _player->SwapItem(item->GetPos(), dstpos); From fb25fd29d2c63f6cc9490359c572eeb3142ae049 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 29 Apr 2018 17:48:28 +0200 Subject: [PATCH 7/7] rename files --- .../2018_04_29_00_world_from_335_was_2018_04_26_00_world.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/{3.3.5/2018_04_26_00_world.sql => 4.3.4/2018_04_29_00_world_from_335_was_2018_04_26_00_world.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_04_26_00_world.sql b/sql/updates/world/4.3.4/2018_04_29_00_world_from_335_was_2018_04_26_00_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_04_26_00_world.sql rename to sql/updates/world/4.3.4/2018_04_29_00_world_from_335_was_2018_04_26_00_world.sql