Jump to content
  • 0

How to add new Var for Guild (DEV)


Question

Posted

Guild has a name, has a rank but to day

I want add new Var "Fame Points"

1. How to Add-Migration in Server/Guild.cs

2. How to print top Fame Points rank?

1 answer to this question

Recommended Posts

  • 0
Posted

1. Migrations should work good just by editing Intersect.Server/Database/PlayerData/Players/Guild.cs. Remember to use Add-Migration -Context PlayerContext 

2. LINQ would be a good choice for that, so if the line goes red, remember to add using to System.Linq. You can get an ordered list just by doing Guilds.OrderByDescending(g => g.Value.FamePoints).ToList(). Dont forget that "Guilds" is a public static var on Guild.cs so you need to access its visibility outside the class doing "Guild.Guilds".

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...