public CompleteCraft ( int quality, bool makersMark, Server.Mobile from, |
||
quality | int | |
makersMark | bool | |
from | Server.Mobile | |
craftSystem | ||
typeRes | ||
tool | ||
customCraft | Server.Engines.Craft.CustomCraft | |
Результат | void |
public override void OnResponse(Network.NetState sender, RelayInfo info) { bool makersMark = info.ButtonID == 1; if (makersMark) { m_From.SendLocalizedMessage(501808); // You mark the item. } else { m_From.SendLocalizedMessage(501809); // Cancelled mark. } m_CraftItem.CompleteCraft(m_Quality, makersMark, m_From, m_CraftSystem, m_TypeRes, m_Tool, null); }
public override void OnResponse(GameClient sender, RelayInfo info) { bool makersMark = (info.ButtonID == 2); if (makersMark) { m_From.SendLocalizedMessage(501808); // You mark the item. } else { m_From.SendLocalizedMessage(501809); // Cancelled mark. } m_CraftItem.CompleteCraft(m_Exceptional, makersMark, m_QuestItem, m_From, m_CraftSystem, m_TypeRes, m_Tool, null); }
public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { bool makersMark = (info.ButtonID == 1); if (makersMark) { m_From.SendAsciiMessage("You mark the item."); } else { m_From.SendAsciiMessage("Cancelled mark."); } m_CraftItem.CompleteCraft(m_Quality, makersMark, m_From, m_CraftSystem, m_TypeRes, m_Tool); }
public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { bool makersMark = (info.ButtonID == 1); if (makersMark) { //m_From.SendLocalizedMessage( 501808 ); // You mark the item. m_From.SendMessage("Vous gravez votre nom sur l'objet"); } else { m_From.SendMessage("Vous renoncez à graver l'objet"); } //m_From.SendLocalizedMessage(501809); // Cancelled mark. m_CraftItem.CompleteCraft(m_Quality, makersMark, m_From, m_CraftSystem, m_TypeRes, m_Tool, null); }
protected override void OnTick() { m_iCount++; m_From.DisruptiveAction(); if (m_iCount < m_iCountMax) { m_CraftSystem.PlayCraftEffect(m_From); } else { m_From.EndAction(typeof(CraftSystem)); int badCraft = m_CraftSystem.CanCraft(m_From, m_Tool, m_CraftItem.m_Type); if (badCraft > 0) { if (m_Tool != null && !m_Tool.Deleted && m_Tool.UsesRemaining > 0) { m_From.SendGump(new CraftGump(m_From, m_CraftSystem, m_Tool, badCraft)); } else { m_From.SendLocalizedMessage(badCraft); } return; } int quality = 1; bool allRequiredSkills = true; m_CraftItem.CheckSkills(m_From, m_TypeRes, m_CraftSystem, ref quality, ref allRequiredSkills, false); CraftContext context = m_CraftSystem.GetContext(m_From); if (context == null) { return; } if (typeof(CustomCraft).IsAssignableFrom(m_CraftItem.ItemType)) { CustomCraft cc = null; try { cc = Activator.CreateInstance(m_CraftItem.ItemType, new object[] { m_From, m_CraftItem, m_CraftSystem, m_TypeRes, m_Tool, quality }) as CustomCraft; } catch { } if (cc != null) { cc.EndCraftAction(); } return; } bool makersMark = false; if (quality == 2 && m_From.Skills[m_CraftSystem.MainSkill].Base >= 100.0) { makersMark = m_CraftItem.IsMarkable(m_CraftItem.ItemType); } if (makersMark && context.MarkOption == CraftMarkOption.PromptForMark) { m_From.SendGump(new QueryMakersMarkGump(quality, m_From, m_CraftItem, m_CraftSystem, m_TypeRes, m_Tool)); } else { if (context.MarkOption == CraftMarkOption.DoNotMark) { makersMark = false; } m_CraftItem.CompleteCraft(quality, makersMark, m_From, m_CraftSystem, m_TypeRes, m_Tool, null); } } }
protected override void OnTick() { m_iCount++; m_From.DisruptiveAction(); if (m_iCount < m_iCountMax) { m_CraftSystem.PlayCraftEffect(m_From); } else { m_From.EndAction(typeof(CraftSystem)); string badCraft = m_CraftSystem.CanCraft(m_From, m_Tool, m_CraftItem.m_Type); if (badCraft != "") { if (m_Tool != null && !m_Tool.Deleted && m_Tool.UsesRemaining > 0) { m_From.SendGump(new CraftGump(m_From, m_CraftSystem, m_Tool, badCraft)); } else { m_From.SendAsciiMessage(badCraft); } return; } int quality = 1; bool allRequiredSkills = true; m_CraftItem.CheckSkills(m_From, m_TypeRes, m_CraftSystem, ref quality, ref allRequiredSkills, false); CraftContext context = m_CraftSystem.GetContext(m_From); if (context == null) { return; } bool makersMark = false; if (quality == 2 && m_From.Skills[m_CraftSystem.MainSkill].Base >= 100.0) { makersMark = m_CraftItem.IsMarkable(m_CraftItem.ItemType); } if (makersMark && context.MarkOption == CraftMarkOption.PromptForMark) { m_From.SendGump(new QueryMakersMarkGump(quality, m_From, m_CraftItem, m_CraftSystem, m_TypeRes, m_Tool)); } else { if (context.MarkOption == CraftMarkOption.DoNotMark) { makersMark = false; } m_CraftItem.CompleteCraft(quality, makersMark, m_From, m_CraftSystem, m_TypeRes, m_Tool); } } }