public void InitAdoration()
    {
        ResetUIRideGridAdoration();

        ResetAdoration();
        m_label_transExpNormal.text  = string.Format(LangTalkData.GetTextById(60001), GameTableManager.Instance.GetGlobalConfig <int>("PassOnRateRide", ((int)TransExpType.Normal * 10).ToString()));
        m_label_transExpPerfect.text = string.Format(LangTalkData.GetTextById(60001), GameTableManager.Instance.GetGlobalConfig <int>("PassOnRateRide", ((int)TransExpType.Perfect * 10).ToString()));
    }
Exemple #2
0
    /// <summary>
    /// 更新动态任务追踪
    /// </summary>
    public void UpdateTaskTrace(uint nTaskID, uint nTextID, List <string> lstParams)
    {
        QuestTraceInfo quest = QuestTranceManager.Instance.GetQuestTraceInfo(nTaskID);

        if (quest != null)
        {
            string strDesc = LangTalkData.GetTextById(nTextID);
            strDesc = strDesc.Replace("\n", "");
            if (quest.taskSubType == TaskSubType.DeliverItem)
            {
                if (lstParams.Count > (int)GameCmd.RandomParamType.SubmitItemID - 1)
                {
                    quest.QuestTable.usecommitItemID = uint.Parse(lstParams[(int)GameCmd.RandomParamType.SubmitItemID - 1]);
                    table.QuestItemDataBase questItemDb = GameTableManager.Instance.GetTableItem <table.QuestItemDataBase>(quest.QuestTable.usecommitItemID);
                    if (questItemDb != null && questItemDb.dwSubType == (uint)TaskSubType.DeliverItem)
                    {
                        quest.QuestTable.destMapID   = questItemDb.destMapID;
                        quest.QuestTable.monster_npc = questItemDb.monster_npc;
                        quest.QuestTable.dwDoingNpc  = questItemDb.monster_npc;
                    }
                }
            }
            else if (quest.taskSubType == TaskSubType.UseItem)
            {
                if (lstParams.Count > (int)GameCmd.RandomParamType.UseItemID - 1)
                {
                    quest.QuestTable.usecommitItemID = uint.Parse(lstParams[(int)GameCmd.RandomParamType.UseItemID - 1]);
                }

                quest.QuestTable.destMapID = uint.Parse(lstParams[(int)GameCmd.RandomParamType.JumpMap - 1]);
            }
            else if (quest.taskSubType == TaskSubType.KillMonster /*|| quest.taskSubType == TaskSubType.KillMonsterCollect */ || quest.taskSubType == TaskSubType.CallMonster)
            {
                if (lstParams.Count > (int)GameCmd.RandomParamType.KillNpcMap - 1)
                {
                    quest.QuestTable.destMapID = uint.Parse(lstParams[(int)GameCmd.RandomParamType.KillNpcMap - 1]);
                }
                if (lstParams.Count > (int)GameCmd.RandomParamType.KillNpcID - 1)
                {
                    quest.QuestTable.monster_npc = uint.Parse(lstParams[(int)GameCmd.RandomParamType.KillNpcID - 1]);
                }
            }
            else if (quest.taskSubType == TaskSubType.KillMonsterCollect)
            {
                if (quest.taskType == TaskType.TaskType_Loop)
                {
                    quest.QuestTable.destMapID       = uint.Parse(lstParams[(int)GameCmd.RandomParamType.JumpMap - 1]);
                    quest.QuestTable.usecommitItemID = uint.Parse(lstParams[(int)GameCmd.RandomParamType.KillDropItemID - 1]);
                    quest.QuestTable.monster_npc     = uint.Parse(lstParams[(int)GameCmd.RandomParamType.KillDropNpcID - 1]);
                    //uint.Parse(lstParams[(int)GameCmd.RandomParamType.KillDropNum - 1]);
                }
                else
                {
                    if (lstParams.Count > (int)GameCmd.RandomParamType.KillNpcMap - 1)
                    {
                        quest.QuestTable.destMapID = uint.Parse(lstParams[(int)GameCmd.RandomParamType.KillNpcMap - 1]);
                    }
                    if (lstParams.Count > (int)GameCmd.RandomParamType.KillNpcID - 1)
                    {
                        quest.QuestTable.monster_npc = uint.Parse(lstParams[(int)GameCmd.RandomParamType.KillNpcID - 1]);
                    }
                }
            }
            else if (quest.taskSubType == TaskSubType.Collection)
            {
                if (lstParams.Count > (int)GameCmd.RandomParamType.CollectNpcMap - 1)
                {
                    quest.QuestTable.destMapID = uint.Parse(lstParams[(int)GameCmd.RandomParamType.CollectNpcMap - 1]);
                }
                if (lstParams.Count > (int)GameCmd.RandomParamType.CollectNpcID - 1)
                {
                    quest.QuestTable.collect_npc = uint.Parse(lstParams[(int)GameCmd.RandomParamType.CollectNpcID - 1]);
                }

                //if (lstParams.Count>2)
                //{
                //    quest.QuestTable.coll
                //}
            }
            else if (quest.taskSubType == TaskSubType.Talk)
            {
                if (lstParams.Count > (int)GameCmd.RandomParamType.TalkNpcMap - 1)
                {
                    quest.QuestTable.submitMapID = uint.Parse(lstParams[(int)GameCmd.RandomParamType.TalkNpcMap - 1]);
                }
                if (lstParams.Count > (int)GameCmd.RandomParamType.TalkNpcID - 1)
                {
                    quest.QuestTable.dwEndNpc = uint.Parse(lstParams[(int)GameCmd.RandomParamType.TalkNpcID - 1]);
                }
            }

            quest.dynamicTranceUpdate          = true;
            quest.QuestTable.strTaskTraceBegin = strDesc;
            quest.UpdateDesc();

            if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.MissionAndTeamPanel))
            {
                DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MissionAndTeamPanel, UIMsgID.eUpdateTaskList, null);
            }

            if (FirstLoginSuccess)
            {
                if (!quest.QuestTable.dwAuto)//如果非自动 则不发送做任务消息
                {
                    return;
                }

                if (m_bReconnect)
                {
                    m_bReconnect = false;
                    return;
                }
                Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.TASK_DONING,
                                                                    new Client.stDoingTask()
                {
                    taskid = quest.taskId, state = quest.state, oprate = quest.operate, desc = strDesc
                });
            }
        }
    }
Exemple #3
0
    /// <summary>
    /// 发送消息
    /// </summary>
    /// <param name="caster"></param>
    void onClick_Btn_send_Btn(GameObject caster)
    {
        //if (!string.IsNullOrEmpty(m_input_input.value))
        {
            //string inputText = m_input_input.value;
            string inputText = string.IsNullOrEmpty(m_input_input.value) ? this.m_defaultText : m_input_input.value;  //不打字就默认 “懂的来”

            uint   leaderId   = DataManager.Manager <TeamDataManager>().LeaderId;
            uint   activityId = DataManager.Manager <TeamDataManager>().TeamActivityTargetId;
            string sendText   = string.Empty;
            if (activityId != 0)
            {
                TeamActivityDatabase data = GameTableManager.Instance.GetTableItem <TeamActivityDatabase>(activityId);
                if (data != null)
                {
                    string name    = ClientGlobal.Instance().MainPlayer.GetName();
                    string strText = LangTalkData.GetTextById(20007);
                    sendText = string.Format(strText, data.mainName, data.indexName, data.min, data.max, name, inputText, leaderId);
                }

                if (sendText == string.Empty)
                {
                    TipsManager.Instance.ShowTips(LocalTextType.Team_Activity_qingxianxuanzehuodongmubiao);//请选择活动目标
                }
            }



            if (DataManager.Manager <TeamDataManager>().MainPlayerIsMember() && sendText != string.Empty)
            {
                bool   b           = false;
                string channelName = "";

                //氏族
                if (GetSelectBtnIndex() == CHATTYPE.CHAT_CLAN)
                {
                    channelName = DataManager.Manager <TextManager>().GetLocalText(LocalTextType.Local_TXT_TaskTitle_Clan);//氏族
                    bool IsJoinClan = DataManager.Manager <ClanManger>().IsJoinClan;
                    if (IsJoinClan == false)
                    {
                        TipsManager.Instance.ShowTips("你还没有加入氏族");//你还没有加入氏族
                        return;
                    }

                    b = DataManager.Manager <ChatDataManager>().SendText(CHATTYPE.CHAT_CLAN, sendText);
                }

                //世界
                else if (GetSelectBtnIndex() == CHATTYPE.CHAT_WORLD)
                {
                    channelName = "世界";

                    //判断钱够不够
                    if (UserData.Coupon < DataManager.Manager <ChatDataManager>().ChatWorldCost)
                    {
                        TipsManager.Instance.ShowTipsById(4);
                        return;
                    }

                    b = DataManager.Manager <ChatDataManager>().SendText(CHATTYPE.CHAT_WORLD, sendText);
                }

                //招募
                else if (GetSelectBtnIndex() == CHATTYPE.CHAT_RECRUIT)
                {
                    channelName = DataManager.Manager <TextManager>().GetLocalText(LocalTextType.Team_Recruit_zhaomu);
                    b           = DataManager.Manager <ChatDataManager>().SendText(CHATTYPE.CHAT_RECRUIT, sendText);
                }

                if (b)
                {
                    m_input_input.value      = "";
                    m_input_input.isSelected = false;

                    //已经发送招募信息至{0}
                    TipsManager.Instance.ShowLocalFormatTips(LocalTextType.Team_Recruit_zhaomuxinxifasongchenggong, channelName);
                    HideSelf();
                }
            }
        }

        m_input_input.Start();
    }