summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-28 17:12:22 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-28 17:12:22 +0000
commit1bedc59cb03ac68564d55a8e4e3b184d46a7656c (patch)
treec727c0c205ee81d21fa4a248d7e72597e7dce959 /src
parente4c1f576bf32e13a640670de3656765bfa966198 (diff)
downloadhercules-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
Diffstat (limited to 'src')
-rw-r--r--src/map/unit.c49
1 files changed, 19 insertions, 30 deletions
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;