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]); } }