|
#region Entitys
#region Entitys
CleanUp(spawnWith);
if (Owner.Entity.MapID == 1002)
{
foreach (var statue in Game.Statue.Statues.Values)
{
if (statue > Owner)
{
Statue.TryAdd(statue.UID, statue);
}
else if (statue < Owner)
{
Game.Statue astatue;
Statue.TryRemove(statue.UID, out astatue);
}
}
}
else
{
if (Statue.Count > 0)
Statue.Clear();
}
foreach (GameState pClient in Kernel.GamePool.Values)
{
if (pClient == null) return;
if (pClient.Entity == null) return;
if (Owner == null) return;
if (Owner.Entity == null) return;
if (pClient.Entity.UID != Owner.Entity.UID)
{
if (pClient.Map.ID == Owner.Map.ID)
{
short dist = Kernel.GetDistance(pClient.Entity.X, pClient.Entity.Y, Owner.Entity.X, Owner.Entity.Y);
if (dist <= Constants.pScreenDistance && !Contains(pClient.Entity))
{
if (pClient.Guild != null)
pClient.Guild.SendName(Owner);
if (Owner.Guild != null)
Owner.Guild.SendName(pClient);
if (pClient.Entity.InteractionInProgress && pClient.Entity.InteractionWith != Owner.Entity.UID && pClient.Entity.InteractionSet)
{
if (pClient.Entity.Body == 1003 || pClient.Entity.Body == 1004)
{
if (pClient.Entity.InteractionX == pClient.Entity.X && pClient.Entity.Y == pClient.Entity.InteractionY)
{
Network.GamePackets.Attack atak = new KhaledMohamed.Network.GamePackets.Attack(true);
atak.Attacker = pClient.Entity.UID;
atak.Attacked = pClient.Entity.InteractionWith;
atak.X = pClient.Entity.X;
atak.Y = pClient.Entity.Y;
atak.AttackType = 49;
atak.Damage = pClient.Entity.InteractionType;
Owner.Send(atak);
}
}
else
{
if (KhaledMohamed.Kernel.GamePool.ContainsKey(pClient.Entity.InteractionWith))
{
Client.GameState Cs = KhaledMohamed.Kernel.GamePool[pClient.Entity.InteractionWith] as Client.GameState;
if (Cs.Entity.X == pClient.Entity.InteractionX && pClient.Entity.Y == pClient.Entity.InteractionY)
{
Network.GamePackets.Attack atak = new KhaledMohamed.Network.GamePackets.Attack(true);
atak.Attacker = pClient.Entity.UID;
atak.Attacked = pClient.Entity.InteractionWith;
atak.X = pClient.Entity.X;
atak.Y = pClient.Entity.Y;
atak.AttackType = 49;
atak.Damage = pClient.Entity.InteractionType;
Owner.Send(atak);
}
}
}
}
if (pClient.Map.BaseID == 700)
{
if (Owner.InQualifier())
{
if (pClient.InQualifier())
{
Owner.Entity.SendSpawn(pClient);
pClient.Entity.SendSpawn(Owner);
if (pClient.Guild != null)
Owner.Entity.SendSpawn(pClient, false);
if (Owner.Guild != null)
pClient.Entity.SendSpawn(Owner, false);
if (spawnWith != null)
pClient.Send(spawnWith);
}
else
{
Owner.Entity.SendSpawn(pClient);
if (pClient.Guild != null)
Owner.Entity.SendSpawn(pClient, false);
Add(pClient.Entity);
if (spawnWith != null)
pClient.Send(spawnWith);
}
}
else
{
if (pClient.InQualifier())
{
pClient.Entity.SendSpawn(Owner);
if (Owner.Guild != null)
pClient.Entity.SendSpawn(Owner, false);
pClient.Screen.Add(Owner.Entity);
if (spawnWith != null)
Owner.Send(spawnWith);
}
else
{
Owner.Entity.SendSpawn(pClient);
pClient.Entity.SendSpawn(Owner);
if (pClient.Guild != null)
Owner.Entity.SendSpawn(pClient, false);
if (Owner.Guild != null)
pClient.Entity.SendSpawn(Owner, false);
if (spawnWith != null)
pClient.Send(spawnWith);
}
}
}
else
{
Owner.Entity.SendSpawn(pClient);
pClient.Entity.SendSpawn(Owner);
if (pClient.Guild != null)
Owner.Entity.SendSpawn(pClient, false);
if (Owner.Guild != null)
pClient.Entity.SendSpawn(Owner, false);
if (spawnWith != null)
pClient.Send(spawnWith);
}
#region Other Pet & Clones
if (pClient.Entity.MyClones.Count > 0)
{
foreach (var clone in pClient.Entity.MyClones.Values)
{
if (clone == null) continue;
if (Kernel.GetDistance(clone.X, clone.Y, Owner.Entity.X, Owner.Entity.Y) <= 18 && !Contains(clone.UID))
{
if (!clone.Dead)
clone.SendSpawn(Owner);
}
}
}
if (pClient.Pet.Pets.Count > 0)
{
foreach (var pet in pClient.Pet.Pets.Values)
{
if (pet == null) continue;
if (pet.Entity == null) continue;
if (Kernel.GetDistance(pet.Entity.X, pet.Entity.Y, Owner.Entity.X, Owner.Entity.Y) <= 18 && !Contains(pet.Entity.UID))
{
if (!pet.Entity.Dead)
pet.Entity.SendSpawn(Owner);
}
}
}
#endregion
}
}
}
}
#region My Pet & Clones
if (Owner.Entity.MyClones.Count > 0)
{
foreach (var clone in Owner.Entity.MyClones.Values)
{
if (clone == null) continue;
if (Kernel.GetDistance(clone.X, clone.Y, Owner.Entity.X, Owner.Entity.Y) <= 18 && !Contains(clone.UID))
{
if (!clone.Dead)
clone.SendSpawn(Owner);
}
}
}
if (Owner.Pet.Pets.Count > 0)
{
foreach (var pet in Owner.Pet.Pets.Values)
{
if (pet == null) continue;
if (pet.Entity == null) continue;
if (Kernel.GetDistance(pet.Entity.X, pet.Entity.Y, Owner.Entity.X, Owner.Entity.Y) <= 18/* && !Contains(pet.Entity.UID)*/)
{
if (!pet.Entity.Dead)
Owner.Send(pet.Entity.SpawnPacket);
// pet.Entity.SendSpawn(Owner, false);
}
}
}
#endregion
#endregion
#region Entitys
#region Entitys
CleanUp(spawnWith);
if (Owner.Entity.MapID == 1002)
{
foreach (var statue in Game.Statue.Statues.Values)
{
if (statue > Owner)
{
Statue.TryAdd(statue.UID, statue);
}
else if (statue < Owner)
{
Game.Statue astatue;
Statue.TryRemove(statue.UID, out astatue);
}
}
}
else
{
if (Statue.Count > 0)
Statue.Clear();
}
foreach (GameState pClient in Kernel.GamePool.Values)
{
if (pClient == null) return;
if (pClient.Entity == null) return;
if (Owner == null) return;
if (Owner.Entity == null) return;
if (pClient.Entity.UID != Owner.Entity.UID)
{
if (pClient.Map.ID == Owner.Map.ID)
{
short dist = Kernel.GetDistance(pClient.Entity.X, pClient.Entity.Y, Owner.Entity.X, Owner.Entity.Y);
if (dist <= Constants.pScreenDistance && !Contains(pClient.Entity))
{
if (pClient.Guild != null)
pClient.Guild.SendName(Owner);
if (Owner.Guild != null)
Owner.Guild.SendName(pClient);
if (pClient.Entity.InteractionInProgress && pClient.Entity.InteractionWith != Owner.Entity.UID && pClient.Entity.InteractionSet)
{
if (pClient.Entity.Body == 1003 || pClient.Entity.Body == 1004)
{
if (pClient.Entity.InteractionX == pClient.Entity.X && pClient.Entity.Y == pClient.Entity.InteractionY)
{
Network.GamePackets.Attack atak = new KhaledMohamed.Network.GamePackets.Attack(true);
atak.Attacker = pClient.Entity.UID;
atak.Attacked = pClient.Entity.InteractionWith;
atak.X = pClient.Entity.X;
atak.Y = pClient.Entity.Y;
atak.AttackType = 49;
atak.Damage = pClient.Entity.InteractionType;
Owner.Send(atak);
}
}
else
{
if (KhaledMohamed.Kernel.GamePool.ContainsKey(pClient.Entity.InteractionWith))
{
Client.GameState Cs = KhaledMohamed.Kernel.GamePool[pClient.Entity.InteractionWith] as Client.GameState;
if (Cs.Entity.X == pClient.Entity.InteractionX && pClient.Entity.Y == pClient.Entity.InteractionY)
{
Network.GamePackets.Attack atak = new KhaledMohamed.Network.GamePackets.Attack(true);
atak.Attacker = pClient.Entity.UID;
atak.Attacked = pClient.Entity.InteractionWith;
atak.X = pClient.Entity.X;
atak.Y = pClient.Entity.Y;
atak.AttackType = 49;
atak.Damage = pClient.Entity.InteractionType;
Owner.Send(atak);
}
}
}
}
if (pClient.Map.BaseID == 700)
{
if (Owner.InQualifier())
{
if (pClient.InQualifier())
{
Owner.Entity.SendSpawn(pClient);
pClient.Entity.SendSpawn(Owner);
if (pClient.Guild != null)
Owner.Entity.SendSpawn(pClient, false);
if (Owner.Guild != null)
pClient.Entity.SendSpawn(Owner, false);
if (spawnWith != null)
pClient.Send(spawnWith);
}
else
{
Owner.Entity.SendSpawn(pClient);
if (pClient.Guild != null)
Owner.Entity.SendSpawn(pClient, false);
Add(pClient.Entity);
if (spawnWith != null)
pClient.Send(spawnWith);
}
}
else
{
if (pClient.InQualifier())
{
pClient.Entity.SendSpawn(Owner);
if (Owner.Guild != null)
pClient.Entity.SendSpawn(Owner, false);
pClient.Screen.Add(Owner.Entity);
if (spawnWith != null)
Owner.Send(spawnWith);
}
else
{
Owner.Entity.SendSpawn(pClient);
pClient.Entity.SendSpawn(Owner);
if (pClient.Guild != null)
Owner.Entity.SendSpawn(pClient, false);
if (Owner.Guild != null)
pClient.Entity.SendSpawn(Owner, false);
if (spawnWith != null)
pClient.Send(spawnWith);
}
}
}
else
{
Owner.Entity.SendSpawn(pClient);
pClient.Entity.SendSpawn(Owner);
if (pClient.Guild != null)
Owner.Entity.SendSpawn(pClient, false);
if (Owner.Guild != null)
pClient.Entity.SendSpawn(Owner, false);
if (spawnWith != null)
pClient.Send(spawnWith);
}
#region Other Pet & Clones
if (pClient.Entity.MyClones.Count > 0)
{
foreach (var clone in pClient.Entity.MyClones.Values)
{
if (clone == null) continue;
if (Kernel.GetDistance(clone.X, clone.Y, Owner.Entity.X, Owner.Entity.Y) <= 18 && !Contains(clone.UID))
{
if (!clone.Dead)
clone.SendSpawn(Owner);
}
}
}
if (pClient.Pet.Pets.Count > 0)
{
foreach (var pet in pClient.Pet.Pets.Values)
{
if (pet == null) continue;
if (pet.Entity == null) continue;
if (Kernel.GetDistance(pet.Entity.X, pet.Entity.Y, Owner.Entity.X, Owner.Entity.Y) <= 18 && !Contains(pet.Entity.UID))
{
if (!pet.Entity.Dead)
pet.Entity.SendSpawn(Owner);
}
}
}
#endregion
}
}
}
}
#region My Pet & Clones
if (Owner.Entity.MyClones.Count > 0)
{
foreach (var clone in Owner.Entity.MyClones.Values)
{
if (clone == null) continue;
if (Kernel.GetDistance(clone.X, clone.Y, Owner.Entity.X, Owner.Entity.Y) <= 18 && !Contains(clone.UID))
{
if (!clone.Dead)
clone.SendSpawn(Owner);
}
}
}
if (Owner.Pet.Pets.Count > 0)
{
foreach (var pet in Owner.Pet.Pets.Values)
{
if (pet == null) continue;
if (pet.Entity == null) continue;
if (Kernel.GetDistance(pet.Entity.X, pet.Entity.Y, Owner.Entity.X, Owner.Entity.Y) <= 18/* && !Contains(pet.Entity.UID)*/)
{
if (!pet.Entity.Dead)
Owner.Send(pet.Entity.SpawnPacket);
// pet.Entity.SendSpawn(Owner, false);
}
}
}
#endregion
#endregion
#region Other Pet & Clones
if (pClient.Entity.MyClones.Count > 0)
{
foreach (var clone in pClient.Entity.MyClones.Values)
{
if (clone == null) continue;
if (Kernel.GetDistance(clone.X, clone.Y, Owner.Entity.X, Owner.Entity.Y) <= 18 && !Contains(clone.UID))
{
if (!clone.Dead)
clone.SendSpawn(Owner);
}
}
}
if (pClient.Pet.Pets.Count > 0)
{
foreach (var pet in pClient.Pet.Pets.Values)
{
if (pet == null) continue;
if (pet.Entity == null) continue;
if (Kernel.GetDistance(pet.Entity.X, pet.Entity.Y, Owner.Entity.X, Owner.Entity.Y) <= 18 && !Contains(pet.Entity.UID))
{
if (!pet.Entity.Dead)
pet.Entity.SendSpawn(Owner);
}
}
}
#endregion
}
}
}
}
#region My Pet & Clones
if (Owner.Entity.MyClones.Count > 0)
{
foreach (var clone in Owner.Entity.MyClones.Values)
{
if (clone == null) continue;
if (Kernel.GetDistance(clone.X, clone.Y, Owner.Entity.X, Owner.Entity.Y) <= 18 && !Contains(clone.UID))
{
if (!clone.Dead)
clone.SendSpawn(Owner);
}
}
}
if (Owner.Pet.Pets.Count > 0)
{
foreach (var pet in Owner.Pet.Pets.Values)
{
if (pet == null) continue;
if (pet.Entity == null) continue;
if (Kernel.GetDistance(pet.Entity.X, pet.Entity.Y, Owner.Entity.X, Owner.Entity.Y) <= 18/* && !Contains(pet.Entity.UID)*/)
{
if (!pet.Entity.Dead)
Owner.Send(pet.Entity.SpawnPacket);
// pet.Entity.SendSpawn(Owner, false);
}
}
}
#endregion
#endregion
#region other pet & clones
if (pclient.entity.myclones.count > 0)
{
foreach (var clone in pclient.entity.myclones.values)
{
if (clone == null) continue;
if (kernel.getdistance(clone.x, clone.y, owner.entity.x, owner.entity.y) <= 18 && !contains(clone.uid))
{
if (!clone.dead)
clone.sendspawn(owner);
}
}
}
if (pclient.pet.pets.count > 0)
{
foreach (var pet in pclient.pet.pets.values)
{
if (pet == null) continue;
if (pet.entity == null) continue;
if (kernel.getdistance(pet.entity.x, pet.entity.y, owner.entity.x, owner.entity.y) <= 18 && !contains(pet.entity.uid))
{
if (!pet.entity.dead)
pet.entity.sendspawn(owner);
}
}
}
#endregion
}
}
}
}
#region my pet & clones
if (owner.entity.myclones.count > 0)
{
foreach (var clone in owner.entity.myclones.values)
{
if (clone == null) continue;
if (kernel.getdistance(clone.x, clone.y, owner.entity.x, owner.entity.y) <= 18 && !contains(clone.uid))
{
if (!clone.dead)
clone.sendspawn(owner);
}
}
}
if (owner.pet.pets.count > 0)
{
foreach (var pet in owner.pet.pets.values)
{
if (pet == null) continue;
if (pet.entity == null) continue;
if (kernel.getdistance(pet.entity.x, pet.entity.y, owner.entity.x, owner.entity.y) <= 18/* && !contains(pet.entity.uid)*/)
{
if (!pet.entity.dead)
owner.send(pet.entity.spawnpacket);
// pet.entity.sendspawn(owner, false);
}
}
}
#endregion
#endregion
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
أدوات الموضوع | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
بخصوص الارينا | xAttack | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2020-05-12 02:05 PM |
اختفاء الاعب فى الارينا | essamarpi1 | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2020-05-05 08:56 PM |
حل مشكلة الناس الي بدخل الارينا في الكويستات | Alaa Ghanem | تطوير سيرفرات كونكر | 2 | 2019-12-11 04:52 PM |
ازاي اعدل علي شوب الارينا ؟ | AliNasser | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2019-09-25 08:22 PM |
مشكلة في الارينا | manshestar | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-08-05 07:48 AM |