diff options
author | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-09 15:38:39 +0000 |
---|---|---|
committer | codemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-09 15:38:39 +0000 |
commit | 99af19cda37c8dc88c401edafce71a80ca2bbb20 (patch) | |
tree | e43890f4e5fd18f75ddf4b7b71ac70b9c47e8bb8 /src/map | |
parent | 560250a022a95bd9678c5a81e5f14a34959e356a (diff) | |
download | hercules-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')
-rw-r--r-- | src/map/pet.c | 4 | ||||
-rw-r--r-- | src/map/skill.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index 545cc079f..c198c1fb5 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -178,7 +178,9 @@ static int pet_attack(struct pet_data *pd,unsigned int tick,int data) md=(struct mob_data *)map_id2bl(pd->target_id); if(md == NULL || md->bl.type != BL_MOB || pd->bl.m != md->bl.m || md->bl.prev == NULL || - distance(pd->bl.x,pd->bl.y,md->bl.x,md->bl.y) > 13) { + distance(pd->bl.x,pd->bl.y,md->bl.x,md->bl.y) > 13 || + (!agit_flag && md->class_ >= 1285 && md->class_ <= 1288)) // Cannot attack Guardians outside of WoE + { pd->target_id=0; return 0; } 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; |