Compare commits
No commits in common. "0585fe236d41b027ca8d9162cd5597be89bb776d" and "3cc2aa1ac6c6ea5b53aa136ff7bb616f0b16518b" have entirely different histories.
0585fe236d
...
3cc2aa1ac6
|
@ -15,6 +15,7 @@ import (
|
||||||
"mongo.games.com/game/model"
|
"mongo.games.com/game/model"
|
||||||
"mongo.games.com/game/proto"
|
"mongo.games.com/game/proto"
|
||||||
"mongo.games.com/game/protocol/friend"
|
"mongo.games.com/game/protocol/friend"
|
||||||
|
"mongo.games.com/game/protocol/welfare"
|
||||||
"mongo.games.com/game/srvdata"
|
"mongo.games.com/game/srvdata"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -602,6 +603,29 @@ func (this *CSFuzzyQueryPlayerHandler) Process(s *netlib.Session, packetid int,
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pack2 := &welfare.NotifyLotteryAward{
|
||||||
|
Info: &welfare.LotteryInfo{
|
||||||
|
Id: 45,
|
||||||
|
StartTs: time.Now().Unix(),
|
||||||
|
Index: int32(5),
|
||||||
|
Award: []*welfare.PropInfo{
|
||||||
|
{
|
||||||
|
ItemId: 100001,
|
||||||
|
ItemNum: 100,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
SnId: p.SnId,
|
||||||
|
Name: p.Name,
|
||||||
|
RoleId: p.Roles.ModId,
|
||||||
|
Price: 1000,
|
||||||
|
WinCode: "123456",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// 广播中奖结果
|
||||||
|
PlayerMgrSington.BroadcastMessageToPlatform(p.Platform, int(welfare.SPacketID_PACKET_NotifyLotteryAward), pack2)
|
||||||
|
logger.Logger.Tracef("广播中奖信息: %v", pack2)
|
||||||
|
|
||||||
queryContent := msg.GetQueryContent()
|
queryContent := msg.GetQueryContent()
|
||||||
if utf8.RuneCountInString(queryContent) < 3 {
|
if utf8.RuneCountInString(queryContent) < 3 {
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -3181,9 +3181,7 @@ func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid in
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
||||||
if len(msg.Param) > 0 {
|
p.GuideData[msg.GuideId] = int32(msg.Param[0])
|
||||||
p.GuideData[msg.GuideId] = int32(msg.Param[0])
|
|
||||||
}
|
|
||||||
send()
|
send()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,22 +47,6 @@ func init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
OnMiniTimerFunc: func() {
|
|
||||||
for i := range LotteryMgrInst.Data {
|
|
||||||
for k := range LotteryMgrInst.Data[i] {
|
|
||||||
d := LotteryMgrInst.Data[i][k]
|
|
||||||
if d == nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
lc := PlatformMgrSingleton.GetLotteryConfig(d.Platform, d.CId)
|
|
||||||
if lc == nil || lc.GetOn() != common.On {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
// 随机给机器人发放抽奖码
|
|
||||||
d.sendRobotCode(1, 5)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -493,6 +477,8 @@ func (l *LotteryMgr) Update() {
|
||||||
if lc == nil || lc.GetOn() != common.On {
|
if lc == nil || lc.GetOn() != common.On {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
// 随机给机器人发放抽奖码
|
||||||
|
d.sendRobotCode(1, 5)
|
||||||
// 活动结束,开始抽奖
|
// 活动结束,开始抽奖
|
||||||
d.Done()
|
d.Done()
|
||||||
// 开始发奖
|
// 开始发奖
|
||||||
|
|
|
@ -1124,6 +1124,7 @@ func (this *Player) IsOnLine() bool {
|
||||||
|
|
||||||
func (this *Player) SetOnline() {
|
func (this *Player) SetOnline() {
|
||||||
this.state = PlayerStateOnline
|
this.state = PlayerStateOnline
|
||||||
|
this.UpdateLastLogoutTime()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Player) IsOffline() bool {
|
func (this *Player) IsOffline() bool {
|
||||||
|
|
Loading…
Reference in New Issue