- Fixed mysql ping setting being in minutes rather than hours.

- Removed npc_event_sub from npc.h and moved it to npc.c
- Cleaned up #warp to prevent spitting non-walkable tile warnings.
- Changed the meaning of msg_athena 2, it is now "invalid target cell, randomizing".


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6114 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-04-16 15:33:59 +00:00
parent 53614089eb
commit 47adb68d91
9 changed files with 46 additions and 44 deletions

View File

@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/16 2006/04/16
* Fixed mysql ping setting being in minutes rather than hours. [Skotlex]
* Removed npc_event_sub from npc.h and moved it to npc.c [Skotlex]
* Cleaned up #warp to prevent spitting non-walkable tile warnings. [Skotlex]
* Changed the meaning of msg_athena 2, it is now "invalid target cell,
randomizing". [Skotlex]
* Fixed wrong check of Deluge + Suiton which broke the water-requirement * Fixed wrong check of Deluge + Suiton which broke the water-requirement
check for skills. [Skotlex] check for skills. [Skotlex]
* Cleared ud->target on remove-map, it should fix the phantom mob sprite * Cleared ud->target on remove-map, it should fix the phantom mob sprite

View File

@ -14,7 +14,7 @@
0: Warped. 0: Warped.
1: Map not found. 1: Map not found.
2: Coordinates out of range. 2: Invalid coordinates, using random target cell.
3: Character not found. 3: Character not found.
4: Jump to %s 4: Jump to %s
5: Jump to %d %d 5: Jump to %d %d

View File

@ -374,8 +374,8 @@ int inter_init(const char *file)
if (connection_ping_interval) { if (connection_ping_interval) {
add_timer_func_list(inter_sql_ping, "inter_sql_ping"); add_timer_func_list(inter_sql_ping, "inter_sql_ping");
add_timer_interval(gettick()+connection_ping_interval*60*1000, add_timer_interval(gettick()+connection_ping_interval*60*60*1000,
inter_sql_ping, 0, 0, connection_ping_interval*60*1000); inter_sql_ping, 0, 0, connection_ping_interval*60*60*1000);
} }
return 0; return 0;
} }

View File

@ -407,8 +407,8 @@ int mmo_auth_sqldb_init(void) {
if (connection_ping_interval) { if (connection_ping_interval) {
add_timer_func_list(login_sql_ping, "login_sql_ping"); add_timer_func_list(login_sql_ping, "login_sql_ping");
add_timer_interval(gettick()+connection_ping_interval*60*1000, add_timer_interval(gettick()+connection_ping_interval*60*60*1000,
login_sql_ping, 0, 0, connection_ping_interval*60*1000); login_sql_ping, 0, 0, connection_ping_interval*60*60*1000);
} }
return 0; return 0;
} }

View File

@ -1248,9 +1248,10 @@ int atcommand_rura(
return -1; return -1;
} }
if (map_getcell(m, x, y, CELL_CHKNOPASS)) if ((x || y) && map_getcell(m, x, y, CELL_CHKNOPASS)) {
clif_displaymessage(fd, msg_table[2]);
x = y = 0; //Invalid cell, use random spot. x = y = 0; //Invalid cell, use random spot.
}
if (map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { if (map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
clif_displaymessage(fd, msg_table[247]); clif_displaymessage(fd, msg_table[247]);
return -1; return -1;
@ -6004,6 +6005,7 @@ int atcommand_nuke(
if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) { if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kill only lower or same GM level if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kill only lower or same GM level
clif_skill_nodamage(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, -1, 1);
skill_castend_damage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, gettick(), 0); skill_castend_damage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, gettick(), 0);
clif_displaymessage(fd, msg_table[109]); // Player has been nuked! clif_displaymessage(fd, msg_table[109]); // Player has been nuked!
} else { } else {

View File

@ -1143,18 +1143,27 @@ int charcommand_warp(
return -1; return -1;
} }
if (x <= 0)
x = rand() % 399 + 1;
if (y <= 0)
y = rand() % 399 + 1;
if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat) if (strstr(map_name, ".gat") == NULL && strstr(map_name, ".afm") == NULL && strlen(map_name) < MAP_NAME_LENGTH-4) // 16 - 4 (.gat)
strcat(map_name, ".gat"); strcat(map_name, ".gat");
if ((pl_sd = map_nick2sd(character)) != NULL) { if ((pl_sd = map_nick2sd(character)) == NULL) {
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can rura+ only lower or same GM level clif_displaymessage(fd, msg_table[3]); // Character not found.
if (x > 0 && x < 400 && y > 0 && y < 400) { return -1;
}
if (pc_isGM(sd) < pc_isGM(pl_sd)) { // you can rura+ only lower or same GM level
clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
return -1;
}
m = map_mapname2mapid(map_name); m = map_mapname2mapid(map_name);
if (m >= 0 && map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { if (m < 0) {
clif_displaymessage(fd, msg_table[1]); // Map not found.
return -1;
}
if ((x || y) && map_getcell(m, x, y, CELL_CHKNOREACH)) {
clif_displaymessage(fd, msg_table[2]); // Coordinates out of range.
x = y = 0;
}
if (map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
clif_displaymessage(fd, "You are not authorised to warp someone to this map."); clif_displaymessage(fd, "You are not authorised to warp someone to this map.");
return -1; return -1;
} }
@ -1165,24 +1174,10 @@ int charcommand_warp(
if (pc_setpos(pl_sd, map[m].index, x, y, 3) == 0) { if (pc_setpos(pl_sd, map[m].index, x, y, 3) == 0) {
clif_displaymessage(pl_sd->fd, msg_table[0]); // Warped. clif_displaymessage(pl_sd->fd, msg_table[0]); // Warped.
clif_displaymessage(fd, msg_table[15]); // Player warped (message sends to player too). clif_displaymessage(fd, msg_table[15]); // Player warped (message sends to player too).
} else {
clif_displaymessage(fd, msg_table[1]); // Map not found.
return -1;
}
} else {
clif_displaymessage(fd, msg_table[2]); // Coordinates out of range.
return -1;
}
} else {
clif_displaymessage(fd, msg_table[81]); // Your GM level don't authorise you to do this action on this player.
return -1;
}
} else {
clif_displaymessage(fd, msg_table[3]); // Character not found.
return -1;
}
return 0; return 0;
}
//No error message specified...?
return -1;
} }
/*========================================== /*==========================================

View File

@ -3906,8 +3906,8 @@ int do_init(int argc, char *argv[]) {
if (connection_ping_interval) { if (connection_ping_interval) {
add_timer_func_list(map_sql_ping, "map_sql_ping"); add_timer_func_list(map_sql_ping, "map_sql_ping");
add_timer_interval(gettick()+connection_ping_interval*60*1000, add_timer_interval(gettick()+connection_ping_interval*60*60*1000,
map_sql_ping, 0, 0, connection_ping_interval*60*1000); map_sql_ping, 0, 0, connection_ping_interval*60*60*1000);
} }
#endif /* not TXT_ONLY */ #endif /* not TXT_ONLY */

View File

@ -302,6 +302,7 @@ int npc_event_export(char *lname,void *data,va_list ap)
return 0; return 0;
} }
int npc_event_sub(struct map_session_data *, struct event_data *, const unsigned char *); //[Lance]
/*========================================== /*==========================================
* NPCのOn* * NPCのOn*
*------------------------------------------ *------------------------------------------

View File

@ -38,7 +38,6 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4);
int npc_parse_mob2 (struct spawn_data*, int index); // [Wizputer] int npc_parse_mob2 (struct spawn_data*, int index); // [Wizputer]
int npc_parse_warp(char *w1,char *w2,char *w3,char *w4); int npc_parse_warp(char *w1,char *w2,char *w3,char *w4);
int npc_globalmessage(const char *name,char *mes); int npc_globalmessage(const char *name,char *mes);
int npc_event_sub(struct map_session_data *, struct event_data *, const unsigned char *); //[Lance]
int npc_enable(const char *name,int flag); int npc_enable(const char *name,int flag);
int npc_changename(const char *name, const char *newname, short look); // [Lance] int npc_changename(const char *name, const char *newname, short look); // [Lance]