Skip to content

Commit 269e845

Browse files
authored
fix: set LastAttackingWeapon for EquipmentOnHitTriggers (AscensionGameDev#2241)
Fixes an issue where LastAttackingWeapon wasn’t updated when shooting projectiles and spells, resulting in it not being properly used as CachedEquipmentOnHitTriggers
1 parent a450496 commit 269e845

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Intersect.Server.Core/Entities/Player.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,8 @@ public override void TryAttack(Entity target,
14051405
return;
14061406
}
14071407

1408+
LastAttackingWeapon = parentItem;
1409+
14081410
//If Entity is resource, check for the correct tool and make sure its not a spell cast.
14091411
if (target is Resource resource)
14101412
{

0 commit comments

Comments
 (0)