summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 21:25:26 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-18 21:25:26 +0000
commit2bc59ef9db7a86d0c483e3848ead57d6d691e6a3 (patch)
treedfe7994053b5e2d0a1aad158ca23f0cc8e0bc533 /src/map/skill.c
parentea3c690441b4f4c6cea3fd556ac0618018be9a23 (diff)
downloadhercules-2bc59ef9db7a86d0c483e3848ead57d6d691e6a3.tar.gz
hercules-2bc59ef9db7a86d0c483e3848ead57d6d691e6a3.tar.bz2
hercules-2bc59ef9db7a86d0c483e3848ead57d6d691e6a3.tar.xz
hercules-2bc59ef9db7a86d0c483e3848ead57d6d691e6a3.zip
Fixed numerous /W4 warnings (and created more :)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 1b5797742..a1f5c8b05 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6481,7 +6481,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk
/*==========================================
*
*------------------------------------------*/
-int skill_castend_map (struct map_session_data *sd, int skill_num, const char *map)
+int skill_castend_map (struct map_session_data *sd, short skill_num, const char *map)
{
nullpo_retr(0, sd);
@@ -6708,7 +6708,7 @@ static bool skill_dance_switch(struct skill_unit* unit, int flag)
* flag&1 is used to determine when the skill 'morphs' (Warp portal becomes active, or Fire Pillar becomes active)
* flag&2 is used to determine if this skill was casted with Magic Power active.
*------------------------------------------*/
-struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid, int skilllv, int x, int y, int flag)
+struct skill_unit_group* skill_unitsetting (struct block_list *src, short skillid, short skilllv, short x, short y, int flag)
{
struct skill_unit_group *group;
int i,limit,val1=0,val2=0,val3=0;
@@ -6975,7 +6975,8 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
for(i=0;i<layout->count;i++)
{
struct skill_unit *unit;
- int ux,uy,alive=1;
+ short ux,uy;
+ int alive=1;
ux = x + layout->dx[i];
uy = y + layout->dy[i];
@@ -7942,13 +7943,13 @@ static int skill_check_condition_char_sub (struct block_list *bl, va_list ap)
}
break;
}
- return 0;
+ //return 0;
}
/*==========================================
* Checks and stores partners for ensemble skills [Skotlex]
*------------------------------------------*/
-int skill_check_pc_partner (struct map_session_data *sd, int skill_id, int* skill_lv, int range, int cast_flag)
+int skill_check_pc_partner (struct map_session_data *sd, short skill_id, short* skill_lv, int range, int cast_flag)
{
static int c=0;
static int p_sd[2] = { 0, 0 };
@@ -8039,7 +8040,7 @@ int skill_isammotype (struct map_session_data *sd, int skill)
* &1: finished casting the skill (invoke hp/sp/item consumption)
* &2: picked menu entry (Warp Portal, Teleport and other menu based skills)
*------------------------------------------*/
-int skill_check_condition(struct map_session_data* sd, int skill, int lv, int type)
+int skill_check_condition(struct map_session_data* sd, short skill, short lv, int type)
{
struct status_data *status;
struct status_change *sc;
@@ -9322,11 +9323,9 @@ int skill_sit (struct map_session_data *sd, int type)
if(type) {
if (map_foreachinrange(skill_sit_count,&sd->bl, range, BL_PC, flag) > 1)
map_foreachinrange(skill_sit_in,&sd->bl, range, BL_PC, flag);
- return 0;
} else {
if (map_foreachinrange(skill_sit_count,&sd->bl, range, BL_PC, flag) < 2)
map_foreachinrange(skill_sit_out,&sd->bl, range, BL_PC, flag);
- return 0;
}
return 0;
}
@@ -9954,7 +9953,7 @@ int skill_delunit (struct skill_unit* unit)
*------------------------------------------*/
static int skill_unit_group_newid = MAX_SKILL_DB;
-struct skill_unit_group *skill_initunitgroup (struct block_list *src, int count, int skillid, int skilllv, int unit_id, int limit, int interval)
+struct skill_unit_group* skill_initunitgroup (struct block_list* src, int count, short skillid, short skilllv, int unit_id, int limit, int interval)
{
struct unit_data* ud = unit_bl2ud( src );
struct skill_unit_group* group;
@@ -10406,7 +10405,7 @@ int skill_unit_move_sub (struct block_list* bl, va_list ap)
{
if( flag&1 )
{
- unsigned int result = skill_unit_onplace(unit,target,tick);
+ int result = skill_unit_onplace(unit,target,tick);
if( flag&2 && result )
{ //Clear skill ids we have stored in onout.
ARR_FIND( 0, ARRAYLENGTH(skill_unit_temp), i, skill_unit_temp[i] == result );
@@ -10416,7 +10415,7 @@ int skill_unit_move_sub (struct block_list* bl, va_list ap)
}
else
{
- unsigned int result = skill_unit_onout(unit,target,tick);
+ int result = skill_unit_onout(unit,target,tick);
if( flag&2 && result )
{ //Store this unit id.
ARR_FIND( 0, ARRAYLENGTH(skill_unit_temp), i, skill_unit_temp[i] == 0 );