mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* 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 commitd706a32202. * Revert "removing AttackFrameParams, updating to 2-tiered dictionary of uint, ulong" This reverts commitdd1327105f. * monster HashSet -> ConcurrentDictionary
38 lines
1,022 B
C#
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;
|
|
}
|
|
}
|
|
}
|