ace/Source/ACE.Entity/AttackFrameParams.cs
gmriggs 336c312e5f
adding attack frame cache, adding warning / defaults for missing attack frames (#3144)
* adding attack frame cache, adding warning / defaults for missing attack frames

* adding AttackFrameParams

* removing AttackFrameParams, updating to 2-tiered dictionary of uint, ulong

* .

* Revert "."

This reverts commit d706a32202.

* Revert "removing AttackFrameParams, updating to 2-tiered dictionary of uint, ulong"

This reverts commit dd1327105f.

* monster HashSet -> ConcurrentDictionary
2020-08-26 11:04:59 -04:00

38 lines
1,022 B
C#

using System;
using ACE.Entity.Enum;
namespace ACE.Entity
{
public class AttackFrameParams : IEquatable<AttackFrameParams>
{
public uint MotionTableId;
public MotionStance Stance;
public MotionCommand Motion;
public AttackFrameParams(uint motionTableId, MotionStance stance, MotionCommand motion)
{
MotionTableId = motionTableId;
Stance = stance;
Motion = motion;
}
public bool Equals(AttackFrameParams attackFrameParams)
{
return MotionTableId == attackFrameParams.MotionTableId &&
Stance == attackFrameParams.Stance &&
Motion == attackFrameParams.Motion;
}
public override int GetHashCode()
{
int hash = 0;
hash = (hash * 397) ^ MotionTableId.GetHashCode();
hash = (hash * 397) ^ Stance.GetHashCode();
hash = (hash * 397) ^ Motion.GetHashCode();
return hash;
}
}
}