2018-07-05 05:50:42 -07:00
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace ACE.DatLoader.Entity
|
|
|
|
|
{
|
|
|
|
|
public class SkillBase : IUnpackable
|
|
|
|
|
{
|
|
|
|
|
public string Description { get; private set; }
|
|
|
|
|
public string Name { get; private set; }
|
|
|
|
|
public uint IconId { get; private set; }
|
2018-12-03 17:53:32 -06:00
|
|
|
public int TrainedCost { get; private set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is the total cost to specialize a skill, which INCLUDES the trained cost.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int SpecializedCost { get; private set; }
|
Refactoring LandblockManager, improving VitalTick performance (#1079)
* Physics Cache cleanup (Mostly cosmetic)
* Vertex/Polygon/BSP CacneEnabled flags added, default to false
Testing results:
Debug mode, loading 31,329 landblocks (x = 0x20-0xD0, y = 0x20-0xD0)
With Vertex, Polygon & BSP Cache:
2018-10-25 10:05:12,121 DEBUG: Loaded Landblocks in 120.39 seconds
2018-10-25 10:05:12,218 DEBUG: 13759 MB used
2018-10-25 10:08:00,330 DEBUG: Loaded Landblocks in 101.11 seconds
2018-10-25 10:08:00,427 DEBUG: 13667 MB used
2018-10-25 10:13:08,448 DEBUG: Loaded Landblocks in 104.36 seconds
2018-10-25 10:13:08,507 DEBUG: 13666 MB used
With Vertex, Polygon & BSP Cache Disabled:
2018-10-25 10:17:55,339 DEBUG: Loaded Landblocks in 100.63 seconds
2018-10-25 10:17:55,404 DEBUG: 14175 MB used
2018-10-25 10:21:11,596 DEBUG: Loaded Landblocks in 89.23 seconds
2018-10-25 10:21:11,666 DEBUG: 14220 MB used
2018-10-25 10:27:22,145 DEBUG: Loaded Landblocks in 93.74 seconds
2018-10-25 10:27:22,200 DEBUG: 14206 MB used
* PhysicsCaches, remove redundant null check
* Improved GfxObjCache model
* DBObj Boxing/Unboxing improvements
* Add thread safety to GfxObjCache
* Landblock phsyics loading async
* Adding setup "caching"
* Redirecting properties to DatLoader
* Refactoring LandblockManager, resolving Physics Landblock loading bug
* Tabs vs. spaces
* Improving VitalTick performance
* Adding refactored AttributeFormula to CreatureSkill
* Disabling BSP cache
2018-10-28 09:56:48 -04:00
|
|
|
public uint Category { get; private set; } // 1 = combat, 2 = other, 3 = magic
|
|
|
|
|
public uint ChargenUse { get; private set; } // always 1?
|
2018-12-03 17:53:32 -06:00
|
|
|
/// <summary>
|
|
|
|
|
/// This is the minimum SAC required for usability.
|
|
|
|
|
/// 1 = Usable when untrained
|
|
|
|
|
/// 2 = Trained or greater required for usability
|
|
|
|
|
/// </summary>
|
Refactoring LandblockManager, improving VitalTick performance (#1079)
* Physics Cache cleanup (Mostly cosmetic)
* Vertex/Polygon/BSP CacneEnabled flags added, default to false
Testing results:
Debug mode, loading 31,329 landblocks (x = 0x20-0xD0, y = 0x20-0xD0)
With Vertex, Polygon & BSP Cache:
2018-10-25 10:05:12,121 DEBUG: Loaded Landblocks in 120.39 seconds
2018-10-25 10:05:12,218 DEBUG: 13759 MB used
2018-10-25 10:08:00,330 DEBUG: Loaded Landblocks in 101.11 seconds
2018-10-25 10:08:00,427 DEBUG: 13667 MB used
2018-10-25 10:13:08,448 DEBUG: Loaded Landblocks in 104.36 seconds
2018-10-25 10:13:08,507 DEBUG: 13666 MB used
With Vertex, Polygon & BSP Cache Disabled:
2018-10-25 10:17:55,339 DEBUG: Loaded Landblocks in 100.63 seconds
2018-10-25 10:17:55,404 DEBUG: 14175 MB used
2018-10-25 10:21:11,596 DEBUG: Loaded Landblocks in 89.23 seconds
2018-10-25 10:21:11,666 DEBUG: 14220 MB used
2018-10-25 10:27:22,145 DEBUG: Loaded Landblocks in 93.74 seconds
2018-10-25 10:27:22,200 DEBUG: 14206 MB used
* PhysicsCaches, remove redundant null check
* Improved GfxObjCache model
* DBObj Boxing/Unboxing improvements
* Add thread safety to GfxObjCache
* Landblock phsyics loading async
* Adding setup "caching"
* Redirecting properties to DatLoader
* Refactoring LandblockManager, resolving Physics Landblock loading bug
* Tabs vs. spaces
* Improving VitalTick performance
* Adding refactored AttributeFormula to CreatureSkill
* Disabling BSP cache
2018-10-28 09:56:48 -04:00
|
|
|
public uint MinLevel { get; private set; } // 1-2?
|
2018-07-05 05:50:42 -07:00
|
|
|
|
|
|
|
|
public SkillFormula Formula { get; private set; } = new SkillFormula();
|
|
|
|
|
|
|
|
|
|
public double UpperBound { get; private set; }
|
|
|
|
|
public double LowerBound { get; private set; }
|
|
|
|
|
public double LearnMod { get; private set; }
|
|
|
|
|
|
2018-12-03 17:53:32 -06:00
|
|
|
public int UpgradeCostFromTrainedToSpecialized => SpecializedCost - TrainedCost;
|
|
|
|
|
|
2018-07-05 05:50:42 -07:00
|
|
|
public void Unpack(BinaryReader reader)
|
|
|
|
|
{
|
|
|
|
|
Description = reader.ReadPString(); reader.AlignBoundary();
|
|
|
|
|
Name = reader.ReadPString(); reader.AlignBoundary();
|
|
|
|
|
IconId = reader.ReadUInt32();
|
2018-12-03 17:53:32 -06:00
|
|
|
TrainedCost = reader.ReadInt32();
|
|
|
|
|
SpecializedCost = reader.ReadInt32();
|
2018-07-05 05:50:42 -07:00
|
|
|
Category = reader.ReadUInt32();
|
|
|
|
|
ChargenUse = reader.ReadUInt32();
|
|
|
|
|
MinLevel = reader.ReadUInt32();
|
|
|
|
|
Formula.Unpack(reader);
|
|
|
|
|
UpperBound = reader.ReadDouble();
|
|
|
|
|
LowerBound = reader.ReadDouble();
|
|
|
|
|
LearnMod = reader.ReadDouble();
|
|
|
|
|
}
|
2019-04-28 01:30:45 -04:00
|
|
|
|
|
|
|
|
public SkillBase() { }
|
|
|
|
|
|
|
|
|
|
public SkillBase(SkillFormula formula)
|
|
|
|
|
{
|
|
|
|
|
Formula = formula;
|
|
|
|
|
}
|
2018-07-05 05:50:42 -07:00
|
|
|
}
|
|
|
|
|
}
|