diff options
Diffstat (limited to 'src/server/game/Entities/Item')
| -rw-r--r-- | src/server/game/Entities/Item/Item.cpp | 35 | ||||
| -rw-r--r-- | src/server/game/Entities/Item/Item.h | 3 | ||||
| -rw-r--r-- | src/server/game/Entities/Item/ItemDefines.h | 149 | ||||
| -rw-r--r-- | src/server/game/Entities/Item/ItemTemplate.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Entities/Item/ItemTemplate.h | 3 |
5 files changed, 91 insertions, 103 deletions
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index a146d3f0b58..847c3c47c79 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -275,8 +275,6 @@ Item::Item() m_objectType |= TYPEMASK_ITEM; m_objectTypeId = TYPEID_ITEM; - m_updateFlag = 0; - m_valuesCount = ITEM_END; _dynamicValuesCount = ITEM_DYNAMIC_END; m_slot = 0; @@ -316,14 +314,8 @@ bool Item::Create(ObjectGuid::LowType guidlow, uint32 itemId, Player const* owne SetUInt32Value(ITEM_FIELD_DURABILITY, itemProto->MaxDurability); for (std::size_t i = 0; i < itemProto->Effects.size(); ++i) - { if (i < 5) SetSpellCharges(i, itemProto->Effects[i]->Charges); - if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemProto->Effects[i]->SpellID)) - if (owner && spellInfo->HasEffect(SPELL_EFFECT_GIVE_ARTIFACT_POWER)) - if (uint32 artifactKnowledgeLevel = sWorld->getIntConfig(CONFIG_CURRENCY_START_ARTIFACT_KNOWLEDGE)) - SetModifier(ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL, artifactKnowledgeLevel + 1); - } SetUInt32Value(ITEM_FIELD_DURATION, itemProto->GetDuration()); SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, 0); @@ -1709,7 +1701,7 @@ bool Item::HasStats() const ItemTemplate const* proto = GetTemplate(); Player const* owner = GetOwner(); for (uint8 i = 0; i < MAX_ITEM_PROTO_STATS; ++i) - if ((owner ? GetItemStatValue(i, owner) : proto->GetItemStatValue(i)) != 0) + if ((owner ? GetItemStatValue(i, owner) : proto->GetItemStatAllocation(i)) != 0) return true; return false; @@ -1721,7 +1713,7 @@ bool Item::HasStats(WorldPackets::Item::ItemInstance const& itemInstance, BonusD return true; for (uint8 i = 0; i < MAX_ITEM_PROTO_STATS; ++i) - if (bonus->ItemStatValue[i] != 0) + if (bonus->ItemStatAllocation[i] != 0) return true; return false; @@ -2231,9 +2223,9 @@ uint32 Item::GetItemLevel(ItemTemplate const* itemTemplate, BonusData const& bon else level = std::min(std::max(int32(level), ssd->MinLevel), ssd->MaxLevel); - if (SandboxScalingEntry const* sandbox = sSandboxScalingStore.LookupEntry(bonusData.SandboxScalingId)) - if ((sandbox->Flags & 2 || sandbox->MinLevel || sandbox->MaxLevel) && !(sandbox->Flags & 4)) - level = std::min(std::max(int32(level), sandbox->MinLevel), sandbox->MaxLevel); + if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(bonusData.ContentTuningId)) + if ((contentTuning->Flags & 2 || contentTuning->MinLevel || contentTuning->MaxLevel) && !(contentTuning->Flags & 4)) + level = std::min(std::max(int32(level), contentTuning->MinLevel), contentTuning->MaxLevel); if (uint32 heirloomIlvl = uint32(sDB2Manager.GetCurveValueAt(ssd->PlayerLevelToItemLevelCurveID, level))) itemLevel = heirloomIlvl; @@ -2276,7 +2268,7 @@ int32 Item::GetItemStatValue(uint32 index, Player const* owner) const return int32(std::floor(statValue + 0.5f)); } - return _bonusData.ItemStatValue[index]; + return 0; } ItemDisenchantLootEntry const* Item::GetDisenchantLoot(Player const* owner) const @@ -2565,8 +2557,6 @@ void Item::GiveArtifactXp(uint64 amount, Item* sourceItem, uint32 artifactCatego uint32 artifactKnowledgeLevel = 1; if (sourceItem && sourceItem->GetModifier(ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL)) artifactKnowledgeLevel = sourceItem->GetModifier(ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL); - else if (artifactCategoryId == ARTIFACT_CATEGORY_PRIMARY) - artifactKnowledgeLevel = sWorld->getIntConfig(CONFIG_CURRENCY_START_ARTIFACT_KNOWLEDGE) + 1; if (GtArtifactKnowledgeMultiplierEntry const* artifactKnowledge = sArtifactKnowledgeMultiplierGameTable.GetRow(artifactKnowledgeLevel)) amount = uint64(amount * artifactKnowledge->Multiplier); @@ -2598,9 +2588,9 @@ void Item::SetFixedLevel(uint8 level) { level = std::min(std::max(int32(level), ssd->MinLevel), ssd->MaxLevel); - if (SandboxScalingEntry const* sandbox = sSandboxScalingStore.LookupEntry(_bonusData.SandboxScalingId)) - if ((sandbox->Flags & 2 || sandbox->MinLevel || sandbox->MaxLevel) && !(sandbox->Flags & 4)) - level = std::min(std::max(int32(level), sandbox->MinLevel), sandbox->MaxLevel); + if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(_bonusData.ContentTuningId)) + if ((contentTuning->Flags & 2 || contentTuning->MinLevel || contentTuning->MaxLevel) && !(contentTuning->Flags & 4)) + level = std::min(std::max(int32(level), contentTuning->MinLevel), contentTuning->MaxLevel); SetModifier(ITEM_MODIFIER_SCALING_STAT_DISTRIBUTION_FIXED_LEVEL, level); } @@ -2625,9 +2615,6 @@ void BonusData::Initialize(ItemTemplate const* proto) ItemStatType[i] = proto->GetItemStatType(i); for (uint32 i = 0; i < MAX_ITEM_PROTO_STATS; ++i) - ItemStatValue[i] = proto->GetItemStatValue(i); - - for (uint32 i = 0; i < MAX_ITEM_PROTO_STATS; ++i) ItemStatAllocation[i] = proto->GetItemStatAllocation(i); for (uint32 i = 0; i < MAX_ITEM_PROTO_STATS; ++i) @@ -2646,7 +2633,7 @@ void BonusData::Initialize(ItemTemplate const* proto) AppearanceModID = 0; RepairCostMultiplier = 1.0f; ScalingStatDistribution = proto->GetScalingStatDistribution(); - SandboxScalingId = 0; + ContentTuningId = 0; RelicType = -1; HasItemLevelBonus = false; HasFixedLevel = false; @@ -2734,7 +2721,7 @@ void BonusData::AddBonus(uint32 type, int32 const (&values)[3]) if (values[1] < _state.ScalingStatDistributionPriority) { ScalingStatDistribution = static_cast<uint32>(values[0]); - SandboxScalingId = static_cast<uint32>(values[2]); + ContentTuningId = static_cast<uint32>(values[2]); _state.ScalingStatDistributionPriority = values[1]; HasFixedLevel = type == ITEM_BONUS_SCALING_STAT_DISTRIBUTION_FIXED; } diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h index a51415abcbb..6ee784c8d7d 100644 --- a/src/server/game/Entities/Item/Item.h +++ b/src/server/game/Entities/Item/Item.h @@ -78,7 +78,6 @@ struct BonusData int32 ItemLevelBonus; int32 RequiredLevel; int32 ItemStatType[MAX_ITEM_PROTO_STATS]; - int32 ItemStatValue[MAX_ITEM_PROTO_STATS]; int32 ItemStatAllocation[MAX_ITEM_PROTO_STATS]; float ItemStatSocketCostMultiplier[MAX_ITEM_PROTO_STATS]; uint32 SocketColor[MAX_ITEM_PROTO_SOCKETS]; @@ -86,7 +85,7 @@ struct BonusData uint32 AppearanceModID; float RepairCostMultiplier; uint32 ScalingStatDistribution; - uint32 SandboxScalingId; + uint32 ContentTuningId; uint32 DisenchantLootId; uint32 GemItemLevelBonus[MAX_ITEM_PROTO_SOCKETS]; int32 GemRelicType[MAX_ITEM_PROTO_SOCKETS]; diff --git a/src/server/game/Entities/Item/ItemDefines.h b/src/server/game/Entities/Item/ItemDefines.h index 107a89c6152..6b74a600d50 100644 --- a/src/server/game/Entities/Item/ItemDefines.h +++ b/src/server/game/Entities/Item/ItemDefines.h @@ -51,79 +51,82 @@ enum InventoryResult : uint8 EQUIP_ERR_TOO_FEW_TO_SPLIT = 26, // Tried to split more than number in stack. EQUIP_ERR_SPLIT_FAILED = 27, // Couldn't split those items. EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC = 28, // Missing reagent - EQUIP_ERR_NOT_ENOUGH_MONEY = 29, // You don't have enough money. - EQUIP_ERR_NOT_A_BAG = 30, // Not a bag. - EQUIP_ERR_DESTROY_NONEMPTY_BAG = 31, // You can only do that with empty bags. - EQUIP_ERR_NOT_OWNER = 32, // You don't own that item. - EQUIP_ERR_ONLY_ONE_QUIVER = 33, // You can only equip one quiver. - EQUIP_ERR_NO_BANK_SLOT = 34, // You must purchase that bag slot first - EQUIP_ERR_NO_BANK_HERE = 35, // You are too far away from a bank. - EQUIP_ERR_ITEM_LOCKED = 36, // Item is locked. - EQUIP_ERR_GENERIC_STUNNED = 37, // You are stunned - EQUIP_ERR_PLAYER_DEAD = 38, // You can't do that when you're dead. - EQUIP_ERR_CLIENT_LOCKED_OUT = 39, // You can't do that right now. - EQUIP_ERR_INTERNAL_BAG_ERROR = 40, // Internal Bag Error - EQUIP_ERR_ONLY_ONE_BOLT = 41, // You can only equip one quiver. - EQUIP_ERR_ONLY_ONE_AMMO = 42, // You can only equip one ammo pouch. - EQUIP_ERR_CANT_WRAP_STACKABLE = 43, // Stackable items can't be wrapped. - EQUIP_ERR_CANT_WRAP_EQUIPPED = 44, // Equipped items can't be wrapped. - EQUIP_ERR_CANT_WRAP_WRAPPED = 45, // Wrapped items can't be wrapped. - EQUIP_ERR_CANT_WRAP_BOUND = 46, // Bound items can't be wrapped. - EQUIP_ERR_CANT_WRAP_UNIQUE = 47, // Unique items can't be wrapped. - EQUIP_ERR_CANT_WRAP_BAGS = 48, // Bags can't be wrapped. - EQUIP_ERR_LOOT_GONE = 49, // Already looted - EQUIP_ERR_INV_FULL = 50, // Inventory is full. - EQUIP_ERR_BANK_FULL = 51, // Your bank is full - EQUIP_ERR_VENDOR_SOLD_OUT = 52, // That item is currently sold out. - EQUIP_ERR_BAG_FULL_2 = 53, // That bag is full. - EQUIP_ERR_ITEM_NOT_FOUND_2 = 54, // The item was not found. - EQUIP_ERR_CANT_STACK_2 = 55, // This item cannot stack. - EQUIP_ERR_BAG_FULL_3 = 56, // That bag is full. - EQUIP_ERR_VENDOR_SOLD_OUT_2 = 57, // That item is currently sold out. - EQUIP_ERR_OBJECT_IS_BUSY = 58, // That object is busy. - EQUIP_ERR_CANT_BE_DISENCHANTED = 59, - EQUIP_ERR_NOT_IN_COMBAT = 60, // You can't do that while in combat - EQUIP_ERR_NOT_WHILE_DISARMED = 61, // You can't do that while disarmed - EQUIP_ERR_BAG_FULL_4 = 62, // That bag is full. - EQUIP_ERR_CANT_EQUIP_RANK = 63, // You don't have the required rank for that item - EQUIP_ERR_CANT_EQUIP_REPUTATION = 64, // You don't have the required reputation for that item - EQUIP_ERR_TOO_MANY_SPECIAL_BAGS = 65, // You cannot equip another bag of that type - EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW = 66, // You can't loot that item now. - EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE = 67, // You cannot equip more than one of those. - EQUIP_ERR_VENDOR_MISSING_TURNINS = 68, // You do not have the required items for that purchase - EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS = 69, // You don't have enough honor points - EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS = 70, // You don't have enough arena points - EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED = 71, // You have the maximum number of those gems in your inventory or socketed into items. - EQUIP_ERR_MAIL_BOUND_ITEM = 72, // You can't mail soulbound items. - EQUIP_ERR_INTERNAL_BAG_ERROR_2 = 73, // Internal Bag Error - EQUIP_ERR_BAG_FULL_5 = 74, // That bag is full. - EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED = 75, // You have the maximum number of those gems socketed into equipped items. - EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED = 76, // You cannot socket more than one of those gems into a single item. - EQUIP_ERR_TOO_MUCH_GOLD = 77, // At gold limit - EQUIP_ERR_NOT_DURING_ARENA_MATCH = 78, // You can't do that while in an arena match - EQUIP_ERR_TRADE_BOUND_ITEM = 79, // You can't trade a soulbound item. - EQUIP_ERR_CANT_EQUIP_RATING = 80, // You don't have the personal, team, or battleground rating required to buy that item - EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM = 81, - EQUIP_ERR_NOT_SAME_ACCOUNT = 82, // Account-bound items can only be given to your own characters. - EQUIP_ERR_NO_OUTPUT = 83, - EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS = 84, // You can only carry %d %s - EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS = 85, // You can only equip %d |4item:items in the %s category - EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED = 86, // Your level is too high to use that item - EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW = 87, // You must reach level %d to purchase that item. - EQUIP_ERR_CANT_EQUIP_NEED_TALENT = 88, // You do not have the required talent to equip that. - EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS = 89, // You can only equip %d |4item:items in the %s category - EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP = 90, // Cannot equip item in this form - EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL = 91, // Your inventory is full. Your satchel has been delivered to your mailbox. - EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_TOO_LOW = 92, // Your level is too low to use that item - EQUIP_ERR_CANT_BUY_QUANTITY = 93, // You can't buy the specified quantity of that item. - EQUIP_ERR_ITEM_IS_BATTLE_PAY_LOCKED = 94, // Your purchased item is still waiting to be unlocked - EQUIP_ERR_REAGENT_BANK_FULL = 95, // Your reagent bank is full - EQUIP_ERR_REAGENT_BANK_LOCKED = 96, - EQUIP_ERR_WRONG_BAG_TYPE_3 = 97, - EQUIP_ERR_CANT_USE_ITEM = 98, // You can't use that item. - EQUIP_ERR_CANT_BE_OBLITERATED = 99, // You can't obliterate that item - EQUIP_ERR_GUILD_BANK_CONJURED_ITEM = 100,// You cannot store conjured items in the guild bank - EQUIP_ERR_CANT_DO_THAT_RIGHT_NOW = 101,// You can't do that right now. + EQUIP_ERR_CANT_TRADE_GOLD = 29, // Gold may only be offered by one trader. + EQUIP_ERR_NOT_ENOUGH_MONEY = 30, // You don't have enough money. + EQUIP_ERR_NOT_A_BAG = 31, // Not a bag. + EQUIP_ERR_DESTROY_NONEMPTY_BAG = 32, // You can only do that with empty bags. + EQUIP_ERR_NOT_OWNER = 33, // You don't own that item. + EQUIP_ERR_ONLY_ONE_QUIVER = 34, // You can only equip one quiver. + EQUIP_ERR_NO_BANK_SLOT = 35, // You must purchase that bag slot first + EQUIP_ERR_NO_BANK_HERE = 36, // You are too far away from a bank. + EQUIP_ERR_ITEM_LOCKED = 37, // Item is locked. + EQUIP_ERR_GENERIC_STUNNED = 38, // You are stunned + EQUIP_ERR_PLAYER_DEAD = 39, // You can't do that when you're dead. + EQUIP_ERR_CLIENT_LOCKED_OUT = 40, // You can't do that right now. + EQUIP_ERR_INTERNAL_BAG_ERROR = 41, // Internal Bag Error + EQUIP_ERR_ONLY_ONE_BOLT = 42, // You can only equip one quiver. + EQUIP_ERR_ONLY_ONE_AMMO = 43, // You can only equip one ammo pouch. + EQUIP_ERR_CANT_WRAP_STACKABLE = 44, // Stackable items can't be wrapped. + EQUIP_ERR_CANT_WRAP_EQUIPPED = 45, // Equipped items can't be wrapped. + EQUIP_ERR_CANT_WRAP_WRAPPED = 46, // Wrapped items can't be wrapped. + EQUIP_ERR_CANT_WRAP_BOUND = 47, // Bound items can't be wrapped. + EQUIP_ERR_CANT_WRAP_UNIQUE = 48, // Unique items can't be wrapped. + EQUIP_ERR_CANT_WRAP_BAGS = 49, // Bags can't be wrapped. + EQUIP_ERR_LOOT_GONE = 50, // Already looted + EQUIP_ERR_INV_FULL = 51, // Inventory is full. + EQUIP_ERR_BANK_FULL = 52, // Your bank is full + EQUIP_ERR_VENDOR_SOLD_OUT = 53, // That item is currently sold out. + EQUIP_ERR_BAG_FULL_2 = 54, // That bag is full. + EQUIP_ERR_ITEM_NOT_FOUND_2 = 55, // The item was not found. + EQUIP_ERR_CANT_STACK_2 = 56, // This item cannot stack. + EQUIP_ERR_BAG_FULL_3 = 57, // That bag is full. + EQUIP_ERR_VENDOR_SOLD_OUT_2 = 58, // That item is currently sold out. + EQUIP_ERR_OBJECT_IS_BUSY = 59, // That object is busy. + EQUIP_ERR_CANT_BE_DISENCHANTED = 60, // Item cannot be disenchanted + EQUIP_ERR_NOT_IN_COMBAT = 61, // You can't do that while in combat + EQUIP_ERR_NOT_WHILE_DISARMED = 62, // You can't do that while disarmed + EQUIP_ERR_BAG_FULL_4 = 63, // That bag is full. + EQUIP_ERR_CANT_EQUIP_RANK = 64, // You don't have the required rank for that item + EQUIP_ERR_CANT_EQUIP_REPUTATION = 65, // You don't have the required reputation for that item + EQUIP_ERR_TOO_MANY_SPECIAL_BAGS = 66, // You cannot equip another bag of that type + EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW = 67, // You can't loot that item now. + EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE = 68, // You cannot equip more than one of those. + EQUIP_ERR_VENDOR_MISSING_TURNINS = 69, // You do not have the required items for that purchase + EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS = 70, // You don't have enough honor points + EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS = 71, // You don't have enough arena points + EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED = 72, // You have the maximum number of those gems in your inventory or socketed into items. + EQUIP_ERR_MAIL_BOUND_ITEM = 73, // You can't mail soulbound items. + EQUIP_ERR_INTERNAL_BAG_ERROR_2 = 74, // Internal Bag Error + EQUIP_ERR_BAG_FULL_5 = 75, // That bag is full. + EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED = 76, // You have the maximum number of those gems socketed into equipped items. + EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED = 77, // You cannot socket more than one of those gems into a single item. + EQUIP_ERR_TOO_MUCH_GOLD = 78, // At gold limit + EQUIP_ERR_NOT_DURING_ARENA_MATCH = 79, // You can't do that while in an arena match + EQUIP_ERR_TRADE_BOUND_ITEM = 80, // You can't trade a soulbound item. + EQUIP_ERR_CANT_EQUIP_RATING = 81, // You don't have the personal, team, or battleground rating required to buy that item + EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM = 82, + EQUIP_ERR_NOT_SAME_ACCOUNT = 83, // Account-bound items can only be given to your own characters. + EQUIP_NONE_3 = 84, + EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS = 85, // You can only carry %d %s + EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS = 86, // You can only equip %d |4item:items in the %s category + EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED = 87, // Your level is too high to use that item + EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW = 88, // You must reach level %d to purchase that item. + EQUIP_ERR_CANT_EQUIP_NEED_TALENT = 89, // You do not have the required talent to equip that. + EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS = 90, // You can only equip %d |4item:items in the %s category + EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP = 91, // Cannot equip item in this form + EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL = 92, // Your inventory is full. Your satchel has been delivered to your mailbox. + EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_TOO_LOW = 93, // Your level is too low to use that item + EQUIP_ERR_CANT_BUY_QUANTITY = 94, // You can't buy the specified quantity of that item. + EQUIP_ERR_ITEM_IS_BATTLE_PAY_LOCKED = 95, // Your purchased item is still waiting to be unlocked + EQUIP_ERR_REAGENT_BANK_FULL = 96, // Your reagent bank is full + EQUIP_ERR_REAGENT_BANK_LOCKED = 97, + EQUIP_ERR_WRONG_BAG_TYPE_3 = 98, // That item doesn't go in that container. + EQUIP_ERR_CANT_USE_ITEM = 99, // You can't use that item. + EQUIP_ERR_CANT_BE_OBLITERATED = 100,// You can't obliterate that item + EQUIP_ERR_GUILD_BANK_CONJURED_ITEM = 101,// You cannot store conjured items in the guild bank + EQUIP_ERR_CANT_DO_THAT_RIGHT_NOW = 102,// You can't do that right now. + EQUIP_ERR_BAG_FULL_6 = 103,// That bag is full. + EQUIP_ERR_CANT_BE_SCRAPPED = 104,// You can't scrap that item }; enum BuyResult diff --git a/src/server/game/Entities/Item/ItemTemplate.cpp b/src/server/game/Entities/Item/ItemTemplate.cpp index d541f70215d..abb4d47bfe8 100644 --- a/src/server/game/Entities/Item/ItemTemplate.cpp +++ b/src/server/game/Entities/Item/ItemTemplate.cpp @@ -21,7 +21,7 @@ #include "ItemTemplate.h" #include "Player.h" -uint32 const SocketColorToGemTypeMask[19] = +int32 const SocketColorToGemTypeMask[19] = { 0, SOCKET_COLOR_META, @@ -241,7 +241,7 @@ bool ItemTemplate::IsUsableByLootSpecialization(Player const* player, bool alway if (GetFlags() & ITEM_FLAG_IS_BOUND_TO_ACCOUNT && alwaysAllowBoundToAccount) return true; - uint32 spec = player->GetUInt32Value(PLAYER_FIELD_LOOT_SPEC_ID); + uint32 spec = player->GetUInt32Value(ACTIVE_PLAYER_FIELD_LOOT_SPEC_ID); if (!spec) spec = player->GetUInt32Value(PLAYER_FIELD_CURRENT_SPEC_ID); if (!spec) diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h index c5e83ff6bab..6e806f0c124 100644 --- a/src/server/game/Entities/Item/ItemTemplate.h +++ b/src/server/game/Entities/Item/ItemTemplate.h @@ -337,7 +337,7 @@ enum SocketColor SOCKET_COLOR_RELIC_HOLY = 0x10000 }; -extern uint32 const SocketColorToGemTypeMask[19]; +extern int32 const SocketColorToGemTypeMask[19]; #define SOCKET_COLOR_STANDARD (SOCKET_COLOR_RED | SOCKET_COLOR_YELLOW | SOCKET_COLOR_BLUE) @@ -732,7 +732,6 @@ struct TC_GAME_API ItemTemplate uint32 GetMaxCount() const { return ExtendedData->MaxCount; } uint32 GetContainerSlots() const { return ExtendedData->ContainerSlots; } int32 GetItemStatType(uint32 index) const { ASSERT(index < MAX_ITEM_PROTO_STATS); return ExtendedData->StatModifierBonusStat[index]; } - int32 GetItemStatValue(uint32 index) const { ASSERT(index < MAX_ITEM_PROTO_STATS); return ExtendedData->ItemStatValue[index]; } int32 GetItemStatAllocation(uint32 index) const { ASSERT(index < MAX_ITEM_PROTO_STATS); return ExtendedData->StatPercentEditor[index]; } float GetItemStatSocketCostMultiplier(uint32 index) const { ASSERT(index < MAX_ITEM_PROTO_STATS); return ExtendedData->StatPercentageOfSocket[index]; } uint32 GetScalingStatDistribution() const { return ExtendedData->ScalingStatDistributionID; } |
