1
0

Update Commands.cpp

This commit is contained in:
Emagi 2025-01-04 21:04:55 -05:00
parent a820439430
commit f86add3c05

View File

@ -11573,13 +11573,13 @@ void Commands::Command_Weather(Client* client, Seperator* sep)
} }
void Commands::Command_Select(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(); Spawn* spawn = client->GetPlayer()->GetTarget();
int32 spawn_id = client->dialog_manager.getAcceptValue("select"); int32 spawn_id = client->dialog_manager.getAcceptValue("select");
if(spawn && spawn_id == spawn->GetID()) { 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]); client->GetCurrentZone()->CallSpawnScript(spawn, SPAWN_SCRIPT_CUSTOM, client->GetPlayer(), sep->arg[1]);
} }
} }