2016-08-22 10:43:04 -04:00
|
|
|
|
|
|
|
|
|
using FFXIVClassic.Common;
|
2016-12-20 19:17:50 -05:00
|
|
|
|
using FFXIVClassic_Map_Server.actors.group;
|
2016-01-20 23:18:10 -05:00
|
|
|
|
using FFXIVClassic_Map_Server.Actors.Chara;
|
2016-01-02 14:04:45 -05:00
|
|
|
|
using FFXIVClassic_Map_Server.packets.send.actor;
|
2017-04-15 16:33:56 -04:00
|
|
|
|
using FFXIVClassic_Map_Server.utils;
|
2016-01-02 14:04:45 -05:00
|
|
|
|
|
2016-01-20 23:18:10 -05:00
|
|
|
|
namespace FFXIVClassic_Map_Server.Actors
|
2016-01-02 14:04:45 -05:00
|
|
|
|
{
|
|
|
|
|
class Character:Actor
|
|
|
|
|
{
|
|
|
|
|
public const int SIZE = 0;
|
|
|
|
|
public const int COLORINFO = 1;
|
|
|
|
|
public const int FACEINFO = 2;
|
|
|
|
|
public const int HIGHLIGHT_HAIR = 3;
|
|
|
|
|
public const int VOICE = 4;
|
2016-03-06 17:55:42 -05:00
|
|
|
|
public const int MAINHAND = 5;
|
|
|
|
|
public const int OFFHAND = 6;
|
|
|
|
|
public const int SPMAINHAND = 7;
|
|
|
|
|
public const int SPOFFHAND = 8;
|
|
|
|
|
public const int THROWING = 9;
|
|
|
|
|
public const int PACK = 10;
|
|
|
|
|
public const int POUCH = 11;
|
2016-01-02 14:04:45 -05:00
|
|
|
|
public const int HEADGEAR = 12;
|
|
|
|
|
public const int BODYGEAR = 13;
|
|
|
|
|
public const int LEGSGEAR = 14;
|
|
|
|
|
public const int HANDSGEAR = 15;
|
|
|
|
|
public const int FEETGEAR = 16;
|
|
|
|
|
public const int WAISTGEAR = 17;
|
2016-03-06 17:55:42 -05:00
|
|
|
|
public const int NECKGEAR = 18;
|
|
|
|
|
public const int L_EAR = 19;
|
|
|
|
|
public const int R_EAR = 20;
|
|
|
|
|
public const int R_WRIST = 21;
|
|
|
|
|
public const int L_WRIST = 22;
|
|
|
|
|
public const int R_RINGFINGER = 23;
|
|
|
|
|
public const int L_RINGFINGER = 24;
|
|
|
|
|
public const int R_INDEXFINGER = 25;
|
|
|
|
|
public const int L_INDEXFINGER = 26;
|
|
|
|
|
public const int UNKNOWN = 27;
|
2016-01-02 14:04:45 -05:00
|
|
|
|
|
2016-09-24 14:17:31 -04:00
|
|
|
|
public bool isStatic = false;
|
|
|
|
|
|
2016-01-09 21:35:45 -05:00
|
|
|
|
public uint modelId;
|
2016-03-06 17:55:42 -05:00
|
|
|
|
public uint[] appearanceIds = new uint[28];
|
2016-01-02 14:04:45 -05:00
|
|
|
|
|
2016-01-02 18:17:03 -05:00
|
|
|
|
public uint animationId = 0;
|
|
|
|
|
|
2016-01-02 14:04:45 -05:00
|
|
|
|
public uint currentTarget = 0xC0000000;
|
|
|
|
|
public uint currentLockedTarget = 0xC0000000;
|
|
|
|
|
|
2016-01-02 18:17:03 -05:00
|
|
|
|
public uint currentActorIcon = 0;
|
2016-01-02 14:04:45 -05:00
|
|
|
|
|
2016-01-09 23:22:10 -05:00
|
|
|
|
public Work work = new Work();
|
2016-01-02 14:04:45 -05:00
|
|
|
|
public CharaWork charaWork = new CharaWork();
|
2016-12-20 19:17:50 -05:00
|
|
|
|
|
|
|
|
|
public Group currentParty = null;
|
2017-04-29 20:30:54 -04:00
|
|
|
|
public ContentGroup currentContentGroup = null;
|
2016-12-20 19:17:50 -05:00
|
|
|
|
|
2016-01-02 14:04:45 -05:00
|
|
|
|
public Character(uint actorID) : base(actorID)
|
2016-01-10 13:36:36 -05:00
|
|
|
|
{
|
|
|
|
|
//Init timer array to "notimer"
|
|
|
|
|
for (int i = 0; i < charaWork.statusShownTime.Length; i++)
|
|
|
|
|
charaWork.statusShownTime[i] = 0xFFFFFFFF;
|
2016-01-02 14:04:45 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public SubPacket CreateAppearancePacket(uint playerActorId)
|
2016-01-02 14:04:45 -05:00
|
|
|
|
{
|
2016-01-09 21:35:45 -05:00
|
|
|
|
SetActorAppearancePacket setappearance = new SetActorAppearancePacket(modelId, appearanceIds);
|
2016-06-14 21:29:10 +01:00
|
|
|
|
return setappearance.BuildPacket(actorId, playerActorId);
|
2016-01-02 18:17:03 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public SubPacket CreateInitStatusPacket(uint playerActorId)
|
2016-01-02 18:17:03 -05:00
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
return (SetActorStatusAllPacket.BuildPacket(actorId, playerActorId, charaWork.status));
|
2016-01-02 14:04:45 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public SubPacket CreateSetActorIconPacket(uint playerActorId)
|
2016-01-02 14:04:45 -05:00
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
return SetActorIconPacket.BuildPacket(actorId, playerActorId, currentActorIcon);
|
2016-01-02 14:04:45 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public SubPacket CreateIdleAnimationPacket(uint playerActorId)
|
2016-01-02 14:04:45 -05:00
|
|
|
|
{
|
2017-05-16 23:43:07 -04:00
|
|
|
|
return SetActorSubStatPacket.BuildPacket(actorId, playerActorId, 0, 0, 0, 0, 0, 0, animationId);
|
2016-01-02 14:04:45 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void SetQuestGraphic(Player player, int graphicNum)
|
2016-04-02 17:56:01 -04:00
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
player.QueuePacket(SetActorQuestGraphicPacket.BuildPacket(player.actorId, actorId, graphicNum));
|
2016-04-02 17:56:01 -04:00
|
|
|
|
}
|
|
|
|
|
|
2017-04-29 20:30:54 -04:00
|
|
|
|
public void SetCurrentContentGroup(ContentGroup group, Player player = null)
|
2017-04-15 16:33:56 -04:00
|
|
|
|
{
|
2017-04-29 20:30:54 -04:00
|
|
|
|
if (group != null)
|
|
|
|
|
charaWork.currentContentGroup = group.GetTypeId();
|
|
|
|
|
else
|
|
|
|
|
charaWork.currentContentGroup = 0;
|
|
|
|
|
|
|
|
|
|
currentContentGroup = group;
|
2017-04-15 16:33:56 -04:00
|
|
|
|
|
|
|
|
|
if (player != null)
|
|
|
|
|
{
|
|
|
|
|
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("charaWork/currentContentGroup", this, actorId);
|
|
|
|
|
propPacketUtil.AddProperty("charaWork.currentContentGroup");
|
|
|
|
|
player.QueuePackets(propPacketUtil.Done());
|
|
|
|
|
}
|
2017-05-01 22:30:43 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void PlayAnimation(uint animId)
|
|
|
|
|
{
|
|
|
|
|
zone.BroadcastPacketAroundActor(this, PlayAnimationOnActorPacket.BuildPacket(actorId, actorId, animId));
|
|
|
|
|
}
|
2017-04-15 16:33:56 -04:00
|
|
|
|
|
2016-01-02 14:04:45 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|