DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ColourLeatherClothes()

void Barrel_ColorBase::ColourLeatherClothes ( ItemBase color_source,
PlayerBase player,
string color )
inlineprotected

См. определение в файле Barrel_ColorBase.c строка 303

304 {
305 EntityAI item;
306 int item_count = GetInventory().GetCargo().GetItemCount();
307 string item_name = "";
308
309
310 for (int i = 0; i < item_count; i++)
311 {
312 item = GetInventory().GetCargo().GetItem(i);
313 if ( item.IsClothing() )
314 {
315 if ( GetGame().ObjectIsKindOf (item, "LeatherSack_Natural") )
316 {
317 item_name = "Bag_LeatherSack_"+color;
318 }
319 else if ( GetGame().ObjectIsKindOf (item, "LeatherStorageVest_Natural") )
320 {
321 item_name = "Vest_LeatherStorage_"+color;
322 }
323 else if ( GetGame().ObjectIsKindOf (item, "LeatherJacket_Natural") )
324 {
325 item_name = "Top_LeatherJacket_"+color;
326 }
327 else if ( GetGame().ObjectIsKindOf (item, "LeatherPants_Natural") )
328 {
329 item_name = "Pants_LeatherPants_"+color;
330 }
331 else if ( GetGame().ObjectIsKindOf (item, "LeatherMoccasinsShoes_Natural") )
332 {
333 item_name = "Shoes_LeatherMoccasins_"+color;
334 }
335 else if ( GetGame().ObjectIsKindOf (item, "LeatherHat_Natural") )
336 {
337 item_name = "Hat_Leather_"+color;
338 }
339 if ( item_name != "" )
340 {
341 TurnItemIntoItemLambda lambda = new TurnItemIntoItemLambda(item, item_name, player);
342 lambda.SetTransferParams(true, true, true);
343 player.ServerReplaceItemWithNew(lambda);
344 }
345 }
346 }
347 if ( item_name != "" )
348 {
349 Lock(20);
350 }
351 }
class LogManager EntityAI
void Lock(float actiontime)
Определения Barrel_ColorBase.c:165
proto native CGame GetGame()

Перекрестные ссылки GetGame() и Lock().

Используется в DetermineAction().