24 uint8 srcBag, srcSlot, dstBag, dstSlot;
29 recvData >> dstBag >> srcSlot >> dstSlot;
34 uint16 src = ((srcBag << 8) | srcSlot);
35 uint16 dst = ((dstBag << 8) | dstSlot);
43 if (!
_player->IsValidPos(srcBag, srcSlot,
true))
49 if (!
_player->IsValidPos(dstBag, dstSlot,
false))
55 _player->SplitItem(src, dst, count);
61 uint8 srcSlot, dstSlot;
63 recvData >> srcSlot >> dstSlot;
67 if (srcSlot == dstSlot)
102 std::vector<Unk14> unk14;
103 for (
uint32 i = 0; i < length; ++i)
113 for (
auto&& itr : unk14)
136 if (item->
GetPos() == dstpos)
147 uint8 dstBag, dstSlot, srcBag, srcSlot;
148 uint8 srcSlotAlt, srcBagAlt, dstSlotAlt, dstBagAlt;
150 recvData >> srcSlotAlt >> srcBagAlt >> dstBagAlt >> dstSlotAlt;
157 for (
uint8 i = 0; i < count; i++)
159 hasSlot[i] = !recvData.
ReadBit();
160 hasBag[i] = !recvData.
ReadBit();
163 dstBag = hasBag[0] ? recvData.
read<
uint8>() : dstBagAlt;
164 dstSlot = hasSlot[0] ? recvData.
read<
uint8>() : dstSlotAlt;
165 srcBag = hasBag[1] ? recvData.
read<
uint8>() : srcBagAlt;
166 srcSlot = hasSlot[1] ? recvData.
read<
uint8>() : srcSlotAlt;
170 uint16 src = ((srcBag << 8) | srcSlot);
171 uint16 dst = ((dstBag << 8) | dstSlot);
177 if (!
_player->IsValidPos(srcBag, srcSlot,
true))
183 if (!
_player->IsValidPos(dstBag, dstSlot,
true))
195 uint8 srcbag, srcslot;
197 recvData >> srcslot >> srcbag;
201 Item* pSrcItem =
_player->GetItemByPos(srcbag, srcslot);
209 _player->SendEquipError(msg, pSrcItem, NULL);
220 _player->RemoveItem(srcbag, srcslot,
true);
221 _player->EquipItem(dest, pSrcItem,
true);
222 _player->AutoUnequipOffhandIfNeed();
229 msg =
_player->CanUnequipItem(dest, !pSrcItem->
IsBag());
232 _player->SendEquipError(msg, pDstItem, NULL);
239 if (
_player->IsInventoryPos(src))
241 msg =
_player->CanStoreItem(srcbag, srcslot, sSrc, pDstItem,
true);
247 else if (
_player->IsBankPos(src))
249 msg =
_player->CanBankItem(srcbag, srcslot, sSrc, pDstItem,
true);
255 else if (
_player->IsEquipmentPos(src))
257 msg =
_player->CanEquipItem(srcslot, eSrc, pDstItem,
true);
259 msg =
_player->CanUnequipItem(eSrc,
true);
264 _player->SendEquipError(msg, pDstItem, pSrcItem);
269 _player->RemoveItem(dstbag, dstslot,
false);
270 _player->RemoveItem(srcbag, srcslot,
false);
273 _player->EquipItem(dest, pSrcItem,
true);
276 if (
_player->IsInventoryPos(src))
277 _player->StoreItem(sSrc, pDstItem,
true);
278 else if (
_player->IsBankPos(src))
279 _player->BankItem(sSrc, pDstItem,
true);
280 else if (
_player->IsEquipmentPos(src))
281 _player->EquipItem(eSrc, pDstItem,
true);
283 _player->AutoUnequipOffhandIfNeed();
294 recvData >> slot >> bag;
297 uint16 pos = (bag << 8) | slot;
326 _player->DestroyItemCount(pItem, i_count,
true);
329 _player->DestroyItem(bag, slot,
true);
335 recvData >> bag >> slot;
352 SF_LOG_INFO(
"network",
"STORAGE: Unable to read item");
353 _player->SendEquipError(msg, pItem, NULL);
364 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_SELL_ITEM");
396 SF_LOG_DEBUG(
"network",
"WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can not interact with him.",
uint32(
GUID_LOPART(VendorGUID)));
453 if (count < pItem->GetCount())
458 SF_LOG_ERROR(
"network",
"WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->
GetEntry(), count);
469 _player->AddItemToBuyBackSlot(pNewItem);
478 _player->AddItemToBuyBackSlot(pItem);
496 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_BUYBACK_ITEM");
502 recvData.
ReadGuidMask(VendorGUID, 2, 3, 0, 4, 1, 7, 5, 6);
508 SF_LOG_DEBUG(
"network",
"WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can not interact with him.",
uint32(
GUID_LOPART(VendorGUID)));
517 Item* pItem =
_player->GetItemFromBuyBackSlot(slot);
532 _player->RemoveItemFromBuyBackSlot(slot,
false);
535 _player->StoreItem(dest, pItem,
true);
538 _player->SendEquipError(msg, pItem, NULL);
547 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_BUY_ITEM_IN_SLOT");
548 uint64 vendorguid, bagguid;
552 recvData >> vendorguid >> item >> slot >> bagguid >> bagslot >> count;
561 Item* bagItem = NULL;
563 if (bagguid ==
_player->GetGUID())
566 bagItem =
_player->GetItemByGuid(bagguid);
568 if (bagItem && bagItem->
IsBag())
580 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_BUY_ITEM");
583 uint32 item, slot, count, bagSlot;
586 recvData >> bagSlot >> count >> item >> slot;
588 vendorGuid[6] = recvData.
ReadBit();
589 bagGuid[6] = recvData.
ReadBit();
590 bagGuid[4] = recvData.
ReadBit();
591 vendorGuid[4] = recvData.
ReadBit();
593 vendorGuid[0] = recvData.
ReadBit();
594 vendorGuid[3] = recvData.
ReadBit();
595 bagGuid[3] = recvData.
ReadBit();
596 vendorGuid[7] = recvData.
ReadBit();
597 vendorGuid[5] = recvData.
ReadBit();
598 bagGuid[2] = recvData.
ReadBit();
599 vendorGuid[1] = recvData.
ReadBit();
600 bagGuid[7] = recvData.
ReadBit();
601 vendorGuid[2] = recvData.
ReadBit();
602 bagGuid[1] = recvData.
ReadBit();
603 bagGuid[0] = recvData.
ReadBit();
604 bagGuid[5] = recvData.
ReadBit();
635 if (bagItem && bagItem->
IsBag())
637 else if (bagGuid ==
GetPlayer()->GetGUID())
645 SF_LOG_DEBUG(
"network",
"WORLD: received wrong itemType (%u) in HandleBuyItemOpcode", itemType);
658 SF_LOG_DEBUG(
"network",
"WORLD: Recvd CMSG_LIST_INVENTORY");
665 SF_LOG_DEBUG(
"network",
"WORLD: Sent SMSG_LIST_INVENTORY");
670 SF_LOG_DEBUG(
"network",
"WORLD: SendListInventory - Unit (GUID: %u) not found or you can not interact with him.",
uint32(
GUID_LOPART(vendorGuid)));
693 const float discountMod =
_player->GetReputationPriceDiscount(vendor);
696 for (
uint32 slot = 0; slot < rawItemCount; ++slot)
721 if (leftInStock == 0)
728 SF_LOG_DEBUG(
"condition",
"SendListInventory: conditions not met for creature entry %u item %u", vendor->
GetEntry(), vendorItem->
item);
737 itemsData <<
int32(leftInStock);
738 itemsData <<
uint32(price);
740 itemsData <<
int32(-1);
747 hasExtendedCost[count] =
true;
751 hasExtendedCost[count] =
false;
754 itemsData <<
uint32(slot + 1);
763 if (!currencyTemplate)
769 itemsData <<
int32(-1);
772 itemsData <<
int32(-1);
777 hasExtendedCost[count] =
true;
781 itemsData <<
uint32(slot + 1);
799 for (
uint32 i = 0; i < count; i++)
815 data <<
uint8(rawItemCount);
836 uint8 srcBag, srcSlot, dstBag;
838 recvData >> srcSlot >> srcBag >> dstBag;
843 Item* pItem =
_player->GetItemByPos(srcBag, srcSlot);
861 _player->SendEquipError(msg, pItem, NULL);
870 _player->SendEquipError(msg, pItem, NULL);
875 if (dest.size() == 1 && dest[0].pos == src)
882 _player->RemoveItem(srcBag, srcSlot,
true);
883 _player->StoreItem(dest, pItem,
true);
910 SF_LOG_INFO(
"network",
"PLAYER: Buy bank bag slot, slot number = %u", slot);
932 _player->SetBankBagSlotCount(slot);
944 uint8 srcBag, srcSlot;
946 recvPacket >> srcSlot >> srcBag;
949 SF_LOG_DEBUG(
"network",
"STORAGE: receive srcbag = %u, srcslot = %u", srcBag, srcSlot);
951 Item* pItem =
_player->GetItemByPos(srcBag, srcSlot);
959 _player->SendEquipError(msg, pItem, NULL);
963 if (dest.size() == 1 && dest[0].pos == pItem->
GetPos())
969 _player->RemoveItem(srcBag, srcSlot,
true);
971 _player->BankItem(dest, pItem,
true);
976 SF_LOG_DEBUG(
"network",
"WORLD: CMSG_AUTOSTORE_BANK_ITEM");
977 uint8 srcBag, srcSlot;
979 recvPacket >> srcSlot >> srcBag;
980 SF_LOG_DEBUG(
"network",
"STORAGE: receive srcbag = %u, srcslot = %u", srcBag, srcSlot);
982 Item* pItem =
_player->GetItemByPos(srcBag, srcSlot);
986 if (
_player->IsBankPos(srcBag, srcSlot))
992 _player->SendEquipError(msg, pItem, NULL);
996 _player->RemoveItem(srcBag, srcSlot,
true);
997 if (
Item const* storedItem =
_player->StoreItem(dest, pItem,
true))
998 _player->ItemAddedQuestCheck(storedItem->GetEntry(), storedItem->GetCount());
1006 _player->SendEquipError(msg, pItem, NULL);
1010 _player->RemoveItem(srcBag, srcSlot,
true);
1011 _player->BankItem(dest, pItem,
true);
1023 data <<
uint32(enchantmentSlot);
1024 data <<
uint32(enchantId);
1108 data <<
uint32(Duration);
1115 SF_LOG_DEBUG(
"network",
"Received opcode CMSG_WRAP_ITEM");
1117 uint8 gift_bag, gift_slot, item_bag, item_slot;
1119 recvData >> gift_bag >> gift_slot;
1120 recvData >> item_bag >> item_slot;
1122 SF_LOG_DEBUG(
"network",
"WRAP: receive gift_bag = %u, gift_slot = %u, item_bag = %u, item_slot = %u", gift_bag, gift_slot, item_bag, item_slot);
1124 Item* gift =
_player->GetItemByPos(gift_bag, gift_slot);
1137 Item* item =
_player->GetItemByPos(item_bag, item_slot);
1195 trans->Append(stmt);
1201 case 5042: item->
SetEntry(5043);
break;
1202 case 5048: item->
SetEntry(5044);
break;
1203 case 17303: item->
SetEntry(17302);
break;
1204 case 17304: item->
SetEntry(17305);
break;
1205 case 17307: item->
SetEntry(17308);
break;
1206 case 21830: item->
SetEntry(21831);
break;
1221 _player->DestroyItemCount(gift, count,
true);
1232 gem_guids[i][4] = recvData.
ReadBit();
1234 gem_guids[i][0] = recvData.
ReadBit();
1236 gem_guids[i][6] = recvData.
ReadBit();
1238 gem_guids[i][2] = recvData.
ReadBit();
1240 gem_guids[i][1] = recvData.
ReadBit();
1242 gem_guids[i][7] = recvData.
ReadBit();
1244 gem_guids[i][3] = recvData.
ReadBit();
1246 gem_guids[i][5] = recvData.
ReadBit();
1248 recvData.
ReadGuidMask(item_guid, 5, 0, 6, 2, 3, 4, 7, 1);
1275 if ((gem_guids[0] && (gem_guids[0] == gem_guids[1] || gem_guids[0] == gem_guids[2])) ||
1276 (gem_guids[1] && (gem_guids[1] == gem_guids[2])))
1279 Item* itemTarget =
_player->GetItemByGuid(item_guid);
1292 Gems[i] = gem_guids[i] ?
_player->GetItemByGuid(gem_guids[i]) : NULL;
1296 GemProps[i] = (Gems[i]) ?
sGemPropertiesStore.LookupEntry(Gems[i]->GetTemplate()->GemProperties) : NULL;
1338 GemEnchants[i] = (GemProps[i]) ? GemProps[i]->spellitemenchantement : 0;
1367 else if (OldEnchants[j])
1371 if (iGemProto->
ItemId == enchantEntry->GemID)
1382 int32 limit_newcount = 0;
1396 else if (OldEnchants[j])
1406 if (limit_newcount > 0 &&
uint32(limit_newcount) > limitEntry->maxCount)
1419 _player->SendEquipError(res, itemTarget, NULL);
1426 _player->ToggleMetaGemsActive(slot,
false);
1439 if (
Item* guidItem =
_player->GetItemByGuid(gem_guids[i]))
1442 _player->DestroyItemCount(guidItem, gemCount,
true);
1451 if (SocketBonusActivated ^ SocketBonusToBeActivated)
1459 _player->ToggleMetaGemsActive(slot,
true);
1461 _player->RemoveTradeableItem(itemTarget);
1484 SF_LOG_DEBUG(
"network",
"WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
1508 SF_LOG_DEBUG(
"network",
"WORLD: CMSG_GET_ITEM_PURCHASE_DATA");
1518 SF_LOG_DEBUG(
"network",
"Item refund: item not found!");
1535 SF_LOG_DEBUG(
"network",
"Item refund: item not found!");
1550 recvData >> itemGuid;
1556 if (
Item* item =
_player->GetItemByGuid(itemGuid))
1559 data <<
uint64(itemGuid);
1560 data << item->GetText();
1572 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_TRANSMOGRIFY_ITEMS");
1579 npcGuid[5] = recvData.
ReadBit();
1580 npcGuid[6] = recvData.
ReadBit();
1581 npcGuid[1] = recvData.
ReadBit();
1582 npcGuid[2] = recvData.
ReadBit();
1583 npcGuid[3] = recvData.
ReadBit();
1584 npcGuid[4] = recvData.
ReadBit();
1587 std::vector<ObjectGuid>itemGuids(count,
ObjectGuid(0));
1588 std::vector<uint32>newEntries(count, 0);
1589 std::vector<uint32>slots(count, 0);
1590 std::vector<bool>HasItemBonus(count,
false);
1591 std::vector<bool>HasModifications(count,
false);
1593 for (
uint8 i = 0; i < count; ++i)
1595 HasItemBonus[i] = recvData.
ReadBit();
1596 HasModifications[i] = recvData.
ReadBit();
1601 SF_LOG_DEBUG(
"network",
"WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) sent a wrong count (%u) when transmogrifying items.", player->
GetGUIDLow(), player->
GetName().c_str(), count);
1606 npcGuid[0] = recvData.
ReadBit();
1607 npcGuid[7] = recvData.
ReadBit();
1609 for (
uint8 i = 0; i < count; ++i)
1611 if (HasModifications[i])
1613 itemGuids[i][5] = recvData.
ReadBit();
1614 itemGuids[i][6] = recvData.
ReadBit();
1615 itemGuids[i][1] = recvData.
ReadBit();
1616 itemGuids[i][3] = recvData.
ReadBit();
1617 itemGuids[i][0] = recvData.
ReadBit();
1618 itemGuids[i][4] = recvData.
ReadBit();
1619 itemGuids[i][7] = recvData.
ReadBit();
1620 itemGuids[i][2] = recvData.
ReadBit();
1623 if (HasItemBonus[i])
1625 itemGuids[i][4] = recvData.
ReadBit();
1626 itemGuids[i][1] = recvData.
ReadBit();
1627 itemGuids[i][0] = recvData.
ReadBit();
1628 itemGuids[i][6] = recvData.
ReadBit();
1629 itemGuids[i][5] = recvData.
ReadBit();
1630 itemGuids[i][2] = recvData.
ReadBit();
1631 itemGuids[i][7] = recvData.
ReadBit();
1632 itemGuids[i][3] = recvData.
ReadBit();
1636 for (
uint8 i = 0; i < count; ++i)
1638 recvData >> slots[i];
1639 recvData >> newEntries[i];
1651 for (
uint8 i = 0; i < count; ++i)
1653 if (HasModifications[i])
1665 if (HasItemBonus[i])
1680 SF_LOG_DEBUG(
"network",
"WORLD: HandleTransmogrifyItems - Unit (GUID: %u) not found or player can't interact with it.",
GUID_LOPART(npcGuid));
1685 for (
uint8 i = 0; i < count; ++i)
1690 SF_LOG_DEBUG(
"network",
"WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify an item (lowguid: %u) with a wrong slot (%u) when transmogrifying items.", player->
GetGUIDLow(), player->
GetName().c_str(),
GUID_LOPART(itemGuids[i]), slots[i]);
1700 SF_LOG_DEBUG(
"network",
"WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify to an invalid item (entry: %u).", player->
GetGUIDLow(), player->
GetName().c_str(), newEntries[i]);
1705 Item* itemTransmogrifier = NULL;
1710 if (!itemTransmogrifier)
1712 SF_LOG_DEBUG(
"network",
"WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify with an invalid item (lowguid: %u).", player->
GetGUIDLow(), player->
GetName().c_str(),
GUID_LOPART(itemGuids[i]));
1719 if (!itemTransmogrified)
1721 SF_LOG_DEBUG(
"network",
"WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify an invalid item in a valid slot (slot: %u).", player->
GetGUIDLow(), player->
GetName().c_str(), slots[i]);
1751 SF_LOG_DEBUG(
"network",
"WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) failed CanTransmogrifyItemWithItem (%u with %u).", player->
GetGUIDLow(), player->
GetName().c_str(), itemTransmogrified->
GetEntry(), itemTransmogrifier->
GetEntry());
1787 uint32 slot, reforgeEntry;
1792 recvData >> reforgeEntry >> bag >> slot;
1799 SF_LOG_INFO(
"network",
"WORLD: HandleReforgeItemOpcode - Unit (GUID: %u) not found or player can't interact with it.",
GUID_LOPART(guid));
1808 SF_LOG_INFO(
"network",
"WORLD: HandleReforgeItemOpcode - Player (Guid: %u Name: %s) tried to reforge an invalid/non-existant item.", player->
GetGUIDLow(), player->
GetName().c_str());
1829 SF_LOG_INFO(
"network",
"WORLD: HandleReforgeItemOpcode - Player (Guid: %u Name: %s) tried to reforge an item with invalid reforge entry (%u).", player->
GetGUIDLow(), player->
GetName().c_str(), reforgeEntry);
1879 SF_LOG_DEBUG(
"network",
"WORLD: Received CMSG_SET_LOOT_SPECIALIZATION");
1881 uint32 lootSpecialization;
1882 recvData >> lootSpecialization;
1885 if (lootSpecialization)
1888 if (!specializationEntry)
1890 SF_LOG_DEBUG(
"network",
"Player tried to set their loot specialization to %u which doesn't exist!", lootSpecialization);
1894 if (
GetPlayer()->getClass() != specializationEntry->classId)
1896 SF_LOG_DEBUG(
"network",
"Player tried to set their loot specialization to %u which isn't valid for their class!", lootSpecialization);
std::list< Condition * > ConditionList
@ ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT
@ ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS
@ ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
DBCStorage< ItemLimitCategoryEntry > sItemLimitCategoryStore(ItemLimitCategoryEntryfmt)
DBCStorage< BankBagSlotPricesEntry > sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt)
DBCStorage< GemPropertiesEntry > sGemPropertiesStore(GemPropertiesEntryfmt)
DBCStorage< ItemReforgeEntry > sItemReforgeStore(ItemReforgefmt)
DBCStorage< ChrSpecializationEntry > sChrSpecializationStore(ChrSpecializationfmt)
DBCStorage< CurrencyTypesEntry > sCurrencyTypesStore(CurrencyTypesfmt)
@ BUY_ERR_NOT_ENOUGHT_MONEY
@ SOCK_ENCHANTMENT_SLOT_3
@ PRISMATIC_ENCHANTMENT_SLOT
@ EQUIP_ERR_CANT_WRAP_BAGS
@ EQUIP_ERR_DROP_BOUND_ITEM
@ EQUIP_ERR_ITEM_NOT_FOUND
@ EQUIP_ERR_CANT_WRAP_BOUND
@ EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED
@ EQUIP_ERR_INTERNAL_BAG_ERROR
@ EQUIP_ERR_CANT_WRAP_EQUIPPED
@ EQUIP_ERR_CANT_WRAP_STACKABLE
@ EQUIP_ERR_CANT_WRAP_WRAPPED
@ EQUIP_ERR_CANT_WRAP_UNIQUE
@ SELL_ERR_CANT_FIND_ITEM
@ SELL_ERR_CANT_SELL_ITEM
@ SELL_ERR_CANT_FIND_VENDOR
@ ITEM_PROTO_FLAG_WRAPPER
@ ITEM_PROTO_FLAG_INDESTRUCTIBLE
@ ITEM_PROTO_FLAG_UNIQUE_EQUIPPED
@ ITEM_FLAGS_EXTRA_ALLIANCE_ONLY
@ ITEM_FLAGS_EXTRA_HORDE_ONLY
@ ITEM_VENDOR_TYPE_CURRENCY
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
#define SF_LOG_INFO(filterType__,...)
uint32 GUID_LOPART(uint64 x)
std::vector< ItemPosCount > ItemPosCountVec
@ ERR_BANKSLOT_FAILED_TOO_MANY
@ ERR_BANKSLOT_INSUFFICIENT_FUNDS
#define INVENTORY_SLOT_BAG_0
@ SPELL_AURA_MOD_VENDOR_ITEMS_PRICES
Skyfire::AutoPtr< Transaction, Skyfire::Mutex > SQLTransaction
@ UNIT_NPC_FLAG_TRANSMOGRIFIER
@ ITEM_FIELD_MODIFIERS_MASK
@ ITEM_FIELD_GIFT_CREATOR
@ ITEM_FIELD_DYNAMIC_FLAGS
@ PLAYER_FIELD_BUYBACK_PRICE
T CalculatePct(T base, U pct)
void WriteGuidBytes(const ObjectGuid &guid, Offsets... offsets)
bool WriteBit(uint32 bit)
void WriteGuidMask(const ObjectGuid &guid, Offsets... offsets)
uint32 ReadBits(size_t bits)
void ReadGuidBytes(ObjectGuid &guid, Offsets... offsets)
void ReadByteSeq(uint8 &b)
void ReadGuidMask(ObjectGuid &guid, Offsets... offsets)
void WriteBits(T value, size_t bits)
void WriteByteSeq(uint8 b)
VendorItemData const * GetVendorItems() const
uint32 GetVendorItemCurrentCount(VendorItem const *vItem)
int32 GetReforgableStat(ItemModType statType) const
void SetNotRefundable(Player *owner, bool changestate=true, SQLTransaction *trans=NULL)
void SetEnchantment(EnchantmentSlot slot, uint32 id, uint32 duration, uint32 charges, uint64 caster=0)
void SetBinding(bool val)
void SetState(ItemUpdateState state, Player *forplayer=NULL)
uint32 GetEnchantmentId(EnchantmentSlot slot) const
void SetOwnerGUID(uint64 guid)
void RemoveFromUpdateQueueOf(Player *player)
Item * CloneItem(uint32 count, Player const *player=NULL) const
virtual void SaveToDB(SQLTransaction &trans)
void SetCount(uint32 value)
ItemTemplate const * GetTemplate() const
ItemUpdateState GetState() const
static uint32 GetSpecialPrice(ItemTemplate const *proto, uint32 minimumPrice=10000)
void UpdatePlayedTime(Player *owner)
static bool CanTransmogrifyItemWithItem(Item const *transmogrified, Item const *transmogrifier)
bool GemsFitSockets() const
void ClearEnchantment(EnchantmentSlot slot)
uint64 GetOwnerGUID() const
void ClearSoulboundTradeable(Player *currentOwner)
bool IsNotEmptyBag() const
uint32 GetMaxStackCount() const
uint32 GetUInt32Value(uint16 index) const
uint32 GetGUIDLow() const
void SetFlag(uint16 index, uint32 newFlag)
void RemoveFlag(uint16 index, uint32 oldFlag)
uint32 GetDynamicUInt32Value(uint32 tab, uint16 index) const
uint64 GetUInt64Value(uint16 index) const
void SetDynamicUInt32Value(uint32 tab, uint16 index, uint32 value)
bool HasFlag(uint16 index, uint32 flag) const
void SetEntry(uint32 entry)
void SendUpdateToPlayer(Player *player)
void SetUInt32Value(uint16 index, uint32 value)
void SetUInt64Value(uint16 index, uint64 value)
bool BuyCurrencyFromVendorSlot(ObjectGuid VendorGUID, uint32 vendorSlot, uint32 currency, uint32 count)
void SendEquipError(InventoryResult msg, Item *pItem, Item *pItem2=NULL, uint32 itemid=0)
static bool IsEquipmentPos(uint16 pos)
bool ModifyMoney(int64 amount, bool sendError=true)
void SetLootSpecialization(uint32 specialization)
void ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool apply_dur=true, bool ignore_condition=false)
void SwapItem(uint16 src, uint16 dst)
Item * GetItemByGuid(uint64 guid) const
Item * GetItemByPos(uint16 pos) const
void ApplyReforgeEnchantment(Item *item, bool apply)
Creature * GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
void SendRefundInfo(Item *item)
void SendMessageToSet(WorldPacket *data, bool self) override
void RefundItem(Item *item)
void SetVisibleItemSlot(uint8 slot, Item *pItem)
bool BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot)
bool HasEnoughMoney(uint64 amount) const
void setUInt32(const uint8 index, const uint32 value)
void StopMoving()
-------—End of Pet responses methods-------—
void RemoveAurasByType(AuraType auraType, uint64 casterGUID=0, Aura *except=NULL, bool negative=true, bool positive=true)
bool HasUnitState(const uint32 f) const
std::string const & GetName() const
void Initialize(Opcodes opcode, size_t newres=200)
void HandleDestroyItemOpcode(WorldPacket &recvPacket)
void HandleBuyBankSlotOpcode(WorldPacket &recvPacket)
void HandleSocketOpcode(WorldPacket &recvData)
void HandleSellItemOpcode(WorldPacket &recvPacket)
void HandleSwapItem(WorldPacket &recvPacket)
void HandleAutoStoreBagItemOpcode(WorldPacket &recvPacket)
void HandleWrapItemOpcode(WorldPacket &recvPacket)
void HandleAutoStoreBankItemOpcode(WorldPacket &recvPacket)
void HandleItemRefund(WorldPacket &recvData)
Player * GetPlayer() const
void HandleAutoEquipItemSlotOpcode(WorldPacket &recvPacket)
void HandleItemRefundInfoRequest(WorldPacket &recvData)
void HandleSwapInvItemOpcode(WorldPacket &recvPacket)
void HandleAutoEquipItemOpcode(WorldPacket &recvPacket)
void SendItemEnchantTimeUpdate(ObjectGuid Playerguid, ObjectGuid Itemguid, uint32 slot, uint32 Duration)
void HandleReforgeItemOpcode(WorldPacket &recvData)
void HandleReadItem(WorldPacket &recvPacket)
void HandleTransmogrifyItems(WorldPacket &recvData)
void HandleBuyItemOpcode(WorldPacket &recvPacket)
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
void HandleSplitItemOpcode(WorldPacket &recvPacket)
void SendUpdateSockets(ObjectGuid ItemGUID, Item *item)
void SendItemExpirePurchaseRefund(ObjectGuid itemGuid)
void HandleAutoBankItemOpcode(WorldPacket &recvPacket)
void HandleBuyItemInSlotOpcode(WorldPacket &recvPacket)
void HandleCancelTempEnchantmentOpcode(WorldPacket &recvData)
void HandleItemTextQuery(WorldPacket &recvData)
void SendListInventory(uint64 guid)
void SendReforgeResult(bool success)
void HandleBuybackItem(WorldPacket &recvPacket)
void HandleListInventoryOpcode(WorldPacket &recvPacket)
void SendEnchantmentLog(uint64 target, uint64 caster, uint64 itemGuid, uint32 itemId, uint32 enchantId, uint32 enchantmentSlot)
void HandleSetLootSpecialization(WorldPacket &recvData)
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
@ SMSG_READ_ITEM_RESULT_FAILED
@ SMSG_ITEM_EXPIRE_PURCHASE_REFUND
@ SMSG_SOCKET_GEMS_RESULT
@ SMSG_READ_ITEM_RESULT_OK
@ SMSG_BUY_BANK_SLOT_RESULT
@ SMSG_ITEM_TEXT_QUERY_RESPONSE
@ SMSG_ITEM_ENCHANT_TIME_UPDATE
_Socket Socket[MAX_ITEM_PROTO_SOCKETS]
uint32 GetItemCount() const
VendorItem * GetItem(uint32 slot) const
bool IsGoldRequired(ItemTemplate const *pProto) const