mercenary.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef _MERCENARY_H_
  4. #define _MERCENARY_H_
  5. #include "status.h" // struct status_data, struct status_change
  6. #include "unit.h" // struct unit_data
  7. struct s_mercenary_db {
  8. int class_;
  9. char sprite[NAME_LENGTH], name[NAME_LENGTH];
  10. unsigned short lv;
  11. short range2, range3;
  12. struct status_data status;
  13. struct view_data vd;
  14. struct {
  15. unsigned short id, lv;
  16. } skill[MAX_MERCSKILL];
  17. };
  18. extern struct s_mercenary_db mercenary_db[MAX_MERCENARY_CLASS];
  19. struct mercenary_data {
  20. struct block_list bl;
  21. struct unit_data ud;
  22. struct view_data *vd;
  23. struct status_data base_status, battle_status;
  24. struct status_change sc;
  25. struct regen_data regen;
  26. struct s_mercenary_db *db;
  27. struct s_mercenary mercenary;
  28. struct map_session_data *master;
  29. int contract_timer;
  30. };
  31. bool merc_class(int class_);
  32. struct view_data * merc_get_viewdata(int class_);
  33. int merc_create(struct map_session_data *sd, int class_, unsigned int lifetime);
  34. int merc_data_received(struct s_mercenary *merc, bool flag);
  35. int mercenary_save(struct mercenary_data *md);
  36. int do_init_mercenary(void);
  37. int merc_delete(struct mercenary_data *md, int reply);
  38. void merc_contract_stop(struct mercenary_data *md);
  39. #endif /* _MERCENARY_H_ */