mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Items: Removed ItemStatValue
This commit is contained in:
@@ -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
|
||||
@@ -2624,9 +2624,6 @@ void BonusData::Initialize(ItemTemplate const* proto)
|
||||
for (uint32 i = 0; i < MAX_ITEM_PROTO_STATS; ++i)
|
||||
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);
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user