Hello I implemented this code to broadcast mvp respawns.
scr/map/mob.cpp
md->spawn_timer = INVALID_TIMER;
mob_spawn(md);
Under this line I placed:
// if monster boss -> do announce
if( md->spawn->state.boss ) {
char message[128];
sprintf(message, "[MVP Spawn]: %s has been spawned on %s map.", md->name, map_mapid2mapname(md->spawn->m));
clif_broadcast(&md->bl, message, strlen(message) + 1, BC_DEFAULT, ALL_CLIENT);
}
}
return 0;
It's working fine, MvP Respawns are being broadcasted, but now may I now is there any way to get rid of some console warnings?
1>mob.cpp
1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(1049,80): warning C4267: 'argumento': conversión de 'size_t' a 'int'; posible pérdida de datos
1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(2839,57): warning C4267: 'argumento': conversión de 'size_t' a 'int'; posible pérdida de datos
1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(3009,58): warning C4267: 'argumento': conversión de 'size_t' a 'int'; posible pérdida de datos
1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(6410,50): warning C4267: 'inicializando': conversión de 'size_t' a 'int'; posible pérdida de datos
1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(6411,65): warning C4267: 'inicializando': conversión de 'size_t' a 'int'; posible pérdida de datos
Question
iraciz
Hello I implemented this code to broadcast mvp respawns.
scr/map/mob.cpp
md->spawn_timer = INVALID_TIMER; mob_spawn(md);
Under this line I placed:
// if monster boss -> do announce if( md->spawn->state.boss ) { char message[128]; sprintf(message, "[MVP Spawn]: %s has been spawned on %s map.", md->name, map_mapid2mapname(md->spawn->m)); clif_broadcast(&md->bl, message, strlen(message) + 1, BC_DEFAULT, ALL_CLIENT); } } return 0;
It's working fine, MvP Respawns are being broadcasted, but now may I now is there any way to get rid of some console warnings?
1>mob.cpp 1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(1049,80): warning C4267: 'argumento': conversión de 'size_t' a 'int'; posible pérdida de datos 1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(2839,57): warning C4267: 'argumento': conversión de 'size_t' a 'int'; posible pérdida de datos 1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(3009,58): warning C4267: 'argumento': conversión de 'size_t' a 'int'; posible pérdida de datos 1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(6410,50): warning C4267: 'inicializando': conversión de 'size_t' a 'int'; posible pérdida de datos 1>C:\Users\mario\Desktop\rAthena \src\map\mob.cpp(6411,65): warning C4267: 'inicializando': conversión de 'size_t' a 'int'; posible pérdida de datos
Can you guys lend me a hand?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.