Core/Units: moved stats modifiers and multipliers into a struct for future ports of the remaining secondary stats

This commit is contained in:
Ovahlord committed 2026-06-12 11:55:12 +02:00
1 parent 38784337a2
commit 0f6a99bd85
6 files changed
+96 -83

No files matched your search

+3 -3
View File
@@ -3284,7 +3284,7 @@ void ObjectMgr::LoadPetLevelInfo()
pLevelInfo->armor = fields[9].GetUInt32();
for (StatType stat : AllStats)
for (StatType stat : AllPrimaryStats)
pLevelInfo->stats[AsUnderlyingType(stat)] = fields[AsUnderlyingType(stat) + 4].GetUInt16();
++count;
@@ -3732,7 +3732,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
for (StatType stat : AllStats)
for (StatType stat : AllPrimaryStats)
raceStatModifiers[current_race].StatModifier[AsUnderlyingType(stat)] = fields[AsUnderlyingType(stat) + 1].GetInt16();
} while (raceStatsResult->NextRow());
@@ -3781,7 +3781,7 @@ void ObjectMgr::LoadPlayerInfo()
playerInfo->levelInfo = std::make_unique<PlayerLevelInfo[]>(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
PlayerLevelInfo& levelInfo = playerInfo->levelInfo[current_level - 1];
for (StatType stat : AllStats)
for (StatType stat : AllPrimaryStats)
levelInfo.stats[AsUnderlyingType(stat)] = fields[AsUnderlyingType(stat) + 2].GetUInt16() + raceStatModifiers[race].StatModifier[AsUnderlyingType(stat)];
}
}