瀏覽代碼

激活码奖励邮件

cyzhao 11 月之前
父節點
當前提交
11f5b37001
共有 2 個文件被更改,包括 16 次插入2 次删除
  1. 3 2
      Gameserver/App/process/ActiveProc.php
  2. 13 0
      Gameserver/App/process/EmailProc.php

+ 3 - 2
Gameserver/App/process/ActiveProc.php

@@ -47,6 +47,7 @@ class ActiveProc {
             my_Assert(!in_array($codestring, ctx()->privateState->usedTokens), ErrCode::active_hasgetted); # 已经领取过该礼包了
             $packageID = $codestring;
             $err = StoreProc::AddMultiItemInStore($packageInfo->reward);            # 发放礼包
+            EmailProc::SendPackageByCodeMail(req()->zoneid, req()->uid, $packageInfo->reward);           
             my_Assert(ErrCode::ok == $err, $err);
         } else {
             $active = GameConfig::activity_getItem($activeId);                      # 活动数据
@@ -87,9 +88,9 @@ class ActiveProc {
             "reward" => $packageInfo->reward,
             'gold' => ctx()->base()->gold,
             'cash' => ctx()->base()->cash,
-            'tili' => ctx()->base()->tili,
+            //'tili' => ctx()->base()->tili,
             'store' => ctx()->store,
-            'hero' => ctx()->heros,
+            //'hero' => ctx()->heros,
         );
         return Resp::ok($ret);                                                  # 返回成功信息
     }

+ 13 - 0
Gameserver/App/process/EmailProc.php

@@ -548,6 +548,19 @@ class EmailProc {
                 "资源月卡每日奖励!", $reward);
         self::InsertMail($zoneid, $uid, $mail);
     }
+    
+    /**
+     * 激活码邮件
+     * @param type $zoneid
+     * @param type $uid
+     * @param type $title
+     * @param type $content
+     */
+    public static function SendPackageByCodeMail($zoneid, $uid, $reward) {
+        $mail = new Ins_Email(null, enum_Mail_Type::SysTemMail, "激活码兑换礼包奖励", #
+                "激活码兑换礼包奖励!", $reward);
+        self::InsertMail($zoneid, $uid, $mail);
+    }
 
 // </editor-fold>
 //