summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-11-03 13:24:11 -0200
committershennetsind <ind@henn.et>2014-11-03 13:24:11 -0200
commitd19194a008023e2cad74c9b9cbf75a0b584104da (patch)
treee25da955261e2779b475a63b0c06236050251a55 /src
parentad8ef895737550c58ea29196d9b623a1f5e3cba0 (diff)
downloadhercules-d19194a008023e2cad74c9b9cbf75a0b584104da.tar.gz
hercules-d19194a008023e2cad74c9b9cbf75a0b584104da.tar.bz2
hercules-d19194a008023e2cad74c9b9cbf75a0b584104da.tar.xz
hercules-d19194a008023e2cad74c9b9cbf75a0b584104da.zip
Adjusted roulette logic ( see 239d480487e24294975f35ed55f210837ad1088e )
Special Thanks to Yommy and Ziu for the adjusted logic! This commit also introduces the proper coins to obtain the roulette points, thanks to Michieru. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 37cd03119..f5f1c5512 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -18373,25 +18373,25 @@ void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) {
if( sd->roulette.stage >= MAX_ROULETTE_LEVEL )
stage = sd->roulette.stage = 0;
- if( stage <= 2 ) {
- if( pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) <= 0 )
- result = GENERATE_ROULETTE_NO_ENOUGH_POINT;
- } else if ( stage <= 4 ) {
- if( pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) <= 0 )
- result = GENERATE_ROULETTE_NO_ENOUGH_POINT;
- } else if ( stage <= 6 ) {
- if( pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) <= 0 )
+ if( stage == 0 ) {
+ if( pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) <= 0 &&
+ pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) < 10 &&
+ pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) < 10 )
result = GENERATE_ROULETTE_NO_ENOUGH_POINT;
}
if( result == GENERATE_ROULETTE_SUCCESS ) {
- if( stage <= 2 ) {
- pc_setglobalreg(sd, script->add_str("TmpRouletteBronze"), pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) - 1);
- } else if ( stage <= 4 ) {
- pc_setglobalreg(sd, script->add_str("TmpRouletteSilver"), pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) - 1);
- } else if ( stage <= 6 ) {
- pc_setglobalreg(sd, script->add_str("TmpRouletteGold"), pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) - 1);
+ if( stage == 0 ) {
+ if( pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) > 0 ) {
+ pc_setglobalreg(sd, script->add_str("TmpRouletteBronze"), pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) - 1);
+ } else if( pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) > 9 ) {
+ pc_setglobalreg(sd, script->add_str("TmpRouletteSilver"), pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) - 10);
+ stage = sd->roulette.stage = 2;
+ } else if( pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) > 9 ) {
+ pc_setglobalreg(sd, script->add_str("TmpRouletteGold"), pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) - 10);
+ stage = sd->roulette.stage = 4;
+ }
}
sd->roulette.prizeStage = stage;