Exemplo n.º 1
0
        //*********************************************************************************************
        // ExecutePassiveEffect / Revisto pela última vez em 01/08/2016, criado por Allyson S. Bacon
        //*********************************************************************************************
        public static void executePassiveEffect(int s, int passive)
        {
            //EXTEND
            if (Extensions.ExtensionApp.extendMyApp
                    (MethodBase.GetCurrentMethod().Name, s, passive) != null)
            {
                return;
            }

            //CÓDIGO
            if (PlayerStruct.ppassiveffect[s, passive].targettype == 1)
            {
                //Jogador
                if (PlayerStruct.ppassiveffect[s, passive].type == 1) //DANO
                {
                    SendData.sendAnimation(PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Map, PlayerStruct.ppassiveffect[s, passive].targettype, PlayerStruct.ppassiveffect[s, passive].target, SkillStruct.skill[PlayerStruct.ppassiveffect[s, passive].spellnum].animation_id);
                    CombatRelations.playerAttackPlayer(s, PlayerStruct.ppassiveffect[s, passive].target, PlayerStruct.ppassiveffect[s, passive].spellnum, PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Map, true);
                    PlayerStruct.ppassiveffect[s, passive].active     = false;
                    PlayerStruct.ppassiveffect[s, passive].type       = 0;
                    PlayerStruct.ppassiveffect[s, passive].timer      = 0;
                    PlayerStruct.ppassiveffect[s, passive].target     = 0;
                    PlayerStruct.ppassiveffect[s, passive].targettype = 0;
                    PlayerStruct.ppassiveffect[s, passive].spellnum   = 0;
                    return;
                }
            }
            if (PlayerStruct.ppassiveffect[s, passive].targettype == 2)
            {
                //NPC
                if (PlayerStruct.ppassiveffect[s, passive].type == 1) //DANO
                {
                    SendData.sendAnimation(PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Map, PlayerStruct.ppassiveffect[s, passive].targettype, PlayerStruct.ppassiveffect[s, passive].target, SkillStruct.skill[PlayerStruct.ppassiveffect[s, passive].spellnum].animation_id);
                    CombatRelations.playerAttackNpc(s, PlayerStruct.ppassiveffect[s, passive].target, PlayerStruct.ppassiveffect[s, passive].spellnum, PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Map, true);
                    PlayerStruct.ppassiveffect[s, passive].active     = false;
                    PlayerStruct.ppassiveffect[s, passive].type       = 0;
                    PlayerStruct.ppassiveffect[s, passive].timer      = 0;
                    PlayerStruct.ppassiveffect[s, passive].target     = 0;
                    PlayerStruct.ppassiveffect[s, passive].targettype = 0;
                    PlayerStruct.ppassiveffect[s, passive].spellnum   = 0;
                    return;
                }
            }
            PlayerStruct.ppassiveffect[s, passive].active     = false;
            PlayerStruct.ppassiveffect[s, passive].type       = 0;
            PlayerStruct.ppassiveffect[s, passive].timer      = 0;
            PlayerStruct.ppassiveffect[s, passive].target     = 0;
            PlayerStruct.ppassiveffect[s, passive].targettype = 0;
            PlayerStruct.ppassiveffect[s, passive].spellnum   = 0;
        }
Exemplo n.º 2
0
        //*********************************************************************************************
        // PetAttack
        //*********************************************************************************************
        public static void petAttack(int s, int target, int targettype)
        {
            //EXTEND
            if (Extensions.ExtensionApp.extendMyApp
                    (MethodBase.GetCurrentMethod().Name, s, target, targettype) != null)
            {
                return;
            }

            //CÓDIGO
            PlayerStruct.tempplayer[s].PetTarget     = target;
            PlayerStruct.tempplayer[s].PetTargetType = targettype;
            if (targettype == Globals.Target_Npc)
            {
                CombatRelations.playerAttackNpc(s, target, 0, 0, false, 0, true);
            }
            else if (targettype == Globals.Target_Player)
            {
                CombatRelations.playerAttackPlayer(s, target, 0, 0, false, 0, 0, true);
            }
            SendData.sendPetAttack(s, target, targettype);
            PlayerStruct.tempplayer[s].PetTimer = Loops.TickCount.ElapsedMilliseconds + 2000;
        }
Exemplo n.º 3
0
        //*********************************************************************************************
        // ExecutePTempSpell / Revisto pela última vez em 01/08/2016, criado por Allyson S. Bacon
        //*********************************************************************************************
        public static void executeTempSpell(int s, int PStempSpell)
        {
            //EXTEND
            if (Extensions.ExtensionApp.extendMyApp
                    (MethodBase.GetCurrentMethod().Name, s, PStempSpell) != null)
            {
                return;
            }

            //CÓDIGO
            int Attacker = PlayerStruct.ptempspell[s, PStempSpell].attacker;
            int Map      = PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Map;

            if ((UserConnection.getS(Attacker) < 0) || (UserConnection.getS(Attacker) >= WinsockAsync.Clients.Count()))
            {
                PlayerStruct.ptempspell[s, PStempSpell].attacker = 0;
                PlayerStruct.ptempspell[s, PStempSpell].timer    = 0;
                PlayerStruct.ptempspell[s, PStempSpell].spellnum = 0;
                PlayerStruct.ptempspell[s, PStempSpell].repeats  = 0;
                PlayerStruct.ptempspell[s, PStempSpell].active   = false;
                return;
            }

            //Verificar se o jogador não se desconectou no processo
            if (!WinsockAsync.Clients[(UserConnection.getS(Attacker))].IsConnected)
            {
                PlayerStruct.ptempspell[s, PStempSpell].attacker = 0;
                PlayerStruct.ptempspell[s, PStempSpell].timer    = 0;
                PlayerStruct.ptempspell[s, PStempSpell].spellnum = 0;
                PlayerStruct.ptempspell[s, PStempSpell].repeats  = 0;
                PlayerStruct.ptempspell[s, PStempSpell].active   = false;
                return;
            }

            if (PlayerStruct.tempplayer[s].Vitality <= 0)
            {
                PlayerStruct.ptempspell[s, PStempSpell].attacker = 0;
                PlayerStruct.ptempspell[s, PStempSpell].timer    = 0;
                PlayerStruct.ptempspell[s, PStempSpell].spellnum = 0;
                PlayerStruct.ptempspell[s, PStempSpell].repeats  = 0;
                PlayerStruct.ptempspell[s, PStempSpell].active   = false;
                return;
            }

            SendData.sendAnimation(Map, 1, s, PlayerStruct.ptempspell[s, PStempSpell].anim);

            if (PlayerStruct.ptempspell[s, PStempSpell].area_range <= 0)
            {
                if (!PlayerStruct.ptempspell[s, PStempSpell].is_heal)
                {
                    CombatRelations.playerAttackPlayer(Attacker, s, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                }
                else
                {
                    PlayerLogic.HealPlayer(s, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                }
            }
            else
            {
                if (!PlayerStruct.ptempspell[s, PStempSpell].is_heal)
                {
                    CombatRelations.playerAttackPlayer(Attacker, s, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                    for (int i = 0; i <= MapStruct.tempmap[Map].NpcCount; i++)
                    {
                        for (int r = 1; r <= PlayerStruct.ptempspell[s, PStempSpell].area_range; r++)
                        {
                            if ((NpcStruct.tempnpc[Map, i].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                            {
                                CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                            }
                            if ((NpcStruct.tempnpc[Map, i].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                            {
                                CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                            }
                            if ((NpcStruct.tempnpc[Map, i].X == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                            {
                                CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                            }
                            if ((NpcStruct.tempnpc[Map, i].X == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                            {
                                CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                            }


                            //Is line?
                            if (PlayerStruct.ptempspell[s, PStempSpell].is_line)
                            {
                                if ((NpcStruct.tempnpc[Map, i].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                                if ((NpcStruct.tempnpc[Map, i].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                                if ((NpcStruct.tempnpc[Map, i].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                                if ((NpcStruct.tempnpc[Map, i].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                            }
                        }
                    }

                    for (int i = 0; i <= Globals.Player_Highs; i++)
                    {
                        if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Map == Map) && (PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].PVP) && (i != s))
                        {
                            for (int r = 1; r <= PlayerStruct.ptempspell[s, PStempSpell].area_range; r++)
                            {
                                if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackPlayer(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                                if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackPlayer(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                                if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y - r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackPlayer(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                                if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y + r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackPlayer(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }


                                //Is line?
                                if (PlayerStruct.ptempspell[s, PStempSpell].is_line)
                                {
                                    if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y + r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                    {
                                        CombatRelations.playerAttackPlayer(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                    }
                                    if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y - r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                    {
                                        CombatRelations.playerAttackPlayer(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                    }
                                    if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y + r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                    {
                                        CombatRelations.playerAttackPlayer(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                    }
                                    if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y - r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                    {
                                        CombatRelations.playerAttackPlayer(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                    }
                                }
                            }
                        }
                    }
                }
                else
                {
                    PlayerLogic.HealPlayer(s, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                    CombatRelations.playerAttackPlayer(Attacker, s, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                    for (int i = 0; i <= MapStruct.tempmap[Map].NpcCount; i++)
                    {
                        for (int r = 1; r <= PlayerStruct.ptempspell[s, PStempSpell].area_range; r++)
                        {
                            if ((NpcStruct.tempnpc[Map, i].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                            {
                                CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                            }
                            if ((NpcStruct.tempnpc[Map, i].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                            {
                                CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                            }
                            if ((NpcStruct.tempnpc[Map, i].X == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                            {
                                CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                            }
                            if ((NpcStruct.tempnpc[Map, i].X == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                            {
                                CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                            }


                            //Is line?
                            if (PlayerStruct.ptempspell[s, PStempSpell].is_line)
                            {
                                if ((NpcStruct.tempnpc[Map, i].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                                if ((NpcStruct.tempnpc[Map, i].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                                if ((NpcStruct.tempnpc[Map, i].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                                if ((NpcStruct.tempnpc[Map, i].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (NpcStruct.tempnpc[Map, i].Y - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].Y))
                                {
                                    CombatRelations.playerAttackNpc(Attacker, i, PlayerStruct.ptempspell[s, PStempSpell].spellnum, Map);
                                }
                            }
                        }
                    }

                    for (int i = 0; i <= Globals.Player_Highs; i++)
                    {
                        if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Map == Map) && (PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].PVP) && (i != s))
                        {
                            for (int r = 1; r <= PlayerStruct.ptempspell[s, PStempSpell].area_range; r++)
                            {
                                if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                {
                                    PlayerLogic.HealPlayer(i, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                                }
                                if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                {
                                    PlayerLogic.HealPlayer(i, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                                }
                                if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y - r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                {
                                    PlayerLogic.HealPlayer(i, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                                }
                                if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y + r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                {
                                    PlayerLogic.HealPlayer(i, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                                }


                                //Is line?
                                if (PlayerStruct.ptempspell[s, PStempSpell].is_line)
                                {
                                    if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y + r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                    {
                                        PlayerLogic.HealPlayer(i, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                                    }
                                    if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y - r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                    {
                                        PlayerLogic.HealPlayer(i, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                                    }
                                    if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X + r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y + r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                    {
                                        PlayerLogic.HealPlayer(i, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                                    }
                                    if ((PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].X - r == PlayerStruct.character[s, PlayerStruct.player[s].SelectedChar].X) && (PlayerStruct.character[i, PlayerStruct.player[i].SelectedChar].Y - r == PlayerStruct.character[s, PlayerStruct.player[i].SelectedChar].Y))
                                    {
                                        PlayerLogic.HealPlayer(i, PlayerLogic.HealSpellDamage(Attacker, PlayerStruct.ptempspell[s, PStempSpell].spellnum));
                                    }
                                }
                            }
                        }
                    }
                }
            }

            PlayerStruct.ptempspell[s, PStempSpell].repeats -= 1;

            if (PlayerStruct.ptempspell[s, PStempSpell].repeats <= 0)
            {
                if ((SkillStruct.skill[PlayerStruct.ptempspell[s, PStempSpell].spellnum].slow) || (PlayerStruct.ptempspell[s, PStempSpell].fast_buff))
                {
                    PlayerStruct.tempplayer[s].movespeed = Globals.NormalMoveSpeed;
                    SendData.sendMoveSpeed(1, s);
                }
                PlayerStruct.ptempspell[s, PStempSpell].attacker = 0;
                PlayerStruct.ptempspell[s, PStempSpell].timer    = 0;
                PlayerStruct.ptempspell[s, PStempSpell].spellnum = 0;
                PlayerStruct.ptempspell[s, PStempSpell].repeats  = 0;
                PlayerStruct.ptempspell[s, PStempSpell].active   = false;
            }

            PlayerStruct.ptempspell[s, PStempSpell].timer = Loops.TickCount.ElapsedMilliseconds + SkillStruct.skill[PlayerStruct.ptempspell[s, PStempSpell].spellnum].interval;
        }