Fix for large door targeting.
This commit is contained in:
parent
5aac275c4a
commit
2913652515
@ -1035,10 +1035,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))
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
{
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
return;
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BOW and CROSSBOW checks
|
// BOW and CROSSBOW checks
|
||||||
|
@ -1039,10 +1039,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))
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
{
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
return;
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BOW and CROSSBOW checks
|
// BOW and CROSSBOW checks
|
||||||
|
@ -1039,10 +1039,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))
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
{
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
return;
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BOW and CROSSBOW checks
|
// BOW and CROSSBOW checks
|
||||||
|
@ -1039,10 +1039,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))
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
{
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
return;
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BOW and CROSSBOW checks
|
// BOW and CROSSBOW checks
|
||||||
|
@ -1039,10 +1039,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))
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
if (!target.isDoor() || (target.calculateDistance(this, false, false) > 200)) // fix for big door targeting
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
{
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(SystemMessageId.CANNOT_SEE_TARGET);
|
||||||
return;
|
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BOW and CROSSBOW checks
|
// BOW and CROSSBOW checks
|
||||||
|
Loading…
Reference in New Issue
Block a user