Signed-off-by: CairoLee <cairoliyu@gmail.com>
This commit is contained in:
CairoLee 2015-12-12 16:24:44 +08:00
parent 27e90f8f45
commit c8db271ed9
2 changed files with 6 additions and 4 deletions

View File

@ -1360,8 +1360,6 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type)
clif_broadcast(&sd->bl,output,strlen(output) + 1,BC_BLUE,SELF); clif_broadcast(&sd->bl,output,strlen(output) + 1,BC_BLUE,SELF);
} }
// reset the callshop state for future calls
sd->state.callshop = 0;
sd->npc_shopid = id; sd->npc_shopid = id;
if (type == 0) { if (type == 0) {

View File

@ -9382,8 +9382,12 @@ BUILDIN_FUNC(end)
if( st->mes_active ) if( st->mes_active )
st->mes_active = 0; st->mes_active = 0;
if (sd) if (sd){
if (sd->state.callshop == 0)
clif_scriptclose(sd, st->oid); // If a menu/select/prompt is active, close it. clif_scriptclose(sd, st->oid); // If a menu/select/prompt is active, close it.
else
sd->state.callshop = 0;
}
return SCRIPT_CMD_SUCCESS; return SCRIPT_CMD_SUCCESS;
} }