From 8c1184fced045f133de6cc7fe55deb38e1884812 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期六, 13 四月 2019 11:30:50 +0800
Subject: [PATCH] Merge branch 'master' into HazyRegion
---
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs b/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
index daf9d70..9af6b8b 100644
--- a/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
+++ b/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
@@ -73,9 +73,11 @@
public void OnSwitchAccount()
{
IsMatching = false;
- if (clientMatchClock!=null )
+
+ if (clientMatchClock != null)
{
- clientMatchClock.Stop();
+ Clock.Stop(clientMatchClock);
+ clientMatchClock = null;
}
}
@@ -470,7 +472,7 @@
var onMatchPackage = new HC002_tagGCCrossRealmPKStartMatch();
GameNetSystem.Instance.PushPackage(onMatchPackage, ServerType.Main);
var randomWaitSeconds = UnityEngine.Random.Range(3, 8);
- clientMatchClock = Clock.Create(DateTime.Now + new TimeSpan(randomWaitSeconds * TimeSpan.TicksPerSecond), () =>
+ clientMatchClock = Clock.AlarmAt(DateTime.Now + new TimeSpan(randomWaitSeconds * TimeSpan.TicksPerSecond), () =>
{
IsMatching = false;
if (GameNetSystem.Instance.netState == GameNetSystem.NetState.Connected)
@@ -489,9 +491,10 @@
}
else
{
- if (clientMatchClock != null && !clientMatchClock.stopped)
+ if (clientMatchClock != null )
{
- clientMatchClock.Stop();
+ Clock.Stop(clientMatchClock);
+ clientMatchClock = null;
IsMatching = false;
}
else
@@ -506,7 +509,7 @@
public void SendBuyMatchCount()
{
- CC102_tagCMCrossRealmPKBuy pKBuy = new CC102_tagCMCrossRealmPKBuy();
+ var pKBuy = new CC102_tagCMCrossRealmPKBuy();
GameNetSystem.Instance.SendInfo(pKBuy);
}
--
Gitblit v1.8.0