diff options
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index bbc43c56756..3f15ec87392 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -951,7 +951,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) const_cast<CreatureTemplate*>(cInfo)->expansion = 0; } - if (cInfo->expansionUnknown > MAX_CREATURE_BASE_HP) + if (cInfo->expansionUnknown > MAX_EXPANSIONS) { TC_LOG_ERROR("sql.sql", "Table `creature_template` lists creature (Entry: %u) with `exp_unk` %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansionUnknown); const_cast<CreatureTemplate*>(cInfo)->expansionUnknown = 0; @@ -3393,6 +3393,10 @@ void ObjectMgr::LoadPlayerInfo() if (sWorld->getIntConfig(CONFIG_EXPANSION) < EXPANSION_WRATH_OF_THE_LICH_KING && class_ == CLASS_DEATH_KNIGHT) continue; + // skip expansion races if not playing with expansion + if (sWorld->getIntConfig(CONFIG_EXPANSION) < EXPANSION_CATACLYSM && (race == RACE_GOBLIN || race == RACE_WORGEN)) + continue; + // fatal error if no level 1 data if (!info->levelInfo || info->levelInfo[0].stats[0] == 0) { @@ -8599,8 +8603,8 @@ CreatureBaseStats const* ObjectMgr::GetCreatureBaseStats(uint8 level, uint8 unit void ObjectMgr::LoadCreatureClassLevelStats() { uint32 oldMSTime = getMSTime(); - // 0 1 2 3 4 5 6 7 8 9 10 11 12 - QueryResult result = WorldDatabase.Query("SELECT level, class, basehp0, basehp1, basehp2, basehp3, basemana, basearmor, attackpower, rangedattackpower, damage_base, damage_exp1, damage_exp2 FROM creature_classlevelstats"); + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + QueryResult result = WorldDatabase.Query("SELECT level, class, basehp0, basehp1, basehp2, basehp3, basemana, basearmor, attackpower, rangedattackpower, damage_base, damage_exp1, damage_exp2, damage_exp3 FROM creature_classlevelstats"); if (!result) { @@ -8623,7 +8627,7 @@ void ObjectMgr::LoadCreatureClassLevelStats() for (uint8 i = 0; i < MAX_EXPANSIONS; ++i) { - stats.BaseHealth[i] = fields[2 + i].GetUInt16(); + stats.BaseHealth[i] = fields[2 + i].GetUInt32(); if (stats.BaseHealth[i] == 0) { |