frakcar kaufen 1,5 multiplikator
This commit is contained in:
@@ -11,5 +11,10 @@
|
||||
{
|
||||
return "$" + string.Format(Main.SERVER_CULTURE, "{0:C0}", money).Replace("€", "").Trim();
|
||||
}
|
||||
|
||||
public static string ToMoneyString(this double money)
|
||||
{
|
||||
return ((int)money).ToMoneyString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
public static List<BusinessBase> Businesses { get; private set; }
|
||||
|
||||
private const double FACTION_CAR_MULTIPLIER = 1.5;
|
||||
|
||||
public static void LoadBusinesses()
|
||||
{
|
||||
Businesses = new List<BusinessBase>();
|
||||
@@ -199,10 +201,10 @@ namespace ReallifeGamemode.Server.Managers
|
||||
else if (target == "Fraktion")
|
||||
{
|
||||
var faction = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == u.FactionId).First();
|
||||
TransactionResult result = BankManager.TransferMoney(faction, business, price * 3, "Auto gekauft", dbContext);
|
||||
TransactionResult result = BankManager.TransferMoney(faction, business, (int)(price * FACTION_CAR_MULTIPLIER), "Auto gekauft", dbContext);
|
||||
if (result == TransactionResult.SENDER_NOT_ENOUGH_MONEY)
|
||||
{
|
||||
player.SendNotification("~r~Die Fraktion hat nicht genug Geld: " + (price * 3).ToMoneyString());
|
||||
player.SendNotification("~r~Die Fraktion hat nicht genug Geld: " + (price * FACTION_CAR_MULTIPLIER).ToMoneyString());
|
||||
return;
|
||||
}
|
||||
player.SendChatMessage("~y~Deine Fraktion hat das Fahrzeug erfolgreich gekauft");
|
||||
|
||||
Reference in New Issue
Block a user