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

◆ SetInventoryCraft()

bool CraftingManager::SetInventoryCraft ( int recipeID,
ItemBase item1,
ItemBase item2 )
inlineprivate

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

137 {
138 int recipeCount = m_recipesManager.GetValidRecipes(item1,item2,m_recipes, m_player);
139
140 for ( int i = 0; i < recipeCount; i++ )
141 {
142 if (recipeID == -1 || m_recipes.Get(i) == recipeID)
143 {
144 if ( m_recipesManager.GetIsInstaRecipe(m_recipes.Get(i)) || m_recipesManager.IsEnableDebugCrafting() )
145 {
146 Param craftParam = new Param3<int, ItemBase, ItemBase>(m_recipes.Get(i), item1, item2);
147 m_player.RPCSingleParam(ERPCs.RPC_CRAFTING_INVENTORY_INSTANT, craftParam, true, m_player.GetIdentity());
148 return true;
149 }
150 else
151 {
153 m_recipeCount = recipeCount;
155 m_item1 = item1;
156 m_item2 = item2;
157 m_recipeID = m_recipes.Get(i);
158
159 ActionManagerClient am = ActionManagerClient.Cast(m_player.GetActionManager());
160
161 if ( m_player.GetItemInHands() == item1) am.SetInventoryAction( am.GetAction(ActionWorldCraft), item2, item1);
162 else am.SetInventoryAction( am.GetAction(ActionWorldCraft), item1, item2);
163
164 return true;
165 }
166 }
167
168 }
169 return false;
170 }
ERPCs
Определения ERPCs.c:2
void SetInventoryAction(ActionBase action_name, ItemBase target_item, ItemBase main_item)
Определения ActionManagerClient.c:788
ref array< int > m_recipes
Определения CraftingManager.c:18
int m_recipeID
Определения CraftingManager.c:11
ItemBase m_item2
Определения CraftingManager.c:16
int m_contextualRecipeID
Определения CraftingManager.c:12
int m_craftingMode
Определения CraftingManager.c:14
const int CM_MODE_INVENTORY
Определения CraftingManager.c:6
PlayerBase m_player
Определения CraftingManager.c:8
int m_recipeCount
Определения CraftingManager.c:13
ItemBase m_item1
Определения CraftingManager.c:15
PluginRecipesManager m_recipesManager
Определения CraftingManager.c:9

Перекрестные ссылки CM_MODE_INVENTORY, m_contextualRecipeID, m_craftingMode, m_item1, m_item2, m_player, m_recipeCount, m_recipeID, m_recipes, m_recipesManager и ActionManagerClient::SetInventoryAction().