少年修仙传客户端代码仓库
client_linchunjie
2018-09-28 532c9977162a524f8ead877904173ed9b7cfc132
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
10个文件已修改
134 ■■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/BossFakeLineUtility.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/MapTransferUtility.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PackSendQuestMgr.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/RoleModel.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/RoleRenameWin.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastAttributes.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastReinforcementWin.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastSlidingList.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -26,6 +26,12 @@
        DEBUG_STEP = 0;
        DTC0403_tagPlayerLoginLoadOK.neverLoginOk = true;
        MapTransferUtility.Instance.lastMoveToWorldBossTime = float.MinValue;
        MapTransferUtility.Instance.lastMoveToWorldBossNpcID = 0;
        BossFakeLineUtility.Instance.inMistakeForBossAliveOverTime = float.MaxValue;
        BossFakeLineUtility.Instance.makeFakeLineTimes = 0;
        BossFakeLineUtility.Instance.showFakeLine = false;
        if (beforePlayerDataInitializeEvent != null)
        {
            beforePlayerDataInitializeEvent();
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs
@@ -27,6 +27,11 @@
            return;
        }
        if (BossInfoConfig.IsStone((int)vNetData.NPCID))
        {
            BossFakeLineUtility.Instance.HasSawLineStoneRecently((int)vNetData.NPCID, PlayerDatas.Instance.baseData.FBID);
        }
        if (GA_PlayerXMZZ.xmzzDict.ContainsKey(vNetData.NPCID))
        {
            _actor = GAMgr.Instance.RequestPlayer<GA_PlayerXMZZ>(vNetData.ObjID, E_ActorGroup.Player, vNetData);
@@ -43,8 +48,7 @@
                    MapTransferUtility.Instance.lastMoveToWorldBossTime = Time.realtimeSinceStartup;
                }
                BossFakeLineUtility.Instance.inMistakeForBossAliveOverTime = Time.realtimeSinceStartup + 61;
                BossFakeLineUtility.Instance.lastBossNpcID = vNetData.NPCID;
                BossFakeLineUtility.Instance.HasSawLineBossRecently((int)vNetData.NPCID, PlayerDatas.Instance.baseData.FBID);
            }
            if (_npcConfig == null)
Fight/BossFakeLineUtility.cs
@@ -8,13 +8,15 @@
public class BossFakeLineUtility : Singleton<BossFakeLineUtility>
{
    int m_MakeFakeLineTimes = 0;
    public int makeFakeLineTimes {
    public int makeFakeLineTimes
    {
        get { return m_MakeFakeLineTimes; }
        set { m_MakeFakeLineTimes = Mathf.Clamp(value, 0, int.MaxValue); }
    }
    bool m_ShowFakeLine = false;
    public bool showFakeLine {
    public bool showFakeLine
    {
        get { return m_ShowFakeLine; }
        set { m_ShowFakeLine = value; }
    }
@@ -26,7 +28,7 @@
    //这个值在初见boss和最后看见boss的时候记录,其值为time.time+1分钟,这段时间内告诉玩家其所在分线的boss的死亡情况,否则告诉玩家公共boss的死亡情况。
    public uint lastBossNpcID;
    public float inMistakeForBossAliveOverTime = 0f;
    public float inMistakeForBossAliveOverTime = float.MaxValue;
    public bool IsShuntBoss(int _bossId)
    {
@@ -89,6 +91,8 @@
        var isMistakeBoss = lastBossNpcID == bossId && Time.realtimeSinceStartup < inMistakeForBossAliveOverTime;
        //补充具体逻辑
        inMistakeForBossAliveOverTime = Time.realtimeSinceStartup + 61;
        lastBossNpcID = (uint)bossId;
        return false;
    }
Fight/MapTransferUtility.cs
@@ -180,7 +180,7 @@
        }
    }
    public void MoveToNPC(int npcID)
    public void MoveToNPC(int npcID, int sid = 0)
    {
        NPCConfig _config = Config.Instance.Get<NPCConfig>(npcID);
@@ -350,25 +350,24 @@
                }
                else
                {
                    //Debug.LogFormat(" |-- 在本地图");
                    if (PlayerDatas.Instance.baseData.FBID != 0)
                    {
                        if (BossFakeLineUtility.Instance.IsShuntBoss(npcID))
                        {
                            //Debug.LogFormat(" |-- BossFakeLineUtility.Instance.makeFakeLineTimes = 1");
                            BossFakeLineUtility.Instance.makeFakeLineTimes = 1;
                        }
                    }
                    //Debug.LogFormat(" |-- 在本地图");
                    // Debug.LogFormat("lastMoveToWorldBossNpcID: {0}, Time: {1}, FBID: {2}, showFakeLine: {3}, FairyBoss: {4}",
                    //             lastMoveToWorldBossNpcID,
                    //             Time.realtimeSinceStartup - lastMoveToWorldBossTime,
                    //             PlayerDatas.Instance.baseData.FBID,
                    //             BossFakeLineUtility.Instance.showFakeLine,
                    //             _fairyBossModel.bosses != null
                    //     && _fairyBossModel.bosses.Contains(npcID));
                    if (((lastMoveToWorldBossNpcID == npcID
                    && Time.realtimeSinceStartup - lastMoveToWorldBossTime < 60)
                    && PlayerDatas.Instance.baseData.FBID == 0)
                    || BossFakeLineUtility.Instance.showFakeLine
                    || (_fairyBossModel.bosses != null
                     && _fairyBossModel.bosses.Contains(npcID)))
                        && Time.realtimeSinceStartup - lastMoveToWorldBossTime < 60)
                        && PlayerDatas.Instance.baseData.FBID == 0)
                        || BossFakeLineUtility.Instance.showFakeLine
                        || (_fairyBossModel.bosses != null
                        && _fairyBossModel.bosses.Contains(npcID)))
                    {
                        //Debug.LogFormat(" |-- 非想去的boss为60秒内行为产生且为同一只boss, {0}, {1}", BossFakeLineUtility.Instance.showFakeLine,
                        //PlayerDatas.Instance.baseData.FBID);
                        PlayerDatas.Instance.baseData.FBID);
                        Vector3 _destPos = new Vector3(_npcLocation.position.x, _hero.Pos.y, _npcLocation.position.y);
                        _hero.MoveToPosition(_destPos, _npcLocation.scope);
                    }
@@ -376,8 +375,14 @@
                    {
                        // 处于相同地图
                        if (BossFakeLineUtility.Instance.lastBossNpcID != npcID
                         || Time.realtimeSinceStartup - BossFakeLineUtility.Instance.inMistakeForBossAliveOverTime > 60)
                            || Time.realtimeSinceStartup - BossFakeLineUtility.Instance.inMistakeForBossAliveOverTime > 60)
                        {
                            if (BossFakeLineUtility.Instance.IsShuntBoss(npcID))
                            {
                                //Debug.LogFormat(" |-- BossFakeLineUtility.Instance.makeFakeLineTimes = 1");
                                BossFakeLineUtility.Instance.makeFakeLineTimes = 1;
                            }
                            //Debug.LogFormat(" |-- 非想去的boss记录,或则见到boss时差超过60秒");
                            Send_WorldTransfer(_npcLocation.mapId, new Vector3(_hero.Pos.x * 2, 0, _hero.Pos.z * 2), MapTransferType.WorldTransport, 0, npcID);
                        }
System/KnapSack/Logic/PackSendQuestMgr.cs
@@ -865,7 +865,7 @@
                                SendMakeUseQuest(itemModel.itemInfo.ItemPlace);
                            }
                            break;
                        case 953:
                        case RoleRenameWin.renameToolId:
                            WindowCenter.Instance.Open<RoleRenameWin>();
                            break;
                        default:
System/Role/RoleModel.cs
@@ -57,8 +57,13 @@
                case RoleRenameResult.RenameFailErr:
                    break;
                case RoleRenameResult.RenameSuccess:
                    string info = StringUtility.Contact("我是",UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName),"现在改名为",playerRename);
                    string info = Language.Get("RenameText_02", UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName), playerRename);
                    friendsModel.SendChatInfoByGroup(GroupType.Friend,info);
                    SysNotifyMgr.Instance.ShowTip("RenameSuccess01", playerRename);
                    if(WindowCenter.Instance.IsOpen<RoleRenameWin>())
                    {
                        WindowCenter.Instance.CloseImmediately<RoleRenameWin>();
                    }
                    GameNetSystem.Instance.Reconnect();
                    break;
            }
System/Role/RoleRenameWin.cs
@@ -16,7 +16,8 @@
        PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
        ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        RoleModel roleModel { get { return ModelCenter.Instance.GetModel<RoleModel>(); } }
        GetItemPathModel pathModel { get { return ModelCenter.Instance.GetModel<GetItemPathModel>(); } }
        public const int renameToolId = 953;
        protected override void BindController()
        {
@@ -45,21 +46,31 @@
        private void OnDisplay()
        {
            ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(953);
            ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(renameToolId);
            if (itemConfig == null) return;
            ItemCellModel cellModel = new ItemCellModel(953,false,(ulong)GetRenameToolNum());
            ItemCellModel cellModel = new ItemCellModel(renameToolId, false,(ulong)GetRenameToolNum());
            itemCell.Init(cellModel);
            if(GetRenameToolNum() > 0)
            {
                itemCell.countText.text = StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Green,GetRenameToolNum().ToString()),
                    "/",1);
            }
            else
            {
                itemCell.countText.text = StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Red,0.ToString()),
                   "/", 1);
            }
            itemCell.cellBtn.RemoveAllListeners();
            itemCell.cellBtn.AddListener(()=>
            {
                ItemAttrData attrData = new ItemAttrData(953);
                ItemAttrData attrData = new ItemAttrData(renameToolId);
                tipsModel.SetItemTipsModel(attrData);
            });
        }
        private int GetRenameToolNum()
        {
            return playerPack.GetItemCountByID(PackType.rptItem,953);
            return playerPack.GetItemCountByID(PackType.rptItem, renameToolId);
        }
        private int GetRenameToolIndex()
@@ -67,7 +78,7 @@
            SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
            if (singlePack == null) return 0;
            List<int> indexlist = singlePack.ItemIndexlist(953,1);
            List<int> indexlist = singlePack.ItemIndexlist(renameToolId, 1);
            if(indexlist.Count > 0)
            {
                return indexlist[0] + 1;
@@ -84,7 +95,7 @@
            }
            if(GetRenameToolNum() < 1)
            {
                MessageWin.Inst.ShowFixedTip("角色改名卡不足");
                pathModel.SetChinItemModel(renameToolId);
                return;
            }
@@ -105,7 +116,7 @@
                return;
            }
            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), StringUtility.Contact("确定改名为", renameInput.text), (bool isOk) =>
            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),Language.Get("RenameText_01", renameInput.text), (bool isOk) =>
              {
                  if (isOk)
                  {
@@ -117,7 +128,7 @@
                             {
                                 roleModel.SetRename(name);
                                 CA122_tagUpdatePlayerName renamePlayerName = new CA122_tagUpdatePlayerName();
                                 renamePlayerName.NewNameLen = (byte)name.Length;
                                 renamePlayerName.NewNameLen = (byte)ChatCtrl.GetUTF8InfoLen(name);
                                 renamePlayerName.NewName = name;
                                 renamePlayerName.ItemIndex = (byte)GetRenameToolIndex();
                                 renamePlayerName.ServerID = (uint)ServerListCenter.Instance.currentServer.region_flag;
System/Strengthening/GodBeastAttributes.cs
@@ -243,11 +243,12 @@
                    m_ExpSlider.ResetStage();
                    m_ExpSlider.value = 1;
                    m_Slider.gameObject.SetActive(false);
                    int NeedExp = DogzEquipConfig.upExpTotal;
                    int NeedExp =0;
                    if (DogZLv > 0)
                    {
                        var Dogz_EquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv - 1);
                        NeedExp -= Dogz_EquipConfig.upExpTotal;
                        var Dogz_EquipConfig_1 = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv - 1);
                        var Dogz_EquipConfig_2 = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv - 2);
                        NeedExp = Dogz_EquipConfig_1.upExpTotal- Dogz_EquipConfig_2.upExpTotal;
                    }
                    m_ExpNum.text = NeedExp + "/" + NeedExp;
                }
System/Strengthening/GodBeastReinforcementWin.cs
@@ -101,7 +101,6 @@
        {
            JumpIndex = 0;
            godBeastModel.ItemPlace = -1;
           // godBeastModel.Absorption_Dic.Clear();
            playerPack.RefreshItemCountAct -= RefreshItemCountAct;
            m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
            DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent;
@@ -119,7 +118,6 @@
        {
            if (arg1 == PackType.rptDogzEquip)
            {
                //OnCreateGridLineCell(m_ScrollerController);
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
                m_GodBeastSlidingList.Init();
                m_GodBeastAttributes.Init();
System/Strengthening/GodBeastSlidingList.cs
@@ -112,21 +112,21 @@
        }
        private void OnEnable()
        {
            playerPack.RefreshItemCountAct += RefreshItemCountAct;
            playerPack.ItemCntReduceAct += ItemCntReduceAct;
            DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += MakeItemAnswerEvent;
            godBeastModel.AbsorbEvent += AbsorbEvent;
            playerPack.ItemCntAddAct += RefreshItemCountAct;
        }
      
        private void OnDisable()
        {
            playerPack.RefreshItemCountAct -= RefreshItemCountAct;
            playerPack.ItemCntReduceAct -= ItemCntReduceAct;
            DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent;
            godBeastModel.AbsorbEvent -= AbsorbEvent;
            playerPack.ItemCntAddAct -= RefreshItemCountAct;
        }
        public void Init()
        {
@@ -152,21 +152,13 @@
        {
            m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
        }
        private void ItemCntReduceAct(PackType arg1, int arg2, int arg3)
        private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer obj)
        {
            if (arg1 == PackType.rptDogzItem)
            if ((int)obj.MakeType == (int)MakeType.Def_mitDogzEquipPlus)
            {
                if (m_ToggleAll.isOn)
                {
                    m_ToggleAll.isOn = false;
                }
                GetGodBeastBag();
                FilterQuality();
                godBeastModel.AbsorbEventUpdate();
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
            }
        }
        private void RefreshItemCountAct(PackType arg1, int arg2, int arg3)
        {
            if (arg1 == PackType.rptDogzItem)