Fixed siege door targeting with enabled geodata.

This commit is contained in:
MobiusDev
2017-09-07 02:58:22 +00:00
parent b4e0a77538
commit ea14bb8c3e
5 changed files with 20 additions and 30 deletions

View File

@@ -1051,15 +1051,13 @@ 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()); sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return; return;
} }
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
} }
// BOW and CROSSBOW checks // BOW and CROSSBOW checks

View File

@@ -1051,15 +1051,13 @@ 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()); sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return; return;
} }
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
} }
// BOW and CROSSBOW checks // BOW and CROSSBOW checks

View File

@@ -1051,15 +1051,13 @@ 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()); sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return; return;
} }
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
} }
// BOW and CROSSBOW checks // BOW and CROSSBOW checks

View File

@@ -1009,15 +1009,13 @@ 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()); sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return; return;
} }
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
} }
target.getKnownList().addKnownObject(this); target.getKnownList().addKnownObject(this);

View File

@@ -1051,15 +1051,13 @@ 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()); sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return; return;
} }
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
sendPacket(ActionFailed.STATIC_PACKET);
return;
} }
// BOW and CROSSBOW checks // BOW and CROSSBOW checks