* Add support for basedmg and baserangeddmg values in creature_classlevelstats.

* Remove mindmg, maxdmg, attackpower and ranged field in creature_template and add Dmg_Mod, Rangeddmg_Mod field.

--HG--
branch : trunk
This commit is contained in:
win32
2010-01-21 13:48:27 +02:00
parent 1c310c887b
commit 2572e9ef8e
13 changed files with 507 additions and 34 deletions

View File

@@ -8917,7 +8917,7 @@ CreatureBaseStats const* ObjectMgr::GetCreatureBaseStats(uint32 level, uint8 uni
void ObjectMgr::LoadCreatureClassLevelStats()
{
QueryResult *result = WorldDatabase.Query("SELECT level, class, basehp0, basehp1, basehp2, basemana, basearmor FROM creature_classlevelstats");
QueryResult *result = WorldDatabase.Query("SELECT level, class, basehp0, basehp1, basehp2, basemana, basearmor, basedmg, baserangeddmg FROM creature_classlevelstats");
if (!result)
{
@@ -8941,6 +8941,8 @@ void ObjectMgr::LoadCreatureClassLevelStats()
stats.BaseHealth[i] = fields[i + 2].GetUInt32();
stats.BaseMana = fields[5].GetUInt32();
stats.BaseArmor = fields[6].GetUInt32();
stats.BaseDmg = fields[7].GetUInt32();
stats.BaseRangedDmg = fields[8].GetUInt32();
if (stats.Level > STRONG_MAX_LEVEL)
{
@@ -8987,6 +8989,8 @@ void ObjectMgr::LoadCreatureClassLevelStats()
CreatureBaseStats new_stats = CreatureBaseStats();
new_stats.BaseArmor = 1;
new_stats.BaseDmg = 1;
new_stats.BaseRangedDmg = 1;
for (uint8 j = 0; j < MAX_CREATURE_BASE_HP; ++j)
new_stats.BaseHealth[j] = 1;
new_stats.BaseMana = 0;