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

◆ GetQuickbarItemColor()

override int InventoryGridController::GetQuickbarItemColor ( InventoryGrid grid,
InventoryItem item )
inlineprotected

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

236 {
237 int color = 0x0AFFFFFF;
238 PlayerBase player = PlayerBase.Cast( g_Game.GetPlayer() );
239 EntityAI itemInHand = player.GetEntityInHands();
240 if ( player && itemInHand == item )
241 {
242 if ( player.GetHumanInventory().FindUserReservedLocationIndex(item) != -1 || grid.CanAddItemInHandToInventory() )
243 color = InventoryGrid.ITEM_COLOR_QUICKBAR_H_GOOD;
244 else
245 color = InventoryGrid.ITEM_COLOR_QUICKBAR_H_BAD;
246 }
247 else if ( itemInHand )
248 {
249 if ( !grid.CanAddItemInHandToInventory() && !GameInventory.CanSwapEntitiesEx(item, itemInHand) )
250 color = InventoryGrid.ITEM_COLOR_QUICKBAR_I_BAD;
251 }
252 return color;
253 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:3942

Перекрестные ссылки GameInventory::CanSwapEntitiesEx() и g_Game.