I wroted small plugin, which changing cost of upgrade
But ConstructionGrade.costToBuild.amount is saving float which i changed in hook.
How i can reset it?
object OnPayForUpgrade(BasePlayer player, BuildingBlock block, ConstructionGrade grade)
{
if(config.builderPoints.ContainsKey(player.userID.ToString()))
{
float percent = config.builderPoints[player.userID.ToString()] * 5;
float howPercents = (percent / 100);
float giveBack = (grade.costToBuild[0].amount * howPercents);
Puts(grade.costToBuild[0].amount.ToString() + " * " + howPercents.ToString());
grade.costToBuild[0].amount = (int)(grade.costToBuild[0].amount - giveBack);
}
return null;
}But ConstructionGrade.costToBuild.amount is saving float which i changed in hook.
How i can reset it?