Core/Item: Item Signature

Port From (https://github.com/TrinityCore/TrinityCore/commit/e182a38b014f5538c42432f871e094dc79c2b131)
This commit is contained in:
hondacrx
2021-11-29 16:20:03 -05:00
parent f11a81c4b1
commit 572ce30138
2 changed files with 10 additions and 1 deletions
@@ -40,6 +40,15 @@ namespace Game.Entities
return ExtendedData.Display[locale];
}
public bool HasSignature()
{
return GetMaxStackSize() == 1 &&
GetClass() != ItemClass.Consumable &&
GetClass() != ItemClass.Quest &&
!GetFlags().HasFlag(ItemFlags.NoCreator) &&
GetId() != 6948; /*Hearthstone*/
}
public bool CanChangeEquipStateInCombat()
{
switch (GetInventoryType())
+1 -1
View File
@@ -1031,7 +1031,7 @@ namespace Game.Spells
}
// set the "Crafted by ..." property of the item
if (pItem.GetTemplate().GetClass() != ItemClass.Consumable && pItem.GetTemplate().GetClass() != ItemClass.Quest && newitemid != 6265 && newitemid != 6948)
if (pItem.GetTemplate().HasSignature())
pItem.SetCreator(player.GetGUID());
// send info to the client