Merge remote-tracking branch 'origin/develop' into dev_slots
This commit is contained in:
commit
6869021d08
|
@ -77,7 +77,7 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data
|
||||||
if msg.Result == 1 {
|
if msg.Result == 1 {
|
||||||
logger.Logger.Tracef("上分成功!!!!!!!!!!!!snid = ", msg.Snid)
|
logger.Logger.Tracef("上分成功!!!!!!!!!!!!snid = ", msg.Snid)
|
||||||
//发送向前移动指令
|
//发送向前移动指令
|
||||||
sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonFront)
|
//sceneEx.OnPlayerSMPerateOp(p.SnId, int32(sceneEx.machineId), rule.ButtonFront)
|
||||||
|
|
||||||
s.ChangeSceneState(rule.ClawDollSceneStateStart)
|
s.ChangeSceneState(rule.ClawDollSceneStateStart)
|
||||||
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart))
|
sceneEx.SetPlayingState(int32(rule.ClawDollSceneStateStart))
|
||||||
|
|
|
@ -119,6 +119,7 @@ func SMDollMachinePerateHandler(session *netlib.Session, packetId int, data inte
|
||||||
Process(conn, f1, f2)
|
Process(conn, f1, f2)
|
||||||
case 5:
|
case 5:
|
||||||
//投币
|
//投币
|
||||||
|
fmt.Println("===========玩家投币===========")
|
||||||
machinedoll.Coin(conn)
|
machinedoll.Coin(conn)
|
||||||
go DollMachineGrabResult(session, conn, msg.Snid, msg.GetId())
|
go DollMachineGrabResult(session, conn, msg.Snid, msg.GetId())
|
||||||
}
|
}
|
||||||
|
@ -141,18 +142,20 @@ func SMDollMachineGrabHandler(session *netlib.Session, packetId int, data interf
|
||||||
switch msg.GetTypeId() {
|
switch msg.GetTypeId() {
|
||||||
case 1:
|
case 1:
|
||||||
//弱抓
|
//弱抓
|
||||||
f1 := []func(){
|
/* f1 := []func(){
|
||||||
func() { machinedoll.WeakGrab(conn) },
|
func() { machinedoll.WeakGrab(conn) },
|
||||||
}
|
}
|
||||||
f2 := []func(){}
|
f2 := []func(){}
|
||||||
Process(conn, f1, f2)
|
Process(conn, f1, f2)*/
|
||||||
|
machinedoll.WeakGrab(conn)
|
||||||
case 2:
|
case 2:
|
||||||
//强力抓
|
//强力抓
|
||||||
f1 := []func(){
|
/* f1 := []func(){
|
||||||
func() { machinedoll.Grab(conn) },
|
func() { machinedoll.Grab(conn) },
|
||||||
}
|
}
|
||||||
f2 := []func(){}
|
f2 := []func(){}
|
||||||
Process(conn, f1, f2)
|
Process(conn, f1, f2)*/
|
||||||
|
machinedoll.Grab(conn)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,7 +354,7 @@ func (this *CSInviteFriendHandler) Process(s *netlib.Session, packetid int, data
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
//私有房间
|
//私有房间
|
||||||
if p.scene.sceneMode != common.SceneModePrivate {
|
if !p.scene.IsPrivateScene() && !p.scene.IsCustom() {
|
||||||
logger.Logger.Warn("CSInviteFriendHandler scene is common.SceneMode_Private")
|
logger.Logger.Warn("CSInviteFriendHandler scene is common.SceneMode_Private")
|
||||||
opRetCode = friend.OpResultCode_OPRC_InviteFriend_RoomLimit
|
opRetCode = friend.OpResultCode_OPRC_InviteFriend_RoomLimit
|
||||||
send(p)
|
send(p)
|
||||||
|
@ -461,7 +461,7 @@ func (this *CSInviteFriendOpHandler) Process(s *netlib.Session, packetid int, da
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
//私有房间
|
//私有房间
|
||||||
if scene.sceneMode != common.SceneModePrivate {
|
if !scene.IsPrivateScene() && !scene.IsCustom() {
|
||||||
logger.Logger.Warn("CSInviteFriendHandler scene is common.SceneMode_Private")
|
logger.Logger.Warn("CSInviteFriendHandler scene is common.SceneMode_Private")
|
||||||
opRetCode = friend.OpResultCode_OPRC_InviteFriend_RoomLimit //只能进入私有房间
|
opRetCode = friend.OpResultCode_OPRC_InviteFriend_RoomLimit //只能进入私有房间
|
||||||
send(p)
|
send(p)
|
||||||
|
|
|
@ -1249,7 +1249,7 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{
|
||||||
costType = int64(msg.GetCostType())
|
costType = int64(msg.GetCostType())
|
||||||
}
|
}
|
||||||
if costType < 1 || costType > 2 {
|
if costType < 1 || costType > 2 {
|
||||||
costType = 1 // 默认房主支付
|
costType = 1 // 默认AA
|
||||||
}
|
}
|
||||||
// 语音
|
// 语音
|
||||||
if cfg.GetVoice() != 3 {
|
if cfg.GetVoice() != 3 {
|
||||||
|
@ -1335,7 +1335,7 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.GetCostType() == 1 {
|
if cfg.GetCostType() == 2 {
|
||||||
sp.CostPayment(scene, p)
|
sp.CostPayment(scene, p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ func (spd *ScenePolicyData) OnSceneState(s *Scene, state int) {
|
||||||
case common.SceneStateStart:
|
case common.SceneStateStart:
|
||||||
s.NotifyPrivateRoom(common.ListModify)
|
s.NotifyPrivateRoom(common.ListModify)
|
||||||
if s.IsCustom() {
|
if s.IsCustom() {
|
||||||
if s.GetCostType() == 2 {
|
if s.GetCostType() == 1 {
|
||||||
for _, v := range s.players {
|
for _, v := range s.players {
|
||||||
spd.CostPayment(s, v)
|
spd.CostPayment(s, v)
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ func (spd *ScenePolicyData) CanEnter(s *Scene, p *Player) int {
|
||||||
func (spd *ScenePolicyData) costEnough(costType, playerNum int, roomConfig *webapi.RoomConfig, snid int32, f func(items []*model.Item)) bool {
|
func (spd *ScenePolicyData) costEnough(costType, playerNum int, roomConfig *webapi.RoomConfig, snid int32, f func(items []*model.Item)) bool {
|
||||||
isEnough := true
|
isEnough := true
|
||||||
var items []*model.Item
|
var items []*model.Item
|
||||||
if costType == 1 {
|
if costType == 2 {
|
||||||
// 房主
|
// 房主
|
||||||
for _, v := range roomConfig.GetCost() {
|
for _, v := range roomConfig.GetCost() {
|
||||||
if item := BagMgrSingleton.GetItem(snid, v.GetItemId()); item == nil || item.ItemNum < v.GetItemNum() {
|
if item := BagMgrSingleton.GetItem(snid, v.GetItemId()); item == nil || item.ItemNum < v.GetItemNum() {
|
||||||
|
@ -119,7 +119,7 @@ func (spd *ScenePolicyData) costEnough(costType, playerNum int, roomConfig *weba
|
||||||
} else {
|
} else {
|
||||||
items = append(items, &model.Item{
|
items = append(items, &model.Item{
|
||||||
ItemId: v.GetItemId(),
|
ItemId: v.GetItemId(),
|
||||||
ItemNum: v.GetItemNum(),
|
ItemNum: n,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue