summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-09 15:38:39 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-09 15:38:39 +0000
commit99af19cda37c8dc88c401edafce71a80ca2bbb20 (patch)
treee43890f4e5fd18f75ddf4b7b71ac70b9c47e8bb8 /src/map/skill.c
parent560250a022a95bd9678c5a81e5f14a34959e356a (diff)
downloadhercules-99af19cda37c8dc88c401edafce71a80ca2bbb20.tar.gz
hercules-99af19cda37c8dc88c401edafce71a80ca2bbb20.tar.bz2
hercules-99af19cda37c8dc88c401edafce71a80ca2bbb20.tar.xz
hercules-99af19cda37c8dc88c401edafce71a80ca2bbb20.zip
* Don't allow Pets to attack Guardians outside of WoE [Codemaster] [SVN 940]
* Require 15% of HP or more for WE_MALE skill [Codemaster] [SVN 940] * Require 15% of SP or more for WE_FEMALE skill [Codemaster] [SVN 940] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@940 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 69033f716..ffbd1b44d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7744,6 +7744,10 @@ int skill_use_id( struct map_session_data *sd, int target_id,
case WE_MALE:
case WE_FEMALE:
{
+ if(skill_num == WE_MALE && sd->status.hp <= ((15*sd->status.max_hp)/100)) // Requires more than 15% of Max HP for WE_MALE
+ return 0;
+ if(skill_num == WE_FEMALE && sd->status.sp <= ((15*sd->status.max_sp)/100)) // Requires more than 15% of Max SP for WE_FEMALE
+ return 0;
struct map_session_data *p_sd = NULL;
if((p_sd = pc_get_partner(sd)) == NULL)
return 0;