summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-15 17:47:44 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-15 17:47:44 +0000
commit4be6ca0c2b518877d58d21aa9e61cb94322d0a02 (patch)
treeb768071951d22c8982b5138bedc8ccdb8f06cf78 /src/map/mercenary.c
parente8dd3b47a2ba4537db07c9a1b693d3ed99c75ff2 (diff)
downloadhercules-4be6ca0c2b518877d58d21aa9e61cb94322d0a02.tar.gz
hercules-4be6ca0c2b518877d58d21aa9e61cb94322d0a02.tar.bz2
hercules-4be6ca0c2b518877d58d21aa9e61cb94322d0a02.tar.xz
hercules-4be6ca0c2b518877d58d21aa9e61cb94322d0a02.zip
- Updated the char save structure for char-TXT servers so that the homun id will be saved, now also the map info (last point, save point, memo maps) are now saved using the mapindex rather than the string. BACKUP BEFORE UPDATING since this code isn't yet tested.
- Cleaned up a bit the char-saving code, added overflow crash prevention in case there are more memos than the max-allowed saved. - AM_CALLHOMUN can now be used to recall vaporized homuns. - AM_RESURRECTHOMUN will now fail when the homun is vaporized. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8295 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 589f5c6ff..892bffd47 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -832,8 +832,7 @@ int merc_call_homunculus(struct map_session_data *sd, short x, short y)
if (!sd->status.hom_id) //Create a new homun.
return merc_create_homunculus(sd, 6000 + rand(1, 8)) ;
- //Recall homunculus to you.
- if (sd->homunculus.vaporize)
+ if (!sd->homunculus.vaporize)
return 0; //Can't use this when homun was vaporized.
// If homunc not yet loaded, load it
@@ -841,6 +840,7 @@ int merc_call_homunculus(struct map_session_data *sd, short x, short y)
merc_hom_create(sd);
hd = sd->hd;
+ sd->homunculus.vaporize = 0;
if (hd->bl.prev == NULL)
{ //Spawn him
hd->bl.x = x;
@@ -937,7 +937,7 @@ int merc_revive_homunculus(struct map_session_data *sd, unsigned char per, short
{
struct homun_data *hd;
nullpo_retr(0, sd);
- if (!sd->status.hom_id)
+ if (!sd->status.hom_id || sd->homunculus.vaporize)
return 0;
if (!sd->hd) //Load homun data;