Resolved several compile warnings

* Miscellaneous compile warning fixes.
This commit is contained in:
aleos89
2016-04-04 13:27:43 -04:00
parent d53a294a19
commit 8d43623a2b
8 changed files with 16 additions and 19 deletions

View File

@@ -9810,10 +9810,8 @@ ACMD_FUNC(adopt)
return 0;
}
if (response < ADOPT_MORE_CHILDREN) { // No displaymessage for client-type responses
sprintf(atcmd_output, msg_txt(sd, 744 + response - 1));
clif_displaymessage(fd, atcmd_output);
}
if (response < ADOPT_MORE_CHILDREN) // No displaymessage for client-type responses
clif_displaymessage(fd, msg_txt(sd, 744 + response - 1));
return -1;
}

View File

@@ -6951,7 +6951,7 @@ void battle_drain(struct map_session_data *sd, struct block_list *tbl, int64 rda
int battle_damage_area(struct block_list *bl, va_list ap) {
unsigned int tick;
int64 damage;
int amotion, dmotion, flag;
int amotion, dmotion;
struct block_list *src;
nullpo_ret(bl);
@@ -6961,7 +6961,6 @@ int battle_damage_area(struct block_list *bl, va_list ap) {
amotion = va_arg(ap,int);
dmotion = va_arg(ap,int);
damage = va_arg(ap,int);
flag = va_arg(ap,int);
if( bl->type == BL_MOB && ((TBL_MOB*)bl)->mob_id == MOBID_EMPERIUM )
return 0;
@@ -7584,7 +7583,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0;
default:
// Usually BCT_ALL stands for only hitting chars, but skills specifically set to hit traps also hit icewall
if ((flag&BCT_ALL) == BCT_ALL && !skill_get_inf2(skill_id)&INF2_HIT_TRAP)
if ((flag&BCT_ALL) == BCT_ALL && !(skill_get_inf2(skill_id)&INF2_HIT_TRAP))
return -1;
}
state |= BCT_ENEMY;

View File

@@ -18705,7 +18705,7 @@ void clif_parse_Oneclick_Itemidentify(int fd, struct map_session_data *sd) {
}
/// Starts navigation to the given target on client side
void clif_navigateTo(struct map_session_data *sd, const char* map, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id ){
void clif_navigateTo(struct map_session_data *sd, const char* mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id ){
#if PACKETVER >= 20111010
int fd = sd->fd;
@@ -18730,7 +18730,7 @@ void clif_navigateTo(struct map_session_data *sd, const char* map, uint16 x, uin
// If this flag is set, the navigation window will not be opened up
WFIFOB(fd,4) = hideWindow;
// Target map
safestrncpy( (char*)WFIFOP(fd,5),map,MAP_NAME_LENGTH_EXT);
safestrncpy( (char*)WFIFOP(fd,5),mapname,MAP_NAME_LENGTH_EXT);
// Target x
WFIFOW(fd,21) = x;
// Target y

View File

@@ -990,7 +990,7 @@ void clif_merge_item_open(struct map_session_data *sd);
void clif_broadcast_obtain_special_item(const char *char_name, unsigned short nameid, unsigned short container, enum BROADCASTING_SPECIAL_ITEM_OBTAIN type, const char *srcname);
void clif_dressing_room(struct map_session_data *sd, int flag);
void clif_navigateTo(struct map_session_data *sd, const char* map, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id );
void clif_navigateTo(struct map_session_data *sd, const char* mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id );
void clif_SelectCart(struct map_session_data *sd);
#endif /* _CLIF_H_ */

View File

@@ -1392,7 +1392,7 @@ int mob_unlocktarget(struct mob_data *md, unsigned int tick)
int mob_randomwalk(struct mob_data *md,unsigned int tick)
{
const int d=7;
int i,c,r,rd,dx,dy,max;
int i,c,r,dx,dy,max;
int speed;
nullpo_ret(md);
@@ -1404,7 +1404,6 @@ int mob_randomwalk(struct mob_data *md,unsigned int tick)
return 0;
r=rnd();
rd=rnd()%4; // Randomize direction in which we iterate to prevent monster cluttering up in one corner
dx=r%(d*2+1)-d;
dy=r/(d*2+1)%(d*2+1)-d;
max=(d*2+1)*(d*2+1);
@@ -1414,9 +1413,9 @@ int mob_randomwalk(struct mob_data *md,unsigned int tick)
if(((x != md->bl.x) || (y != md->bl.y)) && map_getcell(md->bl.m,x,y,CELL_CHKPASS) && unit_walktoxy(&md->bl,x,y,0)){
break;
}
// Could not move to cell, try the 7th cell in direction randomly decided by rd
// Could not move to cell, try the 7th cell in direction randomly decided by rnd
// We don't move step-by-step because this will make monster stick to the walls
switch(rd) {
switch(rnd()%4) { // Randomize direction in which we iterate to prevent monster cluttering up in one corner
case 0:
dx += d;
if (dx > d) {

View File

@@ -21064,12 +21064,12 @@ BUILDIN_FUNC(opendressroom)
BUILDIN_FUNC(navigateto){
#if PACKETVER >= 20111010
TBL_PC* sd;
const char *map;
const char *mapname;
uint16 x = 0, y = 0, monster_id = 0;
uint8 flag = NAV_KAFRA_AND_AIRSHIP;
bool hideWindow = true;
map = script_getstr(st,2);
mapname = script_getstr(st,2);
if( script_hasdata(st,3) )
x = script_getnum(st,3);
@@ -21085,7 +21085,7 @@ BUILDIN_FUNC(navigateto){
if (!script_charid2sd(8, sd))
return SCRIPT_CMD_FAILURE;
clif_navigateTo(sd,map,x,y,flag,hideWindow,monster_id);
clif_navigateTo(sd,mapname,x,y,flag,hideWindow,monster_id);
return SCRIPT_CMD_SUCCESS;
#else
@@ -21257,7 +21257,7 @@ BUILDIN_FUNC(minmax){
// Loop through each value stored in the array
for( ; start < end; start++ ){
value = func( value, (int32)get_val2( st, reference_uid( id, start ), reference_getref( data ) ) );
value = func( value, (int32)__64BPRTSIZE( get_val2( st, reference_uid( id, start ), reference_getref( data ) ) ) );
script_removetop( st, -1, 0 );
}

View File

@@ -4712,7 +4712,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
if( flag&1 ) {//Recursive invocation
int sflag = skill_area_temp[0] & 0xFFF;
int heal = 0;
struct status_change *tsc = status_get_sc(bl);
if (tsc && tsc->data[SC_HOVERING] && skill_get_inf3(skill_id)&INF3_NO_EFF_HOVERING)
break; // Under Hovering characters are immune to select trap and ground target skills.

View File

@@ -9,6 +9,8 @@ struct mob_data;
struct pet_data;
struct homun_data;
struct mercenary_data;
struct elemental_data;
struct npc_data;
struct status_change;
/**