فهرست منبع

每日任务,言灵进阶, 星星奖励

gwang 4 سال پیش
والد
کامیت
b3d7a153ea
26فایلهای تغییر یافته به همراه1566 افزوده شده و 50 حذف شده
  1. 4 0
      Gameserver/Amfphp/base/CmdCode.php
  2. 5 0
      Gameserver/Amfphp/base/ErrCode.php
  3. 21 3
      Gameserver/Amfphp/configs/GameConfig.php
  4. 2 1
      Gameserver/Amfphp/configs/GameConstants.php
  5. 1296 0
      Gameserver/Amfphp/model/Const/GameConfig.php
  6. 1 1
      Gameserver/Amfphp/model/Const/primordial_data.php
  7. 1 1
      Gameserver/Amfphp/model/Const/sm_gate.php
  8. 9 4
      Gameserver/Amfphp/model/Const/sm_gate_starreward.php
  9. 63 0
      Gameserver/Amfphp/model/Const/sm_guide_module.php
  10. 1 1
      Gameserver/Amfphp/model/Const/sm_item_base.php
  11. 1 1
      Gameserver/Amfphp/model/Const/sm_item_yanling.php
  12. 1 1
      Gameserver/Amfphp/model/Const/sm_item_yanlingbook.php
  13. 1 1
      Gameserver/Amfphp/model/Const/sm_task.php
  14. 1 1
      Gameserver/Amfphp/model/Const/sm_task_active_reward.php
  15. 3 3
      Gameserver/Amfphp/model/Const/sm_task_daily.php
  16. 1 1
      Gameserver/Amfphp/model/Const/sm_yanling_upgrade.php
  17. 7 0
      Gameserver/Amfphp/model/User/UserGateDifficulty.php
  18. 1 1
      Gameserver/Amfphp/model/User/UserGatesModel.php
  19. 3 2
      Gameserver/Amfphp/process/FightProc.php
  20. 4 3
      Gameserver/Amfphp/process/FightProc/PVPProc.php
  21. 108 16
      Gameserver/Amfphp/process/FightProc/SweepGatesProc.php
  22. 4 1
      Gameserver/Amfphp/process/HeroProc.php
  23. 3 0
      Gameserver/Amfphp/process/StoreProc.php
  24. 6 4
      Gameserver/Amfphp/process/TaskProc.php
  25. 15 0
      Gameserver/Amfphp/util/StlUtil.php
  26. 4 4
      Gameserver/nbproject/private/private.xml

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

@@ -684,6 +684,10 @@ class CmdCode {
      */
     const cmd_fight_GetChallengeLog = 6805;
 
+    /**
+     * 剧情 - 领取剧情任务章节星数奖励
+     */
+    const cmd_fight_GetArenasActiveReward = 6806;
 
 
 //

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

@@ -982,6 +982,11 @@ class ErrCode {
      * 剧情关卡 - 剧情关卡不能重复挑战,只能挑战一次
      */
     const story_repeatfight = 4025;
+
+    /**
+     * 剧情关卡 - 星数奖励领取条件不够
+     */
+    const err_arenas_starrwd_star = 4026;
 // </editor-fold>
 // 
     // <editor-fold defaultstate="collapsed" desc="    排行榜错误码  41xx    ">

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

@@ -6,7 +6,7 @@ namespace loyalsoft;
 // 由CodeGenerator创建。
 // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
 // author: gwang 
-// 日期: 2020-07-29 11:14:40
+// 日期: 2020-08-03 16:46:29
 ////////////////////
 
 /**
@@ -271,10 +271,12 @@ class GameConfig {
     }
 
     /**
+     * @param type $chapterId
+     * @param type $hardLevel
      * @return \sm_gate_starreward gate_starreward item数据 
      */
-    public static function gate_starreward_getItem($itemid) {
-        return self::get_hash_item('gate_starreward', $itemid);
+    public static function gate_starreward_getItem($chapterId, $hardLevel) {
+        return self::get_hash_item('gate_starreward', "$chapterId-$hardLevel");
     }
 
     /**
@@ -1264,6 +1266,22 @@ class GameConfig {
         return self::get_hash_item('yanling_upgrade', $typeId)->$grade;
     }
 
+    /**
+     * 功能引导模块
+     * @return \guide_module
+     */
+    public static function guide_module() {
+        static $a = null;
+        return self::initValue($a, 'guide_module');
+    }
+
+    /**
+     * @return \sm_guide_module guide_module item数据 
+     */
+    public static function guide_module_getItem($itemid) {
+        return self::get_hash_item('guide_module', $itemid);
+    }
+
     /**
      * 当前版本(时间戳)
      * @return \ver

+ 2 - 1
Gameserver/Amfphp/configs/GameConstants.php

@@ -79,7 +79,8 @@ define("META_GOLD_ITEMID", 1);
 define("META_CASH_ITEMID", 2);                                                  # 宝石物品id
 define("META_tili_ITEMID", 3);                                                  # 体力的物品ID
 define('META_FriendShipPoit_ItemId', 4);                                        # 友情点的物品ID
-define("META_PVPCOIN_ITEMID", 5);                                               # Spar(能量晶石)物品id
+define("META_PVPCOIN_ITEMID", 5);                                               # PVP竞技币物品id
+define("META_ActivePoint_ITEMID", 6);                                           # 每日任务活跃点物品id
 define("META_YUANBAOITEMID", 7);                                                # 元宝物品ID
 //                                                            TODO: config the c-s offset data
 define("OFFSET_TIMESPAN", -3);                                                  # 服务端相对于客户端的偏移时间戳

+ 1296 - 0
Gameserver/Amfphp/model/Const/GameConfig.php

@@ -0,0 +1,1296 @@
+<?php
+
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2020-08-06 15:22:08
+////////////////////
+
+/**
+ * 常量配置数据 
+ */
+class GameConfig {
+// <editor-fold defaultstate="collapsed" desc="  基础代码 ">    
+    /**
+     * 是否启用codegen 
+     */
+    private static function isCG()  {
+        return defined('CodeGen_Enabled') && CodeGen_Enabled; 
+    }
+    /**
+     * @var bool 分区是否使用独立的常量配置数据
+     */
+    private static $useZoneId = false;
+    /**
+     * 追加分区列表字符串
+     * @return string
+     */
+    private static function zoneid()
+    {
+        global $zoneid;
+        return self::$useZoneId ? "-zone$zoneid" : "";
+    }
+    /**
+     * 初始化指定变量, 非null的情况下直接跳出
+     * 可能从文件中或者redis中获取原始数据对变量进行初始化
+     * @param mixed $a 变量
+     * @param string $modelName 用来初始化变量的资源名称
+     * @param bool $isHash 数据是否采用hash结构(否:普通字符串)
+     */
+    static private function initValue(&$a, $modelName, $isHash = true)
+    {
+        $key = 'gamecfg-' . $modelName . self::zoneid();
+        if (is_null($a)) {
+            if (self::isCG()) {
+                $a = include $key . '.php';
+            } else {
+                $a = $isHash ? gMem()->hgetall($key) : gMem()->get($key);
+            }
+        }
+        return $a;
+    }
+    /** 
+     * 获取hash结构的一个item
+     * @param string $modelName 模块名称
+     * @param mixed/string/int $itemId 索引
+     * @return mixed
+     */
+    private static function get_hash_item($modelName, $itemId)
+    {
+        if (self::isCG()) {
+            $data = self::$modelName();
+            if (property_exists($data, $itemId)) {
+                return $data->$itemId;
+            }
+        } else {
+            $key = 'gamecfg-' . $modelName . self::zoneid();
+            return gMem()->hget($key, $itemId);
+        }
+        return null;
+    }
+// </editor-fold>
+    /**
+    * 全局参数
+    * @return \globalsettings
+    */
+    public static function globalsettings()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'globalsettings');
+    }
+    /**
+    * 英雄模块
+    * @return \hero
+    */
+    public static function hero()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'hero');
+    }
+    /**
+    * @return \sm_hero hero item数据 
+    */
+    public static function hero_getItem($itemid)
+    { 
+        return self::get_hash_item('hero', $itemid);
+    }
+    /**
+    * 英雄的升级(属性加成)
+    * @return \heroextra_level
+    */
+    public static function heroextra_level()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'heroextra_level');
+    }
+    /**
+    * @return \sm_heroextra_level heroextra_level item数据 
+    */
+    public static function heroextra_level_getItem($heroId, $quality)
+    { 
+        return self::get_hash_item('heroextra_level', $heroId)->$quality;
+    }
+    /**
+    * 开服七天活动
+    * @return \day7
+    */
+    public static function day7()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'day7');
+    }
+    /**
+    * @return \sm_day7 day7 item数据 
+    */
+    public static function day7_getItem($itemid)
+    { 
+        return self::get_hash_item('day7', $itemid);
+    }
+    /**
+    * [废弃]
+    * @return \item
+    */
+    public static function item()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item');
+    }
+    /**
+    * @return \sm_item item item数据 
+    */
+    public static function item_getItem($itemid)
+    { 
+        return self::get_hash_item('item', $itemid);
+    }
+    /**
+    * [废弃]
+    * @return \itemlevel
+    */
+    public static function itemlevel()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'itemlevel');
+    }
+    /**
+    * @return \sm_itemlevel itemlevel item数据 
+    */
+    public static function itemlevel_getItem($itemid)
+    { 
+        return self::get_hash_item('itemlevel', $itemid);
+    }
+    /**
+    * 英雄的好感度提升(消耗金币)
+    * @return \heroextra_favor
+    */
+    public static function heroextra_favor()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'heroextra_favor');
+    }
+    /**
+    * @return \sm_heroextra_favor heroextra_favor item数据 
+    */
+    public static function heroextra_favor_getItem($itemid)
+    { 
+        return self::get_hash_item('heroextra_favor', $itemid);
+    }
+    /**
+    * 英雄的升级——每级成长消耗经验需求表
+    * @return \hero_levelexp
+    */
+    public static function hero_levelexp()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'hero_levelexp');
+    }
+    /**
+    * @return \sm_hero_levelexp hero_levelexp item数据 
+    */
+    public static function hero_levelexp_getItem($itemid)
+    { 
+        return self::get_hash_item('hero_levelexp', $itemid);
+    }
+    /**
+    * 英雄的升星(消耗金币+ 属性加成)
+    * @return \heroextra_star
+    */
+    public static function heroextra_star()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'heroextra_star');
+    }
+    /**
+    * @return \sm_heroextra_star heroextra_star item数据 
+    */
+    public static function heroextra_star_getItem($itemid)
+    { 
+        return self::get_hash_item('heroextra_star', $itemid);
+    }
+    /**
+    * 英雄的升阶(消耗金币+ 属性加成)
+    * @return \heroextra_dengjie
+    */
+    public static function heroextra_dengjie()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'heroextra_dengjie');
+    }
+    /**
+    * @return \sm_heroextra_dengjie heroextra_dengjie item数据 
+    */
+    public static function heroextra_dengjie_getItem($itemid)
+    { 
+        return self::get_hash_item('heroextra_dengjie', $itemid);
+    }
+    /**
+    * 关卡
+    * @return \gate
+    */
+    public static function gate()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gate');
+    }
+    /**
+    * @return \sm_gate gate item数据 
+    */
+    public static function gate_getItem($itemid)
+    { 
+        return self::get_hash_item('gate', $itemid);
+    }
+    /**
+    * 关卡波茨数据
+    * @return \gatelevel
+    */
+    public static function gatelevel()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gatelevel');
+    }
+    /**
+    * @return \sm_gatelevel gatelevel item数据 
+    */
+    public static function gatelevel_getItem($itemid)
+    { 
+        return self::get_hash_item('gatelevel', $itemid);
+    }
+    /**
+    * 关卡—— 星级奖励
+    * @return \gate_starreward
+    */
+    public static function gate_starreward()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gate_starreward');
+    }
+    /**
+    * @return \sm_gate_starreward gate_starreward item数据 
+    */
+    public static function gate_starreward_getItem($chapterId, $hardLevel)
+    { 
+        return self::get_hash_item('gate_starreward', "$chapterId-$hardLevel");
+    }
+    /**
+    * 任务
+    * @return \task
+    */
+    public static function task()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'task');
+    }
+    /**
+    * @return \sm_task task item数据 
+    */
+    public static function task_getItem($itemid)
+    { 
+        return self::get_hash_item('task', $itemid);
+    }
+    /**
+    * 
+    * @return \playerlevel
+    */
+    public static function playerlevel()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'playerlevel');
+    }
+    /**
+    * @return \sm_playerlevel playerlevel item数据 
+    */
+    public static function playerlevel_getItem($itemid)
+    { 
+        return self::get_hash_item('playerlevel', $itemid);
+    }
+    /**
+    * 言灵类道具
+    * @return \item_yanling
+    */
+    public static function item_yanling()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_yanling');
+    }
+    /**
+    * @return \sm_item_yanling item_yanling item数据 
+    */
+    public static function item_yanling_getItem($itemid)
+    { 
+        return self::get_hash_item('item_yanling', $itemid);
+    }
+    /**
+    * 技能升级消耗金币
+    * @return \skill_upgrade_cost
+    */
+    public static function skill_upgrade_cost()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'skill_upgrade_cost');
+    }
+    /**
+    * @return \sm_skill_upgrade_cost skill_upgrade_cost item数据 
+    */
+    public static function skill_upgrade_cost_getItem($itemid)
+    { 
+        return self::get_hash_item('skill_upgrade_cost', $itemid);
+    }
+    /**
+    * 商城
+    * @return \shop
+    */
+    public static function shop()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'shop');
+    }
+    /**
+    * @return \sm_shop shop item数据 
+    */
+    public static function shop_getItem($itemid)
+    { 
+        return self::get_hash_item('shop', $itemid);
+    }
+    /**
+    * 停服计划
+    * @return \service_schedule
+    */
+    public static function service_schedule()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'service_schedule');
+    }
+    /**
+    * @return \sm_service_schedule service_schedule item数据 
+    */
+    public static function service_schedule_getItem($itemid)
+    { 
+        return self::get_hash_item('service_schedule', $itemid);
+    }
+    /**
+    * 抽奖数据
+    * @return \choujiang
+    */
+    public static function choujiang()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'choujiang');
+    }
+    /**
+    * 无穷无尽关卡模式
+    * @return \gate_forever
+    */
+    public static function gate_forever()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gate_forever');
+    }
+    /**
+    * @return \sm_gate_forever gate_forever item数据 
+    */
+    public static function gate_forever_getItem($itemid)
+    { 
+        return self::get_hash_item('gate_forever', $itemid);
+    }
+    /**
+    * 系统邮件
+    * @return \sysmail
+    */
+    public static function sysmail()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'sysmail');
+    }
+    /**
+    * @return \sm_sysmail sysmail item数据 
+    */
+    public static function sysmail_getItem($itemid)
+    { 
+        return self::get_hash_item('sysmail', $itemid);
+    }
+    /**
+    * 关卡【副本】
+    * @return \gate_carbon
+    */
+    public static function gate_carbon()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gate_carbon');
+    }
+    /**
+    * @return \sm_gate_carbon gate_carbon item数据 
+    */
+    public static function gate_carbon_getItem($itemid)
+    { 
+        return self::get_hash_item('gate_carbon', $itemid);
+    }
+    /**
+    * 活跃点奖励表
+    * @return \task_active_reward
+    */
+    public static function task_active_reward()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'task_active_reward');
+    }
+    /**
+    * @return \sm_task_active_reward task_active_reward item数据 
+    */
+    public static function task_active_reward_getItem($itemid)
+    { 
+        return self::get_hash_item('task_active_reward', $itemid);
+    }
+    /**
+    * 竞技场 上榜单奖励
+    * @return \pvp_rankreward
+    */
+    public static function pvp_rankreward()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pvp_rankreward');
+    }
+    /**
+    * @return \sm_pvp_rankreward pvp_rankreward item数据 
+    */
+    public static function pvp_rankreward_getItem($itemid)
+    { 
+        return self::get_hash_item('pvp_rankreward', $itemid);
+    }
+    /**
+    * 竞技 商店
+    * @return \pvp_shop
+    */
+    public static function pvp_shop()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'pvp_shop');
+    }
+    /**
+    * @return \sm_pvp_shop pvp_shop item数据 
+    */
+    public static function pvp_shop_getItem($itemid)
+    { 
+        return self::get_hash_item('pvp_shop', $itemid);
+    }
+    /**
+    * 熔炼实验室
+    * @return \smelting
+    */
+    public static function smelting()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'smelting');
+    }
+    /**
+    * @return \sm_smelting smelting item数据 
+    */
+    public static function smelting_getItem($itemid)
+    { 
+        return self::get_hash_item('smelting', $itemid);
+    }
+    /**
+    * 配置的关卡相关的战斗数据
+    * @return \gate_combat
+    */
+    public static function gate_combat()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gate_combat');
+    }
+    /**
+    * @return \sm_gate_combat gate_combat item数据 
+    */
+    public static function gate_combat_getItem($itemid)
+    { 
+        return self::get_hash_item('gate_combat', $itemid);
+    }
+    /**
+    * [废弃]
+    * @return \gate_carbon_content
+    */
+    public static function gate_carbon_content()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gate_carbon_content');
+    }
+    /**
+    * @return \sm_gate_carbon_content gate_carbon_content item数据 
+    */
+    public static function gate_carbon_content_getItem($itemid)
+    { 
+        return self::get_hash_item('gate_carbon_content', $itemid);
+    }
+    /**
+    * 每日任务
+    * @return \task_daily
+    */
+    public static function task_daily()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'task_daily');
+    }
+    /**
+    * @return \sm_task_daily task_daily item数据 
+    */
+    public static function task_daily_getItem($itemid)
+    { 
+        return self::get_hash_item('task_daily', $itemid);
+    }
+    /**
+    * 抽奖保底数据
+    * @return \choujiang_baodi
+    */
+    public static function choujiang_baodi()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'choujiang_baodi');
+    }
+    /**
+    * @return \sm_choujiang_baodi choujiang_baodi item数据 
+    */
+    public static function choujiang_baodi_getItem($typeId, $cishu)
+    { 
+        return self::get_hash_item('choujiang_baodi', "$typeId-$cishu");
+    }
+    /**
+    * 英雄的升级——成长可消耗的道具表
+    * @return \hero_levelexp_costitem
+    */
+    public static function hero_levelexp_costitem()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'hero_levelexp_costitem');
+    }
+    /**
+    * @return \sm_hero_levelexp_costitem hero_levelexp_costitem item数据 
+    */
+    public static function hero_levelexp_costitem_getItem($itemid)
+    { 
+        return self::get_hash_item('hero_levelexp_costitem', $itemid);
+    }
+    /**
+    * 抽奖设置数据
+    * @return \choujiang_settings
+    */
+    public static function choujiang_settings()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'choujiang_settings');
+    }
+    /**
+    * @return \sm_choujiang_settings choujiang_settings item数据 
+    */
+    public static function choujiang_settings_getItem($itemid)
+    { 
+        return self::get_hash_item('choujiang_settings', $itemid);
+    }
+    /**
+    * 引导步骤
+    * @return \guide_step
+    */
+    public static function guide_step()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'guide_step');
+    }
+    /**
+    * @return \sm_guide_step guide_step item数据 
+    */
+    public static function guide_step_getItem($itemid)
+    { 
+        return self::get_hash_item('guide_step', $itemid);
+    }
+    /**
+    * 引导触发
+    * @return \guide_trigger
+    */
+    public static function guide_trigger()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'guide_trigger');
+    }
+    /**
+    * @return \sm_guide_trigger guide_trigger item数据 
+    */
+    public static function guide_trigger_getItem($itemid)
+    { 
+        return self::get_hash_item('guide_trigger', $itemid);
+    }
+    /**
+    * 任务节点
+    * @return \task_node
+    */
+    public static function task_node()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'task_node');
+    }
+    /**
+    * @return \sm_task_node task_node item数据 
+    */
+    public static function task_node_getItem($itemid)
+    { 
+        return self::get_hash_item('task_node', $itemid);
+    }
+    /**
+    * 宝箱
+    * @return \box
+    */
+    public static function box()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'box');
+    }
+    /**
+    * @return \sm_box box item数据 
+    */
+    public static function box_getItem($itemid)
+    { 
+        return self::get_hash_item('box', $itemid);
+    }
+    /**
+    * 宝箱的奖池
+    * @return \boxpool
+    */
+    public static function boxpool()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'boxpool');
+    }
+    /**
+    * @return \sm_boxpool boxpool item数据 
+    */
+    public static function boxpool_getItem($itemid)
+    { 
+        return self::get_hash_item('boxpool', $itemid);
+    }
+    /**
+    * 英雄————神血系统
+    * @return \heroextra_godblood
+    */
+    public static function heroextra_godblood()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'heroextra_godblood');
+    }
+    /**
+    * @return \sm_heroextra_godblood heroextra_godblood item数据 
+    */
+    public static function heroextra_godblood_getItem($itemid)
+    { 
+        return self::get_hash_item('heroextra_godblood', $itemid);
+    }
+    /**
+    * 碎片
+    * @return \segment
+    */
+    public static function segment()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'segment');
+    }
+    /**
+    * @return \sm_segment segment item数据 
+    */
+    public static function segment_getItem($itemid)
+    { 
+        return self::get_hash_item('segment', $itemid);
+    }
+    /**
+    * 
+    * @return \gate_world
+    */
+    public static function gate_world()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gate_world');
+    }
+    /**
+    * @return \sm_gate_world gate_world item数据 
+    */
+    public static function gate_world_getItem($itemid)
+    { 
+        return self::get_hash_item('gate_world', $itemid);
+    }
+    /**
+    * [废弃]
+    * @return \gate_city
+    */
+    public static function gate_city()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gate_city');
+    }
+    /**
+    * @return \sm_gate_city gate_city item数据 
+    */
+    public static function gate_city_getItem($itemid)
+    { 
+        return self::get_hash_item('gate_city', $itemid);
+    }
+    /**
+    * 神秘商城道具表-by goodstype
+    * @return \secretshop_goodsType
+    */
+    public static function secretshop_goodsType()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'secretshop_goodsType');
+    }
+    /**
+    * @return \sm_secretshop_goodsType secretshop_goodsType item数据 
+    */
+    public static function secretshop_goodsType_getItem($itemid)
+    { 
+        return self::get_hash_item('secretshop_goodsType', $itemid);
+    }
+    /**
+    * 神秘商城刷新价格表
+    * @return \secretshop_refresh
+    */
+    public static function secretshop_refresh()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'secretshop_refresh');
+    }
+    /**
+    * @return \sm_secretshop_refresh secretshop_refresh item数据 
+    */
+    public static function secretshop_refresh_getItem($itemid)
+    { 
+        return self::get_hash_item('secretshop_refresh', $itemid);
+    }
+    /**
+    * 神秘商城道具表-by typeId
+    * @return \secretshop_typeId
+    */
+    public static function secretshop_typeId()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'secretshop_typeId');
+    }
+    /**
+    * @return \sm_secretshop_typeId secretshop_typeId item数据 
+    */
+    public static function secretshop_typeId_getItem($itemid)
+    { 
+        return self::get_hash_item('secretshop_typeId', $itemid);
+    }
+    /**
+    * 客户端版本信息
+    * @return \clientVersionHistory
+    */
+    public static function clientVersionHistory()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'clientVersionHistory');
+    }
+    /**
+    * @return \sm_clientVersionHistory clientVersionHistory item数据 
+    */
+    public static function clientVersionHistory_getItem($itemid)
+    { 
+        return self::get_hash_item('clientVersionHistory', $itemid);
+    }
+    /**
+    * 分区列表
+    * @return \zonelist
+    */
+    public static function zonelist()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'zonelist');
+    }
+    /**
+    * @return \sm_zonelist zonelist item数据 
+    */
+    public static function zonelist_getItem($itemid)
+    { 
+        return self::get_hash_item('zonelist', $itemid);
+    }
+    /**
+    * 兑换码礼包
+    * @return \tokenGift
+    */
+    public static function tokenGift()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'tokenGift');
+    }
+    /**
+    * @return \sm_tokenGift tokenGift item数据 
+    */
+    public static function tokenGift_getItem($itemid)
+    { 
+        return self::get_hash_item('tokenGift', $itemid);
+    }
+    /**
+    * 活动配置
+    * @return \activity
+    */
+    public static function activity()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'activity');
+    }
+    /**
+    * @return \sm_activity activity item数据 
+    */
+    public static function activity_getItem($itemid)
+    { 
+        return self::get_hash_item('activity', $itemid);
+    }
+    /**
+    * 碎片融合的概率表
+    * @return \segment_ronghe
+    */
+    public static function segment_ronghe()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'segment_ronghe');
+    }
+    /**
+    * @return \sm_segment_ronghe segment_ronghe item数据 
+    */
+    public static function segment_ronghe_getItem($itemid)
+    { 
+        return self::get_hash_item('segment_ronghe', $itemid);
+    }
+    /**
+    * 碎片_按品质索引
+    * @return \segment_byPinzhi
+    */
+    public static function segment_byPinzhi()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'segment_byPinzhi');
+    }
+    /**
+    * @return \sm_segment_byPinzhi segment_byPinzhi item数据 
+    */
+    public static function segment_byPinzhi_getItem($quailty, $itemType)
+    { 
+        return self::get_hash_item('segment_byPinzhi', $quailty)->$itemType;
+    }
+    /**
+    * 宝箱经验卡掉落数据
+    * @return \boxJingYanCards
+    */
+    public static function boxJingYanCards()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'boxJingYanCards');
+    }
+    /**
+    * @return \sm_boxJingYanCards boxJingYanCards item数据 
+    */
+    public static function boxJingYanCards_getItem($itemid)
+    { 
+        return self::get_hash_item('boxJingYanCards', $itemid);
+    }
+    /**
+    * 活动: 在线礼包
+    * @return \activity_onlinegift
+    */
+    public static function activity_onlinegift()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'activity_onlinegift');
+    }
+    /**
+    * @return \sm_activity_onlinegift activity_onlinegift item数据 
+    */
+    public static function activity_onlinegift_getItem($itemid)
+    { 
+        return self::get_hash_item('activity_onlinegift', $itemid);
+    }
+    /**
+    * GM号的UID
+    * @return \GM_uids
+    */
+    public static function GM_uids()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'GM_uids');
+    }
+    /**
+    * 活动, 全服注册礼包
+    * @return \activity_reggift
+    */
+    public static function activity_reggift()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'activity_reggift');
+    }
+    /**
+    * @return \sm_activity_reggift activity_reggift item数据 
+    */
+    public static function activity_reggift_getItem($itemid)
+    { 
+        return self::get_hash_item('activity_reggift', $itemid);
+    }
+    /**
+    * 公会捐献卡牌奖励
+    * @return \guilddonatereward
+    */
+    public static function guilddonatereward()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'guilddonatereward');
+    }
+    /**
+    * @return \sm_guilddonatereward guilddonatereward item数据 
+    */
+    public static function guilddonatereward_getItem($itemid)
+    { 
+        return self::get_hash_item('guilddonatereward', $itemid);
+    }
+    /**
+    * 公会等级相关数据
+    * @return \guildlevel
+    */
+    public static function guildlevel()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'guildlevel');
+    }
+    /**
+    * @return \sm_guildlevel guildlevel item数据 
+    */
+    public static function guildlevel_getItem($itemid)
+    { 
+        return self::get_hash_item('guildlevel', $itemid);
+    }
+    /**
+    * 公会礼包
+    * @return \guildlibao
+    */
+    public static function guildlibao()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'guildlibao');
+    }
+    /**
+    * @return \sm_guildlibao guildlibao item数据 
+    */
+    public static function guildlibao_getItem($itemid)
+    { 
+        return self::get_hash_item('guildlibao', $itemid);
+    }
+    /**
+    * 玩家初始化数据
+    * @return \primordial_data
+    */
+    public static function primordial_data()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'primordial_data');
+    }
+    /**
+    * 英雄技能升级的限定
+    * @return \heroextra_skill_lv_limit
+    */
+    public static function heroextra_skill_lv_limit()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'heroextra_skill_lv_limit');
+    }
+    /**
+    * @return \sm_heroextra_skill_lv_limit heroextra_skill_lv_limit item数据 
+    */
+    public static function heroextra_skill_lv_limit_getItem($itemid)
+    { 
+        return self::get_hash_item('heroextra_skill_lv_limit', $itemid);
+    }
+    /**
+    * 武器类道具
+    * @return \item_weapon
+    */
+    public static function item_weapon()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_weapon');
+    }
+    /**
+    * @return \sm_item_weapon item_weapon item数据 
+    */
+    public static function item_weapon_getItem($itemid)
+    { 
+        return self::get_hash_item('item_weapon', $itemid);
+    }
+    /**
+    * 礼包类道具
+    * @return \item_package
+    */
+    public static function item_package()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_package');
+    }
+    /**
+    * @return \sm_item_package item_package item数据 
+    */
+    public static function item_package_getItem($itemid)
+    { 
+        return self::get_hash_item('item_package', $itemid);
+    }
+    /**
+    * 强化类道具
+    * @return \item_stones
+    */
+    public static function item_stones()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_stones');
+    }
+    /**
+    * @return \sm_item_stones item_stones item数据 
+    */
+    public static function item_stones_getItem($itemid)
+    { 
+        return self::get_hash_item('item_stones', $itemid);
+    }
+    /**
+    * 药水类道具
+    * @return \item_pills
+    */
+    public static function item_pills()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_pills');
+    }
+    /**
+    * @return \sm_item_pills item_pills item数据 
+    */
+    public static function item_pills_getItem($itemid)
+    { 
+        return self::get_hash_item('item_pills', $itemid);
+    }
+    /**
+    * buff类道具
+    * @return \item_buffcard
+    */
+    public static function item_buffcard()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_buffcard');
+    }
+    /**
+    * @return \sm_item_buffcard item_buffcard item数据 
+    */
+    public static function item_buffcard_getItem($itemid)
+    { 
+        return self::get_hash_item('item_buffcard', $itemid);
+    }
+    /**
+    * 碎片类道具
+    * @return \item_segment
+    */
+    public static function item_segment()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_segment');
+    }
+    /**
+    * @return \sm_item_segment item_segment item数据 
+    */
+    public static function item_segment_getItem($itemid)
+    { 
+        return self::get_hash_item('item_segment', $itemid);
+    }
+    /**
+    * 道具通用字段表
+    * @return \item_base
+    */
+    public static function item_base()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_base');
+    }
+    /**
+    * @return \sm_item_base item_base item数据 
+    */
+    public static function item_base_getItem($itemid)
+    { 
+        return self::get_hash_item('item_base', $itemid);
+    }
+    /**
+    * 子技能表
+    * @return \subSkill
+    */
+    public static function subSkill()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'subSkill');
+    }
+    /**
+    * @return \sm_subSkill subSkill item数据 
+    */
+    public static function subSkill_getItem($itemid)
+    { 
+        return self::get_hash_item('subSkill', $itemid);
+    }
+    /**
+    * 宝箱类道具
+    * @return \item_box
+    */
+    public static function item_box()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_box');
+    }
+    /**
+    * @return \sm_item_box item_box item数据 
+    */
+    public static function item_box_getItem($itemid)
+    { 
+        return self::get_hash_item('item_box', $itemid);
+    }
+    /**
+    * 关卡-通关条件
+    * @return \gate_passCondition
+    */
+    public static function gate_passCondition()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'gate_passCondition');
+    }
+    /**
+    * @return \sm_gate_passCondition gate_passCondition item数据 
+    */
+    public static function gate_passCondition_getItem($itemid)
+    { 
+        return self::get_hash_item('gate_passCondition', $itemid);
+    }
+    /**
+    * 元素相克关系表
+    * @return \attack_relation
+    */
+    public static function attack_relation()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'attack_relation');
+    }
+    /**
+    * @return \sm_attack_relation attack_relation item数据 
+    */
+    public static function attack_relation_getItem($attack1, $attack2)
+    { 
+        return self::get_hash_item('attack_relation', "$attack1-$attack2");
+    }
+    /**
+    * 战斗力榜全服突破奖励
+    * @return \rankreward_fpower
+    */
+    public static function rankreward_fpower()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'rankreward_fpower');
+    }
+    /**
+    * @return \sm_rankreward_fpower rankreward_fpower item数据 
+    */
+    public static function rankreward_fpower_getItem($itemid)
+    { 
+        return self::get_hash_item('rankreward_fpower', $itemid);
+    }
+    /**
+    * 合体技能
+    * @return \skill_cross
+    */
+    public static function skill_cross()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'skill_cross');
+    }
+    /**
+    * @return \sm_skill_cross skill_cross item数据 
+    */
+    public static function skill_cross_getItem($itemid)
+    { 
+        return self::get_hash_item('skill_cross', $itemid);
+    }
+    /**
+    * 通关榜突破奖励
+    * @return \rankreward_passgate
+    */
+    public static function rankreward_passgate()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'rankreward_passgate');
+    }
+    /**
+    * @return \sm_rankreward_passgate rankreward_passgate item数据 
+    */
+    public static function rankreward_passgate_getItem($itemid)
+    { 
+        return self::get_hash_item('rankreward_passgate', $itemid);
+    }
+    /**
+    * 言灵召唤书
+    * @return \item_yanlingbook
+    */
+    public static function item_yanlingbook()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'item_yanlingbook');
+    }
+    /**
+    * @return \sm_item_yanlingbook item_yanlingbook item数据 
+    */
+    public static function item_yanlingbook_getItem($itemid)
+    { 
+        return self::get_hash_item('item_yanlingbook', $itemid);
+    }
+    /**
+    * 言灵进阶表
+    * @return \yanling_upgrade
+    */
+    public static function yanling_upgrade()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'yanling_upgrade');
+    }
+    /**
+    * @return \sm_yanling_upgrade yanling_upgrade item数据 
+    */
+    public static function yanling_upgrade_getItem($typeId, $grade)
+    { 
+        return self::get_hash_item('yanling_upgrade', $typeId)->$grade;
+    }
+    /**
+    * 功能引导模块
+    * @return \guide_module
+    */
+    public static function guide_module()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'guide_module');
+    }
+    /**
+    * @return \sm_guide_module guide_module item数据 
+    */
+    public static function guide_module_getItem($itemid)
+    { 
+        return self::get_hash_item('guide_module', $itemid);
+    }
+    /**
+    * 当前版本(时间戳)
+    * @return \ver
+    */
+    public static function ver()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'ver', false);
+    }
+    /**
+    * 客户端配置数据
+    * @return \client
+    */
+    public static function client()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'client', false);
+    }
+}
+

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-09 15:04:23
+ // 日期: 2020-07-29 13:51:25
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-03 16:04:33
+ // 日期: 2020-08-03 09:49:47
 ////////////////////
 
 

+ 9 - 4
Gameserver/Amfphp/model/Const/sm_gate_starreward.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-02-12 08:04:55
+ // 日期: 2020-08-03 15:50:17
 ////////////////////
 
 
@@ -15,12 +15,17 @@ class sm_gate_starreward
 {
 
     /**
-    * @var Int32 用途未知!!请到数据库中添加字段注释。  
+    * @var Int32 章节id  
     */
-    public $id;
+    public $chapterId;
 
     /**
-    * @var String 星级  
+    * @var Int32 难度级别:1 普通, 2 困难, 3 精英. default(1) 
+    */
+    public $hardLevel;
+
+    /**
+    * @var Int32 星级  
     */
     public $star;
 

+ 63 - 0
Gameserver/Amfphp/model/Const/sm_guide_module.php

@@ -0,0 +1,63 @@
+<?php
+
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2020-08-04 18:21:40
+////////////////////
+
+
+/**
+ * Static Model guide_module 功能引导模块
+ */
+class sm_guide_module
+{
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。  
+    */
+    public $id;
+
+    /**
+    * @var UInt32 0强制 1非强制  
+    */
+    public $guidetype;
+
+    /**
+    * @var UInt32 唯一标识  
+    */
+    public $guideindex;
+
+    /**
+    * @var Int32 开始条件  
+    */
+    public $startevent;
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。  
+    */
+    public $endevent;
+
+    /**
+    * @var String 模块UI名称  
+    */
+    public $moduleName;
+
+    /**
+    * @var String 按钮组件路径  
+    */
+    public $cmptPath;
+
+    /**
+    * @var Int32 点击类型 0 按钮 1空白  
+    */
+    public $clickType;
+
+    /**
+    * @var String 引导语  
+    */
+    public $guideDesc;
+
+}
+

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-22 16:23:35
+ // 日期: 2020-08-05 15:16:02
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-27 15:50:08
+ // 日期: 2020-08-05 17:07:56
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-22 16:13:09
+ // 日期: 2020-07-29 17:28:45
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-24 11:21:34
+ // 日期: 2020-08-03 09:49:07
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-17 14:09:25
+ // 日期: 2020-08-05 10:47:46
 ////////////////////
 
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-17 13:46:56
+ // 日期: 2020-08-06 14:52:00
 ////////////////////
 
 
@@ -30,7 +30,7 @@ class sm_task_daily
     public $exp;
 
     /**
-    * @var Int32 完成任务后的奖励物品id,num;id,num default(0) 
+    * @var Int32 完成任务后的奖励活跃点数 default(0) 
     */
     public $activePoint;
 
@@ -75,7 +75,7 @@ class sm_task_daily
     public $canshu2;
 
     /**
-    * @var String 【废弃】奖励字符串""  
+    * @var String 【废弃】(为了和任务结构对齐,保留字段2020年8月3日15:32:03)  
     */
     public $reward;
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-29 08:50:21
+ // 日期: 2020-08-05 16:46:03
 ////////////////////
 
 

+ 7 - 0
Gameserver/Amfphp/model/User/UserGateDifficulty.php

@@ -43,6 +43,12 @@ class UserGateDifficulty extends Object_ext {
      */
     public $killedBoss;
 
+    /**
+     * 章节星数奖励
+     * @var { "chapterId":{"1":[],"2":[],"3":[]},"chapterId":{...}:.... }
+     */
+    public $chapterStarsRwd;
+
     function __construct($arg = null) {
         if (null === $arg) {
             $this->TotalNum = 0;
@@ -54,6 +60,7 @@ class UserGateDifficulty extends Object_ext {
             $this->elite = new UserGatesModel;
             $this->elite->initialize();
             $this->killedBoss = ArrayInit();
+            $this->chapterStarsRwd = ObjectInit();
         } else {
             parent::__construct($arg);
         }

+ 1 - 1
Gameserver/Amfphp/model/User/UserGatesModel.php

@@ -7,7 +7,7 @@ namespace loyalsoft;
  * 当前进度,体力,积分等等...
  * @author gwang
  */
-class UserGatesModel {
+class UserGatesModel extends Object_ext {
 
     /**
      * 最后一次挑战的关卡ID

+ 3 - 2
Gameserver/Amfphp/process/FightProc.php

@@ -24,9 +24,11 @@ class FightProc {
             case CmdCode::cmd_fight_arenasfight:                                # 6801 挑战关卡
                 return SweepGatesProc::Arenas_Fight($req);
             case CmdCode::cmd_fight_arenassweep:                                # [6802] 扫荡
-                Err(ErrCode::function_notopen_msg);                            # 暂未开放扫荡功能. -gwang 2020.4.20
+                Err(ErrCode::function_notopen_msg);                             # 暂未开放扫荡功能. -gwang 2020.4.20
                 return SweepGatesProc::Arenas_NewSweepFight($req);
 
+            case CmdCode::cmd_fight_GetArenasActiveReward:                      # 6806 领取章节星级奖励
+                return SweepGatesProc::DrawChapterStarsReward($req);
             // <editor-fold defaultstate="collapsed" desc="    玩家挑战    "> 
             case CmdCode::cmd_fight_GetChallengeAdversaryInfo:                  # 6803 获取挑战对手的信息
                 return PVPProc::GetChallengeAdversaryInfo($req);
@@ -35,7 +37,6 @@ class FightProc {
             case CmdCode::cmd_fight_GetChallengeLog:                            # 6805 拉取挑战记录
                 return PVPProc::GetChagllengeLog($req);
 
-
 // </editor-fold>
             //  <editor-fold defaultstate="collapsed" desc="   PVP 模块 681x ">
             case CmdCode::cmd_fight_pvp_maininfo:                               # [6810] 竞技场 主界面拉取信息

+ 4 - 3
Gameserver/Amfphp/process/FightProc/PVPProc.php

@@ -117,7 +117,8 @@ class PVPProc {
         $req->mem->zremrangebyrank($key_target, self::maxLogCount, -1);         # 保留50条数据
         // 暂无发放奖励流程
         // 更新每日任务
-        TaskProc::OnPvPWinN($num);
+        TaskProc::OnRankChalenge();
+        UserProc::updateUserInfo();
         // 返回
         return Resp::ok();                                                      # 返回成功
     }
@@ -369,7 +370,7 @@ class PVPProc {
             TaskProc::OnPvPScoreN($R_A);
         }
         $req->userInfo->game->pvp = $pvp;
-
+        TaskProc::OnPvp();                                                      # 每日PVP挑战即可
         UserProc::updateUserInfo();                                             # 回写数据
         // 写挑战记录
         $key_mine = MemKey_User::PVP_OffensiveLog_zset($zoneid, $uid);          # 我的主动挑战记录
@@ -421,7 +422,7 @@ class PVPProc {
         $costCash = $g->PVP_pk_ticket_price * $amt;                             # 计算消耗钻石
         my_Assert($costCash > 0, ErrCode::pvp_ticket_cost_ilegal);              # 定价数据异常
 
-        if (!UserGameModel::Consume_Cash($req->userInfo->game, $costCash)) {    # 扣除钻石失败
+        if (!UserGameModel::Consume_Cash($req->userInfo->game->baseInfo, $costCash)) {    # 扣除钻石失败
             return Resp::err(ErrCode::notenough_cash_msg);
         }
         $pvp->fightTicket += $amt;                                              # 发放挑战票

+ 108 - 16
Gameserver/Amfphp/process/FightProc/SweepGatesProc.php

@@ -30,12 +30,9 @@ class SweepGatesProc {
      * @param req $req
      */
     public static function Arenas_preFight($req) {
-        list($gateId, $difficulty) = $req->paras;                               # 提取参数
-
+        list($gateId, $difficulty) = $req->paras;                               # 提取参数 
         my_Assert($gateId > 0, "关卡id非法");
-        echoLine("TTWW");
-        $isFirst = self::isFirstChallenge($req, $gateId, $difficulty);          # 是否首次通关
-
+        $isFirst = self::isFirstChallenge($req, $gateId, $difficulty);          # 是否首次通关 
         $smGate = GameConfig::gate_getItem($gateId);                            # 关卡配置数据
         $i = $difficulty + 1;                                                   # 按三个难度取不同的值.
 //        $tili = self::getProperty_n($smGate, "tili", $i);                     # 体力暂时未用上
@@ -61,18 +58,76 @@ class SweepGatesProc {
                 $arr[] = sprintf("%s,%s", $k, $v);
             }
         }
-//        var_dump($isFirst);
         $_rewards = implode(";", $arr);                                         # 最终奖励字符串
         $redis_key = MemKey_User::temp_arenas_pre_reward_md5_str($req->zoneid, $req->uid);
-//        var_dump($gateId . $difficulty . $_rewards);
         $md5 = md5($gateId . $difficulty . $_rewards);
         $req->mem->set($redis_key, $md5, 86400);                                # 有效期一天,有新的就覆盖
         return Resp::ok(array("r" => $_rewards));                                             # 返回奖励字符串
-        // 生成奖励串, 写入redis一个md5(过期时间1day)
-        // 奖励串返回客户端
-        //客户端根据奖励串展示奖励
-        // 最后再将奖励串通过挑战接口返回给服务端,
-        // 服务端计算奖励传的md5并与redis中的md5做对比.(这里最好采用字段排序后的字符串或者啥的,避免中间因json序列化/反序列化时改变字符串)
+// 生成奖励串, 写入redis一个md5(过期时间1day)
+// 奖励串返回客户端
+//客户端根据奖励串展示奖励
+// 最后再将奖励串通过挑战接口返回给服务端,
+// 服务端计算奖励传的md5并与redis中的md5做对比.(这里最好采用字段排序后的字符串或者啥的,避免中间因json序列化/反序列化时改变字符串)
+    }
+
+    /**
+     * [6806] 领取章节星数奖励
+     * @param req $req
+     */
+    public static function DrawChapterStarsReward($req) {
+        list($chapterId, $hard, $stars) = $req->paras;                          # 参数: 章节id, 难度, 分数
+        $hard = $hard + 1;
+        $userGates = new UserGateDifficulty($req->userInfo->game->gates);
+        if (!property_exists($userGates->chapterStarsRwd . $chapterId)) {       # 防御第一次读取本章节数据
+            $userGates->chapterStarsRwd->$chapterId = ObjectInit();
+        }
+        $chapterInfo = $userGates->chapterStarsRwd->$chapterId;                 # 本章节数据
+        if (!property_exists($chapterInfo, $hard)) {                            # 防御当前难度数据未创建
+            $chapterInfo->$hard = array();
+        }
+        $starsArr = $chapterInfo->$hard;                                        # 当前章节,当前难度的领取记录 
+        my_Assert(!in_array($stars, $starsArr), ErrCode::err_arenas_hasgetstarreward); # 奖励已领取
+        $rwdCfgArr = GameConfig::gate_starreward_getItem($chapterId, $hard);    # 奖励配置数组
+//        isEditor() and $starCfg = new \sm_gate_starreward;
+//        var_dump($rwdCfgArr);
+        $starCfg = StlUtil::arrayFind($rwdCfgArr, function ($v, $k)use($stars) { # 在数组中查找到对应星数的奖励
+                    return ($v->star == $stars);
+                });
+//        var_dump($starCfg);
+        my_Assert(null != $starCfg, ErrCode::err_arenas_starreward_const_no);   # 找不到指定星数的配置数据
+        $sumOfStars = 0;
+        $userGateL = null;
+        switch ($hard) {                                                        # 取不同难度数据记录
+            case 1:
+                $userGateL = new UserGatesModel($userGates->normal);
+                break;
+            case 2:
+                $userGateL = new UserGatesModel($userGates->hard);
+                break;
+            case 3:
+                $userGateL = new UserGatesModel($userGates->elite);
+                break;
+            default:
+                break;
+        }
+        my_Assert(null != $userGateL, ErrCode::err_innerfault);                 # 玩家数据有问题
+//        var_dump($userGateL);
+        array_walk($userGateL->gates, function($v, $k)use(&$sumOfStars) {       # 累加星数
+            $sinfo = new GateStar($v->star);
+            $sumOfStars += $sinfo->Stars();
+        });
+//        var_dump($sumOfStars);
+        my_Assert($stars <= $sumOfStars, ErrCode::err_arenas_starreward_starNotEnough); # 星数未达标
+        StoreProc::AddMultiItemInStore($req, $starCfg->reward);                 # 发放奖励
+        $starsArr[] = $stars;                                                   # 领奖记录
+        $userGates->chapterStarsRwd->$chapterId->$hard = $starsArr;             # 回写数据
+        $req->userInfo->game->gates = $userGates;
+//        var_dump($userGates);
+        UserProc::updateUserInfo();
+        return Resp::ok(array("store" => $req->userInfo->game->store,
+                    'gold' => $gold,
+                    'cash' => req()->userInfo->game->baseInfo->cash
+        ));         # 返回值  
     }
 
     /**
@@ -80,7 +135,6 @@ class SweepGatesProc {
      * @param Req $req 
      */
     public static function Arenas_Fight($req) {
-//        Err(ErrCode::err_innerfault, "这里需要修改逻辑, 放一个奖励字段预算接口,战斗开始前就先确定掉落字符串,含红蓝瓶,红蓝瓶无需带出战场/放入背包");
         list($gateId, $difficulty, $star, $TeamObj, $rewardStr, $_killedbossId) = $req->paras;  # 提取参数: 挑战的关卡Id, 关卡难度(0,1,2), 几星, 队伍, 奖励字符串
         my_Assert($gateId > 0, ErrCode::err_arenasgate_indexillegal);           # 关卡id非法
         $md5 = $req->mem->get(MemKey_User::temp_arenas_pre_reward_md5_str($req->zoneid, $req->uid));
@@ -120,7 +174,7 @@ class SweepGatesProc {
         UserGameModel::Add_Gold($req->userInfo->game->baseInfo, $gold);                   # 发金币
         UserGameModel::Add_Exp($req->userInfo->game->baseInfo, $exp);                     # 给玩家(指挥官)增加经验
         UserProc::updateUserInfo();                                             # 回写玩家数据.
-        #
+#
         TaskProc::OnPassGateN($gateId, $difficulty);
 //        var_dump($rewardArr);
         $result = array(
@@ -300,7 +354,7 @@ class SweepGatesProc {
         $req->userInfo->game->gates->TotalNum++;                                # 更新战斗次数统计
         $req->userInfo->game->gates->Times++;
 
-        // 按照概率规则发放奖品
+// 按照概率规则发放奖品
         $rewardsArr = explode(";", $reward);
         $rwds = array();
         foreach ($rewardsArr as $r) {
@@ -595,7 +649,7 @@ class SweepGatesProc {
 //    public static function ClearGateForeverGold_FightCountEveryDay($req) {
 //        $req->userInfo->game->gates->forever_Gold_FightTimes = 0;
 //    }
-    // </editor-fold>
+// </editor-fold>
 //
 // <editor-fold defaultstate="collapsed" desc="    副本    ">
 //
@@ -881,3 +935,41 @@ class SweepGatesProc {
 // </editor-fold>
 //
 }
+
+/// <summary>
+/// 任务/挑战目标达成记录(三星评价)
+/// </summary>
+/// <author>gwang</author>
+class GateStar {
+
+/// <summary>
+/// 根据后台记录的数值构造(反向提供给前端显示层)
+/// </summary>
+/// <param name="i"></param>
+    public function __construct($i) {
+        $this->S1 = ($i & 1) > 0;
+        $this->S2 = ($i & 2) > 0;
+        $this->S3 = ($i & 4) > 0;
+    }
+
+/// <summary>
+/// 第一个目标达成
+/// </summary>
+    public $S1;
+/// <summary>
+/// 第二个目标达成
+/// </summary>
+    public $S2;
+/// <summary>
+/// 第三个目标达成
+/// </summary>
+    public $S3;
+
+/// <summary>
+/// 统计总星数
+/// </summary>
+    public function Stars() {
+        return ($this->S3 ? 1 : 0) + ($this->S2 ? 1 : 0) + ($this->S1 ? 1 : 0);
+    }
+
+}

+ 4 - 1
Gameserver/Amfphp/process/HeroProc.php

@@ -191,6 +191,7 @@ class HeroProc {
                 GameConfig::hero_getItem($upHero->typeId)->name, $upHero->grade);
         self::CalcUserFightPower($req->zoneid, $req->uid, $req->userInfo->game); # 跟新战力统计
         TaskProc::OnHeroGradeUp($upHero->typeId, $upHero->grade);
+        var_dump($user->task->taskListDaily);
         return $resp;
     }
 
@@ -230,8 +231,10 @@ class HeroProc {
         if ($targetHero->xp < 0) {
             Err(ErrCode::err_innerfault, "英雄经验出错");
         } else {
-            UserProc::updateUserInfo();                                             # 回写玩家数据
+            UserProc::updateUserInfo();                                         # 回写玩家数据
+            TaskProc::OnHeroImprove();
         }
+//        var_dump($user->task->taskListDaily);
         self::CalcUserFightPower($req->zoneid, $req->uid, $req->userInfo->game); # 跟新战力统计
         return Resp::ok($targetHero);
     }

+ 3 - 0
Gameserver/Amfphp/process/StoreProc.php

@@ -389,6 +389,9 @@ class StoreProc {
                 case META_PVPCOIN_ITEMID:                                       # 竞技币
                     $user->pvp->pvpCoins += $num;
                     break;
+                case META_ActivePoint_ITEMID:
+                    $user->task->dailyActivePoint += $num;                      # 每日任务活跃点
+                    break;
                 case 101:                                                       # 武器 
                     StoreProc::PutEquipInStore($itemId, $req);
                     break;

+ 6 - 4
Gameserver/Amfphp/process/TaskProc.php

@@ -38,7 +38,7 @@ class TaskProc {
         // 判断尚未领取
         my_Assert(!in_array($num, $userTask->dailyActiveGetedRewardArr), ErrCode::task_reward_geted);
         // 判断活跃点数足够
-        my_Assert($userTask->dailyActivePoint > $num, ErrCode::task_activePoint_notenough);
+        my_Assert($userTask->dailyActivePoint >= $num, ErrCode::task_activePoint_notenough);
         // 按照配置发放奖励
         $ok = StoreProc::AddMultiItemInStore($req, $rewardCfg->reward);
         my_Assert($ok == ErrCode::ok, $ok);                                     # 发放成功
@@ -116,7 +116,7 @@ class TaskProc {
                 my_Assert($task->rewardGeted < 1, ErrCode::task_reward_geted);          # 奖励不可重复领取
                 $taskCfg = GameConfig::task_daily_getItem($taskId);                     # 任务配置数据
                 my_Assert($taskCfg != null, ErrCode::err_const_no);
-                UserGameModel::Add_Exp($taskCfg->exp, $req->userInfo->game->baseInfo);  # 发放任务奖励
+                UserGameModel::Add_Exp($req->userInfo->game->baseInfo, $taskCfg->exp);  # 发放任务奖励 
                 $userTask->dailyActivePoint += $taskCfg->activePoint;
                 $task->rewardGeted = 1;
                 $userTask->taskListDaily->$taskId = $task;                      # 回存下
@@ -270,6 +270,7 @@ class TaskProc {
     static function OnHeroGradeUp($heroMoId, $newGrade) {
         $taskParam = new TaskParams(EnumTaskType::HeroGradeUpTo, $heroMoId, $newGrade);
         self::CheckTaskConditions($taskParam);
+        self::OnHeroImprove();
     }
 
     /**
@@ -300,6 +301,7 @@ class TaskProc {
     static function OnPassGateN($gateId, $difficulty) {
         $taskParam = new TaskParams(EnumTaskType::PassGateN, $gateId, $difficulty);
         self::CheckTaskConditions($taskParam);
+        self::OnPassGate();
     }
 
     /**
@@ -363,7 +365,7 @@ class TaskProc {
     }
 
     /**
-     * 英雄强化(升级或升阶)n次
+     * 每日:英雄强化(升级或升阶)n次
      */
     static function OnHeroImprove() {
         $taskParam = new TaskParams(EnumTaskType::DailyHeroImprove);
@@ -371,7 +373,7 @@ class TaskProc {
     }
 
     /**
-     * 剧情关卡,胜利n次
+     * 每日:剧情关卡,胜利n次
      */
     static function OnPassGate() {
         $taskParam = new TaskParams(EnumTaskType::DailyGatesWin);

+ 15 - 0
Gameserver/Amfphp/util/StlUtil.php

@@ -234,6 +234,21 @@ class StlUtil {
         };
     }
 
+    /**
+     * 在数组中查找第一个符合条件的值
+     * @param mixed $array
+     * @param bool $closure 是否符合条件的判断方法
+     * @return type
+     */
+    public static function arrayFind($array, $closure) {
+        foreach ($array as $key => $value) {
+            if ($closure($value, $key)) {
+                return $value;
+            }
+        }
+        return null;
+    }
+
     /**
      * 辅助方法,将关联数组转换成class
      * @param type $assocArray

+ 4 - 4
Gameserver/nbproject/private/private.xml

@@ -12,16 +12,16 @@
     </editor-bookmarks>
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
         <group>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/configs/GameConfig.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/UserHeroModel.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/HeroProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/util/CLog.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/base/ErrCode.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/FightProc.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/UserGateDifficulty.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/StoreProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/base/CmdCode.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/TaskProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/UserGameModel.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/UserProc.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/UserGameHeroModel.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/FightProc/SweepGatesProc.php</file>
         </group>
     </open-files>
 </project-private>