cyzhao пре 7 месеци
родитељ
комит
f92a2a4c7a

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

@@ -68,10 +68,6 @@ class CmdCode {
      */
     const cmd_mpay_NewFirstRecharge = 8815;
 
-    /**
-     * 购买高级7日签到
-     */
-    const cmd_pay_buyDay7_Sign_High = 8816;
     
 //
 //

+ 9 - 35
Gameserver/App/model/User/Info_PrivateState.php

@@ -53,21 +53,7 @@ class Info_PrivateState extends Object_ext {
      * 钻石商城的购买记录
      */
     #[ArrayType]
-    public $cashShopReceived = array();
-    public $supplyBichuDic = null;
-
-    /**
-     * 每天买的数量,每日重置(S级军备和补给箱)
-     * @var type
-     */
-    public $junbeiShopNumRecord = null;
-
-    /**
-     * 总的数量,每日不重置,必出后重置
-     * @var type
-     */
-    public $junbeiShop_AllNumRecord = null;
-    public $junbeiShop_XinYuan = null;
+    public $cashShopReceived = array();   
 
     /**
      * 登录天数
@@ -338,13 +324,7 @@ class Info_PrivateState extends Object_ext {
      * @var type
      */
     #[ArrayType]
-    public $lotteryExchange = array();
-    
-    /**
-     * 高级签到购买时间
-     * @var type
-     */
-    public $sign_high_buyTs = 0;
+    public $lotteryExchange = array();  
     
     /**
      * 限时贩售 刷新时间
@@ -420,24 +400,18 @@ class Info_PrivateState extends Object_ext {
      */
     public $battlePass_taskPoint = 0;
 
+    /**
+     * 
+     * @var type
+     */
+    public $battlePass_tili = 0;
 
     public function initialize() {
-//        $this->junbeiShopNumRecord = new \stdClass();
-//        $this->junbeiShop_AllNumRecord = new \stdClass();
-//        $this->junbeiShop_XinYuan = new \stdClass();
     }
 
     public function __construct($arg = null) {
-        if ($arg == null) {
-            if ($this->junbeiShopNumRecord == null) {
-                $this->junbeiShopNumRecord = new \stdClass();
-                $this->junbeiShop_AllNumRecord = new \stdClass();
-                $this->junbeiShop_XinYuan = new \stdClass();
-                $this->supplyBichuDic = new \stdClass();
-                $this->skillLockerNumber = glc()->Skill_LockBtn_InitCount;       # 初始值
-                //$this->subFunStartTs = new \stdClass();
-                
-            }
+        if ($arg == null) {           
+            $this->skillLockerNumber = glc()->Skill_LockBtn_InitCount;       # 初始值
         } else {
             parent::__construct($arg);
             if ($this->skillLockerNumber < glc()->Skill_LockBtn_InitCount) {

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

@@ -114,12 +114,6 @@ class Info_UserBase extends Object_ext {
      */
     public $fRechargePriceReceived = 0;
     
-    /**
-     * 消耗体力统计
-     * @var type
-     */
-    public $cost_tili = 0;
-
     public function initialize() {
 //        my_Assert(GameConfig::primordial_data(), "找不到账号初始化数据");         # 防御
         $this->gold = glc()->Init_Player_gold;

+ 1 - 1
Gameserver/App/process/ActiveProc.php

@@ -503,7 +503,7 @@ class ActiveProc {
 
                 break;
             case Enum_SubFunType::Tili_BattleBass:
-                my_Assert($typeId >= ctx()->base(false)->cost_tili, ErrCode::active_costTiliNotEnough);
+                my_Assert($typeId >= ctx()->privateData()->battlePass_tili, ErrCode::active_costTiliNotEnough);
 
                 break;
             case Enum_SubFunType::Gate_BattleBass:

+ 2 - 2
Gameserver/App/process/FightProc.php

@@ -246,7 +246,7 @@ class FightProc {
 
         ctx()->gates->fightSweepNum += 1;
         ctx()->baseInfo->Consume_tili($costTili);
-        ctx()->base(true)->cost_tili += $costTili;
+        ctx()->privateData(true)->battlePass_tili += $costTili;
 
         $wavesArr = GameConfig::waves_getItemArray($passGateId);
         $count = count($wavesArr);
@@ -387,7 +387,7 @@ class FightProc {
             ctx()->gates()->TowerGateInfo()->TodayChanNum--;                    # 增加次数
         } else {                                                                # 主线剧情
             my_Assert(ctx()->base(true)->Consume_tili($mo->cost_tili), ErrCode::notenough_tili);
-            ctx()->base(true)->cost_tili += $mo->cost_tili;
+            ctx()->privateData(true)->battlePass_tili += $mo->cost_tili;
         }
         UserProc::updateUserInfo();
         return Resp::ok(array("tili" => ctx()->baseInfo->tili, "tili_ts" => ctx()->baseInfo->tili_ts));

+ 0 - 34
Gameserver/App/process/PayProc.php

@@ -65,40 +65,6 @@ class PayProc {
         }
     }
 
-    /**
-     * 8816 购买高级7日签到
-     */
-    static function buyDay7_Sign_High() {
-        //list() = req()->paras;
-        $mo = GameConfig::subfun_unlock_getItem(2);
-        my_Assert($mo != null, ErrCode::err_const_no);
-
-        my_Assert(now() >= $mo->startTs && now()->$mo->endTs, ErrCode::active_time);
-        ctx()->privateData(true)->sign_high_buyTs = now();
-
-        $startDay = TimeUtil::totalDays($mo->startTs);
-        $curDay = TimeUtil::totalDays(now());
-
-        $n = $curDay - $startDay;
-        $dic = GameConfig::activity_day7();
-        for ($i = 1; $i <= $n + 1; $i++) {
-            if (StlUtil::dictHasProperty($dic, $i)) {
-                ctx()->privateData(true)->day7_drawed[] = $i . "-2";
-                StoreProc::AddMultiItemInStore(GameConfig::activity_day7_getItem($i)->reward_high);
-            }
-        }
-
-        UserProc::updateUserInfo();
-        return Resp::ok(array('gold' => ctx()->baseInfo->gold,
-                    'cash' => ctx()->baseInfo->cash,
-                    'store' => ctx()->store,
-                    'day7_drawed;' => ctx()->privateState->day7_drawed,
-                    'sign_high_buyTs;' => ctx()->privateState->sign_high_buyTs,
-                    'reward' => StoreProc::$reward,
-                    'reward_Gem' => StoreProc::$reward_Gem,
-        ));
-    }
-
     /**
      * 8804 累计充值
      */

+ 2 - 68
Gameserver/App/process/ShopProc.php

@@ -355,72 +355,7 @@ class ShopProc {
      */
     public static function BuyShop_BujiBox($type, $typeId, $buyNum) {
         $equip = array();
-
-        $mo = GameConfig::shop_supply_getItem($typeId);
-        my_Assert($mo != null, ErrCode::err_const_no);
-
-        $list = explode(',', $mo->cost);
-        my_Assert(StlUtil::dictHasProperty(ctx()->store->items, $list[0]), ErrCode::notenough_item);
-
-        ctx()->store->removeItem($list[0], $list[1]);
-        ctx()->baseInfo->Add_Gold($mo->gold);
-        if (!StlUtil::dictHasProperty(ctx()->privateState->junbeiShopNumRecord, $typeId)) {
-            ctx()->privateState->junbeiShopNumRecord->$typeId = 0;
-        }
-        $num = ctx()->privateState->junbeiShopNumRecord->$typeId += 1;
-
-        if (!StlUtil::dictHasProperty(ctx()->privateState->supplyBichuDic, $typeId)) {
-            ctx()->privateState->supplyBichuDic->$typeId = 0;
-        }
-        ctx()->privateState->supplyBichuDic->$typeId += 1;
-
-        my_Assert($num <= $mo->limitNum, ErrCode::user_shop_LimitNum);
-        $plist = explode(';', $mo->percent);
-        $randNum = rand(0, 10000);
-        $start = 0;
-        $end = 0;
-        $qual = null;
-        foreach ($plist as $item) {
-            $arr = explode(',', $item);
-
-            $per = $arr[2] * 100;
-            $end += $per;
-            if ($randNum >= $start && $randNum < $end) {
-                $qual = $arr[0] . ',' . $arr[1]; //品阶,稀有度
-                break;
-            }
-            $start = $end;
-        }
-        //必出
-        $bichu = explode(',', $mo->bichu);
-        $qArr = explode(',', $qual);
-        if ($qArr[0] == $bichu[1] && $qArr[1] == $bichu[2]) {//得到必出,重置数量记录
-            ctx()->privateState->supplyBichuDic->$typeId = 0;
-            $qual = $bichu[1] . ',' . $bichu[2];
-        } else {
-            if (ctx()->privateState->supplyBichuDic->$typeId == $bichu[0]) {
-                $qual = $bichu[1] . ',' . $bichu[2];
-                ctx()->privateState->supplyBichuDic->$typeId = 0;
-            }
-        }
-
-        if ($qual != null) {
-            $str = explode(',', $qual);
-
-            $equipList = array();
-            $dic = GameConfig::equip();
-            foreach ($dic as $tid => $item) {
-                if ($item->qual == $str[0] && $item->rarity == $str[1]) {
-                    $equipList[] = $item->typeId;
-                }
-            }
-
-            $rNum = rand(0, count($equipList) - 1);
-            $equipId = $equipList[$rNum];
-            StoreProc::PutEquipInStore($equipId, 1);
-            $equip[] = $equipId;
-        }
-
+      
         return $equip;
     }
 
@@ -577,8 +512,7 @@ class ShopProc {
         ctx()->privateState->goldShop_CoolDownTs_1 = 0;
         ctx()->privateState->goldShop_GuangGaoNum = 0;
 
-        ctx()->privateState->junbeiShopNumRecord = new \stdClass();
-
+        
         ctx()->privateState->dailyShop_GuangGaoNum = 0;
         ctx()->privateState->dailyShop_GuangGaoTs = 0;
 

+ 1 - 1
Gameserver/App/process/UserProc.php

@@ -513,7 +513,7 @@ class UserProc {
         if($curMonth != $lastMonth_tili){
             ctx()->privateState->battlePass_tili_open_ts = now();
             ctx()->privateData(true)->battlePass_tili_cost_ts = 0;
-            ctx()->base()->cost_tili = 0;
+            ctx()->privateData(true)->battlePass_tili = 0;
             ActiveProc::ResetBattlePassReward(Enum_SubFunType::Tili_BattleBass);
         }