عرض مشاركة واحدة
قديم 2020-02-04, 04:13 PM
المشاركة 5
ElSaher
.:: مشرف قسم المشاكل ::.
  • غير متواجد
افتراضي رد: تعديل علي ضربه RageofWar
اتفضل يصطي


كود:
                                #region RageOfWar[Stomper]
                                
case 12930:
                                    {
                                        if (
CanUseSpell(spellattacker.Owner))
                                        {
                                            
PrepareSpell(spellattacker.Owner);
                                            
InLineAlgorithm ila = new InLineAlgorithm(attacker.XXattacker.YY, (byte)spell.RangeInLineAlgorithm.Algorithm.DDA);
                                            
SpellUse suse = new SpellUse(true);
                                            
suse.Attacker attacker.UID;
                                            
suse.SpellID SpellID;
                                            
attacker.Stamina -= spell.UseStamina;
                                            
attacker.Stamina -= 15;
                                            
suse.SpellLevel attacker.Owner.Spells[SpellID].Level;
                                            
suse.X;
                                            
suse.Y;
                                            
ushort Xo1 0Yo1 0;
                                            foreach (
Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                                            {
                                                if (
_obj == null) continue;
                                                if (
_obj.MapObjType == MapObjectType.Entity)
                                                {
                                                    
attacked _obj as Entity;
                                                    if (
ila.InLine(attacked.Xattacked.Y))
                                                    {
                                                        if (!
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee)) continue;
                                                        
attack.Effect1 Attack.AttackEffects1.None;
                                                        
uint damage Game.Attacking.Calculate.Ranged(attackerattackedref attack);
                                                        if (
attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.King)
                                                        {
                                                            
damage = (uint)(damage 0.826);
                                                        }
                                                        if (
attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.Prince)
                                                        {
                                                            
damage = (uint)(damage 0.971);
                                                        }
                                                        if (
attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.Duke)
                                                        {
                                                            
damage = (uint)(damage 1.30);
                                                        }
                                                        if (
attacker.NobilityRank == ElSaher.Game.ConquerStructures.NobilityRank.Earl)
                                                        {
                                                            
damage = (uint)(damage 1.020);
                                                        }
                                                        
// damage = (uint)MathHelper.AdjustDataEx((int)damage, (int)spell.Power);
                                                        
suse.Effect1 attack.Effect1;
                                                        
attack.Damage damage;
                                                        
Xo1 attacked.X;
                                                        
Yo1 attacked.Y;
                                                        
suse.AddTarget(attacked.UIDdamageattack);
                                                        
ReceiveAttack(attackerattackedattackref damagespell);

                                                    }
                                                }
                                                else if (
_obj.MapObjType == MapObjectType.Monster)
                                                {
                                                    
attacked _obj as Entity;
                                                    if (
ila.InLine(attacked.Xattacked.Y))
                                                    {
                                                        if (!
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee)) continue;
                                                        
attack.Effect1 Attack.AttackEffects1.None;
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedref attackclient_Spell.LevelHu2);
                                                        
damage = (uint)(damage SkillsAttack.RageofWarMonsters);
                                                        
suse.Effect1 attack.Effect1;
                                                        
attack.Damage damage;
                                                        
Xo1 attacked.X;
                                                        
Yo1 attacked.Y;
                                                        
suse.AddTarget(attacked.UIDdamageattack);
                                                        
ReceiveAttack(attackerattackedattackref damagespell);

                                                    }
                                                }
                                                else if (
_obj.MapObjType == MapObjectType.SobNpc)
                                                {
                                                    
attackedsob _obj as SobNpcSpawn;
                                                    if (
ila.InLine(attackedsob.Xattackedsob.Y))
                                                    {
                                                        if (!
CanAttack(attackerattackedsobspell)) continue;
                                                        
attack.Effect1 Attack.AttackEffects1.None;
                                                        
uint damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);
                                                        
damage = (uint)(damage 3.4);
                                                        
suse.AddTarget(attackedsob.UIDdamageattack);
                                                        
ReceiveAttack(attackerattackedsobattackdamagespell);

                                                    }
                                                }
                                            }
                                            if (
Xo1 != && Yo1 != 0)
                                            {
                                                
FloorItem item = new FloorItem(true);
                                                
item.Owner attacker.Owner;
                                                
item.UID FloorItem.FloorUID.Next;
                                                
// item.MapObjType = MapObjectType.Item;
                                                
item.ItemID 1500;
                                                
item.= (ushort)(Xo1);
                                                
item.= (ushort)(Yo1);
                                                
item.Type 10;
                                                
item.mColor 14;
                                                
item.OwnerUID attacker.UID;
                                                
item.FlowerType 1;
                                                
item.Name "RageofWarTrap";
                                                
attacker.SendScreen(item);
                                                var 
map Kernel.Maps[attacker.MapID];
                                                while (
map.Npcs.ContainsKey(item.UID))
                                                    
item.UID Network.GamePackets.FloorItem.FloorUID.Next;
                                                
map.AddFloorItem(item);
                                            }
                                            
attacker.Owner.SendScreen(susetrue);
                                        }
                                        break;
                                    }
                                
#endregion 

وهتنحل انشاء الله