Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Luan Luciano committed Jun 14, 2024
1 parent 360faf9 commit 5aa63f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4919,9 +4919,9 @@ bool Player::canWear(uint16_t lookType, uint8_t addons) const {
return true;
}

for (const auto &[outfitPlayer, addonPlayer] : outfitsMap) {
if (outfitPlayer == lookType) {
if (addonPlayer == addons || addonPlayer == 3 || addons == 0) {
for (const auto &outfitEntry : outfitsMap) {
if (outfitEntry.lookType == lookType) {
if (outfitEntry.addons == addons || outfitEntry.addons == 3 || addons == 0) {
return true;
}
return false; // have lookType on list and addons don't match
Expand Down Expand Up @@ -4960,9 +4960,9 @@ void Player::genReservedStorageRange() {
}

void Player::addOutfit(uint16_t lookType, uint8_t addons) {
for (auto &[outfitPlayer, addonPlayer] : outfitsMap) {
if (outfitPlayer == lookType) {
addonPlayer |= addons;
for (auto &outfitEntry : outfitsMap) {
if (outfitEntry.lookType == lookType) {
outfitEntry.addons |= addons;
return;
}
}
Expand All @@ -4979,9 +4979,9 @@ bool Player::removeOutfit(uint16_t lookType) {
}

bool Player::removeOutfitAddon(uint16_t lookType, uint8_t addons) {
for (auto &[outfitPlayer, addonPlayer] : outfitsMap) {
if (outfitPlayer == lookType) {
addonPlayer &= ~addons;
for (auto &outfitEntry : outfitsMap) {
if (outfitEntry.lookType == lookType) {
outfitEntry.addons &= ~addons;
return true;
}
}
Expand All @@ -4998,12 +4998,12 @@ bool Player::getOutfitAddons(const std::shared_ptr<Outfit> &outfit, uint8_t &add
return false;
}

for (const auto &[outfitPlayer, addonPlayer] : outfitsMap) {
if (outfitPlayer != outfit->lookType) {
for (const auto &outfitEntry : outfitsMap) {
if (outfitEntry.lookType != outfit->lookType) {
continue;
}

addons = addonPlayer;
addons = outfitEntry.addons;
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/creatures/players/player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2745,7 +2745,7 @@ class Player final : public Creature, public Cylinder, public Bankable {

std::vector<uint16_t> quickLootListItemIds;

phmap::flat_hash_map<uint16_t, uint8_t> outfitsMap;
phmap::parallel_flat_hash_map<OutfitEntry> outfitsMap;
std::unordered_set<uint16_t> mountsMap;
std::vector<FamiliarEntry> familiars;

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / windows-2022-windows-release

'phmap::parallel_flat_hash_map': too few template arguments

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / windows-2022-windows-release

'phmap::parallel_flat_hash_map': use of class template requires template argument list

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / windows-2022-windows-release

'phmap::parallel_flat_hash_map': too few template arguments

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / windows-2022-windows-release

'phmap::parallel_flat_hash_map': use of class template requires template argument list

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-release

wrong number of template arguments (1, should be at least 2)

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-release

‘<expression error>’ in namespace ‘phmap’ does not name a type

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-release

wrong number of template arguments (1, should be at least 2)

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-release

‘<expression error>’ in namespace ‘phmap’ does not name a type

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-debug

wrong number of template arguments (1, should be at least 2)

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-debug

‘<expression error>’ in namespace ‘phmap’ does not name a type

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-debug

wrong number of template arguments (1, should be at least 2)

Check failure on line 2751 in src/creatures/players/player.hpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-debug

‘<expression error>’ in namespace ‘phmap’ does not name a type
Expand Down

0 comments on commit 5aa63f1

Please sign in to comment.