Core/DBLayer: Fix creature and spell_rank loading

This commit is contained in:
Nay
2012-03-26 21:06:50 +01:00
parent 613d5368a5
commit 8f365de4b2
2 changed files with 25 additions and 25 deletions
+6 -6
View File
@@ -1438,9 +1438,9 @@ void ObjectMgr::LoadCreatures()
CreatureData& data = _creatureDataStore[guid];
data.id = entry;
data.mapid = fields[ 2].GetUInt32();
data.mapid = fields[2].GetUInt16();
data.displayid = fields[3].GetUInt32();
data.equipmentId = fields[ 4].GetUInt32();
data.equipmentId = fields[4].GetInt32();
data.posX = fields[5].GetFloat();
data.posY = fields[6].GetFloat();
data.posZ = fields[7].GetFloat();
@@ -1453,7 +1453,7 @@ void ObjectMgr::LoadCreatures()
data.movementType = fields[14].GetUInt8();
data.spawnMask = fields[15].GetUInt8();
data.phaseMask = fields[16].GetUInt16();
int16 gameEvent = fields[17].GetInt16();
int16 gameEvent = fields[17].GetInt8();
uint32 PoolId = fields[18].GetUInt32();
data.npcflag = fields[19].GetUInt32();
data.unit_flags = fields[20].GetUInt32();
@@ -8698,10 +8698,10 @@ void ObjectMgr::LoadCreatureClassLevelStats()
CreatureBaseStats stats;
for (uint8 i = 0; i < MAX_CREATURE_BASE_HP; ++i)
stats.BaseHealth[i] = fields[i + 2].GetUInt32();
stats.BaseHealth[i] = fields[i + 2].GetUInt16();
stats.BaseMana = fields[5].GetUInt32();
stats.BaseArmor = fields[6].GetUInt32();
stats.BaseMana = fields[5].GetUInt16();
stats.BaseArmor = fields[6].GetUInt16();
if (!Class || ((1 << (Class - 1)) & CLASSMASK_ALL_CREATURES) == 0)
sLog->outErrorDb("Creature base stats for level %u has invalid class %u", Level, Class);
+1 -1
View File
@@ -1193,7 +1193,7 @@ void SpellMgr::LoadSpellRanks()
if (lastSpell == -1)
lastSpell = currentSpell;
uint32 spell_id = fields[1].GetUInt32();
uint32 rank = fields[2].GetUInt32();
uint32 rank = fields[2].GetUInt8();
// don't drop the row if we're moving to the next rank
if (currentSpell == lastSpell)