fix 竞技馆房间入场限制
This commit is contained in:
parent
fcfe862f99
commit
3c1e7bfe8f
|
@ -110,7 +110,7 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in
|
||||||
|
|
||||||
limitCoin := int64(0)
|
limitCoin := int64(0)
|
||||||
if len(cfg.GetLimitCoin()) > 0 {
|
if len(cfg.GetLimitCoin()) > 0 {
|
||||||
limitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), scene.BaseScore)]
|
limitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), scene.BaseScore)-1]
|
||||||
if limitCoin > 0 && p.GetCoin() < limitCoin {
|
if limitCoin > 0 && p.GetCoin() < limitCoin {
|
||||||
code = gamehall.OpResultCode_Game_OPRC_CoinNotEnough_Game
|
code = gamehall.OpResultCode_Game_OPRC_CoinNotEnough_Game
|
||||||
goto failed
|
goto failed
|
||||||
|
@ -1286,7 +1286,7 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{
|
||||||
// 最低限额
|
// 最低限额
|
||||||
limitCoin := int64(0)
|
limitCoin := int64(0)
|
||||||
if len(cfg.GetLimitCoin()) > 0 {
|
if len(cfg.GetLimitCoin()) > 0 {
|
||||||
limitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), msg.GetBaseScore())]
|
limitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), msg.GetBaseScore())-1]
|
||||||
if limitCoin > 0 && p.GetCoin() < limitCoin {
|
if limitCoin > 0 && p.GetCoin() < limitCoin {
|
||||||
code = gamehall.OpResultCode_Game_OPRC_CoinNotEnough_Game
|
code = gamehall.OpResultCode_Game_OPRC_CoinNotEnough_Game
|
||||||
send()
|
send()
|
||||||
|
@ -1526,7 +1526,7 @@ func CSGetPrivateRoomListHandler(s *netlib.Session, packetId int, data interface
|
||||||
Cost: costItems,
|
Cost: costItems,
|
||||||
}
|
}
|
||||||
if cfg != nil && len(cfg.GetLimitCoin()) > 0 {
|
if cfg != nil && len(cfg.GetLimitCoin()) > 0 {
|
||||||
d.LimitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), v.BaseScore)]
|
d.LimitCoin = cfg.GetLimitCoin()[slices.Index(cfg.GetBaseScore(), v.BaseScore)-1]
|
||||||
}
|
}
|
||||||
if v.CustomWinSnId > 0 {
|
if v.CustomWinSnId > 0 {
|
||||||
p := PlayerMgrSington.GetPlayerBySnId(v.CustomWinSnId)
|
p := PlayerMgrSington.GetPlayerBySnId(v.CustomWinSnId)
|
||||||
|
|
Loading…
Reference in New Issue