Merge remote-tracking branch 'origin/develop' into dev_slots
This commit is contained in:
commit
53e02f9c1f
|
@ -1267,6 +1267,7 @@ func (this *Player) GetSkillAdd(id int32) int32 {
|
|||
// 增加或减少道具
|
||||
// 同步到 worldsrv
|
||||
func (this *Player) AddItems(args *model.AddItemParam) {
|
||||
args.IsGame = true
|
||||
changeItem := map[int32]int64{}
|
||||
for _, v := range args.Change {
|
||||
item := srvdata.GameItemMgr.Get(this.Platform, v.ItemId)
|
||||
|
|
|
@ -561,8 +561,7 @@ func (this *TienLenSceneData) GetFreeGameSceneType() int32 {
|
|||
// 比赛场发牌
|
||||
// 纯真人,随机发牌
|
||||
// 有机器人和真人,真人拿好牌
|
||||
// mustRandom 必须随机发牌
|
||||
func (this *TienLenSceneData) SendHandCard_Match(mustRandom bool) {
|
||||
func (this *TienLenSceneData) SendHandCard_Match() {
|
||||
this.poker.Shuffle()
|
||||
buf := this.poker.GetPokerBuf()
|
||||
cardss := map[int][]int32{}
|
||||
|
@ -584,7 +583,7 @@ func (this *TienLenSceneData) SendHandCard_Match(mustRandom bool) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if !mustRandom && len(realPlayers) > 0 && len(robotPlayers) > 0 {
|
||||
if len(realPlayers) > 0 && len(robotPlayers) > 0 {
|
||||
type gradeInfo struct {
|
||||
id int
|
||||
grade int
|
||||
|
|
|
@ -994,14 +994,10 @@ func (this *SceneHandCardStateTienLen) OnEnter(s *base.Scene) {
|
|||
if len(sceneEx.testPokers) > 1 {
|
||||
sceneEx.SendHandCardOdds()
|
||||
} else {
|
||||
if sceneEx.WGCreateScene.GetCloseCtrl() {
|
||||
sceneEx.SendHandCard_Match(true)
|
||||
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
|
||||
sceneEx.SendHandCard_Match()
|
||||
} else {
|
||||
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
|
||||
sceneEx.SendHandCard_Match(false)
|
||||
} else {
|
||||
sceneEx.SendHandCardOdds()
|
||||
}
|
||||
sceneEx.SendHandCardOdds()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ type AddItemParam struct {
|
|||
GameId, GameFreeId int64 // 游戏id,场次id
|
||||
LogId string // 撤销的id,道具兑换失败
|
||||
RoomConfigId int32 // 房间配置id
|
||||
IsGame bool // 是否为gamesrv的操作
|
||||
}
|
||||
|
||||
type ChangeItemParam struct {
|
||||
|
|
|
@ -729,7 +729,7 @@ func (this *BagMgr) AddItems(param *model.AddItemParam) (*BagInfo, bag.OpResultC
|
|||
}
|
||||
|
||||
// 同步游戏服务器
|
||||
if p.scene != nil {
|
||||
if p.scene != nil && !param.IsGame {
|
||||
b, err := netlib.Gob.Marshal(items)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("AddItems Marshal error(%v)", err)
|
||||
|
|
Loading…
Reference in New Issue