summaryrefslogtreecommitdiff
path: root/src/map/refine.p.h
diff options
context:
space:
mode:
authorIbrahim Zidan <brahem@aotsw.com>2019-04-27 23:14:09 +0200
committerIbrahim Zidan <brahem@aotsw.com>2019-05-05 23:40:43 +0200
commit8598e0cbf421eded6943d416f7da8881997c960a (patch)
tree35c1c6c6af1efddba2c91c1f5ca867f7c6b62f26 /src/map/refine.p.h
parentfdcd121237eb03cc264dbd8ad1371603bd6622c7 (diff)
downloadhercules-8598e0cbf421eded6943d416f7da8881997c960a.tar.gz
hercules-8598e0cbf421eded6943d416f7da8881997c960a.tar.bz2
hercules-8598e0cbf421eded6943d416f7da8881997c960a.tar.xz
hercules-8598e0cbf421eded6943d416f7da8881997c960a.zip
Implement Refine success/failure announcement feature
Currently as far as we know kRO only sends this on success in refining an item through the refinery ui, from level 10 all the way to 20. Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Diffstat (limited to 'src/map/refine.p.h')
-rw-r--r--src/map/refine.p.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/refine.p.h b/src/map/refine.p.h
index e1a24f6b7..3247d15c9 100644
--- a/src/map/refine.p.h
+++ b/src/map/refine.p.h
@@ -27,7 +27,14 @@
#include "refine.h"
#include "common/conf.h"
+/* Enums */
+enum refine_announce_condition {
+ REFINE_ANNOUNCE_SUCCESS = 0x1,
+ REFINE_ANNOUNCE_FAILURE = 0x2,
+ REFINE_ANNOUNCE_ALWAYS = REFINE_ANNOUNCE_SUCCESS | REFINE_ANNOUNCE_FAILURE,
+};
+/* Structures */
struct s_refine_info {
int chance[REFINE_CHANCE_TYPE_MAX][MAX_REFINE]; //< success chance
int bonus[MAX_REFINE]; //< cumulative fixed bonus damage
@@ -68,6 +75,14 @@ struct refine_interface_private {
int (*readdb_refine_libconfig) (const char *filename);
/**
+ * Converts refine database announce behvaior string to enum refine_announce_condition
+ * @param str the string to convert
+ * @param result pointer to where the converted value will be held
+ * @return true on success, false otherwise.
+ **/
+ bool (*announce_behavior_string2enum) (const char *str, unsigned int *result);
+
+ /**
* Converts refine database failure behvaior string to enum refine_ui_failure_behavior
* @param str the string to convert
* @param result pointer to where the converted value will be held