Переглянути джерело

加奖励入库来源枚举,加经验类型不在统计奖励信息

cyzhao 10 місяців тому
батько
коміт
7a7e386d70

+ 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-15 15:21:33
+ // 日期: 2024-07-16 15:28:09
 ////////////////////
 
 /**

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

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

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

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

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

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

+ 1 - 1
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-15 14:27:52
+ // 日期: 2024-07-16 15:05:47
 ////////////////////
 
 

+ 1 - 1
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-15 14:27:52
+ // 日期: 2024-07-16 15:05:47
 ////////////////////
 
 

+ 20 - 0
Gameserver/App/model/User/Enum_StoreSourceType.php

@@ -0,0 +1,20 @@
+<?php
+
+/* 
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+namespace loyalsoft;
+
+/**
+ * Description of EnumShopGift
+ *
+ * @author c'y'zhao
+ */
+class Enum_StoreSourceType extends Enum{
+    
+    const AddExp = 1;//加经验的奖励不统计
+  
+}

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

@@ -270,7 +270,7 @@ class Info_UserBase extends Object_ext {
         $nextLevel = $curLevel + 1;
         while ($this->xp >= $cfgLVs->$nextLevel->xp_need) {                     # 超过升级所需经验
             if ($this->level < glc()->Game_MaxPlayerLevel) {                    # 如果未到达最大等级
-                //StoreProc::AddMultiItemInStore(GameConfig::player_level_getItem($this->level)->reward);
+                StoreProc::AddMultiItemInStore(GameConfig::player_level_getItem($this->level)->reward, Enum_StoreSourceType::AddExp);
                 $this->level++;               
                 $this->xp -= $cfgLVs->$nextLevel->xp_need;
                 $curLevel = $this->level;

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

@@ -749,7 +749,7 @@ class StoreProc {
 
             list($itemId, $num) = $val;                                         # ID, 数量           
             $itemMo = GameConfig::item_getItem($itemId);
-            if($itemMo->itemType != 701 && $itemMo->itemType != 201){               
+            if($itemMo->itemType != 701 && $itemMo->itemType != 201 && $src != 1){               
                 self::$reward[] = $value;                                                   
             }           
             
@@ -779,7 +779,9 @@ class StoreProc {
                 case 201://宝石           
                     for ($i = 0; $i < $num; $i++) {                       
                         $gem = self::initGem($itemId);
-                        self::$reward_Gem[] = $gem->uid;                       
+                        if($src != 1){
+                            self::$reward_Gem[] = $gem->uid;    
+                        }                                                               
                         self::PutGemInStore($gem);
                     }