cyzhao 3 gadi atpakaļ
vecāks
revīzija
bfdb466664

+ 21 - 6
Gameserver/Amfphp/process/StoreProc.php

@@ -639,14 +639,13 @@ class StoreProc {
     public static function AddMultiItemInStore($goodsStr, $src = 1, $mask = 0) {
         $user = req()->userInfo->game;    
         $ary = explode(";", $goodsStr);       
-        $unlockNum = $user->privateState->expandNum * 5;      
-        $n = self::countStoreNum();     
+        //$unlockNum = $user->privateState->expandNum * 5;      
+        //$n = self::countStoreNum();            
         foreach ($ary as $value) {
             $val = explode(",", $value);
             $cid = "";
             my_Assert(count($val) > 1, "解析奖励字符串出错");
-            my_Assert($n < $unlockNum + 50, "背包容量不够请扩容");
-            
+                       
             list( $itemId, $num) = $val;                                        # ID, 数量
             $smItem = GameConfig::item_base_getItem($itemId);                   # 道具mo
             switch ($smItem->subType) {                                         # 根据类型分别添加到容器中
@@ -803,8 +802,12 @@ class StoreProc {
      * 将装备放入背包
      * @param type $itemId
      */
-    static function PutEquipInStore($itemId) {
+    static function PutEquipInStore($itemId) {              
         $privateState = req()->userInfo->game->privateState;
+        $unlockNum = $privateState->expandNum * 5;      
+        $n = self::countStoreNum();     
+	my_Assert($n<$unlockNum+50, "背包容量不够请扩容");
+        
         if (!CommUtil::isPropertyExists($privateState, "currentId")) {          // 如果仓库中已经有这种元素,则其数目+1
             req()->userInfo->game->privateState->currentId = 1;
         }
@@ -825,8 +828,12 @@ class StoreProc {
      * @param type $itemId
      */
     static function PutYanLingInStore($itemId) {
-        my_Assert(count((array) req()->userInfo->game->store->yanling) < 100, ErrCode::store_yanling_bagfull);
+        //my_Assert(count((array) req()->userInfo->game->store->yanling) < 100, ErrCode::store_yanling_bagfull);
         $privateState = req()->userInfo->game->privateState;
+        $unlockNum = $privateState->expandNum * 5;      
+        $n = self::countStoreNum();     
+	my_Assert($n<$unlockNum+50, "背包容量不够请扩容");
+        
         if (!CommUtil::isPropertyExists($privateState, "currentId")) {          # 如果仓库中已经有这种元素,则其数目+1
             req()->userInfo->game->privateState->currentId = 1;
         }
@@ -847,6 +854,10 @@ class StoreProc {
      */
     static function PutTaskCardInStore($itemId) {
         $privateState = req()->userInfo->game->privateState;
+        $unlockNum = $privateState->expandNum * 5;      
+        $n = self::countStoreNum();     
+	my_Assert($n<$unlockNum+50, "背包容量不够请扩容");
+        
         if (!CommUtil::isPropertyExists($privateState, "currentId")) {          # 如果仓库中已经有这种元素,则其数目+1
             req()->userInfo->game->privateState->currentId = 1;
         }
@@ -892,6 +903,10 @@ class StoreProc {
      * @param int $num
      */
     static function PutOverlyingItemInStore($itemId, $num = 1) {
+        $unlockNum = req()->userInfo->game->privateState->expandNum * 5;      
+        $n = self::countStoreNum();     
+	my_Assert($n < $unlockNum+50, "背包容量不够请扩容");
+      
         $items = req()->userInfo->game->store->items;                           # dic: itemid=>number
         if (CommUtil::isPropertyExists($items, $itemId)) {                      # 如果仓库中已经有这种元素,则其数目+=num
             $items->$itemId += $num;

+ 8 - 0
Gameserver/Public/gamesys/app/providers/text.php

@@ -0,0 +1,8 @@
+<?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.
+ */
+

+ 24 - 0
Gameserver/Public/gamesys/home/js/index.js

@@ -493,6 +493,30 @@
                         "F_ModifyUserId": "System",
                         "F_ModifyUserName": "超级管理员"
                     },
+                    {
+                        "F_ModuleId": "7ae94059-9aa5-48eb-8330-4e2a6565b193",
+                        "F_ParentId": "1",
+                        "F_EnCode": "AreaManage",
+                        "F_FullName": "text测试",
+                        "F_Icon": "fa fa-leaf",
+                        "F_UrlAddress": "pages/test/test.html",
+                        "F_Target": "iframe",
+                        "F_IsMenu": 1,
+                        "F_AllowExpand": 1,
+                        "F_IsPublic": 0,
+                        "F_AllowEdit": null,
+                        "F_AllowDelete": null,
+                        "F_SortCode": 1,
+                        "F_DeleteMark": 0,
+                        "F_EnabledMark": 1,
+                        "F_Description": "新增用户留存",
+                        "F_CreateDate": "2021-11-25 11:21:20",
+                        "F_CreateUserId": "System",
+                        "F_CreateUserName": "超级管理员",
+                        "F_ModifyDate": "2021-09-13 11:21:20",
+                        "F_ModifyUserId": "System",
+                        "F_ModifyUserName": "超级管理员"
+                    },
                     {
                         "F_ModuleId": "99",
                         "F_ParentId": "0",

+ 20 - 0
Gameserver/Public/gamesys/home/pages/test/text2.html

@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<!--
+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.
+-->
+<html>
+    <head>
+        <title>TODO supply a title</title>
+        <meta charset="UTF-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <style type="text/css">
+body {background-color:yellow}
+p {color:blue}
+</style>
+    </head>
+    <body>
+        <div>TODO write content</div>
+    </body>
+</html>