From e54f6e22bb26fb06bdd407803f988b86b40df697 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 04 九月 2018 20:02:37 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/TreasureFindHost/TreasureFindHostModel.cs | 9 ++++
System/FairyAu/UnionTaskModel.cs | 10 ++++
System/MainInterfacePanel/PlayerTaskDatas.cs | 7 +++
System/MainInterfacePanel/TaskListTip.cs | 15 ++-----
Fight/GameActor/GActorInfo.cs | 28 +++++++-------
Utility/LanguageVerify.cs | 15 ++++---
6 files changed, 52 insertions(+), 32 deletions(-)
diff --git a/Fight/GameActor/GActorInfo.cs b/Fight/GameActor/GActorInfo.cs
index b737ff2..e3aae20 100644
--- a/Fight/GameActor/GActorInfo.cs
+++ b/Fight/GameActor/GActorInfo.cs
@@ -138,7 +138,7 @@
{
get
{
- return HpEx * FullHp + Hp;
+ return (ulong)HpEx * FullHp + Hp;
}
}
@@ -146,7 +146,7 @@
{
get
{
- return MaxHpEx * FullHp + MaxHp;
+ return (ulong)MaxHpEx * FullHp + MaxHp;
}
}
@@ -185,10 +185,10 @@
{
ushort _multiple = (ushort)(value / FullHp);
- //if (sid != PlayerDatas.Instance.PlayerId)
- //{
- // Debug.LogFormat("<color=red>浼よ閲�: {0}, 褰撳墠hp: {1}, hpEx: {2}</color>", value, Hp, HpEx);
- //}
+ // if (sid != PlayerDatas.Instance.PlayerId)
+ // {
+ // Debug.LogFormat("<color=red>浼よ閲�: {0}, 褰撳墠hp: {1}, hpEx: {2}</color>", value, Hp, HpEx);
+ // }
if (_multiple > HpEx)
{
@@ -218,20 +218,20 @@
Hp -= value;
}
- //if (sid != PlayerDatas.Instance.PlayerId)
- //{
- // if (HpEx != SyncServerHpEx)
- // {
- // Debug.LogFormat("<color=red>---- 璁$畻鍚�, hp: {0}, hpEx: {1}</color>", Hp, HpEx);
- // }
- //}
-
if (HpEx * FullHp + Hp < SyncServerHpEx * FullHp + SyncServerHp)
{
Hp = SyncServerHp;
HpEx = SyncServerHpEx;
}
+ // if (sid != PlayerDatas.Instance.PlayerId)
+ // {
+ // if (HpEx != SyncServerHpEx)
+ // {
+ // Debug.LogFormat("<color=red>---- 璁$畻鍚�, hp: {0}, hpEx: {1}</color>", Hp, HpEx);
+ // }
+ // }
+
if (OnHpChange != null)
{
OnHpChange(Hp);
diff --git a/System/FairyAu/UnionTaskModel.cs b/System/FairyAu/UnionTaskModel.cs
index 67d91a7..cc81f3c 100644
--- a/System/FairyAu/UnionTaskModel.cs
+++ b/System/FairyAu/UnionTaskModel.cs
@@ -3,7 +3,7 @@
using System.Collections.Generic;
using TableConfig;
-public class UnionTaskModel : Model
+public class UnionTaskModel : Model,IBeforePlayerDataInitialize
{
private FuncConfigConfig _tagFuncModel;
public Action RefreshLivenScoreEvent;
@@ -13,6 +13,14 @@
SetUnionLivenReward();
SetUnionLivenScore();
}
+
+ public void OnBeforePlayerDataInitialize()
+ {
+ taskInfoDict.Clear();
+ curLivenScore = 0;
+
+ }
+
public override void UnInit()
{
diff --git a/System/MainInterfacePanel/PlayerTaskDatas.cs b/System/MainInterfacePanel/PlayerTaskDatas.cs
index 8a82286..2115ac4 100644
--- a/System/MainInterfacePanel/PlayerTaskDatas.cs
+++ b/System/MainInterfacePanel/PlayerTaskDatas.cs
@@ -128,6 +128,8 @@
private float BossDelayTimeint = 0;
private List<int> FaBaoNPCIdList = new List<int>();//鐢ㄤ簬鑾峰彇闇�瑕佹秷澶辩殑娉曞疂NPCID锛�
public Vector3 UIeffectFabaoVec = new Vector3();//娉曞疂NPC娑堝け鏃惰幏鍙栫殑鍧愭爣
+
+
PlayerPackModel _playerPack;
PlayerPackModel playerPack
{
@@ -207,6 +209,10 @@
{
try
{
+ if (AutomaticityBool && MissionState!=3)
+ {
+ TaskupToDate = MissionID;
+ }
var pytaskM = Config.Instance.Get<PyTaskConfig>(MissionID);
if (pytaskM == null)
{
@@ -1505,6 +1511,7 @@
}
}
//--------涓昏鐢ㄤ簬璁板綍浠诲姟鍒楄〃閫変腑鏉$殑鏅鸿兘鎬� 锛�-_-||锛�
+ public int TaskupToDate = 0;//鑾峰彇鏈�鏂颁换鍔D
public int GetOnTaskId = 0;
public bool IsGetOnBool = false;
private int NeedTime = 10;
diff --git a/System/MainInterfacePanel/TaskListTip.cs b/System/MainInterfacePanel/TaskListTip.cs
index 079668c..2082239 100644
--- a/System/MainInterfacePanel/TaskListTip.cs
+++ b/System/MainInterfacePanel/TaskListTip.cs
@@ -200,7 +200,7 @@
{
TaskScheduling();
TheTaskToGenerate();
- TaskJump(_id);
+ TaskJump();
}
private void SetLength()
@@ -422,19 +422,12 @@
return mapConfig != null && mapConfig.MapFBType != 0;
}
- private void TaskJump(int TaskID=0)
+ private void TaskJump()
{
int type = 0;
- if (TaskID == 0)
+ if (_list.Contains(taskmodel.TaskupToDate))
{
- type= _list.IndexOf(taskmodel.GetNowTaskID);
- }
- else
- {
- if (_list.Contains(TaskID))
- {
- type = _list.IndexOf(TaskID);
- }
+ type = _list.IndexOf(taskmodel.TaskupToDate);
}
if (_list.Count <= 2 || type <= 0)
{
diff --git a/System/TreasureFindHost/TreasureFindHostModel.cs b/System/TreasureFindHost/TreasureFindHostModel.cs
index f144622..2bb943a 100644
--- a/System/TreasureFindHost/TreasureFindHostModel.cs
+++ b/System/TreasureFindHost/TreasureFindHostModel.cs
@@ -15,6 +15,7 @@
public List<int> treasureIdlist { get; set; }
public event Action TreasureFindHostCompleteAct;
+ public int[] specEquipIds { get; private set;}
public override void Init()
{
@@ -43,6 +44,8 @@
playerPack.RefreshItemCountAct += RefreshEquipInfo;
playerSuit.RefreshSuitModelAct += RefreshSuitInfo;
treasureModel.treasureStateChangeEvent += RefreshTreasureState;
+ FuncConfigConfig SamboSpecialUnlock = Config.Instance.Get<FuncConfigConfig>("SamboSpecialUnlock");
+ specEquipIds = ConfigParse.GetMultipleStr<int>(SamboSpecialUnlock.Numerical1);
}
public void OnBeforePlayerDataInitialize()
@@ -135,12 +138,18 @@
SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptEquip);
if (singlePack == null) return false;
+
foreach (var condi in treasureInfo.needConditionsDict.Values)
{
progress = 0;
ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip,condi[3]);
if(itemModel != null)
{
+ if(specEquipIds != null && specEquipIds.Contains(condi[3]))
+ {
+ progress += 1;
+ return true;
+ }
if(itemModel.chinItemModel.LV >= condi[0]
&& itemModel.chinItemModel.ItemColor >= condi[1]
&& itemModel.chinItemModel.StarLevel >= condi[2])
diff --git a/Utility/LanguageVerify.cs b/Utility/LanguageVerify.cs
index b159bcc..26d64c7 100644
--- a/Utility/LanguageVerify.cs
+++ b/Utility/LanguageVerify.cs
@@ -20,7 +20,7 @@
static StringBuilder s_StringBuilder = new StringBuilder();
- const string VerifyPlayerNameUrl = "https://api.maoergame.com/game/role/response?";
+ const string VerifyPlayerNameUrl = "https://api.maoergame.com/game/role/response";
/// <summary>
/// 鏍¢獙鐜╁鍚�
/// </summary>
@@ -52,7 +52,8 @@
tables["sender_name"] = playerName;
tables["sender_level"] = level.ToString();
tables["sender_vip_level"] = vipLv.ToString();
- tables["timestamp"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ var ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
+ tables["timestamp"] = ((long)System.Convert.ToInt64(ts.TotalSeconds)).ToString();
tables["key"] = ToMD5(StringUtility.Contact(Sercret, tables["timestamp"]));
HttpRequest.Instance.RequestHttpPost(VerifyPlayerNameUrl, tables, HttpRequest.defaultHttpContentType, 3,
(bool ok, string result) =>
@@ -78,7 +79,7 @@
});
}
- const string VerifyFairyUrl = "https://api.maoergame.com/game/sociaty/response?";
+ const string VerifyFairyUrl = "https://api.maoergame.com/game/sociaty/response";
public void VerifyFairy(string verifyContent, int op_type, string fairyName, int title, Action<bool, string> callback)
{
if (!requireVerify)
@@ -115,7 +116,8 @@
tables["edit_name"] = playerName;
tables["notice"] = op_type == 2 ? string.Empty : verifyContent;
- tables["timestamp"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ var ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
+ tables["timestamp"] = ((long)System.Convert.ToInt64(ts.TotalSeconds)).ToString();
tables["key"] = ToMD5(StringUtility.Contact(Sercret, tables["timestamp"]));
HttpRequest.Instance.RequestHttpPost(VerifyFairyUrl, tables, HttpRequest.defaultHttpContentType, 3,
@@ -144,7 +146,7 @@
public static uint toPlayer = 0;
public static string toPlayerName = string.Empty;
public static int toPlayerLevel = 0;
- const string VerifyChatUrl = "https://api.maoergame.com/game/chat/response?";
+ const string VerifyChatUrl = "https://api.maoergame.com/game/chat/response";
public void VerifyChat(string content, ChatInfoType channelType, Action<bool, string> callback)
{
int channel = 0;
@@ -181,7 +183,8 @@
tables["receiver_level"] = channel == 3 ? (toPlayerLevel == 0 ? string.Empty : toPlayerLevel.ToString()) : string.Empty;
tables["receiver_vip_level"] = string.Empty;
- tables["timestamp"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ var ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
+ tables["timestamp"] = ((long)System.Convert.ToInt64(ts.TotalSeconds)).ToString();
tables["key"] = ToMD5(StringUtility.Contact(Sercret, tables["timestamp"]));
HttpRequest.Instance.RequestHttpPost(VerifyChatUrl, tables, HttpRequest.defaultHttpContentType, 3,
--
Gitblit v1.8.0