Example #1
0
//任务放弃
func GiveUpTask(num1 int32, num2 int32, conn *net.Conn) {
	taskInfo := new(protocol.TaskType)
	taskInfo.Type = &num1
	taskInfo.Id = &num2

	base := new(protocol.Task_GiveUpTask)
	base.Task = taskInfo
	encObj, _ := proto.Marshal(base)
	SendPackage(*conn, 1824, encObj)
}
Example #2
0
//手动获取奖励
func SubmitTask(type_id int32, id int32, conn *net.Conn) {
	taskInfo := new(protocol.TaskType)
	taskInfo.Type = &type_id
	taskInfo.Id = &id

	base := new(protocol.Task_SubmitTask)
	base.TaskInfo = taskInfo

	encObj, _ := proto.Marshal(base)
	SendPackage(*conn, 1803, encObj)
}