Core/Dungeon Finder: Fix instances unlock after level change

This commit is contained in:
tobmaps
2011-05-29 22:49:05 +07:00
parent 14bc68a291
commit 42fc72447b
6 changed files with 13 additions and 10 deletions
+4 -2
View File
@@ -2529,13 +2529,13 @@ bool ChatHandler::HandleResetLevelCommand(const char * args)
if (!HandleResetStatsOrLevelHelper(target))
return false;
uint8 oldLevel = target->getLevel();
// set starting level
uint32 start_level = target->getClass() != CLASS_DEATH_KNIGHT
? sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL)
: sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
sScriptMgr->OnPlayerLevelChanged(target, start_level);
target->_ApplyAllLevelScaleItemMods(false);
target->SetLevel(start_level);
target->InitRunes();
@@ -2551,6 +2551,8 @@ bool ChatHandler::HandleResetLevelCommand(const char * args)
if (Pet* pet = target->GetPet())
pet->SynchronizeLevelWithOwner();
sScriptMgr->OnPlayerLevelChanged(target, oldLevel);
return true;
}