fix:房费扣除
This commit is contained in:
parent
db1a88684a
commit
daf20b6310
|
@ -181,7 +181,14 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in
|
|||
}
|
||||
}
|
||||
|
||||
if scene.IsCustom() {
|
||||
if scene.CustomParam.GetCostType() == 1 { // AA
|
||||
scene.sp.CostPayment(scene, p.SnId)
|
||||
}
|
||||
}
|
||||
|
||||
if !scene.PlayerEnter(p, -1, true) {
|
||||
//todo 退回房卡
|
||||
code = gamehall.OpResultCode_Game_OPRC_Error_Game
|
||||
}
|
||||
|
||||
|
@ -1364,15 +1371,14 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{
|
|||
|
||||
csp.AddScene(scene)
|
||||
|
||||
sp.CostPayment(scene, p.SnId)
|
||||
|
||||
if !scene.PlayerEnter(p, -1, true) {
|
||||
//todo 退回房卡
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
|
||||
if costType == 2 {
|
||||
sp.CostPayment(scene, p.SnId)
|
||||
}
|
||||
|
||||
code = gamehall.OpResultCode_Game_OPRC_Sucess_Game
|
||||
pack = &gamehall.SCCreatePrivateRoom{
|
||||
GameFreeId: msg.GetGameFreeId(),
|
||||
|
|
|
@ -528,7 +528,7 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
if !scene.IsMatchScene() && !scene.IsCustom() { // 比赛没金币是积分
|
||||
if !scene.IsMatchScene() { // 比赛没金币是积分
|
||||
player.Coin = playerBet.GetCoin()
|
||||
player.GameCoinTs = playerBet.GetGameCoinTs()
|
||||
player.GameTax += playerBet.GetTax()
|
||||
|
|
|
@ -262,7 +262,7 @@ func (this *Scene) PlayerEnter(p *Player, pos int, ischangeroom bool) bool {
|
|||
name := this.GetSceneName()
|
||||
logger.Logger.Tracef("(this *Scene) PlayerEnter(%v) robot(%v) robotlimit(%v)", name, this.robotNum, this.robotLimit)
|
||||
|
||||
if !this.IsMatchScene() && !this.IsCustom() {
|
||||
if !this.IsMatchScene() {
|
||||
flag := false
|
||||
// 本地游戏机器人携带金币
|
||||
if common.IsLocalGame(this.gameId) {
|
||||
|
|
|
@ -40,10 +40,6 @@ func (spd *ScenePolicyData) OnStart(s *Scene) {
|
|||
|
||||
func (spd *ScenePolicyData) OnStop(s *Scene) {
|
||||
s.NotifyPrivateRoom(common.ListDel)
|
||||
//// 房主付费,房间没有玩就解散了,返还房主建房费用
|
||||
//if s.IsCustom() && s.CustomParam.GetCostType() == 2 && s.currRound == 0 {
|
||||
// s.sp.GiveCostPayment(s, s.creator)
|
||||
//}
|
||||
// 系统房间解散后自动创建
|
||||
if s.RoomConfigSystem != nil {
|
||||
CustomRoomMgrSingle.Release(s.platform.IdStr, s.RoomConfigSystem.GetId())
|
||||
|
@ -57,11 +53,6 @@ func (spd *ScenePolicyData) OnTick(s *Scene) {
|
|||
|
||||
func (spd *ScenePolicyData) OnPlayerEnter(s *Scene, snid int32) {
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue