當前位置: 首頁>>代碼示例>>C#>>正文


C# Mobile.InvalidateProperties方法代碼示例

本文整理匯總了C#中Server.Mobile.InvalidateProperties方法的典型用法代碼示例。如果您正苦於以下問題:C# Mobile.InvalidateProperties方法的具體用法?C# Mobile.InvalidateProperties怎麽用?C# Mobile.InvalidateProperties使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Mobile的用法示例。


在下文中一共展示了Mobile.InvalidateProperties方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnEnter

        public override void OnEnter(Mobile m)
        {
            if (!Controller.InUse)
                return;

            m.Delta(MobileDelta.Noto);
            m.InvalidateProperties();
        }
開發者ID:nick12344356,項目名稱:The-Basement,代碼行數:8,代碼來源:FieldRegion.cs

示例2: OnEnter

        public override void OnEnter(Mobile m)
        {
        	if (!Controller.InUse)
                return;
                
			m.SendMessage("Your mana is being regenerated faster!");
			
            if (m is PlayerMobile) 
            { 
            	HealManaTimer timer = new HealManaTimer( m );
            	PlayerTimers.Add(timer);
          		timer.Start();
            }

            m.Delta(MobileDelta.Noto);
            m.InvalidateProperties();
        }
開發者ID:nick12344356,項目名稱:The-Basement,代碼行數:17,代碼來源:RVSFountainRegions.cs

示例3: OnEnter

        public override void OnEnter(Mobile m)
        {
            if (!Controller.InUse)
                return;
                
            if (m is EnergyVortex)
            {
            	EnergyVortex ev = (EnergyVortex) m;
            	Controller.EVsAndBSsAdd(ev);
            }
            else if( m is BladeSpirits )
            {
            	BladeSpirits bs = (BladeSpirits) m;
            	Controller.EVsAndBSsAdd(bs);
            }

            m.Delta(MobileDelta.Noto);
            m.InvalidateProperties();
        }
開發者ID:nick12344356,項目名稱:The-Basement,代碼行數:19,代碼來源:RVSRegion.cs

示例4: UpdateRanking

		private static void UpdateRanking(Mobile m, XmlPoints attachment)
		{
			if(RankList == null) RankList = new ArrayList();

			// flag the rank list for updating on the next attempt to retrieve a rank
			needsupdate = true;

			bool found = false;

			// rank the entries
			for(int i= 0; i<RankList.Count;i++)
			{
				RankEntry p = RankList[i] as RankEntry;
				
				// found a match
				if(p != null && p.Killer == m)
				{
					// update the entry with the new points value

					p.PointsAttachment = attachment;
					found = true;
					break;
				}
			}

			// a new entry so add it
			if(!found)
			{
				RankList.Add(new RankEntry(m, attachment));
			}

			// if points statistics are being displayed in player name properties, then update them
			if(m != null) m.InvalidateProperties();
		}
開發者ID:greeduomacro,項目名稱:GoUO,代碼行數:34,代碼來源:XmlPoints.cs

示例5: CleanPlayer

 /// <summary>
 /// Remove all ill effects from a player.
 /// </summary>
 /// <param name="pm"></param>
 public void CleanPlayer(Mobile pm)
 {
     //Cure Poison
     pm.CurePoison(pm);
     //Reset Hit Points
     pm.Hits = pm.HitsMax;
     //Rest Mana
     pm.Mana = pm.ManaMax;
     //Reset Stam
     pm.Stam = pm.StamMax;
     //Cancel any targeting
     Targeting.Target.Cancel(pm);
     //remove abosorption for magic
     pm.MagicDamageAbsorb = 0;
     //remove absorption for melee
     pm.MeleeDamageAbsorb = 0;
     //clear protection spell
     Spells.Second.ProtectionSpell.Registry.Remove(pm);
     //clear curse effect
     Spells.Fourth.CurseSpell.RemoveEffect(pm);
     //clear corpseskin
     Server.Spells.Necromancy.CorpseSkinSpell.RemoveCurse(pm);
     //clear blodd oath
     Server.Spells.Necromancy.BloodOathSpell.RemoveCurse(pm);
     //clear evil omen
     //Server.Spells.Necromancy.EvilOmenSpell.RemoveCurse(pm);
     //remove strangle
     Server.Spells.Necromancy.StrangleSpell.RemoveCurse(pm);
     //clear Paralyzed
     pm.Paralyzed = false;
     //clear defensive spell
     DefensiveSpell.Nullify(pm);
     //remove any combatant
     pm.Combatant = null;
     //remove war mode
     pm.Warmode = false;
     //remove criminal
     pm.Criminal = false;
     //clear agressed list
     pm.Aggressed.Clear();
     //clear agressor list
     pm.Aggressors.Clear();
     //clear delta notoriety
     pm.Delta(MobileDelta.Noto);
     //invalidate any properties due to the previous changes
     pm.InvalidateProperties();
 }
開發者ID:greeduomacro,項目名稱:DimensionsNewAge,代碼行數:51,代碼來源:PvPStone.cs

示例6: RemoveMember

		public void RemoveMember( Mobile mob )
		{
			PlayerState pl = PlayerState.Find( mob );

			if ( pl == null || !Members.Contains( pl ) )
				return;

			int killPoints = pl.KillPoints;

			if( mob.Backpack != null )
			{
				//Ordinarily, through normal faction removal, this will never find any sigils.
				//Only with a leave delay less than the ReturnPeriod or a Faction Kick/Ban, will this ever do anything
				Item[] sigils = mob.Backpack.FindItemsByType( typeof( Sigil ) );

				for ( int i = 0; i < sigils.Length; ++i )
					((Sigil)sigils[i]).ReturnHome();
			}

			if ( pl.RankIndex != -1 ) {
				while ( ( pl.RankIndex + 1 ) < ZeroRankOffset ) {
					PlayerState pNext = Members[pl.RankIndex+1];
					Members[pl.RankIndex+1] = pl;
					Members[pl.RankIndex] = pNext;
					pl.RankIndex++;
					pNext.RankIndex--;
				}

				ZeroRankOffset--;
			}

			Members.Remove( pl );

			if ( mob is PlayerMobile )
				((PlayerMobile)mob).FactionPlayerState = null;

			mob.InvalidateProperties();
			mob.Delta( MobileDelta.Noto );

			if ( Election.IsCandidate( mob ) )
				Election.RemoveCandidate( mob );

			Election.RemoveVoter( mob );

			if ( pl.Finance != null )
				pl.Finance.Finance = null;

			if ( pl.Sheriff != null )
				pl.Sheriff.Sheriff = null;

			if ( Commander == mob )
				Commander = null;

			if ( mob is PlayerMobile )
				((PlayerMobile)mob).ValidateEquipment();

			if ( killPoints > 0 )
				DistributePoints( killPoints );
		}
開發者ID:PepeBiondi,項目名稱:runsa,代碼行數:59,代碼來源:Faction.cs

示例7: AddMember

		public virtual void AddMember( Mobile mob )
		{
			Members.Insert( ZeroRankOffset, new PlayerState( mob, this, Members ) );

			mob.AddToBackpack( FactionItem.Imbue( new Robe(), this, false, Definition.HuePrimary ) );
			mob.SendLocalizedMessage( 1010374 ); // You have been granted a robe which signifies your faction

			mob.InvalidateProperties();
			mob.Delta( MobileDelta.Noto );

			mob.FixedEffect( 0x373A, 10, 30 );
			mob.PlaySound( 0x209 );
		}
開發者ID:PepeBiondi,項目名稱:runsa,代碼行數:13,代碼來源:Faction.cs

示例8: AddMember

        public void AddMember( Mobile mob )
        {
            Members.Add( new PlayerState( mob, this, Members ) );

            mob.AddToBackpack( FactionItem.Imbue( new Robe(), this, false, Definition.HuePrimary ) );
            mob.SendLocalizedMessage( 1010374 ); // You have been granted a robe which signifies your faction

            mob.InvalidateProperties();
            mob.Delta( MobileDelta.Noto );

            var followers = World.Instance.Mobiles
                .OfType<BaseCreature>()
                .Where( bc => bc.Controlled && bc.ControlMaster == mob );

            foreach ( Mobile follower in followers )
            {
                follower.InvalidateProperties();
                follower.Delta( MobileDelta.Noto );
            }

            mob.FixedEffect( 0x373A, 10, 30 );
            mob.PlaySound( 0x209 );
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:23,代碼來源:Faction.cs

示例9: RemoveMember

        public void RemoveMember( Mobile mob )
        {
            PlayerState pl = PlayerState.Find( mob );

            if ( pl == null || !Members.Contains( pl ) )
                return;

            Members.Remove( pl );

            if ( mob is PlayerMobile )
                ( (PlayerMobile) mob ).FactionPlayerState = null;

            mob.InvalidateProperties();
            mob.Delta( MobileDelta.Noto );

            // TODO: refactor this, maybe a Mobile.GetFollowers() ?
            var followers = World.Instance.Mobiles
                .OfType<BaseCreature>()
                .Where( bc => bc.Controlled && bc.ControlMaster == mob );

            foreach ( Mobile follower in followers )
            {
                follower.InvalidateProperties();
                follower.Delta( MobileDelta.Noto );
            }

            if ( Election.IsCandidate( mob ) )
                Election.RemoveCandidate( mob );

            Election.RemoveVoter( mob );

            if ( pl.Finance != null )
                pl.Finance.Finance = null;

            if ( pl.Sheriff != null )
                pl.Sheriff.Sheriff = null;

            if ( Commander == mob )
                Commander = null;

            if ( mob is PlayerMobile )
                ( (PlayerMobile) mob ).ValidateEquipment();
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:43,代碼來源:Faction.cs

示例10: LeaveGame

        /// <summary>
        /// Will remove the player from the game.
        /// </summary>
        /// <param name="m"></param>
        public static void LeaveGame(Mobile m)
        {
            if (!CTFGame.Running)
                return;

            CTFPlayerGameData pgd = GameData.GetPlayerData(m);

            if (pgd != null)
            {
                pgd.InGame = false;
                RemoveItems(m);
                SunnySystem.DisArmPlayer(m);

                m.Criminal = false;
                m.InvalidateProperties();
                m.Warmode = false;
                m.Aggressed.Clear();
                m.Aggressors.Clear();

                EventSystem.RemoveToRandomLoc(m);
                SunnySystem.ReDress(m);
                m.Delta(MobileDelta.Noto);
                m.InvalidateProperties();
            }
            else if (PlayerJoinList.Contains(m)) {
                try {
                    PlayerJoinList.Remove(m);
                    EventSystem.RemoveToRandomLoc(m);
                    SunnySystem.ReDress(m);
                } catch {}
            } else
                EventSystem.RemoveToRandomLoc(m);
        }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:37,代碼來源:CTFGame.cs

示例11: AddMember

        public void AddMember( Mobile mob )
        {
            Members.Add( new PlayerState( mob, this, Members ) );
            Item item = mob.FindItemOnLayer( Layer.OuterTorso ) as Item;
            if( item != null )
            {
                if ( item.Movable == false )
                {
                    mob.AddToBackpack( FactionItem.Imbue( new Robe(), this, false, Definition.HuePrimary ) );
                    mob.SendAsciiMessage( "You have been granted a robe which signifies your faction." );
                }

                if ( item.Movable == true )
                {
                    mob.AddToBackpack( item );
                    mob.EquipItem( FactionItem.Imbue( new Robe(), this, false, Definition.HuePrimary ) );
                    mob.SendAsciiMessage( "You have been granted a robe which signifies your faction." );
                }
            }
            else
            {
                mob.EquipItem( FactionItem.Imbue( new Robe(), this, false, Definition.HuePrimary ) );
                mob.SendAsciiMessage( "You have been granted a robe which signifies your faction." );
            }

            mob.InvalidateProperties();
            mob.Delta( MobileDelta.Noto );
        }
開發者ID:cynricthehun,項目名稱:UOLegends,代碼行數:28,代碼來源:Faction.cs

示例12: RemoveMember

        public void RemoveMember( Mobile mob )
        {
            PlayerState pl = PlayerState.Find( mob );

            if ( pl == null || !Members.Contains( pl ) )
                return;

            Members.Remove( pl );

            if ( mob is PlayerMobile )
                ((PlayerMobile)mob).FactionPlayerState = null;

            mob.InvalidateProperties();
            mob.Delta( MobileDelta.Noto );

            if ( Election.IsCandidate( mob ) )
                Election.RemoveCandidate( mob );

            Election.RemoveVoter( mob );

            if ( pl.Finance != null )
                pl.Finance.Finance = null;

            if ( pl.Sheriff != null )
                pl.Sheriff.Sheriff = null;

            if ( Commander == mob )
                Commander = null;

            if ( mob is PlayerMobile )
                ((PlayerMobile)mob).ValidateEquipment();
        }
開發者ID:cynricthehun,項目名稱:UOLegends,代碼行數:32,代碼來源:Faction.cs

示例13: CleanPlayer

        private void CleanPlayer(Mobile pm)
        {
            pm.CurePoison(pm);
            pm.Hits = pm.HitsMax;
            pm.Mana = pm.ManaMax;
            pm.Stam = pm.StamMax;

            Targeting.Target.Cancel(pm);
            pm.MagicDamageAbsorb = 0;
            pm.MeleeDamageAbsorb = 0;

            Spells.Second.ProtectionSpell.Registry.Remove(pm);
            Spells.Fourth.CurseSpell.RemoveEffect(pm);
            Server.Spells.Necromancy.CorpseSkinSpell.RemoveCurse(pm);
            Server.Spells.Necromancy.BloodOathSpell.RemoveCurse(pm);
            Server.Spells.Necromancy.StrangleSpell.RemoveCurse(pm);

            pm.Blessed = false;
            pm.Paralyzed = false;
            pm.Hidden = false;

            DefensiveSpell.Nullify(pm);
            pm.Combatant = null;
            pm.Warmode = false;
            pm.Criminal = false;
            pm.Blessed = false;
            pm.Aggressed.Clear();
            pm.Aggressors.Clear();
            pm.Delta(MobileDelta.Noto);
            pm.InvalidateProperties();
        }
開發者ID:greeduomacro,項目名稱:DimensionsNewAge,代碼行數:31,代碼來源:TheHuntStone.cs

示例14: AddMember

        public void AddMember( Mobile mob )
        {
            Members.Add( new PlayerState( mob, this, Members ) );

            mob.AddToBackpack( FactionItem.Imbue( new Robe(), this, false, Definition.HuePrimary ) );
            mob.SendLocalizedMessage( 1010374 ); // You have been granted a robe which signifies your faction

            mob.InvalidateProperties();
            mob.Delta( MobileDelta.Noto );
        }
開發者ID:BackupTheBerlios,項目名稱:sunuo-svn,代碼行數:10,代碼來源:Faction.cs


注:本文中的Server.Mobile.InvalidateProperties方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。