mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/ObjectMgr: Fixed loading creature_classlevelstats
This commit is contained in:
@@ -8442,7 +8442,7 @@ CreatureBaseStats const* ObjectMgr::GetCreatureBaseStats(uint8 level, uint8 unit
|
||||
void ObjectMgr::LoadCreatureClassLevelStats()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// 0 1 2 3 4 5 6 7
|
||||
QueryResult result = WorldDatabase.Query("SELECT level, class, basehp0, basehp1, basehp2, basehp3, basemana, basearmor FROM creature_classlevelstats");
|
||||
|
||||
if (!result)
|
||||
@@ -8464,8 +8464,8 @@ void ObjectMgr::LoadCreatureClassLevelStats()
|
||||
for (uint8 i = 0; i < MAX_CREATURE_BASE_HP; ++i)
|
||||
stats.BaseHealth[i] = fields[i + 2].GetUInt32();
|
||||
|
||||
stats.BaseMana = fields[5].GetUInt32();
|
||||
stats.BaseArmor = fields[6].GetUInt32();
|
||||
stats.BaseMana = fields[6].GetUInt32();
|
||||
stats.BaseArmor = fields[7].GetUInt32();
|
||||
|
||||
if (!Class || ((1 << (Class - 1)) & CLASSMASK_ALL_CREATURES) == 0)
|
||||
sLog->outError(LOG_FILTER_SQL, "Creature base stats for level %u has invalid class %u", Level, Class);
|
||||
|
||||
Reference in New Issue
Block a user