Merge pull request #96 from ProGEEK/master

Notify base owners of base raid when grinding or hacking
This commit is contained in:
Jan Babor 2017-08-22 23:50:53 +02:00 committed by GitHub
commit e401fd6a9f
2 changed files with 16 additions and 0 deletions

View File

@ -22,6 +22,14 @@ _object = objectFromNetId ([_this, 0, "",[""]] call BIS_fnc_param);
if(isNull _object)exitWith{false}; if(isNull _object)exitWith{false};
_territory = _object call ExileClient_util_world_getTerritoryAtPosition;
_serverTime = time;
if(_serverTime > ((_territory getVariable ["ExileXM8MobileNotifiedTime",-1800]) + 1800))then
{
_territory call ExileServer_system_xm8_sendBaseRaid;
_territory setVariable ["ExileXM8MobileNotifiedTime", _serverTime];
};
if((_object getVariable ["ExAd_Grinding_progress", 0]) >= ExAd_GRINDING_OBJECT_MAX)then{ if((_object getVariable ["ExAd_Grinding_progress", 0]) >= ExAd_GRINDING_OBJECT_MAX)then{
_object setVariable ["ExileAccessCode", nil]; _object setVariable ["ExileAccessCode", nil];
_object setVariable ["ExileIsLocked", nil, true]; _object setVariable ["ExileIsLocked", nil, true];

View File

@ -44,6 +44,14 @@ if(isNil "ExAd_HACKS_IN_PROGRESS")then{
["Hacking", format["Hack started: Player - %1(%2)|Territory - %3|Hacks in motion - %4",name _player, getPlayerUID _player, _flag getVariable ["ExileTerritoryName", "Unknown"], ExAd_HACKS_IN_PROGRESS]] call ExAdServer_fnc_log; ["Hacking", format["Hack started: Player - %1(%2)|Territory - %3|Hacks in motion - %4",name _player, getPlayerUID _player, _flag getVariable ["ExileTerritoryName", "Unknown"], ExAd_HACKS_IN_PROGRESS]] call ExAdServer_fnc_log;
_territory = _flag call ExileClient_util_world_getTerritoryAtPosition;
_serverTime = time;
if(_serverTime > ((_territory getVariable ["ExileXM8MobileNotifiedTime",-1800]) + 1800))then
{
_territory call ExileServer_system_xm8_sendBaseRaid;
_territory setVariable ["ExileXM8MobileNotifiedTime", _serverTime];
};
_pos = _player modelToWorld [0, +0.5, 0]; _pos = _player modelToWorld [0, +0.5, 0];
_pos set [2,((getPosATL _player) select 2)]; _pos set [2,((getPosATL _player) select 2)];