Browse Source

神庙券购买

cyzhao 4 years ago
parent
commit
7105b35d44

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-05-18 09:19:34
+ // 日期: 2021-05-20 16:20:02
 ////////////////////
 
 /**

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-05-14 10:38:02
+ // 日期: 2021-05-19 14:21:20
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-05-17 15:45:44
+ // 日期: 2021-05-20 15:02:27
 ////////////////////
 
 

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

@@ -3,7 +3,7 @@
  // 由CodeGenerator创建。
  // Copyright (C) gwang (wanggangzero@qq.com), Loyalsoft@sjz Inc
  // author: gwang 
- // 日期: 2021-05-11 15:43:33
+ // 日期: 2021-05-20 15:01:41
 ////////////////////
 
 

+ 5 - 6
Gameserver/Amfphp/process/ActiveProc.php

@@ -83,19 +83,18 @@ class ActiveProc {
     static function buyShenmiaoDrawTicket() {
         $req = req();  
         list($costId,$num) = $req->paras;  
-        
-        $dic = \GameConfig::shop_getItem($costId);
+     
+        $dic = GameConfig::shop_getItem($costId);      
         my_Assert($dic != null, ErrCode::err_const_no);
         $baseInfo = $req->userInfo->game->baseInfo;
         $costNum = $dic->price * $num;
         my_Assert($baseInfo->cash == $costNum, ErrCode::notenough_cash_msg);
                       
-        $baseInfo->Consume_Cash($costNum);               
-        StoreProc::AddMultiItemInStore($costId.','.$num);
-        
+        req()->userInfo->game->base()->Consume_Cash($costNum);           
+        StoreProc::AddMultiItemInStore($costId.','.$num);       
         UserProc::updateUserInfo();
         return Resp::ok(array(#                                                 # 返回值
-                    'cash' => $baseInfo->cash,         
+                    'cash' => $req->userInfo->game->baseInfo->cash,         
                     'store' => $req->userInfo->game->store,
         ));
     }