عرض مشاركة واحدة
قديم 2019-11-30, 09:28 PM
المشاركة 3
youssefabdelmanam
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكلة في فيزيكال الننجا وتربل المونك والبيرت [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 
اشكرك جدا الحل نافع