Exemplo n.º 1
0
    public static int BeginTalk(ILuaState lua)
    {
        int stk    = 1;
        int talkId = L.ToInteger(stk++);

        NpcRenwuUI.ShowDialogByTalk(talkId);

        return(0);
    }
Exemplo n.º 2
0
    public static void SubmitQuestOk(int id)
    {
        QuestData q = QuestData.GetData(id);

        if (OnQuestEffectFinish != null)
        {
            OnQuestEffectFinish(id);
        }
        //DelTrackQues (id);
        EraseQuestInst(id);

        if (q.questKind_ == QuestKind.QK_Profession)
        {
            for (int i = 0; i < CompletedList.Count; ++i)
            {
                QuestData tmpQ = QuestData.GetData(CompletedList[i]);
                if (tmpQ.questKind_ == QuestKind.QK_Profession)
                {
                    CompletedList.RemoveAt(i);
                    break;
                }
            }
        }

        if (q.questKind_ != QuestKind.QK_Tongji)
        {
            if (!CompletedQuestList.Contains(id))
            {
                CompletedQuestList.Add(id);
                UpdateAcceptableQuests();
                if (OnQuestUpdate != null)
                {
                    OnQuestUpdate();
                }
                isDirty = true;
                GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_NpcRenwuSubmit, id);
                EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_ComplishQuest, ApplicationEntry.Instance.uiRoot.transform);
            }
        }
        if (q.questType_ == QuestType.QT_GiveBaby || q.questType_ == QuestType.QT_GiveItem)
        {
            TurnOnUIPlanel.HideMe();
            NpcRenwuUI.SwithShowMe();
        }
        if (IsCopyEndId(id))
        {
            CopyTipsUI.SwithShowMe();
//			MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("gongxitongguan"),()=>{
//				NetConnection.Instance.exitCopy();
//			},true,null,null,LanguageManager.instance.GetValue("likai"));
        }
    }