Esempio n. 1
0
        // Sends card to attack to server
        public void SendCardAction(PlayableCard card)
        {
            if (card.SelectionType == SelectionType.None)
            {
                return;
            }

            SetActiveCardActionGrid(false);
            var packet = new Packet(CMSGPackets.CMSG_CARD_ACTION).Builder()
                         .WriteGuidBitStreamInOrder(card.Guid, 4, 3, 2, 7, 1, 6, 0, 5)
                         .FlushBits()
                         .WriteGuidByteStreamInOrder(card.Guid, 6, 2, 7, 1, 0)
                         .Write((byte)card.SelectionType)
                         .WriteGuidByteStreamInOrder(card.Guid, 5, 3, 4)
                         .Build();

            SendPacket(packet);
        }
Esempio n. 2
0
        // Logs apply aura
        public void LogApplyAura(PlayableCard card, SpellData spell)
        {
            var message = $"{card.Name} is now aflicted by {spell.Name}";

            WriteLog(message, CombatLogTypes.SpellUsage);
        }
Esempio n. 3
0
        // Logs stat change into chat
        public void LogStatChange(CardStats stat, PlayableCard card, sbyte value)
        {
            var message = $"{card.Name}'s {stat.GetDescription()} has been changed by {value}";

            WriteLog(message, CombatLogTypes.StatChange);
        }
Esempio n. 4
0
        // Write info about periodic damage into combat log chat tab
        public void LogPeriodicDamage(PlayableCard victim, byte damage, bool alive)
        {
            var message = alive ? $"{victim.Name} suffered {damage} damage" : $"{victim.Name} has been killed with {damage} damage";

            WriteLog(message, CombatLogTypes.SpellUsage);
        }
Esempio n. 5
0
        // Write info about damage into combat log chat tab
        public void LogDamage(CombatLogTypes combatLogType, PlayableCard attacker, PlayableCard victim, byte damage, bool alive)
        {
            var message = alive ? $"{attacker.Name} dealt {damage} damage to {victim.Name}" : $"{attacker.Name} killed {victim.Name} with {damage}";

            WriteLog(message, combatLogType);
        }
Esempio n. 6
0
        // Logs consuming mana from spell
        public void LogManaConsume(PlayableCard card, SpellData spellData, byte manaCost)
        {
            var message = $"{spellData.Name} consumes {manaCost} mana from {card.Name}";

            WriteLog(message, CombatLogTypes.SpellUsage);
        }
Esempio n. 7
0
        // Logs heal from spell
        public void LogHeal(PlayableCard card, byte amount)
        {
            var message = $"{card.Name} has been healed by {amount}";

            WriteLog(message, CombatLogTypes.SpellUsage);
        }
Esempio n. 8
0
        // Logs apply aura
        public void LogExpireAura(PlayableCard card, SpellData spell)
        {
            var message = $"{spell.Name} has expired from {card.Name}";

            WriteLog(message, CombatLogTypes.SpellUsage);
        }