mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 04:16:46 +00:00
[Commands] #npcspawn Changes (#4311)
* Changes to npcspawn create command so it takes more stats from the target npc * Add see invis stats to npccreate command * WIP npcspawn command changes * Add npcspawn clone and help args, fix some broken things with npcspawn * Cleanup comments and add apostraphes to zone shortname query * Make it so npcspawn remove only removes spawn2 row and optionally removes spawngroup and spawnentry, make create and add spawn the npc at client loc * Make npcspawn create use the same syntax for spawngroup naming as npcspawn add * Revert npcspawn create and add to use npc location rather than client, other misc tweaks
This commit is contained in:
@@ -1666,7 +1666,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
} else if (!strcasecmp(sep->arg[1], "set_grid")) {
|
||||
if (sep->IsNumber(2)) {
|
||||
const uint32 grid_id = Strings::ToUnsignedInt(sep->arg[2]);
|
||||
if (grid_id) {
|
||||
if (grid_id >= 0) {
|
||||
d = fmt::format(
|
||||
"{} now has a Grid ID of {} on Spawn Group ID {}.",
|
||||
npc_id_string,
|
||||
@@ -1674,14 +1674,15 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
Strings::Commify(std::to_string(t->GetSpawnGroupId()))
|
||||
);
|
||||
auto query = fmt::format(
|
||||
"UPDATE spawn2 SET pathgrid = {} WHERE spawngroupID = {} AND version = {}",
|
||||
"UPDATE spawn2 SET pathgrid = {} WHERE spawngroupID = {} AND version = {} AND zone = '{}'",
|
||||
grid_id,
|
||||
t->GetSpawnGroupId(),
|
||||
zone->GetInstanceVersion()
|
||||
zone->GetInstanceVersion(),
|
||||
zone->GetShortName()
|
||||
);
|
||||
content_db.QueryDatabase(query);
|
||||
} else {
|
||||
c->Message(Chat::White, "Grid ID must be greater than 0.");
|
||||
c->Message(Chat::White, "Grid ID must be greater than or equal to 0.");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user