コード例 #1
0
 public virtual void Interact(GameObject player)
 {
     GlobalUtils.CallStaticHotfixEx("Hotfix_LT.UI.WorldMapPathManager", "Instance", "StopPath");       //这个还需要存在,不然寻路到NPC处寻路数据未清理
     if (!UIStack.Instance.IsUIBlockingScreen)
     {
         GlobalUtils.CallStaticHotfix("Hotfix_LT.MessengerAdapter", "OnInteractEvent", player, gameObject);
         onInteract(player);
     }
 }
コード例 #2
0
 public void MergeDataHandler(Hashtable data)
 {
     if (data != null)
     {
         //ToDo:
         //GameDataSparxManager.Instance.ProcessIncomingData(data, true);
         GlobalUtils.CallStaticHotfixEx("Hotfix_LT.UI.GameDataSparxManager", "Instance", "ProcessIncomingData", data, true);
     }
 }
コード例 #3
0
    public void OnCombatBossCameraListenerEx(string name)
    {
        float size = (float)GlobalUtils.CallStaticHotfixEx("Hotfix_LT.Data.NewGameConfigTemplateManager", "Instance", "GetGameConfigValue", string.Format("{0}CameraParam", name));

        if (size != 0)
        {
            Instance.transform.localPosition = new Vector3(Instance.transform.localPosition.x, size, Instance.transform.localPosition.z);
        }
    }
コード例 #4
0
        public void Start()
        {
            int dialogueid = GetParameterAsInt(0);

            GlobalUtils.CallStaticHotfixEx("Hotfix_LT.UI.DialoguePlayUtil", "Instance", "Play", dialogueid, new System.Action(delegate()
            {
                Stop();
            }));
        }
コード例 #5
0
 private void RealRelogin()
 {
     //Debug.LogWarning("RealRelogin!");
     TimerManager.instance.RemoveAllTimer();
     GlobalUtils.CallStaticHotfixEx("Hotfix_LT.ILRTimerManager", "instance", "RemoveAllTimer");
     //UIStack.Instance.ShowLogoutScreen();
     GameStateManager.Instance.SetGameState <GameStateLogin>();
     //UIStack.Instance.ForceHideLoadingScreen();
     //LoadingSpinner.Destroy();
 }
コード例 #6
0
        public static CombatantData ParseCombatantData(IDictionary info, CombatantData fill)
        {
            if (fill == null)
            {
                fill = new CombatantData();
            }

            fill.IsPlayer       = info.Contains("isUser") && info["isUser"] != null && bool.Parse(info["isUser"].ToString());
            fill.IsPlayerMirror = info.Contains("isUserMirror") && info["isUserMirror"] != null && bool.Parse(info["isUserMirror"].ToString());
            fill.PlayerId       = info.Contains("uid") && info["uid"] != null?long.Parse(info["uid"].ToString()) : 0;

            fill.IsEnemy = info.Contains("isEnemy") && info["isEnemy"] != null && bool.Parse(info["isEnemy"].ToString());
            fill.EnemyId = info.Contains("enemyId") && info["enemyId"] != null?int.Parse(info["enemyId"].ToString()) : 0;

            fill.IsPlayerTroop       = info.Contains("isPlayerTroop") && info["isPlayerTroop"] != null && bool.Parse(info["isPlayerTroop"].ToString());
            fill.IsPlayerTroopMirror = info.Contains("isPlayerTroopMirror") && info["isPlayerTroopMirror"] != null && bool.Parse(info["isPlayerTroopMirror"].ToString());
            fill.IsEnemyTroop        = info.Contains("isEnemyTroop") && info["isEnemyTroop"] != null && bool.Parse(info["isEnemyTroop"].ToString());
            fill.TroopId             = info.Contains("troopId") && info["troopId"] != null?int.Parse(info["troopId"].ToString()) : 0;

            fill.Threaten = info.Contains("threaten") && bool.Parse(info["threaten"].ToString());
            fill.Level    = info.Contains("level") && info["level"] != null?int.Parse(info["level"].ToString()) : 0;

            fill.Name        = info.Contains("name") ? info["name"].ToString() : string.Empty;
            fill.Model       = info["model"].ToString();
            fill.Portrait    = info["portrait"].ToString();
            fill.Position    = info["pos"].ToString();
            fill.TplId       = int.Parse(info["tplId"].ToString());
            fill.CharacterId = int.Parse(info["characterId"].ToString());
            fill.Index       = CombatantIndex.Parse(info["index"] as IDictionary);

            ArrayList equipments = info.Contains("equipments") ? info["equipments"] as ArrayList : null;

            if (equipments != null)
            {
                fill.Equipments.Clear();

                var enumerator = equipments.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    IDictionary equip     = enumerator.Current as IDictionary;
                    string      name      = equip["name"].ToString();
                    string      assetName = equip["assetName"].ToString();
                    fill.Equipments[name] = assetName;
                }
            }

            if (string.IsNullOrEmpty(fill.Name))
            {
                fill.Name = (string)GlobalUtils.CallStaticHotfixEx("Hotfix_LT.Data.CharacterTemplateManager", "Instance", "GetHeroName", fill.CharacterId);
            }

            return(fill);
        }
コード例 #7
0
    public void FetchDataHandler(Hashtable data)
    {
        if (data != null)
        {
            //ToDo:
            //GameDataSparxManager.Instance.ProcessIncomingData(data, false);
            GlobalUtils.CallStaticHotfixEx("Hotfix_LT.UI.GameDataSparxManager", "Instance", "ProcessIncomingData", data, false);

            if (data["playstate"] != null)
            {
                DataLookupsCache.Instance.CacheData(data);
            }
        }
    }
コード例 #8
0
    void ParallelDownloadResult(string assetname, GameObject go, bool bSuccessed)
    {
        EB.Debug.LogLoadLevel("<color=#ffffff>结束</color>逐个_加载场景需要的指定资源_assetname = {0}, 是否成功:{1}, realtimeSinceStartup = {2} ,time={3}", assetname, bSuccessed, Time.realtimeSinceStartup, Time.time);

        if (bSuccessed && m_SceneRoot != null)
        {
            go.transform.localPosition = m_LevelAssets[m_LevelAssetIndex].localPosition;
            go.transform.localScale    = m_LevelAssets[m_LevelAssetIndex].localScale;
            go.transform.localRotation = m_LevelAssets[m_LevelAssetIndex].localRotation;
            go.transform.parent        = m_SceneRoot.transform;

            m_LevelAssetIndex++;

            if (OnLoading != null)
            {
                OnLoading(m_LevelAssetIndex, m_LevelAssets.Length);
            }

            if (m_LevelAssetIndex >= m_LevelAssets.Length)
            {
                HandleFinished();
            }

            if (go.name.IndexOf("Boss01Combat") >= 0 && !(bool)GlobalUtils.CallStaticHotfixEx("Hotfix_LT.UI.LTWorldBossDataManager", "Instance", "IsPlayWorldBossSpecialCam", true) && WorldBossCombatScene.Instance != null)
            {
                TimerManager.instance.AddTimer(150, 1, delegate
                {
                    WorldBossCombatScene.Instance.SetSceneStatus(2);//世界boss播放出场镜头的时候需要特殊设置场景状态
                });
            }
        }
        else
        {
            EB.Debug.LogError("逐个_加载场景需要的指定资源出错_Download a block scene item {0} failed!", assetname);
            if (bSuccessed)
            {
                GameObject.Destroy(go);
            }

            HandleFaild();
        }
    }
コード例 #9
0
        public ReactionEffectEvent FindComboTriggerReaction(CombatSkillEvent combo_skill)
        {
            bool res = (bool)GlobalUtils.CallStaticHotfixEx("Hotfix_LT.Data.SkillTemplateManager", "Instance", "IsComBo", combo_skill.SkillId);

            if (!res)
            {
                return(null);
            }

            CombatantIndex trigger = combo_skill.Trigger;

            if (trigger == null)
            {
                return(null);
            }

            int len = m_children.Count;

            for (int i = 0; i < len; i++)
            {
                CombatEffectEvent effect = m_children[i] as CombatEffectEvent;
                if (effect.EffectType != eCombatEffectType.REACTION)
                {
                    continue;
                }

                if (!effect.Target.Equals(trigger))
                {
                    continue;
                }

                return(effect as ReactionEffectEvent);
            }

            return(null);
        }
コード例 #10
0
 public void Start()
 {
     GlobalUtils.CallStaticHotfixEx("Hotfix_LT.UI.DialogueFrame", "Instance", "OnClick");
     Stop();
 }