Core/Dungeon Finder: Fix instances unlock after level change
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user