mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 17:38:08 +00:00
Use more clear control paths
This commit is contained in:
@@ -47,10 +47,10 @@ void ScriptComponent::SetScript(const std::string& scriptName) {
|
||||
}
|
||||
|
||||
const std::string ScriptComponent::GetScriptName(Entity* parentEntity, const uint32_t componentId) {
|
||||
if (!parentEntity) return "";
|
||||
if (!parentEntity || componentId == 0) return "";
|
||||
// LDF key script overrides script component Id
|
||||
const auto customScriptServer = parentEntity->GetVarAsString(u"custom_script_server");
|
||||
if (!customScriptServer.empty() || componentId == 0) return customScriptServer;
|
||||
if (!customScriptServer.empty()) return customScriptServer;
|
||||
|
||||
auto* scriptCompTable = CDClientManager::Instance().GetTable<CDScriptComponentTable>();
|
||||
CDScriptComponent scriptCompData = scriptCompTable->GetByID(componentId);
|
||||
|
Reference in New Issue
Block a user