mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-15 05:04:16 +01:00
Huh.
This commit is contained in:
parent
3071599d94
commit
648b3d4515
5 changed files with 18 additions and 18 deletions
|
|
@ -121,9 +121,9 @@ public class DesignBase64Migration
|
||||||
data.SetStain(slot, mdl.Stain);
|
data.SetStain(slot, mdl.Stain);
|
||||||
}
|
}
|
||||||
|
|
||||||
var main = cur[0].X.Id == 0
|
var main = cur[0].Skeleton.Id == 0
|
||||||
? items.DefaultSword
|
? items.DefaultSword
|
||||||
: items.Identify(EquipSlot.MainHand, cur[0].X, cur[0].Y, cur[0].Variant);
|
: items.Identify(EquipSlot.MainHand, cur[0].Skeleton, cur[0].Weapon, cur[0].Variant);
|
||||||
if (!main.Valid)
|
if (!main.Valid)
|
||||||
{
|
{
|
||||||
Glamourer.Log.Warning("Base64 string invalid, weapon could not be identified.");
|
Glamourer.Log.Warning("Base64 string invalid, weapon could not be identified.");
|
||||||
|
|
@ -138,7 +138,7 @@ public class DesignBase64Migration
|
||||||
if (main.PrimaryId.Id is > 1600 and < 1651 && cur[1].Variant == 0)
|
if (main.PrimaryId.Id is > 1600 and < 1651 && cur[1].Variant == 0)
|
||||||
{
|
{
|
||||||
off = items.Identify(EquipSlot.OffHand, (PrimaryId)(main.PrimaryId.Id + 50), main.SecondaryId, main.Variant, main.Type);
|
off = items.Identify(EquipSlot.OffHand, (PrimaryId)(main.PrimaryId.Id + 50), main.SecondaryId, main.Variant, main.Type);
|
||||||
var gauntlet = items.Identify(EquipSlot.Hands, cur[1].X, (Variant)cur[1].Y.Id);
|
var gauntlet = items.Identify(EquipSlot.Hands, cur[1].Skeleton, (Variant)cur[1].Weapon.Id);
|
||||||
if (gauntlet.Valid)
|
if (gauntlet.Valid)
|
||||||
{
|
{
|
||||||
data.SetItem(EquipSlot.Hands, gauntlet);
|
data.SetItem(EquipSlot.Hands, gauntlet);
|
||||||
|
|
@ -147,9 +147,9 @@ public class DesignBase64Migration
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
off = cur[0].X.Id == 0
|
off = cur[0].Skeleton.Id == 0
|
||||||
? ItemManager.NothingItem(FullEquipType.Shield)
|
? ItemManager.NothingItem(FullEquipType.Shield)
|
||||||
: items.Identify(EquipSlot.OffHand, cur[1].X, cur[1].Y, cur[1].Variant, main.Type);
|
: items.Identify(EquipSlot.OffHand, cur[1].Skeleton, cur[1].Weapon, cur[1].Variant, main.Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (main.Type.ValidOffhand() != FullEquipType.Unknown && !off.Valid)
|
if (main.Type.ValidOffhand() != FullEquipType.Unknown && !off.Valid)
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ public class DesignConverter(ItemManager _items, DesignManager _designs, Customi
|
||||||
yield return (slot, item, armor.Stain);
|
yield return (slot, item, armor.Stain);
|
||||||
}
|
}
|
||||||
|
|
||||||
var mh = _items.Identify(EquipSlot.MainHand, mainhand.X, mainhand.Y, mainhand.Variant, FullEquipType.Unknown);
|
var mh = _items.Identify(EquipSlot.MainHand, mainhand.Skeleton, mainhand.Weapon, mainhand.Variant, FullEquipType.Unknown);
|
||||||
if (!mh.Valid)
|
if (!mh.Valid)
|
||||||
{
|
{
|
||||||
Glamourer.Log.Warning($"Appearance data {mainhand} for mainhand weapon invalid, item could not be identified.");
|
Glamourer.Log.Warning($"Appearance data {mainhand} for mainhand weapon invalid, item could not be identified.");
|
||||||
|
|
@ -174,7 +174,7 @@ public class DesignConverter(ItemManager _items, DesignManager _designs, Customi
|
||||||
|
|
||||||
yield return (EquipSlot.MainHand, mh, mainhand.Stain);
|
yield return (EquipSlot.MainHand, mh, mainhand.Stain);
|
||||||
|
|
||||||
var oh = _items.Identify(EquipSlot.OffHand, offhand.X, offhand.Y, offhand.Variant, mh.Type);
|
var oh = _items.Identify(EquipSlot.OffHand, offhand.Skeleton, offhand.Weapon, offhand.Variant, mh.Type);
|
||||||
if (!oh.Valid)
|
if (!oh.Valid)
|
||||||
{
|
{
|
||||||
Glamourer.Log.Warning($"Appearance data {offhand} for offhand weapon invalid, item could not be identified.");
|
Glamourer.Log.Warning($"Appearance data {offhand} for offhand weapon invalid, item could not be identified.");
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ public class PenumbraChangedItemTooltip : IDisposable
|
||||||
private bool CanApplyWeapon(EquipSlot slot, EquipItem item)
|
private bool CanApplyWeapon(EquipSlot slot, EquipItem item)
|
||||||
{
|
{
|
||||||
var main = _objects.Player.GetMainhand();
|
var main = _objects.Player.GetMainhand();
|
||||||
var mainItem = _items.Identify(slot, main.X, main.Y, main.Variant);
|
var mainItem = _items.Identify(slot, main.Skeleton, main.Weapon, main.Variant);
|
||||||
if (slot == EquipSlot.MainHand)
|
if (slot == EquipSlot.MainHand)
|
||||||
return item.Type == mainItem.Type;
|
return item.Type == mainItem.Type;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public unsafe class WeaponService : IDisposable
|
||||||
|
|
||||||
if (tmpWeapon.Value != weapon.Value)
|
if (tmpWeapon.Value != weapon.Value)
|
||||||
{
|
{
|
||||||
if (tmpWeapon.X.Id == 0)
|
if (tmpWeapon.Skeleton.Id == 0)
|
||||||
tmpWeapon.Stain = 0;
|
tmpWeapon.Stain = 0;
|
||||||
_loadWeaponHook.Original(drawData, slot, tmpWeapon.Value, 1, unk2, 1, unk4);
|
_loadWeaponHook.Original(drawData, slot, tmpWeapon.Value, 1, unk2, 1, unk4);
|
||||||
}
|
}
|
||||||
|
|
@ -119,7 +119,7 @@ public unsafe class WeaponService : IDisposable
|
||||||
var mdl = character.Model;
|
var mdl = character.Model;
|
||||||
var (_, _, mh, oh) = mdl.GetWeapons(character);
|
var (_, _, mh, oh) = mdl.GetWeapons(character);
|
||||||
var value = slot == EquipSlot.OffHand ? oh : mh;
|
var value = slot == EquipSlot.OffHand ? oh : mh;
|
||||||
var weapon = value.With(value.X.Id == 0 ? 0 : stain);
|
var weapon = value.With(value.Skeleton.Id == 0 ? 0 : stain);
|
||||||
LoadWeapon(character, slot, weapon);
|
LoadWeapon(character, slot, weapon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ public class StateListener : IDisposable
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Fist weapon gauntlet hack.
|
// Fist weapon gauntlet hack.
|
||||||
if (slot is EquipSlot.OffHand && weapon.Value.Variant == 0 && weapon.Value.Y.Id != 0 && _lastFistOffhand.Y.Id != 0)
|
if (slot is EquipSlot.OffHand && weapon.Value.Variant == 0 && weapon.Value.Weapon.Id != 0 && _lastFistOffhand.Weapon.Id != 0)
|
||||||
weapon.Value = _lastFistOffhand;
|
weapon.Value = _lastFistOffhand;
|
||||||
|
|
||||||
if (!actor.Identifier(_actors, out var identifier)
|
if (!actor.Identifier(_actors, out var identifier)
|
||||||
|
|
@ -308,13 +308,13 @@ public class StateListener : IDisposable
|
||||||
var newWeapon = state.ModelData.Weapon(slot);
|
var newWeapon = state.ModelData.Weapon(slot);
|
||||||
if (baseType is FullEquipType.Unknown || baseType == state.ModelData.Item(slot).Type || _gPose.InGPose && actor.IsGPoseOrCutscene)
|
if (baseType is FullEquipType.Unknown || baseType == state.ModelData.Item(slot).Type || _gPose.InGPose && actor.IsGPoseOrCutscene)
|
||||||
actorWeapon = newWeapon;
|
actorWeapon = newWeapon;
|
||||||
else if (actorWeapon.X.Id != 0)
|
else if (actorWeapon.Skeleton.Id != 0)
|
||||||
actorWeapon = actorWeapon.With(newWeapon.Stain);
|
actorWeapon = actorWeapon.With(newWeapon.Stain);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fist Weapon Offhand hack.
|
// Fist Weapon Offhand hack.
|
||||||
if (slot is EquipSlot.MainHand && weapon.Value.X.Id is > 1600 and < 1651)
|
if (slot is EquipSlot.MainHand && weapon.Value.Skeleton.Id is > 1600 and < 1651)
|
||||||
_lastFistOffhand = new CharacterWeapon((PrimaryId)(weapon.Value.X.Id + 50), weapon.Value.Y, weapon.Value.Variant,
|
_lastFistOffhand = new CharacterWeapon((PrimaryId)(weapon.Value.Skeleton.Id + 50), weapon.Value.Weapon, weapon.Value.Variant,
|
||||||
weapon.Value.Stain);
|
weapon.Value.Stain);
|
||||||
|
|
||||||
_funModule.ApplyFun(actor, ref weapon.Value, slot);
|
_funModule.ApplyFun(actor, ref weapon.Value, slot);
|
||||||
|
|
@ -329,7 +329,7 @@ public class StateListener : IDisposable
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var offhand = actor.GetOffhand();
|
var offhand = actor.GetOffhand();
|
||||||
return offhand.Variant == 0 && offhand.Y.Id != 0 && armor.Set.Id == offhand.Y.Id;
|
return offhand.Variant == 0 && offhand.Weapon.Id != 0 && armor.Set.Id == offhand.Weapon.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
var actorArmor = actor.GetArmor(slot);
|
var actorArmor = actor.GetArmor(slot);
|
||||||
|
|
@ -474,7 +474,7 @@ public class StateListener : IDisposable
|
||||||
var change = UpdateState.NoChange;
|
var change = UpdateState.NoChange;
|
||||||
|
|
||||||
// Fist weapon bug hack
|
// Fist weapon bug hack
|
||||||
if (slot is EquipSlot.OffHand && weapon.Value == 0 && actor.GetMainhand().X.Id is > 1600 and < 1651)
|
if (slot is EquipSlot.OffHand && weapon.Value == 0 && actor.GetMainhand().Skeleton.Id is > 1600 and < 1651)
|
||||||
return UpdateState.NoChange;
|
return UpdateState.NoChange;
|
||||||
|
|
||||||
if (baseData.Stain != weapon.Stain)
|
if (baseData.Stain != weapon.Stain)
|
||||||
|
|
@ -483,9 +483,9 @@ public class StateListener : IDisposable
|
||||||
change = UpdateState.Change;
|
change = UpdateState.Change;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (baseData.X.Id != weapon.X.Id || baseData.Y.Id != weapon.Y.Id || baseData.Variant != weapon.Variant)
|
if (baseData.Skeleton.Id != weapon.Skeleton.Id || baseData.Weapon.Id != weapon.Weapon.Id || baseData.Variant != weapon.Variant)
|
||||||
{
|
{
|
||||||
var item = _items.Identify(slot, weapon.X, weapon.Y, weapon.Variant,
|
var item = _items.Identify(slot, weapon.Skeleton, weapon.Weapon, weapon.Variant,
|
||||||
slot is EquipSlot.OffHand ? state.BaseData.Item(EquipSlot.MainHand).Type : FullEquipType.Unknown);
|
slot is EquipSlot.OffHand ? state.BaseData.Item(EquipSlot.MainHand).Type : FullEquipType.Unknown);
|
||||||
state.BaseData.SetItem(slot, item);
|
state.BaseData.SetItem(slot, item);
|
||||||
change = UpdateState.Change;
|
change = UpdateState.Change;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue