Working on projectiles
This commit is contained in:
@@ -1024,13 +1024,12 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
||||
using var scope = _scopeFactory.CreateScope();
|
||||
var db = scope.ServiceProvider.GetRequiredService<GameDbContext>();
|
||||
|
||||
// Get equipped weapon
|
||||
var weaponItemId = session.Character.EquippedWeapon;
|
||||
if (!weaponItemId.HasValue) return;
|
||||
|
||||
// Get equipped weapon using new equipment system
|
||||
var weaponItem = await db.DungeonCharacterItems
|
||||
.Include(i => i.ItemDefinition)
|
||||
.FirstOrDefaultAsync(i => i.Id == weaponItemId.Value, ct);
|
||||
.FirstOrDefaultAsync(i => i.CharacterId == session.CharacterId
|
||||
&& i.IsEquipped
|
||||
&& i.EquipSlot == DungeonEquipmentSlot.MainHand, ct);
|
||||
|
||||
if (weaponItem?.ItemDefinition == null) return;
|
||||
var weapon = weaponItem.ItemDefinition;
|
||||
|
||||
Reference in New Issue
Block a user