Compare commits
No commits in common. "eb791c364ec281c50d7a449e25c607d7229a3bc6" and "18f67b7d2213e957d3dde847f64b2c79c1ad3d89" have entirely different histories.
eb791c364e
...
18f67b7d22
|
@ -354,7 +354,7 @@ func (this *CSInviteFriendHandler) Process(s *netlib.Session, packetid int, data
|
|||
return nil
|
||||
}
|
||||
//私有房间
|
||||
if !p.scene.IsPrivateScene() && !p.scene.IsCustom() {
|
||||
if p.scene.sceneMode != common.SceneModePrivate {
|
||||
logger.Logger.Warn("CSInviteFriendHandler scene is common.SceneMode_Private")
|
||||
opRetCode = friend.OpResultCode_OPRC_InviteFriend_RoomLimit
|
||||
send(p)
|
||||
|
|
|
@ -1249,7 +1249,7 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{
|
|||
costType = int64(msg.GetCostType())
|
||||
}
|
||||
if costType < 1 || costType > 2 {
|
||||
costType = 1 // 默认AA
|
||||
costType = 1 // 默认房主支付
|
||||
}
|
||||
// 语音
|
||||
if cfg.GetVoice() != 3 {
|
||||
|
@ -1335,7 +1335,7 @@ func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{
|
|||
return nil
|
||||
}
|
||||
|
||||
if cfg.GetCostType() == 2 {
|
||||
if cfg.GetCostType() == 1 {
|
||||
sp.CostPayment(scene, p)
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ func (spd *ScenePolicyData) OnSceneState(s *Scene, state int) {
|
|||
case common.SceneStateStart:
|
||||
s.NotifyPrivateRoom(common.ListModify)
|
||||
if s.IsCustom() {
|
||||
if s.GetCostType() == 1 {
|
||||
if s.GetCostType() == 2 {
|
||||
for _, v := range s.players {
|
||||
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 {
|
||||
isEnough := true
|
||||
var items []*model.Item
|
||||
if costType == 2 {
|
||||
if costType == 1 {
|
||||
// 房主
|
||||
for _, v := range roomConfig.GetCost() {
|
||||
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 {
|
||||
items = append(items, &model.Item{
|
||||
ItemId: v.GetItemId(),
|
||||
ItemNum: n,
|
||||
ItemNum: v.GetItemNum(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue