summaryrefslogtreecommitdiff
path: root/src/map/refine.h
diff options
context:
space:
mode:
authorIbrahim Zidan <brahem@aotsw.com>2019-04-17 07:29:18 +0200
committerIbrahim Zidan <brahem@aotsw.com>2019-05-05 23:40:39 +0200
commit8fa081b6b4ad26851f3ab8f485ba76f3e4338762 (patch)
treec45282c318a70a4da40762ce220406abd1f21ed7 /src/map/refine.h
parent5a0c9f2f74070e9d1e6f4fec503b3687b5f1ef88 (diff)
downloadhercules-8fa081b6b4ad26851f3ab8f485ba76f3e4338762.tar.gz
hercules-8fa081b6b4ad26851f3ab8f485ba76f3e4338762.tar.bz2
hercules-8fa081b6b4ad26851f3ab8f485ba76f3e4338762.tar.xz
hercules-8fa081b6b4ad26851f3ab8f485ba76f3e4338762.zip
Implement Refinery UI
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Diffstat (limited to 'src/map/refine.h')
-rw-r--r--src/map/refine.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/map/refine.h b/src/map/refine.h
index 850f6143a..100d2c6b2 100644
--- a/src/map/refine.h
+++ b/src/map/refine.h
@@ -25,6 +25,7 @@
* Refine Interface.
**/
#include "common/hercules.h"
+#include "common/mmo.h"
/* Defines */
/**
@@ -60,6 +61,24 @@ enum refine_chance_type {
REFINE_CHANCE_TYPE_MAX
};
+enum refine_ui_failure_behavior {
+ REFINE_FAILURE_BEHAVIOR_DESTROY,
+ REFINE_FAILURE_BEHAVIOR_KEEP,
+ REFINE_FAILURE_BEHAVIOR_DOWNGRADE
+};
+
+/* Structure */
+struct s_refine_requirement {
+ int blacksmith_blessing;
+ int req_count;
+ struct {
+ int nameid;
+ int cost;
+ enum refine_chance_type type;
+ enum refine_ui_failure_behavior failure_behavior;
+ } req[MAX_REFINE_REQUIREMENTS];
+};
+
/**
* Refine Interface
**/
@@ -101,6 +120,22 @@ struct refine_interface {
* @return returns the bonus from refine db
**/
int(*get_randombonus_max) (enum refine_type equipment_type, int refine_level);
+
+ /**
+ * Validates and send Item addition packet to the client for refinery UI
+ * @param sd player session data.
+ * @param item_index the requested item index in inventory.
+ **/
+ void (*refinery_add_item) (struct map_session_data *sd, int item_index);
+
+ /**
+ * Processes an refine request through Refinery UI
+ * @param sd player session data
+ * @param item_index the index of the requested item
+ * @param material_id the refine material chosen by player
+ * @param use_blacksmith_blessing sets either if blacksmith blessing is requested to be used or not
+ **/
+ void (*refinery_refine_request) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing);
};
#ifdef HERCULES_CORE