Procházet zdrojové kódy

Merge branch 'dev' into tap

wanggangzero před 9 měsíci
rodič
revize
fd9e5c1715
29 změnil soubory, kde provedl 349 přidání a 122 odebrání
  1. 18 5
      Gameserver/App/base/CmdCode.php
  2. 1 1
      Gameserver/App/model/Const/GameConfig.php
  3. 2 1
      Gameserver/App/model/Const/sm_activeTask.php
  4. 2 1
      Gameserver/App/model/Const/sm_activeTask_type.php
  5. 1 1
      Gameserver/App/model/Const/sm_announcement.php
  6. 1 1
      Gameserver/App/model/Const/sm_evolve.php
  7. 1 1
      Gameserver/App/model/Const/sm_fun_unlock.php
  8. 1 1
      Gameserver/App/model/Const/sm_gate.php
  9. 1 1
      Gameserver/App/model/Const/sm_gate_unlock.php
  10. 16 1
      Gameserver/App/model/Const/sm_globalsettings.php
  11. 16 6
      Gameserver/App/model/Const/sm_hero.php
  12. 16 6
      Gameserver/App/model/Const/sm_heroType_typeId.php
  13. 2 1
      Gameserver/App/model/Const/sm_item.php
  14. 1 1
      Gameserver/App/model/Const/sm_player_level.php
  15. 1 1
      Gameserver/App/model/Const/sm_plots.php
  16. 1 1
      Gameserver/App/model/Const/sm_predicate.php
  17. 10 8
      Gameserver/App/model/Const/sm_skills.php
  18. 1 1
      Gameserver/App/model/Const/sm_sysmail.php
  19. 1 1
      Gameserver/App/model/Const/sm_waveItem.php
  20. 1 1
      Gameserver/App/model/Const/sm_waves.php
  21. 8 1
      Gameserver/App/model/User/Info_Heros.php
  22. 43 21
      Gameserver/App/model/User/Info_PrivateState.php
  23. 13 13
      Gameserver/App/model/User/Info_UserBase.php
  24. 2 2
      Gameserver/App/process/EmailProc.php
  25. 69 0
      Gameserver/App/process/FightProc.php
  26. 102 38
      Gameserver/App/process/HeroProc.php
  27. 1 0
      Gameserver/App/process/ShopProc.php
  28. 7 1
      Gameserver/App/process/StoreProc.php
  29. 10 5
      Gameserver/App/process/TaskProc.php

+ 18 - 5
Gameserver/App/base/CmdCode.php

@@ -157,13 +157,11 @@ class CmdCode {
      * 领取活跃点宝箱奖励
      */
     const cmd_task_receiveActivePointBoxReward = 6205;
-    
+
     /**
      * 一键领取
      */
     const cmd_task_prizesAllreceived = 6206;
-
-
 // </editor-fold>
 //
 // <editor-fold defaultstate="collapsed" desc="背包操作码 - 64xx">
@@ -261,6 +259,11 @@ class CmdCode {
      * 角色升星
      */
     const hero_strengthenStar = 6603;
+
+    /**
+     * 解锁英雄记录重置
+     */
+    const hero_resetUnlockHero = 6604;
 //
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="邮件操作码 - 67xx">
@@ -301,7 +304,7 @@ class CmdCode {
 // <editor-fold defaultstate="collapsed" desc="战斗操作码 - 68xx">
 
     /**
-     * 主线剧情: 奖励结算
+     * 主线剧情关卡: 奖励结算
      */
     const fight_settle = 6801;
 
@@ -404,7 +407,17 @@ class CmdCode {
      * 每天重置挑战红点
      */
     const fight_ResetChallange_RedMask = 6821;
-    
+
+    /**
+     * 封印/解锁技能
+     */
+    const fight_lockSkill = 6822;
+
+    /**
+     * 解锁更多技能封印数量
+     */
+    const fight_buyLockSkillCount = 6823;
+
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="系统操作码 - 69xx">
 

+ 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-08-13 15:07:22
+ // 日期: 2024-08-28 17:03:02
 ////////////////////
 
 /**

+ 2 - 1
Gameserver/App/model/Const/sm_activeTask.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-13 11:32:57
+ // 日期: 2024-08-13 17:40:15
 ////////////////////
 
 
@@ -46,6 +46,7 @@ class sm_activeTask
     *  207: 通关主线挑战第X关的X模式X次;参数1:关卡ID和难度(1普通,2困难,3噩梦),逗号分隔。;参数2:次数
     *  208: 领取排行榜元宝奖励X次;参数1:无;参数2:次数(数值)
     *  209: 玩家等级到达X级;参数1:无;参数2:等级(数值)
+    *  210:通关第X关;参数1:关卡ID;参数2:通关次数(记录已通关状态)
     *  301: 完成X次启灵;参数1:无;参数2:次数(数值)
     *  302: 完成X次关键启灵;参数1:无;参数2:次数(数值)
     *  401: 镶嵌X个X品质以上宝石;参数1:宝石品质(数值);参数2:宝石数量

+ 2 - 1
Gameserver/App/model/Const/sm_activeTask_type.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-13 11:32:57
+ // 日期: 2024-08-13 17:40:15
 ////////////////////
 
 
@@ -46,6 +46,7 @@ class sm_activeTask_type
     *  207: 通关主线挑战第X关的X模式X次;参数1:关卡ID和难度(1普通,2困难,3噩梦),逗号分隔。;参数2:次数
     *  208: 领取排行榜元宝奖励X次;参数1:无;参数2:次数(数值)
     *  209: 玩家等级到达X级;参数1:无;参数2:等级(数值)
+    *  210:通关第X关;参数1:关卡ID;参数2:通关次数(记录已通关状态)
     *  301: 完成X次启灵;参数1:无;参数2:次数(数值)
     *  302: 完成X次关键启灵;参数1:无;参数2:次数(数值)
     *  401: 镶嵌X个X品质以上宝石;参数1:宝石品质(数值);参数2:宝石数量

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-08 17:28:50
+ // 日期: 2024-08-23 11:35:49
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-12 15:50:45
+ // 日期: 2024-08-28 16:35:49
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-13 12:05:49
+ // 日期: 2024-08-20 17:35:49
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-06 09:42:14
+ // 日期: 2024-08-19 15:26:27
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-06 09:42:14
+ // 日期: 2024-08-19 15:26:27
 ////////////////////
 
 

+ 16 - 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-08-06 10:05:48
+ // 日期: 2024-08-27 14:12:36
 ////////////////////
 
 
@@ -253,5 +253,20 @@ class sm_globalsettings
     */
     public $FirstMainTaskId;
 
+    /**
+    * @var int 技能封印按钮可用条件(已解锁技能总数达到X)  
+    */
+    public $Skill_LockBtn_EnableCount;
+
+    /**
+    * @var string 花费XX元宝将技能封印上限提升至X个  
+    */
+    public $Skill_LockBtn_BuyCount_Cost;
+
+    /**
+    * @var int 技能封印初始可用数量  
+    */
+    public $Skill_LockBtn_InitCount;
+
 }
 

+ 16 - 6
Gameserver/App/model/Const/sm_hero.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-13 11:35:49
+ // 日期: 2024-08-27 09:35:49
 ////////////////////
 
 
@@ -53,6 +53,11 @@ class sm_hero
     */
     public $desc;
 
+    /**
+    * @var Int32 是否为默认解锁 (0:不解锁 1:解锁) default(0) 
+    */
+    public $isDefaultUnlock;
+
     /**
     * @var String 需要的人物碎片:itemId,num  
     */
@@ -99,22 +104,22 @@ class sm_hero
     public $dec_demage;
 
     /**
-    * @var Int32 重击率(百分比)  
+    * @var Single 重击率(百分比)  
     */
     public $bigHit_rate;
 
     /**
-    * @var Int32 重击倍率: 初始2倍 default(200) 
+    * @var Single 重击倍率: 初始2倍 default(200) 
     */
     public $bigHit_Val;
 
     /**
-    * @var Int32 神圣一击率(百分比)  
+    * @var Single 神圣一击率(百分比)  
     */
     public $sentHit_rate;
 
     /**
-    * @var Int32 普通怪物秒杀几率(百分比) default(0) 
+    * @var Single 普通怪物秒杀几率(百分比) default(0) 
     */
     public $instantKillMonsterRate;
 
@@ -195,7 +200,7 @@ class sm_hero
     public $mul_gainGold;
 
     /**
-    * @var Int32 角色特殊词条 default(0) 
+    * @var String 角色特殊词条 default(0) 
     */
     public $special_predicate;
 
@@ -204,5 +209,10 @@ class sm_hero
     */
     public $headImg;
 
+    /**
+    * @var Int32 角色卡(道具ID) default(0) 
+    */
+    public $roleCard;
+
 }
 

+ 16 - 6
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-08-13 11:35:49
+ // 日期: 2024-08-27 09:35:49
 ////////////////////
 
 
@@ -53,6 +53,11 @@ class sm_heroType_typeId
     */
     public $desc;
 
+    /**
+    * @var Int32 是否为默认解锁 (0:不解锁 1:解锁) default(0) 
+    */
+    public $isDefaultUnlock;
+
     /**
     * @var String 需要的人物碎片:itemId,num  
     */
@@ -99,22 +104,22 @@ class sm_heroType_typeId
     public $dec_demage;
 
     /**
-    * @var Int32 重击率(百分比)  
+    * @var Single 重击率(百分比)  
     */
     public $bigHit_rate;
 
     /**
-    * @var Int32 重击倍率: 初始2倍 default(200) 
+    * @var Single 重击倍率: 初始2倍 default(200) 
     */
     public $bigHit_Val;
 
     /**
-    * @var Int32 神圣一击率(百分比)  
+    * @var Single 神圣一击率(百分比)  
     */
     public $sentHit_rate;
 
     /**
-    * @var Int32 普通怪物秒杀几率(百分比) default(0) 
+    * @var Single 普通怪物秒杀几率(百分比) default(0) 
     */
     public $instantKillMonsterRate;
 
@@ -195,7 +200,7 @@ class sm_heroType_typeId
     public $mul_gainGold;
 
     /**
-    * @var Int32 角色特殊词条 default(0) 
+    * @var String 角色特殊词条 default(0) 
     */
     public $special_predicate;
 
@@ -204,5 +209,10 @@ class sm_heroType_typeId
     */
     public $headImg;
 
+    /**
+    * @var Int32 角色卡(道具ID) default(0) 
+    */
+    public $roleCard;
+
 }
 

+ 2 - 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-30 17:21:26
+ // 日期: 2024-08-23 16:56:58
 ////////////////////
 
 
@@ -45,6 +45,7 @@ class sm_item
     *  301.洗练石
     *  401.启灵石
     *  501.角色碎片
+    *  502.角色卡
     *  701. 随机礼盒 default(0) 
     */
     public $itemType;

+ 1 - 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-07-24 14:54:00
+ // 日期: 2024-08-15 16:43:50
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-01 17:04:24
+ // 日期: 2024-08-27 09:35:49
 ////////////////////
 
 

+ 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-08-13 14:03:43
+ // 日期: 2024-08-23 10:47:17
 ////////////////////
 
 

+ 10 - 8
Gameserver/App/model/Const/sm_skills.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-13 11:03:31
+ // 日期: 2024-08-28 16:35:49
 ////////////////////
 
 
@@ -177,11 +177,6 @@ class sm_skills
     */
     public $immediate_hp;
 
-    /**
-    * @var Int32 解锁(成就Id,0无需解锁) 2023.11.20  
-    */
-    public $unlock_acc_id;
-
     /**
     * @var Int32 稀有度(影响三选一出现几率) 2023.11.20  
     */
@@ -234,11 +229,18 @@ class sm_skills
     public $emit_number;
 
     /**
-    * @var String 技能解锁条件
+    * @var Int32 解锁顺序(从小到大)2024.8.26  
+    */
+    public $unlock_order;
+
+    /**
+    * @var String 技能解锁条件(多个解锁条件使用逗号分隔)
+    *  类型0: 默认解锁; 举例 0:0 默认解锁, 不在法术书界面展示, 0:1 默认解锁, 在法术书界面展示
     *  类型1:通关指定关卡解锁技能;例如通关第一关:1:1(类型+第X关)
     *  类型2:解锁指定人物解锁技能:例如解锁孙悟空:2:1001(类型+角色唯一ID)
     *  类型3:玩家失败次数解锁技能:例如玩家失败一次解锁技能3:1(类型+累计失败次数)
-    *  类型4:不解锁技能 4:9999  
+    *  类型4:不解锁技能 4:9999
+    *  类型5: 玩家等级解锁, 玩家等级达到指定值(比如5级),配置1:5(玩家等级)  
     */
     public $unlock_acc_id_new;
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-08 13:48:10
+ // 日期: 2024-08-22 19:31:45
 ////////////////////
 
 

+ 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-08-13 12:05:49
+ // 日期: 2024-08-28 15:35:49
 ////////////////////
 
 

+ 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-08-13 12:05:49
+ // 日期: 2024-08-28 15:35:49
 ////////////////////
 
 

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

@@ -25,6 +25,13 @@ class Info_Heros extends Object_ext {
      * @var type
      */
     public $Dic = null;
+    
+    /**
+     * 角色卡解锁英雄记录
+     * @var type
+     */
+    #[ArrayType]
+    public $roleCardUnlockHeroList = array();
 
     public function initialize() {
         $heroConf = GameConfig::hero();
@@ -33,7 +40,7 @@ class Info_Heros extends Object_ext {
                 $insHero = new Ins_Hero();
                 $insHero->Id = $heroId;
                 $insHero->isUnlock = 0;               
-                if ($mo->heroDebris_need == null) {
+                if ($mo->isDefaultUnlock == 1) {
                     $insHero->isUnlock = 1;
                 }                              
                 $this->Dic->$heroId = $insHero;

+ 43 - 21
Gameserver/App/model/User/Info_PrivateState.php

@@ -28,15 +28,14 @@ class Info_PrivateState extends Object_ext {
      */
     #[ArrayType]
     public $dailyShopReceived = array();
-    
+
     /**
      * 每日商店广告次数
      * @var type
      */
     public $dailyShop_GuangGaoNum = 0;
-
     public $dailyShop_GuangGaoTs = 0;
-    
+
     /**
      * 每日随机到的信息
      * @var type
@@ -95,7 +94,7 @@ class Info_PrivateState extends Object_ext {
      */
     public $junbeiShop_AllNumRecord = null;
     public $junbeiShop_XinYuan = null;
-    
+
     /**
      * 登录天数
      * @var array[]
@@ -108,13 +107,13 @@ class Info_PrivateState extends Object_ext {
      */
     #[ArrayType]
     public $day7_drawed = array();
-    
+
     /**
      * 7日 累计
      * @var type
      */
     public $day7_accumulate = 0;
-    
+
     /**
      * 7日 累计奖励领取记录
      * @var type
@@ -145,13 +144,12 @@ class Info_PrivateState extends Object_ext {
      * @var type
      */
     public $buyNum_ShopBoxBright = 0;
-    
+
     /**
      * 金币商城第一个冷却时间记录
      * @var type
      */
     public $goldShop_CoolDownTs_1 = 0;
-
     public $goldShop_GuangGaoNum = 0;
 
     /**
@@ -159,24 +157,25 @@ class Info_PrivateState extends Object_ext {
      * @var type
      */
     public $goldShop_CoolDownTs_2 = 0;
+
     /**
      * 金币商城第三个冷却时间记录
      * @var type
      */
     public $goldShop_CoolDownTs_3 = 0;
-    
+
     /**
      * 月卡
      * @var type
      */
     //public $monthCardShop_Received = array();
-    
+
     /**
-     * 资源月卡购买时间记录 
+     * 资源月卡购买时间记录
      * @var int
      */
     public $monthCardShop_ts = 0;
-    
+
     /**
      * 特权月卡购买时间记录
      * @var int
@@ -194,7 +193,7 @@ class Info_PrivateState extends Object_ext {
      * @var type
      */
     public $buyTiliNum = 0;
-    
+
     /**
      *  广告得体力倒计时
      * @var type
@@ -204,6 +203,7 @@ class Info_PrivateState extends Object_ext {
     /*
      * 通关荣誉榜奖励领取记录
      */
+
     #[ArrayType]
     public $rankReward_drawed_MainGate = array();
 
@@ -213,13 +213,13 @@ class Info_PrivateState extends Object_ext {
      */
     #[ArrayType]
     public $rankReward_drawed_fightPower = array();
-    
+
     /**
      * @var array[] 领取激活码记录
      */
     #[ArrayType]
     public $usedTokens = array();
-    
+
     /**
      * 读公告记录
      * @var array()
@@ -231,13 +231,13 @@ class Info_PrivateState extends Object_ext {
      * 0:没有红点 1:有红点
      */
     public $redTip_Mail = 0;
-    
+
     /**
      * 关卡榜里的荣誉榜红点
      * @var type
      */
     public $redTip_RewardMainGateRank = 0;
-    
+
     /**
      * 战力榜里的荣誉榜红点
      * @var type
@@ -250,16 +250,34 @@ class Info_PrivateState extends Object_ext {
      */
     #[ArrayType]
     public $funUnlockRecord = array();
-    
+
     /**
      * 解锁的技能记录
      * @var array()
      */
     #[ArrayType]
     public $skillUnlockRecord = array();
-    
+
+    /**
+     * @var int 技能锁定数量(解锁后)
+     */
+    public $skillLockerNumber = 0;
+
+    /**
+     * @var array (解锁后)封印技能记录
+     */
+    #[ArrayType]
+    public $skillReLocked = array();
+
+    /**
+     * @var int 玩家升级前等级
+     */
     public $oldLevel = 0;
-    
+
+    /**
+     *
+     * @var int 玩家升级后等级
+     */
     public $upLevel = 0;
 
     /**
@@ -267,7 +285,7 @@ class Info_PrivateState extends Object_ext {
      * @var type
      */
     public $challange_RedMask = 0;
-    
+
     public function initialize() {
         $this->junbeiShopNumRecord = new \stdClass();
         $this->junbeiShop_AllNumRecord = new \stdClass();
@@ -281,9 +299,13 @@ class Info_PrivateState extends Object_ext {
                 $this->junbeiShop_AllNumRecord = new \stdClass();
                 $this->junbeiShop_XinYuan = new \stdClass();
                 $this->supplyBichuDic = new \stdClass();
+                $this->skillLockerNumber = glc()->Skill_LockBtn_InitCount;       # 初始值
             }
         } else {
             parent::__construct($arg);
+            if ($this->skillLockerNumber < glc()->Skill_LockBtn_InitCount) {
+                $this->skillLockerNumber = glc()->Skill_LockBtn_InitCount;       # 初始值
+            }
         }
     }
 }

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

@@ -113,7 +113,7 @@ class Info_UserBase extends Object_ext {
         $this->gold = glc()->Init_Player_gold;
         $this->cash = glc()->Init_Player_cash;
         $this->xp = 0;
-            
+
         $this->maxXp = GameConfig::player_level_getItem(2)->xp_need;
 
         $this->level = 1;
@@ -134,7 +134,7 @@ class Info_UserBase extends Object_ext {
      */
     function Add_tili($amt) {
         my_Assert($amt >= 0, "体力amt小于0");
-        //ActiveProc::ChangeTili($amt);       
+        //ActiveProc::ChangeTili($amt);
         for ($i = 0; $i < $amt; $i++) {
             if ((now() - $this->tili_ts) / glc()->tili_RecoverTS < $this->GetTili_RecoverrMax()) {
                 $this->tili_ts -= glc()->tili_RecoverTS;
@@ -143,17 +143,17 @@ class Info_UserBase extends Object_ext {
             }
         }
     }
-    
+
     /**
-     * 体力恢复的最大值(购买或者邮件领取的可以超出,超出后体力恢复失效)  
+     * 体力恢复的最大值(购买或者邮件领取的可以超出,超出后体力恢复失效)
      */
     function GetTili_RecoverrMax() {
         $maxTili = glc()->tili_RecoverrMax;
         $monthTs = 30 * 24 * 60 * 60;
-        if(ctx()->privateState->honourCardShop_ts > 0 && now() - ctx()->privateState->honourCardShop_ts < $monthTs){
+        if (ctx()->privateState->honourCardShop_ts > 0 && now() - ctx()->privateState->honourCardShop_ts < $monthTs) {
             $maxTili += glc()->tili_RecoverrMax_Add_HonourCard;
         }
-        
+
         return $maxTili;
     }
 
@@ -174,7 +174,7 @@ class Info_UserBase extends Object_ext {
      * @return bool 成功与否
      */
     function Consume_tili($amt) {
-        if ($amt >= 0) {          
+        if ($amt >= 0) {
             TaskProc::OnAccumulateTiliNum($amt);
             $cpt = glc()->tili_RecoverTS;
             if ($this->tili > 0) {
@@ -199,7 +199,7 @@ class Info_UserBase extends Object_ext {
      * @return int 计算当前可用体力值
      */
     function CurTili() {
-        $maxTili = $this->GetTili_RecoverrMax();       
+        $maxTili = $this->GetTili_RecoverrMax();
         $rec = (now() - $this->tili_ts) / glc()->tili_RecoverTS;
         $rec = $maxTili < $rec ? $maxTili : $rec;
         $t = $this->tili + $rec;
@@ -253,7 +253,7 @@ class Info_UserBase extends Object_ext {
                 return true;
             }
         }
-        
+
         return false;
     }
 
@@ -271,15 +271,15 @@ class Info_UserBase extends Object_ext {
         while ($this->xp >= $cfgLVs->$nextLevel->xp_need) {                     # 超过升级所需经验
             if ($this->level < glc()->Game_MaxPlayerLevel) {                    # 如果未到达最大等级
                 StoreProc::AddMultiItemInStore(GameConfig::player_level_getItem($this->level)->reward, Enum_StoreSourceType::AddExp);
-                $this->level++;               
+                $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;
-                
+
                 TaskProc::OnUserLevel_X($this->level);
-                
+                FightProc::skillUnlock_userLevel($this->level);                 # 等级解锁技能
 //                StatProc::UserLevel($nowlv);                                  # 等级统计
             } else {                                                            # 如果已到达最大等级则仅补齐缺失的经验即可
                 $this->xp = $this->maxXp;                                       # 经验不能超过最大值

+ 2 - 2
Gameserver/App/process/EmailProc.php

@@ -198,7 +198,7 @@ class EmailProc {
                     //'reward' => $mail->appendix
                     'reward' => $reward,
                     'reward_Gem' => $reward_Gem,
-                    'redTip'=>$tag,
+                    'redTip'=>$tag,                  
         ));
     }
 
@@ -255,7 +255,7 @@ class EmailProc {
                     'num' => $n,
                     'reward' => $reward,
                     'reward_Gem' => $reward_Gem,
-                    'redTip'=>$tag,
+                    'redTip'=>$tag,                   
         ));
     }
 

+ 69 - 0
Gameserver/App/process/FightProc.php

@@ -59,11 +59,52 @@ class FightProc {
                 return self::MainTZGetReward();
             case CmdCode::fight_ResetChallange_RedMask:                         # 6821 每天重置挑战红点
                 return self::ResetChallange_RedMask();
+            case CmdCode::fight_lockSkill:                                      # 6822 封印/解封技能
+                return self::LockSkill();
+            case CmdCode::fight_buyLockSkillCount:                              # 6823 购买更多封印数量
+                return self::BuySkillLockCount();
             default:
                 Err(ErrCode::cmd_err);
         }
     }
 
+    /**
+     * 6823 购买更多技能封印数量
+     */
+    static function BuySkillLockCount() {
+        list($n) = req()->paras;                                                # 解锁数量
+        my_Assert($n > ctx()->privateData()->skillLockerNumber, ErrCode::paras_err); # 参数异常
+        $amt = 0;
+        foreach (explode(",", glc()->Skill_LockBtn_BuyCount_Cost) as $str) {
+            list($cnt, $cost) = explode(':', $str);
+            if ($cnt == $n) {
+                $amt = $cost;
+                break;
+            }
+        }
+        my_Assert($amt > 0, "消耗元宝数量配置出错!");
+        my_Assert(ctx()->base()->Consume_Cash($amt), ErrCode::notenough_cash_msg);
+        ctx()->privateData()->skillLockerNumber = $cnt;
+        UserProc::updateUserInfo();
+        return Resp::ok();
+    }
+
+    /**
+     * 6822 封印/解封技能
+     */
+    static function LockSkill() {
+        list($skillTypeId) = req()->paras;                                      # 技能类型ID
+        $pri = ctx()->privateData();
+//        my_Assert(in_array($skillTypeId, $pri->skillUnlockRecord), "技能尚未解锁!");
+        if (in_array($skillTypeId, $pri->skillReLocked)) {                      # 解封
+            StlUtil::arrayRemove($pri->skillReLocked, $skillTypeId);
+        } else {                                                                # 封印
+            my_Assert(count($pri->skillReLocked) < $pri->skillLockerNumber, "超出封印上限!");
+            $pri->skillReLocked[] = $skillTypeId;
+        }
+        return Resp::ok();
+    }
+
     /**
      * 6821 每天重置挑战红点
      */
@@ -685,6 +726,7 @@ class FightProc {
             'newLevel' => $newLevel,
             'funUnlockRecord' => ctx()->privateState->funUnlockRecord,
             'skillUnlockRecord' => ctx()->privateState->skillUnlockRecord,
+            'heros' => ctx()->heros,
         );
         return Resp::ok($ret);
     }
@@ -724,6 +766,8 @@ class FightProc {
         }
     }
 
+// <editor-fold defaultstate="collapsed" desc="技能解锁">
+
     /**
      * 检测技能解锁的 1 关卡解锁,游玩到一定关卡解锁技能
      * @param type $resultType
@@ -817,6 +861,31 @@ class FightProc {
         }
     }
 
+    /**
+     * 玩家等级解锁技能
+     * @param type $curLevel
+     */
+    static function skillUnlock_userLevel($curLevel) {
+        $dic = GameConfig::skills();
+        foreach ($dic as $id => $mo) {
+            if ($mo->unlock_acc_id_new == null) {
+                continue;
+            }
+
+            $strList = explode(':', $mo->unlock_acc_id_new);
+            $unlockType = $strList[0];
+            $unlockId = $strList[1];
+
+            if ($unlockType != 5) {                                             // 玩家等级
+                continue;
+            }
+            if ($unlockId == $curLevel && !in_array($mo->typeId, ctx()->privateState->skillUnlockRecord)) {
+                ctx()->privateState->skillUnlockRecord[] = $mo->typeId;
+            }
+        }
+    }
+
+// </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="排行榜">
 
     /**

+ 102 - 38
Gameserver/App/process/HeroProc.php

@@ -28,69 +28,82 @@ class HeroProc {
                 return self::UnlockHero();
             case CmdCode::hero_strengthenStar:                                  # 6603 角色升星
                 return self::HeroStrengthenStar();
+            case CmdCode::hero_resetUnlockHero:                                 # 6604 角色卡解锁英雄
+                return self::ResetUnlockHero();    
             default:
                 Err(ErrCode::cmd_err);
         }
     }
     
+    private static function ResetUnlockHero() {
+        list($heroId) = req()->paras;
+        
+        if(in_array($heroId, ctx()->heros->roleCardUnlockHeroList)){
+            StlUtil::arrayRemove(ctx()->heros->roleCardUnlockHeroList, $heroId);
+        }
+              
+        UserProc::updateUserInfo();
+        return Resp::ok(array());
+        
+    }
+
     /**
      * 6603 角色升星
      * @return type
      */
-    private static function HeroStrengthenStar(){
-        list($heroId) = req()->paras;             
-        
+    private static function HeroStrengthenStar() {
+        list($heroId) = req()->paras;
+
         $mo = GameConfig::hero_getItem($heroId);
         my_Assert($mo != null, ErrCode::err_const_no);
-        
+
         my_Assert(StlUtil::dictHasProperty(ctx()->heros->Dic, $heroId), "找不到英雄配置数据!");
         my_Assert(ctx()->heros->Dic->$heroId->isUnlock == 1, "英雄未解锁!");
-        
-        $nextMo = null;       
+
+        $nextMo = null;
         $typeList = GameConfig::heroType_typeId_getItemArray($mo->typeID);
         foreach ($typeList as $item) {
-            if($item->starLv == $mo->starLv +1){
+            if ($item->starLv == $mo->starLv + 1) {
                 $nextMo = $item;
                 break;
             }
-                
         }
-        
+
         my_Assert($nextMo != null, "没有下一星级配置信息");
-        
+
         $heroDebrisList = explode(',', $nextMo->heroDebris_need);
         $itemId = $heroDebrisList[0];
         $itemNum = $heroDebrisList[1];
-        
-        my_Assert(StlUtil::dictHasProperty(ctx()->store->items, $itemId) && ctx()->store->items->$itemId >= $itemNum, ErrCode::notenough_item);      
+
+        my_Assert(StlUtil::dictHasProperty(ctx()->store->items, $itemId) && ctx()->store->items->$itemId >= $itemNum, ErrCode::notenough_item);
         ctx()->store->removeItem($itemId, $itemNum);
-        
+
         $nextHeroId = $nextMo->id;
-        
+
         $ins_hero = new Ins_Hero(ctx()->heros->Dic->$heroId);
-        $ins_hero->Id = $nextHeroId;                     
+        $ins_hero->Id = $nextHeroId;
         ctx()->heros->Dic->$nextHeroId = $ins_hero;
-        if(ctx()->heros->CurrentHeroId == $heroId){
+        if (ctx()->heros->CurrentHeroId == $heroId) {
             ctx()->heros->CurrentHeroId = $nextHeroId;
         }
         StlUtil::dictRemove(ctx()->heros->Dic, $heroId);
-                             
+
         UserProc::updateUserInfo();
-        return Resp::ok(array(                   
+        return Resp::ok(array(
                     'store' => ctx()->store,
-                    'heros'=>ctx()->heros,
-                    'newHeroId'=>$nextHeroId,
+                    'heros' => ctx()->heros,
+                    'newHeroId' => $nextHeroId,
         ));
     }
-    
+
     /**
      * 购买角色
      * @return type
      */
-    private static function BuyHero(){
+    private static function BuyHero() {
         list($heroId) = req()->paras;                                        # 切换英雄id
         my_Assert(GameConfig::hero_getItem($heroId) != null, "找不到英雄配置数据!");
-       
+
         ctx()->heros->Dic->$heroId->isUnlock = 1;
 
         return Resp::ok();
@@ -101,35 +114,85 @@ class HeroProc {
      * @return type
      */
     private static function UnlockHero() {
-        list($heroId) = req()->paras;             
-        
+        list($heroId) = req()->paras;
+
         $mo = GameConfig::hero_getItem($heroId);
         my_Assert($mo != null, ErrCode::err_const_no);
-        
+
         my_Assert(StlUtil::dictHasProperty(ctx()->heros->Dic, $heroId), "找不到英雄配置数据!");
         my_Assert(ctx()->heros->Dic->$heroId->isUnlock == 0, "英雄已经解锁!");
-        
+
         //$heroDebris_need = $mo->heroDebris_need;
         $heroDebrisList = explode(',', $mo->heroDebris_need);
         $itemId = $heroDebrisList[0];
         $itemNum = $heroDebrisList[1];
-        
+
         my_Assert(StlUtil::dictHasProperty(ctx()->store->items, $itemId) && ctx()->store->items->$itemId >= $itemNum, ErrCode::notenough_item);
-        
+
         ctx()->store->removeItem($itemId, $itemNum);
-        
-        FightProc::skillUnlock_heroUnlock($heroId);//这个接口位置不能动
-        
-        ctx()->heros->Dic->$heroId->isUnlock = 1;//解锁
-        ctx()->heros->Dic->$heroId->isNewHeadImgTip = 1;                   
-        
+
+        self::UnlockNewHero($heroId);
+
         UserProc::updateUserInfo();
-        return Resp::ok(array(                   
+        return Resp::ok(array(
                     'store' => ctx()->store,
-                    'heros'=>ctx()->heros,
+                    'heros' => ctx()->heros,
                     'skillUnlockRecord' => ctx()->privateState->skillUnlockRecord,
         ));
-       
+    }
+
+    public static function UnlockNewHero($heroId) {
+        FightProc::skillUnlock_heroUnlock($heroId); //这个接口位置不能动
+
+        ctx()->heros->Dic->$heroId->isUnlock = 1; //解锁
+        ctx()->heros->Dic->$heroId->isNewHeadImgTip = 1;
+    }
+
+    public static function RoleCardUnlockHero($itemId, $num) {
+        $heroDic = GameConfig::hero();
+        $heroTypeId = 0;
+
+        $tMo = null;
+        foreach ($heroDic as $mo) {
+            if ($itemId == $mo->roleCard) {
+                $heroTypeId = $mo->typeID;
+                $tMo = $mo;
+                break;
+            }
+        }
+        $tag = false;
+        if ($heroTypeId != 0) {
+            $dic = ctx()->heros->Dic;
+            foreach ($dic as $heroItem) {
+                $hero = GameConfig::hero_getItem($heroItem->Id);
+                if ($hero->typeID == $heroTypeId && $heroItem->isUnlock == 1) {
+                    $tag = true;
+                    break;
+                }
+            }
+
+            if ($tag) {//英雄已经解锁,则转为碎片
+                for ($i = 0; $i < $num; $i++) {
+                    if ($tMo->heroDebris_need != null) {
+                        StoreProc::AddMultiItemInStore($tMo->heroDebris_need);
+                    }
+                }
+            } else {//解锁英雄
+                for ($i = 0; $i < $num; $i++) {
+                    if ($i == 0) {
+                        HeroProc::UnlockNewHero($tMo->id);
+                        ctx()->heros->roleCardUnlockHeroList[] = $tMo->id;
+                        
+                        StoreProc::$reward[] = $itemId.',1'; 
+                        //StoreProc::$reward_hero[] = $tMo->id;
+                    } else {
+                        StoreProc::AddMultiItemInStore($tMo->heroDebris_need);
+                    }
+                }
+            }
+        }
+        
+        UserProc::updateUserInfo();
     }
 
     /**
@@ -141,4 +204,5 @@ class HeroProc {
         ctx()->heros->CurrentHeroId = $newHeroId;
         return Resp::ok();
     }
+
 }

+ 1 - 0
Gameserver/App/process/ShopProc.php

@@ -462,6 +462,7 @@ class ShopProc {
                     'privateState' => $user->privateState,
                     'store' => $user->store,
                     'task' => ctx()->task,
+                    'heros'=> ctx()->heros,
                     'reward' => StoreProc::$reward,
                     'reward_Gem' => StoreProc::$reward_Gem,
         ));

+ 7 - 1
Gameserver/App/process/StoreProc.php

@@ -749,6 +749,8 @@ class StoreProc {
     
     static $reward = array();
     static $reward_Gem = array();
+    static $reward_hero = array();
+    
     /**
      * 具体奖励存入背包
      * @param type $goodsStr
@@ -765,7 +767,7 @@ class StoreProc {
 
             list($itemId, $num) = $val;                                         # ID, 数量           
             $itemMo = GameConfig::item_getItem($itemId);
-            if($itemMo->itemType != 701 && $itemMo->itemType != 201 && $src != 1){               
+            if($itemMo->itemType != 701 && $itemMo->itemType != 201 && $itemMo->itemType != 502 && $src != 1){               
                 self::$reward[] = $value;                                                   
             }           
             
@@ -792,6 +794,10 @@ class StoreProc {
                     if ($itemMo->itemType == 100) {//图纸
                         self::checkEquipUpgradeTip();
                     }
+                    break;
+                case 502://角色卡
+                    HeroProc::RoleCardUnlockHero($itemId, $num);
+                    
                     break;
                 case 201://宝石           
                     for ($i = 0; $i < $num; $i++) {                       

+ 10 - 5
Gameserver/App/process/TaskProc.php

@@ -63,7 +63,7 @@ class TaskProc {
         } else {
             foreach ($dic as $uid => $task) {
                 $t = new Ins_TaskStep_Active($task);
-                if ($t->mo()->type == $type && $t->isFinish()) {
+                if ($t->mo()->type == $type && $t->state == Enum_TaskCardStateType::finish) {
                     $arr[] = $uid;
                 }
             }
@@ -100,9 +100,11 @@ class TaskProc {
                 break;
         }
 
-        $str = "5," . $point;
-        StoreProc::$reward[] = $str;
-
+        if($point != 0){
+            $str = "5," . $point;
+            StoreProc::$reward[] = $str;
+        }
+        
         UserProc::updateUserInfo();
         return Resp::ok(array("task" => ctx()->task,
                     "store" => ctx()->store,
@@ -110,6 +112,7 @@ class TaskProc {
                     'reward_Gem' => StoreProc::$reward_Gem,
                     'gold' => ctx()->baseInfo->gold,
                     'cash' => ctx()->baseInfo->cash,
+                    'heros'=> ctx()->heros,
         ));
     }
 
@@ -152,6 +155,7 @@ class TaskProc {
                     'reward_Gem' => StoreProc::$reward_Gem,
                     'gold' => ctx()->baseInfo->gold,
                     'cash' => ctx()->baseInfo->cash,
+                    'heros'=> ctx()->heros,
         ));
     }
 
@@ -214,7 +218,8 @@ class TaskProc {
                     'reward' => StoreProc::$reward,
                     'reward_Gem' => StoreProc::$reward_Gem,
                     'gold' => ctx()->baseInfo->gold,
-                    'cash' => ctx()->baseInfo->cash,
+                    'cash' => ctx()->baseInfo->cash,   
+                    'heros'=> ctx()->heros,
         ));
     }