public override void LoadTable(string _path) { try { Tbl_QuestMove_Record record = null; XmlElement root = GetXmlRootElement(_path); XmlNodeList nodes = root.SelectNodes("QuestMove"); foreach (XmlNode node in nodes) { record = new Tbl_QuestMove_Record() { questID = int.Parse(node.Attributes["Index"].Value), startMapID = int.Parse(node.Attributes["St_Map"].Value), startPos = new Vector3() { x = float.Parse(node.Attributes["St_X"].Value), y = float.Parse(node.Attributes["St_Y"].Value), z = float.Parse(node.Attributes["St_Z"].Value) }, endMapID = int.Parse(node.Attributes["End_Map"].Value), endPos = new Vector3() { x = float.Parse(node.Attributes["End_X"].Value), y = float.Parse(node.Attributes["End_Y"].Value), z = float.Parse(node.Attributes["End_Z"].Value) } }; if (dicRecord != null) if (!dicRecord.ContainsKey(record.questID)) dicRecord.Add(record.questID, record); } } catch (System.Exception e) { System.Diagnostics.Trace.WriteLine(e); } }
public void buttonClick( ref POINTER_INFO ptr) { if( bLock == true) return; if( ptr.evt == POINTER_INFO.INPUT_EVENT.TAP) { if( ptr.targetObj.gameObject == buttonAccept.gameObject) { if( nowQuestData != null) ArkQuestmanager.instance.RequestAcceptQuest( nowQuestData.Info.ID); } else if( /*ptr.targetObj.gameObject == buttonRefuse.gameObject || ptr.targetObj.gameObject == buttonQuestClose.gameObject ||*/ ptr.targetObj.gameObject == buttonClose.gameObject) { if( bCallQuestlist == true) { QuestHolder questHolder = AsHUDController.Instance.m_NpcMenu.questHolder; if( questHolder != null) { if( questHolder.GetQuestMarkType() == QuestMarkType.HAVE) { UIMessageBroadcaster.instance.SendUIMessage( UIMessageType.UI_MESSAGE_QUESTLIST_SHOW); } else { UIMessageBroadcaster.instance.SendUIMessage( UIMessageType.UI_MESSAGE_TALK_RESET); UIMessageBroadcaster.instance.SendUIMessage( UIMessageType.UI_MESSAGE_TALK_MENUBUTTON_UPDATE); } } else { UIMessageBroadcaster.instance.SendUIMessage( UIMessageType.UI_MESSAGE_TALK_RESET); UIMessageBroadcaster.instance.SendUIMessage( UIMessageType.UI_MESSAGE_TALK_MENUBUTTON_UPDATE); } } if( bLock == false) AsHudDlgMgr.Instance.CloseQuestAccept(); } else if( ptr.targetObj.gameObject == buttonReward.gameObject) { if( nowQuestData == null) { Debug.LogWarning( "Quest Complete[Quest data is null]"); return; } if( nowQuestData.Info.QuestType == QuestType.QUEST_WANTED) { AsCommonSender.SendCompleteWantedQuest( nowQuestData.Info.ID); } else { if( listSelectItem.Count <= 0) { ArkQuestmanager.instance.RequestCompleteQuest( nowQuestData.Info.ID); } else { if( nowSelectItem == -1) { messageBox = AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(833), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE); } else { ArkQuestmanager.instance.RequestCompleteQuest( nowQuestData.Info.ID, ( byte)nowSelectItem); } } } } else if( ptr.targetObj.gameObject == buttonGiveup.gameObject) { AsSoundManager.Instance.PlaySound( AsSoundPath.ButtonClick, Vector3.zero, false); if( messageBox == null) { messageBox = AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(144), AsTableManager.Instance.GetTbl_String(140), AsTableManager.Instance.GetTbl_String(1152), AsTableManager.Instance.GetTbl_String(1151), this, "GiveupNowQuestOk", "GiveupNowQuestCancel", AsNotify.MSG_BOX_TYPE.MBT_OKCANCEL, AsNotify.MSG_BOX_ICON.MBI_QUESTION, false, true); } } else if (ptr.targetObj.gameObject == buttonQuestMove.gameObject) { if( true == AsInstanceDungeonManager.Instance.CheckInIndun() || true == AsPvpManager.Instance.CheckInArena()) return; questMoveRecord = AsTableManager.Instance.GetTbl_QuestMove_Record(nowQuestData.Info.ID); if (questMoveRecord == null) return; if (AsHudDlgMgr.Instance.QuestMoveCoolTime.isCoolTimeActive == true) { AsEventNotifyMgr.Instance.CenterNotify.AddMessage(AsTableManager.Instance.GetTbl_String(4260)); return; } int mapID = 0; Vector3 pos = Vector3.zero; if (nowQuestData.NowQuestProgressState == QuestProgressState.QUEST_PROGRESS_IN) { mapID = questMoveRecord.startMapID; pos = questMoveRecord.startPos; } else if (nowQuestData.NowQuestProgressState == QuestProgressState.QUEST_PROGRESS_CLEAR || nowQuestData.NowQuestProgressState == QuestProgressState.QUEST_PROGRESS_IMMEDIATELY_CLEAR) { mapID = questMoveRecord.endMapID; pos = questMoveRecord.endPos; } else { return; } AskQuestWarp(); } } }