cyzhao 4 years ago
parent
commit
645cf81a03

+ 5 - 0
Gameserver/Amfphp/base/CmdCode.php

@@ -466,6 +466,11 @@ class CmdCode {
      * 英雄技能 - 一键升级
      */
     const cmd_hero_skillLevel_onekeyupgrade = 6325;
+    
+    /**
+     * 升星
+     */
+    const cmd_hero_StrengthenStar = 6326;
 // </editor-fold>
     //
     // <editor-fold defaultstate="collapsed" desc="仓库操作码 - 64xx">

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-04 09:49:24
+ // 日期: 2021-03-15 11:40:49
 ////////////////////
 
 /**

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-10 12:08:41
+ // 日期: 2021-03-05 09:37:06
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-10 11:41:52
+ // 日期: 2021-03-11 17:08:31
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-03 23:31:53
+ // 日期: 2021-03-11 17:14:47
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-02 16:08:14
+ // 日期: 2021-03-04 11:15:41
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-22 15:18:49
+ // 日期: 2021-03-04 11:14:21
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-03 17:37:43
+ // 日期: 2021-03-05 16:37:24
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-03-03 11:51:10
+ // 日期: 2021-03-05 11:56:07
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-25 14:14:30
+ // 日期: 2021-03-11 17:07:02
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-09-02 18:00:44
+ // 日期: 2021-03-05 10:43:48
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-25 14:15:06
+ // 日期: 2021-03-12 13:52:27
 ////////////////////
 
 

+ 91 - 1
Gameserver/Amfphp/model/Const/sm_item_yanling.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-12-29 16:53:08
+ // 日期: 2021-03-15 11:38:48
 ////////////////////
 
 
@@ -19,6 +19,26 @@ class sm_item_yanling
     */
     public $typeId;
 
+    /**
+    * @var Int32 言灵类型 default(0) 
+    */
+    public $type;
+
+    /**
+    * @var Int32 下一星级得言灵id default(0) 
+    */
+    public $nextId;
+
+    /**
+    * @var Int32 消耗该言灵,供给得经验值 default(0) 
+    */
+    public $addStarExp;
+
+    /**
+    * @var Int32 升级下一星级所需得最大的经验值 default(0) 
+    */
+    public $maxStarExp;
+
     /**
     * @var String 可以匹配的英雄ID列表(逗号分隔)  
     */
@@ -49,6 +69,16 @@ class sm_item_yanling
     */
     public $hp;
 
+    /**
+    * @var Int32 hp固定值 default(0) 
+    */
+    public $hpBase;
+
+    /**
+    * @var Int32 hp成长值 default(0) 
+    */
+    public $hpRate;
+
     /**
     * @var Int32 【废弃2020年1月6日】攻击 default(0) 
     */
@@ -64,31 +94,91 @@ class sm_item_yanling
     */
     public $crit;
 
+    /**
+    * @var Int32 crit固定值 default(0) 
+    */
+    public $critBase;
+
+    /**
+    * @var Int32 crit成长值 default(0) 
+    */
+    public $critRate;
+
     /**
     * @var Int32 物理攻击 default(0) 
     */
     public $phyAtk;
 
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $phyAtkBase;
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $phyAtkRate;
+
     /**
     * @var Int32 防御护甲 default(0) 
     */
     public $phyDef;
 
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $phyDefBase;
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $phyDefRate;
+
     /**
     * @var Int32 【2020年1月6日】攻击速度 default(0) 
     */
     public $atkSpeed;
 
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $atkSpeedBase;
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $atkSpeedRate;
+
     /**
     * @var Int32 法术强度 default(0) 
     */
     public $fashuqiangdu;
 
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $fashuqiangduBase;
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $fashuqiangduRate;
+
     /**
     * @var Int32 魔法抗性 default(0) 
     */
     public $mofakangxing;
 
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $mofakangxingBase;
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。 default(0) 
+    */
+    public $mofakangxingRate;
+
     /**
     * @var Int32 技能ID  default(0) 
     */

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-09-02 18:00:57
+ // 日期: 2021-03-05 09:19:05
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-02-25 14:13:27
+ // 日期: 2021-03-09 14:44:22
 ////////////////////
 
 

+ 54 - 0
Gameserver/Amfphp/model/User/Ins_YanLin.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_YanLin
+ *
+ * @author cyzhao
+ */
+class Ins_YanLin {
+    /**
+     * 言灵id
+     * @var type
+     */
+    public $typeId = 0;
+    
+    /**
+     * 挂在的英雄的uid
+     * @var type
+     */
+    public $herouid = 0;
+    
+    /**
+     * 当前的经验
+     * @var type
+     */
+    public $curExp = 0;
+    
+    /**
+     * 当前的星级
+     * @var type
+     */
+    public $star = 0;
+    
+    /**
+     * 言灵的等级
+     * @var type
+     */
+    public $level = 1;
+    
+    public function __construct($args=null) {      
+        parent::__construct($args);       
+    }
+    
+    public function initialize($missId) {
+        $this->missCardId = $missId;
+    }
+}

+ 51 - 0
Gameserver/Amfphp/process/HeroProc.php

@@ -55,6 +55,8 @@ class HeroProc {
                 return HeroProc::BuyHeroByCostPieces($req);
             case CmdCode::cmd_hero_upGodBlood:                                  #  [6322] 神血升级
                 return HeroProc::UpGodBloodHeroByPieces($req);
+            case CmdCode::cmd_hero_StrengthenStar:                              #  [6326] 升星
+                return HeroProc::StrengthenStar($req);
 //            case CmdCode::cmd_hero_unlockByPieces:                            #  [6323] 解锁碎片
 //                return HeroProc::UnLockHeroByPieces($req);                
 
@@ -956,6 +958,55 @@ class HeroProc {
         return Resp::ok(ObjectInit()); # 4. 设置返回值
     }
 
+    /**
+     * 升星
+     * @param req $req
+     * @return type
+     */
+    static function StrengthenStar($req) {
+        list($yanlingUid,$uidList) = $req->paras;
+   
+        $store = $req->userInfo->game->store;
+        if(!StlUtil::dictHasProperty($store->yanling,$yanlingUid)){
+            return Resp::err(ErrCode::hero_yanling_notfound);;
+        }
+        $tag = true;
+        foreach ($uidList as $costUid) {
+            if(!StlUtil::dictHasProperty($store->yanling,$costUid)){//校验是否是同类型
+                $tag = false;
+                break;
+            }
+        }
+        
+        if(!$tag){
+            return Resp::err(ErrCode::hero_yanling_notfound);
+        }
+             
+        $exp = 0;
+        foreach ($uidList as $costuid) {
+            $confDic = GameConfig::item_yanling_getItem($costuid);
+            $exp += $confDic->addStarExp;
+            
+            StlUtil::dictRemove($store->yanling, $costuid);
+        }
+        
+        $store->yanling->$yanlingUid->curExp += $exp;
+        $dic = GameConfig::item_yanling_getItem($store->yanling->$yanlingUid->typeId);
+        
+        if($store->yanling->$yanlingUid->curExp >= $dic->maxStarExp){
+            $store->yanling->$yanlingUid->curExp = 0;
+            $store->yanling->$yanlingUid->star += 1;
+            if($dic->nextId = 0){
+                $store->yanling->$yanlingUid->star = 5;
+            }
+        }
+        
+        $req->userInfo->game->store = $store;                                     
+        UserProc::updateUserInfo();   
+        return Resp::ok(array('store' => $req->userInfo->game->store,)); 
+    }
+
+
 //
 // <editor-fold defaultstate="collapsed" desc="计算战队战斗力, for pvp back matchers, -wg 2017.07.13">
 

+ 2 - 1
Gameserver/Amfphp/process/StoreProc.php

@@ -431,7 +431,8 @@ class StoreProc {
             $req->userInfo->game->privateState->currentId = 1;
         }
         $cid = $req->userInfo->game->privateState->currentId++;
-        $equip = ObjectInit();
+        //$equip = ObjectInit();
+        $equip = new Ins_YanLin();
         $equip->typeId = $itemId;
         $req->userInfo->game->store->yanling->$cid = $equip;
     }

+ 3 - 3
Gameserver/nbproject/private/private.properties

@@ -1,6 +1,6 @@
-copy.src.files=false
-copy.src.on.open=false
-copy.src.target=
+copy.src.files=true
+copy.src.on.open=true
+copy.src.target=G:\\wamp64\\www\\ylsj2019\\Gameserver
 index.file=index.php
 interpreter=D:\\Program-Files\\wnmp\\php\\php-7.4.13-nts-Win32-vc15-x64\\php.exe
 run.as=SCRIPT