summaryrefslogtreecommitdiff
path: root/src/map/mercenary.h
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-26 04:50:15 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-26 04:50:15 +0000
commitbb7124295a174b43af7bfe88eda500b13f73bb62 (patch)
tree58b5ba364699545f6287338b66e5eee9ae5c1a08 /src/map/mercenary.h
parent2fa3554e3fb5dbc9227d343e667e6d6cd5423d1b (diff)
downloadhercules-bb7124295a174b43af7bfe88eda500b13f73bb62.tar.gz
hercules-bb7124295a174b43af7bfe88eda500b13f73bb62.tar.bz2
hercules-bb7124295a174b43af7bfe88eda500b13f73bb62.tar.xz
hercules-bb7124295a174b43af7bfe88eda500b13f73bb62.zip
Reverted all mercenary changes to mapserver homunculus code
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13135 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.h')
-rw-r--r--src/map/mercenary.h94
1 files changed, 68 insertions, 26 deletions
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index bc2046dc7..88692b4d1 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -7,42 +7,84 @@
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
-struct s_mercenary_db {
- int class_;
- char sprite[NAME_LENGTH], name[NAME_LENGTH];
- unsigned short lv;
- short range2, range3;
- struct status_data status;
- struct view_data vd;
- struct {
- unsigned short id, lv;
- } skill[MAX_MERCSKILL];
+struct h_stats {
+ unsigned int HP, SP;
+ unsigned short str, agi, vit, int_, dex, luk;
+};
+
+struct s_homunculus_db {
+ int base_class, evo_class;
+ char name[NAME_LENGTH];
+ struct h_stats base, gmin, gmax, emin, emax;
+ int foodID ;
+ int baseASPD ;
+ long hungryDelay ;
+ unsigned char element, race, base_size, evo_size;
+};
+
+extern struct s_homunculus_db homuncumlus_db[MAX_HOMUNCULUS_CLASS];
+enum { HOMUNCULUS_CLASS, HOMUNCULUS_FOOD };
+enum {
+ SP_ACK = 0x00,
+ SP_INTIMATE = 0x100,
+ SP_HUNGRY = 0x200
};
-extern struct s_mercenary_db mercenary_db[MAX_MERCENARY_CLASS];
-struct mercenary_data {
+struct homun_data {
struct block_list bl;
- struct unit_data ud;
+ struct unit_data ud;
struct view_data *vd;
struct status_data base_status, battle_status;
struct status_change sc;
struct regen_data regen;
+ struct s_homunculus_db *homunculusDB; //[orn]
+ struct s_homunculus homunculus ; //[orn]
- struct s_mercenary_db *db;
- struct s_mercenary mercenary;
-
- struct map_session_data *master;
- int contract_timer;
+ struct map_session_data *master; //pointer back to its master
+ int hungry_timer; //[orn]
+ unsigned int exp_next;
+ char blockskill[MAX_SKILL]; // [orn]
};
-bool merc_class(int class_);
-struct view_data * merc_get_viewdata(int class_);
-int merc_create(struct map_session_data *sd, int class_, unsigned int lifetime);
-int merc_data_received(struct s_mercenary *merc, bool flag);
-int mercenary_save(struct mercenary_data *md);
-int do_init_mercenary(void);
-int merc_delete(struct mercenary_data *md, int reply);
-void merc_contract_stop(struct mercenary_data *md);
+
+#define homdb_checkid(id) (id >= HM_CLASS_BASE && id <= HM_CLASS_MAX)
+
+// merc_is_hom_alive(struct homun_data *)
+#define merc_is_hom_active(x) (x && x->homunculus.vaporize != 1 && x->battle_status.hp > 0)
+int do_init_merc(void);
+int merc_hom_recv_data(int account_id, struct s_homunculus *sh, int flag); //albator
+struct view_data* merc_get_hom_viewdata(int class_);
+void merc_damage(struct homun_data *hd,struct block_list *src,int hp,int sp);
+int merc_hom_dead(struct homun_data *hd, struct block_list *src);
+void merc_hom_skillup(struct homun_data *hd,int skillnum);
+int merc_hom_calc_skilltree(struct homun_data *hd) ;
+int merc_hom_checkskill(struct homun_data *hd,int skill_id) ;
+int merc_hom_gainexp(struct homun_data *hd,int exp) ;
+int merc_hom_levelup(struct homun_data *hd) ;
+int merc_hom_evolution(struct homun_data *hd) ;
+void merc_hom_heal(struct homun_data *hd,int hp,int sp);
+int merc_hom_vaporize(struct map_session_data *sd, int flag);
+int merc_resurrect_homunculus(struct map_session_data *sd, unsigned char per, short x, short y);
+void merc_hom_revive(struct homun_data *hd, unsigned int hp, unsigned int sp);
+void merc_reset_stats(struct homun_data *hd);
+int merc_hom_shuffle(struct homun_data *hd); // [Zephyrus]
+void merc_save(struct homun_data *hd);
+int merc_call_homunculus(struct map_session_data *sd);
+int merc_create_homunculus_request(struct map_session_data *sd, int class_);
+int search_homunculusDB_index(int key,int type);
+int merc_menu(struct map_session_data *sd,int menunum);
+int merc_hom_food(struct map_session_data *sd, struct homun_data *hd);
+int merc_hom_hungry_timer_delete(struct homun_data *hd);
+int merc_hom_change_name(struct map_session_data *sd,char *name);
+int merc_hom_change_name_ack(struct map_session_data *sd, char* name, int flag);
+#define merc_stop_walking(hd, type) unit_stop_walking(&(hd)->bl, type)
+#define merc_stop_attack(hd) unit_stop_attack(&(hd)->bl)
+int merc_hom_increase_intimacy(struct homun_data * hd, unsigned int value);
+int merc_hom_decrease_intimacy(struct homun_data * hd, unsigned int value);
+int merc_skill_tree_get_max(int id, int b_class);
+void merc_hom_init_timers(struct homun_data * hd);
+void merc_skill_reload(void);
+void merc_reload(void);
#endif /* _MERCENARY_H_ */