static void UsePortal(Data generalData, Client.GameState client) { client.Entity.Action = KhaledMohamed.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.Red, Network.GamePackets.Message.TopLeft)); foreach (Game.Portal portal in client.Map.Portals) { int newmap = portal.DestinationMapID + 1000; if (Kernel.GetDistance(portal.CurrentX, portal.CurrentY, client.Entity.X, client.Entity.Y) <= 4) { if (client.Player.Servernum == 1) { client.Entity.Teleport(portal.DestinationMapID, portal.DestinationX, portal.DestinationY, false); return; } else { if(portal.DestinationMapID==1002)// client.Entity.Teleport(1004, portal.DestinationX, portal.DestinationY, false);// هتاخد سطر ده و الي فوقه كوبي و باست عشان تضيف مابات تانيه // 1002 مابه قديمه الي هتخرج فيها //1004 مابه جديده الي هتخرج فيها طالما انته ف سيرفير تاني if (portal.DestinationMapID == 1002) client.Entity.Teleport(portal.DestinationMapID, portal.DestinationX, portal.DestinationY, false); return; } } } if (client.Player.Servernum == 1) { client.Entity.Teleport(1002, 300, 278); } else { client.Entity.Teleport(1002, 300, 278); //مابه سيرفير تاني } }