public HandlerDescriptor(Action <Player, Player, string, int> _handler, string _handlerCommand, string _commandDescription, string _usage) { handler = _handler; handlerCommand = _handlerCommand; commandDescription = _commandDescription; usage = _usage; permissionLevel = InfServer.Data.PlayerPermission.Normal; isDevCommand = false; }
public HandlerDescriptor(Action <Player, Player, string, int> _handler, string _handlerCommand, string _commandDescription, string _usage, Data.PlayerPermission _permissionLevel, bool _isDevCommand) { handler = _handler; handlerCommand = _handlerCommand; commandDescription = _commandDescription; usage = _usage; permissionLevel = _permissionLevel; isDevCommand = _isDevCommand; }
/// <summary> /// Deserializes the data present in the packet contents into data fields in the class. /// </summary> public override void Deserialize() { player.id = _contentReader.ReadUInt16(); player.magic = _contentReader.ReadInt32(); alias = ReadNullString(); bNewAlias = _contentReader.ReadBoolean(); bSuccess = _contentReader.ReadBoolean(); loginMessage = ReadNullString(); //If login failed, there's no need to read further if (!bSuccess) { return; } squad = ReadNullString(); squadID = _contentReader.ReadInt64(); permission = (InfServer.Data.PlayerPermission)_contentReader.ReadByte(); developer = _contentReader.ReadBoolean(); admin = _contentReader.ReadBoolean(); bFirstTimeSetup = _contentReader.ReadBoolean(); //If it's a first time, then no need to init rest of the stats if (bFirstTimeSetup) { return; } stats = PlayerStats.Deserialize(_contentReader); bool bBanner = _contentReader.ReadBoolean(); if (bBanner) { banner = _contentReader.ReadBytes(432); } }