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() {