Notify base owners of base raid when grinding or hacking

This commit is contained in:
Ryan Davies 2017-08-23 09:20:24 +12:00
parent 696417c204
commit 99debcb7c4
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};
_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{
_object setVariable ["ExileAccessCode", nil];
_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;
_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 set [2,((getPosATL _player) select 2)];