[HELP] Exp rate did not get affected after changing it

06/08/2012 03:36 badguy4you#1
i am changing EXP Rate from database configuration and i tried all values but exp is the same idk what is the problem
06/08/2012 11:09 shadowman123#2
So Heres The Solution Go to Source / Client / GameState.cs And Then Look for Experience and Increase or Decrease it then Save Your Project and Ta Da you got what u want :D
06/10/2012 04:08 Zeroxelli#3
Or implement a global rates file.
Code:
namespace MyDerpyServer
{
    public class Rates
    {
        public static readonly double ExpRate = 5.0;
    }
}
And then, in your handler for giving exp, do something like

Code:
Exp *= Rates.ExpRate;
06/10/2012 11:12 shadowman123#4
Quote:
Originally Posted by Zeroxelli View Post
Or implement a global rates file.
Code:
namespace MyDerpyServer
{
    public class Rates
    {
        public static readonly double ExpRate = 5.0;
    }
}
And then, in your handler for giving exp, do something like

Code:
Exp *= Rates.ExpRate;
Hmm ..Wouldnt using Struct insted of Class become better ?
06/10/2012 11:59 Zeroxelli#5
Quote:
Originally Posted by shadowman123 View Post
Hmm ..Wouldnt using Struct insted of Class become better ?
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.
06/10/2012 22:50 badguy4you#6
Problem Solved Thx Guys