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

◆ OnSuccess()

override void ReplaceWithNewReciveCargoLambda::OnSuccess ( EntityAI new_item)
inlineprotected

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

137 {
138 super.OnSuccess(new_item);
139
140 InventoryLocation src = new InventoryLocation;
141 m_ItemToCargo.GetInventory().GetCurrentInventoryLocation(src);
142 InventoryLocation dst = new InventoryLocation;
143
144 dst.SetCargo(new_item, m_ItemToCargo, 0,0,0,false);
145
146 if ( dst.IsValid() )
147 {
148 if(g_Game.IsDedicatedServer())
149 m_Player.ServerTakeToDst(src,dst);
150 else
151 m_Player.LocalTakeToDst(src,dst);
152
153 }
154 }
map m_Player
DayZGame g_Game
Определения DayZGame.c:3942
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:130

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