mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-12 19:14:34 +01:00
* Deleted TestCommand.cs No longer needed. * Update AbyssCommand.cs Added a command to adjust the player's bracket at will. * Update User.cs Added Abyss Group Value * Update Command.cs Added Examples[] to the constructor and handler. * Update HelpCommand.cs Made the Help command more helpful! * Update AbyssCommand.cs Added Help Examples * Update GiveCommand.cs Added help examples, handles negative inputs again, added more aliases, can add or remove materials by ID, can now for add all skipped characters with `give avatars-scuffed` * Update AbyssCommand.cs missed a quote * Update UltraEndlessGetMainDataReqHandler.cs Bracket can now be set with commands. Need to unscuff the fight cycle. * Update GiveCommand.cs Cheeky give gold command * Further refined the Help Command --------- Co-authored-by: TerminalAide0017 <Sucks@code>
32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
using Common.Utils.ExcelReader;
|
|
using PemukulPaku.GameServer.Game;
|
|
using Common.Resources.Proto;
|
|
|
|
namespace PemukulPaku.GameServer.Commands
|
|
{
|
|
[CommandHandler("level", "<1-88>", CommandType.Player)]
|
|
internal class LevelCommand : Command
|
|
{
|
|
public override void Run(Session session, string[] args)
|
|
{
|
|
Run(session.Player, args);
|
|
|
|
GetMainDataRsp Rsp = new()
|
|
{
|
|
retcode = GetMainDataRsp.Retcode.Succ,
|
|
Level = (uint)PlayerLevelData.GetInstance().CalculateLevel(session.Player.User.Exp).Level,
|
|
Exp = (uint)PlayerLevelData.GetInstance().CalculateLevel(session.Player.User.Exp).Exp,
|
|
TypeLists = new uint[] { 3, 4 }
|
|
};
|
|
session.Send(Packet.FromProto(Rsp, CmdId.GetMainDataRsp), Packet.FromProto(new PlayerLevelUpNotify() { NewLevel = Rsp.Level }, CmdId.PlayerLevelUpNotify));
|
|
}
|
|
|
|
public override void Run(Player player, string[] args)
|
|
{
|
|
int level = int.Parse(args[0]);
|
|
player.User.Exp = PlayerLevelData.GetInstance().CalculateExpForLevel(level).Exp;
|
|
player.User.Save();
|
|
}
|
|
}
|
|
}
|