Skip to content

Commit

Permalink
fix: oldProtocol compatibility in sendTextMessage (opentibiabr#2510)
Browse files Browse the repository at this point in the history
  • Loading branch information
luanluciano93 authored Apr 30, 2024
1 parent e1faa1f commit c307674
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4088,19 +4088,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 @@ -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<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 c307674

Please sign in to comment.