modify 广播房费

This commit is contained in:
sk 2025-01-07 18:04:56 +08:00
parent 4ff2e84a3c
commit 62b256a26e
1 changed files with 20 additions and 12 deletions

View File

@ -758,18 +758,26 @@ func (this *SceneBaseStateTienLen) OnPlayerOp(s *base.Scene, p *base.Player, opc
return true
}
playerEx.AddItems(&model.AddItemParam{
Platform: sceneEx.Platform,
SnId: playerEx.SnId,
Change: item,
GainWay: common.GainWayRoomCost,
Operator: "system",
Remark: "房费扣除",
GameId: int64(sceneEx.GetGameId()),
GameFreeId: int64(sceneEx.GetGameFreeId()),
RoomConfigId: sceneEx.GetCustom().GetRoomConfigId(),
IsGame: true,
})
for _, v := range item {
if v.ItemId == 100001 {
playerEx.AddCoin(v.ItemNum, common.GainWayRoomCost, base.SyncFlag_Broadcast, "system", "房费扣除")
} else {
playerEx.AddItems(&model.AddItemParam{
Platform: sceneEx.Platform,
SnId: playerEx.SnId,
Change: []*model.Item{
{ItemId: v.ItemId, ItemNum: v.ItemNum},
},
GainWay: common.GainWayRoomCost,
Operator: "system",
Remark: "房费扣除",
GameId: int64(sceneEx.GetGameId()),
GameFreeId: int64(sceneEx.GetGameFreeId()),
RoomConfigId: sceneEx.GetCustom().GetRoomConfigId(),
IsGame: true,
})
}
}
}
this.OnPlayerSToCOp(s, p, playerEx.GetPos(), opcode, tienlen.OpResultCode_OPRC_Sucess, params)
}