Browse Source

- Stun time for using ES magic on non-mobs reduced to 0.5 secs.
- Eska is now usable on bosses.
- Swoo will stun you if attempted on an already 'swooned' enemy.
- clif_skill_failed will print out a debug line with the skill_id (since the current null_po does not helps at all to fix it)
- Applied TheUltraMage's suggested fixes to the grfio module.


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

skotlex 19 years ago
parent
commit
4ef4e4dc84
6 changed files with 37 additions and 25 deletions
  1. 6 0
      Changelog-Trunk.txt
  2. 3 2
      conf-tmpl/grf-files.txt
  3. 5 5
      src/common/grfio.c
  4. 5 2
      src/map/clif.c
  5. 8 4
      src/map/pc.c
  6. 10 12
      src/map/skill.c

+ 6 - 0
Changelog-Trunk.txt

@@ -4,6 +4,12 @@ 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.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/05/04
 2006/05/04
+	* Stun time for using ES magic on non-mobs reduced to 0.5 secs. [Skotlex]
+	* Eska is now usable on bosses. [Skotlex]
+	* Swoo will stun you if attempted on an already 'swooned' enemy. [Skotlex]
+	* clif_skill_failed will print out a debug line with the skill_id (since
+	  the current null_po does not helps at all to fix it) [Skotlex]
+	* Applied TheUltraMage's suggested fixes to the grfio module. [Skotlex]
 	* Rewrote Kaahi to behave as it should. It will heal whatever amount of
 	* Rewrote Kaahi to behave as it should. It will heal whatever amount of
 	  damage accumulates in the time2 interval (500ms by default) after being
 	  damage accumulates in the time2 interval (500ms by default) after being
 	  hit. [Skotlex]
 	  hit. [Skotlex]

+ 3 - 2
conf-tmpl/grf-files.txt

@@ -10,5 +10,6 @@ grf: C:\Program Files\Gravity\RO\sdata.grf
 
 
 //------ Others ---------------------------
 //------ Others ---------------------------
 
 
-// Data Directory
-//data_dir: C:\Program Files\Gravity\RO\
+//Path to directory that contains the data dir 
+//NOTE: Path must include trailing backslash, only one data_dir entry is supported.
+//data_dir: C:\Program Files\Gravity\RO\

+ 5 - 5
src/common/grfio.c

@@ -858,7 +858,7 @@ static void grfio_resourcecheck(void)
 	FILE *fp;
 	FILE *fp;
 
 
 	// read resnametable from data directory and return if successful
 	// read resnametable from data directory and return if successful
-	sprintf(restable, "%sresnametable.txt", data_dir);
+	sprintf(restable, "%sdata\\resnametable.txt", data_dir);
 	for (ptr = &restable[0]; *ptr != 0; ptr++)
 	for (ptr = &restable[0]; *ptr != 0; ptr++)
 		if (*ptr == '\\') *ptr = '/';
 		if (*ptr == '\\') *ptr = '/';
 
 
@@ -869,15 +869,15 @@ static void grfio_resourcecheck(void)
 				// we only need the map names and text files
 				// we only need the map names and text files
 				(strstr(w2, ".gat") || strstr(w2, ".txt")))
 				(strstr(w2, ".gat") || strstr(w2, ".txt")))
 			{
 			{
-				sprintf(src, "%s", w1);
-				sprintf(dst, "%s", w2);
+				sprintf(src, "data\\%s", w1);
+				sprintf(dst, "data\\%s", w2);
 				entry = filelist_find(dst);
 				entry = filelist_find(dst);
 				// create new entries reusing the original's info
 				// create new entries reusing the original's info
 				if (entry != NULL) {
 				if (entry != NULL) {
 					FILELIST fentry;
 					FILELIST fentry;
 					memcpy(&fentry, entry, sizeof(FILELIST));
 					memcpy(&fentry, entry, sizeof(FILELIST));
 					strncpy(fentry.fn, src, sizeof(fentry.fn) - 1);
 					strncpy(fentry.fn, src, sizeof(fentry.fn) - 1);
-					fentry.fnd = grfio_alloc_ptr(w2);
+					fentry.fnd = grfio_alloc_ptr(dst);
 					filelist_modify(&fentry);
 					filelist_modify(&fentry);
 					i++;
 					i++;
 				}
 				}
@@ -906,7 +906,7 @@ static void grfio_resourcecheck(void)
 					FILELIST fentry;
 					FILELIST fentry;
 					memcpy(&fentry, entry, sizeof(FILELIST));
 					memcpy(&fentry, entry, sizeof(FILELIST));
 					strncpy(fentry.fn, src, sizeof(fentry.fn) - 1);
 					strncpy(fentry.fn, src, sizeof(fentry.fn) - 1);
-					fentry.fnd = grfio_alloc_ptr(w2);
+					fentry.fnd = grfio_alloc_ptr(dst);
 					filelist_modify(&fentry);
 					filelist_modify(&fentry);
 					i++;
 					i++;
 				}
 				}

+ 5 - 2
src/map/clif.c

@@ -4338,8 +4338,11 @@ int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype)
 {
 {
 	int fd;
 	int fd;
 
 
-	nullpo_retr(0, sd);
-
+	if (!sd) {	//Since this is the most common nullpo.... 
+		ShowDebug("clif_skill_fail: Error, received NULL sd for skill %d\n", skill_id);
+		return 0;
+	}
+	
 	fd=sd->fd;
 	fd=sd->fd;
 
 
 	// reset all variables [celest]
 	// reset all variables [celest]

+ 8 - 4
src/map/pc.c

@@ -6255,13 +6255,17 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
 		clif_changelook(&sd->bl,LOOK_SHOES,0);
 		clif_changelook(&sd->bl,LOOK_SHOES,0);
 
 
 	clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
 	clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
+
+	if((sd->status.inventory[n].equip&0x0022) && 
+		sd->weapontype1 == 0 && sd->weapontype2 == 0)
+		skill_enchant_elemental_end(&sd->bl,-1);
+	
 	sd->status.inventory[n].equip=0;
 	sd->status.inventory[n].equip=0;
-	if(flag&1)
+
+	if(flag&1) {
 		pc_checkallowskill(sd);
 		pc_checkallowskill(sd);
-	if(sd->weapontype1 == 0 && sd->weapontype2 == 0)
-		skill_enchant_elemental_end(&sd->bl,-1);  //武器持ち誓えは無?件で?性付?解除
-	if(flag&1)
 		status_calc_pc(sd,0);
 		status_calc_pc(sd,0);
+	}
 
 
 	if(sd->sc.count && sd->sc.data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(RC_DEMIHUMAN,sd->def_ele))
 	if(sd->sc.count && sd->sc.data[SC_SIGNUMCRUCIS].timer != -1 && !battle_check_undead(RC_DEMIHUMAN,sd->def_ele))
 		status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);
 		status_change_end(&sd->bl,SC_SIGNUMCRUCIS,-1);

+ 10 - 12
src/map/skill.c

@@ -2944,7 +2944,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
 	case SL_STUN:
 	case SL_STUN:
 	case SL_SMA:
 	case SL_SMA:
 		if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
 		if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
-			status_change_start(src,SC_STUN,10000,skilllv,0,0,0,3000,8);
+			status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
 			clif_skill_fail(sd,skillid,0,0);
 			clif_skill_fail(sd,skillid,0,0);
 			break;
 			break;
 		}
 		}
@@ -5413,21 +5413,19 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 
 
 	case SL_SKA: // [marquis007]
 	case SL_SKA: // [marquis007]
 		if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
 		if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
-			status_change_start(src,SC_STUN,10000,skilllv,0,0,0,3000,8);
+			status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
 			clif_skill_fail(sd,skillid,0,0);
 			clif_skill_fail(sd,skillid,0,0);
 			break;
 			break;
 		}
 		}
-		if (sd && status_get_mode(bl)&MD_BOSS)
-			clif_skill_fail(sd,skillid,0,0);
-		else
-		{
-			clif_skill_nodamage(src,bl,skillid,skilllv,
-				sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-		}
+		clif_skill_nodamage(src,bl,skillid,skilllv,
+			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
 		break;
 		break;
 	case SL_SWOO:
 	case SL_SWOO:
-		if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
-			status_change_start(src,SC_STUN,10000,skilllv,0,0,0,3000,8);
+		if (sd && (
+			(!battle_config.allow_es_magic_pc && bl->type != BL_MOB) ||
+			(tsc && tsc->data[type].timer != -1)
+		)) {
+			status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
 			clif_skill_fail(sd,skillid,0,0);
 			clif_skill_fail(sd,skillid,0,0);
 			break;
 			break;
 		}
 		}
@@ -5437,7 +5435,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 
 
 	case SL_SKE:
 	case SL_SKE:
 		if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
 		if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
-			status_change_start(src,SC_STUN,10000,skilllv,0,0,0,3000,8);
+			status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
 			clif_skill_fail(sd,skillid,0,0);
 			clif_skill_fail(sd,skillid,0,0);
 			break;
 			break;
 		}
 		}