Merge pull request #6897 from Xees/master
Core/Item: Modify IsCurrencyToken to use IsCurrencyToken in item template
This commit is contained in:
commit
3b808cd431
4 files changed
+8
-6
No files matched your search
@@ -10678,7 +10678,7 @@ InventoryResult Player::CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemP
|
||||
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
|
||||
|
||||
// currencytoken case
|
||||
if (slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END && !(pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS))
|
||||
if (slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END && !(pProto->IsCurrencyToken()))
|
||||
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
|
||||
|
||||
// prevent cheating
|
||||
@@ -11031,7 +11031,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des
|
||||
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
|
||||
}
|
||||
}
|
||||
else if (pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
|
||||
else if (pProto->IsCurrencyToken())
|
||||
{
|
||||
res = CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, false, pItem, bag, slot);
|
||||
if (res != EQUIP_ERR_OK)
|
||||
@@ -11198,7 +11198,7 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des
|
||||
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
|
||||
}
|
||||
}
|
||||
else if (pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
|
||||
else if (pProto->IsCurrencyToken())
|
||||
{
|
||||
res = CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START, CURRENCYTOKEN_SLOT_END, dest, pProto, count, false, pItem, bag, slot);
|
||||
if (res != EQUIP_ERR_OK)
|
||||
@@ -11447,7 +11447,7 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
|
||||
if (b_found)
|
||||
continue;
|
||||
|
||||
if (pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
|
||||
if (pProto->IsCurrencyToken())
|
||||
{
|
||||
for (uint32 t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; ++t)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user