More subpacket cleanup.

This commit is contained in:
Filip Maj 2017-06-27 13:52:47 -04:00
parent a264745207
commit d8ac8216c4
16 changed files with 219 additions and 224 deletions

View file

@ -9,16 +9,14 @@ namespace FFXIVClassic_Map_Server.utils
class ActorPropertyPacketUtil
{
private Actor forActor;
private uint playerActorId;
private List<SubPacket> subPackets = new List<SubPacket>();
private SetActorPropetyPacket currentActorPropertyPacket;
private string currentTarget;
public ActorPropertyPacketUtil(string firstTarget, Actor forActor, uint playerActorId)
public ActorPropertyPacketUtil(string firstTarget, Actor forActor)
{
currentActorPropertyPacket = new SetActorPropetyPacket(firstTarget);
this.forActor = forActor;
this.playerActorId = playerActorId;
this.currentTarget = firstTarget;
}
@ -28,7 +26,7 @@ namespace FFXIVClassic_Map_Server.utils
{
currentActorPropertyPacket.SetIsMore(true);
currentActorPropertyPacket.AddTarget();
subPackets.Add(currentActorPropertyPacket.BuildPacket(playerActorId, forActor.actorId));
subPackets.Add(currentActorPropertyPacket.BuildPacket(forActor.actorId));
currentActorPropertyPacket = new SetActorPropetyPacket(currentTarget);
currentActorPropertyPacket.AddProperty(forActor, property);
}
@ -45,7 +43,7 @@ namespace FFXIVClassic_Map_Server.utils
{
currentActorPropertyPacket.AddTarget();
currentActorPropertyPacket.SetIsMore(false);
subPackets.Add(currentActorPropertyPacket.BuildPacket(playerActorId, forActor.actorId));
subPackets.Add(currentActorPropertyPacket.BuildPacket(forActor.actorId));
return subPackets;
}