From f83fd90579f5258ff145f9685499b67c5cd1fc68 Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Thu, 26 Aug 2010 22:47:28 +0000 Subject: * instance_npcname will now error if the NPC being looked up is not found, care of ramsey. * delitem/2 will now send the close button when failing to find all neccecary items to delete. - Still do to, items should not be deleted as-found, and should be deleted once counted and in the event of delitem failure, nothing should be consumed. This is a design flaw in eathena, and should be fixed as soon as possible. * Implemented the Endless Tower instance. * Updated announces and dialogs in KVM. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14395 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index c0a44d90f..4304aeea7 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5721,6 +5721,7 @@ BUILDIN_FUNC(delitem) ShowError("script:delitem: failed to delete %d items (AID=%d item_id=%d).\n", amount, sd->status.account_id, nameid); st->state = END; + clif_scriptclose(sd, st->oid); return 1; } @@ -5819,6 +5820,7 @@ BUILDIN_FUNC(delitem2) ShowError("script:delitem2: failed to delete %d items (AID=%d item_id=%d).\n", amount, sd->status.account_id, nameid); st->state = END; + clif_scriptclose(sd, st->oid); return 1; } @@ -14193,7 +14195,11 @@ BUILDIN_FUNC(instance_npcname) script_pushconststr(st,npcname); } else - script_pushconststr(st,""); + { + ShowError("script:instance_npcname: invalid instance NPC (instance_id: %d, NPC name: \"%s\".)\n", instance_id, str); + st->state = END; + return 1; + } return 0; } -- cgit v1.2.3-60-g2f50