aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/scripts/Commands/cs_character.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp
index 65b4e619770..3821c5185ae 100644
--- a/src/server/scripts/Commands/cs_character.cpp
+++ b/src/server/scripts/Commands/cs_character.cpp
@@ -729,7 +729,7 @@ public:
return true;
}
- static bool HandleLevelUpCommand(ChatHandler* handler, Optional<PlayerIdentifier> player, Optional<int16> level)
+ static bool HandleLevelUpCommand(ChatHandler* handler, Optional<PlayerIdentifier> player, int16 level)
{
if (!player)
player = PlayerIdentifier::FromTargetOrSelf(handler);
@@ -737,7 +737,7 @@ public:
return false;
uint8 oldlevel = static_cast<uint8>(player->IsConnected() ? player->GetConnectedPlayer()->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(*player));
- int16 newlevel = static_cast<int16>(oldlevel) + level.value_or(1);
+ int16 newlevel = static_cast<int16>(oldlevel) + level;
if (newlevel < 1)
newlevel = 1;