Jelajahi Sumber

> Hercules merges:

* cf690d4:
Star Gladiator's map data is now cleared upon job changing outside star gladiator lineage, that way the database will no longer store these vars when they're not used (bugreport:6689).

* 7911e5e:
Making signal.h available throughout the whole source when in DEBUG mode so that developers (and users debugging) can easily raise signals from anywhere. Extremely handy with gdb, for example.

* 18b2468:
Basilica can only be placed when there are no other units (no mobs/players) within the range of which the basilica will spawn (bugreport:6644).

* 0af9e03:
Support for 2012-04-18a.
Special Thanks to Judas for providing the new packet info.

* 234bbe2:
Normal Boss/mini-boss attacks no longer can hit trick-dead'd players (bugreport:4339).

* e6ac0ec:
Fixed 3 logical errors (1 that would cause CH_PALMSTRIKE to crash the server when either caster or target were out of sc data).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17108 54d463be-8e91-2dee-dedb-b68131a5f0ec
flaid 12 tahun lalu
induk
melakukan
0f04fdf03a
6 mengubah file dengan 51 tambahan dan 9 penghapusan
  1. 20 1
      db/packet_db.txt
  2. 5 0
      src/common/core.h
  3. 1 1
      src/map/clif.c
  4. 1 1
      src/map/clif.h
  5. 5 0
      src/map/pc.c
  6. 19 6
      src/map/skill.c

+ 20 - 1
db/packet_db.txt

@@ -1757,5 +1757,24 @@ packet_ver: 30
 0x08CF,10 //Amulet spirits
 0x0977,14 //Monster HP Bar
 
+//2012-04-18aRagexeRE [Special Thanks to Judas!]
+packet_ver:31
+0x023B,26,friendslistadd,2
+0x0361,5,hommenu,2:4
+0x08A8,36,storagepassword,0
+0x0802,26,partyinvite2,2
+0x022D,19,wanttoconnection,2:6:10:14:18
+0x0281,-1,itemlistwindowselected,2:4:8
+0x035F,6,ticksend,2
+0x0202,5,changedir,2:4
+0x07E4,6,takeitem,2
+0x0362,6,dropitem,2:4
+0x07EC,8,movetokafra,2:4
+0x0364,8,movefromkafra,2:4
+0x096A,6,getcharnamerequest,2
+0x0368,6,solvecharname,2
+0x08E5,41,bookingregreq,2:4     //Added to prevent disconnections
+0x08d2,10
+
 //Add new packets here
-//packet_ver: 31
+//packet_ver: 32

+ 5 - 0
src/common/core.h

@@ -4,6 +4,11 @@
 #ifndef	_CORE_H_
 #define	_CORE_H_
 
+/* so that developers with --enable-debug can raise signals from any section of the code they'd like */
+#ifdef DEBUG
+	#include <signal.h>
+#endif
+
 extern int arg_c;
 extern char **arg_v;
 

+ 1 - 1
src/map/clif.c

@@ -5255,7 +5255,7 @@ void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id , int
 
 	for(i=0,c=0;i<MAX_SKILL_PRODUCE_DB;i++){
 		if( skill_can_produce_mix(sd,skill_produce_db[i].nameid, trigger, 1) &&
-			( skill_id > 0 && skill_produce_db[i].req_skill == skill_id || skill_id < 0 )
+			( ( skill_id > 0 && skill_produce_db[i].req_skill == skill_id ) || skill_id < 0 )
 			){
 			if((view = itemdb_viewid(skill_produce_db[i].nameid)) > 0)
 				WFIFOW(fd,c*8+ 4)= view;

+ 1 - 1
src/map/clif.h

@@ -32,7 +32,7 @@ struct party_booking_ad_info;
 enum
 {// packet DB
 	MAX_PACKET_DB  = 0xA00,
-	MAX_PACKET_VER = 30,
+	MAX_PACKET_VER = 31,
 	MAX_PACKET_POS = 20,
 };
 

+ 5 - 0
src/map/pc.c

@@ -7229,6 +7229,11 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
 		}
 	}
 
+	if( (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR && (b_class&MAPID_UPPERMASK) != MAPID_STAR_GLADIATOR) {
+		/* going off star glad lineage, reset feel to not store no-longer-used vars in the database */
+		pc_resetfeel(sd);
+	}
+	
 	sd->status.class_ = job;
 	fame_flag = pc_famerank(sd->status.char_id,sd->class_&MAPID_UPPERMASK);
 	sd->class_ = (unsigned short)b_class;

+ 19 - 6
src/map/skill.c

@@ -2220,7 +2220,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
 	if(skill_id == WZ_FROSTNOVA && dsrc->x == bl->x && dsrc->y == bl->y)
 		return 0;
 	 //Trick Dead protects you from damage, but not from buffs and the like, hence it's placed here.
-	if (sc && sc->data[SC_TRICKDEAD] && !(sstatus->mode&MD_BOSS))
+	if (sc && sc->data[SC_TRICKDEAD])
 		return 0;
 
 	dmg = battle_calc_attack(attack_type,src,bl,skill_id,skill_lv,flag&0xFFF);
@@ -3283,8 +3283,8 @@ static int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data)
 					{
 						struct status_change* tsc = status_get_sc(target);
 						struct status_change* sc = status_get_sc(src);
-						if( tsc && tsc->option&OPTION_HIDE ||
-							sc && sc->option&OPTION_HIDE ){
+						if( ( tsc && tsc->option&OPTION_HIDE ) ||
+							( sc && sc->option&OPTION_HIDE ) ){
 							skill_blown(src,target,skill_get_blewcount(skl->skill_id, skl->skill_lv), -1, 0x0 );
 							break;
 						}
@@ -3730,7 +3730,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
 			if( dir > 2 && dir < 6 ) y = -i;
 			else if( dir == 7 || dir < 2 ) y = i;
 			else y = 0;
-			if( (mbl == src || !map_flag_gvg(src->m) && !map[src->m].flag.battleground) && // only NJ_ISSEN don't have slide effect in GVG
+			if( (mbl == src || (!map_flag_gvg(src->m) && !map[src->m].flag.battleground) ) && // only NJ_ISSEN don't have slide effect in GVG
 				unit_movepos(src, mbl->x+x, mbl->y+y, 1, 1) ) {
 				clif_slide(src, src->x, src->y);
 				//uncomment this if you want to remove MO_EXTREMITYFIST glitchy walking effect. [malufett]
@@ -9554,6 +9554,15 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data)
 
 }
 
+/* skill count without self */
+static int skill_count_wos(struct block_list *bl,va_list ap) {
+	struct block_list* src = va_arg(ap, struct block_list*);
+	if( src->id != bl->id ) {
+		return 1;
+	}
+	return 0;
+}
+
 /*==========================================
  *
  *------------------------------------------*/
@@ -9771,8 +9780,12 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
 	case HP_BASILICA:
 		if( sc->data[SC_BASILICA] )
 			status_change_end(src, SC_BASILICA, INVALID_TIMER); // Cancel Basilica
-		else
-		{ // Create Basilica. Start SC on caster. Unit timer start SC on others.
+		else { // Create Basilica. Start SC on caster. Unit timer start SC on others.
+			if( map_foreachinrange(skill_count_wos, src, 2, BL_MOB|BL_PC, src) ) {
+				if( sd )
+					clif_skill_fail(sd,skill_id,USESKILL_FAIL,0);
+				return 1;
+			}
 			skill_clear_unitgroup(src);
 			if( skill_unitsetting(src,skill_id,skill_lv,x,y,0) )
 				sc_start4(src,type,100,skill_lv,0,0,src->id,skill_get_time(skill_id,skill_lv));