cyzhao 1 жил өмнө
parent
commit
5d1c0ff786

+ 2 - 2
Gameserver/App/base/Resp.php

@@ -103,11 +103,11 @@ class Resp extends Object_ext {
         if (count($this->events) > 0) {                                         # 对于出现event的情况下自动附带store到客户端.
         if (count($this->events) > 0) {                                         # 对于出现event的情况下自动附带store到客户端.
             if (is_array($this->result)) {
             if (is_array($this->result)) {
                 if (!array_key_exists('task', (array) $this->result)) {
                 if (!array_key_exists('task', (array) $this->result)) {
-                    $this->result['task'] = ctx()->task;
+                    //$this->result['task'] = ctx()->task;
                 }
                 }
             } else {
             } else {
                 if (!array_key_exists('task', (array) $this->result)) {
                 if (!array_key_exists('task', (array) $this->result)) {
-                    $this->result->task = ctx()->task;
+                    //$this->result->task = ctx()->task;
                 }
                 }
             }
             }
         }
         }

+ 1 - 1
Gameserver/App/model/User/Enum_ActiveTaskCmdType.php

@@ -33,7 +33,7 @@ class Enum_ActiveTaskCmdType extends Enum {
     
     
     const AccumulateGoldNum = 801;       //累计获取10000金币 
     const AccumulateGoldNum = 801;       //累计获取10000金币 
     const AccumulateTiliNum = 802;       //累计获取10000体力
     const AccumulateTiliNum = 802;       //累计获取10000体力
-    const AccumulateCashNum = 803;       //累计获取10000钻石
+    const ConsumeCashNum = 803;       //累计消耗10000钻石
     
     
     const OpenNumBrightBox = 901;       //开启1次璀璨宝石箱 
     const OpenNumBrightBox = 901;       //开启1次璀璨宝石箱 
     const BuyNumDailyShop = 902;       //每日商店购买物品1次   
     const BuyNumDailyShop = 902;       //每日商店购买物品1次   

+ 3 - 2
Gameserver/App/model/User/Info_UserBase.php

@@ -224,8 +224,7 @@ class Info_UserBase extends Object_ext {
      * @param type $amt
      * @param type $amt
      */
      */
     function Add_Cash($amt) {
     function Add_Cash($amt) {
-        my_Assert($amt >= 0, "amt值为负");
-        TaskProc::OnAccumulateCashNum($amt);
+        my_Assert($amt >= 0, "amt值为负");       
         $this->cash += $amt;
         $this->cash += $amt;
     }
     }
 
 
@@ -241,6 +240,8 @@ class Info_UserBase extends Object_ext {
                 return true;
                 return true;
             }
             }
         }
         }
+        
+        TaskProc::OnConsumeCashNum($amt);
         return false;
         return false;
     }
     }
 
 

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

@@ -98,6 +98,7 @@ class FightProc {
             'fightSweepNum' => ctx()->gates->fightSweepNum,
             'fightSweepNum' => ctx()->gates->fightSweepNum,
             'prizeArr' => $prizeArr,
             'prizeArr' => $prizeArr,
             'store' => ctx()->store,
             'store' => ctx()->store,
+            'task'=> ctx()->task,
         );
         );
         return Resp::ok($ret);
         return Resp::ok($ret);
     }
     }
@@ -378,7 +379,11 @@ class FightProc {
         $t->skill_zhudong_lockState = $li_zds;
         $t->skill_zhudong_lockState = $li_zds;
         $t->skill_beidong_lockState = $li_bds;
         $t->skill_beidong_lockState = $li_bds;
         UserProc::updateUserInfo();
         UserProc::updateUserInfo();
-        return Resp::ok();
+        
+        $ret = array(               
+                'task'=> ctx()->task,
+            );
+        return Resp::ok($ret);
     }
     }
 
 
     /**
     /**
@@ -420,7 +425,8 @@ class FightProc {
             $ret = array(
             $ret = array(
                 'store' => ctx()->store,
                 'store' => ctx()->store,
                 'gold' => ctx()->base()->gold,
                 'gold' => ctx()->base()->gold,
-                'cash' => ctx()->base()->cash
+                'cash' => ctx()->base()->cash,
+                'task'=> ctx()->task,
             );
             );
             return Resp::ok($ret);
             return Resp::ok($ret);
         }
         }
@@ -500,6 +506,7 @@ class FightProc {
         $ret = array(
         $ret = array(
             'gates' => ctx()->gates,
             'gates' => ctx()->gates,
             'store' => ctx()->store,
             'store' => ctx()->store,
+            'task'=> ctx()->task,
         );
         );
         return Resp::ok($ret);
         return Resp::ok($ret);
     }
     }
@@ -563,6 +570,7 @@ class FightProc {
         $ret = array(
         $ret = array(
             'gates' => ctx()->gates,
             'gates' => ctx()->gates,
             'store' => ctx()->store,
             'store' => ctx()->store,
+            'task'=> ctx()->task,
         );
         );
         return Resp::ok($ret);
         return Resp::ok($ret);
     }
     }

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

@@ -61,6 +61,7 @@ class ShopProc {
             "privateState"=>ctx()->privateState,
             "privateState"=>ctx()->privateState,
             "baseInfo"=>ctx()->baseInfo,
             "baseInfo"=>ctx()->baseInfo,
             "tili"=>$addTili,
             "tili"=>$addTili,
+            "task"=> ctx()->task,
             ));
             ));
     }
     }
 
 
@@ -464,7 +465,9 @@ class ShopProc {
                     'cash' => $user->baseInfo->cash,
                     'cash' => $user->baseInfo->cash,
                     'gold' => $user->baseInfo->gold,
                     'gold' => $user->baseInfo->gold,
                     'privateState' => $user->privateState,
                     'privateState' => $user->privateState,
-                    'store' => $user->store,));
+                    'store' => $user->store,
+                    'task'=> ctx()->task,
+                    ));
     }
     }
 
 
     /**
     /**
@@ -489,6 +492,10 @@ class ShopProc {
 
 
         ctx()->privateState->dailyShop_GuangGaoNum = 0;
         ctx()->privateState->dailyShop_GuangGaoNum = 0;
         ctx()->privateState->dailyShop_GuangGaoTs = 0;
         ctx()->privateState->dailyShop_GuangGaoTs = 0;
+        
+        ctx()->privateState->guanggaoGetTiliNum = 0;
+        ctx()->privateState->buyTiliNum = 0;
+        
         self::ShopMonthClear();
         self::ShopMonthClear();
     }
     }
 
 
@@ -502,7 +509,7 @@ class ShopProc {
             if (now() - ctx()->privateState->monthCardShop_ts >= $monthTs) {
             if (now() - ctx()->privateState->monthCardShop_ts >= $monthTs) {
                 ctx()->privateState->monthCardShop_ts = 0;
                 ctx()->privateState->monthCardShop_ts = 0;
             } else {
             } else {
-                EmailProc::SendMonthCardRewardMail($zoneid, $uid, $reward);
+                //EmailProc::SendMonthCardRewardMail($zoneid, $uid, $reward);
             }
             }
         }
         }
 //        if(ctx()->privateState->monthCardShop_ts >0 && now() - ctx()->privateState->monthCardShop_ts >= $monthTs){
 //        if(ctx()->privateState->monthCardShop_ts >0 && now() - ctx()->privateState->monthCardShop_ts >= $monthTs){

+ 13 - 4
Gameserver/App/process/StoreProc.php

@@ -250,7 +250,9 @@ class StoreProc {
         return Resp::ok(array(
         return Resp::ok(array(
                     'upLevelArr'=>$upLevelArr,
                     'upLevelArr'=>$upLevelArr,
                     'gold' => $user->baseInfo->gold,
                     'gold' => $user->baseInfo->gold,
-                    'store' => $user->store,));
+                    'store' => $user->store,
+                    'task'=>$user->task,
+            ));
     }
     }
 
 
     /**
     /**
@@ -412,7 +414,9 @@ class StoreProc {
         UserProc::updateUserInfo();
         UserProc::updateUserInfo();
         return Resp::ok(array(
         return Resp::ok(array(
                     'composeGemIds' => $resultArr,
                     'composeGemIds' => $resultArr,
-                    'store' => $user->store,));
+                    'store' => $user->store,
+                    'task'=>$user->task,
+            ));
     }
     }
 
 
     /**
     /**
@@ -558,7 +562,9 @@ class StoreProc {
         UserProc::updateUserInfo();
         UserProc::updateUserInfo();
         return Resp::ok(array(
         return Resp::ok(array(
                     'gold' => 0,
                     'gold' => 0,
-                    'store' => $user->store,));
+                    'store' => $user->store,
+                    'task'=>$user->task,
+            ));
     }
     }
 
 
     /**
     /**
@@ -628,7 +634,9 @@ class StoreProc {
         UserProc::updateUserInfo();
         UserProc::updateUserInfo();
         return Resp::ok(array(
         return Resp::ok(array(
                     'gold' => $user->baseInfo->gold,
                     'gold' => $user->baseInfo->gold,
-                    'store' => $user->store));
+                    'store' => $user->store,
+                    'task'=>$user->task,
+                ));
     }
     }
 
 
     /**
     /**
@@ -682,6 +690,7 @@ class StoreProc {
         return Resp::ok(array(
         return Resp::ok(array(
                     'gold' => $user->baseInfo->gold,
                     'gold' => $user->baseInfo->gold,
                     'store' => $user->store,
                     'store' => $user->store,
+                    'task'=>$user->task,
         ));
         ));
     }
     }
 
 

+ 3 - 3
Gameserver/App/process/TaskProc.php

@@ -486,10 +486,10 @@ class TaskProc {
     }
     }
 
 
     /**
     /**
-     * 累计获取10000钻石  
+     * 累计消耗10000钻石  
      */
      */
-    static function OnAccumulateCashNum($num) {
-        $taskEventArg = new Ins_TaskEventArgs(Enum_ActiveTaskCmdType::AccumulateCashNum, Enum_PropelType::add, $num, array());
+    static function OnConsumeCashNum($num) {
+        $taskEventArg = new Ins_TaskEventArgs(Enum_ActiveTaskCmdType::ConsumeCashNum, Enum_PropelType::add, $num, array());
         self::CheckActiveTaskConditions($taskEventArg);
         self::CheckActiveTaskConditions($taskEventArg);
     }
     }