summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-27 13:22:55 -0300
committershennetsind <ind@henn.et>2013-03-27 13:22:55 -0300
commit90f117f6b071c9c12bb8b521b6de46301639e75c (patch)
treeb9b7c509abe0d7009ab7483a9201f4bcb579bce1 /src/map/atcommand.c
parentc58f741a0f2b807cbeb065c2dbbfe4f86dfb95b2 (diff)
downloadhercules-90f117f6b071c9c12bb8b521b6de46301639e75c.tar.gz
hercules-90f117f6b071c9c12bb8b521b6de46301639e75c.tar.bz2
hercules-90f117f6b071c9c12bb8b521b6de46301639e75c.tar.xz
hercules-90f117f6b071c9c12bb8b521b6de46301639e75c.zip
Introducing Hercules' Map Zone Database
Click the link for full info~! http://hercules.ws/board/topic/302-introducing-hercules-map-zone-database/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d563ba126..2e7c74b94 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3795,16 +3795,16 @@ ACMD_FUNC(reloadscript)
* 0 = no additional information
* 1 = Show users in that map and their location
* 2 = Shows NPCs in that map
- * 3 = Shows the shops/chats in that map (not implemented)
+ * 3 = Shows the chats in that map
+ TODO# add the missing mapflags e.g. adjust_skill_damage to display
*------------------------------------------*/
-ACMD_FUNC(mapinfo)
-{
+ACMD_FUNC(mapinfo) {
struct map_session_data* pl_sd;
struct s_mapiterator* iter;
struct npc_data *nd = NULL;
struct chat_data *cd = NULL;
char direction[12];
- int i, m_id, chat_num, list = 0;
+ int i, m_id, chat_num = 0, list = 0, vend_num = 0;
unsigned short m_index;
char mapname[24];
@@ -3839,12 +3839,17 @@ ACMD_FUNC(mapinfo)
// count chats (for initial message)
chat_num = 0;
iter = mapit_getallusers();
- for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
- if( (cd = (struct chat_data*)map_id2bl(pl_sd->chatID)) != NULL && pl_sd->mapindex == m_index && cd->usersd[0] == pl_sd )
- chat_num++;
+ for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) ) {
+ if( pl_sd->mapindex == m_index ) {
+ if( sd->state.vending )
+ vend_num++;
+ else if( (cd = (struct chat_data*)map_id2bl(pl_sd->chatID)) != NULL && cd->usersd[0] == pl_sd )
+ chat_num++;
+ }
+ }
mapit_free(iter);
- sprintf(atcmd_output, msg_txt(1040), mapname, map[m_id].users, map[m_id].npc_num, chat_num); // Map Name: %s | Players In Map: %d | NPCs In Map: %d | Chats In Map: %d
+ sprintf(atcmd_output, msg_txt(1040), mapname, map[m_id].zone->name, map[m_id].users, map[m_id].npc_num, chat_num, vend_num); // Map: %s (Zone:%s) | Players: %d | NPCs: %d | Chats: %d | Vendings: %d
clif_displaymessage(fd, atcmd_output);
clif_displaymessage(fd, msg_txt(1041)); // ------ Map Flags ------
if (map[m_id].flag.town)
@@ -3932,11 +3937,6 @@ ACMD_FUNC(mapinfo)
strcat(atcmd_output, msg_txt(1077)); // Fireworks |
if (map[m_id].flag.leaves)
strcat(atcmd_output, msg_txt(1078)); // Leaves |
- /**
- * No longer available, keeping here just in case it's back someday. [Ind]
- **/
- //if (map[m_id].flag.rain)
- // strcat(atcmd_output, msg_txt(1079)); // Rain |
if (map[m_id].flag.nightenabled)
strcat(atcmd_output, msg_txt(1080)); // Displays Night |
clif_displaymessage(fd, atcmd_output);
@@ -7635,7 +7635,7 @@ ACMD_FUNC(mapflag) {
checkflag(fog); checkflag(fireworks); checkflag(sakura); checkflag(leaves);
checkflag(nogo); checkflag(nobaseexp);
checkflag(nojobexp); checkflag(nomobloot); checkflag(nomvploot); checkflag(nightenabled);
- checkflag(restricted); checkflag(nodrop); checkflag(novending); checkflag(loadevent);
+ checkflag(nodrop); checkflag(novending); checkflag(loadevent);
checkflag(nochat); checkflag(partylock); checkflag(guildlock); checkflag(src4instance);
clif_displaymessage(sd->fd," ");
clif_displaymessage(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On)
@@ -7654,7 +7654,7 @@ ACMD_FUNC(mapflag) {
setflag(fog); setflag(fireworks); setflag(sakura); setflag(leaves);
setflag(nogo); setflag(nobaseexp);
setflag(nojobexp); setflag(nomobloot); setflag(nomvploot); setflag(nightenabled);
- setflag(restricted); setflag(nodrop); setflag(novending); setflag(loadevent);
+ setflag(nodrop); setflag(novending); setflag(loadevent);
setflag(nochat); setflag(partylock); setflag(guildlock); setflag(src4instance);
clif_displaymessage(sd->fd,msg_txt(1314)); // Invalid flag name or flag.
@@ -7666,7 +7666,7 @@ ACMD_FUNC(mapflag) {
clif_displaymessage(sd->fd,"pvp_nocalcrank, gvg_castle, gvg, gvg_dungeon, gvg_noparty, battleground,");
clif_displaymessage(sd->fd,"nozenypenalty, notrade, noskill, nowarp, nowarpto, noicewall, snow, clouds, clouds2,");
clif_displaymessage(sd->fd,"fog, fireworks, sakura, leaves, nogo, nobaseexp, nojobexp, nomobloot,");
- clif_displaymessage(sd->fd,"nomvploot, nightenabled, restricted, nodrop, novending, loadevent, nochat, partylock,");
+ clif_displaymessage(sd->fd,"nomvploot, nightenabled, nodrop, novending, loadevent, nochat, partylock,");
clif_displaymessage(sd->fd,"guildlock, src4instance");
#undef checkflag