viewing paste Unknown #5737 | 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
Index: src/map/atcommand.c
===================================================================
--- src/map/atcommand.c (revision 17295)
+++ src/map/atcommand.c (working copy)
@@ -1482,8 +1482,10 @@
 
    map[sd->bl.m].flag.pvp = 0;
 
-   if (!battle_config.pk_mode)
+   if (!battle_config.pk_mode){
        clif_map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
+       clif_maptypeproperty2(&sd->bl,ALL_SAMEMAP);
+   }
    map_foreachinmap(atcommand_pvpoff_sub,sd->bl.m, BL_PC);
    map_foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0);
    clif_displaymessage(fd, msg_txt(sd,31)); // PvP: Off.
@@ -1521,6 +1523,7 @@
    if (!battle_config.pk_mode)
    {// display pvp circle and rank
        clif_map_property_mapall(sd->bl.m, MAPPROPERTY_FREEPVPZONE);
+       clif_maptypeproperty2(&sd->bl,ALL_SAMEMAP);
        map_foreachinmap(atcommand_pvpon_sub,sd->bl.m, BL_PC);
    }
 
@@ -1543,6 +1546,7 @@
 
    map[sd->bl.m].flag.gvg = 0;
    clif_map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
+   clif_maptypeproperty2(&sd->bl,ALL_SAMEMAP);
    map_foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0);
    clif_displaymessage(fd, msg_txt(sd,33)); // GvG: Off.
 
@@ -1563,6 +1567,7 @@
 
    map[sd->bl.m].flag.gvg = 1;
    clif_map_property_mapall(sd->bl.m, MAPPROPERTY_AGITZONE);
+   clif_maptypeproperty2(&sd->bl,ALL_SAMEMAP);
    clif_displaymessage(fd, msg_txt(sd,34)); // GvG: On.
 
    return 0;
@@ -8894,10 +8899,12 @@
        return channel_pcunbind(sd);
    } else if ( strcmpi(key,"ban") == 0 ) {
        return channel_pcban(sd,sub1,map_nick2sd(sub2),0);
-   } else if ( strcmpi(key,"unban") == 0 ) {
+   }  else if ( strcmpi(key,"unban") == 0 ) {
        return channel_pcban(sd,sub1,map_nick2sd(sub2),1);
    } else if ( strcmpi(key,"unbanall") == 0 ) {
        return channel_pcban(sd,sub1,NULL,2);
+   } else if ( strcmpi(key,"banlist") == 0 ) {
+       return channel_pcban(sd,sub1,NULL,3);
    } else if ( strcmpi(key,"setopt") == 0 ) {
        return channel_pcsetopt(sd,sub1,sub2,sub3);
    } else {
Index: src/map/channel.c
===================================================================
--- src/map/channel.c   (revision 17295)
+++ src/map/channel.c   (working copy)
@@ -847,7 +847,7 @@
    //let properly alter the list now
    switch(flag){
    case 0:
-       idb_put(channel->banned, tsd->status.char_id, tsd);
+       idb_put(channel->banned, tsd->status.char_id, tsd->status.name);
        channel_clean(channel,tsd,0);
        sprintf(output, msg_txt(sd,1437),tsd->status.name,chname); // Player '%s' has now been banned from '%s' channel
        break;
@@ -861,16 +861,16 @@
        break;
    case 3: {
        DBIterator *iter = db_iterator(channel->banned);
-       struct map_session_data *pl_sd;
+       char *banname;
        sprintf(output, msg_txt(sd,1443), channel->name);// -- '%s' ban list
        clif_displaymessage(sd->fd, output);
-       for( pl_sd = dbi_first(iter); dbi_exists(iter); pl_sd = dbi_next(iter) ) { //for all users
-           sprintf(output, msg_txt(sd,1444),pl_sd->status.char_id,pl_sd->status.name); //  %d: %s
+       for( banname =(char *) dbi_first(iter); dbi_exists(iter); banname =(char *) dbi_next(iter) ) { //for all users
+           sprintf(output, "%s",banname); //  %d: %s
            clif_displaymessage(sd->fd, output);
        }
        dbi_destroy(iter);
        }
-       break;
+       return 0;
    }
    clif_displaymessage(sd->fd, output);
 
Index: src/map/clif.c
===================================================================
--- src/map/clif.c  (revision 17295)
+++ src/map/clif.c  (working copy)
@@ -729,7 +729,7 @@
    uint32 header=0x84b;
 #else
    uint8 buf[17];
-   uint32 header=0x09b;
+   uint32 header=0x09e;
 #endif
    int view, offset=0;
 
@@ -9159,9 +9159,7 @@
            sd->pvp_lost = 0;
        }
        clif_map_property(sd, MAPPROPERTY_FREEPVPZONE);
-   } else
-   // set flag, if it's a duel [LuzZza]
-   if(sd->duel_group)
+   } else if(sd->duel_group) // set flag, if it's a duel [LuzZza]
        clif_map_property(sd, MAPPROPERTY_FREEPVPZONE);
 
    if (map[sd->bl.m].flag.gvg_dungeon)
Viewed 1322 times, submitted by lighta.