diff options
author | greenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-21 10:28:02 +0000 |
---|---|---|
committer | greenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-21 10:28:02 +0000 |
commit | 7cb15efd94f0b12cd269862888be653def1e3633 (patch) | |
tree | 0d1e2bda737205f2f0cc1e73d5c340a25b03c990 /src/map | |
parent | 830076271d4c670008744fa56951818757816a37 (diff) | |
download | hercules-7cb15efd94f0b12cd269862888be653def1e3633.tar.gz hercules-7cb15efd94f0b12cd269862888be653def1e3633.tar.bz2 hercules-7cb15efd94f0b12cd269862888be653def1e3633.tar.xz hercules-7cb15efd94f0b12cd269862888be653def1e3633.zip |
Added mercenary and elemental objects support for getmapxy.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16326 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index 8c3ce0e1f..f83264315 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -48,6 +48,7 @@ #include "mail.h" #include "script.h" #include "quest.h" +#include "elemental.h" #include <stdio.h> #include <stdlib.h> @@ -12370,6 +12371,8 @@ BUILDIN_FUNC(getsavepoint) * 2 - Pet coord * 3 - Mob coord (not released) * 4 - Homun coord + * 5 - Mercenary coord + * 6 - Elemental coord * CharName$ - Name object. If miss or "this" the current object * * Return: @@ -12447,6 +12450,24 @@ BUILDIN_FUNC(getmapxy) if (sd && sd->hd) bl = &sd->hd->bl; break; + case 5: //Get Mercenary Position + if(script_hasdata(st,6)) + sd=map_nick2sd(script_getstr(st,6)); + else + sd=script_rid2sd(st); + + if (sd && sd->md) + bl = &sd->md->bl; + break; + case 6: //Get Elemental Position + if(script_hasdata(st,6)) + sd=map_nick2sd(script_getstr(st,6)); + else + sd=script_rid2sd(st); + + if (sd && sd->ed) + bl = &sd->ed->bl; + break; default: ShowWarning("script: buildin_getmapxy: Invalid type %d\n", type); script_pushint(st,-1); |