초기커밋
This commit is contained in:
48
GameServer/Contents/Room/RoomCheat.cs
Normal file
48
GameServer/Contents/Room/RoomCheat.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Amazon.S3.Model;
|
||||
using GameServer.PacketHandler;
|
||||
using ServerCommon;
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
[ChatCommandAttribute("changepage", typeof(RoomCommandScreenPageChange), AuthAdminLevelType.Developer,
|
||||
AuthAdminLevelType.GmNormal, AuthAdminLevelType.GmSuper)]
|
||||
internal class RoomCommandScreenPageChange : ChatCommandBase
|
||||
{
|
||||
public override async Task invoke(Player player, string token, string[] args)
|
||||
{
|
||||
var result = new Result();
|
||||
if (args.Length < 2) return;
|
||||
|
||||
var isCustom = false;
|
||||
var isIncrease = false;
|
||||
var custromPage = -1;
|
||||
|
||||
if (false == bool.TryParse(args[0], out isCustom)) return;
|
||||
if (false == isCustom)
|
||||
{
|
||||
if (false == bool.TryParse(args[1], out isIncrease)) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(false == int.TryParse(args[1], out custromPage)) return;
|
||||
}
|
||||
|
||||
Log.getLogger().debug("Meeting Room Change Page");
|
||||
|
||||
var location = player.getEntityAttribute<LocationAttribute>();
|
||||
NullReferenceCheckHelper.throwIfNull(location, () => $"location is null !!! - {player.toBasicString()}");
|
||||
|
||||
var room_id = location.CurrentIndunLocation.InstanceRoomId;
|
||||
if (string.IsNullOrEmpty(room_id)) return;
|
||||
|
||||
var screen_page_no = InstanceRoomManager.Instance.changeScreenPage(room_id, isCustom, isIncrease, custromPage);
|
||||
Log.getLogger().debug($"Change Meeting Room Screen Page : {screen_page_no}");
|
||||
|
||||
if(screen_page_no < 0) result.setFail(ServerErrorCode.NotExistInstanceRoom, $"failed to change screen page!! : roomId[{room_id}]");
|
||||
|
||||
ChangeScreenPagePacketHandler.send_S2C_ACK_CHANGE_SCREEN_PAGE(player, result, screen_page_no);
|
||||
|
||||
await Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user