summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-04-01 08:37:31 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-04-01 08:37:31 +0000
commit96a3da18a1e77035ee894283a3c805c7062a203d (patch)
treeb73768517041057f95f6ae70497f374196eb9672 /src/map/pc.c
parent612a264f1dfa99ff5ee6484139c115200f4bc179 (diff)
downloadhercules-96a3da18a1e77035ee894283a3c805c7062a203d.tar.gz
hercules-96a3da18a1e77035ee894283a3c805c7062a203d.tar.bz2
hercules-96a3da18a1e77035ee894283a3c805c7062a203d.tar.xz
hercules-96a3da18a1e77035ee894283a3c805c7062a203d.zip
* Fixed a potential crash in pc_walk in Win32 builds
* Added bAddEffWhenHitShort and changed bAddEffWhenHit back to all physical damage git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1373 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index dc5792327..de289a33b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1829,8 +1829,16 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
sd->critaddrace[type2]+=val;
break;
case SP_ADDEFF_WHENHIT:
- if(sd->state.lr_flag != 2)
+ if(sd->state.lr_flag != 2) {
+ sd->addeff3[type2]+=val;
+ sd->addeff3_type[type2]=1;
+ }
+ break;
+ case SP_ADDEFF_WHENHIT_SHORT:
+ if(sd->state.lr_flag != 2) {
sd->addeff3[type2]+=val;
+ sd->addeff3_type[type2]=0;
+ }
break;
case SP_SKILL_ATK:
if(sd->state.lr_flag != 2) {
@@ -3198,10 +3206,8 @@ static int pc_walk(int tid,unsigned int tick,int id,int data)
int moveblock;
int x,y,dx,dy;
- sd = map_id2sd(id);
-#ifndef _WIN32
- nullpo_retr_f(0, sd, "id=%d", id);
-#endif
+ if ((sd = map_id2sd(id)) == NULL)
+ return 0;
if(sd->walktimer != tid){
if(battle_config.error_log)