summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-01-09 17:25:53 -0200
committershennetsind <ind@henn.et>2014-01-09 17:25:53 -0200
commit56649bda4b2f62cf42847830546b5856234b3178 (patch)
tree1ccf6f09b6620d95a177468bbee9cd0d428c1218 /src/map/clif.c
parentb79a9d7efa9213e3c791ec356bf21b712878d1aa (diff)
parent763102b807239809d318add3fae5629bfd50a78b (diff)
downloadhercules-56649bda4b2f62cf42847830546b5856234b3178.tar.gz
hercules-56649bda4b2f62cf42847830546b5856234b3178.tar.bz2
hercules-56649bda4b2f62cf42847830546b5856234b3178.tar.xz
hercules-56649bda4b2f62cf42847830546b5856234b3178.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index e69748809..4ae6c8d34 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -322,7 +322,7 @@ int clif_send_sub(struct block_list *bl, va_list ap) {
}
/* unless visible, hold it here */
- if( clif->ally_only && !sd->special_state.intravision && battle->check_target( src_bl, &sd->bl, BCT_ENEMY ) > 0 )
+ if( clif->ally_only && !sd->sc.data[SC_CLAIRVOYANCE] && !sd->special_state.intravision && battle->check_target( src_bl, &sd->bl, BCT_ENEMY ) > 0 )
return 0;
WFIFOHEAD(fd, len);
@@ -5947,9 +5947,15 @@ void clif_use_card(struct map_session_data *sd,int idx)
if( j == sd->inventory_data[i]->slot ) // No room
continue;
+ if( sd->status.inventory[i].equip > 0 ) // Do not check items that are already equipped
+ continue;
+
WFIFOW(fd,4+c*2)=i+2;
c++;
}
+
+ if( !c ) return; // no item is available for card insertion
+
WFIFOW(fd,2)=4+c*2;
WFIFOSET(fd,WFIFOW(fd,2));
}