summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-18 13:25:21 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-18 13:25:21 +0000
commitff6317b65b37c6439076afd810193baf893b3611 (patch)
tree90117e8581813a31fd9ffefa858fc1a0543debe0 /src/map/status.c
parent625630e64fe10dd9d46b87c742efbf47bff497da (diff)
downloadhercules-ff6317b65b37c6439076afd810193baf893b3611.tar.gz
hercules-ff6317b65b37c6439076afd810193baf893b3611.tar.bz2
hercules-ff6317b65b37c6439076afd810193baf893b3611.tar.xz
hercules-ff6317b65b37c6439076afd810193baf893b3611.zip
- Added a proper check to make aggressive mobs never override homun targets regardless of distance.
- Removed a bunch of homun-related variables that are not needed at all. The alive condition is removed, now the code checks for the hp value to know if the homun is alive or not. - Cleaned up a bit the skill-id function, homun skill checks (such as delay and skill-lv learned) should be correct now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7727 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c54
1 files changed, 14 insertions, 40 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 613471116..41a054f24 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2150,49 +2150,23 @@ int status_calc_homunculus(struct homun_data *hd, int first)
memcpy(&b_status, &hd->base_status, sizeof(struct status_data));
status = &hd->base_status;
- status->def_ele = b_status.def_ele = hd->homunculusDB->element ; //[orn]
- status->ele_lv = b_status.ele_lv = 1 ; //[orn]
- status->race = b_status.race = hd->homunculusDB->race ; //[orn]
- status->size = b_status.size = hd->homunculusDB->size ; //[orn]
- status->rhw.range = b_status.rhw.range = 1 + hd->homunculusDB->size ; //[orn]
- status->mode = b_status.mode = MD_CANMOVE|MD_CANATTACK|MD_ASSIST|MD_AGGRESSIVE|MD_CASTSENSOR; //[orn]
- status->speed = b_status.speed = DEFAULT_WALK_SPEED;
- status->aspd_rate = b_status.aspd_rate = 1000;
-
- merc_hom_calc_skilltree(hd->master); //
-
- status_cpy(&b_status, status);
+ status->def_ele = hd->homunculusDB->element ; //[orn]
+ status->ele_lv = 1 ; //[orn]
+ status->race = hd->homunculusDB->race ; //[orn]
+ status->size = hd->homunculusDB->size ; //[orn]
+ status->rhw.range = 1 + hd->homunculusDB->size ; //[orn]
+ status->mode = MD_CANMOVE|MD_CANATTACK|MD_ASSIST|MD_AGGRESSIVE|MD_CASTSENSOR; //[orn]
+ status->speed = DEFAULT_WALK_SPEED;
+ status->aspd_rate = 1000;
+
+ merc_hom_calc_skilltree(hd->master);
+
+ status_cpy(&hd->battle_status, status);
status_calc_misc(status, hd->master->homunculus.level);
status_calc_bl(&hd->bl, SCB_ALL); //Status related changes.
- if ( (b_status.str != status->str) ||
- (b_status.agi != status->agi) ||
- (b_status.vit != status->vit) ||
- (b_status.int_ != status->int_) ||
- (b_status.dex != status->dex) ||
- (b_status.luk != status->luk) ||
- (b_status.hit != status->hit) ||
- (b_status.flee != status->flee) ||
- (b_status.amotion != status->amotion) ||
- (b_status.rhw.atk != status->rhw.atk) ||
- (b_status.def != status->def) ||
- (b_status.rhw.atk2 != status->rhw.atk2) ||
- (b_status.def2 != status->def2) ||
- (b_status.flee2 != status->flee2) ||
- (b_status.cri != status->cri) ||
- (b_status.matk_max != status->matk_max) ||
- (b_status.matk_min != status->matk_min) ||
- (b_status.mdef != status->mdef) ||
- (b_status.mdef2 != status->mdef2) ||
- (b_status.rhw.range != status->rhw.range) ||
- (b_status.max_hp != status->max_hp) ||
- (b_status.max_sp != status->max_sp) ||
- (b_status.hp != status->hp) ||
- (b_status.sp != status->sp)
- )
- {
- clif_hominfo(hd->master,0) ;
- }
+ if (memcmp(&b_status, status, sizeof(struct status_data)))
+ clif_hominfo(hd->master,0) ;
return 1;
}