summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--conf-tmpl/msg_athena.conf2
-rw-r--r--src/char_sql/inter.c4
-rw-r--r--src/login_sql/login.c4
-rw-r--r--src/map/atcommand.c6
-rw-r--r--src/map/charcommand.c63
-rw-r--r--src/map/map.c4
-rw-r--r--src/map/npc.c1
-rw-r--r--src/map/npc.h1
9 files changed, 46 insertions, 44 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 2567114d7..92cffd233 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -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.
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
check for skills. [Skotlex]
* Cleared ud->target on remove-map, it should fix the phantom mob sprite
diff --git a/conf-tmpl/msg_athena.conf b/conf-tmpl/msg_athena.conf
index e41c37bd2..a83375b5a 100644
--- a/conf-tmpl/msg_athena.conf
+++ b/conf-tmpl/msg_athena.conf
@@ -14,7 +14,7 @@
0: Warped.
1: Map not found.
-2: Coordinates out of range.
+2: Invalid coordinates, using random target cell.
3: Character not found.
4: Jump to %s
5: Jump to %d %d
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c
index d7e13c7c2..74da7f303 100644
--- a/src/char_sql/inter.c
+++ b/src/char_sql/inter.c
@@ -374,8 +374,8 @@ int inter_init(const char *file)
if (connection_ping_interval) {
add_timer_func_list(inter_sql_ping, "inter_sql_ping");
- add_timer_interval(gettick()+connection_ping_interval*60*1000,
- inter_sql_ping, 0, 0, connection_ping_interval*60*1000);
+ add_timer_interval(gettick()+connection_ping_interval*60*60*1000,
+ inter_sql_ping, 0, 0, connection_ping_interval*60*60*1000);
}
return 0;
}
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index d5819434d..7c1faf0aa 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -407,8 +407,8 @@ int mmo_auth_sqldb_init(void) {
if (connection_ping_interval) {
add_timer_func_list(login_sql_ping, "login_sql_ping");
- add_timer_interval(gettick()+connection_ping_interval*60*1000,
- login_sql_ping, 0, 0, connection_ping_interval*60*1000);
+ add_timer_interval(gettick()+connection_ping_interval*60*60*1000,
+ login_sql_ping, 0, 0, connection_ping_interval*60*60*1000);
}
return 0;
}
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 2501e633c..d32d0fa66 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1248,9 +1248,10 @@ int atcommand_rura(
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.
-
+ }
if (map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
clif_displaymessage(fd, msg_table[247]);
return -1;
@@ -6004,6 +6005,7 @@ int atcommand_nuke(
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
+ 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);
clif_displaymessage(fd, msg_table[109]); // Player has been nuked!
} else {
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index 6c589473e..4f7d8eb01 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -1143,46 +1143,41 @@ int charcommand_warp(
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)
strcat(map_name, ".gat");
- if ((pl_sd = map_nick2sd(character)) != NULL) {
- if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can rura+ only lower or same GM level
- if (x > 0 && x < 400 && y > 0 && y < 400) {
- m = map_mapname2mapid(map_name);
- if (m >= 0 && 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.");
- return -1;
- }
- if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
- clif_displaymessage(fd, "You are not authorised to warp this player from its actual map.");
- return -1;
- }
- if (pc_setpos(pl_sd, map[m].index, x, y, 3) == 0) {
- clif_displaymessage(pl_sd->fd, msg_table[0]); // Warped.
- 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 {
+ if ((pl_sd = map_nick2sd(character)) == NULL) {
clif_displaymessage(fd, msg_table[3]); // Character not found.
return -1;
}
-
- return 0;
+ 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);
+ 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.");
+ return -1;
+ }
+ if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ clif_displaymessage(fd, "You are not authorised to warp this player from its actual map.");
+ return -1;
+ }
+ if (pc_setpos(pl_sd, map[m].index, x, y, 3) == 0) {
+ clif_displaymessage(pl_sd->fd, msg_table[0]); // Warped.
+ clif_displaymessage(fd, msg_table[15]); // Player warped (message sends to player too).
+ return 0;
+ }
+ //No error message specified...?
+ return -1;
}
/*==========================================
diff --git a/src/map/map.c b/src/map/map.c
index d749d26bf..94bc6a57c 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3906,8 +3906,8 @@ int do_init(int argc, char *argv[]) {
if (connection_ping_interval) {
add_timer_func_list(map_sql_ping, "map_sql_ping");
- add_timer_interval(gettick()+connection_ping_interval*60*1000,
- map_sql_ping, 0, 0, connection_ping_interval*60*1000);
+ add_timer_interval(gettick()+connection_ping_interval*60*60*1000,
+ map_sql_ping, 0, 0, connection_ping_interval*60*60*1000);
}
#endif /* not TXT_ONLY */
diff --git a/src/map/npc.c b/src/map/npc.c
index 2d3428eec..a5014de51 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -302,6 +302,7 @@ int npc_event_export(char *lname,void *data,va_list ap)
return 0;
}
+int npc_event_sub(struct map_session_data *, struct event_data *, const unsigned char *); //[Lance]
/*==========================================
* 全てのNPCのOn*イベント実行
*------------------------------------------
diff --git a/src/map/npc.h b/src/map/npc.h
index 760a61aae..e05687969 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -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_warp(char *w1,char *w2,char *w3,char *w4);
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_changename(const char *name, const char *newname, short look); // [Lance]