Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | |
|
| | | 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;
|
| | |
| | | }
|
| | |
|
| | | 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;
|
| | |
| | | {
|
| | | 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"]).
|
| | |
| | | {
|
| | | 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);
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | 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);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | 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>");
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | m_DogzAssistCnt.text = Language.Get("TreasurePrivilege_Dogz_1", StringUtility.Contact(model.GetAssistDogzCount(), "/", model.DogzAssistDefaultCnt));
|
| | | UpdateDogzBtn();
|
| | | UpdateDogzProperty();
|
| | | }
|
| | | private void UpdateDogzBtn()
|
| | | {
|
| | |
| | | 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 = "";
|
| | |
| | | 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);
|
| | |
| | |
|
| | | if(mailContentArray.Length > 2)
|
| | | {
|
| | | string mailDes = Regex.Replace(mailContentArray[2], @"<[\\]+/r>", "</r>");
|
| | | string mailDes = mailContentArray[2];
|
| | | mailContentstr = mailDes;
|
| | | }
|
| | | }
|
| | |
| | | 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;
|
| | |
| | | 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")
|
| | |
| | | {
|
| | | firstTimeRechargeModel.OpenFirstChargeTrialWin();
|
| | | }
|
| | | else if(!WindowCenter.Instance.CheckOpen<PetAndMountPushWin>()) //灵宠坐骑推送
|
| | | else if(!WindowCenter.Instance.CheckOpen<PetAndMountPushWin>()
|
| | | && !WindowCenter.Instance.CheckOpen<OffLineOnHookWin>()) //灵宠坐骑推送
|
| | | {
|
| | | storeModel.SetPushPetAndMountWinState();
|
| | | }
|
| | |
| | | NewBieCenter.Instance.guideBeginEvent -= GuidBegin;
|
| | | shopItemlimitDict.Clear();
|
| | | petAndMountPushlist.Clear();
|
| | | ClearPushData();
|
| | | tagTowerModel = null;
|
| | | storeFuncType = StoreFunc.WeekStore;
|
| | | tcbRefreshDict.Clear();
|
| | |
| | |
|
| | | private void GuidBegin()
|
| | | {
|
| | | SetPushPetAndMountWinState(true,true);
|
| | | PetAndMountPushWin pushWin = WindowCenter.Instance.Get<PetAndMountPushWin>();
|
| | | if(pushWin != null)
|
| | | {
|
| | | SetPushPetAndMountWinState(true, true);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnMoveTopPart(bool isMove)
|
| | |
| | | {
|
| | | 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
|
| | |
| | | ObjHideOrShow(false, false, false, false, true);
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | 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 };
|
| | |
| | | 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;
|
| | |
| | | {
|
| | | 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>();
|
| | |
| | |
|
| | | public int gotoSoul { get; set; }
|
| | |
|
| | | public int newGotSoul { get; set; }
|
| | |
|
| | | public bool serverInited { get; private set; }
|
| | |
|
| | | PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
| | | {
|
| | | packModel.RefreshItemCountAct += RefreshItemCountAct;
|
| | | PlayerStrengthengDatas.RefreshEquipUpgradLvAct += RefreshEquipSTRLv;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | ParseConfig();
|
| | | }
|
| | |
|
| | |
| | | special.itemGet = false;
|
| | | special.active = false;
|
| | | }
|
| | | treasureSoulNewGotRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | |
| | | {
|
| | | packModel.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | PlayerStrengthengDatas.RefreshEquipUpgradLvAct -= RefreshEquipSTRLv;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | }
|
| | |
|
| | | void ParseConfig()
|
| | |
| | | {
|
| | | signAddProperty.Add(int.Parse(_key), int.Parse(jsonData[_key].ToString()));
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetViewTreasureNewGot()
|
| | | {
|
| | | treasureSoulNewGotRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | public List<int> GetTreasureSouls()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnFuncStateChangeEvent(int func)
|
| | | {
|
| | | if (func == 126)
|
| | | {
|
| | | UpdateRedpoints();
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateTreasurePrivilege(HA353_tagMCMWPrivilegeDataInfo package)
|
| | | {
|
| | | for (int i = 0; i < package.Count; i++)
|
| | |
| | | }
|
| | | 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)
|
| | |
| | | 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:
|
| | |
| | | model.treasureSoulEvent += TreasureSoulEvent;
|
| | | m_TreasureSoulBtn.state = TitleBtnState.Click;
|
| | | Display();
|
| | | model.SetViewTreasureNewGot();
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | m_TreasureSouls[i].Dispose();
|
| | | }
|
| | | m_SelectSoul = model.selectSoul;
|
| | | model.newGotSoul = 0;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | _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;
|
| | | }
|
| | |
| | | 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);
|