Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace GameServer.Database
- {
- public class GouYu
- {
- public static Dictionary<uint, GouYuo> GouYured = new Dictionary<uint, GouYuo>();
- public class GouYuo
- {
- public Game.MsgServer.MsgGouYuInfo.ItemType Conq;
- public byte Level;
- public uint Pos;
- public uint Points;
- }
- public static void Load()
- {
- if (File.Exists(Program.ServerConfig.DbLocation + "gouyu_type.txt"))
- {
- string[] Lines = File.ReadAllLines((Program.ServerConfig.DbLocation + "gouyu_type.txt"));
- foreach (var line in Lines)
- {
- var spilitline = line.Split(new string[] { "@@" }, StringSplitOptions.RemoveEmptyEntries);
- GouYuo irc = new GouYuo();
- irc.Conq = (Game.MsgServer.MsgGouYuInfo.ItemType)Convert.ToUInt16(spilitline[1]);
- irc.Level = Convert.ToByte(spilitline[2]);
- irc.Pos = Convert.ToUInt32(spilitline[3]);
- irc.Points = Convert.ToUInt32(spilitline[4]);
- GouYured.Add(Convert.ToUInt32(spilitline[0]), irc);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement