【猫草大作战】-修改同意逻辑
This commit is contained in:
parent
d1d63de3bf
commit
5a9b2a0fa8
@ -296,12 +296,13 @@ func (ad *GameLogic) SetDataSync(Uid int, Op int, Data interface{}) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (ad *GameLogic) SetCatnipPartner(Uid int, GameId int, PartnerUid int) error {
|
||||
func (ad *GameLogic) SetCatnipPartner(Uid int, GameId int, PartnerUid int, EndT int64) error {
|
||||
_, err := ad.VarMgr.Call(&MsgMod.Msg{
|
||||
From: Uid,
|
||||
To: Uid,
|
||||
Type: MsgMod.HANDLE_TYPE_SET_CATNIP_PARTNER,
|
||||
SendT: GoUtil.Now(),
|
||||
End: EndT,
|
||||
Extra: map[string]interface{}{
|
||||
"uid": Uid,
|
||||
"game_id": GameId,
|
||||
|
||||
@ -5423,6 +5423,7 @@ func ReqCatnipAgree(player *Player, buf []byte) error {
|
||||
}
|
||||
CatnipMod := player.PlayMod.getCatnipMod()
|
||||
ActivityId := player.GetActivityId(activity.ACT_TYPE_CATNIP)
|
||||
ActivityInfo := player.GetActivityInfo(ActivityId)
|
||||
if ActivityId == 0 {
|
||||
player.SendErrClienRes(&msg.ResCatnipAgree{
|
||||
Code: msg.RES_CODE_FAIL,
|
||||
@ -5438,7 +5439,7 @@ func ReqCatnipAgree(player *Player, buf []byte) error {
|
||||
})
|
||||
return err
|
||||
}
|
||||
err = G_GameLogicPtr.SetCatnipPartner(int(player.M_DwUin), int(req.Id), int(req.Uid))
|
||||
err = G_GameLogicPtr.SetCatnipPartner(int(player.M_DwUin), int(req.Id), int(req.Uid), ActivityInfo.EndT)
|
||||
if err != nil {
|
||||
player.SendErrClienRes(&msg.ResCatnipAgree{
|
||||
Code: msg.RES_CODE_FAIL,
|
||||
@ -5756,7 +5757,8 @@ func ReqFriendReplyHandle(player *Player, buf []byte) error {
|
||||
})
|
||||
case friend.REPLY_TYPE_CATNIP: // 猫草大作战同意邀请
|
||||
GameId := GoUtil.Int(ReplyInfo.Param)
|
||||
err := G_GameLogicPtr.SetCatnipPartner(int(player.M_DwUin), GameId, ReplyInfo.Uid)
|
||||
activityInfo := player.GetActivityInfo(player.GetActivityId(activity.ACT_TYPE_CATNIP))
|
||||
err := G_GameLogicPtr.SetCatnipPartner(int(player.M_DwUin), GameId, ReplyInfo.Uid, activityInfo.EndT)
|
||||
if err != nil {
|
||||
player.PushClientRes(&msg.ResFriendReplyHandle{
|
||||
Code: msg.RES_CODE_FAIL,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user