少年修仙传客户端代码仓库
client_Zxw
2018-09-20 1f5e35cd47a9baaaa6fa559c06640f47c9e79554
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
12个文件已修改
160 ■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/SDK/SDKUtility.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzActiveWin.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FriendSystem/MailAllModel.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginModel.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TipPanel.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreModel.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/WashTips.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureModel.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulModel.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulWin.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/UIHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -21,11 +21,6 @@
        H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer;
        SDKUtility.Instance.RoleLogin(vNetData.PlayerID.ToString(),
                                      vNetData.PlayerName,
                                      vNetData.LV.ToString(),
                                      vNetData.VIPLv.ToString());
        DEBUG_0102 = true;
        DTC0403_tagPlayerLoginLoadOK.finishedLogin = false;
        DEBUG_STEP = 0;
@@ -52,6 +47,12 @@
        }
        PlayerDatas.Instance.InitPlayerData(vNetData);
        SDKUtility.Instance.RoleLogin(vNetData.PlayerID.ToString(),
                                      vNetData.PlayerName,
                                      vNetData.LV.ToString(),
                                      vNetData.VIPLv.ToString());
        var _mapConfig = Config.Instance.Get<MapConfig>(vNetData.MapID);
        DTCA127_tagMCStartChangeMap.LineID = 0;
Core/SDK/SDKUtility.cs
@@ -655,6 +655,10 @@
        {
            m_PaymentTable["RechargeChannel"] = "1";
        }
        else if (ChannelPlatform == E_ChannelPlatform.Sp)
        {
            m_PaymentTable["RechargeChannel"] = "2";
        }
        var _stringBuilder = new System.Text.StringBuilder();
        var _md5Body = _stringBuilder.Append(m_PaymentTable["AppID"]).
@@ -896,11 +900,37 @@
    {
        m_Json.Clear();
        m_Json["code"] = CodeU2A.RoleLogin;
        m_Json["roleID"] = roleID;
        m_Json["roleName"] = roleName;
        m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag;
        m_Json["level"] = lv;
        m_Json["vipLevel"] = vipLV;
        m_Json["serverName"] = ServerListCenter.Instance.currentServer.name;
        m_Json["familyName"] = PlayerDatas.Instance.baseData.FamilyName;
        m_Json["level"] = PlayerDatas.Instance.baseData.LV;
        m_Json["job"] = PlayerDatas.Instance.baseData.Job.ToString();
        m_Json["money"] = PlayerDatas.Instance.baseData.Gold.ToString();
        m_Json["gameName"] = VersionConfig.Get().productName;
        m_Json["vipLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
        SendMessageToSDK(m_Json);
    }
    public void RoleLevelUp()
    {
        m_Json.Clear();
        m_Json["code"] = CodeU2A.RoleLevelUp;
        m_Json["roleID"] = PlayerDatas.Instance.PlayerId.ToString();
        m_Json["roleName"] = PlayerDatas.Instance.baseData.PlayerName;
        m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag;
        m_Json["serverName"] = ServerListCenter.Instance.currentServer.name;
        m_Json["familyName"] = PlayerDatas.Instance.baseData.FamilyName;
        m_Json["level"] = PlayerDatas.Instance.baseData.LV;
        m_Json["job"] = PlayerDatas.Instance.baseData.Job.ToString();
        m_Json["money"] = PlayerDatas.Instance.baseData.Gold.ToString();
        m_Json["gameName"] = VersionConfig.Get().productName;
        m_Json["vipLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
        SendMessageToSDK(m_Json);
    }
System/Dogz/DogzActiveWin.cs
@@ -178,21 +178,25 @@
            {
                m_PropertyTypes[i].gameObject.SetActive(i < _dogzCfg.BaseAttrTypes.Length);
                m_PropertyValues[i].gameObject.SetActive(i < _dogzCfg.BaseAttrTypes.Length);
                string addAttrStr = "";
                string baseAttrStr = "";
                if (i < _dogzCfg.BaseAttrTypes.Length)
                {
                    var _propertyCfg = Config.Instance.Get<PlayerPropertyConfig>(_dogzCfg.BaseAttrTypes[i]);
                    m_PropertyTypes[i].text = _propertyCfg.Name;
                    int attrValue = _dogzCfg.BaseAttrValues[i];
                    if (isAddAttr && model.m_DogzEquipAttrDict[_propertyCfg.ID] > 0)
                    {
                        m_PropertyValues[i].text = StringUtility.Contact(UIHelper.ReplacePercentage(_dogzCfg.BaseAttrValues[i], _propertyCfg.ISPercentage)
                      , _propertyCfg.ISPercentage == 1 ? "%" : string.Empty,"+",UIHelper.ReplacePercentage(model.m_DogzEquipAttrDict[_propertyCfg.ID], _propertyCfg.ISPercentage)
                        baseAttrStr = StringUtility.Contact(UIHelper.ReplacePercentage(_dogzCfg.BaseAttrValues[i], _propertyCfg.ISPercentage)
                      , _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
                        addAttrStr = StringUtility.Contact("+", UIHelper.ReplacePercentage(model.m_DogzEquipAttrDict[_propertyCfg.ID], _propertyCfg.ISPercentage)
                   , _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
                    }
                    else
                    {
                        m_PropertyValues[i].text = StringUtility.Contact(UIHelper.ReplacePercentage(_dogzCfg.BaseAttrValues[i], _propertyCfg.ISPercentage)
                        baseAttrStr = StringUtility.Contact(UIHelper.ReplacePercentage(_dogzCfg.BaseAttrValues[i], _propertyCfg.ISPercentage)
                      , _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
                    }
                  
@@ -200,13 +204,27 @@
                if(model.TryGetAssistDogzState(model.presentSelectDogz))
                {
                    m_PropertyTypes[i].material = MaterialUtility.GetUIDefaultGraphicMaterial();
                    m_PropertyValues[i].material = MaterialUtility.GetUIDefaultGraphicMaterial();
                    m_PropertyTypes[i].color = UIHelper.s_NavyBrown;
                    if(addAttrStr != "")
                    {
                        m_PropertyValues[i].text = StringUtility.Contact("<color=#401c06>", baseAttrStr, "</color>", "<color=#109d06>", addAttrStr, "</color>");
                    }
                    else
                    {
                        m_PropertyValues[i].text = StringUtility.Contact("<color=#401c06>", baseAttrStr, "</color>");
                    }
                }
                else
                {
                    m_PropertyTypes[i].material = MaterialUtility.GetDefaultSpriteGrayMaterial();
                    m_PropertyValues[i].material = MaterialUtility.GetDefaultSpriteGrayMaterial();
                    m_PropertyTypes[i].color = UIHelper.s_BrightWhiteColor;
                    if (addAttrStr != "")
                    {
                        m_PropertyValues[i].text = StringUtility.Contact("<color=#686868>", baseAttrStr, "</color>", "<color=#109d06>", addAttrStr, "</color>");
                    }
                    else
                    {
                        m_PropertyValues[i].text = StringUtility.Contact("<color=#686868>", baseAttrStr, "</color>");
                    }
                }
            }
        }
@@ -215,6 +233,7 @@
            m_Controller.m_Scorller.RefreshActiveCellViews();
            m_DogzAssistCnt.text = Language.Get("TreasurePrivilege_Dogz_1", StringUtility.Contact(model.GetAssistDogzCount(), "/", model.DogzAssistDefaultCnt));
            UpdateDogzBtn();
            UpdateDogzProperty();
        }
        private void UpdateDogzBtn()
        {
System/FriendSystem/MailAllModel.cs
@@ -89,6 +89,8 @@
    private Dictionary<string, MailInfo> mailModelDict = new Dictionary<string,MailInfo>();
    private List<MailInfo> timeOrderMailInfo = new List<MailInfo>();
    private Regex smatch = new Regex(@"<MailTemplate>([^>.\n]*)</MailTemplate>([^>.\n]*)", RegexOptions.Singleline);
    private Regex smatchSystem = new Regex(@"[\\]*\/[\\]*", RegexOptions.Singleline);
    public string mailTitleStr = "";
    public string mailContentstr = "";
    public string mailSendPersonStr = "";
@@ -345,6 +347,7 @@
    public void GetReciveMailContent(MailInfo info)
    {
        Debug.Log(info.Text);
        info.Text = smatchSystem.Replace(info.Text, "/");
        if (smatch.IsMatch(info.Text))
        {
            Match match = smatch.Match(info.Text);
@@ -422,7 +425,7 @@
           
                if(mailContentArray.Length > 2)
                {
                    string mailDes = Regex.Replace(mailContentArray[2], @"<[\\]+/r>", "</r>");
                    string mailDes = mailContentArray[2];
                    mailContentstr = mailDes;
                }
            }
System/Login/LoginModel.cs
@@ -286,6 +286,8 @@
                    else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Sp)
                    {
                        send.IDType = 3;
                        send.ExtraLen = (byte)SDKUtility.Instance.FreePlatformInfo.sessionID.Length;
                        send.Extra = SDKUtility.Instance.FreePlatformInfo.sessionID;
                    }
                    send.AccID = sdkLoginResult.account;
                    send.Password = sdkLoginResult.token;
@@ -295,6 +297,10 @@
                    send.AppID = VersionConfig.Get().appId;
                    send.AccountID = (uint)sdkLoginResult.accountID;// 内部登陆的时候的id
                    send.TokenExpire = sdkLoginResult.tokenExpire;// 内部登陆的时长,无所谓的
                    if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Sp)
                    {
                        send.TokenExpire = SDKUtility.Instance.FreePlatformInfo.timeStamp;
                    }
                    send.Phone = (byte)sdkLoginResult.phone;
                    send.ServerID = (uint)ServerListCenter.Instance.currentServer.region_flag;
                    if (sdkIDCheckIDAuthentication.type == "1")
System/MainInterfacePanel/TipPanel.cs
@@ -91,7 +91,8 @@
            {
                firstTimeRechargeModel.OpenFirstChargeTrialWin();
            }
            else if(!WindowCenter.Instance.CheckOpen<PetAndMountPushWin>()) //灵宠坐骑推送
            else if(!WindowCenter.Instance.CheckOpen<PetAndMountPushWin>()
                && !WindowCenter.Instance.CheckOpen<OffLineOnHookWin>()) //灵宠坐骑推送
            {
                storeModel.SetPushPetAndMountWinState();
            }
System/Store/StoreModel.cs
@@ -69,6 +69,7 @@
        NewBieCenter.Instance.guideBeginEvent -= GuidBegin;
        shopItemlimitDict.Clear();
        petAndMountPushlist.Clear();
        ClearPushData();
        tagTowerModel = null;
        storeFuncType = StoreFunc.WeekStore;
        tcbRefreshDict.Clear();
@@ -1118,7 +1119,11 @@
    private void GuidBegin()
    {
        SetPushPetAndMountWinState(true,true);
        PetAndMountPushWin pushWin = WindowCenter.Instance.Get<PetAndMountPushWin>();
        if(pushWin != null)
        {
            SetPushPetAndMountWinState(true, true);
        }
    }
    private void OnMoveTopPart(bool isMove)
System/Strengthening/WashTips.cs
@@ -490,7 +490,15 @@
                {
                    if (equipWashModel.IsWashFull(_itemModel, _washProModel, _tagWashModel))
                    {
                        _washFullLvText.text = Language.Get("EquipWash113", _itemModel.chinItemModel.LV, equipWashModel.GetWashFullLv(_itemModel.chinItemModel.LV));
                        if(_washProModel.XLAttrLV  >= equipWashModel.GetMaxWashLv()
                            && _washProModel.XLAttrLV <= equipWashModel.GetWashFullLv(_itemModel.chinItemModel.LV))
                        {
                            _washFullLvText.text = Language.Get("WashLevelFulled");
                        }
                        else
                        {
                            _washFullLvText.text = Language.Get("EquipWash113", _itemModel.chinItemModel.LV, equipWashModel.GetWashFullLv(_itemModel.chinItemModel.LV));
                        }
                        ObjHideOrShow(false, false, false, false, true);
                    }
                    else
@@ -532,6 +540,8 @@
                ObjHideOrShow(false, false, false, false, true);
            }
        }
        else
        {
System/Treasure/TreasureModel.cs
@@ -17,7 +17,6 @@
        public const int TREASURE_DATAMAPID = 41110;
        public const int TREASURE_MAPID = 41110;
        public const int TREASURE_GUIDE_ID = 102;
        public const int TREASURE_SOUL_ID = 115;
        const int TREASURE_REDPOINTID = 7000;
        readonly static int[] CATEGORY_REDPOINTIDS = { 7001, 7002, 7003, 7004, 7005 };
@@ -33,7 +32,6 @@
        Redpoint zergRedpoint = new Redpoint(TREASURE_REDPOINTID, CATEGORY_REDPOINTIDS[(int)TreasureCategory.Zerg - 1]);
        public Redpoint stoveRedpoint = new Redpoint(CATEGORY_REDPOINTIDS[(int)TreasureCategory.Fairy - 1], 7200);
        public Redpoint treasureSoulRedpoint = new Redpoint(1, TREASURE_SOUL_ID);
        public event Action<int> treasureCollectProgressUpdateEvent;
        public event Action<int> treasureSelectedEvent;
System/Treasure/TreasureSoulModel.cs
@@ -8,6 +8,10 @@
{
    public class TreasureSoulModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
    {
        public const int TREASURE_SOUL_ID = 115;
        Redpoint treasureSoulRedpoint = new Redpoint(1, TREASURE_SOUL_ID);
        Redpoint treasureSoulNewGotRedpoint = new Redpoint(TREASURE_SOUL_ID, 115100);
        Dictionary<int, TreasureSpecialData> treasureSoulDict = new Dictionary<int, TreasureSpecialData>();
        List<int> treasureSouls = new List<int>();
        public Dictionary<int, int> signAddProperty = new Dictionary<int, int>();
@@ -32,6 +36,8 @@
        public int gotoSoul { get; set; }
        public int newGotSoul { get; set; }
        public bool serverInited { get; private set; }
        PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
@@ -41,6 +47,7 @@
        {
            packModel.RefreshItemCountAct += RefreshItemCountAct;
            PlayerStrengthengDatas.RefreshEquipUpgradLvAct += RefreshEquipSTRLv;
            FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
            ParseConfig();
        }
@@ -54,6 +61,7 @@
                special.itemGet = false;
                special.active = false;
            }
            treasureSoulNewGotRedpoint.state = RedPointState.None;
        }
        public void OnPlayerLoginOk()
@@ -66,6 +74,7 @@
        {
            packModel.RefreshItemCountAct -= RefreshItemCountAct;
            PlayerStrengthengDatas.RefreshEquipUpgradLvAct -= RefreshEquipSTRLv;
            FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
        }
        void ParseConfig()
@@ -88,6 +97,11 @@
            {
                signAddProperty.Add(int.Parse(_key), int.Parse(jsonData[_key].ToString()));
            }
        }
        public void SetViewTreasureNewGot()
        {
            treasureSoulNewGotRedpoint.state = RedPointState.None;
        }
        public List<int> GetTreasureSouls()
@@ -152,6 +166,14 @@
            }
        }
        private void OnFuncStateChangeEvent(int func)
        {
            if (func == 126)
            {
                UpdateRedpoints();
            }
        }
        public void UpdateTreasurePrivilege(HA353_tagMCMWPrivilegeDataInfo package)
        {
            for (int i = 0; i < package.Count; i++)
@@ -164,12 +186,12 @@
                }
                bool beforeActived = special.active;
                special.active = _data.State == 1;
                //if (!beforeActived && special.active && serverInited && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
                //    && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>() && !NewBieCenter.Instance.inGuiding)
                //{
                //    TreasureSoulActiveWin.treasureSoulId = (int)_data.PriID;
                //    WindowCenter.Instance.Open<TreasureSoulActiveWin>();
                //}
                if (!beforeActived && special.active && serverInited
                    && !WindowCenter.Instance.CheckOpen<TreasureSoulWin>())
                {
                    treasureSoulNewGotRedpoint.state = RedPointState.Simple;
                    newGotSoul = (int)_data.PriID;
                }
                if ((TreasurePrivilege)_data.PriID == TreasurePrivilege.StrengthenAdd)
                {
                    if (treasureSoulEvent != null)
@@ -363,7 +385,7 @@
                totalProgress = configs[configs.Count - 1].countNeed;
            }
            redpoint = new Redpoint(TreasureModel.TREASURE_SOUL_ID, TreasureModel.TREASURE_SOUL_ID * 100 + (int)type);
            redpoint = new Redpoint(TreasureSoulModel.TREASURE_SOUL_ID, TreasureSoulModel.TREASURE_SOUL_ID * 100 + (int)type);
            switch (_type)
            {
                case TreasurePrivilege.DemonJarAtk:
System/Treasure/TreasureSoulWin.cs
@@ -83,6 +83,7 @@
            model.treasureSoulEvent += TreasureSoulEvent;
            m_TreasureSoulBtn.state = TitleBtnState.Click;
            Display();
            model.SetViewTreasureNewGot();
        }
        protected override void OnActived()
@@ -113,6 +114,7 @@
                m_TreasureSouls[i].Dispose();
            }
            m_SelectSoul = model.selectSoul;
            model.newGotSoul = 0;
        }
        protected override void OnAfterClose()
@@ -179,6 +181,11 @@
                    _select = sortSouls[i];
                }
            }
            if (model.newGotSoul != 0 && sortSouls.Contains(model.newGotSoul))
            {
                _select = model.newGotSoul;
                model.newGotSoul = 0;
            }
            _select = _select == 0 ? sortSouls[0] : _select;
            return _select;
        }
Utility/UIHelper.cs
@@ -359,7 +359,7 @@
    public static readonly Color32 s_BrightBlueColor = new Color32(0, 107, 227, 255);
    public static readonly Color32 s_BrightOrangeColor = new Color32(255, 103, 1, 255); //FF6701FF
    public static readonly Color32 s_BrightWhiteColor = new Color32(104, 104, 104, 255); //686868
    public static readonly Color32 s_BrightGreenColor = new Color32(16, 157, 6, 255);
    public static readonly Color32 s_BrightGreenColor = new Color32(16, 157, 6, 255); //109d06
    public static readonly Color32 s_DarkPinkColor = new Color32(255, 124, 124, 255);
    public static readonly Color32 s_DarkRedColor = new Color32(250, 1, 1, 255);