This commit is contained in:
yangduo 2024-12-12 15:01:18 +08:00
parent 2fc92b025b
commit 9b2204bc82
3 changed files with 7 additions and 7 deletions

View File

@ -74,7 +74,7 @@ func (this *MissionApi) UpdateTask(c *gin.Context) {
return
}
if taskMeta.GetConditon() != constant.TASK_COND_FRONT ||
if taskMeta.GetCondition() != constant.TASK_COND_FRONT ||
taskitem.Target <= taskitem.Current {
f5.RspErr(c, 401, "bad request")
return

View File

@ -79,7 +79,7 @@ type Reward struct {
type Task struct {
id int32
type_ int32
conditon int32
condition int32
param1 int32
param2 int32
reward_type int32
@ -380,11 +380,11 @@ func (this *Task) HasType() bool {
return (this._flags1_ & (uint64(1) << 2)) > 0
}
func (this *Task) GetConditon() int32 {
return this.conditon
func (this *Task) GetCondition() int32 {
return this.condition
}
func (this *Task) HasConditon() bool {
func (this *Task) HasCondition() bool {
return (this._flags1_ & (uint64(1) << 3)) > 0
}
@ -563,7 +563,7 @@ func (this *Reward) LoadFromKv(kv map[string]interface{}) {
func (this *Task) LoadFromKv(kv map[string]interface{}) {
f5.ReadMetaTableField(&this.id, "id", &this._flags1_, 1, kv)
f5.ReadMetaTableField(&this.type_, "type", &this._flags1_, 2, kv)
f5.ReadMetaTableField(&this.conditon, "conditon", &this._flags1_, 3, kv)
f5.ReadMetaTableField(&this.condition, "condition", &this._flags1_, 3, kv)
f5.ReadMetaTableField(&this.param1, "param1", &this._flags1_, 4, kv)
f5.ReadMetaTableField(&this.param2, "param2", &this._flags1_, 5, kv)
f5.ReadMetaTableField(&this.reward_type, "reward_type", &this._flags1_, 6, kv)

View File

@ -64,7 +64,7 @@ message Task
{
optional int32 id = 1;
optional int32 type = 2;
optional int32 conditon = 3;
optional int32 condition = 3;
optional int32 param1 = 4;
optional int32 param2 = 5;
optional int32 reward_type = 6;