summaryrefslogtreecommitdiff
path: root/src/emap/script.c
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/script.c
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/script.c')
-rw-r--r--src/emap/script.c38
1 files changed, 0 insertions, 38 deletions
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);