Exemplo n.º 1
0
        void PlayOneMessage()
        {
            if (SceneLogicManager.getSceneType() != "mainlands")
            {
                return;
            }
            //判定当前是否正在播放
            //if (!m_IsPlaying)
            //{
            //从队列里面取出一条,播放
            if (m_MessageQueue.Count >= 1)
            {
                //m_IsPlaying = true;
                mDMono.gameObject.SetActive(true);
                if (mDMono.gameObject.activeInHierarchy)
                {
                    StartCoroutine(Play(m_MessageQueue.Dequeue()));
                }
                else
                {
                    m_MessageQueue.Dequeue();
                }
            }
            else            //说明没有需要播放的 就隐掉
            {
                mDMono.gameObject.SetActive(false);
            }
            //}
            //else
            //{

            //}
        }
Exemplo n.º 2
0
        public void ShowOtherPlayerInfo()
        {
            if (mItemData.Message.uid == LoginManager.Instance.LocalUser.Id.Value)
            {
                return;
            }

            if (!SceneLogicManager.isMainlands())
            {
                return;
            }

            if (mItemData.Message.uid <= 0)
            {
                return;
            }

            var ht = Johny.HashtablePool.Claim();

            ht.Add("uid", mItemData.Message.uid);
            ht.Add("icon", string.Format("{0}", mItemData.Message.icon));
            ht.Add("headFrame", mItemData.Message.frame);
            ht.Add("name", mItemData.Message.name);
            ht.Add("level", mItemData.Message.level);
            ht.Add("fight", mItemData.Message.battleRating);
            ht.Add("a_name", mItemData.Message.allianceName);
            GlobalMenuManager.Instance.Open("OtherPlayerInfoView", ht);
        }
Exemplo n.º 3
0
        public void NpcLeave(string locator, SceneLogic currentlogic)
        {
            m_ManagedNpcs.Remove(locator);
            if (currentlogic != null)
            {
                currentlogic.DeleteNpc(locator);
            }
            m_GroupCellManager.ObjectLeave(locator);

            //如果是世界boss,删除之后需要立马生成下一个
            if (locator.Equals("EnemySpawns_11"))
            {
                long   id        = 0;
                string scenetype = SceneLogicManager.getSceneType();
                DataLookupsCache.Instance.SearchDataByID(scenetype + ".id", out id);

                string curLayout = "Layout50102";
                DataLookupsCache.Instance.SearchDataByID("mainlands.lastWeekBossLayoutId", out curLayout);

                Hashtable data = Johny.HashtablePool.Claim();
                data["role"]         = "w_boss";
                data["sid"]          = id;
                data["bossLayoutId"] = curLayout;

                NpcCommIn("EnemySpawns_11", data, MainLandLogic.GetInstance().CurrentSceneName, "mainlands");
            }
        }
Exemplo n.º 4
0
        string GetSceneId()
        {
            long   id        = 0;
            string scenetype = SceneLogicManager.getSceneType();

            DataLookupsCache.Instance.SearchDataByID <long>(scenetype + ".id", out id);
            return(scenetype + id);
        }
Exemplo n.º 5
0
        public static int GetFightByUid(long uid)
        {
            int fight;

            if (DataLookupsCache.Instance.SearchIntByID(SceneLogicManager.getMultyPlayerSceneType() + ".pl." + uid + ".fight", out fight))
            {
                return(fight);
            }
            return(fight);
        }
Exemplo n.º 6
0
        public static int GetLevelByUid(long uid)
        {
            int level;

            if (DataLookupsCache.Instance.SearchIntByID(SceneLogicManager.getMultyPlayerSceneType() + ".pl." + uid + ".level", out level))
            {
                return(level);
            }
            return(level);
        }
Exemplo n.º 7
0
        public static string GetGangNameByUid(long uid)
        {
            string name = "";

            if (DataLookupsCache.Instance.SearchDataByID <string>(SceneLogicManager.getMultyPlayerSceneType() + ".pl." + uid + ".gang_name", out name))
            {
                return(name);
            }
            return(name);
        }
Exemplo n.º 8
0
 IEnumerator ActivityMonitor()
 {
     while (LTSpeedSnatchILRModel.GetInstance().isActiviyMonitor)
     {
         if (SceneLogicManager.isMainlands())
         {
             ActivityMonitorFunc();
         }
         yield return(LTSpeedSnatchILRModel.GetInstance().monitorWFS);
     }
 }
Exemplo n.º 9
0
        public static bool GetIsRedName(long uid)
        {
            bool isRedName;

            if (!DataLookupsCache.Instance.SearchDataByID <bool>(SceneLogicManager.getMultyPlayerSceneType() + ".pl." + uid + ".state.R", out isRedName))
            {
                EB.Debug.Log("<color=red>searchdata redname fail uid=</color>{0}", uid);
                return(false);
            }
            return(isRedName);
        }
Exemplo n.º 10
0
        public static int GetAidByUid(long uid)
        {
            int aid;

            if (!DataLookupsCache.Instance.SearchIntByID(SceneLogicManager.getMultyPlayerSceneType() + ".pl." + uid + ".aid", out aid))
            {
                EB.Debug.LogError("playerIntact SearchDataByID aid fail scenename={0}", SceneLogicManager.getMultyPlayerSceneType());
                return(0);
            }
            return(aid);
        }
Exemplo n.º 11
0
        public static string GetFrameByUid(long uid)
        {
            string temp = "";
            string name = "";

            if (DataLookupsCache.Instance.SearchDataByID <string>(SceneLogicManager.getMultyPlayerSceneType() + ".pl." + uid + ".hf", out temp))
            {
                name = EconemyTemplateManager.Instance.GetHeadFrame(temp).iconId;
            }
            return(name);
        }
Exemplo n.º 12
0
        public void OnEnterBtnClick()
        {
            if (campaignId <= 0)
            {
                return;
            }

            if (mainTpl == null)
            {
                return;
            }

            if (AllianceUtil.GetIsInTransferDart(""))
            {
                return;
            }

            if (isRequest)
            {
                return;
            }

            if (!isShowFree)
            {
                int vaildTimes = IsVigorEnough(1);
                if (vaildTimes <= 0)
                {
                    BalanceResourceUtil.TurnToVigorGotView();
                    return;
                }
            }

            Hashtable data = Johny.HashtablePool.Claim();

            data.Add("startCombatCallback", new System.Action(() => {
                if (campaignId <= 0)
                {
                    return;
                }

                if (mCallback != null)
                {
                    mCallback();
                }
                LTInstanceMapModel.Instance.RequestMainFightCampaign(campaignId, SceneLogicManager.isMainlands()?1:0);
            }));
            data.Add("enemyLayout", mainTpl.EncounterGroupId);
            data.Add("battleType", eBattleType.MainCampaignBattle);

            GlobalMenuManager.Instance.Open("LTCombatReadyUI", data);
        }
Exemplo n.º 13
0
        public static string GetIconByUid(long uid)
        {
            string templateid;

            if (DataLookupsCache.Instance.SearchDataByID <string>(SceneLogicManager.getMultyPlayerSceneType() + ".pl." + uid + ".tid", out templateid))
            {
                string characterid = Hotfix_LT.Data.CharacterTemplateManager.Instance.TemplateidToCharacterid(templateid);
                int    skin        = 0;
                DataLookupsCache.Instance.SearchIntByID(SceneLogicManager.getMultyPlayerSceneType() + ".pl." + uid + ".skin", out skin);
                var charTpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(characterid, skin);
                if (charTpl != null)
                {
                    return(charTpl.icon /*+ "_" + type*/);
                }
            }
            return(null);
        }
Exemplo n.º 14
0
 public override void SetMenuData(object param)
 {
     base.SetMenuData(param);
     mParam = param;
     controller.GObjects["FriendRedPoint"].CustomSetActive(false);
     controller.GObjects["RecentRedPoint"].CustomSetActive(false);
     controller.GObjects["ApplyRedpoint"].CustomSetActive(false);
     controller.UiButtons["HotfixBtn4"].gameObject.CustomSetActive(SceneLogicManager.getSceneType() != SceneLogicManager.SCENE_COMBAT);
     TabController.SelectFriendAction = delegate()
     {
         DoSelectFriendAction();
     };
     FriendManager.Instance.MyFriends.IsHaveUpdate  = false;
     FriendManager.Instance.BlackLists.IsHaveUpdate = false;
     FriendManager.Instance.Recentlys.IsHaveUpdate  = false;
     FriendManager.Instance.Teams.IsHaveUpdate      = false;
     ResetVigorTime();
 }
Exemplo n.º 15
0
        public override void RealPlay()
        {
            var pc = PlayerManager.LocalPlayerController();

            if (pc != null && mFromUid == pc.playerUid)
            {
                if (m_callback != null)
                {
                    m_callback();
                }
                return;
            }

            if (!SceneLogicManager.isMainlands() || SceneLogicManager.isLCCampaign())
            {
                return;
            }

            if (LTLegionWarFinalController.Instance != null)
            {
                return;
            }

            System.Action <int> callBack = delegate(int value)
            {
                CallBack(value);
            };

            //MessageTemplateManager.ShowMessage(902068,Johny.HashtablePool.Claim() { { "0", mFromName } },CallBack);
            long expireTs = mExpireTime - (long)EB.Time.Now;

            Hashtable param = Johny.HashtablePool.Claim();

            param["fromName"] = mFromName;
            param["callBack"] = callBack;
            param["expireTs"] = expireTs;

            GlobalMenuManager.Instance.Open("PkReceiveRequestUI", param);
            //PkReceiveRequestController.Open(param);
            //UIStack.Instance.ExitStack(false);

            ////GlobalMenuManager.Instance.CloseMenu("ChatHudView");
        }
Exemplo n.º 16
0
        public void ShowMainLandLight(bool isShow)
        {
            if (!SceneLogicManager.isMainlands() ||
                MainLandLogic.GetInstance() == null ||
                MainLandLogic.GetInstance().ThemeLoadManager == null)
            {
                return;
            }

            SceneRootEntry sceneRoot = MainLandLogic.GetInstance().ThemeLoadManager.GetSceneRoot();

            if (sceneRoot != null && sceneRoot.m_SceneRoot != null)
            {
                var mainLight = sceneRoot.m_SceneRoot.GetComponentInChildren <Light>();

                if (mainLight != null)
                {
                    mainLight.enabled = isShow;
                }
            }
        }
Exemplo n.º 17
0
        public void ShowPoeple(bool isShow)
        {
            if (!SceneLogicManager.isMainlands())
            {
                return;
            }
            if (MainLandLogic.GetInstance() == null)
            {
                return;
            }
            if (!MainLandLogic.GetInstance().ThemeLoadManager)
            {
                return;
            }
            //var players = getPlayer(isShow);
            SceneRootEntry sceneRoot = MainLandLogic.GetInstance().ThemeLoadManager.GetSceneRoot();

            if (sceneRoot != null && sceneRoot.m_SceneRoot != null)
            {
                Transform playersList = sceneRoot.m_SceneRoot.transform.Find("PlayerList");
                if (playersList != null)
                {
                    //运镖的时候不能隐藏
                    if (!AllianceUtil.IsInTransferDart)
                    {
                        playersList.gameObject.CustomSetActive(isShow);
                    }
                    else
                    {
                        playersList.gameObject.CustomSetActive(true);
                    }
                }

                Transform enemysList = sceneRoot.m_SceneRoot.transform.Find("ObjectManager");
                if (enemysList != null)
                {
                    enemysList.gameObject.CustomSetActive(isShow);
                }
            }
        }
Exemplo n.º 18
0
        public override void InitTrigger(string scene_name)
        {
            base.InitTrigger(scene_name);
            //locator1:QingDiYuYuan:(1,2,3);locator1:QingDiYuYuan:(1,2,3)
            //string trigger_text = "Triggers_1_4:QingDiYuYuan:(31.18,0.0,36.67);Triggers_1_2:LongGong:(35,-0.5,75)";
            m_Triggers = Hotfix_LT.Data.SceneTemplateManager.GetSceneTransferPoints(scene_name, SceneLogicManager.getMultyPlayerSceneType());
            //if (string.IsNullOrEmpty(trigger_text)) return;
            //string[] triggers = trigger_text.Split(';');
            //if (triggers != null)
            //{
            //    for (int i = 0; i < triggers.Length; i++)
            //    {
            //        string[] splits = triggers[i].Split(':');
            //        if (splits != null && splits.Length >= 3)
            //        {
            //            Vector3 pos = GM.LitJsonExtension.ImportVector3(splits[2]);
            //            m_Triggers.Add(new TransferTriggerEntry(splits[0], splits[1], pos));

            //        }
            //        else EB.Debug.LogError("Transfer Trigger Format Error for " + scene_name);
            //    }
            //}
            IsTransfering = false;
        }
Exemplo n.º 19
0
        public override void InitTrigger(string scene_name)
        {
            if (m_Triggers == null)
            {
                m_Triggers = new List <TriggerEntry>();
            }
            //if (m_Triggers.Count != 0 && SceneLogicManager.isCampaign()) return;//1 副本里面 只有第一次要重新
            m_Triggers.Clear();
            AttackTarget = null;
            string trigger_text = Hotfix_LT.Data.SceneTemplateManager.GetSceneTriggerDialgue(scene_name, SceneLogicManager.getMultyPlayerSceneType());

            if (string.IsNullOrEmpty(trigger_text))
            {
                return;
            }
            string[] triggers = trigger_text.Split(',');
            if (triggers != null)
            {
                for (int i = 0; i < triggers.Length; i++)
                {
                    string[] splits = triggers[i].Split(':');
                    if (splits != null && splits.Length >= 2)
                    {
                        int dialogue_id = 0;
                        if (int.TryParse(splits[1], out dialogue_id))
                        {
                            m_Triggers.Add(new DialogueTriggerEntry(splits[0], dialogue_id));
                        }
                    }
                    else
                    {
                        EB.Debug.LogError("Dialogue Trigger Format Error for {0}", scene_name);
                    }
                }
                //凡是副本就额外加一个 这样在打最后一个怪时 如果失败复活 不会导致trigger全部init 呼应上面的注释
                //if (SceneLogicManager.isCampaign()) m_Triggers.Add(new DialogueTriggerEntry("", 0));
            }
        }
Exemplo n.º 20
0
        public override IEnumerator OnAddToStack()
        {
            yield return(base.OnAddToStack());

            m_PK.gameObject.CustomSetActive(SceneLogicManager.getSceneType() != SceneLogicManager.SCENE_COMBAT);
        }
Exemplo n.º 21
0
        IEnumerator ProgressChange(float f, Data.eRoleAttr attr = Data.eRoleAttr.None)
        {
            while (!SceneLogicManager.isMainlands()) //等到主城中
            {
                yield return(null);
            }

            int buffIndex = -1;

            if (_progress != null)
            {
                if (f > 0.67)
                {
                    _progress.value = 0.67f;
                }
                else if (f > 0.34)
                {
                    _progress.value = 0.34f;
                }
            }

            float pv = _progress != null ? _progress.value : 0f;

            while (pv != f)
            {
                if (pv > f)
                {
                    pv -= 0.004f;

                    if (pv < f)
                    {
                        pv = f;
                    }
                }
                else if (pv < f)
                {
                    pv += 0.004f;

                    if (pv > f)
                    {
                        pv = f;
                    }
                }

                if (_progress != null)
                {
                    _progress.value = pv;
                }

                int index = 0;

                if (pv > 0.67)
                {
                    index = 2;
                }
                else if (pv > 0.34)
                {
                    index = 1;
                }
                else if (pv > 0)
                {
                    index = 0;
                }

                if (buffIndex != index)
                {
                    buffIndex = index;

                    if (_items != null)
                    {
                        for (int i = 0; i < _items.Length; i++)
                        {
                            if (i > index)
                            {
                                _items[i].wenSpt.gameObject.SetActive(true);
                                _items[i].attributeIcon.gameObject.SetActive(false);
                                SetFxObjAction(_items[i]);
                            }
                            else
                            {
                                _items[i].wenSpt.gameObject.SetActive(false);
                                _items[i].attributeIcon.gameObject.SetActive(true);
                                SetFxObjAction(_items[i], attr);
                            }
                        }
                    }
                }

                yield return(null);
            }

            if (pv > 0.99f)
            {
                if (_boxFx != null)
                {
                    _boxFx.enabled = true;
                }

                yield return(OpenAward());
            }
        }