summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-18 18:34:40 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-18 18:34:40 -0300
commit3edeb0f4d1461a5979d62496dc529025a6e75770 (patch)
tree07918c2813bec743ee0fdb29f63678169ca281f2
parente7ca648973cbb587901133a42c699d3358b53167 (diff)
downloadserverdata-3edeb0f4d1461a5979d62496dc529025a6e75770.tar.gz
serverdata-3edeb0f4d1461a5979d62496dc529025a6e75770.tar.bz2
serverdata-3edeb0f4d1461a5979d62496dc529025a6e75770.tar.xz
serverdata-3edeb0f4d1461a5979d62496dc529025a6e75770.zip
Malindou: Be more strict
-rw-r--r--npc/003-3/malindou.txt21
1 files changed, 11 insertions, 10 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 7ea8ac2f1..2cb33fcd0 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -552,18 +552,19 @@ OnInit:
// Fix Tolchi mess
if ($UPDATE < 1590616575) {
if ($UPDATE < 1587915715) {
- query_sql("UPDATE `inventory` SET `opt_val0` = '15', `opt_val1` = '5' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
- query_sql("UPDATE `cart_inventory` SET `opt_val0` = '15', `opt_val1` = '5' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
- query_sql("UPDATE `storage` SET `opt_val0` = '15', `opt_val1` = '5' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
- query_sql("UPDATE `guild_storage` SET `opt_val0` = '15', `opt_val1` = '5' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
- query_sql("UPDATE `rodex_items` SET `opt_val0` = '15', `opt_val1` = '5' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
- query_sql("UPDATE `auction` SET `opt_val0` = '15', `opt_val1` = '5' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ query_sql("UPDATE `inventory` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ query_sql("UPDATE `cart_inventory` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ query_sql("UPDATE `storage` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ query_sql("UPDATE `guild_storage` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ query_sql("UPDATE `rodex_items` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ query_sql("UPDATE `auction` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx0`='189' OR `opt_idx0`='200') AND (`opt_idx1`='189' OR `opt_idx1`='200') AND (`opt_val0` > '15' AND `opt_val1` > '15')");
}
- query_sql("UPDATE `inventory` SET `opt_val0` = '15', `opt_val1` = '5' WHERE (`opt_idx1`=`opt_idx2`) AND (`opt_val0` > '15' AND `opt_val1` > '15')");
- query_sql("UPDATE `storage` SET `opt_val0` = '15', `opt_val1` = '5' WHERE (`opt_idx1`=`opt_idx2`) AND (`opt_val0` > '15' AND `opt_val1` > '15')");
- query_sql("UPDATE `guild_storage` SET `opt_val0` = '15', `opt_val1` = '5' WHERE (`opt_idx1`=`opt_idx2`) AND (`opt_val0` > '15' AND `opt_val1` > '15')");
- query_sql("UPDATE `rodex_items` SET `opt_val0` = '15', `opt_val1` = '10' WHERE (`opt_idx1`=`opt_idx2`) AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ // Destroy duplicates (should not exist)
+ query_sql("UPDATE `inventory` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx1`=`opt_idx0`) AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ query_sql("UPDATE `storage` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx1`=`opt_idx0`) AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ query_sql("UPDATE `guild_storage` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx1`=`opt_idx0`) AND (`opt_val0` > '15' AND `opt_val1` > '15')");
+ query_sql("UPDATE `rodex_items` SET `opt_val0` = '15', `opt_val1` = '0', `opt_idx1` = '0' WHERE (`opt_idx1`=`opt_idx0`) AND (`opt_val0` > '15' AND `opt_val1` > '15')");
debugmes "";
debugmes "* Tolchi mess cleanup";
debugmes "";