Exemplo n.º 1
0
 public override void PlayerConnect(Player player)
 {
     //PathOfModifiers.Instance.Logger.Debug($"PlayerConnect: {Main.netMode}");
     if (Main.LocalPlayer == player)
     {
         var mapBorder = ModContent.GetInstance <MapBorder>();
         MapBorder.ClearActiveBounds();
     }
 }
Exemplo n.º 2
0
        //public Map[] openMaps;

        ////TODO: read maxOpenMaps from config
        ////TODO: receive maxOpenMaps from server
        //public int maxOpenMaps = 255;

        //public override void Initialize()
        //{
        //    openMaps = new Map[maxOpenMaps];
        //}

        //public int AddOpenMap(Map map, int ID = -1, bool overwrite = false)
        //{
        //    if (ID > -1)
        //    {
        //        if (!overwrite && openMaps[ID] != null)
        //            throw new Exception("Cannot add open map to the world by ID because the ID is already taken.");

        //        openMaps[ID] = map;
        //        return ID;
        //    }

        //    for (int i = 0; i < maxOpenMaps; i++)
        //    {
        //        if (openMaps[i] == null)
        //        {
        //            openMaps[i] = map;
        //            return i;
        //        }
        //    }
        //    return -1;
        //}
        //public void RemoveOpenMap(int ID)
        //{
        //    openMaps[ID] = null;
        //}

        public override void Initialize()
        {
            var mapBorder = ModContent.GetInstance <MapBorder>();

            MapBorder.ClearActiveBounds();
        }