|
#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
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
كان فيه اتنين عاوزين باتش يشتغل عـ 7010 تقريبا اتفضلوا باتش سيرفر mego-co | megokarika | تطوير سيرفرات كونكر | 35 | 2023-11-18 04:57 PM |
باتش | medo2020 | مشاكل كروس فاير | 3 | 2020-05-05 11:41 AM |
باتش | Mutaz | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-04-01 01:14 AM |
باتش 3 دي | zonfor | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2020-02-20 12:42 AM |
باتش 3d | Adel Abd El Hay | مشكلات السيرفيرات كونكر الشخصيه | 5 | 2019-08-01 12:14 AM |