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

◆ OnSuccess()

override void ReplaceWithNewReciveCargoLambda::OnSuccess ( EntityAI new_item)
inlineprotected

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

135 {
136 super.OnSuccess(new_item);
137
138 InventoryLocation src = new InventoryLocation;
139 m_ItemToCargo.GetInventory().GetCurrentInventoryLocation(src);
140 InventoryLocation dst = new InventoryLocation;
141
142 dst.SetCargo(new_item, m_ItemToCargo, 0,0,0,false);
143
144 if ( dst.IsValid() )
145 {
146 if(GetGame().IsDedicatedServer())
147 m_Player.ServerTakeToDst(src,dst);
148 else
149 m_Player.LocalTakeToDst(src,dst);
150
151 }
152 }
DayZPlayer m_Player
Определения Hand_Events.c:42
proto native bool IsValid()
verify current set inventory location
proto native void SetCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
sets current inventory location type to Cargo with coordinates (idx, row, col)
EntityAI m_ItemToCargo
Определения ActionPackGift.c:128
proto native CGame GetGame()

Перекрестные ссылки GetGame(), InventoryLocation::IsValid(), m_ItemToCargo, m_Player и InventoryLocation::SetCargo().