Browse Source

Merge branch 'refs/heads/dev-ll'

zhengtao 8 months ago
parent
commit
acf545b57f
1 changed files with 15 additions and 16 deletions
  1. 15 16
      game/game_cluster/nodes/game/module/player/signin.go

+ 15 - 16
game/game_cluster/nodes/game/module/player/signin.go

@@ -1,7 +1,6 @@
 package player
 
 import (
-	mhayaTime "github.com/mhaya/extend/time"
 	"github.com/mhaya/game/game_cluster/internal/code"
 	"github.com/mhaya/game/game_cluster/internal/mdb/models"
 	"github.com/mhaya/game/game_cluster/internal/param"
@@ -13,24 +12,24 @@ func (p *actorPlayer) signIn() (*param.ChangeData, int32) {
 	}
 
 	// todo 测试代码
-	//resp := p.Player.SignIn()
-	//p.dirty = true
-	//
-	//p.itemStat(resp.AddItem)
-	//
-	//return resp, code.OK
+	resp := p.Player.SignIn()
+	p.dirty = true
 
-	// 正式代码
-	if !mhayaTime.CreateFromTimestamp(p.Player.SinIn.SignDailyTime).IsToday() {
-		resp := p.Player.SignIn()
-		p.dirty = true
+	p.itemStat(resp.AddItem)
 
-		p.itemStat(resp.AddItem)
+	return resp, code.OK
 
-		return resp, code.OK
-	} else {
-		return nil, code.PlayerSignInError
-	}
+	//// 正式代码
+	//if !mhayaTime.CreateFromTimestamp(p.Player.SinIn.SignDailyTime).IsToday() {
+	//	resp := p.Player.SignIn()
+	//	p.dirty = true
+	//
+	//	p.itemStat(resp.AddItem)
+	//
+	//	return resp, code.OK
+	//} else {
+	//	return nil, code.PlayerSignInError
+	//}
 }
 
 func (p *actorPlayer) signInList() (*models.SignIn, int32) {