王刚 1 éve
szülő
commit
56bffb6df2
1 módosított fájl, 11 hozzáadás és 13 törlés
  1. 11 13
      Gameserver/App/model/User/Info_Store.php

+ 11 - 13
Gameserver/App/model/User/Info_Store.php

@@ -14,41 +14,39 @@ namespace loyalsoft;
  * @author c'y'zhao
  */
 class Info_Store extends Object_ext {
-    
+
     /**
      * 道具
      * @var type
      */
     public $items;
-    
+
     /**
      * 装备
      * @var type
      */
     public $equip;
-    
+
     public function initialize() {
         $this->items = new \stdClass();
         $this->equip = new \stdClass();
     }
-    
+
     public function __construct($arg = null) {
-        if($tag == null){
+        if ($arg == null) {
             $this->items = new \stdClass();
-            $this->equip = new \stdClass();        
-        }else{			
+            $this->equip = new \stdClass();
+        } else {
             parent::__construct($arg);
         }
     }
-    
-    public function removeItem($itemId,$num) {
-        if(StlUtil::dictHasProperty($this->items, $itemId)){
+
+    public function removeItem($itemId, $num) {
+        if (StlUtil::dictHasProperty($this->items, $itemId)) {
             $this->items->$itemId -= $num;
-            if($this->items->$itemId <= 0){
+            if ($this->items->$itemId <= 0) {
                 unset($this->items->$itemId);
             }
         }
-        
-        
     }
 }