소스 검색

等级升级加奖励

cyzhao 10 달 전
부모
커밋
e87498c950

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-11 11:42:41
+ // 日期: 2024-07-15 10:31:44
 ////////////////////
 
 /**

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

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

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

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

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-10 17:57:16
+ // 日期: 2024-07-12 15:35:47
 ////////////////////
 
 

+ 6 - 1
Gameserver/App/model/Const/sm_player_level.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-06-07 18:24:32
+ // 日期: 2024-07-15 09:51:44
 ////////////////////
 
 
@@ -33,5 +33,10 @@ class sm_player_level
     */
     public $xp_required;
 
+    /**
+    * @var String 升级奖励  
+    */
+    public $reward;
+
 }
 

+ 10 - 0
Gameserver/App/model/Const/sm_shop_box.php

@@ -53,6 +53,16 @@ class sm_shop_box
     */
     public $cost_ten;
 
+    /**
+    * @var String 买一次花费钥匙数量  
+    */
+    public $cost_one_yaoshi;
+
+    /**
+    * @var String 买十次花费钥匙数量  
+    */
+    public $cost_ten_yaoshi;
+
     /**
     * @var String X次必出某品阶宝石 例子:次数,必出的宝石品阶  
     */

+ 8 - 3
Gameserver/App/model/Const/sm_waveItem.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-11 11:31:50
+ // 日期: 2024-07-15 10:27:20
 ////////////////////
 
 
@@ -90,9 +90,14 @@ class sm_waveItem
     public $rewardTuZhi;
 
     /**
-    * @var Int32 是否控制镜头拉起 default(0) 
+    * @var Single 是否控制镜头拉起(默认是10,拉起后12.5) default(10) 
     */
-    public $isCameraControl;
+    public $cameraControl;
+
+    /**
+    * @var Int32 0 没有, 1 妖潮来袭, 2 boss来袭 default(0) 
+    */
+    public $warning;
 
 }
 

+ 8 - 3
Gameserver/App/model/Const/sm_waves.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-11 11:31:50
+ // 日期: 2024-07-15 10:27:20
 ////////////////////
 
 
@@ -90,9 +90,14 @@ class sm_waves
     public $rewardTuZhi;
 
     /**
-    * @var Int32 是否控制镜头拉起 default(0) 
+    * @var Single 是否控制镜头拉起(默认是10,拉起后12.5) default(10) 
     */
-    public $isCameraControl;
+    public $cameraControl;
+
+    /**
+    * @var Int32 0 没有, 1 妖潮来袭, 2 boss来袭 default(0) 
+    */
+    public $warning;
 
 }
 

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

@@ -270,10 +270,11 @@ class Info_UserBase extends Object_ext {
         $nextLevel = $curLevel + 1;
         while ($this->xp >= $cfgLVs->$nextLevel->xp_need) {                     # 超过升级所需经验
             if ($this->level < glc()->Game_MaxPlayerLevel) {                    # 如果未到达最大等级
-                $this->level++;
+                StoreProc::AddMultiItemInStore(GameConfig::player_level_getItem($this->level)->reward);
+                $this->level++;               
                 $this->xp -= $cfgLVs->$nextLevel->xp_need;
                 $curLevel = $this->level;
-                $nextLevel = $curLevel + 1;
+                $nextLevel = $curLevel + 1;                              
                 my_Assert(CommUtil::isPropertyExists($cfgLVs, $nextLevel), ErrCode::err_const_no); // "取英雄升级常量数据失败." . $nextLevel . "级");
                 $this->maxXp = $cfgLVs->$nextLevel->xp_need;
 //                StatProc::UserLevel($nowlv);                                  # 等级统计

+ 11 - 4
Gameserver/App/process/FightProc.php

@@ -86,9 +86,10 @@ class FightProc {
         $gold = $wavesMo->rewardGold;
         StoreProc::AddMultiItemInStore("1," . $gold);
 
+        $oldLevel = ctx()->baseInfo->level;
         $exp = $wavesMo->rewardExp;
         StoreProc::AddMultiItemInStore("4," . $exp);
-
+        $newLevel = ctx()->baseInfo->level;
         if ($wavesMo->rewardTuZhi != null) {
             $tuzhi = explode('-', $wavesMo->rewardTuZhi);
             $n = rand($tuzhi[0], $tuzhi[1]);
@@ -141,7 +142,9 @@ class FightProc {
             'store' => ctx()->store,
             'task' => ctx()->task,
             'reward' => StoreProc::$reward,
-            'reward_Gem' => StoreProc::$reward_Gem,            
+            'reward_Gem' => StoreProc::$reward_Gem,       
+            'oldLevel'=>$oldLevel,
+            'newLevel'=>$newLevel,
         );
         return Resp::ok($ret);
     }
@@ -277,8 +280,8 @@ class FightProc {
                 Err(ErrCode::err_const_no, "检查刷新扣费配置信息!");
             }
         }
-        $t = ctx()->gates()->TowerGateInfo();                                   # 记忆技能刷新结果
-        $t->RefreshSkillTimes++;
+        $t = ctx()->gates()->TowerGateInfo();                                   # 记忆技能刷新结果       
+        $t->RefreshSkillTimes++;       
         $t->skill_zhudong = $li_zd;
         $t->skill_beidong = $li_bd;
         $t->skill_zhudong_lockState = $li_zds;
@@ -478,7 +481,9 @@ class FightProc {
         //ctx()->base()->Add_Exp($exp);
         $waveMo = GameConfig::waveItem_getItem($gateId, $finalLayer);
         my_Assert(null != $waveMo, ErrCode::err_const_no);
+        $oldLevel = ctx()->baseInfo->level;       
         ctx()->base()->Add_Exp($waveMo->rewardExp);                             # 指挥官经验
+        $newLevel = ctx()->baseInfo->level;
         ctx()->base()->Add_Gold($waveMo->rewardGold);                           # 金币奖励
         //$pickups .= ";1," . $gold + $waveMo->rewardGold;
 
@@ -542,6 +547,8 @@ class FightProc {
             //'rewardStr' => $pickups
             'reward' => StoreProc::$reward,
             'reward_Gem' => StoreProc::$reward_Gem,
+            'oldLevel'=>$oldLevel,
+            'newLevel'=>$newLevel,
         );
         return Resp::ok($ret);
     }