초기커밋
This commit is contained in:
50
GameServer/Contents/Calium/CaliumExchangerCheat.cs
Normal file
50
GameServer/Contents/Calium/CaliumExchangerCheat.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using ServerCommon;
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
namespace GameServer.Contents.Calium;
|
||||
|
||||
[ChatCommandAttribute("caliumexchanger", typeof(ChatCommandCaliumExchanger), AuthAdminLevelType.Developer, AuthAdminLevelType.GmNormal, AuthAdminLevelType.GmSuper)]
|
||||
public class ChatCommandCaliumExchanger : ChatCommandBase
|
||||
{
|
||||
public override async Task invoke(Player player, string token, string[] args)
|
||||
{
|
||||
Log.getLogger().info($"ChatCommandCaliumExchanger");
|
||||
|
||||
var message = new ClientToGame();
|
||||
message.Request = new ClientToGameReq();
|
||||
message.Request.ReqCaliumExchangerInfo = new();
|
||||
|
||||
var result = await GameServerApp.getServerLogic().onCallProtocolHandler(player, message);
|
||||
if (result.isFail())
|
||||
{
|
||||
Log.getLogger().error($"fail to run ChatCommandCaliumExchanger!! : {result.toBasicString()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ChatCommandAttribute("exchangecalium", typeof(ChatCommandConvertExchangeCalium), AuthAdminLevelType.Developer, AuthAdminLevelType.GmNormal, AuthAdminLevelType.GmSuper)]
|
||||
public class ChatCommandConvertExchangeCalium : ChatCommandBase
|
||||
{
|
||||
public override async Task invoke(Player player, string token, string[] args)
|
||||
{
|
||||
Log.getLogger().info($"ChatCommandConvertExchangeCalium");
|
||||
|
||||
if (args.Length < 1 ||false == double.TryParse(args[0], out var sapphire))
|
||||
{
|
||||
var err_msg = $"Not enough argument !!! : argCount:{args.Length} == 1 - {player.toBasicString()}";
|
||||
Log.getLogger().error(err_msg);
|
||||
return;
|
||||
}
|
||||
|
||||
var message = new ClientToGame();
|
||||
message.Request = new ClientToGameReq();
|
||||
message.Request.ReqConvertExchangerCalium = new();
|
||||
message.Request.ReqConvertExchangerCalium.Sapphire = sapphire;
|
||||
|
||||
var result = await GameServerApp.getServerLogic().onCallProtocolHandler(player, message);
|
||||
if (result.isFail())
|
||||
{
|
||||
Log.getLogger().error($"fail to run ChatCommandConvertExchangeCalium!! : {result.toBasicString()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user