2
0

21 Ревизии 2823e36404 ... 55b1c78172

Автор SHA1 Съобщение Дата
  cyzhao 55b1c78172 世界boss第一次解锁战斗后不能入榜的bug修复 преди 1 месец
  cyzhao d27ed71a89 定时功能bug修复 преди 1 месец
  cyzhao e9ac0a48e3 出战助战修改 преди 1 месец
  cyzhao 26c9e01930 世家boss排行榜清楚已经删除账号 преди 1 месец
  cyzhao 8f4b418b6d 宠物休息bug修复 преди 1 месец
  cyzhao a15a55c9f4 宠物休息 преди 1 месец
  cyzhao 09952a1a16 宠物休息 преди 1 месец
  cyzhao 4528bdb765 邮件描述信息修改 преди 1 месец
  cyzhao 214dff06d6 宠物探索重置派遣宠物 преди 1 месец
  cyzhao a2e00940a8 世界boss未领取奖励邮件合并 преди 1 месец
  cyzhao 07738ba310 Merge branch 'dev' of http://ylsjtt.game7000.com:3000/YLSJ/jzhj2024server into dev преди 1 месец
  cyzhao a1e5f7e180 世界boss未领取伤害奖励总计到一个邮件发送 преди 1 месец
  cyzhao 2324a62dfc 宠物接口移到pet里面 преди 1 месец
  wanggangzero 3dc9b05b07 添加战斗时长校验 преди 1 месец
  wanggangzero d67d2b1788 fix: 微信支付推送到tapdb. преди 2 месеца
  cyzhao d2254fd328 世界boss需求修改完成 преди 2 месеца
  cyzhao 18935a8597 加灵宠属性配置 преди 2 месеца
  cyzhao d4b2fb2400 宠物探索接口 преди 2 месеца
  cyzhao a04adb1531 世界bossbug修复 преди 2 месеца
  cyzhao be2c0d2c8c 刷表配置 преди 2 месеца
  cyzhao 535360d6e9 灵宠探索区域 преди 2 месеца
променени са 44 файла, в които са добавени 2094 реда и са изтрити 731 реда
  1. 35 0
      Gameserver/App/base/CmdCode.php
  2. 47 12
      Gameserver/App/base/ErrCode.php
  3. 1 1
      Gameserver/App/base/MemKey_GameRun.php
  4. 85 3
      Gameserver/App/configs/GameConfig.php
  5. 83 3
      Gameserver/App/model/Const/GameConfig.php
  6. 1 1
      Gameserver/App/model/Const/sm_activeTask.php
  7. 1 1
      Gameserver/App/model/Const/sm_activeTask_type.php
  8. 1 1
      Gameserver/App/model/Const/sm_activity_onlinegift.php
  9. 1 1
      Gameserver/App/model/Const/sm_announcement.php
  10. 1 1
      Gameserver/App/model/Const/sm_equip.php
  11. 1 1
      Gameserver/App/model/Const/sm_fun_unlock.php
  12. 5 3
      Gameserver/App/model/Const/sm_gate.php
  13. 8 1
      Gameserver/App/model/Const/sm_gate_unlock.php
  14. 6 11
      Gameserver/App/model/Const/sm_glc2.php
  15. 1 1
      Gameserver/App/model/Const/sm_globalsettings.php
  16. 1 1
      Gameserver/App/model/Const/sm_hero.php
  17. 1 1
      Gameserver/App/model/Const/sm_heroType_typeId.php
  18. 1 1
      Gameserver/App/model/Const/sm_item.php
  19. 13 3
      Gameserver/App/model/Const/sm_pet.php
  20. 77 0
      Gameserver/App/model/Const/sm_pet_area.php
  21. 77 0
      Gameserver/App/model/Const/sm_pet_area_level.php
  22. 62 0
      Gameserver/App/model/Const/sm_pet_attr.php
  23. 4 4
      Gameserver/App/model/Const/sm_pet_exploreoutput.php
  24. 172 0
      Gameserver/App/model/Const/sm_pet_skills.php
  25. 2 2
      Gameserver/App/model/Const/sm_plots.php
  26. 1 1
      Gameserver/App/model/Const/sm_predicate.php
  27. 1 1
      Gameserver/App/model/Const/sm_skills.php
  28. 1 1
      Gameserver/App/model/Const/sm_sysmail.php
  29. 1 1
      Gameserver/App/model/Const/sm_token_gift.php
  30. 11 1
      Gameserver/App/model/Const/sm_waveItem.php
  31. 11 1
      Gameserver/App/model/Const/sm_waves.php
  32. 47 0
      Gameserver/App/model/Const/sm_worldboss_turnnum.php
  33. 143 0
      Gameserver/App/model/User/Enum_FunType.php
  34. 5 0
      Gameserver/App/model/User/Info_Gates.php
  35. 1 7
      Gameserver/App/model/User/Info_PrivateState.php
  36. 7 0
      Gameserver/App/model/User/Info_Store.php
  37. 35 12
      Gameserver/App/model/User/Ins_ExploreArea.php
  38. 13 3
      Gameserver/App/process/EmailProc.php
  39. 180 73
      Gameserver/App/process/FightProc.php
  40. 920 0
      Gameserver/App/process/PetProc.php
  41. 27 574
      Gameserver/App/process/StoreProc.php
  42. 1 1
      Gameserver/App/service_call/pay/official/wxpayv2/notify.php
  43. 1 1
      Gameserver/App/service_call/pay/official/wxpayv2/notify_hykb.php
  44. 1 1
      Gameserver/App/triggers/cyzhao.php

+ 35 - 0
Gameserver/App/base/CmdCode.php

@@ -426,6 +426,41 @@ class CmdCode {
      * 解锁孵化位置
      */
     const store_pet_unlockBreedLocation = 6432;
+    
+    /**
+     * 6433 区域等级升级
+     */
+    const store_pet_areaLevelUpgrade = 6433;   
+    
+    /**
+     * 6434 更换派遣宠物
+     */
+    const store_pet_replaceDispatchPet = 6434;
+    
+    /**
+     * 6435 删除全部派遣宠物
+     */
+    const store_pet_removeDispatchPet = 6435;
+    
+    /**
+     * 6436 领取探索奖励
+     */
+    const store_pet_receiveReward = 6436;
+    
+    /**
+     * 6437 点击派遣按钮
+     */
+    const store_pet_dispatchPet = 6437;
+    
+    /**
+     * 6438 某区域的派遣宠物信息
+     */
+    const store_pet_resetDispatchPet = 6438;
+    
+    /**
+     * 
+     */
+    const store_pet_removeFightPosition = 6439;
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="商城操作码 - 65xx">
 

+ 47 - 12
Gameserver/App/base/ErrCode.php

@@ -80,6 +80,11 @@ class ErrCode {
      */
     const clientPrintMsg_Halt = 1033;
 
+    /**
+     * 操作耗时过短!
+     */
+    const err_opTimeTooShort = 1201;
+
     /**
      * 功能码非法
      */
@@ -531,12 +536,12 @@ class ErrCode {
      * 合成材料不能参与此次合成
      */
     const user_store_equip_composeMaterialErr = 3318;
-    
+
     /**
      * 已达最高品阶
      */
     const user_store_equip_qualMaxLimit = 3319;
-    
+
     /**
      * 不存在该灵宠
      */
@@ -546,7 +551,7 @@ class ErrCode {
      * 该灵宠已被选择出战
      */
     const user_store_NotSelectPet_fight = 3321;
-    
+
     /**
      * 该灵宠已被选择助战
      */
@@ -556,31 +561,61 @@ class ErrCode {
      * 该区域最多展示8个灵宠
      */
     const user_store_ShowPetNumLimit = 3323;
-    
+
     /**
      * 没有可以孵化的位置
      */
     const user_store_NoBreedSlot = 3324;
-    
+
     /**
      * 不存在可以加速孵化的灵宠蛋
      */
     const user_store_NoExistBreedEgg = 3325;
-    
+
     /**
      * 孵化位置未解锁
      */
     const user_store_SlotNotUnlocked = 3326;
-    
+
     /**
      * 已经完成孵化
      */
     const user_store_CompleteBreed = 3327;
-    
+
     /**
      * 未完成孵化
      */
     const user_store_NoCompleteBreed = 3328;
+
+    /**
+     * 当前区域派遣灵宠数量已达上限
+     */
+    const user_store_dispatchPetNumLimit = 3329;
+
+    /**
+     * 该灵宠不擅长探索当前区域
+     */
+    const user_store_dispatchPetErr = 3330;
+
+    /**
+     * 探索中无法更换灵宠
+     */
+    const user_store_CannotReplaced_tsLimit = 3331;
+
+    /**
+     * 没有可以领取的产出奖励
+     */
+    const user_store_CannotReceiveReward = 3332;
+
+    /**
+     * 至少派遣一只宠物进行探索
+     */
+    const user_store_addDispatchPet = 3333;
+    
+    /**
+     * 该宠物已经助战
+     */
+    const user_store_NoReplacePet = 3334;
 // </editor-fold>
 //
 //   // <editor-fold defaultstate="collapsed" desc="    shop 3400    ">
@@ -707,22 +742,22 @@ class ErrCode {
      * 活跃点数量不足
      */
     const active_pointNotEnough = 3516;
-    
+
     /**
      * 连续在线礼包缺少配置数据
      */
     const onlinegift_constno_err = 3517;
-    
+
     /**
      * 抽奖券购买数量超出上限
      */
     const active_flipCardLotteru_buyNumLimit = 3518;
-    
+
     /**
      * 伤害值未达标不能领取该奖励
      */
     const active_worldBoss_notClaimRewards = 3519;
-    
+
     /**
      * 功能未解锁
      */

+ 1 - 1
Gameserver/App/base/MemKey_GameRun.php

@@ -12,7 +12,7 @@ namespace loyalsoft;
 class MemKey_GameRun {
     // <editor-fold defaultstate="collapsed" desc="世界boss 排行榜">  
     /**
-     * 世界boss 开启时间记录
+     * 世界boss 开启时间记录【废弃】
      * @param type $zoneid
      * @return type
      */

+ 85 - 3
Gameserver/App/configs/GameConfig.php

@@ -3,9 +3,11 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-25 10:27:29
+ // 日期: 2025-04-24 16:06:45
 ////////////////////
 
+namespace loyalsoft;
+
 /**
  * 常量配置数据 
  */
@@ -1233,9 +1235,9 @@ class GameConfig {
     /**
     * @return \sm_pet_exploreoutput pet_exploreoutput item数据 
     */
-    public static function pet_exploreoutput_getItem($itemid)
+    public static function pet_exploreoutput_getItem($typeId, $qual)
     { 
-        return self::get_hash_item('pet_exploreoutput', $itemid);
+        return self::get_hash_item('pet_exploreoutput', "$typeId-$qual");
     }
     /**
     * 灵宠等级表
@@ -1286,6 +1288,86 @@ class GameConfig {
         return self::get_hash_item('pet_egg', $itemid);
     }
     /**
+    * 宠物探索区域表
+    * @return \pet_area_level
+    */
+    public static function pet_area_level()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pet_area_level');
+    }
+    /**
+    * @return \sm_pet_area_level pet_area_level item数据 
+    */
+    public static function pet_area_level_getItem($areaId, $level)
+    { 
+        return self::get_hash_item('pet_area_level', "$areaId-$level");
+    }
+    /**
+    * 
+    * @return \pet_area
+    */
+    public static function pet_area()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pet_area');
+    }
+    /**
+    * @return \sm_pet_area pet_area itemArray 
+    */
+    public static function pet_area_getItemArray($key)
+    { 
+        return self::get_hash_item('pet_area', $key);
+    }
+    /**
+    * 宠物属性
+    * @return \pet_attr
+    */
+    public static function pet_attr()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pet_attr');
+    }
+    /**
+    * @return \sm_pet_attr pet_attr item数据 
+    */
+    public static function pet_attr_getItem($rarity, $qual)
+    { 
+        return self::get_hash_item('pet_attr', "$rarity-$qual");
+    }
+    /**
+    * 世家boss轮次表
+    * @return \worldboss_turnnum
+    */
+    public static function worldboss_turnnum()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'worldboss_turnnum');
+    }
+    /**
+    * @return \sm_worldboss_turnnum worldboss_turnnum item数据 
+    */
+    public static function worldboss_turnnum_getItem($itemid)
+    { 
+        return self::get_hash_item('worldboss_turnnum', $itemid);
+    }
+    /**
+    * 宠物技能
+    * @return \pet_skills
+    */
+    public static function pet_skills()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pet_skills');
+    }
+    /**
+    * @return \sm_pet_skills pet_skills item数据 
+    */
+    public static function pet_skills_getItem($itemid)
+    { 
+        return self::get_hash_item('pet_skills', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * @return \ver
     */

+ 83 - 3
Gameserver/App/model/Const/GameConfig.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-25 10:27:29
+ // 日期: 2025-04-24 16:06:45
 ////////////////////
 
 /**
@@ -1233,9 +1233,9 @@ class GameConfig {
     /**
     * @return \sm_pet_exploreoutput pet_exploreoutput item数据 
     */
-    public static function pet_exploreoutput_getItem($itemid)
+    public static function pet_exploreoutput_getItem($typeId, $qual)
     { 
-        return self::get_hash_item('pet_exploreoutput', $itemid);
+        return self::get_hash_item('pet_exploreoutput', "$typeId-$qual");
     }
     /**
     * 灵宠等级表
@@ -1286,6 +1286,86 @@ class GameConfig {
         return self::get_hash_item('pet_egg', $itemid);
     }
     /**
+    * 宠物探索区域表
+    * @return \pet_area_level
+    */
+    public static function pet_area_level()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pet_area_level');
+    }
+    /**
+    * @return \sm_pet_area_level pet_area_level item数据 
+    */
+    public static function pet_area_level_getItem($areaId, $level)
+    { 
+        return self::get_hash_item('pet_area_level', "$areaId-$level");
+    }
+    /**
+    * 
+    * @return \pet_area
+    */
+    public static function pet_area()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pet_area');
+    }
+    /**
+    * @return \sm_pet_area pet_area itemArray 
+    */
+    public static function pet_area_getItemArray($key)
+    { 
+        return self::get_hash_item('pet_area', $key);
+    }
+    /**
+    * 宠物属性
+    * @return \pet_attr
+    */
+    public static function pet_attr()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pet_attr');
+    }
+    /**
+    * @return \sm_pet_attr pet_attr item数据 
+    */
+    public static function pet_attr_getItem($rarity, $qual)
+    { 
+        return self::get_hash_item('pet_attr', "$rarity-$qual");
+    }
+    /**
+    * 世家boss轮次表
+    * @return \worldboss_turnnum
+    */
+    public static function worldboss_turnnum()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'worldboss_turnnum');
+    }
+    /**
+    * @return \sm_worldboss_turnnum worldboss_turnnum item数据 
+    */
+    public static function worldboss_turnnum_getItem($itemid)
+    { 
+        return self::get_hash_item('worldboss_turnnum', $itemid);
+    }
+    /**
+    * 宠物技能
+    * @return \pet_skills
+    */
+    public static function pet_skills()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pet_skills');
+    }
+    /**
+    * @return \sm_pet_skills pet_skills item数据 
+    */
+    public static function pet_skills_getItem($itemid)
+    { 
+        return self::get_hash_item('pet_skills', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * @return \ver
     */

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-25 10:17:46
+ // 日期: 2025-03-26 09:58:51
 ////////////////////
 
 

+ 1 - 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 
- // 日期: 2025-03-25 10:17:46
+ // 日期: 2025-03-26 09:58:51
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-01-24 09:26:44
+ // 日期: 2025-03-27 14:39:16
 ////////////////////
 
 

+ 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 
- // 日期: 2025-01-24 15:28:46
+ // 日期: 2025-03-31 13:56:56
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-21 16:11:36
+ // 日期: 2025-04-10 14:14:23
 ////////////////////
 
 

+ 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 
- // 日期: 2025-03-03 11:44:05
+ // 日期: 2025-04-01 15:02:55
 ////////////////////
 
 

+ 5 - 3
Gameserver/App/model/Const/sm_gate.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-14 16:22:01
+ // 日期: 2025-04-14 17:29:12
 ////////////////////
 
 
@@ -37,9 +37,11 @@ class sm_gate
     public $weather;
 
     /**
-    * @var Int32 【废弃2024.7.23】关卡难度:主线难度:1,挑战难度:1,2,3...  
+    * @var String 用于存储关卡事件: (事件id:参数1,参数2...
+    *      /// 事件id:参数1,...)
+    *  1,全局刷新经验(1:开始延迟时间s,刷新间隔s,数量,ID,数量,ID,数量,ID)  
     */
-    public $gateDifficult;
+    public $gateEvents;
 
     /**
     * @var Int32 关卡序号  

+ 8 - 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 
- // 日期: 2025-03-14 16:22:01
+ // 日期: 2025-04-14 17:29:12
 ////////////////////
 
 
@@ -31,6 +31,13 @@ class sm_gate_unlock
     */
     public $weather;
 
+    /**
+    * @var String 用于存储关卡事件: (事件id:参数1,参数2...
+    *      /// 事件id:参数1,...)
+    *  1,全局刷新经验(1:开始延迟时间s,刷新间隔s,数量,ID,数量,ID,数量,ID)  
+    */
+    public $gateEvents;
+
     /**
     * @var String 主线挑战: 难度1-词条列表(逗号分隔)  
     */

+ 6 - 11
Gameserver/App/model/Const/sm_glc2.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-24 16:44:08
+ // 日期: 2025-04-09 15:06:40
 ////////////////////
 
 
@@ -83,11 +83,6 @@ class sm_glc2
     */
     public $FlipCardLotteryTask;
 
-    /**
-    * @var String 世界boss的bossId信息  
-    */
-    public $WorldBoss_BossId;
-
     /**
     * @var Int32 世界boss上榜排名  
     */
@@ -103,11 +98,6 @@ class sm_glc2
     */
     public $WorldBoss_RankRewardStatistics;
 
-    /**
-    * @var String 世界boss的bossId对应的关卡  
-    */
-    public $WorldBoss_gateId;
-
     /**
     * @var Int32 该区域最多展示8个灵宠  
     */
@@ -118,5 +108,10 @@ class sm_glc2
     */
     public $Pet_BreedLocationUnlockInfo;
 
+    /**
+    * @var String 关卡解锁区域表  
+    */
+    public $Pet_ExploreArea_UnlockInfo;
+
 }
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-24 11:52:15
+ // 日期: 2025-04-14 18:03:14
 ////////////////////
 
 

+ 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 
- // 日期: 2025-03-24 16:00:40
+ // 日期: 2025-04-02 15:27:00
 ////////////////////
 
 

+ 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 
- // 日期: 2025-03-24 16:00:40
+ // 日期: 2025-04-02 15:27:00
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-25 10:08:15
+ // 日期: 2025-03-25 10:41:30
 ////////////////////
 
 

+ 13 - 3
Gameserver/App/model/Const/sm_pet.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-20 15:09:41
+ // 日期: 2025-04-24 11:52:05
 ////////////////////
 
 
@@ -58,20 +58,30 @@ class sm_pet
     */
     public $icon;
 
+    /**
+    * @var String 形象  
+    */
+    public $image;
+
     /**
     * @var String 解锁词条ID (品质提升,多条词条逗号分隔,各词条是叠加关系)(从红色往前排,倒着填)  
     */
     public $qual_predicateId;
 
     /**
-    * @var Int32 战斗技能 default(0) 
+    * @var String 战斗技能 default(0) 
     */
     public $fightSkillId;
 
     /**
-    * @var Int32 援助技能 default(0) 
+    * @var String 援助技能 default(0) 
     */
     public $supportSkillId;
 
+    /**
+    * @var Single 战斗中角色每提升5级, 伤害+x%  
+    */
+    public $addDamagePer5Level;
+
 }
 

+ 77 - 0
Gameserver/App/model/Const/sm_pet_area.php

@@ -0,0 +1,77 @@
+<?php
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2025-03-26 16:05:53
+////////////////////
+
+
+/**
+ * Static Model pet_area 
+ */
+class sm_pet_area
+{
+
+    /**
+    * @var Int32 唯一 default(0) 
+    */
+    public $id;
+
+    /**
+    * @var Int32 实例id default(0) 
+    */
+    public $areaId;
+
+    /**
+    * @var String 区域名称  
+    */
+    public $name;
+
+    /**
+    * @var Int32 区域等级 default(0) 
+    */
+    public $level;
+
+    /**
+    * @var Int32 一个小时产出个数 default(0) 
+    */
+    public $output_num;
+
+    /**
+    * @var Int32 总产出时间  
+    */
+    public $output_time;
+
+    /**
+    * @var String 固定产出  
+    */
+    public $reward_fixed;
+
+    /**
+    * @var String 随机产出  
+    */
+    public $reward_extra;
+
+    /**
+    * @var Int32 派遣宠物个数 default(0) 
+    */
+    public $dispatchPetNum;
+
+    /**
+    * @var Int32 解锁区域玩家等级要求 default(0) 
+    */
+    public $unlockArea_userLv;
+
+    /**
+    * @var Int32 解锁区域金币要求 default(0) 
+    */
+    public $unlockArea_gold;
+
+    /**
+    * @var String 额外字段  
+    */
+    public $etc;
+
+}
+

+ 77 - 0
Gameserver/App/model/Const/sm_pet_area_level.php

@@ -0,0 +1,77 @@
+<?php
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2025-03-26 16:05:53
+////////////////////
+
+
+/**
+ * Static Model pet_area_level 宠物探索区域表
+ */
+class sm_pet_area_level
+{
+
+    /**
+    * @var Int32 唯一 default(0) 
+    */
+    public $id;
+
+    /**
+    * @var Int32 实例id default(0) 
+    */
+    public $areaId;
+
+    /**
+    * @var String 区域名称  
+    */
+    public $name;
+
+    /**
+    * @var Int32 区域等级 default(0) 
+    */
+    public $level;
+
+    /**
+    * @var Int32 一个小时产出个数 default(0) 
+    */
+    public $output_num;
+
+    /**
+    * @var Int32 总产出时间  
+    */
+    public $output_time;
+
+    /**
+    * @var String 固定产出  
+    */
+    public $reward_fixed;
+
+    /**
+    * @var String 随机产出  
+    */
+    public $reward_extra;
+
+    /**
+    * @var Int32 派遣宠物个数 default(0) 
+    */
+    public $dispatchPetNum;
+
+    /**
+    * @var Int32 解锁区域玩家等级要求 default(0) 
+    */
+    public $unlockArea_userLv;
+
+    /**
+    * @var Int32 解锁区域金币要求 default(0) 
+    */
+    public $unlockArea_gold;
+
+    /**
+    * @var String 额外字段  
+    */
+    public $etc;
+
+}
+

+ 62 - 0
Gameserver/App/model/Const/sm_pet_attr.php

@@ -0,0 +1,62 @@
+<?php
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2025-04-07 17:25:12
+////////////////////
+
+
+/**
+ * Static Model pet_attr 宠物属性
+ */
+class sm_pet_attr
+{
+
+    /**
+    * @var Int32 唯一  
+    */
+    public $id;
+
+    /**
+    * @var Int32 稀有度 default(0) 
+    */
+    public $rarity;
+
+    /**
+    * @var Int32 品阶 default(0) 
+    */
+    public $qual;
+
+    /**
+    * @var Int32 基础攻击力 default(0) 
+    */
+    public $attack;
+
+    /**
+    * @var Int32 攻击力的继承比例 default(0) 
+    */
+    public $inherit_attack;
+
+    /**
+    * @var Int32 攻击力的每级的加成值 default(0) 
+    */
+    public $addNum_attack;
+
+    /**
+    * @var Int32 基础生命 default(0) 
+    */
+    public $hp;
+
+    /**
+    * @var Int32 生命的继承比例 default(0) 
+    */
+    public $inherit_hp;
+
+    /**
+    * @var Int32 生命的每级的加成值 default(0) 
+    */
+    public $addNum_hp;
+
+}
+

+ 4 - 4
Gameserver/App/model/Const/sm_pet_exploreoutput.php

@@ -19,17 +19,17 @@ class sm_pet_exploreoutput
     public $id;
 
     /**
-    * @var Int32 对应pet表里的type字段  
+    * @var Int32 对应pet表里的type字段 default(0) 
     */
     public $typeId;
 
     /**
-    * @var String 探索区域id集合  
+    * @var Int32 宠物品阶 default(0) 
     */
-    public $exploreAreaIds;
+    public $qual;
 
     /**
-    * @var String 1到11品阶的产出速度和时间  
+    * @var String 探索区域id,产出,时间;探索区域id,产出,时间  
     */
     public $exploreOutput;
 

+ 172 - 0
Gameserver/App/model/Const/sm_pet_skills.php

@@ -0,0 +1,172 @@
+<?php
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2025-04-24 14:52:32
+////////////////////
+
+
+/**
+ * Static Model pet_skills 宠物技能
+ */
+class sm_pet_skills
+{
+
+    /**
+    * @var Int32 技能id default(0) 
+    */
+    public $skillId;
+
+    /**
+    * @var Int32 同一种技能的类别区分(1~6星是同一个id) default(0) 
+    */
+    public $typeId;
+
+    /**
+    * @var String 技能名称  
+    */
+    public $name;
+
+    /**
+    * @var String 图标  
+    */
+    public $icon;
+
+    /**
+    * @var String 描述信息  
+    */
+    public $desc;
+
+    /**
+    * @var String 额外字段  
+    */
+    public $etc;
+
+    /**
+    * @var Single 伤害倍率  
+    */
+    public $atkRate;
+
+    /**
+    * @var Int32 子弹数量  
+    */
+    public $bullet_num;
+
+    /**
+    * @var Single 子弹体积(倍率) default(0) 
+    */
+    public $bullet_size;
+
+    /**
+    * @var Single 子弹初始化速度 default(1) 
+    */
+    public $prime_bullet_speed;
+
+    /**
+    * @var Single 子弹飞行速度修正(倍率)  
+    */
+    public $bullet_speed;
+
+    /**
+    * @var Single 子弹转动速度修正(倍率) default(0) 
+    */
+    public $bullet_rotationSpeed;
+
+    /**
+    * @var Single 子弹发射间隔(秒) default(0.1) 
+    */
+    public $bullet_ejectInterval;
+
+    /**
+    * @var Single 技能持续(生存)时间(具体值则指秒数, 0 代表无限制) default(0.000) 
+    */
+    public $bullet_sustainTime;
+
+    /**
+    * @var String 子弹命中效果: 0(默认,无:错误值)1 命中消失 2(爆炸)3(穿透)4(击退(包含击退距离))5(边缘回弹)6(怪物+边缘回弹)7(自动锁定)  
+    */
+    public $bullet_hitType;
+
+    /**
+    * @var Single 子弹爆炸范围(倍率) default(1) 
+    */
+    public $bullet_explodeRange;
+
+    /**
+    * @var Single 击退距离% default(0) 
+    */
+    public $repulse_distance;
+
+    /**
+    * @var Int32 子弹伤害次数(0,无限,具体值则按数量执行)  
+    */
+    public $bullet_damageTimes;
+
+    /**
+    * @var Int32 0默认值
+    *  1自己
+    *  2敌方
+    *    
+    */
+    public $aim_type;
+
+    /**
+    * @var Single 冷却时间(秒)  
+    */
+    public $coolTime;
+
+    /**
+    * @var String buffid: 灼烧/流血、减速或麻痹等(支持冒号、逗号分割,最多4个)(例: 8341:100,9527:60,...)
+    *    
+    */
+    public $buffId;
+
+    /**
+    * @var String 词条编号,如有多条, 逗号分隔 default(0) 
+    */
+    public $predicates;
+
+    /**
+    * @var Int32 是否穿墙 0 不穿,1 穿(默认)2023.11.20 default(1) 
+    */
+    public $can_passwall;
+
+    /**
+    * @var Int32 冷却计算开始时机:0 在技能开始, 1 在技能结束(子弹持续时间之后) default(0) 
+    */
+    public $intervalDependsOnDuration;
+
+    /**
+    * @var Single 碰撞盒延迟时间(单位:秒)2023.11.20 default(0) 
+    */
+    public $hitBoxDelay;
+
+    /**
+    * @var String 增益(生效)(逗号分割)列表 2023.11.20
+    *  0 无(不生效)
+    *  1 攻击力
+    *  2 冷却时间
+    *  3 攻击范围
+    *  4 子弹速度
+    *  5 持续时间
+    *  6 子弹数量
+    *  7 伤害次数
+    *  8 击退距离
+    *    
+    */
+    public $buffEffectTabel;
+
+    /**
+    * @var Int32 攻击范围词条对技能生效类型: 1 影响攻击范围 2 影响子弹体积 3 同时影响攻击范围和子弹体积
+    *   default(1) 
+    */
+    public $atkRangeBuffEffectType;
+
+    /**
+    * @var String (释放额外技能需要)释放普通技能n次触发特殊技能(逗号分隔,对应英雄的不同星级)  
+    */
+    public $emit_number;
+
+}
+

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-07 11:39:07
+ // 日期: 2025-04-07 11:00:55
 ////////////////////
 
 
@@ -45,7 +45,7 @@ class sm_plots
     public $position;
 
     /**
-    * @var Int32 显式时间:(波次id)(stage类型>=3的时候生效)  
+    * @var Int32 显式时间:(波次id)(stage类型>=3的时候生效)Ps.波次定制的剧情,填写999  
     */
     public $fireTs;
 

+ 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 
- // 日期: 2025-03-24 14:31:00
+ // 日期: 2025-04-10 14:12:07
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-20 18:03:28
+ // 日期: 2025-04-10 11:52:02
 ////////////////////
 
 

+ 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 
- // 日期: 2025-01-23 16:06:19
+ // 日期: 2025-03-31 11:24:28
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-01-15 18:28:53
+ // 日期: 2025-03-31 10:51:01
 ////////////////////
 
 

+ 11 - 1
Gameserver/App/model/Const/sm_waveItem.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-25 09:49:15
+ // 日期: 2025-04-24 15:54:44
 ////////////////////
 
 
@@ -125,5 +125,15 @@ class sm_waveItem
     */
     public $boom;
 
+    /**
+    * @var String 是否加入剧情: 0,0,0 (开始剧情stageId, 锁血剧情stageId, 结束剧情stageId) default(0,0,0) 
+    */
+    public $plots;
+
+    /**
+    * @var Int32 达到当前波次的最小时长(单位:秒)(用于作弊校验) default(300) 
+    */
+    public $minTs;
+
 }
 

+ 11 - 1
Gameserver/App/model/Const/sm_waves.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2025-03-25 09:49:15
+ // 日期: 2025-04-24 15:54:44
 ////////////////////
 
 
@@ -125,5 +125,15 @@ class sm_waves
     */
     public $boom;
 
+    /**
+    * @var String 是否加入剧情: 0,0,0 (开始剧情stageId, 锁血剧情stageId, 结束剧情stageId) default(0,0,0) 
+    */
+    public $plots;
+
+    /**
+    * @var Int32 达到当前波次的最小时长(单位:秒)(用于作弊校验) default(300) 
+    */
+    public $minTs;
+
 }
 

+ 47 - 0
Gameserver/App/model/Const/sm_worldboss_turnnum.php

@@ -0,0 +1,47 @@
+<?php
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2025-04-08 15:59:32
+////////////////////
+
+
+/**
+ * Static Model worldboss_turnnum 世家boss轮次表
+ */
+class sm_worldboss_turnnum
+{
+
+    /**
+    * @var Int32 轮次id  
+    */
+    public $turnId;
+
+    /**
+    * @var String 开始时间  
+    */
+    public $startTs;
+
+    /**
+    * @var String 结束时间  
+    */
+    public $endTs;
+
+    /**
+    * @var Int32 关卡id default(0) 
+    */
+    public $gateId;
+
+    /**
+    * @var Int32 bossId default(0) 
+    */
+    public $bossId;
+
+    /**
+    * @var Int32 对应世界boss伤害表里的orderId  
+    */
+    public $orderId;
+
+}
+

+ 143 - 0
Gameserver/App/model/User/Enum_FunType.php

@@ -0,0 +1,143 @@
+<?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 Enum_FunUnlockType
+ *
+ * @author c'y'zhao
+ */
+class Enum_FunType {
+    /// <summary>
+    /// 设置
+    /// </summary>
+    const SheZhi = 1;
+    /// <summary>
+    /// 公告
+    /// </summary>
+    const Announcement = 2;
+    /// <summary>
+    /// 邮件
+    /// </summary>
+    const Mail = 3;
+
+    /// <summary>
+    /// 排行榜
+    /// </summary>
+    const Rank = 4;
+
+    /// <summary>
+    /// 活动--日常周常 任务
+    /// </summary>
+    const ActiveTask = 5;
+
+    /// <summary>
+    /// 限时活动
+    /// </summary>
+    const Happy_7Day = 6;
+
+    /// <summary>
+    /// 关卡下的宝箱
+    /// </summary>
+    const GateBox = 7;
+
+    /// <summary>
+    /// 扫荡按钮功能
+    /// </summary>
+    const SweepBotton = 8;
+
+    /// <summary>
+    /// 关卡挑战按钮
+    /// </summary>
+    const FightBotton = 9;
+    /// <summary>
+    /// 金币购买
+    /// </summary>
+    const Gold_Buy = 10;
+
+    /// <summary>
+    /// 元宝购买
+    /// </summary>
+    const Cash_Buy = 11;
+
+    /// <summary>
+    /// 体力购买
+    /// </summary>
+    const Tili_Buy = 12;
+
+    /// <summary>
+    /// 坊市
+    /// </summary>
+    const Shop = 13;
+
+    /// <summary>
+    /// 装备
+    /// </summary>
+    const Equip = 14;
+
+    /// <summary>
+    /// 挑战
+    /// </summary>
+    const Challange = 15;
+
+    /// <summary>
+    /// 启灵
+    /// </summary>
+    const Qiling = 16;
+
+    /// <summary>
+    /// 首充
+    /// </summary>
+    const FirstRecharge = 17;
+   
+    /// <summary>
+    /// 妖雾重现
+    /// </summary>
+    const YaoWuChongXian = 18;
+
+    /// <summary>
+    /// 仙途历练
+    /// </summary>
+    const Experience = 19;
+
+    /// <summary>
+    /// 仙树寻宝
+    /// </summary>
+    const Lottery = 20;
+
+    /// <summary>
+    /// 新手7日签到
+    /// </summary>
+    const Day7_Sign_NewPlayer = 21;
+
+    /// <summary>
+    /// 在线礼包
+    /// </summary>
+    const OnlineInfos = 22;
+
+    /// <summary>
+    /// 元宝购买限时贩售活动
+    /// </summary>
+    const YuanBaoBuyItemInfos = 23;
+
+    /// <summary>
+    /// 金蛇献瑞
+    /// </summary>
+    const FlipCardLottery = 24;
+
+    /// <summary>
+    /// 世界boss
+    /// </summary>
+    const WorldBoss = 25;
+    
+    /**
+     * 宠物功能
+     */
+    const Pet = 26;
+}

+ 5 - 0
Gameserver/App/model/User/Info_Gates.php

@@ -96,6 +96,11 @@ class Info_Gates extends Object_ext {
      */
     public $TowerGate;
 
+    /**
+     * @var int 上次开始战斗的时间戳
+     */
+    public $lastStartFightTs = 0;
+
     public function initialize() {
         $startId = glc()->FirstGateId;                                          # 初始化第一关的关卡id
         $this->CurrentGateId = $startId;

+ 1 - 7
Gameserver/App/model/User/Info_PrivateState.php

@@ -537,13 +537,7 @@ class Info_PrivateState extends Object_ext {
      * @var type
      */
     public $flipCardNum_turnNum = 0;
-    
-    /**
-     * 世界boss开始时间
-     * @var type
-     */
-    public $worldBoss_startTs = 0;
-    
+      
     /**
      * 世界boss 当前轮次
      * @var type

+ 7 - 0
Gameserver/App/model/User/Info_Store.php

@@ -110,6 +110,12 @@ class Info_Store extends Object_ext {
      * @var type
      */
     public $breedEggLocation;
+    
+    /**
+     * 宠物探索区域
+     * @var type
+     */
+    public $exploreArea;
 
     public function initialize() {
         StoreProc::AddMultiItemInStore(glc()->Init_Packet_Items, "UsrInit");
@@ -117,6 +123,7 @@ class Info_Store extends Object_ext {
 
     public function __construct($arg = null) {
         if ($arg == null) {
+            $this->exploreArea = new \stdClass();
             $this->petUids_supportFight_position = new \stdClass();
                        
             $this->items = new \stdClass();

+ 35 - 12
Gameserver/App/model/User/Ins_ExploreArea.php

@@ -9,32 +9,55 @@
 namespace loyalsoft;
 
 /**
- * Description of Ins_BreedEggSlot
+ * Description of Ins_ExploreArea
  *
  * @author c'y'zhao
  */
-class Ins_BreedEggSlot extends Object_ext{
+class Ins_ExploreArea extends Object_ext{
+    
+    /**
+     * 区域id
+     */
+    public $areaId = 0;      
+    
     /**
-     * 坑位id
+     * 区域等级
      */
-    public $uid = 0;       
+    public $level = 1;      
     
     /**
-     * 坑位上孵化的蛋
+     * 探索开始时间
+     */
+    public $startTs = 0;       
+    
+    /**
+     * 探索结束时间
+     */
+    public $endTs = 0; 
+    
+    /**
+     * 产出
+     * @var type
+     */
+    public $output_num = 0;
+
+    /**
+     * 时间
+     * @var type
      */
-    public $eggId = 0;       
+    public $output_ts = 0;
     
     /**
-     * 开始孵化时间
+     * 派遣宠物uid
      * @var type
      */
-    public $endTs = 0;
+    public $explorePetList = array();
     
     /**
-     * 是否解锁 0:没有
+     * 未解锁
      * @var type
      */
-    public $unlock = 0;
+    //public $unlock = 0;
 
     /**
      * 构造函数
@@ -50,10 +73,10 @@ class Ins_BreedEggSlot extends Object_ext{
     
     /**
      * 配置
-     * @return sm_pet_egg
+     * @return sm_pet_area_level
      */
     public function mo() {
-        $mo = GameConfig::pet_egg_getItem($this->eggId);
+        $mo = GameConfig::pet_area_level_getItem($this->areaId, $this->level);
         my_Assert(null != $mo, ErrCode::err_const_no);
         return $mo;
     }

+ 13 - 3
Gameserver/App/process/EmailProc.php

@@ -596,13 +596,23 @@ class EmailProc {
 
 // <editor-fold defaultstate="collapsed" desc="   世界boss邮件 ">    
     
-    public static function SendWorldBossRewardMail($zoneid, $uid, $reward,$index) {
-        $str = "恭喜您在本轮世界BOSS战中获得第".$index."名,相关排名奖励已通过邮件发放给您,请注意查收";
-        $mail = new Ins_Email(null, enum_Mail_Type::SysTemMail, "世界boss排名奖励", #
+    public static function SendWorldBossRewardMail($zoneid, $uid, $reward,$index,$name) {
+        $title = "【".$name."】";       
+        $str = "您在本轮".$title."之战最终排名第".$index."名,排名奖励已通过邮件发放,请及时查收!";
+        $mail = new Ins_Email(null, enum_Mail_Type::SysTemMail, $title."排名奖励", #
                 $str, $reward);
         self::InsertMail($zoneid, $uid, $mail);
     }
     
+    public static function SendWorldBossDamageRewardMail($zoneid, $uid, $reward,$name) {       
+        $title = "【".$name."】";
+        $str = "您在本轮".$title."之战中有未领取的挑战奖励,现已通过邮件发放,请及时查收!";
+        $mail = new Ins_Email(null, enum_Mail_Type::SysTemMail, $title."挑战奖励", #
+                $str, $reward);
+        self::InsertMail($zoneid, $uid, $mail);
+    }
+    
+    
 // </editor-fold>
 //    
     

+ 180 - 73
Gameserver/App/process/FightProc.php

@@ -443,6 +443,7 @@ class FightProc {
             my_Assert(ctx()->base(true)->Consume_tili($mo->cost_tili), ErrCode::notenough_tili);
             ctx()->privateData(true)->battlePass_tili += $mo->cost_tili;
         }
+        ctx()->gates()->lastStartFightTs = now();                               # 记录下开始战斗的时间戳(状态变量,用于校验战斗用时,排除作弊)
         UserProc::updateUserInfo();
         return Resp::ok(array("tili" => ctx()->baseInfo->tili, "tili_ts" => ctx()->baseInfo->tili_ts));
     }
@@ -732,6 +733,7 @@ class FightProc {
         //ctx()->base()->Add_Exp($exp);
         $waveMo = GameConfig::waveItem_getItem($gateId, $finalLayer);
         my_Assert(null != $waveMo, ErrCode::err_const_no);
+        my_Assert(now() - ctx()->gates->lastStartFightTs > $waveMo->minTs, ErrCode::err_opTimeTooShort); # todo:校验战斗耗时 2025年4月10日16:29:46
         $oldLevel = ctx()->baseInfo->level;
         StoreProc::AddMultiItemInStore('4,' . $waveMo->rewardExp);
         //ctx()->base()->Add_Exp($waveMo->rewardExp);                             # 指挥官经验
@@ -1318,7 +1320,7 @@ class FightProc {
 
         $score = self::GetRankScoreUid($uid, 2);
         //$power = self::countUserFightPower();
-        $power = FightPower_Calculate::GetFightPower();   
+        $power = FightPower_Calculate::GetFightPower();
         $arr = array();
         $arr["$uid"] = self::createScore($power);
         $mem->zadd($memKey, $arr);
@@ -1728,6 +1730,20 @@ class FightProc {
                 break;
             }
         }
+        
+        self::DeleteWorldBossRankInvalidUser($uid2);
+    }
+    
+    /*
+     * 删除世界boss排行榜内注销账号的玩家
+     */
+
+    public static function DeleteWorldBossRankInvalidUser($uid2) {        
+        $rankKey = self::GetWorldBoss_DamageMemKey();
+        $score = gMem()->zscore($rankKey, $uid2);
+        if($score > 0){
+            gMem()->zrem($rankKey, $uid2);
+        }
     }
 
     /*
@@ -1879,7 +1895,7 @@ class FightProc {
     /**
      * 结算世界boss排行奖励[定时发放奖励接口]
      */
-    public static function triggerSettleRankReward_worldBoss() {      
+    public static function triggerSettleRankReward_worldBoss() {
         //校验下是否处在发放奖励信息的时间点 【每个轮次最后一天的最后10分钟】                             
         $mo = GameConfig::subfun_unlock_getItem(Enum_SubFunType::WorldBoss);
 
@@ -1891,31 +1907,20 @@ class FightProc {
         }
 
         echo '----发放世界boss的排行奖励程序开始运行-----';
-        $memKey = MemKey_GameRun::WorldBoss_StartTs(req()->zoneid);
-        $mem = gMem();
-
-        $ts = $mem->get($memKey);
-        if ($ts == 0) {
-            $ts = $mo->startTs;
-        }
 
         $curDay = TimeUtil::totalDays();
-        $endDay = TimeUtil::totalDays($ts);
-
-        $num = $curDay - $endDay;
-        $num += 1;
-
-        $yushu = $num % 3;
-
-        $tomorrowMidnight = strtotime('tomorrow', now()); //明天0点时间
-
-        $chaizhi = $tomorrowMidnight - now();
-        if ($yushu == 0 && $chaizhi <= 10 * 60) {
-            $damageMemKey = self::GetWorldBoss_DamageMemKey();
-            echo '发放奖励的menkey===============:';
-            echo "$damageMemKey";
-            if ($mem->exists($damageMemKey)) {
-                FightProc::settleRankReward_worldBoss();
+        $turnNum = self::GetCurTurnNum();
+        $turnnumMo = GameConfig::worldboss_turnnum_getItem($turnNum);
+        if ($turnnumMo != null) {
+            $lastDay = TimeUtil::totalDays($turnnumMo->endTs);
+            if ($curDay == $lastDay && $turnnumMo->endTs - now() < 600) {
+                $damageMemKey = self::GetWorldBoss_DamageMemKey();
+                echo '发放奖励的menkey===============:';
+                echo "$damageMemKey";
+                $mem = gMem();
+                if ($mem->exists($damageMemKey)) {
+                    FightProc::settleRankReward_worldBoss();
+                }
             }
         }
 
@@ -1925,10 +1930,19 @@ class FightProc {
     public static function settleRankReward_worldBoss() {
         echo '----开始发放世界boss的排行奖励-----';
         $dic = GameConfig::worldboss_rankreward();
-        if ($dic == null) {
+        if ($dic == null) {           
             return;
         }
 
+        $turnNum = self::GetCurTurnNum();             
+        $turnnumMo = GameConfig::worldboss_turnnum_getItem($turnNum);
+        $orderId = $turnnumMo->orderId;
+        $gateMo = GameConfig::gate_getItem($turnnumMo->gateId);     
+        if ($gateMo == null) {             
+            return;
+        }
+        $name = $gateMo->gateName;     
+               
         $memKey = self::GetWorldBoss_DamageMemKey();
         $index = 0;
         foreach ($dic as $id => $mo) {
@@ -1940,7 +1954,8 @@ class FightProc {
 
             foreach ($list as $uid => $score) {
                 $index += 1;
-                EmailProc::SendWorldBossRewardMail(req()->zoneid, $uid, $mo->reward, $index);
+                self::settleDamageReward_worldBoss($name,$orderId, $uid, $score);
+                EmailProc::SendWorldBossRewardMail(req()->zoneid, $uid, $mo->reward, $index,$name);
             }
         }
 
@@ -1951,37 +1966,83 @@ class FightProc {
 //        }
     }
 
-    /**
-     * 重置每个赛季的开始时间 一个重置每个赛季的开始时间赛季完成后  排名数据清理掉  同时轮次要改变 [定时接口]
-     */
-    public static function ResetWorldBossRank_StartTs() {
-        $mo = GameConfig::subfun_unlock_getItem(Enum_SubFunType::WorldBoss);
-        if ($mo == null) {
+    public static function settleDamageReward_worldBoss($name,$orderId, $uid, $demageVal) {
+        $demageList = GameConfig::worldboss_demagereward_getItemArray($orderId);
+        $strkey = MemKey_User::Info_hash(req()->zoneid, $uid);     
+        if(!gMem()->exists($strkey)){
             return;
         }
-        if (now() < $mo->startTs) {
-            return;
+        
+        $userInfo = UserProc::getUserGame(req()->zoneid, $uid);               
+        $worldBoss_received = $userInfo->privateState->worldBoss_received;
+        $dic = new \stdClass();
+        foreach ($demageList as $dMo) {
+            if ($demageVal >= $dMo->demageValId && !in_array($dMo->demageValId, $worldBoss_received)) {
+                if($dMo->reward != null){
+                    $list = explode(';', $dMo->reward);
+                    foreach ($list as $value) {
+                        $arr = explode(',', $value);
+                        $rewardId = $arr[0];
+                        $rewardNum = $arr[1];
+                        if(StlUtil::dictHasProperty($dic, $rewardId)){
+                            $dic->$rewardId += $rewardNum;
+                        } else {
+                            $dic->$rewardId = $rewardNum;
+                        }
+                    }
+                }
+                
+                
+            }
         }
-        echo '赛季的开始时间重置程序开始运行**********';
-        $memKey = MemKey_GameRun::WorldBoss_StartTs(req()->zoneid);
-        $mem = gMem();
-
-        $ts = $mem->get($memKey);
-        $durationTs = $mo->ts * 24 * 60 * 60;
-        if ($ts == null && now() - $mo->startTs < $durationTs) {
-            $mem->set($memKey, $mo->startTs);
-            $ts = $mo->startTs;
+        
+        $str = '';
+        foreach ($dic as $k => $val) {
+            $s = $k.','.$val;
+            if($str == ''){
+                $str = $s;
+            } else {
+                $str = $str.';'.$s; 
+            }           
         }
-
-        if (now() - $ts > $durationTs) {
-            $nextTs = TimeUtil::getNextDayTs($ts, $mo->ts);
-            $mem->set($memKey, $nextTs); //下一轮赛季的开始时间回存   
-            echo '完成重置下一个赛季的开始时间';
-            //清理排行榜
-            self::ClearWorldBossRank();
+       
+        if($str != null){
+            EmailProc::SendWorldBossDamageRewardMail(req()->zoneid, $uid,$str,$name);
         }
     }
 
+    /**
+     * 重置每个赛季的开始时间 一个重置每个赛季的开始时间赛季完成后  排名数据清理掉  同时轮次要改变 [定时接口]----废弃
+     */
+    public static function ResetWorldBossRank_StartTs() {
+        return;
+//        $mo = GameConfig::subfun_unlock_getItem(Enum_SubFunType::WorldBoss);
+//        if ($mo == null) {
+//            return;
+//        }
+//        if (now() < $mo->startTs) {
+//            return;
+//        }
+//        echo '赛季的开始时间重置程序开始运行**********';
+//        $memKey = MemKey_GameRun::WorldBoss_StartTs(req()->zoneid);
+//        $mem = gMem();
+//
+//        $ts = $mem->get($memKey);
+//        $durationTs = $mo->ts * 24 * 60 * 60;
+//        if ($ts == null && now() - $mo->startTs < $durationTs) {
+//            $mem->set($memKey, $mo->startTs);
+//            $ts = $mo->startTs;
+//        }
+//
+//        if (now() - $ts > $durationTs) {
+//            $nextTs = TimeUtil::getNextDayTs($ts, $mo->ts);
+//            $mem->set($memKey, $nextTs); //下一轮赛季的开始时间回存   
+//            echo '完成重置下一个赛季的开始时间';
+//            //清理排行榜
+//            self::ClearWorldBossRank();
+//        }
+    }
+
     /**
      * 清理世界boss排行榜数据 
      */
@@ -1999,10 +2060,19 @@ class FightProc {
      * 每天登录的时候 检测轮次变化
      */
     public static function ResetTurnNum() {
-        if(!FightProc::isFunUnlock(25)){
+        if (!FightProc::isFunUnlock(25)) {
             return;
         }
-        
+
+        $subMo = GameConfig::subfun_unlock_getItem(Enum_SubFunType::WorldBoss);
+        if (ctx()->privateState->worldBoss_turnNum < 0) {
+            ctx()->privateState->worldBoss_turnNum = 0;
+        }
+
+        if (now() < $subMo->startTs) {
+            return;
+        }
+
         $num = self::GetCurTurnNum();
         if ($num != ctx()->privateState->worldBoss_turnNum) {
             ctx()->privateState->worldBoss_turnNum = $num;
@@ -2014,19 +2084,31 @@ class FightProc {
      * 当前所在世界boss 的轮次 //当前轮次可以算出来
      */
     public static function GetCurTurnNum() {
-        $memKey = MemKey_GameRun::WorldBoss_StartTs(req()->zoneid);
-        $mem = gMem();
-        $ts = $mem->get($memKey);
-
-        $curDay = TimeUtil::totalDays(now());
-        $lastDay = TimeUtil::totalDays($ts);
-
-        $val = $curDay - $lastDay;
-        $num = intval($val / 3);
+        $dic = GameConfig::worldboss_turnnum();
+        foreach ($dic as $turnId => $mo) {
+            if (now() >= $mo->startTs && now() < $mo->endTs) {
+                return $turnId;
+            }
+        }
+        return 0;
 
-        return $num + 1;
+//        $memKey = MemKey_GameRun::WorldBoss_StartTs(req()->zoneid);
+//        $mem = gMem();
+//        $ts = $mem->get($memKey);
+//
+//        $curDay = TimeUtil::totalDays(now());
+//        $lastDay = TimeUtil::totalDays($ts);
+//
+//        $val = $curDay - $lastDay;
+//        $num = intval($val / 3);
+//
+//        return $num + 1;
     }
 
+    /**
+     * 世界boss排名榜 memkey
+     * @return type
+     */
     public static function GetWorldBoss_DamageMemKey() {
         $num = self::GetCurTurnNum();
         $memKey = MemKey_GameRun::WorldBoss_Rank($num, req()->zoneid);
@@ -2043,8 +2125,8 @@ class FightProc {
         $mem = gMem();
 
         $uid = req()->uid;
-        $val = gMem()->zscore($memKey, $uid);
-        if ($damageVal > $val) {
+        $val = gMem()->zscore($memKey, $uid);        
+        if ($damageVal > $val) {                       
             $arr = array();
             $arr["$uid"] = self::createScore($damageVal);
             $mem->zadd($memKey, $arr);
@@ -2132,14 +2214,13 @@ class FightProc {
         }
         $ins_rank = self::initOtherUidRankInfo(req()->uid, $damageval, 3);
 
-        $tsMemKey = MemKey_GameRun::WorldBoss_StartTs(req()->zoneid);
-        $ts = gMem()->get($tsMemKey);
-        ctx()->privateState->worldBoss_startTs = $ts;
+        //$tsMemKey = MemKey_GameRun::WorldBoss_StartTs(req()->zoneid);
+        //$ts = gMem()->get($tsMemKey);
+        //ctx()->privateState->worldBoss_startTs = $ts;
 
         UserProc::updateUserInfo();
         $ret = array(
             'selfRank' => $ins_rank,
-            'worldBoss_startTs' => $ts,
         );
         return Resp::ok($ret);
     }
@@ -2160,9 +2241,12 @@ class FightProc {
         my_Assert($damageValId <= $val, ErrCode::active_worldBoss_notClaimRewards);
 
         $turnNum = self::GetCurTurnNum();
-        $list = GameConfig::worldboss_demagereward_getItemArray($turnNum);
+        $turnnumMo = GameConfig::worldboss_turnnum_getItem($turnNum);
+        my_Assert($turnnumMo != null, ErrCode::err_const_no);
+
+        $list = GameConfig::worldboss_demagereward_getItemArray($turnnumMo->orderId);
         foreach ($list as $key => $mo) {
-            if ($mo->demageValId == $damageValId && $mo->orderId == $turnNum) {
+            if ($mo->demageValId == $damageValId && $mo->orderId == $turnnumMo->orderId) {
                 StoreProc::AddMultiItemInStore($mo->reward);
                 break;
             }
@@ -2186,9 +2270,32 @@ class FightProc {
     public static function WorldBoss_settle() {
         list($damageNum) = req()->paras; //战斗结束伤害值      
         //校验每个轮次最后10分钟, 不能战斗
-
         my_Assert(FightProc::isFunUnlock(25), ErrCode::active_funUnlock);
-        self::Ranking_DamageVal($damageNum);
+        $tag = true;
+        
+        $curDay = TimeUtil::totalDays();
+        $turnNum = self::GetCurTurnNum();
+        $turnnumMo = GameConfig::worldboss_turnnum_getItem($turnNum);
+        if ($turnnumMo != null) {
+            $lastDay = TimeUtil::totalDays($turnnumMo->endTs);
+            if ($curDay == $lastDay && $turnnumMo->endTs - now() < 600) {
+                $tag = false;
+            }
+        }
+       
+        if(ctx()->privateState->worldBoss_turnNum == 0){
+            ctx()->privateState->worldBoss_turnNum = $turnNum;
+        }
+        
+        if (ctx()->privateState->worldBoss_turnNum != $turnNum) {
+            ctx()->privateState->worldBoss_turnNum = $turnNum;
+            ctx()->privateState->worldBoss_received = array();
+            $tag = false;
+        }
+       
+        if ($tag) {        
+            self::Ranking_DamageVal($damageNum);
+        }
 
         UserProc::updateUserInfo();
         return Resp::ok(array());

+ 920 - 0
Gameserver/App/process/PetProc.php

@@ -0,0 +1,920 @@
+<?php
+
+namespace loyalsoft;
+
+/**
+ * Description of PetProc
+ *
+ * @author Administrator
+ */
+class PetProc {
+
+    public static function InitArea() {
+        $isUnlock = FightProc::isFunUnlock(Enum_FunType::Pet);
+        if (!$isUnlock) {
+            return;
+        }
+        $dic = GameConfig::pet_area();
+        if ($dic != null && count(StlUtil::dictToArray(ctx()->store->exploreArea, 1)) == 0) {
+            foreach ($dic as $areaId => $arr) {
+                $ins_exploreArea = new Ins_ExploreArea();
+                $ins_exploreArea->areaId = $areaId;
+                ctx()->store()->exploreArea->$areaId = $ins_exploreArea;
+            }
+        }
+    }
+
+    /**
+     * 6433 区域等级升级
+     * @return Resp
+     */
+    public static function Pet_AreaLevelUpgrade() {
+        list($areaId) = req()->paras;
+
+        if (!StlUtil::dictHasProperty(ctx()->store->exploreArea, $areaId)) {
+            $ins_ExploreArea = new Ins_ExploreArea();
+            $ins_ExploreArea->areaId = $areaId;
+            ctx()->store->exploreArea->$areaId = $ins_ExploreArea;
+        }
+        $vo = new Ins_ExploreArea(ctx()->store->exploreArea->$areaId);
+        $vo->level += 1;
+
+        my_Assert(ctx()->baseInfo->gold >= $vo->mo()->unlockArea_gold, ErrCode::notenough_gold_msg);
+        my_Assert(ctx()->baseInfo->level >= $vo->mo()->unlockArea_userLv, ErrCode::user_levelnotenough_msg);
+
+        ctx()->base()->Consume_Gold($vo->mo()->unlockArea_gold);
+        ctx()->store->exploreArea->$areaId = $vo;
+        UserProc::updateUserInfo();
+
+        return Resp::ok(array(
+                    'gold' => ctx()->baseInfo->gold,
+                    'store' => ctx()->store,
+        ));
+    }
+
+    /**
+     * 
+     * @param Ins_ExploreArea $ins_ExploreArea
+     */
+    public static function GetAreaOutPutInfo(&$ins_ExploreArea, $outPut_type) {
+        $num = $ins_ExploreArea->mo()->output_num; //等级带来的
+        $ts = $ins_ExploreArea->mo()->output_time; //等级带来的
+
+        if (count($ins_ExploreArea->explorePetList) > 0) {
+            $list = $ins_ExploreArea->explorePetList;
+            foreach ($list as $petUid) {
+                $ins_pet = new Ins_Pet(ctx()->store->$petUid);
+                $typeId = $ins_pet->mo()->type;
+                $qual = $ins_pet->qual;
+
+                $pet_exploreoutputMo = GameConfig::pet_exploreoutput_getItem($typeId, $qual);
+                if ($pet_exploreoutputMo->exploreOutput != null) {
+                    $sList = explode(';', $pet_exploreoutputMo->exploreOutput);
+                    foreach ($sList as $str) {
+                        $s = explode(',', $str);
+                        if ((int) $s[0] == $ins_ExploreArea->areaId) {
+                            $num += (int) $s[1];
+                            $ts += (int) $s[2];
+                        }
+                    }
+                }
+            }
+        }
+
+        return ($outPut_type == 1) ? $num : $ts;
+    }
+
+    /**
+     * 6434 更换派遣宠物
+     * @return Resp
+     */
+    public static function ReplaceDispatchPet_old() {
+        list($areaId, $petUid, $exploreType) = req()->paras;
+
+        $vo = new Ins_ExploreArea(ctx()->store->exploreArea->$areaId);
+
+        if (StlUtil::arrayContains($vo->explorePetList, $petUid)) {
+            StlUtil::arrayRemove($vo->explorePetList, $petUid);
+        } else {
+            my_Assert(count($vo->explorePetList) < $vo->mo()->dispatchPetNum, ErrCode::user_store_dispatchPetNumLimit);
+            $petDic = ctx()->store->pet;
+            my_Assert(StlUtil::dictHasProperty($petDic, $petUid), ErrCode::user_store_NotExistPet);
+
+            $ins_pet = new Ins_Pet($petDic->$petUid);
+            $mo = GameConfig::pet_exploreoutput_getItem($ins_pet->mo()->type, $ins_pet->qual);
+            my_Assert(null != $mo, ErrCode::err_const_no);
+
+            $sList = explode(';', $mo->exploreOutput);
+            $tag = false;
+            foreach ($sList as $key => $value) {
+                $str = explode(',', $value);
+                if ($str[0] == $areaId) {
+                    $tag = true;
+                    break;
+                }
+            }
+            my_Assert($tag, ErrCode::user_store_dispatchPetErr);
+            $vo->explorePetList[] = $petUid;
+        }
+
+        my_Assert($exploreType == 1 && now() - $vo->startTs < 10 * 60, ErrCode::user_store_CannotReplaced_tsLimit);
+
+        //开始探索
+        if (count($vo->explorePetList) == 0) {
+            $vo->startTs = 0;
+            $vo->endTs = 0;
+            $vo->output_num = 0;
+            $vo->output_ts = 0;
+        } else {
+            if ($vo->startTs == 0) {
+                $vo->startTs = now();
+            }
+
+            $ts = self::GetAreaOutPutInfo($vo, 2);
+            $num = self::GetAreaOutPutInfo($vo, 1);
+            $vo->endTs = $vo->startTs + $ts;
+            $vo->output_num = $num;
+            $vo->output_ts = $vo->endTs - $vo->startTs;
+        }
+
+        ctx()->store->exploreArea->$areaId = $vo;
+
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'store' => ctx()->store,
+        ));
+    }
+
+    /**
+     * 6434 更换派遣宠物  废弃
+     * @return Resp
+     */
+    public static function ReplaceDispatchPet() {
+        list($areaId, $petUid) = req()->paras;
+
+        $vo = new Ins_ExploreArea(ctx()->store->exploreArea->$areaId);
+
+        if (StlUtil::arrayContains($vo->explorePetList, $petUid)) {
+            StlUtil::arrayRemove($vo->explorePetList, $petUid);
+        } else {
+            my_Assert(count($vo->explorePetList) < $vo->mo()->dispatchPetNum, ErrCode::user_store_dispatchPetNumLimit);
+            $petDic = ctx()->store->pet;
+            my_Assert(StlUtil::dictHasProperty($petDic, $petUid), ErrCode::user_store_NotExistPet);
+
+            $ins_pet = new Ins_Pet($petDic->$petUid);
+            $mo = GameConfig::pet_exploreoutput_getItem($ins_pet->mo()->type, $ins_pet->qual);
+            my_Assert(null != $mo, ErrCode::err_const_no);
+
+            $sList = explode(';', $mo->exploreOutput);
+            $tag = false;
+            foreach ($sList as $key => $value) {
+                $str = explode(',', $value);
+                if ($str[0] == $areaId) {
+                    $tag = true;
+                    break;
+                }
+            }
+            my_Assert($tag, ErrCode::user_store_dispatchPetErr);
+            $vo->explorePetList[] = $petUid;
+        }
+
+        my_Assert($exploreType == 1 && now() - $vo->startTs < 10 * 60, ErrCode::user_store_CannotReplaced_tsLimit);
+
+        ctx()->store->exploreArea->$areaId = $vo;
+
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'store' => ctx()->store,
+        ));
+    }
+
+    /**
+     * 6437 点击派遣宠物
+     * @return Resp
+     */
+    public static function DispatchPet() {
+        list($areaId, $petUidList) = req()->paras;
+
+        $ins_ExploreArea = new Ins_ExploreArea(ctx()->store->exploreArea->$areaId);
+        $ins_ExploreArea->explorePetList = $petUidList;
+
+        if ($ins_ExploreArea->startTs > 0 && $ins_ExploreArea->endTs > 0) {//说明是更换
+            //my_Assert(count($ins_ExploreArea->explorePetList) > 0, ErrCode::user_store_addDispatchPet);                  
+            my_Assert(now() - $ins_ExploreArea->startTs < 10 * 60, ErrCode::user_store_CannotReplaced_tsLimit);
+        }
+
+        if (count($petUidList) == 0) {
+            $ins_ExploreArea->startTs = 0;
+            $ins_ExploreArea->endTs = 0;
+            $ins_ExploreArea->output_num = 0;
+            $ins_ExploreArea->output_ts = 0;
+        } else {
+            if ($ins_ExploreArea->startTs == 0) {
+                $ins_ExploreArea->startTs = now();
+            }
+
+            $ts = self::GetAreaOutPutInfo($ins_ExploreArea, 2);
+            $num = self::GetAreaOutPutInfo($ins_ExploreArea, 1);
+            $ins_ExploreArea->endTs = $ins_ExploreArea->startTs + $ts;
+            $ins_ExploreArea->output_num = $num;
+            $ins_ExploreArea->output_ts = $ins_ExploreArea->endTs - $ins_ExploreArea->startTs;
+        }
+   
+        ctx()->store->exploreArea->$areaId = $ins_ExploreArea;
+
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'store' => ctx()->store,
+        ));
+    }
+
+    /**
+     * 6438 某区域的派遣宠物信息
+     * @return Resp
+     */
+    public static function ResetDispatchPet() {
+        list($areaId) = req()->paras;
+        
+        $ins_ExploreArea = new Ins_ExploreArea(ctx()->store->exploreArea->$areaId);
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'explorePetList' =>$ins_ExploreArea->explorePetList,
+        ));
+    }
+    
+    /**
+     * 6435 删除全部派遣宠物
+     */
+    public static function RemoveDispatchPet() {
+        list($areaId) = req()->paras;
+
+        $vo = new Ins_ExploreArea(ctx()->store->exploreArea->$areaId);
+        $vo->explorePetList = array();
+        $vo->startTs = 0;
+        $vo->endTs = 0;
+        $vo->output_num = 0;
+        $vo->output_ts = 0;
+
+        ctx()->store->exploreArea->$areaId = $vo;
+
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'store' => ctx()->store,
+        ));
+    }
+
+    /**
+     * 6436 领取探索奖励
+     */
+    public static function Pet_ReceiveReward() {
+        list($areaId) = req()->paras;
+
+        $vo = new Ins_ExploreArea(ctx()->store->exploreArea->$areaId);
+
+        my_Assert($vo->startTs > 0 && now() - $vo->startTs > 10 * 60, ErrCode::user_store_CannotReceiveReward);
+
+        $tt = now() - $vo->startTs;
+        if (now() >= $vo->endTs) {
+            $tt = $vo->endTs - $vo->startTs;
+        }
+
+        $ts_n = $vo->output_ts / $vo->output_num;
+        $num = intval($tt *= $ts_n);
+        $goodsStr = $vo->mo()->reward_fixed . ',' . $num;
+        StoreProc::AddMultiItemInStore($goodsStr);
+
+        $reward = explode(',', $vo->mo()->reward_extra);
+        $randNum = rand(1, $reward[2]);
+        if ($randNum <= $reward[2]) {
+            StoreProc::AddMultiItemInStore($reward[0] . ',' . $reward[1]);
+        }
+
+        //$vo->explorePetList = array();             
+        $vo->startTs = 0;
+        $vo->endTs = 0;
+        $vo->output_num = 0;
+        $vo->output_ts = 0;
+
+        ctx()->store->exploreArea->$areaId = $vo;
+
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'gold' => ctx()->baseInfo->gold,
+                    'cash' => ctx()->baseInfo->cash,
+                    'reward' => StoreProc::$reward,
+                    'reward_Gem' => StoreProc::$reward_Gem,
+                    'reward_equip' => StoreProc::$reward_equip,
+                    'store' => ctx()->store,
+        ));
+    }
+    
+    /**
+     * 6432 解锁孵化位置
+     * @return Resp
+     */
+    public static function Pet_UnlockBreedLocation() {
+        list($slotId) = req()->paras;
+        
+        $list = explode(';',GameConfig::glc2()->Pet_BreedLocationUnlockInfo);
+        foreach ($list as $value) {
+            $s = explode(',', $value);
+            if($s[0] == $slotId){
+                my_Assert(ctx()->baseInfo->cash >= $s[1], ErrCode::notenough_cash_msg);
+                ctx()->base()->Consume_Cash($s[1]);
+                $breed = new Ins_BreedEggSlot(ctx()->store->breedEggLocation->$slotId);
+                $breed->unlock = 1;
+                ctx()->store()->breedEggLocation->$slotId = $breed;
+                break;
+            }               
+        }
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'cash' => ctx()->baseInfo->cash,
+                    'store' => ctx()->store,                   
+        ));
+    }
+    
+    /**
+     * 6431 正常孵化完成点击领取
+     * @return Resp
+     */
+    public static function Pet_ReceiveBreedPet() {
+        list($slotId) = req()->paras;
+        
+        $ins_breed = new Ins_BreedEggSlot(ctx()->store()->breedEggLocation->$slotId);    
+        my_Assert($ins_breed->eggId != 0, ErrCode::user_store_NoExistBreedEgg);
+        my_Assert($ins_breed->unlock == 1, ErrCode::user_store_SlotNotUnlocked);                  
+        my_Assert(now() >= $ins_breed->endTs, ErrCode::user_store_NoCompleteBreed);
+                    
+        StoreProc::AddMultiItemInStore($ins_breed->mo()->reward);
+        
+        //随机一个灵宠      
+        $str = explode(';', $ins_breed->mo()->per);
+        $newPet = self::RandObtainPet($str);
+                     
+        $uid = 0;
+        if($newPet != null){           
+            $uid = $newPet->uid;
+            ctx()->store()->pet->$uid = $newPet;
+        }
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'cash' => ctx()->baseInfo->cash,
+                    'store' => ctx()->store,
+                    'newPetUid'=>$uid,
+        ));
+    }
+    
+    /**
+     * 6430 加速孵化宠物
+     * @return Resp
+     */
+    public static function Pet_FastBreedEgg() {
+        list($slotId) = req()->paras;
+        $ins_breed = new Ins_BreedEggSlot(ctx()->store()->breedEggLocation->$slotId);    
+        my_Assert($ins_breed->eggId != 0, ErrCode::user_store_NoExistBreedEgg);
+        my_Assert($ins_breed->unlock == 1, ErrCode::user_store_SlotNotUnlocked);                  
+        my_Assert(now() < $ins_breed->endTs, ErrCode::user_store_CompleteBreed);
+        
+        $num = $ins_breed->mo()->breedTs/60/10;
+        $cash_one = $ins_breed->mo()->fastBreed_cost/$num;
+        
+        $ts = $ins_breed->endTs - now();
+        $costNum = ceil($ts/60/10);
+        
+        my_Assert(ctx()->baseInfo->cash >= $costNum*$cash_one, ErrCode::notenough_cash_msg);
+        ctx()->base()->Consume_Cash($costNum*$cash_one);
+        
+        StoreProc::AddMultiItemInStore($ins_breed->mo()->reward);
+        
+        //随机一个灵宠      
+        $str = explode(';', $ins_breed->mo()->per);
+        $newPet = self::RandObtainPet($str);
+                     
+        $uid = 0;
+        if($newPet != null){           
+            $uid = $newPet->uid;
+            ctx()->store()->pet->$uid = $newPet;
+        }
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    'cash' => ctx()->baseInfo->cash,
+                    'store' => ctx()->store,
+                    'newPetUid'=>$uid,
+        ));
+    }
+    
+    /**
+     * 初始化一个宠物
+     * @param type $rarity
+     * @param type $qual
+     * @param type $petType
+     */
+    public static function RandObtainPet($str) {
+        //随机一个灵宠
+        $randNum = rand(1,10000);             
+        $start = 0;
+        $end = 0;
+        
+        $rarity = 0;
+        $qual = 0;
+        $petType = 0;
+        foreach ($str as $key => $value) {
+            $s = explode(',', $value);
+            $end += $s[3]*100; 
+            if($randNum > $start && $randNum <= $end){
+                $rarity = $s[0]; 
+                $qual = $s[1];
+                $petType = $s[2];
+                break;
+            }
+            $start = $end;
+        }
+        
+        $dic = GameConfig::pet();
+        $petArr = array();
+        foreach ($dic as $typeId => $mo) {
+            if($mo->petType == $petType && $mo->qual == $qual && $mo->rarity == $rarity){
+                $petArr[] = $typeId;
+            }
+        }
+        $typeId = 0;
+        if(count($petArr) > 0){
+            $num = rand(0,count($petArr)-1);
+            $typeId = $petArr[$num];                                
+        }
+        if($typeId != 0){
+            return StoreProc::initPet($typeId);
+        }
+                
+        return null;
+    }
+    
+    /**
+     * 6429 孵化宠物
+     * @return Resp
+     */
+    public static function Pet_BreedEgg() {
+        list($slotId,$eggId) = req()->paras;
+        
+        my_Assert(StlUtil::dictHasProperty(ctx()->store->items, $eggId), ErrCode::user_store_NoItem);
+        $mo = GameConfig::item_getItem($eggId);
+        my_Assert($mo != null, ErrCode::err_const_no);
+        my_Assert($mo->itemType == 103, ErrCode::user_store_NoItem);             
+        
+        $ins_breed = new Ins_BreedEggSlot(ctx()->store()->breedEggLocation->$slotId);       
+        my_Assert($ins_breed->eggId == 0 && $ins_breed->unlock == 1, ErrCode::user_store_NoBreedSlot);
+        ctx()->store()->removeItem($eggId, 1);
+        
+        //$ins_breed = ctx()->store()->breedEggLocation->$slot;
+ 
+        $ins_breed->eggId = $eggId;       
+        $ts = $ins_breed->mo()->breedTs;
+        $ins_breed->endTs = now()+$ts;  
+        ctx()->store()->breedEggLocation->$slotId = $ins_breed;
+               
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    //'gold' => ctx()->baseInfo->gold,
+                    'store' => ctx()->store,
+        ));
+    }
+    
+    
+    /**
+     * 6428 宠物降品   
+     */
+    public static function Pet_DownGradingQual() {
+        list($uid) = req()->paras;
+
+        $petDic = ctx()->store->pet;
+        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
+        $ins_pet = new Ins_Pet($petDic->$uid);
+
+        $NotDownGradingList = explode(',', glc()->equipQual_NotDownGrading);
+        my_Assert(!in_array($ins_pet->qual, $NotDownGradingList), ErrCode::user_store_equip_minQual);
+
+        $itemNum = 0;
+        for ($i = 1; $i < $ins_pet->level; $i++) {
+            $mo = GameConfig::pet_levelupgrade_getItem($ins_pet->mo()->rarity, $ins_pet->qual, $i);       
+            $itemNum += $mo->costItem;
+        }       
+        StoreProc::AddMultiItemInStore(6 . ',' . $itemNum);
+               
+        self::ComposeMaterial_Fallback_Pet($ins_pet->mo()->petType, $ins_pet->qual);
+
+        $ins_pet->level = 1;
+        $sList2 = explode(';', glc()->equipQualUnlockSkillId);
+        foreach ($sList2 as $str3) {
+            $s = explode(',', $str3);
+            if (in_array($ins_pet->qual, $s)) {
+                $ins_pet->qual = $s[0];
+                break;
+            }
+        }
+
+        ctx()->store->pet->$uid = $ins_pet;
+        //FightProc::Ranking_FightPower();
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    //'gold' => ctx()->baseInfo->gold,
+                    'store' => ctx()->store,
+        ));
+    }
+
+    private static function ComposeMaterial_Fallback_Pet($type, $qual) {
+        $sList2 = explode(';', glc()->equipQualUnlockSkillId);
+        foreach ($sList2 as $str) {
+            $s = explode(',', $str);
+            if (in_array($qual, $s)) {
+                $max = $qual;
+                $min = $s[0];
+                $num = 0;
+                for ($i = $min; $i < $max; $i++) {
+                    $mo = GameConfig::pet_compose_getItem($i);
+                    $num += explode(',', $mo->compose_condition)[2];
+                }
+
+                $typeId = StoreProc::ComposeMaterial($type, $min,902);
+                StoreProc::AddMultiItemInStore($typeId . ',' . $num);
+                break;
+            }
+        }
+    }
+    
+    
+    /*
+     * 6427 宠物降级
+     */
+
+    public static function Pet_DownGradingLevel() {
+        list($uid) = req()->paras; //宠物uid
+
+        $petDic = ctx()->store->pet;
+        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
+        $ins_pet = new Ins_Pet($petDic->$uid);
+
+        my_Assert($ins_pet->level > 1, ErrCode::user_store_equip_minlevel);      
+     
+        $itemNum = 0;
+        for ($i = 1; $i < $ins_pet->level; $i++) {
+            $mo = GameConfig::pet_levelupgrade_getItem($ins_pet->mo()->rarity, $ins_pet->qual, $i);       
+            $itemNum += $mo->costItem;
+        }       
+        StoreProc::AddMultiItemInStore(6 . ',' . $itemNum);
+
+       
+        
+        $ins_pet->level = 1;
+        ctx()->store->pet->$uid = $ins_pet;
+
+        //FightProc::Ranking_FightPower();
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    //'gold' => ctx()->baseInfo->gold,
+                    'store' => ctx()->store,
+        ));
+    }
+    
+    /**
+     * 6426 宠物一键合成    
+     * @return type
+     */
+    public static function Pet_OnekeyCompose() {
+        $store = ctx()->store(true);
+        $petDic = $store->pet;
+        $arr = array();                                                         # 待处理装备临时数组
+        $composePet = array();                                                  # 合成记录
+        foreach ($petDic as $pet) {
+            if ($pet->qual < 4) {                                               # 4 品以上的不参与合成
+                $arr[] = new Ins_Pet($pet);
+            }
+        }      
+
+        while (count($arr) > 0) {                                               # 循环处理每一个装备
+            $pet_compose = array_pop($arr);                                     # 从末尾弹出一个元素做合成运算
+            if (null == $pet_compose) {                                         # 防御空对象
+                break;
+            }
+            $eqQualCfg = GameConfig::pet_compose_getItem($pet_compose->qual); # 按照品阶查询合成配置数据
+            my_Assert(null != $eqQualCfg, ErrCode::err_const_no);               # 防御配置数据错误
+            list($type, $costQual, $num) = explode(',', $eqQualCfg->compose_condition); # 从配置提取合成条件
+            $composeArr = array();                                              # 消耗集合
+            foreach ($arr as $v) {                                              # 从剩余元素中查找合成所需
+                if ($v->qual == $costQual) {                                    # 同品阶
+                    if (($type == 1) ? $v->typeId == $pet_compose->typeId #     # type: 1 与本体相同 2 同部位即可
+                                    : $v->mo()->petType == $pet_compose->mo()->petType) {
+                        $composeArr[] = $v;                                     # 成为消耗品
+                    }
+                    if (count($composeArr) >= $num) {                           # 达到消耗数量就停
+                        break;
+                    }
+                }
+            }
+            if (count($composeArr) >= $num) {                                   # 合成的回收 不合成的可不能给回收了
+                $uid = $pet_compose->uid;
+                $newPet = self::ComposeNewPet($pet_compose);                    # 原地合成
+                self::petLevelChange_Material_Recovery($newPet->mo()->rarity, $newPet->qual, $newPet->level); # 回收材料
+                $newPet->level = 1;
+                $petDic->$uid = $newPet;
+                               
+                $composePet[] = $uid;                                           # 添加合成记录
+                foreach ($composeArr as $val) {                                 # 回收消耗的装备中所含材料
+                    self::petLevelChange_Material_Recovery($val->mo()->rarity, $val->qual, $val->level); # 回收材料
+                    StlUtil::dictRemove(ctx()->store(true)->pet, $val->uid);    # 背包删除
+                    if(ctx()->store(true)->petUid_fight_position == $val->uid){
+                        ctx()->store(true)->petUid_fight_position = 0;
+                    }                 
+                    foreach (ctx()->store(true)->petUids_supportFight_position as $k => $pUid) {
+                        if($pUid == $val->uid){
+                            StlUtil::dictRemove(ctx()->store(true)->petUids_supportFight_position, $k);                            
+                            break;
+                        }
+                    }
+                                      
+                    StlUtil::arrayRemove($arr, $val); # 从arr中删掉已消耗装备
+                }
+            }
+        }
+
+       
+        UserProc::updateUserInfo();                                             # 回存玩家数据
+        return Resp::ok(array(#                                                 # 返回给客户端的数据                   
+                    'store' => ctx()->store,
+                    'composeEquip' => $composePet,
+                    'task' => ctx()->task,
+        ));
+    }
+    
+    /**
+     * 6425 宠物合成    
+     * @return Resp
+     */
+    public static function Pet_Compose() {
+        list($uid, $petUids_cost, $composeMaterial_typeIds) = req()->paras;
+       
+        $petDic = ctx()->store->pet;
+        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
+        $ins_pet = new Ins_Pet($petDic->$uid);
+
+        my_Assert($ins_pet->qual < 11, ErrCode::user_store_equip_qualMaxLimit);
+        $composeMo = GameConfig::pet_compose_getItem($ins_pet->qual);
+        my_Assert(null != $composeMo, ErrCode::err_const_no);
+        $arr = explode(',', $composeMo->compose_condition);
+
+        $type = $arr[0];
+        $costQual = $arr[1];
+        $num = $arr[2];
+
+        $all_num = 0;
+
+        $materialItemType = 0;
+        $materialItemNum = 0;
+        if ($type == 2 && $composeMaterial_typeIds != null) {//部位去校验
+            $str = explode(',', $composeMaterial_typeIds);
+            $materialItemType = $str[0];
+            $materialItemNum = count($str);
+            foreach ($str as $s) {
+                $composeMaterial_itemTypeId = StoreProc::ComposeMaterial($ins_pet->mo()->petType, $costQual,902);
+                my_Assert($composeMaterial_itemTypeId == $s, ErrCode::user_store_equip_composeMaterialErr);
+                $all_num += 1;
+            }
+        }
+
+        if ($petUids_cost != null) {
+            $costPetsArr = explode(',', $petUids_cost);
+            $all_num += count($costPetsArr);
+
+            foreach ($costPetsArr as $pUid) {
+                my_Assert(StlUtil::dictHasProperty($petDic, $pUid), ErrCode::user_store_NotExistPet);
+
+                my_Assert(ctx()->store(true)->petUid_fight_position != $pUid, ErrCode::user_store_NotSelectPet_fight);
+                my_Assert(!in_array($pUid, ctx()->store(true)->petUids_supportFight_position), ErrCode::user_store_NotSelectPet_supportfight);
+                
+                $costIns_pet = new Ins_Pet($petDic->$pUid);
+                my_Assert($costIns_pet->qual == $costQual, ErrCode::user_store_equipMaterialQualErr);
+                if ($type == 1) {//本体                
+                    my_Assert($costIns_pet->typeId == $ins_pet->typeId, ErrCode::user_store_equipMaterialTypeErr);
+                } else {
+                    my_Assert($costIns_pet->mo()->petType == $ins_pet->mo()->petType, ErrCode::user_store_equipMaterialTypeErr);
+                }
+            }
+        }
+        my_Assert($all_num == $num, ErrCode::user_store_equipMaterialNumErr);
+        ctx()->store(true)->pet->$uid = self::ComposeNewPet($ins_pet);
+
+        //消耗的装备 回收         
+        if ($petUids_cost != null) {
+            $costPetsArr = explode(',', $petUids_cost);
+            foreach ($costPetsArr as $pUid) {
+                $costIns_Equip = new Ins_Pet($petDic->$pUid);
+                self::petLevelChange_Material_Recovery($costIns_Equip->mo()->rarity, $costIns_Equip->qual, $costIns_Equip->level);
+                StlUtil::dictRemove(ctx()->store(true)->pet, $pUid);              
+            }
+        }
+
+        if ($materialItemType != 0) {
+            ctx()->store(true)->removeItem($materialItemType, $materialItemNum);
+        }
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array(                 
+                    'store' => ctx()->store,
+                    'task' => ctx()->task,
+        ));
+    }
+    
+    /**
+     * 装备等级提升 消耗的金币图纸回收
+     * @param type $rarity
+     * @param type $qual
+     * @param type $posId
+     * @param type $level
+     */
+    public static function petLevelChange_Material_Recovery($rarity, $qual,$level) {    
+        $num = 0;
+       
+        for ($i = 1; $i <= $level - 1; $i++) {
+            $mo = GameConfig::pet_levelupgrade_getItem($rarity, $qual, $i);         
+            $num += $mo->costItem;
+        }
+        if ($num > 0) {        
+            StoreProc::AddMultiItemInStore(6 . ',' . $num);
+        }
+    }
+    
+    /**
+     * 合成一个新的装备
+     * @param type Ins_Equip
+     */
+    public static function ComposeNewPet(&$ins_pet) {
+        $newPetTypeId = $ins_pet->typeId;
+        $qual = $ins_pet->qual + 1;
+        if ($ins_pet->qual < 4) {
+            //$newEquipTypeId = substr($ins_pet->typeId, 0, strlen($ins_equip->typeId) - 5);
+            $rarity = substr($ins_pet->typeId, -2);
+            $mo = GameConfig::pet_getItem($ins_pet->typeId);
+            $newPetTypeId = $mo->type. "0" . $qual . $rarity;
+        }
+
+        $ins_pet->typeId = $newPetTypeId;
+        $ins_pet->qual = $qual;
+
+        return $ins_pet;
+    }
+    
+    
+    /**
+     *6424 灵宠等级提升   
+     * @return Resp
+     */
+    public static function Pet_LevelUpgrade(){
+        list($uid) = req()->paras; //装备uid
+
+        my_Assert(StlUtil::dictHasProperty(ctx()->store->pet, $uid), ErrCode::user_store_NotExistPet);
+        $ins_pet = new Ins_Pet(ctx()->store->pet->$uid);
+        my_Assert($ins_pet->level < $ins_pet->Pet_MaxLevel(), ErrCode::user_store_LevelLimit);
+
+        $mo = $ins_pet->petLevelMo();
+
+        $costTuzhiId = 6;
+        $tuzhiNum = 0;
+        if (StlUtil::dictHasProperty(ctx()->store->items, $costTuzhiId)) {
+            $tuzhiNum = ctx()->store->items->$costTuzhiId;
+        }
+        my_Assert($tuzhiNum >= $mo->costItem, ErrCode::notenough_item);
+
+        ctx()->store(true)->removeItem($costTuzhiId,$mo->costItem);
+     
+        $ins_pet->level += 1;
+        ctx()->store->pet->$uid = $ins_pet;
+     
+        UserProc::updateUserInfo();
+        return Resp::ok(array(                   
+                    'store' => ctx()->store,              
+        ));
+    }
+    
+    /**
+     * 6423 展示空闲灵宠
+     * @return Resp
+     */
+    public static function Pet_SelectShowPet(){
+        list($uid) = req()->paras;
+        
+        $petDic = ctx()->store->pet;
+        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
+        
+        my_Assert(count(ctx()->store()->mainShowPetList)< GameConfig::glc2()->Pet_MainShowPetList , ErrCode::user_store_ShowPetNumLimit);
+        
+        my_Assert(ctx()->store->petUid_fight_position != $uid, ErrCode::user_store_NotSelectPet_fight);
+        my_Assert(!in_array($uid, ctx()->store->petUids_supportFight_position), ErrCode::user_store_NotSelectPet_supportfight);
+        
+        if(in_array($uid,ctx()->store()->mainShowPetList)){
+            StlUtil::arrayRemove(ctx()->store()->mainShowPetList, $uid);
+        } else {
+            ctx()->store()->mainShowPetList[] = $uid;
+        }
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array());
+    }
+
+    /**
+     * 6422 出战/替换/上阵
+     */
+    public static function Pet_ChangeFightPosition() {
+        list($type, $uid, $index) = req()->paras;
+
+        $dic = ctx()->store(true)->petUids_supportFight_position;
+        if ($type == 1) {//出战、替换
+            ctx()->store(true)->petUid_fight_position = $uid;
+            
+            foreach ($dic as $k => $petUid) {
+                if($petUid == $uid){
+                    ctx()->store(true)->petUids_supportFight_position->$k = 0;
+                }
+            }
+        } else if ($type == 2) {
+            $tag = false;
+            foreach ($dic as $k => $petUid) {
+                if($petUid == $uid && $k != $index){
+                    $tag = true;
+                    break;
+                }
+            }
+            my_Assert(!$tag, ErrCode::user_store_NoReplacePet);
+            
+            ctx()->store(true)->petUids_supportFight_position->$index = $uid;
+            if(ctx()->store(true)->petUid_fight_position == $uid){
+                ctx()->store(true)->petUid_fight_position = 0;
+            }           
+        }
+
+//        if ($type == 0 && $index == 0 && $uid != 0) {//上阵点击空白的地方
+//            if (ctx()->store(true)->petUid_fight_position == 0) {
+//                ctx()->store(true)->petUid_fight_position = $uid;
+//            } else {
+//                $list = StlUtil::dictToArray(ctx()->store(true)->petUids_supportFight_position);    
+//                if (count($list) === 0) {
+//                    $key = 1;
+//                    ctx()->store(true)->petUids_supportFight_position->$key = $uid;
+//                } else {
+//                    for ($i = 1; $i <= 2; $i++) {
+//                        if (!StlUtil::dictHasProperty(ctx()->store(true)->petUids_supportFight_position, $i) || ctx()->store(true)->petUids_supportFight_position->$i == 0) {
+//                            ctx()->store(true)->petUids_supportFight_position->$i = $uid;
+//                            break;
+//                        }
+//                    }
+//                }
+//            }
+//        }
+
+        UserProc::updateUserInfo();
+        return Resp::ok(array());
+    }
+    
+
+    /**
+     * 6421 移除宠物上的新的标志
+     */
+    public static function Pet_RemoveNewTip() {
+        list($uid) = req()->paras;
+
+        $petDic = ctx()->store->pet;
+        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
+
+        ctx()->store->pet->$uid->isNew = 0;
+
+        UserProc::updateUserInfo();
+        return Resp::ok(array());
+    }
+    
+    /**
+     * 6439 宠物休息
+     */
+    public static function RemoveFightPosition() {
+        list($uid) = req()->paras;
+
+        if (ctx()->store->petUid_fight_position == $uid)
+        {
+            ctx()->store()->petUid_fight_position = 0;
+        }
+
+        for ($i = 1; $i <= 2; $i++) {
+            if (StlUtil::dictHasProperty(ctx()->store->petUids_supportFight_position, $i) && ctx()->store->petUids_supportFight_position->$i == $uid)
+            {
+                ctx()->store()->petUids_supportFight_position->$i = 0;
+                break;
+            }
+        }
+
+        UserProc::updateUserInfo();
+        return Resp::ok(array());
+    }
+    
+}

+ 27 - 574
Gameserver/App/process/StoreProc.php

@@ -62,596 +62,48 @@ class StoreProc {
                 return StoreProc::Equip_DownGradingQual();
 
             case CmdCode::store_pet_removeNewTip:                               # 6421 移除宠物上的新的标志
-                return StoreProc::Pet_RemoveNewTip();
+                return PetProc::Pet_RemoveNewTip();
             case CmdCode::store_pet_changeFightPosition:                        # 6422 出战/替换/上阵
-                return StoreProc::Pet_ChangeFightPosition();
+                return PetProc::Pet_ChangeFightPosition();
             case CmdCode::store_pet_selectShowPet:                              # 6423 展示空闲灵宠
-                return StoreProc::Pet_SelectShowPet();
+                return PetProc::Pet_SelectShowPet();
             case CmdCode::store_pet_levelUpgrade:                               # 6424 灵宠等级提升   
-                return StoreProc::Pet_LevelUpgrade();
+                return PetProc::Pet_LevelUpgrade();
             case CmdCode::store_pet_compose:                                    # 6425 宠物合成    
-                return StoreProc::Pet_Compose();
+                return PetProc::Pet_Compose();
             case CmdCode::store_pet_onekeyCompose:                              # 6426 宠物一键合成    
-                return StoreProc::Pet_OnekeyCompose();              
+                return PetProc::Pet_OnekeyCompose();              
             case CmdCode::store_pet_downGradingLevel:                           # 6427 宠物降级
-                return StoreProc::Pet_DownGradingLevel();              
+                return PetProc::Pet_DownGradingLevel();              
             case CmdCode::store_pet_downGradingQual:                            # 6428 宠物降品   
-                return StoreProc::Pet_DownGradingQual();
+                return PetProc::Pet_DownGradingQual();
             case CmdCode::store_pet_breedEgg:                                   # 6429 孵化宠物
-                return StoreProc::Pet_BreedEgg();               
+                return PetProc::Pet_BreedEgg();               
             case CmdCode::store_pet_fastBreedEgg:                               # 6430 加速孵化宠物
-                return StoreProc::Pet_FastBreedEgg();    
+                return PetProc::Pet_FastBreedEgg();    
             case CmdCode::store_pet_receiveBreedPet:                            # 6431 正常孵化完成点击领取
-                return StoreProc::Pet_ReceiveBreedPet();    
+                return PetProc::Pet_ReceiveBreedPet();    
             case CmdCode::store_pet_unlockBreedLocation:                        # 6432 解锁孵化位置
-                return StoreProc::Pet_UnlockBreedLocation();
+                return PetProc::Pet_UnlockBreedLocation();                
+            case CmdCode::store_pet_areaLevelUpgrade:                           # 6433 区域等级升级
+                return PetProc::Pet_UnlockBreedLocation();         
+            case CmdCode::store_pet_replaceDispatchPet:                         # 6434 点击宠物 更换派遣宠物  废弃
+                return PetProc::ReplaceDispatchPet();
+            case CmdCode::store_pet_removeDispatchPet:                          # 6435 删除全部派遣宠物
+                return PetProc::RemoveDispatchPet();
+            case CmdCode::store_pet_receiveReward:                              # 6436 领取探索奖励
+                return PetProc::Pet_ReceiveReward();    
+            case CmdCode::store_pet_dispatchPet:                                # 6437 点击派遣宠物
+                return PetProc::DispatchPet();
+            case CmdCode::store_pet_resetDispatchPet:                           # 6438 某区域的派遣宠物信息    
+                return PetProc::ResetDispatchPet();
+            case CmdCode::store_pet_removeFightPosition:                        # 6439 
+                return PetProc::RemoveFightPosition();
             default:
                 Err(ErrCode::cmd_err);
         }
     }
-    /**
-     * 6432 解锁孵化位置
-     * @return Resp
-     */
-    public static function Pet_UnlockBreedLocation() {
-        list($slotId) = req()->paras;
-        
-        $list = explode(';',GameConfig::glc2()->Pet_BreedLocationUnlockInfo);
-        foreach ($list as $value) {
-            $s = explode(',', $value);
-            if($s[0] == $slotId){
-                my_Assert(ctx()->baseInfo->cash >= $s[1], ErrCode::notenough_cash_msg);
-                ctx()->base()->Consume_Cash($s[1]);
-                $breed = new Ins_BreedEggSlot(ctx()->store->breedEggLocation->$slotId);
-                $breed->unlock = 1;
-                ctx()->store()->breedEggLocation->$slotId = $breed;
-                break;
-            }               
-        }
-        
-        UserProc::updateUserInfo();
-        return Resp::ok(array(
-                    'cash' => ctx()->baseInfo->cash,
-                    'store' => ctx()->store,                   
-        ));
-    }
-    
-    /**
-     * 6431 正常孵化完成点击领取
-     * @return Resp
-     */
-    public static function Pet_ReceiveBreedPet() {
-        list($slotId) = req()->paras;
-        
-        $ins_breed = new Ins_BreedEggSlot(ctx()->store()->breedEggLocation->$slotId);    
-        my_Assert($ins_breed->eggId != 0, ErrCode::user_store_NoExistBreedEgg);
-        my_Assert($ins_breed->unlock == 1, ErrCode::user_store_SlotNotUnlocked);                  
-        my_Assert(now() >= $ins_breed->endTs, ErrCode::user_store_NoCompleteBreed);
-                    
-        StoreProc::AddMultiItemInStore($ins_breed->mo()->reward);
-        
-        //随机一个灵宠      
-        $str = explode(';', $ins_breed->mo()->per);
-        $newPet = self::RandObtainPet($str);
-                     
-        $uid = 0;
-        if($newPet != null){           
-            $uid = $newPet->uid;
-            ctx()->store()->pet->$uid = $newPet;
-        }
-        
-        UserProc::updateUserInfo();
-        return Resp::ok(array(
-                    'cash' => ctx()->baseInfo->cash,
-                    'store' => ctx()->store,
-                    'newPetUid'=>$uid,
-        ));
-    }
-    
-    /**
-     * 6430 加速孵化宠物
-     * @return Resp
-     */
-    public static function Pet_FastBreedEgg() {
-        list($slotId) = req()->paras;
-        $ins_breed = new Ins_BreedEggSlot(ctx()->store()->breedEggLocation->$slotId);    
-        my_Assert($ins_breed->eggId != 0, ErrCode::user_store_NoExistBreedEgg);
-        my_Assert($ins_breed->unlock == 1, ErrCode::user_store_SlotNotUnlocked);                  
-        my_Assert(now() < $ins_breed->endTs, ErrCode::user_store_CompleteBreed);
-        
-        $num = $ins_breed->mo()->breedTs/60/10;
-        $cash_one = $ins_breed->mo()->fastBreed_cost/$num;
-        
-        $ts = $ins_breed->endTs - now();
-        $costNum = ceil($ts/60/10);
-        
-        my_Assert(ctx()->baseInfo->cash >= $costNum*$cash_one, ErrCode::notenough_cash_msg);
-        ctx()->base()->Consume_Cash($costNum*$cash_one);
-        
-        StoreProc::AddMultiItemInStore($ins_breed->mo()->reward);
-        
-        //随机一个灵宠      
-        $str = explode(';', $ins_breed->mo()->per);
-        $newPet = self::RandObtainPet($str);
-                     
-        $uid = 0;
-        if($newPet != null){           
-            $uid = $newPet->uid;
-            ctx()->store()->pet->$uid = $newPet;
-        }
-        
-        UserProc::updateUserInfo();
-        return Resp::ok(array(
-                    'cash' => ctx()->baseInfo->cash,
-                    'store' => ctx()->store,
-                    'newPetUid'=>$uid,
-        ));
-    }
     
-    /**
-     * 初始化一个宠物
-     * @param type $rarity
-     * @param type $qual
-     * @param type $petType
-     */
-    public static function RandObtainPet($str) {
-        //随机一个灵宠
-        $randNum = rand(1,10000);             
-        $start = 0;
-        $end = 0;
-        
-        $rarity = 0;
-        $qual = 0;
-        $petType = 0;
-        foreach ($str as $key => $value) {
-            $s = explode(',', $value);
-            $end += $s[3]*100; 
-            if($randNum > $start && $randNum <= $end){
-                $rarity = $s[0]; 
-                $qual = $s[1];
-                $petType = $s[2];
-                break;
-            }
-            $start = $end;
-        }
-        
-        $dic = GameConfig::pet();
-        $petArr = array();
-        foreach ($dic as $typeId => $mo) {
-            if($mo->petType == $petType && $mo->qual == $qual && $mo->rarity == $rarity){
-                $petArr[] = $typeId;
-            }
-        }
-        $typeId = 0;
-        if(count($petArr) > 0){
-            $num = rand(0,count($petArr)-1);
-            $typeId = $petArr[$num];                                
-        }
-        if($typeId != 0){
-            return self::initPet($typeId);
-        }
-                
-        return null;
-    }
-    
-    /**
-     * 6429 孵化宠物
-     * @return Resp
-     */
-    public static function Pet_BreedEgg() {
-        list($slotId,$eggId) = req()->paras;
-        
-        my_Assert(StlUtil::dictHasProperty(ctx()->store->items, $eggId), ErrCode::user_store_NoItem);
-        $mo = GameConfig::item_getItem($eggId);
-        my_Assert($mo != null, ErrCode::err_const_no);
-        my_Assert($mo->itemType == 103, ErrCode::user_store_NoItem);             
-        
-        $ins_breed = new Ins_BreedEggSlot(ctx()->store()->breedEggLocation->$slotId);       
-        my_Assert($ins_breed->eggId == 0 && $ins_breed->unlock == 1, ErrCode::user_store_NoBreedSlot);
-        ctx()->store()->removeItem($eggId, 1);
-        
-        //$ins_breed = ctx()->store()->breedEggLocation->$slot;
- 
-        $ins_breed->eggId = $eggId;       
-        $ts = $ins_breed->mo()->breedTs;
-        $ins_breed->endTs = now()+$ts;  
-        ctx()->store()->breedEggLocation->$slotId = $ins_breed;
-               
-        UserProc::updateUserInfo();
-        return Resp::ok(array(
-                    //'gold' => ctx()->baseInfo->gold,
-                    'store' => ctx()->store,
-        ));
-    }
-    
-    /**
-     * 6428 宠物降品   
-     */
-    public static function Pet_DownGradingQual() {
-        list($uid) = req()->paras;
-
-        $petDic = ctx()->store->pet;
-        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
-        $ins_pet = new Ins_Pet($petDic->$uid);
-
-        $NotDownGradingList = explode(',', glc()->equipQual_NotDownGrading);
-        my_Assert(!in_array($ins_pet->qual, $NotDownGradingList), ErrCode::user_store_equip_minQual);
-
-        $itemNum = 0;
-        for ($i = 1; $i < $ins_pet->level; $i++) {
-            $mo = GameConfig::pet_levelupgrade_getItem($ins_pet->mo()->rarity, $ins_pet->qual, $i);       
-            $itemNum += $mo->costItem;
-        }       
-        StoreProc::AddMultiItemInStore(6 . ',' . $itemNum);
-               
-        self::ComposeMaterial_Fallback_Pet($ins_pet->mo()->petType, $ins_pet->qual);
-
-        $ins_pet->level = 1;
-        $sList2 = explode(';', glc()->equipQualUnlockSkillId);
-        foreach ($sList2 as $str3) {
-            $s = explode(',', $str3);
-            if (in_array($ins_pet->qual, $s)) {
-                $ins_pet->qual = $s[0];
-                break;
-            }
-        }
-
-        ctx()->store->pet->$uid = $ins_pet;
-        //FightProc::Ranking_FightPower();
-        UserProc::updateUserInfo();
-        return Resp::ok(array(
-                    //'gold' => ctx()->baseInfo->gold,
-                    'store' => ctx()->store,
-        ));
-    }
-
-    private static function ComposeMaterial_Fallback_Pet($type, $qual) {
-        $sList2 = explode(';', glc()->equipQualUnlockSkillId);
-        foreach ($sList2 as $str) {
-            $s = explode(',', $str);
-            if (in_array($qual, $s)) {
-                $max = $qual;
-                $min = $s[0];
-                $num = 0;
-                for ($i = $min; $i < $max; $i++) {
-                    $mo = GameConfig::pet_compose_getItem($i);
-                    $num += explode(',', $mo->compose_condition)[2];
-                }
-
-                $typeId = self::ComposeMaterial($type, $min,902);
-                StoreProc::AddMultiItemInStore($typeId . ',' . $num);
-                break;
-            }
-        }
-    }
-    
-    
-    /*
-     * 6427 宠物降级
-     */
-
-    public static function Pet_DownGradingLevel() {
-        list($uid) = req()->paras; //宠物uid
-
-        $petDic = ctx()->store->pet;
-        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
-        $ins_pet = new Ins_Pet($petDic->$uid);
-
-        my_Assert($ins_pet->level > 1, ErrCode::user_store_equip_minlevel);      
-     
-        $itemNum = 0;
-        for ($i = 1; $i < $ins_pet->level; $i++) {
-            $mo = GameConfig::pet_levelupgrade_getItem($ins_pet->mo()->rarity, $ins_pet->qual, $i);       
-            $itemNum += $mo->costItem;
-        }       
-        StoreProc::AddMultiItemInStore(6 . ',' . $itemNum);
-
-       
-        
-        $ins_pet->level = 1;
-        ctx()->store->pet->$uid = $ins_pet;
-
-        //FightProc::Ranking_FightPower();
-        UserProc::updateUserInfo();
-        return Resp::ok(array(
-                    //'gold' => ctx()->baseInfo->gold,
-                    'store' => ctx()->store,
-        ));
-    }
-    
-    /**
-     * 6426 宠物一键合成    
-     * @return type
-     */
-    public static function Pet_OnekeyCompose() {
-        $store = ctx()->store(true);
-        $petDic = $store->pet;
-        $arr = array();                                                         # 待处理装备临时数组
-        $composePet = array();                                                  # 合成记录
-        foreach ($petDic as $pet) {
-            if ($pet->qual < 4) {                                               # 4 品以上的不参与合成
-                $arr[] = new Ins_Pet($pet);
-            }
-        }      
-
-        while (count($arr) > 0) {                                               # 循环处理每一个装备
-            $pet_compose = array_pop($arr);                                     # 从末尾弹出一个元素做合成运算
-            if (null == $pet_compose) {                                         # 防御空对象
-                break;
-            }
-            $eqQualCfg = GameConfig::pet_compose_getItem($pet_compose->qual); # 按照品阶查询合成配置数据
-            my_Assert(null != $eqQualCfg, ErrCode::err_const_no);               # 防御配置数据错误
-            list($type, $costQual, $num) = explode(',', $eqQualCfg->compose_condition); # 从配置提取合成条件
-            $composeArr = array();                                              # 消耗集合
-            foreach ($arr as $v) {                                              # 从剩余元素中查找合成所需
-                if ($v->qual == $costQual) {                                    # 同品阶
-                    if (($type == 1) ? $v->typeId == $pet_compose->typeId #     # type: 1 与本体相同 2 同部位即可
-                                    : $v->mo()->petType == $pet_compose->mo()->petType) {
-                        $composeArr[] = $v;                                     # 成为消耗品
-                    }
-                    if (count($composeArr) >= $num) {                           # 达到消耗数量就停
-                        break;
-                    }
-                }
-            }
-            if (count($composeArr) >= $num) {                                   # 合成的回收 不合成的可不能给回收了
-                $uid = $pet_compose->uid;
-                $newPet = self::ComposeNewPet($pet_compose);                    # 原地合成
-                self::petLevelChange_Material_Recovery($newPet->mo()->rarity, $newPet->qual, $newPet->level); # 回收材料
-                $newPet->level = 1;
-                $petDic->$uid = $newPet;
-                               
-                $composePet[] = $uid;                                           # 添加合成记录
-                foreach ($composeArr as $val) {                                 # 回收消耗的装备中所含材料
-                    self::petLevelChange_Material_Recovery($val->mo()->rarity, $val->qual, $val->level); # 回收材料
-                    StlUtil::dictRemove(ctx()->store(true)->pet, $val->uid);    # 背包删除
-                    if(ctx()->store(true)->petUid_fight_position == $val->uid){
-                        ctx()->store(true)->petUid_fight_position = 0;
-                    }                 
-                    foreach (ctx()->store(true)->petUids_supportFight_position as $k => $pUid) {
-                        if($pUid == $val->uid){
-                            StlUtil::dictRemove(ctx()->store(true)->petUids_supportFight_position, $k);                            
-                            break;
-                        }
-                    }
-                                      
-                    StlUtil::arrayRemove($arr, $val); # 从arr中删掉已消耗装备
-                }
-            }
-        }
-
-       
-        UserProc::updateUserInfo();                                             # 回存玩家数据
-        return Resp::ok(array(#                                                 # 返回给客户端的数据                   
-                    'store' => ctx()->store,
-                    'composeEquip' => $composePet,
-                    'task' => ctx()->task,
-        ));
-    }
-    
-    /**
-     * 6425 宠物合成    
-     * @return Resp
-     */
-    public static function Pet_Compose() {
-        list($uid, $petUids_cost, $composeMaterial_typeIds) = req()->paras;
-       
-        $petDic = ctx()->store->pet;
-        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
-        $ins_pet = new Ins_Pet($petDic->$uid);
-
-        my_Assert($ins_pet->qual < 11, ErrCode::user_store_equip_qualMaxLimit);
-        $composeMo = GameConfig::pet_compose_getItem($ins_pet->qual);
-        my_Assert(null != $composeMo, ErrCode::err_const_no);
-        $arr = explode(',', $composeMo->compose_condition);
-
-        $type = $arr[0];
-        $costQual = $arr[1];
-        $num = $arr[2];
-
-        $all_num = 0;
-
-        $materialItemType = 0;
-        $materialItemNum = 0;
-        if ($type == 2 && $composeMaterial_typeIds != null) {//部位去校验
-            $str = explode(',', $composeMaterial_typeIds);
-            $materialItemType = $str[0];
-            $materialItemNum = count($str);
-            foreach ($str as $s) {
-                $composeMaterial_itemTypeId = self::ComposeMaterial($ins_pet->mo()->petType, $costQual,902);
-                my_Assert($composeMaterial_itemTypeId == $s, ErrCode::user_store_equip_composeMaterialErr);
-                $all_num += 1;
-            }
-        }
-
-        if ($petUids_cost != null) {
-            $costPetsArr = explode(',', $petUids_cost);
-            $all_num += count($costPetsArr);
-
-            foreach ($costPetsArr as $pUid) {
-                my_Assert(StlUtil::dictHasProperty($petDic, $pUid), ErrCode::user_store_NotExistPet);
-
-                my_Assert(ctx()->store(true)->petUid_fight_position != $pUid, ErrCode::user_store_NotSelectPet_fight);
-                my_Assert(!in_array($pUid, ctx()->store(true)->petUids_supportFight_position), ErrCode::user_store_NotSelectPet_supportfight);
-                
-                $costIns_pet = new Ins_Pet($petDic->$pUid);
-                my_Assert($costIns_pet->qual == $costQual, ErrCode::user_store_equipMaterialQualErr);
-                if ($type == 1) {//本体                
-                    my_Assert($costIns_pet->typeId == $ins_pet->typeId, ErrCode::user_store_equipMaterialTypeErr);
-                } else {
-                    my_Assert($costIns_pet->mo()->petType == $ins_pet->mo()->petType, ErrCode::user_store_equipMaterialTypeErr);
-                }
-            }
-        }
-        my_Assert($all_num == $num, ErrCode::user_store_equipMaterialNumErr);
-        ctx()->store(true)->pet->$uid = self::ComposeNewPet($ins_pet);
-
-        //消耗的装备 回收         
-        if ($petUids_cost != null) {
-            $costPetsArr = explode(',', $petUids_cost);
-            foreach ($costPetsArr as $pUid) {
-                $costIns_Equip = new Ins_Pet($petDic->$pUid);
-                self::petLevelChange_Material_Recovery($costIns_Equip->mo()->rarity, $costIns_Equip->qual, $costIns_Equip->level);
-                StlUtil::dictRemove(ctx()->store(true)->pet, $pUid);              
-            }
-        }
-
-        if ($materialItemType != 0) {
-            ctx()->store(true)->removeItem($materialItemType, $materialItemNum);
-        }
-        
-        UserProc::updateUserInfo();
-        return Resp::ok(array(                 
-                    'store' => ctx()->store,
-                    'task' => ctx()->task,
-        ));
-    }
-    
-    /**
-     * 装备等级提升 消耗的金币图纸回收
-     * @param type $rarity
-     * @param type $qual
-     * @param type $posId
-     * @param type $level
-     */
-    public static function petLevelChange_Material_Recovery($rarity, $qual,$level) {    
-        $num = 0;
-       
-        for ($i = 1; $i <= $level - 1; $i++) {
-            $mo = GameConfig::pet_levelupgrade_getItem($rarity, $qual, $i);         
-            $num += $mo->costItem;
-        }
-        if ($num > 0) {        
-            StoreProc::AddMultiItemInStore(6 . ',' . $num);
-        }
-    }
-    
-    /**
-     * 合成一个新的装备
-     * @param type Ins_Equip
-     */
-    public static function ComposeNewPet(&$ins_pet) {
-        $newPetTypeId = $ins_pet->typeId;
-        $qual = $ins_pet->qual + 1;
-        if ($ins_pet->qual < 4) {
-            //$newEquipTypeId = substr($ins_pet->typeId, 0, strlen($ins_equip->typeId) - 5);
-            $rarity = substr($ins_pet->typeId, -3);
-            $mo = GameConfig::pet_getItem($ins_pet->typeId);
-            $newPetTypeId = $mo->type. "0" . $qual . $rarity;
-        }
-
-        $ins_pet->typeId = $newPetTypeId;
-        $ins_pet->qual = $qual;
-
-        return $ins_pet;
-    }
-    
-    
-    /**
-     *6424 灵宠等级提升   
-     * @return Resp
-     */
-    public static function Pet_LevelUpgrade(){
-        list($uid) = req()->paras; //装备uid
-
-        my_Assert(StlUtil::dictHasProperty(ctx()->store->pet, $uid), ErrCode::user_store_NotExistPet);
-        $ins_pet = new Ins_Pet(ctx()->store->pet->$uid);
-        my_Assert($ins_pet->level < $ins_pet->Pet_MaxLevel(), ErrCode::user_store_LevelLimit);
-
-        $mo = $ins_pet->petLevelMo();
-
-        $costTuzhiId = 6;
-        $tuzhiNum = 0;
-        if (StlUtil::dictHasProperty(ctx()->store->items, $costTuzhiId)) {
-            $tuzhiNum = ctx()->store->items->$costTuzhiId;
-        }
-        my_Assert($tuzhiNum >= $mo->costItem, ErrCode::notenough_item);
-
-        ctx()->store(true)->removeItem($costTuzhiId,$mo->costItem);
-     
-        $ins_pet->level += 1;
-        ctx()->store->pet->$uid = $ins_pet;
-     
-        UserProc::updateUserInfo();
-        return Resp::ok(array(                   
-                    'store' => ctx()->store,              
-        ));
-    }
-    
-    /**
-     * 6423 展示空闲灵宠
-     * @return Resp
-     */
-    public static function Pet_SelectShowPet(){
-        list($uid) = req()->paras;
-        
-        $petDic = ctx()->store->pet;
-        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
-        
-        my_Assert(count(ctx()->store()->mainShowPetList)< GameConfig::glc2()->Pet_MainShowPetList , ErrCode::user_store_ShowPetNumLimit);
-        
-        my_Assert(ctx()->store->petUid_fight_position != $uid, ErrCode::user_store_NotSelectPet_fight);
-        my_Assert(!in_array($uid, ctx()->store->petUids_supportFight_position), ErrCode::user_store_NotSelectPet_supportfight);
-        
-        if(in_array($uid,ctx()->store()->mainShowPetList)){
-            StlUtil::arrayRemove(ctx()->store()->mainShowPetList, $uid);
-        } else {
-            ctx()->store()->mainShowPetList[] = $uid;
-        }
-        
-        UserProc::updateUserInfo();
-        return Resp::ok(array());
-    }
-
-    /**
-     * 6422 出战/替换/上阵
-     */
-    public static function Pet_ChangeFightPosition() {
-        list($type, $uid, $index) = req()->paras;
-
-        if ($type == 1) {//出战、替换
-            ctx()->store(true)->petUid_fight_position = $uid;
-        } else if ($type == 2) {
-            ctx()->store(true)->petUids_supportFight_position->$index = $uid;
-        }
-
-        if ($type == 0 && $index == 0 && $uid != 0) {//上阵点击空白的地方
-            if (ctx()->store(true)->petUid_fight_position == 0) {
-                ctx()->store(true)->petUid_fight_position = $uid;
-            } else {
-                if (count(StlUtil::dictToArray(ctx()->store(true)->petUids_supportFight_position)) == 0) {
-                    $key = 1;
-                    ctx()->store(true)->petUids_supportFight_position->$key = $uid;
-                } else {
-                    for ($i = 1; $i <= 2; $i++) {
-                        if (!StlUtil::dictHasProperty(ctx()->store(true)->petUids_supportFight_position, $i) || ctx()->store(true)->petUids_supportFight_position->$i == 0) {
-                            ctx()->store(true)->petUids_supportFight_position->$i = $uid;
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-
-        UserProc::updateUserInfo();
-        return Resp::ok(array());
-    }
-
-    /**
-     * 6421 移除宠物上的新的标志
-     */
-    public static function Pet_RemoveNewTip() {
-        list($uid) = req()->paras;
-
-        $petDic = ctx()->store->pet;
-        my_Assert(StlUtil::dictHasProperty($petDic, $uid), ErrCode::user_store_NotExistPet);
-
-        ctx()->store->pet->$uid->isNew = 0;
-
-        UserProc::updateUserInfo();
-        return Resp::ok(array());
-    }
-
     /**
      * 6420 降品
      */
@@ -1774,6 +1226,7 @@ class StoreProc {
                 case 602://灵蛇果
                 case 802://灵蛇贺岁券    
                 case 901:
+                case 103://宠物蛋    
                     self::PutItemsInStore($itemId, $num);
 //                    if ($itemMo->itemType == 100) {//图纸
 //                        self::checkEquipUpgradeTip();//废弃

+ 1 - 1
Gameserver/App/service_call/pay/official/wxpayv2/notify.php

@@ -65,7 +65,7 @@ class PayNotifyCallBack extends WxPayNotify {
         }
         if ($order->status == 1) {                                              # 订单状态是成功 1代表支付成功
             $order->UpdateOrderStatus();                                        # [数据库操作]更新订单状态,->已付款
-//            loyalsoft\TapDBUtil::PushPayEvent($order, 'wxpay');                 # 向tapdb推送充值记录
+            loyalsoft\TapDBUtil::PushPayEvent($order, 'wxpay');                 # 向tapdb推送充值记录
             CLog::pay("[notify.wx] [发货] " . $order->cpOrderId . " >>> " . $order->amount);
             $msg = "success";
             return true;

+ 1 - 1
Gameserver/App/service_call/pay/official/wxpayv2/notify_hykb.php

@@ -65,7 +65,7 @@ class PayNotifyCallBack extends WxPayNotify {
         }
         if ($order->status == 1) {                                              # 订单状态是成功 1代表支付成功
             $order->UpdateOrderStatus();                                        # [数据库操作]更新订单状态,->已付款
-//            loyalsoft\TapDBUtil::PushPayEvent($order, 'wxpay');                 # 向tapdb推送充值记录
+            loyalsoft\TapDBUtil::PushPayEvent($order, 'wxpay');                 # 向tapdb推送充值记录
             CLog::pay("[notify.wx] [发货] " . $order->cpOrderId . " >>> " . $order->amount);
             $msg = "success";
             return true;

+ 1 - 1
Gameserver/App/triggers/cyzhao.php

@@ -7,4 +7,4 @@ new Req('{"uid":"0AD47A961006418C24E000EDF5AC0501","cmd":6000,"paras":[172239384
 req()->uid = "0AD47A961006418C24E000EDF5AC0501";
 req()->zoneid = 1;
 
-echo FightProc::ResetWorldBossRank_StartTs();
+echo FightProc::triggerSettleRankReward_worldBoss();