Added mercenary and elemental objects support for getmapxy.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16326 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
766c527f0c
commit
66d5d750fe
@ -2766,7 +2766,10 @@ Type is the type of object to search for:
|
|||||||
0 - Character object
|
0 - Character object
|
||||||
1 - NPC object
|
1 - NPC object
|
||||||
2 - Pet object
|
2 - Pet object
|
||||||
3 - Monster object.
|
3 - Monster object
|
||||||
|
4 - Homunculus object
|
||||||
|
5 - Mercenary object
|
||||||
|
6 - Elemental object
|
||||||
|
|
||||||
While 3 is meant to look for a monster object, no searching will be done if you
|
While 3 is meant to look for a monster object, no searching will be done if you
|
||||||
specify type 3, and the function will always return -1.
|
specify type 3, and the function will always return -1.
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include "mail.h"
|
#include "mail.h"
|
||||||
#include "script.h"
|
#include "script.h"
|
||||||
#include "quest.h"
|
#include "quest.h"
|
||||||
|
#include "elemental.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -12370,6 +12371,8 @@ BUILDIN_FUNC(getsavepoint)
|
|||||||
* 2 - Pet coord
|
* 2 - Pet coord
|
||||||
* 3 - Mob coord (not released)
|
* 3 - Mob coord (not released)
|
||||||
* 4 - Homun coord
|
* 4 - Homun coord
|
||||||
|
* 5 - Mercenary coord
|
||||||
|
* 6 - Elemental coord
|
||||||
* CharName$ - Name object. If miss or "this" the current object
|
* CharName$ - Name object. If miss or "this" the current object
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
@ -12447,6 +12450,24 @@ BUILDIN_FUNC(getmapxy)
|
|||||||
if (sd && sd->hd)
|
if (sd && sd->hd)
|
||||||
bl = &sd->hd->bl;
|
bl = &sd->hd->bl;
|
||||||
break;
|
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:
|
default:
|
||||||
ShowWarning("script: buildin_getmapxy: Invalid type %d\n", type);
|
ShowWarning("script: buildin_getmapxy: Invalid type %d\n", type);
|
||||||
script_pushint(st,-1);
|
script_pushint(st,-1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user