user_task_module

package
v0.0.0-...-bd0de05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const TASK_PROTECT_SEC = 60 * 3 // 3min

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskModel

type TaskModel struct {
	module_base.ModuleBase
	// contains filtered or unexported fields
}

func GetTaskModel

func GetTaskModel() (*TaskModel, error)

func NewTaskModel

func NewTaskModel() *TaskModel

func (*TaskModel) AbandonTask

func (p *TaskModel) AbandonTask(
	userId int64, taskId int32,
) (normalTasks *dbData.NormalTaskList, err error)

放弃普通任务

func (*TaskModel) AbandonTaskList

func (p *TaskModel) AbandonTaskList(
	userId int64, taskListType proto.TaskListType,
) error

放弃任务链任务

func (*TaskModel) AcceptTask

func (p *TaskModel) AcceptTask(
	userId int64, taskId int32,
) (normalTasks *dbData.NormalTaskList, err error)

领取普通任务

func (*TaskModel) AcceptTaskList

func (p *TaskModel) AcceptTaskList(
	userId int64, taskListType proto.TaskListType, talentType proto.TalentType,
) (listData *dbData.TaskList, err error)

领取任务链

func (*TaskModel) ClearUserTaskCache

func (p *TaskModel) ClearUserTaskCache(userId int64)

func (*TaskModel) Daily

func (p *TaskModel) Daily(utc time.Time)

func (*TaskModel) GetItemHandler

func (p *TaskModel) GetItemHandler(
	userId int64, upNormalTask bool, tlTypes []proto.TaskListType,
	items []base_data.GrpcItemBaseInfo,
) error

func (*TaskModel) GetPlayerSceneData

func (p *TaskModel) GetPlayerSceneData(userId int64) (*dbData.PlayerSceneData, error)

func (*TaskModel) GetUserTalentData

func (p *TaskModel) GetUserTalentData(userId int64) (*dbData.TalentData, error)

func (*TaskModel) GetUserTask

func (p *TaskModel) GetUserTask(userId int64) (*dbData.PlayerTask, error)

func (*TaskModel) HandInItemHandler

func (p *TaskModel) HandInItemHandler(
	userId int64,
	upNormalTask bool, tlTypes []proto.TaskListType, targetTask int32,
	handInItems []*proto.TaskOptionItem,
) error

func (*TaskModel) Hourly

func (p *TaskModel) Hourly(utc time.Time)

func (*TaskModel) KillMonsterHandler

func (p *TaskModel) KillMonsterHandler(
	userId int64,
	upNormalTask bool, tlTypes []proto.TaskListType,
	monsterCid, num int32,
) error

func (*TaskModel) Minutely

func (p *TaskModel) Minutely(utc time.Time)

func (*TaskModel) OnInit

func (p *TaskModel) OnInit() error

func (*TaskModel) OnTick

func (p *TaskModel) OnTick(utc time.Time)

func (*TaskModel) Secondly

func (p *TaskModel) Secondly(utc time.Time)

func (*TaskModel) TalentLevelUpdateHandler

func (p *TaskModel) TalentLevelUpdateHandler(
	userId int64, upNormalTask bool, tlTypes []proto.TaskListType,
	lvs []base_data.GrpcTalentLevel,
) (err error)

func (*TaskModel) TalentNodeUpdateHandler

func (p *TaskModel) TalentNodeUpdateHandler(
	userId int64, upNormalTask bool, tlTypes []proto.TaskListType,
	trees []base_data.GrpcTalentTreeUpdate,
) (err error)

func (*TaskModel) TargetPositionHandler

func (p *TaskModel) TargetPositionHandler(
	userId int64,
	upNormalTask bool, tlTypes []proto.TaskListType, targetTask int32,
	position *proto.TaskOptionTargetPosition,
) error

func (*TaskModel) TaskFinishCountHandler

func (p *TaskModel) TaskFinishCountHandler(
	userId int64,
	upNormalTask bool, tlTypes []proto.TaskListType,
	finishTaskListType proto.TaskListType,
) error

func (*TaskModel) TaskListTypeCountHandler

func (p *TaskModel) TaskListTypeCountHandler(
	userId int64,
	upNormalTask bool, tlTypes []proto.TaskListType,
	finishTaskListType proto.TaskListType,
) error

func (*TaskModel) TaskReward

func (p *TaskModel) TaskReward(
	userId int64, taskId int32,
) (normalTasks *dbData.NormalTaskList, err error)

领取普通任务奖励

func (*TaskModel) TaskRewardByTaskList

func (p *TaskModel) TaskRewardByTaskList(
	userId int64, kind proto.TaskListType,
) (tl *dbData.TaskList, err error)

领取任务链的任务奖励

func (*TaskModel) UseItemHandler

func (p *TaskModel) UseItemHandler(
	userId int64,
	upNormalTask bool, tlTypes []proto.TaskListType,
	itemCid int32, num int32,
) error

func (*TaskModel) UseRecipeHandler

func (p *TaskModel) UseRecipeHandler(
	userId int64,
	upNormalTask bool, tlTypes []proto.TaskListType, targetTask int32,
	recipeInfo *proto.TaskOptionUseRecipe,
) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL