Quellcode durchsuchen

- Added a few dummy times in skill_cast_db for some GS skills.
- Autoskills now won't trigger on maps where said skill are not allowed.
- Some compilation warning fixes


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

skotlex vor 19 Jahren
Ursprung
Commit
5f8c670ba3
6 geänderte Dateien mit 21 neuen und 13 gelöschten Zeilen
  1. 2 0
      Changelog-Trunk.txt
  2. 2 0
      db/Changelog.txt
  3. 3 4
      db/skill_cast_db.txt
  4. 6 2
      src/common/cbasetypes.h
  5. 1 1
      src/map/npc.c
  6. 7 6
      src/map/skill.c

+ 2 - 0
Changelog-Trunk.txt

@@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/03/10
+	* Autospells won't trigger now on maps where said skills are forbidden.
+	  [Skotlex]
 	* Changed div (multi-hit) behaviour. Skills with div above zero will get
 	  their total damage increased by the number of hits, div less than zero is
 	  just for "show", total number of hits displayed is abs(div), but damage

+ 2 - 0
db/Changelog.txt

@@ -27,6 +27,8 @@
 =========================
 
 03/10
+	* Added a few dummy duration values on skill_cast_db for some GS skills
+	  (better than leaving them on 0...) [Skotlex]
 	* Updated div of LoV, Combo Skills and other such skills whose damage
 	  equation does not really scales well with the number of hits. [Skotlex]
 	* Made G_Giant_Hornet Agressive, thanks to Blackgatomon [Lupus]

+ 3 - 4
db/skill_cast_db.txt

@@ -825,14 +825,13 @@
 //-- GS_MAGICALBULLET
 507,0,0,0,0,0
 //-- GS_CRACKER
-508,0,0,0,0,0
+508,0,0,0,0,5000
 //-- GS_TRACKING
-
 512,1200:1400:1600:1800:2000:2200:2400:2600:2800:3000,0,0,0,0
 //-- GS_DISARM
 513,0,0,0,0,0
 //-- GS_PIERCINGSHOT
-514,0,0,0,0,0
+514,0,0,0,0,60000
 //-- GS_RAPIDSHOWER
 515,0,0,0,0,0
 //-- GS_DESPERADO
@@ -883,7 +882,7 @@
 //-- NJ_SUITON
 538,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0
 //-- NJ_HYOUSYOURAKU
-539,0,0,0,0,0
+539,0,0,0,0,10000
 //-- NJ_HUUJIN
 540,0,0,0,0,0
 //-- NJ_RAIGEKISAI

+ 6 - 2
src/common/cbasetypes.h

@@ -91,9 +91,14 @@ typedef int*			pint;
 //////////////////////////////
 #ifdef WIN32
 //////////////////////////////
+//These three are already redefined on my_global.h on Windows systems.
+#ifdef TXT_ONLY
 typedef          __int8		int8;
-typedef          __int16	int16;
 typedef          __int32	int32;
+typedef unsigned __int32	uint32;
+#endif
+
+typedef          __int16	int16;
 
 typedef signed __int8		sint8;
 typedef signed __int16		sint16;
@@ -101,7 +106,6 @@ typedef signed __int32		sint32;
 
 typedef unsigned __int8		uint8;
 typedef unsigned __int16	uint16;
-typedef unsigned __int32	uint32;
 //////////////////////////////
 #else // GNU
 //////////////////////////////

+ 1 - 1
src/map/npc.c

@@ -441,7 +441,7 @@ int npc_addeventtimer(struct npc_data *nd,int tick,const char *name)
 		if( nd->eventtimer[i]==-1 )
 			break;
 	if(i<MAX_EVENTTIMER){
-		if (!strdb_get(ev_db,name)) {
+		if (!strdb_get(ev_db,(unsigned char*)name)) {
 			if (battle_config.error_log)
 				ShowError("npc_addeventimer: Event %s does not exists.\n", name);
 			return 1; //Event does not exists!

+ 7 - 6
src/map/skill.c

@@ -1244,15 +1244,14 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
 			sc_start(bl,SC_STUN,70,skilllv,skill_get_time2(skillid,skilllv));
 		break;
 	//Until they're at right position - gs_statuschange- [Vicious]
-	case GS_BULLSEYE:
-		if(!(status_get_mode(bl)&MD_BOSS))
-			sc_start(bl,SC_COMA,0.1,skilllv,skill_get_time(skillid,skilllv));
+	case GS_BULLSEYE: //0.1% coma rate.
+		status_change_start(bl,SC_COMA,10,skilllv,0,0,0,0,0);
 		break;
 	case GS_CRACKER:
-		sc_start(bl,SC_STUN,(100 - 10*distance_bl(&sd->bl, bl)),skilllv,skill_get_time(skillid,skilllv)); //Temp stun rate
+		sc_start(bl,SC_STUN,(100 - 10*distance_bl(src, bl)),skilllv,skill_get_time2(skillid,skilllv)); //Temp stun rate
 		break;
 	case GS_PIERCINGSHOT:
-		sc_start(bl,SC_BLEEDING,(skilllv*3),skilllv,skill_get_time(skillid,skilllv));
+		sc_start(bl,SC_BLEEDING,(skilllv*3),skilllv,skill_get_time2(skillid,skilllv));
 		break;
 	case NJ_HYOUSYOURAKU:
 		sc_start(bl,SC_FREEZE,(10+10*skilllv),skilllv,skill_get_time2(skillid,skilllv));
@@ -1285,7 +1284,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
 
 			skill = (sd->autospell[i].id > 0) ? sd->autospell[i].id : -sd->autospell[i].id;
 			//Prevents skill from retriggering themselves. [Skotlex]
-			if (skill == skillid)
+			if (skill == skillid || skillnotok(skill, sd))
 				continue;
 
 			//skill2 reused to store skilllv.
@@ -1413,6 +1412,8 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
 			rate = ((sd && !sd->state.arrow_atk) || (status_get_range(src)<=2)) ?
 				dstsd->autospell2[i].rate : dstsd->autospell2[i].rate / 2;
 			
+			if (skillnotok(skillid, dstsd))
+				continue;
 			if (rand()%1000 > rate)
 				continue;
 			if (dstsd->autospell2[i].id < 0)