Przeglądaj źródła

武器表英雄字段由int变string

cyzhao 3 lat temu
rodzic
commit
b83c1c2bdf

+ 9 - 4
Gameserver/Amfphp/base/CmdCode.php

@@ -1192,12 +1192,12 @@ class CmdCode {
      *  玩家竞拍信息
      */
     const cmd_Auction_GetUserAuctionItems = 7403;
-
+    
     /**
-     * 竞拍/一口价
+     * 一口价
      */
-    const cmd_Auction_UserAuctionBidItem = 7404;
-    
+    const cmd_Auction_BuyoutPrice = 7404;
+      
     /**
      *  取消出售
      */
@@ -1207,6 +1207,11 @@ class CmdCode {
      * 上传拍品
      */
     const cmd_Auction_UploadAuctionItems = 7406;
+   
+    /**
+     * 竞拍
+     */
+    const cmd_Auction_UserAuctionBidItem = 7407;
 // </editor-fold>
  
 

+ 3 - 3
Gameserver/Amfphp/configs/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-06-25 10:37:48
+ // 日期: 2021-07-01 11:47:10
 ////////////////////
 namespace loyalsoft;
 /**
@@ -1427,9 +1427,9 @@ class GameConfig {
     /**
     * @return \sm_yanlingLevel_type yanlingLevel_type item数据 
     */
-    public static function yanlingLevel_type_getItem($type, $id)
+    public static function yanlingLevel_type_getItem($type, $level)
     { 
-        return self::get_hash_item('yanlingLevel_type', $type)->$id;
+        return self::get_hash_item('yanlingLevel_type', $type)->$level;
     }
     /**
     * 言灵突破

+ 3 - 3
Gameserver/Amfphp/model/Const/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-06-25 10:37:48
+ // 日期: 2021-07-01 11:47:10
 ////////////////////
 
 /**
@@ -1427,9 +1427,9 @@ class GameConfig {
     /**
     * @return \sm_yanlingLevel_type yanlingLevel_type item数据 
     */
-    public static function yanlingLevel_type_getItem($type, $id)
+    public static function yanlingLevel_type_getItem($type, $level)
     { 
-        return self::get_hash_item('yanlingLevel_type', $type)->$id;
+        return self::get_hash_item('yanlingLevel_type', $type)->$level;
     }
     /**
     * 言灵突破

+ 1 - 1
Gameserver/Amfphp/model/Const/sm_gate_passCondition.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-04-13 17:50:44
+ // 日期: 2021-06-28 16:22:08
 ////////////////////
 
 

+ 2 - 2
Gameserver/Amfphp/model/Const/sm_item_weapon.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-06-10 15:57:26
+ // 日期: 2021-07-01 11:32:59
 ////////////////////
 
 
@@ -19,7 +19,7 @@ class sm_item_weapon
     public $typeId;
 
     /**
-    * @var Int32 使用武器的英雄ID  
+    * @var String 使用武器的英雄ID  
     */
     public $hero_id;
 

+ 1 - 1
Gameserver/Amfphp/model/Const/sm_plot.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-06-08 11:00:21
+ // 日期: 2021-06-25 15:23:00
 ////////////////////
 
 

+ 1 - 1
Gameserver/Amfphp/model/Const/sm_sysmail.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-06-22 14:21:09
+ // 日期: 2021-06-25 12:17:38
 ////////////////////
 
 

+ 22 - 6
Gameserver/Amfphp/process/AuctionProc.php

@@ -17,12 +17,14 @@ class AuctionProc {
                 return AuctionProc::GetUserUploadAuctionItems();
             case CmdCode::cmd_Auction_GetUserAuctionItems:                      # 7403 玩家竞拍信息
                 return AuctionProc::GetUserAuctionItems();
-            case CmdCode::cmd_Auction_UserAuctionBidItem:                       # 7404 竞拍/一口价
-                return AuctionProc::UserAuctionBidItem();
+            case CmdCode::cmd_Auction_BuyoutPrice:                              # 7404 竞拍/一口价
+                return AuctionProc::BuyoutPrice();
             case CmdCode::cmd_Auction_CancelAuction:                            # 7405 取消出售
                 return AuctionProc::CancelAuction();
             case CmdCode::cmd_Auction_UploadAuctionItems:                       # 7406 上传拍品
-                return AuctionProc::UploadAuctionItems();            
+                return AuctionProc::UploadAuctionItems();       
+            case CmdCode::cmd_Auction_UserAuctionBidItem:                       # 7407 竞拍
+                return AuctionProc::UserAuctionBidItem();
             default:
                 Err(ErrCode::cmd_err);
         }
@@ -72,9 +74,9 @@ class AuctionProc {
     }
 
     /**
-     * 竞拍/一口价-7404 ----暂时没有竞拍,只有一口价
+     * 一口价-7404 ----暂时没有竞拍,只有一口价
      */
-    static function UserAuctionBidItem() {
+    static function BuyoutPrice() {
         list($uId) = req()->paras;
         $aucItem = self::getAuctionItem($uId);
               
@@ -173,7 +175,21 @@ class AuctionProc {
                     "auction"=>$auctionDic,#拍品
         ));
     }
-
+    
+    /**
+     * 竞价
+     */
+    static function UserAuctionBidItem() {
+        list($uId) = req()->paras;
+        $aucItem = self::getAuctionItem($uId);
+        
+        UserProc::updateUserInfo();                                             # 回写玩家数据
+        return Resp::ok(array(
+                    "store" => $user->store,
+                    "auction"=>$auctionDic,#拍品
+        ));
+    }
+    
     static function TriggerSettlement() {     
         $result = self::selectTimeoutAuctionItems();
         if(count($result) > 0){

+ 14 - 5
Gameserver/Amfphp/process/HeroProc.php

@@ -581,17 +581,26 @@ class HeroProc {
         $lvs = GameConfig::hero_levelexp_getItem($hero->level + 1);
         $hero->maxXp = $lvs->requiredExp;
 
-        //  取可用武器中第一个初始化 -- 策划要求初始英雄要带有武器 -- 王刚 2020年1月
+        //  取可用武器中第一个初始化 -- 策划要求初始英雄要带有武器 -- 王刚 2020年1月      
         $wp = null;
         $arr = (array) GameConfig::item_weapon();
         ksort($arr);                                                            // todo: 排序不正常
         foreach ($arr as $id => $mo) {
-//            isEditor() and $mo = new \sm_item_weapon();
-            if ($mo->hero_id == $hero->typeId) {
-                $wp = $mo;
-                break;
+//            isEditor() and $mo = new \sm_item_weapon();           
+            $heroList = explode(',', $mo->hero_id); 
+            foreach ($heroList as $hero_id) {
+                if ($hero_id == $hero->typeId){
+                    $wp = $mo;
+                    break;
+                }
             }
+            
+//            if ($mo->hero_id == $hero->typeId) {
+//                $wp = $mo;                               
+//                break;
+//            }
         }
+               
         if (null != $wp) {
             $wuid = StoreProc::PutEquipInStore($wp->typeId);
             req()->userInfo->game->store->equipment->$wuid->herouid = $uid;