cyzhao 1 anno fa
parent
commit
9730229544
28 ha cambiato i file con 322 aggiunte e 26 eliminazioni
  1. 17 1
      Gameserver/App/configs/GameConfig.php
  2. 17 1
      Gameserver/App/model/Const/GameConfig.php
  3. 1 1
      Gameserver/App/model/Const/sm_achieve_new.php
  4. 1 1
      Gameserver/App/model/Const/sm_active_day7_accumulate.php
  5. 1 1
      Gameserver/App/model/Const/sm_activity_day7.php
  6. 1 1
      Gameserver/App/model/Const/sm_clientVersionHistory.php
  7. 1 1
      Gameserver/App/model/Const/sm_equip.php
  8. 1 1
      Gameserver/App/model/Const/sm_equip_levelupgrade.php
  9. 1 1
      Gameserver/App/model/Const/sm_errmsg.php
  10. 1 1
      Gameserver/App/model/Const/sm_evolve.php
  11. 1 1
      Gameserver/App/model/Const/sm_gate.php
  12. 1 1
      Gameserver/App/model/Const/sm_gate_sbox.php
  13. 1 1
      Gameserver/App/model/Const/sm_gem.php
  14. 1 1
      Gameserver/App/model/Const/sm_globalsettings.php
  15. 1 1
      Gameserver/App/model/Const/sm_hero.php
  16. 1 1
      Gameserver/App/model/Const/sm_heroattr.php
  17. 1 1
      Gameserver/App/model/Const/sm_item.php
  18. 1 1
      Gameserver/App/model/Const/sm_plots.php
  19. 14 4
      Gameserver/App/model/Const/sm_predicate.php
  20. 1 1
      Gameserver/App/model/Const/sm_service_schedule.php
  21. 1 1
      Gameserver/App/model/Const/sm_shop_cash.php
  22. 47 0
      Gameserver/App/model/Const/sm_shop_monthcard.php
  23. 1 1
      Gameserver/App/model/Const/sm_sysmail.php
  24. 2 0
      Gameserver/App/model/User/EnumShopGift.php
  25. 17 0
      Gameserver/App/model/User/Info_PrivateState.php
  26. 123 0
      Gameserver/App/model/User/Ins_Email.php
  27. 25 0
      Gameserver/App/process/EmailProc.php
  28. 41 1
      Gameserver/App/process/ShopProc.php

+ 17 - 1
Gameserver/App/configs/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-17 11:16:09
+ // 日期: 2024-04-24 14:51:36
 ////////////////////
 ////////////////////
 
 
 namespace loyalsoft;
 namespace loyalsoft;
@@ -495,6 +495,22 @@ class GameConfig {
         return self::get_hash_item('shop_box', $itemid);
         return self::get_hash_item('shop_box', $itemid);
     }
     }
     /**
     /**
+    * 商城月卡
+    * @return \shop_monthcard
+    */
+    public static function shop_monthcard()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'shop_monthcard');
+    }
+    /**
+    * @return \sm_shop_monthcard shop_monthcard item数据 
+    */
+    public static function shop_monthcard_getItem($itemid)
+    { 
+        return self::get_hash_item('shop_monthcard', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * 当前版本(时间戳)
     * @return \ver
     * @return \ver
     */
     */

+ 17 - 1
Gameserver/App/model/Const/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-22 15:50:47
+ // 日期: 2024-04-24 14:51:36
 ////////////////////
 ////////////////////
 
 
 /**
 /**
@@ -493,6 +493,22 @@ class GameConfig {
         return self::get_hash_item('shop_box', $itemid);
         return self::get_hash_item('shop_box', $itemid);
     }
     }
     /**
     /**
+    * 商城月卡
+    * @return \shop_monthcard
+    */
+    public static function shop_monthcard()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'shop_monthcard');
+    }
+    /**
+    * @return \sm_shop_monthcard shop_monthcard item数据 
+    */
+    public static function shop_monthcard_getItem($itemid)
+    { 
+        return self::get_hash_item('shop_monthcard', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * 当前版本(时间戳)
     * @return \ver
     * @return \ver
     */
     */

+ 1 - 1
Gameserver/App/model/Const/sm_achieve_new.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:34
+ // 日期: 2024-04-22 17:07:04
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_active_day7_accumulate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:34
+ // 日期: 2024-04-22 17:07:04
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_activity_day7.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:34
+ // 日期: 2024-04-22 17:07:04
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_clientVersionHistory.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:34
+ // 日期: 2024-04-22 17:07:05
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_equip.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:34
+ // 日期: 2024-04-22 17:07:05
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_equip_levelupgrade.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:35
+ // 日期: 2024-04-22 17:07:05
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_errmsg.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:35
+ // 日期: 2024-04-22 17:07:05
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_evolve.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:35
+ // 日期: 2024-04-22 17:07:05
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_gate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 17:32:47
+ // 日期: 2024-04-23 14:52:52
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_gate_sbox.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-17 18:32:47
+ // 日期: 2024-04-22 17:07:06
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_gem.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:35
+ // 日期: 2024-04-22 17:07:06
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_globalsettings.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:35
+ // 日期: 2024-04-22 17:07:06
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_hero.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-18 16:32:47
+ // 日期: 2024-04-22 17:07:06
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_heroattr.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:35
+ // 日期: 2024-04-22 17:07:06
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_item.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-18 14:34:04
+ // 日期: 2024-04-22 17:07:06
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_plots.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-19 15:31:10
+ // 日期: 2024-04-23 16:38:49
 ////////////////////
 ////////////////////
 
 
 
 

+ 14 - 4
Gameserver/App/model/Const/sm_predicate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-16 09:59:45
+ // 日期: 2024-04-24 11:17:26
 ////////////////////
 ////////////////////
 
 
 
 
@@ -59,17 +59,17 @@ class sm_predicate
     public $actionType;
     public $actionType;
 
 
     /**
     /**
-    * @var Single 行为参数1: default(0) 
+    * @var String 行为参数1:  
     */
     */
     public $actionParam1;
     public $actionParam1;
 
 
     /**
     /**
-    * @var Single 行为参数2: default(0) 
+    * @var String 行为参数2:  
     */
     */
     public $actionParam2;
     public $actionParam2;
 
 
     /**
     /**
-    * @var Single 行为参数3:  
+    * @var String 行为参数3:  
     */
     */
     public $actionParam3;
     public $actionParam3;
 
 
@@ -83,5 +83,15 @@ class sm_predicate
     */
     */
     public $desc2;
     public $desc2;
 
 
+    /**
+    * @var Int32 跟宝石品质一一对应  
+    */
+    public $qual;
+
+    /**
+    * @var String 可以允许出现该词条的部位列表(逗号分隔的,123456)  
+    */
+    public $positions;
+
 }
 }
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_service_schedule.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:36
+ // 日期: 2024-04-22 17:07:07
 ////////////////////
 ////////////////////
 
 
 
 

+ 1 - 1
Gameserver/App/model/Const/sm_shop_cash.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:36
+ // 日期: 2024-04-22 17:07:07
 ////////////////////
 ////////////////////
 
 
 
 

+ 47 - 0
Gameserver/App/model/Const/sm_shop_monthcard.php

@@ -0,0 +1,47 @@
+<?php
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2024-04-24 14:44:52
+////////////////////
+
+
+/**
+ * Static Model shop_monthcard 商城月卡
+ */
+class sm_shop_monthcard
+{
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $typeId;
+
+    /**
+    * @var String 用途未知!!请到数据库中添加字段注释。  
+    */
+    public $name;
+
+    /**
+    * @var String 购买奖励  
+    */
+    public $buy_reward;
+
+    /**
+    * @var String 月内每天发送的奖励  
+    */
+    public $daily_reward;
+
+    /**
+    * @var Int32 购买的价钱 default(0) 
+    */
+    public $price;
+
+    /**
+    * @var String 描述信息  
+    */
+    public $desc;
+
+}
+

+ 1 - 1
Gameserver/App/model/Const/sm_sysmail.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-04-15 13:59:37
+ // 日期: 2024-04-22 17:07:08
 ////////////////////
 ////////////////////
 
 
 
 

+ 2 - 0
Gameserver/App/model/User/EnumShopGift.php

@@ -28,6 +28,8 @@ class EnumShopGift extends Enum{
     const Gold_Shop = 6;
     const Gold_Shop = 6;
     
     
     const GemBox_Shop = 7;
     const GemBox_Shop = 7;
+    
+    const MonthCard_Shop = 8;
 
 
 }
 }
 
 

+ 17 - 0
Gameserver/App/model/User/Info_PrivateState.php

@@ -165,6 +165,23 @@ class Info_PrivateState extends Object_ext {
      */
      */
     public $goldShop_GuangGaoTs_3 = 0;
     public $goldShop_GuangGaoTs_3 = 0;
     
     
+    /**
+     * 月卡
+     * @var type
+     */
+    //public $monthCardShop_Received = array();
+    
+    /**
+     * 资源月卡购买时间记录 
+     * @var int
+     */
+    public $monthCardShop_ts = 0;
+    
+    /**
+     * 特权月卡购买时间记录
+     * @var int
+     */
+    public $honourCardShop_ts = 0;
     
     
     public function initialize() {
     public function initialize() {
         $this->junbeiShopNumRecord = new \stdClass();
         $this->junbeiShopNumRecord = new \stdClass();

+ 123 - 0
Gameserver/App/model/User/Ins_Email.php

@@ -0,0 +1,123 @@
+<?php
+
+namespace loyalsoft;
+
+/**
+ * 邮件数据模型
+ * @version
+ *          1.0.0 Created at 2017-4-27. by --gwang
+ * @author gwang (mail@wanggangzero.cn)
+ * @copyright ? 2017-4-27, SJZ LoyalSoft Corporation & gwang. All rights reserved.
+ */
+class Ins_Email extends Object_ext {
+
+    /**
+     * 邮件编号
+     * @var int
+     */
+    public $mailId;
+
+    /**
+     * 发件人uid
+     * @var string
+     */
+    public $sender_uid;
+
+    /**
+     * 发件人昵称
+     * @var string
+     */
+    public $sender_name;
+
+    /**
+     * 附件
+     * @var string itemId,num;itemId,num;....
+     */
+    public $appendix;
+
+    /**
+     * 邮件类型
+     * @var int
+     */
+    public $type;
+
+    /**
+     * 邮件标题
+     * @var string
+     */
+    public $title;
+
+    /**
+     * 邮件正文
+     * @var string[]
+     */
+    public $content;
+
+    /**
+     * 附加标签
+     * @var obj
+     */
+    public $tag;
+
+    /**
+     * 打开/读取邮件 时间戳
+     * @var ts
+     */
+    public $readts = 0;
+
+    /**
+     * 领取时间
+     * @var ts
+     */
+    public $drawedts = 0;
+
+    /**
+     * 发送时间
+     * @var ts
+     */
+    public $insertts = 0;
+
+    /**
+     * 邮件是否已经领取
+     * true = 已读
+     * @return bool
+     */
+    public function isDrawed() {
+        return $this->drawedts > 0;
+    }
+
+    /**
+     * 计算邮件的超时时间
+     * @return type
+     */
+    public function ExpireTs() {
+        return $this->insertts + EmailProc::MaxMailExpireTs;
+    }
+
+    /**
+     * 邮件是否存在奖励内容
+     * true = 有奖励
+     * false =  无
+     * @return bool
+     */
+    public function isExistReward() {
+        return strlen($this->appendix) > 0;
+    }
+
+    function __construct($tag = null, $type = 1, $title = "", $content = "", $appendix = "", #
+            $uid_sender = "系统", $name_sender = "系统") {
+        if (1 == func_num_args() && $tag) {                                     # 默认的Object初始化方法
+            parent::__construct($tag);
+        } else {                                                                # 并非只有一个参数的情况下, tag还是tag
+            $this->tag = $tag;
+            $this->type = $type;
+            $this->title = $title;
+            $this->content = $content;
+            $this->appendix = $appendix;
+            $this->sender_uid = $uid_sender;
+            $this->sender_name = $name_sender;
+            $this->insertts = now();                                            # 初始化插入/创建时间
+        }
+    }
+
+}

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

@@ -23,6 +23,11 @@ class enum_Mail_Type extends Enum {
 
 
     /** 公会邮件 */
     /** 公会邮件 */
     const GuildNoticeMail = 8;
     const GuildNoticeMail = 8;
+    
+    /**
+     * 商城邮件
+     */
+    const ShopMail = 9;
 }
 }
 
 
 /**
 /**
@@ -522,6 +527,26 @@ class EmailProc {
 
 
 // </editor-fold>
 // </editor-fold>
 //
 //
+
+// <editor-fold defaultstate="collapsed" desc="   商城邮件   
+// ">
+
+    /**
+     * 商城月卡奖励邮件发送
+     * @param type $zoneid
+     * @param type $uid
+     * @param type $title
+     * @param type $content
+     */
+    public static function SendMonthCardRewardMail($zoneid, $uid,$reward) {
+        $mail = new Ins_Email(null, enum_Mail_Type::ShopMail, "资源月卡每日奖励", #
+                "资源月卡每日奖励!", $reward);
+        self::InsertMail($zoneid, $uid, $mail);
+    }
+   
+// </editor-fold>
+//    
+
 // <editor-fold defaultstate="collapsed" desc="    辅助方法    ">
 // <editor-fold defaultstate="collapsed" desc="    辅助方法    ">
 
 
     /**
     /**

+ 41 - 1
Gameserver/App/process/ShopProc.php

@@ -363,6 +363,22 @@ class ShopProc {
                 StoreProc::AddMultiItemInStore($mo->reward);
                 StoreProc::AddMultiItemInStore($mo->reward);
 
 
                 break;
                 break;
+            
+            case EnumShopGift::MonthCard_Shop:
+                $mo = GameConfig::shop_monthcard_getItem($typeId);
+                my_Assert($mo != null, ErrCode::err_const_no);
+                
+                my_Assert($user->privateState->monthCardShop_ts == 0, ErrCode::err_const_no);
+                
+                //$user->privateState->monthCardShop_Received[] = $typeId;
+                StoreProc::AddMultiItemInStore($mo->buy_reward);
+                
+                if($typeId == 1){
+                    $user->privateState->monthCardShop_ts = now();
+                } else {
+                    $user->privateState->honourCardShop_ts = now();
+                }
+                break;
             default:
             default:
                 break;
                 break;
         }
         }
@@ -393,9 +409,33 @@ class ShopProc {
         ctx()->privateState->junbeiShopNumRecord = new \stdClass();
         ctx()->privateState->junbeiShopNumRecord = new \stdClass();
 
 
         ctx()->privateState->dailyShop_GuangGaoNum = 0;
         ctx()->privateState->dailyShop_GuangGaoNum = 0;
-        ctx()->privateState->dailyShop_GuangGaoTs = 0;
+        ctx()->privateState->dailyShop_GuangGaoTs = 0;      
+        self::ShopMonthClear();                
     }
     }
 
 
+    /**
+     * 月卡按照时间记录的一个月后清理
+     */
+    public static function ShopMonthClear(){
+        $monthTs = 30*24*60*60;
+        
+        if(ctx()->privateState->monthCardShop_ts > 0){
+            if(now() - ctx()->privateState->monthCardShop_ts >= $monthTs){
+                ctx()->privateState->monthCardShop_ts = 0;
+            } else {
+                EmailProc::SendMonthCardRewardMail($zoneid, $uid, $reward);
+            }
+            
+        }                
+//        if(ctx()->privateState->monthCardShop_ts >0 && now() - ctx()->privateState->monthCardShop_ts >= $monthTs){
+//            ctx()->privateState->monthCardShop_ts = 0;
+//        }
+        
+        if(ctx()->privateState->honourCardShop_ts >0 && now() - ctx()->privateState->honourCardShop_ts >= $monthTs){
+            ctx()->privateState->honourCardShop_ts = 0;
+        }
+    }
+    
     /**
     /**
      * 每日商城随机6个道具
      * 每日商城随机6个道具
      * @return type
      * @return type