diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-02-17 22:36:02 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-02-17 22:36:02 +0000 |
commit | db231e817c5f6d6783b07d91e1d8b0d1243829dd (patch) | |
tree | 853852da1f15559d5b43004476241a193c12ae44 /src/map/pc.c | |
parent | 472eb3bd0d8598c2230fc1d8959fcc7e0a450cac (diff) | |
download | hercules-db231e817c5f6d6783b07d91e1d8b0d1243829dd.tar.gz hercules-db231e817c5f6d6783b07d91e1d8b0d1243829dd.tar.bz2 hercules-db231e817c5f6d6783b07d91e1d8b0d1243829dd.tar.xz hercules-db231e817c5f6d6783b07d91e1d8b0d1243829dd.zip |
- Updated Eye of Hellion to use the new format of the input command.
- corrected login_fd/char_fd being uninitialized in the char servers.
- Changed a bit around how status_base_atk works to avoid overflows.
- Added a check to prevent using consume-delay items when you cannot use skills, since that opens an exploit if the item also has non-skill-casting components to its script.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12214 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 218e40e24..99fcb0ace 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3087,6 +3087,13 @@ int pc_useitem(struct map_session_data *sd,int n) )) return 0; + //Since most delay-consume items involve using a "skill-type" target cursor, + //perform a skill-use check before going through. [Skotlex] + //resurrection was picked as testing skill, as a non-offensive, generic skill, it will do. + if (sd->inventory_data[n]->flag.delay_consume && + !status_check_skilluse(&sd->bl, &sd->bl, ALL_RESURRECTION, 0)) + return 0; + sd->itemid = sd->status.inventory[n].nameid; sd->itemindex = n; if(sd->catch_target_class != -1) //Abort pet catching. |