DayZ 1.27
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 строка 124

125 {
126 if (super.SetupAction(player, target, item, action_data, extra_data ))
127 {
128 WorldCraftActionData action_data_wc = WorldCraftActionData.Cast(action_data);
129
130 if (!GetGame().IsDedicatedServer()) // server synchs the recipe id through HandleReceiveData before this
131 action_data_wc.m_RecipeID = player.GetCraftingManager().GetRecipeID(m_VariantID);
132
133 PluginRecipesManager moduleRecipesManager;
134 Class.CastTo(moduleRecipesManager, GetPlugin(PluginRecipesManager));
135 moduleRecipesManager.IsRecipePossibleToPerform(action_data_wc.m_RecipeID, action_data_wc.m_MainItem, ItemBase.Cast(action_data_wc.m_Target.GetObject()), player); // sorts items server side, needed for anim selection
136
137 m_CommandUID = moduleRecipesManager.GetAnimationCommandUID(action_data_wc.m_RecipeID);
138
139 return true;
140 }
141 return false;
142 }
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
proto native CGame GetGame()

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