Broadcast movement and social action packets when region is active.
This commit is contained in:
parent
510bb0fc2b
commit
2d987325eb
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4842,11 +4860,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4842,11 +4860,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4842,11 +4860,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4842,11 +4860,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4851,11 +4869,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4851,11 +4869,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4851,11 +4869,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3126,7 +3144,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3623,7 +3641,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4850,11 +4868,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3126,7 +3144,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3623,7 +3641,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4850,11 +4868,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3126,7 +3144,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3623,7 +3641,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4850,11 +4868,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
@ -493,17 +494,21 @@ abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new CharMoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, (Creature) pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, (Creature) pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new CharMoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -532,7 +537,7 @@ abstract class AbstractAI implements Ctrl
|
||||
_accessor.moveTo(x, y, z);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new CharMoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -126,6 +126,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PartySpelled;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.Revive;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -388,6 +389,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new CharMoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Need hp update.
|
||||
* @param barPixels the bar pixels
|
||||
@ -5751,7 +5770,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new CharMoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,6 @@ import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.RadarControl;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
@ -147,7 +146,7 @@ public class NpcInstance extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -702,7 +701,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
// Send a Server->Client packet SocialAction to the all PlayerInstance on the _knownPlayer of the NpcInstance to display a social action of the NpcInstance on their client
|
||||
broadcastPacket(new SocialAction(getObjectId(), Rnd.get(8)));
|
||||
broadcastSocialAction(Rnd.get(8));
|
||||
// Open a chat window on client with the text of the NpcInstance
|
||||
if (isEventMob)
|
||||
{
|
||||
@ -991,7 +990,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
// Send a Server->Client packet SocialAction to the all PlayerInstance on the _knownPlayer of the NpcInstance to display a social action of the NpcInstance on their client
|
||||
broadcastPacket(new SocialAction(getObjectId(), Rnd.get(8)));
|
||||
broadcastSocialAction(Rnd.get(8));
|
||||
// Open a chat window on client with the text of the NpcInstance
|
||||
if (isEventMob)
|
||||
{
|
||||
|
@ -23,7 +23,6 @@ import org.l2jmobius.gameserver.model.actor.instance.CabaleBufferInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FestivalGuideInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FolkInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CharMoveToLocation;
|
||||
|
||||
public class NpcKnownList extends CreatureKnownList
|
||||
{
|
||||
@ -44,7 +43,7 @@ public class NpcKnownList extends CreatureKnownList
|
||||
// Broadcast correct walking NPC position.
|
||||
if (getActiveObject().isNpc() && (object instanceof Creature) && object.isPlayer() && getActiveChar().isMoving() && !getActiveChar().isInCombat())
|
||||
{
|
||||
((Creature) object).broadcastPacket(new CharMoveToLocation(getActiveChar()));
|
||||
((Creature) object).broadcastMoveToLocation();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||
@ -493,17 +494,21 @@ abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new CharMoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, (Creature) pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, (Creature) pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new CharMoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -532,7 +537,7 @@ abstract class AbstractAI implements Ctrl
|
||||
_accessor.moveTo(x, y, z);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new CharMoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -128,6 +128,7 @@ import org.l2jmobius.gameserver.network.serverpackets.PartySpelled;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.Revive;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -390,6 +391,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new CharMoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Need hp update.
|
||||
* @param barPixels the bar pixels
|
||||
@ -5797,7 +5816,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new CharMoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,6 @@ import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.RadarControl;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
@ -149,7 +148,7 @@ public class NpcInstance extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -704,7 +703,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
// Send a Server->Client packet SocialAction to the all PlayerInstance on the _knownPlayer of the NpcInstance to display a social action of the NpcInstance on their client
|
||||
broadcastPacket(new SocialAction(getObjectId(), Rnd.get(8)));
|
||||
broadcastSocialAction(Rnd.get(8));
|
||||
// Open a chat window on client with the text of the NpcInstance
|
||||
if (isEventMob)
|
||||
{
|
||||
@ -993,7 +992,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
// Send a Server->Client packet SocialAction to the all PlayerInstance on the _knownPlayer of the NpcInstance to display a social action of the NpcInstance on their client
|
||||
broadcastPacket(new SocialAction(getObjectId(), Rnd.get(8)));
|
||||
broadcastSocialAction(Rnd.get(8));
|
||||
// Open a chat window on client with the text of the NpcInstance
|
||||
if (isEventMob)
|
||||
{
|
||||
|
@ -23,7 +23,6 @@ import org.l2jmobius.gameserver.model.actor.instance.CabaleBufferInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FestivalGuideInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.FolkInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CharMoveToLocation;
|
||||
|
||||
public class NpcKnownList extends CreatureKnownList
|
||||
{
|
||||
@ -44,7 +43,7 @@ public class NpcKnownList extends CreatureKnownList
|
||||
// Broadcast correct walking NPC position.
|
||||
if (getActiveObject().isNpc() && (object instanceof Creature) && object.isPlayer() && getActiveChar().isMoving() && !getActiveChar().isInCombat())
|
||||
{
|
||||
((Creature) object).broadcastPacket(new CharMoveToLocation(getActiveChar()));
|
||||
((Creature) object).broadcastMoveToLocation();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -543,17 +544,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, (Creature) pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, (Creature) pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -587,7 +592,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -574,6 +574,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -4061,7 +4079,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -4556,7 +4574,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -6280,11 +6298,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -99,7 +99,6 @@ import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -260,7 +259,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -543,17 +544,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, (Creature) pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, (Creature) pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -587,7 +592,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -575,6 +575,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -4063,7 +4081,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -4558,7 +4576,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -6282,11 +6300,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -99,7 +99,6 @@ import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -260,7 +259,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4841,11 +4859,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4841,11 +4859,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4850,11 +4868,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -101,7 +101,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -208,7 +207,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -653,6 +653,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3140,7 +3158,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3637,7 +3655,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4875,11 +4893,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -102,7 +102,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -209,7 +208,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -653,6 +653,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3140,7 +3158,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3637,7 +3655,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4875,11 +4893,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -102,7 +102,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -209,7 +208,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -653,6 +653,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3139,7 +3157,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3636,7 +3654,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4874,11 +4892,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -102,7 +102,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -209,7 +208,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -652,6 +652,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3127,7 +3145,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3624,7 +3642,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4841,11 +4859,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -99,7 +99,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -206,7 +205,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -653,6 +653,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3142,7 +3160,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3639,7 +3657,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4884,11 +4902,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -102,7 +102,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -209,7 +208,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
import org.l2jmobius.gameserver.GameTimeController;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.WorldRegion;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -480,17 +481,21 @@ public abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
if (_actor.isOnGeodataPath())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
_clientMovingToPawnOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
final WorldRegion region = _actor.getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToPawn(_actor, pawn, offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -524,7 +529,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
_actor.moveToLocation(x, y, z, 0);
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.instance.DoppelgangerInstance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MoveToLocation;
|
||||
|
||||
public class DoppelgangerAI extends CreatureAI
|
||||
{
|
||||
@ -261,7 +260,7 @@ public class DoppelgangerAI extends CreatureAI
|
||||
// Doppelgangers always send MoveToLocation packet.
|
||||
if (sendPacket)
|
||||
{
|
||||
_actor.broadcastPacket(new MoveToLocation(_actor));
|
||||
_actor.broadcastMoveToLocation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -653,6 +653,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
});
|
||||
}
|
||||
|
||||
public void broadcastMoveToLocation()
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
}
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
final WorldRegion region = getWorldRegion();
|
||||
if ((region != null) && region.isActive())
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if hp update should be done, false if not
|
||||
*/
|
||||
@ -3149,7 +3167,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
m._moveTimestamp = gameTicks;
|
||||
|
||||
// Send a Server->Client packet MoveToLocation to the actor and all known PlayerInstance.
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPool.execute(() -> getAI().notifyEvent(CtrlEvent.EVT_ARRIVED));
|
||||
@ -3646,7 +3664,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
// to destination by GameTimeController
|
||||
|
||||
// Send a Server->Client packet CharMoveToLocation to the actor and all PlayerInstance in its _knownPlayers
|
||||
broadcastPacket(new MoveToLocation(this));
|
||||
broadcastMoveToLocation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4891,11 +4909,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
return _effectList.isAffected(flag);
|
||||
}
|
||||
|
||||
public void broadcastSocialAction(int id)
|
||||
{
|
||||
broadcastPacket(new SocialAction(getObjectId(), id));
|
||||
}
|
||||
|
||||
public Team getTeam()
|
||||
{
|
||||
return _team;
|
||||
|
@ -102,7 +102,6 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfoAbnormalVisualEffect;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ServerObjectInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@ -209,7 +208,7 @@ public class Npc extends Creature
|
||||
if ((now - _lastSocialBroadcast) > MINIMUM_SOCIAL_INTERVAL)
|
||||
{
|
||||
_lastSocialBroadcast = now;
|
||||
broadcastPacket(new SocialAction(getObjectId(), animationId));
|
||||
broadcastSocialAction(animationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user