Quote:
Originally Posted by 5supertao
Would this be a cause of the Nobility Donations reseting?
Code:
[COLOR="Red"]public static void DonationReset()[/COLOR]
{
foreach (string Path in [COLOR="red"]Directory.GetFiles(@"C:\OldCODB\Users\Characters\"))[/COLOR]
{
if (Path.Remove(0, Path.Length - 4) == ".chr")
{
try
{
string Name = Path.Substring(Path.LastIndexOf("\\") + 1, Path.LastIndexOf('.') - Path.LastIndexOf("\\") - 1);
Game.Character C;
C = Game.World.CharacterFromName2(Name);
if (C == null)
{
string Account = "";
C = LoadCharacter(Name, ref Account);
if (C != null)
{
C.Nobility.Donation = 0;
SaveCharacter(C, Account);
}
}
else
{
C.Nobility.Donation = 0;
}
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
}
}
|
that is for reset nobility rank in players... only... for exemple if u donate and do that command in console your player donation go to 0 but in game you have that donation you have putted... if you donate again will appear the same name in rank...
you need delete nobility.dat too... because that code is to reset nobility in characteres