From 276d5d8288a39b585e93bef8910f67138d779bf9 Mon Sep 17 00:00:00 2001 From: Brett Nordin Date: Sun, 26 Mar 2017 13:31:28 -0600 Subject: [PATCH] Changed T # Conflicts: # Examples/Example Mission File/Exile.Altis/Exile_Server_Overrides/ExileServer_object_construction_database_insert.sqf --- @ExileServer/extdb3-conf.ini | 26 +++++++++++ Exile Mission File/CfgExileCustomCode.cpp | 1 + .../ExileServer_system_process_noobFilter.sqf | 46 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 @ExileServer/extdb3-conf.ini create mode 100644 Exile Mission File/Exile_Server_Overrides/ExileServer_system_process_noobFilter.sqf diff --git a/@ExileServer/extdb3-conf.ini b/@ExileServer/extdb3-conf.ini new file mode 100644 index 0000000..a051f59 --- /dev/null +++ b/@ExileServer/extdb3-conf.ini @@ -0,0 +1,26 @@ +[Main] +Version = 1 + +Randomize Config File = false +;; Randomizes Config File after loading. +;; Recommend to turn on, if you have enabled filepatching on arma. + +Allow Reset = false +;; Allows 9:RESET, usefull for development work + +Thread = 0; +;; Option to force number of worker threads for extDB3. +;; Min = 2, Max = 6 + +[Log] +Flush = true; +;; Flush logfile after each update. +;; Option really only usefull if running DEBUG BUILD + + +[exile] +IP = DatabaseIp +Port = 3306 +Username = DatabaseUsername +Password = DatabasePassword +Database = DatabaseSchemaName diff --git a/Exile Mission File/CfgExileCustomCode.cpp b/Exile Mission File/CfgExileCustomCode.cpp index d905f43..dcec4ef 100644 --- a/Exile Mission File/CfgExileCustomCode.cpp +++ b/Exile Mission File/CfgExileCustomCode.cpp @@ -1,4 +1,5 @@ ExileServer_system_database_connect = "Exile_Server_Overrides\ExileServer_system_database_connect.sqf"; +ExileServer_system_process_noobFilter = "Exile_Server_Overrides\ExileServer_system_process_noobFilter.sqf"; ExileServer_world_initialize = "Exile_Server_Overrides\ExileServer_world_initialize.sqf"; ExileServer_util_time_uptime = "Exile_Server_Overrides\ExileServer_util_time_uptime.sqf"; ExileServer_util_time_currentTime = "Exile_Server_Overrides\ExileServer_util_time_currentTime.sqf"; diff --git a/Exile Mission File/Exile_Server_Overrides/ExileServer_system_process_noobFilter.sqf b/Exile Mission File/Exile_Server_Overrides/ExileServer_system_process_noobFilter.sqf new file mode 100644 index 0000000..4c26993 --- /dev/null +++ b/Exile Mission File/Exile_Server_Overrides/ExileServer_system_process_noobFilter.sqf @@ -0,0 +1,46 @@ +/** + * ExileServer_system_process_noobFilter + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_arsenal","_weaponClassNames","_className","_linkedItems","_i"]; +_arsenal = "true" configClasses (missionConfigFile >> "CfgExileArsenal"); +_weaponClassNames = []; +{ + _className = configName _x; + try + { + if (isClass (configFile >> "CfgWeapons" >> _className >> "LinkedItems")) then + { + _linkedItems = "true" configClasses (configFile >> "CfgWeapons" >> _className >> "LinkedItems"); + { + if (isText(_x >> "item")) then + { + if !((getText (_x >> "item")) isEqualTo "") then + { + throw true; + }; + }; + } + forEach _linkedItems; + }; + } + catch + { + _weaponClassNames pushBack _className; + }; +} +forEach _arsenal; +if ((count _weaponClassNames) > 0) then +{ + "You have weapons in your loot tables that spawn with attachments!" call ExileServer_util_log; + "This will allow duping and money farming!" call ExileServer_util_log; + "To solve this, please remove the following weapons from your loot tables and trader config OR replace them with their non-attachment equivalent:" call ExileServer_util_log; + format ["%1", _weaponClassNames] call ExileServer_util_log; +};