Procházet zdrojové kódy

修改每日定时任务问题

zhengtao před 11 měsíci
rodič
revize
746e498ea8

+ 7 - 1
game/game_cluster/nodes/game/module/player/actor_player.go

@@ -90,12 +90,18 @@ func (p *actorPlayer) OnInit() {
 	p.Timer().Add(1*time.Minute, p.upatePlayerLevelStat)
 
 	//在线用户定时刷新
-	p.Timer().Add(1*time.Minute, p.Player.InitDaily)
+	p.Timer().Add(1*time.Minute, p.initDaily)
 
 	//p.Timer().Add(30*time.Second, p.getAndUpdateAvatar)  //排行榜头像
 
 }
 
+func (p *actorPlayer) initDaily() {
+	if p.isOnline {
+		p.Player.InitDaily()
+	}
+}
+
 func (p *actorPlayer) addRoll() {
 	if p.isOnline {
 		if p.Player.Item[models.ItemRoll].Num < 10 {