public void Export(string strFileName, SHXmlCore xmlCore) { StreamWriter wr = null; try { wr = new StreamWriter(strFileName, false, System.Text.Encoding.Default); string strLine; strLine = "ID,NPC,"; for (int i = 0; i < 11; i++) { String str = String.Format("{0:d}-전리품,{0:D}-비율,{0:d}-최소량, {0:d}-최대량, ", i + 1, i + 1, i + 1, i + 1); strLine += str; } strLine += "\n"; strLine += ExportItem(xmlCore); wr.WriteLine(strLine); } finally { if (wr != null) { wr.Close(); } } }
public override bool Build(SHXmlCore e) { if (!_bPassed) { return(false); } if (!e.Dialogs.IsValid(dialog) || !e.Dialogs[dialog].Passed) { _szCompiled = "퀘스트 종료를 위한 대화문이 정의되어 있지 않거나 오류가 있습니다."; _bPassed = false; return(false); } for (int i = 0; i < dataList.Count; i++) { SHQuestReward reward = (SHQuestReward)dataList[i]; if (reward.Build(e) == false) { return(Error(reward.CompiledMessage)); } } return(_bPassed); }
private string GetNPCName(SHXmlCore xmlCore, int nNPCShopID) { string str = ""; foreach (SHNPC npc in xmlCore.NPCs.dataList) { for (int i = 0; i < 10; i++) { if (npc.GetIType()[i] == SHNPCIType.trade) { if (npc.GetIAct()[i] == nNPCShopID.ToString()) { str += npc.Name; str += "("; str += npc.id.ToString(); str += ")"; str += "\n"; } } } } if (str == "") { str = "<사용안함>\n"; } return(str); }
public override string ToBody(SHXmlCore core) { String ret = String.Empty; ret = Properties.Resources.quest_reward_template.Replace("[[QUEST_REWARD_DIALOG_ID]]", dialog.ToString()); string strDialogName = ""; if (core.Dialogs.IsValid(dialog)) { strDialogName = core.Dialogs[dialog].text; } ret = ret.Replace("[[QUEST_REWARD_DIALOG_NAME]]", strDialogName); ret = ret.Replace("[[QUEST_REWARD_REWARDER]]", _rewarder); foreach (SHQuestReward reward in dataList) { String szReward = String.Empty; //szReward = szReward.Replace("[[QUEST_REWARD_REWARDER]]", core.GetSafeString(obj.desc)); ret += szReward; } return(ret); }
public override bool Build(SHXmlCore e) { if (_bPassed == true) { if (dialogSpecified && (!e.Dialogs.IsValid(dialog) || !e.Dialogs[dialog].Passed)) { return(Error("[기타] 항목의 dialog 값이 생성되지 않았거나 오류가 있는 대화를 참조중(" + dialog + ")")); } if (incomplete_dialogSpecified && (!e.Dialogs.IsValid(incomplete_dialog) || !e.Dialogs[incomplete_dialog].Passed)) { return(Error("[기타] 항목의 incomplete_dialog 값이 생성되지 않았거나 오류가 있는 대화를 참조중(" + incomplete_dialog + ")")); } if (conditionSpecified && (!e.Conditions.IsValid(condition) || !e.Conditions[condition].Passed)) { return(Error("[기타] 항목의 condition 값이 생성되지 않거나 오류가 있는 조건을 참조중 (" + condition + ")")); } if (Objectives != null && Objectives.Build(e) == false) { return(Error(Objectives.CompiledMessage)); } if (Rewards != null && Rewards.Build(e) == false) { return(Error(Rewards.CompiledMessage)); } } return(_bPassed); }
public override bool Build(SHXmlCore core) { if (!_bPassed) { return(_bPassed); } if (null != and) { if (!and.Build(core)) { return(Error(and.CompiledMessage)); } } if (null != or) { if (!or.Build(core)) { return(Error(or.CompiledMessage)); } } foreach (SHCondition cond in dataList) { if (!cond.Build(core)) { return(Error(cond.CompiledMessage)); } } return(_bPassed); }
public override string ToBody(SHXmlCore e) { String ret = base.ToBody(e); String detail = "[" + (e.Items.IsValid(id) ? e.GetAnchorString(e.Items[id].name, "ITEM", id.ToString(), true) : "(유효하지 않은)" + id.ToString()) + "]"; if (questSpecified || bpartSpecified) { detail += " (단, "; if (questSpecified) { detail += "퀘스트 [" + (e.Quests.IsValid(quest) ? e.GetAnchorString(e.Quests[quest].title, "QUEST", e.Quests[quest].id.ToString(), true) : "(유효하지 않은)" + quest.ToString()) + "] 수행중"; } if (questSpecified && bpartSpecified) { detail += "이고 "; } if (bpartSpecified) { detail += "파츠 " + bpart + "번이 파괴"; } detail += "일때만)"; } ret = ret.Replace("[[LOOT_DETAIL]]", detail); return(ret); }
public override bool Build(SHXmlCore e) { if (!_bPassed) { return(false); } return(_bPassed); }
public override string ToBody(SHXmlCore e) { String ret = base.ToBody(e); ret = ret.Replace("[[LOOT_DETAIL]]", "실버"); return(ret); }
public string GetString(SHXmlCore e) { string ret = ""; ret = "총 " + dataList.Count.ToString() + "개 종류, 최대 " + max.ToString() + "개"; return(ret); }
public override bool Build(SHXmlCore e) { if (dataList.Count <= 0) { return(Error("Objectives의 갯수가 0입니다.")); } return(_bPassed); }
private string ToBody_Preview(SHXmlCore core) { String ret = String.Empty; ret = Properties.Resources.quest_preview_template.Replace("[[QUEST_TITLE]]", this.title); ret = ret.Replace("[[QUEST_DESC]]", SHWebUtil.ReplaceDialogTextForWeb(core.GetSafeString(this.desc))); return(ret); }
public override string ToBody(SHXmlCore core) { if (Say == null) { return(""); } return(Say.ToBody(core)); }
public override bool Build(SHXmlCore e) { foreach (SHDialog dlg in dataList) { dlg.Cook(e); } return(_bPassed); }
public override string ToBody(SHXmlCore core) { String ret = Properties.Resources.loot_element_template; ret = ret.Replace("[[LOOT_RATE]]", (rateSpecified) ? rate.ToString("##.#") + "%" : String.Empty); ret = ret.Replace("[[LOOT_MAX]]", (maxSpecified) ? max.ToString() : String.Empty); ret = ret.Replace("[[LOOT_MIN]]", (minSpecified) ? min.ToString() : String.Empty); return(ret); }
public override bool Build(SHXmlCore e) { if (!_bPassed) { return(false); } // foreach (SHCraft item in dataList) if (!item.Build(e)) return Error(item.CompiledMessage); return(_bPassed); }
private string GetItemName(SHXmlCore xmlCore, int nItemID) { string str = ""; if (xmlCore.Items.IsValid(nItemID)) { return(xmlCore.GetSafeString(xmlCore.Items[nItemID].name)); } return(str); }
private string ExportItem(SHXmlCore xmlCore) { string str = ""; foreach (SHLoot loot in xmlCore.Lootings.dataList) { str += LOOT_SetString(loot, xmlCore); str += "\n"; } return(str); }
public override bool Build(SHXmlCore core) { foreach (SHConditions conds in dataList) { if (!conds.Build(core)) { _bPassed = false; } } _szCompiled = (_bPassed) ? SHGlobal.C*K : SHGlobal.CERROR; return(_bPassed); }
public override bool Build(SHXmlCore e) { for (int i = 0; i < 10; i++) { if (_iType[i] != SHNPCIType.NONE) { // 컨디션 Validate if (_iCond[i] != 0 && !e.Conditions.IsValid(_iCond[i])) { return(Error("생성되지 않거나 오류가 있는 조건을 참조중 (" + _iCond[i].ToString() + ")")); } // 각 타입별로 인자가 제대로 들어가있는지 확인 if (_iAct[i] != null) { switch (_iType[i]) { case SHNPCIType.quest_begin: case SHNPCIType.quest_end: if (!e.Quests.IsValid(_iAct[i])) { return(Error("생성되지 않거나 오류가 있는 퀘스트를 참조중 (" + _iAct[i] + ")")); } break; case SHNPCIType.dialog: if (!e.Dialogs.IsValid(_iAct[i])) { return(Error("생성되지 않거나 오류가 있는 대화를 참조중 (" + _iAct[i] + ")")); } break; //아직 체크하지 않는 타입들 case SHNPCIType.quest_count: case SHNPCIType.auction: case SHNPCIType.craft: case SHNPCIType.inn_sleep: case SHNPCIType.inn_regist: case SHNPCIType.loot: case SHNPCIType.loot_immo: case SHNPCIType.mailbox: case SHNPCIType.soldtrade: case SHNPCIType.storage: case SHNPCIType.trade: case SHNPCIType.trigger: break; } } } } return(_bPassed); }
public override string ToBody(SHXmlCore core) { String ret = base.ToBody(core); String detail = type.ToString() + "등급 영혼"; double bpartmax = bpart1 + bpart2 + bpart3 + bpart4; detail += " (파트 파괴별 보정치:" + bpart1.ToString("##.#") + "/" + bpart2.ToString("##.#") + "/" + bpart3.ToString("##.#") + "/" + bpart4.ToString("##.#") + " - 최대 " + bpartmax + "% 보정)"; ret = ret.Replace("[[LOOT_DETAIL]]", detail); return(ret); }
public override bool Build(SHXmlCore e) { if (!_bPassed) { return(false); } //if (conditionSpecified && !e.ItemConditions.IsValid(condition)) return Error("명시된 아이템이 유효하지 않습니다. (" + condition.ToString() + ")"); //if (use_talentSpecified && !e.Talents.IsValid(use_talent)) return Error("명시된 탤런트가 유효하지 않습니다. (" + use_talent.ToString() + ")"); //if (use_questSpecified && !e.Quests.IsValid(use_quest)) return Error("명시된 퀘스트가 유효하지 않습니다. (" + use_quest.ToString() + ")"); return(_bPassed); }
private string ExportNPCShop(SHXmlCore xmlCore) { string str = ""; foreach (SHNPCShop npcShop in xmlCore.NPCShop.dataList) { str += NPCSHOP_SetString(npcShop, xmlCore); str += ","; str += "\n"; } return(str); }
private string NPCSHOP_Item(SHNPCShop npcShop, SHXmlCore xmlCore) { string str = ""; for (int i = 0; i < npcShop.dataList.Count; i++) { if (npcShop.dataList[i].GetType() == typeof(SHItemString)) { str += ProcessItem(xmlCore, npcShop.dataList[i] as SHItemString); } } return(str); }
public override bool Build(SHXmlCore e) { foreach (SHNPC npc in dataList) { if (npc.Passed) { if (!npc.Build(e)) { _bPassed = false; } } } _szCompiled = (_bPassed) ? SHGlobal.C*K : SHGlobal.CERROR; return(true); }
public override bool Build(SHXmlCore e) { if (!_bPassed) { return(false); } foreach (SHNPCShop item in dataList) { if (!item.Build(e)) { return(Error(item.CompiledMessage)); } } return(_bPassed); }
private string LOOT_Item(SHLoot loot, SHXmlCore xmlCore) { string str = ""; for (int i = 0; i < loot.dataList.Count; i++) { if (loot.dataList[i].GetType() == typeof(SHLootSilver)) { str += ProcessLootSilver(loot.dataList[i] as SHLootSilver); } else if (loot.dataList[i].GetType() == typeof(SHLootItem)) { str += ProcessLootItem(xmlCore, loot.dataList[i] as SHLootItem); } } return(str); }
public override string ToBody(SHXmlCore core) { String ret; String elements = String.Empty; Int32 i = 0; ret = Properties.Resources.loot_template.Replace("[[LOOT_ID]]", id.ToString()); ret = ret.Replace("[[LOOT_MAX]]", max.ToString()); foreach (SHDataObject obj in dataList) { i++; elements += obj.ToBody(core); } ret = ret.Replace("[[LOOT_ELEMENTS]]", elements); return(ret); }
public override bool Build(SHXmlCore e) { if (!_bPassed) { return(false); } foreach (SHLoot loot in dataList) { if (!loot.Build(e)) { _bPassed = false; } } _szCompiled = (_bPassed) ? SHGlobal.C*K : SHGlobal.CERROR; return(_bPassed); }
private string LOOT_SetString(SHLoot loot, SHXmlCore xmlCore) { string str = ""; loot.Compile(); loot.Build(xmlCore); str = (loot.idSpecified) ? loot.id.ToString() : String.Empty; str += ","; str += ((loot.comment != null) ? loot.comment : String.Empty); str += ","; str += LOOT_Item(loot, xmlCore); return(str); }