本文整理汇总了C#中GenericReader.ReadUInt方法的典型用法代码示例。如果您正苦于以下问题:C# GenericReader.ReadUInt方法的具体用法?C# GenericReader.ReadUInt怎么用?C# GenericReader.ReadUInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GenericReader
的用法示例。
在下文中一共展示了GenericReader.ReadUInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Boat = reader.ReadItem() as BaseBoat;
m_Side = (PlankSide) reader.ReadInt();
m_Locked = reader.ReadBool();
m_KeyValue = reader.ReadUInt();
if ( m_Boat == null )
Delete();
break;
}
}
if ( IsOpen )
{
m_CloseTimer = new CloseTimer( this );
m_CloseTimer.Start();
}
}
示例2: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
case 0:
{
m_MultiID = reader.ReadInt();
m_Offset = reader.ReadPoint3D();
m_ShipName = reader.ReadString();
if ( version == 0 )
reader.ReadUInt();
break;
}
}
if ( LootType == LootType.Newbied )
LootType = LootType.Blessed;
if ( Weight == 0.0 )
Weight = 1.0;
}
示例3: KeyInfo
public KeyInfo( GenericReader reader )
{
int version = reader.ReadInt();
m_KeyVal = reader.ReadUInt();
m_Description = reader.ReadString();
m_MaxRange = reader.ReadInt();
m_Link = reader.ReadItem();
m_Type = (KeyType)reader.ReadInt();
}
示例4: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
int count;
bool loadedDynamicDecay = false;
switch ( version )
{
case 16:
{
int stage = reader.ReadInt();
if (stage != -1)
{
m_CurrentStage = (DecayLevel)stage;
m_NextDecayStage = reader.ReadDateTime();
loadedDynamicDecay = true;
}
goto case 15;
}
case 15: //Maka
{
m_HouseKeyVal = reader.ReadUInt();
goto case 14;
}
case 14:
{
m_RelativeBanLocation = reader.ReadPoint3D();
goto case 13;
}
case 13: // removed ban location serialization
case 12:
{
m_VendorRentalContracts = reader.ReadItemList();
m_InternalizedVendors = reader.ReadMobileList();
int relocatedCount = reader.ReadEncodedInt();
for ( int i = 0; i < relocatedCount; i++ )
{
Point3D relLocation = reader.ReadPoint3D();
IEntity entity = World.FindEntity( reader.ReadInt() );
if ( entity != null )
m_RelocatedEntities.Add( new RelocatedEntity( entity, relLocation ) );
}
int inventoryCount = reader.ReadEncodedInt();
for ( int i = 0; i < inventoryCount; i++ )
{
VendorInventory inventory = new VendorInventory( this, reader );
m_VendorInventories.Add( inventory );
}
goto case 11;
}
case 11:
{
m_LastRefreshed = reader.ReadDateTime();
m_RestrictDecay = reader.ReadBool();
goto case 10;
}
case 10: // just a signal for updates
case 9:
{
m_Visits = reader.ReadInt();
goto case 8;
}
case 8:
{
m_Price = reader.ReadInt();
goto case 7;
}
case 7:
{
m_Access = reader.ReadMobileList();
goto case 6;
}
case 6:
{
m_BuiltOn = reader.ReadDateTime();
m_LastTraded = reader.ReadDateTime();
goto case 5;
}
case 5: // just removed fields
case 4:
{
m_Addons = reader.ReadItemList();
goto case 3;
}
case 3:
{
count = reader.ReadInt();
m_Secures = new ArrayList( count );
for ( int i = 0; i < count; ++i )
{
SecureInfo info = new SecureInfo( reader );
//.........这里部分代码省略.........
示例5: Deserialize
public override void Deserialize(GenericReader reader) {
base.Deserialize(reader);
int version = reader.ReadInt();
switch ( version ) {
case 0:
drawing = reader.ReadUInt();
for (uint i = 0; i < jackpot.Length; i++)
jackpot[i] = reader.ReadULong();
for (uint i = 0; i < awards.Length; i++)
awards[i] = reader.ReadULong();
award = reader.ReadULong();
given = reader.ReadULong();
destroyed = reader.ReadULong();
mode = (LotteryBasketMode)reader.ReadInt();
if (reader.ReadBool()) {
outcome = new uint[LotteryConstants.Picks];
for (uint p = 0; p < LotteryConstants.Picks; p++)
outcome[p] = reader.ReadUInt();
}
uint count = reader.ReadUInt();
for (uint i = 0; i < count; i++) {
int id = reader.ReadInt();
uint[] data = new uint[LotteryConstants.Picks];
for (uint p = 0; p < LotteryConstants.Picks; p++)
data[p] = reader.ReadUInt();
RegisteredTicket rt = new RegisteredTicket(id, data);
rt.Class = reader.ReadInt();
tickets[id] = rt;
}
count = reader.ReadUInt();
for (uint i = 0; i < count; i++) {
int id = reader.ReadInt();
uint[] data = new uint[LotteryConstants.Picks];
for (uint p = 0; p < LotteryConstants.Picks; p++)
data[p] = reader.ReadUInt();
incoming[id] = new RegisteredTicket(id, data);
}
board = reader.ReadItem();
itemPrize = reader.ReadBool();
break;
case 1:
drawing = reader.ReadUInt();
for (uint i = 0; i < drawingCount.Length; i++)
drawingCount[i] = reader.ReadUInt();
for (uint i = 0; i < jackpot.Length; i++)
jackpot[i] = reader.ReadULong();
for (uint i = 0; i < awards.Length; i++)
awards[i] = reader.ReadULong();
for (uint i = 0; i < winners.Length; i++)
winners[i] = reader.ReadInt();
oldParticipants = reader.ReadUInt();
award = reader.ReadULong();
given = reader.ReadULong();
destroyed = reader.ReadULong();
mode = (LotteryBasketMode)reader.ReadInt();
if (reader.ReadBool()) {
outcome = new uint[LotteryConstants.Picks];
for (uint p = 0; p < LotteryConstants.Picks; p++)
outcome[p] = reader.ReadUInt();
}
count = reader.ReadUInt();
for (uint i = 0; i < count; i++) {
int id = reader.ReadInt();
uint[] data = new uint[LotteryConstants.Picks];
for (uint p = 0; p < LotteryConstants.Picks; p++)
data[p] = reader.ReadUInt();
RegisteredTicket rt = new RegisteredTicket(id, data);
rt.Class = reader.ReadInt();
tickets[id] = rt;
}
count = reader.ReadUInt();
for (uint i = 0; i < count; i++) {
int id = reader.ReadInt();
uint[] data = new uint[LotteryConstants.Picks];
for (uint p = 0; p < LotteryConstants.Picks; p++)
data[p] = reader.ReadUInt();
incoming[id] = new RegisteredTicket(id, data);
}
board = reader.ReadItem();
itemPrize = reader.ReadBool();
//.........这里部分代码省略.........
示例6: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_Side = (PlankSide)reader.ReadInt();
m_Locked = reader.ReadBool();
m_KeyValue = reader.ReadUInt();
if (IsOpen)
{
m_CloseTimer = new CloseTimer(this);
m_CloseTimer.Start();
}
}
示例7: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
/* Erzse - GuildID is now saved. */
case 1:
{
m_Guild = reader.ReadEncodedInt();
goto case 0;
}
/* end Erzse */
case 0:
{
m_KeyValue = reader.ReadUInt();
m_Open = reader.ReadBool();
m_Locked = reader.ReadBool();
m_OpenedID = reader.ReadInt();
m_ClosedID = reader.ReadInt();
m_OpenedSound = reader.ReadInt();
m_ClosedSound = reader.ReadInt();
m_Offset = reader.ReadPoint3D();
m_Link = reader.ReadItem() as BaseDoor;
m_Timer = new InternalTimer( this );
if ( m_Open )
m_Timer.Start();
break;
}
}
}
示例8: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 2:
{
m_MaxRange = reader.ReadInt();
goto case 1;
}
case 1:
{
m_Link = reader.ReadItem();
goto case 0;
}
case 0:
{
if ( version < 2 || m_MaxRange == 0 )
m_MaxRange = 3;
m_Description = reader.ReadString();
m_KeyVal = reader.ReadUInt();
break;
}
}
}
示例9: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch ( version )
{
case 7:
{
m_Locker = reader.ReadMobile();
goto case 6;
}
case 6:
{
this.m_Crafter = reader.ReadMobile();
goto case 5;
}
case 5:
{
this.m_IsShipwreckedItem = reader.ReadBool();
goto case 4;
}
case 4:
{
this.m_RequiredSkill = reader.ReadInt();
goto case 3;
}
case 3:
{
this.m_MaxLockLevel = reader.ReadInt();
goto case 2;
}
case 2:
{
this.m_KeyValue = reader.ReadUInt();
goto case 1;
}
case 1:
{
this.m_LockLevel = reader.ReadInt();
goto case 0;
}
case 0:
{
if (version < 3)
this.m_MaxLockLevel = 100;
if (version < 4)
{
if ((this.m_MaxLockLevel - this.m_LockLevel) == 40)
{
this.m_RequiredSkill = this.m_LockLevel + 6;
this.m_LockLevel = this.m_RequiredSkill - 10;
this.m_MaxLockLevel = this.m_RequiredSkill + 39;
}
else
{
this.m_RequiredSkill = this.m_LockLevel;
}
}
this.m_Locked = reader.ReadBool();
break;
}
}
}
示例10: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Boat = reader.ReadItem() as BaseGalleon;
m_Side = (BoatRopeSide) reader.ReadInt();
m_Locked = reader.ReadBool();
m_KeyValue = reader.ReadUInt();
if ( m_Boat == null )
Delete();
break;
}
}
}
示例11: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 8:
case 7:
case 6:
case 5:
{
SaveFlag flags = (SaveFlag)reader.ReadUInt();
if ( GetSaveFlag( flags, SaveFlag.DamageLevel ) )
{
m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();
if ( m_DamageLevel > WeaponDamageLevel.Vanq )
m_DamageLevel = WeaponDamageLevel.Ruin;
}
if ( GetSaveFlag( flags, SaveFlag.AccuracyLevel ) )
{
m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();
if ( m_AccuracyLevel > WeaponAccuracyLevel.Supremely )
m_AccuracyLevel = WeaponAccuracyLevel.Accurate;
}
if ( GetSaveFlag( flags, SaveFlag.DurabilityLevel ) )
{
m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();
if ( m_DurabilityLevel > WeaponDurabilityLevel.Indestructible )
m_DurabilityLevel = WeaponDurabilityLevel.Durable;
}
if ( GetSaveFlag( flags, SaveFlag.Quality ) )
m_Quality = (WeaponQuality)reader.ReadInt();
else
m_Quality = WeaponQuality.Regular;
if ( GetSaveFlag( flags, SaveFlag.Hits ) )
m_Hits = reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.MaxHits ) )
m_MaxHits = reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.Slayer ) )
m_Slayer = (SlayerName)reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.Poison ) )
m_Poison = Poison.Deserialize( reader );
if ( GetSaveFlag( flags, SaveFlag.PoisonCharges ) )
m_PoisonCharges = reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
m_Crafter = reader.ReadMobile();
if ( GetSaveFlag( flags, SaveFlag.Identified ) )
m_Identified = ( version >= 6 || reader.ReadBool() );
if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
m_StrReq = reader.ReadInt();
else
m_StrReq = -1;
if ( GetSaveFlag( flags, SaveFlag.DexReq ) )
m_DexReq = reader.ReadInt();
else
m_DexReq = -1;
if ( GetSaveFlag( flags, SaveFlag.IntReq ) )
m_IntReq = reader.ReadInt();
else
m_IntReq = -1;
if ( GetSaveFlag( flags, SaveFlag.MinDamage ) )
m_MinDamage = reader.ReadInt();
else
m_MinDamage = -1;
if ( GetSaveFlag( flags, SaveFlag.MaxDamage ) )
m_MaxDamage = reader.ReadInt();
else
m_MaxDamage = -1;
if ( GetSaveFlag( flags, SaveFlag.HitSound ) )
m_HitSound = reader.ReadInt();
else
m_HitSound = -1;
if ( GetSaveFlag( flags, SaveFlag.MissSound ) )
m_MissSound = reader.ReadInt();
else
m_MissSound = -1;
//.........这里部分代码省略.........
示例12: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
version = reader.ReadInt();
if (version > 8)
m_RelockOnClose = reader.ReadBool();
if (version > 7)
m_Picker = reader.ReadMobile();
if( version > 6 )
m_ClosesAutomatically = reader.ReadBool();
m_TrapLevel = reader.ReadInt();
m_TrapPower = reader.ReadInt();
m_TrapType = (TrapType)reader.ReadInt();
m_TrapOnLockpick = reader.ReadBool();
m_RequiredSkill = reader.ReadInt();
m_MaxLockLevel = reader.ReadInt();
m_LockLevel = reader.ReadInt();
m_KeyValue = reader.ReadUInt();
m_Open = reader.ReadBool();
m_Locked = reader.ReadBool();
m_OpenedID = reader.ReadInt();
m_ClosedID = reader.ReadInt();
m_OpenedSound = reader.ReadInt();
m_ClosedSound = reader.ReadInt();
m_Offset = reader.ReadPoint3D();
m_Link = reader.ReadItem() as BaseDoor;
m_Timer = new InternalTimer( this );
if ( m_Open && m_ClosesAutomatically )
m_Timer.Start();
if( this.LockLevel < 100 )
this.LockLevel = 100;
if( this.RequiredSkill < 100 )
this.RequiredSkill = 100;
}
示例13: Deserialize
public override void Deserialize(GenericReader reader) {
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version) {
case 1:
if (reader.ReadBool()) {
data = new uint[LotteryConstants.Picks];
for (uint i = 0; i < LotteryConstants.Picks; i++)
data[i] = reader.ReadUInt();
drawing = reader.ReadUInt();
}
break;
}
}
示例14: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
// version 0
this.m_Names = reader.ReadUInt();
this.m_Values = new int[reader.ReadEncodedInt()];
for (int i = 0; i < this.m_Values.Length; ++i)
this.m_Values[i] = reader.ReadEncodedInt();
}
示例15: Deserialize
public override void Deserialize( GenericReader reader ) {
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version ) {
case 2: {
_lockLevel = reader.ReadInt();
_maxLockLevel = reader.ReadInt();
_requiredSkill = reader.ReadInt();
_hasLock = reader.ReadBool();
goto case 1;
}
case 1: {
_timed = reader.ReadBool();
_timeToClose = reader.ReadTimeSpan();
goto case 0;
}
case 0: {
m_KeyValue = reader.ReadUInt();
m_Open = reader.ReadBool();
m_Locked = reader.ReadBool();
m_OpenedID = reader.ReadInt();
m_ClosedID = reader.ReadInt();
m_OpenedSound = reader.ReadInt();
m_ClosedSound = reader.ReadInt();
m_Offset = reader.ReadPoint3D();
m_Link = reader.ReadItem() as BaseDoor;
break;
}
}
}