summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-10 06:17:06 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-10 06:17:06 +0000
commit9ef634559f3cde232586b1dc6fd00bea3f3d8e53 (patch)
tree541295af8a6fbfe15b09da353680be6dd4d6b3ff /src/map/status.c
parent9c100697bf79604fcef8b7eedbadeed45c63b41b (diff)
downloadhercules-9ef634559f3cde232586b1dc6fd00bea3f3d8e53.tar.gz
hercules-9ef634559f3cde232586b1dc6fd00bea3f3d8e53.tar.bz2
hercules-9ef634559f3cde232586b1dc6fd00bea3f3d8e53.tar.xz
hercules-9ef634559f3cde232586b1dc6fd00bea3f3d8e53.zip
* Merged changes from trunk [14827:14894/trunk].
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14895 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/map/status.c b/src/map/status.c
index e68ebd291..37dad30b9 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -38,10 +38,13 @@
//Regen related flags.
-#define RGN_HP 0x01
-#define RGN_SP 0x02
-#define RGN_SHP 0x04
-#define RGN_SSP 0x08
+enum e_regen
+{
+ RGN_HP = 0x01,
+ RGN_SP = 0x02,
+ RGN_SHP = 0x04,
+ RGN_SSP = 0x08,
+};
static int max_weight_base[CLASS_COUNT];
static int hp_coefficient[CLASS_COUNT];
@@ -6961,7 +6964,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
return 1;
}
-int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr data)
+int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data)
{
struct block_list *bl;
struct status_change *sc;
@@ -6998,7 +7001,7 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr data)
/*==========================================
* ステータス異常終了タイマー
*------------------------------------------*/
-int status_change_timer(int tid, unsigned int tick, int id, intptr data)
+int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
{
enum sc_type type = (sc_type)data;
struct block_list *bl;
@@ -7258,7 +7261,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr data)
case SC_BERSERK:
// 5% every 10 seconds [DracoRPG]
- if(--(sce->val3)>0 && status_charge(bl, sce->val2, 0))
+ if( --( sce->val3 ) > 0 && status_charge(bl, sce->val2, 0) && status->hp > 100 )
{
sc_timer_next(sce->val4+tick, status_change_timer, bl->id, data);
return 0;
@@ -7689,7 +7692,7 @@ static int status_natural_heal(struct block_list* bl, va_list args)
}
//Natural heal main timer.
-static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr data)
+static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr_t data)
{
natural_heal_diff_tick = DIFF_TICK(tick,natural_heal_prev_tick);
map_foreachregen(status_natural_heal);