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

◆ AddActionJuncture()

bool ActionBase::AddActionJuncture ( ActionData action_data)
inlineprotected

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

1055 {
1056 bool accepted = true;
1057 if (HasTarget())
1058 {
1059 EntityAI targetEntity;
1060 if (EntityAI.CastTo(targetEntity,action_data.m_Target.GetObject()))
1061 {
1062 if (IsLockTargetOnUse())
1063 {
1064 InventoryLocation targetIl = new InventoryLocation();
1065 targetEntity.GetInventory().GetCurrentInventoryLocation(targetIl);
1066
1067 //Lock target
1068 if (!GetGame().AddInventoryJunctureEx(action_data.m_Player, targetEntity, targetIl, true, 10000))
1069 {
1070 accepted = false;
1071 }
1072 else
1073 {
1074 action_data.m_ReservedInventoryLocations.Insert(targetIl);
1075 }
1076 }
1077 }
1078 }
1079
1080 return accepted;
1081 }
class LogManager EntityAI
bool HasTarget()
Определения ActionBase.c:244
bool IsLockTargetOnUse()
Определения ActionBase.c:99
proto native CGame GetGame()

Перекрестные ссылки ActionData, GetGame(), HasTarget() и IsLockTargetOnUse().

Используется в ActionWorldCraft::OnFinishProgressServer() и ActionManagerServer::StartDeliveredAction().