Try to fix actor redrawing stalling again, some fixes for collections not correctly reloading metadata or changing wrong collection. Added hidden debug tab that can be activated by /penumbra debug (and is active when compiled in debug mode by default).

This commit is contained in:
Ottermandias 2021-07-10 22:20:18 +02:00
parent cfdff30189
commit cf223c927c
15 changed files with 309 additions and 60 deletions

View file

@ -286,5 +286,23 @@ namespace Penumbra.Game
IdentifyParsed( set, info );
}
}
public Item? Identify( ushort a, ushort b, ushort c, EquipSlot slot )
{
switch( slot )
{
case EquipSlot.MainHand:
case EquipSlot.Offhand:
{
var (begin, _) = FindIndexRange( _weapons, ( ( ulong )a << 32 ) | ( ( ulong )b << 16 ) | c, 0xFFFFFFFFFFFF );
return begin >= 0 ? _weapons[ begin ].Item2.FirstOrDefault() : null;
}
default:
{
var (begin, _) = FindIndexRange( _equipment, ( ( ulong )a << 32 ) | ( ( ulong )slot.ToSlot() << 16 ) | b, 0xFFFFFFFFFFFF );
return begin >= 0 ? _equipment[ begin ].Item2.FirstOrDefault() : null;
}
}
}
}
}