Skip to content

Commit

Permalink
Merge branch 'main' into feature/badge-system
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored May 2, 2024
2 parents 38b13e4 + c307674 commit aeda52f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
8 changes: 7 additions & 1 deletion src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3212,7 +3212,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);
}

Expand Down
14 changes: 6 additions & 8 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4144,19 +4144,19 @@ 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: {
internalType = MESSAGE_LOOT;
break;
}
case MESSAGE_ATTENTION: {
internalType = MESSAGE_DAMAGE_DEALT;
internalType = MESSAGE_EVENT_ADVANCE;
break;
}
case MESSAGE_BOOSTED_CREATURE: {
Expand Down Expand Up @@ -4199,11 +4199,9 @@ void ProtocolGame::sendTextMessage(const TextMessage &message) {
}
case MESSAGE_HEALED:
case MESSAGE_HEALED_OTHERS: {
if (!oldProtocol) {
msg.addPosition(message.position);
msg.add<uint32_t>(message.primary.value);
msg.addByte(message.primary.color);
}
msg.addPosition(message.position);
msg.add<uint32_t>(message.primary.value);
msg.addByte(message.primary.color);
break;
}
case MESSAGE_EXPERIENCE:
Expand Down

0 comments on commit aeda52f

Please sign in to comment.