Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
6394be1065
@ -1013,6 +1013,7 @@ func (this *User) AddPer(session comm.IUserSession, pers map[string]int32, bPush
|
|||||||
CurSkin: user.CurSkin,
|
CurSkin: user.CurSkin,
|
||||||
CurAction: user.CurAction,
|
CurAction: user.CurAction,
|
||||||
CurBg: user.CurBg,
|
CurBg: user.CurBg,
|
||||||
|
Avatar: user.Avatar,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
@ -84,13 +84,14 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
|||||||
//判断是否要结束任务
|
//判断是否要结束任务
|
||||||
if ((len(curTaskConf.Completetask) == 1 && curTaskConf.Completetask[0] == 0) || len(curTaskConf.Completetask) == 0) &&
|
if ((len(curTaskConf.Completetask) == 1 && curTaskConf.Completetask[0] == 0) || len(curTaskConf.Completetask) == 0) &&
|
||||||
curTaskConf.DeliverNpc == 0 {
|
curTaskConf.DeliverNpc == 0 {
|
||||||
|
a.sendMsg(session, WorldtaskSubtypeAccept, rsp)
|
||||||
//结束任务
|
//结束任务
|
||||||
a.module.modelWorldtask.taskFinish(session, req.GroupId, req.TaskId, myWorldtask, curTaskConf)
|
a.module.modelWorldtask.taskFinish(session, req.GroupId, req.TaskId, myWorldtask, curTaskConf)
|
||||||
a.module.modelWorldtask.taskFinishPush(session, req.GroupId, myWorldtask, curTaskConf)
|
a.module.modelWorldtask.taskFinishPush(session, req.GroupId, myWorldtask, curTaskConf)
|
||||||
} else if curTaskConf.DeliverNpc == 0 && len(curTaskConf.Completetask) > 0 {
|
} else if curTaskConf.DeliverNpc == 0 && len(curTaskConf.Completetask) > 0 {
|
||||||
|
var flag bool
|
||||||
conds, err := a.module.ModuleBuried.CheckCondition(uid, curTaskConf.Completetask...)
|
conds, err := a.module.ModuleBuried.CheckCondition(uid, curTaskConf.Completetask...)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
var flag bool
|
|
||||||
for _, cond := range conds {
|
for _, cond := range conds {
|
||||||
if cond.State == pb.BuriedItemFinishState_buried_finish {
|
if cond.State == pb.BuriedItemFinishState_buried_finish {
|
||||||
flag = true
|
flag = true
|
||||||
@ -100,11 +101,15 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if flag {
|
if flag {
|
||||||
|
a.sendMsg(session, WorldtaskSubtypeAccept, rsp)
|
||||||
a.module.modelWorldtask.taskFinish(session, req.GroupId, req.TaskId, myWorldtask, curTaskConf)
|
a.module.modelWorldtask.taskFinish(session, req.GroupId, req.TaskId, myWorldtask, curTaskConf)
|
||||||
a.module.modelWorldtask.taskFinishPush(session, req.GroupId, myWorldtask, curTaskConf)
|
a.module.modelWorldtask.taskFinishPush(session, req.GroupId, myWorldtask, curTaskConf)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
a.sendMsg(session, WorldtaskSubtypeAccept, rsp)
|
||||||
} else {
|
} else {
|
||||||
// 已完成的任务条件
|
// 已完成的任务条件
|
||||||
conds, err := a.module.ModuleBuried.CheckCondition(uid, curTaskConf.Completetask...)
|
conds, err := a.module.ModuleBuried.CheckCondition(uid, curTaskConf.Completetask...)
|
||||||
@ -119,9 +124,8 @@ func (a *apiComp) Accept(session comm.IUserSession, req *pb.WorldtaskAcceptReq)
|
|||||||
}
|
}
|
||||||
a.module.ModuleBuried.ActiveCondition(uid, unfinishCondIds...)
|
a.module.ModuleBuried.ActiveCondition(uid, unfinishCondIds...)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
a.sendMsg(session, WorldtaskSubtypeAccept, rsp)
|
a.sendMsg(session, WorldtaskSubtypeAccept, rsp)
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -93,8 +93,8 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
|||||||
log.Field{Key: "uid", Value: uid},
|
log.Field{Key: "uid", Value: uid},
|
||||||
log.Field{Key: "taskId", Value: req.TaskId},
|
log.Field{Key: "taskId", Value: req.TaskId},
|
||||||
)
|
)
|
||||||
this.module.modelWorldtask.taskFinishPush(session, req.GroupId, userTask, curTaskConf)
|
|
||||||
this.sendMsg(session, WorldtaskSubtypeFinish, rsp)
|
this.sendMsg(session, WorldtaskSubtypeFinish, rsp)
|
||||||
|
this.module.modelWorldtask.taskFinishPush(session, req.GroupId, userTask, curTaskConf)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,9 +160,8 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
|||||||
ic.TaskComplete(session, req.TaskId)
|
ic.TaskComplete(session, req.TaskId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.module.modelWorldtask.taskFinishPush(session, req.GroupId, userTask, curTaskConf)
|
|
||||||
this.sendMsg(session, WorldtaskSubtypeFinish, rsp)
|
this.sendMsg(session, WorldtaskSubtypeFinish, rsp)
|
||||||
|
this.module.modelWorldtask.taskFinishPush(session, req.GroupId, userTask, curTaskConf)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2971,6 +2971,7 @@ type UserSkinlistPush struct {
|
|||||||
CurSkin string `protobuf:"bytes,2,opt,name=curSkin,proto3" json:"curSkin"`
|
CurSkin string `protobuf:"bytes,2,opt,name=curSkin,proto3" json:"curSkin"`
|
||||||
CurAction string `protobuf:"bytes,3,opt,name=curAction,proto3" json:"curAction"`
|
CurAction string `protobuf:"bytes,3,opt,name=curAction,proto3" json:"curAction"`
|
||||||
CurBg string `protobuf:"bytes,4,opt,name=curBg,proto3" json:"curBg"`
|
CurBg string `protobuf:"bytes,4,opt,name=curBg,proto3" json:"curBg"`
|
||||||
|
Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserSkinlistPush) Reset() {
|
func (x *UserSkinlistPush) Reset() {
|
||||||
@ -3033,6 +3034,13 @@ func (x *UserSkinlistPush) GetCurBg() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *UserSkinlistPush) GetAvatar() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Avatar
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_user_user_msg_proto protoreflect.FileDescriptor
|
var File_user_user_msg_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_user_user_msg_proto_rawDesc = []byte{
|
var file_user_user_msg_proto_rawDesc = []byte{
|
||||||
@ -3268,15 +3276,17 @@ var file_user_user_msg_proto_rawDesc = []byte{
|
|||||||
0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x75, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x75, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||||
0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x42, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x42, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||||
0x63, 0x75, 0x72, 0x42, 0x67, 0x22, 0x76, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x6b, 0x69,
|
0x63, 0x75, 0x72, 0x42, 0x67, 0x22, 0x8e, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x6b,
|
||||||
0x6e, 0x6c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6b, 0x69,
|
0x69, 0x6e, 0x6c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6b,
|
||||||
0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6e, 0x73, 0x12,
|
0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6e, 0x73,
|
||||||
0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x53, 0x6b, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x53, 0x6b, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x52, 0x07, 0x63, 0x75, 0x72, 0x53, 0x6b, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72,
|
0x09, 0x52, 0x07, 0x63, 0x75, 0x72, 0x53, 0x6b, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75,
|
||||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x75,
|
0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,
|
||||||
0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x42, 0x67,
|
0x75, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x42,
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x75, 0x72, 0x42, 0x67, 0x42, 0x06, 0x5a,
|
0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x75, 0x72, 0x42, 0x67, 0x12, 0x16,
|
||||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||||
|
0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user