Skip to content

Commit

Permalink
fix: items with only attack bug
Browse files Browse the repository at this point in the history
  • Loading branch information
phacUFPE committed Sep 24, 2024
1 parent 8d8c450 commit b50fc47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5746,13 +5746,13 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) {
attackDescription = fmt::format("{} {}", it.abilities->elementDamage, getCombatName(it.abilities->elementType));
}

if (it.attack != 0) {
if (it.attack != 0 && !attackDescription.empty()) {
attackDescription = fmt::format("{} physical + {}", it.attack, attackDescription);
} else if (it.attack != 0 && attackDescription.empty()) {
attackDescription = std::to_string(it.attack);
}

if (!attackDescription.empty()) {
msg.addString(attackDescription, "ProtocolGame::sendMarketDetail - attackDescription");
}
msg.addString(attackDescription, "ProtocolGame::sendMarketDetail - attackDescription");
} else {
msg.add<uint16_t>(0x00);
}
Expand Down

0 comments on commit b50fc47

Please sign in to comment.