Sync with L2JServer Jan 24th 2015.
This commit is contained in:
@ -690,7 +690,12 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isPlayer() && _actor.hasSummon())
|
||||
{
|
||||
_actor.getSummon().broadcastPacket(new AutoAttackStart(_actor.getSummon().getObjectId()));
|
||||
final L2Summon pet = _actor.getPet();
|
||||
if (pet != null)
|
||||
{
|
||||
pet.broadcastPacket(new AutoAttackStart(pet.getObjectId()));
|
||||
}
|
||||
_actor.getServitors().values().forEach(s -> s.broadcastPacket(new AutoAttackStart(s.getObjectId())));
|
||||
}
|
||||
// Send a Server->Client packet AutoAttackStart to the actor and all L2PcInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new AutoAttackStart(_actor.getObjectId()));
|
||||
|
@ -31,8 +31,8 @@ import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.datatables.NpcData;
|
||||
import com.l2jserver.gameserver.datatables.TerritoryTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.TerritoryTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.enums.AISkillScope;
|
||||
import com.l2jserver.gameserver.enums.AIType;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
@ -845,7 +845,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
if (!npc.isInsideRadius(newX, newY, 0, collision, false, false))
|
||||
{
|
||||
int newZ = npc.getZ() + 30;
|
||||
if ((Config.GEODATA == 0) || GeoData.getInstance().canMove(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceId()))
|
||||
if (GeoData.getInstance().canMove(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceId()))
|
||||
{
|
||||
moveTo(newX, newY, newZ);
|
||||
}
|
||||
@ -885,7 +885,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
posY = posY - 300;
|
||||
}
|
||||
|
||||
if ((Config.GEODATA == 0) || GeoData.getInstance().canMove(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceId()))
|
||||
if (GeoData.getInstance().canMove(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceId()))
|
||||
{
|
||||
setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(posX, posY, posZ, 0));
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -1190,7 +1189,7 @@ public class L2CharacterAI extends AbstractAI
|
||||
setIntention(AI_INTENTION_ACTIVE);
|
||||
return true;
|
||||
}
|
||||
if ((_actor != null) && (_skill != null) && _skill.isBad() && (_skill.getAffectRange() > 0) && (Config.GEODATA > 0) && !GeoData.getInstance().canSeeTarget(_actor, target))
|
||||
if ((_actor != null) && (_skill != null) && _skill.isBad() && (_skill.getAffectRange() > 0) && !GeoData.getInstance().canSeeTarget(_actor, target))
|
||||
{
|
||||
setIntention(AI_INTENTION_ACTIVE);
|
||||
return true;
|
||||
|
@ -24,7 +24,6 @@ import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
@ -236,7 +235,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
|
||||
|
||||
final int targetX = ownerX + (int) (AVOID_RADIUS * Math.cos(angle));
|
||||
final int targetY = ownerY + (int) (AVOID_RADIUS * Math.sin(angle));
|
||||
if ((Config.GEODATA == 0) || GeoData.getInstance().canMove(_actor.getX(), _actor.getY(), _actor.getZ(), targetX, targetY, _actor.getZ(), _actor.getInstanceId()))
|
||||
if (GeoData.getInstance().canMove(_actor.getX(), _actor.getY(), _actor.getZ(), targetX, targetY, _actor.getZ(), _actor.getInstanceId()))
|
||||
{
|
||||
moveTo(targetX, targetY, _actor.getZ());
|
||||
}
|
||||
|
Reference in New Issue
Block a user