瀏覽代碼

Little optimization of the previous commit.

_DS_ 15 年之前
父節點
當前提交
b4b44ea06f
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      L2_GameServer/java/com/l2jserver/gameserver/datatables/DoorTable.java

+ 6 - 6
L2_GameServer/java/com/l2jserver/gameserver/datatables/DoorTable.java

@@ -239,14 +239,14 @@ public class DoorTable
 	{
 		_staticItems.put(door.getDoorId(), door);
 
-		final ArrayList<L2DoorInstance> region;
 		if (_regions.contains(door.getMapRegion()))
-			region = _regions.get(door.getMapRegion());
+			_regions.get(door.getMapRegion()).add(door);
 		else
-			region = new ArrayList<L2DoorInstance>();
-
-		region.add(door);
-		_regions.put(door.getMapRegion(), region);
+		{
+			final ArrayList<L2DoorInstance> region = new ArrayList<L2DoorInstance>();
+			region.add(door);
+			_regions.put(door.getMapRegion(), region);
+		}
 	}
 
 	public L2DoorInstance[] getDoors()