diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-25 18:18:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-25 18:18:57 +0300 |
commit | e29c49d5f84544ef8178b7240b30485bfaf9ebce (patch) | |
tree | abba3ad42514cd14adc988ff37012c4361f2727e /src/being/being.cpp | |
parent | 488428c6dba3d1e82b017bfb3b08ba85ced82be2 (diff) | |
download | mv-e29c49d5f84544ef8178b7240b30485bfaf9ebce.tar.gz mv-e29c49d5f84544ef8178b7240b30485bfaf9ebce.tar.bz2 mv-e29c49d5f84544ef8178b7240b30485bfaf9ebce.tar.xz mv-e29c49d5f84544ef8178b7240b30485bfaf9ebce.zip |
prevent update some sprites from move packets and some other.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index f3976a20e..c503e94d5 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1902,6 +1902,21 @@ void Being::updateColors() } } +void Being::updateSprite(const unsigned int slot, const int id, + std::string color, const unsigned char colorId, + const bool isWeapon, const bool isTempSprite) +{ + if (slot >= Net::getCharServerHandler()->maxSprite()) + return; + + if (slot >= mSpriteIDs.size()) + mSpriteIDs.resize(slot + 1, 0); + + if (slot && mSpriteIDs[slot] == id) + return; + setSprite(slot, id, color, colorId, isWeapon, isTempSprite); +} + void Being::setSprite(const unsigned int slot, const int id, std::string color, const unsigned char colorId, const bool isWeapon, const bool isTempSprite) |