mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
refactor(ItemTemplate): add missing enums + other minor improvements (#2236)
This commit is contained in:
@@ -94,7 +94,7 @@ void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
|
||||
data << uint32(item->GetTemplate()->DisplayInfoID);// display id
|
||||
data << uint32(item->GetCount()); // stack count
|
||||
// wrapped: hide stats but show giftcreator name
|
||||
data << uint32(item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED) ? 1 : 0);
|
||||
data << uint32(item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED) ? 1 : 0);
|
||||
data << uint64(item->GetUInt64Value(ITEM_FIELD_GIFTCREATOR));
|
||||
// perm. enchantment and gems
|
||||
data << uint32(item->GetEnchantmentId(PERM_ENCHANTMENT_SLOT));
|
||||
@@ -148,7 +148,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
|
||||
#endif
|
||||
|
||||
// adjust time (depends on /played)
|
||||
if (myItems[i]->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE))
|
||||
if (myItems[i]->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_BOP_TRADEABLE))
|
||||
myItems[i]->SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, trader->GetTotalPlayedTime()-(_player->GetTotalPlayedTime()-myItems[i]->GetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME)));
|
||||
// store
|
||||
trader->MoveItemToInventory(traderDst, myItems[i], true, true);
|
||||
@@ -161,7 +161,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
|
||||
#endif
|
||||
|
||||
// adjust time (depends on /played)
|
||||
if (hisItems[i]->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE))
|
||||
if (hisItems[i]->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_BOP_TRADEABLE))
|
||||
hisItems[i]->SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, _player->GetTotalPlayedTime()-(trader->GetTotalPlayedTime()-hisItems[i]->GetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME)));
|
||||
// store
|
||||
_player->MoveItemToInventory(playerDst, hisItems[i], true, true);
|
||||
|
||||
Reference in New Issue
Block a user