summaryrefslogtreecommitdiff
path: root/src/map/chat.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-02-19 12:59:36 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-02-19 12:59:36 +0000
commit4c5b768b6ac5a561e96b492d66d44042227fb856 (patch)
tree1035af16b8e7f6fc5d941e2a883f4658c0b95dbc /src/map/chat.c
parente29d0c257f7e762dcd81994ca987768d54ddb14d (diff)
downloadhercules-4c5b768b6ac5a561e96b492d66d44042227fb856.tar.gz
hercules-4c5b768b6ac5a561e96b492d66d44042227fb856.tar.bz2
hercules-4c5b768b6ac5a561e96b492d66d44042227fb856.tar.xz
hercules-4c5b768b6ac5a561e96b492d66d44042227fb856.zip
* Implemented buying store system (aka. reverse vending, purchase shop) together with related skill and items, without NPCs.
- For SQL apply upgrade_svn14713_log.sql to upgrade tables `picklog` and `zenylog`; for TXT no action is necessary. - Requires 2010-04-20aRagexeRE or later and can be disabled in 'conf/battle/feature.conf'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14713 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chat.c')
-rw-r--r--src/map/chat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/chat.c b/src/map/chat.c
index 96ec4c20d..4ba784b2e 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -69,6 +69,11 @@ int chat_createpcchat(struct map_session_data* sd, const char* title, const char
if( sd->chatID )
return 0; //Prevent people abusing the chat system by creating multiple chats, as pointed out by End of Exam. [Skotlex]
+ if( sd->vender_id || sd->state.buyingstore )
+ {// not chat, when you already have a store open
+ return 0;
+ }
+
if( map[sd->bl.m].flag.nochat )
{
clif_displaymessage(sd->fd, msg_txt(281));
@@ -108,7 +113,7 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass)
nullpo_ret(sd);
cd = (struct chat_data*)map_id2bl(chatid);
- if( cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m || sd->vender_id || sd->chatID || cd->users >= cd->limit )
+ if( cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m || sd->vender_id || sd->state.buyingstore || sd->chatID || cd->users >= cd->limit )
{
clif_joinchatfail(sd,0);
return 0;