rendered paste bodyIndex: java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 1408)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (working copy)
@@ -130,7 +130,8 @@
protected RandomAnimationTask _rAniTask = null;
private int _currentLHandId; // normally this shouldn't change from the template, but there exist exceptions
private int _currentRHandId; // normally this shouldn't change from the template, but there exist exceptions
-
+ private int _currentCollisionHeight; // used for npc grow effect skills
+ private int _currentCollisionRadius; // used for npc grow effect skills
/** Task launching the function onRandomAnimation() */
protected class RandomAnimationTask implements Runnable
{
@@ -265,7 +266,10 @@
// initialize the "current" equipment
_currentLHandId = getTemplate().lhand;
_currentRHandId = getTemplate().rhand;
-
+ // initialize the "current" collisions
+ _currentCollisionHeight = getTemplate().collisionHeight;
+ _currentCollisionRadius = getTemplate().collisionRadius;
+
if (template == null)
{
_log.severe("No template for Npc. Please check your datapack is setup correctly.");
@@ -2136,7 +2140,8 @@
// we do need to reset the weapons back to the initial templated weapon.
_currentLHandId = getTemplate().lhand;
_currentRHandId = getTemplate().rhand;
-
+ _currentCollisionHeight = getTemplate().collisionHeight;
+ _currentCollisionRadius = getTemplate().collisionRadius;
DecayTaskManager.getInstance().addDecayTask(this);
return true;
}
@@ -2260,5 +2265,21 @@
public void setRHandId(int newWeaponId)
{
_currentRHandId = newWeaponId;
- }
+ }
+ public void setLCollHeight(int height)
+ {
+ _currentCollisionHeight = height;
+ }
+ public void setCollRadius(int radius)
+ {
+ _currentCollisionRadius = radius;
+ }
+ public int getCollisionHeight()
+ {
+ return _currentCollisionHeight;
+ }
+ public int getColisionRadius()
+ {
+ return _currentCollisionRadius;
+ }
}
Index: java/net/sf/l2j/gameserver/serverpackets/NpcInfo.java
===================================================================
--- java/net/sf/l2j/gameserver/serverpackets/NpcInfo.java (revision 1408)
+++ java/net/sf/l2j/gameserver/serverpackets/NpcInfo.java (working copy)
@@ -58,8 +58,8 @@
_rhand = cha.getRightHandItem();
_lhand = cha.getLeftHandItem();
_isSummoned = false;
- _collisionHeight = _activeChar.getTemplate().collisionHeight;
- _collisionRadius = _activeChar.getTemplate().collisionRadius;
+ _collisionHeight = cha.getCollisionHeight();
+ _collisionRadius = cha.getColisionRadius();
if (cha.getTemplate().serverSideName)
_name = cha.getTemplate().name;