summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-06-24 17:36:34 -0700
committerBen Longbons <b.r.longbons@gmail.com>2012-06-24 17:38:24 -0700
commit75dd1d62bb3b48d45fd61090ad7c74dc67d5296c (patch)
tree483b934bc0e8c131d5fef4f3df0b40d7242cdbed
parent65cc0ea4e28005de266b221a6f8427f7f73027f3 (diff)
downloadtmwa-75dd1d62bb3b48d45fd61090ad7c74dc67d5296c.tar.gz
tmwa-75dd1d62bb3b48d45fd61090ad7c74dc67d5296c.tar.bz2
tmwa-75dd1d62bb3b48d45fd61090ad7c74dc67d5296c.tar.xz
tmwa-75dd1d62bb3b48d45fd61090ad7c74dc67d5296c.zip
Add @doomspot command.
-rw-r--r--src/map/atcommand.c24
-rw-r--r--src/map/atcommand.h1
2 files changed, 25 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3c54d5e..3106244 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -211,6 +211,7 @@ ATCOMMAND_FUNC (skillpool_unfocus); // [Fate]
ATCOMMAND_FUNC (skill_learn); // [Fate]
ATCOMMAND_FUNC (wgm);
ATCOMMAND_FUNC (ipcheck);
+ATCOMMAND_FUNC (doomspot);
/*==========================================
*AtCommandInfo atcommand_info[]構造体の定義
@@ -409,6 +410,7 @@ static AtCommandInfo atcommand_info[] = {
{AtCommand_IterateBackward, "@skill-learn", 80, atcommand_skill_learn}, // [Fate]
{AtCommand_Wgm, "@wgm", 0, atcommand_wgm},
{AtCommand_IpCheck, "@ipcheck", 60, atcommand_ipcheck},
+ {AtCommand_DoomSpot, "@doomspot", 60, atcommand_doomspot},
// add new commands before this line
{AtCommand_Unknown, NULL, 1, NULL}
@@ -8700,3 +8702,25 @@ int atcommand_ipcheck (const int fd, struct map_session_data *sd,
clif_displaymessage (fd, "End of list");
return 0;
}
+
+int atcommand_doomspot(const int fd, struct map_session_data *sd,
+ const char *command, const char *message)
+{
+ struct map_session_data *pl_sd;
+ int i;
+
+ for (i = 0; i < fd_max; i++)
+ {
+ if (session[i] && (pl_sd = (struct map_session_data *)session[i]->session_data)
+ && pl_sd->state.auth && i != fd && sd->bl.m == pl_sd->bl.m
+ && sd->bl.x == pl_sd->bl.x && sd->bl.y == pl_sd->bl.y
+ && pc_isGM (sd) >= pc_isGM (pl_sd))
+ { // you can doom only lower or same gm level
+ pc_damage (NULL, pl_sd, pl_sd->status.hp + 1);
+ clif_displaymessage (pl_sd->fd, msg_table[61]); // The holy messenger has given judgement.
+ }
+ }
+ clif_displaymessage (fd, msg_table[62]); // Judgement was made.
+
+ return 0;
+}
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 859ac6b..0b141cb 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -185,6 +185,7 @@ enum AtCommandType
AtCommand_Wgm,
AtCommand_IpCheck,
AtCommand_ListNearby, // [fate]
+ AtCommand_DoomSpot,
// end
AtCommand_Unknown,
AtCommand_MAX