قديم 2019-07-27, 08:27 PM
المشاركة 2
محمد ياسر
*
  • غير متواجد
افتراضي رد: مشكله ؟
ابعت اسم الاسكله

قديم 2019-07-28, 06:07 AM
المشاركة 3
Tefa
.:: عضو خبير ::.
  • غير متواجد
Talking رد: مشكله ؟
Handle.cs

سيرش علي

كود:
public static bool CanAttack 

ضيف تحته

كود:
#region Clone Section
            
if (attacker.MyClones != null)
            {
                if (
attacker.MyClones.ContainsKey(attacked.UID))
                {
                    
//   attacker.Owner.Send(new Message("u Can't Kill Your Shadow Clone", System.Drawing.Color.Red, Message.TopLeft));

                    
return false;
                }
            }
            
#endregion 

الاسكله

كود:
 #region ShadowClone
                                
case 12090:
                                    {
                                        if (
attacker.Owner.Map.ID == 6565 || attacker.Owner.Map.ID == 5555 || attacker.Owner.Map.ID == 2014)
                                        {
                                            
Kernel.SendWorldMessage(new Message("Mr: " attacker.Name " You Can`t Use ThisSpell Here !!!"System.Drawing.Color.RedMessage.Talk), Program.Values);
                                            return;
                                        }
                                        
attacker.AttackPacket null;
                                        if (
attacker.MyClones.Count 0)
                                        {
                                            var 
clones attacker.MyClones.Values.ToArray();
                                            for (
int i 0clones.Lengthi++)
                                            {
                                                var 
item clones[i];
                                                if (
item == null)
                                                    continue;
                                                
Data data = new Data(true);
                                                
data.UID item.UID;
                                                
attacker.Stamina -= spell.UseStamina;
                                                
data.ID Network.GamePackets.Data.RemoveEntity;
                                                
attacker.Owner.SendScreen(data);
                                                
attacker.MyClones[item.UID] = null;
                                            }
                                            
attacker.MyClones.Clear();
                                        }
                                        else
                                        {
                                            if (
CanUseSpell(spellattacker.Owner))
                                            {
                                                
PrepareSpell(spellattacker.Owner);
                                                
SpellUse spellUse = new SpellUse(true);
                                                
spellUse.Attacker attacker.UID;
                                                
spellUse.SpellID spell.ID;
                                                
spellUse.SpellLevel spell.Level;
                                                
spellUse.X;
                                                
spellUse.Y;
                                                
attacker.AddClone(3);
                                                if (
spell.Level >= 4)
                                                    
attacker.AddClone(10003);
                                                foreach (var 
item in attacker.MyClones.Values)
                                                    
spellUse.AddTarget(item0attack);

                                                
attacker.Owner.SendScreen(spellUsetrue);
                                            }

                                        }
                                        break;
                                    }
                                
#endregion 

GameState.cs

سيرش علي

كود:
private void ShutDown() 

ضيف

كود:
 if (Entity.MyClones.Count 0)
                    {
                        foreach (var 
item in Entity.MyClones.Values)
                        {
                            
Data data = new Data(true);
                            
data.UID item.UID;
                            
data.ID Network.GamePackets.Data.RemoveEntity;
                            
item.MonsterInfo.SendScreen(data);
                        }
                        
Entity.MyClones.Clear();
                    } 

Entity.cs

ضيف

كود:
 public void AddClone(ushort cloneid)
        {
            
#region SpawnPacket(10014)

            
var Entity = new Entity(EntityFlag.Entitytrue);
            
Entity.MonsterInfo = new MonsterInformation();
            
MonsterInformation.MonsterInformations.TryGetValue(9003out Entity.MonsterInfo);
            
Entity.Owner Owner;
            
Entity.MonsterInfo.Owner Entity;
            
Entity.IsClone true;
            
Entity._Name "ShadowClone";
            
Entity.clan Name;
            
Entity.SpawnPacket = new byte[_Names _Name.Length 36];
            Array.
Copy(SpawnPacketEntity.SpawnPacketEntity.SpawnPacket.Length);
            
WriteStringList(new List<string>() { "ShadowClone"""""Name"" }, _NamesEntity.SpawnPacket);
            
Entity.Mesh Mesh;
            
Entity.Hitpoints 1;
            
Entity.UID Owner.Map.CloneCounter.Next;
            
Entity.GuildID Entity.GuildRank Entity.Action 0;
            
Entity.CountryID Enums.CountryID.Default;
            
Entity.StatusFlag Entity.StatusFlag2 Entity.StatusFlag3 Entity.StatusFlag4 0;
            
Writer.Write((uint)0Game.ConquerStructures.Equipment.SteedEntity.SpawnPacket);
            
Writer.Write((uint)0Game.ConquerStructures.Equipment.SteedPlusEntity.SpawnPacket);
            
Writer.Write((uint)0Game.ConquerStructures.Equipment.SteedColorEntity.SpawnPacket);
            
Writer.Write((uint)0Game.ConquerStructures.Equipment.MountArmorEntity.SpawnPacket);
            
Writer.Write((uint)0Game.ConquerStructures.Equipment.WingEntity.SpawnPacket);
            
Writer.Write((uint)0Game.ConquerStructures.Equipment.WingPlusEntity.SpawnPacket);
            
Entity.FlowerRank 0;
            
Entity.NobilityRank ConquerStructures.NobilityRank.Serf;
            
Entity.Class = Entity.FirstRebornClass Entity.SecondRebornClass Entity.JiangTalent Entity.SubClassesActive Entity.Reborn Entity.Level Entity.ServerID 0;
            
Writer.Write((byte)2271Entity.SpawnPacket);
            
Writer.Write(cloneid272Entity.SpawnPacket);
            
Entity.OwnerUID UID;
            
Entity.JiangActive false;
            
Writer.Write((uint)0178Entity.SpawnPacket);
            
Writer.Write((uint)0182Entity.SpawnPacket);
            
Writer.Write((uint)0186Entity.SpawnPacket);
            
Writer.Write((uint)0_UnionExploitsEntity.SpawnPacket);
            
Writer.Write((uint)0_UnionIDEntity.SpawnPacket);
            
Writer.Write((uint)0_UnionRankEntity.SpawnPacket);
            
Writer.Write((uint)0_UnionTypeEntity.SpawnPacket);
            
Writer.Write((uint)0_MyTitleEntity.SpawnPacket);
            
Writer.Write((uint)0_MyTitleScoreEntity.SpawnPacket);
            
Writer.Write((uint)0_MyWingEntity.SpawnPacket);
            
Entity.MinAttack MinAttack;
            
Entity.MaxAttack Entity.MagicAttack Math.Max(MinAttackMaxAttack);
            
Entity.Appearance Appearance;
            
Entity.MapID Owner.Map.ID;
            
Entity.SendUpdates true;

            
#endregion SpawnPacket(10014)

            #region Pet(2035)

            
MsgPetInfo pet = new MsgPetInfo();
            
pet.UID Entity.UID;
            
pet.PetID cloneid;
            
pet.PetType 2;
            
pet.Mesh Mesh;
            
pet.AttackRange = (byte)AttackRange;
            
pet.X;
            
pet.Y;
            
pet.Name "ShadowClone";
            
Owner.Send(pet);

            
#endregion Pet(2035)

            
MyClones.Add(Entity.UIDEntity);
            
Owner.SendScreen(Entity.SpawnPackettrue);
            
Owner.SendScreenSpawn(Entitytrue);

            
#region Data(10010)

            
Data data = new Data(true);
            
data.UID Entity.UID;
            
data.Facing Entity.Facing;
            
data.ID Data.AddEntity;
            
data.wParam1 Entity.X;
            
data.wParam2 Entity.Y;
            
Owner.Send(data);

            
#endregion Data(10010)
        


سيرش

كود:
public void Die( 

ضيف

كود:
if (MyClones.Count 0)
            {
                foreach (var 
item in MyClones.Values)
                {
                    
Data data = new Data(true);
                    
data.UID item.UID;
                    
data.ID Network.GamePackets.Data.RemoveEntity;
                    
item.MonsterInfo.SendScreen(data);
                }
                
MyClones.Clear();
            } 

سيرش
كود:
 if (Companion

ضيف

كود:
if (Owner.Entity.MyClones.ContainsKey(UID))
                {
                    
Owner.Entity.MyClones.Remove(UID);
                    return;
                } 

screen.cs

سيرش

كود:
foreach (GameState pClient in Kernel.GamePool.Values

ضيف

كود:
if (pClient.Entity.MyClones.Count 0)
                                {
                                    foreach (var clone 
in pClient.Entity.MyClones.Values)
                                    {
                                        if (clone == 
null) continue;
                                        if (
Kernel.GetDistance(clone.X, clone.YOwner.Entity.XOwner.Entity.Y) <= 18 && !Contains(clone.UID))
                                        {
                                            if (!clone.
Dead)
                                                clone.
SendSpawn(Owner);
                                        }
                                    }
                                } 

PacketHandler.cs

سيرش
كود:
case 2812

موجود امسحه و حط ده مش موجود ضيفه

كود:
#region Clone Attack
                
case 2812:
                    {
                        var 
attackd BitConverter.ReadUint(packet4);
                        var 
clonecount packet[8];
                        for (
int i 0clonecounti++)
                        {
                            var 
attackr BitConverter.ReadUint(packet+ (4));
                            if (
client.Entity.MyClones.Count clonecount)
                                return;
                            var 
attack client.Entity.AttackPacket;
                            if (
attack == null)
                                
attack = new GamePackets.Attack(true);
                            
attack.Attacker attackr;
                            
attack.Attacked attackd;

                            if (
client.Entity.MyClones.Count == 0)
                                return;
                            if (
attackd == client.Entity.UID || client.Entity.MyClones.ContainsKey(attackd))
                                return;
                            
KhaledMohamed.Database.SpellInformation MySpell null;
                            try
                            {
                                
MySpell Database.SpellTable.GetSpell(client.Spells[12090].IDclient.Spells[12090].Level);
                            }
                            catch { 
MySpell Database.SpellTable.GetSpell(120904); }
                            
Entity Clone = null;
                            if (
client.Entity.MyClones.TryGetValue(attackrout Clone))
                            {
                                
Entity attacked null;
                                
SobNpcSpawn attackedsob null;
                                if (
client.Screen.TryGetValue(attackdout attacked))
                                {
                                    
uint damage 0;
                                    var 
spell Database.SpellTable.GetSpell(attack.MagicType, (byte)attack.MagicLevel);
                                    if (
spell == null)
                                        
spell Database.SpellTable.GetSpell(120800);
                                    if (
attack.AttackType == GamePackets.Attack.Melee)
                                    {
                                        if (
Game.Attacking.Handle.CanAttack(client.Entityattackedspelltrue))
                                        {
                                            
damage Game.Attacking.Calculate.Melee(client.Entityattackedspellref attack);
                                            
double power = (0.5);
                                            
damage = (uint)((double)damage power 8);
                                            
Game.Attacking.Handle.ReceiveAttack(Clone, attackedattackref damagespell);
                                            
attack.Damage damage;
                                            
client.SendScreen(attack);
                                        }
                                    }
                                    else
                                    {
                                        if (
Game.Attacking.Handle.CanAttack(client.Entityattackedspellfalse))
                                        {
                                            
damage Game.Attacking.Calculate.Magic(client.Entityattackedspellref attack);
                                            
double power = (0.5);
                                            
damage = (uint)((double)damage power 8);
                                            
Game.Attacking.Handle.ReceiveAttack(Clone, attackedattackref damagespell);
                                            
attack.Damage damage;
                                            
client.SendScreen(attack);
                                        }
                                    }
                                    
SpellUse suse = new SpellUse(true);
                                    
suse.Attacker = Clone.UID;
                                    
suse.SpellID spell.ID;
                                    
suse.SpellLevel spell.Level;
                                    
suse.attacked.X;
                                    
suse.attacked.Y;
                                    
suse.Effect1 attack.Effect1;
                                    
suse.AddTarget(attackeddamageattack);
                                    
client.SendScreen(susetrue);
                                    if (
client.Account.State == KhaledMohamed.Database.AccountTable.AccountState.ProjectManager)
                                        
client.Send(new Message("Clone Attack With  Skill: " spell.NameSystem.Drawing.Color.CadetBlueMessage.Talk));

                                }
                                else if (
client.Screen.TryGetSob(attackdout attackedsob))
                                {
                                    
uint damage 0;
                                    var 
spell Database.SpellTable.GetSpell(attack.MagicType, (byte)attack.MagicLevel);
                                    if (
spell == null)
                                        
spell Database.SpellTable.GetSpell(120800);
                                    if (
attack.AttackType == GamePackets.Attack.Melee)
                                    {
                                        if (
Game.Attacking.Handle.CanAttack(client.Entityattackedsobnull))
                                        {
                                            
damage Game.Attacking.Calculate.Melee(client.Entityattackedsobref attack);
                                            
double power = ((MySpell.Power 100.0) / 100.0);
                                            
damage = (uint)((double)damage power);
                                            
Game.Attacking.Handle.ReceiveAttack(Clone, attackedsobattackdamagenull);
                                            
attack.Damage damage;
                                            
client.SendScreen(attack);
                                        }
                                    }
                                    else
                                    {
                                        if (
Game.Attacking.Handle.CanAttack(client.Entityattackedsobspell))
                                        {
                                            
damage Game.Attacking.Calculate.Magic(client.Entityattackedsobspellref attack);
                                            
double power = ((MySpell.Power 100.0) / 100.0);
                                            
damage = (uint)((double)damage power);
                                            
Game.Attacking.Handle.ReceiveAttack(Clone, attackedsobattackdamagespell);
                                            
attack.Damage damage;
                                            
client.SendScreen(attack);
                                        }
                                    }
                                    
SpellUse suse = new SpellUse(true);
                                    
suse.Attacker = Clone.UID;
                                    
suse.SpellID spell.ID;
                                    
suse.SpellLevel spell.Level;
                                    
suse.attackedsob.X;
                                    
suse.attackedsob.Y;
                                    
suse.Effect1 attack.Effect1;
                                    
suse.AddTarget(attackedsobdamageattack);
                                    
client.SendScreen(susetrue);
                                    if (
client.Account.State == KhaledMohamed.Database.AccountTable.AccountState.ProjectManager)
                                        
client.Send(new Message("Clone Attack With  Skill: " spell.NameSystem.Drawing.Color.CadetBlueMessage.Talk));

                                }
                            }
                        }
                        break;
                    }
                
#endregion 

سيرش

كود:
 if (!client.Entity.HasMagicDefender

تحت قفلة القوس بتاعت Else
{

}
ضيف

كود:
if (client.Entity.MyClones.Count 0)
            {
                foreach (var clone 
in client.Entity.MyClones.Values)
                {
                    clone.
client.Entity.X;
                    clone.
client.Entity.Y;
                }
            } 


قديم 2019-07-28, 07:41 AM
المشاركة 4
taha
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكله ؟
تمام ادى اسم الاسكلايه
ShadowClone

قديم 2019-07-28, 07:56 AM
المشاركة 5
taha
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكله ؟
قولى كل حاجه هتتحط فين بالظبط وتحت ايه يا ريدار

قديم 2019-07-28, 08:58 AM
المشاركة 6
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكله ؟
قولى كل حاجه هتتحط فين بالظبط وتحت ايه يا ريدار
Handle.cs
كل الي تحته هيتضاف في نفس الكلاس
لحد ما تلاقي كلمه تانيه و انا ملونهالك بالاحمر عشان تشوفها

كل كلاس انا كاتبه كل الي تحته هيتضاف فيه

قديم 2019-07-28, 10:12 AM
المشاركة 7
taha
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكله ؟
ماشى ابحث على ايه واضيف الحجات دى تحتها

قديم 2019-07-28, 10:34 AM
المشاركة 8
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكله ؟
هتلاقي و الله في الموضوع لو كلفت نفسك و قراتش مكتوب سيرش = ابحث عن

قديم 2019-07-28, 10:46 AM
المشاركة 9
taha
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكله ؟
ابحث عن ؟

قديم 2019-07-28, 10:56 AM
المشاركة 10
Tefa
.:: عضو خبير ::.
  • غير متواجد
افتراضي رد: مشكله ؟
اسف لو طريقة شرحي وحشه لو مفهمتش ان شاء الله حازم اول ما ييجي هيشرحلك بطريقه اسهل بس يا ريت توضح اذا كنت فهمت ولا لا


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



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

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



الساعة الآن 04:27 PM

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