diff --git a/source/WorldServer/Entity.cpp b/source/WorldServer/Entity.cpp index f3d152b..6838ee1 100644 --- a/source/WorldServer/Entity.cpp +++ b/source/WorldServer/Entity.cpp @@ -4022,18 +4022,19 @@ sint64 Entity::GetInfoStructSInt(std::string field) bool Entity::SetInfoStructString(std::string field, std::string value) { - std::shared_lock rlock(propertiesMutex); - map>::const_iterator itr = set_string_funcs.find(field); - if(itr != set_string_funcs.end()) { - (itr->second)(value); - return true; + std::shared_lock rlock(propertiesMutex); + map>::const_iterator itr = set_string_funcs.find(field); + if(itr != set_string_funcs.end()) + { + (itr->second)(value); + return true; + } } - else { - RegisterProperty(field); - SetProperty(field, value); - } - return false; + + RegisterProperty(field); + SetProperty(field, value); + return true; }