منتدي اكواد

منتدي اكواد (https://code.vpscairo.com/index.php)
-   تطوير سيرفرات كونكر (https://code.vpscairo.com/forumdisplay.php?f=11)
-   -   حل مشكلة ان الاميل بيرقص لما يبندرب بي اسكلت SuperTwofoldBlade (https://code.vpscairo.com/showthread.php?t=3575)

ElSaher 2020-02-04 01:08 AM

حل مشكلة ان الاميل بيرقص لما يبندرب بي اسكلت SuperTwofoldBlade
 

ناس كتير هيقبلها المشكلة دي احل مشكلة ان الاميل بيرقص لما يبندرب بي اسكلت SuperTwofoldBlade
الحل اهو

هتبحث عن الايديه بتاع الاسكلت في Handle
كود PHP:

12080 

هقفلها بي السالب وتغيرها بدي
كود PHP:

                                #region SuperTwofoldBlade
                                
case 12080:
                                    {
                                        if (
Time32.Now >= attacker.SpellStamp.AddMilliseconds(500))
                                        {
                                            if (
CanUseSpell(spell, attacker.Owner))
                                            {
                                                
ushort Xx, Yx;
                                                if (
attacked != null)
                                                {
                                                    
Xx = attacked.X;
                                                    
Yx = attacked.Y;
                                                }
                                                else
                                                {
                                                    
Xx = attackedsob.X;
                                                    
Yx = attackedsob.Y;
                                                }
                                                if (
Kernel.GetDistance(attacker.X, attacker.Y, Xx, Yx) <= 5)
                                                {
                                                    if (
attackedsob == null)
                                                        if (
attacked.ContainsFlag(Update.Flags.Fly))
                                                            return;
                                                    if (
attacker.ContainsFlag(Update.Flags.Fly))
                                                        return;
                                                    
PrepareSpell(spell, attacker.Owner);

                                                    
SpellUse suse = new SpellUse(true);
                                                    
suse.Attacker = attacker.UID;
                                                    
suse.SpellID = spell.ID;
                                                    
suse.SpellLevel = spell.Level;
                                                    
suse.X = X;
                                                    
suse.Y = Y;
                                                    
bool send = false;

                                                    if (
attackedsob == null)
                                                    {
                                                        if (
CanAttack(attacker, attacked, spell, attack.AttackType == Attack.Melee))
                                                        {
                                                            
attack.Effect1 = Attack.AttackEffects1.None;
                                                            
uint damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
                                                            if (
attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.King)
                                                            {
                                                                
damage = (uint)(damage * 1.750);
                                                            }
                                                            if (
attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.Prince)
                                                            {
                                                                
damage = (uint)(damage * 1.600);
                                                            }
                                                            if (
attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.Duke)
                                                            {
                                                                
damage = (uint)(damage * 1.600);
                                                            }
                                                            
suse.Effect1 = attack.Effect1;
                                                            
ReceiveAttack(attacker, attacked, attack, ref damage, spell);

                                                            
suse.AddTarget(attacked, damage, attack);
                                                            
send = true;

                                                            if (
attacker.Owner.Spells.ContainsKey(0) && !attacked.Dead)
                                                            {
                                                                var 
s = attacker.Owner.Spells[0];
                                                                var 
spellz = Database.SpellTable.SpellInformations[s.ID][s.Level];
                                                                if (
spellz != null)
                                                                {
                                                                    if (
Kernel.Rate(spellz.Percent))
                                                                    {
                                                                        
SpellUse ssuse = new SpellUse(true);
                                                                        
ssuse.Attacker = attacker.UID;
                                                                        
ssuse.SpellID = spellz.ID;

                                                                        
ssuse.SpellLevel = spellz.Level;
                                                                        
damage = Game.Attacking.Calculate.Melee(attacker, attacked, ref attack);
                                                                        
ssuse.AddTarget(attacked, new SpellUse.DamageClass().Damage = damage, attack);
                                                                        
ReceiveAttack(attacker, attacked, attack, ref damage, spell);
                                                                        
attacker.Owner.SendScreen(ssuse, true);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                    else
                                                    {
                                                        if (
CanAttack(attacker, attackedsob, spell))
                                                        {
                                                            
attack.Effect1 = Attack.AttackEffects1.None;
                                                            
uint damage = Game.Attacking.Calculate.Melee(attacker, attackedsob, ref attack);
                                                            
damage = (uint)(damage * 180 / 100);
                                                            
ReceiveAttack(attacker, attackedsob, attack, damage, spell);
                                                            
suse.Effect1 = attack.Effect1;

                                                            
suse.AddTarget(attackedsob, damage, attack);
                                                            
send = true;
                                                        }
                                                    }
                                                    if (
send)
                                                        
attacker.Owner.SendScreen(suse, true);
                                                    
attacker.SpellStamp = Time32.Now;
                                                }
                                                else
                                                {
                                                    
attacker.AttackPacket = null;
                                                }
                                            }
                                        }
                                        break;
                                    }


                                
#endregion 

حل 6ايرور هيجيلك
هتبدل ElSaher بي اسم البروجكت بتاعك
زبكدا يكون تم حل المشكلة


الساعة الآن 03:58 AM

مرحبا بكم في منتدي اكواد لتطوير الالعاب