Hide costume item in certain maps

Only4fun

New member
Messages
11
Points
0
Hello everyone.
 
I'm trying to hide costume items and shows the original equip in same maps where are PvP, GvG and Battleground ON because this confuses the player when will fight.
 
The player doesn't know what the opponent is equipped, this way he can't defend herself.
 
To try do this, I change some lines in map/pc.c:
Code:
//Added check to prevent sending the same look on multiple slots ->//causes client to redraw item on top of itself. (suggested by Lupus)if(pos&(EQP_HEAD_LOW|EQP_COSTUME_HEAD_LOW)) {    if(id && !(pos&(EQP_HEAD_TOP|EQP_HEAD_MID|EQP_COSTUME_HEAD_MID|EQP_COSTUME_HEAD_TOP)))    sd->status.head_bottom = id->look;    else    sd->status.head_bottom = 0;    if((pos&EQP_HEAD_LOW && (pc_checkequip(sd,EQP_COSTUME_HEAD_LOW)) < 0) || pos&EQP_COSTUME_HEAD_LOW)    clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);}if(pos&(EQP_HEAD_TOP|EQP_COSTUME_HEAD_TOP)) {    if(id)    sd->status.head_top = id->look;    else    sd->status.head_top = 0;    if((pos&EQP_HEAD_TOP && (pc_checkequip(sd,EQP_COSTUME_HEAD_TOP)) < 0) || pos&EQP_COSTUME_HEAD_TOP)    clif_changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);}if(pos&(EQP_HEAD_MID|EQP_COSTUME_HEAD_MID)) {    if(id && !(pos&(EQP_HEAD_TOP|EQP_COSTUME_HEAD_TOP)))    sd->status.head_mid = id->look;    else    sd->status.head_mid = 0;    if((pos&EQP_HEAD_MID && (pc_checkequip(sd,EQP_COSTUME_HEAD_MID)) < 0) || pos&EQP_COSTUME_HEAD_MID)    clif_changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);}
I change to:
Code:
//Added check to prevent sending the same look on multiple slots ->//causes client to redraw item on top of itself. (suggested by Lupus)if(strcmp( mapindex_id2name(sd->mapindex), "morocc" )){    if(pos&(EQP_HEAD_LOW|EQP_COSTUME_HEAD_LOW)) {        if(id && !(pos&(EQP_HEAD_TOP|EQP_HEAD_MID|EQP_COSTUME_HEAD_MID|EQP_COSTUME_HEAD_TOP)))        sd->status.head_bottom = id->look;        else        sd->status.head_bottom = 0;        if((pos&EQP_HEAD_LOW && (pc_checkequip(sd,EQP_COSTUME_HEAD_LOW)) < 0) || pos&EQP_COSTUME_HEAD_LOW)        clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);    }    if(pos&(EQP_HEAD_TOP|EQP_COSTUME_HEAD_TOP)) {        if(id)        sd->status.head_top = id->look;        else        sd->status.head_top = 0;        if((pos&EQP_HEAD_TOP && (pc_checkequip(sd,EQP_COSTUME_HEAD_TOP)) < 0) || pos&EQP_COSTUME_HEAD_TOP)        clif_changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);    }    if(pos&(EQP_HEAD_MID|EQP_COSTUME_HEAD_MID)) {        if(id && !(pos&(EQP_HEAD_TOP|EQP_COSTUME_HEAD_TOP)))        sd->status.head_mid = id->look;        else        sd->status.head_mid = 0;        if((pos&EQP_HEAD_MID && (pc_checkequip(sd,EQP_COSTUME_HEAD_MID)) < 0) || pos&EQP_COSTUME_HEAD_MID)        clif_changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);    }}else{ //Old way before comes costome items    if(pos & EQP_HEAD_LOW) {        if(id && !(pos&(EQP_HEAD_TOP|EQP_HEAD_MID)))        sd->status.head_bottom = id->look;        else        sd->status.head_bottom = 0;        clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);    }    if(pos & EQP_HEAD_TOP) {        if(id)        sd->status.head_top = id->look;        else        sd->status.head_top = 0;        clif_changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);    }    if(pos & EQP_HEAD_MID) {        if(id && !(pos&EQP_HEAD_TOP))        sd->status.head_mid = id->look;        else        sd->status.head_mid = 0;        clif_changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);    }}
I put Morocc town just as example, but after I'll change the maps.
 
This change works partially: the equip just hide if is changed manually. In other words, the player needs unequip the item and after equip again, so the costume hide.
 
I think I need call this function in some other location, like when the char warps, but I do not know how to do this.
 
Can anyone help me? Very thanks!
 
This function is probably only called when an item is equipped, so yes you'll need to either create a new function on map load, or if feasible call the same function.

 
Last edited by a moderator:
Back
Top