초기커밋
This commit is contained in:
38
GameServer/Contents/Buff/BuffCheat.cs
Normal file
38
GameServer/Contents/Buff/BuffCheat.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using ServerCommon;
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
[ChatCommandAttribute("startbuff", typeof(ChatCommandStartBuff), AuthAdminLevelType.Developer, AuthAdminLevelType.GmNormal, AuthAdminLevelType.GmSuper)]
|
||||
internal class ChatCommandStartBuff : ChatCommandBase
|
||||
{
|
||||
public override async Task invoke(Player player, string token, string[] args)
|
||||
{
|
||||
await Task.CompletedTask;
|
||||
|
||||
Log.getLogger().info($"HandleStartBuff");
|
||||
|
||||
if (args.Length < 1)
|
||||
{
|
||||
Log.getLogger().error($"Invalid Argument");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!uint.TryParse(args[0], out var buff_meta_id))
|
||||
{
|
||||
Log.getLogger().error($"questcomplete param parsing Error args : {args[0]}");
|
||||
return;
|
||||
}
|
||||
|
||||
var buff_action = player.getEntityAction<BuffAction>();
|
||||
(var result, var add_buff_attribute, var del_buff_attribute) = buff_action.AddBuffProcess(buff_meta_id);
|
||||
if (result.isFail())
|
||||
{
|
||||
Log.getLogger().error($"Failed to AddBuffProcess() !!! : {result.toBasicString()} - {player.toBasicString()}");
|
||||
return;
|
||||
}
|
||||
|
||||
BuffNotifyHelper.send_S2C_NTF_DELETE_BUFF(player, del_buff_attribute);
|
||||
BuffNotifyHelper.send_S2C_NTF_START_BUFF(player, add_buff_attribute);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user