summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c33
-rw-r--r--src/map/clif.h4
-rw-r--r--src/map/skill.c2
3 files changed, 38 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index a471bfc06..1f7ab0be4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10550,6 +10550,9 @@ void clif_parse_SelectArrow(int fd,struct map_session_data *sd)
case AC_MAKINGARROW:
skill_arrow_create(sd,RFIFOW(fd,2));
break;
+ case SA_CREATECON:
+ skill_produce_mix(sd,SA_CREATECON,RFIFOW(fd,2),0,0,0, 1);
+ break;
case WL_READING_SB:
skill_spellbook(sd,RFIFOW(fd,2));
break;
@@ -15015,7 +15018,37 @@ void clif_parse_debug(int fd,struct map_session_data *sd)
ShowDump(RFIFOP(fd,0), packet_len);
}
+/*==========================================
+ * Server tells client to display a window similar to Magnifier (item) one
+ * Server populates the window with avilable elemental converter options according to player's inventory
+ *------------------------------------------*/
+int clif_elementalconverter_list(struct map_session_data *sd) {
+ int i,c,view,fd;
+
+ nullpo_ret(sd);
+
+ fd=sd->fd;
+ WFIFOHEAD(fd, MAX_SKILL_PRODUCE_DB *2+4);
+ WFIFOW(fd, 0)=0x1ad;
+
+ for(i=0,c=0;i<MAX_SKILL_PRODUCE_DB;i++){
+ if( skill_can_produce_mix(sd,skill_produce_db[i].nameid,23, 1) ){
+ if((view = itemdb_viewid(skill_produce_db[i].nameid)) > 0)
+ WFIFOW(fd,c*2+ 4)= view;
+ else
+ WFIFOW(fd,c*2+ 4)= skill_produce_db[i].nameid;
+ c++;
+ }
+ }
+ WFIFOW(fd,2) = c*2+4;
+ WFIFOSET(fd, WFIFOW(fd,2));
+ if (c > 0) {
+ sd->menuskill_id = SA_CREATECON;
+ sd->menuskill_val = c;
+ }
+ return 0;
+}
/**
* Rune Knight
**/
diff --git a/src/map/clif.h b/src/map/clif.h
index c06c40ee6..cdf04f047 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -636,6 +636,10 @@ void clif_search_store_info_click_ack(struct map_session_data* sd, short x, shor
void clif_msgtable(int fd, int line);
void clif_msgtable_num(int fd, int line, int num);
/**
+ * Elemental Converter List
+ **/
+int clif_elementalconverter_list(struct map_session_data *sd);
+/**
* Rune Knight
**/
void clif_millenniumshield(struct map_session_data *sd, short shields );
diff --git a/src/map/skill.c b/src/map/skill.c
index 411a4c56a..76d09d89b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4722,7 +4722,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case SA_CREATECON:
if(sd) {
- clif_skill_produce_mix_list(sd,AM_PHARMACY,23);
+ clif_elementalconverter_list(sd);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
}
break;