diff options
author | shennetsind <ind@henn.et> | 2013-01-31 16:28:43 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-01-31 16:28:43 -0200 |
commit | 74ed3ed32f33ad4df945718389d7d74ab0a53794 (patch) | |
tree | d3185dabe69e26c5407f34c517c5d39a894ece5a /src | |
parent | 638e2b5c985c13a8138d1cb166d5fdb8148b690c (diff) | |
download | hercules-74ed3ed32f33ad4df945718389d7d74ab0a53794.tar.gz hercules-74ed3ed32f33ad4df945718389d7d74ab0a53794.tar.bz2 hercules-74ed3ed32f33ad4df945718389d7d74ab0a53794.tar.xz hercules-74ed3ed32f33ad4df945718389d7d74ab0a53794.zip |
Fixed Bug #6097
Players in Chatrooms now:
- Can Equip/Unequip gear
- Can Talk to NPCS
- Cant use consumable Items
http://hercules.ws/board/tracker/issue-6097-chatroom/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 10 | ||||
-rw-r--r-- | src/map/pc.h | 9 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 0e555252b..fba5ffecc 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10141,7 +10141,7 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd) if (pc_isdead(sd)) break; - if (pc_cant_act(sd)) + if ( pc_cant_act2(sd) ) break; if (sd->sc.count && ( @@ -10180,7 +10180,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) if (sd->npc_id != sd->npc_item_flag) return; } - else if (pc_istrading(sd)) + else if ( pc_istrading(sd) || sd->chatID ) return; //Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex] @@ -10213,7 +10213,7 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd) return; } else if (sd->state.storage_flag || sd->sc.opt1) ; //You can equip/unequip stuff while storage is open/under status changes - else if (pc_cant_act(sd)) + else if ( pc_cant_act2(sd) ) return; if(!sd->status.inventory[index].identify) { @@ -10250,7 +10250,7 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd) if (sd->state.storage_flag || sd->sc.opt1) ; //You can equip/unequip stuff while storage is open/under status changes - else if (pc_cant_act(sd)) + else if ( pc_cant_act2(sd) ) return; index = RFIFOW(fd,2)-2; @@ -10272,7 +10272,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) return; } - if (pc_cant_act(sd)) + if ( pc_cant_act2(sd) ) return; bl = map_id2bl(RFIFOL(fd,2)); diff --git a/src/map/pc.h b/src/map/pc.h index 3027c5f10..870945d73 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #ifndef _PC_H_ #define _PC_H_ @@ -592,6 +593,10 @@ enum equip_index { #define pc_isidle(sd) ( (sd)->chatID || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(last_tick, (sd)->idletime) >= battle_config.idle_no_share ) #define pc_istrading(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->state.trading ) #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 ) + +/* 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 ) + #define pc_setdir(sd,b,h) ( (sd)->ud.dir = (b) ,(sd)->head_dir = (h) ) #define pc_setchatid(sd,n) ( (sd)->chatID = n ) #define pc_ishiding(sd) ( (sd)->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) ) |