Ejemplo n.º 1
0
    bool GuildHideAndSeekDialog()
    {
        if (false == GameManager.gameManager.PlayerDataPool.IsHaveGuild())
        {
            return(false);
        }

        if (false == GameManager.gameManager.PlayerDataPool.GuildInfo.IsInHideAndSeekActivity())
        {
            return(false);
        }

        if (false == GameManager.gameManager.PlayerDataPool.GuildInfo.IsHideAndSeekNpc(m_CareNPC.SceneNpcId))
        {
            return(false);
        }

        MissionInfoController.ShowNpcDialogUI(GlobeVar.GUILD_HIDEANDSEEK_NPCDIALOG);

        CG_GUILD_FIND_HIDEANDSEEK pak = (CG_GUILD_FIND_HIDEANDSEEK)PacketDistributed.CreatePacket(MessageID.PACKET_CG_GUILD_FIND_HIDEANDSEEK);

        pak.SceneNpcId = m_CareNPC.SceneNpcId;
        pak.SendPacket();

        return(true);
    }
Ejemplo n.º 2
0
 //显示任务
 void ShowMission(int nMissionId)
 {
     if (GlobeVar.INVALID_ID == nMissionId)
     {
         return;
     }
     MissionInfoController.ShowMissionDialogUI(nMissionId);
 }
Ejemplo n.º 3
0
 //显示对白
 void ShowText(int nDialogId)
 {
     if (GlobeVar.INVALID_ID == nDialogId)
     {
         return;
     }
     MissionInfoController.ShowNpcDialogUI(nDialogId);
 }
        public override void Finish()
        {
            base.Finish();
            // 大对话
            if (m_nDialogType == 0)
            {
//				UIManager.ShowAllUIExceptStory();
            }
            else if (m_nDialogType == 1)
            {
                //UIManager.ShowUI(UIInfo.ChatFrameRoot);
            }
            UIManager.CloseUI(UIInfo.StoryDialogRoot);

            if (Singleton <ObjManager> .GetInstance().MainPlayer != null)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.OnPlayStoryOver(m_nStoryID);
            }
                        #if BOBJOYSTICK
            JoyControllerLogic.storyDialogOn = false;
                        #endif

            // 对话完成 设置剧情任务 状态
            if (m_nMissionID > -1)
            {
                bool nRet = GameManager.gameManager.MissionManager.SetStoryMissionState(m_nMissionID, 2);
                if (nRet)
                {
                    if ((int)MISSIONTYPE.MISSION_MAIN == GameManager.gameManager.MissionManager.GetMissionType(m_nMissionID) ||
                        (int)MISSIONTYPE.MISSION_BRANCH == GameManager.gameManager.MissionManager.GetMissionType(m_nMissionID))
                    {
                        MissionInfoController.ShowMissionDialogUI(m_nMissionID);
                    }
                }
            }
            int nClosedStoryID = m_nStoryID;

            SendPlayStoryOverPacket(nClosedStoryID);

//			if (m_nDialogType == 0)
//			{
//				if (Singleton<ObjManager>.Instance.MainPlayer != null)
//				{
//					Singleton<ObjManager>.Instance.MainPlayer.IsNoMove = false;
//				}
//			}

            m_nStoryID    = -1;
            m_nMissionID  = -1;
            m_nDialogType = -1;
            m_nDialogID   = -1;
        }
Ejemplo n.º 5
0
        void AutoShowNPCDialogNear()
        {
            if (m_mainPlayer == null)
            {
                return;
            }
            //当前距离NPC的距离
            float nDis2MainPlayer = Vector3.Distance(Position, m_mainPlayer.Position);

            if (IsAutoShowOptionDialog())
            {
                if (nDis2MainPlayer <= 2.0 && m_fLastDis2MainPlayer > 2.0) //来到离黑市商人2码内的距离 自动弹出对话框
                {
                    if (m_mainPlayer.IsMoving)                             //等停下来再进行操作
                    {
                        return;
                    }
                    if (OptionDialogLogic.Instance() == null) //没有弹出对话(有选项)
                    {
                        Singleton <DialogCore> .GetInstance().Show(this);
                    }
                }
            }
            //是帮会NPC
            else if (BaseAttr.RoleBaseID == GlobeVar.GUILDDATAID_SUZHOU)
            {
                if (nDis2MainPlayer <= 2.0 && m_fLastDis2MainPlayer > 2.0) //来到离帮会NPC2码内的距离 自动弹出对话框
                {
                    if (m_mainPlayer.IsMoving)                             //等停下来再进行操作
                    {
                        return;
                    }
                    if (MissionInfoController.Instance() == null) //没有弹出对话(无选项)
                    {
                        Singleton <DialogCore> .GetInstance().Show(this);
                    }
                }
            }

            m_fLastDis2MainPlayer = nDis2MainPlayer;
        }