Trader menu cache fixes thx maca134 for the help!

This commit is contained in:
[VB]AWOL
2013-08-12 17:15:37 -05:00
parent f73bc14a5a
commit 3da1d8b6a4
2 changed files with 5 additions and 3 deletions

View File

@@ -26,13 +26,15 @@ if(isNil "_retrader") then {
_val = _result select 1;
//Stream Objects
diag_log ("HIVE: Commence Menu Streaming...");
call compile format["ServerTcache_%1 = [];",_traderid];
for "_i" from 1 to _val do {
_data = "HiveEXT" callExtension _key;
_result = call compile format ["%1",_data];
call compile format["ServerTcache_%1 set [count ServerTcache_%1,%2]",_traderid,_result];
_retrader set [count _retrader,_result];
};
//diag_log ("HIVE: Streamed " + str(_val) + " objects");
call compile format["ServerTcache_%1 = %2;",_traderid,_retrader];
};
};

View File

@@ -274,14 +274,14 @@ if (isServer and isNil "sm_done") then {
_val = _result select 1;
//Stream Objects
diag_log ("HIVE: Commence Menu Streaming...");
call compile format["ServerTcache_%1 = [];",_traderid];
for "_i" from 1 to _val do {
_data = "HiveEXT" callExtension _key;
_result = call compile format ["%1",_data];
_status = _result select 0;
call compile format["ServerTcache_%1 set [count ServerTcache_%1,%2]",_traderid,_result];
_retrader set [count _retrader,_result];
};
//diag_log ("HIVE: Streamed " + str(_val) + " objects");
call compile format["ServerTcache_%1 = %2;",_traderid,_retrader];
};
} forEach (_traderData select 0);