本文整理汇总了C#中ChampionSpawnType类的典型用法代码示例。如果您正苦于以下问题:C# ChampionSpawnType类的具体用法?C# ChampionSpawnType怎么用?C# ChampionSpawnType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChampionSpawnType类属于命名空间,在下文中一共展示了ChampionSpawnType类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetValue
public void SetValue(ChampionSpawnType type, int value)
{
SetValue((int)type, value);
}
示例2: Award
public void Award(ChampionSpawnType type, int value)
{
Award((int)type, value);
}
示例3: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
m_DamageEntries = new Dictionary<Mobile, int>();
int version = reader.ReadInt();
switch (version)
{
case 5:
{
int entries = reader.ReadInt();
Mobile m;
int damage;
for (int i = 0; i < entries; ++i)
{
m = reader.ReadMobile();
damage = reader.ReadInt();
if (m == null)
continue;
m_DamageEntries.Add(m, damage);
}
goto case 4;
}
case 4:
{
m_ConfinedRoaming = reader.ReadBool();
m_Idol = reader.ReadItem<IdolOfTheChampion>();
m_HasBeenAdvanced = reader.ReadBool();
goto case 3;
}
case 3:
{
m_SpawnArea = reader.ReadRect2D();
goto case 2;
}
case 2:
{
m_RandomizeType = reader.ReadBool();
goto case 1;
}
case 1:
{
if (version < 3)
{
int oldRange = reader.ReadInt();
m_SpawnArea = new Rectangle2D(new Point2D(X - oldRange, Y - oldRange), new Point2D(X + oldRange, Y + oldRange));
}
m_Kills = reader.ReadInt();
goto case 0;
}
case 0:
{
if (version < 1)
m_SpawnArea = new Rectangle2D(new Point2D(X - 24, Y - 24), new Point2D(X + 24, Y + 24)); //Default was 24
bool active = reader.ReadBool();
m_Type = (ChampionSpawnType)reader.ReadInt();
m_Creatures = reader.ReadStrongMobileList();
m_RedSkulls = reader.ReadStrongItemList();
m_WhiteSkulls = reader.ReadStrongItemList();
m_Platform = reader.ReadItem<ChampionPlatform>();
m_Altar = reader.ReadItem<ChampionAltar>();
m_ExpireDelay = reader.ReadTimeSpan();
m_ExpireTime = reader.ReadDeltaTime();
m_Champion = reader.ReadMobile();
m_RestartDelay = reader.ReadTimeSpan();
if (reader.ReadBool())
{
m_RestartTime = reader.ReadDeltaTime();
BeginRestart(m_RestartTime - DateTime.Now);
}
if (version < 4)
{
m_Idol = new IdolOfTheChampion(this);
m_Idol.MoveToWorld(new Point3D(X, Y, Z - 15), Map);
}
if (m_Platform == null || m_Altar == null || m_Idol == null)
Delete();
else if (active)
Start();
break;
}
}
Timer.DelayCall(TimeSpan.Zero, new TimerCallback(UpdateRegion));
//.........这里部分代码省略.........
示例4: GetValue
private int m_Harrower; //Harrower titles do NOT decay
public int GetValue(ChampionSpawnType type)
{
return GetValue((int)type);
}
示例5: GetInfo
public static ChampionSpawnInfo GetInfo(ChampionSpawnType type)
{
var v = (int)type;
return m_Table.InBounds(v) ? m_Table[v] : null;
}
示例6: GetInfo
public static ChampionSpawnInfo GetInfo( ChampionSpawnType type )
{
int v = (int)type;
if( v < 0 || v >= m_Table.Length )
v = 0;
return m_Table[v];
}
示例7: Deserialize
//.........这里部分代码省略.........
m_IsDeadPet = reader.ReadBool();
m_IsBonded = reader.ReadBool();
m_BondingBegin = reader.ReadDateTime();
m_OwnerAbandonTime = reader.ReadDateTime();
}
if ( version >= 11 )
m_HasGeneratedLoot = reader.ReadBool();
else
m_HasGeneratedLoot = true;
if ( version >= 12 )
{
m_Paragon = reader.ReadBool();
m_IsChampionMonster = reader.ReadBool();
}
else
{
m_Paragon = false;
m_IsChampionMonster = false;
}
if ( version >= 13 && reader.ReadBool() )
m_Friends = reader.ReadStrongMobileList();
else if ( version < 13 && m_ControlOrder >= OrderType.Unfriend )
++m_ControlOrder;
if ( version >= 14 )
m_SpawnLevel = reader.ReadInt();
else
m_SpawnLevel = 0;
if ( version >= 15 )
m_ChampionType = (ChampionSpawnType) reader.ReadInt();
if ( version >= 17 )
m_StolenFrom = reader.ReadBool();
if ( version >= 18 )
{
int count = reader.ReadInt();
for ( int i = 0; i < count; i++ )
{
Item rummaged = reader.ReadItem();
Mobile owner = reader.ReadMobile();
if ( rummaged != null && owner != null )
m_RummagedItems.Add( rummaged, owner );
}
}
if ( version >= 20 )
{
m_IsMinichampMonster = reader.ReadBool();
m_MinichampType = (MiniChampType) reader.ReadInt();
}
if ( version >= 21 )
{
m_NextTastyTreat = reader.ReadDateTime();
}
if ( version >= 22 )
{
m_Petrified = reader.ReadBool();
示例8: EndRestart
public void EndRestart()
{
if( RandomizeType )
{
switch( Utility.Random( 5 ) )
{
case 0: Type = ChampionSpawnType.VerminHorde; break;
case 1: Type = ChampionSpawnType.UnholyTerror; break;
case 2: Type = ChampionSpawnType.ColdBlood; break;
case 3: Type = ChampionSpawnType.Abyss; break;
case 4: Type = ChampionSpawnType.Arachnid; break;
}
}
m_HasBeenAdvanced = false;
Start();
}
示例9: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 2:
{
m_RandomizeType = reader.ReadBool();
goto case 1;
}
case 1:
{
m_SpawnRange = reader.ReadInt();
m_Kills = reader.ReadInt();
goto case 0;
}
case 0:
{
if ( version < 1 )
m_SpawnRange = 24;
bool active = reader.ReadBool();
m_Type = (ChampionSpawnType)reader.ReadInt();
m_Creatures = reader.ReadMobileList();
m_RedSkulls = reader.ReadItemList();
m_WhiteSkulls = reader.ReadItemList();
m_Platform = reader.ReadItem() as ChampionPlatform;
m_Altar = reader.ReadItem() as ChampionAltar;
m_ExpireDelay = reader.ReadTimeSpan();
m_ExpireTime = reader.ReadDeltaTime();
m_Champion = reader.ReadMobile();
m_RestartDelay = reader.ReadTimeSpan();
if ( reader.ReadBool() )
{
m_RestartTime = reader.ReadDeltaTime();
BeginRestart( m_RestartTime - Core.Now );
}
if ( m_Platform == null || m_Altar == null )
Delete();
else if ( active )
Start();
break;
}
}
}
示例10: ChampionEntry
public ChampionEntry( Type champtype, ChampionSpawnType type, Point3D signloc, Map map, bool randomizetype )
{
m_ChampType = champtype;
m_RandomizeType = randomizetype;
m_Type = type;
m_SignLocation = signloc;
m_Map = map;
}