Pārlūkot izejas kodu

- Autospells will now again check for the skill's nk value, so that skills tagged "nodamage" skills will not trigger autospells.
- A bit of cleaning in pc_equippoint
- Corrected clif_item_sub so that pet eggs will correctly be sent as equipment (fixes them showing up "broken" and with random refine levels)


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

skotlex 19 gadi atpakaļ
vecāks
revīzija
7f92735874
4 mainītis faili ar 11 papildinājumiem un 6 dzēšanām
  1. 5 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/clif.c
  3. 3 1
      src/map/pc.c
  4. 2 4
      src/map/skill.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/06/26
+	* Autospells will now again check for the skill's nk value, so that skills
+	  tagged "nodamage" skills will not trigger autospells. [Skotlex]
+	* Corrected clif_item_sub so that pet eggs will correctly be sent as
+	  equipment (fixes them showing up "broken" and with random refine levels)
+	  [Skotlex]
 	* [Added]:
 	  - buildin_unitkill just for kicks. [Lance]
 

+ 1 - 1
src/map/clif.c

@@ -2217,7 +2217,7 @@ void clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data *
 		WBUFW(buf,n)=i->nameid;
 	WBUFB(buf,n+2)=itemtype(id->type);
 	WBUFB(buf,n+3)=i->identify;
-	if (equip > 0) { //Equippable item.
+	if (equip > 0 || id->type == 7) { //Equippable item (pet eggs also count).
 		WBUFW(buf,n+4)=equip;
 		WBUFW(buf,n+6)=i->equip;
 		WBUFB(buf,n+8)=i->attribute;

+ 3 - 1
src/map/pc.c

@@ -390,7 +390,9 @@ int pc_equippoint(struct map_session_data *sd,int n)
 
 	if(sd->inventory_data[n]) {
 		ep = sd->inventory_data[n]->equip;
-		if(sd->inventory_data[n]->look == 1 || sd->inventory_data[n]->look == 2 || sd->inventory_data[n]->look == 6) {
+		if(sd->inventory_data[n]->look == W_DAGGER	||
+			sd->inventory_data[n]->look == W_1HSWORD ||
+			sd->inventory_data[n]->look == W_1HAXE) {
 			if(ep == 2 && (pc_checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN))
 				return 34;
 		}

+ 2 - 4
src/map/skill.c

@@ -1336,10 +1336,8 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
 	}
 
 	//Reports say that autospell effects get triggered on skills and pretty much everything including splash attacks. [Skotlex]
-	//No need to check the NK value as this function is only called on attacks
-	//(or stuff that should invoke these things.
-	if(sd && !status_isdead(bl) && src != bl/* &&
-		!(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)*/) {
+	if(sd && !status_isdead(bl) && src != bl &&
+		!(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)) {
 		struct block_list *tbl;
 		struct unit_data *ud;
 		int i, skilllv;