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

◆ OnFinishProgressServer()

override void ActionRestrainTarget::OnFinishProgressServer ( ActionData action_data)
inlineprivate

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

122 {
123 PlayerBase target_player = PlayerBase.Cast(action_data.m_Target.GetObject());
124 PlayerBase source_player = PlayerBase.Cast(action_data.m_Player);
125
126 if (CanReceiveAction(action_data.m_Target) && !target_player.IsRestrained())
127 {
128 EntityAI item_in_hands_target = target_player.GetHumanInventory().GetEntityInHands();
129 EntityAI item_in_hands_source = source_player.GetHumanInventory().GetEntityInHands();
130
131 if ( !item_in_hands_source )
132 {
133 Error("Restraining target failed, nothing in hands");
134 return;
135 }
136
137 string new_item_name = MiscGameplayFunctions.ObtainRestrainItemTargetClassname(item_in_hands_source);
138 if (item_in_hands_target)
139 {
140 ChainedDropAndRestrainLambda lambda2 = new ChainedDropAndRestrainLambda(item_in_hands_target, item_in_hands_target.GetType(), target_player, false, source_player);
141 MiscGameplayFunctions.TurnItemInHandsIntoItemEx(target_player, lambda2);
142 }
143 else
144 {
145 RestrainTargetPlayerLambda lambda = new RestrainTargetPlayerLambda(item_in_hands_source, new_item_name, target_player);
146 source_player.LocalReplaceItemInHandsWithNewElsewhere(lambda);
147 }
148 }
149 }
class LogManager EntityAI
void RestrainTargetPlayerLambda(EntityAI old_item, string new_item_type, PlayerBase player)
Определения ActionRestrainTarget.c:212
bool CanReceiveAction(ActionTarget target)
Определения ActionBase.c:793
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки ActionData, ActionBase::CanReceiveAction(), Error() и RestrainTargetPlayerLambda().