Quellcode durchsuchen

转盘抽奖接口

cyzhao vor 8 Monaten
Ursprung
Commit
62ce65cd1a

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

@@ -139,6 +139,16 @@ class CmdCode {
      */
     const cmd_active_drawPackageByCode = 6102;
 
+    /**
+     * 转盘抽奖
+     */
+    const cmd_active_lottery_Tree = 6103;
+
+    /**
+     * 元宝兑换抽奖券
+     */
+    const cmd_active_lottery_Tree_cashExchange = 6104;
+    
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="任务操作码 - 62xx">
 

+ 14 - 0
Gameserver/App/base/ErrCode.php

@@ -553,6 +553,20 @@ class ErrCode {
      */
     const active_time = 3508;
 
+    /**
+     * 抽奖次数非法
+     */
+    const active_lotteryNumErr = 3509;
+    
+    /**
+     * 抽奖次数已经用完
+     */
+    const active_lotteryNumLimit = 3510;
+    
+    /*
+     * 抽奖券数据错误
+     */
+    const active_lotteryCostErr = 3511;
 // </editor-fold>
 //
 //   // <editor-fold defaultstate="collapsed" desc="    task 3600    ">

+ 533 - 504
Gameserver/App/configs/GameConfig.php

@@ -1,41 +1,38 @@
 <?php
-
 ////////////////////
-// 由CodeGenerator创建。
-// Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
-// author: gwang
-// 日期: 2024-09-06 10:15:03
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2024-09-11 16:17:06
 ////////////////////
 
 namespace loyalsoft;
 
 /**
- * 常量配置数据
+ * 常量配置数据 
  */
 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 分区是否使用独立的常量配置数据
      */
     private static $useZoneId = false;
-
     /**
      * 追加分区列表字符串
      * @return string
      */
-    private static function zoneid() {
+    private static function zoneid()
+    {
         global $zoneid;
         return self::$useZoneId ? "-zone$zoneid" : "";
     }
-
+	
     /**
      * @return ClientVersion
      */
@@ -87,785 +84,817 @@ class GameConfig {
         }
         return null;
     }
-
 // </editor-fold>
-
     /**
-     * 全局参数
-     * @return \globalsettings
-     */
-    public static function globalsettings() {
-        static $a = null;
+    * 全局参数
+    * @return \globalsettings
+    */
+    public static function globalsettings()
+    { 
+        static $a = null; 
         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 \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 \item
-     */
-    public static function item() {
-        static $a = null;
+    * 道具表
+    * @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 \sm_item item item数据 
+    */
+    public static function item_getItem($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 \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 \clientVersionHistory
-     */
-    public static function clientVersionHistory() {
-        static $a = null;
+    * 客户端版本信息
+    * @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 \sm_clientVersionHistory clientVersionHistory item数据 
+    */
+    public static function clientVersionHistory_getItem($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 \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 \skills
-     */
-    public static function skills() {
-        static $a = null;
+    * 技能表
+    * @return \skills
+    */
+    public static function skills()
+    { 
+        static $a = null; 
         return self::initValue($a, 'skills');
     }
-
     /**
-     * @return \sm_skills skills item数据
-     */
-    public static function skills_getItem($itemid) {
+    * @return \sm_skills skills item数据 
+    */
+    public static function skills_getItem($itemid)
+    { 
         return self::get_hash_item('skills', $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 \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 \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 \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 \gate
-     */
-    public static function gate() {
-        static $a = null;
+    * 章节表
+    * @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 \sm_gate gate item数据 
+    */
+    public static function gate_getItem($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 \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 \equip
-     */
-    public static function equip() {
-        static $a = null;
+    * 装备表
+    * @return \equip
+    */
+    public static function equip()
+    { 
+        static $a = null; 
         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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \predicate
-     */
-    public static function predicate() {
-        static $a = null;
+    * 词条配置表
+    * @return \predicate
+    */
+    public static function predicate()
+    { 
+        static $a = null; 
         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 \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 \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 \evolve
-     */
-    public static function evolve() {
-        static $a = null;
+    * 进化表
+    * @return \evolve
+    */
+    public static function evolve()
+    { 
+        static $a = null; 
         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);
     }
-
     /**
-     * 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 \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 \gem
-     */
-    public static function gem() {
-        static $a = null;
+    * 宝石表
+    * @return \gem
+    */
+    public static function gem()
+    { 
+        static $a = null; 
         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 \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 \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 \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 \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 \heroattr
-     */
-    public static function heroattr() {
-        static $a = null;
+    * 人物属性
+    * @return \heroattr
+    */
+    public static function heroattr()
+    { 
+        static $a = null; 
         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 \plots
-     */
-    public static function plots() {
-        static $a = null;
+    * 剧情对话
+    * @return \plots
+    */
+    public static function plots()
+    { 
+        static $a = null; 
         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 \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 \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 \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 \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);
     }
-
     /**
-     * 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 \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 \activeTask
-     */
-    public static function activeTask() {
-        static $a = null;
+    * 活动任务
+    * @return \activeTask
+    */
+    public static function activeTask()
+    { 
+        static $a = null; 
         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 \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 \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 \activity
-     */
-    public static function activity() {
-        static $a = null;
+    * 活动
+    * @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 \sm_activity activity item数据 
+    */
+    public static function activity_getItem($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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \waveItem
-     */
-    public static function waveItem() {
-        static $a = null;
+    * 辅助: 波次直查
+    * @return \waveItem
+    */
+    public static function waveItem()
+    { 
+        static $a = null; 
         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 \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 \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 \heroType_typeId
-     */
-    public static function heroType_typeId() {
-        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 \sm_heroType_typeId heroType_typeId itemArray 
+    */
+    public static function heroType_typeId_getItemArray($key)
+    { 
         return self::get_hash_item('heroType_typeId', $key);
     }
-
     /**
-     * 激活码表
-     * @return \token_gift
-     */
-    public static function token_gift() {
-        static $a = null;
+    * 激活码表
+    * @return \token_gift
+    */
+    public static function token_gift()
+    { 
+        static $a = null; 
         return self::initValue($a, 'token_gift');
     }
-
     /**
-     * @return \sm_token_gift token_gift item数据
-     */
-    public static function token_gift_getItem($itemid) {
+    * @return \sm_token_gift token_gift item数据 
+    */
+    public static function token_gift_getItem($itemid)
+    { 
         return self::get_hash_item('token_gift', $itemid);
     }
-
     /**
-     * 公共兑换码
-     * @return \token_publicgift
-     */
-    public static function token_publicgift() {
-        static $a = null;
+    * 公共兑换码
+    * @return \token_publicgift
+    */
+    public static function token_publicgift()
+    { 
+        static $a = null; 
         return self::initValue($a, 'token_publicgift');
     }
-
     /**
-     * @return \sm_token_publicgift token_publicgift item数据
-     */
-    public static function token_publicgift_getItem($itemid) {
+    * @return \sm_token_publicgift token_publicgift item数据 
+    */
+    public static function token_publicgift_getItem($itemid)
+    { 
         return self::get_hash_item('token_publicgift', $itemid);
     }
-
     /**
-     * 游戏功能解锁信息
-     * @return \fun_unlock
-     */
-    public static function fun_unlock() {
-        static $a = null;
+    * 游戏功能解锁信息
+    * @return \fun_unlock
+    */
+    public static function fun_unlock()
+    { 
+        static $a = null; 
         return self::initValue($a, 'fun_unlock');
     }
-
     /**
-     * @return \sm_fun_unlock fun_unlock item数据
-     */
-    public static function fun_unlock_getItem($itemid) {
+    * @return \sm_fun_unlock fun_unlock item数据 
+    */
+    public static function fun_unlock_getItem($itemid)
+    { 
         return self::get_hash_item('fun_unlock', $itemid);
     }
-
     /**
-     * 首充表
-     * @return \firstrecharge_reward
-     */
-    public static function firstrecharge_reward() {
-        static $a = null;
+    * 首充表
+    * @return \firstrecharge_reward
+    */
+    public static function firstrecharge_reward()
+    { 
+        static $a = null; 
         return self::initValue($a, 'firstrecharge_reward');
     }
-
     /**
-     * @return \sm_firstrecharge_reward firstrecharge_reward item数据
-     */
-    public static function firstrecharge_reward_getItem($itemid) {
+    * @return \sm_firstrecharge_reward firstrecharge_reward item数据 
+    */
+    public static function firstrecharge_reward_getItem($itemid)
+    { 
         return self::get_hash_item('firstrecharge_reward', $itemid);
     }
-
     /**
-     * 累计充值
-     * @return \accumulaterecharge
-     */
-    public static function accumulaterecharge() {
-        static $a = null;
+    * 累计充值
+    * @return \accumulaterecharge
+    */
+    public static function accumulaterecharge()
+    { 
+        static $a = null; 
         return self::initValue($a, 'accumulaterecharge');
     }
-
     /**
-     * @return \sm_accumulaterecharge accumulaterecharge item数据
-     */
-    public static function accumulaterecharge_getItem($itemid) {
+    * @return \sm_accumulaterecharge accumulaterecharge item数据 
+    */
+    public static function accumulaterecharge_getItem($itemid)
+    { 
         return self::get_hash_item('accumulaterecharge', $itemid);
     }
-
     /**
-     * 次级功能开启表
-     * @return \subfun_unlock
-     */
-    public static function subfun_unlock() {
-        static $a = null;
+    * 次级功能开启表
+    * @return \subfun_unlock
+    */
+    public static function subfun_unlock()
+    { 
+        static $a = null; 
         return self::initValue($a, 'subfun_unlock');
     }
-
     /**
-     * @return \sm_subfun_unlock subfun_unlock item数据
-     */
-    public static function subfun_unlock_getItem($itemid) {
+    * @return \sm_subfun_unlock subfun_unlock item数据 
+    */
+    public static function subfun_unlock_getItem($itemid)
+    { 
         return self::get_hash_item('subfun_unlock', $itemid);
     }
-
     /**
-     * 商城总表
-     * @return \shop
-     */
-    public static function shop() {
-        static $a = null;
+    * 商城总表
+    * @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 \sm_shop shop item数据 
+    */
+    public static function shop_getItem($itemid)
+    { 
         return self::get_hash_item('shop', $itemid);
     }
-
     /**
-     * 当前版本(时间戳)
-     * @return \ver
-     */
-    public static function ver() {
-        static $a = null;
+    * 转盘抽奖
+    * @return \activity_lottery_tree
+    */
+    public static function activity_lottery_tree()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'activity_lottery_tree');
+    }
+    /**
+    * @return \sm_activity_lottery_tree activity_lottery_tree item数据 
+    */
+    public static function activity_lottery_tree_getItem($itemid)
+    { 
+        return self::get_hash_item('activity_lottery_tree', $itemid);
+    }
+    /**
+    * 转盘抽奖累计次数奖励
+    * @return \activity_lotterynum_accumulate
+    */
+    public static function activity_lotterynum_accumulate()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'activity_lotterynum_accumulate');
+    }
+    /**
+    * @return \sm_activity_lotterynum_accumulate activity_lotterynum_accumulate item数据 
+    */
+    public static function activity_lotterynum_accumulate_getItem($itemid)
+    { 
+        return self::get_hash_item('activity_lotterynum_accumulate', $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 \client
+    */
+    public static function client()
+    { 
+        static $a = null; 
         return self::initValue($a, 'client', false);
     }
 }
+

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-11 16:17:06
+ // 日期: 2024-09-12 13:50:51
 ////////////////////
 
 /**

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-09 15:10:25
+ // 日期: 2024-09-12 10:35:31
 ////////////////////
 
 
@@ -43,6 +43,11 @@ class sm_fun_unlock
     */
     public $unlockType;
 
+    /**
+    * @var Int32 解锁条件2  
+    */
+    public $unlockType2;
+
     /**
     * @var Int32 对应条件的关卡ID  
     */

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-09-11 16:12:21
+ // 日期: 2024-09-12 11:05:50
 ////////////////////
 
 
@@ -294,7 +294,7 @@ class sm_globalsettings
     public $activity_lottery_tree_ten_cost;
 
     /**
-    * @var int 10个元宝兑换转盘抽奖一个抽奖券  
+    * @var int 200元宝兑换转盘抽奖一个抽奖券  
     */
     public $activity_lottery_oneCost_cash;
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-30 14:04:10
+ // 日期: 2024-09-12 11:05:50
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2024-08-15 16:43:50
+ // 日期: 2024-09-12 10:44:29
 ////////////////////
 
 

+ 12 - 0
Gameserver/App/model/User/Info_PrivateState.php

@@ -301,6 +301,18 @@ class Info_PrivateState extends Object_ext {
      * @var int 上次改名时间戳
      */
     public $lastRenameTs = 0;
+    
+    /**
+     * 转盘抽奖累计次数
+     * @var type
+     */
+    public $lotteryNum = 0;
+
+    /**
+     * 抽奖得到过紫色品阶的宝石
+     * @var type
+     */
+    public $lottery_qualGem_4 = 0;
 
     public function initialize() {
         $this->junbeiShopNumRecord = new \stdClass();

+ 81 - 0
Gameserver/App/process/ActiveProc.php

@@ -26,11 +26,92 @@ class ActiveProc {
                 return ActiveProc::Day7_DrawReward();
             case CmdCode::cmd_active_drawPackageByCode:                         # 6102 兑换码礼包
                 return ActiveProc::drawPackageByCode();
+            case CmdCode::cmd_active_lottery_Tree:                              # 6103 转盘抽奖
+                return ActiveProc::lottery_Tree();
+            case CmdCode::cmd_active_lottery_Tree_cashExchange:                 # 6104 元宝兑换抽奖券
+                return ActiveProc::lottery_Tree_cashExchange();    
             default:
                 Err(ErrCode::cmd_err);
         }
     }
+    
+    /**
+     *  6103 转盘抽奖
+     */
+    public static function lottery_Tree() {
+        list($num) = req()->paras;//抽奖次数 1  10
+ 
+        $arr = array(1,10);
+        my_Assert(in_array($num, $arr),ErrCode::active_lotteryNumErr);
+        my_Assert(ctx()->privateState->lotteryNum + $num <= glc()->activity_lottery_allNum,ErrCode::active_lotteryNumLimit);
+        
+        $cost ="";
+        if($num == 1){
+            $cost = glc()->activity_lottery_tree_one_cost;
+        } else {
+            $cost = glc()->activity_lottery_tree_ten_cost;
+        }
+        my_Assert($cost != "",ErrCode::active_lotteryCostErr);
+        $costArr = explode(',', $cost);     
+        $item = ctx()->store->items;        
+        $costId = $costArr[0];
+        $costNum = $costArr[1];
+        my_Assert(StlUtil::dictHasProperty($item, $costId) && $item->$costId >= $costNum,ErrCode::notenough_item);        
+        ctx()->store->removeItem($costId, $costNum);       
+        ctx()->privateState->lotteryNum += $num;        
+        
+        $rewardList = array();
+        $dic = GameConfig::activity_lottery_tree();
+        for ($i = 0; $i < $num; $i++) {
+            $randNum = random_int(1, 10000);
+            $start = 0; 
+            $end = 0;
+            foreach ($dic as $id => $mo) {
+                $end += $mo->per * 10000;
+                if($randNum > $start && $randNum <= $end){
+                    $rewardList[] = $id;
+                    StoreProc::AddMultiItemInStore($mo->reward);
+                    $prize = explode(',', $mo->reward);
+                    if(GameConfig::item_getItem($prize[0])->itemType == 201 && GameConfig::item_getItem($prize[0])->quality >= 4 && ctx()->privateState->lottery_qualGem_4 == 0){
+                        ctx()->privateState->lottery_qualGem_4 = 1;
+                    }
+                    
+                    break;
+                }
+                $start = $end;
+            }           
+        }          
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    "store" => ctx()->store,
+                    'reward' => StoreProc::$reward,
+                    'reward_Gem' => StoreProc::$reward_Gem,
+                    'gold' => ctx()->baseInfo->gold,
+                    'cash' => ctx()->baseInfo->cash,
+                    'lotteryNum'=> ctx()->privateState->lotteryNum,
+                    'indexReward'=> $rewardList,
+            
+        ));
+    }
 
+    public static function lottery_Tree_cashExchange() {
+        list($num) = req()->paras;//抽奖次数 1  10
+        
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    "store" => ctx()->store,
+                    'reward' => StoreProc::$reward,
+                    'reward_Gem' => StoreProc::$reward_Gem,
+                    'gold' => ctx()->baseInfo->gold,
+                    'cash' => ctx()->baseInfo->cash,
+                    'lotteryNum'=> ctx()->privateState->lotteryNum,
+                    'indexReward'=> $rewardList,
+            
+        ));
+    }
+    
+    
     /**
      *  6102 兑换码礼包
      */

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

@@ -794,6 +794,8 @@ class StoreProc {
                 case 401://启灵石
                 case 301://洗练石
                 case 501://人物碎片
+                case 601://人身果  
+                case 801://寻宝券  
                     self::PutItemsInStore($itemId, $num);
                     if ($itemMo->itemType == 100) {//图纸
                         self::checkEquipUpgradeTip();