Skip to content

Commit

Permalink
Fix ObjDesc to also take into account certain equipped ItemType.Cloth…
Browse files Browse the repository at this point in the history
…ing items (#3757)
  • Loading branch information
OptimShi authored Dec 21, 2021
1 parent ab6e165 commit 1a20da1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/ACE.Server/WorldObjects/Creature_Networking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public override ACE.Entity.ObjDesc CalculateObjDesc()
break;
}

// get all the Armor Items so we can calculate their priority
var armorItems = EquippedObjects.Values.Where(x => (x.ItemType == ItemType.Armor)).ToList();
// get all the Armor Items, and any Clothing items that might be equipped (robes, slippers, gloves, kasa, etc) so we can calculate their priority
var armorItems = EquippedObjects.Values.Where(x => (x.ItemType == ItemType.Armor || (x.CurrentWieldedLocation & (EquipMask.Armor | EquipMask.Extremity)) != 0)).ToList();
foreach (var w in armorItems)
w.setVisualClothingPriority();

Expand Down
2 changes: 1 addition & 1 deletion Source/ACE.Server/WorldObjects/WorldObject_Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ public CoverageMask? VisualClothingPriority
/// </summary>
public void setVisualClothingPriority()
{
if (ClothingBase.HasValue && (CurrentWieldedLocation & (EquipMask.Armor | EquipMask.HandWear)) != 0)
if (ClothingBase.HasValue && (CurrentWieldedLocation & (EquipMask.Armor | EquipMask.Extremity)) != 0)
{
ClothingTable item = DatManager.PortalDat.ReadFromDat<ClothingTable>((uint)ClothingBase);
VisualClothingPriority = item.GetVisualPriority();
Expand Down

0 comments on commit 1a20da1

Please sign in to comment.