From 0259ea31939be1ec56a47980256d67837158b3f2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Dec 2014 13:34:08 +0300 Subject: Remove script functions setpcsit/getpcsit. This functions duplicate upstream functions sit, stand, issit. --- src/map/init.c | 2 -- src/map/script.c | 59 -------------------------------------------------------- src/map/script.h | 2 -- 3 files changed, 63 deletions(-) (limited to 'src/map') diff --git a/src/map/init.c b/src/map/init.c index fb09b87..f78d4d2 100644 --- a/src/map/init.c +++ b/src/map/init.c @@ -84,8 +84,6 @@ HPExport void plugin_init (void) addScriptCommand("getmapmask", "s", getMapMask); addScriptCommand("getnpcclass", "*", getNpcClass); addScriptCommand("setnpcsex", "*", setNpcSex); - addScriptCommand("setpcsit", "*", setPcSit); - addScriptCommand("getpcsit", "*", getPcSit); addScriptCommand("showavatar", "*", showAvatar); addScriptCommand("setavatardir", "i", setAvatarDir); addScriptCommand("setavataraction", "i", setAvatarAction); diff --git a/src/map/script.c b/src/map/script.c index fd34aa7..9665773 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -666,65 +666,6 @@ BUILDIN(setNpcSex) return true; } -BUILDIN(setPcSit) -{ - TBL_PC *sd = NULL; - int state = 0; - - if (script_hasdata(st, 3)) - { - sd = map->nick2sd (script_getstr(st, 2)); - state = script_getnum(st, 3); - } - else if (script_hasdata(st, 2)) - { - sd = script->rid2sd(st); - state = script_getnum(st, 2); - } - else - { - return false; - } - if (!sd) - return false; - - if (state < 0) - state = 0; - if (state > 1) - state = 1; - - if (!state) - { - if (pc_issit(sd)) - { - pc->setstand(sd); - clif->standing(&sd->bl); - } - } - else if (!pc_issit (sd)) - { - sd->state.dead_sit = 2; - sd->vd.dead_sit = 2; - clif->sitting(&sd->bl); - } - return true; -} - -BUILDIN(getPcSit) -{ - TBL_PC *sd = NULL; - - if (script_hasdata(st, 2)) - sd = map->nick2sd (script_getstr(st, 2)); - else - sd = script->rid2sd(st); - if (!sd) - script_pushint(st, -1); - else - script_pushint(st, pc_issit (sd)); - return true; -} - BUILDIN(showAvatar) { int id = 0; diff --git a/src/map/script.h b/src/map/script.h index c329359..4c604a9 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -29,8 +29,6 @@ BUILDIN(addMapMask); BUILDIN(removeMapMask); BUILDIN(getNpcClass); BUILDIN(setNpcSex); -BUILDIN(setPcSit); -BUILDIN(getPcSit); BUILDIN(showAvatar); BUILDIN(setAvatarDir); BUILDIN(setAvatarAction); -- cgit v1.2.3-70-g09d2