fix(Core/Items): Special bags cannot be stored inside other special b… (#12032)
fix(Core/Items): Special bags cannot be stored inside other special bags. Fixes #11946
This commit is contained in:
@@ -183,10 +183,20 @@ bool ItemCanGoIntoBag(ItemTemplate const* pProto, ItemTemplate const* pBagProto)
|
|||||||
switch (pBagProto->Class)
|
switch (pBagProto->Class)
|
||||||
{
|
{
|
||||||
case ITEM_CLASS_CONTAINER:
|
case ITEM_CLASS_CONTAINER:
|
||||||
|
{
|
||||||
|
if (pBagProto->SubClass == ITEM_SUBCLASS_CONTAINER)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (pProto->Class == ITEM_CLASS_CONTAINER)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (pBagProto->SubClass)
|
switch (pBagProto->SubClass)
|
||||||
{
|
{
|
||||||
case ITEM_SUBCLASS_CONTAINER:
|
|
||||||
return true;
|
|
||||||
case ITEM_SUBCLASS_SOUL_CONTAINER:
|
case ITEM_SUBCLASS_SOUL_CONTAINER:
|
||||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_SOUL_SHARDS))
|
if (!(pProto->BagFamily & BAG_FAMILY_MASK_SOUL_SHARDS))
|
||||||
return false;
|
return false;
|
||||||
@@ -222,7 +232,15 @@ bool ItemCanGoIntoBag(ItemTemplate const* pProto, ItemTemplate const* pBagProto)
|
|||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
case ITEM_CLASS_QUIVER:
|
case ITEM_CLASS_QUIVER:
|
||||||
|
{
|
||||||
|
if (pProto->Class == ITEM_CLASS_QUIVER)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (pBagProto->SubClass)
|
switch (pBagProto->SubClass)
|
||||||
{
|
{
|
||||||
case ITEM_SUBCLASS_QUIVER:
|
case ITEM_SUBCLASS_QUIVER:
|
||||||
@@ -237,6 +255,8 @@ bool ItemCanGoIntoBag(ItemTemplate const* pProto, ItemTemplate const* pBagProto)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user