mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/Items: fixed handling of Heirloom item stat distribution
This commit is contained in:
@@ -610,7 +610,7 @@ inline uint8 ItemSubClassToDurabilityMultiplierId(uint32 ItemClass, uint32 ItemS
|
||||
|
||||
struct _ItemStat
|
||||
{
|
||||
uint32 ItemStatType;
|
||||
int32 ItemStatType;
|
||||
int32 ItemStatValue;
|
||||
int32 ItemStatAllocation;
|
||||
int32 ItemStatSocketCostMultiplier;
|
||||
|
||||
@@ -7657,14 +7657,20 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply
|
||||
|
||||
for (uint8 i = 0; i < MAX_ITEM_PROTO_STATS; ++i)
|
||||
{
|
||||
int32 statType = proto->ItemStat[i].ItemStatType;
|
||||
|
||||
// Fallback to stat scaling distribution stat ID. If no entry, skip
|
||||
if (statType == -1 && !ssd)
|
||||
continue;
|
||||
else if (ssd)
|
||||
statType = ssd->StatID[i];
|
||||
|
||||
int32 val = proto->GetStatValue(i, this);
|
||||
// If set ScalingStatDistribution need get stats and values from it
|
||||
if (ssd && ssd->StatID[i] < 0)
|
||||
if (!val)
|
||||
continue;
|
||||
|
||||
uint32 statType = proto->ItemStat[i].ItemStatType;
|
||||
|
||||
if (val == 0)
|
||||
// If set ScalingStatDistribution need get stats and values from it
|
||||
if (ssd && ssd->StatID[i] < 0)
|
||||
continue;
|
||||
|
||||
switch (statType)
|
||||
|
||||
Reference in New Issue
Block a user