summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-17 04:48:11 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-17 04:48:11 +0000
commit9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8 (patch)
tree079392aca9c0a6c79a0b6405c80ecc3aef353634 /src/map/skill.c
parent4db5fdac1ee37f1dd2d2d28fbcaca577e112b953 (diff)
downloadhercules-9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8.tar.gz
hercules-9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8.tar.bz2
hercules-9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8.tar.xz
hercules-9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8.zip
Compiler fixes and scripting timer event fixes
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@228 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index e858d49df..5d89b7f84 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1378,13 +1378,12 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
int skill_attack( int attack_type, struct block_list* src, struct block_list *dsrc,
struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag )
{
-
- if(skilllv <= 0) return 0;
-
struct Damage dmg;
struct status_change *sc_data;
int type,lv,damage;
+ if(skilllv <= 0) return 0;
+
rdamage = 0;
nullpo_retr(0, src);
nullpo_retr(0, dsrc);
@@ -2111,12 +2110,12 @@ int skill_cleartimerskill(struct block_list *src)
*/
int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag )
{
- if(skilllv <= 0) return 0;
-
struct map_session_data *sd=NULL;
struct status_change *sc_data = battle_get_sc_data(src);
int i;
+ if(skilllv <= 0) return 0;
+
nullpo_retr(1, src);
nullpo_retr(1, bl);
@@ -2650,8 +2649,6 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
*/
int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag )
{
- if(skilllv <= 0) return 0;
-
struct map_session_data *sd=NULL;
struct map_session_data *dstsd=NULL;
struct mob_data *md=NULL;
@@ -2664,6 +2661,8 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
,1157,1159,1190,1272,1312,1373,1492};
int poringclass[]={1002};
+ if(skilllv <= 0) return 0;
+
nullpo_retr(1, src);
nullpo_retr(1, bl);
@@ -4406,11 +4405,11 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
*/
int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skilllv,unsigned int tick,int flag)
{
- if(skilllv <= 0) return 0;
-
struct map_session_data *sd=NULL;
int i,tmpx = 0,tmpy = 0, x1 = 0, y1 = 0;
+ if(skilllv <= 0) return 0;
+
nullpo_retr(0, src);
if(src->type==BL_PC){
@@ -7515,8 +7514,10 @@ int skill_frostjoke_scream(struct block_list *bl,va_list ap)
*/
int skill_abra_dataset(int skilllv)
{
- if(skilllv <= 0) return 0;
int skill = rand()%331;
+
+ if(skilllv <= 0) return 0;
+
//dbに基づくレベル?確率判定
if(skill_abra_db[skill].req_lv > skilllv || rand()%10000 >= skill_abra_db[skill].per) return 0;
//NPCスキルはダメ
@@ -9244,10 +9245,11 @@ int skill_check_cloaking(struct block_list *bl)
static int dy[]={-1,-1,-1, 0, 0, 1, 1, 1};
int end=1,i;
- nullpo_retr(0, bl);
//missing sd [Found by Celest, commited by Aria]
struct map_session_data *sd=(struct map_session_data *)bl;
+ nullpo_retr(0, bl);
+
if(bl->type == BL_PC &&
(battle_config.pc_cloak_check_type&1 || pc_checkskill(sd,AS_CLOAKING)>2))
return 0;
@@ -9455,11 +9457,12 @@ static int skill_unit_group_newid=10;
struct skill_unit_group *skill_initunitgroup(struct block_list *src,
int count,int skillid,int skilllv,int unit_id)
{
- if(skilllv <= 0) return 0;
int i;
struct skill_unit_group *group=NULL, *list=NULL;
int maxsug=0;
+ if(skilllv <= 0) return 0;
+
nullpo_retr(NULL, src);
if(src->type==BL_PC){