本文整理汇总了C#中Server.GenericReader.ReadFlag方法的典型用法代码示例。如果您正苦于以下问题:C# GenericReader.ReadFlag方法的具体用法?C# GenericReader.ReadFlag怎么用?C# GenericReader.ReadFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.GenericReader
的用法示例。
在下文中一共展示了GenericReader.ReadFlag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
var version = reader.GetVersion();
switch (version)
{
case 1:
case 0:
{
if (version < 1)
{
reader.ReadShort();
reader.ReadInt();
}
UpdateInterval = reader.ReadTimeSpan();
RequestFlags = reader.ReadFlag<ReqFlags>();
}
break;
}
}
示例2: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
reader.GetVersion();
_Resource = reader.ReadFlag<CraftResource>();
}
示例3: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
var version = reader.GetVersion();
switch (version)
{
case 1:
{
Mode = reader.ReadFlag<SkillCodexMode>();
Flags = reader.ReadFlag<SkillCodexFlags>();
Count = reader.ReadInt();
Value = reader.ReadDouble();
DeleteWhenEmpty = reader.ReadBool();
IgnoredSkills = reader.ReadList(r => r.ReadFlag<SkillName>());
}
break;
case 0:
{
Mode = (SkillCodexMode)reader.ReadByte();
Flags = (SkillCodexFlags)reader.ReadByte();
Count = reader.ReadInt();
Value = reader.ReadDouble();
DeleteWhenEmpty = reader.ReadBool();
IgnoredSkills = reader.ReadList(() => (SkillName)reader.ReadShort());
}
break;
}
}
示例4: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.GetVersion();
switch (version)
{
case 0:
{
_Token = reader.ReadString();
_Crafter = reader.ReadMobile();
UseDelay = reader.ReadTimeSpan();
FuseDelay = reader.ReadTimeSpan();
IgniteEffectID = reader.ReadInt();
IgniteEffectHue = reader.ReadInt();
IgniteEffectSpeed = reader.ReadInt();
IgniteEffectRender = reader.ReadFlag<EffectRender>();
IgniteEffectSound = reader.ReadInt();
FailEffectID = reader.ReadInt();
FailEffectHue = reader.ReadInt();
FailEffectSpeed = reader.ReadInt();
FailEffectDuration = reader.ReadInt();
FailEffectRender = reader.ReadFlag<EffectRender>();
FailEffectSound = reader.ReadInt();
}
break;
}
}
示例5: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.GetVersion();
switch (version)
{
case 1:
{
GumpWidth = reader.ReadInt();
GumpHeight = reader.ReadInt();
GumpPadding = reader.ReadInt();
GumpBackground = reader.ReadInt();
GumpForeground = reader.ReadInt();
GumpFlow = reader.ReadFlag<ProgressBarFlow>();
GumpTextColor = reader.ReadFlag<KnownColor>();
GumpDisplayPercent = reader.ReadBool();
GumpDisplayText = reader.ReadBool();
}
goto case 0;
case 0:
{
PositionCommand = reader.ReadString();
ToggleCommand = reader.ReadString();
}
break;
}
if (version > 0)
{
return;
}
GumpWidth = ProgressBarGump.DefaultWidth;
GumpHeight = ProgressBarGump.DefaultHeight;
GumpPadding = ProgressBarGump.DefaultPadding;
GumpBackground = ProgressBarGump.DefaultBackgroundID;
GumpForeground = ProgressBarGump.DefaultForegroundID;
GumpFlow = ProgressBarGump.DefaultFlow;
GumpTextColor = SuperGump.DefaultHtmlColor.ToKnownColor();
GumpDisplayPercent = false;
GumpDisplayText = true;
}
示例6: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.GetVersion();
switch (version)
{
case 0:
{
SetNameColor = reader.ReadFlag<KnownColor>();
PartNameColor = reader.ReadFlag<KnownColor>();
ModNameColor = reader.ReadFlag<KnownColor>();
InactiveColor = reader.ReadFlag<KnownColor>();
AdminCommand = reader.ReadString();
}
break;
}
}
示例7: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
reader.GetVersion();
Name = reader.ReadString();
Summary = reader.ReadString();
Token = reader.ReadString();
Available = reader.ReadBool();
AutoJoin = reader.ReadBool();
Access = reader.ReadFlag<AccessLevel>();
ProfanityAction = reader.ReadFlag<ProfanityAction>();
TextColor = reader.ReadFlag<KnownColor>();
TextHue = reader.ReadInt();
UserLimit = reader.ReadInt();
SpamDelay = reader.ReadTimeSpan();
Bans = reader.ReadBlockDictionary(
r =>
{
var k = r.ReadMobile<PlayerMobile>();
var v = r.ReadDateTime();
return new KeyValuePair<PlayerMobile, DateTime>(k, v);
});
History = new Dictionary<PlayerMobile, WorldChatMessage>();
Users = new Dictionary<PlayerMobile, DateTime>();
}
示例8: Deserialize
public virtual void Deserialize(GenericReader reader)
{
int version = reader.GetVersion();
if (version > 5)
{
reader.ReadBlock(
r =>
{
if (version > 6)
{
Serial = new PvPSerial(r);
}
else
{
Serial = r.ReadTypeCreate<PvPSerial>(r) ?? new PvPSerial(r);
}
});
}
switch (version)
{
case 7:
case 6:
case 5:
Hidden = reader.ReadBool();
goto case 4;
case 4:
FloorItemDelete = reader.ReadBool();
goto case 3;
case 3:
case 2:
{
Gate = reader.ReadItem<PvPSpectatorGate>();
if (Gate != null)
{
Gate.Battle = this;
}
}
goto case 1;
case 1:
{
Category = reader.ReadString();
Ranked = reader.ReadBool();
InviteWhileRunning = reader.ReadBool();
}
goto case 0;
case 0:
{
if (version < 6)
{
reader.ReadBlock(r => Serial = r.ReadTypeCreate<PvPSerial>(r) ?? new PvPSerial(r));
}
DebugMode = reader.ReadBool();
State = reader.ReadFlag<PvPBattleState>();
Name = reader.ReadString();
Description = reader.ReadString();
AutoAssign = reader.ReadBool();
UseTeamColors = reader.ReadBool();
IgnoreCapacity = reader.ReadBool();
SubCommandPrefix = reader.ReadChar();
QueueAllowed = reader.ReadBool();
SpectateAllowed = reader.ReadBool();
KillPoints = version < 3 ? (reader.ReadBool() ? 1 : 0) : reader.ReadInt();
PointsBase = reader.ReadInt();
PointsRankFactor = reader.ReadDouble();
IdleKick = reader.ReadBool();
IdleThreshold = reader.ReadTimeSpan();
LastState = reader.ReadFlag<PvPBattleState>();
LastStateChange = reader.ReadDateTime();
LightLevel = reader.ReadInt();
LogoutDelay = reader.ReadTimeSpan();
Doors.AddRange(reader.ReadStrongItemList<BaseDoor>());
reader.ReadBlock(r => Options = r.ReadTypeCreate<PvPBattleOptions>(r) ?? new PvPBattleOptions(r));
if (Schedule != null && Schedule.Running)
{
Schedule.Stop();
}
reader.ReadBlock(r => Schedule = r.ReadTypeCreate<Schedule>(r) ?? new Schedule("Battle " + Serial.Value, false));
reader.ReadBlock(r => BattleRegion = r.ReadTypeCreate<PvPBattleRegion>(this, r) ?? new PvPBattleRegion(this, r));
reader.ReadBlock(
r => SpectateRegion = r.ReadTypeCreate<PvPSpectateRegion>(this, r) ?? new PvPSpectateRegion(this, r));
reader.ReadBlockList(r => r.ReadTypeCreate<PvPTeam>(this, r) ?? new PvPTeam(this, r), Teams);
}
break;
}
}
示例9: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
var version = reader.GetVersion();
switch (version)
{
case 2:
NotifyPlayer = reader.ReadBool();
goto case 1;
case 1:
{
SearchMode = reader.ReadFlag<StringSearchFlags>();
SearchCapsIgnore = reader.ReadBool();
}
goto case 0;
case 0:
{
if (version < 1)
{
SearchMode = StringSearchFlags.Contains;
SearchCapsIgnore = true;
}
WhitespaceAliases = reader.ReadBlockList(r => r.ReadChar());
KeyWords = reader.ReadBlockList(r => r.ReadString());
LogEnabled = reader.ReadBool();
ConsoleWrite = reader.ReadBool();
PageStaff = reader.ReadBool();
NotifyStaff = reader.ReadBool();
NotifyAccess = reader.ReadFlag<AccessLevel>();
Jail = reader.ReadBool();
JailPoint = new MapPoint(reader);
Squelch = reader.ReadBool();
Kick = reader.ReadBool();
Ban = reader.ReadBool();
}
break;
}
}
示例10: Deserialize
public virtual void Deserialize(GenericReader reader)
{
int version = reader.GetVersion();
switch (version)
{
case 1:
case 0:
{
_Info = reader.ReadTypeCreate<ScheduleInfo>(reader) ?? new ScheduleInfo(reader);
_Enabled = reader.ReadBool();
_Name = reader.ReadString();
_DefaultPriority = reader.ReadFlag<TimerPriority>();
if (reader.ReadBool())
{
_LastGlobalTick = reader.ReadDateTime();
}
if (reader.ReadBool())
{
_NextGlobalTick = reader.ReadDateTime();
}
Delay = reader.ReadTimeSpan();
Interval = reader.ReadTimeSpan();
}
break;
}
if (version < 1)
{
return;
}
if (reader.ReadBool() && _Enabled)
{
Running = true;
}
}
示例11: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
var version = reader.GetVersion();
switch (version)
{
case 0:
{
Schedule = new Schedule(reader);
Timeout = reader.ReadTimeSpan();
NotifyAccess = reader.ReadFlag<AccessLevel>();
NotifyStaff = reader.ReadBool();
}
break;
}
}
示例12: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
UID = reader.ReadString();
goto case 0;
case 0:
{
Stat = reader.ReadFlag<StatType>();
Offset = reader.ReadInt();
Duration = reader.ReadTimeSpan();
}
break;
}
if (String.IsNullOrWhiteSpace(UID))
{
UID = Name + DateTime.UtcNow.ToTimeStamp().Stamp.ToString(CultureInfo.InvariantCulture);
}
}
示例13: Deserialize
public void Deserialize(GenericReader reader)
{
int version = reader.GetVersion();
switch (version)
{
case 0:
{
ID = reader.ReadString();
_State = reader.ReadFlag<DonationTransactionState>();
Account = reader.ReadAccount();
Email = reader.ReadString();
Total = reader.ReadDecimal();
_Credit = reader.ReadLong();
_Time = reader.ReadDouble();
Version = reader.ReadInt();
_InternalVersion = reader.ReadInt();
_Notes = reader.ReadString();
_Extra = reader.ReadString();
DeliverFrom = reader.ReadMobile();
DeliverTo = reader.ReadMobile();
DeliveryTime = reader.ReadDouble();
}
break;
}
}
示例14: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.GetVersion();
switch (version)
{
case 0:
{
Command = reader.ReadFlag<AutoPvPStoneCommand>();
UsageColor = reader.ReadFlag<KnownColor>();
}
break;
}
}
示例15: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.GetVersion();
switch (version)
{
case 0:
{
Enabled = reader.ReadBool();
Force = reader.ReadBool();
Impacts = reader.ReadBool();
Density = reader.ReadInt();
Direction = reader.ReadFlag<PvPBattleWeatherDirection>();
EffectID = reader.ReadInt();
EffectHue = reader.ReadInt();
EffectSpeed = reader.ReadInt();
EffectRender = reader.ReadFlag<EffectRender>();
ImpactEffectID = reader.ReadInt();
ImpactEffectHue = reader.ReadInt();
ImpactEffectSpeed = reader.ReadInt();
ImpactEffectDuration = reader.ReadInt();
ImpactEffectRender = reader.ReadFlag<EffectRender>();
ImpactEffectSound = reader.ReadInt();
}
break;
}
}