* Reverted 42b7ba9 and cef2f9e NPC shop ID checks.
This commit is contained in:
aleos89 2015-12-05 10:08:18 -05:00
parent 4b7301ac89
commit 0212d44bb4
2 changed files with 4 additions and 7 deletions

View File

@ -1913,8 +1913,6 @@ void clif_buylist(struct map_session_data *sd, struct npc_data *nd)
WFIFOW(fd,2) = 4 + c*11;
WFIFOSET(fd,WFIFOW(fd,2));
sd->npc_shopid = 0; // Clear shop data here in case Cancel is clicked.
}
@ -1953,8 +1951,6 @@ void clif_selllist(struct map_session_data *sd)
}
WFIFOW(fd,2)=c*10+4;
WFIFOSET(fd,WFIFOW(fd,2));
sd->npc_shopid = 0; // Clear shop data here in case Cancel is clicked.
}
@ -11300,6 +11296,7 @@ void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd)
else
result = npc_buylist(sd, n, (struct s_npc_buy_list*)RFIFOP(fd,info->pos[1]));
sd->npc_shopid = 0; //Clear shop data.
clif_npc_buy_result(sd, result);
}
@ -11336,6 +11333,7 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
else
fail = npc_selllist(sd,n,item_list);
sd->npc_shopid = 0; //Clear shop data.
clif_npc_sell_result(sd, fail);
}

View File

@ -5122,8 +5122,7 @@ BUILDIN_FUNC(close)
st->mes_active = 0;
}
if (!sd->npc_shopid) // Don't close if a shop was opened.
clif_scriptclose(sd, st->oid);
clif_scriptclose(sd, st->oid);
return SCRIPT_CMD_SUCCESS;
}
@ -9377,7 +9376,7 @@ BUILDIN_FUNC(end)
if( st->mes_active )
st->mes_active = 0;
if (sd && !sd->npc_shopid) // Don't close if a shop was opened.
if (sd)
clif_scriptclose(sd, st->oid); // If a menu/select/prompt is active, close it.
return SCRIPT_CMD_SUCCESS;