Browse Source

装备接口修改

cyzhao 7 months ago
parent
commit
941704dd91

+ 17 - 1
Gameserver/App/configs/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-23 15:12:47
+ // 日期: 2024-10-24 11:57:47
 ////////////////////
 
 namespace loyalsoft;
@@ -959,6 +959,22 @@ class GameConfig {
         return self::get_hash_item('activity_battlepass_type', $key);
     }
     /**
+    * 装备道具表
+    * @return \equip
+    */
+    public static function equip()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'equip');
+    }
+    /**
+    * @return \sm_equip equip item数据 
+    */
+    public static function equip_getItem($itemid)
+    { 
+        return self::get_hash_item('equip', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * @return \ver
     */

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-10-23 15:12:47
+ // 日期: 2024-10-24 11:57:47
 ////////////////////
 
 /**
@@ -957,6 +957,22 @@ class GameConfig {
         return self::get_hash_item('activity_battlepass_type', $key);
     }
     /**
+    * 装备道具表
+    * @return \equip
+    */
+    public static function equip()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'equip');
+    }
+    /**
+    * @return \sm_equip equip item数据 
+    */
+    public static function equip_getItem($itemid)
+    { 
+        return self::get_hash_item('equip', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * @return \ver
     */

+ 28 - 8
Gameserver/App/model/Const/sm_equip.php

@@ -3,28 +3,43 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-07-25 16:35:48
+ // 日期: 2024-10-23 15:48:58
 ////////////////////
 
 
 /**
- * Static Model equip 装备表
+ * Static Model equip 装备道具
  */
 class sm_equip
 {
 
     /**
-    * @var Int32 用途未知!!请到数据库中添加字段注释。  
+    * @var Int32 索引id  
     */
     public $id;
 
+    /**
+    * @var Int32 装备id(稀有度9_部位99_品质99_道具编号999) default(0) 
+    */
+    public $typeId;
+
     /**
     * @var String 名称  
     */
     public $name;
 
     /**
-    * @var Int32 装备部位id1 2 3 4 5 6 default(1) 
+    * @var Int32 品阶: 白绿蓝紫 default(0) 
+    */
+    public $qual;
+
+    /**
+    * @var Int32 稀有度: 1普通, 2 S default(0) 
+    */
+    public $rarity;
+
+    /**
+    * @var Int32 部位: 1 武器, 2 护甲, 3 项链, 4 腰带, 5 手套, 6 靴子 default(1) 
     */
     public $position;
 
@@ -39,14 +54,19 @@ class sm_equip
     public $icon;
 
     /**
-    * @var Int32 该部位升级消耗的图纸id default(0) 
+    * @var Int32 基础属性值(1,3,5加攻击,246加hp) default(0) 
+    */
+    public $attrNum;
+
+    /**
+    * @var String 解锁词条ID (品质提升,多条词条逗号分隔,各词条是叠加关系)(从红色往前排,倒着填)  
     */
-    public $costTuzhiId;
+    public $qual_predicateId;
 
     /**
-    * @var Int32 升级增加攻击还是生命值还是两个都加;1:加攻击力 2:生命值 3:两者都加 default(1) 
+    * @var String 额外字段  
     */
-    public $upgradeType;
+    public $etc;
 
 }
 

+ 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-10-21 10:31:02
+ // 日期: 2024-10-24 11:35:52
 ////////////////////
 
 

+ 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-10-21 10:31:02
+ // 日期: 2024-10-24 11:35:52
 ////////////////////
 
 

+ 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-10-23 14:51:57
+ // 日期: 2024-10-24 11:02:18
 ////////////////////
 
 

+ 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-10-23 14:51:57
+ // 日期: 2024-10-24 11:02:18
 ////////////////////
 
 

+ 8 - 1
Gameserver/App/model/User/Info_Store.php

@@ -41,7 +41,13 @@ class Info_Store extends Object_ext {
     public $equipPag =1;
 
     /**
-     * 装备
+     * 装备背包数据
+     * @var \stdClass()
+     */
+    public $equip;
+    
+    /**
+     * 装备部位
      * @var \stdClass()
      */
     public $equipPosition;
@@ -68,6 +74,7 @@ class Info_Store extends Object_ext {
         if ($arg == null) {
             $this->items = new \stdClass();
             $this->gemStore = new \stdClass();
+            $this->equip = new \stdClass();
             $this->equipPosition = new \stdClass();
             for ($i = 1; $i <=6; $i++) {
                 $equip =  new Ins_EquipPosition();

+ 54 - 0
Gameserver/App/model/User/Ins_Equip.php

@@ -0,0 +1,54 @@
+<?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 Ins_Equip
+ *
+ * @author c'y'zhao
+ */
+class Ins_Equip extends Object_ext{
+    
+    /**
+     * 实例唯一编号
+     */
+    public $uid = 0;       
+    
+    /*
+     * 模板数据编号
+     */
+    public $typeId = 0;    
+    
+    /*
+     * 等级
+     */
+    public $level = 0;
+    
+
+    /**
+     * 构造函数
+     * @param type $args
+     */
+    public function __construct($args = null) {
+        if($args !=null){
+            parent::__construct($args);
+        }                
+    }
+    
+    /**
+     * 配置
+     * @return sm_gem
+     */
+    public function mo() {
+        $mo = GameConfig::equip_getItem($this->typeId);
+        my_Assert(null != $mo, ErrCode::err_const_no);
+        return $mo;
+    }
+    
+}