From d7c4d389eb621144d2f77735cdfd16f57c98678a Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Tue, 24 May 2016 08:26:47 +0300 Subject: [PATCH] Throw an error if the given player name is invalid. --- source/Entity/Player.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Entity/Player.cpp b/source/Entity/Player.cpp index dc1ba772..d278821a 100644 --- a/source/Entity/Player.cpp +++ b/source/Entity/Player.cpp @@ -274,7 +274,10 @@ void CPlayer::SetName(CSStr name) const // Validate the managed identifier Validate(); // Perform the requested operation - _Func->SetPlayerName(m_ID, name); + if (_Func->SetPlayerName(m_ID, name) == vcmpErrorInvalidName) + { + STHROWF("The specified name is invalid"); + } } // ------------------------------------------------------------------------------------------------