浏览代码

BETA: Cleanup and code format for HelperBuffTable.
* Fixed typo in logger.

Zoey76 13 年之前
父节点
当前提交
1e7f7ce29c
共有 1 个文件被更改,包括 26 次插入11 次删除
  1. 26 11
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/HelperBuffTable.java

+ 26 - 11
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/HelperBuffTable.java

@@ -29,23 +29,26 @@ import com.l2jserver.gameserver.model.StatsSet;
 
 
 /**
 /**
  * This class represents the Newbie Helper Buff list
  * This class represents the Newbie Helper Buff list
- * Author: Ayor
+ * @author Ayor
  */
  */
 public class HelperBuffTable
 public class HelperBuffTable
 {
 {
-	
-	private static Logger _log = Logger.getLogger(HennaTable.class.getName());
+	private static Logger _log = Logger.getLogger(HelperBuffTable.class.getName());
 	
 	
 	/** The table containing all Buff of the Newbie Helper */
 	/** The table containing all Buff of the Newbie Helper */
-	private List<L2HelperBuff> _helperBuff;
+	private final List<L2HelperBuff> _helperBuff;
 	
 	
-	/** The player level since Newbie Helper can give the fisrt buff <BR>
-	 *  Used to generate message : "Come back here when you have reached level ...") */
+	/**
+	 * The player level since Newbie Helper can give the fisrt buff <BR>
+	 * Used to generate message : "Come back here when you have reached level ...")
+	 */
 	private int _magicClassLowestLevel = 100;
 	private int _magicClassLowestLevel = 100;
 	private int _physicClassLowestLevel = 100;
 	private int _physicClassLowestLevel = 100;
 	
 	
-	/** The player level above which Newbie Helper won't give any buff <BR>
-	 *  Used to generate message : "Only novice character of level ... or less can receive my support magic.") */
+	/**
+	 * The player level above which Newbie Helper won't give any buff <BR>
+	 * Used to generate message : "Only novice character of level ... or less can receive my support magic.")
+	 */
 	private int _magicClassHighestLevel = 1;
 	private int _magicClassHighestLevel = 1;
 	private int _physicClassHighestLevel = 1;
 	private int _physicClassHighestLevel = 1;
 	
 	
@@ -96,8 +99,8 @@ public class HelperBuffTable
 	
 	
 	/**
 	/**
 	 * Load the Newbie Helper Buff list from SQL Table helper_buff_list
 	 * Load the Newbie Helper Buff list from SQL Table helper_buff_list
-	 * @param HelperBuffData 
-	 * @throws Exception 
+	 * @param HelperBuffData
+	 * @throws Exception
 	 */
 	 */
 	private void fillHelperBuffTable(ResultSet HelperBuffData) throws Exception
 	private void fillHelperBuffTable(ResultSet HelperBuffData) throws Exception
 	{
 	{
@@ -119,26 +122,38 @@ public class HelperBuffTable
 			if ("false".equals(HelperBuffData.getString("is_magic_class")))
 			if ("false".equals(HelperBuffData.getString("is_magic_class")))
 			{
 			{
 				if (HelperBuffData.getInt("lower_level") < _physicClassLowestLevel)
 				if (HelperBuffData.getInt("lower_level") < _physicClassLowestLevel)
+				{
 					_physicClassLowestLevel = HelperBuffData.getInt("lower_level");
 					_physicClassLowestLevel = HelperBuffData.getInt("lower_level");
+				}
 				
 				
 				if (HelperBuffData.getInt("upper_level") > _physicClassHighestLevel)
 				if (HelperBuffData.getInt("upper_level") > _physicClassHighestLevel)
+				{
 					_physicClassHighestLevel = HelperBuffData.getInt("upper_level");
 					_physicClassHighestLevel = HelperBuffData.getInt("upper_level");
+				}
 			}
 			}
 			else
 			else
 			{
 			{
 				if (HelperBuffData.getInt("lower_level") < _magicClassLowestLevel)
 				if (HelperBuffData.getInt("lower_level") < _magicClassLowestLevel)
+				{
 					_magicClassLowestLevel = HelperBuffData.getInt("lower_level");
 					_magicClassLowestLevel = HelperBuffData.getInt("lower_level");
+				}
 				
 				
 				if (HelperBuffData.getInt("upper_level") > _magicClassHighestLevel)
 				if (HelperBuffData.getInt("upper_level") > _magicClassHighestLevel)
+				{
 					_magicClassHighestLevel = HelperBuffData.getInt("upper_level");
 					_magicClassHighestLevel = HelperBuffData.getInt("upper_level");
+				}
 			}
 			}
 			if ("true".equals(HelperBuffData.getString("forSummon")))
 			if ("true".equals(HelperBuffData.getString("forSummon")))
 			{
 			{
 				if (HelperBuffData.getInt("lower_level") < _servitorLowestLevel)
 				if (HelperBuffData.getInt("lower_level") < _servitorLowestLevel)
+				{
 					_servitorLowestLevel = HelperBuffData.getInt("lower_level");
 					_servitorLowestLevel = HelperBuffData.getInt("lower_level");
+				}
 				
 				
 				if (HelperBuffData.getInt("upper_level") > _servitorHighestLevel)
 				if (HelperBuffData.getInt("upper_level") > _servitorHighestLevel)
+				{
 					_servitorHighestLevel = HelperBuffData.getInt("upper_level");
 					_servitorHighestLevel = HelperBuffData.getInt("upper_level");
+				}
 			}
 			}
 			// Add this Helper Buff to the Helper Buff List
 			// Add this Helper Buff to the Helper Buff List
 			L2HelperBuff template = new L2HelperBuff(helperBuffDat);
 			L2HelperBuff template = new L2HelperBuff(helperBuffDat);
@@ -198,7 +213,7 @@ public class HelperBuffTable
 	}
 	}
 	
 	
 	/**
 	/**
-	  @return Returns the servitorHighestLevel.
+	 * @return Returns the servitorHighestLevel.
 	 */
 	 */
 	public int getServitorHighestLevel()
 	public int getServitorHighestLevel()
 	{
 	{