236 {
237 int color = 0x0AFFFFFF;
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 }
proto native CGame GetGame()