diff options
Diffstat (limited to 'src/itemcolormanager.cpp')
-rw-r--r-- | src/itemcolormanager.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/itemcolormanager.cpp b/src/itemcolormanager.cpp index 9344ff856..0cf48015b 100644 --- a/src/itemcolormanager.cpp +++ b/src/itemcolormanager.cpp @@ -32,9 +32,18 @@ ItemColor ItemColorManager::getColorFromCards(const int *const cards) { if (!cards) return ItemColor_one; + if (cards[0] == CARD0_FORGE || + cards[0] == CARD0_CREATE || + cards[0] == CARD0_PET) + { + return ItemColor_one; + } for (int f = 0; f < maxCards; f ++) { - const ItemInfo &info = ItemDB::get(cards[f]); + const int id = cards[f]; + if (id == 0) + continue; + const ItemInfo &info = ItemDB::get(id); const ItemColor &color = info.getCardColor(); if (color != ItemColor_zero) return color; |