Beispiel #1
0
        private void SendCastSpellOrder(Sprite sprite, Sprite target, Network.Game.GameClient client, bool IsAttack = false)
        {
            var hpbar = new ServerFormat13
            {
                Serial = sprite.Serial,
                Health = 255,
                Sound  = Spell.Template.Sound
            };

            var action = new ServerFormat1A
            {
                Serial = sprite.Serial,
                Number = (byte)(client.Aisling.Path == Class.Priest ? 0x80 : client.Aisling.Path == Class.Wizard ? 0x88 : 0x06),
                Speed  = 30
            };

            client.SendStats(StatusFlags.StructB | StatusFlags.StructD);
            client.Aisling.Show(Scope.NearbyAislings, hpbar);
            client.SendAnimation(Spell.Template.Animation, target, sprite);
            client.SendMessage(0x02, string.Format("you cast {0}", Spell.Template.Name));

            if (IsAttack)
            {
                if (target is Aisling)
                {
                    (target as Aisling).Client.SendMessage(0x02, string.Format("{0} Attacks you with {1}.", client.Aisling.Username, Spell.Template.Name));
                }
            }

            client.Aisling.Show(Scope.NearbyAislings, action);
        }
Beispiel #2
0
        public void AlreadyCursed(Network.Game.GameClient client, System.Collections.Generic.List <Debuff_poison> curses)
        {
            var c = curses.FirstOrDefault();

            if (c != null)
            {
                client.SendMessage(0x02, string.Format("Another poison is already applied. [{0}].", c.Name));
            }
        }