1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-23 05:07:47 +00:00

Push command loading implemented.

This commit is contained in:
Filip Maj 2017-01-10 16:43:03 -05:00
parent 9bc3fc8dd7
commit fb1d22d731
4 changed files with 31 additions and 6 deletions

View file

@ -271,8 +271,13 @@ namespace FFXIVClassic_Map_Server
classPath, classPath,
displayNameId, displayNameId,
propertyFlags, propertyFlags,
eventConditions eventConditions,
pushCommand,
pushCommandSub,
pushCommandPriority
FROM gamedata_actor_class FROM gamedata_actor_class
LEFT JOIN gamedata_actor_pushcommand
ON gamedata_actor_class.id = gamedata_actor_pushcommand.id
WHERE classPath <> '' WHERE classPath <> ''
"; ";
@ -294,7 +299,18 @@ namespace FFXIVClassic_Map_Server
else else
eventConditions = "{}"; eventConditions = "{}";
ActorClass actorClass = new ActorClass(id, classPath, nameId, propertyFlags, eventConditions); ushort pushCommand = 0;
ushort pushCommandSub = 0;
byte pushCommandPriority = 0;
if (!reader.IsDBNull(reader.GetOrdinal("pushCommand")))
{
pushCommand = reader.GetUInt16("pushCommand");
pushCommandSub = reader.GetUInt16("pushCommandSub");
pushCommandPriority = reader.GetByte("pushCommandPriority");
}
ActorClass actorClass = new ActorClass(id, classPath, nameId, propertyFlags, eventConditions, pushCommand, pushCommandSub, pushCommandPriority);
actorClasses.Add(id, actorClass); actorClasses.Add(id, actorClass);
count++; count++;
} }

View file

@ -14,13 +14,21 @@ namespace FFXIVClassic_Map_Server.actors.chara.npc
public readonly uint propertyFlags; public readonly uint propertyFlags;
public readonly string eventConditions; public readonly string eventConditions;
public ActorClass(uint id, string classPath, uint nameId, uint propertyFlags, string eventConditions) public readonly ushort pushCommand;
public readonly ushort pushCommandSub;
public readonly byte pushCommandPriority;
public ActorClass(uint id, string classPath, uint nameId, uint propertyFlags, string eventConditions, ushort pushCommand, ushort pushCommandSub, byte pushCommandPriority)
{ {
this.actorClassId = id; this.actorClassId = id;
this.classPath = classPath; this.classPath = classPath;
this.displayNameId = nameId; this.displayNameId = nameId;
this.propertyFlags = propertyFlags; this.propertyFlags = propertyFlags;
this.eventConditions = eventConditions; this.eventConditions = eventConditions;
this.pushCommand = pushCommand;
this.pushCommandSub = pushCommandSub;
this.pushCommandPriority = pushCommandPriority;
} }
} }
} }

View file

@ -69,8 +69,9 @@ namespace FFXIVClassic_Map_Server.Actors
npcWork.hateType = 1; npcWork.hateType = 1;
} }
npcWork.pushCommand = 0x271D; npcWork.pushCommand = actorClass.pushCommand;
npcWork.pushCommandPriority = 1; npcWork.pushCommandSub = actorClass.pushCommandSub;
npcWork.pushCommandPriority = actorClass.pushCommandPriority;
GenerateActorName((int)actorNumber); GenerateActorName((int)actorNumber);
} }

View file

@ -2,7 +2,7 @@
{ {
class NpcWork class NpcWork
{ {
public short pushCommand; public ushort pushCommand;
public int pushCommandSub; public int pushCommandSub;
public byte pushCommandPriority; public byte pushCommandPriority;
public byte hateType; public byte hateType;