Skip to content

Commit

Permalink
Check if player already has the royal and golden outfit to show in cu…
Browse files Browse the repository at this point in the history
…stomize character windows.
  • Loading branch information
elsongabriel committed Apr 5, 2024
1 parent 167bae5 commit c4154be
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6707,17 +6707,21 @@ void ProtocolGame::sendOutfitWindow() {
msg.addByte(0x00);
++outfitSize;
} else if (outfit->lookType == 1210 || outfit->lookType == 1211) {
msg.add<uint16_t>(outfit->lookType);
msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name");
msg.addByte(3);
msg.addByte(0x02);
++outfitSize;
if (player->canWear(1210, 0) || player->canWear(1211, 0)) {
msg.add<uint16_t>(outfit->lookType);
msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name");
msg.addByte(3);
msg.addByte(0x02);
++outfitSize;
}
} else if (outfit->lookType == 1456 || outfit->lookType == 1457) {
msg.add<uint16_t>(outfit->lookType);
msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name");
msg.addByte(3);
msg.addByte(0x03);
++outfitSize;
if (player->canWear(1456, 0) || player->canWear(1457, 0)) {
msg.add<uint16_t>(outfit->lookType);
msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name");
msg.addByte(3);
msg.addByte(0x03);
++outfitSize;
}
} else if (outfit->from == "store") {
msg.add<uint16_t>(outfit->lookType);
msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name");
Expand Down

0 comments on commit c4154be

Please sign in to comment.