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

◆ DropReceived()

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

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

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

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