Advertisement
HtRiKaNo

Update

Aug 5th, 2021
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace GameServer.Database
  9. {
  10. public class GouYu
  11. {
  12. public static Dictionary<uint, GouYuo> GouYured = new Dictionary<uint, GouYuo>();
  13. public class GouYuo
  14. {
  15.  
  16. public Game.MsgServer.MsgGouYuInfo.ItemType Conq;
  17. public byte Level;
  18. public uint Pos;
  19. public uint Points;
  20.  
  21. }
  22.  
  23. public static void Load()
  24. {
  25. if (File.Exists(Program.ServerConfig.DbLocation + "gouyu_type.txt"))
  26. {
  27. string[] Lines = File.ReadAllLines((Program.ServerConfig.DbLocation + "gouyu_type.txt"));
  28. foreach (var line in Lines)
  29. {
  30. var spilitline = line.Split(new string[] { "@@" }, StringSplitOptions.RemoveEmptyEntries);
  31. GouYuo irc = new GouYuo();
  32. irc.Conq = (Game.MsgServer.MsgGouYuInfo.ItemType)Convert.ToUInt16(spilitline[1]);
  33. irc.Level = Convert.ToByte(spilitline[2]);
  34. irc.Pos = Convert.ToUInt32(spilitline[3]);
  35. irc.Points = Convert.ToUInt32(spilitline[4]);
  36.  
  37.  
  38. GouYured.Add(Convert.ToUInt32(spilitline[0]), irc);
  39. }
  40. }
  41. }
  42.  
  43.  
  44. }
  45.  
  46. }
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement