猫草大作战
This commit is contained in:
parent
5ad2b64fc4
commit
259814ab90
@ -9,6 +9,12 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func IntSlice(d interface{}) []int {
|
||||||
|
if d == nil {
|
||||||
|
return []int{}
|
||||||
|
}
|
||||||
|
return d.([]int)
|
||||||
|
}
|
||||||
func IntToInt32(d []int) []int32 {
|
func IntToInt32(d []int) []int32 {
|
||||||
r := make([]int32, 0, len(d))
|
r := make([]int32, 0, len(d))
|
||||||
for _, d := range d {
|
for _, d := range d {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package game
|
package game
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"server/GoUtil"
|
"server/GoUtil"
|
||||||
activityCfg "server/conf/activity"
|
activityCfg "server/conf/activity"
|
||||||
catnipCfg "server/conf/catnip"
|
catnipCfg "server/conf/catnip"
|
||||||
@ -314,6 +315,7 @@ func (p *Player) CatnipBackData() {
|
|||||||
if CatnipMod == nil {
|
if CatnipMod == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
FriendMod := p.PlayMod.getFriendMod()
|
||||||
GameList := make([]*msg.CatnipGame, 0)
|
GameList := make([]*msg.CatnipGame, 0)
|
||||||
for _, v := range CatnipMod.Game {
|
for _, v := range CatnipMod.Game {
|
||||||
GameInfo := &msg.CatnipGame{
|
GameInfo := &msg.CatnipGame{
|
||||||
@ -329,32 +331,56 @@ func (p *Player) CatnipBackData() {
|
|||||||
GameInfo.Partner = PlayerData
|
GameInfo.Partner = PlayerData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
InviteList := make([]*msg.CatnipInvite, 0)
|
|
||||||
for _, iv := range v.InviteList {
|
|
||||||
InviteList = append(InviteList, &msg.CatnipInvite{
|
|
||||||
Uid: int64(iv.InviteId),
|
|
||||||
Time: int64(iv.Time),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
GameInfo.InviteList = InviteList
|
|
||||||
BeInvitedList := make([]*msg.CatnipInvite, 0)
|
|
||||||
for _, iv := range v.BeInvitedList {
|
|
||||||
BeInvitedList = append(BeInvitedList, &msg.CatnipInvite{
|
|
||||||
Uid: int64(iv.InviteId),
|
|
||||||
Time: int64(iv.Time),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
GameInfo.BeInviteList = BeInvitedList
|
|
||||||
GameList = append(GameList, GameInfo)
|
GameList = append(GameList, GameInfo)
|
||||||
}
|
}
|
||||||
|
tmpData := make(map[int]*msg.CatnipInvite)
|
||||||
|
InviteList := make([]*msg.CatnipInvite, 0)
|
||||||
|
for Uid, Info := range CatnipMod.InviteList {
|
||||||
|
tmpData[Uid] = &msg.CatnipInvite{
|
||||||
|
Uid: int64(Uid),
|
||||||
|
Time: Info.Time,
|
||||||
|
Type: 1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for Uid, Info := range CatnipMod.BeInvitedList {
|
||||||
|
tmpData[Uid] = &msg.CatnipInvite{
|
||||||
|
Uid: int64(Uid),
|
||||||
|
Time: Info.Time,
|
||||||
|
Type: 2,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for Uid := range FriendMod.NewFriendList {
|
||||||
|
key := fmt.Sprintf("catnip_partner_%d", Uid)
|
||||||
|
Var := G_GameLogicPtr.VarMgr.GetExpireVar(key)
|
||||||
|
if len(Var.D.([]int)) >= 4 {
|
||||||
|
tmpData[Uid] = &msg.CatnipInvite{
|
||||||
|
Uid: int64(Uid),
|
||||||
|
Type: 3,
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if _, ok := tmpData[Uid]; !ok {
|
||||||
|
tmpData[Uid] = &msg.CatnipInvite{
|
||||||
|
Uid: int64(Uid),
|
||||||
|
Type: 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, v := range tmpData {
|
||||||
|
InviteList = append(InviteList, v)
|
||||||
|
}
|
||||||
|
|
||||||
Template := catnipCfg.GetTemplateId(CatnipMod.Id)
|
Template := catnipCfg.GetTemplateId(CatnipMod.Id)
|
||||||
res := &msg.ResCatnip{
|
res := &msg.ResCatnip{
|
||||||
Id: int32(CatnipMod.Id),
|
Id: int32(CatnipMod.Id),
|
||||||
EndTime: int32(ActivityInfo.EndT),
|
EndTime: int32(ActivityInfo.EndT),
|
||||||
Status: int32(Status),
|
Status: int32(Status),
|
||||||
Template: int32(Template),
|
Template: int32(Template),
|
||||||
GameList: GameList,
|
GameList: GameList,
|
||||||
Multiply: int32(CatnipMod.Mul),
|
Multiply: int32(CatnipMod.Mul),
|
||||||
|
FriendList: InviteList,
|
||||||
}
|
}
|
||||||
p.PushClientRes(res)
|
p.PushClientRes(res)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -286,6 +286,11 @@ func ReqGmCommand_(player *Player, Command string) error {
|
|||||||
ActivityInfo := GetActivityInfo(player, activity.ACT_TYPE_MINING)
|
ActivityInfo := GetActivityInfo(player, activity.ACT_TYPE_MINING)
|
||||||
MiningMod.ZeroUpdate(ActivityInfo.Id)
|
MiningMod.ZeroUpdate(ActivityInfo.Id)
|
||||||
MiningBackData(player)
|
MiningBackData(player)
|
||||||
|
case "catnipReload":
|
||||||
|
CatnipMod := player.PlayMod.getCatnipMod()
|
||||||
|
CatnipMod.ZeroUpdate(-1)
|
||||||
|
ActivityInfo := GetActivityInfo(player, activity.ACT_TYPE_CATNIP)
|
||||||
|
CatnipMod.ZeroUpdate(ActivityInfo.Id)
|
||||||
case "guessColorReload":
|
case "guessColorReload":
|
||||||
GuessColorMod := player.PlayMod.getGuessColorMod()
|
GuessColorMod := player.PlayMod.getGuessColorMod()
|
||||||
GuessColorMod.ZeroUpdate(-1)
|
GuessColorMod.ZeroUpdate(-1)
|
||||||
|
|||||||
@ -331,7 +331,7 @@ func handle(p *Player, m *msg.Msg) error {
|
|||||||
if ActivityId != CatnipMsg.ActivityId { // 活动ID不匹配
|
if ActivityId != CatnipMsg.ActivityId { // 活动ID不匹配
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
CatnipMod.BeInvited(CatnipMsg.GameId, int(m.From), m.SendT)
|
CatnipMod.BeInvited(int(m.From), m.SendT)
|
||||||
FriendMod := p.PlayMod.getFriendMod()
|
FriendMod := p.PlayMod.getFriendMod()
|
||||||
FriendMod.AddReplyInfo(m.From, friend.REPLY_TYPE_CATNIP, fmt.Sprintf("%d", CatnipMsg.GameId), m.End)
|
FriendMod.AddReplyInfo(m.From, friend.REPLY_TYPE_CATNIP, fmt.Sprintf("%d", CatnipMsg.GameId), m.End)
|
||||||
case msg.HANDLE_TYPE_CATNIP_AGREE: // 同意好友参与猫咪游戏
|
case msg.HANDLE_TYPE_CATNIP_AGREE: // 同意好友参与猫咪游戏
|
||||||
@ -341,19 +341,7 @@ func handle(p *Player, m *msg.Msg) error {
|
|||||||
if ActivityId != CatnipMsgInfo.ActivityId { // 活动ID不匹配
|
if ActivityId != CatnipMsgInfo.ActivityId { // 活动ID不匹配
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
UserList, _ := CatnipMod.Agree(CatnipMsgInfo.GameId, int(m.From))
|
CatnipMod.BeAgree(CatnipMsgInfo.GameId, int(m.From))
|
||||||
for _, v := range UserList {
|
|
||||||
FriendMgrSend(&msg.Msg{
|
|
||||||
From: int(p.M_DwUin),
|
|
||||||
To: int(v),
|
|
||||||
Type: msg.HANDLE_TYPE_CATNIP_AGREE,
|
|
||||||
Extra: CatnipMsg{
|
|
||||||
ActivityId: ActivityId,
|
|
||||||
GameId: int(CatnipMsgInfo.GameId),
|
|
||||||
},
|
|
||||||
SendT: GoUtil.Now(),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
case msg.HANDLE_TYPE_CATNIP_AGREE_DEL: // 同意好友参与猫咪游戏后删除邀请
|
case msg.HANDLE_TYPE_CATNIP_AGREE_DEL: // 同意好友参与猫咪游戏后删除邀请
|
||||||
CatnipMod := p.PlayMod.getCatnipMod()
|
CatnipMod := p.PlayMod.getCatnipMod()
|
||||||
CatnipMsg := m.Extra.(CatnipMsg)
|
CatnipMsg := m.Extra.(CatnipMsg)
|
||||||
@ -473,7 +461,7 @@ func SyncFriendMsg(p *Player) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
sort.Slice(ml, func(i, j int) bool {
|
sort.Slice(ml, func(i, j int) bool {
|
||||||
return ml[i].SendT < ml[j].SendT
|
return ml[i].Id < ml[j].Id
|
||||||
})
|
})
|
||||||
maxId := int64(0)
|
maxId := int64(0)
|
||||||
for _, v := range ml {
|
for _, v := range ml {
|
||||||
|
|||||||
@ -3553,7 +3553,11 @@ func ReqGuessColorTake(player *Player, buf []byte) error {
|
|||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
GuessColorMod.Take(req.Map.Map, req.OMap)
|
var M map[int32]int32
|
||||||
|
if req.Map != nil {
|
||||||
|
M = req.Map.Map
|
||||||
|
}
|
||||||
|
GuessColorMod.Take(M, req.OMap)
|
||||||
player.TeLog("ReqGuessColorTake", map[string]interface{}{
|
player.TeLog("ReqGuessColorTake", map[string]interface{}{
|
||||||
"map": req.Map.Map,
|
"map": req.Map.Map,
|
||||||
"o_map": req.OMap,
|
"o_map": req.OMap,
|
||||||
@ -5343,10 +5347,10 @@ func ReqCatnipInvite(player *Player, buf []byte) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
ActivityId := GetActivityId(player, activity.ACT_TYPE_MINING)
|
ActivityId := GetActivityId(player, activity.ACT_TYPE_CATNIP)
|
||||||
ActivityInfo := GetActivityInfo(player, ActivityId)
|
ActivityInfo := GetActivityInfo(player, ActivityId)
|
||||||
CatnipMod := player.PlayMod.getCatnipMod()
|
CatnipMod := player.PlayMod.getCatnipMod()
|
||||||
err = CatnipMod.Invite(int(req.Id), int(req.Uid))
|
err = CatnipMod.Invite(int(req.Uid), int(req.Id))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
player.SendErrClienRes(&msg.ResCatnipInvite{
|
player.SendErrClienRes(&msg.ResCatnipInvite{
|
||||||
Code: msg.RES_CODE_FAIL,
|
Code: msg.RES_CODE_FAIL,
|
||||||
@ -5354,7 +5358,7 @@ func ReqCatnipInvite(player *Player, buf []byte) error {
|
|||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
player.TeLog("catnip_invite", map[string]interface{}{
|
player.TeLog("cats_garden_invite", map[string]interface{}{
|
||||||
"Id": int(req.Id),
|
"Id": int(req.Id),
|
||||||
})
|
})
|
||||||
FriendMgrSend(&MsqMod.Msg{
|
FriendMgrSend(&MsqMod.Msg{
|
||||||
@ -5368,7 +5372,7 @@ func ReqCatnipInvite(player *Player, buf []byte) error {
|
|||||||
},
|
},
|
||||||
SendT: GoUtil.Now(),
|
SendT: GoUtil.Now(),
|
||||||
})
|
})
|
||||||
|
player.CatnipBackData()
|
||||||
player.PlayMod.save()
|
player.PlayMod.save()
|
||||||
player.PushClientRes(&msg.ResCatnipInvite{
|
player.PushClientRes(&msg.ResCatnipInvite{
|
||||||
Code: msg.RES_CODE_SUCCESS,
|
Code: msg.RES_CODE_SUCCESS,
|
||||||
@ -5383,8 +5387,8 @@ func ReqCatnipAgree(player *Player, buf []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
CatnipMod := player.PlayMod.getCatnipMod()
|
CatnipMod := player.PlayMod.getCatnipMod()
|
||||||
ActivityId := GetActivityId(player, activity.ACT_TYPE_MINING)
|
ActivityId := GetActivityId(player, activity.ACT_TYPE_CATNIP)
|
||||||
UserList, err := CatnipMod.Agree(int(req.Id), int(req.Uid))
|
_, err = CatnipMod.Agree(int(req.Id), int(req.Uid))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
player.SendErrClienRes(&msg.ResCatnipAgree{
|
player.SendErrClienRes(&msg.ResCatnipAgree{
|
||||||
Code: msg.RES_CODE_FAIL,
|
Code: msg.RES_CODE_FAIL,
|
||||||
@ -5400,7 +5404,7 @@ func ReqCatnipAgree(player *Player, buf []byte) error {
|
|||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
player.TeLog("catnip_agree", map[string]interface{}{
|
player.TeLog("cats_garden_accept_invite", map[string]interface{}{
|
||||||
"Id": int(req.Id),
|
"Id": int(req.Id),
|
||||||
})
|
})
|
||||||
FriendMgrSend(&MsqMod.Msg{
|
FriendMgrSend(&MsqMod.Msg{
|
||||||
@ -5413,19 +5417,6 @@ func ReqCatnipAgree(player *Player, buf []byte) error {
|
|||||||
},
|
},
|
||||||
SendT: GoUtil.Now(),
|
SendT: GoUtil.Now(),
|
||||||
})
|
})
|
||||||
|
|
||||||
for _, v := range UserList {
|
|
||||||
FriendMgrSend(&MsqMod.Msg{
|
|
||||||
From: int(player.M_DwUin),
|
|
||||||
To: int(v),
|
|
||||||
Type: MsqMod.HANDLE_TYPE_CATNIP_AGREE,
|
|
||||||
Extra: CatnipMsg{
|
|
||||||
ActivityId: ActivityId,
|
|
||||||
GameId: int(req.Id),
|
|
||||||
},
|
|
||||||
SendT: GoUtil.Now(),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
player.CatnipBackData()
|
player.CatnipBackData()
|
||||||
player.PlayMod.save()
|
player.PlayMod.save()
|
||||||
player.PushClientRes(&msg.ResCatnipAgree{
|
player.PushClientRes(&msg.ResCatnipAgree{
|
||||||
@ -5491,11 +5482,12 @@ func ReqCatnipPlay(player *Player, buf []byte) error {
|
|||||||
Msg: err.Error(),
|
Msg: err.Error(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
player.TeLog("catnip_play", map[string]interface{}{
|
player.TeLog("cats_garden_expend_token", map[string]interface{}{
|
||||||
"Id": int(req.Id),
|
"Id": int(req.Id),
|
||||||
"Growth": Growth,
|
"Growth": Growth,
|
||||||
"PartnerId": PartnerId,
|
"multiple": CatnipMod.GetMultiple(),
|
||||||
"Items": Items,
|
"expend_num": ItemCost[0].Num,
|
||||||
|
"get_award": Items,
|
||||||
})
|
})
|
||||||
if Growth > 0 {
|
if Growth > 0 {
|
||||||
player.CatnipGrowthMsg(PartnerId, int(req.Id), Growth)
|
player.CatnipGrowthMsg(PartnerId, int(req.Id), Growth)
|
||||||
@ -5517,7 +5509,7 @@ func ReqCatnipReward(player *Player, buf []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
CatnipMod := player.PlayMod.getCatnipMod()
|
CatnipMod := player.PlayMod.getCatnipMod()
|
||||||
Items, err := CatnipMod.Reward(int(req.Id), int(req.Progress))
|
Items, GameInfo, err := CatnipMod.Reward(int(req.Id), int(req.Progress))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
player.SendErrClienRes(&msg.ResCatnipReward{
|
player.SendErrClienRes(&msg.ResCatnipReward{
|
||||||
Code: msg.RES_CODE_FAIL,
|
Code: msg.RES_CODE_FAIL,
|
||||||
@ -5533,10 +5525,12 @@ func ReqCatnipReward(player *Player, buf []byte) error {
|
|||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
player.TeLog("catnip_reward", map[string]interface{}{
|
player.TeLog("cats_garden_stage_ewards", map[string]interface{}{
|
||||||
"Id": int(req.Id),
|
"Id": int(req.Id),
|
||||||
"Progress": int(req.Progress),
|
"Progress": int(req.Progress),
|
||||||
"Items": Items,
|
"friends_ID": GameInfo.Partner,
|
||||||
|
"friends_get_num": GameInfo.PartnerAdd,
|
||||||
|
"user_get_num": GameInfo.Progress - GameInfo.PartnerAdd,
|
||||||
})
|
})
|
||||||
player.CatnipBackData()
|
player.CatnipBackData()
|
||||||
player.PlayMod.save()
|
player.PlayMod.save()
|
||||||
@ -5573,6 +5567,7 @@ func ReqCatnipGrandReward(player *Player, buf []byte) error {
|
|||||||
player.TeLog("catnip_grand_reward", map[string]interface{}{
|
player.TeLog("catnip_grand_reward", map[string]interface{}{
|
||||||
"Items": Items,
|
"Items": Items,
|
||||||
})
|
})
|
||||||
|
player.CatnipBackData()
|
||||||
player.PlayMod.save()
|
player.PlayMod.save()
|
||||||
player.PushClientRes(&msg.ResCatnipGrandReward{
|
player.PushClientRes(&msg.ResCatnipGrandReward{
|
||||||
Code: msg.RES_CODE_SUCCESS,
|
Code: msg.RES_CODE_SUCCESS,
|
||||||
@ -5604,10 +5599,11 @@ func ReqCatnipRefuse(player *Player, buf []byte) error {
|
|||||||
Type: MsqMod.HANDLE_TYPE_CATNIP_REFUSE,
|
Type: MsqMod.HANDLE_TYPE_CATNIP_REFUSE,
|
||||||
SendT: GoUtil.Now(),
|
SendT: GoUtil.Now(),
|
||||||
Extra: CatnipMsg{
|
Extra: CatnipMsg{
|
||||||
ActivityId: GetActivityId(player, activity.ACT_TYPE_MINING),
|
ActivityId: GetActivityId(player, activity.ACT_TYPE_CATNIP),
|
||||||
GameId: int(req.Id),
|
GameId: int(req.Id),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
player.CatnipBackData()
|
||||||
player.PlayMod.save()
|
player.PlayMod.save()
|
||||||
player.PushClientRes(&msg.ResCatnipRefuse{
|
player.PushClientRes(&msg.ResCatnipRefuse{
|
||||||
Code: msg.RES_CODE_SUCCESS,
|
Code: msg.RES_CODE_SUCCESS,
|
||||||
|
|||||||
@ -48,6 +48,9 @@ func (f *VarMgr) Init() {
|
|||||||
if f.data.(*VarData).UserVar == nil {
|
if f.data.(*VarData).UserVar == nil {
|
||||||
f.data.(*VarData).UserVar = make(map[string]*VarUserData)
|
f.data.(*VarData).UserVar = make(map[string]*VarUserData)
|
||||||
}
|
}
|
||||||
|
if f.data.(*VarData).VarExpire == nil {
|
||||||
|
f.data.(*VarData).VarExpire = make(map[string]*VarExpireData)
|
||||||
|
}
|
||||||
if f.getData().ZeroTime == GoUtil.ZeroTimestamp() {
|
if f.getData().ZeroTime == GoUtil.ZeroTimestamp() {
|
||||||
f.ZeroUpdate(&msg.Msg{})
|
f.ZeroUpdate(&msg.Msg{})
|
||||||
}
|
}
|
||||||
@ -86,18 +89,21 @@ func (f *VarMgr) SetCatnipPartner(m *msg.Msg) (interface{}, error) {
|
|||||||
MyUid := GoUtil.Int(Param["uid"])
|
MyUid := GoUtil.Int(Param["uid"])
|
||||||
CatnipGameId := GoUtil.Int(Param["game_id"])
|
CatnipGameId := GoUtil.Int(Param["game_id"])
|
||||||
CatnipPartnerId := GoUtil.Int(Param["partner_uid"])
|
CatnipPartnerId := GoUtil.Int(Param["partner_uid"])
|
||||||
myKey := fmt.Sprintf("catnip_partner_%d_%d", MyUid, CatnipGameId)
|
myKey := fmt.Sprintf("catnip_partner_%d", MyUid)
|
||||||
key := fmt.Sprintf("catnip_partner_%d_%d", CatnipPartnerId, CatnipGameId)
|
key := fmt.Sprintf("catnip_partner_%d", CatnipPartnerId)
|
||||||
PartnerInfo := f.GetExpireVar(key)
|
OtherPartnerInfo := f.GetExpireVar(key)
|
||||||
if PartnerInfo.D != nil {
|
MyPartnerInfo := f.GetExpireVar(myKey)
|
||||||
return nil, fmt.Errorf("catnip partner already set for uid %d in game %d", CatnipPartnerId, CatnipGameId)
|
MyOfPartnerList := GoUtil.IntSlice(MyPartnerInfo.D)
|
||||||
|
OtherOfPartnerList := GoUtil.IntSlice(OtherPartnerInfo.D)
|
||||||
|
if len(MyOfPartnerList) > 4 || len(OtherOfPartnerList) > 4 {
|
||||||
|
return nil, fmt.Errorf("catnip partner already full for uid %d in game %d", CatnipPartnerId, CatnipGameId)
|
||||||
}
|
}
|
||||||
f.SetExpireVar(key, &VarExpireData{
|
f.SetExpireVar(key, &VarExpireData{
|
||||||
D: MyUid,
|
D: append(OtherOfPartnerList, MyUid),
|
||||||
T: m.End,
|
T: m.End,
|
||||||
})
|
})
|
||||||
f.SetExpireVar(myKey, &VarExpireData{
|
f.SetExpireVar(myKey, &VarExpireData{
|
||||||
D: CatnipPartnerId,
|
D: append(MyOfPartnerList, CatnipPartnerId),
|
||||||
T: m.End,
|
T: m.End,
|
||||||
})
|
})
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
|||||||
@ -10,8 +10,10 @@ import (
|
|||||||
type CatnipMod struct {
|
type CatnipMod struct {
|
||||||
Id int
|
Id int
|
||||||
Game map[int]*CatnipGame
|
Game map[int]*CatnipGame
|
||||||
Mul int // 倍数
|
Mul int // 倍数
|
||||||
IsGetGrandReward bool // 是否领取过大丰收奖励
|
IsGetGrandReward bool // 是否领取过大丰收奖励
|
||||||
|
InviteList map[int]*InviteInfo // 邀请列表,key: 邀请者ID, value: 被邀请者ID
|
||||||
|
BeInvitedList map[int]*InviteInfo // 被邀请列表,key: 被邀请者ID, value: 邀请者ID
|
||||||
}
|
}
|
||||||
|
|
||||||
type InviteInfo struct {
|
type InviteInfo struct {
|
||||||
@ -20,15 +22,14 @@ type InviteInfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CatnipGame struct {
|
type CatnipGame struct {
|
||||||
Id int // 游戏ID
|
Id int // 游戏ID
|
||||||
Partner int // 伙伴ID
|
Partner int // 伙伴ID
|
||||||
Progress int // 进度
|
Progress int // 进度
|
||||||
PartnerAdd int // 伙伴贡献
|
PartnerAdd int // 伙伴贡献
|
||||||
Reward []int // 已领取阶段奖励
|
Reward []int // 已领取阶段奖励
|
||||||
Status int // 0: Not Started, 1: In Progress, 2: Completed
|
Status int // 0: Not Started, 1: In Progress, 2: Completed
|
||||||
InviteList map[int]*InviteInfo // 邀请列表,key: 邀请者ID, value: 被邀请者ID
|
|
||||||
BeInvitedList map[int]*InviteInfo // 被邀请列表,key: 被邀请者ID, value: 邀请者ID
|
EmojiId int // 表情ID
|
||||||
EmojiId int // 表情ID
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -43,6 +44,12 @@ func (c *CatnipMod) InitData() {
|
|||||||
if c.Game == nil {
|
if c.Game == nil {
|
||||||
c.Game = make(map[int]*CatnipGame)
|
c.Game = make(map[int]*CatnipGame)
|
||||||
}
|
}
|
||||||
|
if c.InviteList == nil {
|
||||||
|
c.InviteList = make(map[int]*InviteInfo)
|
||||||
|
}
|
||||||
|
if c.BeInvitedList == nil {
|
||||||
|
c.BeInvitedList = make(map[int]*InviteInfo)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CatnipMod) Login(Id int) int {
|
func (c *CatnipMod) Login(Id int) int {
|
||||||
@ -59,14 +66,14 @@ func (c *CatnipMod) Login(Id int) int {
|
|||||||
c.Game = make(map[int]*CatnipGame)
|
c.Game = make(map[int]*CatnipGame)
|
||||||
c.Mul = 1 // Default multiplier
|
c.Mul = 1 // Default multiplier
|
||||||
GameNum := catnipCfg.GetGameNum(c.Id) // Assuming 1 is the default game ID
|
GameNum := catnipCfg.GetGameNum(c.Id) // Assuming 1 is the default game ID
|
||||||
|
c.InviteList = make(map[int]*InviteInfo)
|
||||||
|
c.BeInvitedList = make(map[int]*InviteInfo)
|
||||||
for i := 1; i <= GameNum; i++ {
|
for i := 1; i <= GameNum; i++ {
|
||||||
c.Game[i] = &CatnipGame{
|
c.Game[i] = &CatnipGame{
|
||||||
Id: i,
|
Id: i,
|
||||||
Partner: 0, // No partner initially
|
Partner: 0, // No partner initially
|
||||||
Progress: 0, // Initial progress
|
Progress: 0, // Initial progress
|
||||||
Status: GAME_STATUS_IDLE, // Not started
|
Status: GAME_STATUS_IDLE, // Not started
|
||||||
InviteList: make(map[int]*InviteInfo), // Initialize invite list
|
|
||||||
BeInvitedList: make(map[int]*InviteInfo), // Initialize be invited list
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return c.Id
|
return c.Id
|
||||||
@ -76,75 +83,75 @@ func (c *CatnipMod) ZeroUpdate(Id int) {
|
|||||||
c.Login(Id)
|
c.Login(Id)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CatnipMod) Invite(Id, Uid int) error {
|
func (c *CatnipMod) Invite(Uid, Id int) error {
|
||||||
GameInfo, ok := c.Game[Id]
|
if c.InviteList[Uid] != nil {
|
||||||
if !ok {
|
return fmt.Errorf("user with ID %d is already invited", Uid)
|
||||||
return fmt.Errorf("game with ID %d does not exist", Id)
|
|
||||||
}
|
|
||||||
if GameInfo.Status != 0 {
|
|
||||||
return fmt.Errorf("game with ID %d is already in progress or completed", Id)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if GameInfo.InviteList[Uid] != nil {
|
c.InviteList[Uid] = &InviteInfo{
|
||||||
return fmt.Errorf("user with ID %d is already invited to game ID %d", Uid, Id)
|
InviteId: Id,
|
||||||
}
|
|
||||||
|
|
||||||
GameInfo.InviteList[Uid] = &InviteInfo{
|
|
||||||
InviteId: Uid,
|
|
||||||
Time: GoUtil.Now(),
|
Time: GoUtil.Now(),
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CatnipMod) BeInvited(Id, Uid int, Time int64) error {
|
func (c *CatnipMod) BeInvited(Uid int, Time int64) error {
|
||||||
GameInfo, ok := c.Game[Id]
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("game with ID %d does not exist", Id)
|
|
||||||
}
|
|
||||||
if GameInfo.Status != GAME_STATUS_IDLE {
|
|
||||||
return fmt.Errorf("game with ID %d is already in progress or completed", Id)
|
|
||||||
}
|
|
||||||
// Check if the user is already invited
|
// Check if the user is already invited
|
||||||
invite := GameInfo.BeInvitedList[Uid]
|
invite := c.BeInvitedList[Uid]
|
||||||
if invite != nil && invite.InviteId == Id {
|
if invite != nil {
|
||||||
return fmt.Errorf("user with ID %d has already been invited to game ID %d", Uid, Id)
|
return fmt.Errorf("user with ID %d has already been invited ", Uid)
|
||||||
}
|
}
|
||||||
GameInfo.BeInvitedList[Uid] = &InviteInfo{
|
c.BeInvitedList[Uid] = &InviteInfo{
|
||||||
InviteId: Id,
|
InviteId: Uid,
|
||||||
Time: Time,
|
Time: Time,
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CatnipMod) Agree(Id, Uid int) ([]int, error) {
|
func (c *CatnipMod) Agree(Id, Uid int) ([]int, error) {
|
||||||
GameInfo, ok := c.Game[Id]
|
_, exists := c.BeInvitedList[Uid]
|
||||||
if !ok {
|
|
||||||
return nil, fmt.Errorf("game with ID %d does not exist", Id)
|
|
||||||
}
|
|
||||||
if GameInfo.Status != GAME_STATUS_IDLE {
|
|
||||||
return nil, fmt.Errorf("game with ID %d is already in progress or completed", Id)
|
|
||||||
}
|
|
||||||
// Check if the user is in the invite list
|
|
||||||
_, exists := GameInfo.InviteList[Uid]
|
|
||||||
if !exists {
|
if !exists {
|
||||||
return nil, fmt.Errorf("user with ID %d is not invited to game ID %d", Uid, Id)
|
return nil, fmt.Errorf("user with ID %d is not invited to game ID %d", Uid, Id)
|
||||||
}
|
}
|
||||||
// Remove the invite after agreeing
|
// Remove the invite after agreeing
|
||||||
delete(GameInfo.InviteList, Uid)
|
|
||||||
GameInfo.Partner = Uid // Set the partner for the game
|
delete(c.BeInvitedList, Uid)
|
||||||
GameInfo.Status = GAME_STATUS_COMPLETED // Set the game status to completed
|
for _, GameInfo := range c.Game {
|
||||||
|
if GameInfo.Partner == 0 {
|
||||||
|
GameInfo.Partner = Uid
|
||||||
|
GameInfo.Status = GAME_STATUS_IN_PROGRESS
|
||||||
|
return []int{}, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return []int{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CatnipMod) BeAgree(Id, Uid int) ([]int, error) {
|
||||||
|
info, exists := c.InviteList[Uid]
|
||||||
|
if !exists {
|
||||||
|
return nil, fmt.Errorf("user with ID %d is not invited to game ID %d", Uid, Id)
|
||||||
|
}
|
||||||
|
// Remove the invite after agreeing
|
||||||
|
GameInfo := c.Game[info.InviteId]
|
||||||
|
if GameInfo.Partner == 0 {
|
||||||
|
GameInfo.Partner = Uid
|
||||||
|
GameInfo.Status = GAME_STATUS_IN_PROGRESS
|
||||||
|
delete(c.InviteList, Uid)
|
||||||
|
return []int{}, nil
|
||||||
|
}
|
||||||
|
delete(c.InviteList, Uid)
|
||||||
|
for _, GameInfo := range c.Game {
|
||||||
|
if GameInfo.Partner == 0 {
|
||||||
|
GameInfo.Partner = Uid
|
||||||
|
GameInfo.Status = GAME_STATUS_IN_PROGRESS
|
||||||
|
return []int{}, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
return []int{}, nil
|
return []int{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CatnipMod) DelInvited(Id, Uid int) error {
|
func (c *CatnipMod) DelInvited(Id, Uid int) error {
|
||||||
GameInfo, ok := c.Game[Id]
|
delete(c.InviteList, Uid)
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("game with ID %d does not exist", Id)
|
|
||||||
}
|
|
||||||
if GameInfo.Status != GAME_STATUS_IDLE {
|
|
||||||
return fmt.Errorf("game with ID %d is already in progress or completed", Id)
|
|
||||||
}
|
|
||||||
delete(GameInfo.InviteList, Uid)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,14 +161,7 @@ func (c *CatnipMod) Multiply(Mul int) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *CatnipMod) Refuse(Id, Uid int) error {
|
func (c *CatnipMod) Refuse(Id, Uid int) error {
|
||||||
GameInfo, ok := c.Game[Id]
|
delete(c.BeInvitedList, Uid)
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("game with ID %d does not exist", Id)
|
|
||||||
}
|
|
||||||
if GameInfo.Status != GAME_STATUS_IDLE {
|
|
||||||
return fmt.Errorf("game with ID %d is already in progress or completed", Id)
|
|
||||||
}
|
|
||||||
delete(GameInfo.BeInvitedList, Uid)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,19 +179,19 @@ func (c *CatnipMod) Play(Id int) (int, int, int, []*item.Item, []*item.Item, err
|
|||||||
return Id, Growth, GameInfo.Partner, Items, ItemCost, nil
|
return Id, Growth, GameInfo.Partner, Items, ItemCost, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CatnipMod) Reward(Id, Progress int) ([]*item.Item, error) {
|
func (c *CatnipMod) Reward(Id, Progress int) ([]*item.Item, *CatnipGame, error) {
|
||||||
GameInfo, ok := c.Game[Id]
|
GameInfo, ok := c.Game[Id]
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("game with Progress %d does not exist", Id)
|
return nil, nil, fmt.Errorf("game with Progress %d does not exist", Id)
|
||||||
}
|
}
|
||||||
if GameInfo.Progress < Progress {
|
if GameInfo.Progress < Progress {
|
||||||
return nil, fmt.Errorf("game with ID %d has not reached the required progress %d", Id, Progress)
|
return nil, nil, fmt.Errorf("game with ID %d has not reached the required progress %d", Id, Progress)
|
||||||
}
|
}
|
||||||
if GoUtil.InArray(Progress, GameInfo.Reward) {
|
if GoUtil.InArray(Progress, GameInfo.Reward) {
|
||||||
return nil, fmt.Errorf("reward for progress %d has already been claimed in game ID %d", Progress, Id)
|
return nil, nil, fmt.Errorf("reward for progress %d has already been claimed in game ID %d", Progress, Id)
|
||||||
}
|
}
|
||||||
GameInfo.Reward = append(GameInfo.Reward, Progress)
|
GameInfo.Reward = append(GameInfo.Reward, Progress)
|
||||||
return catnipCfg.GetProgressReward(c.Id, Progress), nil
|
return catnipCfg.GetProgressReward(c.Id, Progress), GameInfo, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CatnipMod) GrandReward() ([]*item.Item, error) {
|
func (c *CatnipMod) GrandReward() ([]*item.Item, error) {
|
||||||
@ -229,3 +229,7 @@ func (c *CatnipMod) SetEmoji(Id, EmojiId int) {
|
|||||||
// Here we can set the emoji for the game. This is a placeholder implementation.
|
// Here we can set the emoji for the game. This is a placeholder implementation.
|
||||||
GameInfo.EmojiId = EmojiId
|
GameInfo.EmojiId = EmojiId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *CatnipMod) GetMultiple() int {
|
||||||
|
return c.Mul
|
||||||
|
}
|
||||||
|
|||||||
@ -89,9 +89,11 @@ func (g *GuessColorMod) FirstIn() []*item.Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *GuessColorMod) Take(Map map[int32]int32, OMap map[int32]int32) {
|
func (g *GuessColorMod) Take(Map map[int32]int32, OMap map[int32]int32) {
|
||||||
g.MapList = append(g.MapList, Map)
|
if len(Map) > 0 {
|
||||||
|
g.MapList = append(g.MapList, Map)
|
||||||
|
g.Guess++
|
||||||
|
}
|
||||||
g.OMap = OMap
|
g.OMap = OMap
|
||||||
g.Guess++
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *GuessColorMod) GetLoseItem() []*item.Item {
|
func (g *GuessColorMod) GetLoseItem() []*item.Item {
|
||||||
|
|||||||
@ -25867,12 +25867,13 @@ func (*ReqCatnip) Descriptor() ([]byte, []int) {
|
|||||||
|
|
||||||
type ResCatnip struct {
|
type ResCatnip struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 活动id
|
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 活动id
|
||||||
Status int32 `protobuf:"varint,2,opt,name=Status,proto3" json:"Status,omitempty"` // 0 未开始 1 进行中 2 已结束
|
Status int32 `protobuf:"varint,2,opt,name=Status,proto3" json:"Status,omitempty"` // 0 未开始 1 进行中 2 已结束
|
||||||
EndTime int32 `protobuf:"varint,3,opt,name=EndTime,proto3" json:"EndTime,omitempty"` // 结束时间
|
EndTime int32 `protobuf:"varint,3,opt,name=EndTime,proto3" json:"EndTime,omitempty"` // 结束时间
|
||||||
Template int32 `protobuf:"varint,4,opt,name=Template,proto3" json:"Template,omitempty"` // 模板
|
Template int32 `protobuf:"varint,4,opt,name=Template,proto3" json:"Template,omitempty"` // 模板
|
||||||
GameList []*CatnipGame `protobuf:"bytes,5,rep,name=GameList,proto3" json:"GameList,omitempty"` // 小游戏列表
|
GameList []*CatnipGame `protobuf:"bytes,5,rep,name=GameList,proto3" json:"GameList,omitempty"` // 小游戏列表
|
||||||
Multiply int32 `protobuf:"varint,6,opt,name=Multiply,proto3" json:"Multiply,omitempty"` // 倍数
|
Multiply int32 `protobuf:"varint,6,opt,name=Multiply,proto3" json:"Multiply,omitempty"` // 倍数
|
||||||
|
FriendList []*CatnipInvite `protobuf:"bytes,7,rep,name=FriendList,proto3" json:"FriendList,omitempty"` // 好友列表
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@ -25949,17 +25950,22 @@ func (x *ResCatnip) GetMultiply() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *ResCatnip) GetFriendList() []*CatnipInvite {
|
||||||
|
if x != nil {
|
||||||
|
return x.FriendList
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// 小游戏信息
|
// 小游戏信息
|
||||||
type CatnipGame struct {
|
type CatnipGame struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 猫草id
|
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 猫草id
|
||||||
Status int32 `protobuf:"varint,2,opt,name=Status,proto3" json:"Status,omitempty"` // 0 未开始 1 进行中 2 已结束
|
Status int32 `protobuf:"varint,2,opt,name=Status,proto3" json:"Status,omitempty"` // 0 未开始 1 进行中 2 已结束
|
||||||
Progress int32 `protobuf:"varint,3,opt,name=Progress,proto3" json:"Progress,omitempty"` // 进度
|
Progress int32 `protobuf:"varint,3,opt,name=Progress,proto3" json:"Progress,omitempty"` // 进度
|
||||||
Reward []int32 `protobuf:"varint,4,rep,packed,name=Reward,proto3" json:"Reward,omitempty"` // 已领取进度奖励列表 [100,150,200]
|
Reward []int32 `protobuf:"varint,4,rep,packed,name=Reward,proto3" json:"Reward,omitempty"` // 已领取进度奖励列表 [100,150,200]
|
||||||
Partner *ResPlayerSimple `protobuf:"bytes,5,opt,name=Partner,proto3" json:"Partner,omitempty"` // 伙伴
|
Partner *ResPlayerSimple `protobuf:"bytes,5,opt,name=Partner,proto3" json:"Partner,omitempty"` // 伙伴
|
||||||
InviteList []*CatnipInvite `protobuf:"bytes,6,rep,name=InviteList,proto3" json:"InviteList,omitempty"` // 邀请列表
|
Emoji int32 `protobuf:"varint,6,opt,name=Emoji,proto3" json:"Emoji,omitempty"` // 表情id
|
||||||
BeInviteList []*CatnipInvite `protobuf:"bytes,7,rep,name=BeInviteList,proto3" json:"BeInviteList,omitempty"` // 被邀请列表
|
|
||||||
Emoji int32 `protobuf:"varint,8,opt,name=Emoji,proto3" json:"Emoji,omitempty"` // 表情id
|
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@ -26029,20 +26035,6 @@ func (x *CatnipGame) GetPartner() *ResPlayerSimple {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CatnipGame) GetInviteList() []*CatnipInvite {
|
|
||||||
if x != nil {
|
|
||||||
return x.InviteList
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CatnipGame) GetBeInviteList() []*CatnipInvite {
|
|
||||||
if x != nil {
|
|
||||||
return x.BeInviteList
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CatnipGame) GetEmoji() int32 {
|
func (x *CatnipGame) GetEmoji() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Emoji
|
return x.Emoji
|
||||||
@ -26054,6 +26046,7 @@ type CatnipInvite struct {
|
|||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Uid int64 `protobuf:"varint,1,opt,name=Uid,proto3" json:"Uid,omitempty"` // 好友id
|
Uid int64 `protobuf:"varint,1,opt,name=Uid,proto3" json:"Uid,omitempty"` // 好友id
|
||||||
Time int64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"` // 邀请时间
|
Time int64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"` // 邀请时间
|
||||||
|
Type int32 `protobuf:"varint,3,opt,name=Type,proto3" json:"Type,omitempty"` // 状态 0 可以邀请,1 已邀请 2 同意 3 已满员
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@ -26102,6 +26095,13 @@ func (x *CatnipInvite) GetTime() int64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *CatnipInvite) GetType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Type
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
// 邀请好友
|
// 邀请好友
|
||||||
type ReqCatnipInvite struct {
|
type ReqCatnipInvite struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
@ -29255,29 +29255,29 @@ const file_proto_Gameapi_proto_rawDesc = "" +
|
|||||||
"ResCollect\x12&\n" +
|
"ResCollect\x12&\n" +
|
||||||
"\x04Code\x18\x01 \x01(\x0e2\x12.tutorial.RES_CODER\x04Code\x12\x10\n" +
|
"\x04Code\x18\x01 \x01(\x0e2\x12.tutorial.RES_CODER\x04Code\x12\x10\n" +
|
||||||
"\x03Msg\x18\x02 \x01(\tR\x03Msg\"\v\n" +
|
"\x03Msg\x18\x02 \x01(\tR\x03Msg\"\v\n" +
|
||||||
"\tReqCatnip\"\xb7\x01\n" +
|
"\tReqCatnip\"\xef\x01\n" +
|
||||||
"\tResCatnip\x12\x0e\n" +
|
"\tResCatnip\x12\x0e\n" +
|
||||||
"\x02Id\x18\x01 \x01(\x05R\x02Id\x12\x16\n" +
|
"\x02Id\x18\x01 \x01(\x05R\x02Id\x12\x16\n" +
|
||||||
"\x06Status\x18\x02 \x01(\x05R\x06Status\x12\x18\n" +
|
"\x06Status\x18\x02 \x01(\x05R\x06Status\x12\x18\n" +
|
||||||
"\aEndTime\x18\x03 \x01(\x05R\aEndTime\x12\x1a\n" +
|
"\aEndTime\x18\x03 \x01(\x05R\aEndTime\x12\x1a\n" +
|
||||||
"\bTemplate\x18\x04 \x01(\x05R\bTemplate\x120\n" +
|
"\bTemplate\x18\x04 \x01(\x05R\bTemplate\x120\n" +
|
||||||
"\bGameList\x18\x05 \x03(\v2\x14.tutorial.CatnipGameR\bGameList\x12\x1a\n" +
|
"\bGameList\x18\x05 \x03(\v2\x14.tutorial.CatnipGameR\bGameList\x12\x1a\n" +
|
||||||
"\bMultiply\x18\x06 \x01(\x05R\bMultiply\"\xa7\x02\n" +
|
"\bMultiply\x18\x06 \x01(\x05R\bMultiply\x126\n" +
|
||||||
|
"\n" +
|
||||||
|
"FriendList\x18\a \x03(\v2\x16.tutorial.CatnipInviteR\n" +
|
||||||
|
"FriendList\"\xb3\x01\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"CatnipGame\x12\x0e\n" +
|
"CatnipGame\x12\x0e\n" +
|
||||||
"\x02Id\x18\x01 \x01(\x05R\x02Id\x12\x16\n" +
|
"\x02Id\x18\x01 \x01(\x05R\x02Id\x12\x16\n" +
|
||||||
"\x06Status\x18\x02 \x01(\x05R\x06Status\x12\x1a\n" +
|
"\x06Status\x18\x02 \x01(\x05R\x06Status\x12\x1a\n" +
|
||||||
"\bProgress\x18\x03 \x01(\x05R\bProgress\x12\x16\n" +
|
"\bProgress\x18\x03 \x01(\x05R\bProgress\x12\x16\n" +
|
||||||
"\x06Reward\x18\x04 \x03(\x05R\x06Reward\x123\n" +
|
"\x06Reward\x18\x04 \x03(\x05R\x06Reward\x123\n" +
|
||||||
"\aPartner\x18\x05 \x01(\v2\x19.tutorial.ResPlayerSimpleR\aPartner\x126\n" +
|
"\aPartner\x18\x05 \x01(\v2\x19.tutorial.ResPlayerSimpleR\aPartner\x12\x14\n" +
|
||||||
"\n" +
|
"\x05Emoji\x18\x06 \x01(\x05R\x05Emoji\"H\n" +
|
||||||
"InviteList\x18\x06 \x03(\v2\x16.tutorial.CatnipInviteR\n" +
|
|
||||||
"InviteList\x12:\n" +
|
|
||||||
"\fBeInviteList\x18\a \x03(\v2\x16.tutorial.CatnipInviteR\fBeInviteList\x12\x14\n" +
|
|
||||||
"\x05Emoji\x18\b \x01(\x05R\x05Emoji\"4\n" +
|
|
||||||
"\fCatnipInvite\x12\x10\n" +
|
"\fCatnipInvite\x12\x10\n" +
|
||||||
"\x03Uid\x18\x01 \x01(\x03R\x03Uid\x12\x12\n" +
|
"\x03Uid\x18\x01 \x01(\x03R\x03Uid\x12\x12\n" +
|
||||||
"\x04Time\x18\x02 \x01(\x03R\x04Time\"3\n" +
|
"\x04Time\x18\x02 \x01(\x03R\x04Time\x12\x12\n" +
|
||||||
|
"\x04Type\x18\x03 \x01(\x05R\x04Type\"3\n" +
|
||||||
"\x0fReqCatnipInvite\x12\x0e\n" +
|
"\x0fReqCatnipInvite\x12\x0e\n" +
|
||||||
"\x02Id\x18\x01 \x01(\x05R\x02Id\x12\x10\n" +
|
"\x02Id\x18\x01 \x01(\x05R\x02Id\x12\x10\n" +
|
||||||
"\x03Uid\x18\x02 \x01(\x03R\x03Uid\"K\n" +
|
"\x03Uid\x18\x02 \x01(\x03R\x03Uid\"K\n" +
|
||||||
@ -30422,38 +30422,37 @@ var file_proto_Gameapi_proto_depIdxs = []int32{
|
|||||||
168, // 272: tutorial.CollectItem.Items:type_name -> tutorial.ItemInfo
|
168, // 272: tutorial.CollectItem.Items:type_name -> tutorial.ItemInfo
|
||||||
2, // 273: tutorial.ResCollect.Code:type_name -> tutorial.RES_CODE
|
2, // 273: tutorial.ResCollect.Code:type_name -> tutorial.RES_CODE
|
||||||
459, // 274: tutorial.ResCatnip.GameList:type_name -> tutorial.CatnipGame
|
459, // 274: tutorial.ResCatnip.GameList:type_name -> tutorial.CatnipGame
|
||||||
231, // 275: tutorial.CatnipGame.Partner:type_name -> tutorial.ResPlayerSimple
|
460, // 275: tutorial.ResCatnip.FriendList:type_name -> tutorial.CatnipInvite
|
||||||
460, // 276: tutorial.CatnipGame.InviteList:type_name -> tutorial.CatnipInvite
|
231, // 276: tutorial.CatnipGame.Partner:type_name -> tutorial.ResPlayerSimple
|
||||||
460, // 277: tutorial.CatnipGame.BeInviteList:type_name -> tutorial.CatnipInvite
|
2, // 277: tutorial.ResCatnipInvite.Code:type_name -> tutorial.RES_CODE
|
||||||
2, // 278: tutorial.ResCatnipInvite.Code:type_name -> tutorial.RES_CODE
|
2, // 278: tutorial.ResCatnipAgree.Code:type_name -> tutorial.RES_CODE
|
||||||
2, // 279: tutorial.ResCatnipAgree.Code:type_name -> tutorial.RES_CODE
|
2, // 279: tutorial.ResCatnipRefuse.Code:type_name -> tutorial.RES_CODE
|
||||||
2, // 280: tutorial.ResCatnipRefuse.Code:type_name -> tutorial.RES_CODE
|
2, // 280: tutorial.ResCatnipMultiply.Code:type_name -> tutorial.RES_CODE
|
||||||
2, // 281: tutorial.ResCatnipMultiply.Code:type_name -> tutorial.RES_CODE
|
2, // 281: tutorial.ResCatnipPlay.Code:type_name -> tutorial.RES_CODE
|
||||||
2, // 282: tutorial.ResCatnipPlay.Code:type_name -> tutorial.RES_CODE
|
2, // 282: tutorial.ResCatnipReward.Code:type_name -> tutorial.RES_CODE
|
||||||
2, // 283: tutorial.ResCatnipReward.Code:type_name -> tutorial.RES_CODE
|
2, // 283: tutorial.ResCatnipGrandReward.Code:type_name -> tutorial.RES_CODE
|
||||||
2, // 284: tutorial.ResCatnipGrandReward.Code:type_name -> tutorial.RES_CODE
|
2, // 284: tutorial.ResCatnipEmoji.Code:type_name -> tutorial.RES_CODE
|
||||||
2, // 285: tutorial.ResCatnipEmoji.Code:type_name -> tutorial.RES_CODE
|
171, // 285: tutorial.ResGuideTask.TaskEntry.value:type_name -> tutorial.GuideTask
|
||||||
171, // 286: tutorial.ResGuideTask.TaskEntry.value:type_name -> tutorial.GuideTask
|
177, // 286: tutorial.ResDailyTask.WeekRewardEntry.value:type_name -> tutorial.DailyWeek
|
||||||
177, // 287: tutorial.ResDailyTask.WeekRewardEntry.value:type_name -> tutorial.DailyWeek
|
178, // 287: tutorial.ResDailyTask.DailyTaskEntry.value:type_name -> tutorial.DailyTask
|
||||||
178, // 288: tutorial.ResDailyTask.DailyTaskEntry.value:type_name -> tutorial.DailyTask
|
214, // 288: tutorial.ResLimitEvent.LimitEventListEntry.value:type_name -> tutorial.LimitEvent
|
||||||
214, // 289: tutorial.ResLimitEvent.LimitEventListEntry.value:type_name -> tutorial.LimitEvent
|
231, // 289: tutorial.ResRank.RankListEntry.value:type_name -> tutorial.ResPlayerSimple
|
||||||
231, // 290: tutorial.ResRank.RankListEntry.value:type_name -> tutorial.ResPlayerSimple
|
283, // 290: tutorial.ResMailList.MailListEntry.value:type_name -> tutorial.MailInfo
|
||||||
283, // 291: tutorial.ResMailList.MailListEntry.value:type_name -> tutorial.MailInfo
|
301, // 291: tutorial.ResCharge.SpecialShopEntry.value:type_name -> tutorial.ResSpecialShop
|
||||||
301, // 292: tutorial.ResCharge.SpecialShopEntry.value:type_name -> tutorial.ResSpecialShop
|
302, // 292: tutorial.ResCharge.ChessShopEntry.value:type_name -> tutorial.ResChessShop
|
||||||
302, // 293: tutorial.ResCharge.ChessShopEntry.value:type_name -> tutorial.ResChessShop
|
293, // 293: tutorial.ResCharge.WeeklyDiscountEntry.value:type_name -> tutorial.WeeklyDiscountInfo
|
||||||
293, // 294: tutorial.ResCharge.WeeklyDiscountEntry.value:type_name -> tutorial.WeeklyDiscountInfo
|
313, // 294: tutorial.ResEndless.EndlessListEntry.value:type_name -> tutorial.ResEndlessInfo
|
||||||
313, // 295: tutorial.ResEndless.EndlessListEntry.value:type_name -> tutorial.ResEndlessInfo
|
233, // 295: tutorial.ResChampshipRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank
|
||||||
233, // 296: tutorial.ResChampshipRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank
|
233, // 296: tutorial.ResChampshipPreRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank
|
||||||
233, // 297: tutorial.ResChampshipPreRank.RankListEntry.value:type_name -> tutorial.ResPlayerRank
|
390, // 297: tutorial.ResPlayroom.DressEntry.value:type_name -> tutorial.PlayroomDress
|
||||||
390, // 298: tutorial.ResPlayroom.DressEntry.value:type_name -> tutorial.PlayroomDress
|
293, // 298: tutorial.ResPlayroom.WeeklyDiscountEntry.value:type_name -> tutorial.WeeklyDiscountInfo
|
||||||
293, // 299: tutorial.ResPlayroom.WeeklyDiscountEntry.value:type_name -> tutorial.WeeklyDiscountInfo
|
168, // 299: tutorial.ResPlayroomInfo.ItemsEntry.value:type_name -> tutorial.ItemInfo
|
||||||
168, // 300: tutorial.ResPlayroomInfo.ItemsEntry.value:type_name -> tutorial.ItemInfo
|
168, // 300: tutorial.ResPlayroomGame.ItemsEntry.value:type_name -> tutorial.ItemInfo
|
||||||
168, // 301: tutorial.ResPlayroomGame.ItemsEntry.value:type_name -> tutorial.ItemInfo
|
301, // [301:301] is the sub-list for method output_type
|
||||||
302, // [302:302] is the sub-list for method output_type
|
301, // [301:301] is the sub-list for method input_type
|
||||||
302, // [302:302] is the sub-list for method input_type
|
301, // [301:301] is the sub-list for extension type_name
|
||||||
302, // [302:302] is the sub-list for extension type_name
|
301, // [301:301] is the sub-list for extension extendee
|
||||||
302, // [302:302] is the sub-list for extension extendee
|
0, // [0:301] is the sub-list for field type_name
|
||||||
0, // [0:302] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_proto_Gameapi_proto_init() }
|
func init() { file_proto_Gameapi_proto_init() }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user