viewing paste Unknown #5711 | 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
/* [Ind/Hercules] */
struct packet_maptypeproperty2 {
    short PacketType;
    short type;
    struct {
        unsigned int party                  : 1;
        unsigned int guild                  : 1;
        unsigned int siege                  : 1;
        unsigned int mineffect              : 1;
        unsigned int nolockon               : 1;
        unsigned int countpk                : 1;
        unsigned int nopartyformation       : 1;
        unsigned int bg                     : 1;
        unsigned int noitemconsumption      : 1;
        unsigned int usecart                : 1;
        unsigned int summonstarmiracle      : 1;
        unsigned int SpareBits              : 15;
    } flag;
};
 
void clif_maptypeproperty2(struct block_list *bl,enum send_target t) {
#if PACKETVER >= 20130000 /* not entirely sure when this started */
//  unsigned char buf[31];
//
////    memset(buf, 0, sizeof(buf));
//  WBUFW(buf,0)=0x99b;
//  WBUFW(buf,2)=0x28;
//
//  WBUFB(buf,4) = 1; //party
//  WBUFB(buf,5) = 1; //guild
//  WBUFB(buf,6) = (map_flag_gvg2(bl->m))?1:1; //siege
//  WBUFB(buf,7) = 1; //mineffect
//  WBUFB(buf,8) = 1; //nolockon
//  WBUFB(buf,9) = (map[bl->m].flag.pvp)?1:1; //countpk
//  WBUFB(buf,10) = 1; //nopartyformation
//  WBUFB(buf,11) = (map[bl->m].flag.battleground)?1:1; //battleground
//  WBUFB(buf,12) = 1; //noitemconsumption
//  WBUFB(buf,13) = 1; //cart
//  WBUFB(buf,14) = 1; //summonstarmiracle
//  memset(buf+15, 0, 15);
//
//  clif_send(buf,30,bl,t);
 
 
    struct packet_maptypeproperty2 p;
 
    p.PacketType = 0x99b;
    p.type = 0x28;
    p.flag.usecart = 1;
    p.flag.party = 1;
    p.flag.guild = 1;
    p.flag.siege = map_flag_gvg2(bl->m) ? 1: 0;
    p.flag.mineffect = 1;
    p.flag.nolockon = 0;
    p.flag.countpk = map[bl->m].flag.pvp ? 1 : 0;
    p.flag.nopartyformation = 0;
    p.flag.noitemconsumption = 0;
    p.flag.summonstarmiracle = 0;
    p.flag.bg = map[bl->m].flag.battleground ? 1 : 0;
 
    clif_send(&p,sizeof(p),bl,t);
#endif
}
Viewed 1418 times, submitted by lighta.