diff --git a/aclogview/ACE Helpers/ACEBiotaCreator.cs b/aclogview/ACE Helpers/ACEBiotaCreator.cs
index b1f3ad4..e053dc2 100644
--- a/aclogview/ACE Helpers/ACEBiotaCreator.cs
+++ b/aclogview/ACE Helpers/ACEBiotaCreator.cs
@@ -3,56 +3,52 @@
using System.Linq;
using System.Threading;
-using ACE.Database.Models.Shard;
+using ACE.Entity.Enum;
+using ACE.Entity.Enum.Properties;
+using ACE.Entity.Models;
namespace aclogview.ACE_Helpers
{
static class ACEBiotaCreator
{
- public static void AddOrUpdateAttribute(Biota biota, ACE.Entity.Enum.Properties.PropertyAttribute attributeType, Attribute attribute)
+ public static void AddOrUpdateAttribute(Biota biota, PropertyAttribute propertyAttribute, global::Attribute attribute)
{
- var entity = biota.BiotaPropertiesAttribute.ToList().FirstOrDefault(r => r.Type == (ushort)attributeType);
- if (entity == null)
+ biota.PropertiesAttribute[propertyAttribute] = new PropertiesAttribute()
{
- entity = new BiotaPropertiesAttribute { Type = (ushort)attributeType };
- biota.BiotaPropertiesAttribute.Add(entity);
- }
- entity.CPSpent = attribute._cp_spent;
- entity.InitLevel = attribute._init_level;
- entity.LevelFromCP = attribute._level_from_cp;
+ InitLevel = attribute._init_level,
+ LevelFromCP = attribute._level_from_cp,
+ CPSpent = attribute._cp_spent,
+ };
}
- public static void AddOrUpdateAttribute2nd(Biota biota, ACE.Entity.Enum.Properties.PropertyAttribute2nd attributeType, SecondaryAttribute attribute)
+ public static void AddOrUpdateAttribute2nd(Biota biota, PropertyAttribute2nd propertyAttribute2nd, global::SecondaryAttribute attribute)
{
- var entity = biota.BiotaPropertiesAttribute2nd.ToList().FirstOrDefault(r => r.Type == (ushort)attributeType);
- if (entity == null)
+ biota.PropertiesAttribute2nd[propertyAttribute2nd] = new PropertiesAttribute2nd()
{
- entity = new BiotaPropertiesAttribute2nd { Type = (ushort)attributeType };
- biota.BiotaPropertiesAttribute2nd.Add(entity);
- }
- entity.CPSpent = attribute._cp_spent;
- entity.CurrentLevel = attribute._current_level;
- entity.InitLevel = attribute._init_level;
- entity.LevelFromCP = attribute._level_from_cp;
+ InitLevel = attribute._init_level,
+ LevelFromCP = attribute._level_from_cp,
+ CPSpent = attribute._cp_spent,
+ CurrentLevel = attribute._current_level,
+ };
}
- public static void AddOrUpdateSkill(Biota biota, STypeSkill skillType, Skill skill, ReaderWriterLockSlim rwLock)
+ public static void AddOrUpdateSkill(Biota biota, global::STypeSkill skillType, global::Skill skill, ReaderWriterLockSlim rwLock)
{
- var entity = biota.GetOrAddSkill((ushort)skillType, rwLock, out _);
- entity.InitLevel = skill._init_level;
- entity.LastUsedTime = skill._last_used_time;
+ var entity = biota.GetOrAddSkill((ACE.Entity.Enum.Skill)skillType, rwLock, out _);
entity.LevelFromPP = skill._level_from_pp;
+ entity.SAC = (SkillAdvancementClass)skill._sac;
entity.PP = skill._pp;
+ entity.InitLevel = skill._init_level;
entity.ResistanceAtLastCheck = skill._resistance_of_last_check;
- entity.SAC = (uint)skill._sac;
+ entity.LastUsedTime = skill._last_used_time;
}
- private static void AddEnchantment(Biota biota, CM_Magic.Enchantment enchantment, ReaderWriterLockSlim rwLock)
+ private static void AddEnchantment(Biota biota, CM_Magic.Enchantment enchantment)
{
- var entity = new BiotaPropertiesEnchantmentRegistry();
+ var entity = new PropertiesEnchantmentRegistry();
entity.SpellId = enchantment.eid.i_spell_id;
entity.LayerId = enchantment.eid.layer;
- entity.SpellCategory = enchantment.spell_category;
+ entity.SpellCategory = (SpellCategory)enchantment.spell_category;
entity.HasSpellSetId = (enchantment.has_spell_set_id != 0);
entity.PowerLevel = enchantment.power_level;
entity.StartTime = enchantment.start_time;
@@ -61,113 +57,84 @@ private static void AddEnchantment(Biota biota, CM_Magic.Enchantment enchantment
entity.DegradeModifier = enchantment.degrade_modifier;
entity.DegradeLimit = enchantment.degrade_limit;
entity.LastTimeDegraded = enchantment.last_time_degraded;
- entity.StatModType = enchantment.smod.type;
+ entity.StatModType = (EnchantmentTypeFlags)enchantment.smod.type;
entity.StatModKey = enchantment.smod.key;
entity.StatModValue = enchantment.smod.val;
- entity.SpellSetId = enchantment.spell_set_id;
+ entity.SpellSetId = (ACE.Entity.Enum.EquipmentSet)enchantment.spell_set_id;
- biota.AddEnchantment(entity, rwLock);
+ biota.PropertiesEnchantmentRegistry.Add(entity);
}
///
- /// Do not call this twice for the same Character or Biota
+ /// Do not call this twice for the same Biota
/// This should be the first message you parse when constructiong a player
///
- public static void Update(CM_Login.PlayerDescription message, Character character, Biota biota, List<(uint guid, uint containerProperties)> inventory, List<(uint guid, uint location, uint priority)> equipment, ReaderWriterLockSlim rwLock)
+ public static void Update(CM_Login.PlayerDescription message, Biota biota, List<(uint guid, uint containerProperties)> inventory, List<(uint guid, uint location, uint priority)> equipment, ReaderWriterLockSlim rwLock)
{
- biota.WeenieType = (int)message.CACQualities.CBaseQualities._weenie_type;
+ biota.WeenieType = (ACE.Entity.Enum.WeenieType)message.CACQualities.CBaseQualities._weenie_type;
foreach (var kvp in message.CACQualities.CBaseQualities._intStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)kvp.Key, kvp.Value, rwLock, out _);
+ biota.SetProperty((PropertyInt)kvp.Key, kvp.Value, rwLock, out _);
foreach (var kvp in message.CACQualities.CBaseQualities._int64StatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt64)kvp.Key, kvp.Value, rwLock, out _);
+ biota.SetProperty((PropertyInt64)kvp.Key, kvp.Value, rwLock, out _);
foreach (var kvp in message.CACQualities.CBaseQualities._boolStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)kvp.Key, (kvp.Value != 0), rwLock, out _);
+ biota.SetProperty((PropertyBool)kvp.Key, (kvp.Value != 0), rwLock, out _);
foreach (var kvp in message.CACQualities.CBaseQualities._floatStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)kvp.Key, kvp.Value, rwLock, out _);
+ biota.SetProperty((PropertyFloat)kvp.Key, kvp.Value, rwLock, out _);
foreach (var kvp in message.CACQualities.CBaseQualities._strStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyString)kvp.Key, kvp.Value.m_buffer, rwLock, out _);
+ biota.SetProperty((PropertyString)kvp.Key, kvp.Value.m_buffer, rwLock, out _);
foreach (var kvp in message.CACQualities.CBaseQualities._didStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)kvp.Key, kvp.Value, rwLock, out _);
+ biota.SetProperty((PropertyDataId)kvp.Key, kvp.Value, rwLock, out _);
foreach (var kvp in message.CACQualities.CBaseQualities._iidStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)kvp.Key, kvp.Value, rwLock, out _);
+ biota.SetProperty((PropertyInstanceId)kvp.Key, kvp.Value, rwLock, out _);
foreach (var kvp in message.CACQualities.CBaseQualities._posStatsTable.hashTable)
{
var position = new ACE.Entity.Position(kvp.Value.objcell_id, kvp.Value.frame.m_fOrigin.x, kvp.Value.frame.m_fOrigin.y, kvp.Value.frame.m_fOrigin.z, kvp.Value.frame.qx, kvp.Value.frame.qy, kvp.Value.frame.qz, kvp.Value.frame.qw);
- biota.SetPosition((ACE.Entity.Enum.Properties.PositionType)kvp.Key, position, rwLock, out _);
+ biota.SetPosition((PositionType)kvp.Key, position, rwLock);
}
- var name = biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyString.PCAPRecordedCharacterName, name, rwLock, out _);
+ var name = biota.GetProperty(PropertyString.Name, rwLock);
+ biota.SetProperty(PropertyString.PCAPRecordedCharacterName, name, rwLock, out _);
- AddOrUpdateAttribute(biota, ACE.Entity.Enum.Properties.PropertyAttribute.Strength, message.CACQualities._attribCache._strength);
- AddOrUpdateAttribute(biota, ACE.Entity.Enum.Properties.PropertyAttribute.Endurance, message.CACQualities._attribCache._endurance);
- AddOrUpdateAttribute(biota, ACE.Entity.Enum.Properties.PropertyAttribute.Quickness, message.CACQualities._attribCache._quickness);
- AddOrUpdateAttribute(biota, ACE.Entity.Enum.Properties.PropertyAttribute.Coordination, message.CACQualities._attribCache._coordination);
- AddOrUpdateAttribute(biota, ACE.Entity.Enum.Properties.PropertyAttribute.Focus, message.CACQualities._attribCache._focus);
- AddOrUpdateAttribute(biota, ACE.Entity.Enum.Properties.PropertyAttribute.Self, message.CACQualities._attribCache._self);
+ AddOrUpdateAttribute(biota, PropertyAttribute.Strength, message.CACQualities._attribCache._strength);
+ AddOrUpdateAttribute(biota, PropertyAttribute.Endurance, message.CACQualities._attribCache._endurance);
+ AddOrUpdateAttribute(biota, PropertyAttribute.Quickness, message.CACQualities._attribCache._quickness);
+ AddOrUpdateAttribute(biota, PropertyAttribute.Coordination, message.CACQualities._attribCache._coordination);
+ AddOrUpdateAttribute(biota, PropertyAttribute.Focus, message.CACQualities._attribCache._focus);
+ AddOrUpdateAttribute(biota, PropertyAttribute.Self, message.CACQualities._attribCache._self);
- AddOrUpdateAttribute2nd(biota, ACE.Entity.Enum.Properties.PropertyAttribute2nd.Health, message.CACQualities._attribCache._health);
- AddOrUpdateAttribute2nd(biota, ACE.Entity.Enum.Properties.PropertyAttribute2nd.Stamina, message.CACQualities._attribCache._stamina);
- AddOrUpdateAttribute2nd(biota, ACE.Entity.Enum.Properties.PropertyAttribute2nd.Mana, message.CACQualities._attribCache._mana);
+ AddOrUpdateAttribute2nd(biota, PropertyAttribute2nd.Health, message.CACQualities._attribCache._health);
+ AddOrUpdateAttribute2nd(biota, PropertyAttribute2nd.Stamina, message.CACQualities._attribCache._stamina);
+ AddOrUpdateAttribute2nd(biota, PropertyAttribute2nd.Mana, message.CACQualities._attribCache._mana);
foreach (var value in message.CACQualities._skillStatsTable.hashTable)
AddOrUpdateSkill(biota, value.Key, value.Value, rwLock);
foreach (var value in message.CACQualities._spell_book.hashTable)
- {
- var entry = biota.GetOrAddKnownSpell((int)value.Key, rwLock, out _);
- entry.Probability = value.Value;
- }
+ biota.PropertiesSpellBook[(int)value.Key] = value.Value;
if (message.CACQualities._enchantment_reg != null)
{
if (message.CACQualities._enchantment_reg._add_list != null)
{
foreach (var value in message.CACQualities._enchantment_reg._add_list.list)
- AddEnchantment(biota, value, rwLock);
+ AddEnchantment(biota, value);
}
if (message.CACQualities._enchantment_reg._cooldown_list != null)
{
foreach (var value in message.CACQualities._enchantment_reg._cooldown_list.list)
- AddEnchantment(biota, value, rwLock);
+ AddEnchantment(biota, value);
}
if (message.CACQualities._enchantment_reg._mult_list != null)
{
foreach (var value in message.CACQualities._enchantment_reg._mult_list.list)
- AddEnchantment(biota, value, rwLock);
+ AddEnchantment(biota, value);
}
if (message.CACQualities._enchantment_reg._vitae != null && message.CACQualities._enchantment_reg._vitae.eid != null)
- AddEnchantment(biota, message.CACQualities._enchantment_reg._vitae, rwLock);
- }
-
- character.CharacterOptions1 = (int)message.PlayerModule.options_;
-
- if (message.PlayerModule.shortcuts_ != null)
- {
- foreach (var value in message.PlayerModule.shortcuts_.shortCuts_)
- character.CharacterPropertiesShortcutBar.Add(new CharacterPropertiesShortcutBar { ShortcutBarIndex = (uint)value.index_, ShortcutObjectId = value.objectID_ });
- }
-
- for (uint i = 0; i < message.PlayerModule.favorite_spells_.Length; i++)
- {
- if (message.PlayerModule.favorite_spells_[i] != null)
- {
- for (uint j = 0; j < message.PlayerModule.favorite_spells_[i].list.Count; j++)
- character.CharacterPropertiesSpellBar.Add(new CharacterPropertiesSpellBar { SpellBarNumber = i, SpellBarIndex = j, SpellId = (uint)message.PlayerModule.favorite_spells_[i].list[(int)j] });
- }
+ AddEnchantment(biota, message.CACQualities._enchantment_reg._vitae);
}
- foreach (var value in message.PlayerModule.desired_comps_.hashTable)
- character.CharacterPropertiesFillCompBook.Add(new CharacterPropertiesFillCompBook { SpellComponentId = (int)value.Key, QuantityToRebuy = value.Value });
-
- character.SpellbookFilters = message.PlayerModule.spell_filters_;
-
- character.CharacterOptions2 = (int)message.PlayerModule.options2;
-
- // This is just window placement. For now, we don't bother exporting it
- // TODO: message.PlayerModule.m_colGameplayOptions -> player.Character.GameplayOptions
foreach (var value in message.clist.list)
inventory.Add((value.m_iid, value.m_uContainerProperties));
@@ -182,418 +149,415 @@ public static void Update(CM_Physics.CreateObject message, Biota biota, ReaderWr
if (includeMetaData)
{
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)8000, message.object_id, rwLock, out _);
+ biota.SetProperty(PropertyInstanceId.PCAPRecordedObjectIID, message.object_id, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)8001, message.wdesc.header, rwLock, out _);
+ biota.SetProperty(PropertyDataId.PCAPRecordedWeenieHeader, message.wdesc.header, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_INCLUDES_SECOND_HEADER) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)8002, message.wdesc.header2, rwLock, out _);
+ biota.SetProperty(PropertyDataId.PCAPRecordedWeenieHeader2, message.wdesc.header2, rwLock, out _);
}
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyString)STypeString.NAME_STRING, message.wdesc._name.m_buffer, rwLock, out _);
+ biota.SetProperty((PropertyString)STypeString.NAME_STRING, message.wdesc._name.m_buffer, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.ICON_DID, message.wdesc._iconID, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.ICON_DID, message.wdesc._iconID, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.ITEM_TYPE_INT, (int)message.wdesc._type, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.ITEM_TYPE_INT, (int)message.wdesc._type, rwLock, out _);
if (includeMetaData)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)8003, message.wdesc._bitfield, rwLock, out _);
+ biota.SetProperty(PropertyDataId.PCAPRecordedObjectDesc, message.wdesc._bitfield, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_PluralName) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyString)STypeString.PLURAL_NAME_STRING, message.wdesc._plural_name.m_buffer, rwLock, out _);
+ biota.SetProperty((PropertyString)STypeString.PLURAL_NAME_STRING, message.wdesc._plural_name.m_buffer, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_ItemsCapacity) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.ITEMS_CAPACITY_INT, message.wdesc._itemsCapacity, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.ITEMS_CAPACITY_INT, message.wdesc._itemsCapacity, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_ContainersCapacity) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.CONTAINERS_CAPACITY_INT, message.wdesc._containersCapacity, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.CONTAINERS_CAPACITY_INT, message.wdesc._containersCapacity, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_AmmoType) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.AMMO_TYPE_INT, (int)message.wdesc._ammoType, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.AMMO_TYPE_INT, (int)message.wdesc._ammoType, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_Value) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.VALUE_INT, (int)message.wdesc._value, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.VALUE_INT, (int)message.wdesc._value, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_Useability) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.ITEM_USEABLE_INT, (int)message.wdesc._useability, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.ITEM_USEABLE_INT, (int)message.wdesc._useability, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_UseRadius) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)STypeFloat.USE_RADIUS_FLOAT, message.wdesc._useRadius, rwLock, out _);
+ biota.SetProperty((PropertyFloat)STypeFloat.USE_RADIUS_FLOAT, message.wdesc._useRadius, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_TargetType) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.TARGET_TYPE_INT, (int)message.wdesc._targetType, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.TARGET_TYPE_INT, (int)message.wdesc._targetType, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_UIEffects) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.UI_EFFECTS_INT, (int)message.wdesc._effects, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.UI_EFFECTS_INT, (int)message.wdesc._effects, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_CombatUse) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.COMBAT_USE_INT, message.wdesc._combatUse, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.COMBAT_USE_INT, message.wdesc._combatUse, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_Structure) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.STRUCTURE_INT, message.wdesc._structure, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.STRUCTURE_INT, message.wdesc._structure, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_MaxStructure) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.MAX_STRUCTURE_INT, message.wdesc._maxStructure, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.MAX_STRUCTURE_INT, message.wdesc._maxStructure, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_StackSize) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.STACK_SIZE_INT, message.wdesc._stackSize, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.STACK_SIZE_INT, message.wdesc._stackSize, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_MaxStackSize) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.MAX_STACK_SIZE_INT, message.wdesc._maxStackSize, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.MAX_STACK_SIZE_INT, message.wdesc._maxStackSize, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_ContainerID) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)STypeIID.CONTAINER_IID, message.wdesc._containerID, rwLock, out _);
+ biota.SetProperty((PropertyInstanceId)STypeIID.CONTAINER_IID, message.wdesc._containerID, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_WielderID) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)STypeIID.WIELDER_IID, message.wdesc._wielderID, rwLock, out _);
+ biota.SetProperty((PropertyInstanceId)STypeIID.WIELDER_IID, message.wdesc._wielderID, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_ValidLocations) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.LOCATIONS_INT, (int)message.wdesc._valid_locations, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.LOCATIONS_INT, (int)message.wdesc._valid_locations, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_Location) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.CURRENT_WIELDED_LOCATION_INT, (int)message.wdesc._location, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.CURRENT_WIELDED_LOCATION_INT, (int)message.wdesc._location, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_Priority) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.CLOTHING_PRIORITY_INT, (int)message.wdesc._priority, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.CLOTHING_PRIORITY_INT, (int)message.wdesc._priority, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_BlipColor) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.RADARBLIP_COLOR_INT, message.wdesc._blipColor, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.RADARBLIP_COLOR_INT, message.wdesc._blipColor, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_RadarEnum) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.SHOWABLE_ON_RADAR_INT, (int)message.wdesc._radar_enum, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.SHOWABLE_ON_RADAR_INT, (int)message.wdesc._radar_enum, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_PScript) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.PHYSICS_SCRIPT_DID, message.wdesc._pscript, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.PHYSICS_SCRIPT_DID, message.wdesc._pscript, rwLock, out _);
if (includeMetaData)
{
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_Workmanship) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8004, message.wdesc._workmanship, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordedWorkmanship, message.wdesc._workmanship, rwLock, out _);
}
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_Burden) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.ENCUMB_VAL_INT, message.wdesc._burden, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.ENCUMB_VAL_INT, message.wdesc._burden, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_SpellID) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.SPELL_DID, message.wdesc._spellID, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.SPELL_DID, message.wdesc._spellID, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_HouseOwner) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)STypeIID.HOUSE_OWNER_IID, message.wdesc._house_owner_iid, rwLock, out _);
+ biota.SetProperty((PropertyInstanceId)STypeIID.HOUSE_OWNER_IID, message.wdesc._house_owner_iid, rwLock, out _);
//if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_HouseRestrictions) != 0)
- // result.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)(int)STypeIID.WIELDER_IID, Value = message.wdesc._wielderID });
+ // result.SetProperty((PropertyInstanceId)(int)STypeIID.WIELDER_IID, Value = message.wdesc._wielderID });
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_HookItemTypes) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.HOOK_ITEM_TYPE_INT, (int)message.wdesc._hook_item_types, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.HOOK_ITEM_TYPE_INT, (int)message.wdesc._hook_item_types, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_Monarch) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)STypeIID.MONARCH_IID, message.wdesc._monarch, rwLock, out _);
+ biota.SetProperty((PropertyInstanceId)STypeIID.MONARCH_IID, message.wdesc._monarch, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_HookType) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.HOOK_TYPE_INT, message.wdesc._hook_type, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.HOOK_TYPE_INT, message.wdesc._hook_type, rwLock, out _);
if ((message.wdesc.header & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_IconOverlay) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.ICON_OVERLAY_DID, message.wdesc._iconOverlayID, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.ICON_OVERLAY_DID, message.wdesc._iconOverlayID, rwLock, out _);
if ((message.wdesc.header2 & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader2.PWD2_Packed_IconUnderlay) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.ICON_UNDERLAY_DID, message.wdesc._iconUnderlayID, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.ICON_UNDERLAY_DID, message.wdesc._iconUnderlayID, rwLock, out _);
if ((message.wdesc.header & unchecked((uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader.PWD_Packed_MaterialType)) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.MATERIAL_TYPE_INT, (int)message.wdesc._material_type, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.MATERIAL_TYPE_INT, (int)message.wdesc._material_type, rwLock, out _);
if ((message.wdesc.header2 & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader2.PWD2_Packed_CooldownID) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.SHARED_COOLDOWN_INT, (int)message.wdesc._cooldown_id, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.SHARED_COOLDOWN_INT, (int)message.wdesc._cooldown_id, rwLock, out _);
if ((message.wdesc.header2 & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader2.PWD2_Packed_CooldownDuration) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)STypeFloat.COOLDOWN_DURATION_FLOAT, message.wdesc._cooldown_duration, rwLock, out _);
+ biota.SetProperty((PropertyFloat)STypeFloat.COOLDOWN_DURATION_FLOAT, message.wdesc._cooldown_duration, rwLock, out _);
if ((message.wdesc.header2 & (uint)CM_Physics.PublicWeenieDesc.PublicWeenieDescPackHeader2.PWD2_Packed_PetOwner) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)STypeIID.PET_OWNER_IID, message.wdesc._pet_owner, rwLock, out _);
+ biota.SetProperty((PropertyInstanceId)STypeIID.PET_OWNER_IID, message.wdesc._pet_owner, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_ADMIN) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.IS_ADMIN_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.IS_ADMIN_BOOL, true, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_ATTACKABLE) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.ATTACKABLE_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.ATTACKABLE_BOOL, true, rwLock, out _);
else
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.ATTACKABLE_BOOL, false, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.ATTACKABLE_BOOL, false, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_HIDDEN_ADMIN) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.HIDDEN_ADMIN_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.HIDDEN_ADMIN_BOOL, true, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_IMMUNE_CELL_RESTRICTIONS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.IGNORE_HOUSE_BARRIERS_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.IGNORE_HOUSE_BARRIERS_BOOL, true, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_INSCRIBABLE) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.INSCRIBABLE_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.INSCRIBABLE_BOOL, true, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_REQUIRES_PACKSLOT) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.REQUIRES_BACKPACK_SLOT_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.REQUIRES_BACKPACK_SLOT_BOOL, true, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_RETAINED) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.RETAINED_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.RETAINED_BOOL, true, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_STUCK) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.STUCK_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.STUCK_BOOL, true, rwLock, out _);
else
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.STUCK_BOOL, false, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.STUCK_BOOL, false, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_UI_HIDDEN) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.UI_HIDDEN_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.UI_HIDDEN_BOOL, true, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_WIELD_LEFT) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.AUTOWIELD_LEFT_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.AUTOWIELD_LEFT_BOOL, true, rwLock, out _);
if ((message.wdesc._bitfield & (uint)CM_Physics.PublicWeenieDesc.BitfieldIndex.BF_WIELD_ON_USE) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.WIELD_ON_USE_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.WIELD_ON_USE_BOOL, true, rwLock, out _);
if (message.objdesc.subpalettes.Count > 0)
{
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.PALETTE_BASE_DID, message.objdesc.paletteID, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.PALETTE_BASE_DID, message.objdesc.paletteID, rwLock, out _);
- biota.BiotaPropertiesPalette.Clear();
+ biota.PropertiesPalette.Clear();
foreach (var subpalette in message.objdesc.subpalettes)
- biota.BiotaPropertiesPalette.Add(new BiotaPropertiesPalette { SubPaletteId = subpalette.subID, Offset = subpalette.offset, Length = subpalette.numcolors });
+ biota.PropertiesPalette.Add(new PropertiesPalette { SubPaletteId = subpalette.subID, Offset = subpalette.offset, Length = subpalette.numcolors });
}
if (message.objdesc.tmChanges.Count > 0)
{
- byte order = 0;
- biota.BiotaPropertiesTextureMap.Clear();
+ biota.PropertiesTextureMap.Clear();
foreach (var texture in message.objdesc.tmChanges)
- biota.BiotaPropertiesTextureMap.Add(new BiotaPropertiesTextureMap { Index = texture.part_index, OldId = texture.old_tex_id, NewId = texture.new_tex_id, Order = order++ });
+ biota.PropertiesTextureMap.Add(new PropertiesTextureMap { PartIndex = texture.part_index, OldTexture = texture.old_tex_id, NewTexture = texture.new_tex_id });
}
if (message.objdesc.apChanges.Count > 0)
{
- byte order = 0;
- biota.BiotaPropertiesAnimPart.Clear();
+ biota.PropertiesAnimPart.Clear();
foreach (var animPart in message.objdesc.apChanges)
- biota.BiotaPropertiesAnimPart.Add(new BiotaPropertiesAnimPart { Index = animPart.part_index, AnimationId = animPart.part_id, Order = order++ });
+ biota.PropertiesAnimPart.Add(new PropertiesAnimPart { Index = animPart.part_index, AnimationId = animPart.part_id });
}
if (includeMetaData)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)8005, message.physicsdesc.bitfield, rwLock, out _);
+ biota.SetProperty(PropertyDataId.PCAPRecordedPhysicsDesc, message.physicsdesc.bitfield, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.PHYSICS_STATE_INT, (int)message.physicsdesc.state, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.PHYSICS_STATE_INT, (int)message.physicsdesc.state, rwLock, out _);
if (includeMetaData)
{
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.MOVEMENT) != 0)
{
// message.physicsdesc.CMS is not implemented
- //result.SetProperty((ACE.Entity.Enum.Properties.PropertyString)8006, Value = ConvertMovementBufferToString(message.physicsdesc.CMS) });
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)8007, message.physicsdesc.autonomous_movement, rwLock, out _);
+ //result.SetProperty((PropertyString)8006, Value = ConvertMovementBufferToString(message.physicsdesc.CMS) });
+ biota.SetProperty(PropertyInt.PCAPRecordedAutonomousMovement, message.physicsdesc.autonomous_movement, rwLock, out _);
}
}
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.ANIMFRAME_ID) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)STypeInt.PLACEMENT_INT, (int)message.physicsdesc.animframe_id, rwLock, out _);
+ biota.SetProperty((PropertyInt)STypeInt.PLACEMENT_INT, (int)message.physicsdesc.animframe_id, rwLock, out _);
if (includeMetaData)
{
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.POSITION) != 0)
- biota.BiotaPropertiesPosition.Add(
- new BiotaPropertiesPosition
+ biota.PropertiesPosition[PositionType.PCAPRecordedLocation] =
+ new PropertiesPosition
{
- PositionType = 8040,
ObjCellId = message.physicsdesc.pos.objcell_id,
- OriginX = message.physicsdesc.pos.frame.m_fOrigin.x,
- OriginY = message.physicsdesc.pos.frame.m_fOrigin.y,
- OriginZ = message.physicsdesc.pos.frame.m_fOrigin.z,
- AnglesW = message.physicsdesc.pos.frame.qw,
- AnglesX = message.physicsdesc.pos.frame.qx,
- AnglesY = message.physicsdesc.pos.frame.qy,
- AnglesZ = message.physicsdesc.pos.frame.qz
- });
+ PositionX = message.physicsdesc.pos.frame.m_fOrigin.x,
+ PositionY = message.physicsdesc.pos.frame.m_fOrigin.y,
+ PositionZ = message.physicsdesc.pos.frame.m_fOrigin.z,
+ RotationW = message.physicsdesc.pos.frame.qw,
+ RotationX = message.physicsdesc.pos.frame.qx,
+ RotationY = message.physicsdesc.pos.frame.qy,
+ RotationZ = message.physicsdesc.pos.frame.qz
+ };
}
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.MTABLE) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.MOTION_TABLE_DID, message.physicsdesc.mtable_id, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.MOTION_TABLE_DID, message.physicsdesc.mtable_id, rwLock, out _);
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.STABLE) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.SOUND_TABLE_DID, message.physicsdesc.stable_id, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.SOUND_TABLE_DID, message.physicsdesc.stable_id, rwLock, out _);
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.PETABLE) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.PHYSICS_EFFECT_TABLE_DID, message.physicsdesc.phstable_id, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.PHYSICS_EFFECT_TABLE_DID, message.physicsdesc.phstable_id, rwLock, out _);
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.CSetup) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)STypeDID.SETUP_DID, message.physicsdesc.setup_id, rwLock, out _);
+ biota.SetProperty((PropertyDataId)STypeDID.SETUP_DID, message.physicsdesc.setup_id, rwLock, out _);
if (includeMetaData)
{
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.PARENT) != 0)
{
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)8008, message.physicsdesc.parent_id, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)8009, message.physicsdesc.location_id, rwLock, out _);
+ biota.SetProperty(PropertyInstanceId.PCAPRecordedParentIID, message.physicsdesc.parent_id, rwLock, out _);
+ biota.SetProperty(PropertyDataId.PCAPRecordedParentLocation, message.physicsdesc.location_id, rwLock, out _);
}
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.CHILDREN) != 0)
{
- //result.SetProperty((ACE.Entity.Enum.Properties.PropertyInstanceId)8008, Value = message.physicsdesc.parent_id });
- //result.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)8009, Value = message.physicsdesc.location_id });
+ //result.SetProperty((PropertyInstanceId)8008, Value = message.physicsdesc.parent_id });
+ //result.SetProperty((PropertyDataId)8009, Value = message.physicsdesc.location_id });
}
}
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.OBJSCALE) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)STypeFloat.DEFAULT_SCALE_FLOAT, message.physicsdesc.object_scale, rwLock, out _);
+ biota.SetProperty((PropertyFloat)STypeFloat.DEFAULT_SCALE_FLOAT, message.physicsdesc.object_scale, rwLock, out _);
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.FRICTION) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)STypeFloat.FRICTION_FLOAT, message.physicsdesc.friction, rwLock, out _);
+ biota.SetProperty((PropertyFloat)STypeFloat.FRICTION_FLOAT, message.physicsdesc.friction, rwLock, out _);
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.ELASTICITY) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)STypeFloat.ELASTICITY_FLOAT, message.physicsdesc.elasticity, rwLock, out _);
+ biota.SetProperty((PropertyFloat)STypeFloat.ELASTICITY_FLOAT, message.physicsdesc.elasticity, rwLock, out _);
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.TRANSLUCENCY) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)STypeFloat.TRANSLUCENCY_FLOAT, message.physicsdesc.translucency, rwLock, out _);
+ biota.SetProperty((PropertyFloat)STypeFloat.TRANSLUCENCY_FLOAT, message.physicsdesc.translucency, rwLock, out _);
if (includeMetaData)
{
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.VELOCITY) != 0)
{
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8010, message.physicsdesc.velocity.x, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8011, message.physicsdesc.velocity.y, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8012, message.physicsdesc.velocity.z, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordedVelocityX, message.physicsdesc.velocity.x, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordedVelocityY, message.physicsdesc.velocity.y, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordedVelocityZ, message.physicsdesc.velocity.z, rwLock, out _);
}
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.ACCELERATION) != 0)
{
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8013, message.physicsdesc.acceleration.x, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8014, message.physicsdesc.acceleration.y, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8015, message.physicsdesc.acceleration.z, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordedAccelerationX, message.physicsdesc.acceleration.x, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordedAccelerationY, message.physicsdesc.acceleration.y, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordedAccelerationZ, message.physicsdesc.acceleration.z, rwLock, out _);
}
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.OMEGA) != 0)
{
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8016, message.physicsdesc.omega.x, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8017, message.physicsdesc.omega.y, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)8018, message.physicsdesc.omega.z, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordeOmegaX, message.physicsdesc.omega.x, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordeOmegaY, message.physicsdesc.omega.y, rwLock, out _);
+ biota.SetProperty(PropertyFloat.PCAPRecordeOmegaZ, message.physicsdesc.omega.z, rwLock, out _);
}
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.DEFAULT_SCRIPT) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)8019, (uint)message.physicsdesc.default_script, rwLock, out _);
+ biota.SetProperty(PropertyDataId.PCAPRecordedDefaultScript, (uint)message.physicsdesc.default_script, rwLock, out _);
}
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.DEFAULT_SCRIPT_INTENSITY) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)STypeFloat.PHYSICS_SCRIPT_INTENSITY_FLOAT, message.physicsdesc.default_script_intensity, rwLock, out _);
+ biota.SetProperty((PropertyFloat)STypeFloat.PHYSICS_SCRIPT_INTENSITY_FLOAT, message.physicsdesc.default_script_intensity, rwLock, out _);
if (includeMetaData)
{
if ((message.physicsdesc.bitfield & (uint)CM_Physics.PhysicsDesc.PhysicsDescInfo.TIMESTAMPS) != 0)
{
for (int i = 0; i < message.physicsdesc.timestamps.Length; ++i)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)(8020 + i), message.physicsdesc.timestamps[i - 1], rwLock, out _);
+ biota.SetProperty((PropertyDataId)((int)PropertyDataId.PCAPRecordedTimestamp0 + i), message.physicsdesc.timestamps[i - 1], rwLock, out _);
}
}
if ((message.physicsdesc.state & (uint)PhysicsState.STATIC_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.STUCK_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.STUCK_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.ETHEREAL_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.ETHEREAL_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.ETHEREAL_BOOL, true, rwLock, out _);
else
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.ETHEREAL_BOOL, false, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.ETHEREAL_BOOL, false, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.REPORT_COLLISIONS_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.REPORT_COLLISIONS_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.REPORT_COLLISIONS_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.IGNORE_COLLISIONS_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.IGNORE_COLLISIONS_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.IGNORE_COLLISIONS_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.NODRAW_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.NODRAW_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.NODRAW_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.GRAVITY_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.GRAVITY_STATUS_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.GRAVITY_STATUS_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.LIGHTING_ON_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.LIGHTS_STATUS_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.LIGHTS_STATUS_BOOL, true, rwLock, out _);
//if ((message.physicsdesc.state & (uint)PhysicsState.HIDDEN_PS) != 0)
- // result.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.VISIBILITY_BOOL, true, rwLock, out _);
+ // result.SetProperty((PropertyBool)STypeBool.VISIBILITY_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.SCRIPTED_COLLISION_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.SCRIPTED_COLLISION_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.SCRIPTED_COLLISION_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.INELASTIC_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.INELASTIC_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.INELASTIC_BOOL, true, rwLock, out _);
//if ((message.physicsdesc.state & (uint)PhysicsState.CLOAKED_PS) != 0)
- // result.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.HIDDEN_ADMIN_BOOL, true, rwLock, out _);
+ // result.SetProperty((PropertyBool)STypeBool.HIDDEN_ADMIN_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.REPORT_COLLISIONS_AS_ENVIRONMENT_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.REPORT_COLLISIONS_AS_ENVIRONMENT_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.REPORT_COLLISIONS_AS_ENVIRONMENT_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.EDGE_SLIDE_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.ALLOW_EDGE_SLIDE_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.ALLOW_EDGE_SLIDE_BOOL, true, rwLock, out _);
if ((message.physicsdesc.state & (uint)PhysicsState.FROZEN_PS) != 0)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)STypeBool.IS_FROZEN_BOOL, true, rwLock, out _);
+ biota.SetProperty((PropertyBool)STypeBool.IS_FROZEN_BOOL, true, rwLock, out _);
}
public static void Update(CM_Examine.SetAppraiseInfo message, Biota biota, ReaderWriterLockSlim rwLock)
{
foreach (var kvp in message.i_prof._intStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)kvp.Key, kvp.Value, rwLock, out _);
+ biota.SetProperty((PropertyInt)kvp.Key, kvp.Value, rwLock, out _);
foreach (var kvp in message.i_prof._int64StatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt64)kvp.Key, kvp.Value, rwLock, out _);
+ biota.SetProperty((PropertyInt64)kvp.Key, kvp.Value, rwLock, out _);
foreach (var kvp in message.i_prof._boolStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyBool)kvp.Key, (kvp.Value != 0), rwLock, out _);
+ biota.SetProperty((PropertyBool)kvp.Key, (kvp.Value != 0), rwLock, out _);
foreach (var kvp in message.i_prof._floatStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyFloat)kvp.Key, kvp.Value, rwLock, out _);
+ biota.SetProperty((PropertyFloat)kvp.Key, kvp.Value, rwLock, out _);
foreach (var kvp in message.i_prof._strStatsTable.hashTable)
{
if (kvp.Value.m_buffer == null) continue; // Not sure why some strings are null
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyString) kvp.Key, kvp.Value.m_buffer, rwLock, out _);
+ biota.SetProperty((PropertyString) kvp.Key, kvp.Value.m_buffer, rwLock, out _);
}
foreach (var kvp in message.i_prof._didStatsTable.hashTable)
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyDataId)kvp.Key, kvp.Value, rwLock, out _);
+ biota.SetProperty((PropertyDataId)kvp.Key, kvp.Value, rwLock, out _);
foreach (var spell in message.i_prof._spellsTable.list)
{
if ((spell & 0x80000000) != 0) // These are enchantments
{
var enchantment = (spell & 0x7FFFFFFF);
- if (biota.BiotaPropertiesEnchantmentRegistry.All(y => y.SpellId != (int)enchantment))
- biota.BiotaPropertiesEnchantmentRegistry.Add(new BiotaPropertiesEnchantmentRegistry{ SpellId = (int)enchantment });
+ if (biota.PropertiesEnchantmentRegistry.All(y => y.SpellId != (int)enchantment))
+ biota.PropertiesEnchantmentRegistry.Add(new PropertiesEnchantmentRegistry{ SpellId = (int)enchantment });
}
else
{
- if (biota.BiotaPropertiesSpellBook.All(y => y.Spell != (int)spell))
- biota.BiotaPropertiesSpellBook.Add(new BiotaPropertiesSpellBook { Spell = (int)spell, Probability = 2f });
+ if (!biota.SpellIsKnown((int)spell, rwLock))
+ biota.PropertiesSpellBook[(int)spell] = 2f;
}
}
if ((message.i_prof.header & (uint)CM_Examine.AppraisalProfile.AppraisalProfilePackHeader.Packed_ArmorProfile) != 0)
{
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.ArmorModVsSlash, message.i_prof._armorProfileTable._mod_vs_slash, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.ArmorModVsPierce, message.i_prof._armorProfileTable._mod_vs_pierce, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.ArmorModVsBludgeon, message.i_prof._armorProfileTable._mod_vs_bludgeon, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.ArmorModVsCold, message.i_prof._armorProfileTable._mod_vs_cold, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.ArmorModVsFire, message.i_prof._armorProfileTable._mod_vs_fire, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.ArmorModVsAcid, message.i_prof._armorProfileTable._mod_vs_acid, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.ArmorModVsNether, message.i_prof._armorProfileTable._mod_vs_nether, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.ArmorModVsElectric, message.i_prof._armorProfileTable._mod_vs_electric, rwLock, out _);
+ biota.SetProperty(PropertyFloat.ArmorModVsSlash, message.i_prof._armorProfileTable._mod_vs_slash, rwLock, out _);
+ biota.SetProperty(PropertyFloat.ArmorModVsPierce, message.i_prof._armorProfileTable._mod_vs_pierce, rwLock, out _);
+ biota.SetProperty(PropertyFloat.ArmorModVsBludgeon, message.i_prof._armorProfileTable._mod_vs_bludgeon, rwLock, out _);
+ biota.SetProperty(PropertyFloat.ArmorModVsCold, message.i_prof._armorProfileTable._mod_vs_cold, rwLock, out _);
+ biota.SetProperty(PropertyFloat.ArmorModVsFire, message.i_prof._armorProfileTable._mod_vs_fire, rwLock, out _);
+ biota.SetProperty(PropertyFloat.ArmorModVsAcid, message.i_prof._armorProfileTable._mod_vs_acid, rwLock, out _);
+ biota.SetProperty(PropertyFloat.ArmorModVsNether, message.i_prof._armorProfileTable._mod_vs_nether, rwLock, out _);
+ biota.SetProperty(PropertyFloat.ArmorModVsElectric, message.i_prof._armorProfileTable._mod_vs_electric, rwLock, out _);
}
// todo
/*if ((message.i_prof.header & (uint)CM_Examine.AppraisalProfile.AppraisalProfilePackHeader.Packed_CreatureProfile) != 0)
{
- if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Any(y => y.Type == (ushort)ACE.Entity.Enum.Properties.PropertyAttribute2nd.MaxHealth))
- weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute2nd { Type = (ushort)ACE.Entity.Enum.Properties.PropertyAttribute2nd.MaxHealth, CurrentLevel = message.i_prof._creatureProfileTable._health, InitLevel = 10 });
+ if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Any(y => y.Type == (ushort)PropertyAttribute2nd.MaxHealth))
+ weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute2nd { Type = (ushort)PropertyAttribute2nd.MaxHealth, CurrentLevel = message.i_prof._creatureProfileTable._health, InitLevel = 10 });
if ((message.i_prof._creatureProfileTable._header & (uint)CM_Examine.CreatureAppraisalProfile.CreatureAppraisalProfilePackHeader.Packed_Attributes) != 0)
{
- if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Strength))
- weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Strength, InitLevel = message.i_prof._creatureProfileTable._strength });
- if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Endurance))
- weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Endurance, InitLevel = message.i_prof._creatureProfileTable._endurance });
- if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Quickness))
- weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Quickness, InitLevel = message.i_prof._creatureProfileTable._quickness });
- if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Coordination))
- weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Coordination, InitLevel = message.i_prof._creatureProfileTable._coordination });
- if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Focus))
- weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Focus, InitLevel = message.i_prof._creatureProfileTable._focus });
- if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Self))
- weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)ACE.Entity.Enum.Properties.PropertyAttribute.Self, InitLevel = message.i_prof._creatureProfileTable._self });
-
- if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Any(y => y.Type == (ushort)ACE.Entity.Enum.Properties.PropertyAttribute2nd.MaxStamina))
- weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute2nd { Type = (ushort)ACE.Entity.Enum.Properties.PropertyAttribute2nd.MaxStamina, CurrentLevel = message.i_prof._creatureProfileTable._stamina, InitLevel = 10 });
- if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Any(y => y.Type == (ushort)ACE.Entity.Enum.Properties.PropertyAttribute2nd.MaxMana))
- weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute2nd { Type = (ushort)ACE.Entity.Enum.Properties.PropertyAttribute2nd.MaxMana, CurrentLevel = message.i_prof._creatureProfileTable._mana, InitLevel = 10 });
+ if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)PropertyAttribute.Strength))
+ weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)PropertyAttribute.Strength, InitLevel = message.i_prof._creatureProfileTable._strength });
+ if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)PropertyAttribute.Endurance))
+ weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)PropertyAttribute.Endurance, InitLevel = message.i_prof._creatureProfileTable._endurance });
+ if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)PropertyAttribute.Quickness))
+ weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)PropertyAttribute.Quickness, InitLevel = message.i_prof._creatureProfileTable._quickness });
+ if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)PropertyAttribute.Coordination))
+ weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)PropertyAttribute.Coordination, InitLevel = message.i_prof._creatureProfileTable._coordination });
+ if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)PropertyAttribute.Focus))
+ weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)PropertyAttribute.Focus, InitLevel = message.i_prof._creatureProfileTable._focus });
+ if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Any(y => y.Type == (ushort)PropertyAttribute.Self))
+ weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute { Type = (ushort)PropertyAttribute.Self, InitLevel = message.i_prof._creatureProfileTable._self });
+
+ if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Any(y => y.Type == (ushort)PropertyAttribute2nd.MaxStamina))
+ weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute2nd { Type = (ushort)PropertyAttribute2nd.MaxStamina, CurrentLevel = message.i_prof._creatureProfileTable._stamina, InitLevel = 10 });
+ if (!weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Any(y => y.Type == (ushort)PropertyAttribute2nd.MaxMana))
+ weenies[worldIDQueue[currentWorld][message.i_objid]].WeeniePropertiesAttribute2nd.Add(new ACE.Database.Models.World.WeeniePropertiesAttribute2nd { Type = (ushort)PropertyAttribute2nd.MaxMana, CurrentLevel = message.i_prof._creatureProfileTable._mana, InitLevel = 10 });
}
}*/
if ((message.i_prof.header & (uint)CM_Examine.AppraisalProfile.AppraisalProfilePackHeader.Packed_WeaponProfile) != 0)
{
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.DamageType, (int)message.i_prof._weaponProfileTable._damage_type, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.WeaponTime, (int)message.i_prof._weaponProfileTable._weapon_time, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.WeaponSkill, (int)message.i_prof._weaponProfileTable._weapon_skill, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.Damage, (int)message.i_prof._weaponProfileTable._weapon_damage, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.DamageVariance, message.i_prof._weaponProfileTable._damage_variance, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.DamageMod, message.i_prof._weaponProfileTable._damage_mod, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.WeaponLength, message.i_prof._weaponProfileTable._weapon_length, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.MaximumVelocity, message.i_prof._weaponProfileTable._max_velocity, rwLock, out _);
- biota.SetProperty(ACE.Entity.Enum.Properties.PropertyFloat.WeaponOffense, message.i_prof._weaponProfileTable._weapon_offense, rwLock, out _);
- biota.SetProperty((ACE.Entity.Enum.Properties.PropertyInt)8030, (int)message.i_prof._weaponProfileTable._max_velocity_estimated, rwLock, out _);
+ biota.SetProperty(PropertyInt.DamageType, (int)message.i_prof._weaponProfileTable._damage_type, rwLock, out _);
+ biota.SetProperty(PropertyInt.WeaponTime, (int)message.i_prof._weaponProfileTable._weapon_time, rwLock, out _);
+ biota.SetProperty(PropertyInt.WeaponSkill, (int)message.i_prof._weaponProfileTable._weapon_skill, rwLock, out _);
+ biota.SetProperty(PropertyInt.Damage, (int)message.i_prof._weaponProfileTable._weapon_damage, rwLock, out _);
+ biota.SetProperty(PropertyFloat.DamageVariance, message.i_prof._weaponProfileTable._damage_variance, rwLock, out _);
+ biota.SetProperty(PropertyFloat.DamageMod, message.i_prof._weaponProfileTable._damage_mod, rwLock, out _);
+ biota.SetProperty(PropertyFloat.WeaponLength, message.i_prof._weaponProfileTable._weapon_length, rwLock, out _);
+ biota.SetProperty(PropertyFloat.MaximumVelocity, message.i_prof._weaponProfileTable._max_velocity, rwLock, out _);
+ biota.SetProperty(PropertyFloat.WeaponOffense, message.i_prof._weaponProfileTable._weapon_offense, rwLock, out _);
+ biota.SetProperty(PropertyInt.PCAPRecordedMaxVelocityEstimated, (int)message.i_prof._weaponProfileTable._max_velocity_estimated, rwLock, out _);
}
if ((message.i_prof.header & (uint)CM_Examine.AppraisalProfile.AppraisalProfilePackHeader.Packed_HookProfile) != 0)
@@ -612,16 +576,16 @@ public static void Update(CM_Examine.SetAppraiseInfo message, Biota biota, Reade
}
}
- public static void Update(ACE.Entity.Enum.Properties.PositionType positionType, Position position, Biota biota, ReaderWriterLockSlim rwLock)
+ public static void Update(PositionType positionType, global::Position position, Biota biota, ReaderWriterLockSlim rwLock)
{
var newPosition = new ACE.Entity.Position(position.objcell_id, position.frame.m_fOrigin.x, position.frame.m_fOrigin.y, position.frame.m_fOrigin.z, position.frame.qx, position.frame.qy, position.frame.qz, position.frame.qw);
- biota.SetPosition(positionType, newPosition, rwLock, out _);
+ biota.SetPosition(positionType, newPosition, rwLock);
}
public static ACE.Entity.Enum.WeenieType DetermineWeenieType(Biota biota, ReaderWriterLockSlim rwLock)
{
- var objectDescriptionFlagProperty = biota.GetProperty((ACE.Entity.Enum.Properties.PropertyDataId) 8003, rwLock);
+ var objectDescriptionFlagProperty = biota.GetProperty(PropertyDataId.PCAPRecordedObjectDesc, rwLock);
if (objectDescriptionFlagProperty == null)
return ACE.Entity.Enum.WeenieType.Undef;
@@ -655,10 +619,10 @@ public static ACE.Entity.Enum.WeenieType DetermineWeenieType(Biota biota, Reader
if (objectDescriptionFlag.HasFlag(ACE.Entity.Enum.ObjectDescriptionFlag.Corpse))
return ACE.Entity.Enum.WeenieType.Corpse;
- if (biota.GetProperty(ACE.Entity.Enum.Properties.PropertyInt.ValidLocations, rwLock) == (int)ACE.Entity.Enum.EquipMask.MissileAmmo)
+ if (biota.GetProperty(PropertyInt.ValidLocations, rwLock) == (int)ACE.Entity.Enum.EquipMask.MissileAmmo)
return ACE.Entity.Enum.WeenieType.Ammunition;
- var itemTypeProperty = biota.GetProperty(ACE.Entity.Enum.Properties.PropertyInt.ItemType, rwLock);
+ var itemTypeProperty = biota.GetProperty(PropertyInt.ItemType, rwLock);
if (itemTypeProperty == null)
return ACE.Entity.Enum.WeenieType.Undef;
@@ -700,37 +664,37 @@ public static ACE.Entity.Enum.WeenieType DetermineWeenieType(Biota biota, Reader
biota.WeenieClassId >= 20840 && biota.WeenieClassId <= 20849 // W_HOUSEMANSION6241_CLASS to W_HOUSEMANSION6250_CLASS
)
return ACE.Entity.Enum.WeenieType.House;
- else if (biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Deed"))
+ else if (biota.GetProperty(PropertyString.Name, rwLock).Contains("Deed"))
return ACE.Entity.Enum.WeenieType.Deed;
- else if (biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Button") ||
- biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Lever") && !biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Broken")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Candle") && !biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Floating") && !biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Bronze")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Torch") && biota.WeenieClassId != 293
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Plant") && !biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Fertilized")
+ else if (biota.GetProperty(PropertyString.Name, rwLock).Contains("Button") ||
+ biota.GetProperty(PropertyString.Name, rwLock).Contains("Lever") && !biota.GetProperty(PropertyString.Name, rwLock).Contains("Broken")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Candle") && !biota.GetProperty(PropertyString.Name, rwLock).Contains("Floating") && !biota.GetProperty(PropertyString.Name, rwLock).Contains("Bronze")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Torch") && biota.WeenieClassId != 293
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Plant") && !biota.GetProperty(PropertyString.Name, rwLock).Contains("Fertilized")
)
return ACE.Entity.Enum.WeenieType.Switch;
- else if (biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Essence") && biota.GetProperty(ACE.Entity.Enum.Properties.PropertyInt.MaxStructure, rwLock) == 50)
+ else if (biota.GetProperty(PropertyString.Name, rwLock).Contains("Essence") && biota.GetProperty(PropertyInt.MaxStructure, rwLock) == 50)
return ACE.Entity.Enum.WeenieType.PetDevice;
- else if (biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Mag-Ma!")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name) == "Acid"
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Vent")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Steam")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Electric Floor")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Refreshing")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name) == "Sewer"
+ else if (biota.GetProperty(PropertyString.Name, rwLock).Contains("Mag-Ma!")
+ || biota.GetProperty(PropertyString.Name, rwLock) == "Acid"
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Vent")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Steam")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Electric Floor")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Refreshing")
+ || biota.GetProperty(PropertyString.Name, rwLock) == "Sewer"
//|| parsed.wdesc._name.m_buffer.Contains("Ice") && !parsed.wdesc._name.m_buffer.Contains("Box")
//|| parsed.wdesc._name.m_buffer.Contains("Firespurt")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Flames")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Plume")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("The Black Breath")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Flames")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Plume")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("The Black Breath")
//|| parsed.wdesc._name.m_buffer.Contains("Bonfire")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Geyser")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Magma")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Geyser")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Magma")
|| biota.WeenieClassId == 14805
//|| parsed.wdesc._name.m_buffer.Contains("Pool") && !parsed.wdesc._name.m_buffer.Contains("of")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Firespurt")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Bonfire")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Pool") && !biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("of")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Firespurt")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Bonfire")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Pool") && !biota.GetProperty(PropertyString.Name, rwLock).Contains("of")
)
return ACE.Entity.Enum.WeenieType.HotSpot;
else
@@ -758,11 +722,11 @@ public static ACE.Entity.Enum.WeenieType DetermineWeenieType(Biota biota, Reader
)
return ACE.Entity.Enum.WeenieType.Storage;
else if (
- biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Pack")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Backpack")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Sack")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Pouch")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Basket")
+ biota.GetProperty(PropertyString.Name, rwLock).Contains("Pack")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Backpack")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Sack")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Pouch")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Basket")
)
return ACE.Entity.Enum.WeenieType.Container;
else
@@ -822,47 +786,47 @@ public static ACE.Entity.Enum.WeenieType DetermineWeenieType(Biota biota, Reader
)
return ACE.Entity.Enum.WeenieType.SlumLord;
else if (
- biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Bolt")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("wave")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Wave")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Blast")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Ring")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Stream")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Fist")
- // || wo.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Missile")
- // || wo.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Egg")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Death")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Fury")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Wind")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Flaming Skull")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Edge")
- // || wo.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Snowball")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Bomb")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Blade")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Stalactite")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Boulder")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Whirlwind")
+ biota.GetProperty(PropertyString.Name, rwLock).Contains("Bolt")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("wave")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Wave")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Blast")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Ring")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Stream")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Fist")
+ // || wo.GetProperty(PropertyString.Name, rwLock).Contains("Missile")
+ // || wo.GetProperty(PropertyString.Name, rwLock).Contains("Egg")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Death")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Fury")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Wind")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Flaming Skull")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Edge")
+ // || wo.GetProperty(PropertyString.Name, rwLock).Contains("Snowball")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Bomb")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Blade")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Stalactite")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Boulder")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Whirlwind")
)
return ACE.Entity.Enum.WeenieType.ProjectileSpell;
else if (
- biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Missile")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Egg")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Snowball")
+ biota.GetProperty(PropertyString.Name, rwLock).Contains("Missile")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Egg")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Snowball")
)
return ACE.Entity.Enum.WeenieType.Missile;
else
goto default;
case ACE.Entity.Enum.ItemType.Creature:
- var weenieHeaderFlag2 = (ACE.Entity.Enum.WeenieHeaderFlag2)(biota.GetProperty((ACE.Entity.Enum.Properties.PropertyDataId)8002, rwLock) ?? (uint)ACE.Entity.Enum.WeenieHeaderFlag2.None);
+ var weenieHeaderFlag2 = (ACE.Entity.Enum.WeenieHeaderFlag2)(biota.GetProperty((PropertyDataId)8002, rwLock) ?? (uint)ACE.Entity.Enum.WeenieHeaderFlag2.None);
if (weenieHeaderFlag2.HasFlag(ACE.Entity.Enum.WeenieHeaderFlag2.PetOwner))
- if (biota.GetProperty(ACE.Entity.Enum.Properties.PropertyInt.RadarBlipColor, rwLock).HasValue && biota.GetProperty(ACE.Entity.Enum.Properties.PropertyInt.RadarBlipColor, rwLock) == (int)ACE.Entity.Enum.RadarColor.Yellow)
+ if (biota.GetProperty(PropertyInt.RadarBlipColor, rwLock).HasValue && biota.GetProperty(PropertyInt.RadarBlipColor, rwLock) == (int)ACE.Entity.Enum.RadarColor.Yellow)
return ACE.Entity.Enum.WeenieType.Pet;
else
return ACE.Entity.Enum.WeenieType.CombatPet;
else if (
- biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Pet")
- || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Wind-up")
+ biota.GetProperty(PropertyString.Name, rwLock).Contains("Pet")
+ || biota.GetProperty(PropertyString.Name, rwLock).Contains("Wind-up")
|| biota.WeenieClassId == 48881
|| biota.WeenieClassId == 34902
|| biota.WeenieClassId == 48891
@@ -878,9 +842,9 @@ public static ACE.Entity.Enum.WeenieType DetermineWeenieType(Biota biota, Reader
)
return ACE.Entity.Enum.WeenieType.Pet;
else if (
- biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Cow")
- && !biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Auroch")
- && !biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name).Contains("Snowman")
+ biota.GetProperty(PropertyString.Name, rwLock).Contains("Cow")
+ && !biota.GetProperty(PropertyString.Name, rwLock).Contains("Auroch")
+ && !biota.GetProperty(PropertyString.Name, rwLock).Contains("Snowman")
)
return ACE.Entity.Enum.WeenieType.Cow;
else if (
@@ -908,7 +872,7 @@ public static ACE.Entity.Enum.WeenieType DetermineWeenieType(Biota biota, Reader
return ACE.Entity.Enum.WeenieType.MeleeWeapon;
case ACE.Entity.Enum.ItemType.MissileWeapon:
- if (biota.GetProperty(ACE.Entity.Enum.Properties.PropertyInt.AmmoType, rwLock).HasValue)
+ if (biota.GetProperty(PropertyInt.AmmoType, rwLock).HasValue)
return ACE.Entity.Enum.WeenieType.MissileLauncher;
else
return ACE.Entity.Enum.WeenieType.Missile;
@@ -931,11 +895,11 @@ public static ACE.Entity.Enum.WeenieType DetermineWeenieType(Biota biota, Reader
return ACE.Entity.Enum.WeenieType.Scroll;
default:
- if (biota.GetProperty(ACE.Entity.Enum.Properties.PropertyInt.MaxStructure, rwLock).HasValue || biota.GetProperty(ACE.Entity.Enum.Properties.PropertyInt.TargetType, rwLock).HasValue)
+ if (biota.GetProperty(PropertyInt.MaxStructure, rwLock).HasValue || biota.GetProperty(PropertyInt.TargetType, rwLock).HasValue)
return ACE.Entity.Enum.WeenieType.CraftTool;
- else if (biota.GetProperty(ACE.Entity.Enum.Properties.PropertyInt.MaxStackSize, rwLock).HasValue)
+ else if (biota.GetProperty(PropertyInt.MaxStackSize, rwLock).HasValue)
return ACE.Entity.Enum.WeenieType.Stackable;
- else if (biota.BiotaPropertiesSpellBook.Count > 0)
+ else if (biota.PropertiesSpellBook.Count > 0)
return ACE.Entity.Enum.WeenieType.Switch;
else
return ACE.Entity.Enum.WeenieType.Generic;
diff --git a/aclogview/ACE Helpers/ACECharacterCreator.cs b/aclogview/ACE Helpers/ACECharacterCreator.cs
new file mode 100644
index 0000000..2e4d6df
--- /dev/null
+++ b/aclogview/ACE Helpers/ACECharacterCreator.cs
@@ -0,0 +1,43 @@
+using System;
+
+using ACE.Database.Models.Shard;
+
+namespace aclogview.ACE_Helpers
+{
+ static class ACECharacterCreator
+ {
+ ///
+ /// Do not call this twice for the same Character
+ /// This should be the first message you parse when constructiong a player
+ ///
+ public static void Update(CM_Login.PlayerDescription message, Character character)
+ {
+ character.CharacterOptions1 = (int)message.PlayerModule.options_;
+
+ if (message.PlayerModule.shortcuts_ != null)
+ {
+ foreach (var value in message.PlayerModule.shortcuts_.shortCuts_)
+ character.CharacterPropertiesShortcutBar.Add(new CharacterPropertiesShortcutBar { ShortcutBarIndex = (uint)value.index_, ShortcutObjectId = value.objectID_ });
+ }
+
+ for (uint i = 0; i < message.PlayerModule.favorite_spells_.Length; i++)
+ {
+ if (message.PlayerModule.favorite_spells_[i] != null)
+ {
+ for (uint j = 0; j < message.PlayerModule.favorite_spells_[i].list.Count; j++)
+ character.CharacterPropertiesSpellBar.Add(new CharacterPropertiesSpellBar { SpellBarNumber = i, SpellBarIndex = j, SpellId = (uint)message.PlayerModule.favorite_spells_[i].list[(int)j] });
+ }
+ }
+
+ foreach (var value in message.PlayerModule.desired_comps_.hashTable)
+ character.CharacterPropertiesFillCompBook.Add(new CharacterPropertiesFillCompBook { SpellComponentId = (int)value.Key, QuantityToRebuy = value.Value });
+
+ character.SpellbookFilters = message.PlayerModule.spell_filters_;
+
+ character.CharacterOptions2 = (int)message.PlayerModule.options2;
+
+ // This is just window placement. For now, we don't bother exporting it
+ // TODO: message.PlayerModule.m_colGameplayOptions -> player.Character.GameplayOptions
+ }
+ }
+}
diff --git a/aclogview/Tools/Scrapers/CombatDamageGiven.cs b/aclogview/Tools/Scrapers/CombatDamageGiven.cs
index 019a257..ce0ec5c 100644
--- a/aclogview/Tools/Scrapers/CombatDamageGiven.cs
+++ b/aclogview/Tools/Scrapers/CombatDamageGiven.cs
@@ -383,6 +383,20 @@ protected string GetMagicDamageType(string magicVerb)
}
+ ///
+ /// These are player IDs that simultaneously exist for two players that existed on different servers.
+ ///
+ private static readonly HashSet DuplicatePlayerIDs = new HashSet
+ {
+ 1342401215,
+ 1342620788,
+ 1342866589,
+ 1343132953,
+ 1343143799,
+ 1343179227,
+ 1343221089,
+ };
+
private void GetCharList()
{
uint charID = 0;
@@ -392,7 +406,12 @@ private void GetCharList()
{
string[] listValues = line.Split(',');
- charNames.Add(ConvertToUinteger(listValues[0]), listValues[1]);
+ var id = ConvertToUinteger(listValues[0]);
+
+ if (DuplicatePlayerIDs.Contains(id))
+ continue;
+
+ charNames.Add(id, listValues[1]);
}
}
diff --git a/aclogview/Tools/Scrapers/PlayerExporter.cs b/aclogview/Tools/Scrapers/PlayerExporter.cs
index 9461d0a..319d33d 100644
--- a/aclogview/Tools/Scrapers/PlayerExporter.cs
+++ b/aclogview/Tools/Scrapers/PlayerExporter.cs
@@ -1,11 +1,14 @@
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
-using ACE.Database.Models.Shard;
+using ACE.Entity.Enum;
+using ACE.Entity.Enum.Properties;
+using ACE.Entity.Models;
using aclogview.ACE_Helpers;
@@ -30,6 +33,17 @@ public WorldObjectItem(uint guid, string name)
{
Biota.Id = guid;
Name = name;
+
+ Biota.PropertiesPosition = new Dictionary();
+
+ Biota.PropertiesSpellBook = new Dictionary();
+
+ Biota.PropertiesAnimPart = new List();
+ Biota.PropertiesPalette = new List();
+ Biota.PropertiesTextureMap = new List();
+
+ // Biota additions over Weenie
+ Biota.PropertiesEnchantmentRegistry = new Collection();
}
}
@@ -39,7 +53,7 @@ class LoginEvent
public readonly uint TSec;
public readonly Biota Biota = new Biota();
- public readonly Character Character = new Character();
+ public readonly ACE.Database.Models.Shard.Character Character = new ACE.Database.Models.Shard.Character();
public readonly List<(uint guid, uint containerProperties)> Inventory = new List<(uint guid, uint containerProperties)>();
public readonly List<(uint guid, uint location, uint priority)> Equipment = new List<(uint guid, uint location, uint priority)>();
@@ -56,6 +70,23 @@ public LoginEvent(string fileName, uint tsec, uint guid)
Biota.Id = guid;
Character.Id = guid;
+
+ Biota.PropertiesPosition = new Dictionary();
+
+ Biota.PropertiesSpellBook = new Dictionary();
+
+ Biota.PropertiesAnimPart = new List();
+ Biota.PropertiesPalette = new List();
+ Biota.PropertiesTextureMap = new List();
+
+ // Properties for creatures
+ Biota.PropertiesAttribute = new Dictionary();
+ Biota.PropertiesAttribute2nd = new Dictionary();
+ Biota.PropertiesBodyPart = new Dictionary();
+ Biota.PropertiesSkill = new Dictionary();
+
+ // Biota additions over Weenie
+ Biota.PropertiesEnchantmentRegistry = new Collection();
}
public bool IsPossessedItem(uint guid)
@@ -188,7 +219,7 @@ public override (int hits, int messageExceptions) ProcessFileRecords(string file
var message = Proto_UI.EnterWorld.read(binaryReader);
loginEvent = new LoginEvent(fileName, record.tsSec, message.gid);
- loginEvent.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyString.PCAPRecordedServerName, serverName, rwLock, out _);
+ loginEvent.Biota.SetProperty(PropertyString.PCAPRecordedServerName, serverName, rwLock, out _);
continue;
}
@@ -204,7 +235,7 @@ public override (int hits, int messageExceptions) ProcessFileRecords(string file
ACEBiotaCreator.Update(message, loginEvent.Biota, rwLock, true);
var position = new ACE.Entity.Position(message.physicsdesc.pos.objcell_id, message.physicsdesc.pos.frame.m_fOrigin.x, message.physicsdesc.pos.frame.m_fOrigin.y, message.physicsdesc.pos.frame.m_fOrigin.z, message.physicsdesc.pos.frame.qx, message.physicsdesc.pos.frame.qy, message.physicsdesc.pos.frame.qz, message.physicsdesc.pos.frame.qw);
- loginEvent.Biota.SetPosition(ACE.Entity.Enum.Properties.PositionType.Location, position, rwLock, out _);
+ loginEvent.Biota.SetPosition(PositionType.Location, position, rwLock);
}
// Record inventory items
@@ -272,6 +303,8 @@ public override (int hits, int messageExceptions) ProcessFileRecords(string file
}
}
}
+
+ continue;
}
if (messageCode == (uint)PacketOpcode.ORDERED_EVENT) // 0xF7B1 Game Action
@@ -304,7 +337,8 @@ public override (int hits, int messageExceptions) ProcessFileRecords(string file
{
hits++;
- ACEBiotaCreator.Update(message, loginEvent.Character, loginEvent.Biota, loginEvent.Inventory, loginEvent.Equipment, rwLock);
+ ACECharacterCreator.Update(message, loginEvent.Character);
+ ACEBiotaCreator.Update(message, loginEvent.Biota, loginEvent.Inventory, loginEvent.Equipment, rwLock);
lock (playerLoginsByServer)
{
@@ -336,10 +370,10 @@ public override (int hits, int messageExceptions) ProcessFileRecords(string file
// We only process player create/update messages for player biotas during the login process
if (loginEvent != null && !loginEvent.PlayerLoginCompleted)
{
- loginEvent.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.CharacterTitleId, (int)message.mDisplayTitle, rwLock, out _);
+ loginEvent.Biota.SetProperty(PropertyInt.CharacterTitleId, (int)message.mDisplayTitle, rwLock, out _);
foreach (var value in message.mTitleList.list)
- loginEvent.Character.CharacterPropertiesTitleBook.Add(new CharacterPropertiesTitleBook { TitleId = (uint)value });
+ loginEvent.Character.CharacterPropertiesTitleBook.Add(new ACE.Database.Models.Shard.CharacterPropertiesTitleBook { TitleId = (uint)value });
}
}
else if (opCode == (uint)PacketOpcode.Evt_Social__SendClientContractTrackerTable_ID)
@@ -438,7 +472,7 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
var notes = new StringBuilder();
- notes.AppendLine("The following command will import all the sql files into your retail shard. It can take many hours");
+ notes.AppendLine("The following Windows command will import all the sql files into your retail shard. It can take many hours.");
notes.AppendLine("for /f \"delims=\" %f in ('dir /b /s \"C:\\ACLogView Output\\Player Exports\\Darktide\\*.sql\"') do \"C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql\" --user=root --password=password ace_shard_retail_dt < \"%f\"");
notes.AppendLine("for /f \"delims=\" %f in ('dir /b /s \"C:\\ACLogView Output\\Player Exports\\Frostfell\\*.sql\"') do \"C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql\" --user=root --password=password ace_shard_retail_ff < \"%f\"");
notes.AppendLine("for /f \"delims=\" %f in ('dir /b /s \"C:\\ACLogView Output\\Player Exports\\Harvestgain\\*.sql\"') do \"C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql\" --user=root --password=password ace_shard_retail_hg < \"%f\"");
@@ -448,6 +482,18 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
notes.AppendLine("for /f \"delims=\" %f in ('dir /b /s \"C:\\ACLogView Output\\Player Exports\\Thistledown\\*.sql\"') do \"C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql\" --user=root --password=password ace_shard_retail_td < \"%f\"");
notes.AppendLine("for /f \"delims=\" %f in ('dir /b /s \"C:\\ACLogView Output\\Player Exports\\Verdantine\\*.sql\"') do \"C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql\" --user=root --password=password ace_shard_retail_vt < \"%f\"");
notes.AppendLine("for /f \"delims=\" %f in ('dir /b /s \"C:\\ACLogView Output\\Player Exports\\WintersEbb\\*.sql\"') do \"C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\\mysql\" --user=root --password=password ace_shard_retail_we < \"%f\"");
+ notes.AppendLine("The following Linux command will import all the sql files into your retail shard. It can take many hours...");
+ notes.AppendLine("Make sure you're in the Player Exports root folder.");
+ notes.AppendLine("for i in *.sql Darktide/* Darktide/*/* Darktide/*/*/*; do mysql --user=root --password=password ace_shard_retail_dt < \"$i\"; done");
+ notes.AppendLine("for i in *.sql Frostfell/* Frostfell/*/* Frostfell/*/*/*; do mysql --user=root --password=password ace_shard_retail_ff < \"$i\"; done");
+ notes.AppendLine("for i in *.sql Harvestgain/* Harvestgain/*/* Harvestgain/*/*/*; do mysql --user=root --password=password ace_shard_retail_hg < \"$i\"; done");
+ notes.AppendLine("for i in *.sql Leafcull/* Leafcull/*/* Leafcull/*/*/*; do mysql --user=root --password=password ace_shard_retail_lc < \"$i\"; done");
+ notes.AppendLine("for i in *.sql Morningthaw/* Morningthaw/*/* Morningthaw/*/*/*; do mysql --user=root --password=password ace_shard_retail_mt < \"$i\"; done");
+ notes.AppendLine("for i in *.sql Solclaim/* Solclaim/*/* Solclaim/*/*/*; do mysql --user=root --password=password ace_shard_retail_sc < \"$i\"; done");
+ notes.AppendLine("for i in *.sql Thistledown/* Thistledown/*/* Thistledown/*/*/*; do mysql --user=root --password=password ace_shard_retail_td < \"$i\"; done");
+ notes.AppendLine("for i in *.sql Verdantine/* Verdantine/*/* Verdantine/*/*/*; do mysql --user=root --password=password ace_shard_retail_vt < \"$i\"; done");
+ notes.AppendLine("for i in *.sql WintersEbb/* WintersEbb/*/* WintersEbb/*/*/*; do mysql --user=root --password=password ace_shard_retail_we < \"$i\"; done");
+
// Find guid collisions across servers
Dictionary> guidsByServer = new Dictionary>();
@@ -505,13 +551,13 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
return;
// We only export the last login event
- var loginEvent = player.Value.LoginEvents.Where(r => r.Biota.BiotaPropertiesDID.Count > 0).OrderBy(r => r.TSec).LastOrDefault();
+ var loginEvent = player.Value.LoginEvents.Where(r => r.Biota.PropertiesDID.Count > 0).OrderBy(r => r.TSec).LastOrDefault();
// no valid result
if (loginEvent == null)
continue;
- var name = loginEvent.Biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name);
+ var name = loginEvent.Biota.GetProperty(PropertyString.Name, rwLock);
var playerDirectoryRoot = Path.Combine(serverDirectory, name);
@@ -542,20 +588,22 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
// Biota
{
- var defaultFileName = biotaWriter.GetDefaultFileName(loginEvent.Biota);
+ var defaultFileName = ACE.Database.SQLFormatters.Shard.BiotaSQLWriter.GetDefaultFileName(loginEvent.Biota.Id, loginEvent.Biota.GetName());
var fileName = Path.Combine(loginEventDirectory, defaultFileName);
// Update to the latest position seen
if (biotasByServer.TryGetValue(server.Key, out var biotaServer) && biotaServer.TryGetValue(player.Key, out var biotaEx) && biotaEx.LastPosition != null)
- ACEBiotaCreator.Update(ACE.Entity.Enum.Properties.PositionType.Location, biotaEx.LastPosition, loginEvent.Biota, rwLock);
+ ACEBiotaCreator.Update(PositionType.Location, biotaEx.LastPosition, loginEvent.Biota, rwLock);
+
+ loginEvent.Biota.WeenieType = ACEBiotaCreator.DetermineWeenieType(loginEvent.Biota, rwLock);
- loginEvent.Biota.WeenieType = (int) ACEBiotaCreator.DetermineWeenieType(loginEvent.Biota, rwLock);
+ var databaseBiota = ACE.Database.Adapter.BiotaConverter.ConvertFromEntityBiota(loginEvent.Biota);
- SetBiotaPopulatedCollections(loginEvent.Biota);
+ ACE.Database.ShardDatabase.SetBiotaPopulatedCollections(databaseBiota);
using (StreamWriter outputFile = new StreamWriter(fileName, false))
- biotaWriter.CreateSQLINSERTStatement(loginEvent.Biota, outputFile);
+ biotaWriter.CreateSQLINSERTStatement(databaseBiota, outputFile);
}
// Character
@@ -592,12 +640,12 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
{
if (loginEvent.Inventory[i].guid == woiBeingUsed.Biota.Id)
{
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Owner, loginEvent.Biota.Id, rwLock, out _);
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Container, loginEvent.Biota.Id, rwLock, out _);
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.InventoryOrder, i, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInstanceId.Owner, loginEvent.Biota.Id, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInstanceId.Container, loginEvent.Biota.Id, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInt.InventoryOrder, i, rwLock, out _);
- woiBeingUsed.Biota.TryRemoveProperty(ACE.Entity.Enum.Properties.PropertyInt.CurrentWieldedLocation, out _, rwLock);
- woiBeingUsed.Biota.TryRemoveProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Wielder, out _, rwLock);
+ woiBeingUsed.Biota.TryRemoveProperty(PropertyInt.CurrentWieldedLocation, rwLock);
+ woiBeingUsed.Biota.TryRemoveProperty(PropertyInstanceId.Wielder, rwLock);
goto processed;
}
@@ -608,12 +656,12 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
var index = container.Value.IndexOf(woiBeingUsed.Biota.Id);
if (index != -1)
{
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Owner, container.Key, rwLock, out _);
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Container, container.Key, rwLock, out _);
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.InventoryOrder, index, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInstanceId.Owner, container.Key, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInstanceId.Container, container.Key, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInt.InventoryOrder, index, rwLock, out _);
- woiBeingUsed.Biota.TryRemoveProperty(ACE.Entity.Enum.Properties.PropertyInt.CurrentWieldedLocation, out _, rwLock);
- woiBeingUsed.Biota.TryRemoveProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Wielder, out _, rwLock);
+ woiBeingUsed.Biota.TryRemoveProperty(PropertyInt.CurrentWieldedLocation, rwLock);
+ woiBeingUsed.Biota.TryRemoveProperty(PropertyInstanceId.Wielder, rwLock);
goto processed;
}
@@ -621,13 +669,13 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
processed:
- var defaultFileName = biotaWriter.GetDefaultFileName(woiBeingUsed.Biota);
+ var defaultFileName = ACE.Database.SQLFormatters.Shard.BiotaSQLWriter.GetDefaultFileName(woiBeingUsed.Biota.Id, woiBeingUsed.Biota.GetName());
defaultFileName = String.Concat(defaultFileName.Split(Path.GetInvalidFileNameChars()));
var fileName = Path.Combine(loginEventDirectory, defaultFileName);
- woiBeingUsed.Biota.WeenieType = (int) ACEBiotaCreator.DetermineWeenieType(woiBeingUsed.Biota, rwLock);
+ woiBeingUsed.Biota.WeenieType = ACEBiotaCreator.DetermineWeenieType(woiBeingUsed.Biota, rwLock);
if (woiBeingUsed.Biota.WeenieType == 0)
{
@@ -638,10 +686,12 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
if (!woiBeingUsed.AppraiseInfoReceived)
partialExportsNoAppraisalInfo.Add($"{woiBeingUsed.Biota.Id:X8}:{woiBeingUsed.Name}");
- SetBiotaPopulatedCollections(woiBeingUsed.Biota);
+ var databaseBiota = ACE.Database.Adapter.BiotaConverter.ConvertFromEntityBiota(woiBeingUsed.Biota);
+
+ ACE.Database.ShardDatabase.SetBiotaPopulatedCollections(databaseBiota);
using (StreamWriter outputFile = new StreamWriter(fileName, false))
- biotaWriter.CreateSQLINSERTStatement(woiBeingUsed.Biota, outputFile);
+ biotaWriter.CreateSQLINSERTStatement(databaseBiota, outputFile);
}
if (failedExportsUnknownWeenie.Count > 0)
@@ -711,12 +761,27 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
biota.Id = biotaEx.Key;
+ biota.PropertiesPosition = new Dictionary();
+
+ biota.PropertiesAnimPart = new List();
+ biota.PropertiesPalette = new List();
+ biota.PropertiesTextureMap = new List();
+
+ // Properties for creatures
+ biota.PropertiesAttribute = new Dictionary();
+ biota.PropertiesAttribute2nd = new Dictionary();
+ biota.PropertiesBodyPart = new Dictionary();
+ biota.PropertiesSkill = new Dictionary();
+
+ // Biota additions over Weenie
+ biota.PropertiesEnchantmentRegistry = new Collection();
+
ACEBiotaCreator.Update(biotaEx.Value.LastCreateObject, biota, rwLock, true);
if (biotaEx.Value.LastAppraisalProfile != null)
ACEBiotaCreator.Update(biotaEx.Value.LastAppraisalProfile, biota, rwLock);
- var name = biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name);
+ var name = biota.GetProperty(PropertyString.Name, rwLock);
var playerDirectoryRoot = Path.Combine(serverDirectory, name);
@@ -727,87 +792,25 @@ public override void WriteOutput(string destinationRoot, ref bool writeOutputAbo
// Biota
{
- var defaultFileName = biotaWriter.GetDefaultFileName(biota);
+ var defaultFileName = ACE.Database.SQLFormatters.Shard.BiotaSQLWriter.GetDefaultFileName(biota.Id, biota.GetName());
var fileName = Path.Combine(playerDirectoryInstance, defaultFileName);
// Update to the latest position seen
if (biotaEx.Value.LastPosition != null)
- ACEBiotaCreator.Update(ACE.Entity.Enum.Properties.PositionType.Location, biotaEx.Value.LastPosition, biota, rwLock);
+ ACEBiotaCreator.Update(PositionType.Location, biotaEx.Value.LastPosition, biota, rwLock);
+
+ biota.WeenieType = ACEBiotaCreator.DetermineWeenieType(biota, rwLock);
- biota.WeenieType = (int)ACEBiotaCreator.DetermineWeenieType(biota, rwLock);
+ var databaseBiota = ACE.Database.Adapter.BiotaConverter.ConvertFromEntityBiota(biota);
- SetBiotaPopulatedCollections(biota);
+ ACE.Database.ShardDatabase.SetBiotaPopulatedCollections(databaseBiota);
using (StreamWriter outputFile = new StreamWriter(fileName, false))
- biotaWriter.CreateSQLINSERTStatement(biota, outputFile);
+ biotaWriter.CreateSQLINSERTStatement(databaseBiota, outputFile);
}
}
}
}
-
-
- [Flags]
- enum PopulatedCollectionFlags
- {
- BiotaPropertiesAnimPart = 0x1,
- BiotaPropertiesAttribute = 0x2,
- BiotaPropertiesAttribute2nd = 0x4,
- BiotaPropertiesBodyPart = 0x8,
- BiotaPropertiesBook = 0x10,
- BiotaPropertiesBookPageData = 0x20,
- BiotaPropertiesBool = 0x40,
- BiotaPropertiesCreateList = 0x80,
- BiotaPropertiesDID = 0x100,
- BiotaPropertiesEmote = 0x200,
- BiotaPropertiesEnchantmentRegistry = 0x400,
- BiotaPropertiesEventFilter = 0x800,
- BiotaPropertiesFloat = 0x1000,
- BiotaPropertiesGenerator = 0x2000,
- BiotaPropertiesIID = 0x4000,
- BiotaPropertiesInt = 0x8000,
- BiotaPropertiesInt64 = 0x10000,
- BiotaPropertiesPalette = 0x20000,
- BiotaPropertiesPosition = 0x40000,
- BiotaPropertiesSkill = 0x80000,
- BiotaPropertiesSpellBook = 0x100000,
- BiotaPropertiesString = 0x200000,
- BiotaPropertiesTextureMap = 0x400000,
- HousePermission = 0x800000,
- }
-
- // We just copy the function over here.
- // If we call the one in ACE.Database, we need to add nuget packages log4net, EntityFrameworkCore, etc..
- private static void SetBiotaPopulatedCollections(Biota biota)
- {
- PopulatedCollectionFlags populatedCollectionFlags = 0;
-
- if (biota.BiotaPropertiesAnimPart != null && biota.BiotaPropertiesAnimPart.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAnimPart;
- if (biota.BiotaPropertiesAttribute != null && biota.BiotaPropertiesAttribute.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAttribute;
- if (biota.BiotaPropertiesAttribute2nd != null && biota.BiotaPropertiesAttribute2nd.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAttribute2nd;
- if (biota.BiotaPropertiesBodyPart != null && biota.BiotaPropertiesBodyPart.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBodyPart;
- if (biota.BiotaPropertiesBook != null) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBook;
- if (biota.BiotaPropertiesBookPageData != null && biota.BiotaPropertiesBookPageData.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBookPageData;
- if (biota.BiotaPropertiesBool != null && biota.BiotaPropertiesBool.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBool;
- if (biota.BiotaPropertiesCreateList != null && biota.BiotaPropertiesCreateList.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesCreateList;
- if (biota.BiotaPropertiesDID != null && biota.BiotaPropertiesDID.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesDID;
- if (biota.BiotaPropertiesEmote != null && biota.BiotaPropertiesEmote.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEmote;
- if (biota.BiotaPropertiesEnchantmentRegistry != null && biota.BiotaPropertiesEnchantmentRegistry.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEnchantmentRegistry;
- if (biota.BiotaPropertiesEventFilter != null && biota.BiotaPropertiesEventFilter.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEventFilter;
- if (biota.BiotaPropertiesFloat != null && biota.BiotaPropertiesFloat.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesFloat;
- if (biota.BiotaPropertiesGenerator != null && biota.BiotaPropertiesGenerator.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesGenerator;
- if (biota.BiotaPropertiesIID != null && biota.BiotaPropertiesIID.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesIID;
- if (biota.BiotaPropertiesInt != null && biota.BiotaPropertiesInt.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesInt;
- if (biota.BiotaPropertiesInt64 != null && biota.BiotaPropertiesInt64.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesInt64;
- if (biota.BiotaPropertiesPalette != null && biota.BiotaPropertiesPalette.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesPalette;
- if (biota.BiotaPropertiesPosition != null && biota.BiotaPropertiesPosition.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesPosition;
- if (biota.BiotaPropertiesSkill != null && biota.BiotaPropertiesSkill.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesSkill;
- if (biota.BiotaPropertiesSpellBook != null && biota.BiotaPropertiesSpellBook.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesSpellBook;
- if (biota.BiotaPropertiesString != null && biota.BiotaPropertiesString.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesString;
- if (biota.BiotaPropertiesTextureMap != null && biota.BiotaPropertiesTextureMap.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesTextureMap;
- if (biota.HousePermission != null && biota.HousePermission.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.HousePermission;
-
- biota.PopulatedCollectionFlags = (uint)populatedCollectionFlags;
- }
}
}
diff --git a/aclogview/Tools/Scrapers/PlayerWeaponExporter.cs b/aclogview/Tools/Scrapers/PlayerWeaponExporter.cs
index 3ae4bae..a87791b 100644
--- a/aclogview/Tools/Scrapers/PlayerWeaponExporter.cs
+++ b/aclogview/Tools/Scrapers/PlayerWeaponExporter.cs
@@ -1,11 +1,14 @@
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
-using ACE.Database.Models.Shard;
+using ACE.Entity.Enum;
+using ACE.Entity.Enum.Properties;
+using ACE.Entity.Models;
using aclogview.ACE_Helpers;
@@ -34,6 +37,17 @@ public WorldObjectItem(uint guid, string name)
{
Biota.Id = guid;
Name = name;
+
+ Biota.PropertiesPosition = new Dictionary();
+
+ Biota.PropertiesSpellBook = new Dictionary();
+
+ Biota.PropertiesAnimPart = new List();
+ Biota.PropertiesPalette = new List();
+ Biota.PropertiesTextureMap = new List();
+
+ // Biota additions over Weenie
+ Biota.PropertiesEnchantmentRegistry = new Collection();
}
}
@@ -43,7 +57,7 @@ class LoginEvent
public readonly uint TSec;
public readonly Biota Biota = new Biota();
- public readonly Character Character = new Character();
+ public readonly ACE.Database.Models.Shard.Character Character = new ACE.Database.Models.Shard.Character();
public readonly List<(uint guid, uint containerProperties)> Inventory = new List<(uint guid, uint containerProperties)>();
public readonly List<(uint guid, uint location, uint priority)> Equipment = new List<(uint guid, uint location, uint priority)>();
@@ -60,6 +74,23 @@ public LoginEvent(string fileName, uint tsec, uint guid)
Biota.Id = guid;
Character.Id = guid;
+
+ Biota.PropertiesPosition = new Dictionary();
+
+ Biota.PropertiesSpellBook = new Dictionary();
+
+ Biota.PropertiesAnimPart = new List();
+ Biota.PropertiesPalette = new List();
+ Biota.PropertiesTextureMap = new List();
+
+ // Properties for creatures
+ Biota.PropertiesAttribute = new Dictionary();
+ Biota.PropertiesAttribute2nd = new Dictionary();
+ Biota.PropertiesBodyPart = new Dictionary();
+ Biota.PropertiesSkill = new Dictionary();
+
+ // Biota additions over Weenie
+ Biota.PropertiesEnchantmentRegistry = new Collection();
}
public bool IsPossessedItem(uint guid)
@@ -195,7 +226,7 @@ public void Reset()
var message = Proto_UI.EnterWorld.read(binaryReader);
loginEvent = new LoginEvent(fileName, record.tsSec, message.gid);
- loginEvent.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyString.PCAPRecordedServerName, serverName, rwLock, out _);
+ loginEvent.Biota.SetProperty(PropertyString.PCAPRecordedServerName, serverName, rwLock, out _);
continue;
}
@@ -211,7 +242,7 @@ public void Reset()
ACEBiotaCreator.Update(message, loginEvent.Biota, rwLock, true);
var position = new ACE.Entity.Position(message.physicsdesc.pos.objcell_id, message.physicsdesc.pos.frame.m_fOrigin.x, message.physicsdesc.pos.frame.m_fOrigin.y, message.physicsdesc.pos.frame.m_fOrigin.z, message.physicsdesc.pos.frame.qx, message.physicsdesc.pos.frame.qy, message.physicsdesc.pos.frame.qz, message.physicsdesc.pos.frame.qw);
- loginEvent.Biota.SetPosition(ACE.Entity.Enum.Properties.PositionType.Location, position, rwLock, out _);
+ loginEvent.Biota.SetPosition(PositionType.Location, position, rwLock);
}
// Match to Hashset??
@@ -312,7 +343,8 @@ public void Reset()
{
hits++;
- ACEBiotaCreator.Update(message, loginEvent.Character, loginEvent.Biota, loginEvent.Inventory, loginEvent.Equipment, rwLock);
+ ACECharacterCreator.Update(message, loginEvent.Character);
+ ACEBiotaCreator.Update(message, loginEvent.Biota, loginEvent.Inventory, loginEvent.Equipment, rwLock);
lock (playerLoginsByServer)
{
@@ -344,10 +376,10 @@ public void Reset()
// We only process player create/update messages for player biotas during the login process
if (loginEvent != null && !loginEvent.PlayerLoginCompleted)
{
- loginEvent.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.CharacterTitleId, (int)message.mDisplayTitle, rwLock, out _);
+ loginEvent.Biota.SetProperty(PropertyInt.CharacterTitleId, (int)message.mDisplayTitle, rwLock, out _);
foreach (var value in message.mTitleList.list)
- loginEvent.Character.CharacterPropertiesTitleBook.Add(new CharacterPropertiesTitleBook { TitleId = (uint)value });
+ loginEvent.Character.CharacterPropertiesTitleBook.Add(new ACE.Database.Models.Shard.CharacterPropertiesTitleBook { TitleId = (uint)value });
}
}
else if (opCode == (uint)PacketOpcode.Evt_Social__SendClientContractTrackerTable_ID)
@@ -502,13 +534,13 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
return;
// We only export the last login event
- var loginEvent = player.Value.LoginEvents.Where(r => r.Biota.BiotaPropertiesDID.Count > 0).OrderBy(r => r.TSec).LastOrDefault();
+ var loginEvent = player.Value.LoginEvents.Where(r => r.Biota.PropertiesDID.Count > 0).OrderBy(r => r.TSec).LastOrDefault();
// no valid result
if (loginEvent == null)
continue;
- var name = loginEvent.Biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name);
+ var name = loginEvent.Biota.GetProperty(PropertyString.Name, rwLock);
var sb = new StringBuilder();
sb.AppendLine("Source: ");
@@ -531,7 +563,7 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
// Biota
{
- var defaultFileName = biotaWriter.GetDefaultFileName(loginEvent.Biota);
+ var defaultFileName = ACE.Database.SQLFormatters.Shard.BiotaSQLWriter.GetDefaultFileName(loginEvent.Biota.Id, loginEvent.Biota.GetName());
var fileName = Path.Combine(playerWeaponExportsFolder, defaultFileName);
// Hack for changing GUID in file name from Hex to Decimal
string idHex = loginEvent.Biota.Id.ToString("X8");
@@ -539,15 +571,18 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
// Update to the latest position seen
if (biotasByServer.TryGetValue(server.Key, out var biotaServer) && biotaServer.TryGetValue(player.Key, out var biotaEx) && biotaEx.LastPosition != null)
- ACEBiotaCreator.Update(ACE.Entity.Enum.Properties.PositionType.Location, biotaEx.LastPosition, loginEvent.Biota, rwLock);
+ ACEBiotaCreator.Update(PositionType.Location, biotaEx.LastPosition, loginEvent.Biota, rwLock);
- loginEvent.Biota.WeenieType = (int) ACEBiotaCreator.DetermineWeenieType(loginEvent.Biota, rwLock);
+ loginEvent.Biota.WeenieType = ACEBiotaCreator.DetermineWeenieType(loginEvent.Biota, rwLock);
- SetBiotaPopulatedCollections(loginEvent.Biota);
if (characterGUIDs.Contains(loginEvent.Character.Id))
{
+ var databaseBiota = ACE.Database.Adapter.BiotaConverter.ConvertFromEntityBiota(loginEvent.Biota);
+
+ ACE.Database.ShardDatabase.SetBiotaPopulatedCollections(databaseBiota);
+
using (StreamWriter outputFile = new StreamWriter(defaultFileName, false))
- biotaWriter.CreateSQLINSERTStatement(loginEvent.Biota, outputFile);
+ biotaWriter.CreateSQLINSERTStatement(databaseBiota, outputFile);
}
}
@@ -573,12 +608,12 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
{
if (loginEvent.Inventory[i].guid == woiBeingUsed.Biota.Id)
{
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Owner, loginEvent.Biota.Id, rwLock, out _);
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Container, loginEvent.Biota.Id, rwLock, out _);
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.InventoryOrder, i, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInstanceId.Owner, loginEvent.Biota.Id, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInstanceId.Container, loginEvent.Biota.Id, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInt.InventoryOrder, i, rwLock, out _);
- woiBeingUsed.Biota.TryRemoveProperty(ACE.Entity.Enum.Properties.PropertyInt.CurrentWieldedLocation, out _, rwLock);
- woiBeingUsed.Biota.TryRemoveProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Wielder, out _, rwLock);
+ woiBeingUsed.Biota.TryRemoveProperty(PropertyInt.CurrentWieldedLocation, rwLock);
+ woiBeingUsed.Biota.TryRemoveProperty(PropertyInstanceId.Wielder, rwLock);
goto processed;
}
@@ -589,12 +624,12 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
var index = container.Value.IndexOf(woiBeingUsed.Biota.Id);
if (index != -1)
{
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Owner, container.Key, rwLock, out _);
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Container, container.Key, rwLock, out _);
- woiBeingUsed.Biota.SetProperty(ACE.Entity.Enum.Properties.PropertyInt.InventoryOrder, index, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInstanceId.Owner, container.Key, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInstanceId.Container, container.Key, rwLock, out _);
+ woiBeingUsed.Biota.SetProperty(PropertyInt.InventoryOrder, index, rwLock, out _);
- woiBeingUsed.Biota.TryRemoveProperty(ACE.Entity.Enum.Properties.PropertyInt.CurrentWieldedLocation, out _, rwLock);
- woiBeingUsed.Biota.TryRemoveProperty(ACE.Entity.Enum.Properties.PropertyInstanceId.Wielder, out _, rwLock);
+ woiBeingUsed.Biota.TryRemoveProperty(PropertyInt.CurrentWieldedLocation, rwLock);
+ woiBeingUsed.Biota.TryRemoveProperty(PropertyInstanceId.Wielder, rwLock);
goto processed;
}
@@ -602,10 +637,10 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
processed:
- var defaultFileName = biotaWriter.GetDefaultFileName(woiBeingUsed.Biota);
+ var defaultFileName = ACE.Database.SQLFormatters.Shard.BiotaSQLWriter.GetDefaultFileName(woiBeingUsed.Biota.Id, woiBeingUsed.Biota.GetName());
defaultFileName = String.Concat(defaultFileName.Split(Path.GetInvalidFileNameChars()));
- woiBeingUsed.Biota.WeenieType = (int) ACEBiotaCreator.DetermineWeenieType(woiBeingUsed.Biota, rwLock);
+ woiBeingUsed.Biota.WeenieType = ACEBiotaCreator.DetermineWeenieType(woiBeingUsed.Biota, rwLock);
if (woiBeingUsed.Biota.WeenieType == 0)
{
@@ -616,8 +651,6 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
if (!woiBeingUsed.AppraiseInfoReceived)
partialExportsNoAppraisalInfo.Add($"{woiBeingUsed.Biota.Id:X8}:{woiBeingUsed.Name}");
- SetBiotaPopulatedCollectionsItem(woiBeingUsed.Biota);
-
// Only going to write weenies that match GUIDs from HashSet.
// Hack for changing GUID in file name from Hex to Decimal
@@ -627,8 +660,12 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
var pweFileName = Path.Combine(playerWeaponExportsFolder, defaultFileName);
if (weaponGUIDs.Contains(woiBeingUsed.Biota.Id))
{
+ var databaseBiota = ACE.Database.Adapter.BiotaConverter.ConvertFromEntityBiota(woiBeingUsed.Biota);
+
+ ACE.Database.ShardDatabase.SetBiotaPopulatedCollections(databaseBiota);
+
using (StreamWriter outputFile = new StreamWriter(pweFileName, false))
- biotaWriter.CreateSQLINSERTStatement(woiBeingUsed.Biota, outputFile);
+ biotaWriter.CreateSQLINSERTStatement(databaseBiota, outputFile);
//if ((woiBeingUsed.Biota.WeenieType == 3) || (woiBeingUsed.Biota.WeenieType == 6) || (woiBeingUsed.Biota.WeenieType == 35))
//{
// // weaponDetails.Append($"{woiBeingUsed.Biota.Id},{woiBeingUsed.Name},Mod={woiBeingUsed.Biota.BiotaPropertiesFloat.})
@@ -703,14 +740,29 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
biota.Id = biotaEx.Key;
+ biota.PropertiesPosition = new Dictionary();
+
+ biota.PropertiesAnimPart = new List();
+ biota.PropertiesPalette = new List();
+ biota.PropertiesTextureMap = new List();
+
+ // Properties for creatures
+ biota.PropertiesAttribute = new Dictionary();
+ biota.PropertiesAttribute2nd = new Dictionary();
+ biota.PropertiesBodyPart = new Dictionary();
+ biota.PropertiesSkill = new Dictionary();
+
+ // Biota additions over Weenie
+ biota.PropertiesEnchantmentRegistry = new Collection();
+
ACEBiotaCreator.Update(biotaEx.Value.LastCreateObject, biota, rwLock, true);
if (biotaEx.Value.LastAppraisalProfile != null)
ACEBiotaCreator.Update(biotaEx.Value.LastAppraisalProfile, biota, rwLock);
- var name = biota.GetProperty(ACE.Entity.Enum.Properties.PropertyString.Name);
+ var name = biota.GetProperty(PropertyString.Name, rwLock);
{
- var defaultFileName = biotaWriter.GetDefaultFileName(biota);
+ var defaultFileName = ACE.Database.SQLFormatters.Shard.BiotaSQLWriter.GetDefaultFileName(biota.Id, biota.GetName());
//var fileName = Path.Combine(playerDirectoryInstance, defaultFileName);
//string idHex = woiBeingUsed.Biota.Id.ToString("X8");
@@ -721,146 +773,22 @@ public void WriteOutput(string destinationRoot, ref bool writeOutputAborted)
// Update to the latest position seen
if (biotaEx.Value.LastPosition != null)
- ACEBiotaCreator.Update(ACE.Entity.Enum.Properties.PositionType.Location, biotaEx.Value.LastPosition, biota, rwLock);
+ ACEBiotaCreator.Update(PositionType.Location, biotaEx.Value.LastPosition, biota, rwLock);
- biota.WeenieType = (int)ACEBiotaCreator.DetermineWeenieType(biota, rwLock);
-
- SetBiotaPopulatedCollectionsCharacter(biota);
+ biota.WeenieType = ACEBiotaCreator.DetermineWeenieType(biota, rwLock);
if (weaponGUIDs.Contains(biota.Id))
{
+ var databaseBiota = ACE.Database.Adapter.BiotaConverter.ConvertFromEntityBiota(biota);
+
+ ACE.Database.ShardDatabase.SetBiotaPopulatedCollections(databaseBiota);
+
using (StreamWriter outputFile = new StreamWriter(pweFileName, false))
- biotaWriter.CreateSQLINSERTStatement(biota, outputFile);
+ biotaWriter.CreateSQLINSERTStatement(databaseBiota, outputFile);
}
}
}
}
}
-
-
- [Flags]
- enum PopulatedCollectionFlags
- {
- BiotaPropertiesAnimPart = 0x1,
- BiotaPropertiesAttribute = 0x2,
- BiotaPropertiesAttribute2nd = 0x4,
- BiotaPropertiesBodyPart = 0x8,
- BiotaPropertiesBook = 0x10,
- BiotaPropertiesBookPageData = 0x20,
- BiotaPropertiesBool = 0x40,
- BiotaPropertiesCreateList = 0x80,
- BiotaPropertiesDID = 0x100,
- BiotaPropertiesEmote = 0x200,
- BiotaPropertiesEnchantmentRegistry = 0x400,
- BiotaPropertiesEventFilter = 0x800,
- BiotaPropertiesFloat = 0x1000,
- BiotaPropertiesGenerator = 0x2000,
- BiotaPropertiesIID = 0x4000,
- BiotaPropertiesInt = 0x8000,
- BiotaPropertiesInt64 = 0x10000,
- BiotaPropertiesPalette = 0x20000,
- BiotaPropertiesPosition = 0x40000,
- BiotaPropertiesSkill = 0x80000,
- BiotaPropertiesSpellBook = 0x100000,
- BiotaPropertiesString = 0x200000,
- BiotaPropertiesTextureMap = 0x400000,
- HousePermission = 0x800000,
- }
-
- // We just copy the function over here.
- // If we call the one in ACE.Database, we need to add nuget packages log4net, EntityFrameworkCore, etc..
- private static void SetBiotaPopulatedCollections(Biota biota)
- {
- PopulatedCollectionFlags populatedCollectionFlags = 0;
-
- if (biota.BiotaPropertiesAnimPart != null && biota.BiotaPropertiesAnimPart.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAnimPart;
- if (biota.BiotaPropertiesAttribute != null && biota.BiotaPropertiesAttribute.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAttribute;
- if (biota.BiotaPropertiesAttribute2nd != null && biota.BiotaPropertiesAttribute2nd.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAttribute2nd;
- if (biota.BiotaPropertiesBodyPart != null && biota.BiotaPropertiesBodyPart.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBodyPart;
- if (biota.BiotaPropertiesBook != null) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBook;
- if (biota.BiotaPropertiesBookPageData != null && biota.BiotaPropertiesBookPageData.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBookPageData;
- if (biota.BiotaPropertiesBool != null && biota.BiotaPropertiesBool.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBool;
- if (biota.BiotaPropertiesCreateList != null && biota.BiotaPropertiesCreateList.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesCreateList;
- if (biota.BiotaPropertiesDID != null && biota.BiotaPropertiesDID.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesDID;
- if (biota.BiotaPropertiesEmote != null && biota.BiotaPropertiesEmote.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEmote;
- if (biota.BiotaPropertiesEnchantmentRegistry != null && biota.BiotaPropertiesEnchantmentRegistry.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEnchantmentRegistry;
- if (biota.BiotaPropertiesEventFilter != null && biota.BiotaPropertiesEventFilter.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEventFilter;
- if (biota.BiotaPropertiesFloat != null && biota.BiotaPropertiesFloat.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesFloat;
- if (biota.BiotaPropertiesGenerator != null && biota.BiotaPropertiesGenerator.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesGenerator;
- if (biota.BiotaPropertiesIID != null && biota.BiotaPropertiesIID.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesIID;
- if (biota.BiotaPropertiesInt != null && biota.BiotaPropertiesInt.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesInt;
- if (biota.BiotaPropertiesInt64 != null && biota.BiotaPropertiesInt64.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesInt64;
- if (biota.BiotaPropertiesPalette != null && biota.BiotaPropertiesPalette.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesPalette;
- if (biota.BiotaPropertiesPosition != null && biota.BiotaPropertiesPosition.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesPosition;
- if (biota.BiotaPropertiesSkill != null && biota.BiotaPropertiesSkill.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesSkill;
- if (biota.BiotaPropertiesSpellBook != null && biota.BiotaPropertiesSpellBook.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesSpellBook;
- if (biota.BiotaPropertiesString != null && biota.BiotaPropertiesString.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesString;
- if (biota.BiotaPropertiesTextureMap != null && biota.BiotaPropertiesTextureMap.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesTextureMap;
- if (biota.HousePermission != null && biota.HousePermission.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.HousePermission;
-
- biota.PopulatedCollectionFlags = (uint)populatedCollectionFlags;
- }
- private static void SetBiotaPopulatedCollectionsCharacter(Biota biota)
- {
- PopulatedCollectionFlags populatedCollectionFlags = 0;
-
- //if (biota.BiotaPropertiesAnimPart != null && biota.BiotaPropertiesAnimPart.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAnimPart;
- if (biota.BiotaPropertiesAttribute != null && biota.BiotaPropertiesAttribute.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAttribute;
- if (biota.BiotaPropertiesAttribute2nd != null && biota.BiotaPropertiesAttribute2nd.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAttribute2nd;
- //if (biota.BiotaPropertiesBodyPart != null && biota.BiotaPropertiesBodyPart.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBodyPart;
- //if (biota.BiotaPropertiesBook != null) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBook;
- //if (biota.BiotaPropertiesBookPageData != null && biota.BiotaPropertiesBookPageData.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBookPageData;
- if (biota.BiotaPropertiesBool != null && biota.BiotaPropertiesBool.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBool;
- //if (biota.BiotaPropertiesCreateList != null && biota.BiotaPropertiesCreateList.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesCreateList;
- if (biota.BiotaPropertiesDID != null && biota.BiotaPropertiesDID.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesDID;
- //if (biota.BiotaPropertiesEmote != null && biota.BiotaPropertiesEmote.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEmote;
- if (biota.BiotaPropertiesEnchantmentRegistry != null && biota.BiotaPropertiesEnchantmentRegistry.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEnchantmentRegistry;
- //if (biota.BiotaPropertiesEventFilter != null && biota.BiotaPropertiesEventFilter.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEventFilter;
- if (biota.BiotaPropertiesFloat != null && biota.BiotaPropertiesFloat.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesFloat;
- //if (biota.BiotaPropertiesGenerator != null && biota.BiotaPropertiesGenerator.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesGenerator;
- if (biota.BiotaPropertiesIID != null && biota.BiotaPropertiesIID.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesIID;
- if (biota.BiotaPropertiesInt != null && biota.BiotaPropertiesInt.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesInt;
- if (biota.BiotaPropertiesInt64 != null && biota.BiotaPropertiesInt64.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesInt64;
- if (biota.BiotaPropertiesPalette != null && biota.BiotaPropertiesPalette.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesPalette;
- //if (biota.BiotaPropertiesPosition != null && biota.BiotaPropertiesPosition.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesPosition;
- if (biota.BiotaPropertiesSkill != null && biota.BiotaPropertiesSkill.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesSkill;
- if (biota.BiotaPropertiesSpellBook != null && biota.BiotaPropertiesSpellBook.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesSpellBook;
- if (biota.BiotaPropertiesString != null && biota.BiotaPropertiesString.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesString;
- //if (biota.BiotaPropertiesTextureMap != null && biota.BiotaPropertiesTextureMap.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesTextureMap;
- //if (biota.HousePermission != null && biota.HousePermission.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.HousePermission;
-
- biota.PopulatedCollectionFlags = (uint)populatedCollectionFlags;
- }
- private static void SetBiotaPopulatedCollectionsItem(Biota biota)
- {
- PopulatedCollectionFlags populatedCollectionFlags = 0;
-
- //if (biota.BiotaPropertiesAnimPart != null && biota.BiotaPropertiesAnimPart.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAnimPart;
- if (biota.BiotaPropertiesAttribute != null && biota.BiotaPropertiesAttribute.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAttribute;
- if (biota.BiotaPropertiesAttribute2nd != null && biota.BiotaPropertiesAttribute2nd.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesAttribute2nd;
- //if (biota.BiotaPropertiesBodyPart != null && biota.BiotaPropertiesBodyPart.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBodyPart;
- //if (biota.BiotaPropertiesBook != null) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBook;
- //if (biota.BiotaPropertiesBookPageData != null && biota.BiotaPropertiesBookPageData.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBookPageData;
- if (biota.BiotaPropertiesBool != null && biota.BiotaPropertiesBool.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesBool;
- //if (biota.BiotaPropertiesCreateList != null && biota.BiotaPropertiesCreateList.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesCreateList;
- if (biota.BiotaPropertiesDID != null && biota.BiotaPropertiesDID.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesDID;
- //if (biota.BiotaPropertiesEmote != null && biota.BiotaPropertiesEmote.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEmote;
- if (biota.BiotaPropertiesEnchantmentRegistry != null && biota.BiotaPropertiesEnchantmentRegistry.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEnchantmentRegistry;
- //if (biota.BiotaPropertiesEventFilter != null && biota.BiotaPropertiesEventFilter.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesEventFilter;
- if (biota.BiotaPropertiesFloat != null && biota.BiotaPropertiesFloat.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesFloat;
- //if (biota.BiotaPropertiesGenerator != null && biota.BiotaPropertiesGenerator.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesGenerator;
- if (biota.BiotaPropertiesIID != null && biota.BiotaPropertiesIID.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesIID;
- if (biota.BiotaPropertiesInt != null && biota.BiotaPropertiesInt.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesInt;
- if (biota.BiotaPropertiesInt64 != null && biota.BiotaPropertiesInt64.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesInt64;
- //if (biota.BiotaPropertiesPalette != null && biota.BiotaPropertiesPalette.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesPalette;
- //if (biota.BiotaPropertiesPosition != null && biota.BiotaPropertiesPosition.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesPosition;
- if (biota.BiotaPropertiesSkill != null && biota.BiotaPropertiesSkill.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesSkill;
- //if (biota.BiotaPropertiesSpellBook != null && biota.BiotaPropertiesSpellBook.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesSpellBook;
- if (biota.BiotaPropertiesString != null && biota.BiotaPropertiesString.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesString;
- //if (biota.BiotaPropertiesTextureMap != null && biota.BiotaPropertiesTextureMap.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.BiotaPropertiesTextureMap;
- //if (biota.HousePermission != null && biota.HousePermission.Count > 0) populatedCollectionFlags |= PopulatedCollectionFlags.HousePermission;
-
- biota.PopulatedCollectionFlags = (uint)populatedCollectionFlags;
- }
}
}
diff --git a/aclogview/aclogview.csproj b/aclogview/aclogview.csproj
index f36fedb..a3ecc75 100644
--- a/aclogview/aclogview.csproj
+++ b/aclogview/aclogview.csproj
@@ -4,6 +4,7 @@
WinExe
net8.0-windows
true
+ x64
diff --git a/aclogview/lib/ACE.Adapter.dll b/aclogview/lib/ACE.Adapter.dll
index 75c2067..ec624fa 100644
Binary files a/aclogview/lib/ACE.Adapter.dll and b/aclogview/lib/ACE.Adapter.dll differ
diff --git a/aclogview/lib/ACE.Adapter.pdb b/aclogview/lib/ACE.Adapter.pdb
index ec13eb4..19d84be 100644
Binary files a/aclogview/lib/ACE.Adapter.pdb and b/aclogview/lib/ACE.Adapter.pdb differ
diff --git a/aclogview/lib/ACE.Common.dll b/aclogview/lib/ACE.Common.dll
index 8b80def..dccaa4d 100644
Binary files a/aclogview/lib/ACE.Common.dll and b/aclogview/lib/ACE.Common.dll differ
diff --git a/aclogview/lib/ACE.Common.pdb b/aclogview/lib/ACE.Common.pdb
index f3b5c7f..45d2548 100644
Binary files a/aclogview/lib/ACE.Common.pdb and b/aclogview/lib/ACE.Common.pdb differ
diff --git a/aclogview/lib/ACE.Database.dll b/aclogview/lib/ACE.Database.dll
index 0130847..a709411 100644
Binary files a/aclogview/lib/ACE.Database.dll and b/aclogview/lib/ACE.Database.dll differ
diff --git a/aclogview/lib/ACE.Database.pdb b/aclogview/lib/ACE.Database.pdb
index 5eb6a9c..53fb822 100644
Binary files a/aclogview/lib/ACE.Database.pdb and b/aclogview/lib/ACE.Database.pdb differ
diff --git a/aclogview/lib/ACE.Entity.dll b/aclogview/lib/ACE.Entity.dll
index 352877d..5c4eded 100644
Binary files a/aclogview/lib/ACE.Entity.dll and b/aclogview/lib/ACE.Entity.dll differ
diff --git a/aclogview/lib/ACE.Entity.pdb b/aclogview/lib/ACE.Entity.pdb
index bb7ae44..f0abf93 100644
Binary files a/aclogview/lib/ACE.Entity.pdb and b/aclogview/lib/ACE.Entity.pdb differ