مشاهدة النسخة كاملة : ThunderCould بتفضل ظاهره ع الارض مش بتختفي
uncelsam
2019-10-28, 02:40 PM
ThunderCould بتفضل ظاهره ع الارض مش بتختفي
حل لها يشباب او يارايدر المره دي مش بتختفي اهوة :D
فوق
private void CharactersCallback(GameState client, int time)
ارمي دي
public TimerRule<Entity> ThunderCloud;
private void ThunderCloudTimer(Entity ThunderCloud, int time)
{
if (ThunderCloud == null) return;
if (!Kernel.Maps.ContainsKey(ThunderCloud.MapID))
{
Kernel.Maps[ThunderCloud.MapID].RemoveEntity(ThunderCloud);
Data data = new Data(true);
data.UID = ThunderCloud.UID;
data.ID = Data.RemoveEntity;
ThunderCloud.MonsterInfo.SendScreen(data);
ThunderCloud.MonsterInfo.SendScreen(data);
foreach (var client in Kernel.GamePool.Values)
{
if (Kernel.GetDistance(ThunderCloud.X, ThunderCloud.Y, client.Player.X, client.Player.Y) > 16) continue;
client.RemoveScreenSpawn(ThunderCloud, true);
}
Unregister(ThunderCloud);
return;
}
if (Time32.Now >= ThunderCloud.ThunderCloudStamp.AddSeconds(1))
{
ThunderCloud.ThunderCloudStamp = Time32.Now;
if (ThunderCloud.Hitpoints > 400)
ThunderCloud.Hitpoints -= 400;
else
{
Kernel.Maps[ThunderCloud.MapID].RemoveEntity(ThunderCloud);
Data data = new Data(true);
data.UID = ThunderCloud.UID;
data.ID = Data.RemoveEntity;
ThunderCloud.MonsterInfo.SendScreen(data);
ThunderCloud.MonsterInfo.SendScreen(data);
foreach (var client in Kernel.GamePool.Values)
{
if (Kernel.GetDistance(ThunderCloud.X, ThunderCloud.Y, client.Player.X, client.Player.Y) > 16) continue;
client.RemoveScreenSpawn(ThunderCloud, true);
}
Unregister(ThunderCloud);
return;
}
}
if ((ThunderCloud.SpawnPacket[50] == 0 && Time32.Now >= ThunderCloud.MonsterInfo.LastMove.AddMilliseconds( 750)) || ThunderCloud.SpawnPacket[50] == 128)
{
ThunderCloud.MonsterInfo.LastMove = Time32.Now;
if (ThunderCloud.MonsterInfo.InSight == 0)
{
foreach (var one in Kernel.Maps[ThunderCloud.MapID].Entities.Values.Where(i => Kernel.GetDistance(ThunderCloud.X, ThunderCloud.Y, i.X, i.Y) <= ThunderCloud.MonsterInfo.AttackRange))
{
if (one == null || one.Dead || one.MonsterInfo.Guard || one.Companion) continue;
ThunderCloud.MonsterInfo.InSight = one.UID;
Entity insight = null;
if (Kernel.Maps[ThunderCloud.MapID].Entities.ContainsKey(ThunderCloud.MonsterInfo.InS ight))
insight = Kernel.Maps[ThunderCloud.MapID].Entities[ThunderCloud.MonsterInfo.InSight];
else if (Kernel.GamePool.ContainsKey(ThunderCloud.MonsterI nfo.InSight))
insight = Kernel.GamePool[ThunderCloud.MonsterInfo.InSight].Player;
if (insight == null || insight.Dead || (insight.MonsterInfo != null && insight.MonsterInfo.Guard))
{
ThunderCloud.MonsterInfo.InSight = 0;
break;
}
new Game.Attacking.Handle(null, ThunderCloud, insight);
break;
}
}
else
{
Entity insight = null;
if (Kernel.Maps[ThunderCloud.MapID].Entities.ContainsKey(ThunderCloud.MonsterInfo.InS ight))
insight = Kernel.Maps[ThunderCloud.MapID].Entities[ThunderCloud.MonsterInfo.InSight];
else if (Kernel.GamePool.ContainsKey(ThunderCloud.MonsterI nfo.InSight))
insight = Kernel.GamePool[ThunderCloud.MonsterInfo.InSight].Player;
if (insight == null || insight.Dead || (insight.MonsterInfo != null && insight.MonsterInfo.Guard))
{
ThunderCloud.MonsterInfo.InSight = 0;
return;
}
new Game.Attacking.Handle(null, ThunderCloud, insight);
}
}
}
سيرش
Buffers = new TimerRule<GameState>(BuffersCallback, 1000, ThreadPriority.BelowNormal);
ارمي فوقها
ThunderCloud = new TimerRule<Entity>(ThunderCloudTimer, 250, ThreadPriority.Lowest);
uncelsam
2019-10-29, 11:06 PM
فوق
private void CharactersCallback(GameState client, int time)
ارمي دي
public TimerRule<Entity> ThunderCloud;
private void ThunderCloudTimer(Entity ThunderCloud, int time)
{
if (ThunderCloud == null) return;
if (!Kernel.Maps.ContainsKey(ThunderCloud.MapID))
{
Kernel.Maps[ThunderCloud.MapID].RemoveEntity(ThunderCloud);
Data data = new Data(true);
data.UID = ThunderCloud.UID;
data.ID = Data.RemoveEntity;
ThunderCloud.MonsterInfo.SendScreen(data);
ThunderCloud.MonsterInfo.SendScreen(data);
foreach (var client in Kernel.GamePool.Values)
{
if (Kernel.GetDistance(ThunderCloud.X, ThunderCloud.Y, client.Player.X, client.Player.Y) > 16) continue;
client.RemoveScreenSpawn(ThunderCloud, true);
}
Unregister(ThunderCloud);
return;
}
if (Time32.Now >= ThunderCloud.ThunderCloudStamp.AddSeconds(1))
{
ThunderCloud.ThunderCloudStamp = Time32.Now;
if (ThunderCloud.Hitpoints > 400)
ThunderCloud.Hitpoints -= 400;
else
{
Kernel.Maps[ThunderCloud.MapID].RemoveEntity(ThunderCloud);
Data data = new Data(true);
data.UID = ThunderCloud.UID;
data.ID = Data.RemoveEntity;
ThunderCloud.MonsterInfo.SendScreen(data);
ThunderCloud.MonsterInfo.SendScreen(data);
foreach (var client in Kernel.GamePool.Values)
{
if (Kernel.GetDistance(ThunderCloud.X, ThunderCloud.Y, client.Player.X, client.Player.Y) > 16) continue;
client.RemoveScreenSpawn(ThunderCloud, true);
}
Unregister(ThunderCloud);
return;
}
}
if ((ThunderCloud.SpawnPacket[50] == 0 && Time32.Now >= ThunderCloud.MonsterInfo.LastMove.AddMilliseconds( 750)) || ThunderCloud.SpawnPacket[50] == 128)
{
ThunderCloud.MonsterInfo.LastMove = Time32.Now;
if (ThunderCloud.MonsterInfo.InSight == 0)
{
foreach (var one in Kernel.Maps[ThunderCloud.MapID].Entities.Values.Where(i => Kernel.GetDistance(ThunderCloud.X, ThunderCloud.Y, i.X, i.Y) <= ThunderCloud.MonsterInfo.AttackRange))
{
if (one == null || one.Dead || one.MonsterInfo.Guard || one.Companion) continue;
ThunderCloud.MonsterInfo.InSight = one.UID;
Entity insight = null;
if (Kernel.Maps[ThunderCloud.MapID].Entities.ContainsKey(ThunderCloud.MonsterInfo.InS ight))
insight = Kernel.Maps[ThunderCloud.MapID].Entities[ThunderCloud.MonsterInfo.InSight];
else if (Kernel.GamePool.ContainsKey(ThunderCloud.MonsterI nfo.InSight))
insight = Kernel.GamePool[ThunderCloud.MonsterInfo.InSight].Player;
if (insight == null || insight.Dead || (insight.MonsterInfo != null && insight.MonsterInfo.Guard))
{
ThunderCloud.MonsterInfo.InSight = 0;
break;
}
new Game.Attacking.Handle(null, ThunderCloud, insight);
break;
}
}
else
{
Entity insight = null;
if (Kernel.Maps[ThunderCloud.MapID].Entities.ContainsKey(ThunderCloud.MonsterInfo.InS ight))
insight = Kernel.Maps[ThunderCloud.MapID].Entities[ThunderCloud.MonsterInfo.InSight];
else if (Kernel.GamePool.ContainsKey(ThunderCloud.MonsterI nfo.InSight))
insight = Kernel.GamePool[ThunderCloud.MonsterInfo.InSight].Player;
if (insight == null || insight.Dead || (insight.MonsterInfo != null && insight.MonsterInfo.Guard))
{
ThunderCloud.MonsterInfo.InSight = 0;
return;
}
new Game.Attacking.Handle(null, ThunderCloud, insight);
}
}
}
سيرش
Buffers = new TimerRule<GameState>(BuffersCallback, 1000, ThreadPriority.BelowNormal);
ارمي فوقها
ThunderCloud = new TimerRule<Entity>(ThunderCloudTimer, 250, ThreadPriority.Lowest);
عااااااااااااااااااش بجد
vBulletin® v3.8.8 Beta 1, Copyright ©2000-2024, TranZ by code