|
|
|
@ -306,18 +306,19 @@ func (h *WW2GameLogic) handleGift(liveRoom *LiveRoom, user *pbCommon.PbUser, gif
|
|
|
|
|
h.reborn(room, user)
|
|
|
|
|
case config.GiftOvertime:
|
|
|
|
|
h.overtime(room, user, gift.Price*gift.GiftNum)
|
|
|
|
|
case config.GiftCommander:
|
|
|
|
|
for i := 0; i < int(gift.GiftNum); i++ {
|
|
|
|
|
h.becomeCommander(room, user)
|
|
|
|
|
}
|
|
|
|
|
case config.GiftTank:
|
|
|
|
|
h.chargeTank(room, user, gift.Price*gift.GiftNum)
|
|
|
|
|
}
|
|
|
|
|
case pbMq.MqGift_PACK:
|
|
|
|
|
// 宝箱
|
|
|
|
|
h.chargeTank(room, user, gift.Price*gift.GiftNum)
|
|
|
|
|
case pbMq.MqGift_RED_PACK:
|
|
|
|
|
// 红包
|
|
|
|
|
if gift.Price == 100*100 {
|
|
|
|
|
// 100电池
|
|
|
|
|
h.becomeCommander(room, user)
|
|
|
|
|
} else {
|
|
|
|
|
h.supportSpecialBomber(room, user, gift.Price*gift.GiftNum)
|
|
|
|
|
}
|
|
|
|
|
h.supportSpecialBomber(room, user, gift.Price*gift.GiftNum)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 所有礼物-空投
|
|
|
|
|