[Commands] Convert NPC Spawn Methods to Repositories (#3956)

* [Commands] Convert NPC Spawn Methods to Repositories

# Notes
- Convert `AddNewNPCSpawnGroupCommand()`, `AddNPCTypes()`, `AddSpawnFromSpawnGroup()`, `CreateNewNPCCommand()`, `DeleteSpawnLeaveInNPCTypeTable()`, `DeleteSpawnRemoveFromNPCTypeTable()`, `NPCSpawnDB()`, and `UpdateNPCTypeAppearance()`.

* Regenerate.

* Cleanup.
This commit is contained in:
Alex King
2024-01-13 00:02:19 -05:00
committed by GitHub
parent 6968a70310
commit e182d685d3
4 changed files with 309 additions and 248 deletions
+8 -8
View File
@@ -551,14 +551,14 @@ public:
/* NPCs */
uint32 NPCSpawnDB(uint8 command, const char* zone, uint32 zone_version, Client *c, NPC* spawn = 0, uint32 extra = 0); // 0 = Create 1 = Add; 2 = Update; 3 = Remove; 4 = Delete
uint32 CreateNewNPCCommand(const char* zone, uint32 zone_version, Client *client, NPC* spawn, uint32 extra);
uint32 AddNewNPCSpawnGroupCommand(const char* zone, uint32 zone_version, Client *client, NPC* spawn, uint32 respawnTime);
uint32 DeleteSpawnLeaveInNPCTypeTable(const char* zone, Client *client, NPC* spawn);
uint32 DeleteSpawnRemoveFromNPCTypeTable(const char* zone, uint32 zone_version, Client *client, NPC* spawn);
uint32 AddSpawnFromSpawnGroup(const char* zone, uint32 zone_version, Client *client, NPC* spawn, uint32 spawnGroupID);
uint32 AddNPCTypes(const char* zone, uint32 zone_version, Client *client, NPC* spawn, uint32 spawnGroupID);
uint32 UpdateNPCTypeAppearance(Client *client, NPC* spawn);
uint32 NPCSpawnDB(uint8 command, const std::string& zone, uint32 instance_version, Client *c, NPC* n = 0, uint32 extra = 0); // 0 = Create 1 = Add; 2 = Update; 3 = Remove; 4 = Delete
uint32 CreateNewNPCCommand(const std::string& zone, uint32 instance_version, Client* c, NPC* n, uint32 extra);
uint32 AddNewNPCSpawnGroupCommand(const std::string& zone, uint32 instance_version, Client* c, NPC* n, uint32 in_respawn_time);
uint32 DeleteSpawnLeaveInNPCTypeTable(const std::string& zone, Client* c, NPC* n);
uint32 DeleteSpawnRemoveFromNPCTypeTable(const std::string& zone, uint32 instance_version, Client* c, NPC* n);
uint32 AddSpawnFromSpawnGroup(const std::string& zone, uint32 instance_version, Client* c, NPC* n, uint32 spawngroup_id);
uint32 AddNPCTypes(const std::string& zone, uint32 instance_version, Client* c, NPC* n, uint32 spawngroup_id);
uint32 UpdateNPCTypeAppearance(Client* c, NPC* n);
bool SetSpecialAttkFlag(uint8 id, const char* flag);
bool GetPetEntry(const std::string& pet_type, PetRecord* r);
bool GetPoweredPetEntry(const std::string& pet_type, int16 pet_power, PetRecord* r);