summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-23 18:41:56 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-23 18:41:56 +0000
commiteb0a137041d3a5ee6385762b8374e98b3867d5a0 (patch)
treef11f4036af32507c0e6bbc92b55d17d07f4e3692 /src/map/clif.c
parent9157078e09096898afee0c9be17737df72bebaee (diff)
downloadhercules-eb0a137041d3a5ee6385762b8374e98b3867d5a0.tar.gz
hercules-eb0a137041d3a5ee6385762b8374e98b3867d5a0.tar.bz2
hercules-eb0a137041d3a5ee6385762b8374e98b3867d5a0.tar.xz
hercules-eb0a137041d3a5ee6385762b8374e98b3867d5a0.zip
- Minor cleanups
- Adjusted menu-based skills so you can't reuse the same skill until you've dealt with the menu. - Adjust autospells so that removing an autospell works when the script of the card that removes the autospell is triggered before the script that adds the spell. - The "requested name of gm-hidden char" warning will not be displayed when the object in question is an NPC (since you can use Intravision to do this). - Corrected the header format for invisible npcs. - Venom Knife no longer takes into accounts cards or EDP. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9905 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 198b7de79..0eaab5ce3 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8489,8 +8489,10 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
if (!bl) return;
sc = status_get_sc(bl);
- if (sc && sc->option&OPTION_INVISIBLE && !disguised(bl) && pc_isGM(sd) < battle_config.hack_info_GM_level)
- {
+ if (sc && sc->option&OPTION_INVISIBLE && !disguised(bl) &&
+ bl->type != BL_NPC && //Skip hidden NPCs which can be seen using Maya Purple
+ pc_isGM(sd) < battle_config.hack_info_GM_level
+ ) {
//GM characters (with client side GM enabled are able to see invisible stuff) [Lance]
//Asked name of invisible player, this shouldn't be possible!
//Possible bot? Thanks to veider and qspirit
@@ -9703,14 +9705,17 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) {
if(target_id<0 && -target_id == sd->bl.id) // for disguises [Valaris]
target_id = sd->bl.id;
-
+
+ if(sd->menuskill_id)
+ return; //Can't use skills while a menu is open.
+
if (sd->skillitem == skillnum) {
if (skilllv != sd->skillitemlv)
skilllv = sd->skillitemlv;
unit_skilluse_id(&sd->bl, target_id, skillnum, skilllv);
return;
}
-
+
sd->skillitem = sd->skillitemlv = 0;
if (skillnum == MO_EXTREMITYFIST) {
if ((sd->sc.data[SC_COMBO].timer == -1 ||
@@ -9801,7 +9806,11 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, int skilll
if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
return;
+ if(sd->menuskill_id)
+ return; //Can't use skills while a menu is open.
+
pc_delinvincibletimer(sd);
+
if (sd->skillitem == skillnum) {
if (skilllv != sd->skillitemlv)
skilllv = sd->skillitemlv;
@@ -9864,6 +9873,9 @@ void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
return;
+ if(sd->menuskill_id && sd->menuskill_id != RFIFOW(fd,2))
+ return; //Can't use skills while a menu is open.
+
pc_delinvincibletimer(sd);
skill_castend_map(sd,RFIFOW(fd,2),(char*)RFIFOP(fd,4));