Core/Corpses: Fixed loading phaseMask if its greater than 255

This commit is contained in:
Shauren
2011-03-17 09:42:33 +01:00
parent a959618f31
commit 660e22faeb
2 changed files with 4 additions and 4 deletions

View File

@@ -190,7 +190,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
m_isWorldObject = true;
uint32 instanceid = fields[14].GetUInt32();
uint32 phaseMask = fields[15].GetUInt8();
uint32 phaseMask = fields[15].GetUInt16();
// place
SetLocationInstanceId(instanceid);

View File

@@ -1095,9 +1095,9 @@ void Guardian::UpdateMaxHealth()
}
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
value *= GetModifierValue(unitMod, BASE_PCT);
value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
value *= GetModifierValue(unitMod, TOTAL_PCT);
SetMaxHealth((uint32)value);
}