summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index e51c59461..6a55ad344 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1805,13 +1805,13 @@ void clif_selllist(struct map_session_data *sd)
{
if( sd->status.inventory[i].nameid > 0 && sd->inventory_data[i] )
{
- if( !itemdb_cansell(&sd->status.inventory[i], pc->get_group_level(sd)) )
+ if( !itemdb_cansell(&sd->status.inventory[i], pc_get_group_level(sd)) )
continue;
if( sd->status.inventory[i].expire_time )
continue; // Cannot Sell Rental Items
- if( sd->status.inventory[i].bound && !pc->can_give_bound_items(sd))
+ if( sd->status.inventory[i].bound && !pc_can_give_bound_items(sd))
continue; // Don't allow sale of bound items
val=sd->inventory_data[i]->value_sell;
@@ -2846,7 +2846,7 @@ int clif_hpmeter_sub(struct block_list *bl, va_list ap) {
if( !tsd->fd || tsd == sd )
return 0;
- if( !pc->has_permission(tsd, PC_PERM_VIEW_HPMETER) )
+ if( !pc_has_permission(tsd, PC_PERM_VIEW_HPMETER) )
return 0;
WFIFOHEAD(tsd->fd,packet_len(cmd));
WFIFOW(tsd->fd,0) = cmd;
@@ -3663,7 +3663,7 @@ void clif_useitemack(struct map_session_data *sd,int index,int amount,bool ok)
}
void clif_hercules_chsys_send(struct hChSysCh *channel, struct map_session_data *sd, const char *msg) {
- if( channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), timer->gettick()) > 0 && !pc->has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
+ if( channel->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + ( channel->msg_delay * 1000 ), timer->gettick()) > 0 && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN) ) {
clif->colormes(sd->fd,COLOR_RED,msg_txt(1455));
return;
} else {
@@ -4232,7 +4232,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
}
if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
(sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround
- pc->has_permission(sd, PC_PERM_VIEW_HPMETER)
+ pc_has_permission(sd, PC_PERM_VIEW_HPMETER)
)
clif->hpmeter_single(sd->fd, dstsd->bl.id, dstsd->battle_status.hp, dstsd->battle_status.max_hp);
@@ -5855,7 +5855,7 @@ void clif_wis_message(int fd, const char* nick, const char* mes, size_t mes_len)
WFIFOW(fd,0) = 0x97;
WFIFOW(fd,2) = mes_len + NAME_LENGTH + 8;
safestrncpy((char*)WFIFOP(fd,4), nick, NAME_LENGTH);
- WFIFOL(fd,28) = (ssd && pc->get_group_level(ssd) == 99) ? 1 : 0; // isAdmin; if nonzero, also displays text above char
+ WFIFOL(fd,28) = (ssd && pc_get_group_level(ssd) == 99) ? 1 : 0; // isAdmin; if nonzero, also displays text above char
safestrncpy((char*)WFIFOP(fd,32), mes, mes_len);
WFIFOSET(fd,WFIFOW(fd,2));
#endif
@@ -9267,7 +9267,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
instance->check_idle(map->list[sd->bl.m].instance_id);
}
- if( pc->has_permission(sd,PC_PERM_VIEW_HPMETER) ) {
+ if( pc_has_permission(sd,PC_PERM_VIEW_HPMETER) ) {
map->list[sd->bl.m].hpmeter_visible++;
sd->state.hpmeter_visible = 1;
}
@@ -9749,7 +9749,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
sc = status->get_sc(bl);
if (sc && sc->option&OPTION_INVISIBLE && !disguised(bl) &&
bl->type != BL_NPC && //Skip hidden NPCs which can be seen using Maya Purple
- pc->get_group_level(sd) < battle_config.hack_info_GM_level
+ pc_get_group_level(sd) < battle_config.hack_info_GM_level
) {
char gm_msg[256];
sprintf(gm_msg, "Hack on NameRequest: character '%s' (account: %d) requested the name of an invisible target (id: %d).\n", sd->status.name, sd->status.account_id, id);
@@ -10406,8 +10406,8 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
}
// if player ignores everyone
- if (dstsd->state.ignoreAll && pc->get_group_level(sd) <= pc->get_group_level(dstsd)) {
- if (dstsd->sc.option & OPTION_INVISIBLE && pc->get_group_level(sd) < pc->get_group_level(dstsd))
+ if (dstsd->state.ignoreAll && pc_get_group_level(sd) <= pc_get_group_level(dstsd)) {
+ if (dstsd->sc.option & OPTION_INVISIBLE && pc_get_group_level(sd) < pc_get_group_level(dstsd))
clif->wis_end(fd, 1); // 1: target character is not logged in
else
clif->wis_end(fd, 3); // 3: everyone ignored by target
@@ -10422,7 +10422,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
return;
}
- if( pc->get_group_level(sd) <= pc->get_group_level(dstsd) ) {
+ if( pc_get_group_level(sd) <= pc_get_group_level(dstsd) ) {
// if player ignores the source character
ARR_FIND(0, MAX_IGNORE_LIST, i, dstsd->ignore[i].name[0] == '\0' || strcmp(dstsd->ignore[i].name, sd->status.name) == 0);
if(i < MAX_IGNORE_LIST && dstsd->ignore[i].name[0] != '\0') { // source char present in ignore list
@@ -13615,7 +13615,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) {
if (type == 2) {
if (!battle_config.client_accept_chatdori)
return;
- if (pc->get_group_level(sd) > 0 || sd->bl.id != id)
+ if (pc_get_group_level(sd) > 0 || sd->bl.id != id)
return;
value = battle_config.client_accept_chatdori;
@@ -13626,7 +13626,7 @@ void clif_parse_GMReqNoChat(int fd,struct map_session_data *sd) {
return;
}
- if (type == 2 || ( (pc->get_group_level(sd)) > pc->get_group_level(dstsd) && !pc->can_use_command(sd, "@mute"))) {
+ if (type == 2 || ( (pc_get_group_level(sd)) > pc_get_group_level(dstsd) && !pc->can_use_command(sd, "@mute"))) {
clif->manner_message(sd, 0);
clif->manner_message(dstsd, 5);
@@ -13695,7 +13695,7 @@ void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd) {
int x,y,type;
- if (!pc->has_permission(sd, PC_PERM_USE_CHANGEMAPTYPE))
+ if (!pc_has_permission(sd, PC_PERM_USE_CHANGEMAPTYPE))
return;
x = RFIFOW(fd,2);
@@ -14579,12 +14579,12 @@ void clif_parse_Check(int fd, struct map_session_data *sd)
char charname[NAME_LENGTH];
struct map_session_data* pl_sd;
- if(!pc->has_permission(sd, PC_PERM_USE_CHECK))
+ if(!pc_has_permission(sd, PC_PERM_USE_CHECK))
return;
safestrncpy(charname, (const char*)RFIFOP(fd,packet_db[RFIFOW(fd,0)].pos[0]), sizeof(charname));
- if( ( pl_sd = map->nick2sd(charname) ) == NULL || pc->get_group_level(sd) < pc->get_group_level(pl_sd) ) {
+ if( ( pl_sd = map->nick2sd(charname) ) == NULL || pc_get_group_level(sd) < pc_get_group_level(pl_sd) ) {
return;
}
@@ -15171,10 +15171,10 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
return;
}
- if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time ||
+ if( !pc_can_give_items(sd) || sd->status.inventory[idx].expire_time ||
!sd->status.inventory[idx].identify ||
- !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) || // Quest Item or something else
- (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) ) {
+ !itemdb_canauction(&sd->status.inventory[idx],pc_get_group_level(sd)) || // Quest Item or something else
+ (sd->status.inventory[idx].bound && !pc_can_give_bound_items(sd)) ) {
clif->auction_setitem(sd->fd, idx, true);
return;
}
@@ -15282,7 +15282,7 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd)
}
// Auction checks...
- if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bound_items(sd) ) {
+ if( sd->status.inventory[sd->auction.index].bound && !pc_can_give_bound_items(sd) ) {
clif->message(sd->fd, msg_txt(293));
clif->auction_message(fd, 2); // The auction has been canceled
return;
@@ -15335,7 +15335,7 @@ void clif_parse_Auction_bid(int fd, struct map_session_data *sd)
unsigned int auction_id = RFIFOL(fd,2);
int bid = RFIFOL(fd,6);
- if( !pc->can_give_items(sd) ) { //They aren't supposed to give zeny [Inkfish]
+ if( !pc_can_give_items(sd) ) { //They aren't supposed to give zeny [Inkfish]
clif->message(sd->fd, msg_txt(246));
return;
}
@@ -15626,7 +15626,7 @@ void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) {
if (!tsd)
return;
- if( tsd->status.show_equip || pc->has_permission(sd, PC_PERM_VIEW_EQUIPMENT) )
+ if( tsd->status.show_equip || pc_has_permission(sd, PC_PERM_VIEW_EQUIPMENT) )
clif->viewequip_ack(sd, tsd);
else
clif->viewequip_fail(sd);
@@ -17956,7 +17956,7 @@ void clif_parse_GMFullStrip(int fd, struct map_session_data *sd) {
int i;
/* TODO maybe this could be a new permission? using gm level in the meantime */
- if( !tsd || pc->get_group_level(tsd) >= pc->get_group_level(sd) )
+ if( !tsd || pc_get_group_level(tsd) >= pc_get_group_level(sd) )
return;
for( i = 0; i < EQI_MAX; i++ ) {