mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Added property init function which should get everything working. Added defaults to some properties.
This commit is contained in:
parent
9fc4101812
commit
3205bd1c83
9 changed files with 227 additions and 43 deletions
48
FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs
Normal file
48
FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs
Normal file
|
@ -0,0 +1,48 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.utils
|
||||
{
|
||||
class ActorPropertyPacketUtil
|
||||
{
|
||||
Actor forActor;
|
||||
uint playerActorId;
|
||||
List<SubPacket> subPackets = new List<SubPacket>();
|
||||
SetActorPropetyPacket currentActorPropertyPacket;
|
||||
string currentTarget;
|
||||
|
||||
public ActorPropertyPacketUtil(string firstTarget, Actor forActor, uint playerActorId)
|
||||
{
|
||||
currentActorPropertyPacket = new SetActorPropetyPacket(firstTarget);
|
||||
this.forActor = forActor;
|
||||
this.playerActorId = playerActorId;
|
||||
this.currentTarget = firstTarget;
|
||||
}
|
||||
|
||||
public void addProperty(string property)
|
||||
{
|
||||
if (!currentActorPropertyPacket.addProperty(forActor, property))
|
||||
{
|
||||
currentActorPropertyPacket.setIsMore(true);
|
||||
currentActorPropertyPacket.addTarget();
|
||||
subPackets.Add(currentActorPropertyPacket.buildPacket(playerActorId, forActor.actorId));
|
||||
currentActorPropertyPacket = new SetActorPropetyPacket(currentTarget);
|
||||
}
|
||||
}
|
||||
|
||||
public BasePacket done()
|
||||
{
|
||||
currentActorPropertyPacket.addTarget();
|
||||
currentActorPropertyPacket.setIsMore(false);
|
||||
subPackets.Add(currentActorPropertyPacket.buildPacket(playerActorId, forActor.actorId));
|
||||
return BasePacket.createPacket(subPackets, true, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue