Fixed remaining bank/bag issues added in r9090

Added temporary hack to item creation to prevent new items from bugging (heroic+sockets issue), this will be removed after my work on item flags is done

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-07-30 17:36:28 +02:00
parent 350864de80
commit ab95e5a6dc
2 changed files with 13 additions and 15 deletions
@@ -87,7 +87,7 @@ bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
SetUInt32Value(ITEM_FIELD_MAXDURABILITY, itemProto->MaxDurability);
SetUInt32Value(ITEM_FIELD_DURABILITY, itemProto->MaxDurability);
SetUInt32Value(ITEM_FIELD_FLAGS, itemProto->Flags);
SetUInt32Value(ITEM_FIELD_FLAGS, itemProto->Flags & 0xFFFFFFF7); // TEMP HACK, DONT REMOVE - Shauren
SetUInt32Value(ITEM_FIELD_STACK_COUNT, 1);
// Setting the number of Slots the Container has
@@ -113,6 +113,8 @@ bool Bag::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult_AutoPtr result,
if (!Item::LoadFromDB(guid, owner_guid, result, entry))
return false;
ItemPrototype const* itemProto = GetProto(); // checked in Item::LoadFromDB
SetUInt32Value(CONTAINER_FIELD_NUM_SLOTS, itemProto->ContainerSlots);
// cleanup bag content related item value fields (its will be filled correctly from `character_inventory`)
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
{