Jelajahi Sumber

- Shadow Jump and Kirikage won't "move" you if you use them in GvG grounds. Fixed Kirikage so it first warps you, and then you unhide.
- Corrected Zeny Nage so the Zeny spent on the attack is always the exact same value as the damage you are dealing. Also corrected it so it does half damage when used on players.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9229 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 18 tahun lalu
induk
melakukan
b1e1b423f6
4 mengubah file dengan 25 tambahan dan 16 penghapusan
  1. 5 0
      Changelog-Trunk.txt
  2. 10 9
      src/map/battle.c
  3. 9 6
      src/map/skill.c
  4. 1 1
      src/map/status.c

+ 5 - 0
Changelog-Trunk.txt

@@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/11/16
+	* Shadow Jump and Kirikage won't "move" you if you use them in GvG grounds.
+	  Fixed Kirikage so it first warps you, and then you unhide. [Skotlex]
+	* Corrected Zeny Nage so the Zeny spent on the attack is always the exact
+	  same value as the damage you are dealing. Also corrected it so it does half
+	  damage when used on players. [Skotlex]
 	* Overlapping song/dances will now cause dissonance/ugly-dance level 1
 	  instead of retaining the level of their song/dance. [Skotlex]
 	* Fixed wrong check in @petrename, thanks to The Ultra Mage.[Skotlex]

+ 10 - 9
src/map/battle.c

@@ -2635,16 +2635,10 @@ struct Damage  battle_calc_misc_attack(
 		md.damage = skill_get_zeny(skill_num ,skill_lv);
 		if (!md.damage) md.damage = 2;
 		md.damage = md.damage + rand()%md.damage;
-
-		if (sd)
-		{
-			if ( md.damage > sd->status.zeny )
-				md.damage=sd->status.zeny;
-			pc_payzeny(sd, md.damage);
-		}
-
-		if(is_boss(target) || tsd || map_flag_gvg2(target->m))
+		if (is_boss(target))
 			md.damage=md.damage/3;
+		else if (tsd)
+			md.damage=md.damage/2;
 		break;
 	case GS_FLING:
 		md.damage = sd?sd->status.job_level:status_get_lv(src);
@@ -2737,6 +2731,13 @@ struct Damage  battle_calc_misc_attack(
 	if (map_flag_gvg2(target->m))
 		md.damage=battle_calc_gvg_damage(src,target,md.damage,md.div_,skill_num,skill_lv,md.flag);
 
+	if (skill_num == NJ_ZENYNAGE && sd)
+	{	//Time to Pay Up.
+		if ( md.damage > sd->status.zeny )
+			md.damage=sd->status.zeny;
+		pc_payzeny(sd, md.damage);
+	}
+
 	return md;
 }
 /*==========================================

+ 9 - 6
src/map/skill.c

@@ -3141,14 +3141,15 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
 			sc_start(src,SC_HIDING,100,skilllv,skill_get_time(skillid,skilllv));
 		break;
 	case NJ_KIRIKAGE:
-		{
+		if (!map_flag_gvg(src->m))
+		{	//You don't move on GVG grounds.
 			short x, y;
 			map_search_freecell(bl, 0, &x, &y, 1, 1, 0);
-			status_change_end(src, SC_HIDING, -1);
 			if (unit_movepos(src, x, y, 0, 0))
 				clif_slide(src,src->x,src->y);
-			skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
 		}
+		status_change_end(src, SC_HIDING, -1);
+		skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
 		break;
 	case 0:
 		if(sd) {
@@ -6077,9 +6078,11 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
 		break;
 	case NJ_SHADOWJUMP:
 	{
-		unit_movepos(src, x, y, 1, 0);
-		clif_slide(src,x,y);
-
+		if (!map_flag_gvg(src->m))
+		{	//You don't move on GVG grounds.
+			unit_movepos(src, x, y, 1, 0);
+			clif_slide(src,x,y);
+		}
 		if (sc && sc->data[SC_HIDING].timer != -1)
 			status_change_end(src, SC_HIDING, -1);
 	}

+ 1 - 1
src/map/status.c

@@ -4001,7 +4001,7 @@ struct regen_data *status_get_regen_data(struct block_list *bl)
 
 struct status_data *status_get_status_data(struct block_list *bl)
 {
-	nullpo_retr(NULL, bl);
+	nullpo_retr(&dummy_status, bl);
 		
 	switch (bl->type) {
 		case BL_PC: