浏览代码

- Fixed the next invoked skill after AbraCadabra not having requirements even when it is a different skill than the one chosen by AbraCadabra.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9661 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 年之前
父节点
当前提交
0c68bf4e54
共有 4 个文件被更改,包括 20 次插入6 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 3 2
      src/char/char.c
  3. 3 1
      src/char_sql/char.c
  4. 12 3
      src/map/skill.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ 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.
 
 2007/01/16
+	* Fixed the next invoked skill after AbraCadabra not having requirements
+	  even when it is a different skill than the one chosen by AbraCadabra.
 	* Implemented Intravision as it should be. Thanks to HelloKitty2 for the
 	  captured packets.
 	* Some cleaning on the mob_ai to enable mobs to run away from their current

+ 3 - 2
src/char/char.c

@@ -1739,9 +1739,11 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
 		WFIFOB(fd,j+101) = (p->int_ > UCHAR_MAX) ? UCHAR_MAX : p->int_;
 		WFIFOB(fd,j+102) = (p->dex > UCHAR_MAX) ? UCHAR_MAX : p->dex;
 		WFIFOB(fd,j+103) = (p->luk > UCHAR_MAX) ? UCHAR_MAX : p->luk;
-		WFIFOW(fd,j+104) = p->char_num;
 #if PACKETVER > 7
+		WFIFOW(fd,j+104) = p->char_num;
 		WFIFOW(fd,j+106) = 1; //TODO: Handle this rename bit: 0 to enable renaming
+#else
+		WFIFOB(fd,j+104) = p->char_num;
 #endif
 	}
 
@@ -4453,4 +4455,3 @@ int do_init(int argc, char **argv) {
 	return 0;
 }
 #endif //TXT_SQL_CONVERT
-

+ 3 - 1
src/char_sql/char.c

@@ -1769,10 +1769,12 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
 		WFIFOB(fd,j+101) = (p->int_ > UCHAR_MAX) ? UCHAR_MAX : p->int_;
 		WFIFOB(fd,j+102) = (p->dex > UCHAR_MAX) ? UCHAR_MAX : p->dex;
 		WFIFOB(fd,j+103) = (p->luk > UCHAR_MAX) ? UCHAR_MAX : p->luk;
-		WFIFOW(fd,j+104) = p->char_num;
 #if PACKETVER > 7
 		//Updated packet structure with rename-button included. Credits to Sara-chan
+		WFIFOW(fd,j+104) = p->char_num;
 		WFIFOW(fd,j+106) = 1; //TODO: Handle this rename bit: 0 to enable renaming
+#else
+		WFIFOB(fd,j+104) = p->char_num;
 #endif
 	}
 	WFIFOSET(fd,WFIFOW(fd,2));

+ 12 - 3
src/map/skill.c

@@ -7866,9 +7866,18 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
 
 	if (sd->state.abra_flag)
 	{
-		sd->skillitem = sd->skillitemlv = 0;
-		if(type&1) sd->state.abra_flag = 0;
-		return 1;
+		if (sd->skillitem != skill)
+		{	//Cancelled, using a different skill.
+			sd->skillitem = sd->skillitemlv = sd->state.abra_flag = 0;
+		} else {
+			//Abracadabra skill, skip requisites!
+			if(type&1)
+			{	//Clear out the data.
+				sd->skillitem = sd->skillitemlv = 0;
+				sd->state.abra_flag = 0;
+			}
+			return 1;
+		}
 	}
 
 	if (sd->menuskill_id == AM_PHARMACY &&