本文整理汇总了C#中Server.GenericReader.ReadRect2D方法的典型用法代码示例。如果您正苦于以下问题:C# GenericReader.ReadRect2D方法的具体用法?C# GenericReader.ReadRect2D怎么用?C# GenericReader.ReadRect2D使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.GenericReader
的用法示例。
在下文中一共展示了GenericReader.ReadRect2D方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PeerlessInstance
public PeerlessInstance( GenericReader reader )
{
m_Owner = reader.ReadItem<PeerlessPlatform>();
m_Light = reader.ReadItem();
m_Map = reader.ReadMap();
m_EntranceLocation = reader.ReadPoint3D();
m_BossSpawnLocation = reader.ReadPoint3D();
m_RegionBounds = reader.ReadRect2D();
Mobile boss = reader.ReadMobile();
if ( boss != null )
boss.Delete();
Initialize();
}
示例2: Deserialize
//.........这里部分代码省略.........
goto case 0;
}
case 0:
{
if (version < 16)
{
LockBoxCeling = (uint)m_MaxLockBoxes * 2; // high limit
LockBoxFloor = (uint)m_MaxLockBoxes; // low limit
}
if (version < 12)
{
Refresh();
m_NeverDecay = false;
}
if (version < 4)
m_Addons = new ArrayList();
if (version < 7)
m_Access = new ArrayList();
if (version < 8)
m_Price = DefaultPrice;
m_Owner = reader.ReadMobile();
if (version < 5)
{
count = reader.ReadInt();
for (int i = 0; i < count; i++)
reader.ReadRect2D();
}
UpdateRegionArea();
Region.AddRegion(m_Region);
m_CoOwners = reader.ReadMobileList();
m_Friends = reader.ReadMobileList();
m_Bans = reader.ReadMobileList();
m_Sign = reader.ReadItem() as HouseSign;
m_Trash = reader.ReadItem() as TrashBarrel;
m_Doors = reader.ReadItemList();
m_LockDowns = reader.ReadItemList();
for (int i = 0; i < m_LockDowns.Count; ++i)
{
Item item = m_LockDowns[i] as Item;
if (item != null)
{
item.IsLockedDown = true;
item.CancelFreezeTimer(); // don't initiate for Deserialize
}
}
if (version < 3)
{
ArrayList items = reader.ReadItemList();
m_Secures = new ArrayList(items.Count);
for (int i = 0; i < items.Count; ++i)
示例3: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
m_RegionBounds = reader.ReadRect2D();
m_Traps = reader.ReadStrongItemList<BaseTrap>();
goto case 0;
}
case 0:
{
if ( version < 1 )
{
m_Traps = new List<BaseTrap>();
m_RegionBounds = new Rectangle2D( X - 40, Y - 40, 80, 80 );
}
m_Creatures = reader.ReadStrongMobileList();
m_TypeName = reader.ReadString();
m_Door = reader.ReadItem<BaseDoor>(); ;
m_Addon = reader.ReadItem<BaseAddon>(); ;
m_Sequence = reader.ReadItem<GauntletSpawner>();
State = (GauntletSpawnerState)reader.ReadInt();
break;
}
}
}
示例4: Deserialize
//.........这里部分代码省略.........
case 1:
{
if ( version < 13 )
reader.ReadPoint3D(); // house ban location
goto case 0;
}
case 0:
{
if ( version < 14 )
m_RelativeBanLocation = this.BaseBanLocation;
if ( version < 12 )
{
m_VendorRentalContracts = new ArrayList();
m_InternalizedVendors = new ArrayList();
}
if ( version < 4 )
m_Addons = new ArrayList();
if ( version < 7 )
m_Access = new ArrayList();
if ( version < 8 )
m_Price = DefaultPrice;
m_Owner = reader.ReadMobile();
if ( version < 5 )
{
count = reader.ReadInt();
for(int i=0;i<count;i++)
reader.ReadRect2D();
}
UpdateRegion();
m_CoOwners = reader.ReadMobileList();
m_Friends = reader.ReadMobileList();
m_Bans = reader.ReadMobileList();
m_Sign = reader.ReadItem() as HouseSign;
m_Trash = reader.ReadItem() as TrashBarrel;
m_Doors = reader.ReadItemList();
m_LockDowns = reader.ReadItemList();
for ( int i = 0; i < m_LockDowns.Count; ++i )
((Item)m_LockDowns[i]).IsLockedDown = true;
for ( int i = 0; i < m_VendorRentalContracts.Count; ++i )
((Item)m_VendorRentalContracts[i]).IsLockedDown = true;
if ( version < 3 )
{
ArrayList items = reader.ReadItemList();
m_Secures = new ArrayList( items.Count );
for ( int i = 0; i < items.Count; ++i )
{
Container c = items[i] as Container;
if ( c != null )
{
c.IsSecure = true;
示例5: Deserialize
//.........这里部分代码省略.........
c_Free = reader.ReadBool();
}
if (version >= 11)
{
c_Murderers = (Intu) reader.ReadInt();
}
if (version >= 10)
{
c_LeaveItems = reader.ReadBool();
}
if (version >= 9)
{
c_RentToOwn = reader.ReadBool();
c_OriginalRentTime = reader.ReadTimeSpan();
c_RTOPayments = reader.ReadInt();
}
c_PreviewItems = new List<Item>();
if (version >= 7)
{
int previewcount = reader.ReadInt();
for (int i = 0; i < previewcount; ++i)
{
Item item = reader.ReadItem();
c_PreviewItems.Add(item);
}
}
if (version >= 6)
{
c_ItemsPrice = reader.ReadInt();
c_KeepItems = reader.ReadBool();
}
c_DecoreItemInfos = new List<DecoreItemInfo>();
if (version >= 5)
{
int decorecount = reader.ReadInt();
DecoreItemInfo info;
for (int i = 0; i < decorecount; ++i)
{
info = new DecoreItemInfo();
info.Load(reader);
c_DecoreItemInfos.Add(info);
}
c_Relock = reader.ReadBool();
}
if (version >= 4)
{
c_RecurRent = reader.ReadBool();
c_RentByTime = reader.ReadTimeSpan();
c_RentTime = reader.ReadDateTime();
c_DemolishTime = reader.ReadDateTime();
c_YoungOnly = reader.ReadBool();
c_MinTotalSkill = reader.ReadInt();
c_MaxTotalSkill = reader.ReadInt();
}
if (version >= 3)
{
c_MinZ = reader.ReadInt();
c_MaxZ = reader.ReadInt();
}
if (version >= 2)
{
c_House = (TownHouse) reader.ReadItem();
}
c_Price = reader.ReadInt();
c_Locks = reader.ReadInt();
c_Secures = reader.ReadInt();
c_BanLoc = reader.ReadPoint3D();
c_SignLoc = reader.ReadPoint3D();
c_Skill = reader.ReadString();
c_SkillReq = reader.ReadDouble();
c_Blocks = new List<Rectangle2D>();
int count = reader.ReadInt();
for (int i = 0; i < count; ++i)
{
c_Blocks.Add(reader.ReadRect2D());
}
if (c_RentTime > DateTime.Now)
{
BeginRentTimer(c_RentTime - DateTime.Now);
}
Timer.DelayCall(TimeSpan.Zero, StartTimers);
ClearPreview();
s_TownHouseSigns.Add(this);
}
示例6: ReadRect2DArray
public static List<Rectangle2D> ReadRect2DArray( GenericReader reader ) {
int size = reader.ReadInt();
List<Rectangle2D> newAry = new List<Rectangle2D>();
for( int i = 0; i < size; i++ ) {
newAry.Add( reader.ReadRect2D() );
}
return newAry;
}
示例7: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 6:
{
m_MobilesSeekHome = reader.ReadBool();
m_UsesSpawnerHome = reader.ReadBool();
goto case 5;
}
case 5:
{
m_SpawnArea = reader.ReadRect2D();
m_UsesSpawnerHome = reader.ReadBool();
goto case 4;
}
case 4:
{
m_WalkingRange = reader.ReadInt();
goto case 3;
}
case 3:
case 2:
{
m_WayPoint = reader.ReadItem() as WayPoint;
goto case 1;
}
case 1:
{
m_Group = reader.ReadBool();
goto case 0;
}
case 0:
{
m_MinDelay = reader.ReadTimeSpan();
m_MaxDelay = reader.ReadTimeSpan();
m_Count = reader.ReadInt();
m_Team = reader.ReadInt();
m_HomeRange = reader.ReadInt();
m_Running = reader.ReadBool();
TimeSpan ts = TimeSpan.Zero;
if ( m_Running )
ts = reader.ReadDeltaTime() - DateTime.Now;
int size = reader.ReadInt();
m_SpawnNames = new List<string>( size );
for ( int i = 0; i < size; ++i )
{
string creatureString = reader.ReadString();
m_SpawnNames.Add( creatureString );
string typeName = ParseType( creatureString );
if ( ScriptCompiler.FindTypeByName( typeName ) == null )
{
if ( m_WarnTimer == null )
m_WarnTimer = new WarnTimer();
m_WarnTimer.Add( Location, Map, typeName );
}
}
int count = reader.ReadInt();
m_Spawned = new List<ISpawnable>(count);
for ( int i = 0; i < count; ++i )
{
ISpawnable e = World.FindEntity(reader.ReadInt()) as ISpawnable;
if (e != null)
{
e.Spawner = this;
m_Spawned.Add(e);
}
}
if ( m_Running )
DoTimer( ts );
break;
}
}
if ( version < 3 && Weight == 0 )
Weight = -1;
//.........这里部分代码省略.........
示例8: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
m_Facet = reader.ReadMap();
goto case 0;
}
case 0:
{
m_Bounds = reader.ReadRect2D();
m_Width = reader.ReadInt();
m_Height = reader.ReadInt();
m_Protected = reader.ReadBool();
int count = reader.ReadInt();
for ( int i = 0; i < count; i++ )
m_Pins.Add( reader.ReadPoint2D() );
break;
}
}
}
示例9: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_ChallengeArea = new Rectangle3D[0];
switch ( version )
{
case 2:
case 1:
{
m_Disable = reader.ReadBool();
goto case 0;
}
case 0:
{
m_Music = (MusicName)reader.ReadInt();
m_Priority = reader.ReadInt();
if (version < 2)
{
// old region area
reader.ReadRect2D();
}
m_ChallengeRegionName = reader.ReadString();
string mapname = reader.ReadString();
try{
m_ChallengeMap = Map.Parse(mapname);
} catch {}
m_CopiedRegion = reader.ReadString();
// do the coord list
int count = reader.ReadInt();
if (count > 0)
{
// the old version used 2D rectangles for the region area. The new version uses 3D
if (version < 2)
{
Rectangle2D[] area = new Rectangle2D[count];
for (int i = 0; i < count; i++)
{
area[i] = reader.ReadRect2D();
}
m_ChallengeArea = Region.ConvertTo3D(area);
}
else
{
m_ChallengeArea = new Rectangle3D[count];
for (int i = 0; i < count; i++)
{
m_ChallengeArea[i] = new Rectangle3D(reader.ReadPoint3D(), reader.ReadPoint3D());
}
}
}
break;
}
}
// refresh the region
Timer.DelayCall(TimeSpan.Zero, new TimerCallback(RefreshRegions));
}
示例10: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
if( version >= 15 )
m_Flip = reader.ReadBool();
if( version >= 14 )
{
m_Nation = (Nation)reader.ReadInt();
m_Treasury = (Container)reader.ReadItem();
}
if (version >= 13)
{
c_ForcePrivate = reader.ReadBool();
c_ForcePublic = reader.ReadBool();
c_NoTrade = reader.ReadBool();
}
if (version >= 12)
c_Free = reader.ReadBool();
if ( version >= 11 )
c_Murderers = (Intu)reader.ReadInt();
if ( version >= 10 )
c_LeaveItems = reader.ReadBool();
if ( version >= 9 )
{
c_RentToOwn = reader.ReadBool();
c_OriginalRentTime = reader.ReadTimeSpan();
c_RTOPayments = reader.ReadInt();
}
c_PreviewItems = new ArrayList();
if ( version >= 7 )
c_PreviewItems = reader.ReadItemList();
if ( version >= 6 )
{
c_ItemsPrice = reader.ReadInt();
c_KeepItems = reader.ReadBool();
}
c_DecoreItemInfos = new ArrayList();
if ( version >= 5 )
{
int decorecount = reader.ReadInt();
DecoreItemInfo info;
for( int i = 0; i < decorecount; ++i )
{
info = new DecoreItemInfo();
info.Load( reader );
c_DecoreItemInfos.Add( info );
}
c_Relock = reader.ReadBool();
}
if ( version >= 4 )
{
c_RecurRent = reader.ReadBool();
c_RentByTime = reader.ReadTimeSpan();
c_RentTime = reader.ReadDateTime();
c_DemolishTime = reader.ReadDateTime();
c_YoungOnly = reader.ReadBool();
c_MinTotalSkill = reader.ReadInt();
c_MaxTotalSkill = reader.ReadInt();
}
if ( version >= 3 )
{
c_MinZ = reader.ReadInt();
c_MaxZ = reader.ReadInt();
}
if ( version >= 2 )
c_House = (TownHouse)reader.ReadItem();
c_Price = reader.ReadInt();
c_Locks = reader.ReadInt();
c_Secures = reader.ReadInt();
c_BanLoc = reader.ReadPoint3D();
c_SignLoc = reader.ReadPoint3D();
c_Skill = reader.ReadString();
c_SkillReq = reader.ReadDouble();
c_Blocks = new ArrayList();
int count = reader.ReadInt();
for ( int i = 0; i < count; ++i )
c_Blocks.Add( reader.ReadRect2D() );
Timer.DelayCall(TimeSpan.Zero, new TimerCallback(StartTimers));
ClearPreview();
//.........这里部分代码省略.........
示例11: MaginciaHousingPlot
public MaginciaHousingPlot(GenericReader reader)
{
int version = reader.ReadInt();
m_Identifier = reader.ReadString();
m_Writ = reader.ReadItem() as WritOfLease;
m_Stone = reader.ReadItem() as MaginciaPlotStone;
m_LottoEnds = reader.ReadDateTime();
m_Bounds = reader.ReadRect2D();
m_Map = reader.ReadMap();
m_IsPrimeSpot = reader.ReadBool();
m_Complete = reader.ReadBool();
m_Winner = reader.ReadMobile();
m_Expires = reader.ReadDateTime();
int c = reader.ReadInt();
for (int i = 0; i < c; i++)
{
Mobile m = reader.ReadMobile();
int amount = reader.ReadInt();
if (m != null)
m_Participants[m] = amount;
}
if ((m_Stone == null || m_Stone.Deleted) && LottoOngoing && MaginciaLottoSystem.IsRegisteredPlot(this))
AddPlotStone();
else if (m_Stone != null)
m_Stone.Plot = this;
if (m_Writ != null)
m_Writ.Plot = this;
}
示例12: ReadRect2DArray
public static ArrayList ReadRect2DArray(GenericReader reader)
{
int size = reader.ReadInt();
ArrayList newAry = new ArrayList();
for (int i = 0; i < size; i++)
{
newAry.Add(reader.ReadRect2D());
}
return newAry;
}
示例13: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 14:
{
//version 14
m_Coords=ReadRect3DArray(reader);
m_InnBounds=ReadRect3DArray(reader);
goto case 13;
}
case 13:
{
m_TargetMap = reader.ReadMap();
m_GoLocation = reader.ReadPoint3D();
m_MinZ = reader.ReadInt();
m_MaxZ = reader.ReadInt();
goto case 12;
}
case 12:
{
m_Enabled = reader.ReadBool();
goto case 11;
}
case 11:
{
int size = reader.ReadInt();
m_Types = new ArrayList(size);
for (int i = 0; i < size; ++i)
{
string typeName = reader.ReadString();
m_Types.Add(typeName);
}
goto case 10;
}
case 10:
{
m_MaxFollowers = reader.ReadInt();
goto case 9;
}
case 9:
{
m_RestrictedMagicMsg = reader.ReadString();
goto case 8;
}
case 8:
{
m_Music = (MusicName)reader.ReadInt();
goto case 7;
}
case 7:
{
if (m_InnBounds == null)
{
m_InnBounds = ReadRect2DArray(reader);
}
else
{
m_InnBounds.AddRange(ReadRect2DArray(reader));
}
m_InnLogoutDelay = reader.ReadTimeSpan();
goto case 6;
}
case 6:
{
m_PlayerLogoutDelay = reader.ReadTimeSpan();
goto case 5;
}
case 5:
{
if (version < 13)
{ // converted to a flag
bool m_IsDungeon = (bool)reader.ReadBool();
IsDungeon = m_IsDungeon;
}
goto case 4;
}
case 4:
{
m_IOBAlignment = (IOBAlignment)reader.ReadInt();
goto case 3;
}
case 3:
{
m_LightLevel = reader.ReadInt();
goto case 2;
}
case 2:
{
goto case 1;
//.........这里部分代码省略.........
示例14: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 3:
{
m_LightLevel = reader.ReadInt();
goto case 2;
}
case 2:
{
m_Music = (MusicName)reader.ReadInt();
goto case 1;
}
case 1:
{
Coords = ReadRect2DArray( reader );
m_Priority = (CustomRegionPriority) reader.ReadInt();
m_PlayerLogoutDelay = reader.ReadTimeSpan();
m_RestrictedSpells = ReadBitArray( reader );
m_RestrictedSkills = ReadBitArray( reader );
m_Flags = (RegionFlag)reader.ReadInt();
m_RegionName = reader.ReadString();
break;
}
case 0:
{
Coords = new ArrayList();
Coords.Add( reader.ReadRect2D() );
m_RestrictedSpells = ReadBitArray( reader );
m_RestrictedSkills = ReadBitArray( reader );
m_Flags = (RegionFlag)reader.ReadInt();
m_RegionName = reader.ReadString();
break;
}
}
UpdateRegion();
}
示例15: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 3:
{
m_State = (HouseRaffleState) reader.ReadEncodedInt();
goto case 2;
}
case 2:
{
m_ExpireAction = (HouseRaffleExpireAction) reader.ReadEncodedInt();
goto case 1;
}
case 1:
{
m_Deed = reader.ReadItem<HouseRaffleDeed>();
goto case 0;
}
case 0:
{
bool oldActive = ( version < 3 ) ? reader.ReadBool() : false;
m_Bounds = reader.ReadRect2D();
m_Facet = reader.ReadMap();
m_Winner = reader.ReadMobile();
m_TicketPrice = reader.ReadInt();
m_Started = reader.ReadDateTime();
m_Duration = reader.ReadTimeSpan();
int entryCount = reader.ReadInt();
m_Entries = new List<RaffleEntry>( entryCount );
for ( int i = 0; i < entryCount; i++ )
{
RaffleEntry entry = new RaffleEntry( reader, version );
if ( entry.From == null )
continue; // Character was deleted
m_Entries.Add( entry );
}
InvalidateRegion();
m_AllStones.Add( this );
if ( version < 3 )
{
if ( oldActive )
m_State = HouseRaffleState.Active;
else if ( m_Winner != null )
m_State = HouseRaffleState.Completed;
else
m_State = HouseRaffleState.Inactive;
}
break;
}
}
}