当前位置: 首页>>代码示例>>C#>>正文


C# PlayerFlag类代码示例

本文整理汇总了C#中PlayerFlag的典型用法代码示例。如果您正苦于以下问题:C# PlayerFlag类的具体用法?C# PlayerFlag怎么用?C# PlayerFlag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PlayerFlag类属于命名空间,在下文中一共展示了PlayerFlag类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Deserialize


//.........这里部分代码省略.........
						m_NpcGuildGameTime = reader.ReadTimeSpan();
						goto case 7;
					}
				case 7:
					{
						m_PermaFlags = reader.ReadStrongMobileList();
						goto case 6;
					}
				case 6:
					{
						NextTailorBulkOrder = reader.ReadTimeSpan();
						goto case 5;
					}
				case 5:
					{
						NextSmithBulkOrder = reader.ReadTimeSpan();
						goto case 4;
					}
				case 4:
					{
						m_LastJusticeLoss = reader.ReadDeltaTime();
						m_JusticeProtectors = reader.ReadStrongMobileList();
						goto case 3;
					}
				case 3:
					{
						m_LastSacrificeGain = reader.ReadDeltaTime();
						m_LastSacrificeLoss = reader.ReadDeltaTime();
						m_AvailableResurrects = reader.ReadInt();
						goto case 2;
					}
				case 2:
					{
						m_Flags = (PlayerFlag)reader.ReadInt();
						goto case 1;
					}
				case 1:
					{
						m_LongTermElapse = reader.ReadTimeSpan();
						m_ShortTermElapse = reader.ReadTimeSpan();
						m_GameTime = reader.ReadTimeSpan();
						goto case 0;
					}
				case 0:
					{
						if (version < 26)
						{
							m_AutoStabled = new List<Mobile>();
						}
						break;
					}
			}

			if (version < 29)
			{
				m_SSNextSeed = m_SSSeedExpire = DateTime.UtcNow;
				m_SSSeedLocation = Point3D.Zero;
			}

			if (m_RecentlyReported == null)
			{
				m_RecentlyReported = new List<Mobile>();
			}

			#region QueensLoyaltySystem
			if (version < 29)
开发者ID:zerodowned,项目名称:justuo-with-ec-support,代码行数:67,代码来源:PlayerMobile.cs

示例2: Deserialize


//.........这里部分代码省略.........
                        m_NpcGuildGameTime = reader.ReadTimeSpan();
                        goto case 7;
                    }
                case 7:
                    {
                        m_PermaFlags = reader.ReadStrongMobileList();
                        goto case 6;
                    }
                case 6:
                    {
                        NextTailorBulkOrder = reader.ReadTimeSpan();
                        goto case 5;
                    }
                case 5:
                    {
                        NextSmithBulkOrder = reader.ReadTimeSpan();
                        goto case 4;
                    }
                case 4:
                    {
                        m_LastJusticeLoss = reader.ReadDeltaTime();
                        m_JusticeProtectors = reader.ReadStrongMobileList();
                        goto case 3;
                    }
                case 3:
                    {
                        m_LastSacrificeGain = reader.ReadDeltaTime();
                        m_LastSacrificeLoss = reader.ReadDeltaTime();
                        m_AvailableResurrects = reader.ReadInt();
                        goto case 2;
                    }
                case 2:
                    {
                        m_Flags = (PlayerFlag)reader.ReadInt();
                        goto case 1;
                    }
                case 1:
                    {
                        m_LongTermElapse = reader.ReadTimeSpan();
                        m_ShortTermElapse = reader.ReadTimeSpan();
                        m_GameTime = reader.ReadTimeSpan();
                        goto case 0;
                    }
                case 0:
                    {
                        break;
                    }
            }

            #region GeNova: Mondain's Legacy
            if (m_Quests == null)
                m_Quests = new List<BaseQuest>();

            if (m_Chains == null)
                m_Chains = new Dictionary<QuestChain, BaseChain>();

            if (m_DoneQuests == null)
                m_DoneQuests = new List<QuestRestartInfo>();

            if (m_Collections == null)
                m_Collections = new Dictionary<Collection, int>();

            if (m_CollectionTitles == null)
                m_CollectionTitles = new List<object>();
            #endregion
开发者ID:brodock,项目名称:genova-project,代码行数:66,代码来源:PlayerMobile.cs

示例3: Deserialize

        /// <summary>
        /// Overridden to include class deserialization
        /// </summary>
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            // Vii added case 6
            if (version == 6)
                m_culture = reader.ReadString();
            else
                m_culture = "en";

            // case 5
            EssenceOfCharacter = reader.ReadInt();

            m_Flags = (PlayerFlag)reader.ReadInt();

            RepGood = reader.ReadInt();
            RepBad = reader.ReadInt();

            m_RespawnLoc = reader.ReadPoint3D();
            m_RespawnMap = reader.ReadMap();

            if( version >= 1 )
            {
                EoCLedger = new EoCLedger(reader);
            }

            if (version >= 2)
            {
                speakingLanguage = (PlayerLanguage)reader.ReadInt();

                int count = reader.ReadInt();

                LevelofUnderstanding = new int[count];

                for (int i = 0; i < count; i++)
                {
                    LevelofUnderstanding[i] = reader.ReadInt();
                }
            }

            if (version >= 3)
            {
                KOs = reader.ReadInt();
                playerRace = (Race)reader.ReadInt();
            }

            if (version >= 4)
            {
                raceBody = reader.ReadInt();
            }

            if (version >= 5)
            {
                strMod = reader.ReadInt();
                dexMod = reader.ReadInt();
                intMod = reader.ReadInt();

                bodyDamageBonus = reader.ReadInt();
            }
        }
开发者ID:ITLongwell,项目名称:Ulmeta,代码行数:65,代码来源:Player.cs

示例4: Deserialize


//.........这里部分代码省略.........

                    goto case 8;
                }
                case 8:
                {
                    m_NpcGuild = (NpcGuild)reader.ReadInt();
                    m_NpcGuildJoinTime = reader.ReadDateTime();
                    m_NpcGuildGameTime = reader.ReadTimeSpan();
                    goto case 7;
                }
                case 7:
                {
                    /*m_PermaFlags =*/ reader.ReadMobileList();
                    goto case 6;
                }
                case 6:
                {
                    NextTailorBulkOrder = reader.ReadTimeSpan();
                    goto case 5;
                }
                case 5:
                {
                    NextSmithBulkOrder = reader.ReadTimeSpan();
                    goto case 4;
                }
                case 4:
                {
                    m_LastJusticeLoss = reader.ReadDeltaTime();
                    m_JusticeProtectors = reader.ReadMobileList();
                    goto case 3;
                }
                case 3:
                {
                    m_LastSacrificeGain = reader.ReadDeltaTime();
                    m_LastSacrificeLoss = reader.ReadDeltaTime();
                    m_AvailableResurrects = reader.ReadInt();
                    goto case 2;
                }
                case 2:
                {
                    m_Flags = (PlayerFlag)reader.ReadInt();
                    goto case 1;
                }
                case 1:
                {
                    m_LongTermElapse = reader.ReadTimeSpan();
                    m_ShortTermElapse = reader.ReadTimeSpan();
                    m_GameTime = reader.ReadTimeSpan();
                    goto case 0;
                }
                case 0:
                {
                    break;
                }
            }

            if ( m_PermaFlags == null )
                m_PermaFlags = new ArrayList();

            if ( m_JusticeProtectors == null )
                m_JusticeProtectors = new ArrayList();

            List<Mobile> list = this.Stabled;

            for ( int i = 0; i < list.Count; ++i )
            {
                BaseCreature bc = list[i] as BaseCreature;

                if ( bc != null )
                    bc.IsStabled = true;
            }

            if ( m_NextBountyDecay == DateTime.MinValue )
            {
                if ( m_LastLogin != DateTime.MinValue )
                    m_NextBountyDecay = m_LastLogin + TimeSpan.FromDays( 1.0 );
            }

            while ( m_Bounty > 0 && m_NextBountyDecay < DateTime.Now )
            {
                m_Bounty -= 100;
                m_NextBountyDecay += TimeSpan.FromDays( 1.0 );
            }

            if ( m_Bounty <= 0 )
            {
                m_Bounty = 0;
                Kills = 0;
            }

            if ( m_Bounty > 0 && m_Bounty > BountyBoard.LowestBounty )
                BountyBoard.Update( this );

            if ( m_SkillUsageOrder == null )
            {
                m_SkillUsageOrder = new byte[PlayerMobile.SkillCount];
                for(int i=0;i<PlayerMobile.SkillCount;i++)
                    m_SkillUsageOrder[i] = (byte)i;
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:101,代码来源:PlayerMobile.cs

示例5: GetFlag

		public bool GetFlag(PlayerFlag flag)
		{
			return Flags.HasFlag(flag);
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:4,代码来源:PlayerMobile.cs

示例6: SetFlag

		public void SetFlag(PlayerFlag flag, bool value)
		{
			if (value)
			{
				Flags |= flag;
			}
			else
			{
				Flags &= ~flag;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:11,代码来源:PlayerMobile.cs

示例7: Deserialize


//.........这里部分代码省略.........
					NpcGuild = (NpcGuild)reader.ReadInt();
					NpcGuildJoinTime = reader.ReadDateTime();
					NpcGuildGameTime = reader.ReadTimeSpan();
					goto case 7;
				}
				case 7:
				{
					m_PermaFlags = reader.ReadStrongMobileList();
					goto case 6;
				}
				case 6:
				{
					NextTailorBulkOrder = reader.ReadTimeSpan();
					goto case 5;
				}
				case 5:
				{
					NextSmithBulkOrder = reader.ReadTimeSpan();
					goto case 4;
				}
				case 4:
				{
					m_LastJusticeLoss = reader.ReadDeltaTime();
					m_JusticeProtectors = reader.ReadStrongMobileList();
					goto case 3;
				}
				case 3:
				{
					m_LastSacrificeGain = reader.ReadDeltaTime();
					m_LastSacrificeLoss = reader.ReadDeltaTime();
					m_AvailableResurrects = reader.ReadInt();
					goto case 2;
				}
				case 2:
				{
					m_Flags = (PlayerFlag)reader.ReadInt();
					goto case 1;
				}
				case 1:
				{
					m_LongTermElapse = reader.ReadTimeSpan();
					m_ShortTermElapse = reader.ReadTimeSpan();
					m_GameTime = reader.ReadTimeSpan();
					goto case 0;
				}
				case 0:
				{
                    if (version < 43)
                        ShowTipsOnLogin = true;

                    if (version < 38)
                        m_AutoStabled = new List<Mobile>();
					break;
				}
			}

			// Professions weren't verified on 1.0 RC0
			if ( !CharacterCreation.VerifyProfession( Profession ) )
				Profession = 0;

			if ( m_PermaFlags == null )
				m_PermaFlags = new List<Mobile>();

            if ( m_Snoopers == null)
                m_Snoopers = new List<Mobile>();

			if ( m_JusticeProtectors == null )
				m_JusticeProtectors = new List<Mobile>();

			if ( m_BOBFilter == null )
				m_BOBFilter = new BOBFilter();

			if( m_GuildRank == null )
				m_GuildRank = RankDefinition.Member;	//Default to member if going from older verstion to new version (only time it should be null)

			if( LastOnline == DateTime.MinValue && Account != null )
				LastOnline = ((Account)Account).LastLogin;

			if( m_ChampionTitles == null )
				m_ChampionTitles = new ChampionTitleInfo();

            if (AccessLevel > AccessLevel.Player)
                m_IgnoreMobiles = true;

			List<Mobile> list = Stabled;

			for ( int i = 0; i < list.Count; ++i )
			{
				BaseCreature bc = list[i] as BaseCreature;

				if ( bc != null )
					bc.IsStabled = true;
			}

			CheckAtrophies( this );


			if( Hidden )	//Hiding is the only buff where it has an effect that's serialized.
				AddBuff( new BuffInfo( BuffIcon.HidingAndOrStealth, 1075655 ) );
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:101,代码来源:PlayerMobile.cs

示例8: Deserialize


//.........这里部分代码省略.........
                    m_NpcGuildGameTime = reader.ReadTimeSpan();
                    goto case 7;
                }
                case 7:
                {
                    m_PermaFlags = reader.ReadStrongMobileList();
                    goto case 6;
                }
                case 6:
                {
                    NextTailorBulkOrder = reader.ReadTimeSpan();
                    goto case 5;
                }
                case 5:
                {
                    NextSmithBulkOrder = reader.ReadTimeSpan();
                    goto case 4;
                }
                case 4:
                {
                    m_LastJusticeLoss = reader.ReadDeltaTime();
                    m_JusticeProtectors = reader.ReadStrongMobileList();
                    goto case 3;
                }
                case 3:
                {
                    m_LastSacrificeGain = reader.ReadDeltaTime();
                    m_LastSacrificeLoss = reader.ReadDeltaTime();
                    m_AvailableResurrects = reader.ReadInt();
                    goto case 2;
                }
                case 2:
                {
                    m_Flags = (PlayerFlag)reader.ReadInt();
                    goto case 1;
                }
                case 1:
                {
                    m_LongTermElapse = reader.ReadTimeSpan();
                    m_ShortTermElapse = reader.ReadTimeSpan();
                    m_GameTime = reader.ReadTimeSpan();

                    if (version < 147) m_Crimes = reader.ReadInt();
                    //CrimesList
                    if (version < 148)
                    {
                        m_CrimesList = new Dictionary<Mobiles.Nation, int>();
                        m_CrimesList.Add(Nation.Alyrian, 0);
                        m_CrimesList.Add(Nation.Azhuran, 0);
                        m_CrimesList.Add(Nation.Khemetar, 0);
                        m_CrimesList.Add(Nation.Mhordul, 0);
                        m_CrimesList.Add(Nation.Tyrean, 0);
                        m_CrimesList.Add(Nation.Vhalurian, 0);
                        m_CrimesList.Add(Nation.Imperial, 0);
                        m_CrimesList.Add(Nation.Sovereign, 0);
                        m_CrimesList.Add(Nation.Society, 0);

                        int count = reader.ReadInt();
                        for (int i = 0; i < count; i++)
                        {
                            Nation n = (Nation)reader.ReadInt();
                            int c = reader.ReadInt();
                            //m_CrimesList.Add(n, c);
                        }
                    }
                    else
开发者ID:justdanofficial,项目名称:khaeros,代码行数:67,代码来源:PlayerMobile.cs

示例9: Deserialize


//.........这里部分代码省略.........
                            m_HairModHue = reader.ReadInt();
                            m_BeardModID = reader.ReadInt();
                            m_BeardModHue = reader.ReadInt();

                            // We cannot call SetHairMods( -1, -1 ) here because the items have not yet loaded
                            Timer.DelayCall( TimeSpan.Zero, new TimerCallback( RevertHair ) );
                        }

                        SavagePaintExpiration = reader.ReadTimeSpan();

                        if ( SavagePaintExpiration > TimeSpan.Zero )
                        {
                            BodyMod = ( Female ? 184 : 183 );
                            HueMod = 0;
                        }

                        m_NpcGuild = (NpcGuild) reader.ReadInt();
                        m_NpcGuildJoinTime = reader.ReadDateTime();
                        m_NpcGuildGameTime = reader.ReadTimeSpan();

                        m_PermaFlags = reader.ReadMobileList();

                        NextTailorBulkOrder = reader.ReadTimeSpan();

                        NextSmithBulkOrder = reader.ReadTimeSpan();

                        m_LastJusticeLoss = reader.ReadDeltaTime();
                        m_JusticeProtectors = reader.ReadMobileList();

                        m_LastSacrificeGain = reader.ReadDeltaTime();
                        m_LastSacrificeLoss = reader.ReadDeltaTime();
                        m_AvailableResurrects = reader.ReadInt();

                        m_Flags = (PlayerFlag) reader.ReadInt();

                        m_LongTermElapse = reader.ReadTimeSpan();
                        m_ShortTermElapse = reader.ReadTimeSpan();
                        m_GameTime = reader.ReadTimeSpan();

                        break;
                    }
            }

            #region ML Quest System
            if ( m_Quests == null )
                m_Quests = new List<BaseQuest>();

            if ( m_Chains == null )
                m_Chains = new Dictionary<QuestChain, BaseChain>();

            if ( m_DoneQuests == null )
                m_DoneQuests = new List<QuestRestartInfo>();
            #endregion

            if ( this != null && this.Region.IsPartOf( typeof( DoomLampRoom ) ) )
            {
                Rectangle2D rect = new Rectangle2D( 342, 168, 16, 16 );

                int x = Utility.Random( rect.X, rect.Width );
                int y = Utility.Random( rect.Y, rect.Height );

                if ( x >= 345 && x <= 352 && y >= 173 && y <= 179 )
                {
                    x = 353;
                    y = 172;
                }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:67,代码来源:PlayerMobile.cs

示例10: Deserialize


//.........这里部分代码省略.........
						// BodyMod = ( Female ? 184 : 183 );
						HueMod = 0;
					}

					goto case 8;
				}
				case 8:
				{
                    if (version < 30)
                    {
                        m_NpcGuild = (NpcGuild)reader.ReadInt();
                        m_NpcGuildJoinTime = reader.ReadDateTime();
                        m_NpcGuildGameTime = reader.ReadTimeSpan();
                    }
                    else if (GetSaveFlag(saveFlags, SaveFlag.NPCGuild) == true)
                    {
                        m_NpcGuild = (NpcGuild)reader.ReadInt();
                        m_NpcGuildJoinTime = reader.ReadDateTime();
                        m_NpcGuildGameTime = reader.ReadTimeSpan();
                    }
					goto case 7;
				}
				case 7:
				{
					m_PermaFlags = reader.ReadMobileList();
					goto case 6;
				}
				case 6:
				{
					NextTailorBulkOrder = reader.ReadTimeSpan();
					goto case 5;
				}
				case 5:
				{
					NextSmithBulkOrder = reader.ReadTimeSpan();
					goto case 4;
				}
				case 4:
				{
					m_LastJusticeLoss = reader.ReadDeltaTime();
					m_JusticeProtectors = reader.ReadMobileList();
					goto case 3;
				}
				case 3:
				{
					m_LastSacrificeGain = reader.ReadDeltaTime();
					m_LastSacrificeLoss = reader.ReadDeltaTime();
					m_AvailableResurrects = reader.ReadInt();
					goto case 2;
				}
				case 2:
				{
					m_Flags = (PlayerFlag)reader.ReadInt();
					goto case 1;
				}
				case 1:
				{
					m_LongTermElapse = reader.ReadTimeSpan();
					m_ShortTermElapse = reader.ReadTimeSpan();
					m_GameTime = reader.ReadTimeSpan();
					goto case 0;
				}
				case 0:
				{
					break;
				}
			}

			if ( m_PermaFlags == null )
				m_PermaFlags = new ArrayList();

			if ( m_JusticeProtectors == null )
				m_JusticeProtectors = new ArrayList();

			if ( m_BOBFilter == null )
				m_BOBFilter = new Engines.BulkOrders.BOBFilter();

			ArrayList list = this.Stabled;

			for ( int i = 0; i < list.Count; ++i )
			{
				BaseCreature bc = list[i] as BaseCreature;

				if ( bc != null )
					bc.IsStabled = true;
			}

			//Pix: this is for safety... to make sure it's set
			m_InmateLastDeathTime = DateTime.MinValue;

			//Pix: make sure this is set to minvalue for loading
			m_IOBStartedWearing = DateTime.MinValue;

			//wea: SpiritCohesion is not persistent across saves
			m_SpiritCohesion = 0;

			//wea: For spirit cohesion, last resurrect time
			m_LastResurrectTime = DateTime.MinValue;

		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:PlayerMobile.cs

示例11: Deserialize


//.........这里部分代码省略.........

                            for (int i = 0; i < payed.Count; ++i)
                                payed[i].PayedInsurance = true;
                        }

                        goto case 10;
                    }
                case 10:
                    {
                        if (reader.ReadBool())
                        {
                            m_HairModID = reader.ReadInt();
                            m_HairModHue = reader.ReadInt();
                            m_BeardModID = reader.ReadInt();
                            m_BeardModHue = reader.ReadInt();
                        }

                        goto case 9;
                    }
                case 9:
                    {
                        SavagePaintExpiration = reader.ReadTimeSpan();

                        if (SavagePaintExpiration > TimeSpan.Zero)
                        {
                            BodyMod = (Female ? 184 : 183);
                            HueMod = 0;
                        }

                        goto case 8;
                    }
                case 8:
                    {
                        m_NpcGuild = (NpcGuild)reader.ReadInt();
                        m_NpcGuildJoinTime = reader.ReadDateTime();
                        m_NpcGuildGameTime = reader.ReadTimeSpan();
                        goto case 7;
                    }
                case 7:
                    {
                        m_PermaFlags = reader.ReadStrongMobileList();
                        goto case 6;
                    }
                case 6:
                case 5:
                case 4:
                case 3:
                case 2:
                    {
                        m_Flags = (PlayerFlag)reader.ReadInt();
                        goto case 1;
                    }
                case 1:
                    {
                        m_LongTermElapse = reader.ReadTimeSpan();
                        m_ShortTermElapse = reader.ReadTimeSpan();
                        m_GameTime = reader.ReadTimeSpan();
                        goto case 0;
                    }
                case 0:
                    {
                        break;
                    }
			}

			if (m_RecentlyReported == null)
				m_RecentlyReported = new List<Mobile>();

			// Professions weren't verified on 1.0 RC0
			if ( !CharacterCreation.VerifyProfession( m_Profession ) )
				m_Profession = 0;

			if ( m_PermaFlags == null )
				m_PermaFlags = new List<Mobile>();

			if( m_GuildRank == null )
				m_GuildRank = Guilds.RankDefinition.Member;	//Default to member if going from older version to new version (only time it should be null)

			if( m_LastOnline == DateTime.MinValue && Account != null )
				m_LastOnline = ((Account)Account).LastLogin;

			if ( AccessLevel > AccessLevel.Player )
				m_IgnoreMobiles = true;

			List<Mobile> list = this.Stabled;

			for ( int i = 0; i < list.Count; ++i )
			{
				BaseCreature bc = list[i] as BaseCreature;

				if ( bc != null )
				{
					bc.IsStabled = true;
					bc.StabledBy = this;
				}
			}

			if( Hidden )	//Hiding is the only buff where it has an effect that's serialized.
				AddBuff( new BuffInfo( BuffIcon.HidingAndOrStealth, 1075655 ) );
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:101,代码来源:PlayerMobile.cs

示例12: Deserialize


//.........这里部分代码省略.........
				{
					m_NpcGuild = (NpcGuild)reader.ReadInt();
					m_NpcGuildJoinTime = reader.ReadDateTime();
					m_NpcGuildGameTime = reader.ReadTimeSpan();
					goto case 7;
				}
				case 7:
				{
					m_PermaFlags = reader.ReadStrongMobileList();
					goto case 6;
				}
				case 6:
				{
					NextTailorBulkOrder = reader.ReadTimeSpan();
					goto case 5;
				}
				case 5:
				{
					NextSmithBulkOrder = reader.ReadTimeSpan();
					goto case 4;
				}
				case 4:
				{
					m_LastJusticeLoss = reader.ReadDeltaTime();
					m_JusticeProtectors = reader.ReadStrongMobileList();
					goto case 3;
				}
				case 3:
				{
					m_LastSacrificeGain = reader.ReadDeltaTime();
					m_LastSacrificeLoss = reader.ReadDeltaTime();
					m_AvailableResurrects = reader.ReadInt();
					goto case 2;
				}
				case 2:
				{
					m_Flags = (PlayerFlag)reader.ReadInt();
					goto case 1;
				}
				case 1:
				{
					m_LongTermElapse = reader.ReadTimeSpan();
					m_ShortTermElapse = reader.ReadTimeSpan();
					m_GameTime = reader.ReadTimeSpan();
					goto case 0;
				}
				case 0:
				{
					if( version < 26 )
						m_AutoStabled = new List<Mobile>();
					break;
				}
			}

			if (m_RecentlyReported == null)
				m_RecentlyReported = new List<Mobile>();

			// Professions weren't verified on 1.0 RC0
			if ( !CharacterCreation.VerifyProfession( m_Profession ) )
				m_Profession = 0;

			if ( m_PermaFlags == null )
				m_PermaFlags = new List<Mobile>();

			if ( m_JusticeProtectors == null )
				m_JusticeProtectors = new List<Mobile>();

			if ( m_BOBFilter == null )
				m_BOBFilter = new Engines.BulkOrders.BOBFilter();

			if( m_GuildRank == null )
				m_GuildRank = Guilds.RankDefinition.Member;	//Default to member if going from older verstion to new version (only time it should be null)

			if( m_LastOnline == DateTime.MinValue && Account != null )
				m_LastOnline = ((Account)Account).LastLogin;

			if( m_ChampionTitles == null )
				m_ChampionTitles = new ChampionTitleInfo();

			if ( AccessLevel > AccessLevel.Player )
				m_IgnoreMobiles = true;

			List<Mobile> list = this.Stabled;

			for ( int i = 0; i < list.Count; ++i )
			{
				BaseCreature bc = list[i] as BaseCreature;

                if (bc != null)
                {
                    bc.IsStabled = true;
                    bc.StabledBy = this;
                }
			}

			CheckAtrophies( this );

			if( Hidden )	//Hiding is the only buff where it has an effect that's serialized.
				AddBuff( new BuffInfo( BuffIcon.HidingAndOrStealth, 1075655 ) );
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:101,代码来源:PlayerMobile.cs

示例13: Deserialize


//.........这里部分代码省略.........
                    {
                        m_HairModID = reader.ReadInt();
                        m_HairModHue = reader.ReadInt();
                        m_BeardModID = reader.ReadInt();
                        m_BeardModHue = reader.ReadInt();

                        // We cannot call SetHairMods( -1, -1 ) here because the items have not yet loaded
                        Timer.DelayCall( TimeSpan.Zero, new TimerCallback( RevertHair ) );
                    }

                    goto case 9;
                }
                case 9:
                {
                    SavagePaintExpiration = reader.ReadTimeSpan();

                    if ( SavagePaintExpiration > TimeSpan.Zero )
                    {
                        BodyMod = ( Female ? 184 : 183 );
                        HueMod = 0;
                    }

                    goto case 8;
                }
                case 8:
                {
                    m_NpcGuild = (NpcGuild)reader.ReadInt();
                    m_NpcGuildJoinTime = reader.ReadDateTime();
                    m_NpcGuildGameTime = reader.ReadTimeSpan();
                    goto case 7;
                }
                case 7:
                {
                    m_PermaFlags = reader.ReadMobileList();
                    goto case 6;
                }
                case 6:
                {
                    NextTailorBulkOrder = reader.ReadTimeSpan();
                    goto case 5;
                }
                case 5:
                {
                    NextSmithBulkOrder = reader.ReadTimeSpan();
                    goto case 4;
                }
                case 4:
                {
                    m_LastJusticeLoss = reader.ReadDeltaTime();
                    m_JusticeProtectors = reader.ReadMobileList();
                    goto case 3;
                }
                case 3:
                {
                    m_LastSacrificeGain = reader.ReadDeltaTime();
                    m_LastSacrificeLoss = reader.ReadDeltaTime();
                    m_AvailableResurrects = reader.ReadInt();
                    goto case 2;
                }
                case 2:
                {
                    m_Flags = (PlayerFlag)reader.ReadInt();
                    goto case 1;
                }
                case 1:
                {
                    m_LongTermElapse = reader.ReadTimeSpan();
                    m_ShortTermElapse = reader.ReadTimeSpan();
                    m_GameTime = reader.ReadTimeSpan();
                    goto case 0;
                }
                case 0:
                {
                    break;
                }
            }

            // Professions weren't verified on 1.0 RC0
            if ( !CharacterCreation.VerifyProfession( m_Profession ) )
                m_Profession = 0;

            if ( m_PermaFlags == null )
                m_PermaFlags = new ArrayList();

            if ( m_JusticeProtectors == null )
                m_JusticeProtectors = new ArrayList();

            if ( m_BOBFilter == null )
                m_BOBFilter = new Engines.BulkOrders.BOBFilter();

            ArrayList list = this.Stabled;

            for ( int i = 0; i < list.Count; ++i )
            {
                BaseCreature bc = list[i] as BaseCreature;

                if ( bc != null )
                    bc.IsStabled = true;
            }
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:101,代码来源:PlayerMobile.cs

示例14: GetFlag

 public bool GetFlag(PlayerFlag flag)
 {
     return ((m_Flags & flag) != 0);
 }
开发者ID:brodock,项目名称:genova-project,代码行数:4,代码来源:PlayerMobile.cs

示例15: Deserialize


//.........这里部分代码省略.........
                    goto case 8;
                }
                case 8:
                {
                    m_NpcGuild = (NpcGuild)reader.ReadInt();
                    m_NpcGuildJoinTime = reader.ReadDateTime();
                    m_NpcGuildGameTime = reader.ReadTimeSpan();
                    goto case 7;
                }
                case 7:
                {
                    m_PermaFlags = reader.ReadStrongMobileList();
                    goto case 6;
                }
                case 6:
                {
                    NextTailorBulkOrder = reader.ReadTimeSpan();
                    goto case 5;
                }
                case 5:
                {
                    NextSmithBulkOrder = reader.ReadTimeSpan();
                    goto case 4;
                }
                case 4:
                {
                    m_LastJusticeLoss = reader.ReadDeltaTime();
                    m_JusticeProtectors = reader.ReadStrongMobileList();
                    goto case 3;
                }
                case 3:
                {
                    m_LastSacrificeGain = reader.ReadDeltaTime();
                    m_LastSacrificeLoss = reader.ReadDeltaTime();
                    m_AvailableResurrects = reader.ReadInt();
                    goto case 2;
                }
                case 2:
                {
                    m_Flags = (PlayerFlag)reader.ReadInt();
                    goto case 1;
                }
                case 1:
                {
                    m_LongTermElapse = reader.ReadTimeSpan();
                    m_ShortTermElapse = reader.ReadTimeSpan();
                    m_GameTime = reader.ReadTimeSpan();
                    goto case 0;
                }
                case 0:
                {
                    if( version < 26 )
                        m_AutoStabled = new List<Mobile>();
                    break;
                }
            }

            if (m_RecentlyReported == null)
                m_RecentlyReported = new List<Mobile>();

            // Professions weren't verified on 1.0 RC0
            if ( !CharacterCreation.VerifyProfession( m_Profession ) )
                m_Profession = 0;

            if ( m_PermaFlags == null )
                m_PermaFlags = new List<Mobile>();

            if ( m_JusticeProtectors == null )
                m_JusticeProtectors = new List<Mobile>();

            if ( m_BOBFilter == null )
                m_BOBFilter = new Engines.BulkOrders.BOBFilter();

            if( m_GuildRank == null )
                m_GuildRank = Guilds.RankDefinition.Member;	//Default to member if going from older verstion to new version (only time it should be null)

            if( m_LastOnline == DateTime.MinValue && Account != null )
                m_LastOnline = ((Account)Account).LastLogin;

            if( m_ChampionTitles == null )
                m_ChampionTitles = new ChampionTitleInfo();

            if ( AccessLevel > AccessLevel.Player )
                m_IgnoreMobiles = true;

            List<Mobile> list = this.Stabled;

            for ( int i = 0; i < list.Count; ++i )
            {
                BaseCreature bc = list[i] as BaseCreature;

                if ( bc != null )
                    bc.IsStabled = true;
            }

            CheckAtrophies( this );

            if( Hidden )	//Hiding is the only buff where it has an effect that's serialized.
                AddBuff( new BuffInfo( BuffIcon.HidingAndOrStealth, 1075655 ) );
        }
开发者ID:Telm,项目名称:RunUO_EME,代码行数:101,代码来源:PlayerMobile.cs


注:本文中的PlayerFlag类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。