summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pet.c4
-rw-r--r--src/map/skill.c4
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;