Skip to content

Commit

Permalink
improved function name.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel committed Jul 2, 2024
1 parent 37dd41d commit a545808
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/creatures/creature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class Creature : virtual public Thing, public SharedObject {
const Outfit_t getDefaultOutfit() const {
return defaultOutfit;
}
bool isSupportOutfit() const {
bool isWearingSupportOutfit() const {
auto outfit = currentOutfit.lookType;
return outfit == 75 || outfit == 266 || outfit == 302;
}
Expand Down
2 changes: 1 addition & 1 deletion src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5830,7 +5830,7 @@ bool Player::toggleMount(bool mount) {
return false;
}

if (isSupportOutfit()) {
if (isWearingSupportOutfit()) {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4223,7 +4223,7 @@ void Game::playerSetShowOffSocket(uint32_t playerId, Outfit_t &outfit, const Pos
}

const auto mount = mounts.getMountByClientID(outfit.lookMount);
if (!mount || !player->hasMount(mount) || player->isSupportOutfit()) {
if (!mount || !player->hasMount(mount) || player->isWearingSupportOutfit()) {
outfit.lookMount = 0;
}

Expand Down Expand Up @@ -5920,7 +5920,7 @@ void Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit, uint8_t isMoun
return;
}

if (player->isSupportOutfit()) {
if (player->isWearingSupportOutfit()) {
outfit.lookMount = 0;
isMountRandomized = 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3203,7 +3203,7 @@ void ProtocolGame::sendCreatureOutfit(std::shared_ptr<Creature> creature, const
}

Outfit_t newOutfit = outfit;
if (player->isSupportOutfit()) {
if (player->isWearingSupportOutfit()) {
player->setCurrentMount(0);
newOutfit.lookMount = 0;
}
Expand Down Expand Up @@ -6872,7 +6872,7 @@ void ProtocolGame::sendOutfitWindow() {
msg.addByte(0xC8);

Outfit_t currentOutfit = player->getDefaultOutfit();
auto isSupportOutfit = player->isSupportOutfit();
auto isSupportOutfit = player->isWearingSupportOutfit();
bool mounted = false;

if (!isSupportOutfit) {
Expand Down

0 comments on commit a545808

Please sign in to comment.