From e1faa1f5bc1e7eb53982c6b20431a23e5adfe3f7 Mon Sep 17 00:00:00 2001 From: Aluisio Penna Date: Tue, 30 Apr 2024 18:15:14 -0300 Subject: [PATCH 1/2] fix: equipping two-handed distance weapons via action bar removes quiver if equipped (#2587) --- src/game/game.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index 6670575d991..b1d76f9f760 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -3199,7 +3199,13 @@ void Game::playerEquipItem(uint32_t playerId, uint16_t itemId, bool hasTier /* = } else { const int32_t &slotPosition = equipItem->getSlotPosition(); // Checks if a two-handed item is being equipped in the left slot when the right slot is already occupied and move to backpack - if (slotPosition & SLOTP_LEFT && rightItem && (slotPosition & SLOTP_TWO_HAND)) { + if ( + (slotPosition & SLOTP_LEFT) + && (slotPosition & SLOTP_TWO_HAND) + && rightItem + && !(it.weaponType == WEAPON_DISTANCE) + && !rightItem->isQuiver() + ) { ret = internalCollectManagedItems(player, rightItem, getObjectCategory(rightItem), false); } From c3076740f29eb7df44837ec3052ca4c2ef72594a Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Tue, 30 Apr 2024 18:16:59 -0300 Subject: [PATCH 2/2] fix: oldProtocol compatibility in sendTextMessage (#2510) --- src/server/network/protocol/protocolgame.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 1748699ab34..c822ff4af7c 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -4088,11 +4088,11 @@ void ProtocolGame::sendTextMessage(const TextMessage &message) { break; } case MESSAGE_MARKET: { - internalType = MESSAGE_GAME_HIGHLIGHT; + internalType = MESSAGE_EVENT_ADVANCE; break; } case MESSAGE_MANA: { - internalType = MESSAGE_THANK_YOU; + internalType = MESSAGE_HEALED; break; } case MESSAGE_BEYOND_LAST: { @@ -4100,7 +4100,7 @@ void ProtocolGame::sendTextMessage(const TextMessage &message) { break; } case MESSAGE_ATTENTION: { - internalType = MESSAGE_DAMAGE_DEALT; + internalType = MESSAGE_EVENT_ADVANCE; break; } case MESSAGE_BOOSTED_CREATURE: { @@ -4143,11 +4143,9 @@ void ProtocolGame::sendTextMessage(const TextMessage &message) { } case MESSAGE_HEALED: case MESSAGE_HEALED_OTHERS: { - if (!oldProtocol) { - msg.addPosition(message.position); - msg.add(message.primary.value); - msg.addByte(message.primary.color); - } + msg.addPosition(message.position); + msg.add(message.primary.value); + msg.addByte(message.primary.color); break; } case MESSAGE_EXPERIENCE: