From e312d83f373e52c3937693eca172abd91c8d583a Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 07 九月 2020 22:34:22 +0800
Subject: [PATCH] 4621 【主干】再使用x个丹药达到上限判断条件优化;关闭极光推送
---
System/Alchemy/AlchemyBatchWin.cs | 4 +++-
System/SystemSetting/ActivitiesPushModel.cs | 7 +++++++
System/Realm/RealmModel.cs | 1 +
System/Alchemy/AlchemyModel.cs | 19 ++++++++++++++-----
Core/SDK/SDKUtility.cs | 2 ++
5 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/Core/SDK/SDKUtility.cs b/Core/SDK/SDKUtility.cs
index f623bd9..caa3a46 100644
--- a/Core/SDK/SDKUtility.cs
+++ b/Core/SDK/SDKUtility.cs
@@ -1362,6 +1362,7 @@
#region 鏋佸厜鎺ㄩ�佺浉鍏�
public void GeTui_SendLocalMessage(JsonData jsonData)
{
+ return;
DebugEx.Log("GeTui_SendLocalMessage:" + jsonData["id"]);
// ------ 涓句緥 ------
// JsonData _params = new JsonData ();
@@ -1387,6 +1388,7 @@
public void GeTui_RemoveLocalMessage(string id)
{
+ return;
DebugEx.Log("GeTui_RemoveLocalMessage:" + id);
#if !UNITY_EDITOR
m_Json.Clear();
diff --git a/System/Alchemy/AlchemyBatchWin.cs b/System/Alchemy/AlchemyBatchWin.cs
index 7a70852..f407035 100644
--- a/System/Alchemy/AlchemyBatchWin.cs
+++ b/System/Alchemy/AlchemyBatchWin.cs
@@ -27,6 +27,7 @@
public static int alchemyId = 0;
+ PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
AlchemyModel model { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
#region Built-in
protected override void BindController()
@@ -76,9 +77,10 @@
var recommandCount = maxValue;
AlchemyDrugUseLimit drugUseLimit;
+ var itemCount = playerPack.GetItemCountByID(PackType.Item, itemId);
if (model.TryGetAlchemyUseLimit(itemId, out drugUseLimit))
{
- var canEatCount = drugUseLimit.GetUseLimit() - drugUseLimit.eatTimes;
+ var canEatCount = drugUseLimit.GetUseLimit() - drugUseLimit.eatTimes - itemCount;
recommandCount = Mathf.Max(1, Mathf.Min(maxValue, canEatCount));
m_Remind.gameObject.SetActive(true);
m_Remind.text = Language.Get("AlchemyBatchRecommand", canEatCount);
diff --git a/System/Alchemy/AlchemyModel.cs b/System/Alchemy/AlchemyModel.cs
index a3263a2..460d6c6 100644
--- a/System/Alchemy/AlchemyModel.cs
+++ b/System/Alchemy/AlchemyModel.cs
@@ -1,8 +1,8 @@
锘縰sing System;
-using System.Collections;
-using System.Collections.Generic;
+using System.Collections;
+using System.Collections.Generic;
using System.Linq;
-using UnityEngine;
+using UnityEngine;
namespace Snxxz.UI
{
[XLua.LuaCallCSharp]
@@ -683,6 +683,14 @@
{
continue;
}
+
+ var itemCount = packModel.GetItemCountByID(PackType.Item, config.AlchemItemID);
+ if (drugUseLimit.GetUseLimit() - drugUseLimit.eatTimes - itemCount <= 0)
+ {
+ //鑳屽寘涓湁瓒冲鐨勭伒鏍逛腹
+ continue;
+ }
+
}
else
{
@@ -708,6 +716,7 @@
continue;
}
}
+
s_Alchemyables.Add(id);
}
}
@@ -950,5 +959,5 @@
alchemyRedpoint = new Redpoint(redpoint.id, AlchemyModel.redpointIndex++);
}
}
-}
-
+}
+
diff --git a/System/Realm/RealmModel.cs b/System/Realm/RealmModel.cs
index 42cab47..e25e406 100644
--- a/System/Realm/RealmModel.cs
+++ b/System/Realm/RealmModel.cs
@@ -615,6 +615,7 @@
public void TryPushRealmPoolMessage()
{
+ return;
var remainTime = 0f;
var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
var config = RealmConfig.Get(realmLevel);
diff --git a/System/SystemSetting/ActivitiesPushModel.cs b/System/SystemSetting/ActivitiesPushModel.cs
index c009b6c..3acc42b 100644
--- a/System/SystemSetting/ActivitiesPushModel.cs
+++ b/System/SystemSetting/ActivitiesPushModel.cs
@@ -79,6 +79,7 @@
#region 寮�鏈嶆椿鍔ㄥ啿姒滄帹閫�
private void SetRankStartPushInfo()
{
+ return;
for (int i = 0; i < rankTypelist.Count; i++)
{
int rankStartId = WholePeopleRankStart + rankTypelist[i];
@@ -104,6 +105,7 @@
private void SetRankEndPushInfo()
{
+ return;
for (int i = 0; i < rankTypelist.Count; i++)
{
int rankEndId = WholePeopleRankEnd + rankTypelist[i];
@@ -129,6 +131,7 @@
private void RemovePushByActiveClose(PushInfoType type)
{
+ return;
switch (type)
{
case PushInfoType.RankStart:
@@ -156,6 +159,7 @@
private void RemovePushByTime(PushInfoType type, int time)
{
+ return;
int remainHour = time - TimeUtility.ServerNow.Hour;
int remainMinute = 0 - TimeUtility.ServerNow.Minute;
int remainSecond = remainHour * 60 * 60 + remainMinute * 60;
@@ -201,6 +205,7 @@
private void UpdateAppointment(int shopGuid)
{
+ return;
if (!rushToBuyModel.IsOpen) return;
var operation = rushToBuyModel.GetOperationFlashRushToBuy();
@@ -229,6 +234,7 @@
private void SetFlashRushToBuyAppointmentInfo()
{
+ return;
if (!rushToBuyModel.IsOpen) return;
var operation = rushToBuyModel.GetOperationFlashRushToBuy();
@@ -256,6 +262,7 @@
private void RemoveFlashRushToBuyAppointmentByTime()
{
+ return;
if (!rushToBuyModel.IsOpen) return;
var operation = rushToBuyModel.GetOperationFlashRushToBuy();
--
Gitblit v1.8.0