Пример #1
0
        public static bool UpdateRaidAttendance(string toon, string server)
        {
            // parse and build upload logs
            MemoryStream part1 = FuParse.ParseRoster(toon, server);

            // I picked 10 because "empty" ones seem to have a length of 3, so yeah
            if (part1.Length < 10)
            {
                MessageBox.Show("Problem with the Guild Roster.");
                return(false);
            }
            else
            {
                MemoryStream part2 = FuParse.ParseAttendance(toon, server);
                if (part2.Length < 10)
                {
                    MessageBox.Show("Unable to locate or process your raid dump file.");
                    return(false);
                }
                else
                {
                    string     raidFilename = String.Format("raid_{0}_{1}_{2}.txt", server, toon, DateTime.Now.ToString("yyyyMMdd-hhmmss"));
                    string     raidPath     = Path.Combine(GetAppFolder(), LogFolder, raidFilename);
                    FileStream fs           = new FileStream(raidPath, FileMode.Append);
                    part1.CopyTo(fs);
                    new MemoryStream(Encoding.ASCII.GetBytes("FU-DEMILITER-THINGER")).CopyTo(fs);
                    part2.CopyTo(fs);
                    fs.Close();
                    return(true);
                }
            }
        }
Пример #2
0
        public static bool DoLootLookup(string toon, string server, float minutes, string defaultName = "")
        {
            string namelist = FuParse.ParseLootLookup(toon, server, minutes);

            if (namelist.Length == 0)
            {
                if (defaultName.Length > 0)
                {
                    namelist = defaultName;
                }
                else
                {
                    MessageBox.Show("Unable to find any tells in the last " + minutes + " minutes.");
                    return(false);
                }
            }
            Process.Start("http://fuworldorder.net/admin/lootlookup?userlist=" + Uri.EscapeDataString(namelist));
            return(true);
        }
Пример #3
0
        public static bool UpdateGuildRoster(string toon, string server)
        {
            MemoryStream rost = FuParse.ParseRoster(toon, server);

            if (rost.Length < 10)
            {
                MessageBox.Show("Guild Roster is Empty :(");
                return(false);
            }
            else
            {
                // parse and build upload logs
                string     guildFilename = String.Format("guild_{0}_{1}_{2}.txt", server, toon, DateTime.Now.ToString("yyyyMMdd-hhmmss"));
                string     guildPath     = Path.Combine(GetAppFolder(), LogFolder, guildFilename);
                FileStream fs            = new FileStream(guildPath, FileMode.Append);
                rost.CopyTo(fs);
                fs.Close();
                return(true);
            }
        }
Пример #4
0
        public static bool UpdateLoot(string toon, string server, float minutes)
        {
            // parse and build upload logs
            MemoryStream loot = FuParse.ParseLoot(toon, server, minutes);

            if (loot.Length < 10)
            {
                MessageBox.Show("The loot log is empty :(");
                return(false);
            }
            else
            {
                string     lootFilename = String.Format("loot_{0}_{1}_{2}.txt", server, toon, DateTime.Now.ToString("yyyyMMdd-hhmmss"));
                string     lootPath     = Path.Combine(GetAppFolder(), LogFolder, lootFilename);
                FileStream fs           = new FileStream(lootPath, FileMode.Append);
                loot.Position = 0;
                loot.CopyTo(fs);
                fs.Close();
                return(true);
            }
        }