Ejemplo n.º 1
0
        /// <summary>
        /// Distributes honor to Teammates within 40 yards of honorable kill.
        /// </summary>
        /// <param name="earner">Character that made the honorable kill.</param>
        /// <param name="honorPoints">Honor earned by the earner.</param>
        public void DistributeSharedHonor(Character earner, Character victim, uint honorPoints)
        {
            if (TotalCount < 1)
            {
                return;
            }
            var bonus = honorPoints / (uint)TotalCount;

            ForeachCharacter((chr) =>
            {
                if (chr.IsInRange(new SimpleRange(0.0f, 40.0f), earner))
                {
                    chr.GiveHonorPoints(bonus);
                    chr.KillsToday++;
                    chr.LifetimeHonorableKills++;
                    HonorHandler.SendPVPCredit(chr, bonus * 10, victim);
                }
            });
        }
Ejemplo n.º 2
0
        public void DistributeGroupHonor(Character earner, Character victim, uint honorPoints)
        {
            if (CharacterCount < 1)
            {
                return;
            }
            uint bonus = honorPoints / (uint)CharacterCount;

            ForeachCharacter(chr =>
            {
                if (!chr.IsInRange(new SimpleRange(0.0f, MaxKillRewardDistance), earner))
                {
                    return;
                }
                chr.GiveHonorPoints(bonus);
                ++chr.KillsToday;
                ++chr.LifetimeHonorableKills;
                HonorHandler.SendPVPCredit(chr, bonus * 10U, victim);
            });
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Distributes honor to Teammates within 40 yards of honorable kill.
        /// </summary>
        /// <param name="earner">Character that made the honorable kill.</param>
        /// <param name="honorPoints">Honor earned by the earner.</param>
        public void DistributeSharedHonor(Character earner, Character victim, uint honorPoints)
        {
            if (this.TotalCount < 1)
            {
                return;
            }
            uint bonus = honorPoints / (uint)this.TotalCount;

            this.ForeachCharacter((Action <Character>)(chr =>
            {
                if (!chr.IsInRange(new SimpleRange(0.0f, 40f), (WorldObject)earner))
                {
                    return;
                }
                chr.GiveHonorPoints(bonus);
                ++chr.KillsToday;
                ++chr.LifetimeHonorableKills;
                HonorHandler.SendPVPCredit((IPacketReceiver)chr, bonus * 10U, victim);
            }));
        }