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

◆ OnDropReceivedFromHeader()

override void AttachmentCategoriesContainer::OnDropReceivedFromHeader ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected

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

398 {
399 ItemPreviewWidget iw = ItemPreviewWidget.Cast( w.FindAnyWidget("Render") );
400 if(!iw)
401 {
402 string name = w.GetName();
403 name.Replace("PanelWidget", "Render");
404 iw = ItemPreviewWidget.Cast( w.FindAnyWidget(name) );
405 }
406 if(!iw)
407 {
408 iw = ItemPreviewWidget.Cast( w );
409 }
410 if( !iw.GetItem() )
411 return;
412 if( m_Entity.GetInventory().CanAddAttachment( iw.GetItem() ) && iw.GetItem().GetInventory().CanRemoveEntity() )
413 {
414 GetGame().GetPlayer().PredictiveTakeEntityToTargetAttachment( m_Entity, iw.GetItem() );
415 }
416 else if( m_Entity.GetInventory().CanAddEntityToInventory( iw.GetItem() ) && iw.GetItem().GetInventory().CanRemoveEntity() )
417 {
418 GetGame().GetPlayer().PredictiveTakeEntityToTargetInventory( m_Entity, FindInventoryLocationType.ANY, iw.GetItem() );
419 }
420 }
EntityAI m_Entity
Определения ActionDebug.c:11
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17
proto native DayZPlayer GetPlayer()
proto native EntityAI GetItem()
proto native CGame GetGame()

Перекрестные ссылки GetGame(), ItemPreviewWidget::GetItem(), CGame::GetPlayer(), m_Entity, name, x и y.