Compare commits
2 Commits
92ceaf9668
...
c730cf7cee
Author | SHA1 | Date | |
---|---|---|---|
c730cf7cee | |||
86c95443b0 |
@ -379,58 +379,48 @@
|
||||
"MonthlyCard_DaysSent": 30,
|
||||
"opennewguide": 0,
|
||||
"library_StoryUnlocking": 3,
|
||||
"ps_recovery": 300,
|
||||
"ps_recovery": 360,
|
||||
"ps_ul": 2000,
|
||||
"ps_buy": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"t": "diamond",
|
||||
"n": 100
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "diamond",
|
||||
"n": 200
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "diamond",
|
||||
"n": 400
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "diamond",
|
||||
"n": 600
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "diamond",
|
||||
"n": 800
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "diamond",
|
||||
"n": 1000
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
"t": "diamond",
|
||||
"n": 1200
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
"t": "diamond",
|
||||
"n": 1400
|
||||
}
|
||||
],
|
||||
"ps_item": {
|
||||
@ -741,6 +731,7 @@
|
||||
"buzkashi_goal": 2000,
|
||||
"buzkashi_goalspeed": 800,
|
||||
"buzkashi_bumpdis": 5,
|
||||
"stamina_potion": 10000003
|
||||
"stamina_potion": 10000003,
|
||||
"fight_ps": 3
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
@ -524,6 +524,10 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
}
|
||||
change.Arenacoin += add
|
||||
case comm.ResPs:
|
||||
ggd := this.ModuleTools.GetGlobalConf()
|
||||
if ggd == nil {
|
||||
return
|
||||
}
|
||||
if add < 0 {
|
||||
if user.Ps+add < 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -532,11 +536,11 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
}
|
||||
return
|
||||
}
|
||||
//体力消耗,增加玩家经验
|
||||
// exp := int32(math.Abs(float64(add))) * ggd.FightPs
|
||||
// user.Exp += int64(exp)
|
||||
}
|
||||
ggd := this.ModuleTools.GetGlobalConf()
|
||||
if ggd == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if change.Ps+add > ggd.PsUl {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_UserVitLimit,
|
||||
|
@ -101,26 +101,25 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// tasks = &pb.Worldtasks{
|
||||
// TaskMap: make(map[int32]*pb.Worldtask),
|
||||
// }
|
||||
// task := &pb.Worldtask{
|
||||
// TaskId: req.TaskId,
|
||||
// TaskType: curTaskConf.Des,
|
||||
// NpcStatus: 1, //接取
|
||||
// }
|
||||
} else {
|
||||
tasks = &pb.Worldtasks{
|
||||
TaskMap: make(map[int32]*pb.Worldtask),
|
||||
}
|
||||
task := &pb.Worldtask{
|
||||
TaskId: req.TaskId,
|
||||
TaskType: curTaskConf.Des,
|
||||
NpcStatus: 1, //接取
|
||||
}
|
||||
|
||||
// for _, cid := range curTaskConf.Completetask {
|
||||
// task.Conds = append(task.Conds, &pb.ConIProgress{
|
||||
// Conid: cid,
|
||||
// })
|
||||
// }
|
||||
for _, cid := range curTaskConf.Completetask {
|
||||
task.Conds = append(task.Conds, &pb.ConIProgress{
|
||||
Conid: cid,
|
||||
})
|
||||
}
|
||||
|
||||
// tasks.TaskMap[req.TaskId] = task
|
||||
// myWorldtask.CurrentTasks[curTaskConf.Group] = tasks
|
||||
// }
|
||||
tasks.TaskMap[req.TaskId] = task
|
||||
myWorldtask.CurrentTasks[curTaskConf.Group] = tasks
|
||||
}
|
||||
|
||||
update := map[string]interface{}{
|
||||
"currentTasks": myWorldtask.CurrentTasks,
|
||||
|
@ -234,6 +234,7 @@ type GameGlobalData struct {
|
||||
BuzkashiGoalspeed int32
|
||||
BuzkashiBumpdis float32
|
||||
StaminaPotion int32
|
||||
FightPs int32
|
||||
}
|
||||
|
||||
const TypeId_GameGlobalData = 477542761
|
||||
@ -947,6 +948,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buzkashi_goalspeed"].(float64); !_ok_ { err = errors.New("buzkashi_goalspeed error"); return }; _v.BuzkashiGoalspeed = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buzkashi_bumpdis"].(float64); !_ok_ { err = errors.New("buzkashi_bumpdis error"); return }; _v.BuzkashiBumpdis = float32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["stamina_potion"].(float64); !_ok_ { err = errors.New("stamina_potion error"); return }; _v.StaminaPotion = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["fight_ps"].(float64); !_ok_ { err = errors.New("fight_ps error"); return }; _v.FightPs = int32(_tempNum_) }
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user