Fixed emotes not being sent to the emoter. Fixed appearance packets' gloves/legs being ordered wrong. Chat is implemented. Changed commands to start with '!'.

This commit is contained in:
Filip Maj 2016-02-18 22:38:54 -05:00
parent c6ac8b2f14
commit a47d5f96a5
8 changed files with 86 additions and 43 deletions

View file

@ -216,6 +216,16 @@ namespace FFXIVClassic_Map_Server.Actors
}
}
//Remove players if isolation zone
if (isIsolated)
{
for (int i = 0; i < result.Count; i++)
{
if (result[i] is Player)
result.RemoveAt(i);
}
}
return result;
}
@ -306,11 +316,17 @@ namespace FFXIVClassic_Map_Server.Actors
public void broadcastPacketAroundActor(Actor actor, SubPacket packet)
{
if (isIsolated)
return;
List<Actor> aroundActor = getActorsAroundActor(actor, 50);
foreach (Actor a in aroundActor)
{
{
if (a is Player)
{
if (isIsolated && packet.header.sourceId != a.actorId)
continue;
SubPacket clonedPacket = new SubPacket(packet, actor.actorId);
Player p = (Player)a;
p.queuePacket(clonedPacket);

View file

@ -129,8 +129,8 @@ namespace FFXIVClassic_Map_Server.Actors
feet,
waist,
neck,
leftEars,
rightEars,
leftEar,
rightEar,
leftIndex,
rightIndex,
leftFinger,

View file

@ -538,8 +538,11 @@ namespace FFXIVClassic_Map_Server.Actors
playerSession.queuePacket(packet, true, false);
}
public void broadcastPacket(SubPacket packet)
public void broadcastPacket(SubPacket packet, bool sendToSelf)
{
if (sendToSelf)
queuePacket(packet);
foreach (Actor a in playerSession.actorInstanceList)
{
if (a is Player)
@ -597,8 +600,8 @@ namespace FFXIVClassic_Map_Server.Actors
}
public void doEmote(uint emoteId)
{
broadcastPacket(ActorDoEmotePacket.buildPacket(actorId, actorId, emoteId));
{
broadcastPacket(ActorDoEmotePacket.buildPacket(actorId, actorId, currentTarget, emoteId), true);
}
public void sendGameMessage(Actor sourceActor, Actor textIdOwner, ushort textId, byte log, params object[] msgParams)