Core/SDK/SDKUtility.cs
@@ -23,6 +23,7 @@ Mr = 2,// 猫耳 Sp = 3,// 思璞 Js = 4,// 极速 Yj = 5,// 易接 } public E_ChannelPlatform ChannelPlatform { get; set; } @@ -355,6 +356,10 @@ { ChannelPlatform = E_ChannelPlatform.Js; } else if (_channelPlatform.Equals("yj")) { ChannelPlatform = E_ChannelPlatform.Yj; } } } break; @@ -590,6 +595,8 @@ public int accountID; public string timeStamp; public string sessionID; public string yjAppId; public string yjSdkId; } public struct FP_CheckIDAuthentication @@ -695,6 +702,14 @@ else if (ChannelPlatform == E_ChannelPlatform.Sp) { m_PaymentTable["RechargeChannel"] = "2"; } else if (ChannelPlatform == E_ChannelPlatform.Js) { m_PaymentTable["RechargeChannel"] = "3"; } else if (ChannelPlatform == E_ChannelPlatform.Yj) { m_PaymentTable["RechargeChannel"] = "5"; } var _stringBuilder = new System.Text.StringBuilder(); @@ -879,6 +894,16 @@ FreePlatformInfo.timeStamp = (string)json["timeStamp"]; } if (_iDict.Contains("yjSdkId")) { FreePlatformInfo.yjSdkId = (string)json["yjSdkId"]; } if (_iDict.Contains("yjAppId")) { FreePlatformInfo.yjAppId = (string)json["yjAppId"]; } FreePlatformInfo.phone = 0; } Fight/Actor/State/SMB/STM_BaseAttack.cs
@@ -220,6 +220,14 @@ GActorFight _fight = owner as GActorFight; if (_fight == null) { #if UNITY_EDITOR Debug.LogError("owner类型问题: " + owner.GetType()); #endif return; } _fight.SkillMgr.DoingPrepareSkill = false; if (owner.ActorType == GameObjType.gotPlayer) System/Dungeon/AssistPlayerCell.cs
New file @@ -0,0 +1,59 @@ using UnityEngine; using UnityEngine.UI; using TableConfig; namespace Snxxz.UI { public class AssistPlayerCell : MonoBehaviour { [SerializeField] Text nameText; [SerializeField] Text lvText; [SerializeField] GameObject lvIcon; [SerializeField] Image headIcon; [SerializeField] Image realmIcon; [SerializeField] Button helpBtn; FriendsModel _friendsModel; FriendsModel friendsModel { get { return _friendsModel ?? (_friendsModel = ModelCenter.Instance.GetModel<FriendsModel>()); } } public void SetDisplay(int playerId) { var playerInfo = friendsModel.GetFirendInfo(playerId); if (playerInfo == null) return; nameText.text = playerInfo.PlayerName; headIcon.SetSprite(GeneralDefine.GetOtherJobHeadPortrait(playerInfo.Job, 0)); int realmLv = playerInfo.RealmLV; var realmConfig = Config.Instance.Get<RealmConfig>(playerInfo.RealmLV); realmIcon.SetSprite(realmConfig == null ? "NoRealm" : realmConfig.Img); int nirvanaLv = playerInfo.LV - friendsModel.OpenGreatLV; lvIcon.gameObject.SetActive(nirvanaLv > 0); if (nirvanaLv > 0) { lvText.text = nirvanaLv.ToString(); } else { lvText.text = playerInfo.LV.ToString(); } } public void UpdateAssistState(int assistType) { switch(assistType) { case 0: break; case 1: break; } } } } System/Dungeon/AssistPlayerCell.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: df6489325863f5d45b60e71c8c234e6d timeCreated: 1542617010 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Dungeon/DungeonAssistModel.cs
New file @@ -0,0 +1,53 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Snxxz.UI { [XLua.LuaCallCSharp] public class DungeonAssistModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk { public string helpInfoLocalSave { get; private set; } public List<string> helpInfolist { get; private set; } public override void Init() { } public void OnBeforePlayerDataInitialize() { } public void OnPlayerLoginOk() { int playerId = (int)PlayerDatas.Instance.baseData.PlayerID; helpInfoLocalSave = StringUtility.Contact("HelpInfoLocalSave", playerId); GetLocalSaveData(); } public override void UnInit() { } private void GetLocalSaveData() { string[] helpInfos = LocalSave.GeStringArray(helpInfoLocalSave); helpInfolist = helpInfos == null ? null : helpInfos.ToList(); } public void SetHelpInfoLocalSave(string info) { helpInfolist = helpInfolist == null ? new List<string>() : helpInfolist; if (helpInfolist.Count >= 20) { helpInfolist.RemoveAt(0); } helpInfolist.Add(info); LocalSave.SetStringArray(helpInfoLocalSave, helpInfolist.ToArray()); } } } System/Dungeon/DungeonAssistModel.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 721bc9700ae71ba4eab410bb7f14f6f3 timeCreated: 1542615038 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Dungeon/DungeonAssistPlayerWin.cs
New file @@ -0,0 +1,112 @@ using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { [XLua.Hotfix] public class DungeonAssistPlayerWin : Window { [SerializeField] Button oneKeyHelpBtn; [SerializeField] Text oneKeyHelpText; [SerializeField] Button refreshBtn; [SerializeField] Text refreshText; [SerializeField] List<AssistPlayerCell> assistPlayers = new List<AssistPlayerCell>(); public const int duration = 10; #region Built-in protected override void BindController() { } protected override void AddListeners() { } protected override void OnPreOpen() { SetDisplay(); } protected override void OnAfterOpen() { } protected override void OnPreClose() { } protected override void OnAfterClose() { } #endregion public void SetDisplay() { UpdateAssistPlayers(); UpdateOneKeyAssist(); UpdateRefreshTimes(); } private void UpdateAssistPlayers() { List<int> playerIds = null; if (playerIds == null) return; for(int i = 0; i < assistPlayers.Count; i++) { var assistPlayer = assistPlayers[i]; if(i < playerIds.Count) { assistPlayer.gameObject.SetActive(true); assistPlayer.SetDisplay(playerIds[i]); } else { assistPlayer.gameObject.SetActive(false); } } } private void UpdateOneKeyAssist() { UpdateTime(duration); TimeDownMgr.Instance.Begin(TimeDownMgr.CoolTimeType.DungeonAssistCoolTime,duration,UpdateTime); } private void UpdateRefreshTimes() { refreshText.text = StringUtility.Contact("刷新\n","(",5,")"); } private void UpdateTime(float time) { if(time > 0) { oneKeyHelpText.text = StringUtility.Contact("一键召唤(",time,")"); } else { oneKeyHelpText.text = "一键召唤"; } } private void ClickOneKeyAssist() { CloseClick(); } private void ClickRefresh() { UpdateAssistPlayers(); UpdateOneKeyAssist(); } } } System/Dungeon/DungeonAssistPlayerWin.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 4a94d7e1c2953de4e8271897605c63a4 timeCreated: 1542615272 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Dungeon/DungeonAssistWin.cs
@@ -4,6 +4,7 @@ namespace Snxxz.UI { [XLua.Hotfix] public class DungeonAssistWin : Window { [SerializeField] ScrollerController resultCtrl; System/Login/LoginModel.cs
@@ -16,7 +16,8 @@ public SDKUtility.FP_LoginOk sdkLoginResult; public SDKUtility.FP_CheckIDAuthentication sdkIDCheckIDAuthentication; public string localSaveAccountName { public string localSaveAccountName { get { return LocalSave.GetString(USER_ACCOUNT); } set { LocalSave.SetString(USER_ACCOUNT, value); } } @@ -25,19 +26,22 @@ public event Action accountBindOkEvent; bool m_ReconnecBackGround = false; public bool reconnectBackGround { public bool reconnectBackGround { get { return m_ReconnecBackGround; } set { m_ReconnecBackGround = value; } } bool m_OnCreateRole = false; public bool onCreateRole { public bool onCreateRole { get { return m_OnCreateRole; } set { m_OnCreateRole = value; } } bool m_Busy = false; public bool busy { public bool busy { get { return m_Busy; } set { m_Busy = value; } } @@ -297,12 +301,21 @@ send.IDType = 3; send.Extra += ("|" + SDKUtility.Instance.FreePlatformInfo.sessionID); send.ExtraLen = (byte)send.Extra.Length; }else if(SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Js) } else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Js) { send.IDType = 4; send.Extra += ("|" + sdkLoginResult.token); send.ExtraLen = (byte)send.Extra.Length; } else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj) { send.IDType = 5; send.Extra += ("|" + SDKUtility.Instance.FreePlatformInfo.yjSdkId + "|" + SDKUtility.Instance.FreePlatformInfo.yjAppId + "|" + SDKUtility.Instance.FreePlatformInfo.accountID); send.ExtraLen = (byte)send.Extra.Length; } send.AccID = sdkLoginResult.account; send.Password = sdkLoginResult.token; send.MAC = DeviceUtility.GetMac(); System/MainInterfacePanel/PlayerTaskDatas.cs
@@ -209,7 +209,7 @@ { try { if (AutomaticityBool && MissionState!=3) if (AutomaticityBool && MissionState!=3 && MissionID!=2000 && MissionID!=3000) { TaskupToDate = MissionID; } System/MainInterfacePanel/TaskListTip.cs
@@ -484,14 +484,7 @@ _position = (_list.Count - type) * m_SizeHeight + (_list.Count - type - 1) * 2; } _position -= 196; if (_list.Count == 3 && type == 2) { m_ScrollRect.verticalNormalizedPosition = 0; } else { m_ScrollRect.verticalNormalizedPosition = Mathf.Clamp01(_position / ((Content as RectTransform).sizeDelta.y - 196)); } m_ScrollRect.verticalNormalizedPosition = Mathf.Clamp01(_position / ((Content as RectTransform).sizeDelta.y - 196)); } } } System/Pet/PetAttributeWin.cs
@@ -213,7 +213,7 @@ }); } IEnumerable IeWait(int petId) IEnumerator IeWait(int petId) { yield return new WaitForSeconds(0.3f); ClickSelectPetBtn(petId); System/WindowBase/ModelCenter.cs
@@ -208,6 +208,7 @@ RegisterModel<AccumulateRechargeModel>(); RegisterModel<FBHelpPointExchageModel>(); RegisterModel<IceCrystalVeinModel>(); RegisterModel<DungeonAssistModel>(); inited = true; } UI/Common/TimeDownMgr.cs
@@ -5,7 +5,7 @@ [XLua.LuaCallCSharp] public class TimeDownMgr : SingletonMonobehaviour<TimeDownMgr> { public enum CoolTimeType { @@ -27,6 +27,7 @@ HappyFreeRuneXB = 15, //符印寻宝免费时间倒计时 HappyXBWarehouse = 16, //寻宝仓库整理倒计时 FlashRushToBuyAppointment = 17, //限时抢购预约倒计时 DungeonAssistCoolTime = 18, //副本助战一键召唤倒计时 } public void Begin(CoolTimeType type, float duration,Action<float> func,float tick=1.0f)