Przeglądaj źródła

BETA: Using proper getters and setters for L2CharTemplate.

Zoey76 13 lat temu
rodzic
commit
8562b75263
25 zmienionych plików z 893 dodań i 339 usunięć
  1. 38 38
      L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2AttackableAI.java
  2. 3 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2CharacterAI.java
  3. 3 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2ControllableMobAI.java
  4. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2FortSiegeGuardAI.java
  5. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2SiegeGuardAI.java
  6. 24 24
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/NpcTable.java
  7. 5 5
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/L2Npc.java
  8. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2CubicInstance.java
  9. 4 4
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
  10. 52 52
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/stat/CharStat.java
  11. 3 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/stat/NpcStat.java
  12. 2 2
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/stat/PcStat.java
  13. 8 8
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/stat/PetStat.java
  14. 4 4
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java
  15. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/MoveBackwardToLocation.java
  16. 6 9
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java
  17. 6 6
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java
  18. 2 2
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/MonRaceInfo.java
  19. 6 9
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/NewCharacterSuccess.java
  20. 4 4
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/PetInfo.java
  21. 2 2
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/UserInfo.java
  22. 11 11
      L2J_Server_BETA/java/com/l2jserver/gameserver/skills/Formulas.java
  23. 701 138
      L2J_Server_BETA/java/com/l2jserver/gameserver/templates/chars/L2CharTemplate.java
  24. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/templates/chars/L2NpcTemplate.java
  25. 4 7
      L2J_Server_BETA/java/com/l2jserver/gameserver/util/Util.java

+ 38 - 38
L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2AttackableAI.java

@@ -672,7 +672,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 			return;
 			return;
 		}
 		}
 		
 		
-		final int collision = npc.getTemplate().collisionRadius;
+		final int collision = npc.getTemplate().getCollisionRadius();
 
 
 		// Handle all L2Object of its Faction inside the Faction Range
 		// Handle all L2Object of its Faction inside the Faction Range
 		
 		
@@ -771,7 +771,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 		setAttackTarget(mostHate);
 		setAttackTarget(mostHate);
 		npc.setTarget(mostHate);
 		npc.setTarget(mostHate);
 
 
-		final int combinedCollision = collision + mostHate.getTemplate().collisionRadius;
+		final int combinedCollision = collision + mostHate.getTemplate().getCollisionRadius();
 
 
 		if (_skillrender.hasSuicideSkill() && (int) ((npc.getCurrentHp() / npc.getMaxHp()) * 100) < 30)
 		if (_skillrender.hasSuicideSkill() && (int) ((npc.getCurrentHp() / npc.getMaxHp()) * 100) < 30)
 		{
 		{
@@ -928,9 +928,9 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 							{
 							{
 								continue;
 								continue;
 							}
 							}
-							if (!Util.checkIfInRange((sk.getCastRange() + collision + leader.getTemplate().collisionRadius), npc, leader, false) && !isParty(sk) && !npc.isMovementDisabled())
+							if (!Util.checkIfInRange((sk.getCastRange() + collision + leader.getTemplate().getCollisionRadius()), npc, leader, false) && !isParty(sk) && !npc.isMovementDisabled())
 							{
 							{
-								moveToPawn(leader, sk.getCastRange() + collision + leader.getTemplate().collisionRadius);
+								moveToPawn(leader, sk.getCastRange() + collision + leader.getTemplate().getCollisionRadius());
 								return;
 								return;
 							}
 							}
 							if (GeoData.getInstance().canSeeTarget(npc, leader))
 							if (GeoData.getInstance().canSeeTarget(npc, leader))
@@ -1006,9 +1006,9 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 							{
 							{
 								continue;
 								continue;
 							}
 							}
-							if (!Util.checkIfInRange((sk.getCastRange() + collision + leader.getTemplate().collisionRadius), npc, leader, false) && !isParty(sk) && !npc.isMovementDisabled())
+							if (!Util.checkIfInRange((sk.getCastRange() + collision + leader.getTemplate().getCollisionRadius()), npc, leader, false) && !isParty(sk) && !npc.isMovementDisabled())
 							{
 							{
-								moveToPawn(leader, sk.getCastRange() + collision + leader.getTemplate().collisionRadius);
+								moveToPawn(leader, sk.getCastRange() + collision + leader.getTemplate().getCollisionRadius());
 								return;
 								return;
 							}
 							}
 							if (GeoData.getInstance().canSeeTarget(npc, leader))
 							if (GeoData.getInstance().canSeeTarget(npc, leader))
@@ -1230,9 +1230,9 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 		if (attackTarget == null)
 		if (attackTarget == null)
 			return false;
 			return false;
 		double dist = Math.sqrt(caster.getPlanDistanceSq(attackTarget.getX(), attackTarget.getY()));
 		double dist = Math.sqrt(caster.getPlanDistanceSq(attackTarget.getX(), attackTarget.getY()));
-		double dist2 = dist - attackTarget.getTemplate().collisionRadius;
-		double range = caster.getPhysicalAttackRange() + caster.getTemplate().collisionRadius + attackTarget.getTemplate().collisionRadius;
-		double srange = sk.getCastRange() + caster.getTemplate().collisionRadius;
+		double dist2 = dist - attackTarget.getTemplate().getCollisionRadius();
+		double range = caster.getPhysicalAttackRange() + caster.getTemplate().getCollisionRadius() + attackTarget.getTemplate().getCollisionRadius();
+		double srange = sk.getCastRange() + caster.getTemplate().getCollisionRadius();
 		if (attackTarget.isMoving())
 		if (attackTarget.isMoving())
 			dist2 = dist2 - 30;
 			dist2 = dist2 - 30;
 		
 		
@@ -1290,9 +1290,9 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 					L2Character leader = caster.getLeader();
 					L2Character leader = caster.getLeader();
 					if (leader != null && !leader.isDead() && Rnd.get(100) > (leader.getCurrentHp() / leader.getMaxHp() * 100))
 					if (leader != null && !leader.isDead() && Rnd.get(100) > (leader.getCurrentHp() / leader.getMaxHp() * 100))
 					{
 					{
-						if (!Util.checkIfInRange((sk.getCastRange() + caster.getTemplate().collisionRadius + leader.getTemplate().collisionRadius), caster, leader, false) && !isParty(sk) && !caster.isMovementDisabled())
+						if (!Util.checkIfInRange((sk.getCastRange() + caster.getTemplate().getCollisionRadius() + leader.getTemplate().getCollisionRadius()), caster, leader, false) && !isParty(sk) && !caster.isMovementDisabled())
 						{
 						{
-							moveToPawn(leader, sk.getCastRange() + caster.getTemplate().collisionRadius + leader.getTemplate().collisionRadius);
+							moveToPawn(leader, sk.getCastRange() + caster.getTemplate().getCollisionRadius() + leader.getTemplate().getCollisionRadius());
 						}
 						}
 						if (GeoData.getInstance().canSeeTarget(caster, leader))
 						if (GeoData.getInstance().canSeeTarget(caster, leader))
 						{
 						{
@@ -1312,7 +1312,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				}
 				}
 				
 				
 				if (sk.getTargetType() == L2TargetType.TARGET_ONE)
 				if (sk.getTargetType() == L2TargetType.TARGET_ONE)
-					for (L2Character obj : caster.getKnownList().getKnownCharactersInRadius(sk.getCastRange() + caster.getTemplate().collisionRadius))
+					for (L2Character obj : caster.getKnownList().getKnownCharactersInRadius(sk.getCastRange() + caster.getTemplate().getCollisionRadius()))
 					{
 					{
 						if (!(obj instanceof L2Attackable) || obj.isDead())
 						if (!(obj instanceof L2Attackable) || obj.isDead())
 							continue;
 							continue;
@@ -1334,7 +1334,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 					}
 					}
 				if (isParty(sk))
 				if (isParty(sk))
 				{
 				{
-					for (L2Character obj : caster.getKnownList().getKnownCharactersInRadius(sk.getSkillRadius() + caster.getTemplate().collisionRadius))
+					for (L2Character obj : caster.getKnownList().getKnownCharactersInRadius(sk.getSkillRadius() + caster.getTemplate().getCollisionRadius()))
 					{
 					{
 						if (!(obj instanceof L2Attackable))
 						if (!(obj instanceof L2Attackable))
 						{
 						{
@@ -1363,9 +1363,9 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 					{
 					{
 						L2Character leader = caster.getLeader();
 						L2Character leader = caster.getLeader();
 						if (leader != null && leader.isDead())
 						if (leader != null && leader.isDead())
-							if (!Util.checkIfInRange((sk.getCastRange() + caster.getTemplate().collisionRadius + leader.getTemplate().collisionRadius), caster, leader, false) && !isParty(sk) && !caster.isMovementDisabled())
+							if (!Util.checkIfInRange((sk.getCastRange() + caster.getTemplate().getCollisionRadius() + leader.getTemplate().getCollisionRadius()), caster, leader, false) && !isParty(sk) && !caster.isMovementDisabled())
 							{
 							{
-								moveToPawn(leader, sk.getCastRange() + caster.getTemplate().collisionRadius + leader.getTemplate().collisionRadius);
+								moveToPawn(leader, sk.getCastRange() + caster.getTemplate().getCollisionRadius() + leader.getTemplate().getCollisionRadius());
 							}
 							}
 						if (GeoData.getInstance().canSeeTarget(caster, leader))
 						if (GeoData.getInstance().canSeeTarget(caster, leader))
 						{
 						{
@@ -1376,7 +1376,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 						}
 						}
 					}
 					}
 					
 					
-					for (L2Character obj : caster.getKnownList().getKnownCharactersInRadius(sk.getCastRange() + caster.getTemplate().collisionRadius))
+					for (L2Character obj : caster.getKnownList().getKnownCharactersInRadius(sk.getCastRange() + caster.getTemplate().getCollisionRadius()))
 					{
 					{
 						if (!(obj instanceof L2Attackable) || !obj.isDead())
 						if (!(obj instanceof L2Attackable) || !obj.isDead())
 							continue;
 							continue;
@@ -1398,7 +1398,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				}
 				}
 				else if (isParty(sk))
 				else if (isParty(sk))
 				{
 				{
-					for (L2Character obj : caster.getKnownList().getKnownCharactersInRadius(sk.getSkillRadius() + caster.getTemplate().collisionRadius))
+					for (L2Character obj : caster.getKnownList().getKnownCharactersInRadius(sk.getSkillRadius() + caster.getTemplate().getCollisionRadius()))
 					{
 					{
 						if (!(obj instanceof L2Attackable))
 						if (!(obj instanceof L2Attackable))
 						{
 						{
@@ -1738,8 +1738,8 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 			if (npc.getTarget() == null)
 			if (npc.getTarget() == null)
 				npc.setTarget(getAttackTarget());
 				npc.setTarget(getAttackTarget());
 			dist = Math.sqrt(npc.getPlanDistanceSq(getAttackTarget().getX(), getAttackTarget().getY()));
 			dist = Math.sqrt(npc.getPlanDistanceSq(getAttackTarget().getX(), getAttackTarget().getY()));
-			dist2 = dist - npc.getTemplate().collisionRadius;
-			range = npc.getPhysicalAttackRange() + npc.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius;
+			dist2 = dist - npc.getTemplate().getCollisionRadius();
+			range = npc.getPhysicalAttackRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius();
 			if (getAttackTarget().isMoving())
 			if (getAttackTarget().isMoving())
 			{
 			{
 				dist = dist - 30;
 				dist = dist - 30;
@@ -1757,7 +1757,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				{
 				{
 					for (L2Skill sk : _skillrender._immobiliseskills)
 					for (L2Skill sk : _skillrender._immobiliseskills)
 					{
 					{
-						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
+						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
 						{
 						{
 							continue;
 							continue;
 						}
 						}
@@ -1780,7 +1780,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				{
 				{
 					for (L2Skill sk : _skillrender._cotskills)
 					for (L2Skill sk : _skillrender._cotskills)
 					{
 					{
-						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
+						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
 						{
 						{
 							continue;
 							continue;
 						}
 						}
@@ -1802,7 +1802,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				{
 				{
 					for (L2Skill sk : _skillrender._debuffskills)
 					for (L2Skill sk : _skillrender._debuffskills)
 					{
 					{
-						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
+						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
 						{
 						{
 							continue;
 							continue;
 						}
 						}
@@ -1825,7 +1825,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				{
 				{
 					for (L2Skill sk : _skillrender._negativeskills)
 					for (L2Skill sk : _skillrender._negativeskills)
 					{
 					{
-						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
+						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
 						{
 						{
 							continue;
 							continue;
 						}
 						}
@@ -1849,7 +1849,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				{
 				{
 					for (L2Skill sk : _skillrender._atkskills)
 					for (L2Skill sk : _skillrender._atkskills)
 					{
 					{
-						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
+						if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
 						{
 						{
 							continue;
 							continue;
 						}
 						}
@@ -1872,7 +1872,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 					{
 					{
 						if(sk.getMpConsume()>=_actor.getCurrentMp()
 						if(sk.getMpConsume()>=_actor.getCurrentMp()
 								|| _actor.isSkillDisabled(sk.getId())
 								|| _actor.isSkillDisabled(sk.getId())
-								||(sk.getCastRange()+ _actor.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius <= dist2 && !canAura(sk))
+								||(sk.getCastRange()+ _actor.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk))
 								||(sk.isMagic()&&_actor.isMuted())
 								||(sk.isMagic()&&_actor.isMuted())
 								||(!sk.isMagic()&&_actor.isPhysicalMuted()))
 								||(!sk.isMagic()&&_actor.isPhysicalMuted()))
 						{
 						{
@@ -1948,8 +1948,8 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 					{
 					{
 						actor.setTarget(getAttackTarget());
 						actor.setTarget(getAttackTarget());
 						dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
 						dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
-						dist2 = dist - actor.getTemplate().collisionRadius;
-						range = sk.getCastRange() + actor.getTemplate().collisionRadius + obj.getTemplate().collisionRadius;
+						dist2 = dist - actor.getTemplate().getCollisionRadius();
+						range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + obj.getTemplate().getCollisionRadius();
 						if (obj.isMoving())
 						if (obj.isMoving())
 							dist2 = dist2 - 70;
 							dist2 = dist2 - 70;
 					}
 					}
@@ -1975,7 +1975,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 						actor.setTarget(getAttackTarget());
 						actor.setTarget(getAttackTarget());
 						dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
 						dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
 						dist2 = dist;
 						dist2 = dist;
-						range = sk.getCastRange() + actor.getTemplate().collisionRadius + obj.getTemplate().collisionRadius;
+						range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + obj.getTemplate().getCollisionRadius();
 						if (obj.isMoving())
 						if (obj.isMoving())
 							dist2 = dist2 - 70;
 							dist2 = dist2 - 70;
 					}
 					}
@@ -2022,8 +2022,8 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 					{
 					{
 						actor.setTarget(getAttackTarget());
 						actor.setTarget(getAttackTarget());
 						dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
 						dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
-						dist2 = dist - actor.getTemplate().collisionRadius;
-						range = sk.getCastRange() + actor.getTemplate().collisionRadius + obj.getTemplate().collisionRadius;
+						dist2 = dist - actor.getTemplate().getCollisionRadius();
+						range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + obj.getTemplate().getCollisionRadius();
 						if (obj.isMoving())
 						if (obj.isMoving())
 							dist2 = dist2 - 70;
 							dist2 = dist2 - 70;
 					}
 					}
@@ -2044,7 +2044,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 			double dist = 0;
 			double dist = 0;
 			double dist2 = 0;
 			double dist2 = 0;
 			int range = 0;
 			int range = 0;
-			range = sk.getCastRange() + actor.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius;
+			range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius();
 			for (L2Character obj : actor.getKnownList().getKnownCharactersInRadius(range))
 			for (L2Character obj : actor.getKnownList().getKnownCharactersInRadius(range))
 			{
 			{
 				if (obj == null || obj.isDead() || !GeoData.getInstance().canSeeTarget(actor, obj))
 				if (obj == null || obj.isDead() || !GeoData.getInstance().canSeeTarget(actor, obj))
@@ -2053,8 +2053,8 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				{
 				{
 					actor.setTarget(getAttackTarget());
 					actor.setTarget(getAttackTarget());
 					dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
 					dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
-					dist2 = dist - actor.getTemplate().collisionRadius;
-					range = sk.getCastRange() + actor.getTemplate().collisionRadius + obj.getTemplate().collisionRadius;
+					dist2 = dist - actor.getTemplate().getCollisionRadius();
+					range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + obj.getTemplate().getCollisionRadius();
 					if (obj.isMoving())
 					if (obj.isMoving())
 						dist2 = dist2 - 70;
 						dist2 = dist2 - 70;
 				}
 				}
@@ -2102,8 +2102,8 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				{
 				{
 					actor.setTarget(getAttackTarget());
 					actor.setTarget(getAttackTarget());
 					dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
 					dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
-					dist2 = dist - actor.getTemplate().collisionRadius;
-					range = sk.getCastRange() + actor.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius;
+					dist2 = dist - actor.getTemplate().getCollisionRadius();
+					range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius();
 					//if(obj.isMoving())
 					//if(obj.isMoving())
 					//	dist2 = dist2 - 40;
 					//	dist2 = dist2 - 40;
 				}
 				}
@@ -2127,7 +2127,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 					actor.setTarget(getAttackTarget());
 					actor.setTarget(getAttackTarget());
 					dist = Math.sqrt(actor.getPlanDistanceSq(target.getX(), target.getY()));
 					dist = Math.sqrt(actor.getPlanDistanceSq(target.getX(), target.getY()));
 					dist2 = dist;
 					dist2 = dist;
-					range = sk.getCastRange() + actor.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius;
+					range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius();
 					//if(obj.isMoving())
 					//if(obj.isMoving())
 					//	dist2 = dist2 - 40;
 					//	dist2 = dist2 - 40;
 				}
 				}
@@ -2183,8 +2183,8 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 				try
 				try
 				{
 				{
 					dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
 					dist = Math.sqrt(actor.getPlanDistanceSq(obj.getX(), obj.getY()));
-					dist2 = dist - actor.getTemplate().collisionRadius;
-					range = actor.getPhysicalAttackRange() + actor.getTemplate().collisionRadius + obj.getTemplate().collisionRadius;
+					dist2 = dist - actor.getTemplate().getCollisionRadius();
+					range = actor.getPhysicalAttackRange() + actor.getTemplate().getCollisionRadius() + obj.getTemplate().getCollisionRadius();
 					if (obj.isMoving())
 					if (obj.isMoving())
 						dist2 = dist2 - 70;
 						dist2 = dist2 - 70;
 				}
 				}

+ 3 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2CharacterAI.java

@@ -915,7 +915,7 @@ public class L2CharacterAI extends AbstractAI
 		if (offset < 0)
 		if (offset < 0)
 			return false; // skill radius -1
 			return false; // skill radius -1
 		
 		
-		if (!_actor.isInsideRadius(worldPosition.getX(), worldPosition.getY(), offset + _actor.getTemplate().collisionRadius, false))
+		if (!_actor.isInsideRadius(worldPosition.getX(), worldPosition.getY(), offset + _actor.getTemplate().getCollisionRadius(), false))
 		{
 		{
 			if (_actor.isMovementDisabled())
 			if (_actor.isMovementDisabled())
 				return true;
 				return true;
@@ -979,9 +979,9 @@ public class L2CharacterAI extends AbstractAI
 		if (offset < 0)
 		if (offset < 0)
 			return false; // skill radius -1
 			return false; // skill radius -1
 		
 		
-		offset += _actor.getTemplate().collisionRadius;
+		offset += _actor.getTemplate().getCollisionRadius();
 		if (target instanceof L2Character)
 		if (target instanceof L2Character)
-			offset += ((L2Character) target).getTemplate().collisionRadius;
+			offset += ((L2Character) target).getTemplate().getCollisionRadius();
 		
 		
 		if (!_actor.isInsideRadius(target, offset, false, false))
 		if (!_actor.isInsideRadius(target, offset, false, false))
 		{
 		{

+ 3 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2ControllableMobAI.java

@@ -197,7 +197,7 @@ public class L2ControllableMobAI extends L2AttackableAI
 		{
 		{
 			skills = _actor.getAllSkills();
 			skills = _actor.getAllSkills();
 			dist2 = _actor.getPlanDistanceSq(target.getX(), target.getY());
 			dist2 = _actor.getPlanDistanceSq(target.getX(), target.getY());
-			range = _actor.getPhysicalAttackRange() + _actor.getTemplate().collisionRadius + target.getTemplate().collisionRadius;
+			range = _actor.getPhysicalAttackRange() + _actor.getTemplate().getCollisionRadius() + target.getTemplate().getCollisionRadius();
 			max_range = range;
 			max_range = range;
 		}
 		}
 		catch (NullPointerException e)
 		catch (NullPointerException e)
@@ -248,7 +248,7 @@ public class L2ControllableMobAI extends L2AttackableAI
 			_actor.setTarget(getForcedTarget());
 			_actor.setTarget(getForcedTarget());
 			skills = _actor.getAllSkills();
 			skills = _actor.getAllSkills();
 			dist2 = _actor.getPlanDistanceSq(getForcedTarget().getX(), getForcedTarget().getY());
 			dist2 = _actor.getPlanDistanceSq(getForcedTarget().getX(), getForcedTarget().getY());
-			range = _actor.getPhysicalAttackRange() + _actor.getTemplate().collisionRadius + getForcedTarget().getTemplate().collisionRadius;
+			range = _actor.getPhysicalAttackRange() + _actor.getTemplate().getCollisionRadius() + getForcedTarget().getTemplate().getCollisionRadius();
 			max_range = range;
 			max_range = range;
 		}
 		}
 		catch (NullPointerException e)
 		catch (NullPointerException e)
@@ -330,7 +330,7 @@ public class L2ControllableMobAI extends L2AttackableAI
 				_actor.setTarget(getAttackTarget());
 				_actor.setTarget(getAttackTarget());
 				skills = _actor.getAllSkills();
 				skills = _actor.getAllSkills();
 				dist2 = _actor.getPlanDistanceSq(getAttackTarget().getX(), getAttackTarget().getY());
 				dist2 = _actor.getPlanDistanceSq(getAttackTarget().getX(), getAttackTarget().getY());
-				range = _actor.getPhysicalAttackRange() + _actor.getTemplate().collisionRadius + getAttackTarget().getTemplate().collisionRadius;
+				range = _actor.getPhysicalAttackRange() + _actor.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius();
 				max_range = range;
 				max_range = range;
 			}
 			}
 			catch (NullPointerException e)
 			catch (NullPointerException e)

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2FortSiegeGuardAI.java

@@ -498,7 +498,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
 			_actor.setTarget(attackTarget);
 			_actor.setTarget(attackTarget);
 			skills = _actor.getAllSkills();
 			skills = _actor.getAllSkills();
 			dist_2 = _actor.getPlanDistanceSq(attackTarget.getX(), attackTarget.getY());
 			dist_2 = _actor.getPlanDistanceSq(attackTarget.getX(), attackTarget.getY());
-			range = _actor.getPhysicalAttackRange() + _actor.getTemplate().collisionRadius + attackTarget.getTemplate().collisionRadius;
+			range = _actor.getPhysicalAttackRange() + _actor.getTemplate().getCollisionRadius() + attackTarget.getTemplate().getCollisionRadius();
 			if (attackTarget.isMoving())
 			if (attackTarget.isMoving())
 				range += 50;
 				range += 50;
 		}
 		}

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2SiegeGuardAI.java

@@ -477,7 +477,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
 			_actor.setTarget(attackTarget);
 			_actor.setTarget(attackTarget);
 			skills = _actor.getAllSkills();
 			skills = _actor.getAllSkills();
 			dist_2 = _actor.getPlanDistanceSq(attackTarget.getX(), attackTarget.getY());
 			dist_2 = _actor.getPlanDistanceSq(attackTarget.getX(), attackTarget.getY());
-			range = _actor.getPhysicalAttackRange() + _actor.getTemplate().collisionRadius + attackTarget.getTemplate().collisionRadius;
+			range = _actor.getPhysicalAttackRange() + _actor.getTemplate().getCollisionRadius() + attackTarget.getTemplate().getCollisionRadius();
 			if (attackTarget.isMoving())
 			if (attackTarget.isMoving())
 				range += 50;
 				range += 50;
 		}
 		}

+ 24 - 24
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/NpcTable.java

@@ -919,33 +919,33 @@ public class NpcTable
 				switch(rset.getByte("elemAtkType"))
 				switch(rset.getByte("elemAtkType"))
 				{
 				{
 					case Elementals.FIRE:
 					case Elementals.FIRE:
-						npcDat.baseFire = rset.getInt("elemAtkValue");
+						npcDat.setBaseFire(rset.getInt("elemAtkValue"));
 						break;
 						break;
 					case Elementals.WATER:
 					case Elementals.WATER:
-						npcDat.baseWater = rset.getInt("elemAtkValue");
+						npcDat.setBaseWater(rset.getInt("elemAtkValue"));
 						break;
 						break;
 					case Elementals.EARTH:
 					case Elementals.EARTH:
-						npcDat.baseEarth = rset.getInt("elemAtkValue");
+						npcDat.setBaseEarth(rset.getInt("elemAtkValue"));
 						break;
 						break;
 					case Elementals.WIND:
 					case Elementals.WIND:
-						npcDat.baseWind = rset.getInt("elemAtkValue");
+						npcDat.setBaseWind(rset.getInt("elemAtkValue"));
 						break;
 						break;
 					case Elementals.HOLY:
 					case Elementals.HOLY:
-						npcDat.baseHoly = rset.getInt("elemAtkValue");
+						npcDat.setBaseHoly(rset.getInt("elemAtkValue"));
 						break;
 						break;
 					case Elementals.DARK:
 					case Elementals.DARK:
-						npcDat.baseDark = rset.getInt("elemAtkValue");
+						npcDat.setBaseDark(rset.getInt("elemAtkValue"));
 						break;
 						break;
 					default:
 					default:
 						_log.severe("NPCElementals: Elementals Error with id : " + npc_id + "; unknown elementType: " + rset.getByte("elemAtkType"));
 						_log.severe("NPCElementals: Elementals Error with id : " + npc_id + "; unknown elementType: " + rset.getByte("elemAtkType"));
 						continue;
 						continue;
 				}
 				}
-				npcDat.baseFireRes = rset.getInt("fireDefValue");
-				npcDat.baseWaterRes = rset.getInt("waterDefValue");
-				npcDat.baseEarthRes = rset.getInt("earthDefValue");
-				npcDat.baseWindRes = rset.getInt("windDefValue");
-				npcDat.baseHolyRes = rset.getInt("holyDefValue");
-				npcDat.baseDarkRes = rset.getInt("darkDefValue");
+				npcDat.setBaseFireRes(rset.getInt("fireDefValue"));
+				npcDat.setBaseWaterRes(rset.getInt("waterDefValue"));
+				npcDat.setBaseEarthRes(rset.getInt("earthDefValue"));
+				npcDat.setBaseWindRes(rset.getInt("windDefValue"));
+				npcDat.setBaseHolyRes(rset.getInt("holyDefValue"));
+				npcDat.setBaseDarkRes(rset.getInt("darkDefValue"));
 				cont++;
 				cont++;
 			}
 			}
 			
 			
@@ -978,33 +978,33 @@ public class NpcTable
 					switch(rset.getByte("elemAtkType"))
 					switch(rset.getByte("elemAtkType"))
 					{
 					{
 						case Elementals.FIRE:
 						case Elementals.FIRE:
-							npcDat.baseFire = rset.getInt("elemAtkValue");
+							npcDat.setBaseFire(rset.getInt("elemAtkValue"));
 							break;
 							break;
 						case Elementals.WATER:
 						case Elementals.WATER:
-							npcDat.baseWater = rset.getInt("elemAtkValue");
+							npcDat.setBaseWater(rset.getInt("elemAtkValue"));
 							break;
 							break;
 						case Elementals.EARTH:
 						case Elementals.EARTH:
-							npcDat.baseEarth = rset.getInt("elemAtkValue");
+							npcDat.setBaseEarth(rset.getInt("elemAtkValue"));
 							break;
 							break;
 						case Elementals.WIND:
 						case Elementals.WIND:
-							npcDat.baseWind = rset.getInt("elemAtkValue");
+							npcDat.setBaseWind(rset.getInt("elemAtkValue"));
 							break;
 							break;
 						case Elementals.HOLY:
 						case Elementals.HOLY:
-							npcDat.baseHoly = rset.getInt("elemAtkValue");
+							npcDat.setBaseHoly(rset.getInt("elemAtkValue"));
 							break;
 							break;
 						case Elementals.DARK:
 						case Elementals.DARK:
-							npcDat.baseDark = rset.getInt("elemAtkValue");
+							npcDat.setBaseDark(rset.getInt("elemAtkValue"));
 							break;
 							break;
 						default:
 						default:
 							_log.severe("NPCElementals: Custom Elementals Error with id : " + npc_id + "; unknown elementType: " + rset.getByte("elemAtkType"));
 							_log.severe("NPCElementals: Custom Elementals Error with id : " + npc_id + "; unknown elementType: " + rset.getByte("elemAtkType"));
 							continue;
 							continue;
 					}
 					}
-					npcDat.baseFireRes = rset.getInt("fireDefValue");
-					npcDat.baseWaterRes = rset.getInt("waterDefValue");
-					npcDat.baseEarthRes = rset.getInt("earthDefValue");
-					npcDat.baseWindRes = rset.getInt("windDefValue");
-					npcDat.baseHolyRes = rset.getInt("holyDefValue");
-					npcDat.baseDarkRes = rset.getInt("darkDefValue");
+					npcDat.setBaseFireRes(rset.getInt("fireDefValue"));
+					npcDat.setBaseWaterRes(rset.getInt("waterDefValue"));
+					npcDat.setBaseEarthRes(rset.getInt("earthDefValue"));
+					npcDat.setBaseWindRes(rset.getInt("windDefValue"));
+					npcDat.setBaseHolyRes(rset.getInt("holyDefValue"));
+					npcDat.setBaseDarkRes(rset.getInt("darkDefValue"));
 					cont++;
 					cont++;
 				}
 				}
 				rset.close();
 				rset.close();

+ 5 - 5
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/L2Npc.java

@@ -515,8 +515,8 @@ public class L2Npc extends L2Character
 		_currentRHandId = getTemplate().rhand;
 		_currentRHandId = getTemplate().rhand;
 		_currentEnchant = Config.ENABLE_RANDOM_ENCHANT_EFFECT ? Rnd.get(4, 21) : getTemplate().enchantEffect;
 		_currentEnchant = Config.ENABLE_RANDOM_ENCHANT_EFFECT ? Rnd.get(4, 21) : getTemplate().enchantEffect;
 		// initialize the "current" collisions
 		// initialize the "current" collisions
-		_currentCollisionHeight = getTemplate().fCollisionHeight;
-		_currentCollisionRadius = getTemplate().fCollisionRadius;
+		_currentCollisionHeight = getTemplate().getfCollisionHeight();
+		_currentCollisionRadius = getTemplate().getfCollisionRadius();
 		
 		
 		if (template == null)
 		if (template == null)
 		{
 		{
@@ -1367,11 +1367,11 @@ public class L2Npc extends L2Character
 			return false;
 			return false;
 		
 		
 		// normally this wouldn't really be needed, but for those few exceptions,
 		// normally this wouldn't really be needed, but for those few exceptions,
-		// we do need to reset the weapons back to the initial templated weapon.
+		// we do need to reset the weapons back to the initial template weapon.
 		_currentLHandId = getTemplate().lhand;
 		_currentLHandId = getTemplate().lhand;
 		_currentRHandId = getTemplate().rhand;
 		_currentRHandId = getTemplate().rhand;
-		_currentCollisionHeight = getTemplate().fCollisionHeight;
-		_currentCollisionRadius = getTemplate().fCollisionRadius;
+		_currentCollisionHeight = getTemplate().getfCollisionHeight();
+		_currentCollisionRadius = getTemplate().getfCollisionRadius();
 		DecayTaskManager.getInstance().addDecayTask(this);
 		DecayTaskManager.getInstance().addDecayTask(this);
 		return true;
 		return true;
 	}
 	}

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2CubicInstance.java

@@ -261,7 +261,7 @@ public class L2CubicInstance
 	public final int getMCriticalHit(L2Character target, L2Skill skill)
 	public final int getMCriticalHit(L2Character target, L2Skill skill)
 	{
 	{
 		// TODO: Temporary now mcrit for cubics is the baseMCritRate of its owner
 		// TODO: Temporary now mcrit for cubics is the baseMCritRate of its owner
-		return _owner.getTemplate().baseMCritRate;
+		return _owner.getTemplate().getBaseMCritRate();
 	}
 	}
 	
 	
 	public int getMAtk()
 	public int getMAtk()

+ 4 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

@@ -9085,7 +9085,7 @@ public final class L2PcInstance extends L2Playable
 				// Calculate the distance between the L2PcInstance and the target
 				// Calculate the distance between the L2PcInstance and the target
 				if (sklTargetType == L2TargetType.TARGET_GROUND)
 				if (sklTargetType == L2TargetType.TARGET_GROUND)
 				{
 				{
-					if (!isInsideRadius(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), skill.getCastRange()+getTemplate().collisionRadius, false, false))
+					if (!isInsideRadius(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), skill.getCastRange()+getTemplate().getCollisionRadius(), false, false))
 					{
 					{
 						// Send a System Message to the caster
 						// Send a System Message to the caster
 						sendPacket(SystemMessage.getSystemMessage(SystemMessageId.TARGET_TOO_FAR));
 						sendPacket(SystemMessage.getSystemMessage(SystemMessageId.TARGET_TOO_FAR));
@@ -9095,7 +9095,7 @@ public final class L2PcInstance extends L2Playable
 						return false;
 						return false;
 					}
 					}
 				}
 				}
-				else if (skill.getCastRange() > 0 && !isInsideRadius(target, skill.getCastRange()+getTemplate().collisionRadius, false, false))
+				else if (skill.getCastRange() > 0 && !isInsideRadius(target, skill.getCastRange()+getTemplate().getCollisionRadius(), false, false))
 				{
 				{
 					// Send a System Message to the caster
 					// Send a System Message to the caster
 					sendPacket(SystemMessage.getSystemMessage(SystemMessageId.TARGET_TOO_FAR));
 					sendPacket(SystemMessage.getSystemMessage(SystemMessageId.TARGET_TOO_FAR));
@@ -14681,14 +14681,14 @@ public final class L2PcInstance extends L2Playable
 	{
 	{
 		if (getAppearance().getSex())
 		if (getAppearance().getSex())
 			return getBaseTemplate().fCollisionRadius_female;
 			return getBaseTemplate().fCollisionRadius_female;
-		return getBaseTemplate().fCollisionRadius;
+		return getBaseTemplate().getfCollisionRadius();
 	}
 	}
 	
 	
 	public double getCollisionHeight()
 	public double getCollisionHeight()
 	{
 	{
 		if (getAppearance().getSex())
 		if (getAppearance().getSex())
 			return getBaseTemplate().fCollisionHeight_female;
 			return getBaseTemplate().fCollisionHeight_female;
-		return getBaseTemplate().fCollisionHeight;
+		return getBaseTemplate().getfCollisionHeight();
 	}
 	}
 	
 	
 	public final int getClientX()
 	public final int getClientX()

+ 52 - 52
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/stat/CharStat.java

@@ -156,7 +156,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (float) ((1.1) * getPAtkSpd() / _activeChar.getTemplate().basePAtkSpd);
+		return (float) ((1.1) * getPAtkSpd() / _activeChar.getTemplate().getBasePAtkSpd());
 	}
 	}
 	
 	
 	/**
 	/**
@@ -167,7 +167,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.STAT_CON, _activeChar.getTemplate().baseCON, null, null);
+		return (int) calcStat(Stats.STAT_CON, _activeChar.getTemplate().getBaseCON(), null, null);
 	}
 	}
 	
 	
 	/**
 	/**
@@ -190,7 +190,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		int criticalHit = (int) Math.round(calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().baseCritRate, target, skill)*10.0 + 0.5);
+		int criticalHit = (int) Math.round(calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill)*10.0 + 0.5);
 		criticalHit /= 10;
 		criticalHit /= 10;
 		// Set a cap of Critical Hit at 500
 		// Set a cap of Critical Hit at 500
 		if (criticalHit > Config.MAX_PCRIT_RATE)
 		if (criticalHit > Config.MAX_PCRIT_RATE)
@@ -207,7 +207,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.STAT_DEX, _activeChar.getTemplate().baseDEX, null, null);
+		return (int) calcStat(Stats.STAT_DEX, _activeChar.getTemplate().getBaseDEX(), null, null);
 	}
 	}
 	
 	
 	/**
 	/**
@@ -243,7 +243,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.STAT_INT, _activeChar.getTemplate().baseINT, null, null);
+		return (int) calcStat(Stats.STAT_INT, _activeChar.getTemplate().getBaseINT(), null, null);
 	}
 	}
 	
 	
 	public byte getLevel()
 	public byte getLevel()
@@ -268,7 +268,7 @@ public class CharStat
 		if (skill != null)
 		if (skill != null)
 			return (int) calcStat(Stats.MAGIC_ATTACK_RANGE, skill.getCastRange(), null, skill);
 			return (int) calcStat(Stats.MAGIC_ATTACK_RANGE, skill.getCastRange(), null, skill);
 		
 		
-		return _activeChar.getTemplate().baseAtkRange;
+		return _activeChar.getTemplate().getBaseAtkRange();
 	}
 	}
 	
 	
 	public int getMaxCp()
 	public int getMaxCp()
@@ -276,7 +276,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.MAX_CP, _activeChar.getTemplate().baseCpMax, null, null);
+		return (int) calcStat(Stats.MAX_CP, _activeChar.getTemplate().getBaseCpMax(), null, null);
 	}
 	}
 	
 	
 	public int getMaxRecoverableCp()
 	public int getMaxRecoverableCp()
@@ -300,7 +300,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.MAX_HP, _activeChar.getTemplate().baseHpMax, null, null);
+		return (int) calcStat(Stats.MAX_HP, _activeChar.getTemplate().getBaseHpMax(), null, null);
 	}
 	}
 	
 	
 	public int getMaxRecoverableHp()
 	public int getMaxRecoverableHp()
@@ -316,7 +316,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.MAX_MP, _activeChar.getTemplate().baseMpMax, null, null);
+		return (int) calcStat(Stats.MAX_MP, _activeChar.getTemplate().getBaseMpMax(), null, null);
 	}
 	}
 	
 	
 	public int getMaxRecoverableMp()
 	public int getMaxRecoverableMp()
@@ -351,7 +351,7 @@ public class CharStat
 			bonusAtk = Config.L2JMOD_CHAMPION_ATK;
 			bonusAtk = Config.L2JMOD_CHAMPION_ATK;
 		if (_activeChar.isRaid())
 		if (_activeChar.isRaid())
 			bonusAtk *= Config.RAID_MATTACK_MULTIPLIER;
 			bonusAtk *= Config.RAID_MATTACK_MULTIPLIER;
-		double attack = _activeChar.getTemplate().baseMAtk * bonusAtk;
+		double attack = _activeChar.getTemplate().getBaseMAtk() * bonusAtk;
 		// Get the skill type to calculate its effect in function of base stats
 		// Get the skill type to calculate its effect in function of base stats
 		// of the L2Character target
 		// of the L2Character target
 		Stats stat = skill == null ? null : skill.getStat();
 		Stats stat = skill == null ? null : skill.getStat();
@@ -361,28 +361,28 @@ public class CharStat
 			switch (stat)
 			switch (stat)
 			{
 			{
 				case AGGRESSION:
 				case AGGRESSION:
-					attack += _activeChar.getTemplate().baseAggression;
+					attack += _activeChar.getTemplate().getBaseAggression();
 					break;
 					break;
 				case BLEED:
 				case BLEED:
-					attack += _activeChar.getTemplate().baseBleed;
+					attack += _activeChar.getTemplate().getBaseBleed();
 					break;
 					break;
 				case POISON:
 				case POISON:
-					attack += _activeChar.getTemplate().basePoison;
+					attack += _activeChar.getTemplate().getBasePoison();
 					break;
 					break;
 				case STUN:
 				case STUN:
-					attack += _activeChar.getTemplate().baseStun;
+					attack += _activeChar.getTemplate().getBaseStun();
 					break;
 					break;
 				case ROOT:
 				case ROOT:
-					attack += _activeChar.getTemplate().baseRoot;
+					attack += _activeChar.getTemplate().getBaseRoot();
 					break;
 					break;
 				case MOVEMENT:
 				case MOVEMENT:
-					attack += _activeChar.getTemplate().baseMovement;
+					attack += _activeChar.getTemplate().getBaseMovement();
 					break;
 					break;
 				case CONFUSION:
 				case CONFUSION:
-					attack += _activeChar.getTemplate().baseConfusion;
+					attack += _activeChar.getTemplate().getBaseConfusion();
 					break;
 					break;
 				case SLEEP:
 				case SLEEP:
-					attack += _activeChar.getTemplate().baseSleep;
+					attack += _activeChar.getTemplate().getBaseSleep();
 					break;
 					break;
 			}
 			}
 		}
 		}
@@ -405,7 +405,7 @@ public class CharStat
 		float bonusSpdAtk = 1;
 		float bonusSpdAtk = 1;
 		if  (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
 		if  (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
 			bonusSpdAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
 			bonusSpdAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
-		double val = calcStat(Stats.MAGIC_ATTACK_SPEED, _activeChar.getTemplate().baseMAtkSpd * bonusSpdAtk, null, null);
+		double val = calcStat(Stats.MAGIC_ATTACK_SPEED, _activeChar.getTemplate().getBaseMAtkSpd() * bonusSpdAtk, null, null);
 		if (val > Config.MAX_MATK_SPEED && !_activeChar.isGM())
 		if (val > Config.MAX_MATK_SPEED && !_activeChar.isGM())
 			val = Config.MAX_MATK_SPEED;
 			val = Config.MAX_MATK_SPEED;
 		return (int) val;
 		return (int) val;
@@ -421,7 +421,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		double mrate = calcStat(Stats.MCRITICAL_RATE, _activeChar.getTemplate().baseMCritRate, target, skill);
+		double mrate = calcStat(Stats.MCRITICAL_RATE, _activeChar.getTemplate().getBaseMCritRate(), target, skill);
 		if(mrate > Config.MAX_MCRIT_RATE)
 		if(mrate > Config.MAX_MCRIT_RATE)
 			mrate = Config.MAX_MCRIT_RATE;
 			mrate = Config.MAX_MCRIT_RATE;
 		return (int) mrate;
 		return (int) mrate;
@@ -445,7 +445,7 @@ public class CharStat
 			return 1;
 			return 1;
 		
 		
 		// Get the base MAtk of the L2Character
 		// Get the base MAtk of the L2Character
-		double defence = _activeChar.getTemplate().baseMDef;
+		double defence = _activeChar.getTemplate().getBaseMDef();
 		
 		
 		// Calculate modifier for Raid Bosses
 		// Calculate modifier for Raid Bosses
 		if (_activeChar.isRaid())
 		if (_activeChar.isRaid())
@@ -463,7 +463,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.STAT_MEN, _activeChar.getTemplate().baseMEN, null, null);
+		return (int) calcStat(Stats.STAT_MEN, _activeChar.getTemplate().getBaseMEN(), null, null);
 	}
 	}
 	
 	
 	public float getMovementSpeedMultiplier()
 	public float getMovementSpeedMultiplier()
@@ -471,7 +471,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return getRunSpeed() / (float) _activeChar.getTemplate().baseRunSpd;
+		return getRunSpeed() / (float) _activeChar.getTemplate().getBaseRunSpd();
 	}
 	}
 	
 	
 	/**
 	/**
@@ -496,7 +496,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return calcStat(Stats.MAGIC_REUSE_RATE, _activeChar.getTemplate().baseMReuseRate, null, skill);
+		return calcStat(Stats.MAGIC_REUSE_RATE, _activeChar.getTemplate().getBaseMReuseRate(), null, skill);
 	}
 	}
 	
 	
 	/**
 	/**
@@ -508,7 +508,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return calcStat(Stats.P_REUSE, _activeChar.getTemplate().baseMReuseRate, null, skill);
+		return calcStat(Stats.P_REUSE, _activeChar.getTemplate().getBaseMReuseRate(), null, skill);
 	}
 	}
 	
 	
 	/**
 	/**
@@ -524,7 +524,7 @@ public class CharStat
 			bonusAtk = Config.L2JMOD_CHAMPION_ATK;
 			bonusAtk = Config.L2JMOD_CHAMPION_ATK;
 		if (_activeChar.isRaid())
 		if (_activeChar.isRaid())
 			bonusAtk *= Config.RAID_PATTACK_MULTIPLIER;
 			bonusAtk *= Config.RAID_PATTACK_MULTIPLIER;
-		return (int) calcStat(Stats.POWER_ATTACK, _activeChar.getTemplate().basePAtk * bonusAtk, target, null);
+		return (int) calcStat(Stats.POWER_ATTACK, _activeChar.getTemplate().getBasePAtk() * bonusAtk, target, null);
 	}
 	}
 	
 	
 	/**
 	/**
@@ -599,7 +599,7 @@ public class CharStat
 		float bonusAtk = 1;
 		float bonusAtk = 1;
 		if  (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
 		if  (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
 			bonusAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
 			bonusAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
-		int val = (int) Math.round(calcStat(Stats.POWER_ATTACK_SPEED, _activeChar.getTemplate().basePAtkSpd * bonusAtk, null, null));
+		int val = (int) Math.round(calcStat(Stats.POWER_ATTACK_SPEED, _activeChar.getTemplate().getBasePAtkSpd() * bonusAtk, null, null));
 		return val;
 		return val;
 	}
 	}
 	
 	
@@ -675,7 +675,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.POWER_DEFENCE, (_activeChar.isRaid()) ? _activeChar.getTemplate().basePDef * Config.RAID_PDEFENCE_MULTIPLIER : _activeChar.getTemplate().basePDef, target, null);
+		return (int) calcStat(Stats.POWER_DEFENCE, (_activeChar.isRaid()) ? _activeChar.getTemplate().getBasePDef() * Config.RAID_PDEFENCE_MULTIPLIER : _activeChar.getTemplate().getBasePDef(), target, null);
 	}
 	}
 	
 	
 	/**
 	/**
@@ -687,14 +687,14 @@ public class CharStat
 			return 1;
 			return 1;
 		
 		
 		if (_activeChar.isTransformed())
 		if (_activeChar.isTransformed())
-			return _activeChar.getTemplate().baseAtkRange;
+			return _activeChar.getTemplate().getBaseAtkRange();
 		// Polearm handled here for now. Basically L2PcInstance could have a function
 		// Polearm handled here for now. Basically L2PcInstance could have a function
 		// similar to FuncBowAtkRange and NPC are defined in DP.
 		// similar to FuncBowAtkRange and NPC are defined in DP.
 		L2Weapon weaponItem = _activeChar.getActiveWeaponItem();
 		L2Weapon weaponItem = _activeChar.getActiveWeaponItem();
 		if (weaponItem != null && weaponItem.getItemType() == L2WeaponType.POLE)
 		if (weaponItem != null && weaponItem.getItemType() == L2WeaponType.POLE)
 			return (int) calcStat(Stats.POWER_ATTACK_RANGE, 66, null, null);
 			return (int) calcStat(Stats.POWER_ATTACK_RANGE, 66, null, null);
 		
 		
-		return (int) calcStat(Stats.POWER_ATTACK_RANGE, _activeChar.getTemplate().baseAtkRange, null, null);
+		return (int) calcStat(Stats.POWER_ATTACK_RANGE, _activeChar.getTemplate().getBaseAtkRange(), null, null);
 	}
 	}
 	
 	
 	/**
 	/**
@@ -716,7 +716,7 @@ public class CharStat
 		
 		
 		// err we should be adding TO the persons run speed
 		// err we should be adding TO the persons run speed
 		// not making it a constant
 		// not making it a constant
-		double baseRunSpd = _activeChar.getTemplate().baseRunSpd;
+		double baseRunSpd = _activeChar.getTemplate().getBaseRunSpd();
 		
 		
 		if (baseRunSpd == 0)
 		if (baseRunSpd == 0)
 			return 0;
 			return 0;
@@ -750,7 +750,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.STAT_STR, _activeChar.getTemplate().baseSTR, null, null);
+		return (int) calcStat(Stats.STAT_STR, _activeChar.getTemplate().getBaseSTR(), null, null);
 	}
 	}
 	
 	
 	/**
 	/**
@@ -761,7 +761,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		double baseWalkSpd = _activeChar.getTemplate().baseWalkSpd;
+		double baseWalkSpd = _activeChar.getTemplate().getBaseWalkSpd();
 		
 		
 		if (baseWalkSpd == 0)
 		if (baseWalkSpd == 0)
 			return 0;
 			return 0;
@@ -777,7 +777,7 @@ public class CharStat
 		if (_activeChar == null)
 		if (_activeChar == null)
 			return 1;
 			return 1;
 		
 		
-		return (int) calcStat(Stats.STAT_WIT, _activeChar.getTemplate().baseWIT, null, null);
+		return (int) calcStat(Stats.STAT_WIT, _activeChar.getTemplate().getBaseWIT(), null, null);
 	}
 	}
 	
 	
 	/**
 	/**
@@ -837,12 +837,12 @@ public class CharStat
 		int tempVal =0, stats[] = { 0, 0, 0, 0, 0, 0 };
 		int tempVal =0, stats[] = { 0, 0, 0, 0, 0, 0 };
 		
 		
 		byte returnVal = -2;
 		byte returnVal = -2;
-		stats[0] = (int) calcStat(Stats.FIRE_POWER, _activeChar.getTemplate().baseFire, null, null);
-		stats[1] = (int) calcStat(Stats.WATER_POWER, _activeChar.getTemplate().baseWater, null, null);
-		stats[2] = (int) calcStat(Stats.WIND_POWER, _activeChar.getTemplate().baseWind, null, null);
-		stats[3] = (int) calcStat(Stats.EARTH_POWER, _activeChar.getTemplate().baseEarth, null, null);
-		stats[4] = (int) calcStat(Stats.HOLY_POWER, _activeChar.getTemplate().baseHoly, null, null);
-		stats[5] = (int) calcStat(Stats.DARK_POWER, _activeChar.getTemplate().baseDark, null, null);
+		stats[0] = (int) calcStat(Stats.FIRE_POWER, _activeChar.getTemplate().getBaseFire(), null, null);
+		stats[1] = (int) calcStat(Stats.WATER_POWER, _activeChar.getTemplate().getBaseWater(), null, null);
+		stats[2] = (int) calcStat(Stats.WIND_POWER, _activeChar.getTemplate().getBaseWind(), null, null);
+		stats[3] = (int) calcStat(Stats.EARTH_POWER, _activeChar.getTemplate().getBaseEarth(), null, null);
+		stats[4] = (int) calcStat(Stats.HOLY_POWER, _activeChar.getTemplate().getBaseHoly(), null, null);
+		stats[5] = (int) calcStat(Stats.DARK_POWER, _activeChar.getTemplate().getBaseDark(), null, null);
 		
 		
 		for (byte x = 0; x < 6; x++)
 		for (byte x = 0; x < 6; x++)
 		{
 		{
@@ -867,17 +867,17 @@ public class CharStat
 		switch (attackAttribute)
 		switch (attackAttribute)
 		{
 		{
 			case Elementals.FIRE:
 			case Elementals.FIRE:
-				return (int) calcStat(Stats.FIRE_POWER, _activeChar.getTemplate().baseFire, null, null);
+				return (int) calcStat(Stats.FIRE_POWER, _activeChar.getTemplate().getBaseFire(), null, null);
 			case Elementals.WATER:
 			case Elementals.WATER:
-				return (int) calcStat(Stats.WATER_POWER, _activeChar.getTemplate().baseWater, null, null);
+				return (int) calcStat(Stats.WATER_POWER, _activeChar.getTemplate().getBaseWater(), null, null);
 			case Elementals.WIND:
 			case Elementals.WIND:
-				return (int) calcStat(Stats.WIND_POWER, _activeChar.getTemplate().baseWind, null, null);
+				return (int) calcStat(Stats.WIND_POWER, _activeChar.getTemplate().getBaseWind(), null, null);
 			case Elementals.EARTH:
 			case Elementals.EARTH:
-				return (int) calcStat(Stats.EARTH_POWER, _activeChar.getTemplate().baseEarth, null, null);
+				return (int) calcStat(Stats.EARTH_POWER, _activeChar.getTemplate().getBaseEarth(), null, null);
 			case Elementals.HOLY:
 			case Elementals.HOLY:
-				return (int) calcStat(Stats.HOLY_POWER, _activeChar.getTemplate().baseHoly, null, null);
+				return (int) calcStat(Stats.HOLY_POWER, _activeChar.getTemplate().getBaseHoly(), null, null);
 			case Elementals.DARK:
 			case Elementals.DARK:
-				return (int) calcStat(Stats.DARK_POWER, _activeChar.getTemplate().baseDark, null, null);
+				return (int) calcStat(Stats.DARK_POWER, _activeChar.getTemplate().getBaseDark(), null, null);
 			default:
 			default:
 				return 0;
 				return 0;
 		}
 		}
@@ -888,17 +888,17 @@ public class CharStat
 		switch (defenseAttribute)
 		switch (defenseAttribute)
 		{
 		{
 			case Elementals.FIRE:
 			case Elementals.FIRE:
-				return (int) calcStat(Stats.FIRE_RES, _activeChar.getTemplate().baseFireRes, null, null);
+				return (int) calcStat(Stats.FIRE_RES, _activeChar.getTemplate().getBaseFireRes(), null, null);
 			case Elementals.WATER:
 			case Elementals.WATER:
-				return (int) calcStat(Stats.WATER_RES, _activeChar.getTemplate().baseWaterRes, null, null);
+				return (int) calcStat(Stats.WATER_RES, _activeChar.getTemplate().getBaseWaterRes(), null, null);
 			case Elementals.WIND:
 			case Elementals.WIND:
-				return (int) calcStat(Stats.WIND_RES, _activeChar.getTemplate().baseWindRes, null, null);
+				return (int) calcStat(Stats.WIND_RES, _activeChar.getTemplate().getBaseWindRes(), null, null);
 			case Elementals.EARTH:
 			case Elementals.EARTH:
-				return (int) calcStat(Stats.EARTH_RES, _activeChar.getTemplate().baseEarthRes, null, null);
+				return (int) calcStat(Stats.EARTH_RES, _activeChar.getTemplate().getBaseEarthRes(), null, null);
 			case Elementals.HOLY:
 			case Elementals.HOLY:
-				return (int) calcStat(Stats.HOLY_RES, _activeChar.getTemplate().baseHolyRes, null, null);
+				return (int) calcStat(Stats.HOLY_RES, _activeChar.getTemplate().getBaseHolyRes(), null, null);
 			case Elementals.DARK:
 			case Elementals.DARK:
-				return (int) calcStat(Stats.DARK_RES, _activeChar.getTemplate().baseDarkRes, null, null);
+				return (int) calcStat(Stats.DARK_RES, _activeChar.getTemplate().getBaseDarkRes(), null, null);
 			default:
 			default:
 				return 0;
 				return 0;
 		}
 		}

+ 3 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/stat/NpcStat.java

@@ -34,7 +34,7 @@ public class NpcStat extends CharStat
 	public L2Npc getActiveChar() { return (L2Npc)super.getActiveChar(); }
 	public L2Npc getActiveChar() { return (L2Npc)super.getActiveChar(); }
 	
 	
 	@Override
 	@Override
-	public int getWalkSpeed(){ return (int) calcStat(Stats.WALK_SPEED, getActiveChar().getTemplate().baseWalkSpd, null, null);}
+	public int getWalkSpeed(){ return (int) calcStat(Stats.WALK_SPEED, getActiveChar().getTemplate().getBaseWalkSpd(), null, null);}
 	
 	
 	@Override
 	@Override
 	public float getMovementSpeedMultiplier()
 	public float getMovementSpeedMultiplier()
@@ -42,7 +42,7 @@ public class NpcStat extends CharStat
 		if (getActiveChar() == null)
 		if (getActiveChar() == null)
 			return 1;
 			return 1;
 		if (getActiveChar().isRunning())
 		if (getActiveChar().isRunning())
-			return getRunSpeed() * 1f / getActiveChar().getTemplate().baseRunSpd;
-		return getWalkSpeed() * 1f / getActiveChar().getTemplate().baseWalkSpd;
+			return getRunSpeed() * 1f / getActiveChar().getTemplate().getBaseRunSpd();
+		return getWalkSpeed() * 1f / getActiveChar().getTemplate().getBaseWalkSpd();
 	}
 	}
 }
 }

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/stat/PcStat.java

@@ -414,7 +414,7 @@ public class PcStat extends PlayableStat
 		L2PcInstance player = getActiveChar();
 		L2PcInstance player = getActiveChar();
 		if (player.isMounted())
 		if (player.isMounted())
 		{
 		{
-			int baseRunSpd = NpcTable.getInstance().getTemplate(getActiveChar().getMountNpcId()).baseRunSpd;
+			int baseRunSpd = NpcTable.getInstance().getTemplate(getActiveChar().getMountNpcId()).getBaseRunSpd();
 			val = (int) Math.round(calcStat(Stats.RUN_SPEED, baseRunSpd, null, null));
 			val = (int) Math.round(calcStat(Stats.RUN_SPEED, baseRunSpd, null, null));
 		}
 		}
 		else
 		else
@@ -469,7 +469,7 @@ public class PcStat extends PlayableStat
 			return 1;
 			return 1;
 		
 		
 		if (getActiveChar().isMounted())
 		if (getActiveChar().isMounted())
-			return getRunSpeed() * 1f / NpcTable.getInstance().getTemplate(getActiveChar().getMountNpcId()).baseRunSpd;
+			return getRunSpeed() * 1f / NpcTable.getInstance().getTemplate(getActiveChar().getMountNpcId()).getBaseRunSpd();
 		
 		
 		return super.getMovementSpeedMultiplier();
 		return super.getMovementSpeedMultiplier();
 	}
 	}

+ 8 - 8
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/stat/PetStat.java

@@ -135,14 +135,14 @@ public class PetStat extends SummonStat
 		{
 		{
 			switch (stat)
 			switch (stat)
 			{
 			{
-				case AGGRESSION: attack += getActiveChar().getTemplate().baseAggression; break;
-				case BLEED:      attack += getActiveChar().getTemplate().baseBleed;      break;
-				case POISON:     attack += getActiveChar().getTemplate().basePoison;     break;
-				case STUN:       attack += getActiveChar().getTemplate().baseStun;       break;
-				case ROOT:       attack += getActiveChar().getTemplate().baseRoot;       break;
-				case MOVEMENT:   attack += getActiveChar().getTemplate().baseMovement;   break;
-				case CONFUSION:  attack += getActiveChar().getTemplate().baseConfusion;  break;
-				case SLEEP:      attack += getActiveChar().getTemplate().baseSleep;      break;
+				case AGGRESSION: attack += getActiveChar().getTemplate().getBaseAggression(); break;
+				case BLEED:      attack += getActiveChar().getTemplate().getBaseBleed();      break;
+				case POISON:     attack += getActiveChar().getTemplate().getBasePoison();     break;
+				case STUN:       attack += getActiveChar().getTemplate().getBaseStun();       break;
+				case ROOT:       attack += getActiveChar().getTemplate().getBaseRoot();       break;
+				case MOVEMENT:   attack += getActiveChar().getTemplate().getBaseMovement();   break;
+				case CONFUSION:  attack += getActiveChar().getTemplate().getBaseConfusion();  break;
+				case SLEEP:      attack += getActiveChar().getTemplate().getBaseSleep();      break;
 			}
 			}
 		}
 		}
 		if (skill != null) attack += skill.getPower();
 		if (skill != null) attack += skill.getPower();

+ 4 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java

@@ -184,10 +184,10 @@ public final class CharacterCreate extends L2GameClientPacket
 			newChar = L2PcInstance.create(objectId, template, getClient().getAccountName(), _name, _hairStyle, _hairColor, _face, _sex != 0);
 			newChar = L2PcInstance.create(objectId, template, getClient().getAccountName(), _name, _hairStyle, _hairColor, _face, _sex != 0);
 		}
 		}
 		
 		
-		newChar.setCurrentHp(template.baseHpMax);
-		newChar.setCurrentCp(template.baseCpMax);
-		newChar.setCurrentMp(template.baseMpMax);
-		// newChar.setMaxLoad(template.baseLoad);
+		newChar.setCurrentHp(template.getBaseHpMax());
+		newChar.setCurrentCp(template.getBaseCpMax());
+		newChar.setCurrentMp(template.getBaseMpMax());
+		//newChar.setMaxLoad(template.getBaseLoad());
 		
 		
 		CharCreateOk cco = new CharCreateOk();
 		CharCreateOk cco = new CharCreateOk();
 		sendPacket(cco);
 		sendPacket(cco);

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/MoveBackwardToLocation.java

@@ -108,7 +108,7 @@ public class MoveBackwardToLocation extends L2GameClientPacket
 		// L2J uses floor, not head level as char coordinates. This is some
 		// L2J uses floor, not head level as char coordinates. This is some
 		// sort of incompatibility fix.
 		// sort of incompatibility fix.
 		// Validate position packets sends head level.
 		// Validate position packets sends head level.
-		_targetZ += activeChar.getTemplate().collisionHeight;
+		_targetZ += activeChar.getTemplate().getCollisionHeight();
 		
 		
 		_curX = activeChar.getX();
 		_curX = activeChar.getX();
 		_curY = activeChar.getY();
 		_curY = activeChar.getY();

+ 6 - 9
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java

@@ -67,13 +67,10 @@ public abstract class AbstractNpcInfo extends L2GameServerPacket
 		_heading = cha.getHeading();
 		_heading = cha.getHeading();
 		_mAtkSpd = cha.getMAtkSpd();
 		_mAtkSpd = cha.getMAtkSpd();
 		_pAtkSpd = cha.getPAtkSpd();
 		_pAtkSpd = cha.getPAtkSpd();
-		_runSpd = cha.getTemplate().baseRunSpd;
-		_walkSpd = cha.getTemplate().baseWalkSpd;
+		_runSpd = cha.getTemplate().getBaseRunSpd();
+		_walkSpd = cha.getTemplate().getBaseWalkSpd();
 	}
 	}
 	
 	
-	/* (non-Javadoc)
-	 * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
-	 */
 	@Override
 	@Override
 	public String getType()
 	public String getType()
 	{
 	{
@@ -215,8 +212,8 @@ public abstract class AbstractNpcInfo extends L2GameServerPacket
 			_isAttackable = cha.isAutoAttackable(attacker);
 			_isAttackable = cha.isAutoAttackable(attacker);
 			_rhand = 0;
 			_rhand = 0;
 			_lhand = 0;
 			_lhand = 0;
-			_collisionHeight = _trap.getTemplate().fCollisionHeight;
-			_collisionRadius = _trap.getTemplate().fCollisionRadius;
+			_collisionHeight = _trap.getTemplate().getfCollisionHeight();
+			_collisionRadius = _trap.getTemplate().getfCollisionRadius();
 			if (cha.getTemplate().serverSideName)
 			if (cha.getTemplate().serverSideName)
 				_name = cha.getName();
 				_name = cha.getName();
 			_title = cha.getOwner() != null ? cha.getOwner().getName() : "";
 			_title = cha.getOwner() != null ? cha.getOwner().getName() : "";
@@ -335,8 +332,8 @@ public abstract class AbstractNpcInfo extends L2GameServerPacket
 			_name = cha.getName();
 			_name = cha.getName();
 			_title = cha.getOwner() != null ? ((!cha.getOwner().isOnline()) ? "" : cha.getOwner().getName()) : ""; // when owner online, summon will show in title owner name
 			_title = cha.getOwner() != null ? ((!cha.getOwner().isOnline()) ? "" : cha.getOwner().getName()) : ""; // when owner online, summon will show in title owner name
 			_idTemplate = cha.getTemplate().idTemplate;
 			_idTemplate = cha.getTemplate().idTemplate;
-			_collisionHeight = cha.getTemplate().fCollisionHeight;
-			_collisionRadius = cha.getTemplate().fCollisionRadius;
+			_collisionHeight = cha.getTemplate().getfCollisionHeight();
+			_collisionRadius = cha.getTemplate().getfCollisionRadius();
 			_invisible = cha.getOwner() != null ? cha.getOwner().getAppearance().getInvisible() : false;
 			_invisible = cha.getOwner() != null ? cha.getOwner().getAppearance().getInvisible() : false;
 		}
 		}
 		
 		

+ 6 - 6
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java

@@ -164,8 +164,8 @@ public class CharInfo extends L2GameServerPacket
 				writeD(_walkSpd); // fly walk speed ?
 				writeD(_walkSpd); // fly walk speed ?
 				writeF(_moveMultiplier);
 				writeF(_moveMultiplier);
 				writeF(_attackSpeedMultiplier);
 				writeF(_attackSpeedMultiplier);
-				writeF(template.fCollisionRadius);
-				writeF(template.fCollisionHeight);
+				writeF(template.getfCollisionRadius());
+				writeF(template.getfCollisionHeight());
 				writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); // right hand weapon
 				writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); // right hand weapon
 				writeD(0);
 				writeD(0);
 				writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); // left hand weapon
 				writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); // left hand weapon
@@ -213,8 +213,8 @@ public class CharInfo extends L2GameServerPacket
 				writeD(0);  // C2
 				writeD(0);  // C2
 				writeC(0);  // C2
 				writeC(0);  // C2
 				writeC(0x00);  // C3  team circle 1-blue, 2-red
 				writeC(0x00);  // C3  team circle 1-blue, 2-red
-				writeF(template.fCollisionRadius);
-				writeF(template.fCollisionHeight);
+				writeF(template.getfCollisionRadius());
+				writeF(template.getfCollisionHeight());
 				writeD(0x00);  // C4
 				writeD(0x00);  // C4
 				writeD(0x00);  // C6
 				writeD(0x00);  // C6
 				writeD(0x00);
 				writeD(0x00);
@@ -334,8 +334,8 @@ public class CharInfo extends L2GameServerPacket
 			
 			
 			if (_activeChar.getMountType() != 0)
 			if (_activeChar.getMountType() != 0)
 			{
 			{
-				writeF(NpcTable.getInstance().getTemplate(_activeChar.getMountNpcId()).fCollisionRadius);
-				writeF(NpcTable.getInstance().getTemplate(_activeChar.getMountNpcId()).fCollisionHeight);
+				writeF(NpcTable.getInstance().getTemplate(_activeChar.getMountNpcId()).getfCollisionRadius());
+				writeF(NpcTable.getInstance().getTemplate(_activeChar.getMountNpcId()).getfCollisionHeight());
 			}
 			}
 			else if (_activeChar.getTransformation() != null)
 			else if (_activeChar.getTransformation() != null)
 			{
 			{

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/MonRaceInfo.java

@@ -76,8 +76,8 @@ public class MonRaceInfo extends L2GameServerPacket
 			writeD(12080);                                              //end X
 			writeD(12080);                                              //end X
 			writeD(181875 + (58 * (7-i)));                                  //end Y
 			writeD(181875 + (58 * (7-i)));                                  //end Y
 			writeD(-3566);                                              //end Z
 			writeD(-3566);                                              //end Z
-			writeF(_monsters[i].getTemplate().fCollisionHeight);                  //coll. height
-			writeF(_monsters[i].getTemplate().fCollisionRadius);                  //coll. radius
+			writeF(_monsters[i].getTemplate().getfCollisionHeight());                  //coll. height
+			writeF(_monsters[i].getTemplate().getfCollisionRadius());                  //coll. radius
 			writeD(120);            // ?? unknown
 			writeD(120);            // ?? unknown
 			for (int j=0; j<20; j++)
 			for (int j=0; j<20; j++)
 			{
 			{

+ 6 - 9
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/NewCharacterSuccess.java

@@ -55,29 +55,26 @@ public class NewCharacterSuccess extends L2GameServerPacket
 			writeD(temp.race.ordinal());
 			writeD(temp.race.ordinal());
 			writeD(temp.classId.getId());
 			writeD(temp.classId.getId());
 			writeD(0x46);
 			writeD(0x46);
-			writeD(temp.baseSTR);
+			writeD(temp.getBaseSTR());
 			writeD(0x0a);
 			writeD(0x0a);
 			writeD(0x46);
 			writeD(0x46);
-			writeD(temp.baseDEX);
+			writeD(temp.getBaseDEX());
 			writeD(0x0a);
 			writeD(0x0a);
 			writeD(0x46);
 			writeD(0x46);
-			writeD(temp.baseCON);
+			writeD(temp.getBaseCON());
 			writeD(0x0a);
 			writeD(0x0a);
 			writeD(0x46);
 			writeD(0x46);
-			writeD(temp.baseINT);
+			writeD(temp.getBaseINT());
 			writeD(0x0a);
 			writeD(0x0a);
 			writeD(0x46);
 			writeD(0x46);
-			writeD(temp.baseWIT);
+			writeD(temp.getBaseWIT());
 			writeD(0x0a);
 			writeD(0x0a);
 			writeD(0x46);
 			writeD(0x46);
-			writeD(temp.baseMEN);
+			writeD(temp.getBaseMEN());
 			writeD(0x0a);
 			writeD(0x0a);
 		}
 		}
 	}
 	}
 	
 	
-	/* (non-Javadoc)
-	 * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
-	 */
 	@Override
 	@Override
 	public String getType()
 	public String getType()
 	{
 	{

+ 4 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/PetInfo.java

@@ -54,8 +54,8 @@ public class PetInfo extends L2GameServerPacket
 		_mAtkSpd = _summon.getMAtkSpd();
 		_mAtkSpd = _summon.getMAtkSpd();
 		_pAtkSpd = _summon.getPAtkSpd();
 		_pAtkSpd = _summon.getPAtkSpd();
 		_multiplier = _summon.getMovementSpeedMultiplier();
 		_multiplier = _summon.getMovementSpeedMultiplier();
-		_runSpd = _summon.getTemplate().baseRunSpd;
-		_walkSpd = _summon.getTemplate().baseWalkSpd;
+		_runSpd = _summon.getTemplate().getBaseRunSpd();
+		_walkSpd = _summon.getTemplate().getBaseWalkSpd();
 		_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
 		_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
 		_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
 		_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
 		_maxHp = _summon.getMaxVisibleHp();
 		_maxHp = _summon.getMaxVisibleHp();
@@ -102,8 +102,8 @@ public class PetInfo extends L2GameServerPacket
 		
 		
 		writeF(_multiplier); // movement multiplier
 		writeF(_multiplier); // movement multiplier
 		writeF(1); // attack speed multiplier
 		writeF(1); // attack speed multiplier
-		writeF(_summon.getTemplate().fCollisionRadius);
-		writeF(_summon.getTemplate().fCollisionHeight);
+		writeF(_summon.getTemplate().getfCollisionRadius());
+		writeF(_summon.getTemplate().getfCollisionHeight());
 		writeD(_summon.getWeapon()); // right hand weapon
 		writeD(_summon.getWeapon()); // right hand weapon
 		writeD(_summon.getArmor()); // body armor
 		writeD(_summon.getArmor()); // body armor
 		writeD(0); // left hand weapon
 		writeD(0); // left hand weapon

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/UserInfo.java

@@ -287,8 +287,8 @@ public final class UserInfo extends L2GameServerPacket
 		L2Transformation trans;
 		L2Transformation trans;
 		if (_activeChar.getMountType() != 0 && pet != null)
 		if (_activeChar.getMountType() != 0 && pet != null)
 		{
 		{
-			writeF(pet.getTemplate().fCollisionRadius);
-			writeF(pet.getTemplate().fCollisionHeight);
+			writeF(pet.getTemplate().getfCollisionRadius());
+			writeF(pet.getTemplate().getfCollisionHeight());
 		}
 		}
 		else if ((trans = _activeChar.getTransformation()) != null)
 		else if ((trans = _activeChar.getTransformation()) != null)
 		{
 		{

+ 11 - 11
L2J_Server_BETA/java/com/l2jserver/gameserver/skills/Formulas.java

@@ -1098,7 +1098,7 @@ public final class Formulas
 	 */
 	 */
 	public static final double calcHpRegen(L2Character cha)
 	public static final double calcHpRegen(L2Character cha)
 	{
 	{
-		double init = cha.getTemplate().baseHpReg;
+		double init = cha.getTemplate().getBaseHpReg();
 		double hpRegenMultiplier = cha.isRaid() ? Config.RAID_HP_REGEN_MULTIPLIER : Config.HP_REGEN_MULTIPLIER;
 		double hpRegenMultiplier = cha.isRaid() ? Config.RAID_HP_REGEN_MULTIPLIER : Config.HP_REGEN_MULTIPLIER;
 		double hpRegenBonus = 0;
 		double hpRegenBonus = 0;
 		
 		
@@ -1199,7 +1199,7 @@ public final class Formulas
 	 */
 	 */
 	public static final double calcMpRegen(L2Character cha)
 	public static final double calcMpRegen(L2Character cha)
 	{
 	{
-		double init = cha.getTemplate().baseMpReg;
+		double init = cha.getTemplate().getBaseMpReg();
 		double mpRegenMultiplier = cha.isRaid() ? Config.RAID_MP_REGEN_MULTIPLIER : Config.MP_REGEN_MULTIPLIER;
 		double mpRegenMultiplier = cha.isRaid() ? Config.RAID_MP_REGEN_MULTIPLIER : Config.MP_REGEN_MULTIPLIER;
 		double mpRegenBonus = 0;
 		double mpRegenBonus = 0;
 		
 		
@@ -1293,7 +1293,7 @@ public final class Formulas
 	 */
 	 */
 	public static final double calcCpRegen(L2Character cha)
 	public static final double calcCpRegen(L2Character cha)
 	{
 	{
-		double init = cha.getTemplate().baseHpReg;
+		double init = cha.getTemplate().getBaseHpReg();
 		double cpRegenMultiplier = Config.CP_REGEN_MULTIPLIER;
 		double cpRegenMultiplier = Config.CP_REGEN_MULTIPLIER;
 		double cpRegenBonus = 0;
 		double cpRegenBonus = 0;
 		
 		
@@ -1596,7 +1596,7 @@ public final class Formulas
 		if (crit)
 		if (crit)
 		{
 		{
 			//Finally retail like formula
 			//Finally retail like formula
-			damage = 2 * attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill) * target.calcStat(Stats.CRIT_VULN, target.getTemplate().baseCritVuln, target, null) * (70 * damage / defence);
+			damage = 2 * attacker.calcStat(Stats.CRITICAL_DAMAGE, 1, target, skill) * target.calcStat(Stats.CRIT_VULN, target.getTemplate().getBaseCritVuln(), target, null) * (70 * damage / defence);
 			//Crit dmg add is almost useless in normal hits...
 			//Crit dmg add is almost useless in normal hits...
 			damage += (attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 70 / defence);
 			damage += (attacker.calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, target, skill) * 70 / defence);
 		}
 		}
@@ -2327,25 +2327,25 @@ public final class Formulas
 				switch (stat)
 				switch (stat)
 				{
 				{
 					case AGGRESSION:
 					case AGGRESSION:
-						multiplier = target.getTemplate().baseAggressionVuln;
+						multiplier = target.getTemplate().getBaseAggressionVuln();
 						break;
 						break;
 					case BLEED:
 					case BLEED:
-						multiplier = target.getTemplate().baseBleedVuln;
+						multiplier = target.getTemplate().getBaseBleedVuln();
 						break;
 						break;
 					case POISON:
 					case POISON:
-						multiplier = target.getTemplate().basePoisonVuln;
+						multiplier = target.getTemplate().getBasePoisonVuln();
 						break;
 						break;
 					case STUN:
 					case STUN:
-						multiplier = target.getTemplate().baseStunVuln;
+						multiplier = target.getTemplate().getBaseStunVuln();
 						break;
 						break;
 					case ROOT:
 					case ROOT:
-						multiplier = target.getTemplate().baseRootVuln;
+						multiplier = target.getTemplate().getBaseRootVuln();
 						break;
 						break;
 					case MOVEMENT:
 					case MOVEMENT:
-						multiplier = target.getTemplate().baseMovementVuln;
+						multiplier = target.getTemplate().getBaseMovementVuln();
 						break;
 						break;
 					case SLEEP:
 					case SLEEP:
-						multiplier = target.getTemplate().baseSleepVuln;
+						multiplier = target.getTemplate().getBaseSleepVuln();
 						break;
 						break;
 				}
 				}
 			}
 			}

+ 701 - 138
L2J_Server_BETA/java/com/l2jserver/gameserver/templates/chars/L2CharTemplate.java

@@ -17,164 +17,727 @@ package com.l2jserver.gameserver.templates.chars;
 import com.l2jserver.gameserver.templates.StatsSet;
 import com.l2jserver.gameserver.templates.StatsSet;
 
 
 /**
 /**
- * This class ...
- *
- * @version $Revision: 1.2.4.6 $ $Date: 2005/04/02 15:57:51 $
+ * @author Zoey76
  */
  */
 public class L2CharTemplate
 public class L2CharTemplate
 {
 {
 	// BaseStats
 	// BaseStats
-	public final int baseSTR;
-	public final int baseCON;
-	public final int baseDEX;
-	public final int baseINT;
-	public final int baseWIT;
-	public final int baseMEN;
-	public float baseHpMax;
-	public final float baseCpMax;
-	public final float baseMpMax;
-	
-	/** HP Regen base */
-	public final float baseHpReg;
-	
-	/** MP Regen base */
-	public final float baseMpReg;
-	
-	public final int basePAtk;
-	public final int baseMAtk;
-	public final int basePDef;
-	public final int baseMDef;
-	public final int basePAtkSpd;
-	public final int baseMAtkSpd;
-	public final float baseMReuseRate;
-	public final int baseShldDef;
-	public final int baseAtkRange;
-	public final int baseShldRate;
-	public final int baseCritRate;
-	public final int baseMCritRate;
-	public final int baseWalkSpd;
-	public final int baseRunSpd;
-	
+	private final int _baseSTR;
+	private final int _baseCON;
+	private final int _baseDEX;
+	private final int _baseINT;
+	private final int _baseWIT;
+	private final int _baseMEN;
+	private final float _baseHpMax;
+	private final float _baseCpMax;
+	private final float _baseMpMax;
+	private final float _baseHpReg;
+	private final float _baseMpReg;
+	private final int _basePAtk;
+	private final int _baseMAtk;
+	private final int _basePDef;
+	private final int _baseMDef;
+	private final int _basePAtkSpd;
+	private final int _baseMAtkSpd;
+	private final float _baseMReuseRate;
+	private final int _baseShldDef;
+	private final int _baseAtkRange;
+	private final int _baseShldRate;
+	private final int _baseCritRate;
+	private final int _baseMCritRate;
+	private final int _baseWalkSpd;
+	private final int _baseRunSpd;
 	// SpecialStats
 	// SpecialStats
-	public final int baseBreath;
-	public final int baseAggression;
-	public final int baseBleed;
-	public final int basePoison;
-	public final int baseStun;
-	public final int baseRoot;
-	public final int baseMovement;
-	public final int baseConfusion;
-	public final int baseSleep;
-	public final double baseAggressionVuln;
-	public final double baseBleedVuln;
-	public final double basePoisonVuln;
-	public final double baseStunVuln;
-	public final double baseRootVuln;
-	public final double baseMovementVuln;
-	public final double baseSleepVuln;
-	public int baseFire;
-	public int baseWind;
-	public int baseWater;
-	public int baseEarth;
-	public int baseHoly;
-	public int baseDark;
-	public double baseFireRes;
-	public double baseWindRes;
-	public double baseWaterRes;
-	public double baseEarthRes;
-	public double baseHolyRes;
-	public double baseDarkRes;
-	public final double baseCritVuln;
-		
-	//C4 Stats
-	public final int baseMpConsumeRate;
-	public final int baseHpConsumeRate;
+	private final int _baseBreath;
+	private final int _baseAggression;
+	private final int _baseBleed;
+	private final int _basePoison;
+	private final int _baseStun;
+	private final int _baseRoot;
+	private final int _baseMovement;
+	private final int _baseConfusion;
+	private final int _baseSleep;
+	private final double _baseAggressionVuln;
+	private final double _baseBleedVuln;
+	private final double _basePoisonVuln;
+	private final double _baseStunVuln;
+	private final double _baseRootVuln;
+	private final double _baseMovementVuln;
+	private final double _baseSleepVuln;
+	private final double _baseCritVuln;
+	private int _baseFire;
+	private int _baseWind;
+	private int _baseWater;
+	private int _baseEarth;
+	private int _baseHoly;
+	private int _baseDark;
+	private double _baseFireRes;
+	private double _baseWindRes;
+	private double _baseWaterRes;
+	private double _baseEarthRes;
+	private double _baseHolyRes;
+	private double _baseDarkRes;
+	
+	private final int _baseMpConsumeRate;
+	private final int _baseHpConsumeRate;
 	
 	
 	/**
 	/**
-	 * <FONT COLOR=#FF0000><B> <U>Caution</U> :
-	 * For client info use {@link #fCollisionRadius}
-	 * </B></FONT><BR><BR>
+	 * For client info use {@link #_fCollisionRadius}
 	 */
 	 */
-	public final int collisionRadius;
+	private final int _collisionRadius;
 	
 	
 	/**
 	/**
-	 * <FONT COLOR=#FF0000><B> <U>Caution</U> :
-	 * For client info use {@link #fCollisionHeight}
-	 * </B></FONT><BR><BR>
+	 * For client info use {@link #_fCollisionHeight}
 	 */
 	 */
-	public final int collisionHeight;
+	private final int _collisionHeight;
 	
 	
-	public final double fCollisionRadius;
-	public final double fCollisionHeight;
+	private final double _fCollisionRadius;
+	private final double _fCollisionHeight;
 	
 	
 	public L2CharTemplate(StatsSet set)
 	public L2CharTemplate(StatsSet set)
 	{
 	{
 		// Base stats
 		// Base stats
-		baseSTR = set.getInteger("baseSTR");
-		baseCON = set.getInteger("baseCON");
-		baseDEX = set.getInteger("baseDEX");
-		baseINT = set.getInteger("baseINT");
-		baseWIT = set.getInteger("baseWIT");
-		baseMEN = set.getInteger("baseMEN");
-		baseHpMax = set.getFloat("baseHpMax");
-		baseCpMax = set.getFloat("baseCpMax");
-		baseMpMax = set.getFloat("baseMpMax");
-		baseHpReg = set.getFloat("baseHpReg");
-		baseMpReg = set.getFloat("baseMpReg");
-		basePAtk = set.getInteger("basePAtk");
-		baseMAtk = set.getInteger("baseMAtk");
-		basePDef = set.getInteger("basePDef");
-		baseMDef = set.getInteger("baseMDef");
-		basePAtkSpd = set.getInteger("basePAtkSpd");
-		baseMAtkSpd = set.getInteger("baseMAtkSpd");
-		baseMReuseRate = set.getFloat("baseMReuseDelay", 1.f);
-		baseShldDef = set.getInteger("baseShldDef");
-		baseAtkRange = set.getInteger("baseAtkRange");
-		baseShldRate = set.getInteger("baseShldRate");
-		baseCritRate = set.getInteger("baseCritRate");
-		baseMCritRate = set.getInteger("baseMCritRate", 80); // CT2: The magic critical rate has been increased to 10 times.
-		baseWalkSpd = set.getInteger("baseWalkSpd");
-		baseRunSpd = set.getInteger("baseRunSpd");
+		_baseSTR = set.getInteger("baseSTR");
+		_baseCON = set.getInteger("baseCON");
+		_baseDEX = set.getInteger("baseDEX");
+		_baseINT = set.getInteger("baseINT");
+		_baseWIT = set.getInteger("baseWIT");
+		_baseMEN = set.getInteger("baseMEN");
+		_baseHpMax = set.getFloat("baseHpMax");
+		_baseCpMax = set.getFloat("baseCpMax");
+		_baseMpMax = set.getFloat("baseMpMax");
+		_baseHpReg = set.getFloat("baseHpReg");
+		_baseMpReg = set.getFloat("baseMpReg");
+		_basePAtk = set.getInteger("basePAtk");
+		_baseMAtk = set.getInteger("baseMAtk");
+		_basePDef = set.getInteger("basePDef");
+		_baseMDef = set.getInteger("baseMDef");
+		_basePAtkSpd = set.getInteger("basePAtkSpd");
+		_baseMAtkSpd = set.getInteger("baseMAtkSpd");
+		_baseMReuseRate = set.getFloat("baseMReuseDelay", 1.f);
+		_baseShldDef = set.getInteger("baseShldDef");
+		_baseAtkRange = set.getInteger("baseAtkRange");
+		_baseShldRate = set.getInteger("baseShldRate");
+		_baseCritRate = set.getInteger("baseCritRate");
+		_baseMCritRate = set.getInteger("baseMCritRate", 80); // CT2: The magic critical rate has been increased to 10 times.
+		_baseWalkSpd = set.getInteger("baseWalkSpd");
+		_baseRunSpd = set.getInteger("baseRunSpd");
 		
 		
 		// SpecialStats
 		// SpecialStats
-		baseBreath = set.getInteger("baseBreath", 100);
-		baseAggression = set.getInteger("baseAggression", 0);
-		baseBleed = set.getInteger("baseBleed", 0);
-		basePoison = set.getInteger("basePoison", 0);
-		baseStun = set.getInteger("baseStun", 0);
-		baseRoot = set.getInteger("baseRoot", 0);
-		baseMovement = set.getInteger("baseMovement", 0);
-		baseConfusion = set.getInteger("baseConfusion", 0);
-		baseSleep = set.getInteger("baseSleep", 0);
-		baseFire = set.getInteger("baseFire", 0);
-		baseWind = set.getInteger("baseWind", 0);
-		baseWater = set.getInteger("baseWater", 0);
-		baseEarth = set.getInteger("baseEarth", 0);
-		baseHoly = set.getInteger("baseHoly", 0);
-		baseDark = set.getInteger("baseDark", 0);
-		baseAggressionVuln = set.getInteger("baseAggressionVuln", 0);
-		baseBleedVuln = set.getInteger("baseBleedVuln", 0);
-		basePoisonVuln = set.getInteger("basePoisonVuln", 0);
-		baseStunVuln = set.getInteger("baseStunVuln", 0);
-		baseRootVuln = set.getInteger("baseRootVuln", 0);
-		baseMovementVuln = set.getInteger("baseMovementVuln", 0);
-		baseSleepVuln = set.getInteger("baseSleepVuln", 0);
-		baseFireRes = set.getInteger("baseFireRes", 0);
-		baseWindRes = set.getInteger("baseWindRes", 0);
-		baseWaterRes = set.getInteger("baseWaterRes", 0);
-		baseEarthRes = set.getInteger("baseEarthRes", 0);
-		baseHolyRes = set.getInteger("baseHolyRes", 0);
-		baseDarkRes = set.getInteger("baseDarkRes", 0);
-		baseCritVuln = set.getInteger("baseCritVuln", 1);
+		_baseBreath = set.getInteger("baseBreath", 100);
+		_baseAggression = set.getInteger("baseAggression", 0);
+		_baseBleed = set.getInteger("baseBleed", 0);
+		_basePoison = set.getInteger("basePoison", 0);
+		_baseStun = set.getInteger("baseStun", 0);
+		_baseRoot = set.getInteger("baseRoot", 0);
+		_baseMovement = set.getInteger("baseMovement", 0);
+		_baseConfusion = set.getInteger("baseConfusion", 0);
+		_baseSleep = set.getInteger("baseSleep", 0);
+		_baseFire = set.getInteger("baseFire", 0);
+		_baseWind = set.getInteger("baseWind", 0);
+		_baseWater = set.getInteger("baseWater", 0);
+		_baseEarth = set.getInteger("baseEarth", 0);
+		_baseHoly = set.getInteger("baseHoly", 0);
+		_baseDark = set.getInteger("baseDark", 0);
+		_baseAggressionVuln = set.getInteger("baseAggressionVuln", 0);
+		_baseBleedVuln = set.getInteger("baseBleedVuln", 0);
+		_basePoisonVuln = set.getInteger("basePoisonVuln", 0);
+		_baseStunVuln = set.getInteger("baseStunVuln", 0);
+		_baseRootVuln = set.getInteger("baseRootVuln", 0);
+		_baseMovementVuln = set.getInteger("baseMovementVuln", 0);
+		_baseSleepVuln = set.getInteger("baseSleepVuln", 0);
+		_baseCritVuln = set.getInteger("baseCritVuln", 1);
+		_baseFireRes = set.getInteger("baseFireRes", 0);
+		_baseWindRes = set.getInteger("baseWindRes", 0);
+		_baseWaterRes = set.getInteger("baseWaterRes", 0);
+		_baseEarthRes = set.getInteger("baseEarthRes", 0);
+		_baseHolyRes = set.getInteger("baseHolyRes", 0);
+		_baseDarkRes = set.getInteger("baseDarkRes", 0);
 		
 		
-		//C4 Stats
-		baseMpConsumeRate = set.getInteger("baseMpConsumeRate", 0);
-		baseHpConsumeRate = set.getInteger("baseHpConsumeRate", 0);
+		// C4 Stats
+		_baseMpConsumeRate = set.getInteger("baseMpConsumeRate", 0);
+		_baseHpConsumeRate = set.getInteger("baseHpConsumeRate", 0);
 		
 		
 		// Geometry
 		// Geometry
-		fCollisionHeight = set.getDouble("collision_height");
-		fCollisionRadius = set.getDouble("collision_radius");
-		collisionRadius = (int) fCollisionRadius;
-		collisionHeight = (int) fCollisionHeight;
+		_fCollisionHeight = set.getDouble("collision_height");
+		_fCollisionRadius = set.getDouble("collision_radius");
+		_collisionRadius = (int) _fCollisionRadius;
+		_collisionHeight = (int) _fCollisionHeight;
+	}
+	
+	/**
+	 * @return the baseHpMax
+	 */
+	public float getBaseHpMax()
+	{
+		return _baseHpMax;
+	}
+	
+	/**
+	 * @return the _baseFire
+	 */
+	public int getBaseFire()
+	{
+		return _baseFire;
+	}
+	
+	/**
+	 * @return the _baseWind
+	 */
+	public int getBaseWind()
+	{
+		return _baseWind;
+	}
+	
+	/**
+	 * @return the _baseWater
+	 */
+	public int getBaseWater()
+	{
+		return _baseWater;
+	}
+	
+	/**
+	 * @return the _baseEarth
+	 */
+	public int getBaseEarth()
+	{
+		return _baseEarth;
+	}
+	
+	/**
+	 * @return the _baseHoly
+	 */
+	public int getBaseHoly()
+	{
+		return _baseHoly;
+	}
+	
+	/**
+	 * @return the _baseDark
+	 */
+	public int getBaseDark()
+	{
+		return _baseDark;
+	}
+	
+	/**
+	 * @return the _baseFireRes
+	 */
+	public double getBaseFireRes()
+	{
+		return _baseFireRes;
+	}
+	
+	/**
+	 * @return the _baseWindRes
+	 */
+	public double getBaseWindRes()
+	{
+		return _baseWindRes;
+	}
+	
+	/**
+	 * @return the _baseWaterRes
+	 */
+	public double getBaseWaterRes()
+	{
+		return _baseWaterRes;
+	}
+	
+	/**
+	 * @return the _baseEarthRes
+	 */
+	public double getBaseEarthRes()
+	{
+		return _baseEarthRes;
+	}
+	
+	/**
+	 * @return the _baseHolyRes
+	 */
+	public double getBaseHolyRes()
+	{
+		return _baseHolyRes;
+	}
+	
+	/**
+	 * @return the _baseDarkRes
+	 */
+	public double getBaseDarkRes()
+	{
+		return _baseDarkRes;
+	}
+	
+	/**
+	 * @return the baseSTR
+	 */
+	public int getBaseSTR()
+	{
+		return _baseSTR;
+	}
+	
+	/**
+	 * @return the baseCON
+	 */
+	public int getBaseCON()
+	{
+		return _baseCON;
+	}
+	
+	/**
+	 * @return the baseDEX
+	 */
+	public int getBaseDEX()
+	{
+		return _baseDEX;
+	}
+	
+	/**
+	 * @return the baseINT
+	 */
+	public int getBaseINT()
+	{
+		return _baseINT;
+	}
+	
+	/**
+	 * @return the baseWIT
+	 */
+	public int getBaseWIT()
+	{
+		return _baseWIT;
+	}
+	
+	/**
+	 * @return the baseMEN
+	 */
+	public int getBaseMEN()
+	{
+		return _baseMEN;
+	}
+	
+	/**
+	 * @return the baseCpMax
+	 */
+	public float getBaseCpMax()
+	{
+		return _baseCpMax;
+	}
+	
+	/**
+	 * @return the baseMpMax
+	 */
+	public float getBaseMpMax()
+	{
+		return _baseMpMax;
+	}
+	
+	/**
+	 * @return the baseHpReg
+	 */
+	public float getBaseHpReg()
+	{
+		return _baseHpReg;
+	}
+	
+	/**
+	 * @return the baseMpReg
+	 */
+	public float getBaseMpReg()
+	{
+		return _baseMpReg;
+	}
+	
+	/**
+	 * @return the basePAtk
+	 */
+	public int getBasePAtk()
+	{
+		return _basePAtk;
+	}
+	
+	/**
+	 * @return the baseMAtk
+	 */
+	public int getBaseMAtk()
+	{
+		return _baseMAtk;
+	}
+	
+	/**
+	 * @return the basePDef
+	 */
+	public int getBasePDef()
+	{
+		return _basePDef;
+	}
+	
+	/**
+	 * @return the baseMDef
+	 */
+	public int getBaseMDef()
+	{
+		return _baseMDef;
+	}
+	
+	/**
+	 * @return the basePAtkSpd
+	 */
+	public int getBasePAtkSpd()
+	{
+		return _basePAtkSpd;
+	}
+	
+	/**
+	 * @return the baseMAtkSpd
+	 */
+	public int getBaseMAtkSpd()
+	{
+		return _baseMAtkSpd;
+	}
+	
+	/**
+	 * @return the baseMReuseRate
+	 */
+	public float getBaseMReuseRate()
+	{
+		return _baseMReuseRate;
+	}
+	
+	/**
+	 * @return the baseShldDef
+	 */
+	public int getBaseShldDef()
+	{
+		return _baseShldDef;
+	}
+	
+	/**
+	 * @return the baseAtkRange
+	 */
+	public int getBaseAtkRange()
+	{
+		return _baseAtkRange;
+	}
+	
+	/**
+	 * @return the baseShldRate
+	 */
+	public int getBaseShldRate()
+	{
+		return _baseShldRate;
+	}
+	
+	/**
+	 * @return the baseCritRate
+	 */
+	public int getBaseCritRate()
+	{
+		return _baseCritRate;
+	}
+	
+	/**
+	 * @return the baseMCritRate
+	 */
+	public int getBaseMCritRate()
+	{
+		return _baseMCritRate;
+	}
+	
+	/**
+	 * @return the baseWalkSpd
+	 */
+	public int getBaseWalkSpd()
+	{
+		return _baseWalkSpd;
+	}
+	
+	/**
+	 * @return the baseRunSpd
+	 */
+	public int getBaseRunSpd()
+	{
+		return _baseRunSpd;
+	}
+	
+	/**
+	 * @return the baseBreath
+	 */
+	public int getBaseBreath()
+	{
+		return _baseBreath;
+	}
+	
+	/**
+	 * @return the baseAggression
+	 */
+	public int getBaseAggression()
+	{
+		return _baseAggression;
+	}
+	
+	/**
+	 * @return the baseBleed
+	 */
+	public int getBaseBleed()
+	{
+		return _baseBleed;
+	}
+	
+	/**
+	 * @return the basePoison
+	 */
+	public int getBasePoison()
+	{
+		return _basePoison;
+	}
+	
+	/**
+	 * @return the baseStun
+	 */
+	public int getBaseStun()
+	{
+		return _baseStun;
+	}
+	
+	/**
+	 * @return the baseRoot
+	 */
+	public int getBaseRoot()
+	{
+		return _baseRoot;
+	}
+	
+	/**
+	 * @return the baseMovement
+	 */
+	public int getBaseMovement()
+	{
+		return _baseMovement;
+	}
+	
+	/**
+	 * @return the baseConfusion
+	 */
+	public int getBaseConfusion()
+	{
+		return _baseConfusion;
+	}
+	
+	/**
+	 * @return the baseSleep
+	 */
+	public int getBaseSleep()
+	{
+		return _baseSleep;
+	}
+	
+	/**
+	 * @return the baseAggressionVuln
+	 */
+	public double getBaseAggressionVuln()
+	{
+		return _baseAggressionVuln;
+	}
+	
+	/**
+	 * @return the baseBleedVuln
+	 */
+	public double getBaseBleedVuln()
+	{
+		return _baseBleedVuln;
+	}
+	
+	/**
+	 * @return the basePoisonVuln
+	 */
+	public double getBasePoisonVuln()
+	{
+		return _basePoisonVuln;
+	}
+	
+	/**
+	 * @return the baseStunVuln
+	 */
+	public double getBaseStunVuln()
+	{
+		return _baseStunVuln;
+	}
+	
+	/**
+	 * @return the baseRootVuln
+	 */
+	public double getBaseRootVuln()
+	{
+		return _baseRootVuln;
+	}
+	
+	/**
+	 * @return the baseMovementVuln
+	 */
+	public double getBaseMovementVuln()
+	{
+		return _baseMovementVuln;
+	}
+	
+	/**
+	 * @return the baseSleepVuln
+	 */
+	public double getBaseSleepVuln()
+	{
+		return _baseSleepVuln;
+	}
+	
+	/**
+	 * @return the baseCritVuln
+	 */
+	public double getBaseCritVuln()
+	{
+		return _baseCritVuln;
+	}
+	
+	/**
+	 * @return the baseMpConsumeRate
+	 */
+	public int getBaseMpConsumeRate()
+	{
+		return _baseMpConsumeRate;
+	}
+	
+	/**
+	 * @return the baseHpConsumeRate
+	 */
+	public int getBaseHpConsumeRate()
+	{
+		return _baseHpConsumeRate;
+	}
+	
+	/**
+	 * @return the collisionRadius
+	 */
+	public int getCollisionRadius()
+	{
+		return _collisionRadius;
+	}
+	
+	/**
+	 * @return the collisionHeight
+	 */
+	public int getCollisionHeight()
+	{
+		return _collisionHeight;
+	}
+	
+	/**
+	 * @return the fCollisionRadius
+	 */
+	public double getfCollisionRadius()
+	{
+		return _fCollisionRadius;
+	}
+	
+	/**
+	 * @return the fCollisionHeight
+	 */
+	public double getfCollisionHeight()
+	{
+		return _fCollisionHeight;
+	}
+	
+	/**
+	 * @param baseFire the baseFire to set
+	 */
+	public void setBaseFire(int baseFire)
+	{
+		_baseFire = baseFire;
+	}
+	
+	/**
+	 * @param baseWater the baseWater to set
+	 */
+	public void setBaseWater(int baseWater)
+	{
+		_baseWater = baseWater;
+	}
+	
+	/**
+	 * @param baseEarth the baseEarth to set
+	 */
+	public void setBaseEarth(int baseEarth)
+	{
+		_baseEarth = baseEarth;
+	}
+	
+	/**
+	 * @param baseWind the baseWind to set
+	 */
+	public void setBaseWind(int baseWind)
+	{
+		_baseWind = baseWind;
+	}
+	
+	/**
+	 * @param baseHoly the baseHoly to set
+	 */
+	public void setBaseHoly(int baseHoly)
+	{
+		_baseHoly = baseHoly;
+	}
+	
+	/**
+	 * @param baseDark the baseDark to set
+	 */
+	public void setBaseDark(int baseDark)
+	{
+		_baseDark = baseDark;
+	}
+	
+	/**
+	 * @param baseFireRes the baseFireRes to set
+	 */
+	public void setBaseFireRes(double baseFireRes)
+	{
+		_baseFireRes = baseFireRes;
+	}
+	
+	/**
+	 * @param baseWaterRes the baseWaterRes to set
+	 */
+	public void setBaseWaterRes(double baseWaterRes)
+	{
+		_baseWaterRes = baseWaterRes;
+	}
+	
+	/**
+	 * @param baseEarthRes the baseEarthRes to set
+	 */
+	public void setBaseEarthRes(double baseEarthRes)
+	{
+		_baseEarthRes = baseEarthRes;
+	}
+	
+	/**
+	 * @param baseWindRes the baseWindRes to set
+	 */
+	public void setBaseWindRes(double baseWindRes)
+	{
+		_baseWindRes = baseWindRes;
+	}
+	
+	/**
+	 * @param baseHolyRes the baseHolyRes to set
+	 */
+	public void setBaseHolyRes(double baseHolyRes)
+	{
+		_baseHolyRes = baseHolyRes;
+	}
+	
+	/**
+	 * @param baseDarkRes the baseDarkRes to set
+	 */
+	public void setBaseDarkRes(double baseDarkRes)
+	{
+		_baseDarkRes = baseDarkRes;
 	}
 	}
 }
 }

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/templates/chars/L2NpcTemplate.java

@@ -222,7 +222,7 @@ public final class L2NpcTemplate extends L2CharTemplate
 		jClass = set.getString("jClass");
 		jClass = set.getString("jClass");
 		
 		
 		// can be loaded from db
 		// can be loaded from db
-		baseVitalityDivider = level > 0 && rewardExp > 0 ? baseHpMax * 9 * level * level /(100 * rewardExp) : 0;
+		baseVitalityDivider = level > 0 && rewardExp > 0 ? getBaseHpMax() * 9 * level * level /(100 * rewardExp) : 0;
 	}
 	}
 	
 	
 	public void addTeachInfo(ClassId classId)
 	public void addTeachInfo(ClassId classId)

+ 4 - 7
L2J_Server_BETA/java/com/l2jserver/gameserver/util/Util.java

@@ -41,11 +41,9 @@ public final class Util
 	}
 	}
 	
 	
 	/**
 	/**
-	 * Return degree value of object 2 to the horizontal line with object 1
-	 * being the origin
 	 * @param obj1 
 	 * @param obj1 
 	 * @param obj2 
 	 * @param obj2 
-	 * @return 
+	 * @return degree value of object 2 to the horizontal line with object 1 being the origin.
 	 */
 	 */
 	public static double calculateAngleFrom(L2Object obj1, L2Object obj2)
 	public static double calculateAngleFrom(L2Object obj1, L2Object obj2)
 	{
 	{
@@ -53,12 +51,11 @@ public final class Util
 	}
 	}
 	
 	
 	/**
 	/**
-	 * Return degree value of object 2 to the horizontal line with object 1 being the origin
 	 * @param obj1X 
 	 * @param obj1X 
 	 * @param obj1Y 
 	 * @param obj1Y 
 	 * @param obj2X 
 	 * @param obj2X 
 	 * @param obj2Y 
 	 * @param obj2Y 
-	 * @return 
+	 * @return degree value of object 2 to the horizontal line with object 1 being the origin
 	 */
 	 */
 	public final static double calculateAngleFrom(int obj1X, int obj1Y, int obj2X, int obj2Y)
 	public final static double calculateAngleFrom(int obj1X, int obj1Y, int obj2X, int obj2Y)
 	{
 	{
@@ -219,9 +216,9 @@ public final class Util
 			
 			
 		int rad = 0;
 		int rad = 0;
 		if (obj1 instanceof L2Character)
 		if (obj1 instanceof L2Character)
-			rad += ((L2Character) obj1).getTemplate().collisionRadius;
+			rad += ((L2Character) obj1).getTemplate().getCollisionRadius();
 		if (obj2 instanceof L2Character)
 		if (obj2 instanceof L2Character)
-			rad += ((L2Character) obj2).getTemplate().collisionRadius;
+			rad += ((L2Character) obj2).getTemplate().getCollisionRadius();
 		
 		
 		double dx = obj1.getX() - obj2.getX();
 		double dx = obj1.getX() - obj2.getX();
 		double dy = obj1.getY() - obj2.getY();
 		double dy = obj1.getY() - obj2.getY();