محمد ياسر
2019-04-23, 03:28 PM
بسم الله الرحمن الرحيم
حل مشكله الانتقال عبر الدوامات فى مدينه التون سيتى
المشكله فى معظم السورسات الانتقال فى الدومات ينقلك الى مكان واحد فقط
افتح [ PacketHandler.cs ]
ابحث عن
static void UsePortal(Data generalData, Client.GameState client)
اغلقه من الناقص الموجوده بجانبه و استبدله بالاتى
enum MapsIDsByCorrM : ushort
{
TwinCity = 1002,
Phoenix = 1011,
ApeCity = 1020,
DesertCity = 1000,
BirdIsland = 1015,
MineCave = 1003
}
static void UsePortal(Data generalData, Client.GameState client)
{
client.Entity.Action = ZaLMaN.Game.Enums.ConquerAction.None;
client.ReviveStamp = Time32.Now;
client.Attackable = false;
ushort portal_X = (ushort)(generalData.dwParam & 0xFFFF);
ushort portal_Y = (ushort)(generalData.dwParam >> 16);
string portal_ID = portal_X.ToString() + ":" + portal_Y.ToString() + ":" + client.Map.ID.ToString();
if (client.Account.State == Database.AccountTable.AccountState.ProjectManager)
client.Send(new Message("Portal ID: " + portal_ID, System.Drawing.Color.White, Network.GamePackets.Message.TopLeft));
// Twin To Phoenix
if (portal_X == 811 && portal_Y == 523 && client.Map.ID == (ushort)MapsIDsByCorrM.TwinCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Phoe nix, 12, 378);
// Phoenix To Twin
if (portal_X == 5 && portal_Y == 376 && client.Map.ID == (ushort)MapsIDsByCorrM.Phoenix)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 808, 525);
// Twin To App
if (portal_X == 523 && portal_Y == 811 && client.Map.ID == (ushort)MapsIDsByCorrM.TwinCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.ApeC ity, 378, 13);
// App To Twin
if (portal_X == 376 && portal_Y == 8 && client.Map.ID == (ushort)MapsIDsByCorrM.ApeCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 525, 809);
// Twin To Desert
if (portal_X == 67 && portal_Y == 350 && client.Map.ID == (ushort)MapsIDsByCorrM.TwinCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Dese rtCity, 973, 668);
// Desert To Twin
if (portal_X == 977 && portal_Y == 668 && client.Map.ID == (ushort)MapsIDsByCorrM.DesertCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 72, 348);
// MineCave To Twin
if (portal_X == 70 && portal_Y == 44 && client.Map.ID == (ushort)MapsIDsByCorrM.MineCave)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 300, 278);
// Twin To Bird
if (portal_X == 528 && portal_Y == 328 && client.Map.ID == (ushort)MapsIDsByCorrM.TwinCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Bird Island, 1015, 710);
// Bird To Twin
if (portal_X == 1014 && portal_Y == 706 && client.Map.ID == (ushort)MapsIDsByCorrM.BirdIsland)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 525, 330);
}
حل مشكله الانتقال عبر الدوامات فى مدينه التون سيتى
المشكله فى معظم السورسات الانتقال فى الدومات ينقلك الى مكان واحد فقط
افتح [ PacketHandler.cs ]
ابحث عن
static void UsePortal(Data generalData, Client.GameState client)
اغلقه من الناقص الموجوده بجانبه و استبدله بالاتى
enum MapsIDsByCorrM : ushort
{
TwinCity = 1002,
Phoenix = 1011,
ApeCity = 1020,
DesertCity = 1000,
BirdIsland = 1015,
MineCave = 1003
}
static void UsePortal(Data generalData, Client.GameState client)
{
client.Entity.Action = ZaLMaN.Game.Enums.ConquerAction.None;
client.ReviveStamp = Time32.Now;
client.Attackable = false;
ushort portal_X = (ushort)(generalData.dwParam & 0xFFFF);
ushort portal_Y = (ushort)(generalData.dwParam >> 16);
string portal_ID = portal_X.ToString() + ":" + portal_Y.ToString() + ":" + client.Map.ID.ToString();
if (client.Account.State == Database.AccountTable.AccountState.ProjectManager)
client.Send(new Message("Portal ID: " + portal_ID, System.Drawing.Color.White, Network.GamePackets.Message.TopLeft));
// Twin To Phoenix
if (portal_X == 811 && portal_Y == 523 && client.Map.ID == (ushort)MapsIDsByCorrM.TwinCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Phoe nix, 12, 378);
// Phoenix To Twin
if (portal_X == 5 && portal_Y == 376 && client.Map.ID == (ushort)MapsIDsByCorrM.Phoenix)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 808, 525);
// Twin To App
if (portal_X == 523 && portal_Y == 811 && client.Map.ID == (ushort)MapsIDsByCorrM.TwinCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.ApeC ity, 378, 13);
// App To Twin
if (portal_X == 376 && portal_Y == 8 && client.Map.ID == (ushort)MapsIDsByCorrM.ApeCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 525, 809);
// Twin To Desert
if (portal_X == 67 && portal_Y == 350 && client.Map.ID == (ushort)MapsIDsByCorrM.TwinCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Dese rtCity, 973, 668);
// Desert To Twin
if (portal_X == 977 && portal_Y == 668 && client.Map.ID == (ushort)MapsIDsByCorrM.DesertCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 72, 348);
// MineCave To Twin
if (portal_X == 70 && portal_Y == 44 && client.Map.ID == (ushort)MapsIDsByCorrM.MineCave)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 300, 278);
// Twin To Bird
if (portal_X == 528 && portal_Y == 328 && client.Map.ID == (ushort)MapsIDsByCorrM.TwinCity)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Bird Island, 1015, 710);
// Bird To Twin
if (portal_X == 1014 && portal_Y == 706 && client.Map.ID == (ushort)MapsIDsByCorrM.BirdIsland)
client.Entity.Teleport((ushort)MapsIDsByCorrM.Twin City, 525, 330);
}