summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/functions/util.txt10
-rw-r--r--sql-files/main.sql1
2 files changed, 11 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 725c1723e..1190714e7 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -18,6 +18,16 @@ function script DelItemFromEveryPlayer {
query_sql("DELETE FROM `guild_storage` WHERE `nameid`="+getarg(0));
query_sql("DELETE FROM `rodex_items` WHERE `nameid`="+getarg(0));
query_sql("DELETE FROM `auction` WHERE `nameid`="+getarg(0));
+ debugmes "Deleting item %d", getarg(0);
+
+ // Del items which SQL can't reach
+ .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC);
+ for (.@i = 0; .@i < .@c; .@i++) {
+ .@am=countitem(getarg(0), .@players[.@i]);
+ if (.@am) debugmes "DELETE %d items from ACC %d", .@am, .@players[.@i];
+ if (.@am)
+ delitem(getarg(0), .@am, .@players[.@i]);
+ }
return;
}
diff --git a/sql-files/main.sql b/sql-files/main.sql
index bafe3265d..a6e6c1a06 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -60,6 +60,7 @@ CREATE TABLE IF NOT EXISTS `acc_reg_str_db` (
-- Table structure for table `auction`
--
+-- start_time end_time min_price(step)
CREATE TABLE IF NOT EXISTS `auction` (
`auction_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`seller_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',