GhostRiderGrey
Sorceror
This is a question about the economy Control System http://www.runuo.com/community/threads/runuo-2-0-rc1-economy-control-system.77345/page-3
Specifically at Lokai's recommended code for lootpack.cs shown here
With this code installed, the server compiles just fine, but locks up when the world tries to load. I added some console writelines to try and see where its getting off track
With this code installed, the shard compiles then displays 1st, 2nd, 3rd,4th with a number, 1st, 2nd, 3rd,4th with a number. 1st, 2nd, 3rd,4th with a number over and over again....thousands of them but never finishes loading the world. Others seem to have this working, so i was wondering what I have done wrong?
Specifically at Lokai's recommended code for lootpack.cs shown here
Code:
//Economy Control Edit
public int Roll()
{
int v = m_Bonus;
double eco_Modifier = 100;
double w;
for ( int i = 0; i < m_Count; ++i )
v += Utility.Random( 1, m_Sides );
foreach (Item item in World.Items.Values)
{
if (item is StoneGoldCounter)
{
StoneGoldCounter GC = (StoneGoldCounter)item;
eco_Modifier = GC.EconomyMultiplier;
}
}
w = v * (eco_Modifier * .01);
return (int)w;
}
With this code installed, the server compiles just fine, but locks up when the world tries to load. I added some console writelines to try and see where its getting off track
Code:
//Economy Control Edit
public int Roll()
{
int v = m_Bonus;
double eco_Modifier = 100;
double w;
Console.WriteLine("1st");
for (int i = 0; i < m_Count; ++i)
v += Utility.Random(1, m_Sides);
Console.WriteLine("2nd");
foreach (Item item in World.Items.Values)
{
if (item is StoneGoldCounter)
{
StoneGoldCounter GC = (StoneGoldCounter)item;
eco_Modifier = GC.EconomyMultiplier;
}
}
Console.WriteLine("3rd");
w = v * (eco_Modifier * .01);
Console.WriteLine("4th {0}", w);
return (int)w;
}
//Economy Control Edit End