Core/Misc: Made GetExpansionForLevel return current expansion for all creatures higher than the last one

This commit is contained in:
Kinzcool
2015-01-17 14:37:42 -05:00
parent caa2be3ae9
commit dfa0f2a253
3 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -911,8 +911,8 @@ uint32 GetExpansionForLevel(uint32 level)
return EXPANSION_CATACLYSM;
else if (level < 90)
return EXPANSION_MISTS_OF_PANDARIA;
else if (level < 100)
return EXPANSION_WARLORDS_OF_DRAENOR;
else
return CURRENT_EXPANSION;
}
bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId)
+3 -3
View File
@@ -982,7 +982,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
{
const_cast<CreatureTemplate*>(cInfo)->minlevel = (MAX_LEVEL + cInfo->minlevel);
const_cast<CreatureTemplate*>(cInfo)->maxlevel = (MAX_LEVEL + cInfo->maxlevel);
const_cast<CreatureTemplate*>(cInfo)->expansion = EXPANSION_WARLORDS_OF_DRAENOR;
const_cast<CreatureTemplate*>(cInfo)->expansion = CURRENT_EXPANSION;
}
if (cInfo->minlevel < 1 || cInfo->minlevel > STRONG_MAX_LEVEL)
@@ -3311,8 +3311,8 @@ void ObjectMgr::LoadPlayerInfo()
{
Field* fields = result->Fetch();
uint32 current_level = fields[0].GetUInt16();
uint32 current_xp = uint32(fields[1].GetFloat());
uint32 current_level = fields[0].GetUInt8();
uint32 current_xp = fields[1].GetUInt32();
if (current_level >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
@@ -85,6 +85,8 @@ enum Expansions
MAX_EXPANSIONS = 6
};
#define CURRENT_EXPANSION EXPANSION_WARLORDS_OF_DRAENOR;
enum Gender
{
GENDER_UNKNOWN = -1,