From 2df71753e1e8eeb36d37ac21eba24df8f25a8d32 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Tue, 4 Mar 2014 07:13:57 +0100 Subject: [PATCH] missing check on abandon and persistent abandon button fixed --- web/briskin5/Obj/briskin5.phh | 7 ++++++- web/briskin5/briskin5.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index eaa3096..e247e93 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -514,8 +514,8 @@ class Bin5_table extends Table { $pnts_sav = array(); - $this->old_act = $action; if ($action == BIN5_RULES_ALLPASS) { // return TRUE if all correct + $this->old_act = $action; $this->old_asta_win = -1; $this->old_pnt = 0; $this->mult_inc(1); @@ -528,6 +528,10 @@ class Bin5_table extends Table { $this->game_init(&$bri->user); } else if ($action == BIN5_RULES_ABANDON) { // return TRUE if all correct + if (!($user->handpt <= 2)) { + return (FALSE); + } + $this->old_act = $action; log_wr(sprintf("GIOCO FINITO !!!")); $this->old_asta_win = $user->table_pos; $this->old_pnt = 0; @@ -543,6 +547,7 @@ class Bin5_table extends Table { $this->game_init(&$bri->user); } else if ($action == BIN5_RULES_FINISH) { // return TRUE if all correct + $this->old_act = $action; do { $pro = 0; diff --git a/web/briskin5/briskin5.js b/web/briskin5/briskin5.js index 2e8d76c..ffe6c8b 100644 --- a/web/briskin5/briskin5.js +++ b/web/briskin5/briskin5.js @@ -115,7 +115,7 @@ function dispose_asta(idx, pnt, nopoint) btn.style.left = asta_xarr[i % 3]; btn.style.top = parseInt(i / 3) * 50 + 24; btn.src = "img/astalascio"+lng+".png"; - btn.style.visibility = "visible"; + btn.style.visibility = ""; btn.onclick = function () { safelascio(); }; } else { -- 2.17.1