|
المشاركات 151 |
+التقييم 0.07 |
تاريخ التسجيل Apr 2019 |
الاقامة Egypt |
نظام التشغيل Designer and Programmer |
رقم العضوية 11 |
public Statue(byte[] array, uint uid = 105175, uint action = Enums.ConquerAction.Happy, byte facing =
public Statue(byte[] array, uint uid = 105175, uint action = Enums.ConquerAction.Happy, byte facing = (byte)Enums.ConquerAngle.South, ushort xx = 290, ushort yy = 300, bool war = false)
public statue(byte[] array, uint uid = 105175, uint action = enums.conqueraction.happy, byte facing =
public statue(byte[] array, uint uid = 105175, uint action = enums.conqueraction.happy, byte facing = (byte)enums.conquerangle.south, ushort xx = 290, ushort yy = 300, bool war = false)
using System;
using MoDY.Network.GamePackets;
using System.Collections.Concurrent;
namespace MoDY.Game
{
public unsafe class Statue : Network.Writer
{
public static ConcurrentDictionary<uint, Statue> Statues = new ConcurrentDictionary<uint, Statue>();
public byte[] SpawnPacket = null;
public uint UID;
public Statue(byte[] array)
{
UID = 105175;
SpawnPacket = new byte[array.Length];
for (ushort x = 0; x < array.Length; x++)
SpawnPacket[x] = array[x];
WriteByte(0, MsgPlayer.Facing, SpawnPacket);
WriteUInt32(0, MsgPlayer.Action, SpawnPacket);
WriteUInt16(1000, MsgPlayer.GuildRank, SpawnPacket);
WriteUInt32(105175, MsgPlayer.UID, SpawnPacket);
WriteUInt64(0, MsgPlayer.StatusFlag, SpawnPacket);
WriteUInt64(0, MsgPlayer.StatusFlag2, SpawnPacket);
WriteUInt64(0, MsgPlayer.StatusFlag3, SpawnPacket);
WriteUInt32(0, MsgPlayer.Hitpoints, SpawnPacket);
WriteUInt32(0, MsgPlayer.GuildID, SpawnPacket);
X = 328;
Y = 304;
if (array.Length > 200)
{
if (!Statues.ContainsKey(105175))
Statues.TryAdd(105175, this);
else
{
Statues[105175] = this;
}
}
foreach (var client in Kernel.GamePool.Values)
{
if (Kernel.GetDistance(X, Y, client.Player.X, client.Player.Y) < 16 && client.Player.MapID == 1002)
{
client.Send(this.SpawnPacket);
}
}
}
ushort _x, _y;
public ushort X
{
get { return _x; }
set
{
_x = value;
WriteUInt16(value, MsgPlayer.X, SpawnPacket);
}
}
public ushort Y
{
get { return _y; }
set
{
_y = value;
WriteUInt16(value, MsgPlayer.Y, SpawnPacket);
}
}
public static bool operator >(Statue statue, Client.GameState client)
{
if (!client.Screen.Statue.ContainsKey(statue.UID))
{
if (Kernel.GetDistance(statue.X, statue.Y, client.Player.X, client.Player.Y) < 16 && client.Player.MapID == 1002)
{
if (statue.SpawnPacket.Length > 200)
{
client.Send(statue.SpawnPacket);
return true;
}
}
}
return false;
}
public static bool operator <(Statue statue, Client.GameState client)
{
if (Kernel.GetDistance(statue.X, statue.Y, client.Player.X, client.Player.Y) >= 16 && client.Player.MapID == 1002)
{
return true;
}
return false;
}
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
اضافه حرب Hero Of Game | محمد ياسر | تطوير سيرفرات كونكر | 19 | 2024-10-23 10:50 PM |
عايز امسح ايتم من السيرفر كلو وهو السيرفر بيرستر .. لسورس اليكس | MaNGaWy | مشكلات السيرفيرات كونكر الشخصيه | 8 | 2020-05-08 10:30 PM |
يلا ندلع الناس عندنا في السيرفر ان بى سى تغير الوان السيرفر | Mero | تطوير سيرفرات كونكر | 8 | 2020-04-23 08:47 AM |
تغير مكان نزول الاكونت الجديد | محمد ياسر | تطوير سيرفرات كونكر | 5 | 2019-07-14 10:04 PM |
مشكلة في توب Hero of Game | Adel Abd El Hay | مشكلات السيرفيرات كونكر الشخصيه | 12 | 2019-07-07 12:16 AM |