Explorar o código

章节礼包分页记录

cyzhao hai 8 meses
pai
achega
591c96b6f5

+ 5 - 0
Gameserver/App/base/CmdCode.php

@@ -281,6 +281,11 @@ class CmdCode {
      * 购买体力
      */
     const cmd_shop_BuyTili = 6502;
+    
+    /**
+     * 章节礼包 选中记录
+     */
+    const cmd_shop_GateGift_ShowGateId = 6503;
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="英雄模块操作码 - 66xx">
 //

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

@@ -351,6 +351,12 @@ class Info_PrivateState extends Object_ext {
      * @var type
      */
     public $nextDayLogin = 0;
+    
+    /**
+     * 章节礼包选中哪页下次进来还是哪页
+     * @var type
+     */
+    public $shop_gateGift_showGateId = 0;
 
     public function initialize() {
         $this->junbeiShopNumRecord = new \stdClass();

+ 22 - 0
Gameserver/App/process/ShopProc.php

@@ -26,11 +26,33 @@ class ShopProc {
                 return ShopProc::ShopBuyGift();
             case CmdCode::cmd_shop_BuyTili:                                     # 6502 买体力
                 return ShopProc::BuyTili();
+            case CmdCode::cmd_shop_GateGift_ShowGateId:                         # 6503 章节礼包 分页选中记录
+                return ShopProc::Shop_GateGift_ShowGateId();
             default:
                 Err(ErrCode::cmd_err);
         }
     }
+    
+    /**
+     * 6503 章节礼包 分页选中记录
+     */
+    public static function Shop_GateGift_ShowGateId() {
+        list($gateId) = req()->paras;
+        
+        my_Assert(StlUtil::dictHasProperty(ctx()->gates->GateList,$gateId), ErrCode::active_const_no_err);
+        $mo = GameConfig::shop_gategift_getItem($gateId);
+        my_Assert($mo != null, ErrCode::err_const_no);
+        
+        ctx()->privateState->shop_gateGift_showGateId = $gateId;
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array());
+    }
 
+    /**
+     * 6502 买体力
+     * @return type
+     */
     public static function BuyTili() {
         list($type) = req()->paras;