From d249227fa66b961329ddb09861004c83e2b11dab Mon Sep 17 00:00:00 2001 From: ebayShopper Date: Sat, 7 Apr 2018 14:37:24 -0400 Subject: [PATCH] Fix 45Rnd_545x39_RPK error with A2OA CorePatch update This magazine was removed in this commit: https://github.com/Goliath86/CorePatch/commit/fef9bcc The CorePatch data update was pushed to A2OA stable branch on March 27th, 2018. To avoid errors for this before Epoch 1.0.6.3 patch is released remove all instances of it from custom scripts, loot tables and trader files. Run the query below to remove all instances from the database. Fixes #2011 --- .../Category/FriendlyLightMachineGunAmmo.hpp | 5 ----- SQF/dayz_code/Configs/CfgWeapons/Rifles/AK74.hpp | 1 - SQF/dayz_code/Configs/CfgWeapons/Rifles/RPK74.hpp | 1 - .../R3F_Realism/R3F_Weight/Magazines/LMGAmmo.hpp | 4 ---- Server Files/SQL/1.0.6.3_Updates.sql | 13 +++++++++++++ 5 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 Server Files/SQL/1.0.6.3_Updates.sql diff --git a/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyLightMachineGunAmmo.hpp b/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyLightMachineGunAmmo.hpp index ccea08c6c..b62a346d0 100644 --- a/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyLightMachineGunAmmo.hpp +++ b/SQF/dayz_code/Configs/CfgServerTrader/Category/FriendlyLightMachineGunAmmo.hpp @@ -29,11 +29,6 @@ class Category_622 { buy[] = {2,"ItemGoldBar"}; sell[] = {1,"ItemGoldBar"}; }; - class 45Rnd_545x39_RPK { - type = "trade_items"; - buy[] = {1,"ItemGoldBar"}; - sell[] = {5,"ItemSilverBar10oz"}; - }; class 75Rnd_545x39_RPK { type = "trade_items"; buy[] = {2,"ItemGoldBar"}; diff --git a/SQF/dayz_code/Configs/CfgWeapons/Rifles/AK74.hpp b/SQF/dayz_code/Configs/CfgWeapons/Rifles/AK74.hpp index 800624a00..196a01ab5 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Rifles/AK74.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Rifles/AK74.hpp @@ -38,7 +38,6 @@ class AK74_Kobra_SD_DZ : AKS_74_UN_kobra { 30Rnd_545x39_AKSD, 30Rnd_545x39_AK, //Allow both SD and non-SD - 45Rnd_545x39_RPK, 75Rnd_545x39_RPK }; diff --git a/SQF/dayz_code/Configs/CfgWeapons/Rifles/RPK74.hpp b/SQF/dayz_code/Configs/CfgWeapons/Rifles/RPK74.hpp index b28c4bfe7..0a5e4d753 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Rifles/RPK74.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Rifles/RPK74.hpp @@ -7,7 +7,6 @@ class RPK74_Kobra_DZ : RPK_74 magazines[] = { 75Rnd_545x39_RPK, //75 was moved to first in array - 45Rnd_545x39_RPK, 30Rnd_545x39_AK, 30Rnd_545x39_AKSD }; diff --git a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/LMGAmmo.hpp b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/LMGAmmo.hpp index 02cfd9bdb..5eebb3d70 100644 --- a/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/LMGAmmo.hpp +++ b/SQF/dayz_code/external/R3F_Realism/R3F_Weight/Magazines/LMGAmmo.hpp @@ -31,10 +31,6 @@ class 75Rnd_545x39_RPK { weight = 1.25; }; -class 45Rnd_545x39_RPK -{ - weight = 1; -}; class 75Rnd_762x39_RPK { weight = 1.5; diff --git a/Server Files/SQL/1.0.6.3_Updates.sql b/Server Files/SQL/1.0.6.3_Updates.sql new file mode 100644 index 000000000..55a693014 --- /dev/null +++ b/Server Files/SQL/1.0.6.3_Updates.sql @@ -0,0 +1,13 @@ +/* + DayZ Epoch 1.0.6.3 Updates + + RUN THIS FILE IF UPDATING AN EXISTING 1062 DATABASE TO 1063. + NEW DATABASES SHOULD USE EPOCH.SQL INSTEAD. +*/ + + +/* 45Rnd_545x39_RPK was removed in the latest A2OA CorePatch */ +UPDATE `Traders_DATA` SET `item` = '["75Rnd_545x39_RPK",1]' WHERE `item` = '["45Rnd_545x39_RPK",1]'; +UPDATE character_data SET Backpack = REPLACE(Backpack, '"45Rnd_545x39_RPK"', '"75Rnd_545x39_RPK"') WHERE INSTR(Backpack, '"45Rnd_545x39_RPK"') > 0; +UPDATE character_data SET Inventory = REPLACE(Inventory, '"45Rnd_545x39_RPK"', '"75Rnd_545x39_RPK"') WHERE INSTR(Inventory, '"45Rnd_545x39_RPK"') > 0; +UPDATE object_data SET Inventory = REPLACE(Inventory, '"45Rnd_545x39_RPK"', '"75Rnd_545x39_RPK"') WHERE INSTR(Inventory, '"45Rnd_545x39_RPK"') > 0; \ No newline at end of file