Core/Items: Fixed new stats not being added with item bonuses

This commit is contained in:
Shauren
2015-04-22 21:31:37 +02:00
parent 0147f37eb0
commit 209bf6b4e6

View File

@@ -1837,11 +1837,14 @@ void BonusData::AddBonus(uint32 type, int32 const (&values)[2])
{
uint32 statIndex = 0;
for (statIndex = 0; statIndex < MAX_ITEM_PROTO_STATS; ++statIndex)
if (ItemStatType[statIndex] == values[0])
if (ItemStatType[statIndex] == values[0] || ItemStatType[statIndex] == -1)
break;
if (statIndex < MAX_ITEM_PROTO_STATS)
{
ItemStatType[statIndex] = values[0];
ItemStatAllocation[statIndex] += values[1];
}
break;
}
case ITEM_BONUS_QUALITY: