本文整理汇总了C#中Mobile.Delta方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.Delta方法的具体用法?C# Mobile.Delta怎么用?C# Mobile.Delta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mobile
的用法示例。
在下文中一共展示了Mobile.Delta方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoEffect
public override void DoEffect( Mobile m )
{
m.PlaySound( 0x165 );
m.FixedParticles( 0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head );
m.Delta( MobileDelta.WeaponDamage );
}
示例2: OnHit
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!this.Validate(attacker) || !this.CheckMana(attacker, true))
return;
ClearCurrentAbility(attacker);
attacker.SendLocalizedMessage(1063353); // You perform a masterful defense!
attacker.FixedParticles(0x375A, 1, 17, 0x7F2, 0x3E8, 0x3, EffectLayer.Waist);
int modifier = (int)(30.0 * ((Math.Max(attacker.Skills[SkillName.Bushido].Value, attacker.Skills[SkillName.Ninjitsu].Value) - 50.0) / 70.0));
DefenseMasteryInfo info = m_Table[attacker] as DefenseMasteryInfo;
if (info != null)
EndDefense((object)info);
ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, 50 + modifier);
attacker.AddResistanceMod(mod);
info = new DefenseMasteryInfo(attacker, 80 - modifier, mod);
info.m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(3.0), new TimerStateCallback(EndDefense), info);
m_Table[attacker] = info;
attacker.Delta(MobileDelta.WeaponDamage);
}
示例3: RemoveEffect
public override void RemoveEffect(Mobile m)
{
ResistanceMod[] mods = (ResistanceMod[])m_Table[m];
if (mods != null)
{
m_Table.Remove(m);
m_Table[m] = mods;
for (int i = 0; i < mods.Length; ++i)
m.RemoveResistanceMod(mods[i]);
m.PlaySound(0x65B);
m.FixedParticles(0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head);
m.Delta(MobileDelta.WeaponDamage);
m.EndAction(typeof(StoneFormSpell));
}
}
示例4: RemoveFriend
public void RemoveFriend(Mobile from, Mobile targ)
{
if (!this.IsCoOwner(from) || this.m_Friends == null)
return;
if (this.m_Friends.Contains(targ))
{
this.m_Friends.Remove(targ);
targ.Delta(MobileDelta.Noto);
from.SendLocalizedMessage(501298); // Friend removed from list.
targ.SendLocalizedMessage(1060751); // You are no longer a friend of this house.
}
}
示例5: AddFriend
public void AddFriend(Mobile from, Mobile targ)
{
if (!this.IsCoOwner(from) || this.m_Friends == null || this.m_CoOwners == null)
return;
if (this.IsOwner(targ))
{
from.SendLocalizedMessage(501370); // This person is already an owner of the house!
}
else if (this.m_CoOwners.Contains(targ))
{
from.SendLocalizedMessage(501369); // This person is already on your co-owner list!
}
else if (!targ.Player)
{
from.SendLocalizedMessage(501371); // That can't be a friend of the house.
}
else if (this.IsBanned(targ))
{
from.SendLocalizedMessage(501374); // This person is banned! Unban them first.
}
else if (this.m_Friends.Count >= MaxFriends)
{
from.SendLocalizedMessage(501375); // Your friends list is full!
}
else if (this.m_Friends.Contains(targ))
{
from.SendLocalizedMessage(501376); // This person is already on your friends list!
}
else
{
this.m_Friends.Add(targ);
targ.Delta(MobileDelta.Noto);
targ.SendLocalizedMessage(501337); // You have been made a friend of this house.
}
}
示例6: RemoveCoOwner
public void RemoveCoOwner(Mobile from, Mobile targ)
{
if (!this.IsOwner(from) || this.m_CoOwners == null)
return;
if (this.m_CoOwners.Contains(targ))
{
this.m_CoOwners.Remove(targ);
targ.Delta(MobileDelta.Noto);
from.SendLocalizedMessage(501299); // Co-owner removed from list.
targ.SendLocalizedMessage(501300); // You have been removed as a house co-owner.
foreach (SecureInfo info in this.m_Secures)
{
Container c = info.Item;
if (c is StrongBox && ((StrongBox)c).Owner == targ)
{
c.IsLockedDown = false;
c.IsSecure = false;
this.m_Secures.Remove(info);
c.Destroy();
break;
}
}
}
}
示例7: AddCoOwner
public void AddCoOwner(Mobile from, Mobile targ)
{
if (!this.IsOwner(from) || this.m_CoOwners == null || this.m_Friends == null)
return;
if (this.IsOwner(targ))
{
from.SendLocalizedMessage(501360); // This person is already the house owner!
}
else if (this.m_Friends.Contains(targ))
{
from.SendLocalizedMessage(501361); // This person is a friend of the house. Remove them first.
}
else if (!targ.Player)
{
from.SendLocalizedMessage(501362); // That can't be a co-owner of the house.
}
else if (HasAccountHouse(targ))
{
from.SendLocalizedMessage(501364); // That person is already a house owner.
}
else if (this.IsBanned(targ))
{
from.SendLocalizedMessage(501367); // This person is banned! Unban them first.
}
else if (this.m_CoOwners.Count >= MaxCoOwners)
{
from.SendLocalizedMessage(501368); // Your co-owner list is full!
}
else if (this.m_CoOwners.Contains(targ))
{
from.SendLocalizedMessage(501369); // This person is already on your co-owner list!
}
else
{
this.m_CoOwners.Add(targ);
targ.Delta(MobileDelta.Noto);
targ.SendLocalizedMessage(501343); // You have been made a co-owner of this house.
}
}
示例8: RemovePlayer
public virtual void RemovePlayer(Mobile player)
{
if (player == null || player.Deleted)
return;
if (!Players.Contains(player))
return;
if (!player.Alive)
player.Resurrect();
if (player is PlayerMobile)
{
((PlayerMobile)player).CurrentEvent = null;
((PlayerMobile)player).IsInEvent = false;
((PlayerMobile)player).Score = 0;
}
player.Blessed = false;
if (player.Map != Map.Internal)
{
player.Location = m_Lobby;
player.Map = m_LobbyMap;
}
else
{
player.LogoutLocation = m_Lobby;
player.LogoutMap = m_LobbyMap;
}
m_Players.Remove(player);
if (m_PlayerSupplies.ContainsKey((PlayerMobile)player))
{
SupplySystem.RemoveEventGear(player);
EquipmentStorage storage = m_PlayerSupplies[(PlayerMobile)player];
if (storage != null)
{
storage.OnDoubleClick(player);
m_PlayerSupplies.Remove((PlayerMobile)player);
}
}
player.Delta(MobileDelta.Noto);
SendPlayerGumps();
}
示例9: RemoveMember
public void RemoveMember( Mobile m, int message )
{
if ( m_Members.Contains( m ) )
{
m_Members.Remove( m );
Guild guild = m.Guild as Guild;
m.Guild = null;
if( m is PlayerMobile )
((PlayerMobile)m).GuildRank = RankDefinition.Lowest;
if( message > 0 )
m.SendLocalizedMessage( message );
if ( m == m_Leader )
{
CalculateGuildmaster();
if ( m_Leader == null )
Disband();
}
if ( m_Members.Count == 0 )
Disband();
if ( guild != null )
guild.InvalidateWarNotoriety();
m.Delta( MobileDelta.Noto );
}
}
示例10: AddMember
public virtual void AddMember(Mobile mob)
{
this.Members.Insert(this.ZeroRankOffset, new PlayerState(mob, this, this.Members));
mob.AddToBackpack(FactionItem.Imbue(new Robe(), this, false, this.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);
}
示例11: UpdateTitle
public void UpdateTitle( Mobile m )
{
m.InvalidateProperties();
m.Delta( MobileDelta.Name );
}
示例12: 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));
foreach (Sigil s in sigils.OfType<Sigil>())
{
s.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)
{
LoggingCustom.Log(
"LOG_FactionPoints.txt", DateTime.Now + "\t" + mob.Name + "\tFaction.RemoveMember: DistributePoints\t" + killPoints);
DistributePoints(killPoints);
}
Player epl = Player.Find(mob);
if (Ethic.Enabled && epl != null)
{
epl.Detach();
}
}
示例13: DoEffect
public override void DoEffect(Mobile m)
{
ResistanceMod[] mods = (ResistanceMod[])m_Table[m];
int otherMod = 0 + (int)(m.Skills[SkillName.Mysticism].Value / 20);
int admod = 1 + (int)(m.Skills[SkillName.Focus].Value / 20);
//int casts = (int)AosAttributes.GetValue(Caster, AosAttribute.CastSpeed - 2);
mods = new ResistanceMod[5]
{
new ResistanceMod( ResistanceType.Physical, otherMod + admod ),
new ResistanceMod( ResistanceType.Fire, otherMod + admod ),
new ResistanceMod( ResistanceType.Cold, otherMod + admod ),
new ResistanceMod( ResistanceType.Poison, otherMod + admod ),
new ResistanceMod( ResistanceType.Energy, otherMod + admod ),
// new ResistanceMod( AosAttribute.CastSpeed, casts )
};
m_Table[m] = mods;
for (int i = 0; i < mods.Length; ++i)
m.AddResistanceMod(mods[i]);
m.PlaySound(0x65B);
m.FixedParticles(0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head);
m.Delta(MobileDelta.WeaponDamage);
m.EndAction(typeof(StoneFormSpell));
}
示例14: AddFriend
public void AddFriend( Mobile from, Mobile targ )
{
if ( !IsCoOwner( from ) || m_Friends == null || m_CoOwners == null )
{
return;
}
Account acc = targ.Account as Account;
if ( IsOwner( targ ) )
{
from.SendLocalizedMessage( 501370 ); // This person is already an owner of the house!
}
else if ( m_CoOwners.Contains( targ ) )
{
from.SendLocalizedMessage( 501369 ); // This person is already on your co-owner list!
}
else if ( !targ.IsPlayer )
{
from.SendLocalizedMessage( 501371 ); // That can't be a friend of the house.
}
else if ( IsBanned( targ ) )
{
from.SendLocalizedMessage( 501374 ); // This person is banned! Unban them first.
}
else if ( acc == null || acc.Trial )
{
from.SendLocalizedMessage( 1111865 ); // Trial account players do not have access to that level of house security.
}
else if ( m_Friends.Count >= MaxFriends )
{
from.SendLocalizedMessage( 501375 ); // Your friends list is full!
}
else if ( m_Friends.Contains( targ ) )
{
from.SendLocalizedMessage( 501376 ); // This person is already on your friends list!
}
else
{
m_Friends.Add( targ );
targ.Delta( MobileDelta.Noto );
targ.SendLocalizedMessage( 501337 ); // You have been made a friend of this house.
}
}
示例15: RemoveEffect
public override void RemoveEffect( Mobile m )
{
m.Delta( MobileDelta.WeaponDamage );
}