Server.AOS.Damage C# (CSharp) Méthode

Damage() public static méthode

public static Damage ( Server.Mobile m, Server.Mobile from, int damage, bool ignoreArmor, int phys, int fire, int cold, int pois, int nrgy ) : int
m Server.Mobile
from Server.Mobile
damage int
ignoreArmor bool
phys int
fire int
cold int
pois int
nrgy int
Résultat int
        public static int Damage( Mobile m, Mobile from, int damage, bool ignoreArmor, int phys, int fire, int cold, int pois, int nrgy )
        {
            return Damage( m, from, damage, ignoreArmor, phys, fire, cold, pois, nrgy, 0, 0, false, false, false );
        }

Same methods

AOS::Damage ( Server.Mobile m, Server.Mobile from, int damage, bool ignoreArmor, int phys, int fire, int cold, int pois, int nrgy, int chaos, int direct, bool keepAlive, bool archer, bool deathStrike ) : int
AOS::Damage ( Server.Mobile m, Server.Mobile from, int damage, int phys, int fire, int cold, int pois, int nrgy ) : int
AOS::Damage ( Server.Mobile m, Server.Mobile from, int damage, int phys, int fire, int cold, int pois, int nrgy, bool keepAlive ) : int
AOS::Damage ( Server.Mobile m, int damage, bool ignoreArmor, int phys, int fire, int cold, int pois, int nrgy ) : int
AOS::Damage ( Server.Mobile m, int damage, int phys, int fire, int cold, int pois, int nrgy ) : int

Usage Example

Exemple #1
0
        // Main Aura Method
        public static void Aura(Point3D location, Map map, Mobile from, int min, int max, ResistanceType type, int range, Poison poison, string text, bool scales, bool allownull, bool effects, int itemid, int hue)
        {
            if (from == null && !allownull)
            {
                return;
            }

            List <Mobile> targets = new List <Mobile>();

            foreach (Mobile m in Map.AllMaps[map.MapID].GetMobilesInRange(location, range))
            {
                if (CanTarget(from, m, true, false, allownull))
                {
                    targets.Add(m);
                }
            }

            if (effects && from != null)
            {
                from.Animate(12, 5, 1, true, false, 0);
            }

            for (int i = 0; i < targets.Count; i++)
            {
                Mobile m = (Mobile)targets[i];
                m.RevealingAction();

                if (text != "")
                {
                    m.SendMessage(text);
                }

                int auradamage = Utility.RandomMinMax(min, max);

                if (scales)
                {
                    auradamage = (int)((auradamage / GetDist(location, m.Location)) * range);
                }

                if (poison != null)
                {
                    m.ApplyPoison((from == null) ? m : from, poison);
                }

                if (effects)
                {
                    m.FixedParticles(itemid, 10, 15, 5030 /*what the hell does this number do?*/, hue, 0, EffectLayer.Waist);
                }

                switch (type)
                {
                case ResistanceType.Physical:
                    AOS.Damage(m, (from == null) ? m : from, auradamage, 100, 0, 0, 0, 0);
                    break;

                case ResistanceType.Fire:
                    AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 100, 0, 0, 0);
                    break;

                case ResistanceType.Cold:
                    AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 0, 100, 0, 0);
                    break;

                case ResistanceType.Poison:
                    AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 0, 0, 100, 0);
                    break;

                case ResistanceType.Energy:
                    AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 0, 0, 0, 100);
                    break;
                }
            }

            targets.Clear();
        }
All Usage Examples Of Server.AOS::Damage