Przeglądaj źródła

Re-enabled packet 0x1ac to be sent when something gets ankle-snared

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11400 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 17 lat temu
rodzic
commit
6d6f73231e
4 zmienionych plików z 14 dodań i 15 usunięć
  1. 1 0
      Changelog-Trunk.txt
  2. 10 9
      src/map/clif.c
  3. 2 2
      src/map/clif.h
  4. 1 4
      src/map/skill.c

+ 1 - 0
Changelog-Trunk.txt

@@ -7,6 +7,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 	* Fixed itemdb_read_sqldb blowing up the server with segmentation faults.
 	* Added an option for parse_script to ignore the checks for the set of 
 	  brackets around the script. [FlavioJS]
+	* Re-enabled packet 0x1ac to be sent when something gets ankle-snared
 	* Partially removed the usage of 'flags' to direct the execution path
 	  in skill unit code (some people seem to really like flags >_>)
 	- wiped out r8478 and its multiple levels of useless flag propagation

+ 10 - 9
src/map/clif.c

@@ -3946,7 +3946,7 @@ static void clif_getareachar_skillunit(struct map_session_data *sd, struct skill
 		WFIFOB(fd,14)=UNT_ATTACK_SKILLS; //Use invisible unit id for traps.
 	else
 		WFIFOB(fd,14)=unit->group->unit_id;
-	WFIFOB(fd,15)=0;
+	WFIFOB(fd,15)=1; // ignored by client (always gets set to 1)
 	WFIFOSET(fd,packet_len(0x11f));
 
 	if(unit->group->skill_id == WZ_ICEWALL)
@@ -3985,19 +3985,19 @@ void clif_skill_delunit(struct skill_unit *unit)
 
 /*==========================================
  * Unknown... trap related?
+ * Sent when an object gets ankle-snared
  * Only affects units with class [139,153] client-side
+ * R 01ac <object id>.l
  *------------------------------------------*/
-int clif_01ac(struct block_list *bl)
+void clif_01ac(struct block_list* bl)
 {
-	unsigned char buf[32];
-
-	nullpo_retr(0, bl);
+	unsigned char buf[6];
+	nullpo_retv(bl);
 
-	WBUFW(buf, 0) = 0x1ac;
-	WBUFL(buf, 2) = bl->id;
+	WBUFW(buf,0) = 0x1ac;
+	WBUFL(buf,2) = bl->id;
 
 	clif_send(buf,packet_len(0x1ac),bl,AREA);
-	return 0;
 }
 
 /*==========================================
@@ -4527,6 +4527,7 @@ int clif_skill_poseffect(struct block_list *src,int skill_id,int val,int x,int y
 /*==========================================
  * 場所スキルエフェクト表示
  *------------------------------------------*/
+//FIXME: this is just an AREA version of clif_getareachar_skillunit()
 void clif_skill_setunit(struct skill_unit *unit)
 {
 	unsigned char buf[128];
@@ -4557,7 +4558,7 @@ void clif_skill_setunit(struct skill_unit *unit)
 		WBUFB(buf,14)=unit->val2&UF_SONG?UNT_DISSONANCE:UNT_UGLYDANCE;
 	else
 		WBUFB(buf,14)=unit->group->unit_id;
-	WBUFB(buf,15)=0;
+	WBUFB(buf,15)=1; // ignored by client (always gets set to 1)
 	clif_send(buf,packet_len(0x11f),&unit->bl,AREA);
 }
 

+ 2 - 2
src/map/clif.h

@@ -123,7 +123,7 @@ int clif_damage(struct block_list* src,struct block_list *dst,unsigned int tick,
 void clif_takeitem(struct block_list* src,struct block_list* dst);
 void clif_sitting(struct block_list* bl);
 void clif_standing(struct block_list* bl);
-int clif_changelook(struct block_list *,int,int);	// area
+void clif_changelook(struct block_list *bl,int type,int val);	// area
 void clif_changetraplook(struct block_list *bl,int val); // area
 void clif_refreshlook(struct block_list *bl,int id,int type,int val,int area); //area specified in 'area'
 int clif_arrowequip(struct map_session_data *sd,int val); //self
@@ -221,7 +221,7 @@ int clif_produceeffect(struct map_session_data* sd,int flag,int nameid);
 void clif_skill_setunit(struct skill_unit *unit);
 void clif_skill_delunit(struct skill_unit *unit);
 
-int clif_01ac(struct block_list *bl);
+void clif_01ac(struct block_list* bl);
 
 int clif_autospell(struct map_session_data *sd,int skilllv);
 int clif_devotion(struct map_session_data *sd);

+ 1 - 4
src/map/skill.c

@@ -7418,10 +7418,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
 					sg->val2=bl->id;
 				} else
 					sec = 3000; //Couldn't trap it?
-				//clif_01ac(&src->bl); //Removed? Check the openkore description of this packet: [Skotlex]
-				// 01AC: long ID
-				// Indicates that an object is trapped, but ID is not a
-				// valid monster or player ID.
+				if( sg->unit_id == UNT_ANKLESNARE ) clif_01ac(&src->bl); // mysterious packet
 				sg->limit = DIFF_TICK(tick,sg->tick)+sec;
 				sg->interval = -1;
 				src->range = 0;