sync with DayZ 1.7.4 CE

This commit is contained in:
Aaron Clark
2012-11-10 08:02:49 -06:00
parent e9e55f912b
commit 039f1eb8da
36 changed files with 921 additions and 518 deletions

View File

@@ -19,6 +19,13 @@ if (_playerID == "") exitWith {
diag_log ("SETUP INIT FAILED: Exiting, no player ID: " + str(_playerObj));
};
private["_dummy"];
_dummy = getPlayerUID _playerObj;
if ( _playerID != _dummy ) then {
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
_playerID = _dummy;
};
//Variables
_worldspace = [];
_survival = [0,0,0];
@@ -244,22 +251,6 @@ _playerObj setVariable ["lastTime",time];
diag_log ("LOGIN PUBLISHING: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
myObj = objNull;
call compile format["myObj = player%1",_playerID];
if (!(isNull myObj)) then {
if (alive myObj) then {
deleteVehicle myObj;
diag_log ("LOGIN DUPLICATE PLAYER: " + str(_playerObj) + " DELETED ORIGINAL");
};
};
//Record player for management
myObj = _playerObj;
call compile format["player%1 = myObj;",_playerID];
//diag_log (format["player%1 = myObj",_playerID]);
//dayz_players set [count dayz_players,_playerObj];
dayzLogin = null;
dayzLogin2 = null;

View File

@@ -0,0 +1,33 @@
private["_type","_mUID","_deposit","_key","_result","_outcome","_balance","_uid"];
//[UID,_deposit,]
_mUID = _this select 0;
_deposit = _this select 1;
_type = _this select 2;
_player = _this select 3;
//GET DB ID
_key = format["CHILD:111:%1:%2:%3:",_mUID,_deposit,_type];
diag_log ("HIVE: WRITE: "+ str(_key));
_result = [_key] call server_hiveReadWrite;
_outcome = _result select 0;
if (_outcome == "PASS") then {
_msg = _result select 1;
_balance = _result select 2;
diag_log("BANK: Action msg:" + str(_msg) + " Balance:" + str(_player));
_clientID = owner _player;
dayzBankBalance = _balance;
_clientID publicVariableClient "dayzBankBalance";
diag_log ("PUBLISH BANK: Deposit " + str(_clientID) + " with " + str(_deposit));
};

View File

@@ -0,0 +1,41 @@
private["_type","_location","_clientID","_character","_tent","_traderid","_id","_outcome","_retrader"];
//[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
_character = _this select 0;
_traderid = _this select 1;
_retrader = [];
_clientID = owner _character;
diag_log ("HIVE: Menu Request by ClientID: "+ str(_clientID));
_key = format["CHILD:399:%1:",_traderid];
_data = "HiveEXT" callExtension _key;
diag_log "HIVE: Request sent";
//Process result
_result = call compile format ["%1",_data];
_status = _result select 0;
_myArray = [];
if (_status == "ObjectStreamStart") then {
_val = _result select 1;
//Stream Objects
diag_log ("HIVE: Commence Object Streaming...");
for "_i" from 1 to _val do {
_data = "HiveEXT" callExtension _key;
_result = call compile format ["%1",_data];
_status = _result select 0;
if (_status == "TRD") then {
_retrader set [count _retrader,_result];
};
//diag_log ("HIVE: Loop ");
};
//diag_log ("HIVE: Streamed " + str(_val) + " objects");
};
diag_log(_retrader);
dayzTraderMenuResult = _retrader;
_clientID publicVariableClient "dayzTraderMenuResult";
_retrader