summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c5
-rw-r--r--src/char_sql/char.c4
-rw-r--r--src/map/skill.c15
3 files changed, 18 insertions, 6 deletions
diff --git a/src/char/char.c b/src/char/char.c
index a7a199f12..f14a320ba 100644
--- a/src/char/char.c
+++ b/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
-
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 2cf237317..5289694d8 100644
--- a/src/char_sql/char.c
+++ b/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));
diff --git a/src/map/skill.c b/src/map/skill.c
index ba4c51cc0..c31ec78cf 100644
--- a/src/map/skill.c
+++ b/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 &&