竞技馆和比赛场关闭斗鸡技能效果
This commit is contained in:
parent
81417088fd
commit
fd14654c59
|
@ -6,6 +6,10 @@ import (
|
|||
"mongo.games.com/goserver/core/module"
|
||||
)
|
||||
|
||||
/*
|
||||
时钟
|
||||
*/
|
||||
|
||||
func init() {
|
||||
module.RegisteModule(ClockMgrSingleton, time.Millisecond*500, 0)
|
||||
}
|
||||
|
@ -247,25 +251,25 @@ func RegisterClockFunc(fs *ClockFunc) {
|
|||
return
|
||||
}
|
||||
if fs.OnSecTimerFunc != nil {
|
||||
fs.event = fs.event ^ ClockEventSecond
|
||||
fs.event = fs.event | ClockEventSecond
|
||||
}
|
||||
if fs.OnMiniTimerFunc != nil {
|
||||
fs.event = fs.event ^ ClockEventMinute
|
||||
fs.event = fs.event | ClockEventMinute
|
||||
}
|
||||
if fs.OnHourTimerFunc != nil {
|
||||
fs.event = fs.event ^ ClockEventHour
|
||||
fs.event = fs.event | ClockEventHour
|
||||
}
|
||||
if fs.OnDayTimerFunc != nil {
|
||||
fs.event = fs.event ^ ClockEventDay
|
||||
fs.event = fs.event | ClockEventDay
|
||||
}
|
||||
if fs.OnWeekTimerFunc != nil {
|
||||
fs.event = fs.event ^ ClockEventWeek
|
||||
fs.event = fs.event | ClockEventWeek
|
||||
}
|
||||
if fs.OnMonthTimerFunc != nil {
|
||||
fs.event = fs.event ^ ClockEventMonth
|
||||
fs.event = fs.event | ClockEventMonth
|
||||
}
|
||||
if fs.OnShutdownFunc != nil {
|
||||
fs.event = fs.event ^ ClockEventShutdown
|
||||
fs.event = fs.event | ClockEventShutdown
|
||||
}
|
||||
|
||||
ClockMgrSingleton.RegisterSinker(fs)
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
protocol_game "mongo.games.com/game/protocol/server"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
"mongo.games.com/goserver/srvlib"
|
||||
"mongo.games.com/goserver/srvlib/protocol"
|
||||
)
|
||||
|
||||
|
@ -45,11 +44,11 @@ func createMulticastPacket(packetid int, data interface{}, sis ...*protocol.MCSe
|
|||
return pack, nil
|
||||
}
|
||||
|
||||
func SendToGate(sid int64, packetid int, rawpack interface{}, s *netlib.Session) bool {
|
||||
if s == nil || rawpack == nil || sid == 0 {
|
||||
func SendToGate(sid int64, packetId int, pack interface{}, s *netlib.Session) bool {
|
||||
if s == nil || pack == nil || sid == 0 {
|
||||
return false
|
||||
}
|
||||
pack, err := createMulticastPacket(packetid, rawpack,
|
||||
pack, err := createMulticastPacket(packetId, pack,
|
||||
&protocol.MCSessionUnion{
|
||||
Mccs: &protocol.MCClientSession{
|
||||
SId: proto.Int64(sid)}})
|
||||
|
@ -63,25 +62,17 @@ func SendToGate(sid int64, packetid int, rawpack interface{}, s *netlib.Session)
|
|||
return false
|
||||
}
|
||||
|
||||
func SendToActThrSrv(packetid int, rawpack interface{}) bool {
|
||||
if rawpack == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
replaySess := srvlib.ServerSessionMgrSington.GetSession(GetSelfAreaId(), ActThrServerType, ActThrServerID)
|
||||
if replaySess != nil {
|
||||
return replaySess.Send(int(packetid), rawpack)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func TransmitToServer(sid int64, packetid int, rawpack interface{}, s *netlib.Session) bool {
|
||||
if d, err := netlib.MarshalPacket(packetid, rawpack); err == nil {
|
||||
// TransmitToServer 转发消息到指定服务器
|
||||
// sid: 客户端连接标识
|
||||
// packetId: 消息id
|
||||
// pack: 消息内容
|
||||
// s: 接收消息的服务器连接
|
||||
func TransmitToServer(sid int64, packetId int, pack interface{}, s *netlib.Session) bool {
|
||||
if d, err := netlib.MarshalPacket(packetId, pack); err == nil {
|
||||
pack := &protocol_game.SSTransmit{
|
||||
PacketData: d,
|
||||
SessionId: sid,
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
return s.Send(int(protocol_game.TransmitPacketID_PACKET_SS_PACKET_TRANSMIT), pack, true)
|
||||
} else {
|
||||
logger.Logger.Warn("TransmitToServer err:", err)
|
||||
|
|
|
@ -1968,7 +1968,7 @@ func (this *TienLenSceneData) TrySmallGameBilled() {
|
|||
score = losePlayerCoin
|
||||
}
|
||||
//判断宠物技能生不生效
|
||||
if losePlayer.PetUseSkill() {
|
||||
if losePlayer.PetUseSkill() && !this.IsCustom() && !this.IsMatchScene() {
|
||||
score = 0
|
||||
//通知客户端宠物技能生效 炸弹不扣分
|
||||
pack := &tienlen.SCTienLenPetSkillRes{}
|
||||
|
|
|
@ -3161,25 +3161,6 @@ func (this *Player) AddCoinPayTotal(coin int64) {
|
|||
this.CoinPayTotal += coin
|
||||
}
|
||||
|
||||
// 当用户充值
|
||||
func OnPlayerPay(pd *model.PlayerData, coin int64) {
|
||||
if pd == nil {
|
||||
return
|
||||
}
|
||||
|
||||
buf, err := pd.GetPlayerDataEncoder()
|
||||
if err == nil {
|
||||
pack := &serverproto.WTPlayerPay{
|
||||
AddCoin: proto.Int64(coin),
|
||||
PlayerData: buf.Bytes(),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
common.SendToActThrSrv(int(serverproto.SSPacketID_PACKET_WT_PLAYERPAY), pack)
|
||||
}
|
||||
|
||||
//ActFPayMgrSington.OnPlayerPay(pd.SnId, pd.Platform, coin)
|
||||
}
|
||||
|
||||
func (this *Player) SendPlatformCanUsePromoterBind() {
|
||||
state := int32(0)
|
||||
plt := PlatformMgrSingleton.GetPlatform(this.Platform)
|
||||
|
|
Loading…
Reference in New Issue