签到小游戏 玩法调整
This commit is contained in:
parent
d5bd4f925f
commit
dccbdde57f
@ -658,7 +658,11 @@
|
|||||||
"pandamas_tiguandiaoxiang_cd": 10,
|
"pandamas_tiguandiaoxiang_cd": 10,
|
||||||
"Max_breakingbad_recipe": 15,
|
"Max_breakingbad_recipe": 15,
|
||||||
"puzzlePromptNum": 5,
|
"puzzlePromptNum": 5,
|
||||||
"Daily_Tips": 3,
|
"Daily_Tips": {
|
||||||
|
"a": "item",
|
||||||
|
"t": "151001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
"Daily_Num": 2,
|
"Daily_Num": 2,
|
||||||
"Week_Num": 2,
|
"Week_Num": 2,
|
||||||
"fitnessModelId": "25001",
|
"fitnessModelId": "25001",
|
||||||
@ -716,20 +720,6 @@
|
|||||||
"n": 1000
|
"n": 1000
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"buzkashi_resurrection": 10,
|
"buzkashi_resurrection": 10
|
||||||
"favorability_attenuation": [
|
|
||||||
{
|
|
||||||
"k": 3,
|
|
||||||
"v": 1000
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"k": 6,
|
|
||||||
"v": 800
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"k": 9,
|
|
||||||
"v": 500
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -8297,7 +8297,49 @@
|
|||||||
"key": "sd_ing_141001",
|
"key": "sd_ing_141001",
|
||||||
"text": "缺少流通货币"
|
"text": "缺少流通货币"
|
||||||
},
|
},
|
||||||
"sale": [],
|
"sale": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"synthetize_deplete": [],
|
||||||
|
"decompose_deplete": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "151001",
|
||||||
|
"name": {
|
||||||
|
"key": "item_name_151001",
|
||||||
|
"text": "提示道具"
|
||||||
|
},
|
||||||
|
"usetype": 15,
|
||||||
|
"color": 4,
|
||||||
|
"bagtype": 0,
|
||||||
|
"index": 99,
|
||||||
|
"special_type": 0,
|
||||||
|
"time": 0,
|
||||||
|
"reddottype": 0,
|
||||||
|
"effects": "",
|
||||||
|
"box_id": 0,
|
||||||
|
"synthetize_num": 0,
|
||||||
|
"access": [
|
||||||
|
107
|
||||||
|
],
|
||||||
|
"use_skip": 166,
|
||||||
|
"upper_limit": -1,
|
||||||
|
"img": "icon_mcs",
|
||||||
|
"intr": {
|
||||||
|
"key": "item_name_151001",
|
||||||
|
"text": "缺少提示道具"
|
||||||
|
},
|
||||||
|
"sale": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1000
|
||||||
|
}
|
||||||
|
],
|
||||||
"synthetize_deplete": [],
|
"synthetize_deplete": [],
|
||||||
"decompose_deplete": []
|
"decompose_deplete": []
|
||||||
}
|
}
|
||||||
|
@ -7817,13 +7817,13 @@
|
|||||||
"EmitPR": 1000,
|
"EmitPR": 1000,
|
||||||
"From": 1,
|
"From": 1,
|
||||||
"Where": [],
|
"Where": [],
|
||||||
"Order": "",
|
"Order": "PropertyUp=3",
|
||||||
"Limit": 2,
|
"Limit": 2,
|
||||||
"ExecuteCnt": 1,
|
"ExecuteCnt": 1,
|
||||||
"Type": 5,
|
"Type": 5,
|
||||||
"Argu": [
|
"Argu": [
|
||||||
1,
|
1,
|
||||||
1,
|
2,
|
||||||
50
|
50
|
||||||
],
|
],
|
||||||
"FollowSK": [],
|
"FollowSK": [],
|
||||||
|
@ -3,6 +3,7 @@ package user
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
)
|
)
|
||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
@ -17,7 +18,12 @@ func (this *apiComp) ChangeTips(session comm.IUserSession, req *pb.UserChangeTip
|
|||||||
update := make(map[string]interface{}, 0)
|
update := make(map[string]interface{}, 0)
|
||||||
if sign, err := this.module.modelSign.GetUserSign(session.GetUserId()); err == nil {
|
if sign, err := this.module.modelSign.GetUserSign(session.GetUserId()); err == nil {
|
||||||
|
|
||||||
sign.Tips = req.Tips
|
if conf := this.module.ModuleTools.GetGlobalConf().DailyTips; conf.N > 0 {
|
||||||
|
if code = this.module.ConsumeRes(session, []*cfg.Gameatn{conf}, true); code != pb.ErrorCode_Success {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sign.Tips += 1 // 记录总的提示次数
|
||||||
update["tips"] = sign.Tips
|
update["tips"] = sign.Tips
|
||||||
|
|
||||||
this.module.modelSign.Change(session.GetUserId(), update)
|
this.module.modelSign.Change(session.GetUserId(), update)
|
||||||
|
@ -22,7 +22,7 @@ func (this *apiComp) PuzzleAward(session comm.IUserSession, req *pb.UserPuzzleAw
|
|||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if sign.Puzzle[req.Index] != 1 {
|
if sign.Puzzle[req.Index] != 0 {
|
||||||
code = pb.ErrorCode_ReqParameterError
|
code = pb.ErrorCode_ReqParameterError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ func (this *apiComp) PuzzleAward(session comm.IUserSession, req *pb.UserPuzzleAw
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sign.Puzzle[req.Index] = 2
|
sign.Puzzle[req.Index] = 1
|
||||||
if err = this.module.modelSign.Change(session.GetUserId(), map[string]interface{}{
|
if err = this.module.modelSign.Change(session.GetUserId(), map[string]interface{}{
|
||||||
"puzzle": sign.Puzzle,
|
"puzzle": sign.Puzzle,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
@ -541,7 +541,7 @@ type DBSign struct {
|
|||||||
SignCount int32 `protobuf:"varint,4,opt,name=signCount,proto3" json:"signCount" bson:"signCount"` //玩家累计签到次数
|
SignCount int32 `protobuf:"varint,4,opt,name=signCount,proto3" json:"signCount" bson:"signCount"` //玩家累计签到次数
|
||||||
Group int32 `protobuf:"varint,5,opt,name=group,proto3" json:"group"` //记录循环签到值
|
Group int32 `protobuf:"varint,5,opt,name=group,proto3" json:"group"` //记录循环签到值
|
||||||
Day int32 `protobuf:"varint,6,opt,name=day,proto3" json:"day"` // 今天是这个月第几天
|
Day int32 `protobuf:"varint,6,opt,name=day,proto3" json:"day"` // 今天是这个月第几天
|
||||||
Puzzle []int32 `protobuf:"varint,7,rep,packed,name=puzzle,proto3" json:"puzzle" bson:"puzzle"` //拼图游戏完成情况 // 0 未签到 1 已签到 2 玩了游戏
|
Puzzle []int32 `protobuf:"varint,7,rep,packed,name=puzzle,proto3" json:"puzzle" bson:"puzzle"` //拼图游戏完成情况 // 0 没玩游戏 1 玩了游戏
|
||||||
Tips int32 `protobuf:"varint,8,opt,name=tips,proto3" json:"tips"` // 提示次数
|
Tips int32 `protobuf:"varint,8,opt,name=tips,proto3" json:"tips"` // 提示次数
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ type GameGlobalData struct {
|
|||||||
PandamasTiguandiaoxiangCd int32
|
PandamasTiguandiaoxiangCd int32
|
||||||
MaxBreakingbadRecipe int32
|
MaxBreakingbadRecipe int32
|
||||||
PuzzlePromptNum int32
|
PuzzlePromptNum int32
|
||||||
DailyTips int32
|
DailyTips *Gameatn
|
||||||
DailyNum int32
|
DailyNum int32
|
||||||
WeekNum int32
|
WeekNum int32
|
||||||
FitnessModelId string
|
FitnessModelId string
|
||||||
@ -222,7 +222,6 @@ type GameGlobalData struct {
|
|||||||
BuzkashiVintegral []*Gameatn
|
BuzkashiVintegral []*Gameatn
|
||||||
BuzkashiFintegral []*Gameatn
|
BuzkashiFintegral []*Gameatn
|
||||||
BuzkashiResurrection int32
|
BuzkashiResurrection int32
|
||||||
FavorabilityAttenuation []*Gamekv
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const TypeId_GameGlobalData = 477542761
|
const TypeId_GameGlobalData = 477542761
|
||||||
@ -836,7 +835,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
|
|||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pandamas_tiguandiaoxiang_cd"].(float64); !_ok_ { err = errors.New("pandamas_tiguandiaoxiang_cd error"); return }; _v.PandamasTiguandiaoxiangCd = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pandamas_tiguandiaoxiang_cd"].(float64); !_ok_ { err = errors.New("pandamas_tiguandiaoxiang_cd error"); return }; _v.PandamasTiguandiaoxiangCd = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Max_breakingbad_recipe"].(float64); !_ok_ { err = errors.New("Max_breakingbad_recipe error"); return }; _v.MaxBreakingbadRecipe = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Max_breakingbad_recipe"].(float64); !_ok_ { err = errors.New("Max_breakingbad_recipe error"); return }; _v.MaxBreakingbadRecipe = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["puzzlePromptNum"].(float64); !_ok_ { err = errors.New("puzzlePromptNum error"); return }; _v.PuzzlePromptNum = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["puzzlePromptNum"].(float64); !_ok_ { err = errors.New("puzzlePromptNum error"); return }; _v.PuzzlePromptNum = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Daily_Tips"].(float64); !_ok_ { err = errors.New("Daily_Tips error"); return }; _v.DailyTips = int32(_tempNum_) }
|
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["Daily_Tips"].(map[string]interface{}); !_ok_ { err = errors.New("Daily_Tips error"); return }; if _v.DailyTips, err = DeserializeGameatn(_x_); err != nil { return } }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Daily_Num"].(float64); !_ok_ { err = errors.New("Daily_Num error"); return }; _v.DailyNum = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Daily_Num"].(float64); !_ok_ { err = errors.New("Daily_Num error"); return }; _v.DailyNum = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Week_Num"].(float64); !_ok_ { err = errors.New("Week_Num error"); return }; _v.WeekNum = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Week_Num"].(float64); !_ok_ { err = errors.New("Week_Num error"); return }; _v.WeekNum = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; if _v.FitnessModelId, _ok_ = _buf["fitnessModelId"].(string); !_ok_ { err = errors.New("fitnessModelId error"); return } }
|
{ var _ok_ bool; if _v.FitnessModelId, _ok_ = _buf["fitnessModelId"].(string); !_ok_ { err = errors.New("fitnessModelId error"); return } }
|
||||||
@ -911,20 +910,6 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buzkashi_resurrection"].(float64); !_ok_ { err = errors.New("buzkashi_resurrection error"); return }; _v.BuzkashiResurrection = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buzkashi_resurrection"].(float64); !_ok_ { err = errors.New("buzkashi_resurrection error"); return }; _v.BuzkashiResurrection = int32(_tempNum_) }
|
||||||
{
|
|
||||||
var _arr_ []interface{}
|
|
||||||
var _ok_ bool
|
|
||||||
if _arr_, _ok_ = _buf["favorability_attenuation"].([]interface{}); !_ok_ { err = errors.New("favorability_attenuation error"); return }
|
|
||||||
|
|
||||||
_v.FavorabilityAttenuation = make([]*Gamekv, 0, len(_arr_))
|
|
||||||
|
|
||||||
for _, _e_ := range _arr_ {
|
|
||||||
var _list_v_ *Gamekv
|
|
||||||
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGamekv(_x_); err != nil { return } }
|
|
||||||
_v.FavorabilityAttenuation = append(_v.FavorabilityAttenuation, _list_v_)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user