From f86add3c05e36a8df3c139baa17b53b3601a414a Mon Sep 17 00:00:00 2001 From: Emagi Date: Sat, 4 Jan 2025 21:04:55 -0500 Subject: [PATCH] Update Commands.cpp --- source/WorldServer/Commands/Commands.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/WorldServer/Commands/Commands.cpp b/source/WorldServer/Commands/Commands.cpp index 1fa25c8..e5eebb6 100644 --- a/source/WorldServer/Commands/Commands.cpp +++ b/source/WorldServer/Commands/Commands.cpp @@ -11573,13 +11573,13 @@ void Commands::Command_Weather(Client* client, Seperator* sep) } void Commands::Command_Select(Client* client, Seperator* sep) { - if (sep && sep->arg[1]) { + if (sep && sep->arg[0]) { Spawn* spawn = client->GetPlayer()->GetTarget(); int32 spawn_id = client->dialog_manager.getAcceptValue("select"); if(spawn && spawn_id == spawn->GetID()) { - client->GetCurrentZone()->CallSpawnScript(spawn, SPAWN_SCRIPT_CASTED_ON, client->GetPlayer(), sep->argplus[0]); + client->GetCurrentZone()->CallSpawnScript(spawn, SPAWN_SCRIPT_CASTED_ON, client->GetPlayer(), sep->arg[0] ? sep->argplus[0] : ""); } - else if (spawn && strlen(sep->arg[1]) > 0) + else if (spawn && sep->arg[1] && strlen(sep->arg[1]) > 0) client->GetCurrentZone()->CallSpawnScript(spawn, SPAWN_SCRIPT_CUSTOM, client->GetPlayer(), sep->arg[1]); } }