DayZ 1.27
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( GetGame().GetPlayer() );
239 EntityAI itemInHand = player.GetHumanInventory().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
PlayerBase GetPlayer()
Определения ModifierBase.c:51
proto native CGame GetGame()

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