本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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();
}
示例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);
}
示例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 );
}
示例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();
}
示例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();
}
示例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 );
}