summaryrefslogtreecommitdiff
path: root/src/emap
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-30 23:02:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-30 23:02:59 +0300
commitc5c81196bca1239e075ac434343b13f8c2cfc447 (patch)
tree313339a1cb0f78544947e9e6146b4d8fd3796beb /src/emap
parentb226c685421a78ddb8b7d3c29ec693fd9688e7db (diff)
downloadevol-hercules-c5c81196bca1239e075ac434343b13f8c2cfc447.tar.gz
evol-hercules-c5c81196bca1239e075ac434343b13f8c2cfc447.tar.bz2
evol-hercules-c5c81196bca1239e075ac434343b13f8c2cfc447.tar.xz
evol-hercules-c5c81196bca1239e075ac434343b13f8c2cfc447.zip
Remove script command countitemcolor. Now it same with countitem.
Diffstat (limited to 'src/emap')
-rw-r--r--src/emap/init.c1
-rw-r--r--src/emap/script.c38
-rw-r--r--src/emap/script.h1
3 files changed, 0 insertions, 40 deletions
diff --git a/src/emap/init.c b/src/emap/init.c
index 47c823d..757d66c 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -118,7 +118,6 @@ HPExport void plugin_init (void)
addScriptCommand("npcstand", "*", npcStand);
addScriptCommand("npcwalkto", "ii", npcWalkTo);
addScriptCommand("rif", "is*", rif);
- addScriptCommand("countitemcolor", "v*", countItemColor);
addScriptCommand("misceffect", "i*", miscEffect);
addScriptCommand("setmapmask", "si", setMapMask);
addScriptCommand("addmapmask", "si", addMapMask);
diff --git a/src/emap/script.c b/src/emap/script.c
index 6d879ce..a3ede58 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -958,44 +958,6 @@ BUILDIN(rif)
return true;
}
-BUILDIN(countItemColor)
-{
- int nameid, i;
- int count = 0;
- struct item_data* id = NULL;
- getSD();
-
- if (script_isstringtype(st, 2))
- {
- // item name
- id = itemdb->search_name(script_getstr(st, 2));
- }
- else
- {
- // item id
- id = itemdb->exists(script_getnum(st, 2));
- }
-
- if (id == NULL)
- {
- ShowError("buildin_countitem: Invalid item '%s'.\n", script_getstr(st,2)); // returns string, regardless of what it was
- script->reportsrc(st);
- script_pushint(st,0);
- return false;
- }
-
- nameid = id->nameid;
-
- for(i = 0; i < MAX_INVENTORY; i++)
- {
- if(sd->status.inventory[i].nameid == nameid)
- count += sd->status.inventory[i].amount;
- }
-
- script_pushint(st, count);
- return true;
-}
-
BUILDIN(miscEffect)
{
int type = script_getnum(st, 2);
diff --git a/src/emap/script.h b/src/emap/script.h
index d91cf9d..51618cb 100644
--- a/src/emap/script.h
+++ b/src/emap/script.h
@@ -31,7 +31,6 @@ BUILDIN(getq);
BUILDIN(setq);
BUILDIN(setNpcDir);
BUILDIN(rif);
-BUILDIN(countItemColor);
BUILDIN(miscEffect);
BUILDIN(setMapMask);
BUILDIN(getMapMask);