public static void SendCreateMap(int location, Guid currentMapId, MapListItem parent)
 {
     if (location > -1)
     {
         Network.SendPacket(new CreateMapPacket(currentMapId, (byte)location));
     }
     else
     {
         if (parent == null)
         {
             Network.SendPacket(new CreateMapPacket(0, Guid.Empty));
         }
         else
         {
             if (parent.GetType() == typeof(MapListMap))
             {
                 Network.SendPacket(new CreateMapPacket(1, ((MapListMap)parent).MapId));
             }
             else
             {
                 Network.SendPacket(new CreateMapPacket(0, ((MapListFolder)parent).FolderId));
             }
         }
     }
 }
 public static void SendAddFolder(MapListItem parent)
 {
     if (parent == null)
     {
         Network.SendPacket(new MapListUpdatePacket(MapListUpdates.AddFolder, 0, Guid.Empty, 0, Guid.Empty, ""));
     }
     else
     {
         if (parent.GetType() == typeof(MapListMap))
         {
             Network.SendPacket(
                 new MapListUpdatePacket(
                     MapListUpdates.AddFolder, 0, Guid.Empty, 1, ((MapListMap)parent).MapId, ""
                     )
                 );
         }
         else
         {
             Network.SendPacket(
                 new MapListUpdatePacket(
                     MapListUpdates.AddFolder, 0, Guid.Empty, 0, ((MapListFolder)parent).FolderId, ""
                     )
                 );
         }
     }
 }
 public static void SendRename(MapListItem parent, string name)
 {
     if (parent.GetType() == typeof(MapListMap))
     {
         Network.SendPacket(
             new MapListUpdatePacket(MapListUpdates.Rename, 1, ((MapListMap)parent).MapId, 0, Guid.Empty, name)
             );
     }
     else
     {
         Network.SendPacket(
             new MapListUpdatePacket(
                 MapListUpdates.Rename, 0, ((MapListFolder)parent).FolderId, 0, Guid.Empty, name
                 )
             );
     }
 }
 public static void SendDelete(MapListItem target)
 {
     if (target.GetType() == typeof(MapListMap))
     {
         Network.SendPacket(
             new MapListUpdatePacket(MapListUpdates.Delete, 1, ((MapListMap)target).MapId, 0, Guid.Empty, "")
             );
     }
     else
     {
         Network.SendPacket(
             new MapListUpdatePacket(
                 MapListUpdates.Delete, 0, ((MapListFolder)target).FolderId, 0, Guid.Empty, ""
                 )
             );
     }
 }