implement basic gacha ( no droprates yet)

This commit is contained in:
raphaeIl
2024-04-05 21:02:31 -04:00
parent bbe0d7ab11
commit 92907806b2
11 changed files with 606 additions and 108 deletions

View File

@@ -3,6 +3,7 @@ using BLHX.Server.Common.Database;
using BLHX.Server.Common.Proto.common;
using BLHX.Server.Common.Utils;
using BLHX.Server.Game.Handlers;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
namespace BLHX.Server.Game.Commands {
[CommandHandler("ship", "Unlock a character or all characters", "ship unlock=all rarity=6")]
@@ -33,6 +34,9 @@ namespace BLHX.Server.Game.Commands {
List<PlayerShip> all_ships = all_ship_ids.Select(ship_id => CreateShipFromId((uint)ship_id, connection.player.Uid)).Take(amount).ToList();
foreach (int id in all_ship_ids)
Logger.c.Log(id + "");
all_ships.AddRange(GetDefaultShips(connection.player.Ships)); // add the defaults
connection.player.Ships = all_ships;
connection.SendSystemMsg($"Added {amount} ships!");