|
@@ -66,6 +66,20 @@ func (p *actorPlayer) OnInit() {
|
|
|
p.Timer().Add(1*time.Minute, p.setRedis)
|
|
|
p.Timer().Add(1*time.Second, p.setDb)
|
|
|
p.Timer().Add(30*time.Second, p.setInviteReward)
|
|
|
+
|
|
|
+ p.Timer().Add(1*time.Second, p.addRoll)
|
|
|
+}
|
|
|
+
|
|
|
+func (p *actorPlayer) addRoll() {
|
|
|
+ if p.isOnline {
|
|
|
+ if p.Player.Item[models.ItemRoll].Num < 10 {
|
|
|
+ p.Player.Item[models.ItemRoll].Num += 100
|
|
|
+ }
|
|
|
+ if p.Player.Item[models.ItemDrawsNumber].Num < 10 {
|
|
|
+ p.Player.Item[models.ItemDrawsNumber].Num += 100
|
|
|
+ }
|
|
|
+ p.dirty = true
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
func (p *actorPlayer) OnStop() {
|