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

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

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

73 {
74 EntityAI targetEntity = EntityAI.Cast(action_data.m_Target.GetObject());
75 if (!targetEntity)
76 {
77 ErrorEx("Cannot get entity=" + targetEntity);
78 return;
79 }
80
81 InventoryLocation target_IL = new InventoryLocation();
82 if (!targetEntity.GetInventory().GetCurrentInventoryLocation(target_IL))
83 {
84 ErrorEx("Cannot get inventory location of entity=" + targetEntity);
85 return;
86 }
87
88 // Dig out of stash
89 UndergroundStash stash;
90 if (Class.CastTo(stash, targetEntity))
91 {
92 ItemBase stashedItem = stash.GetStashedItem();
93 if (stashedItem)
94 {
95 DigOutStashLambda lambda(stash, "", action_data.m_Player);
96 action_data.m_Player.ServerReplaceItemWithNew(lambda);
97 }
98 else
99 g_Game.ObjectDelete(stash);
100 }
101
102 //Apply tool damage
103 MiscGameplayFunctions.DealEvinronmentAdjustedDmg(action_data.m_MainItem, action_data.m_Player, 10);
104 }
DayZGame g_Game
Определения DayZGame.c:3868
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения Building.c:6
InventoryLocation.
Определения InventoryLocation.c:29
ItemBase GetStashedItem()
Определения UndergroundStash.c:13
Определения InventoryItem.c:731
enum ShapeType ErrorEx
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки ActionData, Class::CastTo(), ErrorEx, g_Game и ItemBase::GetStashedItem().