mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +00:00
Feat(Core/Item): Proper way to add item signature (#1623)
Co-authored-by: PolarCookie <PolarCookie@users.noreply.github.com>
This commit is contained in:
@@ -154,7 +154,7 @@ enum ItemFieldFlags
|
||||
ITEM_FLAG_UNK9 = 0x00004000, // ?
|
||||
ITEM_FLAG_UNK10 = 0x00008000, // ?
|
||||
ITEM_FLAG_UNK11 = 0x00010000, // ?
|
||||
ITEM_FLAG_UNK12 = 0x00020000, // ?
|
||||
ITEM_FLAG_NO_CREATOR = 0x00020000,
|
||||
ITEM_FLAG_UNK13 = 0x00040000, // ?
|
||||
ITEM_FLAG_UNK14 = 0x00080000, // ?
|
||||
ITEM_FLAG_UNK15 = 0x00100000, // ?
|
||||
@@ -659,6 +659,15 @@ struct ItemTemplate
|
||||
WorldPacket queryData; // pussywizard
|
||||
|
||||
// helpers
|
||||
bool HasSignature() const
|
||||
{
|
||||
return GetMaxStackSize() == 1 &&
|
||||
Class != ITEM_CLASS_CONSUMABLE &&
|
||||
Class != ITEM_CLASS_QUEST &&
|
||||
(Flags & ITEM_FLAG_NO_CREATOR) == 0 &&
|
||||
ItemId != 6948; /*Hearthstone*/
|
||||
}
|
||||
|
||||
bool CanChangeEquipStateInCombat() const
|
||||
{
|
||||
switch (InventoryType)
|
||||
|
||||
@@ -1771,7 +1771,7 @@ void Spell::DoCreateItem(uint8 /*effIndex*/, uint32 itemId)
|
||||
}
|
||||
|
||||
// set the "Crafted by ..." property of the item
|
||||
if (pItem->GetTemplate()->Class != ITEM_CLASS_CONSUMABLE && pItem->GetTemplate()->Class != ITEM_CLASS_QUEST && newitemid != 6265 && newitemid != 6948)
|
||||
if (pItem->GetTemplate()->HasSignature())
|
||||
pItem->SetUInt32Value(ITEM_FIELD_CREATOR, player->GetGUIDLow());
|
||||
|
||||
// send info to the client
|
||||
|
||||
Reference in New Issue
Block a user