Add NPC system scaffold, loot-table gold drops, and remove stash VIP gate

This commit is contained in:
dingo
2026-02-14 00:37:56 -05:00
parent d4f467656d
commit b4affac203
19 changed files with 1448 additions and 89 deletions
+2 -41
View File
@@ -13,11 +13,11 @@ using Server.Networking.Messages;
namespace GameServer.Dungeon;
#region Stash System (VIP Feature)
#region Stash System
public sealed partial class DungeonHandler
{
private const int STASH_SLOTS = 50; // Number of stash slots for VIP
private const int STASH_SLOTS = 50; // Number of stash slots
/// <summary>
/// Handle request to view stash contents
@@ -27,19 +27,6 @@ public sealed partial class DungeonHandler
using var scope = _scopeFactory.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<GameDbContext>();
// Check VIP status
var account = await db.Accounts.FindAsync(new object[] { session.AccountId }, ct);
if (account == null || account.Role < AccountRole.Vip)
{
await SendAsync(connection, DungeonOpCodes.STASH_RESULT, new
{
success = false,
error = "vip_required",
message = "Stash is a VIP feature. Upgrade your account to access it!"
}, ct);
return;
}
// Get stash items
var stashItems = await db.DungeonStashItems
.Where(s => s.CharacterId == session.CharacterId)
@@ -80,19 +67,6 @@ public sealed partial class DungeonHandler
using var scope = _scopeFactory.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<GameDbContext>();
// Check VIP status
var account = await db.Accounts.FindAsync(new object[] { session.AccountId }, ct);
if (account == null || account.Role < AccountRole.Vip)
{
await SendAsync(connection, DungeonOpCodes.STASH_RESULT, new
{
success = false,
error = "vip_required",
message = "Stash is a VIP feature."
}, ct);
return;
}
// Must be in hub to use stash
if (session.State != PlayerState.InHub)
{
@@ -223,19 +197,6 @@ public sealed partial class DungeonHandler
using var scope = _scopeFactory.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<GameDbContext>();
// Check VIP status
var account = await db.Accounts.FindAsync(new object[] { session.AccountId }, ct);
if (account == null || account.Role < AccountRole.Vip)
{
await SendAsync(connection, DungeonOpCodes.STASH_RESULT, new
{
success = false,
error = "vip_required",
message = "Stash is a VIP feature."
}, ct);
return;
}
// Must be in hub to use stash
if (session.State != PlayerState.InHub)
{