summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-16 20:20:39 -0200
committershennetsind <ind@henn.et>2013-12-16 20:20:39 -0200
commit0e25c604d9f84cbb0a9a737633a8b764c2a9d96f (patch)
tree12fcda5f8c9c24a4833fd4e4bd26e848210c68df /src/map/battle.c
parentf6daed397dee844234cacd90d395c0b74c404598 (diff)
downloadhercules-0e25c604d9f84cbb0a9a737633a8b764c2a9d96f.tar.gz
hercules-0e25c604d9f84cbb0a9a737633a8b764c2a9d96f.tar.bz2
hercules-0e25c604d9f84cbb0a9a737633a8b764c2a9d96f.tar.xz
hercules-0e25c604d9f84cbb0a9a737633a8b764c2a9d96f.zip
Introducing HPM Support for custom battle confs
Special Thanks to Mhalicot. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 3b8064278..b8143213a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -12,6 +12,7 @@
#include "../common/socket.h"
#include "../common/strlib.h"
#include "../common/utils.h"
+#include "../common/HPM.h"
#include "map.h"
#include "path.h"
@@ -6708,8 +6709,11 @@ int battle_set_value(const char* w1, const char* w2)
int i;
ARR_FIND(0, ARRAYLENGTH(battle_data), i, strcmpi(w1, battle_data[i].str) == 0);
- if (i == ARRAYLENGTH(battle_data))
+ if (i == ARRAYLENGTH(battle_data)) {
+ if( HPM->parseConf(w1,w2,HPCT_BATTLE) ) /* if plugin-owned, succeed */
+ return 1;
return 0; // not found
+ }
if (val < battle_data[i].min || val > battle_data[i].max)
{