任务完成批处理
This commit is contained in:
parent
ae2747e484
commit
bc0c9f55c7
@ -16,7 +16,7 @@ type (
|
|||||||
}
|
}
|
||||||
//任务完成
|
//任务完成
|
||||||
ITaskComplete interface {
|
ITaskComplete interface {
|
||||||
TaskComplete(session IUserSession, taskid int32)
|
TaskComplete(session IUserSession, taskid ...int32)
|
||||||
}
|
}
|
||||||
//功能开启通知
|
//功能开启通知
|
||||||
IOpenCmdNotice interface {
|
IOpenCmdNotice interface {
|
||||||
|
@ -307,7 +307,7 @@ func (this *Caravan) CleanCaravanTask(uid string, data *pb.DBCaravan) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Caravan) TaskComplete(session comm.IUserSession, taskid int32) {
|
func (this *Caravan) TaskComplete(session comm.IUserSession, taskid ...int32) {
|
||||||
this.Debug("Caravan TaskComplete",
|
this.Debug("Caravan TaskComplete",
|
||||||
log.Field{Key: "session", Value: session.GetUserId()},
|
log.Field{Key: "session", Value: session.GetUserId()},
|
||||||
log.Field{Key: "taskid", Value: taskid},
|
log.Field{Key: "taskid", Value: taskid},
|
||||||
@ -316,9 +316,9 @@ func (this *Caravan) TaskComplete(session comm.IUserSession, taskid int32) {
|
|||||||
resp *pb.CaravanTaskCompletePush
|
resp *pb.CaravanTaskCompletePush
|
||||||
)
|
)
|
||||||
if !this.IsCross() {
|
if !this.IsCross() {
|
||||||
|
for _, t := range taskid {
|
||||||
list, _ := this.modelCaravan.getCaravanList(session.GetUserId())
|
list, _ := this.modelCaravan.getCaravanList(session.GetUserId())
|
||||||
if list.Taskid == taskid {
|
if list.Taskid == t {
|
||||||
if conf, err := this.configure.GetCaravanEventById(list.Eventid); err == nil {
|
if conf, err := this.configure.GetCaravanEventById(list.Eventid); err == nil {
|
||||||
this.CleanCaravanTask(session.GetUserId(), list) //任务完成 清理任务数据
|
this.CleanCaravanTask(session.GetUserId(), list) //任务完成 清理任务数据
|
||||||
resp = &pb.CaravanTaskCompletePush{}
|
resp = &pb.CaravanTaskCompletePush{}
|
||||||
@ -338,6 +338,8 @@ func (this *Caravan) TaskComplete(session comm.IUserSession, taskid int32) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 整理背包 (true 表示背包装不下)
|
// 整理背包 (true 表示背包装不下)
|
||||||
|
@ -196,7 +196,7 @@ func (this *Practice) AddItems(session comm.IUserSession, items map[string]int32
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 完成世界任务
|
// 完成世界任务
|
||||||
func (this *Practice) TaskComplete(session comm.IUserSession, taskid int32) {
|
func (this *Practice) TaskComplete(session comm.IUserSession, taskid ...int32) {
|
||||||
this.Debug("TaskComplete",
|
this.Debug("TaskComplete",
|
||||||
log.Field{Key: "session", Value: session.GetUserId()},
|
log.Field{Key: "session", Value: session.GetUserId()},
|
||||||
log.Field{Key: "taskid", Value: taskid},
|
log.Field{Key: "taskid", Value: taskid},
|
||||||
|
Loading…
Reference in New Issue
Block a user