diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..867a01fa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Server_Install_Pack/DB/dump.rdb \ No newline at end of file diff --git a/CREDITS.md b/CREDITS.md index d76b8cc5..6fd29361 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -36,7 +36,7 @@ Epoch Assets Mod Configs - Custom Units, Vehicles, Weapons, Items and more! #### Special Thanks! * [Bohemia Interactive](http://bistudio.com) for an incredible and versatile game engine. -* Top Donors: survivalservers.com, RC_Robio, gtxgaming, dean4310, KPABATOK +* Top Donors: survivalservers, RC_Robio, gtxgaming, dean4310, KPABATOK * [GTXGaming](http://www.gtxgaming.co.uk) - Dedicated Dev Server * [Survival Servers](https://www.survivalservers.com) - Dedicated Dev Server * [Vilayer](https://www.vilayer.com) - Dedicated Dev Server diff --git a/Changelogs/0.5.0.0.txt b/Changelogs/0.5.0.0.txt new file mode 100644 index 00000000..78c1d988 --- /dev/null +++ b/Changelogs/0.5.0.0.txt @@ -0,0 +1,13 @@ +[Added] 64-bit database extension support for windows servers. (EpochServer_x64.dll) +[Added] Custom event handler and OnEachFrame hooks added. https://github.com/Ignatz-HeMan/Epoch/tree/experimental/Sources/epoch_code/customs Thanks to @Ignatz-HeMan +[Added] Crafting recipe: Mortar (Uses: 12x Rock, 2x dirty water) (Requires: Fire and workbench within 3m). Thanks to @baaljayjay for the suggestion. +[Changed] Optimized database SET and SETEX calls in both SQF and c++. +[Changed] Optimized database GETRANGE call. +[Changed] To prevent issues with ownership only Group Leader can place a Jammer. Thanks to @Ignatz-HeMan +[Changed] Optimized NPC Trading and fixed abort issue if trade failed. Thanks to @Ignatz-HeMan +[Changed] Selling to traders with bank dept greater than -50000(default), pays the bank debt back to below the limit instead of the player. Purchasing is unaffected. Thanks to @Ignatz-HeMan +[Fixed] Wrong variable name in EPOCH_clientRevive.sqf. Thanks to @Ignatz-HeMan +[Fixed] Sometimes getting stuck only walking. Thanks to @Ignatz-HeMan +[Fixed] Repack of Energy Pack is now possible. +[Removed] EpochServer extension calls 100 and 101 as they are no longer needed. +[Info] Re-add missing comments in some config files. diff --git a/Server_Install_Pack/@epochhive/EpochServer.dll b/Server_Install_Pack/@epochhive/EpochServer.dll index c6ec5d9b..0f0742a0 100644 Binary files a/Server_Install_Pack/@epochhive/EpochServer.dll and b/Server_Install_Pack/@epochhive/EpochServer.dll differ diff --git a/Server_Install_Pack/@epochhive/EpochServer_x64.dll b/Server_Install_Pack/@epochhive/EpochServer_x64.dll index 3faa63f8..d08d46a4 100644 Binary files a/Server_Install_Pack/@epochhive/EpochServer_x64.dll and b/Server_Install_Pack/@epochhive/EpochServer_x64.dll differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo index ac422ef6..8d13e0a0 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo differ diff --git a/Server_Install_Pack/@epochhive/epochconfig.hpp b/Server_Install_Pack/@epochhive/epochconfig.hpp index 2203fa02..c45bbae9 100644 --- a/Server_Install_Pack/@epochhive/epochconfig.hpp +++ b/Server_Install_Pack/@epochhive/epochconfig.hpp @@ -77,7 +77,6 @@ expiresPlayer = "2592000"; // expiration date in seconds for players expiresBank = "7776000"; // expiration date in seconds for players bank expiresVehicle = "604800"; // expiration date in seconds for vehicles expiresAIdata = "604800"; // expiration date in seconds for NPC Trader inventory -hiveAsync = "true"; // true = asynchronous hive calls (non blocking), false = synchronous hive calls (blocking) // Admin Features hiveAdminCmdExec = "false"; // true = enables extra (To Be Released) feature to allow execution of code via hive. diff --git a/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf b/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf index 3a0348dc..477097c5 100644 --- a/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf +++ b/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf @@ -115,7 +115,7 @@ if (_slot != -1) then { }; }; } forEach _itemsIn; - + _response = ["Bank", _playerUID] call EPOCH_fnc_server_hiveGETRANGE; if ((_response select 0) == 1 && (_response select 1) isEqualType []) then { _bankData = _response select 1; @@ -130,7 +130,7 @@ if (_slot != -1) then { _message = _message + "Items sold, but the Money goes to your Bank - to much Bank-Debit"; } else { - _message = _message + "Putchase not possible - to much Bank-Debit"; + _message = _message + "Purchase not possible - to much Bank-Debit"; }; _current_crypto = _current_cryptoRaw; _tradeIn = 0; @@ -230,7 +230,7 @@ if (_slot != -1) then { _road = [getpos _player,100] call BIS_fnc_nearestRoad; if (!isnull _road) then { _position = getpos _road; - }; + }; }; }; // select available slot @@ -294,15 +294,15 @@ if (_slot != -1) then { }; } forEach _itemsOut; }; - - + + if !(_itemsIn isEqualTo []) then { if (_itemsIn isEqualTo _returnIn) then { _message = _message + "All Items sold"; } else { _message = _message + "Not all Items sold"; - }; + }; }; if !(_itemsOut isEqualTo []) then { if (_itemsOut isEqualTo _returnOut) then { @@ -316,7 +316,7 @@ if (_slot != -1) then { _message = _message + " / "; }; _message = _message + "Not all Items purchased"; - }; + }; }; _tradeTotal = _tradeIn + _tradeOut; diff --git a/Sources/epoch_server/init/server_variables.sqf b/Sources/epoch_server/init/server_variables.sqf index b0438802..d8a91bdc 100644 --- a/Sources/epoch_server/init/server_variables.sqf +++ b/Sources/epoch_server/init/server_variables.sqf @@ -54,7 +54,6 @@ _configArray = [ ["expiresBank", "7776000"], ["expiresVehicle", "604800"], ["expiresAIdata", "604800"], - ["hiveAsync", true], ["hiveAdminCmdExec", false], ["hiveAdminSavePlayerList", true], ["hiveAdminCmdTime", 5], diff --git a/Sources/epoch_server_core/build.hpp b/Sources/epoch_server_core/build.hpp index d5f7c047..5553f98d 100644 --- a/Sources/epoch_server_core/build.hpp +++ b/Sources/epoch_server_core/build.hpp @@ -1 +1 @@ -build=675; +build=678; diff --git a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveEXPIRE.sqf b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveEXPIRE.sqf index 9b3ce64d..a2a6c688 100644 --- a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveEXPIRE.sqf +++ b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveEXPIRE.sqf @@ -4,7 +4,7 @@ Contributors: Description: - Hive Expire + Hive Expire 130 sync, 131 async Licence: Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike @@ -12,7 +12,5 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveEXPIRE.sqf */ -private ["_call"]; params ["_prefix","_key","_expires"]; -_call = [130,131] select EPOCH_hiveAsync; -"epochserver" callExtension format ["%1|%2:%3|%4", _call, _prefix, _key, _expires]; +"epochserver" callExtension format ["%1|%2:%3|%4", 131, _prefix, _key, _expires]; diff --git a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveGETRANGE.sqf b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveGETRANGE.sqf index b0ba0b41..685df095 100644 --- a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveGETRANGE.sqf +++ b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveGETRANGE.sqf @@ -25,8 +25,8 @@ while {_hiveMakeCall} do { _hiveMakeCall = false; - // get 8k chars - _currentIndexMax = _currentIndex + 8000; + // get 10k chars + _currentIndexMax = _currentIndex + 10000; _hiveResponse = "epochserver" callExtension format["220|%1:%2|%3|%4", _prefix, _key, _currentIndex, (_currentIndexMax-1)]; if (_hiveResponse != "") then { @@ -46,8 +46,8 @@ while {_hiveMakeCall} do { // add data to string _hiveMessage = _hiveMessage + _data; - // if data returned is exactly 8k chars then we likely need to make another call - if (count _data == 8000) then{ + // if data returned is exactly 10k chars then we likely need to make another call + if (count _data == 10000) then{ _currentIndex = _currentIndexMax; _hiveMakeCall = true; }; diff --git a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveLog.sqf b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveLog.sqf index f60145d6..83044fc7 100644 --- a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveLog.sqf +++ b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveLog.sqf @@ -13,4 +13,4 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveLog.sqf */ params ["_prefix","_val"]; -"epochserver" callExtension format["701|%1|%2", _prefix, _val]; +"epochserver" callExtension ([701, _prefix, _val] joinString "|") diff --git a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSET.sqf b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSET.sqf index 69a69409..c9f7a3cc 100644 --- a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSET.sqf +++ b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSET.sqf @@ -4,7 +4,7 @@ Contributors: Florian Kinder Description: - Hive SET + Hive SET 110 sync, 111 async Licence: Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike @@ -12,36 +12,5 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSET.sqf */ -private ["_valueLength","_callStack","_call","_index","_charLimit"]; params ["_prefix","_key","_value"]; -_value = str (_value); -_valueLength = count _value; - -_call = [100,111] select EPOCH_hiveAsync; -_callStack = [110,101] select EPOCH_hiveAsync; - -_index = 0; -_charLimit = 8000; - -if (_valueLength > _charLimit) then{ - - if (isNil "EPOCH_hiveCallID") then{ - EPOCH_hiveCallID = 0; - } else { - if (EPOCH_hiveCallID > 1000) then{ - EPOCH_hiveCallID = 0; - }; - EPOCH_hiveCallID = EPOCH_hiveCallID + 1; - }; - - while {_valueLength > _charLimit} do { - _valueLength = _valueLength - _charLimit; - "epochserver" callExtension format["%1|%2:%3|%4|%5", _callStack, _prefix, _key, EPOCH_hiveCallID, _value select[_index, _charLimit]]; - _index = _index + _charLimit; - }; - - "epochserver" callExtension format["%1|%2:%3|%4|%5", _call, _prefix, _key, EPOCH_hiveCallID, _value select[_index, _charLimit]]; - -} else { - "epochserver" callExtension format["%1|%2:%3|%4|%5", _call, _prefix, _key, "", _value select[_index, _charLimit]]; -}; +"epochserver" callExtension ([111,([_prefix,_key] joinString ":"),"",_value] joinString "|") diff --git a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSETEX.sqf b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSETEX.sqf index 8dfa460b..2bc935bf 100644 --- a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSETEX.sqf +++ b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSETEX.sqf @@ -4,7 +4,7 @@ Contributors: Florian Kinder Description: - Hive SETEX + Hive SETEX 120 sync, 121 async Licence: Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike @@ -12,38 +12,5 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveSETEX.sqf */ - -private ["_prefix","_key","_expires","_value","_valueLength","_callStack","_call","_index","_charLimit"]; params ["_prefix","_key","_expires","_value"]; - -_value = str (_value); -_valueLength = count _value; - -_callStack = [100,101] select EPOCH_hiveAsync; -_call = [120,121] select EPOCH_hiveAsync; - -_index = 0; -_charLimit = 8000; - -if (_valueLength > _charLimit) then{ - - if (isNil "EPOCH_hiveCallID") then{ - EPOCH_hiveCallID = 0; - } else { - if (EPOCH_hiveCallID > 1000) then{ - EPOCH_hiveCallID = 0; - }; - EPOCH_hiveCallID = EPOCH_hiveCallID + 1; - }; - - while {_valueLength > _charLimit} do { - _valueLength = _valueLength - _charLimit; - "epochserver" callExtension format["%1|%2:%3|%4|%5", _callStack, _prefix, _key, EPOCH_hiveCallID, _value select[_index, _charLimit]]; - _index = _index + _charLimit; - }; - - "epochserver" callExtension format["%1|%2:%3|%4|%5|%6", _call, _prefix, _key, _expires, EPOCH_hiveCallID, _value select[_index, _charLimit]]; - -} else { - "epochserver" callExtension format["%1|%2:%3|%4|%5|%6", _call, _prefix, _key, _expires, "", _value select[_index, _charLimit]]; -}; +"epochserver" callExtension ([121,([_prefix,_key] joinString ":"),_expires,"",_value] joinString "|") diff --git a/build.txt b/build.txt index c154d1db..02879b38 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -675 +678