Browse Source

活动+商城

gwang 4 năm trước cách đây
mục cha
commit
66800fc4a8
37 tập tin đã thay đổi với 796 bổ sung190 xóa
  1. 9 0
      Gameserver/Amfphp/Services/TestServer.php
  2. 30 0
      Gameserver/Amfphp/base/CmdCode.php
  3. 17 25
      Gameserver/Amfphp/base/ErrCode.php
  4. 49 3
      Gameserver/Amfphp/configs/GameConfig.php
  5. 49 1
      Gameserver/Amfphp/model/Const/GameConfig.php
  6. 1 1
      Gameserver/Amfphp/model/Const/primordial_data.php
  7. 1 1
      Gameserver/Amfphp/model/Const/sm_activity.php
  8. 38 0
      Gameserver/Amfphp/model/Const/sm_activity_day7.php
  9. 1 1
      Gameserver/Amfphp/model/Const/sm_activity_onlinegift.php
  10. 6 1
      Gameserver/Amfphp/model/Const/sm_guide_module.php
  11. 1 1
      Gameserver/Amfphp/model/Const/sm_hero.php
  12. 4 3
      Gameserver/Amfphp/model/Const/sm_item_base.php
  13. 6 1
      Gameserver/Amfphp/model/Const/sm_item_package.php
  14. 1 1
      Gameserver/Amfphp/model/Const/sm_item_yanling.php
  15. 93 0
      Gameserver/Amfphp/model/Const/sm_shop_limit.php
  16. 93 0
      Gameserver/Amfphp/model/Const/sm_shop_monthVIP.php
  17. 29 21
      Gameserver/Amfphp/model/Const/sm_sysmail.php
  18. 2 2
      Gameserver/Amfphp/model/Const/sm_tokenGift.php
  19. 1 1
      Gameserver/Amfphp/model/Const/sm_yanling_upgrade.php
  20. 3 4
      Gameserver/Amfphp/model/User/PrivateStateModel.php
  21. 3 3
      Gameserver/Amfphp/model/User/UserGameModel.php
  22. 4 2
      Gameserver/Amfphp/model/User/UserPVPModel.php
  23. 47 0
      Gameserver/Amfphp/model/User/UserShopInfoModel.php
  24. 92 72
      Gameserver/Amfphp/process/ActiveProc.php
  25. 12 0
      Gameserver/Amfphp/process/EmailProc.php
  26. 1 0
      Gameserver/Amfphp/process/PayProc.php
  27. 165 0
      Gameserver/Amfphp/process/ShopProc.php
  28. 6 0
      Gameserver/Amfphp/process/SystemProc.php
  29. 1 0
      Gameserver/Amfphp/process/UserProc.php
  30. 4 19
      Gameserver/Amfphp/test.php
  31. 10 17
      Gameserver/BackOffice/modules/mainmenu.php
  32. BIN
      Gameserver/Public/app_files/1.png
  33. 0 0
      Gameserver/Public/app_files/id.css
  34. 2 2
      Gameserver/Public/app_files/index_cn.css
  35. 4 4
      Gameserver/Public/gonggao.html
  36. 1 1
      Gameserver/nbproject/private/private.properties
  37. 10 3
      Gameserver/nbproject/private/private.xml

+ 9 - 0
Gameserver/Amfphp/Services/TestServer.php

@@ -3,6 +3,7 @@
 namespace loyalsoft;
 
 include_once __DIR__ . '/AppServer.php';
+require_once __DIR__ . '/../process/ActiveProc/CipheredBase32.php';              # 算法库
 
 /**
  * Description of TestServer
@@ -159,4 +160,12 @@ SCR;
         CLog::warn("日志测试", 'log');
     }
 
+    public static function testDecodeToken($token) {
+        echoLine("中文显示");
+        $activeCode = CipheredBase32::Decode($token);                      # 解码
+        var_dump($activeCode);
+        $codePlatStr = GameConstants::GetPlatStringByActivteCode($activeCode);  # platstr
+        var_dump($codePlatStr);
+    }
+
 }

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

@@ -76,6 +76,31 @@ class CmdCode {
 //
 // </editor-fold>
 //
+// </editor-fold>
+// 
+// <editor-fold defaultstate="collapsed" desc="商城 - 71xx ">
+// 
+
+    /**
+     * 限购礼包主界面
+     */
+    const shop_limit_maininfo = 7101;
+
+    /**
+     * 购买限购礼包
+     */
+    const shop_limit_buy = 7102;
+
+    /**
+     * 月卡信息
+     */
+    const shop_monthlyVIP_Info = 7103;
+
+    /**
+     * 购买月卡
+     */
+    const shop_monthlyVIP_Buy = 7104;
+// 
 // </editor-fold>
     //
     // <editor-fold defaultstate="collapsed" desc="用户操作码 - 60xx">
@@ -510,6 +535,11 @@ class CmdCode {
      */
     const active_getzonePublicTs = 6503;
 
+    /**
+     * 查询当日在线时长信息
+     */
+    const active_getTodayOnlineInfos = 6504;
+
 //    /**
 //     * 普通任务 - 完成任务
 //     */

+ 17 - 25
Gameserver/Amfphp/base/ErrCode.php

@@ -781,9 +781,9 @@ class ErrCode {
     const active_day7_const_no_err = 3939;
 
     /**
-     * 开服七日活动 - 总数不足
+     * 开服七日活动 - 总数不足
      */
-    const active_day7_totaldianshu = 3940;
+    const active_day7_totaldays = 3940;
 
     /**
      * 开服七日活动 - 找不到任务
@@ -1006,6 +1006,7 @@ class ErrCode {
      */
     const rank_passsgate_unlocked = 4103;
 // </editor-fold>
+// 
 // <editor-fold defaultstate="collapsed" desc="   邮件错误码 42xx   ">
 
     /**
@@ -1029,29 +1030,7 @@ class ErrCode {
     const email_appendix_drawed = 4204;
 
 // </editor-fold>
-// 
-// ------------神兽碎片融合模块错误码---------
-
-    /**
-     * 找不到碎片的常量数据
-     */
-    const err_segment_const_no = 4500;
-// -------------- 图鉴 相关错误码 ---------------
-
-    /**
-     * 图鉴-找不到神兽的常量数据
-     */
-    const err_manual_const_no = 4600;
-
-    /**
-     * 图鉴-领奖-尚未获得神兽
-     */
-    const err_manual_reward_nopet = 4601;
-
-    /**
-     * 图鉴-领奖-数量不对
-     */
-    const err_manual_reward_wrongamt = 4602;
+//  
 //
     // <editor-fold defaultstate="collapsed" desc="    拍卖 47xx    ">
 
@@ -1387,6 +1366,19 @@ class ErrCode {
      * 公会战 在战斗中
      */
     const err_guild_applyconditionnoenough = 4858;
+// </editor-fold>
+// 
+// <editor-fold defaultstate="collapsed" desc=" 商城错误码 49xx">
+
+    /**
+     * 限购礼包-购买数量已达上限
+     */
+    const shop_limit_max = 4901;
+
+    /**
+     * 月卡已购买,失效前不可再次购买
+     */
+    const shop_monthlyvip_buyed = 4902;
 
 // </editor-fold>
 //

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

@@ -6,7 +6,7 @@ namespace loyalsoft;
 // 由CodeGenerator创建。
 // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
 // author: gwang 
-// 日期: 2020-08-03 16:46:29
+// 日期: 2020-08-19 09:31:51
 ////////////////////
 
 /**
@@ -271,8 +271,6 @@ class GameConfig {
     }
 
     /**
-     * @param type $chapterId
-     * @param type $hardLevel
      * @return \sm_gate_starreward gate_starreward item数据 
      */
     public static function gate_starreward_getItem($chapterId, $hardLevel) {
@@ -1282,6 +1280,54 @@ class GameConfig {
         return self::get_hash_item('guide_module', $itemid);
     }
 
+    /**
+     * 活动: 七日签到
+     * @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 self::get_hash_item('activity_day7', $itemid);
+    }
+
+    /**
+     * 限购商城
+     * @return \shop_limit
+     */
+    public static function shop_limit() {
+        static $a = null;
+        return self::initValue($a, 'shop_limit');
+    }
+
+    /**
+     * @return \sm_shop_limit shop_limit item数据 
+     */
+    public static function shop_limit_getItem($itemid) {
+        return self::get_hash_item('shop_limit', $itemid);
+    }
+
+    /**
+     * 月卡商城
+     * @return \shop_monthVIP
+     */
+    public static function shop_monthVIP() {
+        static $a = null;
+        return self::initValue($a, 'shop_monthVIP');
+    }
+
+    /**
+     * @return \sm_shop_monthVIP shop_monthVIP item数据 
+     */
+    public static function shop_monthVIP_getItem($itemid) {
+        return self::get_hash_item('shop_monthVIP', $itemid);
+    }
+
     /**
      * 当前版本(时间戳)
      * @return \ver

+ 49 - 1
Gameserver/Amfphp/model/Const/GameConfig.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-08-07 16:06:37
+ // 日期: 2020-08-20 19:57:41
 ////////////////////
 
 /**
@@ -1275,6 +1275,54 @@ class GameConfig {
         return self::get_hash_item('guide_module', $itemid);
     }
     /**
+    * 活动: 七日签到
+    * @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 self::get_hash_item('activity_day7', $itemid);
+    }
+    /**
+    * 限购商城
+    * @return \shop_limit
+    */
+    public static function shop_limit()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'shop_limit');
+    }
+    /**
+    * @return \sm_shop_limit shop_limit item数据 
+    */
+    public static function shop_limit_getItem($itemid)
+    { 
+        return self::get_hash_item('shop_limit', $itemid);
+    }
+    /**
+    * 月卡商城
+    * @return \shop_monthVIP
+    */
+    public static function shop_monthVIP()
+    { 
+        static $a = null; 
+        return self::initValue($a, 'shop_monthVIP');
+    }
+    /**
+    * @return \sm_shop_monthVIP shop_monthVIP item数据 
+    */
+    public static function shop_monthVIP_getItem($itemid)
+    { 
+        return self::get_hash_item('shop_monthVIP', $itemid);
+    }
+    /**
     * 当前版本(时间戳)
     * @return \ver
     */

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

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

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-02-12 08:04:29
+ // 日期: 2020-08-17 18:40:45
 ////////////////////
 
 

+ 38 - 0
Gameserver/Amfphp/model/Const/sm_activity_day7.php

@@ -0,0 +1,38 @@
+<?php
+
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2020-08-17 17:54:49
+////////////////////
+
+
+/**
+ * Static Model activity_day7 活动: 七日签到
+ */
+class sm_activity_day7
+{
+
+    /**
+    * @var Int32 主键  
+    */
+    public $tid;
+
+    /**
+    * @var Int32 第x天(1~7)  
+    */
+    public $day;
+
+    /**
+    * @var String 奖励:itemId,num  
+    */
+    public $reward;
+
+    /**
+    * @var String 备注  
+    */
+    public $desc;
+
+}
+

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-02-12 08:04:30
+ // 日期: 2020-08-19 16:47:47
 ////////////////////
 
 

+ 6 - 1
Gameserver/Amfphp/model/Const/sm_guide_module.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-08-04 18:21:40
+ // 日期: 2020-08-14 10:56:26
 ////////////////////
 
 
@@ -59,5 +59,10 @@ class sm_guide_module
     */
     public $guideDesc;
 
+    /**
+    * @var Int32 引导语位置 1左上 2右上 3左下 4右下  
+    */
+    public $position;
+
 }
 

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

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-07-03 17:04:51
+ // 日期: 2020-08-19 11:00:01
 ////////////////////
 
 

+ 4 - 3
Gameserver/Amfphp/model/Const/sm_item_base.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-08-05 15:16:02
+ // 日期: 2020-08-19 15:39:44
 ////////////////////
 
 
@@ -45,7 +45,7 @@ class sm_item_base
     public $itemDesc;
 
     /**
-    * @var Int32 物品大归类 0 系统 1武器,2碎片,3材料, 4 言灵 default(0) 
+    * @var Int32 物品大归类 0 系统 1武器,2碎片,3材料, 4 言灵, 5 礼包 default(0) 
     */
     public $itemType;
 
@@ -85,7 +85,8 @@ class sm_item_base
     *      YanlingBook =351,          // 言灵召唤书 
     *   
     *      //...合成素材等...
-    *      YanLing = 401,            // 言灵 default(0) 
+    *      YanLing = 401,            // 言灵
+    *      Package_limit =501,    // 限购礼包 default(0) 
     */
     public $subType;
 

+ 6 - 1
Gameserver/Amfphp/model/Const/sm_item_package.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-02-12 08:05:16
+ // 日期: 2020-08-19 15:44:04
 ////////////////////
 
 
@@ -24,5 +24,10 @@ class sm_item_package
     */
     public $contents;
 
+    /**
+    * @var String 备注  
+    */
+    public $desc;
+
 }
 

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

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

+ 93 - 0
Gameserver/Amfphp/model/Const/sm_shop_limit.php

@@ -0,0 +1,93 @@
+<?php
+
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2020-08-20 16:52:47
+////////////////////
+
+
+/**
+ * Static Model shop_limit 限购商城
+ */
+class sm_shop_limit
+{
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。  
+    */
+    public $id;
+
+    /**
+    * @var Int32 商品ID  
+    */
+    public $typeId;
+
+    /**
+    * @var String 名称  
+    */
+    public $name;
+
+    /**
+    * @var Int32 原价  
+    */
+    public $yuanjia;
+
+    /**
+    * @var Int32 现价  
+    */
+    public $price;
+
+    /**
+    * @var Int32 定价类型: 0.RMB(元), 1.钻石(颗), 2.金币(个) default(0) 
+    */
+    public $pricetype;
+
+    /**
+    * @var String 介绍文字  
+    */
+    public $desc;
+
+    /**
+    * @var String 礼包的道具ID,num  
+    */
+    public $reward;
+
+    /**
+    * @var String 商品类型分类: 1,限购礼包,2 月卡, 3 充值  
+    */
+    public $goodsType;
+
+    /**
+    * @var Int32 是否开售: 0 关闭 1开启 default(0) 
+    */
+    public $IsOpen;
+
+    /**
+    * @var Int32 上架排序 default(99999) 
+    */
+    public $Order;
+
+    /**
+    * @var String 物品在商店所属的标签页,每日礼包,每周礼包,每月礼包, 普通月卡,黄金月卡...  
+    */
+    public $subType;
+
+    /**
+    * @var String 礼包图标  
+    */
+    public $icon;
+
+    /**
+    * @var Int32 限购次数 default(0) 
+    */
+    public $limit_num;
+
+    /**
+    * @var Int32 标签: 1 免费,2 特价, 3 超值 default(0) 
+    */
+    public $tagType;
+
+}
+

+ 93 - 0
Gameserver/Amfphp/model/Const/sm_shop_monthVIP.php

@@ -0,0 +1,93 @@
+<?php
+
+////////////////////
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2020-08-20 16:53:02
+////////////////////
+
+
+/**
+ * Static Model shop_monthVIP 月卡商城
+ */
+class sm_shop_monthVIP
+{
+
+    /**
+    * @var Int32 用途未知!!请到数据库中添加字段注释。  
+    */
+    public $id;
+
+    /**
+    * @var Int32 商品ID  
+    */
+    public $typeId;
+
+    /**
+    * @var String 名称  
+    */
+    public $name;
+
+    /**
+    * @var Int32 原价  
+    */
+    public $yuanjia;
+
+    /**
+    * @var Int32 现价  
+    */
+    public $price;
+
+    /**
+    * @var Int32 定价类型: 0.RMB(元), 1.钻石(颗), 2.金币(个)  
+    */
+    public $pricetype;
+
+    /**
+    * @var String 介绍文字  
+    */
+    public $desc;
+
+    /**
+    * @var String 购买时一次性获得内容(物品id,num)  
+    */
+    public $pri_reward;
+
+    /**
+    * @var String 时效期内,每日获得内容(物品id,num)  
+    */
+    public $daily_reward;
+
+    /**
+    * @var String 商品类型分类  
+    */
+    public $goodsType;
+
+    /**
+    * @var Int32 0 关闭 1开启 default(0) 
+    */
+    public $IsOpen;
+
+    /**
+    * @var Int32 上架排序 default(99999) 
+    */
+    public $Order;
+
+    /**
+    * @var Int32 失效期(天) default(99999) 
+    */
+    public $ExpireTs;
+
+    /**
+    * @var String 商品图片名称  
+    */
+    public $icon;
+
+    /**
+    * @var String 物品在商店所属的标签页: 黄金月卡 普通月卡  
+    */
+    public $subType;
+
+}
+

+ 29 - 21
Gameserver/Amfphp/model/Const/sm_sysmail.php

@@ -1,55 +1,63 @@
 <?php
 
 ////////////////////
-// 由CodeGenerator创建。
-// Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
-// author: gwang 
-// 日期: 2020-02-12 08:05:37
+ // 由CodeGenerator创建。
+ // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
+ // author: gwang 
+ // 日期: 2020-08-17 11:29:11
 ////////////////////
 
+
 /**
  * Static Model sysmail 系统邮件
  */
-class sm_sysmail {
+class sm_sysmail
+{
 
     /**
-     * @var Int32 邮件统一编号,只能递增,不能重复使用  
-     */
+    * @var Int32 邮件统一编号,只能递增,不能重复使用  
+    */
     public $id;
 
     /**
-     * @var String 标题  
-     */
+    * @var String 标题  
+    */
     public $title;
 
     /**
-     * @var String 内容  
-     */
+    * @var String 内容  
+    */
     public $content;
 
     /**
-     * @var Int32 道具id  
-     */
+    * @var Int32 【废弃】道具id  
+    */
     public $itemid;
 
     /**
-     * @var Int32 道具数量  
-     */
+    * @var Int32 【废弃】道具数量  
+    */
     public $num;
 
     /**
-     * @var Int32 生效时间ts  
-     */
+    * @var Int32 生效时间ts  
+    */
     public $startts;
 
     /**
-     * @var Int32 过期/失效时间ts default(0) 
-     */
+    * @var Int32 过期/失效时间ts default(1999999999) 
+    */
     public $endts;
 
     /**
-     * @var String 附加数据  
-     */
+    * @var String 附件(奖励字符串:id,num;id,num;...)  
+    */
+    public $appendix;
+
+    /**
+    * @var String 附加数据  
+    */
     public $tag;
 
 }
+

+ 2 - 2
Gameserver/Amfphp/model/Const/sm_tokenGift.php

@@ -4,7 +4,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2020-02-12 08:05:43
+ // 日期: 2020-08-19 14:21:40
 ////////////////////
 
 
@@ -15,7 +15,7 @@ class sm_tokenGift
 {
 
     /**
-    * @var Int32 礼包id  
+    * @var Int32 礼包id(最大255)  
     */
     public $typeId;
 

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

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

+ 3 - 4
Gameserver/Amfphp/model/User/PrivateStateModel.php

@@ -49,15 +49,14 @@ class PrivateStateModel extends Object_ext {
     public $usedTokens = array();
 
     /**
-     * @var int 在线礼包领取时间戳(每日清空)
+     * @var int 在线礼包累计时长
      */
     public $onlineGiftts = 0;
 
     /**
-     *
-     * @var int 当前在线礼包ID(每天清空)
+     * @var List<int> 当前在线礼包ID(每天清空)
      */
-    public $onlineGiftID;
+    public $onlineGiftIDs;
 
     /**
      * @var array 全服注册礼包领取记录

+ 3 - 3
Gameserver/Amfphp/model/User/UserGameModel.php

@@ -21,10 +21,10 @@ class UserGameModel extends HashSaver {
     public $store;
 
     /**
-     * 建筑
+     * 商城
      * @var {}
      */
-    public $buildings;
+    public $shopdata;
 
     /**
      * 英雄
@@ -107,7 +107,7 @@ class UserGameModel extends HashSaver {
      */
     public function __construct($arg = null) {
         if (null === $arg) {                                                    # 未传参数的情况下
-            $this->buildings = ObjectInit();                                    # 建筑数据
+            $this->shopdata = ObjectInit();                                     # 商城数据
             $this->privateState = new PrivateStateModel();                      # 私有字段
             $this->privateState->initialize();                                  # 初始化默认数据
             $this->store = new StoreModel();                                    # 背包数据

+ 4 - 2
Gameserver/Amfphp/model/User/UserPVPModel.php

@@ -136,8 +136,10 @@ class UserPVPModel extends Object_ext {
         }
         if ($this->defTeam[0] <= 0) {
             $one = 1;
-            $teams = req()->userInfo->game->heroTeamConfig->teamDic;
-            $this->defTeam = array_slice($teams->$one->heros, 0, 3);
+            if (null != req()->userInfo) {
+                $teams = req()->userInfo->game->heroTeamConfig->teamDic;
+                $this->defTeam = array_slice($teams->$one->heros, 0, 3);
+            }
         }
     }
 

+ 47 - 0
Gameserver/Amfphp/model/User/UserShopInfoModel.php

@@ -0,0 +1,47 @@
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+namespace loyalsoft;
+
+/**
+ * Description of UserShopInfoModel
+ * 商城相关数据
+ * @author Administrator
+ */
+class UserShopInfoModel extends Object_ext {
+    //put your code here
+
+    /**
+     * 已购每日礼包集合
+     * @var []
+     */
+    public $purchasedDailyLimitPackages = array();
+
+    /**
+     * 已购每周礼包集合
+     * @var []
+     */
+    public $purchasedWeeklyLimitPackages = array();
+
+    /**
+     * 已购每月礼包集合
+     * @var []
+     */
+    public $purchasedMonthlyLimitPackages = array();
+
+    /**
+     * @var int 普通月卡购买时间戳
+     */
+    public $monthlyVIP1_ts = 0;
+
+    /**
+     * @var int 至尊月卡购买时间戳
+     */
+    public $monthlyVIP2_ts = 0;
+
+}

+ 92 - 72
Gameserver/Amfphp/process/ActiveProc.php

@@ -21,16 +21,18 @@ class ActiveProc {
      */
     public static function procMain($req) {
         switch ($req->cmd) {
-            case CmdCode::active_day7_drawreward:                               # 6502 领取奖励
+            case CmdCode::active_day7_drawreward:                               # 6502 领取七日签到奖励
                 return self::Day7_DrawReward($req);
             case CmdCode::active_getzonePublicTs:                               # 6503 查询开服时间戳
                 return ActiveProc::GetZonePublicTS($req);
+            case CmdCode::active_getTodayOnlineInfos:                           # 6504 查询当天在线时长
+                return self::getTotayOnlineInfos($req);
             case CmdCode::Task_Tili:                                            # 6508 体力变化
                 return ActiveProc::RecoveryTili($req);
             case CmdCode::active_token_drawReward:                              # 6512 兑换码礼包
                 return self::drawActivePackageByCode($req);
-            case CmdCode::active_draw_onlinegift:                               # 6513 领取在线礼包
-                return self::drawOnlineGift();
+            case CmdCode::active_draw_onlinegift:                               # 6513 领取在线(时长)礼包
+                return self::drawOnlineGift($req);
             case CmdCode::active_draw_reggift:                                  # 6514 领取全服注册礼包
                 return self::drawRegGift($req);
             case CmdCode::active_presentTili:                                   # 6515 领取在线赠送体力
@@ -134,50 +136,56 @@ class ActiveProc {
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="    在线礼包   ">
 
+    /**
+     * 【6504】查询当天在线时长信息
+     * @param req $req
+     */
+    static function getTotayOnlineInfos($req) {
+        return Resp::ok(array(
+                    "onlineGiftIDs" => $req->userInfo->game->privateState->onlineGiftIDs,
+                    "onlineGiftts" => $req->userInfo->game->privateState->onlineGiftts
+        ));
+    }
+
     /**
      * 6513 领取连续在线礼包
-     * @return type
+     * @param req $req
      */
-    static function drawOnlineGift() {
-        $req = req();
+    static function drawOnlineGift($req) {
         $user = $req->userInfo->game;
         $privateState = new PrivateStateModel($user->privateState);
         $giftid = $req->paras[0];                                               # 提取参数: 礼包的编号
         $giftData = GameConfig::activity_onlinegift_getItem($giftid);           # 在线礼包常量数据
-        if ($giftData == NULL) {
-            return Resp::err(ErrCode::onlinegift_constno_err);
-        }
-        if ($privateState->onlineGiftts + $giftData->onlineSec > now()) {       # 时间未到,不可以领取
-            return Resp::err(ErrCode::onlinegift_timenotenough);
-        }
-        if (!CommUtil::isPropertyExists($privateState, "onlineGiftID")) {#初始化 这个字段
-            $privateState->onlineGiftID = 1;
-        } else {
-            if ($privateState->onlineGiftID == 0) {
-                $privateState->onlineGiftID = 1;
-            }
-        }
+        my_Assert(null != $giftData, ErrCode::onlinegift_constno_err);          # 防御找不到配置数据
+        my_Assert($privateState->onlineGiftts >= $giftData->onlineSec, #        # 时间未到,不可以领取
+                ErrCode::onlinegift_timenotenough);
 
-        if ($privateState->onlineGiftID != $giftid) {                           # 判断礼包ID是否正确,可以领取,
-            return Resp::err(ErrCode::onlinegift_wrongid, $privateState->onlineGiftID . '--->' . $giftid);
+        if (!CommUtil::isPropertyExists($privateState, "onlineGiftIDs") #
+                || !is_array($privateState->onlineGiftIDs)) {
+            $privateState->onlineGiftIDs = array();                             # 初始化 这个字段
         }
-
-        $privateState->onlineGiftts = now();                                    # 更新时间戳
-        $privateState->onlineGiftID = $giftid + 1;                              # 已领礼包ID++
+//        var_dump($privateState->onlineGiftIDs);
+        my_Assert(!in_array($giftid, $privateState->onlineGiftIDs), #            # 判断礼包ID是否已经领取
+                ErrCode::active_hasgetted);
         $err = StoreProc::AddMultiItemInStore($req, $giftData->rewardstr);      # 发放奖励
         if ($err) {
             return Resp::err($err, '发放奖励失败');
         }
+        $privateState->onlineGiftIDs[] = $giftid;                               # 记录已领礼包ID
         $user->privateState = $privateState;
-//        var_dump($privateState);
         $req->userInfo->game = $user;
-        UserProc::updateUserInfo();                                         # 回写用户数据
+        UserProc::updateUserInfo();                                             # 回写用户数据
 
         return Resp::ok(array(
                     'onlineGiftts' => $privateState->onlineGiftts,
-                    'onlineGiftID' => $privateState->onlineGiftID,
-                    'store' => $req->userInfo->game->store
-        ));                                      # 设置返回值
+                    'onlineGiftIDs' => $privateState->onlineGiftIDs,
+                    "reward" => $packageInfo->reward,
+                    'gold' => $req->userInfo->game->baseInfo->gold,
+                    'cash' => $req->userInfo->game->baseInfo->cash,
+                    'tili' => $req->userInfo->game->baseInfo->tili,
+                    'store' => $req->userInfo->game->store,
+                    'hero' => $req->userInfo->game->heros
+        ));                                                                     # 设置返回值
     }
 
     /**
@@ -186,70 +194,56 @@ class ActiveProc {
      */
     static private function ClearOnlineGiftTs($req) {
         $req->userInfo->game->privateState->onlineGiftts = 0;
-        $req->userInfo->game->privateState->onlineGiftID = 1;
+        $req->userInfo->game->privateState->onlineGiftIDs = array();
     }
 
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="    兑换码     ">
 
     /**
-     * 凭兑换码领取礼包
+     * [6512]凭兑换码领取礼包
      * @param Req $req
      */
     static function drawActivePackageByCode($req) {
         $user = new UserGameModel($req->userInfo->game);
-        $privateState = new PrivateStateModel($user->privateState);
-        $activeId = $req->paras[0];                                             # 取参数 活动id
+        $privateState = new PrivateStateModel($user->privateState);             # 快速访问
+        list( $activeId, $codestring) = $req->paras;                            # 取参数 活动id, 兑换码
         $active = GameConfig::activity_getItem($activeId);                      # 活动数据
-        if (null == $active) {
-            return Resp::err(ErrCode::active_const_no_err);
-        }
-        if ($active->startts > now() or $active->endts < now()) {               # 校验开放时间
-            return Resp::err(ErrCode::active_time);
-        }
-        $codestring = $req->paras[1];                                           # 取参数 激活码
-        if (!preg_match("/^[a-kmnp-z2-9]{10}$/", $codestring)) {                # 长度校验(10个字符)
-            return Resp::err(ErrCode::active_activecode_format);
-        }
+        my_Assert(null != $active, ErrCode::active_const_no_err);
+        my_Assert($active->startts <= now() && $active->endts >= now(), ErrCode::active_time); # 校验开放时间
+        my_Assert(preg_match("/^[a-kmnp-z2-9]{10}$/", $codestring), ErrCode::active_activecode_format); # 基础格式校验(10个特定字符)
         $activeCode = CipheredBase32::Decode($codestring);                      # 解码
         $codePlatStr = GameConstants::GetPlatStringByActivteCode($activeCode);  # platstr
-        if (GameConstants::AllPlatStr !== $codePlatStr                          # 忽略全平台礼包
-                && $req->userInfo->getPlatStr() !== $codePlatStr) {             # 平台字符串必须相符
-            return Resp::err(ErrCode::active_activecode_plat, $codePlatStr); #  # 平台错误
-        }
-        if (!is_int($activeCode->number)                                        # 检查 兑换码的编号范围0~50000
-                || $activeCode->number < 1 || $activeCode->number > 50000) {
-            return Resp::err(ErrCode::active_activecode_format);
-        }
+        my_Assert(GameConstants::AllPlatStr == $codePlatStr #                   # 忽略全平台礼包
+                || $req->userInfo->getPlatStr() == $codePlatStr, #              # 平台字符串必须相符
+                ErrCode::active_activecode_plat); #                             # 平台错误
+
+        my_Assert(is_int($activeCode->number) #                                 # 编号为int值
+                && $activeCode->number >= 1 && $activeCode->number <= 50000, #  # 检查 兑换码的编号范围0~50000
+                ErrCode::active_activecode_format);
+
         $packageID = $activeCode->package;                                      # 礼包id
         $packageInfo = GameConfig::tokenGift_getItem($packageID);               # 礼包常量数据
-        if ($packageInfo == null) {                                             # 无效
-            return Resp::err(ErrCode::err_const_no);
-        }
-        if ($packageInfo->expirets < now() || $packageInfo->startTs > now()) {  # 激活码已经失效,或者礼包尚未开启
-            return Resp::err(ErrCode::active_activecode_outtime);
-        }
-        if (in_array($packageID, $privateState->usedTokens)) {                  # 已经领取过该礼包了
-            return Resp::err(ErrCode::active_hasgetted);
-        }
-        if (self::checkActiveCodeIsUsed($activeCode)) {                         # 检查 该激活码是否已经使用过了
-            return Resp::err(ErrCode::active_activecode_used);
-        }                                                                       # 发放礼包,
-        $err = StoreProc::AddMultiItemInStore($req, $packageInfo->reward);
-        if ($err) {
-            return Resp::err($err);
-        }
+        my_Assert(null != $packageInfo, ErrCode::err_const_no);                 # 防御
+        my_Assert($packageInfo->expirets >= now() && $packageInfo->startTs <= now(),
+                ErrCode::active_activecode_outtime);                            # 激活码已经失效,或者礼包尚未开启
+        my_Assert(!in_array($packageID, $privateState->usedTokens), ErrCode::active_hasgetted); # 已经领取过该礼包了
+        my_Assert(!self::checkActiveCodeIsUsed($activeCode), ErrCode::active_activecode_used);  # 检查 该激活码是否已经使用过了
+        $err = StoreProc::AddMultiItemInStore($req, $packageInfo->reward);      # 发放礼包
+        my_Assert(ErrCode::ok == $err, $err);                                   # 防御发放礼包过程出错
         $req->userInfo->game->privateState->usedTokens[] = $packageID;          # 记录领取记录
         $ok = self::setActiveCodeUserRecord($activeCode, $req->uid);            # 插入数据库
-        if (!$ok) {
-            return Resp::err(ErrCode::err_db, daoInst()->getError(TRUE)); #     # 数据库操作失败- 重试
-        }
+        my_Assert($ok, ErrCode::err_db);                                        # 数据库操作失败- 重试
         UserProc::updateUserInfo();                                             # 回存玩家数据
         $ret = array(#                                                          # 返回值
             "plat" => $codePlatStr,
             "packageId" => $activeCode->package,
             "reward" => $packageInfo->reward,
+            'gold' => $req->userInfo->game->baseInfo->gold,
+            'cash' => $req->userInfo->game->baseInfo->cash,
+            'tili' => $req->userInfo->game->baseInfo->tili,
             'store' => $req->userInfo->game->store,
+            'hero' => $req->userInfo->game->heros
         );
         return Resp::ok($ret);                                                  # 返回成功信息
     }
@@ -370,6 +364,17 @@ class ActiveProc {
      */
     static function DailyResetDay7Task($req) {
         $req->userInfo->game->gates->Times = 0;
+
+        $typeID = 6;                                                            #  7日活动
+        $ac = GameConfig::activity_getItem($typeID);
+        my_Assert(null != $ac, ErrCode::err_const_no);
+        $startDay = tsDay($ac->startts);
+        $newLoginDays = array_filter($req->userInfo->game->privateState->LoginDays, # 剔除不符合时间的登录记录
+                function($tsday)use($startDay) {
+            return $startDay <= $tsday;
+        }
+        );
+        $req->userInfo->game->privateState->LoginDays = $newLoginDays;          # 
         if (count($req->userInfo->game->privateState->LoginDays) < 7) {
             $req->userInfo->game->privateState->LoginDays[] = tsDay();
         }
@@ -381,8 +386,23 @@ class ActiveProc {
      */
     static function Day7_DrawReward($req) {
         // 设计7日数据结构
-        // 检查领取条件
-        // 结束
+        list($day) = $req->paras;                                               # 参数: 领取第x天的奖励
+        $private = new PrivateStateModel($req->userInfo->game->privateState);   # 私有数据
+        my_Assert(count($private->LoginDays) >= $day, ErrCode::active_day7_totaldays);
+        my_Assert(!in_array($day, $private->day7_drawed), ErrCode::active_hasgetted);
+        $day_rwd = GameConfig::activity_day7_getItem($day);                     # 查询奖励数据
+        my_Assert(null != $day_rwd, ErrCode::err_const_no);                     # 防御找不到配置
+        StoreProc::AddMultiItemInStore($req, $day_rwd->reward);                 # 发放奖励
+        $private->day7_drawed[] = $day;                                         # 添加领取记录
+        $req->userInfo->game->privateState = $private;                          # 更新数据
+        UserProc::updateUserInfo();                                             # 回存
+        return Resp::ok(array(
+                    'gold' => $req->userInfo->game->baseInfo->gold,
+                    'cash' => $req->userInfo->game->baseInfo->cash,
+                    'tili' => $req->userInfo->game->baseInfo->tili,
+                    'store' => $req->userInfo->game->store,
+                    'hero' => $req->userInfo->game->heros
+        ));                                                                     # 返回值
     }
 
 // </editor-fold>

+ 12 - 0
Gameserver/Amfphp/process/EmailProc.php

@@ -233,6 +233,18 @@ class EmailProc {
 // 
 // <editor-fold defaultstate="collapsed" desc="  插入邮件">
 
+    /**
+     * 系统邮件 - 发送月卡奖励
+     * @param type $zoneid
+     * @param type $uid
+     * @param type $rank
+     */
+    public static function SendMonthlyVIPDailyReward($zoneid, $uid, $cardName, $reward) {
+        $mail = new EmailModel(null, enum_Mail_Type::SysTemMail, "月卡奖励", #
+                $cardName . "每日奖励", $reward);
+        self::InsertMail($zoneid, $uid, $mail);
+    }
+
     /**
      * 系统邮件 - 发送竞技场赛季排行榜奖励
      * @param type $zoneid

+ 1 - 0
Gameserver/Amfphp/process/PayProc.php

@@ -11,6 +11,7 @@ if (PLAT == 'web') {
  * 付费、游戏内消费相关处理
  * 全部动态交易数据需要保存到db作为[存根]
  * @version <br/>
+ *          4.0.0 第四版: 言灵世界 商城模块
  *          2.2.0 第三版: 独立的游戏币<元宝>, 面向多渠道的充值模式, 拉起充值成功后, 给玩家发放元宝. 游戏内部消费元宝,钻石和金币.可以用元宝购买金币和钻石.这一版在上面的PayProc中 * 2015年9月23日 <br/>
  *          2.1.0 mn_pay mn_AddUserCash ... 以 mn_ 打头的函数是第二版, 修改为伪托管模式,除了充值的时候跟腾讯通讯,其余时间自己管理游戏币:钻石. * 2015年7月23日 <br/>
  *          2.0.1 m_pay m_AddUserCash ... 以 m_ 打头的函数是第一版, 完全按照应用宝官方要求托管游戏币的模式开发的.  * 2015年4月23日 <br/>

+ 165 - 0
Gameserver/Amfphp/process/ShopProc.php

@@ -0,0 +1,165 @@
+<?php
+
+/*
+ *
+ */
+
+namespace loyalsoft;
+
+/**
+ * Description of ShopProc
+ * 商城
+ * @author gwang
+ * @version 1.0.0  Created.  2020.8.19 -gwang
+ */
+class ShopProc {
+    //put your code here
+
+    /**
+     * 逻辑分发
+     * 所有的Proc中必须有这样一个方法
+     * @param Req $req
+     */
+    public static function procMain($req) {
+        switch ($req->cmd) {
+            case CmdCode::shop_limit_maininfo:
+                return self::GetLimitMainInfo($req);
+            case CmdCode::shop_limit_buy:
+                return self::BuyLimitPackage($req);
+            case CmdCode::shop_monthlyVIP_Info:
+                return self::GetMonthlyVipInfo($req);
+            case CmdCode::shop_monthlyVIP_Buy:
+                return self::BuyMonthlyVip($req);
+
+            default:
+                Err(ErrCode::cmd_err);
+        }
+    }
+
+    public static function GetMonthlyVipInfo($req) {
+        return Resp::ok(array(
+                    "shopdata" => $req->userInfo->game->shopdata
+        ));
+    }
+
+    public static function BuyMonthlyVip($req) {
+        $packageId = $req->paras[0];                                            # 参数; 礼包id
+        $shopdata = new UserShopInfoModel($req->userInfo->game->shopdata);
+        $packageCfg = GameConfig::shop_monthVIP_getItem($packageId);
+        my_Assert(null != $packageCfg, ErrCode::err_const_no);
+        if ($packageCfg->subType == 4) {
+            my_Assert($shopdata->monthlyVIP1_ts + $packageCfg->ExpireTs * 3600 * 24 < now(), ErrCode::shop_monthlyvip_buyed);
+        } elseif ($packageCfg->subType == 5) {
+            my_Assert($shopdata->monthlyVIP2_ts + $packageCfg->ExpireTs * 3600 * 24 < now(), ErrCode::shop_monthlyvip_buyed);
+        }
+        $err = StoreProc::AddMultiItemInStore($req, $packageCfg->pri_reward);   # 发放一次性奖励
+        my_Assert(ErrCode::ok == $err, $err);
+        if ($packageCfg->subType == 4) {
+            $shopdata->monthlyVIP1_ts = 3600 * 24 * (tsDay() + 1) - 1;
+        } elseif ($packageCfg->subType == 5) {
+            $shopdata->monthlyVIP2_ts = 3600 * 24 * (tsDay() + 1) - 1;
+        }
+        $req->userInfo->game->shopdata = $shopdata;                             # 回写数据
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    "reward" => $packageCfg->pri_reward,
+                    "shopdata" => $shopdata,
+                    'gold' => $req->userInfo->game->baseInfo->gold,
+                    'cash' => $req->userInfo->game->baseInfo->cash,
+                    'tili' => $req->userInfo->game->baseInfo->tili,
+                    'store' => $req->userInfo->game->store,
+                    'hero' => $req->userInfo->game->heros
+        ));
+    }
+
+    /**
+     * 【7101】限购礼包主界面
+     * @param Req $req
+     */
+    public static function GetLimitMainInfo($req) {
+        return Resp::ok(array(
+                    "shopdata" => $req->userInfo->game->shopdata
+        ));
+    }
+
+    /**
+     * 【7102】 购买限购礼包
+     * @param Req $req
+     */
+    public static function BuyLimitPackage($req) {
+        $packageId = $req->paras[0];                                            # 参数; 礼包id
+        $shopdata = new UserShopInfoModel($req->userInfo->game->shopdata);
+        $packageCfg = GameConfig::shop_limit_getItem($packageId);
+        my_Assert(null != $packageCfg, ErrCode::err_const_no);
+
+        $arr = array();
+        switch ((int) $packageCfg->subType) {
+            case 1:
+                $shopdata->purchasedDailyLimitPackages[] = $packageId;
+                $arr = $shopdata->purchasedDailyLimitPackages;
+                break;
+            case 2:
+                $shopdata->purchasedWeeklyLimitPackages[] = $packageId;
+                $arr = $shopdata->purchasedWeeklyLimitPackages;
+                break;
+            case 3:
+                $shopdata->purchasedMonthlyLimitPackages[] = $packageId;
+                $arr = $shopdata->purchasedMonthlyLimitPackages;
+                break;
+            default:
+                Err(ErrCode::err_innerfault);
+        }
+        $hasN = count(array_filter($arr, function($val)use($packageId) {
+                    return $val == $packageId;
+                }));
+        my_Assert($hasN <= $packageCfg->limit_num, ErrCode::shop_limit_max);
+        $itemid = explode(',', $packageCfg->reward)[0];                         # 奖励礼包Id
+        $itemMO = GameConfig::item_package_getItem($itemid);
+        my_Assert(null != $itemMO, ErrCode::err_const_no);
+        $err = StoreProc::AddMultiItemInStore($req, $itemMO->contents);         # 发放奖励
+        my_Assert(ErrCode::ok == $err, $err);
+        $req->userInfo->game->shopdata = $shopdata;                             # 回写数据
+        UserProc::updateUserInfo();
+        return Resp::ok(array(
+                    "reward" => $itemMO->contents,
+                    "shopdata" => $shopdata,
+                    'gold' => $req->userInfo->game->baseInfo->gold,
+                    'cash' => $req->userInfo->game->baseInfo->cash,
+                    'tili' => $req->userInfo->game->baseInfo->tili,
+                    'store' => $req->userInfo->game->store,
+                    'hero' => $req->userInfo->game->heros
+        ));
+    }
+
+    /**
+     * 每日检查
+     * @param req $req
+     */
+    static function DailyCheck($req) {
+        CLog::err("每日检查");
+        $zoneid = $req->zoneid;
+        $uid = $req->uid;
+        $shopdata = new UserShopInfoModel($req->userInfo->game->shopdata);
+        $shopdata->purchasedDailyLimitPackages = array();                       # 每天重置
+        if (date("N") == 1) {                                                   # 周一重置
+            $shopdata->purchasedWeeklyLimitPackages = array();
+        }
+        if (date("d") == 1) {                                                   # 1号重置
+            $shopdata->purchasedMonthlyLimitPackages = array();
+        }
+
+        if ($shopdata->monthlyVIP1_ts + 30 * 24 * 3600 > now()) {
+            $id = 901001;
+            $card1 = GameConfig::shop_monthVIP_getItem($id);
+            my_Assert(null != $card1, ErrCode::err_const_no);
+            EmailProc::SendMonthlyVIPDailyReward($zoneid, $uid, $card1->name, $card1->daily_reward);
+        }
+        if ($shopdata->monthlyVIP2_ts + 30 * 24 * 3600 > now()) {
+            $id = 901002;
+            $card2 = GameConfig::shop_monthVIP_getItem($id);
+            my_Assert(null != $card2, ErrCode::err_const_no);
+            EmailProc::SendMonthlyVIPDailyReward($zoneid, $uid, $card2->name, $card2->daily_reward);
+        }
+    }
+
+}

+ 6 - 0
Gameserver/Amfphp/process/SystemProc.php

@@ -225,6 +225,12 @@ class SystemProc {
             'sysMessage' => $sysMessage,
             'nextFetchTime' => $count
         );
+        $timespan = now() - $req->userInfo->game->baseInfo->lastSaveTs;
+        if ($timespan < 300) {                                                  # 间隔超过5分钟的不算
+            $req->userInfo->game->privateState->onlineGiftts += $timespan;
+            UserProc::updateUserInfo();
+        }
+
         return Resp::ok($ret);                                                  # 返回信息
     }
 

+ 1 - 0
Gameserver/Amfphp/process/UserProc.php

@@ -418,6 +418,7 @@ class UserProc {
         self::updatePlatUserRecord($req, $isnew);                               # 添加到到当天活跃玩家记录集合
         ActiveProc::DailyReset($req);                                           # 抽奖、每日任务状态,计数器...
         FightProc::ClearByDay($req);                                            # 战斗相关状态每日清理
+        ShopProc::DailyCheck($req);
     }
 
 // <editor-fold defaultstate="collapsed" desc="创建新用户">

+ 4 - 19
Gameserver/Amfphp/test.php

@@ -8,24 +8,9 @@ include __DIR__ . '/main.php';
 //set_time_limit(15);                                                           # 设置执行超时时间
 echoLine("phpver:" . PHP_VERSION);
 
+echoLine(intval(4.16));
 
-$int = 400001;
-$mask = 100000;
 
-function mask($num, $mask) {
-//    return intval($num / $mask) * $mask;
-    return intval($num / $mask);
-}
-
-$str = <<<AAA
-        mm
-        ll
-AAA;
-echo $str;
-
-var_dump(0 == "0");
-var_dump(is_null("0"));
-var_dump(mask($int, $mask));
-
-
-var_dump(strlen(""));
+var_dump(date("d"));
+var_dump(date("N"));
+var_dump(3600 * 24 * (tsDay() + 1));

+ 10 - 17
Gameserver/BackOffice/modules/mainmenu.php

@@ -10,13 +10,11 @@ use loyalsoft\RenderTime;
  * 后台主界面
  * @author gwang (mail@wanggangzero.cn)
  */
-class MainMenu extends core
-{
+class MainMenu extends core {
 
 //put your code here
 
-    public static function index()
-    {
+    public static function index() {
         if (self::_checkGrant()) {
             self::view('mainmenu.tpl');
         } else {
@@ -24,8 +22,7 @@ class MainMenu extends core
         }
     }
 
-    public static function login()
-    {
+    public static function login() {
 // 访问授权控制
         $accessManager = new Amfphp_BackOffice_AccessManager();
         $isAccessGranted = $accessManager->isAccessGranted();
@@ -69,8 +66,7 @@ class MainMenu extends core
         self::view('login.tpl', compact('redirectToHome', 'errorMessage'));
     }
 
-    public static function debug()
-    {
+    public static function debug() {
         if (self::_checkGrant()) {
             self::view(__FUNCTION__ . ".tpl");
         } else {
@@ -78,8 +74,7 @@ class MainMenu extends core
         }
     }
 
-    public static function monitor()
-    {
+    public static function monitor() {
         if (self::_checkGrant()) {
             self::view(__FUNCTION__ . ".tpl");
         } else {
@@ -87,8 +82,7 @@ class MainMenu extends core
         }
     }
 
-    public static function call()
-    {
+    public static function call() {
         if (self::_checkGrant()) {
             $params = loyalsoft\query_paras();
             $className = $params['className'];
@@ -102,12 +96,12 @@ class MainMenu extends core
                 $content = ob_end_flush();
                 $rt->end();
                 if (strlen($content) > 0) {
-                    echoLine("输出: " . $content);
+                    echo("输出: " . $content);
                 }
                 echo "<hr/><hr/>";
-                echoLine("返回值: " . json_encode($result));
+                echo("返回值: " . json_encode($result));
                 echo "<hr/><hr/>";
-                echoLine("耗时:", $rt->getRenderTime());
+                echo("耗时:" . $rt->getRenderTime());
             }
         } else {
             self::login();
@@ -118,8 +112,7 @@ class MainMenu extends core
      * 查验授权
      * @return boolean
      */
-    private static function _checkGrant()
-    {  // 访问授权控制
+    private static function _checkGrant() {  // 访问授权控制
         $accessManager = new Amfphp_BackOffice_AccessManager();
         return $accessManager->isAccessGranted();
     }

BIN
Gameserver/Public/app_files/1.png


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
Gameserver/Public/app_files/id.css


+ 2 - 2
Gameserver/Public/app_files/index_cn.css

@@ -123,8 +123,8 @@ a:active {
 }
 
 .service_list .server-tab .cur {
-    background: #21cd97;
-    background: #21cd97;
+    background: #004080;
+    background: #004080;
     color: #212121;
     color: #ffffff
 }

+ 4 - 4
Gameserver/Public/gonggao.html

@@ -77,7 +77,7 @@
                 </ul>
 
                 <div class="contantbox  right-box" style="height: 580px;">
-                    <div class="tab-pane server-con-item   active" style="background-image: url(&quot;app_files/1596532769.jpg&quot;); display: block;">
+                    <div class="tab-pane server-con-item   active" style="background-image: url(&quot;app_files/1.png&quot;); display: block;">
                         <div class="server-con-item-wrapper animated fadeInUp">
                             <div class="server-con-item-wrapper-con">
                                 <div class="server-con-item-title"><b>版本更新公告</b></div>
@@ -92,7 +92,7 @@
                             <a href="http://www.game7000.com/loyalsoft/" title="企业展示网站" class="btn btn-block btn-more" target="_self">前往官网</a>
                         </div>
                     </div>
-                    <div class="tab-pane server-con-item     " style="background-image: url(&quot;app_files/1596532632.jpg&quot;); display: none;">
+                    <div class="tab-pane server-con-item     " style="background-image: url(&quot;app_files/1.png&quot;); display: none;">
                         <div class="server-con-item-wrapper animated fadeInUp">
                             <div class="server-con-item-wrapper-con">
                                 <div class="server-con-item-title"><b>实名认证与防沉迷</b></div>
@@ -141,7 +141,7 @@
                             <a href="http://www.game7000.com/loyalsoft/" title="购物商场网站" class="btn btn-block btn-more" target="_blank">前往官网</a>
                         </div>
                     </div>
-                    <div class="tab-pane server-con-item     " style="background-image: url(&quot;app_files/1596532769.jpg&quot;); display: none;">
+                    <div class="tab-pane server-con-item     " style="background-image: url(&quot;app_files/1.png&quot;); display: none;">
                         <div class="server-con-item-wrapper animated fadeInUp">
                             <div class="server-con-item-wrapper-con">
                                 <div class="server-con-item-title"><b>严禁第三方交易</b></div>
@@ -158,7 +158,7 @@
                             <a href="http://www.game7000.com/loyalsoft/" title="高端定制网站" class="btn btn-block btn-more" target="_blank">前往官网</a>
                         </div>
                     </div>
-                    <div class="tab-pane server-con-item     " style="background-image: url(&quot;app_files/1596532632.jpg&quot;); display: none;">
+                    <div class="tab-pane server-con-item     " style="background-image: url(&quot;app_files/1.png&quot;); display: none;">
                         <div class="server-con-item-wrapper animated fadeInUp">
                             <div class="server-con-item-wrapper-con">
                                 <div class="server-con-item-title"><b>微信/小程序互动</b></div>

+ 1 - 1
Gameserver/nbproject/private/private.properties

@@ -2,6 +2,6 @@ copy.src.files=false
 copy.src.on.open=false
 copy.src.target=
 index.file=index.php
-interpreter=D:\\Program-Files\\wnmp\\php\\php-7.4.6-Win32-vc15-x64\\php.exe
+interpreter=D:\\Program-Files\\wnmp\\php\\php-7.4.9-nts-Win32-vc15-x64\\php.exe
 run.as=SCRIPT
 url=http://localhost/Gameserver/

+ 10 - 3
Gameserver/nbproject/private/private.xml

@@ -12,11 +12,18 @@
     </editor-bookmarks>
     <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
         <group>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/UserShopInfoModel.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/test.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/EmailProc.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/Services/AppServer.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/base/ErrCode.php</file>
-            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/EmailModel.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/PrivateStateModel.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/configs/GameConfig.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/UserPVPModel.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/PayProc.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/ShopProc.php</file>
             <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/base/CmdCode.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/util/TimeUtil.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/model/User/UserGameModel.php</file>
+            <file>file:/D:/local_svn/0_ylsj2019/ylsj2019Server/Gameserver/Amfphp/process/ActiveProc.php</file>
         </group>
     </open-files>
 </project-private>

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác