Core/Enums: Defined two unknown item flags, and cleaned the other item flags enums to reflect a better standardization

This commit is contained in:
Kinzcool
2015-05-01 21:56:33 -04:00
parent 404dc91c7a
commit 0453fafaec
18 changed files with 188 additions and 149 deletions
@@ -320,7 +320,7 @@ bool AuctionBotSeller::Initialize()
continue;
}
if (prototype->GetFlags() & ITEM_FLAG_UNLOCKED)
if (prototype->GetFlags() & ITEM_FIELD_FLAG_UNLOCKED)
{
// skip any not locked lootable items (mostly quest specific or reward cases)
if (!prototype->GetLockID())
+1 -1
View File
@@ -373,7 +373,7 @@ struct VendorItem
uint8 Type;
//helpers
bool IsGoldRequired(ItemTemplate const* pProto) const { return pProto->GetFlags2() & ITEM_FLAGS_EXTRA_EXT_COST_REQUIRES_GOLD || !ExtendedCost; }
bool IsGoldRequired(ItemTemplate const* pProto) const { return pProto->GetFlags2() & ITEM_FLAG2_EXT_COST_REQUIRES_GOLD || !ExtendedCost; }
};
typedef std::vector<VendorItem*> VendorItemList;
+8 -8
View File
@@ -361,7 +361,7 @@ void Item::SaveToDB(SQLTransaction& trans)
trans->Append(stmt);
if ((uState == ITEM_CHANGED) && HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
if ((uState == ITEM_CHANGED) && HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED))
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GIFT_OWNER);
stmt->setUInt64(0, GetOwnerGUID().GetCounter());
@@ -376,7 +376,7 @@ void Item::SaveToDB(SQLTransaction& trans)
stmt->setUInt64(0, GetGUID().GetCounter());
trans->Append(stmt);
if (HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
if (HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED))
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GIFT);
stmt->setUInt64(0, GetGUID().GetCounter());
@@ -451,7 +451,7 @@ bool Item::LoadFromDB(ObjectGuid::LowType guid, ObjectGuid ownerGuid, Field* fie
// Remove bind flag for items vs NO_BIND set
if (IsSoulBound() && proto->GetBonding() == NO_BIND)
{
ApplyModFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_SOULBOUND, false);
ApplyModFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_SOULBOUND, false);
need_save = true;
}
@@ -1315,7 +1315,7 @@ bool Item::CanBeTransmogrified() const
if (proto->GetClass() == ITEM_CLASS_WEAPON && proto->GetSubClass() == ITEM_SUBCLASS_WEAPON_FISHING_POLE)
return false;
if (proto->GetFlags2() & ITEM_FLAGS_EXTRA_CANNOT_BE_TRANSMOG)
if (proto->GetFlags2() & ITEM_FLAG2_CANNOT_BE_TRANSMOG)
return false;
if (!HasStats())
@@ -1331,7 +1331,7 @@ bool Item::CanTransmogrify() const
if (!proto)
return false;
if (proto->GetFlags2() & ITEM_FLAGS_EXTRA_CANNOT_TRANSMOG)
if (proto->GetFlags2() & ITEM_FLAG2_CANNOT_TRANSMOG)
return false;
if (proto->GetQuality() == ITEM_QUALITY_LEGENDARY)
@@ -1344,7 +1344,7 @@ bool Item::CanTransmogrify() const
if (proto->GetClass() == ITEM_CLASS_WEAPON && proto->GetSubClass() == ITEM_SUBCLASS_WEAPON_FISHING_POLE)
return false;
if (proto->GetFlags2() & ITEM_FLAGS_EXTRA_CAN_TRANSMOG)
if (proto->GetFlags2() & ITEM_FLAG2_CAN_TRANSMOG)
return true;
if (!HasStats())
@@ -1405,7 +1405,7 @@ uint32 Item::GetSellPrice(ItemTemplate const* proto, bool& normalSellPrice)
{
normalSellPrice = true;
if (proto->GetFlags2() & ITEM_FLAGS_EXTRA_HAS_NORMAL_PRICE)
if (proto->GetFlags2() & ITEM_FLAG2_HAS_NORMAL_PRICE)
{
return proto->GetBuyPrice();
}
@@ -1524,7 +1524,7 @@ uint32 Item::GetSpecialPrice(ItemTemplate const* proto, uint32 minimumPrice /*=
{
uint32 cost = 0;
if (proto->GetFlags2() & ITEM_FLAGS_EXTRA_HAS_NORMAL_PRICE)
if (proto->GetFlags2() & ITEM_FLAG2_HAS_NORMAL_PRICE)
cost = proto->GetSellPrice();
else
{
+5 -5
View File
@@ -261,10 +261,10 @@ class Item : public Object
void SetOwnerGUID(ObjectGuid guid) { SetGuidValue(ITEM_FIELD_OWNER, guid); }
Player* GetOwner()const;
void SetBinding(bool val) { ApplyModFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_SOULBOUND, val); }
bool IsSoulBound() const { return HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_SOULBOUND); }
bool IsBoundAccountWide() const { return (GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_BIND_TO_ACCOUNT) != 0; }
bool IsBattlenetAccountBound() const { return (GetTemplate()->GetFlags2() & ITEM_FLAGS_EXTRA_BNET_ACCOUNT_BOUND) != 0; }
void SetBinding(bool val) { ApplyModFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_SOULBOUND, val); }
bool IsSoulBound() const { return HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_SOULBOUND); }
bool IsBoundAccountWide() const { return (GetTemplate()->GetFlags() & ITEM_FLAG_BIND_TO_ACCOUNT) != 0; }
bool IsBattlenetAccountBound() const { return (GetTemplate()->GetFlags2() & ITEM_FLAG2_BNET_ACCOUNT_BOUND) != 0; }
bool IsBindedNotWith(Player const* player) const;
bool IsBoundByEnchant() const;
virtual void SaveToDB(SQLTransaction& trans);
@@ -291,7 +291,7 @@ class Item : public Object
Bag* ToBag() { if (IsBag()) return reinterpret_cast<Bag*>(this); else return NULL; }
const Bag* ToBag() const { if (IsBag()) return reinterpret_cast<const Bag*>(this); else return NULL; }
bool IsLocked() const { return !HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_UNLOCKED); }
bool IsLocked() const { return !HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_UNLOCKED); }
bool IsBag() const { return GetTemplate()->GetInventoryType() == INVTYPE_BAG; }
bool IsCurrencyToken() const { return GetTemplate()->IsCurrencyToken(); }
bool IsNotEmptyBag() const;
@@ -89,7 +89,7 @@ void ItemTemplate::GetDamage(uint32 itemLevel, float& minDamage, float& maxDamag
store = &sItemDamageAmmoStore;
break;
case INVTYPE_2HWEAPON:
if (GetFlags2() & ITEM_FLAGS_EXTRA_CASTER_WEAPON)
if (GetFlags2() & ITEM_FLAG2_CASTER_WEAPON)
store = &sItemDamageTwoHandCasterStore;
else
store = &sItemDamageTwoHandStore;
@@ -117,7 +117,7 @@ void ItemTemplate::GetDamage(uint32 itemLevel, float& minDamage, float& maxDamag
case INVTYPE_WEAPON:
case INVTYPE_WEAPONMAINHAND:
case INVTYPE_WEAPONOFFHAND:
if (GetFlags2() & ITEM_FLAGS_EXTRA_CASTER_WEAPON)
if (GetFlags2() & ITEM_FLAG2_CASTER_WEAPON)
store = &sItemDamageOneHandCasterStore;
else
store = &sItemDamageOneHandStore;
+124 -85
View File
@@ -127,101 +127,140 @@ enum ItemBondingType
#define MAX_BIND_TYPE 6
/* /// @todo: Requiring actual cases in which using (an) item isn't allowed while shapeshifted. Else, this flag would need an implementation.
ITEM_PROTO_FLAG_USABLE_WHEN_SHAPESHIFTED = 0x00800000, // Item can be used in shapeshift forms */
enum ItemProtoFlags
{
ITEM_PROTO_FLAG_UNK1 = 0x00000001, // ?
ITEM_PROTO_FLAG_CONJURED = 0x00000002, // Conjured item
ITEM_PROTO_FLAG_OPENABLE = 0x00000004, // Item can be right clicked to open for loot
ITEM_PROTO_FLAG_HEROIC = 0x00000008, // Makes green "Heroic" text appear on item
ITEM_PROTO_FLAG_DEPRECATED = 0x00000010, // Cannot equip or use
ITEM_PROTO_FLAG_INDESTRUCTIBLE = 0x00000020, // Item can not be destroyed, except by using spell (item can be reagent for spell)
ITEM_PROTO_FLAG_UNK2 = 0x00000040, // ?
ITEM_PROTO_FLAG_NO_EQUIP_COOLDOWN = 0x00000080, // No default 30 seconds cooldown when equipped
ITEM_PROTO_FLAG_UNK3 = 0x00000100, // ?
ITEM_PROTO_FLAG_WRAPPER = 0x00000200, // Item can wrap other items
ITEM_PROTO_FLAG_UNK4 = 0x00000400, // ?
ITEM_PROTO_FLAG_PARTY_LOOT = 0x00000800, // Looting this item does not remove it from available loot
ITEM_PROTO_FLAG_REFUNDABLE = 0x00001000, // Item can be returned to vendor for its original cost (extended cost)
ITEM_PROTO_FLAG_CHARTER = 0x00002000, // Item is guild or arena charter
ITEM_PROTO_FLAG_UNK5 = 0x00004000, // Only readable items have this (but not all)
ITEM_PROTO_FLAG_UNK6 = 0x00008000, // ?
ITEM_PROTO_FLAG_UNK7 = 0x00010000, // ?
ITEM_PROTO_FLAG_UNK8 = 0x00020000, // ?
ITEM_PROTO_FLAG_PROSPECTABLE = 0x00040000, // Item can be prospected
ITEM_PROTO_FLAG_UNIQUE_EQUIPPED = 0x00080000, // You can only equip one of these
ITEM_PROTO_FLAG_UNK9 = 0x00100000, // ?
ITEM_PROTO_FLAG_USEABLE_IN_ARENA = 0x00200000, // Item can be used during arena match
ITEM_PROTO_FLAG_THROWABLE = 0x00400000, // Some Thrown weapons have it (and only Thrown) but not all
ITEM_PROTO_FLAG_USABLE_WHEN_SHAPESHIFTED = 0x00800000, // Item can be used in shapeshift forms
ITEM_PROTO_FLAG_UNK10 = 0x01000000, // ?
ITEM_PROTO_FLAG_SMART_LOOT = 0x02000000, // Profession recipes: can only be looted if you meet requirements and don't already know it
ITEM_PROTO_FLAG_NOT_USEABLE_IN_ARENA = 0x04000000, // Item cannot be used in arena
ITEM_PROTO_FLAG_BIND_TO_ACCOUNT = 0x08000000, // Item binds to account and can be sent only to your own characters
ITEM_PROTO_FLAG_TRIGGERED_CAST = 0x10000000, // Spell is cast with triggered flag
ITEM_PROTO_FLAG_MILLABLE = 0x20000000, // Item can be milled
ITEM_PROTO_FLAG_UNK11 = 0x40000000, // ?
ITEM_PROTO_FLAG_BOP_TRADEABLE = 0x80000000 // bound item that can be traded
};
ITEM_FLAG_USABLE_WHEN_SHAPESHIFTED = 0x00800000, // Item can be used in shapeshift forms */
// ITEM_FIELD_FLAGS
enum ItemFieldFlags
{
ITEM_FLAG_SOULBOUND = 0x00000001, // Item is soulbound and cannot be traded <<--
ITEM_FLAG_TRANSLATED = 0x00000002, // Item text will not read as garbage when player does not know the language
ITEM_FLAG_UNLOCKED = 0x00000004, // Item had lock but can be opened now
ITEM_FLAG_WRAPPED = 0x00000008, // Item is wrapped and contains another item
ITEM_FLAG_UNK2 = 0x00000010, // ?
ITEM_FLAG_UNK3 = 0x00000020, // ?
ITEM_FLAG_UNK4 = 0x00000040, // ?
ITEM_FLAG_UNK5 = 0x00000080, // ?
ITEM_FLAG_BOP_TRADEABLE = 0x00000100, // Allows trading soulbound items
ITEM_FLAG_READABLE = 0x00000200, // Opens text page when right clicked
ITEM_FLAG_UNK6 = 0x00000400, // ?
ITEM_FLAG_UNK7 = 0x00000800, // ?
ITEM_FLAG_REFUNDABLE = 0x00001000, // Item can be returned to vendor for its original cost (extended cost)
ITEM_FLAG_UNK8 = 0x00002000, // ?
ITEM_FLAG_UNK9 = 0x00004000, // ?
ITEM_FLAG_UNK10 = 0x00008000, // ?
ITEM_FLAG_UNK11 = 0x00010000, // ?
ITEM_FLAG_UNK12 = 0x00020000, // ?
ITEM_FLAG_UNK13 = 0x00040000, // ?
ITEM_FLAG_UNK14 = 0x00080000, // ?
ITEM_FLAG_UNK15 = 0x00100000, // ?
ITEM_FLAG_UNK16 = 0x00200000, // ?
ITEM_FLAG_UNK17 = 0x00400000, // ?
ITEM_FLAG_UNK18 = 0x00800000, // ?
ITEM_FLAG_UNK19 = 0x01000000, // ?
ITEM_FLAG_UNK20 = 0x02000000, // ?
ITEM_FLAG_UNK21 = 0x04000000, // ?
ITEM_FLAG_UNK22 = 0x08000000, // ?
ITEM_FLAG_UNK23 = 0x10000000, // ?
ITEM_FLAG_UNK24 = 0x20000000, // ?
ITEM_FLAG_UNK25 = 0x40000000, // ?
ITEM_FLAG_UNK26 = 0x80000000, // ?
ITEM_FIELD_FLAG_SOULBOUND = 0x00000001, // Item is soulbound and cannot be traded <<--
ITEM_FIELD_FLAG_TRANSLATED = 0x00000002, // Item text will not read as garbage when player does not know the language
ITEM_FIELD_FLAG_UNLOCKED = 0x00000004, // Item had lock but can be opened now
ITEM_FIELD_FLAG_WRAPPED = 0x00000008, // Item is wrapped and contains another item
ITEM_FIELD_FLAG_UNK2 = 0x00000010,
ITEM_FIELD_FLAG_UNK3 = 0x00000020,
ITEM_FIELD_FLAG_UNK4 = 0x00000040,
ITEM_FIELD_FLAG_UNK5 = 0x00000080,
ITEM_FIELD_FLAG_BOP_TRADEABLE = 0x00000100, // Allows trading soulbound items
ITEM_FIELD_FLAG_READABLE = 0x00000200, // Opens text page when right clicked
ITEM_FIELD_FLAG_UNK6 = 0x00000400,
ITEM_FIELD_FLAG_UNK7 = 0x00000800,
ITEM_FIELD_FLAG_REFUNDABLE = 0x00001000, // Item can be returned to vendor for its original cost (extended cost)
ITEM_FIELD_FLAG_UNK8 = 0x00002000,
ITEM_FIELD_FLAG_UNK9 = 0x00004000,
ITEM_FIELD_FLAG_UNK10 = 0x00008000,
ITEM_FIELD_FLAG_UNK11 = 0x00010000,
ITEM_FIELD_FLAG_UNK12 = 0x00020000,
ITEM_FIELD_FLAG_UNK13 = 0x00040000,
ITEM_FIELD_FLAG_UNK14 = 0x00080000,
ITEM_FIELD_FLAG_UNK15 = 0x00100000,
ITEM_FIELD_FLAG_UNK16 = 0x00200000,
ITEM_FIELD_FLAG_UNK17 = 0x00400000,
ITEM_FIELD_FLAG_UNK18 = 0x00800000,
ITEM_FIELD_FLAG_UNK19 = 0x01000000,
ITEM_FIELD_FLAG_UNK20 = 0x02000000,
ITEM_FIELD_FLAG_UNK21 = 0x04000000,
ITEM_FIELD_FLAG_UNK22 = 0x08000000,
ITEM_FIELD_FLAG_UNK23 = 0x10000000,
ITEM_FIELD_FLAG_UNK24 = 0x20000000,
ITEM_FIELD_FLAG_UNK25 = 0x40000000,
ITEM_FIELD_FLAG_UNK26 = 0x80000000,
ITEM_FLAG_MAIL_TEXT_MASK = ITEM_FLAG_READABLE | ITEM_FLAG_UNK13 | ITEM_FLAG_UNK14
ITEM_FIELD_FLAG_MAIL_TEXT_MASK = ITEM_FIELD_FLAG_READABLE | ITEM_FIELD_FLAG_UNK13 | ITEM_FIELD_FLAG_UNK14
};
enum ItemFlagsExtra
enum ItemFlags
{
ITEM_FLAGS_EXTRA_HORDE_ONLY = 0x00000001,
ITEM_FLAGS_EXTRA_ALLIANCE_ONLY = 0x00000002,
ITEM_FLAGS_EXTRA_EXT_COST_REQUIRES_GOLD = 0x00000004, // when item uses extended cost, gold is also required
ITEM_FLAGS_EXTRA_NEED_ROLL_DISABLED = 0x00000100,
ITEM_FLAGS_EXTRA_CASTER_WEAPON = 0x00000200,
ITEM_FLAGS_EXTRA_HAS_NORMAL_PRICE = 0x00004000,
ITEM_FLAGS_EXTRA_BNET_ACCOUNT_BOUND = 0x00020000,
ITEM_FLAGS_EXTRA_CANNOT_BE_TRANSMOG = 0x00200000,
ITEM_FLAGS_EXTRA_CANNOT_TRANSMOG = 0x00400000,
ITEM_FLAGS_EXTRA_CAN_TRANSMOG = 0x00800000,
ITEM_FLAG_UNK1 = 0x00000001,
ITEM_FLAG_CONJURED = 0x00000002, // Conjured item
ITEM_FLAG_OPENABLE = 0x00000004, // Item can be right clicked to open for loot
ITEM_FLAG_HEROIC = 0x00000008, // Makes green "Heroic" text appear on item
ITEM_FLAG_DEPRECATED = 0x00000010, // Cannot equip or use
ITEM_FLAG_INDESTRUCTIBLE = 0x00000020, // Item can not be destroyed, except by using spell (item can be reagent for spell)
ITEM_FLAG_UNK2 = 0x00000040,
ITEM_FLAG_NO_EQUIP_COOLDOWN = 0x00000080, // No default 30 seconds cooldown when equipped
ITEM_FLAG_UNK3 = 0x00000100,
ITEM_FLAG_WRAPPER = 0x00000200, // Item can wrap other items
ITEM_FLAG_UNK4 = 0x00000400,
ITEM_FLAG_PARTY_LOOT = 0x00000800, // Looting this item does not remove it from available loot
ITEM_FLAG_REFUNDABLE = 0x00001000, // Item can be returned to vendor for its original cost (extended cost)
ITEM_FLAG_CHARTER = 0x00002000, // Item is guild or arena charter
ITEM_FLAG_UNK5 = 0x00004000, // Only readable items have this (but not all)
ITEM_FLAG_UNK6 = 0x00008000,
ITEM_FLAG_UNK7 = 0x00010000,
ITEM_FLAG_UNK8 = 0x00020000,
ITEM_FLAG_PROSPECTABLE = 0x00040000, // Item can be prospected
ITEM_FLAG_UNIQUE_EQUIPPED = 0x00080000, // You can only equip one of these
ITEM_FLAG_UNK9 = 0x00100000,
ITEM_FLAG_USEABLE_IN_ARENA = 0x00200000, // Item can be used during arena match
ITEM_FLAG_THROWABLE = 0x00400000, // Some Thrown weapons have it (and only Thrown) but not all
ITEM_FLAG_USABLE_WHEN_SHAPESHIFTED = 0x00800000, // Item can be used in shapeshift forms
ITEM_FLAG_UNK10 = 0x01000000,
ITEM_FLAG_SMART_LOOT = 0x02000000, // Profession recipes: can only be looted if you meet requirements and don't already know it
ITEM_FLAG_NOT_USEABLE_IN_ARENA = 0x04000000, // Item cannot be used in arena
ITEM_FLAG_BIND_TO_ACCOUNT = 0x08000000, // Item binds to account and can be sent only to your own characters
ITEM_FLAG_TRIGGERED_CAST = 0x10000000, // Spell is cast with triggered flag
ITEM_FLAG_MILLABLE = 0x20000000, // Item can be milled
ITEM_FLAG_UNK11 = 0x40000000,
ITEM_FLAG_BOP_TRADEABLE = 0x80000000 // bound item that can be traded
};
enum ItemFlags2
{
ITEM_FLAG2_HORDE_ONLY = 0x00000001,
ITEM_FLAG2_ALLIANCE_ONLY = 0x00000002,
ITEM_FLAG2_EXT_COST_REQUIRES_GOLD = 0x00000004, // when item uses extended cost, gold is also required
ITEM_FLAG2_UNK1 = 0x00000008,
ITEM_FLAG2_UNK2 = 0x00000010,
ITEM_FLAG2_UNK3 = 0x00000020,
ITEM_FLAG2_UNK4 = 0x00000040,
ITEM_FLAG2_UNK5 = 0x00000080,
ITEM_FLAG2_NEED_ROLL_DISABLED = 0x00000100,
ITEM_FLAG2_CASTER_WEAPON = 0x00000200,
ITEM_FLAG2_UNK6 = 0x00000400,
ITEM_FLAG2_UNK7 = 0x00000800,
ITEM_FLAG2_UNK8 = 0x00001000,
ITEM_FLAG2_UNK9 = 0x00002000,
ITEM_FLAG2_HAS_NORMAL_PRICE = 0x00004000,
ITEM_FLAG2_UNK10 = 0x00008000,
ITEM_FLAG2_UNK11 = 0x00010000,
ITEM_FLAG2_BNET_ACCOUNT_BOUND = 0x00020000,
ITEM_FLAG2_UNK12 = 0x00040000,
ITEM_FLAG2_UNK13 = 0x00080000,
ITEM_FLAG2_UNK14 = 0x00100000,
ITEM_FLAG2_CANNOT_BE_TRANSMOG = 0x00200000,
ITEM_FLAG2_CANNOT_TRANSMOG = 0x00400000,
ITEM_FLAG2_CAN_TRANSMOG = 0x00800000,
ITEM_FLAG2_UNK15 = 0x01000000,
ITEM_FLAG2_UNK16 = 0x02000000,
ITEM_FLAG2_UNK17 = 0x04000000,
ITEM_FLAG2_UNK18 = 0x08000000,
ITEM_FLAG2_UNK19 = 0x10000000,
ITEM_FLAG2_UNK20 = 0x20000000,
ITEM_FLAG2_UNK21 = 0x40000000,
ITEM_FLAG2_CRAFTING_MATERIAL = 0x80000000
};
enum ItemFlags3
{
ITEM_FLAG3_IGNORE_ITEM_LEVEL_DELTAS = 0x080, // Ignore item level adjustments from PLAYER_FIELD_ITEM_LEVEL_DELTA
ITEM_FLAG3_IGNORE_PVP_ITEM_LEVEL_CAP = 0x100,
ITEM_FLAG3_HEIRLOOM_QUALITY = 0x200, // Item appears as having heirloom quality ingame regardless of its real quality (does not affect stat calculation)
ITEM_FLAG3_UNK1 = 0x00000001,
ITEM_FLAG3_UNK2 = 0x00000002,
ITEM_FLAG3_UNK3 = 0x00000004,
ITEM_FLAG3_UNK4 = 0x00000008,
ITEM_FLAG3_UNK5 = 0x00000010,
ITEM_FLAG3_UNK6 = 0x00000020,
ITEM_FLAG3_UNK7 = 0x00000040,
ITEM_FLAG3_IGNORE_ITEM_LEVEL_DELTAS = 0x00000080, // Ignore item level adjustments from PLAYER_FIELD_ITEM_LEVEL_DELTA
ITEM_FLAG3_IGNORE_PVP_ITEM_LEVEL_CAP = 0x00000100,
ITEM_FLAG3_HEIRLOOM_QUALITY = 0x00000200, // Item appears as having heirloom quality ingame regardless of its real quality (does not affect stat calculation)
ITEM_FLAG3_UNK8 = 0x00000400,
ITEM_FLAG3_UNK9 = 0x00000800,
ITEM_FLAG3_DOESNT_APPEAR_IN_GUILD_NEWS = 0x00001000, // Item is not included in the guild news panel
ITEM_FLAG3_UNK10 = 0x00002000,
ITEM_FLAG3_UNK11 = 0x00004000,
ITEM_FLAG3_UNK12 = 0x00008000,
ITEM_FLAG3_UNK13 = 0x00010000,
ITEM_FLAG3_UNK14 = 0x00020000,
ITEM_FLAG3_UNK15 = 0x00040000
};
enum ItemFlagsCustom
@@ -710,7 +749,7 @@ struct ItemTemplate
bool IsPotion() const { return GetClass() == ITEM_CLASS_CONSUMABLE && GetSubClass() == ITEM_SUBCLASS_POTION; }
bool IsVellum() const { return GetClass() == ITEM_CLASS_TRADE_GOODS && GetSubClass() == ITEM_SUBCLASS_ENCHANTMENT; }
bool IsConjuredConsumable() const { return GetClass() == ITEM_CLASS_CONSUMABLE && (GetFlags() & ITEM_PROTO_FLAG_CONJURED); }
bool IsConjuredConsumable() const { return GetClass() == ITEM_CLASS_CONSUMABLE && (GetFlags() & ITEM_FLAG_CONJURED); }
bool IsRangedWeapon() const
{
+9 -9
View File
@@ -11417,10 +11417,10 @@ InventoryResult Player::CanUseItem(ItemTemplate const* proto) const
if (!proto)
return EQUIP_ERR_ITEM_NOT_FOUND;
if ((proto->GetFlags2() & ITEM_FLAGS_EXTRA_HORDE_ONLY) && GetTeam() != HORDE)
if ((proto->GetFlags2() & ITEM_FLAG2_HORDE_ONLY) && GetTeam() != HORDE)
return EQUIP_ERR_CANT_EQUIP_EVER;
if ((proto->GetFlags2() & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) && GetTeam() != ALLIANCE)
if ((proto->GetFlags2() & ITEM_FLAG2_ALLIANCE_ONLY) && GetTeam() != ALLIANCE)
return EQUIP_ERR_CANT_EQUIP_EVER;
if ((proto->GetAllowableClass() & getClassMask()) == 0 || (proto->GetAllowableRace() & getRaceMask()) == 0)
@@ -12027,7 +12027,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
DestroyItem(slot, i, update);
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED))
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GIFT);
@@ -12100,7 +12100,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
// Delete rolled money / loot from db.
// MUST be done before RemoveFromWorld() or GetTemplate() fails
if (ItemTemplate const* pTmp = pItem->GetTemplate())
if (pTmp->GetFlags() & ITEM_PROTO_FLAG_OPENABLE)
if (pTmp->GetFlags() & ITEM_FLAG_OPENABLE)
pItem->ItemContainerDeleteLootMoneyAndLootItemsFromDB();
if (IsInWorld() && update)
@@ -17773,7 +17773,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
remove = true;
}
// "Conjured items disappear if you are logged out for more than 15 minutes"
else if (timeDiff > 15 * MINUTE && proto->GetFlags() & ITEM_PROTO_FLAG_CONJURED)
else if (timeDiff > 15 * MINUTE && proto->GetFlags() & ITEM_FLAG_CONJURED)
{
TC_LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (%s, name: '%s', diff: %u) has conjured item (%s, entry: %u) with expired lifetime (15 minutes). Deleting item.",
GetGUID().ToString().c_str(), GetName().c_str(), timeDiff, item->GetGUID().ToString().c_str(), item->GetEntry());
@@ -21207,7 +21207,7 @@ inline bool Player::_StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 c
if (!bStore)
AutoUnequipOffhandIfNeed();
if (pProto->GetFlags() & ITEM_PROTO_FLAG_REFUNDABLE && crItem->ExtendedCost && pProto->GetMaxStackSize() == 1)
if (pProto->GetFlags() & ITEM_FLAG_REFUNDABLE && crItem->ExtendedCost && pProto->GetMaxStackSize() == 1)
{
it->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE);
it->SetRefundRecipient(GetGUID());
@@ -21399,7 +21399,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin
return false;
}
if (!IsGameMaster() && ((pProto->GetFlags2() & ITEM_FLAGS_EXTRA_HORDE_ONLY && GetTeam() == ALLIANCE) || (pProto->GetFlags2() == ITEM_FLAGS_EXTRA_ALLIANCE_ONLY && GetTeam() == HORDE)))
if (!IsGameMaster() && ((pProto->GetFlags2() & ITEM_FLAG2_HORDE_ONLY && GetTeam() == ALLIANCE) || (pProto->GetFlags2() == ITEM_FLAG2_ALLIANCE_ONLY && GetTeam() == HORDE)))
return false;
Creature* creature = GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
@@ -22639,7 +22639,7 @@ void Player::SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint3
void Player::ApplyEquipCooldown(Item* pItem)
{
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_PROTO_FLAG_NO_EQUIP_COOLDOWN))
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_NO_EQUIP_COOLDOWN))
return;
ItemTemplate const* proto = pItem->GetTemplate();
@@ -24809,7 +24809,7 @@ InventoryResult Player::CanEquipUniqueItem(Item* pItem, uint8 eslot, uint32 limi
InventoryResult Player::CanEquipUniqueItem(ItemTemplate const* itemProto, uint8 except_slot, uint32 limit_count) const
{
// check unique-equipped on item
if (itemProto->GetFlags() & ITEM_PROTO_FLAG_UNIQUE_EQUIPPED)
if (itemProto->GetFlags() & ITEM_FLAG_UNIQUE_EQUIPPED)
{
// there is an equip limit on this item
if (HasItemOrGemWithIdEquipped(itemProto->GetId(), 1, except_slot))
+1 -1
View File
@@ -2328,7 +2328,7 @@ void FillDisenchantFields(uint32* disenchantID, uint32* requiredDisenchantSkill,
{
*disenchantID = 0;
*(int32*)requiredDisenchantSkill = -1;
if ((itemTemplate.GetFlags() & (ITEM_PROTO_FLAG_CONJURED | ITEM_PROTO_FLAG_UNK6)) ||
if ((itemTemplate.GetFlags() & (ITEM_FLAG_CONJURED | ITEM_FLAG_UNK6)) ||
itemTemplate.GetBonding() == BIND_QUEST_ITEM || itemTemplate.GetArea() || itemTemplate.GetMap() ||
itemTemplate.GetMaxStackSize() > 1 ||
itemTemplate.GetQuality() < ITEM_QUALITY_UNCOMMON || itemTemplate.GetQuality() > ITEM_QUALITY_EPIC ||
+1 -1
View File
@@ -1136,7 +1136,7 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
if (item->DisenchantID && m_maxEnchantingLevel >= item->RequiredDisenchantSkill)
r->rollVoteMask |= ROLL_FLAG_TYPE_DISENCHANT;
if (item->GetFlags2() & ITEM_FLAGS_EXTRA_NEED_ROLL_DISABLED)
if (item->GetFlags2() & ITEM_FLAG2_NEED_ROLL_DISABLED)
r->rollVoteMask &= ~ROLL_FLAG_TYPE_NEED;
loot->items[itemSlot].is_blocked = true;
@@ -174,7 +174,7 @@ void WorldSession::HandleAuctionSellItem(WorldPackets::AuctionHouse::AuctionSell
}
if (sAuctionMgr->GetAItem(item->GetGUID().GetCounter()) || !item->CanBeTraded() || item->IsNotEmptyBag() ||
item->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
item->GetTemplate()->GetFlags() & ITEM_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
item->GetCount() < packetItem.UseCount)
{
SendAuctionCommandResult(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
+6 -6
View File
@@ -295,7 +295,7 @@ void WorldSession::HandleDestroyItemOpcode(WorldPackets::Item::DestroyItem& dest
return;
}
if (item->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_INDESTRUCTIBLE)
if (item->GetTemplate()->GetFlags() & ITEM_FLAG_INDESTRUCTIBLE)
{
_player->SendEquipError(EQUIP_ERR_DROP_BOUND_ITEM, NULL, NULL);
return;
@@ -591,8 +591,8 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid)
continue;
// Only display items in vendor lists for the team the player is on
if ((itemTemplate->GetFlags2() & ITEM_FLAGS_EXTRA_HORDE_ONLY && _player->GetTeam() == ALLIANCE) ||
(itemTemplate->GetFlags2() & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY && _player->GetTeam() == HORDE))
if ((itemTemplate->GetFlags2() & ITEM_FLAG2_HORDE_ONLY && _player->GetTeam() == ALLIANCE) ||
(itemTemplate->GetFlags2() & ITEM_FLAG2_ALLIANCE_ONLY && _player->GetTeam() == HORDE))
continue;
// Items sold out are not displayed in list
@@ -750,7 +750,7 @@ void WorldSession::HandleWrapItem(WorldPackets::Item::WrapItem& packet)
return;
}
if (!(gift->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_WRAPPER)) // cheating: non-wrapper wrapper
if (!(gift->GetTemplate()->GetFlags() & ITEM_FLAG_WRAPPER)) // cheating: non-wrapper wrapper
{
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, NULL);
return;
@@ -840,7 +840,7 @@ void WorldSession::HandleWrapItem(WorldPackets::Item::WrapItem& packet)
}
item->SetGuidValue(ITEM_FIELD_GIFTCREATOR, _player->GetGUID());
item->SetUInt32Value(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED);
item->SetUInt32Value(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED);
item->SetState(ITEM_CHANGED, _player);
if (item->GetState() == ITEM_NEW) // save new item, to have alway for `character_gifts` record in `item_instance`
@@ -947,7 +947,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
ItemTemplate const* iGemProto = Gems[i]->GetTemplate();
// unique item (for new and already placed bit removed enchantments
if (iGemProto->GetFlags() & ITEM_PROTO_FLAG_UNIQUE_EQUIPPED)
if (iGemProto->GetFlags() & ITEM_FLAG_UNIQUE_EQUIPPED)
{
for (int j = 0; j < MAX_GEM_SOCKETS; ++j)
{
+2 -2
View File
@@ -325,7 +325,7 @@ void WorldSession::DoLootRelease(ObjectGuid lguid)
ItemTemplate const* proto = pItem->GetTemplate();
// destroy only 5 items from stack in case prospecting and milling
if (proto->GetFlags() & (ITEM_PROTO_FLAG_PROSPECTABLE | ITEM_PROTO_FLAG_MILLABLE))
if (proto->GetFlags() & (ITEM_FLAG_PROSPECTABLE | ITEM_FLAG_MILLABLE))
{
pItem->m_lootGenerated = false;
pItem->loot.clear();
@@ -341,7 +341,7 @@ void WorldSession::DoLootRelease(ObjectGuid lguid)
else
{
// Only delete item if no loot or money (unlooted loot is saved to db) or if it isn't an openable item
if (pItem->loot.isLooted() || !(proto->GetFlags() & ITEM_PROTO_FLAG_OPENABLE))
if (pItem->loot.isLooted() || !(proto->GetFlags() & ITEM_FLAG_OPENABLE))
player->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true);
}
return; // item can be looted only single player
+4 -4
View File
@@ -196,7 +196,7 @@ void WorldSession::HandleSendMail(WorldPackets::Mail::SendMail& packet)
if (Item* item = player->GetItemByGuid(att.ItemGUID))
{
ItemTemplate const* itemProto = item->GetTemplate();
if (!itemProto || !(itemProto->GetFlags() & ITEM_PROTO_FLAG_BIND_TO_ACCOUNT))
if (!itemProto || !(itemProto->GetFlags() & ITEM_FLAG_BIND_TO_ACCOUNT))
{
accountBound = false;
break;
@@ -250,13 +250,13 @@ void WorldSession::HandleSendMail(WorldPackets::Mail::SendMail& packet)
}
}
if (item->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION))
if (item->GetTemplate()->GetFlags() & ITEM_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION))
{
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_MAIL_BOUND_ITEM);
return;
}
if (packet.Info.Cod && item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
if (packet.Info.Cod && item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED))
{
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_CANT_SEND_WRAPPED_COD);
return;
@@ -636,7 +636,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPackets::Mail::MailCreateTextIt
if (m->messageType == MAIL_NORMAL)
bodyItem->SetGuidValue(ITEM_FIELD_CREATOR, ObjectGuid::Create<HighGuid::Player>(m->sender));
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_MAIL_TEXT_MASK);
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_MAIL_TEXT_MASK);
ItemPosCountVec dest;
uint8 msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, bodyItem, false);
+4 -4
View File
@@ -81,14 +81,14 @@ void WorldSession::HandleUseItemOpcode(WorldPackets::Spells::UseItem& packet)
}
// only allow conjured consumable, bandage, poisons (all should have the 2^21 item flag set in DB)
if (proto->GetClass() == ITEM_CLASS_CONSUMABLE && !(proto->GetFlags() & ITEM_PROTO_FLAG_USEABLE_IN_ARENA) && user->InArena())
if (proto->GetClass() == ITEM_CLASS_CONSUMABLE && !(proto->GetFlags() & ITEM_FLAG_USEABLE_IN_ARENA) && user->InArena())
{
user->SendEquipError(EQUIP_ERR_NOT_DURING_ARENA_MATCH, item, NULL);
return;
}
// don't allow items banned in arena
if (proto->GetFlags() & ITEM_PROTO_FLAG_NOT_USEABLE_IN_ARENA && user->InArena())
if (proto->GetFlags() & ITEM_FLAG_NOT_USEABLE_IN_ARENA && user->InArena())
{
user->SendEquipError(EQUIP_ERR_NOT_DURING_ARENA_MATCH, item, NULL);
return;
@@ -153,7 +153,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPackets::Spells::OpenItem& packet)
}
// Verify that the bag is an actual bag or wrapped item that can be used "normally"
if (!(proto->GetFlags() & ITEM_PROTO_FLAG_OPENABLE) && !item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
if (!(proto->GetFlags() & ITEM_FLAG_OPENABLE) && !item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED))
{
player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, NULL);
TC_LOG_ERROR("network", "Possible hacking attempt: Player %s [%s] tried to open item [%s, entry: %u] which is not openable!",
@@ -182,7 +182,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPackets::Spells::OpenItem& packet)
}
}
if (item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))// wrapped?
if (item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED))// wrapped?
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_GIFT_BY_ITEM);
+2 -2
View File
@@ -67,7 +67,7 @@ void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
tradeItem.EntryID = item->GetEntry();
tradeItem.StackCount = item->GetCount();
tradeItem.GiftCreator = item->GetGuidValue(ITEM_FIELD_GIFTCREATOR);
if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED))
{
tradeItem.Unwrapped = boost::in_place();
@@ -76,7 +76,7 @@ void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
tradeItem.Unwrapped->OnUseEnchantmentID = item->GetEnchantmentId(USE_ENCHANTMENT_SLOT);
tradeItem.Unwrapped->Creator = item->GetGuidValue(ITEM_FIELD_CREATOR);
tradeItem.Unwrapped->Charges = item->GetSpellCharges();
tradeItem.Unwrapped->Lock = item->GetTemplate()->GetLockID() && !item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_UNLOCKED);
tradeItem.Unwrapped->Lock = item->GetTemplate()->GetLockID() && !item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_UNLOCKED);
tradeItem.Unwrapped->MaxDurability = item->GetUInt32Value(ITEM_FIELD_MAXDURABILITY);
tradeItem.Unwrapped->Durability = item->GetUInt32Value(ITEM_FIELD_DURABILITY);
+8 -8
View File
@@ -365,7 +365,7 @@ LootItem::LootItem(LootStoreItem const& li)
conditions = li.conditions;
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemid);
freeforall = proto && (proto->GetFlags() & ITEM_PROTO_FLAG_PARTY_LOOT);
freeforall = proto && (proto->GetFlags() & ITEM_FLAG_PARTY_LOOT);
follow_loot_rules = proto && (proto->FlagsCu & ITEM_FLAGS_CU_FOLLOW_LOOT_RULES);
needs_quest = li.needs_quest;
@@ -392,14 +392,14 @@ bool LootItem::AllowedForPlayer(Player const* player) const
return false;
// not show loot for players without profession or those who already know the recipe
if ((pProto->GetFlags() & ITEM_PROTO_FLAG_SMART_LOOT) && (!player->HasSkill(pProto->GetRequiredSkill()) || player->HasSpell(pProto->Effects[1]->SpellID)))
if ((pProto->GetFlags() & ITEM_FLAG_SMART_LOOT) && (!player->HasSkill(pProto->GetRequiredSkill()) || player->HasSpell(pProto->Effects[1]->SpellID)))
return false;
// not show loot for not own team
if ((pProto->GetFlags2() & ITEM_FLAGS_EXTRA_HORDE_ONLY) && player->GetTeam() != HORDE)
if ((pProto->GetFlags2() & ITEM_FLAG2_HORDE_ONLY) && player->GetTeam() != HORDE)
return false;
if ((pProto->GetFlags2() & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) && player->GetTeam() != ALLIANCE)
if ((pProto->GetFlags2() & ITEM_FLAG2_ALLIANCE_ONLY) && player->GetTeam() != ALLIANCE)
return false;
// check quest requirements
@@ -447,7 +447,7 @@ void Loot::AddItem(LootStoreItem const& item)
// non-conditional one-player only items are counted here,
// free for all items are counted in FillFFALoot(),
// non-ffa conditionals are counted in FillNonQuestNonFFAConditionalLoot()
if (!item.needs_quest && item.conditions.empty() && !(proto->GetFlags() & ITEM_PROTO_FLAG_PARTY_LOOT))
if (!item.needs_quest && item.conditions.empty() && !(proto->GetFlags() & ITEM_FLAG_PARTY_LOOT))
++unlootedCount;
}
}
@@ -1651,7 +1651,7 @@ void LoadLootTemplates_Item()
// remove real entries and check existence loot
ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
if (lootIdSet.find(itr->second.GetId()) != lootIdSet.end() && itr->second.GetFlags() & ITEM_PROTO_FLAG_OPENABLE)
if (lootIdSet.find(itr->second.GetId()) != lootIdSet.end() && itr->second.GetFlags() & ITEM_FLAG_OPENABLE)
lootIdSet.erase(itr->second.GetId());
// output error for any still listed (not referenced from appropriate table) ids
@@ -1676,7 +1676,7 @@ void LoadLootTemplates_Milling()
ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
{
if (!(itr->second.GetFlags() & ITEM_PROTO_FLAG_MILLABLE))
if (!(itr->second.GetFlags() & ITEM_FLAG_MILLABLE))
continue;
if (lootIdSet.find(itr->second.GetId()) != lootIdSet.end())
@@ -1739,7 +1739,7 @@ void LoadLootTemplates_Prospecting()
ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr)
{
if (!(itr->second.GetFlags() & ITEM_PROTO_FLAG_PROSPECTABLE))
if (!(itr->second.GetFlags() & ITEM_FLAG_PROSPECTABLE))
continue;
if (lootIdSet.find(itr->second.GetId()) != lootIdSet.end())
+5 -5
View File
@@ -4585,7 +4585,7 @@ void Spell::TakeReagents()
ItemTemplate const* castItemTemplate = m_CastItem ? m_CastItem->GetTemplate() : NULL;
// do not take reagents for these item casts
if (castItemTemplate && castItemTemplate->GetFlags() & ITEM_PROTO_FLAG_TRIGGERED_CAST)
if (castItemTemplate && castItemTemplate->GetFlags() & ITEM_FLAG_TRIGGERED_CAST)
return;
Player* p_caster = m_caster->ToPlayer();
@@ -6016,7 +6016,7 @@ SpellCastResult Spell::CheckItems()
}
// do not take reagents for these item casts
if (!(m_CastItem && m_CastItem->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_TRIGGERED_CAST))
if (!(m_CastItem && m_CastItem->GetTemplate()->GetFlags() & ITEM_FLAG_TRIGGERED_CAST))
{
bool checkReagents = !(_triggeredCastFlags & TRIGGERED_IGNORE_POWER_AND_REAGENT_COST) && !player->CanNoReagentCast(m_spellInfo);
// Not own traded item (in trader trade slot) requires reagents even if triggered spell
@@ -6143,7 +6143,7 @@ SpellCastResult Spell::CheckItems()
if (m_targets.GetItemTarget()->GetOwner() != m_caster)
return SPELL_FAILED_NOT_TRADEABLE;
// do not allow to enchant vellum from scroll made by vellum-prevent exploit
if (m_CastItem && m_CastItem->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_TRIGGERED_CAST)
if (m_CastItem && m_CastItem->GetTemplate()->GetFlags() & ITEM_FLAG_TRIGGERED_CAST)
return SPELL_FAILED_TOTEM_CATEGORY;
ItemPosCountVec dest;
InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, effect->ItemType, 1);
@@ -6266,7 +6266,7 @@ SpellCastResult Spell::CheckItems()
if (!m_targets.GetItemTarget())
return SPELL_FAILED_CANT_BE_PROSPECTED;
//ensure item is a prospectable ore
if (!(m_targets.GetItemTarget()->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_PROSPECTABLE))
if (!(m_targets.GetItemTarget()->GetTemplate()->GetFlags() & ITEM_FLAG_PROSPECTABLE))
return SPELL_FAILED_CANT_BE_PROSPECTED;
//prevent prospecting in trade slot
if (m_targets.GetItemTarget()->GetOwnerGUID() != m_caster->GetGUID())
@@ -6289,7 +6289,7 @@ SpellCastResult Spell::CheckItems()
if (!m_targets.GetItemTarget())
return SPELL_FAILED_CANT_BE_MILLED;
//ensure item is a millable herb
if (!(m_targets.GetItemTarget()->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_MILLABLE))
if (!(m_targets.GetItemTarget()->GetTemplate()->GetFlags() & ITEM_FLAG_MILLABLE))
return SPELL_FAILED_CANT_BE_MILLED;
//prevent milling in trade slot
if (m_targets.GetItemTarget()->GetOwnerGUID() != m_caster->GetGUID())
+4 -4
View File
@@ -1907,7 +1907,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
if (gameObjTarget)
SendLoot(guid, LOOT_SKINNING);
else if (itemTarget)
itemTarget->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_UNLOCKED);
itemTarget->SetFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_UNLOCKED);
// not allow use skill grow at item base open
if (!m_CastItem && skillId != SKILL_NONE)
@@ -2544,7 +2544,7 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
else
{
// do not increase skill if vellum used
if (!(m_CastItem && m_CastItem->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_TRIGGERED_CAST))
if (!(m_CastItem && m_CastItem->GetTemplate()->GetFlags() & ITEM_FLAG_TRIGGERED_CAST))
player->UpdateCraftSkill(m_spellInfo->Id);
uint32 enchant_id = effectInfo->MiscValue;
@@ -4981,7 +4981,7 @@ void Spell::EffectProspecting(SpellEffIndex /*effIndex*/)
if (!player)
return;
if (!itemTarget || !(itemTarget->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_PROSPECTABLE))
if (!itemTarget || !(itemTarget->GetTemplate()->GetFlags() & ITEM_FLAG_PROSPECTABLE))
return;
if (itemTarget->GetCount() < 5)
@@ -5006,7 +5006,7 @@ void Spell::EffectMilling(SpellEffIndex /*effIndex*/)
if (!player)
return;
if (!itemTarget || !(itemTarget->GetTemplate()->GetFlags() & ITEM_PROTO_FLAG_MILLABLE))
if (!itemTarget || !(itemTarget->GetTemplate()->GetFlags() & ITEM_FLAG_MILLABLE))
return;
if (itemTarget->GetCount() < 5)