[Horses] Convert Horses to Repositories (#3965)

* [Horses] Convert Horses to Repositories

# Notes
- Convert `BuildHorseType()` to repositories.
- Removed unused code, parameters, and member variables in horses.

* Update horse.cpp
This commit is contained in:
Alex King
2024-01-13 00:33:52 -05:00
committed by GitHub
parent 11e2a252e5
commit b9f997015a
4 changed files with 106 additions and 121 deletions
+6 -8
View File
@@ -29,19 +29,17 @@ struct NewSpawn_Struct;
class Horse : public NPC {
public:
Horse(Client *owner, uint16 spell_id, const glm::vec4& position);
Horse(Client* c, uint16 spell_id, const glm::vec4& position);
virtual void FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho);
virtual void FillSpawnStruct(NewSpawn_Struct* ns, Mob* m);
static bool IsHorseSpell(uint16 spell_id);
protected:
uint8 mount_color;
Client *owner;
Client* owner;
//generate npc type records for horses
static std::map<uint16, const NPCType *> horse_types;
static const NPCType *GetHorseType(uint16 spell_id);
static const NPCType *BuildHorseType(uint16 spell_id);
static std::map<uint16, const NPCType*> horse_types;
static const NPCType* GetHorseType(uint16 spell_id);
static const NPCType* BuildHorseType(uint16 spell_id);
};
#endif