fix(Core/Items): skip empty stats instead of stopping on them (#25671)
This commit is contained in:
@@ -3332,12 +3332,14 @@ void ObjectMgr::LoadItemTemplates()
|
|||||||
itemTemplate.ContainerSlots = uint32(fields[26].Get<uint8>());
|
itemTemplate.ContainerSlots = uint32(fields[26].Get<uint8>());
|
||||||
|
|
||||||
uint8 statsCount = 0;
|
uint8 statsCount = 0;
|
||||||
while (statsCount < MAX_ITEM_PROTO_STATS)
|
uint8 statsIterator = 0;
|
||||||
|
while (statsIterator < MAX_ITEM_PROTO_STATS)
|
||||||
{
|
{
|
||||||
uint32 statType = uint32(fields[27 + statsCount * 2].Get<uint8>());
|
uint32 statType = uint32(fields[27 + statsIterator * 2].Get<uint8>());
|
||||||
int32 statValue = fields[28 + statsCount * 2].Get<int32>();
|
int32 statValue = fields[28 + statsIterator * 2].Get<int32>();
|
||||||
if (statType == 0)
|
statsIterator++;
|
||||||
break;
|
if (statValue == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
itemTemplate.ItemStat[statsCount].ItemStatType = statType;
|
itemTemplate.ItemStat[statsCount].ItemStatType = statType;
|
||||||
itemTemplate.ItemStat[statsCount].ItemStatValue = statValue;
|
itemTemplate.ItemStat[statsCount].ItemStatValue = statValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user