mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-02-23 06:47:56 +01:00
"Minor betting fix."
This commit is contained in:
parent
6f61b20f96
commit
84927a6494
10
src/bet.c
10
src/bet.c
@ -33,6 +33,7 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "option.h"
|
#include "option.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
#include "support.h"
|
||||||
#include "treeview2.h"
|
#include "treeview2.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
|
|
||||||
@ -220,8 +221,8 @@ bet_is_user(const BetMatch *bet)
|
|||||||
gboolean
|
gboolean
|
||||||
bet_place(gint fix_id, gint outcome, gint wager)
|
bet_place(gint fix_id, gint outcome, gint wager)
|
||||||
{
|
{
|
||||||
gfloat max_wager = finance_wage_unit(current_user.tm) *
|
gint max_wager = (gint)rint(finance_wage_unit(current_user.tm) *
|
||||||
const_float("float_bet_wager_limit_factor");
|
const_float("float_bet_wager_limit_factor"));
|
||||||
BetUser new_bet;
|
BetUser new_bet;
|
||||||
gchar buf[SMALL];
|
gchar buf[SMALL];
|
||||||
|
|
||||||
@ -236,8 +237,11 @@ bet_place(gint fix_id, gint outcome, gint wager)
|
|||||||
|
|
||||||
if(wager > max_wager)
|
if(wager > max_wager)
|
||||||
{
|
{
|
||||||
misc_print_grouped_int((gint)rint(max_wager), buf);
|
misc_print_grouped_int(max_wager, buf);
|
||||||
game_gui_show_warning(_("The betting office doesn't allow you to wager more than %s."), buf);
|
game_gui_show_warning(_("The betting office doesn't allow you to wager more than %s."), buf);
|
||||||
|
gtk_spin_button_set_value(
|
||||||
|
GTK_SPIN_BUTTON(lookup_widget(window.digits, "spinbutton1")),
|
||||||
|
(gdouble)max_wager);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,6 +445,7 @@ live_game_event_injury(gint team, gint player, gboolean create_new)
|
|||||||
if((debug > 100 && stat2 != -1) ||
|
if((debug > 100 && stat2 != -1) ||
|
||||||
debug > 130)
|
debug > 130)
|
||||||
printf("\t\tlive_game_event_injury\n");
|
printf("\t\tlive_game_event_injury\n");
|
||||||
|
|
||||||
if(create_new)
|
if(create_new)
|
||||||
{
|
{
|
||||||
new = last_unit;
|
new = last_unit;
|
||||||
@ -898,6 +899,7 @@ live_game_event_send_off(gint team, gint player, gboolean second_yellow)
|
|||||||
}
|
}
|
||||||
|
|
||||||
player_of_id_team(tms[team], player)->cskill = 0;
|
player_of_id_team(tms[team], player)->cskill = 0;
|
||||||
|
|
||||||
if(second_yellow)
|
if(second_yellow)
|
||||||
player_card_set(player_of_id_team(tms[team], player), match->fix->clid, PLAYER_VALUE_CARD_RED, 2, FALSE);
|
player_card_set(player_of_id_team(tms[team], player), match->fix->clid, PLAYER_VALUE_CARD_RED, 2, FALSE);
|
||||||
else
|
else
|
||||||
|
@ -1113,7 +1113,10 @@ player_update_weekly(Player *pl)
|
|||||||
pl->name, pl->contract);
|
pl->name, pl->contract);
|
||||||
|
|
||||||
if(pl->contract <= 0)
|
if(pl->contract <= 0)
|
||||||
|
{
|
||||||
player_remove_contract(pl);
|
player_remove_contract(pl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
player_update_skill(pl);
|
player_update_skill(pl);
|
||||||
}
|
}
|
||||||
|
@ -1364,7 +1364,19 @@ treeview_create_finances(const User* user)
|
|||||||
|
|
||||||
gtk_list_store_append(ls, &iter);
|
gtk_list_store_append(ls, &iter);
|
||||||
/* Finances balance. */
|
/* Finances balance. */
|
||||||
gtk_list_store_set(ls, &iter, 0, _("Bi-weekly balance"), 1, "", 2, "", -1);
|
if(week > 2)
|
||||||
|
{
|
||||||
|
if(week % 2 == 1)
|
||||||
|
sprintf(buf, _("Bi-weekly balance\n(Week %d and %d)"),
|
||||||
|
week - 2, week - 1);
|
||||||
|
else
|
||||||
|
sprintf(buf, _("Bi-weekly balance\n(Week %d and %d)"),
|
||||||
|
week - 3, week - 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
strcpy(buf, _("Bi-weekly balance"));
|
||||||
|
|
||||||
|
gtk_list_store_set(ls, &iter, 0, buf, 1, "", 2, "", -1);
|
||||||
|
|
||||||
for(i=0;i<MON_IN_TRANSFERS;i++)
|
for(i=0;i<MON_IN_TRANSFERS;i++)
|
||||||
if(in[i] != 0)
|
if(in[i] != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user