Browse Source

Merge branch 'dev' into TTT

cyzhao 3 years ago
parent
commit
0ffda56e01
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Gameserver/Amfphp/process/StoreProc.php

+ 4 - 3
Gameserver/Amfphp/process/StoreProc.php

@@ -144,9 +144,10 @@ class StoreProc {
         my_Assert($num <= $mo->num, ErrCode::err_const_no);
         
         my_Assert(ctx()->base(true)->gold >= $cost, ErrCode::notenough_gold_msg);
-
-        req()->userInfo->game->base(true)->Consume_Gold($cost);
-        $goodsStr = $itemid . ',' . $num;
+        
+        ctx()->base(true)->Consume_Gold($cost);
+        $goodsStr = $itemid.','.$num;
+     
         StoreProc::AddMultiItemInStore($goodsStr);
 
         UserProc::updateUserInfo();