diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-02 17:23:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-02 17:23:32 +0300 |
commit | f89de74b1ac1cd9a02a70dab9221d601296da8cd (patch) | |
tree | 444451eb017720bdc1d3457e6e7976a84e065351 /src/being | |
parent | c2748e2217f0ac69e2f06f39e6411f5e77c11974 (diff) | |
download | manaverse-f89de74b1ac1cd9a02a70dab9221d601296da8cd.tar.gz manaverse-f89de74b1ac1cd9a02a70dab9221d601296da8cd.tar.bz2 manaverse-f89de74b1ac1cd9a02a70dab9221d601296da8cd.tar.xz manaverse-f89de74b1ac1cd9a02a70dab9221d601296da8cd.zip |
Add intmap defines.
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; |