mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 13:37:13 +00:00
More build errors fixed
13 errors left at this stage.
This commit is contained in:
parent
924d182855
commit
669502916a
22 changed files with 279 additions and 56 deletions
|
|
@ -184,39 +184,39 @@ bool ItemCanGoIntoBag(ItemPrototype const* pProto, ItemPrototype const* pBagProt
|
|||
case ITEM_SUBCLASS_CONTAINER:
|
||||
return true;
|
||||
case ITEM_SUBCLASS_SOUL_CONTAINER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_SOUL_SHARDS))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_SOUL_SHARDS))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_HERB_CONTAINER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_HERBS))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_HERBS))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_ENCHANTING_CONTAINER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_ENCHANTING_SUPP))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_ENCHANTING_SUPP))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_MINING_CONTAINER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_MINING_SUPP))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MINING_SUPP))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_ENGINEERING_CONTAINER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_ENGINEERING_SUPP))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_ENGINEERING_SUPP))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_GEM_CONTAINER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_GEMS))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_GEMS))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_LEATHERWORKING_CONTAINER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_LEATHERWORKING_SUPP))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_LEATHERWORKING_SUPP))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_INSCRIPTION_CONTAINER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_INSCRIPTION_SUPP))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_INSCRIPTION_SUPP))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_FISHING_CONTAINER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_FISHING_SUPP))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_FISHING_SUPP))
|
||||
return false;
|
||||
return true;
|
||||
default:
|
||||
|
|
@ -226,11 +226,11 @@ bool ItemCanGoIntoBag(ItemPrototype const* pProto, ItemPrototype const* pBagProt
|
|||
switch (pBagProto->SubClass)
|
||||
{
|
||||
case ITEM_SUBCLASS_QUIVER:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_ARROWS))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_ARROWS))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_AMMO_POUCH:
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_MASK_BULLETS))
|
||||
if (!(pProto->BagFamily & BAG_FAMILY_BULLETS))
|
||||
return false;
|
||||
return true;
|
||||
default:
|
||||
|
|
@ -409,6 +409,13 @@ bool Item::Create(uint32 guidlow, uint32 itemid, Player const* owner)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Item::IsNotEmptyBag() const
|
||||
{
|
||||
if (Bag const* bag = ToBag())
|
||||
return !bag->IsEmpty();
|
||||
return false;
|
||||
}
|
||||
|
||||
void Item::UpdateDuration(Player* owner, uint32 diff)
|
||||
{
|
||||
if (!GetUInt32Value(ITEM_FIELD_DURATION))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue