summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCairoLee <cairoliyu@gmail.com>2013-05-30 20:40:56 +0800
committerCairoLee <cairoliyu@gmail.com>2013-05-30 20:40:56 +0800
commitf1936fb677d1b86164b455c67e539db15eb92d31 (patch)
treec4afdab969bf83079650a192d4e172deb5eab38e /src
parentb30c74a7733848f03e5defc238dca0e0cb044470 (diff)
downloadhercules-f1936fb677d1b86164b455c67e539db15eb92d31.tar.gz
hercules-f1936fb677d1b86164b455c67e539db15eb92d31.tar.bz2
hercules-f1936fb677d1b86164b455c67e539db15eb92d31.tar.xz
hercules-f1936fb677d1b86164b455c67e539db15eb92d31.zip
- Merge checkhomcall Script Command from rAthena
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 9a123705b..7e15b3372 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9795,6 +9795,31 @@ BUILDIN(homunculus_shuffle) {
return true;
}
+/*==========================================
+ * Check for homunculus state.
+ * Return: -1 = No homunculus
+ * 0 = Homunculus is active
+ * 1 = Homunculus is vaporized (rest)
+ * 2 = Homunculus is in morph state
+ *------------------------------------------*/
+BUILDIN(checkhomcall)
+{
+ TBL_PC *sd = script_rid2sd(st);
+ TBL_HOM *hd;
+
+ if( sd == NULL )
+ return false;
+
+ hd = sd->hd;
+
+ if( !hd )
+ script_pushint(st, -1);
+ else
+ script_pushint(st, hd->homunculus.vaporize);
+
+ return true;
+}
+
//These two functions bring the eA MAPID_* class functionality to scripts.
BUILDIN(eaclass)
{
@@ -17401,6 +17426,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF2(homunculus_evolution,"homevolution",""), //[orn]
BUILDIN_DEF2(homunculus_mutate,"hommutate","?"),
BUILDIN_DEF2(homunculus_shuffle,"homshuffle",""), //[Zephyrus]
+ BUILDIN_DEF(checkhomcall,""),
BUILDIN_DEF(eaclass,"?"), //[Skotlex]
BUILDIN_DEF(roclass,"i?"), //[Skotlex]
BUILDIN_DEF(checkvending,"?"),