summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-17 12:26:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-17 12:26:46 +0300
commitcbc5fbb5c063bfb64c2086a0e965adc60669cbdf (patch)
treecb1c3e32d7e02bd2d99b1f54728beb26da3f5c86
parent707ccaa19fa60aab91dec2b2394b4ff588e01f4e (diff)
downloadevol-hercules-cbc5fbb5c063bfb64c2086a0e965adc60669cbdf.tar.gz
evol-hercules-cbc5fbb5c063bfb64c2086a0e965adc60669cbdf.tar.bz2
evol-hercules-cbc5fbb5c063bfb64c2086a0e965adc60669cbdf.tar.xz
evol-hercules-cbc5fbb5c063bfb64c2086a0e965adc60669cbdf.zip
Remove script function getnpcclass because it already in upstream.
-rw-r--r--src/map/init.c1
-rw-r--r--src/map/script.c28
-rw-r--r--src/map/script.h1
3 files changed, 0 insertions, 30 deletions
diff --git a/src/map/init.c b/src/map/init.c
index 67a36dc..d84ed66 100644
--- a/src/map/init.c
+++ b/src/map/init.c
@@ -83,7 +83,6 @@ HPExport void plugin_init (void)
addScriptCommand("addmapmask", "si", addMapMask);
addScriptCommand("removemapmask", "si", removeMapMask);
addScriptCommand("getmapmask", "s", getMapMask);
- addScriptCommand("getnpcclass", "*", getNpcClass);
addScriptCommand("setnpcsex", "*", setNpcSex);
addScriptCommand("showavatar", "*", showAvatar);
addScriptCommand("setavatardir", "i", setAvatarDir);
diff --git a/src/map/script.c b/src/map/script.c
index 9665773..97e973d 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -600,34 +600,6 @@ BUILDIN(removeMapMask)
return true;
}
-BUILDIN(getNpcClass)
-{
- struct npc_data *nd = 0;
-
- if (script_hasdata(st, 2))
- {
- nd = npc->name2id (script_getstr(st, 2));
- }
- if (!nd && !st->oid)
- {
- script_pushint(st, -1);
- return false;
- }
-
- if (!nd)
- nd = (struct npc_data *) map->id2bl(st->oid);
-
- if (!nd)
- {
- script_pushint(st, -1);
- return false;
- }
-
- script_pushint(st, (int)nd->class_);
-
- return true;
-}
-
BUILDIN(setNpcSex)
{
struct npc_data *nd = NULL;
diff --git a/src/map/script.h b/src/map/script.h
index 4c604a9..988b57c 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -27,7 +27,6 @@ BUILDIN(setMapMask);
BUILDIN(getMapMask);
BUILDIN(addMapMask);
BUILDIN(removeMapMask);
-BUILDIN(getNpcClass);
BUILDIN(setNpcSex);
BUILDIN(showAvatar);
BUILDIN(setAvatarDir);