Merge branch 'develop' of https://git.pogorockgames.com/mango-games/server/game into develop
This commit is contained in:
commit
09a609b1b3
|
@ -180,6 +180,11 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in
|
||||||
p.matchCtx = mc
|
p.matchCtx = mc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if scene.IsCustom() {
|
||||||
|
if scene.CustomParam.GetCostType() == 1 {
|
||||||
|
sp.CostPayment(scene, p.SnId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !scene.PlayerEnter(p, -1, true) {
|
if !scene.PlayerEnter(p, -1, true) {
|
||||||
code = gamehall.OpResultCode_Game_OPRC_Error_Game
|
code = gamehall.OpResultCode_Game_OPRC_Error_Game
|
||||||
|
@ -1342,15 +1347,13 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{
|
||||||
|
|
||||||
csp.AddScene(scene)
|
csp.AddScene(scene)
|
||||||
|
|
||||||
|
sp.CostPayment(scene, p.SnId)
|
||||||
|
|
||||||
if !scene.PlayerEnter(p, -1, true) {
|
if !scene.PlayerEnter(p, -1, true) {
|
||||||
send()
|
send()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if costType == 2 {
|
|
||||||
sp.CostPayment(scene, p.SnId)
|
|
||||||
}
|
|
||||||
|
|
||||||
code = gamehall.OpResultCode_Game_OPRC_Sucess_Game
|
code = gamehall.OpResultCode_Game_OPRC_Sucess_Game
|
||||||
pack = &gamehall.SCCreatePrivateRoom{
|
pack = &gamehall.SCCreatePrivateRoom{
|
||||||
GameFreeId: msg.GetGameFreeId(),
|
GameFreeId: msg.GetGameFreeId(),
|
||||||
|
|
|
@ -57,11 +57,6 @@ func (spd *ScenePolicyData) OnTick(s *Scene) {
|
||||||
|
|
||||||
func (spd *ScenePolicyData) OnPlayerEnter(s *Scene, snid int32) {
|
func (spd *ScenePolicyData) OnPlayerEnter(s *Scene, snid int32) {
|
||||||
s.NotifyPrivateRoom(common.ListModify)
|
s.NotifyPrivateRoom(common.ListModify)
|
||||||
if s.IsCustom() {
|
|
||||||
if s.CustomParam.GetCostType() == 1 { // AA
|
|
||||||
spd.CostPayment(s, snid)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (spd *ScenePolicyData) OnPlayerLeave(s *Scene, snid int32) {
|
func (spd *ScenePolicyData) OnPlayerLeave(s *Scene, snid int32) {
|
||||||
|
|
Loading…
Reference in New Issue