Skip to content

Commit

Permalink
Fix soul lantern soul drain part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczy93 committed Nov 7, 2024
1 parent 191b9c1 commit f40d379
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Scripts/Items/Weapons/BaseWeapon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ public override bool CheckConflictingLayer( Mobile m, Item item, Layer layer )
m.SendLocalizedMessage( 500214 ); // You already have something in both hands.
return true;
}
else if ( this.Layer == Layer.OneHanded && layer == Layer.TwoHanded && !(item is BaseShield) && !(item is BaseEquipableLight) )
else if ( this.Layer == Layer.OneHanded && layer == Layer.TwoHanded && !(item is BaseShield) && !(item is BaseEquipableLight) && !(item is SoulLantern) )
{
m.SendLocalizedMessage( 500215 ); // You can only wield one weapon at a time.
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ public static int ComputePowerValue( Mobile from, int div )

private static SoulLantern FindSoulLantern(Mobile from)
{
return (SoulLantern)from.Items.FirstOrDefault(i => i is SoulLantern soulLantern && soulLantern.Owner == from);
var item = from.FindItemOnLayer(Layer.TwoHanded) as SoulLantern;
if (item == null)
{
item = from.Backpack.FindItemByType<SoulLantern>(true);
}
return item;
}

private static void DrainSoulsInLantern( Mobile from, int tithing )
Expand Down

0 comments on commit f40d379

Please sign in to comment.