viewing paste Unknown #5710 | Diff

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
Index: src/map/clif.c
===================================================================
--- src/map/clif.c  (revision 17288)
+++ src/map/clif.c  (working copy)
@@ -5568,6 +5589,38 @@
    WFIFOSET(fd,packet_len(0x199));
 }
 
+/* [Ind/Hercules] */
+void clif_maptypeproperty2(struct block_list *bl,enum send_target t) {
+#if PACKETVER >= 20130000 /* not entirely sure when this started */
+   unsigned char buf[30];
+
+   WBUFW(buf,0)=0x28;
+   WBUFB(buf,2) = 1; //cart
+   WBUFB(buf,3) = 1; //party
+   WBUFB(buf,4) = 1; //guild
+   if(map_flag_gvg2(bl->m))
+       WBUFB(buf,5) = 1; //siege
+   else
+       WBUFB(buf,5) = 0; //siege
+   WBUFB(buf,6) = 1; //mineffect
+   WBUFB(buf,7) = 0; //nolockon
+   if(map[bl->m].flag.pvp)
+       WBUFB(buf,8) = 1; //countpk
+   else
+       WBUFB(buf,8) = 0; //countpk
+   WBUFB(buf,9) = 0; //nopartyformation
+   WBUFB(buf,10) = 0; //noitemconsumption
+   WBUFB(buf,11) = 0; //summonstarmiracle
+   if(map[bl->m].flag.battleground)
+       WBUFB(buf,12) = 1; //battleground
+   else
+       WBUFB(buf,12) = 0; //battleground
+   WBUFB(buf,13) = 0; //battleground
+   memset((char*)WBUFP(buf,14), 0, 15);
+  
+   clif_send(buf,30,bl,t);
+#endif
+}
 
 /// Set the map type (ZC_NOTIFY_MAPPROPERTY2).
 /// 01d6 <type>.W
@@ -8246,6 +8299,8 @@
 
    mail_clear(sd);
 
+   clif_maptypeproperty2(&sd->bl,SELF);
+
    if( disguised(&sd->bl) ) {/* refresh-da */
        short disguise = sd->disguise;
        pc_disguise(sd, 0);
 
Index: src/map/clif.h
===================================================================
--- src/map/clif.h  (revision 17288)
+++ src/map/clif.h  (working copy)
@@ -585,6 +586,7 @@
 void clif_heal(int fd,int type,int val);
 void clif_resurrection(struct block_list *bl,int type);
 void clif_map_property(struct map_session_data* sd, enum map_property property);
+void clif_maptypeproperty2(struct block_list *bl,enum send_target t);
 void clif_pvpset(struct map_session_data *sd, int pvprank, int pvpnum,int type);
 void clif_map_property_mapall(int map, enum map_property property);
 void clif_refine(int fd, int fail, int index, int val);
 
Index: src/map/duel.c
===================================================================
--- src/map/duel.c  (revision 17288)
+++ src/map/duel.c  (working copy)
@@ -95,6 +95,7 @@
    clif_disp_onlyself(sd, output, strlen(output));
 
    clif_map_property(sd, MAPPROPERTY_FREEPVPZONE);
+   clif_maptypeproperty2(&sd->bl,SELF);
    //clif_misceffect2(&sd->bl, 159);
    return i;
 }
@@ -141,6 +142,7 @@
    sd->duel_group = 0;
    duel_savetime(sd);
    clif_map_property(sd, MAPPROPERTY_NOTHING);
+   clif_maptypeproperty2(&sd->bl,SELF);
 }
 
 void duel_accept(const unsigned int did, struct map_session_data* sd)
@@ -157,6 +159,7 @@
    clif_disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
 
    clif_map_property(sd, MAPPROPERTY_FREEPVPZONE);
+   clif_maptypeproperty2(&sd->bl,SELF);
    //clif_misceffect2(&sd->bl, 159);
 }
 
Index: src/map/script.c
===================================================================
--- src/map/script.c    (revision 17288)
+++ src/map/script.c    (working copy)
@@ -10854,6 +10854,7 @@
        sd->pvp_lost = 0;
    }
    clif_map_property(sd, MAPPROPERTY_FREEPVPZONE);
+   clif_maptypeproperty2(&sd->bl,SELF);
    return 0;
 }
 BUILDIN_FUNC(setmapflag)
@@ -10884,9 +10886,14 @@
                break;
            case MF_PVP_NOPARTY:        map[m].flag.pvp_noparty = 1; break;
            case MF_PVP_NOGUILD:        map[m].flag.pvp_noguild = 1; break;
-           case MF_GVG:
+           case MF_GVG: {
+               struct block_list bl;
                map[m].flag.gvg = 1;
                clif_map_property_mapall(m, MAPPROPERTY_AGITZONE);
+               bl.type = BL_NUL;
+               bl.m = m;
+               clif_maptypeproperty2(&bl,ALL_SAMEMAP);
+               }
                break;
            case MF_GVG_NOPARTY:        map[m].flag.gvg_noparty = 1; break;
            case MF_NOTRADE:            map[m].flag.notrade = 1; break;
@@ -10958,15 +10966,25 @@
            case MF_NOBRANCH:           map[m].flag.nobranch = 0; break;
            case MF_NOPENALTY:          map[m].flag.noexppenalty = 0; map[m].flag.nozenypenalty = 0; break;
            case MF_NOZENYPENALTY:      map[m].flag.nozenypenalty = 0; break;
-           case MF_PVP:
+           case MF_PVP: {
+               struct block_list bl;
+               bl.type = BL_NUL;
+               bl.m = m;
                map[m].flag.pvp = 0;
                clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+               clif_maptypeproperty2(&bl,ALL_SAMEMAP);
+               }
                break;
            case MF_PVP_NOPARTY:        map[m].flag.pvp_noparty = 0; break;
            case MF_PVP_NOGUILD:        map[m].flag.pvp_noguild = 0; break;
-           case MF_GVG:
+           case MF_GVG: {
+               struct block_list bl;
+               bl.type = BL_NUL;
+               bl.m = m;
                map[m].flag.gvg = 0;
                clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+               clif_maptypeproperty2(&bl,ALL_SAMEMAP);
+               }
                break;
            case MF_GVG_NOPARTY:        map[m].flag.gvg_noparty = 0; break;
            case MF_NOTRADE:            map[m].flag.notrade = 0; break;
@@ -11026,6 +11044,7 @@
    const char *str;
    TBL_PC* sd = NULL;
    struct s_mapiterator* iter;
+   struct block_list bl;
 
    str = script_getstr(st,2);
    m = map_mapname2mapid(str);
@@ -11034,6 +11053,9 @@
 
    map[m].flag.pvp = 1;
    clif_map_property_mapall(m, MAPPROPERTY_FREEPVPZONE);
+   bl.type = BL_NUL;
+   bl.m = m;
+   clif_maptypeproperty2(&bl,ALL_SAMEMAP);
 
    if(battle_config.pk_mode) // disable ranking functions if pk_mode is on [Valaris]
        return 0;
@@ -11071,6 +11093,7 @@
 {
    int16 m;
    const char *str;
+   struct block_list bl;
 
    str=script_getstr(st,2);
    m = map_mapname2mapid(str);
@@ -11079,6 +11102,9 @@
 
    map[m].flag.pvp = 0;
    clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+   bl.type = BL_NUL;
+   bl.m = m;
+   clif_maptypeproperty2(&bl,ALL_SAMEMAP);
 
    if(battle_config.pk_mode) // disable ranking options if pk_mode is on [Valaris]
        return 0;
@@ -11091,12 +11117,16 @@
 {
    int16 m;
    const char *str;
+   struct block_list bl;
 
    str=script_getstr(st,2);
    m = map_mapname2mapid(str);
    if(m >= 0 && !map[m].flag.gvg) {
        map[m].flag.gvg = 1;
        clif_map_property_mapall(m, MAPPROPERTY_AGITZONE);
+       bl.type = BL_NUL;
+       bl.m = m;
+       clif_maptypeproperty2(&bl,ALL_SAMEMAP);
    }
 
    return 0;
@@ -11109,8 +11139,12 @@
    str=script_getstr(st,2);
    m = map_mapname2mapid(str);
    if(m >= 0 && map[m].flag.gvg) {
+       struct block_list bl;
        map[m].flag.gvg = 0;
        clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+       bl.type = BL_NUL;
+       bl.m = m;
+       clif_maptypeproperty2(&bl,ALL_SAMEMAP);
    }
 
    return 0;
Viewed 1375 times, submitted by lighta.