Fixed siege door targeting with enabled geodata.
This commit is contained in:
@@ -1051,16 +1051,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// GeoData Los Check here (or dz > 1000)
|
// GeoData Los Check here (or dz > 1000)
|
||||||
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
||||||
{
|
{
|
||||||
if (target.isDoor() && target.isAutoAttackable(this))
|
if (!target.isDoor() || !target.isAutoAttackable(this))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// BOW and CROSSBOW checks
|
// BOW and CROSSBOW checks
|
||||||
if ((weaponItem != null) && weaponItem.getItemType().isRanged())
|
if ((weaponItem != null) && weaponItem.getItemType().isRanged())
|
||||||
|
@@ -1051,16 +1051,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// GeoData Los Check here (or dz > 1000)
|
// GeoData Los Check here (or dz > 1000)
|
||||||
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
||||||
{
|
{
|
||||||
if (target.isDoor() && target.isAutoAttackable(this))
|
if (!target.isDoor() || !target.isAutoAttackable(this))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// BOW and CROSSBOW checks
|
// BOW and CROSSBOW checks
|
||||||
if ((weaponItem != null) && weaponItem.getItemType().isRanged())
|
if ((weaponItem != null) && weaponItem.getItemType().isRanged())
|
||||||
|
@@ -1051,16 +1051,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// GeoData Los Check here (or dz > 1000)
|
// GeoData Los Check here (or dz > 1000)
|
||||||
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
||||||
{
|
{
|
||||||
if (target.isDoor() && target.isAutoAttackable(this))
|
if (!target.isDoor() || !target.isAutoAttackable(this))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// BOW and CROSSBOW checks
|
// BOW and CROSSBOW checks
|
||||||
if ((weaponItem != null) && weaponItem.getItemType().isRanged())
|
if ((weaponItem != null) && weaponItem.getItemType().isRanged())
|
||||||
|
@@ -1009,16 +1009,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// GeoData Los Check here (or dz > 1000)
|
// GeoData Los Check here (or dz > 1000)
|
||||||
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
||||||
{
|
{
|
||||||
if (target.isDoor() && target.isAutoAttackable(this))
|
if (!target.isDoor() || !target.isAutoAttackable(this))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
target.getKnownList().addKnownObject(this);
|
target.getKnownList().addKnownObject(this);
|
||||||
|
|
||||||
|
@@ -1051,16 +1051,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
// GeoData Los Check here (or dz > 1000)
|
// GeoData Los Check here (or dz > 1000)
|
||||||
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
if (!GeoEngine.getInstance().canSeeTarget(this, target))
|
||||||
{
|
{
|
||||||
if (target.isDoor() && target.isAutoAttackable(this))
|
if (!target.isDoor() || !target.isAutoAttackable(this))
|
||||||
{
|
{
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, target.getLocation());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// BOW and CROSSBOW checks
|
// BOW and CROSSBOW checks
|
||||||
if ((weaponItem != null) && weaponItem.getItemType().isRanged())
|
if ((weaponItem != null) && weaponItem.getItemType().isRanged())
|
||||||
|
Reference in New Issue
Block a user