Added roulette window state tracking (#6936)
Fixes #6931 Thanks to @mazvi, @aleos89 and Ziu
This commit is contained in:
parent
a027900711
commit
3298ca9eb7
@ -20499,6 +20499,8 @@ void clif_roulette_open( struct map_session_data* sd ){
|
||||
p.SilverPoint = sd->roulette_point.silver;
|
||||
p.BronzePoint = sd->roulette_point.bronze;
|
||||
|
||||
sd->state.roulette_open = true;
|
||||
|
||||
clif_send( &p, sizeof( p ), &sd->bl, SELF );
|
||||
}
|
||||
|
||||
@ -20566,7 +20568,7 @@ void clif_parse_roulette_close( int fd, struct map_session_data* sd ){
|
||||
return;
|
||||
}
|
||||
|
||||
// What do we need this for? (other than state tracking), game client closes the window without our response.
|
||||
sd->state.roulette_open = false;
|
||||
}
|
||||
|
||||
/// Response to a item reward request
|
||||
|
@ -393,6 +393,7 @@ struct map_session_data {
|
||||
uint16 inventory_expansion_amount;
|
||||
t_itemid laphine_synthesis;
|
||||
t_itemid laphine_upgrade;
|
||||
bool roulette_open;
|
||||
} state;
|
||||
struct {
|
||||
unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;
|
||||
@ -1065,7 +1066,8 @@ static bool pc_cant_act2( struct map_session_data* sd ){
|
||||
|| sd->state.trading || sd->state.storage_flag || sd->state.prevend || sd->state.refineui_open
|
||||
|| sd->state.stylist_open || sd->state.inventory_expansion_confirmation || sd->npc_shopid
|
||||
|| sd->state.barter_open || sd->state.barter_extended_open
|
||||
|| sd->state.laphine_synthesis || sd->state.laphine_upgrade;
|
||||
|| sd->state.laphine_synthesis || sd->state.laphine_upgrade
|
||||
|| sd->state.roulette_open;
|
||||
}
|
||||
// equals pc_cant_act2 and additionally checks for chat rooms and npcs
|
||||
static bool pc_cant_act( struct map_session_data* sd ){
|
||||
|
Loading…
x
Reference in New Issue
Block a user