summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-06 23:48:13 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-06 23:48:13 +0000
commit867734490acadfa45af27b3903a95f2bf15d3f3d (patch)
treef9eb463ba65838cb5e237d6add98ff216961d07f /src/map/status.c
parent8f3f5c94a0111b37b374f7d861533f5f25a99af5 (diff)
downloadhercules-867734490acadfa45af27b3903a95f2bf15d3f3d.tar.gz
hercules-867734490acadfa45af27b3903a95f2bf15d3f3d.tar.bz2
hercules-867734490acadfa45af27b3903a95f2bf15d3f3d.tar.xz
hercules-867734490acadfa45af27b3903a95f2bf15d3f3d.zip
- Fixed Overthrust's timer not being able to be refreshed when recasting it (conflict on what val2 should mean)
- Changed the code in status_change_timer so that a null pointer no longer causes a crash but prints an error instead. - Corrected clones not copying over a player's skills properly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12027 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c
index c56a764a1..574c11fb5 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4925,7 +4925,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_ADRENALINE2:
case SC_WEAPONPERFECTION:
case SC_OVERTHRUST:
- if (sce->val1 > val1)
+ if (sce->val2 > val2)
return 0;
break;
case SC_HPREGEN:
@@ -5686,7 +5686,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val2 = 20*val1; //Power increase
break;
case SC_OVERTHRUST:
- val2 = 5*val1; //Power increase
+ //val2 holds if it was casted on self, or is bonus received from others
+ val3 = 5*val1; //Power increase
if(sd && pc_checkskill(sd,BS_HILTBINDING)>0)
tick += tick / 10;
break;
@@ -6662,12 +6663,17 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
struct status_change_entry *sce;
bl = map_id2bl(id);
- sc = bl?status_get_sc(bl):NULL;
+ if(!bl)
+ {
+ ShowDebug("status_change_timer: Null pointer id: %d data: %d\n", id, data);
+ return 0;
+ }
+ sc = status_get_sc(bl);
status = status_get_status_data(bl);
- if(!(bl && sc && (sce = sc->data[type])))
+ if(!(sc && (sce = sc->data[type])))
{
- ShowDebug("status_change_timer: Null pointer id: %d data: %d bl-type: %d\n", id, data, bl?bl->type:-1);
+ ShowDebug("status_change_timer: Null pointer id: %d data: %d bl-type: %d\n", id, data, bl->type);
return 0;
}