Jump to content

Question

Posted (edited)

Index: src/map/atcommand.c
===================================================================
--- src/map/atcommand.c (revision 1955)
+++ src/map/atcommand.c (working copy)
@@ -8119,7 +8119,22 @@
return 0;
}

+/*===========================================
+* Hiding vips broadcasts [Minos]
+*-------------------------------------------------------*/
+int atcommand_nobc(const int fd , struct map_session_data *sd , const char *command, const char *message)
+{
+
+if(!sd->state.nobc){
+clif_displaymessage(fd,"Now, you will not see VIP broadcast");
+sd->state.nobc = 1;
+}else{
+clif_displaymessage(fd,"Now, you will see VIP broadcast");
+sd->state.nobc = 0;
+}
+return 0;

+}


/*==========================================
@@ -8412,6 +8427,7 @@
{ "mail", 1, atcommand_mail },
{ "cash", 60, atcommand_cash },
{ "points", 60, atcommand_cash },
+ { "nobc", 0, atcommand_nobc },
};


Index: src/map/clif.c
===================================================================
--- src/map/clif.c (revision 1955)
+++ src/map/clif.c (working copy)
@@ -308,6 +308,21 @@
}
}
break;
+
+ case WNOBC:
+ for (i = 0; i < fd_max; i++) {
+ if (session && session->func_parse == clif_parse &&
+ (sd = (struct map_session_data *)session->session_data) != NULL &&
+ sd->state.active && !sd->state.nobc &&
+ packet_db[sd->packet_ver][RBUFW(buf,0)].len)
+ {
+ WFIFOHEAD(i, len);
+ memcpy(WFIFOP(i,0), buf, len);
+ WFIFOSET(i,len);
+ }
+ }
+ break;
+
case AREA:
case AREA_WOSC:
if (sd && bl->prev == NULL) //Otherwise source misses the packet.[skotlex]
@@ -4545,6 +4560,7 @@
(flag == 1) ? ALL_SAMEMAP :
(flag == 2) ? AREA :
(flag == 3) ? SELF :
+ (flag == 4) ? WNOBC :
ALL_CLIENT);
if(buf) aFree(buf);

@@ -4616,6 +4632,7 @@
(flag == 1) ? ALL_SAMEMAP :
(flag == 2) ? AREA :
(flag == 3) ? SELF :
+ (flag == 4) ? WNOBC :
ALL_CLIENT);

if(buf) aFree(buf);
Index: src/map/clif.h
===================================================================
--- src/map/clif.h (revision 1955)
+++ src/map/clif.h (working copy)
@@ -59,6 +59,7 @@
enum send_target {
ALL_CLIENT,
ALL_SAMEMAP,
+ WNOBC, //hide
AREA, // area
AREA_WOS, // area, without self
AREA_WOC, // area, without chatrooms
Index: src/map/map.h
===================================================================
--- src/map/map.h (revision 1955)
+++ src/map/map.h (working copy)
@@ -546,6 +546,7 @@
unsigned killable : 1;
unsigned doridori : 1;
unsigned ignoreAll : 1;
+ unsigned nobc : 1;
unsigned short autoloot;
bool changemap;

struct guild *gmaster_flag;

 

Anyone know how to make this compatible with rathena? Especially the flag parts. (flag == 4)

Edited by Pinoy Fury

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...