From 3d4d6f6544a8331df8b32f5e6b6d5bd992313cf6 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Sat, 7 May 2016 13:24:27 -0400 Subject: [PATCH] Add SQL query for Precise Base Building 1.0.5 You only need to run this if v1.0.4 was installed on your server --- Server Files/SQL/1.0.6_Updates.sql | 31 +++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Server Files/SQL/1.0.6_Updates.sql b/Server Files/SQL/1.0.6_Updates.sql index f646acff8..377c019ff 100644 --- a/Server Files/SQL/1.0.6_Updates.sql +++ b/Server Files/SQL/1.0.6_Updates.sql @@ -382,4 +382,33 @@ UPDATE object_data SET Inventory = REPLACE(Inventory, 'Winchester1866', 'Winches -- UPDATE `Traders_DATA` SET `item` = '["bloodBagONEG",1]' WHERE `item` = '["ItemBloodbag",1]'; -- UPDATE character_data SET Backpack = REPLACE(Backpack, 'ItemBloodbag', 'bloodBagONEG') WHERE INSTR(Backpack, 'ItemBloodbag') > 0; -- UPDATE character_data SET Inventory = REPLACE(Inventory, 'ItemBloodbag', 'bloodBagONEG') WHERE INSTR(Inventory, 'ItemBloodbag') > 0; --- UPDATE object_data SET Inventory = REPLACE(Inventory, 'ItemBloodbag', 'bloodBagONEG') WHERE INSTR(Inventory, 'ItemBloodbag') > 0; \ No newline at end of file +-- UPDATE object_data SET Inventory = REPLACE(Inventory, 'ItemBloodbag', 'bloodBagONEG') WHERE INSTR(Inventory, 'ItemBloodbag') > 0; + + +-- ---------------------------- +-- Run to update to v1.0.5 of Precise Base Building by @Mikeeeyy only if you had v1.0.4 installed +-- ---------------------------- +-- DELIMITER ;; +-- CREATE FUNCTION `RemoveQuotes`(`ws` VARCHAR(128)) +-- RETURNS VARCHAR(128) +-- DETERMINISTIC +-- BEGIN +-- DECLARE dir VARCHAR(128); +-- DECLARE pos VARCHAR(128); +-- +-- IF SUBSTRING_INDEX(ws, '"', 4) = ws THEN +-- RETURN ws; +-- END IF; +-- +-- SET dir = TRIM(LEADING '["' FROM SUBSTRING_INDEX(ws, '"', 2)); +-- SET pos = TRIM(LEADING CONCAT('["', dir, '","') FROM SUBSTRING_INDEX(ws, '"', 4)); +-- +-- SET ws = REPLACE(ws, CONCAT('"', dir, '"'), dir); +-- SET ws = REPLACE(ws, CONCAT('"', pos, '"'), pos); +-- +-- RETURN ws; +--END;; +--DELIMITER ; +-- +--UPDATE object_data SET Worldspace = RemoveQuotes(Worldspace); +--DROP FUNCTION `RemoveQuotes`; \ No newline at end of file