---
# System prepended metadata

title: 任務獎勵推送

---

# 任務獎勵推送


## 企劃表單

### 排程表單
| ScheduleId | Quest |
| ----------:|:----- |
|        101 | [1]   |
|        102 | [1,2] |

### 任務表單

| QuestId | Group | Finish | SubQuest | Reward |
| -------:| -----:| ------:|:-------- | ------:|
|    1001 |     1 |     10 | [1,2,3]  |  10001 |
|    1002 |     1 |     20 | [1,2,3]  |  10002 |
|    1003 |     1 |     30 | [1,2,3]  |  10003 |
|    2001 |     2 |      3 | [5]      |  10011 |
|    2002 |     2 |      5 | [5]      |  10012 |


## 完成任務前


### 任務進度表

|  Id | Owner | ScheduleId | Group | QuestId | Progress |
| ---:| -----:| ----------:| -----:| -------:| --------:|
|   1 |     1 |        101 |     1 |       0 |        2 |
|   2 |     2 |        101 |     1 |       0 |       10 |

### 獎勵表
| Id  | Owner | Source | Refer | ExpireTime |
| --- | ----- | ------ | ----- | ---------- |
|     |       |        |       |            |


## 完成任務後

+ Owner = 1, Group = 1, QuestId 0 -> 1002, Progress 2 -> 21
+ Owner = 2, Group = 1, QuestId 0 -> 1001
+ Owner = 2, Group = 2, Progress 0 -> 2

### 任務進度表

|  Id | Owner | ScheduleId | Group | QuestId | Progress |
| ---:| -----:| ----------:| -----:| -------:| --------:|
|   1 |     1 |        101 |     1 |    1002 |       21 |
|   2 |     2 |        101 |     1 |    1001 |       10 |
|   3 |     2 |        102 |     2 |       0 |        2 |

### 獎勵表

+ Source - 獎勵來源
    + 0 - 系統獎勵 [獎勵ID]
    + 1 - 任務獎勵 [排程ID,任務ID]
    + (2 - 郵件獎勵 [郵件ID,獎勵ID])
    + ..依需求擴增


|  Id | Owner | Source | Refer          | ExpireTime |
| ---:| -----:| ------:|:-------------- | ----------:|
|   1 |     1 |      1 | [101,1001]     |          0 |
|   2 |     1 |      1 | [101,1002]     |          0 |
|   3 |     2 |      1 | [101,1001]     |          0 |
|   4 |     2 |      0 | [10060]        |          0 |
|   5 |     3 |      2 | [200023,10075] |       (ts) |

### 客戶端行為
+ 玩家1的排程101任務1的進度值達到21,且前兩個達成獎勵還沒領,需要檢查任務表單要自動或點擊領取
+ 玩家2有一筆系統獎勵,應該在收到當下或登入時自動在背景跟服務端領取
+ 玩家3有一筆包含獎勵的郵件未領取,在若干時間後過期,需要點擊領取