summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-20 18:30:05 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-20 18:30:05 +0000
commit54a7f124543239c98d696da37c91eb5e2e99b25d (patch)
tree03c1c0d7148de31a112f2c3d82c7eabf910dd351 /src/map/unit.c
parent1893d0bc7b07a362ac6efcd8de4af056544bad3a (diff)
downloadhercules-54a7f124543239c98d696da37c91eb5e2e99b25d.tar.gz
hercules-54a7f124543239c98d696da37c91eb5e2e99b25d.tar.bz2
hercules-54a7f124543239c98d696da37c91eb5e2e99b25d.tar.xz
hercules-54a7f124543239c98d696da37c91eb5e2e99b25d.zip
- Fixed Charge Atk being able to go through chasm/pits.
- Moved the homunculus DB information from the player structure to the homun structure. Modified the homunculus creation packets to hold this information during creation, also, all initial values are handled by the map-server, the char server only assigns it a homun ID. - Removed target_id/attacked_id from homun_data as it wasn't really used. - Codes cleanup (removing of commented code mostly) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9031 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index b7f42447e..38589b8e0 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -666,6 +666,9 @@ int unit_can_move(struct block_list *bl)
if (DIFF_TICK(ud->canmove_tick, gettick()) > 0)
return 0;
+ if (status_isdead(bl))
+ return 0;
+
if (sd && (
pc_issit(sd) ||
sd->state.blockedmove
@@ -1633,7 +1636,7 @@ int unit_remove_map(struct block_list *bl, int clrtype) {
} else if (bl->type == BL_HOM) {
struct homun_data *hd = (struct homun_data *) bl;
struct map_session_data *sd = hd->master;
- if(!sd || !sd->homunculus.intimacy)
+ if(!sd || !hd->homunculus.intimacy)
{ //He's going to be deleted.
clif_emotion(bl, 28) ; //sob
clif_clearchar_area(bl,clrtype);
@@ -1818,17 +1821,14 @@ int unit_free(struct block_list *bl, int clrtype) {
struct map_session_data *sd = hd->master;
// Desactive timers
merc_hom_hungry_timer_delete(hd);
- if(sd) {
- if (sd->homunculus.intimacy > 0)
- merc_save(hd);
- else
- {
- intif_homunculus_requestdelete(sd->homunculus.hom_id) ;
- sd->status.hom_id = 0;
- sd->homunculus.hom_id = 0;
- }
- sd->hd = NULL;
+ if (hd->homunculus.intimacy > 0)
+ merc_save(hd);
+ else
+ {
+ intif_homunculus_requestdelete(hd->homunculus.hom_id);
+ if (sd) sd->status.hom_id = 0;
}
+ if(sd) sd->hd = NULL;
}
skill_clear_unitgroup(bl);