Sfoglia il codice sorgente

Merge branch 'dev' of http://ylsjtt.game7000.com:3000/YLSJ/jzhj2024server into dev

王刚 11 mesi fa
parent
commit
c413b796f1

+ 20 - 2
Gameserver/App/base/CmdCode.php

@@ -231,9 +231,9 @@ class CmdCode {
     const hero_unlock = 6602;
     const hero_unlock = 6602;
 
 
     /**
     /**
-     * 购买角色
+     * 角色升星
      */
      */
-    const hero_buy = 6603;
+    const hero_strengthenStar = 6603;
     //
     //
 // </editor-fold>
 // </editor-fold>
     // <editor-fold defaultstate="collapsed" desc="邮件操作码 - 67xx">
     // <editor-fold defaultstate="collapsed" desc="邮件操作码 - 67xx">
@@ -359,6 +359,24 @@ class CmdCode {
     const fight_rank_IsExistRankReward = 6817;
     const fight_rank_IsExistRankReward = 6817;
 
 
     // </editor-fold>
     // </editor-fold>
+    
+    // <editor-fold defaultstate="collapsed" desc="系统操作码 - 69xx">
+    
+    /**
+     * 6901 心跳
+     */
+    const cmd_system_clienttick = 6901;
+
+
+    /**
+     * 拉取系统广播消息
+     */
+    const cmd_system_getsysmessage = 6902;
+    
+    
+    
+    // </editor-fold>
+    
     // <editor-fold defaultstate="collapsed" desc="    反射方法    ">
     // <editor-fold defaultstate="collapsed" desc="    反射方法    ">
 
 
     /**
     /**

+ 427 - 414
Gameserver/App/configs/GameConfig.php

@@ -1,41 +1,38 @@
 <?php
 <?php
-
 ////////////////////
 ////////////////////
-// 由CodeGenerator创建。
-// Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
-// author: gwang
-// 日期: 2024-06-07 15:50:47
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2024-06-18 14:38:55
 ////////////////////
 ////////////////////
 
 
 namespace loyalsoft;
 namespace loyalsoft;
 
 
 /**
 /**
- * 常量配置数据
+ * 常量配置数据 
  */
  */
 class GameConfig {
 class GameConfig {
-// <editor-fold defaultstate="collapsed" desc="  基础代码 ">
-
+// <editor-fold defaultstate="collapsed" desc="  基础代码 ">    
     /**
     /**
-     * 是否启用codegen
+     * 是否启用codegen 
      */
      */
-    private static function isCG() {
-        return defined('CodeGen_Enabled') && CodeGen_Enabled;
+    private static function isCG()  {
+        return defined('CodeGen_Enabled') && CodeGen_Enabled; 
     }
     }
-
     /**
     /**
      * @var bool 分区是否使用独立的常量配置数据
      * @var bool 分区是否使用独立的常量配置数据
      */
      */
     private static $useZoneId = false;
     private static $useZoneId = false;
-
     /**
     /**
      * 追加分区列表字符串
      * 追加分区列表字符串
      * @return string
      * @return string
      */
      */
-    private static function zoneid() {
+    private static function zoneid()
+    {
         global $zoneid;
         global $zoneid;
         return self::$useZoneId ? "-zone$zoneid" : "";
         return self::$useZoneId ? "-zone$zoneid" : "";
     }
     }
-
+	
     /**
     /**
      * @return ClientVersion
      * @return ClientVersion
      */
      */
@@ -87,641 +84,657 @@ class GameConfig {
         }
         }
         return null;
         return null;
     }
     }
-
 // </editor-fold>
 // </editor-fold>
-
     /**
     /**
-     * 全局参数
-     * @return \sm_globalsettings
-     */
-    public static function globalsettings() {
-        static $a = null;
+    * 全局参数
+    * @return \globalsettings
+    */
+    public static function globalsettings()
+    { 
+        static $a = null; 
         return self::initValue($a, 'globalsettings');
         return self::initValue($a, 'globalsettings');
     }
     }
-
     /**
     /**
-     * 停服计划
-     * @return \service_schedule
-     */
-    public static function service_schedule() {
-        static $a = null;
+    * 停服计划
+    * @return \service_schedule
+    */
+    public static function service_schedule()
+    { 
+        static $a = null; 
         return self::initValue($a, 'service_schedule');
         return self::initValue($a, 'service_schedule');
     }
     }
-
     /**
     /**
-     * @return \sm_service_schedule service_schedule item数据
-     */
-    public static function service_schedule_getItem($itemid) {
+    * @return \sm_service_schedule service_schedule item数据 
+    */
+    public static function service_schedule_getItem($itemid)
+    { 
         return self::get_hash_item('service_schedule', $itemid);
         return self::get_hash_item('service_schedule', $itemid);
     }
     }
-
     /**
     /**
-     * 道具表
-     * @return \item
-     */
-    public static function item() {
-        static $a = null;
+    * 道具表
+    * @return \item
+    */
+    public static function item()
+    { 
+        static $a = null; 
         return self::initValue($a, 'item');
         return self::initValue($a, 'item');
     }
     }
-
     /**
     /**
-     * @return \sm_item item item数据
-     */
-    public static function item_getItem($itemid) {
+    * @return \sm_item item item数据 
+    */
+    public static function item_getItem($itemid)
+    { 
         return self::get_hash_item('item', $itemid);
         return self::get_hash_item('item', $itemid);
     }
     }
-
     /**
     /**
-     * 系统邮件
-     * @return \sysmail
-     */
-    public static function sysmail() {
-        static $a = null;
+    * 系统邮件
+    * @return \sysmail
+    */
+    public static function sysmail()
+    { 
+        static $a = null; 
         return self::initValue($a, 'sysmail');
         return self::initValue($a, 'sysmail');
     }
     }
-
     /**
     /**
-     * @return \sm_sysmail sysmail item数据
-     */
-    public static function sysmail_getItem($itemid) {
+    * @return \sm_sysmail sysmail item数据 
+    */
+    public static function sysmail_getItem($itemid)
+    { 
         return self::get_hash_item('sysmail', $itemid);
         return self::get_hash_item('sysmail', $itemid);
     }
     }
-
     /**
     /**
-     * 客户端版本信息
-     * @return \clientVersionHistory
-     */
-    public static function clientVersionHistory() {
-        static $a = null;
+    * 客户端版本信息
+    * @return \clientVersionHistory
+    */
+    public static function clientVersionHistory()
+    { 
+        static $a = null; 
         return self::initValue($a, 'clientVersionHistory');
         return self::initValue($a, 'clientVersionHistory');
     }
     }
-
     /**
     /**
-     * @return \sm_clientVersionHistory clientVersionHistory item数据
-     */
-    public static function clientVersionHistory_getItem($itemid) {
+    * @return \sm_clientVersionHistory clientVersionHistory item数据 
+    */
+    public static function clientVersionHistory_getItem($itemid)
+    { 
         return self::get_hash_item('clientVersionHistory', $itemid);
         return self::get_hash_item('clientVersionHistory', $itemid);
     }
     }
-
     /**
     /**
-     * 错误信息表
-     * @return \errmsg
-     */
-    public static function errmsg() {
-        static $a = null;
+    * 错误信息表
+    * @return \errmsg
+    */
+    public static function errmsg()
+    { 
+        static $a = null; 
         return self::initValue($a, 'errmsg');
         return self::initValue($a, 'errmsg');
     }
     }
-
     /**
     /**
-     * @return \sm_errmsg errmsg item数据
-     */
-    public static function errmsg_getItem($itemid) {
+    * @return \sm_errmsg errmsg item数据 
+    */
+    public static function errmsg_getItem($itemid)
+    { 
         return self::get_hash_item('errmsg', $itemid);
         return self::get_hash_item('errmsg', $itemid);
     }
     }
-
     /**
     /**
-     * 战斗: 波次表
-     * @return \waves
-     */
-    public static function waves() {
-        static $a = null;
+    * 战斗: 波次表
+    * @return \waves
+    */
+    public static function waves()
+    { 
+        static $a = null; 
         return self::initValue($a, 'waves');
         return self::initValue($a, 'waves');
     }
     }
-
     /**
     /**
-     * @return \sm_waves waves itemArray
-     */
-    public static function waves_getItemArray($key) {
+    * @return \sm_waves waves itemArray 
+    */
+    public static function waves_getItemArray($key)
+    { 
         return self::get_hash_item('waves', $key);
         return self::get_hash_item('waves', $key);
     }
     }
-
     /**
     /**
-     * 活动: 七日签到
-     * @return \activity_day7
-     */
-    public static function activity_day7() {
-        static $a = null;
+    * 活动: 七日签到
+    * @return \activity_day7
+    */
+    public static function activity_day7()
+    { 
+        static $a = null; 
         return self::initValue($a, 'activity_day7');
         return self::initValue($a, 'activity_day7');
     }
     }
-
     /**
     /**
-     * @return \sm_activity_day7 activity_day7 item数据
-     */
-    public static function activity_day7_getItem($itemid) {
+    * @return \sm_activity_day7 activity_day7 item数据 
+    */
+    public static function activity_day7_getItem($itemid)
+    { 
         return self::get_hash_item('activity_day7', $itemid);
         return self::get_hash_item('activity_day7', $itemid);
     }
     }
-
     /**
     /**
-     * 章节表
-     * @return \gate
-     */
-    public static function gate() {
-        static $a = null;
+    * 章节表
+    * @return \gate
+    */
+    public static function gate()
+    { 
+        static $a = null; 
         return self::initValue($a, 'gate');
         return self::initValue($a, 'gate');
     }
     }
-
     /**
     /**
-     * @return \sm_gate gate item数据
-     */
-    public static function gate_getItem($itemid) {
+    * @return \sm_gate gate item数据 
+    */
+    public static function gate_getItem($itemid)
+    { 
         return self::get_hash_item('gate', $itemid);
         return self::get_hash_item('gate', $itemid);
     }
     }
-
     /**
     /**
-     * 角色
-     * @return \hero
-     */
-    public static function hero() {
-        static $a = null;
+    * 角色
+    * @return \hero
+    */
+    public static function hero()
+    { 
+        static $a = null; 
         return self::initValue($a, 'hero');
         return self::initValue($a, 'hero');
     }
     }
-
     /**
     /**
-     * @return \sm_hero hero item数据
-     */
-    public static function hero_getItem($itemid) {
+    * @return \sm_hero hero item数据 
+    */
+    public static function hero_getItem($itemid)
+    { 
         return self::get_hash_item('hero', $itemid);
         return self::get_hash_item('hero', $itemid);
     }
     }
-
     /**
     /**
-     * 装备表
-     * @return \equip
-     */
-    public static function equip() {
-        static $a = null;
+    * 装备表
+    * @return \equip
+    */
+    public static function equip()
+    { 
+        static $a = null; 
         return self::initValue($a, 'equip');
         return self::initValue($a, 'equip');
     }
     }
-
     /**
     /**
-     * @return \sm_equip equip item数据
-     */
-    public static function equip_getItem($itemid) {
+    * @return \sm_equip equip item数据 
+    */
+    public static function equip_getItem($itemid)
+    { 
         return self::get_hash_item('equip', $itemid);
         return self::get_hash_item('equip', $itemid);
     }
     }
-
     /**
     /**
-     * 装备升级表
-     * @return \equip_levelupgrade
-     */
-    public static function equip_levelupgrade() {
-        static $a = null;
+    * 装备升级表
+    * @return \equip_levelupgrade
+    */
+    public static function equip_levelupgrade()
+    { 
+        static $a = null; 
         return self::initValue($a, 'equip_levelupgrade');
         return self::initValue($a, 'equip_levelupgrade');
     }
     }
-
     /**
     /**
-     * @return \sm_equip_levelupgrade equip_levelupgrade item数据
-     */
-    public static function equip_levelupgrade_getItem($itemid) {
+    * @return \sm_equip_levelupgrade equip_levelupgrade item数据 
+    */
+    public static function equip_levelupgrade_getItem($itemid)
+    { 
         return self::get_hash_item('equip_levelupgrade', $itemid);
         return self::get_hash_item('equip_levelupgrade', $itemid);
     }
     }
-
     /**
     /**
-     * 章节礼包表
-     * @return \shop_gategift
-     */
-    public static function shop_gategift() {
-        static $a = null;
+    * 章节礼包表
+    * @return \shop_gategift
+    */
+    public static function shop_gategift()
+    { 
+        static $a = null; 
         return self::initValue($a, 'shop_gategift');
         return self::initValue($a, 'shop_gategift');
     }
     }
-
     /**
     /**
-     * @return \sm_shop_gategift shop_gategift item数据
-     */
-    public static function shop_gategift_getItem($itemid) {
+    * @return \sm_shop_gategift shop_gategift item数据 
+    */
+    public static function shop_gategift_getItem($itemid)
+    { 
         return self::get_hash_item('shop_gategift', $itemid);
         return self::get_hash_item('shop_gategift', $itemid);
     }
     }
-
     /**
     /**
-     * 每日商店
-     * @return \shop_daily
-     */
-    public static function shop_daily() {
-        static $a = null;
+    * 每日商店
+    * @return \shop_daily
+    */
+    public static function shop_daily()
+    { 
+        static $a = null; 
         return self::initValue($a, 'shop_daily');
         return self::initValue($a, 'shop_daily');
     }
     }
-
     /**
     /**
-     * @return \sm_shop_daily shop_daily item数据
-     */
-    public static function shop_daily_getItem($itemid) {
+    * @return \sm_shop_daily shop_daily item数据 
+    */
+    public static function shop_daily_getItem($itemid)
+    { 
         return self::get_hash_item('shop_daily', $itemid);
         return self::get_hash_item('shop_daily', $itemid);
     }
     }
-
     /**
     /**
-     * 钻石商店
-     * @return \shop_cash
-     */
-    public static function shop_cash() {
-        static $a = null;
+    * 钻石商店
+    * @return \shop_cash
+    */
+    public static function shop_cash()
+    { 
+        static $a = null; 
         return self::initValue($a, 'shop_cash');
         return self::initValue($a, 'shop_cash');
     }
     }
-
     /**
     /**
-     * @return \sm_shop_cash shop_cash item数据
-     */
-    public static function shop_cash_getItem($itemid) {
+    * @return \sm_shop_cash shop_cash item数据 
+    */
+    public static function shop_cash_getItem($itemid)
+    { 
         return self::get_hash_item('shop_cash', $itemid);
         return self::get_hash_item('shop_cash', $itemid);
     }
     }
-
     /**
     /**
-     * 金币商店
-     * @return \shop_gold
-     */
-    public static function shop_gold() {
-        static $a = null;
+    * 金币商店
+    * @return \shop_gold
+    */
+    public static function shop_gold()
+    { 
+        static $a = null; 
         return self::initValue($a, 'shop_gold');
         return self::initValue($a, 'shop_gold');
     }
     }
-
     /**
     /**
-     * @return \sm_shop_gold shop_gold item数据
-     */
-    public static function shop_gold_getItem($itemid) {
+    * @return \sm_shop_gold shop_gold item数据 
+    */
+    public static function shop_gold_getItem($itemid)
+    { 
         return self::get_hash_item('shop_gold', $itemid);
         return self::get_hash_item('shop_gold', $itemid);
     }
     }
-
     /**
     /**
-     * 商城供给表-应该是废弃了
-     * @return \shop_supply
-     */
-    public static function shop_supply() {
-        static $a = null;
+    * 商城供给表-应该是废弃了
+    * @return \shop_supply
+    */
+    public static function shop_supply()
+    { 
+        static $a = null; 
         return self::initValue($a, 'shop_supply');
         return self::initValue($a, 'shop_supply');
     }
     }
-
     /**
     /**
-     * @return \sm_shop_supply shop_supply item数据
-     */
-    public static function shop_supply_getItem($itemid) {
+    * @return \sm_shop_supply shop_supply item数据 
+    */
+    public static function shop_supply_getItem($itemid)
+    { 
         return self::get_hash_item('shop_supply', $itemid);
         return self::get_hash_item('shop_supply', $itemid);
     }
     }
-
     /**
     /**
-     * 词条配置表
-     * @return \predicate
-     */
-    public static function predicate() {
-        static $a = null;
+    * 词条配置表
+    * @return \predicate
+    */
+    public static function predicate()
+    { 
+        static $a = null; 
         return self::initValue($a, 'predicate');
         return self::initValue($a, 'predicate');
     }
     }
-
     /**
     /**
-     * @return \sm_predicate predicate item数据
-     */
-    public static function predicate_getItem($itemid) {
+    * @return \sm_predicate predicate item数据 
+    */
+    public static function predicate_getItem($itemid)
+    { 
         return self::get_hash_item('predicate', $itemid);
         return self::get_hash_item('predicate', $itemid);
     }
     }
-
     /**
     /**
-     * 商城军备
-     * @return \shop_junbei
-     */
-    public static function shop_junbei() {
-        static $a = null;
+    * 商城军备
+    * @return \shop_junbei
+    */
+    public static function shop_junbei()
+    { 
+        static $a = null; 
         return self::initValue($a, 'shop_junbei');
         return self::initValue($a, 'shop_junbei');
     }
     }
-
     /**
     /**
-     * @return \sm_shop_junbei shop_junbei item数据
-     */
-    public static function shop_junbei_getItem($itemid) {
+    * @return \sm_shop_junbei shop_junbei item数据 
+    */
+    public static function shop_junbei_getItem($itemid)
+    { 
         return self::get_hash_item('shop_junbei', $itemid);
         return self::get_hash_item('shop_junbei', $itemid);
     }
     }
-
     /**
     /**
-     * 进化表
-     * @return \evolve
-     */
-    public static function evolve() {
-        static $a = null;
+    * 进化表
+    * @return \evolve
+    */
+    public static function evolve()
+    { 
+        static $a = null; 
         return self::initValue($a, 'evolve');
         return self::initValue($a, 'evolve');
     }
     }
-
     /**
     /**
-     * @return \sm_evolve evolve item数据
-     */
-    public static function evolve_getItem($itemid) {
+    * @return \sm_evolve evolve item数据 
+    */
+    public static function evolve_getItem($itemid)
+    { 
         return self::get_hash_item('evolve', $itemid);
         return self::get_hash_item('evolve', $itemid);
     }
     }
-
     /**
     /**
-     * 7日签到累计
-     * @return \active_day7_accumulate
-     */
-    public static function active_day7_accumulate() {
-        static $a = null;
+    * 7日签到累计
+    * @return \active_day7_accumulate
+    */
+    public static function active_day7_accumulate()
+    { 
+        static $a = null; 
         return self::initValue($a, 'active_day7_accumulate');
         return self::initValue($a, 'active_day7_accumulate');
     }
     }
-
     /**
     /**
-     * @return \sm_active_day7_accumulate active_day7_accumulate item数据
-     */
-    public static function active_day7_accumulate_getItem($itemid) {
+    * @return \sm_active_day7_accumulate active_day7_accumulate item数据 
+    */
+    public static function active_day7_accumulate_getItem($itemid)
+    { 
         return self::get_hash_item('active_day7_accumulate', $itemid);
         return self::get_hash_item('active_day7_accumulate', $itemid);
     }
     }
-
     /**
     /**
-     * 宝石表
-     * @return \gem
-     */
-    public static function gem() {
-        static $a = null;
+    * 宝石表
+    * @return \gem
+    */
+    public static function gem()
+    { 
+        static $a = null; 
         return self::initValue($a, 'gem');
         return self::initValue($a, 'gem');
     }
     }
-
     /**
     /**
-     * @return \sm_gem gem item数据
-     */
-    public static function gem_getItem($itemid) {
+    * @return \sm_gem gem item数据 
+    */
+    public static function gem_getItem($itemid)
+    { 
         return self::get_hash_item('gem', $itemid);
         return self::get_hash_item('gem', $itemid);
     }
     }
-
     /**
     /**
-     * 秘宝表
-     * @return \gate_sbox
-     */
-    public static function gate_sbox() {
-        static $a = null;
+    * 秘宝表
+    * @return \gate_sbox
+    */
+    public static function gate_sbox()
+    { 
+        static $a = null; 
         return self::initValue($a, 'gate_sbox');
         return self::initValue($a, 'gate_sbox');
     }
     }
-
     /**
     /**
-     * @return \sm_gate_sbox gate_sbox itemArray
-     */
-    public static function gate_sbox_getItemArray($key) {
+    * @return \sm_gate_sbox gate_sbox itemArray 
+    */
+    public static function gate_sbox_getItemArray($key)
+    { 
         return self::get_hash_item('gate_sbox', $key);
         return self::get_hash_item('gate_sbox', $key);
     }
     }
-
     /**
     /**
-     * 最新的成就
-     * @return \achieve_new
-     */
-    public static function achieve_new() {
-        static $a = null;
+    * 最新的成就
+    * @return \achieve_new
+    */
+    public static function achieve_new()
+    { 
+        static $a = null; 
         return self::initValue($a, 'achieve_new');
         return self::initValue($a, 'achieve_new');
     }
     }
-
     /**
     /**
-     * @return \sm_achieve_new achieve_new item数据
-     */
-    public static function achieve_new_getItem($itemid) {
+    * @return \sm_achieve_new achieve_new item数据 
+    */
+    public static function achieve_new_getItem($itemid)
+    { 
         return self::get_hash_item('achieve_new', $itemid);
         return self::get_hash_item('achieve_new', $itemid);
     }
     }
-
     /**
     /**
-     * 人物属性
-     * @return \heroattr
-     */
-    public static function heroattr() {
-        static $a = null;
+    * 人物属性
+    * @return \heroattr
+    */
+    public static function heroattr()
+    { 
+        static $a = null; 
         return self::initValue($a, 'heroattr');
         return self::initValue($a, 'heroattr');
     }
     }
-
     /**
     /**
-     * @return \sm_heroattr heroattr item数据
-     */
-    public static function heroattr_getItem($itemid) {
+    * @return \sm_heroattr heroattr item数据 
+    */
+    public static function heroattr_getItem($itemid)
+    { 
         return self::get_hash_item('heroattr', $itemid);
         return self::get_hash_item('heroattr', $itemid);
     }
     }
-
     /**
     /**
-     * 剧情对话
-     * @return \plots
-     */
-    public static function plots() {
-        static $a = null;
+    * 剧情对话
+    * @return \plots
+    */
+    public static function plots()
+    { 
+        static $a = null; 
         return self::initValue($a, 'plots');
         return self::initValue($a, 'plots');
     }
     }
-
     /**
     /**
-     * @return \sm_plots plots item数据
-     */
-    public static function plots_getItem($itemid) {
+    * @return \sm_plots plots item数据 
+    */
+    public static function plots_getItem($itemid)
+    { 
         return self::get_hash_item('plots', $itemid);
         return self::get_hash_item('plots', $itemid);
     }
     }
-
     /**
     /**
-     * 商城宝箱表
-     * @return \shop_box
-     */
-    public static function shop_box() {
-        static $a = null;
+    * 商城宝箱表
+    * @return \shop_box
+    */
+    public static function shop_box()
+    { 
+        static $a = null; 
         return self::initValue($a, 'shop_box');
         return self::initValue($a, 'shop_box');
     }
     }
-
     /**
     /**
-     * @return \sm_shop_box shop_box item数据
-     */
-    public static function shop_box_getItem($itemid) {
+    * @return \sm_shop_box shop_box item数据 
+    */
+    public static function shop_box_getItem($itemid)
+    { 
         return self::get_hash_item('shop_box', $itemid);
         return self::get_hash_item('shop_box', $itemid);
     }
     }
-
     /**
     /**
-     * 商城月卡
-     * @return \shop_monthcard
-     */
-    public static function shop_monthcard() {
-        static $a = null;
+    * 商城月卡
+    * @return \shop_monthcard
+    */
+    public static function shop_monthcard()
+    { 
+        static $a = null; 
         return self::initValue($a, 'shop_monthcard');
         return self::initValue($a, 'shop_monthcard');
     }
     }
-
     /**
     /**
-     * @return \sm_shop_monthcard shop_monthcard item数据
-     */
-    public static function shop_monthcard_getItem($itemid) {
+    * @return \sm_shop_monthcard shop_monthcard item数据 
+    */
+    public static function shop_monthcard_getItem($itemid)
+    { 
         return self::get_hash_item('shop_monthcard', $itemid);
         return self::get_hash_item('shop_monthcard', $itemid);
     }
     }
-
     /**
     /**
-     * 7日狂欢活跃点奖励
-     * @return \activepointreward
-     */
-    public static function activepointreward() {
-        static $a = null;
+    * 7日狂欢活跃点奖励
+    * @return \activepointreward
+    */
+    public static function activepointreward()
+    { 
+        static $a = null; 
         return self::initValue($a, 'activepointreward');
         return self::initValue($a, 'activepointreward');
     }
     }
-
     /**
     /**
-     * @return \sm_activepointreward activepointreward item数据
-     */
-    public static function activepointreward_getItem($type, $pointId) {
+    * @return \sm_activepointreward activepointreward item数据 
+    */
+    public static function activepointreward_getItem($type, $pointId)
+    { 
         return self::get_hash_item('activepointreward', "$type-$pointId");
         return self::get_hash_item('activepointreward', "$type-$pointId");
     }
     }
-
     /**
     /**
-     * 活动任务
-     * @return \activeTask
-     */
-    public static function activeTask() {
-        static $a = null;
+    * 活动任务
+    * @return \activeTask
+    */
+    public static function activeTask()
+    { 
+        static $a = null; 
         return self::initValue($a, 'activeTask');
         return self::initValue($a, 'activeTask');
     }
     }
-
     /**
     /**
-     * @return \sm_activeTask activeTask item数据
-     */
-    public static function activeTask_getItem($itemid) {
+    * @return \sm_activeTask activeTask item数据 
+    */
+    public static function activeTask_getItem($itemid)
+    { 
         return self::get_hash_item('activeTask', $itemid);
         return self::get_hash_item('activeTask', $itemid);
     }
     }
-
     /**
     /**
-     * 活动任务根据类型的不同分开
-     * @return \activeTask_type
-     */
-    public static function activeTask_type() {
-        static $a = null;
+    * 活动任务根据类型的不同分开
+    * @return \activeTask_type
+    */
+    public static function activeTask_type()
+    { 
+        static $a = null; 
         return self::initValue($a, 'activeTask_type');
         return self::initValue($a, 'activeTask_type');
     }
     }
-
     /**
     /**
-     * @return \sm_activeTask_type activeTask_type itemArray
-     */
-    public static function activeTask_type_getItemArray($key) {
+    * @return \sm_activeTask_type activeTask_type itemArray 
+    */
+    public static function activeTask_type_getItemArray($key)
+    { 
         return self::get_hash_item('activeTask_type', $key);
         return self::get_hash_item('activeTask_type', $key);
     }
     }
-
     /**
     /**
-     * 活动
-     * @return \activity
-     */
-    public static function activity() {
-        static $a = null;
+    * 活动
+    * @return \activity
+    */
+    public static function activity()
+    { 
+        static $a = null; 
         return self::initValue($a, 'activity');
         return self::initValue($a, 'activity');
     }
     }
-
     /**
     /**
-     * @return \sm_activity activity item数据
-     */
-    public static function activity_getItem($itemid) {
+    * @return \sm_activity activity item数据 
+    */
+    public static function activity_getItem($itemid)
+    { 
         return self::get_hash_item('activity', $itemid);
         return self::get_hash_item('activity', $itemid);
     }
     }
-
     /**
     /**
-     * 公告
-     * @return \announcement
-     */
-    public static function announcement() {
-        static $a = null;
+    * 公告
+    * @return \announcement
+    */
+    public static function announcement()
+    { 
+        static $a = null; 
         return self::initValue($a, 'announcement');
         return self::initValue($a, 'announcement');
     }
     }
-
     /**
     /**
-     * @return \sm_announcement announcement item数据
-     */
-    public static function announcement_getItem($itemid) {
+    * @return \sm_announcement announcement item数据 
+    */
+    public static function announcement_getItem($itemid)
+    { 
         return self::get_hash_item('announcement', $itemid);
         return self::get_hash_item('announcement', $itemid);
     }
     }
-
     /**
     /**
-     * 战力荣誉榜信息
-     * @return \rank_fightpowerreward
-     */
-    public static function rank_fightpowerreward() {
-        static $a = null;
+    * 战力荣誉榜信息
+    * @return \rank_fightpowerreward
+    */
+    public static function rank_fightpowerreward()
+    { 
+        static $a = null; 
         return self::initValue($a, 'rank_fightpowerreward');
         return self::initValue($a, 'rank_fightpowerreward');
     }
     }
-
     /**
     /**
-     * @return \sm_rank_fightpowerreward rank_fightpowerreward item数据
-     */
-    public static function rank_fightpowerreward_getItem($itemid) {
+    * @return \sm_rank_fightpowerreward rank_fightpowerreward item数据 
+    */
+    public static function rank_fightpowerreward_getItem($itemid)
+    { 
         return self::get_hash_item('rank_fightpowerreward', $itemid);
         return self::get_hash_item('rank_fightpowerreward', $itemid);
     }
     }
-
     /**
     /**
-     * 主线荣誉榜信息
-     * @return \rank_passgatereward
-     */
-    public static function rank_passgatereward() {
-        static $a = null;
+    * 主线荣誉榜信息
+    * @return \rank_passgatereward
+    */
+    public static function rank_passgatereward()
+    { 
+        static $a = null; 
         return self::initValue($a, 'rank_passgatereward');
         return self::initValue($a, 'rank_passgatereward');
     }
     }
-
     /**
     /**
-     * @return \sm_rank_passgatereward rank_passgatereward item数据
-     */
-    public static function rank_passgatereward_getItem($itemid) {
+    * @return \sm_rank_passgatereward rank_passgatereward item数据 
+    */
+    public static function rank_passgatereward_getItem($itemid)
+    { 
         return self::get_hash_item('rank_passgatereward', $itemid);
         return self::get_hash_item('rank_passgatereward', $itemid);
     }
     }
-
     /**
     /**
-     * 玩家等级表
-     * @return \player_level
-     */
-    public static function player_level() {
-        static $a = null;
+    * 玩家等级表
+    * @return \player_level
+    */
+    public static function player_level()
+    { 
+        static $a = null; 
         return self::initValue($a, 'player_level');
         return self::initValue($a, 'player_level');
     }
     }
-
     /**
     /**
-     * @return \sm_player_level player_level item数据
-     */
-    public static function player_level_getItem($itemid) {
+    * @return \sm_player_level player_level item数据 
+    */
+    public static function player_level_getItem($itemid)
+    { 
         return self::get_hash_item('player_level', $itemid);
         return self::get_hash_item('player_level', $itemid);
     }
     }
-
     /**
     /**
-     *  辅助:主线剧情解锁
-     * @return \gate_unlock
-     */
-    public static function gate_unlock() {
-        static $a = null;
+    *  辅助:主线剧情解锁
+    * @return \gate_unlock
+    */
+    public static function gate_unlock()
+    { 
+        static $a = null; 
         return self::initValue($a, 'gate_unlock');
         return self::initValue($a, 'gate_unlock');
     }
     }
-
     /**
     /**
-     * @return \sm_gate_unlock gate_unlock itemArray
-     */
-    public static function gate_unlock_getItemArray($key) {
+    * @return \sm_gate_unlock gate_unlock itemArray 
+    */
+    public static function gate_unlock_getItemArray($key)
+    { 
         return self::get_hash_item('gate_unlock', $key);
         return self::get_hash_item('gate_unlock', $key);
     }
     }
-
     /**
     /**
-     * 辅助: 波次直查
-     * @return \waveItem
-     */
-    public static function waveItem() {
-        static $a = null;
+    * 辅助: 波次直查
+    * @return \waveItem
+    */
+    public static function waveItem()
+    { 
+        static $a = null; 
         return self::initValue($a, 'waveItem');
         return self::initValue($a, 'waveItem');
     }
     }
-
     /**
     /**
-     * @return \sm_waveItem waveItem item数据
-     */
-    public static function waveItem_getItem($gateId, $waveId) {
+    * @return \sm_waveItem waveItem item数据 
+    */
+    public static function waveItem_getItem($gateId, $waveId)
+    { 
         return self::get_hash_item('waveItem', "$gateId-$waveId");
         return self::get_hash_item('waveItem', "$gateId-$waveId");
     }
     }
-
     /**
     /**
-     * 道具宝箱表
-     * @return \item_2023_box
-     */
-    public static function item_2023_box() {
-        static $a = null;
+    * 道具宝箱表
+    * @return \item_2023_box
+    */
+    public static function item_2023_box()
+    { 
+        static $a = null; 
         return self::initValue($a, 'item_2023_box');
         return self::initValue($a, 'item_2023_box');
     }
     }
-
     /**
     /**
-     * @return \sm_item_2023_box item_2023_box item数据
-     */
-    public static function item_2023_box_getItem($itemid) {
+    * @return \sm_item_2023_box item_2023_box item数据 
+    */
+    public static function item_2023_box_getItem($itemid)
+    { 
         return self::get_hash_item('item_2023_box', $itemid);
         return self::get_hash_item('item_2023_box', $itemid);
     }
     }
-
     /**
     /**
-     * 当前版本(时间戳)
-     * @return \ver
-     */
-    public static function ver() {
-        static $a = null;
+    * 人物分类
+    * @return \heroType_typeId
+    */
+    public static function heroType_typeId()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'heroType_typeId');
+    }
+    /**
+    * @return \sm_heroType_typeId heroType_typeId itemArray 
+    */
+    public static function heroType_typeId_getItemArray($key)
+    { 
+        return self::get_hash_item('heroType_typeId', $key);
+    }
+    /**
+    * 当前版本(时间戳)
+    * @return \ver
+    */
+    public static function ver()
+    { 
+        static $a = null; 
         return self::initValue($a, 'ver', false);
         return self::initValue($a, 'ver', false);
     }
     }
-
     /**
     /**
-     * 客户端配置数据
-     * @return \client
-     */
-    public static function client() {
-        static $a = null;
+    * 客户端配置数据
+    * @return \client
+    */
+    public static function client()
+    { 
+        static $a = null; 
         return self::initValue($a, 'client', false);
         return self::initValue($a, 'client', false);
     }
     }
 }
 }
+

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-06-17 15:24:55
+ // 日期: 2024-06-19 14:08:35
 ////////////////////
 ////////////////////
 
 
 /**
 /**
@@ -701,6 +701,22 @@ class GameConfig {
         return self::get_hash_item('item_2023_box', $itemid);
         return self::get_hash_item('item_2023_box', $itemid);
     }
     }
     /**
     /**
+    * 人物分类
+    * @return \heroType_typeId
+    */
+    public static function heroType_typeId()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'heroType_typeId');
+    }
+    /**
+    * @return \sm_heroType_typeId heroType_typeId itemArray 
+    */
+    public static function heroType_typeId_getItemArray($key)
+    { 
+        return self::get_hash_item('heroType_typeId', $key);
+    }
+    /**
     * 当前版本(时间戳)
     * 当前版本(时间戳)
     * @return \ver
     * @return \ver
     */
     */

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-06-07 18:24:31
+ // 日期: 2024-06-18 10:14:04
 ////////////////////
 ////////////////////
 
 
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-06-17 14:31:14
+ // 日期: 2024-06-19 09:35:46
 ////////////////////
 ////////////////////
 
 
 
 

+ 32 - 2
Gameserver/App/model/Const/sm_hero.php

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-06-07 18:24:31
+ // 日期: 2024-06-18 14:50:18
 ////////////////////
 ////////////////////
 
 
 
 
@@ -18,16 +18,46 @@ class sm_hero
     */
     */
     public $id;
     public $id;
 
 
+    /**
+    * @var Int32 角色唯一ID  
+    */
+    public $typeID;
+
+    /**
+    * @var Int32 角色资源ID  
+    */
+    public $heroResID;
+
     /**
     /**
     * @var String 名称  
     * @var String 名称  
     */
     */
     public $name;
     public $name;
 
 
+    /**
+    * @var Int32 角色星级  
+    */
+    public $starLv;
+
+    /**
+    * @var Int32 角色最高星级  
+    */
+    public $Maxlevel;
+
+    /**
+    * @var String 稀有度  
+    */
+    public $rarity;
+
     /**
     /**
     * @var String 备注  
     * @var String 备注  
     */
     */
     public $desc;
     public $desc;
 
 
+    /**
+    * @var String 需要的人物碎片:itemId,num  
+    */
+    public $heroDebris_need;
+
     /**
     /**
     * @var Int32 英雄身上带的武器Id default(0) 
     * @var Int32 英雄身上带的武器Id default(0) 
     */
     */
@@ -94,7 +124,7 @@ class sm_hero
     public $pickup_radius;
     public $pickup_radius;
 
 
     /**
     /**
-    * @var Int32 解锁成就id
+    * @var Int32 [废弃]解锁成就id
     *    
     *    
     */
     */
     public $acc_id;
     public $acc_id;

+ 208 - 0
Gameserver/App/model/Const/sm_heroType_typeId.php

@@ -0,0 +1,208 @@
+<?php
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2024-06-18 14:50:18
+////////////////////
+
+
+/**
+ * Static Model heroType_typeId 人物分类
+ */
+class sm_heroType_typeId
+{
+
+    /**
+    * @var Int32 角色编号  
+    */
+    public $id;
+
+    /**
+    * @var Int32 角色唯一ID  
+    */
+    public $typeID;
+
+    /**
+    * @var Int32 角色资源ID  
+    */
+    public $heroResID;
+
+    /**
+    * @var String 名称  
+    */
+    public $name;
+
+    /**
+    * @var Int32 角色星级  
+    */
+    public $starLv;
+
+    /**
+    * @var Int32 角色最高星级  
+    */
+    public $Maxlevel;
+
+    /**
+    * @var String 稀有度  
+    */
+    public $rarity;
+
+    /**
+    * @var String 备注  
+    */
+    public $desc;
+
+    /**
+    * @var String 需要的人物碎片:itemId,num  
+    */
+    public $heroDebris_need;
+
+    /**
+    * @var Int32 英雄身上带的武器Id default(0) 
+    */
+    public $skillId;
+
+    /**
+    * @var String 英雄形象小图标  
+    */
+    public $img;
+
+    /**
+    * @var String 半身像  
+    */
+    public $imgBig;
+
+    /**
+    * @var Int32 初始伤害(值)  
+    */
+    public $attack;
+
+    /**
+    * @var Single 初始移动速度 (倍率)  
+    */
+    public $speed;
+
+    /**
+    * @var Int32 初始生命(值)  
+    */
+    public $hp;
+
+    /**
+    * @var Int32 每5秒增加生命恢复(逻辑) 2023.11.28 default(0) 
+    */
+    public $recover_Hp;
+
+    /**
+    * @var Single 初始伤害减免 (值) default(0) 
+    */
+    public $dec_demage;
+
+    /**
+    * @var Int32 重击率(百分比)  
+    */
+    public $bigHit_rate;
+
+    /**
+    * @var Int32 重击倍率: 初始2倍 default(200) 
+    */
+    public $bigHit_Val;
+
+    /**
+    * @var Int32 神圣一击率(百分比)  
+    */
+    public $sentHit_rate;
+
+    /**
+    * @var Int32 普通怪物秒杀几率(百分比) default(0) 
+    */
+    public $instantKillMonsterRate;
+
+    /**
+    * @var Single 初始拾取半径(倍率) default(1) 
+    */
+    public $pickup_radius;
+
+    /**
+    * @var Int32 [废弃]解锁成就id
+    *    
+    */
+    public $acc_id;
+
+    /**
+    * @var Int32 是否上架: 0 显式, 1 隐藏  
+    */
+    public $is_hide;
+
+    /**
+    * @var Single 体积  
+    */
+    public $size;
+
+    /**
+    * @var Int32 解锁需要花费的金币数量 default(0) 
+    */
+    public $unlock_needGold;
+
+    /**
+    * @var Int32 武器上限 (目前固定写死) default(6) 
+    */
+    public $skillNumMax;
+
+    /**
+    * @var Single 角色额外伤害加成 (倍率) default(1) 
+    */
+    public $mul_atk;
+
+    /**
+    * @var Single 角色子弹速度加成 (倍率)  default(0) 
+    */
+    public $mul_bullet_speed;
+
+    /**
+    * @var Single 子弹持续时间加成 (倍率)  default(1) 
+    */
+    public $mul_bullet_sustainTime;
+
+    /**
+    * @var Single 技能攻击范围加成 (倍率)  default(1) 
+    */
+    public $mul_atk_range;
+
+    /**
+    * @var Single 技能冷却时间加成 (倍率) 允许负值  
+    */
+    public $mul_cooldown;
+
+    /**
+    * @var Int32 子弹数量加成 (值) default(0) 
+    */
+    public $add_bulletnum;
+
+    /**
+    * @var Int32 复活次数加成 (值) default(0) 
+    */
+    public $add_reliveTimes;
+
+    /**
+    * @var Single 经验获取加成 (倍率) default(1) 
+    */
+    public $mul_gainExp;
+
+    /**
+    * @var Single 金币获取加成 (倍率) default(1) 
+    */
+    public $mul_gainGold;
+
+    /**
+    * @var Int32 角色特殊词条 default(0) 
+    */
+    public $special_predicate;
+
+    /**
+    * @var String 头像图片  
+    */
+    public $headImg;
+
+}
+

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-06-14 11:16:48
+ // 日期: 2024-06-18 14:41:36
 ////////////////////
 ////////////////////
 
 
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-06-17 10:14:51
+ // 日期: 2024-06-19 11:35:46
 ////////////////////
 ////////////////////
 
 
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-06-17 14:35:45
+ // 日期: 2024-06-19 14:05:46
 ////////////////////
 ////////////////////
 
 
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
  // author: gwang 
- // 日期: 2024-06-17 14:35:45
+ // 日期: 2024-06-19 14:05:46
 ////////////////////
 ////////////////////
 
 
 
 

+ 35 - 17
Gameserver/App/model/User/Info_Heros.php

@@ -28,24 +28,40 @@ class Info_Heros extends Object_ext {
 
 
     public function initialize() {
     public function initialize() {
         $heroConf = GameConfig::hero();
         $heroConf = GameConfig::hero();
-        
         foreach ($heroConf as $heroId => $mo) {
         foreach ($heroConf as $heroId => $mo) {
-            if(!StlUtil::dictHasProperty($this->Dic, $heroId) ){
+            if (!StlUtil::dictHasProperty($this->Dic, $heroId) && $mo->starLv == 1) {
                 $insHero = new Ins_Hero();
                 $insHero = new Ins_Hero();
                 $insHero->Id = $heroId;
                 $insHero->Id = $heroId;
                 $insHero->isUnlock = 0;
                 $insHero->isUnlock = 0;
-                if($heroId == 1 || $heroId == 2){
+                if ($mo->heroDebris_need == null) {                   
                     $insHero->isUnlock = 1;
                     $insHero->isUnlock = 1;
+                    if($this->CurrentHeroId == 0){
+                        $this->CurrentHeroId = $heroId;
+                    }                   
                 }
                 }
-                
                 $this->Dic->$heroId = $insHero;
                 $this->Dic->$heroId = $insHero;
             }
             }
-            
-        }
-        
-        if($this->CurrentHeroId == 0){
-            $this->CurrentHeroId = 1;
         }
         }
+
+
+//        
+//        foreach ($heroConf as $heroId => $mo) {
+//            if(!StlUtil::dictHasProperty($this->Dic, $heroId) ){
+//                $insHero = new Ins_Hero();
+//                $insHero->Id = $heroId;
+//                $insHero->isUnlock = 0;
+//                if($heroId == 1 || $heroId == 2){
+//                    $insHero->isUnlock = 1;
+//                }
+//                
+//                $this->Dic->$heroId = $insHero;
+//            }
+//            
+//        }
+//        
+//        if($this->CurrentHeroId == 0){
+//            $this->CurrentHeroId = 1;
+//        }
 //        $curHeroId = 1; //临时
 //        $curHeroId = 1; //临时
 //        $this->CurrentHeroId = $curHeroId;
 //        $this->CurrentHeroId = $curHeroId;
 //        $this->Dic = new \stdClass();
 //        $this->Dic = new \stdClass();
@@ -60,16 +76,18 @@ class Info_Heros extends Object_ext {
 
 
     public function __construct($arg = null) {
     public function __construct($arg = null) {
         if ($arg == null) {
         if ($arg == null) {
-            if ($this->CurrentHeroId == 0) {
-                $curHeroId = 1; //临时
-                $this->CurrentHeroId = $curHeroId;
-                $this->Dic = new \stdClass();
-                $insHero = new Ins_Hero();
-                $insHero->Id = $curHeroId;
-                $this->Dic->$curHeroId = $insHero;
-            }
+            $this->Dic = new \stdClass();
+//            if ($this->CurrentHeroId == 0) {
+//                $curHeroId = 1; //临时
+//                $this->CurrentHeroId = $curHeroId;
+//                $this->Dic = new \stdClass();
+//                $insHero = new Ins_Hero();
+//                $insHero->Id = $curHeroId;
+//                $this->Dic->$curHeroId = $insHero;
+//            }
         } else {
         } else {
             parent::__construct($arg);
             parent::__construct($arg);
         }
         }
     }
     }
+
 }
 }

+ 5 - 1
Gameserver/App/process/FightProc.php

@@ -65,7 +65,8 @@ class FightProc {
 
 
         $passGateId = ctx()->gates->maxPassGateId();
         $passGateId = ctx()->gates->maxPassGateId();
         my_Assert($passGateId != 0, ErrCode::gate_NoSweep);
         my_Assert($passGateId != 0, ErrCode::gate_NoSweep);
-        //$mo = GameConfig::gate_getItem(ctx()->gates->UnlockedGatesMaxId);
+        $mo = GameConfig::gate_getItem($passGateId);
+        $gateName = $mo->gateName;
         $costTili = glc()->sweep_cost_tili;
         $costTili = glc()->sweep_cost_tili;
         $curTili =  ctx()->baseInfo->CurTili();       
         $curTili =  ctx()->baseInfo->CurTili();       
         my_Assert($curTili >= $costTili, ErrCode::notenough_tili);
         my_Assert($curTili >= $costTili, ErrCode::notenough_tili);
@@ -117,6 +118,8 @@ class FightProc {
                 foreach ($dic as $key => $gemMo) {
                 foreach ($dic as $key => $gemMo) {
                     if ($gemMo->qual == $qual && $gemMo->position == $posId) {
                     if ($gemMo->qual == $qual && $gemMo->position == $posId) {
                         $prizeArr[] = $gemMo->typeId . ',' . $list[1];
                         $prizeArr[] = $gemMo->typeId . ',' . $list[1];
+                        
+                        SystemProc::GetGem_GreaterOrangeQual_SweepMainGateIndex(req()->zoneid, ctx()->baseInfo->name, Ins_GateInfo::gateNum($passGateId), $gateName, $gemMo->typeId);
                         StoreProc::PutGemInStore($gemMo->typeId, $list[1]);
                         StoreProc::PutGemInStore($gemMo->typeId, $list[1]);
                         break;
                         break;
                     }
                     }
@@ -492,6 +495,7 @@ class FightProc {
                 foreach ($pool as $item) {
                 foreach ($pool as $item) {
                     if ($r <= ($l + $item['p'])) {
                     if ($r <= ($l + $item['p'])) {
                         $gemId = $item['q'] * 100000 + rand(1, 6) * 1000;
                         $gemId = $item['q'] * 100000 + rand(1, 6) * 1000;
+                        SystemProc::GetGem_GreaterOrangeQual_MainGate(req()->zoneid, ctx()->baseInfo->name,Ins_GateInfo::gateNum($gateId), $gateMo->gateName, $gemId);//广播
                         StoreProc::PutGemInStore($gemId);                       # 发放宝石并退出本次投色子
                         StoreProc::PutGemInStore($gemId);                       # 发放宝石并退出本次投色子
                         $pickups .= ";$gemId,1";
                         $pickups .= ";$gemId,1";
                         break;
                         break;

+ 74 - 9
Gameserver/App/process/HeroProc.php

@@ -26,13 +26,60 @@ class HeroProc {
                 return HeroProc::SwithHero();
                 return HeroProc::SwithHero();
             case CmdCode::hero_unlock:                                          # 6602 解锁英雄
             case CmdCode::hero_unlock:                                          # 6602 解锁英雄
                 return self::UnlockHero();
                 return self::UnlockHero();
-            case CmdCode::hero_buy:
-                return self::BuyHero();
+            case CmdCode::hero_strengthenStar:                                  # 6603 角色升星
+                return self::HeroStrengthenStar();
             default:
             default:
                 Err(ErrCode::cmd_err);
                 Err(ErrCode::cmd_err);
         }
         }
     }
     }
     
     
+    /**
+     * 6603 角色升星
+     * @return type
+     */
+    private static function HeroStrengthenStar(){
+        list($heroId) = req()->paras;             
+        
+        $mo = GameConfig::hero_getItem($heroId);
+        my_Assert($mo != null, ErrCode::err_const_no);
+        
+        my_Assert(StlUtil::dictHasProperty(ctx()->heros->Dic, $heroId), "找不到英雄配置数据!");
+        my_Assert(ctx()->heros->Dic->$heroId->isUnlock == 1, "英雄未解锁!");
+        
+        $nextMo = null;       
+        $typeList = GameConfig::heroType_typeId_getItemArray($mo->typeID);
+        foreach ($typeList as $item) {
+            if($item->starLv == $mo->starLv +1){
+                $nextMo = $item;
+                break;
+            }
+                
+        }
+        
+        my_Assert($nextMo != null, "没有下一星级配置信息");
+        
+        $heroDebrisList = explode(',', $nextMo->heroDebris_need);
+        $itemId = $heroDebrisList[0];
+        $itemNum = $heroDebrisList[1];
+        
+        my_Assert(StlUtil::dictHasProperty(ctx()->store->items, $itemId) && ctx()->store->items->$itemId >= $itemNum, ErrCode::notenough_item);      
+        ctx()->store->removeItem($itemId, $itemNum);
+        
+        $nextHeroId = $nextMo->id;
+        
+        $ins_hero = new Ins_Hero(ctx()->heros->Dic->$heroId);
+        $ins_hero->Id = $nextHeroId;                     
+        ctx()->heros->Dic->$nextHeroId = $ins_hero;
+        
+        StlUtil::dictRemove(ctx()->heros->Dic, $heroId);
+                
+        UserProc::updateUserInfo();
+        return Resp::ok(array(                   
+                    'store' => ctx()->store,
+                    'heros'=>ctx()->heros,
+        ));
+    }
+    
     /**
     /**
      * 购买角色
      * 购买角色
      * @return type
      * @return type
@@ -51,13 +98,31 @@ class HeroProc {
      * @return type
      * @return type
      */
      */
     private static function UnlockHero() {
     private static function UnlockHero() {
-        list($newHeroId) = req()->paras;                                        # 切换英雄id
-        my_Assert(GameConfig::hero_getItem($newHeroId) != null, "找不到英雄配置数据!");
-        // 解锁消耗,
-        // 解锁成功.
-        ctx()->heros->Dic->$newHeroId = new Ins_Hero();
-
-        return Resp::ok();
+        list($heroId) = req()->paras;             
+        
+        $mo = GameConfig::hero_getItem($heroId);
+        my_Assert($mo != null, ErrCode::err_const_no);
+        
+        my_Assert(StlUtil::dictHasProperty(ctx()->heros->Dic, $heroId), "找不到英雄配置数据!");
+        my_Assert(ctx()->heros->Dic->$heroId->isUnlock == 0, "英雄已经解锁!");
+        
+        //$heroDebris_need = $mo->heroDebris_need;
+        $heroDebrisList = explode(',', $mo->heroDebris_need);
+        $itemId = $heroDebrisList[0];
+        $itemNum = $heroDebrisList[1];
+        
+        my_Assert(StlUtil::dictHasProperty(ctx()->store->items, $itemId) && ctx()->store->items->$itemId >= $itemNum, ErrCode::notenough_item);
+        
+        ctx()->store->removeItem($itemId, $itemNum);
+        
+        ctx()->heros->Dic->$heroId->isUnlock = 1;//解锁
+                           
+        UserProc::updateUserInfo();
+        return Resp::ok(array(                   
+                    'store' => ctx()->store,
+                    'heros'=>ctx()->heros,
+        ));
+       
     }
     }
 
 
     /**
     /**

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

@@ -273,6 +273,11 @@ class ShopProc {
 
 
                         $n = rand(0, count($gemList) - 1);
                         $n = rand(0, count($gemList) - 1);
                         $gem = StoreProc::initGem($gemList[$n]->typeId);
                         $gem = StoreProc::initGem($gemList[$n]->typeId);
+                        
+                        if($mo->type == 2){
+                            SystemProc::GetGem_GreaterOrangeQual_ShopBox(req()->zoneid, ctx()->baseInfo->name, $gemList[$n]->typeId);
+                        }
+                        
                         $resultArr[] = $gem->uid;
                         $resultArr[] = $gem->uid;
                         StoreProc::PutGemInStore2($gem);
                         StoreProc::PutGemInStore2($gem);
                     }
                     }

+ 3 - 2
Gameserver/App/process/StoreProc.php

@@ -407,7 +407,8 @@ class StoreProc {
             }
             }
         }
         }
         $resultArr = array();
         $resultArr = array();
-        foreach ($composeArr as $value) {
+        foreach ($composeArr as $value) {           
+            SystemProc::GetGem_GreaterOrangeQual_GemCompose(req()->zoneid, ctx()->baseInfo->name, $value->typeId);//广播
             $resultArr[] = $value->uid;
             $resultArr[] = $value->uid;
         }
         }
         TaskProc::OnComposeNumGem();
         TaskProc::OnComposeNumGem();
@@ -760,7 +761,7 @@ class StoreProc {
                 case 100://图纸
                 case 100://图纸
                 case 401://启灵石
                 case 401://启灵石
                 case 301://洗练石
                 case 301://洗练石
-                    //case 103:
+                case 501://人物碎片
                     self::PutItemsInStore($itemId, $num);
                     self::PutItemsInStore($itemId, $num);
                     if ($itemMo->itemType == 100) {//图纸
                     if ($itemMo->itemType == 100) {//图纸
                         self::checkEquipUpgradeTip();
                         self::checkEquipUpgradeTip();

+ 311 - 0
Gameserver/App/process/SystemProc.php

@@ -0,0 +1,311 @@
+<?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;
+
+/**
+ *   约定好的消息类型
+ */
+class SysMessageType extends Enum {
+       
+    /**
+     * 恭喜玩家X在第10关五庄观中中,获得了传奇宝石!
+     */
+    const GetGem_GreaterOrangeQual_MainGate = 1;
+    
+    /**
+     * 恭喜玩家X通过扫荡第10关五庄观中,获得了传奇宝石!
+     */
+    const GetGem_GreaterOrangeQual_SweepMainGateIndex = 2;
+    
+    /**
+     * 恭喜玩家X在活动中获得了传奇宝石!
+     */
+    const GetGem_GreaterOrangeQual_Active = 3;
+    
+    /**
+     * 恭喜玩家X通过璀璨宝箱获得了传奇宝石!
+     */
+    const GetGem_GreaterOrangeQual_ShopBox = 4;
+    
+    /**
+     * 恭喜玩家X通过合成获得了传奇宝石!
+     */
+    const GetGem_GreaterOrangeQual_GemCompose = 5;
+}
+
+/**
+ * 系统消息对象
+ */
+class SysMessageModel extends Object_ext {
+
+    /** @var SysMessageType */
+    public $type;
+
+    /** @var array 消息数据 */
+    public $datas;
+
+    /** @var int */
+    public $ts;
+
+}
+
+/**
+ * Description of SystemProc
+ *
+ * @author c'y'zhao
+ */
+class SystemProc {
+
+    /**
+     * 系统消息的过期时间(秒)
+     * @var int
+     */
+    const SYS_MSG_OUTTS = 3600;
+
+    /**
+     * 主逻辑分发
+     * @param type $req
+     * @return type
+     */
+    static function procMain($req) {
+        switch (req()->cmd) {           
+            case CmdCode::cmd_system_clienttick:                                # 6901 客户端心跳包
+                return self::clientTick();
+            case CmdCode::cmd_system_getsysmessage:                             # 6902 拉取系统消息
+                return self::getSysMessage();          
+            default :
+                return Resp::err(ErrCode::cmd_err);
+        }
+    }
+    
+    /**
+     * [6901] 客户端心跳包
+     */
+    static function clientTick() {
+        $timespan = now() - ctx()->base()->lastSaveTs;
+  
+        if ($timespan < 300) {                                                  # 间隔超过5分钟的不算
+            if ($timespan < 30) {                                               # 心跳包固定30秒1次
+                $timespan = 30;
+            }
+                  
+            UserProc::updateUserInfo();
+        }
+        return Resp::ok();
+    }  
+    
+    /**
+     * [6902]获取系统广播消息列表
+     */
+    static function getSysMessage() {
+        //客户端参数解析
+        $ts = req()->paras[0];                                                   # 消息列表有效时间戳
+        $defaultwaitcont = 60;                                                  # 暂时使用60秒作为频率,若是有压力就调大些. 若是没有问题,可以调小些.
+        $itemDisplayTime = 7;                                                   # 7秒显示完一条消息
+
+        $sysMessage = self::mem_getSysMsg_zset(req()->zoneid, $ts);
+
+        $count = count($sysMessage) * $itemDisplayTime;                         # 计算下次取消息的时间
+        if ($count < $defaultwaitcont) {                                        # 最低刷新时间
+            $count = $defaultwaitcont;
+        }
+        $ret = array(
+            'sysMessage' => $sysMessage,
+            'nextFetchTime' => $count
+        );
+
+        return Resp::ok($ret);                                                  # 返回信息
+    }
+    
+    /**
+     * 取数据
+     * @param int $zoneid
+     * @return array
+     */
+    private static function mem_getSysMsg_zset($zoneid, $ts) {
+        $ret = gMem()->zrangebyscore(MemKey_GameRun::Game_SysMsgByZone_zset($zoneid), $ts, now(+1));
+        //todo:目前是在这里手动解码的, 应该移动到CRedisUtil里面去.
+        $arr = ArrayInit();
+        if ($ret) {
+            foreach ($ret as $msg) {
+                $arr[] = JsonUtil::decode($msg);
+            }
+        }
+        return $arr;
+    }
+
+    /**
+     * 回写数据
+     * @param int $zoneid
+     * @param SysMessageModel $value
+     */
+    private static function mem_addSysMsg_zset($zoneid, $value) {
+        $ts = $value->ts;
+        $key = MemKey_GameRun::Game_SysMsgByZone_zset($zoneid);
+        gMem()->zadd($key, array(json_encode($value) => $ts));                  # 插入消息
+        gMem()->zremrangebyscore($key, 0, $ts - self::SYS_MSG_OUTTS);           # 清理过期数据
+    }
+    
+    /**
+     * 推送系统消息
+     * @param int $zoneid 分区
+     * @param SysMessageType $type enum
+     * @param array $datas
+     */
+    static function pushSysMessage($zoneid, $type, $datas) {
+        $newMsg = new SysMessageModel(array(#                                   # 添加新系统消息
+            'type' => $type,
+            'datas' => $datas,
+            'ts' => now()
+        ));
+        self::mem_addSysMsg_zset($zoneid, $newMsg);                             # 写入mem
+    }
+    
+    //----下面是广播信息
+      
+    /**
+     * 恭喜玩家X在第10关五庄观中中,获得了传奇宝石!
+     * @param type $zoneid
+     * @param type $name
+     * @param type $gemId
+     */
+    static function GetGem_GreaterOrangeQual_MainGate($zoneid, $name,$gateIndex,$gateName,$gemId) {
+        $mo = GameConfig::gem_getItem($gemId);
+        if ($mo->qual >= 5) {            
+            $arr = explode(';', glc()->GemQualName); 
+            $gemName = "";
+            foreach ($arr as $val) {
+                $strList = explode(':', $val);              
+                if($strList[0] == $mo->qual){
+                    $gemName = $strList[1];
+                    break;
+                }
+            }
+                        
+            $desc = "在第".$gateIndex."关".$gateName."中";
+            self::pushSysMessage($zoneid, SysMessageType::GetGem_GreaterOrangeQual_MainGate, array(
+                $name,$desc,$gemName,$mo->qual
+            ));
+        }        
+    }
+    
+    /**
+     * 恭喜玩家X通过扫荡第 [10关五庄观] 中,获得了传奇宝石!
+     * @param type $zoneid
+     * @param type $name
+     * @param type $gemId
+     */
+    static function GetGem_GreaterOrangeQual_SweepMainGateIndex($zoneid, $name,$gateIndex,$gateName, $gemId) {
+        $mo = GameConfig::gem_getItem($gemId);
+        if ($mo->qual >= 5) {            
+            $arr = explode(';', glc()->GemQualName); 
+            $gemName = "";
+            foreach ($arr as $val) {
+                $strList = explode(':', $val);              
+                if($strList[0] == $mo->qual){
+                    $gemName = $strList[1];
+                    break;
+                }
+            }
+            $desc = "通过扫荡第".$gateIndex."关".$gateName;            
+            self::pushSysMessage($zoneid, SysMessageType::GetGem_GreaterOrangeQual_SweepMainGateIndex, array(
+                $name,$desc,$gemName,$mo->qual
+            ));
+        } 
+                      
+    }
+    
+    /**
+     * 恭喜玩家X在活动中获得了传奇宝石!
+     * @param type $zoneid
+     * @param type $name
+     * @param type $gemId
+     */
+    static function GetGem_GreaterOrangeQual_Active($zoneid, $name, $gemId) {
+        $mo = GameConfig::gem_getItem($gemId);
+        if ($mo->qual >= 5) {
+            $arr = explode(';', glc()->GemQualName); 
+            $gemName = "";
+            foreach ($arr as $val) {
+                $strList = explode(':', $val);              
+                if($strList[0] == $mo->qual){
+                    $gemName = $strList[1];
+                    break;
+                }
+            }
+                        
+            self::pushSysMessage($zoneid, SysMessageType::GetGem_GreaterOrangeQual_Active, array(
+                $name,$gemName,$mo->qual
+            ));
+        }        
+    }
+    
+    /**
+     * 恭喜玩家X通过璀璨宝箱获得了传奇宝石!
+     * @param type $zoneid
+     * @param type $name
+     * @param type $gemId
+     */
+    static function GetGem_GreaterOrangeQual_ShopBox($zoneid, $name, $gemId) {
+        $mo = GameConfig::gem_getItem($gemId);
+        if ($mo->qual >= 5) {
+            $arr = explode(';', glc()->GemQualName); 
+            $gemName = "";
+            foreach ($arr as $val) {
+                $strList = explode(':', $val);              
+                if($strList[0] == $mo->qual){
+                    $gemName = $strList[1];
+                    break;
+                }
+            }
+            self::pushSysMessage($zoneid, SysMessageType::GetGem_GreaterOrangeQual_ShopBox, array(
+                $name,$gemName,$mo->qual
+            ));
+        }        
+    }
+    
+    /**
+     * 恭喜玩家X通过合成获得了传奇宝石!
+     * @param type $zoneid
+     * @param type $name
+     * @param type $gemId
+     */
+    static function GetGem_GreaterOrangeQual_GemCompose($zoneid, $name, $gemId) {
+        $mo = GameConfig::gem_getItem($gemId);
+        $qual = $mo->qual;
+        if ($qual >= 5) {
+            $arr = explode(';', glc()->GemQualName); 
+            $gemName = "";
+            foreach ($arr as $val) {
+                $strList = explode(':', $val);              
+                if($strList[0] == $qual){
+                    $gemName = $strList[1];
+                    break;
+                }
+            }
+            self::pushSysMessage($zoneid, SysMessageType::GetGem_GreaterOrangeQual_GemCompose, array(
+                $name,$gemName,$mo->qual
+            ));
+        }        
+    }
+    
+    
+//    /**
+//     * 得到S级角色
+//     * @param type $zoneid
+//     * @param type $name
+//     * @param type $weaponTypeId
+//     */
+//    static function GetHero_S($zoneid, $name, $heroId) {
+//        self::pushSysMessage($zoneid, SysMessageType::GetSpecialQualityWeapon, array(
+//                $name, $color, $mo->name
+//            ));
+//    }
+
+}

+ 8 - 0
Gameserver/App/process/TaskProc.php

@@ -89,6 +89,14 @@ class TaskProc {
         my_Assert($ins_activeTaskInfo->cur >= $ins_activeTaskInfo->max(), ErrCode::task_CanotPriceReviced);
         my_Assert($ins_activeTaskInfo->cur >= $ins_activeTaskInfo->max(), ErrCode::task_CanotPriceReviced);
         my_Assert($ins_activeTaskInfo->state == Enum_TaskCardStateType::finish, ErrCode::task_CanotPriceReviced);
         my_Assert($ins_activeTaskInfo->state == Enum_TaskCardStateType::finish, ErrCode::task_CanotPriceReviced);
 
 
+        if($ins_activeTaskInfo->mo()->prizes != null){
+            $reward = explode(',', $ins_activeTaskInfo->mo()->prizes);
+            if(GameConfig::item_getItem($reward[0])->itemType == 201){
+                SystemProc::GetGem_GreaterOrangeQual_Active(req()->zoneid, ctx()->baseInfo->name, $reward[0]);
+            }
+            
+        }
+        
         StoreProc::AddMultiItemInStore($ins_activeTaskInfo->mo()->prizes);
         StoreProc::AddMultiItemInStore($ins_activeTaskInfo->mo()->prizes);
         ctx()->task->activeTaskInfo->$uid->state = Enum_TaskCardStateType::drawed;
         ctx()->task->activeTaskInfo->$uid->state = Enum_TaskCardStateType::drawed;
         ctx()->task->activeTaskInfo->$uid->drawTs = now();
         ctx()->task->activeTaskInfo->$uid->drawTs = now();