قديم 2019-07-29, 05:33 PM
المشاركة 2
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: Problem hhh
زيت سلاحين النينجا هههههه

Handle.cs
ابحث عن

كود:
private void TwilightAction

بدله

كود:
 private void TwilightAction(Entity attackerSpellUse suseSpellInformation spellushort Xushort Y)
        {
            
byte dist 18;
            var 
map attacker.Owner.Map;

            var 
algo = new InLineAlgorithm(attacker.XXattacker.YYdist);

            var 
count = (double)algo.lcoords.Count 3;
            
int i 1;
            
Program.World.DelayedTask.StartDelayedTask(() =>
            {
                var 
selected * (int)count;
                
selected Math.Min(algo.lcoords.Count 1selected);
                
= (ushort)algo.lcoords[selected].X;
                
= (ushort)algo.lcoords[selected].Y;


                
FloorItem floorItem = new FloorItem(true);
                
floorItem.ItemID FloorItem.Twilight;
                
floorItem.ItemColor = (Enums.Color)(1);
                
floorItem.MapID attacker.MapID;
                
floorItem.Type FloorItem.Effect;
                
floorItem.X;
                
floorItem.Y;
                
floorItem.OnFloor Time32.Now;
                
floorItem.Owner attacker.Owner;
                while (
map.Npcs.ContainsKey(floorItem.UID))
                    
floorItem.UID Network.GamePackets.FloorItem.FloorUID.Next;
                
map.AddFloorItem(floorItem);

                
attacker.Owner.SendScreenSpawn(floorItemtrue);

                if (
!= 0)
                {
                    
Data data = new Network.GamePackets.Data(true);
                    
data.UID attacker.UID;
                    
data.X;
                    
data.Y;
                    
data.ID 434;
                    
data.wParam1 attacker.X;
                    
data.wParam2 attacker.Y;
                    
attacker.Owner.SendScreen(datatrue);

                    
//double percent = 1;
                    //switch (i)
                    //{
                    //    case 1:
                    //        percent = 0.92;
                    //        break;
                    //    case 2:
                    //        percent = 1.02;
                    //        break;
                    //    case 3:
                    //        percent = 1.2;
                    //        break;
                    //}


                    
foreach (Interfaces.IMapObject _obj in attacker.Owner.Screen.Objects)
                    {
                        
bool hit false;
                        var 
selected2 Math.Max(01) * (int)count;
                        
selected2 Math.Min(algo.lcoords.Count 1selected2);
                        if (
Kernel.GetDistance(_obj.X_obj.Y, (ushort)algo.lcoords[selected].X, (ushort)algo.lcoords[selected].Y) <= 3)
                            
hit true;
                        
//for (int j = selected2; j < selected; j++)
                        //    if (Kernel.GetDistance(_obj.X, _obj.Y, (ushort)algo.lcoords[j].X, (ushort)algo.lcoords[j].Y) <= spell.Range)
                        //        hit = true;
                        
if (hit)
                        {
                            if (
_obj.MapObjType == MapObjectType.Monster)
                            {
                                
attacked _obj as Entity;
                                if (
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee))
                                {
                                    var 
damage Game.Attacking.Calculate.Melee(attackerattackedspellref attack);
                                    
damage = (uint)(damage SkillsAttack.TwilightDanceMonsters);
                                    
ReceiveAttack(attackerattackedattackref damagespell);

                                    
suse.AddTarget(attackeddamageattack);
                                }
                            }
                            else if (
_obj.MapObjType == MapObjectType.Entity)
                            {
                                
attacked _obj as Entity;
                                if (
CanAttack(attackerattackedspellattack.AttackType == Attack.Melee))
                                {
                                    var 
damage Game.Attacking.Calculate.Melee(attackerattackedspellref attack);
                                    
damage = (uint)(damage SkillsAttack.TwilightDancePlayers);
                                    
// damage = (uint)(damage * 0.6);
                                    //damage = (uint)((double)(damage * percent));
                                    
ReceiveAttack(attackerattackedattackref damagespell);

                                    
suse.AddTarget(attackeddamageattack);
                                }
                            }
                            else if (
_obj.MapObjType == MapObjectType.SobNpc)
                            {
                                var 
attackedsob _obj as SobNpcSpawn;
                                if (
CanAttack(attackerattackedsobspell))
                                {
                                    var 
damage Game.Attacking.Calculate.Melee(attackerattackedsobref attack);
                                    
damage = (uint)(damage SkillsAttack.TwilightDancePoles);
                                    
ReceiveAttack(attackerattackedsobattackdamagespell);

                                    
suse.AddTarget(attackedsobdamageattack);
                                }
                            }
                        }
                    }
                    if (
suse.Targets.Count 0)
                        
attacker.Owner.SendScreen(susetrue);
                    
suse.Targets.Clear();
                }
                
i++;
            }, 
02500);
        } 



العلامات المرجعية



الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 
أدوات الموضوع

الانتقال السريع

المواضيع المتشابهه للموضوع: Problem hhh
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
account password not same no login problem marcbacor مشكلات السيرفيرات كونكر الشخصيه 13 2019-10-23 11:34 AM


الساعة الآن 03:17 PM

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.