Pinoy Fury Posted April 3, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 37 Reputation: 2 Joined: 11/20/11 Last Seen: April 10, 2020 Share Posted April 3, 2013 (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, //hideAREA, // areaAREA_WOS, // area, without selfAREA_WOC, // area, without chatroomsIndex: 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 April 3, 2013 by Pinoy Fury Quote Link to comment Share on other sites More sharing options...
Pinoy Fury Posted April 5, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 37 Reputation: 2 Joined: 11/20/11 Last Seen: April 10, 2020 Author Share Posted April 5, 2013 bump Quote Link to comment Share on other sites More sharing options...
Pinoy Fury Posted April 5, 2013 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 37 Reputation: 2 Joined: 11/20/11 Last Seen: April 10, 2020 Author Share Posted April 5, 2013 Nevermind. Got it. Quote Link to comment Share on other sites More sharing options...
fTakano Posted July 9, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 31 Reputation: 12 Joined: 07/02/12 Last Seen: 12 hours ago Share Posted July 9, 2013 (edited) How did you fix it?! Edited July 9, 2013 by Fiori Takano Quote Link to comment Share on other sites More sharing options...
Question
Pinoy Fury
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 FuryLink to comment
Share on other sites
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.