HI!
Today i spent about 5hrs to totally rebuild CfgExileArsenal to be able to set all prices with few constans values. Then i noticed that items with calculations in price are unsaleable :((
So, here is fix for this if anyone want it.
class CfgExileCustomCode
{
ExileClient_util_gear_calculateSellPrice = "Exile_Client_Overrides\ExileClient_util_gear_calculateSellPrice.sqf";
};
ExileClient_util_gear_calculateSellPrice.sqf: (v2)
/**
* ExileClient_util_gear_calculateSellPrice
*
* Exile Mod
* exile.majormittens.co.uk
* © 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["_className", "_amount"];
_className = _this;
_amount = 0;
if(!isNull (missionConfigFile >> "CfgExileArsenal" >> _className >> "sellPrice"))then
{
_amount = getNumber (missionConfigFile >> "CfgExileArsenal" >> _className >> "sellPrice");
}
else
{
if(!isNull (missionConfigFile >> "CfgExileArsenal" >> _className >> "price")) then
{
_amount = getNumber (missionConfigFile >> "CfgExileArsenal" >> _className >> "price");
_amount = _amount * (getNumber (missionConfigFile >> "CfgTrading" >> "sellPriceFactor"));
_amount = (floor _amount) max 1;
};
};
_amount
Enjoy!
PS. Sorry if it's wrong forum to post it