Ejemplo n.º 1
0
        public static DamageEvent CalculateDamage(Creature attacker, Creature defender, WorldObject damageSource, CombatManeuver combatManeuver = null)
        {
            var damageEvent = new DamageEvent();

            damageEvent.CombatManeuver = combatManeuver;
            if (damageSource == null)
            {
                damageSource = attacker;
            }

            var damage = damageEvent.DoCalculateDamage(attacker, defender, damageSource);

            return(damageEvent);
        }
Ejemplo n.º 2
0
        public static DamageEvent CalculateDamage(Creature attacker, Creature defender, WorldObject damageSource, MotionCommand?attackMotion = null)
        {
            var damageEvent = new DamageEvent();

            damageEvent.AttackMotion = attackMotion;
            if (damageSource == null)
            {
                damageSource = attacker;
            }

            var damage = damageEvent.DoCalculateDamage(attacker, defender, damageSource);

            damageEvent.HandleLogging(attacker, defender);

            return(damageEvent);
        }