haus verkaufen droppt cash
This commit is contained in:
@@ -393,10 +393,15 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
|
||||
House house = GetHouseById(user.HouseId.Value, dbContext);
|
||||
|
||||
house.OwnerId = null;
|
||||
user.HouseId = null;
|
||||
|
||||
var backMoney = (int)(house.Price * 0.4);
|
||||
|
||||
ChatService.SendMessage(player, "Du bekommst vom Hausverkauf ~g~" + backMoney.ToMoneyString() + "~s~ zurück.");
|
||||
|
||||
user.GetBankAccount(dbContext).Balance += backMoney;
|
||||
|
||||
dbContext.SaveChanges();
|
||||
|
||||
player.SendChatMessage("!{#81F7BE}* Du hast dein Haus verkauft.");
|
||||
|
||||
Reference in New Issue
Block a user