aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Item/Item.cpp9
-rw-r--r--src/server/game/Entities/Item/Item.h1
-rw-r--r--src/server/game/Entities/Item/ItemTemplate.h1
3 files changed, 3 insertions, 8 deletions
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index a146d3f0b58..ed7ff103531 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -1709,7 +1709,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 +1721,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;
@@ -2276,7 +2276,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
@@ -2625,9 +2625,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)
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index a51415abcbb..83e229b7076 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];
diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h
index c5e83ff6bab..b9ea3bd7d23 100644
--- a/src/server/game/Entities/Item/ItemTemplate.h
+++ b/src/server/game/Entities/Item/ItemTemplate.h
@@ -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; }