Browse Source

* 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://svn.code.sf.net/p/rathena/svn/branches/stable@940 54d463be-8e91-2dee-dedb-b68131a5f0ec

codemaster 20 years ago
parent
commit
3a5658ce86
4 changed files with 16 additions and 5 deletions
  1. 4 0
      Changelog.txt
  2. 5 4
      Dev/bugs.txt
  3. 3 1
      src/map/pet.c
  4. 4 0
      src/map/skill.c

+ 4 - 0
Changelog.txt

@@ -1,4 +1,8 @@
 Date	Added
 Date	Added
+01/09
+	* 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]
 01/07
 01/07
         * Upon changing to high novice 100 stat points should be given, not 88 [celest]
         * Upon changing to high novice 100 stat points should be given, not 88 [celest]
         * Give high novices First Aid and Trick Dead upon job changing [celest]
         * Give high novices First Aid and Trick Dead upon job changing [celest]

+ 5 - 4
Dev/bugs.txt

@@ -47,12 +47,13 @@ Progress:	75%
 Problem:        Chars with ' in their name.. is legal.. and messes up sql
 Problem:        Chars with ' in their name.. is legal.. and messes up sql
 Assigned:       N/A
 Assigned:       N/A
 Progress:       0%
 Progress:       0%
+Information:	http://dev.mysql.com/doc/mysql/en/mysql_real_escape_string.html
 
 
 	DB server Error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'n' Sniff')' at line 1    Scratch 'n' Sniff
 	DB server Error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'n' Sniff')' at line 1    Scratch 'n' Sniff
 
 
 Problem:	PETS can attack Guardians, so players go to enemy castles before WOE and KILL all their Guards with PETS... LoL!
 Problem:	PETS can attack Guardians, so players go to enemy castles before WOE and KILL all their Guards with PETS... LoL!
-Assigned:       N/A
-Progress:       0%
+Assigned:       Codemaster
+Progress:       100% - Make sure you test this for me :)
 
 
 Problem:	mob_aval clone bug crashes client
 Problem:	mob_aval clone bug crashes client
 Assigned:       N/A
 Assigned:       N/A
@@ -167,8 +168,8 @@ Progress:	0%
 
 
 IMPORTANT: = NEVERENDING SOURCE OF SP/HP
 IMPORTANT: = NEVERENDING SOURCE OF SP/HP
 Problem:	Wedding skills fully donate SP/HP even when the donor has 1 SP / HP (when player has low amount of Max SP/HP)
 Problem:	Wedding skills fully donate SP/HP even when the donor has 1 SP / HP (when player has low amount of Max SP/HP)
-Assigned:	N/A
-Progress:	0%
+Assigned:	Codemaster
+Progress:	100% - should be fixed. Checks for 15% of HP for males, 15% of SP for females.
 
 
 Problem:	Exp Party Sharing Bug.
 Problem:	Exp Party Sharing Bug.
 		i.g. Hunter + Merchant are in the same party. M. is sitting. Hunter is killing some Seals. M. doesn't get EXP.
 		i.g. Hunter + Merchant are in the same party. M. is sitting. Hunter is killing some Seals. M. doesn't get EXP.

+ 3 - 1
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);
 	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 ||
 	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;
 		pd->target_id=0;
 		return 0;
 		return 0;
 	}
 	}

+ 4 - 0
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_MALE:
 	case WE_FEMALE:
 	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;
 			struct map_session_data *p_sd = NULL;
 			if((p_sd = pc_get_partner(sd)) == NULL)
 			if((p_sd = pc_get_partner(sd)) == NULL)
 				return 0;
 				return 0;