本文整理汇总了C#中Server.GenericReader.ReadLong方法的典型用法代码示例。如果您正苦于以下问题:C# GenericReader.ReadLong方法的具体用法?C# GenericReader.ReadLong怎么用?C# GenericReader.ReadLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.GenericReader
的用法示例。
在下文中一共展示了GenericReader.ReadLong方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
{
m_Cost = reader.ReadInt();
m_AmountCollected = reader.ReadLong();
goto case 0;
}
case 0:
{
m_Active = reader.ReadBool();
m_Decays = reader.ReadBool();
m_DecayTime = reader.ReadTimeSpan();
if (reader.ReadBool())
m_RuneBooks = reader.ReadItemList();
if (m_Decays)
m_TimeLeft = reader.ReadTimeSpan();
LootType = LootType.Blessed;
break;
}
}
}
示例2: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
Gold = reader.ReadLong();
Tokens = reader.ReadLong();
break;
case 1:
DateLastPaid = reader.ReadDateTime();
goto case 0;
}
}
示例3: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Points = reader.ReadLong();
m_StartTier = reader.ReadLong();
m_NextTier = reader.ReadLong();
m_DailyDecay = reader.ReadLong();
m_Tier = reader.ReadInt();
m_DonationTitle = QuestReader.Object( reader );
Init();
for ( int i = reader.ReadInt(); i > 0; i -- )
{
List<object> list = new List<object>();
for ( int j = reader.ReadInt(); j > 0; j -- )
list.Add( QuestReader.Object( reader ) );
m_Tiers.Add( list );
}
if ( CantWalk )
Frozen = true;
}
示例4: ReadLength
private static void ReadLength(GenericReader idx, bool reset, out long length, out int count)
{
var index = idx.Seek(0, SeekOrigin.Current);
idx.Seek(4, SeekOrigin.Begin);
length = idx.ReadLong();
count = idx.ReadInt();
if (reset)
{
idx.Seek(index, SeekOrigin.Begin);
}
}
示例5: ReadIndex
private static void ReadIndex(
GenericReader idx,
out Type type,
out Serial serial,
out Serial parent,
out long index,
out long length)
{
type = idx.ReadType();
serial = idx.ReadInt();
parent = idx.ReadInt();
index = idx.ReadLong();
length = idx.ReadLong();
}
示例6: Deserialize
public override void Deserialize(GenericReader reader)
{
City = (City)reader.ReadInt();
base.Deserialize(reader);
int version = reader.ReadInt();
CompletedTrades = reader.ReadInt();
Governor = reader.ReadMobile();
GovernorElect = reader.ReadMobile();
PendingGovernor = reader.ReadBool();
Treasury = reader.ReadLong();
ActiveTradeDeal = (TradeDeal)reader.ReadInt();
TradeDealStart = reader.ReadDateTime();
NextTradeDealCheck = reader.ReadDateTime();
CanUtilize = reader.ReadBool();
Headline = reader.ReadString();
Body = reader.ReadString();
PostedOn = reader.ReadDateTime();
if (reader.ReadInt() == 0)
Election = new CityElection(this, reader);
else
Election = new CityElection(this);
if (this.City == City.Britain)
{
_CitizenWait = new Dictionary<Mobile, DateTime>();
int count = reader.ReadInt();
for (int i = 0; i < count; i++)
{
Mobile m = reader.ReadMobile();
DateTime dt = reader.ReadDateTime();
if (m != null && dt > DateTime.UtcNow)
_CitizenWait[m] = dt;
}
Timer.DelayCall(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10), OnTick);
}
}
示例7: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 33:
#region SA
{
m_SSNextSeed = reader.ReadDateTime();
m_SSSeedExpire = reader.ReadDateTime();
m_SSSeedLocation = reader.ReadPoint3D();
m_SSSeedMap = reader.ReadMap();
goto case 32;
}
#endregion
#region NeoLevelSystem // Neo's Level System
case 32:
{
m_LevelExp = reader.ReadLong();
m_Exp = reader.ReadLong();
m_Level = reader.ReadInt();
m_ExpTitle = reader.ReadString();
goto case 31;
}
#endregion
case 31:
{
m_AutoStabled = reader.ReadStrongMobileList();
goto case 30;
}
case 30:
{
m_FortuneType1 = reader.ReadEncodedInt();
if (m_FortuneType1 > 0)
{
m_FortunePower1 = reader.ReadEncodedInt();
m_FortuneType2 = reader.ReadEncodedInt();
m_FortunePower2 = reader.ReadEncodedInt();
FortuneExpire = reader.ReadDateTime();
if (FortuneExpire > DateTime.Now)
{
ApplyFortune(m_FortuneType1, m_FortunePower1);
ApplyFortune(m_FortuneType2, m_FortunePower2);
FortuneGump.Told.Add(this);
}
else
m_FortuneType1 = m_FortuneType2 = m_FortunePower1 = m_FortunePower2 = 0;
}
goto case 29;
}
#region Mondain's Legacy
case 29:
{
m_AnkhNextUse = reader.ReadDateTime();
goto case 28;
}
#endregion
case 28:
{
m_TamingBOBFilter = new Engines.BulkOrders.TamingBOBFilter( reader );
goto case 27;
}
case 27:
{
m_Bioenginer = reader.ReadBool();
NextTamingBulkOrder = reader.ReadTimeSpan();
goto case 26;
}
case 26:
{
#region Mondain's Legacy
m_Quests = QuestReader.Quests( reader, this );
m_Chains = QuestReader.Chains( reader );
m_Collections = new Dictionary<Collection,int>();
m_CollectionTitles = new List<object>();
for ( int i = reader.ReadInt(); i > 0; i -- )
m_Collections.Add( (Collection) reader.ReadInt(), reader.ReadInt() );
for ( int i = reader.ReadInt(); i > 0; i -- )
m_CollectionTitles.Add( QuestReader.Object( reader ) );
m_SelectedTitle = reader.ReadInt();
m_Peaced = reader.ReadDateTime();
//.........这里部分代码省略.........
示例8: 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;
}
}
示例9: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
m_Instance = reader.ReadItem() as PrimevalLichPuzzle;
m_Altar = reader.ReadItem() as ChampionSpawn;
m_Key = reader.ReadLong();
m_Successful = reader.ReadMobile();
m_Levers = reader.ReadStrongItemList<PrimevalLichPuzzleLever>();
break;
}
if ( null == m_Levers )
m_Levers = new List<PrimevalLichPuzzleLever>();
// if ( null != m_Instance && m_Instance.Deleted && this == m_Instance )
// {
// m_Instance = null;
// return;
// }
// // remove if no altar exists
// if ( null == m_Altar )
// Timer.DelayCall( TimeSpan.FromSeconds( 0.0 ), new TimerCallback( Delete ) );
// ResetLevers();
}
示例10: BestWave
public BestWave(GenericReader reader)
{
int version = reader.ReadInt();
Waves = reader.ReadInt();
TotalScore = reader.ReadLong();
Date = reader.ReadString();
Score = new Dictionary<Mobile, long>();
int cnt = reader.ReadInt();
for (int i = 0; i < cnt; i++)
{
Mobile m = reader.ReadMobile();
long score = reader.ReadLong();
if (m != null)
Score[m] = score;
}
}
示例11: Deserialize
public void Deserialize(GenericReader reader)
{
int version = reader.ReadInt();
switch (version)
{
case 0:
{
m_TransactionID = reader.ReadLong();
m_Date = reader.ReadDateTime();
m_TransType = (TransactionType)reader.ReadInt();
ResName = reader.ReadString();
Amount = reader.ReadInt();
Price = reader.ReadDouble();
NewAmount = reader.ReadInt();
VendorID = (Serial)reader.ReadInt();
break;
}
default:
{
Console.WriteLine("Error: Invalid save version for Resource Transaction.");
break;
}
}
}
示例12: FindPosition
private bool FindPosition(GenericReader rcreader)
{
((BinaryFileReader)rcreader).Seek(0, SeekOrigin.Begin);
if (rcreader.End())
return false;
int rcversion = rcreader.ReadInt();
switch (rcversion)
{
case 0:
{
long tableposition = rcreader.ReadLong();
Console.WriteLine("Tableposition: {0}", tableposition);
((BinaryFileReader)rcreader).Seek(tableposition, SeekOrigin.Begin);
while (!rcreader.End())
{
string typename = rcreader.ReadString();
long location = rcreader.ReadLong();
Console.WriteLine("{0}, {1}", typename, location);
if (typename == m_Type.FullName)
{
((BinaryFileReader)rcreader).Seek(location, SeekOrigin.Begin);
return true;
}
}
break;
}
default:
{
throw new Exception("ResourcePool error: Invalid consignments.dat save version");
}
}
return false;
}