From 1f5e35cd47a9baaaa6fa559c06640f47c9e79554 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期四, 20 九月 2018 20:41:48 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Treasure/TreasureSoulModel.cs | 36 +++++++++--
System/Dogz/DogzActiveWin.cs | 35 +++++++++--
System/Store/StoreModel.cs | 7 ++
System/MainInterfacePanel/TipPanel.cs | 3
System/Login/LoginModel.cs | 6 ++
System/Strengthening/WashTips.cs | 12 +++
System/FriendSystem/MailAllModel.cs | 5 +
System/Treasure/TreasureSoulWin.cs | 7 ++
System/Treasure/TreasureModel.cs | 2
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs | 11 ++-
Core/SDK/SDKUtility.cs | 34 ++++++++++
Utility/UIHelper.cs | 2
12 files changed, 131 insertions(+), 29 deletions(-)
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs b/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
index f21e090..81430d9 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
+++ b/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;
diff --git a/Core/SDK/SDKUtility.cs b/Core/SDK/SDKUtility.cs
index 565df5f..444c47f 100644
--- a/Core/SDK/SDKUtility.cs
+++ b/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);
}
diff --git a/System/Dogz/DogzActiveWin.cs b/System/Dogz/DogzActiveWin.cs
index 632a3f7..62b132d 100644
--- a/System/Dogz/DogzActiveWin.cs
+++ b/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()
{
diff --git a/System/FriendSystem/MailAllModel.cs b/System/FriendSystem/MailAllModel.cs
index d38ac28..938afba 100644
--- a/System/FriendSystem/MailAllModel.cs
+++ b/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;
}
}
diff --git a/System/Login/LoginModel.cs b/System/Login/LoginModel.cs
index 0f6b94b..427405a 100644
--- a/System/Login/LoginModel.cs
+++ b/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")
diff --git a/System/MainInterfacePanel/TipPanel.cs b/System/MainInterfacePanel/TipPanel.cs
index 9684d0c..c50def1 100644
--- a/System/MainInterfacePanel/TipPanel.cs
+++ b/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();
}
diff --git a/System/Store/StoreModel.cs b/System/Store/StoreModel.cs
index 890ca6e..a633531 100644
--- a/System/Store/StoreModel.cs
+++ b/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)
diff --git a/System/Strengthening/WashTips.cs b/System/Strengthening/WashTips.cs
index 3883b45..66b73f8 100644
--- a/System/Strengthening/WashTips.cs
+++ b/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
{
diff --git a/System/Treasure/TreasureModel.cs b/System/Treasure/TreasureModel.cs
index 3578b34..c332573 100644
--- a/System/Treasure/TreasureModel.cs
+++ b/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;
diff --git a/System/Treasure/TreasureSoulModel.cs b/System/Treasure/TreasureSoulModel.cs
index 0b6bace..9ad7298 100644
--- a/System/Treasure/TreasureSoulModel.cs
+++ b/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:
diff --git a/System/Treasure/TreasureSoulWin.cs b/System/Treasure/TreasureSoulWin.cs
index 0285684..98c492f 100644
--- a/System/Treasure/TreasureSoulWin.cs
+++ b/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;
}
diff --git a/Utility/UIHelper.cs b/Utility/UIHelper.cs
index c3e3f14..732bd00 100644
--- a/Utility/UIHelper.cs
+++ b/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);
--
Gitblit v1.8.0