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

◆ SetupAction()

override bool ActionWorldCraft::SetupAction ( PlayerBase player,
ActionTarget target,
ItemBase item,
out ActionData action_data,
Param extra_data = NULL )
inlineprivate

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

127 {
128 if (super.SetupAction(player, target, item, action_data, extra_data ))
129 {
130 WorldCraftActionData action_data_wc = WorldCraftActionData.Cast(action_data);
131
132 if (!GetGame().IsDedicatedServer()) // server synchs the recipe id through HandleReceiveData before this
133 action_data_wc.m_RecipeID = player.GetCraftingManager().GetRecipeID(m_VariantID);
134
135 PluginRecipesManager moduleRecipesManager;
136 Class.CastTo(moduleRecipesManager, GetPlugin(PluginRecipesManager));
137
138 RecipeAnimationInfo recipeAnimationInfo = moduleRecipesManager.GetRecipeAnimationInfo(action_data_wc.m_RecipeID, player, action_data_wc.m_MainItem, ItemBase.Cast(action_data_wc.m_Target.GetObject()));
139
140 action_data_wc.m_AnimationID = recipeAnimationInfo.m_AnimationUID;
141 action_data_wc.m_ShowItem = recipeAnimationInfo.m_ItemVisible;
142
143 m_CommandUID = action_data_wc.m_AnimationID;
144
145 return true;
146 }
147 return false;
148 }
class GP5GasMask extends MaskBase ItemBase
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
int m_VariantID
Определения ActionBase.c:68
int m_CommandUID
Определения AnimatedActionBase.c:143
bool m_ItemVisible
Определения RecipeBase.c:9
int m_AnimationUID
Определения RecipeBase.c:8
proto native CGame GetGame()

Перекрестные ссылки ActionData, ActionTarget(), Class::CastTo(), GetGame(), GetPlugin(), RecipeAnimationInfo::m_AnimationUID, AnimatedActionBase::m_CommandUID, RecipeAnimationInfo::m_ItemVisible и ActionBase::m_VariantID.