From a2e01e40c9e60b8b2d75e4faf41d80a7041e8f93 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 10 Oct 2013 18:19:16 -0300 Subject: Homun-S Quest Updated Partial Merge of 0b68607 Quest Changelog: - 1.2 Replaced with official script. [Euphy] Closes #177 Closes #178 Signed-off-by: shennetsind --- src/map/homunculus.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/map/homunculus.h') diff --git a/src/map/homunculus.h b/src/map/homunculus.h index 9562ed5c3..2cb558930 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -11,7 +11,7 @@ #define MAX_HOM_SKILL_REQUIRE 5 #define homdb_checkid(id) (id >= HM_CLASS_BASE && id <= HM_CLASS_MAX) -#define homun_alive(x) ((x) && (x)->homunculus.vaporize != 1 && (x)->battle_status.hp > 0) +#define homun_alive(x) ((x) && (x)->homunculus.vaporize == HOM_ST_ACTIVE && (x)->battle_status.hp > 0) struct h_stats { unsigned int HP, SP; @@ -44,6 +44,12 @@ enum { SP_HUNGRY = 0x2, }; +enum homun_state { + HOM_ST_ACTIVE = 0,/* either alive or dead */ + HOM_ST_REST = 1,/* is resting (vaporized) */ + HOM_ST_MORPH = 2,/* in morph state */ +}; + struct homun_data { struct block_list bl; struct unit_data ud; @@ -94,7 +100,7 @@ struct homunculus_interface { enum homun_type (*class2type) (int class_); void (*damaged) (struct homun_data *hd); int (*dead) (struct homun_data *hd); - int (*vaporize) (struct map_session_data *sd, int flag); + int (*vaporize) (struct map_session_data *sd, enum homun_state flag); int (*delete) (struct homun_data *hd, int emote); int (*checkskill) (struct homun_data *hd, uint16 skill_id); int (*calc_skilltree) (struct homun_data *hd, int flag_evolve); -- cgit v1.2.3-70-g09d2