mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +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:
+13
-3
@@ -6372,9 +6372,9 @@ void Client::NPCSpawn(NPC *target_npc, const char *identifier, uint32 extra)
|
||||
bool is_delete = spawn_type.find("delete") != std::string::npos;
|
||||
bool is_remove = spawn_type.find("remove") != std::string::npos;
|
||||
bool is_update = spawn_type.find("update") != std::string::npos;
|
||||
bool is_clone = spawn_type.find("clone") != std::string::npos;
|
||||
if (is_add || is_create) {
|
||||
// Add: extra tries to create the NPC ID within the range for the current Zone (Zone ID * 1000)
|
||||
// Create: extra sets the Respawn Timer for add
|
||||
// extra sets the Respawn Timer for add/create
|
||||
content_db.NPCSpawnDB(
|
||||
is_add ? NPCSpawnTypes::AddNewSpawngroup : NPCSpawnTypes::CreateNewSpawn,
|
||||
zone->GetShortName(),
|
||||
@@ -6398,7 +6398,17 @@ void Client::NPCSpawn(NPC *target_npc, const char *identifier, uint32 extra)
|
||||
zone->GetShortName(),
|
||||
zone->GetInstanceVersion(),
|
||||
this,
|
||||
target_npc->CastToNPC()
|
||||
target_npc->CastToNPC(),
|
||||
extra
|
||||
);
|
||||
} else if (is_clone) {
|
||||
content_db.NPCSpawnDB(
|
||||
NPCSpawnTypes::AddSpawnFromSpawngroup,
|
||||
zone->GetShortName(),
|
||||
zone->GetInstanceVersion(),
|
||||
this,
|
||||
target_npc->CastToNPC(),
|
||||
extra
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user