少年修仙传客户端代码仓库
client_linchunjie
2018-12-06 ec03d591a58be4c7451a86e89674bba1c0f7f7dc
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
15个文件已修改
6个文件已添加
304 ■■■■■ 已修改文件
Core/NetworkPackage/ClientPack/ClientToGameServer/CA9_Function/CA904_tagCGQueryBossInfo.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToGameServer/CA9_Function/CA904_tagCGQueryBossInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ClientPack.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H05_PlayerMove/DTC0501_tagObjMove.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/State/SMB/RunBase.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GAMgr.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/Resources.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BlastFurnace/GetItemPathWin.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonBossBriefInfoBehaviour.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonBossBriefInfoContainer.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/FindPreciousModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/RebornRightNowBossInfoQuery.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/RebornRightNowBossInfoQuery.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/BoxInfoWin.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemInfoWin.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemTipsModel.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskListTip.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/Logic/BuyItemInfoWin.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Tip/ChestDetailBehaviour.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/HUD/HeadUpName.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToGameServer/CA9_Function/CA904_tagCGQueryBossInfo.cs
New file
@@ -0,0 +1,23 @@
using UnityEngine;
using System.Collections;
// A9 04 查询boss信息 #tagCGQueryBossInfo
public class CA904_tagCGQueryBossInfo : GameNetPackBasic
{
    public byte Count;    //数量
    public uint[] BossIDList;    //boosid
    public CA904_tagCGQueryBossInfo()
    {
        combineCmd = (ushort)0x1801;
        _cmd = (ushort)0xA904;
    }
    public override void WriteToBytes()
    {
        WriteBytes(Count, NetDataType.BYTE);
        WriteBytes(BossIDList, NetDataType.DWORD, Count);
    }
}
Core/NetworkPackage/ClientPack/ClientToGameServer/CA9_Function/CA904_tagCGQueryBossInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e8252f9152b018e4596b3d11fc2e9e12
timeCreated: 1544085662
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ClientPack.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 722e5e3d30096674e811f5bd191246a0
folderAsset: yes
timeCreated: 1539228128
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/H05_PlayerMove/DTC0501_tagObjMove.cs
@@ -29,10 +29,12 @@
        Vector3 _destPosition = new Vector3((vNetData.DestPosX - GA_Hero.MapOffset.x) * .5f, _actor.Pos.y, (vNetData.DestPosY - GA_Hero.MapOffset.z) * .5f);
        if (_actor is GA_Pet)
        {
            if (MathUtility.DistanceSqrtXZ(_destPosition, _actor.Pos) < 2f)
            //float _distance = MathUtility.DistanceSqrtXZ(_destPosition, _actor.Pos);
            //Debug.LogFormat("收到宠物移动包: {0} 当前坐标: {1}, 将要移动到: {2}, 当前距离: {3}", vNetData.ObjID, new Vector2((int)(_actor.Pos.x * 2), (int)(_actor.Pos.z * 2)),
            //    new Vector2(vNetData.DestPosX, vNetData.DestPosY), _distance);
            if (MathUtility.DistanceSqrtXZ(_destPosition, _actor.Pos) < 0.2f)
            {
                return;
            }
Fight/Actor/State/SMB/RunBase.cs
@@ -13,6 +13,16 @@
    {
        base.OnUpdate(owner, animator, stateInfo, layerIndex);
        if (owner is GA_Pet)
        {
            if (animator.IsInTransition(0)
             && (animator.GetNextAnimatorStateInfo(0).shortNameHash == GAStaticDefine.State_IdleHash
              || animator.GetNextAnimatorStateInfo(0).shortNameHash == GAStaticDefine.State_RunHash))
            {
                return;
            }
        }
        if (owner.State != E_ActorState.AutoRun)
        {
            if (owner.destForward != Vector3.zero)
Fight/GameActor/GAMgr.cs
@@ -14,8 +14,6 @@
    public Dictionary<int, string> s_NpcID2BundleName = new Dictionary<int, string>();
    public Dictionary<int, string> s_NpcID2Assetname = new Dictionary<int, string>();
    public event UnityAction<uint> OnGActorRequest;
    public event UnityAction<uint> OnGActorServerDie;
Lua/Gen/Resources.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a545fb3dcf719304fa74180c10219375
folderAsset: yes
timeCreated: 1542357825
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
System/BlastFurnace/GetItemPathWin.cs
@@ -305,16 +305,20 @@
        private void SetMidUI()
        {
            _describeText.alignment = TextAnchor.UpperLeft;
            if (itemPathModel.chinItemModel.Effect1 != 215)
            {
                _describeText.text = itemPathModel.GetAllInfoDes();
            }
            else
            string infoDes = itemPathModel.GetAllInfoDes();
            if (infoDes.Contains("{Exp}"))
            {
                ulong expValue = itemTipsModel.GetAddExpValue(itemPathModel.chinItemModel.EffectValueA1, itemPathModel.chinItemModel.EffectValueB1);
                _describeText.text = itemPathModel.GetAllInfoDes().Replace("{0}", UIHelper.ReplaceLargeNum(expValue));
                infoDes = infoDes.Replace("{Exp}", UIHelper.ReplaceLargeNum(expValue));
            }
            if (infoDes.Contains("{FightPower}"))
            {
                int fightPower = 0;
                itemTipsModel.TryGetFightPowerByItemId(itemPathModel.chinItemModel.ID, out fightPower);
                infoDes = infoDes.Replace("{FightPower}", fightPower.ToString());
            }
          
            _describeText.text = infoDes;
        }
        #region 点击事件
System/Dungeon/DungeonBossBriefInfoBehaviour.cs
@@ -18,6 +18,7 @@
        [SerializeField] TimerBehaviour m_RebornTime;
        [SerializeField] Text m_Alive;
        [SerializeField] Text m_RebornAtOnce;
        [SerializeField] RebornRightNowBossInfoQuery m_BossInfoQuery;
        int bossId = 0;
        FindPreciousModel model { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
@@ -31,7 +32,9 @@
            var config = Config.Instance.Get<NPCConfig>(bossId);
            m_Level.text = Language.Get("Z1024", config.NPCLV);
            m_BossInfoQuery.bossId = bossId;
            OnBossInfoUpdate(bossId);
            model.bossInfoUpdateEvent -= OnBossInfoUpdate;
            model.bossInfoUpdateEvent += OnBossInfoUpdate;
            m_MoveTo.RemoveAllListeners();
System/Dungeon/DungeonBossBriefInfoContainer.cs
@@ -92,6 +92,7 @@
                var behaviour = behaviours[i];
                if (i < bosses.Count)
                {
                    behaviour.Dispose();
                    behaviour.Display(bosses[i], OnMoveToBoss);
                    behaviour.gameObject.SetActive(true);
                }
System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
@@ -71,6 +71,8 @@
            base.Display(_data);
            bossId = (int)_data;
            var bossInfoQuery = this.AddMissingComponent<RebornRightNowBossInfoQuery>();
            bossInfoQuery.bossId = bossId;
            findPreciousModel.bossSubscribeChangeEvent -= OnSubscribe;
            findPreciousModel.bossSubscribeChangeEvent += OnSubscribe;
            findPreciousModel.bossInfoUpdateEvent -= OnBossInfoUpdate;
System/FindPrecious/FindPreciousModel.cs
@@ -113,6 +113,14 @@
            GameNetSystem.Instance.SendInfo(sendInfo);
        }
        public void RequestQueryBossInfo(int bossId)
        {
            var sendInfo = new CA904_tagCGQueryBossInfo();
            sendInfo.Count = 1;
            sendInfo.BossIDList = new uint[] { (uint)bossId };
            GameNetSystem.Instance.SendInfo(sendInfo);
        }
        public void OnPreciousDropRecordUpdate(HA003_tagUniversalGameRecInfo _serverInfo)
        {
            if (_serverInfo.Type != 25)
System/FindPrecious/RebornRightNowBossInfoQuery.cs
New file
@@ -0,0 +1,54 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, December 06, 2018
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class RebornRightNowBossInfoQuery : MonoBehaviour
    {
        public int bossId { get; set; }
        FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
        bool isRebornRightNow {
            get {
                FindPreciousModel.BossInfo bossInfo = null;
                if (findPreciousModel.TryGetBossInfo(bossId, out bossInfo))
                {
                    return !findPreciousModel.IsBossAlive(bossId) && TimeUtility.ServerNow > bossInfo.refreshTime;
                }
                else
                {
                    return false;
                }
            }
        }
        float rebornRightNowBossQueryTime = 0f;
        private void OnEnable()
        {
            rebornRightNowBossQueryTime = 0f;
        }
        private void LateUpdate()
        {
            if (Time.realtimeSinceStartup > rebornRightNowBossQueryTime)
            {
                if (isRebornRightNow)
                {
                    rebornRightNowBossQueryTime = Time.realtimeSinceStartup + 5f;
                    findPreciousModel.RequestQueryBossInfo(bossId);
                }
            }
        }
    }
}
System/FindPrecious/RebornRightNowBossInfoQuery.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f4bfabd35e5383641b417cc69d91d52f
timeCreated: 1544086386
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/KnapSack/Logic/BoxInfoWin.cs
@@ -163,7 +163,20 @@
                CheckUselimit();
            }
            itemDesText.text = itemTipsModel.curAttrData.GetAllInfoDes();
            string infoDes = itemTipsModel.curAttrData.GetAllInfoDes();
            if (infoDes.Contains("{Exp}"))
            {
                ulong expValue = itemTipsModel.GetAddExpValue(itemTipsModel.curAttrData.itemConfig.EffectValueA1, itemTipsModel.curAttrData.itemConfig.EffectValueB1);
                infoDes = infoDes.Replace("{Exp}", UIHelper.ReplaceLargeNum(expValue));
            }
            if (infoDes.Contains("{FightPower}"))
            {
                int fightPower = 0;
                itemTipsModel.TryGetFightPowerByItemId(itemTipsModel.curAttrData.itemId, out fightPower);
                infoDes = infoDes.Replace("{FightPower}", fightPower.ToString());
            }
            itemDesText.text = infoDes;
            operateBtn.SetActive(false);
            CreateFuncBtn();
System/KnapSack/Logic/ItemInfoWin.cs
@@ -144,32 +144,21 @@
            itemCell.Init(cellModel);
            CheckUselimit();
            if(itemTipsModel.curAttrData.itemConfig.Effect1 != 215)
            {
                int type = 0;
                bool isContain = itemTipsModel.TryGetContainsParamsType(itemTipsModel.curAttrData.itemId,out type);
                if(isContain)
                {
                    switch(type)
                    {
                        case 1:
                            int fightPower = 0;
                            itemTipsModel.TryGetFightPowerByItemId(itemTipsModel.curAttrData.itemId, out fightPower);
                            itemDesText.text = itemTipsModel.curAttrData.GetAllInfoDes().Replace("{0}",fightPower.ToString());
                            break;
                    }
                }
                else
                {
                    itemDesText.text = itemTipsModel.curAttrData.GetAllInfoDes();
                }
            }
            else
            string infoDes = itemTipsModel.curAttrData.GetAllInfoDes();
            if(infoDes.Contains("{Exp}"))
            {
                ulong expValue = itemTipsModel.GetAddExpValue(itemTipsModel.curAttrData.itemConfig.EffectValueA1, itemTipsModel.curAttrData.itemConfig.EffectValueB1);
                itemDesText.text = itemTipsModel.curAttrData.GetAllInfoDes().Replace("{0}", UIHelper.ReplaceLargeNum(expValue));
                infoDes = infoDes.Replace("{Exp}", UIHelper.ReplaceLargeNum(expValue));
            }
             if(infoDes.Contains("{FightPower}"))
            {
                int fightPower = 0;
                itemTipsModel.TryGetFightPowerByItemId(itemTipsModel.curAttrData.itemId, out fightPower);
                infoDes = infoDes.Replace("{FightPower}", fightPower.ToString());
            }
            itemDesText.text = infoDes;
            operateBtn.SetActive(false);
            CreateFuncBtn();
System/KnapSack/Logic/ItemTipsModel.cs
@@ -95,24 +95,6 @@
            FuncConfigConfig EquipOutWordID = Config.Instance.Get<FuncConfigConfig>("EquipOutWordID");
            PeerlessEquipIds = ConfigParse.GetMultipleStr<int>(EquipOutWordID.Numerical1);
            FuncConfigConfig ItemTipsNum = Config.Instance.Get<FuncConfigConfig>("ItemTipsNum");
            JsonData itemParamsData = JsonMapper.ToObject(ItemTipsNum.Numerical1);
            itemParamsDict = new Dictionary<int, List<int>>();
            foreach (var type in itemParamsData.Keys)
            {
                List<int> list = new List<int>();
                itemParamsDict.Add(int.Parse(type),list);
                if(itemParamsData[type].IsArray)
                {
                    for (int i = 0; i < itemParamsData[type].Count; i++)
                    {
                        int num = 0;
                        int.TryParse(itemParamsData[type][i].ToString(),out num);
                        list.Add(num);
                    }
                }
            }
            FuncConfigConfig legendAttrColor = Config.Instance.Get<FuncConfigConfig>("LegendAttrColor");
            equipLegendAttrTypeDict = new Dictionary<int, List<int>>();
            wingsLegendAttrColorDict = new Dictionary<int, Dictionary<int, string>>();
@@ -688,21 +670,6 @@
        private StringBuilder attrSB = new StringBuilder();
        private PlayerPropertyConfig playerProModel;
        public bool TryGetContainsParamsType(int param,out int _type)
        {
            _type = 0;
            foreach(var type in itemParamsDict.Keys)
            {
                var list = itemParamsDict[type];
                if(list.Contains(param))
                {
                    _type = type;
                    return true;
                }
            }
            return false;
        }
        #region 设置装备基础信息
        /// <summary>
@@ -2595,7 +2562,7 @@
            if (itemTipsModel.randomRuneIds.Contains(itemConfig.ID))
            {
                return string.Format(itemConfig.Description, GetExtraInfos());
                return  itemConfig.Description.Replace("{Rune}", GetExtraInfos());
            }
            else
            {
System/MainInterfacePanel/TaskListTip.cs
@@ -251,7 +251,7 @@
        IEnumerator WaitAddTask(int MissionID, int MissionState)
        {
            yield return WaitingForSecondConst.WaitMS800;//缓冲一秒再进行
            yield return WaitingForSecondConst.WaitMS300;//缓冲0.3秒再进行
            var inDungeon = IsDungeon();
            TaskScheduling();
            if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !inDungeon)
System/Store/Logic/BuyItemInfoWin.cs
@@ -156,32 +156,19 @@
            CheckUselimit();
            if (itemTipsModel.curAttrData.itemConfig.Effect1 != 215)
            {
                int type = 0;
                bool isContain = itemTipsModel.TryGetContainsParamsType(itemTipsModel.curAttrData.itemId, out type);
                if (isContain)
                {
                    switch (type)
                    {
                        case 1:
                            int fightPower = 0;
                            itemTipsModel.TryGetFightPowerByItemId(itemTipsModel.curAttrData.itemId, out fightPower);
                            itemDesText.text = itemTipsModel.curAttrData.itemConfig.Description.Replace("{0}",fightPower.ToString());
                            break;
                    }
                }
                else
                {
                    itemDesText.text = itemTipsModel.curAttrData.itemConfig.Description;
                }
            }
            else
            string infoDes = itemTipsModel.curAttrData.GetAllInfoDes();
            if (infoDes.Contains("{Exp}"))
            {
                ulong expValue = itemTipsModel.GetAddExpValue(itemTipsModel.curAttrData.itemConfig.EffectValueA1, itemTipsModel.curAttrData.itemConfig.EffectValueB1);
                itemDesText.text = itemTipsModel.curAttrData.itemConfig.Description.Replace("{0}", UIHelper.ReplaceLargeNum(expValue));
                infoDes = infoDes.Replace("{Exp}", UIHelper.ReplaceLargeNum(expValue));
            }
            if (infoDes.Contains("{FightPower}"))
            {
                int fightPower = 0;
                itemTipsModel.TryGetFightPowerByItemId(itemTipsModel.curAttrData.itemId, out fightPower);
                infoDes = infoDes.Replace("{FightPower}", fightPower.ToString());
            }
            itemDesText.text = infoDes;
            if (itemTipsModel.curAttrData.itemConfig.ExpireTime > 0)
            {
System/Tip/ChestDetailBehaviour.cs
@@ -97,7 +97,20 @@
                DisplayUseLimit(itemConfig);
            }
            m_Description.text = itemTipsModel.curAttrData.GetAllInfoDes();
            string infoDes = itemTipsModel.curAttrData.GetAllInfoDes();
            if (infoDes.Contains("{Exp}"))
            {
                ulong expValue = itemTipsModel.GetAddExpValue(itemTipsModel.curAttrData.itemConfig.EffectValueA1, itemTipsModel.curAttrData.itemConfig.EffectValueB1);
                infoDes = infoDes.Replace("{Exp}", UIHelper.ReplaceLargeNum(expValue));
            }
            if (infoDes.Contains("{FightPower}"))
            {
                int fightPower = 0;
                itemTipsModel.TryGetFightPowerByItemId(itemTipsModel.curAttrData.itemId, out fightPower);
                infoDes = infoDes.Replace("{FightPower}", fightPower.ToString());
            }
            m_Description.text = infoDes;
            int useCnt = BoxModel.GetUseCntByID(itemTipsModel.curAttrData.itemId);
            m_UseTimes.gameObject.SetActive(itemConfig.MaxSkillCnt > 0);
UI/HUD/HeadUpName.cs
@@ -35,6 +35,7 @@
        [SerializeField] TimerBehaviour m_TimeBehaviour;
        [SerializeField] Text m_RebornTime;
        [SerializeField] Text m_NpcAppearTxt;
        [SerializeField] RebornRightNowBossInfoQuery m_BossInfoQuery;
        [SerializeField] Text m_FuncTxt;
        bool secondTextInited = false;
@@ -298,6 +299,8 @@
            {
                return;
            }
            m_BossInfoQuery.bossId = npcId;
            FindPreciousModel.BossInfo _bossInfo;
            if (findPreciousModel.TryGetBossInfo(npcId, out _bossInfo))
            {
@@ -312,6 +315,7 @@
            {
                m_RebornTime.gameObject.SetActive(false);
            }
            m_NpcAppearTxt.gameObject.SetActive(!m_RebornTime.gameObject.activeSelf);
        }