예제 #1
0
        public static void HandleCastSpellRequest(CastSpellRequestMessage message, LoLClient client)
        {
            AttackableUnit autoAttackTarget = null;

            AttackableUnit spellTarget = client.Hero.Game.Map.GetUnit(message.targetNetId) as AttackableUnit;

            if (client.Hero.AttackManager.IsAttacking)
            {
                autoAttackTarget = client.Hero.AttackManager.GetTarget();
            }

            client.Hero.StopMove();
            client.Hero.CastSpell(message.slot, message.position, message.endPosition, spellTarget, autoAttackTarget);
        }
예제 #2
0
        public static void HandleCastSpellRequest(CastSpellRequestMessage message, LoLClient client)
        {
            AttackableUnit spellTarget = client.Hero.Game.Map.GetUnit(message.targetNetId) as AttackableUnit;

            client.Hero.CastSpell(message.slot, message.position, message.endPosition, spellTarget);
        }