Skip to content

Commit

Permalink
feat: not show royal costume or golden outfit if player doesn't has (#…
Browse files Browse the repository at this point in the history
…2527)


Check if the player already has the royal or golden outfit to show in customize character windows.
  • Loading branch information
elsongabriel authored Apr 26, 2024
1 parent 77368ae commit 142066a
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 142066a

Please sign in to comment.