wings.h

main 35 lines · 665 bytes Raw
Alex Alex Commit Server upload 18/10/2026 23:38
1#ifndef FS_WINGS_H
2#define FS_WINGS_H
3
4struct Wing
5{
6 Wing(uint8_t id, uint16_t clientId, std::string name, int32_t speed, bool premium) :
7 name(std::move(name)), speed(speed), clientId(clientId), id(id), premium(premium) {}
8
9 std::string name;
10 int32_t speed;
11 uint16_t clientId;
12 uint8_t id;
13 bool premium;
14};
15
16class Wings
17{
18 public:
19 bool reload();
20 bool loadFromXml();
21 Wing* getWingByID(uint8_t id);
22 Wing* getWingByName(const std::string& name);
23 Wing* getWingByClientID(uint16_t clientId);
24 std::string getWingNameByID(uint8_t id);
25
26 const std::vector<Wing>& getWings() const {
27 return wings;
28 }
29
30 private:
31 std::vector<Wing> wings;
32};
33
34#endif
35
Top