From 9629db34e6ebf01bb8fc193901512f15fdf40b5a Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 26 Nov 2024 20:11:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8E=A9=E5=AE=B6=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E9=87=8A=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/internal/{playercache.go => playerloader.go} | 0 worldsrv/player.go | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename worldsrv/internal/{playercache.go => playerloader.go} (100%) diff --git a/worldsrv/internal/playercache.go b/worldsrv/internal/playerloader.go similarity index 100% rename from worldsrv/internal/playercache.go rename to worldsrv/internal/playerloader.go diff --git a/worldsrv/player.go b/worldsrv/player.go index a6172dc..fad60e9 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -1122,7 +1122,7 @@ func (this *Player) GetMessageByGiftId(id string) *model.Message { } func (this *Player) IsOnLine() bool { - return this.state != PlayerStateOffline + return this.state == PlayerStateOnline } func (this *Player) SetOnline() { @@ -1130,7 +1130,7 @@ func (this *Player) SetOnline() { } func (this *Player) IsOffline() bool { - return this.state == PlayerStateOffline + return this.state != PlayerStateOnline } func (this *Player) SetOffline() {