mercenary.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Homunculus and future Mercenary system code go here [Celest]
  2. // implemented by [orn]
  3. struct homunculus_db {
  4. int class_ ;
  5. char name[NAME_LENGTH];
  6. int basemaxHP ;
  7. int basemaxSP ;
  8. int baseSTR ;
  9. int baseAGI ;
  10. int baseVIT ;
  11. int baseINT ;
  12. int baseDEX ;
  13. int baseLUK ;
  14. int foodID ;
  15. int baseIntimacy ;
  16. short baseHungry ;
  17. long hungryDelay ;
  18. int gminHP ;
  19. int gmaxHP ;
  20. int gminSP ;
  21. int gmaxSP ;
  22. int gminSTR ;
  23. int gmaxSTR ;
  24. int gminAGI ;
  25. int gmaxAGI ;
  26. int gminVIT ;
  27. int gmaxVIT ;
  28. int gminINT ;
  29. int gmaxINT ;
  30. int gminDEX ;
  31. int gmaxDEX ;
  32. int gminLUK ;
  33. int gmaxLUK ;
  34. int evo_class ;
  35. int baseASPD ;
  36. //short size ;
  37. //short race ;
  38. //short element ;
  39. unsigned char element, race, size; // albator
  40. int accessID ;
  41. };
  42. extern struct homunculus_db homuncumlus_db[MAX_HOMUNCULUS_CLASS];
  43. enum { HOMUNCULUS_CLASS, HOMUNCULUS_FOOD };
  44. enum {
  45. SP_ACK = 0x00,
  46. SP_INTIMATE = 0x100,
  47. SP_HUNGRY = 0x200
  48. };
  49. // merc_is_hom_alive(struct homun_data *)
  50. #define merc_is_hom_active(x) (x && x->master && x->master->homunculus.vaporize != 1 && x->battle_status.hp != 0)
  51. int do_init_merc(void);
  52. int merc_hom_recv_data(int account_id, struct s_homunculus *sh, int flag); //albator
  53. void merc_load_sub(struct homun_data *hd, struct map_session_data *sd);
  54. void merc_load_exptables(void);
  55. char *merc_hom_skill_get_name(int id);
  56. void merc_damage(struct homun_data *hd,struct block_list *src,int hp,int sp);
  57. int merc_hom_dead(struct homun_data *hd, struct block_list *src);
  58. void merc_hom_skillup(struct homun_data *hd,int skillnum);
  59. int merc_hom_calc_skilltree(struct map_session_data *sd) ;
  60. int merc_hom_checkskill(struct map_session_data *sd,int skill_id) ;
  61. int merc_hom_gainexp(struct homun_data *hd,int exp) ;
  62. int merc_hom_levelup(struct homun_data *hd) ;
  63. int merc_hom_evolution(struct homun_data *hd) ;
  64. void merc_hom_heal(struct homun_data *hd,int hp,int sp);
  65. int merc_hom_vaporize(struct map_session_data *sd, int flag);
  66. int merc_revive_homunculus(struct map_session_data *sd, unsigned char per, short x, short y);
  67. void merc_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp);
  68. void merc_save(struct homun_data *hd);
  69. int merc_call_homunculus(struct map_session_data *sd, short x, short y);
  70. int merc_create_homunculus(struct map_session_data *sd, int class_);
  71. int search_homunculusDB_index(int key,int type);
  72. int merc_menu(struct map_session_data *sd,int menunum);
  73. int merc_hom_food(struct map_session_data *sd, struct homun_data *hd);
  74. int merc_hom_hungry_timer_delete(struct homun_data *hd);
  75. #define merc_stop_walking(hd, type) { if((hd)->ud.walktimer != -1) unit_stop_walking(&(hd)->bl, type); }
  76. #define merc_stop_attack(hd) { if((hd)->ud.attacktimer != -1) unit_stop_attack(&(hd)->bl); hd->ud.target = 0; }
  77. int read_homunculusdb(void);
  78. int merc_hom_increase_intimacy(struct homun_data * hd, unsigned int value);
  79. int merc_hom_decrease_intimacy(struct homun_data * hd, unsigned int value);
  80. int merc_skill_tree_get_max(int id, int b_class);
  81. void merc_hom_init_timers(struct homun_data * hd);