summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-23 22:06:54 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-23 22:06:54 +0300
commitc81d80b6cd18977f60f8ba19f898a583c055d117 (patch)
tree945b484b790640e21247028c38855706d37be45f /src/being
parent06711faa8e02ca2e65e9e1cf2d38c359728f6ccf (diff)
downloadmanaplus-c81d80b6cd18977f60f8ba19f898a583c055d117.tar.gz
manaplus-c81d80b6cd18977f60f8ba19f898a583c055d117.tar.bz2
manaplus-c81d80b6cd18977f60f8ba19f898a583c055d117.tar.xz
manaplus-c81d80b6cd18977f60f8ba19f898a583c055d117.zip
Add check for cards for existing item id.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 93222c846..bf082dd79 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -94,6 +94,8 @@
#include "resources/image/image.h"
+#include "resources/item/item.h"
+
#include "resources/map/map.h"
#include "resources/skill/skilldata.h"
@@ -5101,6 +5103,8 @@ void Being::addItemParticlesCards(const int id,
for (int f = 0; f < maxCards; f ++)
{
const int cardId = cards.cards[f];
+ if (!Item::isItem(cardId))
+ continue;
const ItemInfo &info = ItemDB::get(cardId);
const SpriteDisplay &restrict display2 = info.getDisplay();
FOR_EACH (StringVectCIter, itr, display2.particles)
@@ -5121,6 +5125,8 @@ void Being::addItemParticlesCards(const int id,
for (int f = 0; f < maxCards; f ++)
{
const int cardId = cards.cards[f];
+ if (!Item::isItem(cardId))
+ continue;
const ItemInfo &info = ItemDB::get(cardId);
const SpriteDisplay &restrict display2 = info.getDisplay();
FOR_EACH (StringVectCIter, itr, display2.particles)