diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-28 17:12:22 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-28 17:12:22 +0000 |
commit | 1bedc59cb03ac68564d55a8e4e3b184d46a7656c (patch) | |
tree | c727c0c205ee81d21fa4a248d7e72597e7dce959 | |
parent | e4c1f576bf32e13a640670de3656765bfa966198 (diff) | |
download | hercules-1bedc59cb03ac68564d55a8e4e3b184d46a7656c.tar.gz hercules-1bedc59cb03ac68564d55a8e4e3b184d46a7656c.tar.bz2 hercules-1bedc59cb03ac68564d55a8e4e3b184d46a7656c.tar.xz hercules-1bedc59cb03ac68564d55a8e4e3b184d46a7656c.zip |
* Removed 'negative clrtype is used for skipping unauthed objects from saving' introduced in r9975, as it is no longer required/used (follow up to r12223).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14515 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 1 | ||||
-rw-r--r-- | src/map/unit.c | 49 |
2 files changed, 20 insertions, 30 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 10220dd42..f1fb43779 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -1,6 +1,7 @@ Date Added 2010/11/28 + * Removed 'negative clrtype is used for skipping unauthed objects from saving' introduced in r9975, as it is no longer required/used (follow up to r12223). [Ai4rei] * Made the party booking search pass results as array of pointers, rather than array of indexes, which require further lookup. [Ai4rei] * Replaced literal constants related to the party booking system with defines. [Ai4rei] * Fixed pets derived from immobile monsters not being able to walk (bugreport:3377, since r13789). [Ai4rei] diff --git a/src/map/unit.c b/src/map/unit.c index 65267ea7f..c6f50f819 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -650,7 +650,7 @@ int unit_warp(struct block_list *bl,short m,short x,short y,int type) if(bl->prev==NULL || !ud) return 1; - if (type < 0 || type == 1) + if (type == 1) //Type 1 is invalid, since you shouldn't warp a bl with the "death" //animation, it messes up with unit_remove_map! [Skotlex] return 1; @@ -2030,8 +2030,6 @@ void unit_free_pc(struct map_session_data *sd) /*========================================== * Function to free all related resources to the bl * if unit is on map, it is removed using the clrtype specified - * If clrtype is <0, no saving is performed. This is only for non-authed - * objects that shouldn't be on a map yet. *------------------------------------------*/ int unit_free(struct block_list *bl, int clrtype) { @@ -2138,15 +2136,12 @@ int unit_free(struct block_list *bl, int clrtype) aFree (pd->loot); pd->loot = NULL; } - if( clrtype >= 0 ) - { - if( pd->pet.intimate > 0 ) - intif_save_petdata(pd->pet.account_id,&pd->pet); - else - { //Remove pet. - intif_delete_petdata(pd->pet.pet_id); - if (sd) sd->status.pet_id = 0; - } + if( pd->pet.intimate > 0 ) + intif_save_petdata(pd->pet.account_id,&pd->pet); + else + { //Remove pet. + intif_delete_petdata(pd->pet.pet_id); + if (sd) sd->status.pet_id = 0; } if( sd ) sd->pd = NULL; @@ -2213,16 +2208,13 @@ int unit_free(struct block_list *bl, int clrtype) struct homun_data *hd = (TBL_HOM*)bl; struct map_session_data *sd = hd->master; merc_hom_hungry_timer_delete(hd); - if( clrtype >= 0 ) + if( hd->homunculus.intimacy > 0 ) + merc_save(hd); + else { - if( hd->homunculus.intimacy > 0 ) - merc_save(hd); - else - { - intif_homunculus_requestdelete(hd->homunculus.hom_id); - if( sd ) - sd->status.hom_id = 0; - } + intif_homunculus_requestdelete(hd->homunculus.hom_id); + if( sd ) + sd->status.hom_id = 0; } if( sd ) sd->hd = NULL; @@ -2232,16 +2224,13 @@ int unit_free(struct block_list *bl, int clrtype) { struct mercenary_data *md = (TBL_MER*)bl; struct map_session_data *sd = md->master; - if( clrtype >= 0 ) + if( mercenary_get_lifetime(md) > 0 ) + mercenary_save(md); + else { - if( mercenary_get_lifetime(md) > 0 ) - mercenary_save(md); - else - { - intif_mercenary_delete(md->mercenary.mercenary_id); - if( sd ) - sd->status.mer_id = 0; - } + intif_mercenary_delete(md->mercenary.mercenary_id); + if( sd ) + sd->status.mer_id = 0; } if( sd ) sd->md = NULL; |