浏览代码

【优化】重连消息重发逻辑

meijun 3 年之前
父节点
当前提交
510ce8449c

+ 2 - 2
Common/Pomelo/PomeloShare/IceManager.cs

@@ -133,7 +133,6 @@ namespace Pomelo
 
             try
             {
-                this.callback = (ZoneManagerCallbackPrx)client.ice_oneway();
                 log.Info("RetryFailNotifys start begin 1: " + notifyFailData.Count);
                 this.callback.ice_ping();
                 long ltimeEnd = CommonLang.TimeUtil.GetTimestampMS() - 120000;
@@ -194,8 +193,9 @@ namespace Pomelo
 					{
 						log.Error("ice连入,远端已经失效,重新设置!");
 						cacheSession.callback = callback;
-                        //cacheSession.RetryFailNotifys();
 
+                        //处理失败的逻辑
+                        cacheSession.RetryFailNotifys();
                         return 0;
 					}
 				}

+ 0 - 3
XmdsServerCS/XmdsServerNode/Node/ServerZoneNode.cs

@@ -122,9 +122,6 @@ namespace XmdsServerNode.Node
                 {
 					json = Json.Encode(param);
                     Callback.callback.eventNotify(name, json);
-
-                    //处理失败的逻辑
-                    Callback.RetryFailNotifys();
                 }
 				catch (Exception err)
 				{

+ 1 - 1
XmdsVSPlugins/XmdsCommonSkill/Plugin/PassiveSkills/PetGive/PetGive_910004.cs

@@ -55,7 +55,7 @@ namespace XmdsCommonSkill.Plugin.PassiveSkills.PetGive
                 return damage;
             }
 
-            bool isTrigger = ((attacker.mUnit.CurrentHP - damage) / attacker.mUnit.MaxHP * XmdsDamageCalculator.PERER) < valueSet2.GetValue(skill.SkillLevel);
+            bool isTrigger = (attacker.mUnit.CurrentHP * 1.0f / attacker.mUnit.MaxHP * XmdsDamageCalculator.PERER) < valueSet2.GetValue(skill.SkillLevel);
             if (isTrigger)
             {
                 int addHP = Math.Max(1, CUtils.CastInt(damage * XmdsUnitProp.PER * valueSet.GetValue(skill.SkillLevel)));