عرض مشاركة واحدة
قديم 2019-11-30, 02:30 PM
المشاركة 2
Rider
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكلة في فيزيكال الننجا وتربل المونك والبيرت [Source khaled v5]
Spell table


كود:
if (information.WeaponSubtype.Count != 0

بدل الي جواها ب دي

كود:
 switch (information.ID)
                {
                    case 
5010:
                    case 
7020:
                    case 
1290:
                    case 
1260:
                    case 
5030:
                    case 
5040:
                    case 
7000:
                    case 
7010:
                    case 
7030:
                    case 
7040:
                    case 
1250:
                    case 
5050:
                    case 
5020:
                    case 
10490:
                    case 
11140:
                    case 
1300:
                    case 
11990:
                    case 
12110:
                    case 
12240:
                    case 
12230:
                    case 
12220:
                    case 
12210:
                    case 
12570:
                    case 
12580:
                    case 
12590:
                    case 
12600:
                    case 
11230:
                    case 
13040:
                    case 
13050:
                        
//  if (spell.Distance >= 3)
                        //      spell.Distance = 3;
                        //  if (spell.Range > 3)
                        //      spell.Range = 3;
                        
for (int i 0information.WeaponSubtype.Counti++)
                        {
                            var 
subtype information.WeaponSubtype[i];
                            if (!
WeaponSpells.ContainsKey(subtype))
                                
WeaponSpells.Add(subtype, new List<ushort>());
                            if (!
WeaponSpells[subtype].Contains(information.ID))
                                
WeaponSpells[subtype].Add(information.ID);
                        }
                        break;
                } 

handle.cs
#region Melee


كود:
  #region Up - Down Sweep & Strike
                            
int rate 0;
                            if (
attacker.Owner.Spells.ContainsKey(10490)) rate 100 Database.SpellTable.GetSpell(10490attacker.Owner).Percent;
                            if (
Kernel.Rate(rate))
                            {
                                if (
attack.SpellID >= 12580 && attack.SpellID <= 12600 && attacker.EpicMonk())
                                {
                                    var 
spell Database.SpellTable.GetSpell(attack.SpellIDattacker.Owner);
                                    if (
spell != null)
                                    {
                                        
SpellUse suse = new SpellUse(true);

                                        
suse.Attacker attacker.UID;
                                        
suse.SpellID attack.SpellID;
                                        
suse.SpellLevel spell.ID;
                                        
suse.attacker.X;
                                        
suse.attacker.Y;
                                        
Fan fan = new Fan(attacker.Xattacker.Yattacked.Xattacked.Yspell.Rangespell.Sector);

                                        foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                        {
                                            if (
_obj == null) continue;
                                            if (
_obj.MapObjType == MapObjectType.Monster || _obj.MapObjType == MapObjectType.Entity)
                                            {
                                                
attacked _obj as Entity;
                                                if (
Kernel.GetDistance(attacker.Xattacker.Yattacked.Xattacked.Y) <= 7)
                                                {
                                                    if (
CanAttack(attackerattackednullattack.AttackType == Attack.Melee))
                                                    {
                                                        
attack.Effect1 Attack.AttackEffects1.None;
                                                        
uint damages Game.Attacking.Calculate.Melee(attackerattackedspellref attack);
                                                        
damages = (damages 22) / 100;
                                                        
attack.Attacked attacked.UID;
                                                        
attack.Damage damages;
                                                        
suse.Effect1 attack.Effect1;
                                                        
suse.AddTarget(_objdamagesattack);
                                                        
ReceiveAttack(attackerattackedattackref damagesnull);
                                                    }
                                                }
                                            }
                                        }
                                        
attacker.SendScreen(suse);
                                        
attacker.AttackPacket null;
                                        return;
                                    }
                                }
                            }
                            else if (
attacker.Owner.Spells.ContainsKey(10490) && attacker.Monk())
                            {
                                var 
spell Database.SpellTable.GetSpell(10490attacker.Owner);

                                if (
Kernel.Rate(spell.MonsterPower 55) && attacker.Owner.Spells.ContainsKey(12570) && attacker.EpicMonk())
                                {
                                    
spell Database.SpellTable.GetSpell(12570attacker.Owner);
                                    if (
CanUseSpell(spellattacker.Owner))
                                    {
                                        
PrepareSpell(spellattacker.Owner);
                                        
SpellUse suse2 = new SpellUse(true);
                                        
suse2.Attacker attacker.UID;
                                        
suse2.SpellID spell.ID;
                                        
suse2.SpellLevel spell.Level;
                                        if (
attacked != null)
                                        {
                                            
suse2.attacked.X;
                                            
suse2.attacked.Y;
                                        }
                                        else
                                        {
                                            
suse2.attackedsob.X;
                                            
suse2.attackedsob.Y;
                                        }
                                        
suse2.SpellEffect 1;
                                        foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                        {
                                            if (
_obj == null) continue;
                                            if (
_obj.MapObjType == MapObjectType.Monster)
                                            {
                                                
attacked _obj as Entity;
                                                if (
Kernel.GetDistance(attacker.Xattacker.Yattacked.Xattacked.Y) <= spell.Range)
                                                {
                                                    if (
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee))
                                                    {
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedspellref attack);
                                                        
damage = (damage 22) / 100;
                                                        
attack.Damage 0;
                                                        
ReceiveAttack(attackerattackedattackref damagespell);
                                                        
suse2.AddTarget(attackeddamageattack);
                                                    }
                                                }
                                            }
                                            else if (
_obj.MapObjType == MapObjectType.Entity)
                                            {
                                                
attacked _obj as Entity;
                                                if (
Kernel.GetDistance(attacker.Xattacker.Yattacked.Xattacked.Y) <= spell.Range)
                                                {
                                                    if (
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee))
                                                    {

                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedspellref attack);
                                                        
damage = (damage 22) / 100;
                                                        
attack.Damage 0;
                                                        
ReceiveAttack(attackerattackedattackref damagespell);
                                                        
suse2.AddTarget(attackeddamageattack);
                                                    }
                                                }
                                            }
                                            else if (
_obj.MapObjType == MapObjectType.SobNpc)
                                            {
                                                
attackedsob _obj as SobNpcSpawn;
                                                if (
Kernel.GetDistance(attacker.Xattacker.Yattackedsob.Xattackedsob.Y) <= spell.Range)
                                                {
                                                    if (
CanAttack(attackerattackedsobspell))
                                                    {
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);
                                                        
damage = (damage 22) / 100;
                                                        
attack.Damage 0;
                                                        
ReceiveAttack(attackerattackedsobattackdamagespell);
                                                        
suse2.AddTarget(attackedsobdamageattack);
                                                    }
                                                }
                                            }
                                        }
                                        
attacker.Owner.SendScreen(suse2true);
                                        
attacker.AttackPacket null;
                                        return;

                                    }
                                }
                                else
                                {
                                    if (
CanUseSpell(spellattacker.Owner))
                                    {
                                        
PrepareSpell(spellattacker.Owner);
                                        
TryTrip suse = new TryTrip(true);
                                        
suse.Attacker attacker.UID;
                                        
suse.SpellID spell.ID;
                                        
suse.SpellLevel spell.Level;
                                        
// if (Kernel.GetDistance(attacker.X, attacker.Y, X, Y) <= attacker.AttackRange + 1)
                                        
{
                                            if (
attackedsob != null)
                                            {
                                                if (
CanAttack(attackerattackedsobspell))
                                                {
                                                    
uint damage Calculate.Melee(attackerattackedsobref attack);
                                                    
damage = (damage 22) / 100;
                                                    
suse.Attacked attackedsob.UID;
                                                    
attack.Damage 0;
                                                    
suse.Damage damage;
                                                    
ReceiveAttack(attackerattackedsobattackdamagespell);
                                                    
attacker.Owner.SendScreen(susetrue);
                                                }
                                            }
                                            else
                                            {
                                                if (
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee))
                                                {
                                                    
uint damage Calculate.Melee(attackerattackedspellref attack);
                                                    
damage = (damage 22) / 100;
                                                    
suse.Attacked attacked.UID;
                                                    
suse.Damage damage;
                                                    
attack.Damage 0;
                                                    
ReceiveAttack(attackerattackedattackref damagespell);
                                                    
attacker.Owner.SendScreen(susetrue);
                                                }
                                            }
                                            
attacker.AttackPacket null; return;
                                        }
                                    }
                                }
                                
attacker.AttackPacket null;
                                return;
                            }
                            
#endregion