Register for your free account! | Forgot your password?

You last visited: Today at 00:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



RadiantPalm Bug

Discussion on RadiantPalm Bug within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
RadiantPalm Bug

I Have Shit Bug At This SKill I try Alot to fix it but i fail



and this Skill Code
Code:
//Radiant Palm 
                                case 10381:
                                    // case 10315:
                                    {
                                        if (CanUseSpell(spell, attacker.Owner))
                                        {
                                            PrepareSpell(spell, attacker.Owner);
                                            Game.Attacking.InLineAlgorithm ila = new Conquer_Online_Server.Game.Attacking.InLineAlgorithm(attacker.X,
                                        X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
                                            SpellUse suse = new SpellUse(true);
                                            suse.Attacker = attacker.UID;
                                            suse.SpellID = SpellID;
                                            suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
                                            suse.X = X;
                                            suse.Y = Y;
                                            for (int c = 0; c < attacker.Owner.Screen.Objects.Length; c++)
                                            {
                                                //For a multi threaded application, while we go through the collection
                                                //the collection might change. We will make sure that we wont go off
                                                //the limits with a check.
                                                if (c >= attacker.Owner.Screen.Objects.Length)
                                                    break;
                                                Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c];
                                                if (_obj == null)
                                                    continue;
                                                if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
                                                {
                                                    attacked = _obj as Entity;
                                                    if (ila.InLine(attacked.X, attacked.Y))
                                                    {
                                                        if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
                                                            continue;

                                                        uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell);

                                                        attack.Damage = damage;
                                                        // damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell);
                                                        ReceiveAttack( attacker, attacked, attack, damage, spell);

                                                        suse.Targets.Add(attacked.UID, damage);
                                                    }
                                                }
                                                else if (_obj.MapObjType == MapObjectType.SobNpc)
                                                {
                                                    attackedsob = _obj as SobNpcSpawn;

                                                    if (ila.InLine(attackedsob.X, attackedsob.Y))
                                                    {
                                                        if (!CanAttack(attacker, attackedsob, spell))
                                                            continue;

                                                        uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob);
                                                        damage = (uint)(damage * spell.PowerPercent);
                                                        attack.Damage = damage;

                                                        ReceiveAttack( attacker, attackedsob, attack, damage, spell);

                                                        suse.Targets.Add(attackedsob.UID, damage);
                                                    }
                                                }
                                            }

                                            attacker.Owner.SendScreen(suse, true);
                                        }
                                        attacker.AttackPacket = null;
                                        break;
                                    }
the Bug sometimes the skill out other way i turn (sory for bad english)
magnon is offline  
Old 02/17/2013, 16:47   #2
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
At least tell us your "bug", so we know what to look for.
Super Aids is offline  
Old 02/17/2013, 17:09   #3
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
that's not even RadiantPalm
that's the DragonWhirl
and it sounds to me that you are casting the spell in a wrong line , check that algorithm parameters but not in that code because that's the dragonwhirl skill
go for it is offline  
Old 02/17/2013, 17:18   #4
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46

Code:
public enum SkillIDs : ushort
        {
            Accuracy = 0x3f7,
            AdrenalineRush = 0x2b7a,
            AdvancedCure = 0x497,
            AdvancedFly = 0x1f43,
            ArcherBane = 0x1774,
            ArrowRain = 0x1f5e,
            AuraEarth = 0x28b8,
            AuraFire = 0x28b7,
            AuraMetal = 0x28b4,
            AuraWater = 0x28b6,
            AuraWood = 0x28b5,
            AzureShield = 0x7530,
            BlackbeardRage = 0x2b34,
            BlackSpot = 0x2b70,
            BladeTempest = 0x2b66,
            Windstorm = 0x2b84,
            Bless = 0x2694,
            BloodyBat = 0xfd2,
            Bomb = 0x488,
            Boom = 0x13b0,
            Boreas = 0x13ba,
            CannonBarrage = 0x2b2a,
            Celestial = 0x1b76,
            Compassion = 0x28be,
            CounterKill = 0x1773,
            CruelShade = 0xbea,
            Cure = 0x3ed,
            Cyclone = 0x456,
            Dance2 = 0x564,
            Dance3 = 0x569,
            Dance4 = 0x56e,
            Dance5 = 0x573,
            Dance6 = 0x578,
            Dance7 = 0x57d,
            Dance8 = 0x582,
            Dash = 0x41b,
            DeathBlow = 0x28f4,
            DeflectionAura = 0x28aa,
            DivineHare = 0x546,
            Dodge = 0xc08,
            DragonBreath = 0x1b66,
            DragonBreath2 = 0x1b69,
            DragonBreath3 = 0x1b67,
            DragonBreath4 = 0x1b63,
            DragonBreath5 = 0x1b64,
            DragonTail = 0x2af8,
            DragonWhirl = 0x284b,
            EarthQuake = 0x1b62,
            FastBlade = 0x415,
            FatalStrike = 0x177b,
            Fire = 0x3e9,
            FireCircle = 0x460,
            FireEvil = 0xfdc,
            FireMeteor = 0x49c,
            FireOfHell = 0x48d,
            FireRing = 0x47e,
            FlashStep = 0x11c6,
            FlyingMoon = 0x528,
            GaleBomb = 0x2b3e,
            gm = 0xcf9,
            Halt = 0x514,
            HealingRain = 0x41f,
            HeavenBlade = 0x2846,
            Hercules = 0x45b,
            Intensify = 0x2328,
            Invisibility = 0x433,
            IronShirt = 0x13ec,
            KrakensRevenge = 0x2b5c,
            Lightning = 0x3f2,
            MagicShield = 0x442,
            Meditation = 0x4ab,
            Nectar = 0x492,
            NightDevil = 0x550,
            Oblivion = 0x2896,
            Penetration = 0x50a,
            Perseverance = 0x2847,
            Pervade = 0xc12,
            Phoenix = 0x13a6,
            PiEagleEye = 0x2b16,
            PoisonStar = 0x1772,
            Pray = 0x44c,
            RadiantPalm = 0x288d,
            Rage = 0x1b6c,
            RapidFire = 0x1f40,
            Reflect = 0xbf4,
            Restore = 0x451,
            Riding = 0x1b59,
            Roamer = 0x1b80,
            Roar = 0x410,
            Robot = 0x4f6,
            Scatter = 0x1f41,
            ScentSword = 0x416,
            ScurvyBomb = 0x2b20,
            Seizer = 0x1b58,
            Serenity = 0x28a0,
            Shield = 0x3fc,
            ShurikenVortex = 0x177a,
            Skeleton = 0xfe6,
            Snow = 0x1392,
            SoulShackle = 0x28a5,
            SpeedGun = 0x4ec,
            SpeedLightning = 0x1389,
            SpiritHealing = 0x4a6,
            Spook = 0x1b5a,
            StarArrow = 0x2849,
            StarOfAccuracy = 0x43d,
            Stigma = 0x447,
            StrandedMonster = 0x139c,
            SummonBat = 0xfaa,
            SummonBatBoss = 0xfb4,
            SummonGuard = 0xfa0,
            SuperMan = 0x401,
            Thunder = 0x3e8,
            Tornado = 0x3ea,
            ToxicFog = 0x1771,
            Tranquility = 0x28b9,
            TripleAttack = 0x28fa,
            TwofoldBlades = 0x1770,
            TyrantAura = 0x289b,
            ViperFang = 0x2afd,
            Volcano = 0x465,
            WarCry = 0x1b5b,
            WaterElf = 0x500,
            WhirlWindKick = 0x28af,
            WideStrike = 0x4e2,
            XPFly = 0x1f42,
            XPRevive = 0x41a
        }
Anyway i mean this skill i use at the Pic where i can Search to fix it please go to for
magnon is offline  
Old 02/17/2013, 18:13   #5
 
elite*gold: 0
Join Date: May 2011
Posts: 19
Received Thanks: 4
no, it's 'RadiantPalm'.
test a breakpoint @ this line "suse.Targets.Add(attacked.UID, damage);"
M.Dego is offline  
Old 02/17/2013, 18:16   #6
 
diedwarrior's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 611
Received Thanks: 195
Quote:
Originally Posted by go for it View Post
that's not even RadiantPalm
that's the DragonWhirl
and it sounds to me that you are casting the spell in a wrong line , check that algorithm parameters but not in that code because that's the dragonwhirl skill
The dragonwhirl id is commented out.
diedwarrior is offline  
Old 02/17/2013, 18:28   #7
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Quote:
Originally Posted by M.Dego View Post
no, it's 'RadiantPalm'.
test a breakpoint @ this line "suse.Targets.Add(attacked.UID, damage);"
where search about that i have alot of this line
magnon is offline  
Old 02/18/2013, 06:19   #8
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
Quote:
no, it's 'RadiantPalm'.
no it's not !
00x284B is DragonWhirl which is 10315 in dec

anyway , you are using trinity edited base
go to the handle class
break point on the switch of skills
it should go to the right skill (trace it step by step or hover over the parameter of switch) aka hove over
\Game\Attacking\Handle.cs
line 1607
Code:
switch (key)
hover with pointer over key and you should figure out what is the spell id , then keep on stepping over throw the whole case while looking at the client coords of player and monster to figure out what's wrong
go for it is offline  
Thanks
1 User
Old 02/18/2013, 10:36   #9
 
elite*gold: 0
Join Date: May 2011
Posts: 19
Received Thanks: 4
Talking

Quote:
Originally Posted by go for it View Post
no it's not !
00x284B is DragonWhirl which is 10315 in dec

anyway , you are using trinity edited base
go to the handle class
break point on the switch of skills
it should go to the right skill (trace it step by step or hover over the parameter of switch) aka hove over
\Game\Attacking\Handle.cs
line 1607
Code:
switch (key)
hover with pointer over key and you should figure out what is the spell id , then keep on stepping over throw the whole case while looking at the client coords of player and monster to figure out what's wrong
oh, i mean the skill in pic.

Quote:
Originally Posted by magnon View Post
where search about that i have alot of this line
search for "case 10381:", then check it
M.Dego is offline  
Thanks
1 User
Old 02/18/2013, 17:37   #10
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Quote:
Originally Posted by M.Dego View Post
oh, i mean the skill in pic.


search for "case 10381:", then check it
Dego If i can check it why i put at this Forum i try and fail if u you have any idea please help
magnon is offline  
Old 02/18/2013, 19:16   #11
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
Quote:
Originally Posted by magnon View Post
Dego If i can check it why i put at this Forum i try and fail if u you have any idea please help
and do you expect that someone will be able to do it for you ?
there is no syntax errors and i duno what this methods contains to tell you what's wrong with them until i trace them
that's from trinity edited base (duno who's that stupid mf who coded it this way but anyway it's working pretty fine)
just pray it fit in your source
but to be honest , you need to learn programming which is way better than begging every once in a while for someone to code something for you or fix something for you , you want to play stupid ? be stupid stay stupid stay broke , sorry mate but this is the truth

Code:
case 0x288d:
{
                    if (CanUseSpell(spell, this.attacker.Owner))
                    {
                        ushort num29;
                        ushort num30;
                        if (attacker != null)
                        {
                            num29 = attacker.X;
                            num30 = attacker.Y;
                        }
                        else
                        {
                            num29 = sob.X;
                            num30 = sob.Y;
                        }
                        if (Kernel.GetDistance(this.attacker.X, this.attacker.Y, num29, num30) <= spell.Range)
                        {
                            if (((sob == null) && attacker.ContainsFlag(0x8000000L)) || this.attacker.ContainsFlag(0x8000000L))
                            {
                                return;
                            }
                            PrepareSpell(spell, this.attacker.Owner);
                            use = new SpellUse(true) {
                                Attacker = this.attacker.UID,
                                SpellID = spell.ID,
                                SpellLevel = spell.Level,
                                X = x,
                                Y = y
                            };
                            bool flag8 = false;
                            if (sob == null)
                            {
                                if (CanAttack(this.attacker, attacker, spell, this.attack.AttackType == 2))
                                {
                                    this.attack.Effect1 = Attack.AttackEffects1.None;
                                    power = Calculate.Melee(this.attacker, attacker, spell, ref this.attack);
                                    use.Effect1 = this.attack.Effect1;
                                    ReceiveAttack(this.attacker, attacker, this.attack, power, spell);
                                    use.Targets.Add(attacker.UID, power);
                                    flag8 = true;
                                }
                            }
                            else if (CanAttack(this.attacker, sob, spell))
                            {
                                this.attack.Effect1 = Attack.AttackEffects1.None;
                                power = (uint) (Calculate.Melee(this.attacker, sob, ref this.attack) * spell.PowerPercent);
                                ReceiveAttack(this.attacker, sob, this.attack, power, spell);
                                use.Effect1 = this.attack.Effect1;
                                use.Targets.Add(sob.UID, power);
                                flag8 = true;
                            }
                            if (flag8)
                            {
                                this.attacker.Owner.SendScreen(use, true);
                            }
                        }
                        else
                        {
                            this.attacker.AttackPacket = null;
                        }
                    }


this.attacker.Owner.IncreaseSpellExperience(experience, key);
            if (this.attacker.MapID == 0x40f)
            {
                if ((spell.ID == 0x1b59) || (spell.ID == 0x2694))
                {
                    this.attacker.AttackPacket = null;
                }
                else if (this.attacker.AttackPacket != null)
                {
                    this.attack.Damage = spell.ID;
                    this.attacker.AttackPacket = this.attack;
                    if (SpellTable.WeaponSpells.ContainsValue(spell.ID))
                    {
                        if (this.attacker.AttackPacket == null)
                        {
                            this.attack.AttackType = 2;
                            this.attacker.AttackPacket = this.attack;
                        }
                        else
                        {
                            this.attacker.AttackPacket.AttackType = 2;
                        }
                    }
                }
            }
            else if (spell.NextSpellID != 0)
            {
                if (((spell.NextSpellID >= 0x3e8) && (spell.NextSpellID <= 0x3ea)) && (uid >= 0xf4240))
                {
                    this.attacker.AttackPacket = null;
                }
                else
                {
                    this.attack.Damage = spell.NextSpellID;
                    this.attacker.AttackPacket = this.attack;
                }
            }
            else if (!(SpellTable.WeaponSpells.ContainsValue(spell.ID) && (spell.ID != 0x2694)))
            {
                this.attacker.AttackPacket = null;
            }
            else if (this.attacker.AttackPacket == null)
            {
                this.attack.AttackType = 2;
                this.attacker.AttackPacket = this.attack;
            }
            else
            {
                this.attacker.AttackPacket.AttackType = 2;
            }
}
go for it is offline  
Old 02/19/2013, 00:18   #12
 
EOS 60D's Avatar
 
elite*gold: 0
Join Date: Feb 2013
Posts: 94
Received Thanks: 13
Quote:
Originally Posted by go for it View Post
(duno who's that stupid mf who coded it this way but anyway it's working pretty fine)
this what happen if code is reflected..
EOS 60D is offline  
Old 02/19/2013, 00:58   #13


 
MeGaMaX's Avatar
 
elite*gold: 50232
Join Date: Sep 2006
Posts: 1,089
Received Thanks: 2,608
this is trinity files edited by kimo reflected by magnon and with some other ppls so he can update it him self , this is the reflector **** ^^
MeGaMaX is offline  
Old 02/19/2013, 06:50   #14
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
Quote:
this what happen if code is reflected..
Quote:
this is trinity files edited by kimo reflected by magnon and with some other ppls so he can update it him self , this is the reflector **** ^^
explains why it's so ****** up , was kinda impressed by that source once i got it, but right now i curse myself for using it and not using a native trinity base and update it on my own was way better than editing this one
the more i learn programming the more i figure out how dumb who edit this was
but to be honest i used so many stuff he edited , so i guess we are even o-0
go for it is offline  
Thanks
1 User
Old 02/19/2013, 07:30   #15
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
i'm not use Reflector Source i'm use other source and this i use at my source

Code:
 case 10381:
                                    // case 10315:
                                    {
                                        if (CanUseSpell(spell, attacker.Owner))
                                        {
                                            PrepareSpell(spell, attacker.Owner);
                                            Game.Attacking.InLineAlgorithm ila = new Conquer_Online_Server.Game.Attacking.InLineAlgorithm(attacker.X,
                                        X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
                                            SpellUse suse = new SpellUse(true);
                                            suse.Attacker = attacker.UID;
                                            suse.SpellID = SpellID;
                                            suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
                                            suse.X = X;
                                            suse.Y = Y;
                                            for (int c = 0; c < attacker.Owner.Screen.Objects.Length; c++)
                                            {
                                                //For a multi threaded application, while we go through the collection
                                                //the collection might change. We will make sure that we wont go off
                                                //the limits with a check.
                                                if (c >= attacker.Owner.Screen.Objects.Length)
                                                    break;
                                                Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c];
                                                if (_obj == null)
                                                    continue;
                                                if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
                                                {
                                                    attacked = _obj as Entity;
                                                    if (ila.InLine(attacked.X, attacked.Y))
                                                    {
                                                        if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
                                                            continue;

                                                        uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell);

                                                        attack.Damage = damage;
                                                        // damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell);
                                                        ReceiveAttack( attacker, attacked, attack, damage, spell);

                                                        suse.Targets.Add(attacked.UID, damage);
                                                    }
                                                }
                                                else if (_obj.MapObjType == MapObjectType.SobNpc)
                                                {
                                                    attackedsob = _obj as SobNpcSpawn;

                                                    if (ila.InLine(attackedsob.X, attackedsob.Y))
                                                    {
                                                        if (!CanAttack(attacker, attackedsob, spell))
                                                            continue;

                                                        uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob);
                                                        damage = (uint)(damage * spell.PowerPercent);
                                                        attack.Damage = damage;

                                                        ReceiveAttack( attacker, attackedsob, attack, damage, spell);

                                                        suse.Targets.Add(attackedsob.UID, damage);
                                                    }
                                                }
                                            }

                                            attacker.Owner.SendScreen(suse, true);
                                        }
                                        attacker.AttackPacket = null;
                                        break;
                                    }
Quote:
Originally Posted by go for it View Post
and do you expect that someone will be able to do it for you ?
there is no syntax errors and i duno what this methods contains to tell you what's wrong with them until i trace them
that's from trinity edited base (duno who's that stupid mf who coded it this way but anyway it's working pretty fine)
just pray it fit in your source
but to be honest , you need to learn programming which is way better than begging every once in a while for someone to code something for you or fix something for you , you want to play stupid ? be stupid stay stupid stay broke , sorry mate but this is the truth

Code:
case 0x288d:
{
                    if (CanUseSpell(spell, this.attacker.Owner))
                    {
                        ushort num29;
                        ushort num30;
                        if (attacker != null)
                        {
                            num29 = attacker.X;
                            num30 = attacker.Y;
                        }
                        else
                        {
                            num29 = sob.X;
                            num30 = sob.Y;
                        }
                        if (Kernel.GetDistance(this.attacker.X, this.attacker.Y, num29, num30) <= spell.Range)
                        {
                            if (((sob == null) && attacker.ContainsFlag(0x8000000L)) || this.attacker.ContainsFlag(0x8000000L))
                            {
                                return;
                            }
                            PrepareSpell(spell, this.attacker.Owner);
                            use = new SpellUse(true) {
                                Attacker = this.attacker.UID,
                                SpellID = spell.ID,
                                SpellLevel = spell.Level,
                                X = x,
                                Y = y
                            };
                            bool flag8 = false;
                            if (sob == null)
                            {
                                if (CanAttack(this.attacker, attacker, spell, this.attack.AttackType == 2))
                                {
                                    this.attack.Effect1 = Attack.AttackEffects1.None;
                                    power = Calculate.Melee(this.attacker, attacker, spell, ref this.attack);
                                    use.Effect1 = this.attack.Effect1;
                                    ReceiveAttack(this.attacker, attacker, this.attack, power, spell);
                                    use.Targets.Add(attacker.UID, power);
                                    flag8 = true;
                                }
                            }
                            else if (CanAttack(this.attacker, sob, spell))
                            {
                                this.attack.Effect1 = Attack.AttackEffects1.None;
                                power = (uint) (Calculate.Melee(this.attacker, sob, ref this.attack) * spell.PowerPercent);
                                ReceiveAttack(this.attacker, sob, this.attack, power, spell);
                                use.Effect1 = this.attack.Effect1;
                                use.Targets.Add(sob.UID, power);
                                flag8 = true;
                            }
                            if (flag8)
                            {
                                this.attacker.Owner.SendScreen(use, true);
                            }
                        }
                        else
                        {
                            this.attacker.AttackPacket = null;
                        }
                    }


this.attacker.Owner.IncreaseSpellExperience(experience, key);
            if (this.attacker.MapID == 0x40f)
            {
                if ((spell.ID == 0x1b59) || (spell.ID == 0x2694))
                {
                    this.attacker.AttackPacket = null;
                }
                else if (this.attacker.AttackPacket != null)
                {
                    this.attack.Damage = spell.ID;
                    this.attacker.AttackPacket = this.attack;
                    if (SpellTable.WeaponSpells.ContainsValue(spell.ID))
                    {
                        if (this.attacker.AttackPacket == null)
                        {
                            this.attack.AttackType = 2;
                            this.attacker.AttackPacket = this.attack;
                        }
                        else
                        {
                            this.attacker.AttackPacket.AttackType = 2;
                        }
                    }
                }
            }
            else if (spell.NextSpellID != 0)
            {
                if (((spell.NextSpellID >= 0x3e8) && (spell.NextSpellID <= 0x3ea)) && (uid >= 0xf4240))
                {
                    this.attacker.AttackPacket = null;
                }
                else
                {
                    this.attack.Damage = spell.NextSpellID;
                    this.attacker.AttackPacket = this.attack;
                }
            }
            else if (!(SpellTable.WeaponSpells.ContainsValue(spell.ID) && (spell.ID != 0x2694)))
            {
                this.attacker.AttackPacket = null;
            }
            else if (this.attacker.AttackPacket == null)
            {
                this.attack.AttackType = 2;
                this.attacker.AttackPacket = this.attack;
            }
            else
            {
                this.attacker.AttackPacket.AttackType = 2;
            }
}
go to for i know you good helper i know this work fine but i'm talk about my skill
i want fix it please i try alot but fail and i'm noob at C#
Code:
  //Radiant Palm 
                                    case 10381:
                                        // case 10315:
                                        {
                                            if (CanUseSpell(spell, attacker.Owner))
                                            {
                                                PrepareSpell(spell, attacker.Owner);
                                                Game.Attacking.InLineAlgorithm ila = new Conquer_Online_Server.Game.Attacking.InLineAlgorithm(attacker.X,
                                            X, attacker.Y, Y, (byte)spell.Range, InLineAlgorithm.Algorithm.DDA);
                                                SpellUse suse = new SpellUse(true);
                                                suse.Attacker = attacker.UID;
                                                suse.SpellID = SpellID;
                                                suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
                                                suse.X = X;
                                                suse.Y = Y;
                                                for (int c = 0; c < attacker.Owner.Screen.Objects.Length; c++)
                                                {
                                                    //For a multi threaded application, while we go through the collection
                                                    //the collection might change. We will make sure that we wont go off
                                                    //the limits with a check.
                                                    if (c >= attacker.Owner.Screen.Objects.Length)
                                                        break;
                                                    Interfaces.IMapObject _obj = attacker.Owner.Screen.Objects[c];
                                                    if (_obj == null)
                                                        continue;
                                                    if (_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Player)
                                                    {
                                                        attacked = _obj as Entity;
                                                        if (ila.InLine(attacked.X, attacked.Y))
                                                        {
                                                            if (!CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
                                                                continue;

                                                            uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, spell);

                                                            attack.Damage = damage;
                                                            // damage = ReceiveAttack(suse, attacker, attacked, attack, damage, spell);
                                                            ReceiveAttack( attacker, attacked, attack, damage, spell);

                                                            suse.Targets.Add(attacked.UID, damage);
                                                        }
                                                    }
                                                    else if (_obj.MapObjType == MapObjectType.SobNpc)
                                                    {
                                                        attackedsob = _obj as SobNpcSpawn;

                                                        if (ila.InLine(attackedsob.X, attackedsob.Y))
                                                        {
                                                            if (!CanAttack(attacker, attackedsob, spell))
                                                                continue;

                                                            uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob);
                                                            damage = (uint)(damage * spell.PowerPercent);
                                                            attack.Damage = damage;

                                                            ReceiveAttack( attacker, attackedsob, attack, damage, spell);

                                                            suse.Targets.Add(attackedsob.UID, damage);
                                                        }
                                                    }
                                                }

                                                attacker.Owner.SendScreen(suse, true);
                                            }
                                            attacker.AttackPacket = null;
                                            break;
                                        }
magnon is offline  
Reply




All times are GMT +1. The time now is 00:58.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.