diff options
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 9 | ||||
-rw-r--r-- | src/being/playerinfo.h | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 686b73f54..7a937ceaf 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2972,7 +2972,7 @@ void Being::recalcSpritesOrder() return; std::vector<int> slotRemap; - std::map<int, int> itemSlotRemap; + IntMap itemSlotRemap; std::vector<int>::iterator it; int oldHide[20]; @@ -3018,7 +3018,7 @@ void Being::recalcSpritesOrder() FOR_EACHP (SpriteToItemMapCIter, itr, spriteToItems) { const int remSprite = itr->first; - const std::map<int, int> &itemReplacer = itr->second; + const IntMap &itemReplacer = itr->second; if (remSprite >= 0) { // slot known if (itemReplacer.empty()) @@ -3027,7 +3027,7 @@ void Being::recalcSpritesOrder() } else if (mSpriteHide[remSprite] != 1) { - std::map<int, int>::const_iterator repIt + IntMapCIter repIt = itemReplacer.find(mSpriteIDs[remSprite]); if (repIt == itemReplacer.end()) { @@ -3169,8 +3169,7 @@ void Being::recalcSpritesOrder() int idx1 = -1; // logger->log("item %d, id=%d", slot, id); int reorder = 0; - const std::map<int, int>::const_iterator - orderIt = itemSlotRemap.find(id); + const IntMapCIter orderIt = itemSlotRemap.find(id); if (orderIt != itemSlotRemap.end()) reorder = orderIt->second; diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h index cba86bd79..3a74754e1 100644 --- a/src/being/playerinfo.h +++ b/src/being/playerinfo.h @@ -35,7 +35,8 @@ #include "enums/simpletypes/sfx.h" #include "enums/simpletypes/trading.h" -#include <map> +#include "utils/intmap.h" + #ifdef EATHENA_SUPPORT #include <string> #endif @@ -51,7 +52,6 @@ struct Stat final int expNeed; }; -typedef std::map<int, int> IntMap; typedef std::map<AttributesT, int> AtrIntMap; typedef std::map<AttributesT, Stat> StatMap; |