From 6f4b110965db43f49507e9492d29c0745d145760 Mon Sep 17 00:00:00 2001 From: malufett Date: Mon, 17 Jun 2013 21:27:58 +0800 Subject: Fixed Bug#7247 -while vending you can now change equipments. Updated sc_config.txt notes. Signed-off-by: malufett --- db/sc_config.txt | 16 +++++++++------- src/map/clif.c | 4 ++-- src/map/pc.h | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/db/sc_config.txt b/db/sc_config.txt index b0d0e5ba4..06de0bdf6 100644 --- a/db/sc_config.txt +++ b/db/sc_config.txt @@ -3,13 +3,15 @@ // Structure of Database: // SC_NAME, flag // -// flag 0x1 - SC cannot be removed by death. -// 0x2 - SC cannot be saved. -// 0x4 - SC cannot be reset by dispell. -// 0x8 - SC cannot be reset by clearance. -// 0x10 - SC considered as buff and be removed by Hermode and etc. -// 0x20 - SC considered as debuff and be removed by Gospel and etc. -// 0x40 - SC cannot be reset when MADO Gear is taken off. +// flag 1 - SC cannot be removed by death. +// 2 - SC cannot be saved. +// 4 - SC cannot be reset by dispell. +// 8 - SC cannot be reset by clearance. +// 16 - SC considered as buff and be removed by Hermode and etc. +// 32 - SC considered as debuff and be removed by Gospel and etc. +// 64 - SC cannot be reset when MADO Gear is taken off. +//Example: +//SC_ENDURE, 21 //SC_ENDURE: cannot be removed by death and dispell and cosidered as buff. (16 + 4 + 1 = 21) SC_PROVOKE, 32 SC_ENDURE, 21 diff --git a/src/map/clif.c b/src/map/clif.c index 9fae03ef0..73d4b6666 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10573,7 +10573,7 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd) if (pc_isdead(sd)) break; - if ( pc_cant_act2(sd) ) + if ( pc_cant_act2(sd) || sd->state.vending ) break; if (sd->sc.count && ( @@ -10795,7 +10795,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) #endif return; } - if ( pc_cant_act2(sd) || !(bl = iMap->id2bl(RFIFOL(fd,2))) ) + if ( pc_cant_act2(sd) || !(bl = iMap->id2bl(RFIFOL(fd,2))) || sd->state.vending ) return; switch (bl->type) { diff --git a/src/map/pc.h b/src/map/pc.h index 5c585af1c..43d5d40c7 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -603,7 +603,7 @@ enum equip_pos { #define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend ) /* equals pc_cant_act except it doesn't check for chat rooms */ -#define pc_cant_act2(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend ) +#define pc_cant_act2(sd) ( (sd)->npc_id || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend ) #define pc_setdir(sd,b,h) ( (sd)->ud.dir = (b) ,(sd)->head_dir = (h) ) #define pc_setchatid(sd,n) ( (sd)->chatID = n ) -- cgit v1.2.3-70-g09d2