i am changing EXP Rate from database configuration and i tried all values but exp is the same idk what is the problem
namespace MyDerpyServer
{
public class Rates
{
public static readonly double ExpRate = 5.0;
}
}
Exp *= Rates.ExpRate;
Hmm ..Wouldnt using Struct insted of Class become better ?Quote:
Or implement a global rates file.
And then, in your handler for giving exp, do something likeCode:namespace MyDerpyServer { public class Rates { public static readonly double ExpRate = 5.0; } }
Code:Exp *= Rates.ExpRate;
Yeah, you're probably right. Wrote it in a hurry on my iPod. Only thing to remember is that with a struct, every time you assign, you're just making copies of the original. On the other hand, with a class, every time you assign you're creating a reference to the original. Though, it is static and there will only be one instance, so yes, a struct would most likely be better.Quote:
Hmm ..Wouldnt using Struct insted of Class become better ?