mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 05:37:46 +00:00
Added property flags for actors. Cleaned up NPC constructor.
This commit is contained in:
parent
4ef62a16ec
commit
2939683183
6 changed files with 60 additions and 17 deletions
|
@ -277,6 +277,7 @@
|
|||
<None Include="App.config" />
|
||||
<Content Include="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<None Include="NLog.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
@ -198,6 +198,7 @@ namespace FFXIVClassic_Map_Server
|
|||
id,
|
||||
classPath,
|
||||
displayNameId,
|
||||
propertyFlags,
|
||||
eventConditions
|
||||
FROM gamedata_actor_class
|
||||
WHERE classPath <> ''
|
||||
|
@ -213,13 +214,15 @@ namespace FFXIVClassic_Map_Server
|
|||
string classPath = reader.GetString("classPath");
|
||||
uint nameId = reader.GetUInt32("displayNameId");
|
||||
string eventConditions = null;
|
||||
|
||||
if (!reader.IsDBNull(3))
|
||||
|
||||
uint propertyFlags = reader.GetUInt32("propertyFlags");
|
||||
|
||||
if (!reader.IsDBNull(4))
|
||||
eventConditions = reader.GetString("eventConditions");
|
||||
else
|
||||
eventConditions = "{}";
|
||||
|
||||
ActorClass actorClass = new ActorClass(id, classPath, nameId, eventConditions);
|
||||
ActorClass actorClass = new ActorClass(id, classPath, nameId, propertyFlags, eventConditions);
|
||||
actorClasses.Add(id, actorClass);
|
||||
count++;
|
||||
}
|
||||
|
|
|
@ -345,9 +345,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
ActorClass actorClass = Server.GetWorldManager().GetActorClass(location.classId);
|
||||
|
||||
if (actorClass == null)
|
||||
return;
|
||||
|
||||
Npc npc = new Npc(mActorList.Count + 1, actorClass.actorClassId, location.uniqueId, actorId, location.x, location.y, location.z, location.rot, location.state, location.animId, actorClass.displayNameId, null, actorClass.classPath);
|
||||
return;
|
||||
|
||||
Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, actorId, location.x, location.y, location.z, location.rot, location.state, location.animId, null);
|
||||
npc.LoadEventConditions(actorClass.eventConditions);
|
||||
|
||||
AddActorToZone(npc);
|
||||
|
|
|
@ -11,13 +11,15 @@ namespace FFXIVClassic_Map_Server.actors.chara.npc
|
|||
public readonly uint actorClassId;
|
||||
public readonly string classPath;
|
||||
public readonly uint displayNameId;
|
||||
public readonly uint propertyFlags;
|
||||
public readonly string eventConditions;
|
||||
|
||||
public ActorClass(uint id, string classPath, uint nameId, string eventConditions)
|
||||
public ActorClass(uint id, string classPath, uint nameId, uint propertyFlags, string eventConditions)
|
||||
{
|
||||
this.actorClassId = id;
|
||||
this.classPath = classPath;
|
||||
this.displayNameId = nameId;
|
||||
this.propertyFlags = propertyFlags;
|
||||
this.eventConditions = eventConditions;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using FFXIVClassic.Common;
|
||||
using FFXIVClassic_Map_Server.actors;
|
||||
using FFXIVClassic_Map_Server.actors.chara.npc;
|
||||
using FFXIVClassic_Map_Server.Actors.Chara;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
|
@ -26,7 +27,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
|
||||
public NpcWork npcWork = new NpcWork();
|
||||
|
||||
public Npc(int actorNumber, uint classId, string uniqueId, uint zoneId, float posX, float posY, float posZ, float rot, ushort actorState, uint animationId, uint displayNameId, string customDisplayName, string classPath)
|
||||
public Npc(int actorNumber, ActorClass actorClass, string uniqueId, uint zoneId, float posX, float posY, float posZ, float rot, ushort actorState, uint animationId, string customDisplayName)
|
||||
: base((4 << 28 | zoneId << 19 | (uint)actorNumber))
|
||||
{
|
||||
this.positionX = posX;
|
||||
|
@ -35,7 +36,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
this.rotation = rot;
|
||||
this.animationId = animationId;
|
||||
|
||||
this.displayNameId = displayNameId;
|
||||
this.displayNameId = actorClass.displayNameId;
|
||||
this.customDisplayName = customDisplayName;
|
||||
|
||||
this.uniqueIdentifier = uniqueId;
|
||||
|
@ -43,11 +44,11 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
this.zoneId = zoneId;
|
||||
this.zone = Server.GetWorldManager().GetZone(zoneId);
|
||||
|
||||
this.actorClassId = classId;
|
||||
this.actorClassId = actorClass.actorClassId;
|
||||
|
||||
LoadNpcAppearance(classId);
|
||||
LoadNpcAppearance(actorClass.actorClassId);
|
||||
|
||||
this.classPath = classPath;
|
||||
this.classPath = actorClass.classPath;
|
||||
className = classPath.Substring(classPath.LastIndexOf("/")+1);
|
||||
|
||||
charaWork.battleSave.potencial = 1.0f;
|
||||
|
@ -58,8 +59,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
|
||||
charaWork.parameterSave.hp[0] = 500;
|
||||
charaWork.parameterSave.hpMax[0] = 500;
|
||||
charaWork.property[0] = 1;
|
||||
charaWork.property[1] = 1;
|
||||
|
||||
for (int i = 0; i < 32; i++ )
|
||||
charaWork.property[i] = (byte)(((int)actorClass.propertyFlags >> i) & 1);
|
||||
|
||||
if (className.Equals("JellyfishScenarioLimsaLv00"))
|
||||
{
|
||||
|
@ -67,9 +69,6 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
npcWork.hateType = 1;
|
||||
}
|
||||
|
||||
charaWork.property[3] = 1;
|
||||
charaWork.property[4] = 1;
|
||||
|
||||
npcWork.pushCommand = 0x271D;
|
||||
npcWork.pushCommandPriority = 1;
|
||||
|
||||
|
|
38
research/property_hashes.txt
Normal file
38
research/property_hashes.txt
Normal file
|
@ -0,0 +1,38 @@
|
|||
charaWork.property[0]: E14B0CA8
|
||||
charaWork.property[1]: 2138FD71
|
||||
charaWork.property[2]: 7B675313
|
||||
charaWork.property[3]: 83AF687B
|
||||
charaWork.property[4]: FBFBCFB1
|
||||
charaWork.property[5]: D0528D6D
|
||||
charaWork.property[6]: FB2031F0
|
||||
charaWork.property[7]: FC4FC79E
|
||||
charaWork.property[8]: ED3BE8EF
|
||||
charaWork.property[9]: B2E211F9
|
||||
charaWork.property[10]: CF333207
|
||||
charaWork.property[11]: D2C07981
|
||||
charaWork.property[12]: A0304DFD
|
||||
charaWork.property[13]: C0F3DA5F
|
||||
charaWork.property[14]: 29A79FF3
|
||||
charaWork.property[15]: 51CF95E0
|
||||
charaWork.property[16]: 8EAB1D96
|
||||
charaWork.property[17]: DD73A95
|
||||
charaWork.property[18]: 880CC775
|
||||
charaWork.property[19]: 62B8BF8D
|
||||
charaWork.property[20]: 2EC61BC3
|
||||
charaWork.property[21]: 73F6A7F0
|
||||
charaWork.property[22]: A3E164C0
|
||||
charaWork.property[23]: EA58AAF0
|
||||
charaWork.property[24]: 8A9C7FDC
|
||||
charaWork.property[25]: 8678D367
|
||||
charaWork.property[26]: EB129AED
|
||||
charaWork.property[27]: F7E9CEB6
|
||||
charaWork.property[28]: A1CB539F
|
||||
charaWork.property[29]: 6F821E02
|
||||
charaWork.property[30]: 66C0E093
|
||||
charaWork.property[31]: A6EDF047
|
||||
|
||||
AetheryteParent/MiningPoint, 0, 1,
|
||||
Populace Achievement, 0, 1, 4
|
||||
DoorStandard/BgKeepout/Chocobostop/MarketEntrance/ObjectEventDoor/RetainerFurniture, 0
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue