mirror of
https://github.com/araxiaonline/AzerothCore-wotlk-with-NPCBots.git
synced 2026-06-13 03:22:24 -04:00
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>());
|
||||
|
||||
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>());
|
||||
int32 statValue = fields[28 + statsCount * 2].Get<int32>();
|
||||
if (statType == 0)
|
||||
break;
|
||||
uint32 statType = uint32(fields[27 + statsIterator * 2].Get<uint8>());
|
||||
int32 statValue = fields[28 + statsIterator * 2].Get<int32>();
|
||||
statsIterator++;
|
||||
if (statValue == 0)
|
||||
continue;
|
||||
|
||||
itemTemplate.ItemStat[statsCount].ItemStatType = statType;
|
||||
itemTemplate.ItemStat[statsCount].ItemStatValue = statValue;
|
||||
|
||||
Reference in New Issue
Block a user