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

◆ DropReceived()

void AttachmentCategoriesRow::DropReceived ( Widget w,
int x,
int y,
CargoContainer cargo )
inlineprotected

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

555 {
556 EntityAI item = GetItemPreviewItem( w );
557 if( !item )
558 {
559 return;
560 }
561
562 int idx = 0;
563 int c_x, c_y;
564
565 EntityAI target_entity;
566 CargoBase target_cargo;
567
568 target_entity = cargo.GetEntity();
569 if( target_entity )
570 {
571 target_cargo = target_entity.GetInventory().GetCargo();
572 }
573 else
574 return;
575
576 if( target_cargo && target_entity )
577 {
578 c_x = target_cargo.GetHeight();
579 c_y = target_cargo.GetWidth();
580 }
581 else
582 return;
583
584 InventoryLocation dst = new InventoryLocation;
585 dst.SetCargoAuto(target_cargo, item, x, y, item.GetInventory().GetFlipCargo());
586
587 if( c_x > x && c_y > y && target_entity.GetInventory().LocationCanAddEntity(dst))
588 {
589 PlayerBase player = PlayerBase.Cast( GetGame().GetPlayer() );
590
591 SplitItemUtils.TakeOrSplitToInventoryLocation( player, dst);
592
593 Icon icon = cargo.GetIcon( item );
594
595 if( icon )
596 {
597 icon.GetCursorWidget().SetColor( ColorManager.BASE_COLOR );
598 icon.RefreshPos( x, y );
599 icon.Refresh();
600 Refresh();
601 }
602 }
603 }
class LogManager EntityAI
Icon x
Icon y
PlayerBase GetPlayer()
Определения ModifierBase.c:51
override void Refresh()
Определения AttachmentCategoriesRow.c:625
EntityAI GetItemPreviewItem(Widget w)
Определения AttachmentCategoriesRow.c:605
proto native int GetWidth()
proto native int GetHeight()
Widget GetCursorWidget()
Определения Icon.c:88
override void Refresh()
Определения Icon.c:1216
void RefreshPos(int row, int column)
Определения Icon.c:1255
proto native void SetCargoAuto(notnull CargoBase cargo, EntityAI e, int row, int col, bool flip)
based on Cargo.IsProxyCargo uses SetProxyCargo or SetCargo respectively
proto native CGame GetGame()

Перекрестные ссылки ColorManager::BASE_COLOR, Icon::GetCursorWidget(), GetGame(), CargoBase::GetHeight(), GetItemPreviewItem(), GetPlayer(), CargoBase::GetWidth(), Refresh(), Icon::Refresh(), Icon::RefreshPos(), InventoryLocation::SetCargoAuto(), SplitItemUtils::TakeOrSplitToInventoryLocation(), x и y.