@@ -1752,7 +1752,7 @@ int char_count_users(void)
|
||||
|
||||
users = 0;
|
||||
for(i = 0; i < ARRAYLENGTH(map_server); i++) {
|
||||
if (map_server[i].fd > 0) {
|
||||
if (session_isValid(map_server[i].fd)) {
|
||||
users += map_server[i].users;
|
||||
}
|
||||
}
|
||||
@@ -1987,7 +1987,7 @@ void char_auth_ok(int fd, struct char_session_data *sd) {
|
||||
chclif_send_auth_result(fd,8);
|
||||
return;
|
||||
}
|
||||
if (character->fd >= 0 && character->fd != fd)
|
||||
if (session_isValid(character->fd) && character->fd != fd)
|
||||
{ //There's already a connection from this account that hasn't picked a char yet.
|
||||
chclif_send_auth_result(fd,8);
|
||||
return;
|
||||
@@ -2094,7 +2094,7 @@ int char_loadName(uint32 char_id, char* name){
|
||||
int char_search_mapserver(unsigned short map, uint32 ip, uint16 port){
|
||||
for(int i = 0; i < ARRAYLENGTH(map_server); i++)
|
||||
{
|
||||
if (map_server[i].fd > 0
|
||||
if (session_isValid(map_server[i].fd)
|
||||
&& (ip == (uint32)-1 || map_server[i].ip == ip)
|
||||
&& (port == (uint16)-1 || map_server[i].port == port))
|
||||
{
|
||||
|
||||
@@ -752,7 +752,7 @@ int chclif_parse_reqtoconnect(int fd, struct char_session_data* sd,uint32 ipl){
|
||||
}
|
||||
else
|
||||
{// authentication not found (coming from login server)
|
||||
if (login_fd > 0) { // don't send request if no login-server
|
||||
if (session_isValid(login_fd)) { // don't send request if no login-server
|
||||
WFIFOHEAD(login_fd,23);
|
||||
WFIFOW(login_fd,0) = 0x2712; // ask login-server to authentify an account
|
||||
WFIFOL(login_fd,2) = sd->account_id;
|
||||
@@ -816,7 +816,7 @@ int chclif_parse_charselect(int fd, struct char_session_data* sd,uint32 ipl){
|
||||
int slot = RFIFOB(fd,2);
|
||||
RFIFOSKIP(fd,3);
|
||||
|
||||
ARR_FIND( 0, ARRAYLENGTH(map_server), server_id, map_server[server_id].fd > 0 && !map_server[server_id].map.empty() );
|
||||
ARR_FIND( 0, ARRAYLENGTH(map_server), server_id, session_isValid(map_server[server_id].fd) && !map_server[server_id].map.empty() );
|
||||
// Map-server not available, tell the client to wait (client wont close, char select will respawn)
|
||||
if (server_id == ARRAYLENGTH(map_server)) {
|
||||
WFIFOHEAD(fd, 24);
|
||||
@@ -882,7 +882,7 @@ int chclif_parse_charselect(int fd, struct char_session_data* sd,uint32 ipl){
|
||||
if (i < 0 || !cd->last_point.map) {
|
||||
unsigned short j;
|
||||
//First check that there's actually a map server online.
|
||||
ARR_FIND( 0, ARRAYLENGTH(map_server), j, map_server[j].fd >= 0 && map_server[j].map[0] );
|
||||
ARR_FIND( 0, ARRAYLENGTH(map_server), j, session_isValid(map_server[j].fd) && !map_server[j].map.empty() );
|
||||
if (j == ARRAYLENGTH(map_server)) {
|
||||
ShowInfo("Connection Closed. No map servers available.\n");
|
||||
chclif_send_auth_result(fd,1); // 01 = Server closed
|
||||
|
||||
@@ -757,7 +757,7 @@ int chlogif_parse(int fd) {
|
||||
}
|
||||
|
||||
TIMER_FUNC(chlogif_check_connect_logserver){
|
||||
if (login_fd > 0 && session[login_fd] != NULL)
|
||||
if (chlogif_isconnected())
|
||||
return 0;
|
||||
|
||||
ShowInfo("Attempt to connect to login-server...\n");
|
||||
@@ -790,7 +790,7 @@ TIMER_FUNC(chlogif_check_connect_logserver){
|
||||
|
||||
|
||||
int chlogif_isconnected(){
|
||||
return (login_fd > 0 && session[login_fd] && !session[login_fd]->flag.eof);
|
||||
return session_isActive(login_fd);
|
||||
}
|
||||
|
||||
void do_init_chlogif(void) {
|
||||
@@ -839,7 +839,7 @@ void chlogif_on_ready(void)
|
||||
chlogif_send_acc_tologin(INVALID_TIMER, gettick(), 0, 0);
|
||||
|
||||
// if no map-server already connected, display a message...
|
||||
ARR_FIND( 0, ARRAYLENGTH(map_server), i, map_server[i].fd > 0 && !map_server[i].map.empty() );
|
||||
ARR_FIND( 0, ARRAYLENGTH(map_server), i, session_isValid(map_server[i].fd) && !map_server[i].map.empty() );
|
||||
if( i == ARRAYLENGTH(map_server) )
|
||||
ShowStatus("Awaiting maps from map-server.\n");
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ int chmapif_sendall(unsigned char *buf, unsigned int len){
|
||||
c = 0;
|
||||
for(i = 0; i < ARRAYLENGTH(map_server); i++) {
|
||||
int fd;
|
||||
if ((fd = map_server[i].fd) > 0) {
|
||||
if (session_isValid(fd = map_server[i].fd)) {
|
||||
WFIFOHEAD(fd,len);
|
||||
memcpy(WFIFOP(fd,0), buf, len);
|
||||
WFIFOSET(fd,len);
|
||||
@@ -53,7 +53,7 @@ int chmapif_sendallwos(int sfd, unsigned char *buf, unsigned int len){
|
||||
c = 0;
|
||||
for(i = 0; i < ARRAYLENGTH(map_server); i++) {
|
||||
int fd;
|
||||
if ((fd = map_server[i].fd) > 0 && fd != sfd) {
|
||||
if (session_isValid(fd = map_server[i].fd) && fd != sfd) {
|
||||
WFIFOHEAD(fd,len);
|
||||
memcpy(WFIFOP(fd,0), buf, len);
|
||||
WFIFOSET(fd,len);
|
||||
@@ -72,7 +72,7 @@ int chmapif_sendallwos(int sfd, unsigned char *buf, unsigned int len){
|
||||
* @return : the number of map-serv the packet was sent to (O|1)
|
||||
*/
|
||||
int chmapif_send(int fd, unsigned char *buf, unsigned int len){
|
||||
if (fd >= 0) {
|
||||
if (session_isValid(fd)) {
|
||||
int i;
|
||||
ARR_FIND( 0, ARRAYLENGTH(map_server), i, fd == map_server[i].fd );
|
||||
if( i < ARRAYLENGTH(map_server) )
|
||||
@@ -122,7 +122,7 @@ int chmapif_send_fame_list(int fd){
|
||||
// add total packet length
|
||||
WBUFW(buf, 2) = len;
|
||||
|
||||
if (fd != -1)
|
||||
if (session_isValid(fd))
|
||||
chmapif_send(fd, buf, len);
|
||||
else
|
||||
chmapif_sendall(buf, len);
|
||||
@@ -212,7 +212,7 @@ void chmapif_send_maps(int fd, int map_id, int count, unsigned char *mapbuf) {
|
||||
|
||||
// Transmitting the maps of the other map-servers to the new map-server
|
||||
for (x = 0; x < ARRAYLENGTH(map_server); x++) {
|
||||
if (map_server[x].fd > 0 && x != map_id) {
|
||||
if (session_isValid(map_server[x].fd) && x != map_id) {
|
||||
uint16 i, j;
|
||||
|
||||
WFIFOHEAD(fd,10 +4*map_server[x].map.size());
|
||||
|
||||
@@ -1064,7 +1064,7 @@ int mapif_account_reg_reply(int fd, uint32 account_id, uint32 char_id, int type)
|
||||
//Request to kick char from a certain map server. [Skotlex]
|
||||
int mapif_disconnectplayer(int fd, uint32 account_id, uint32 char_id, int reason)
|
||||
{
|
||||
if (fd >= 0)
|
||||
if (session_isValid(fd))
|
||||
{
|
||||
WFIFOHEAD(fd,7);
|
||||
WFIFOW(fd,0) = 0x2b1f;
|
||||
|
||||
@@ -1733,7 +1733,7 @@ void send_shortlist_do_sends()
|
||||
|
||||
// If the session still exists, is not eof and has things left to
|
||||
// be sent from it we'll re-add it to the shortlist.
|
||||
if( session[fd] && !session[fd]->flag.eof && session[fd]->wdata_size )
|
||||
if( session_isActive(fd) && session[fd]->wdata_size )
|
||||
send_shortlist_add_fd(fd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ void chrif_setport(uint16 port) {
|
||||
|
||||
// says whether the char-server is connected or not
|
||||
int chrif_isconnected(void) {
|
||||
return (char_fd > 0 && session[char_fd] != NULL && chrif_state == 2);
|
||||
return (session_isValid(char_fd) && chrif_state == 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
102
src/map/clif.cpp
102
src/map/clif.cpp
@@ -378,7 +378,7 @@ static inline unsigned char clif_bl_type(struct block_list *bl, bool walking) {
|
||||
#endif
|
||||
|
||||
static bool clif_session_isValid(struct map_session_data *sd) {
|
||||
return ( sd != NULL && session_isActive(sd->fd) );
|
||||
return ( sd != nullptr && session_isActive(sd->fd) );
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
@@ -607,7 +607,8 @@ int clif_send(const void* buf, int len, struct block_list* bl, enum send_target
|
||||
break;
|
||||
|
||||
case SELF:
|
||||
if( sd && session_isActive( fd=sd->fd ) ){
|
||||
if( clif_session_isValid(sd) ){
|
||||
fd = sd->fd;
|
||||
WFIFOHEAD(fd,len);
|
||||
memcpy(WFIFOP(fd,0), buf, len);
|
||||
WFIFOSET(fd,len);
|
||||
@@ -814,7 +815,7 @@ void clif_authrefuse(int fd, uint8 error_code)
|
||||
/// ? = disconnected -> MsgStringTable[3]
|
||||
void clif_authfail_fd(int fd, int type)
|
||||
{
|
||||
if (!fd || !session[fd] || session[fd]->func_parse != clif_parse) //clif_authfail should only be invoked on players!
|
||||
if (!session_isValid(fd) || session[fd]->func_parse != clif_parse) //clif_authfail should only be invoked on players!
|
||||
return;
|
||||
|
||||
WFIFOHEAD(fd, packet_len(0x81));
|
||||
@@ -835,7 +836,7 @@ void clif_charselectok(int id, uint8 ok)
|
||||
struct map_session_data* sd;
|
||||
int fd;
|
||||
|
||||
if ((sd = map_id2sd(id)) == NULL || !sd->fd)
|
||||
if ((sd = map_id2sd(id)) == NULL || !session_isValid(sd->fd))
|
||||
return;
|
||||
|
||||
fd = sd->fd;
|
||||
@@ -902,7 +903,7 @@ void clif_clearflooritem(struct flooritem_data *fitem, int fd)
|
||||
WBUFW(buf,0) = 0xa1;
|
||||
WBUFL(buf,2) = fitem->bl.id;
|
||||
|
||||
if (fd == 0) {
|
||||
if ( !session_isActive( fd ) ){
|
||||
clif_send(buf, packet_len(0xa1), &fitem->bl, AREA);
|
||||
} else {
|
||||
WFIFOHEAD(fd,packet_len(0xa1));
|
||||
@@ -2030,7 +2031,7 @@ void clif_quitsave(int fd,struct map_session_data *sd) {
|
||||
sd->canlog_tick == 0 ||
|
||||
DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout)
|
||||
map_quit(sd);
|
||||
else if (sd->fd) {
|
||||
else if (session_isValid(sd->fd)) {
|
||||
//Disassociate session from player (session is deleted after this function was called)
|
||||
//And set a timer to make him quit later.
|
||||
session[sd->fd]->session_data = NULL;
|
||||
@@ -2043,9 +2044,8 @@ void clif_quitsave(int fd,struct map_session_data *sd) {
|
||||
/// 0091 <map name>.16B <x>.W <y>.W
|
||||
void clif_changemap(struct map_session_data *sd, short m, int x, int y)
|
||||
{
|
||||
int fd;
|
||||
nullpo_retv(sd);
|
||||
fd = sd->fd;
|
||||
int fd = sd->fd;
|
||||
|
||||
WFIFOHEAD(fd,packet_len(0x91));
|
||||
WFIFOW(fd,0) = 0x91;
|
||||
@@ -3262,7 +3262,7 @@ static int clif_hpmeter_sub(struct block_list *bl, va_list ap)
|
||||
nullpo_ret(sd);
|
||||
nullpo_ret(tsd);
|
||||
|
||||
if( !tsd->fd || tsd == sd )
|
||||
if( !session_isActive(tsd->fd) || tsd == sd )
|
||||
return 0;
|
||||
|
||||
if( !pc_has_permission(tsd, PC_PERM_VIEW_HPMETER) )
|
||||
@@ -4239,7 +4239,7 @@ void clif_dispchat(struct chat_data* cd, int fd)
|
||||
WBUFB(buf,16) = type;
|
||||
memcpy(WBUFCP(buf,17), cd->title, strlen(cd->title)); // not zero-terminated
|
||||
|
||||
if( fd ) {
|
||||
if( session_isActive(fd) ) {
|
||||
WFIFOHEAD(fd,WBUFW(buf,2));
|
||||
memcpy(WFIFOP(fd,0),buf,WBUFW(buf,2));
|
||||
WFIFOSET(fd,WBUFW(buf,2));
|
||||
@@ -4291,7 +4291,7 @@ void clif_clearchat(struct chat_data *cd,int fd)
|
||||
|
||||
WBUFW(buf,0) = 0xd8;
|
||||
WBUFL(buf,2) = cd->bl.id;
|
||||
if( fd ) {
|
||||
if( session_isActive(fd) ) {
|
||||
WFIFOHEAD(fd,packet_len(0xd8));
|
||||
memcpy(WFIFOP(fd,0),buf,packet_len(0xd8));
|
||||
WFIFOSET(fd,packet_len(0xd8));
|
||||
@@ -5089,7 +5089,7 @@ void clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_targe
|
||||
WBUFW(buf,6) = type;
|
||||
mapindex_getmapname_ext(map_mapid2mapname(m),WBUFCP(buf,8));
|
||||
|
||||
if( fd )
|
||||
if( session_isActive(fd) )
|
||||
{
|
||||
WFIFOHEAD(fd,packet_len(0x192));
|
||||
memcpy(WFIFOP(fd,0), buf, packet_len(0x192));
|
||||
@@ -5291,7 +5291,7 @@ static int clif_getareachar(struct block_list* bl,va_list ap)
|
||||
|
||||
sd=va_arg(ap,struct map_session_data*);
|
||||
|
||||
if (sd == NULL || !sd->fd)
|
||||
if (!clif_session_isValid(sd))
|
||||
return 0;
|
||||
|
||||
switch(bl->type){
|
||||
@@ -5323,7 +5323,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
|
||||
sd = BL_CAST(BL_PC, bl);
|
||||
tsd = BL_CAST(BL_PC, tbl);
|
||||
|
||||
if (tsd && tsd->fd) { //tsd has lost sight of the bl object.
|
||||
if (clif_session_isValid(tsd)) { //tsd has lost sight of the bl object.
|
||||
nullpo_ret(bl);
|
||||
switch(bl->type){
|
||||
case BL_PC:
|
||||
@@ -5356,7 +5356,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sd && sd->fd) { //sd is watching tbl go out of view.
|
||||
if (clif_session_isValid(sd)) { //sd is watching tbl go out of view.
|
||||
nullpo_ret(tbl);
|
||||
if(tbl->type == BL_SKILL) //Trap knocked out of sight
|
||||
clif_clearchar_skillunit((struct skill_unit *)tbl,sd->fd);
|
||||
@@ -5381,7 +5381,7 @@ int clif_insight(struct block_list *bl,va_list ap)
|
||||
sd = BL_CAST(BL_PC, bl);
|
||||
tsd = BL_CAST(BL_PC, tbl);
|
||||
|
||||
if (tsd && tsd->fd) { //Tell tsd that bl entered into his view
|
||||
if (clif_session_isValid(tsd)) { //Tell tsd that bl entered into his view
|
||||
switch(bl->type){
|
||||
case BL_ITEM:
|
||||
clif_getareachar_item(tsd,(struct flooritem_data*)bl);
|
||||
@@ -5394,7 +5394,7 @@ int clif_insight(struct block_list *bl,va_list ap)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sd && sd->fd) { //Tell sd that tbl walked into his view
|
||||
if (clif_session_isValid(sd)) { //Tell sd that tbl walked into his view
|
||||
clif_getareachar_unit(sd,tbl);
|
||||
}
|
||||
return 0;
|
||||
@@ -5411,7 +5411,7 @@ void clif_skillinfoblock(struct map_session_data *sd)
|
||||
nullpo_retv(sd);
|
||||
|
||||
fd = sd->fd;
|
||||
if (!fd)
|
||||
if (!session_isActive(fd))
|
||||
return;
|
||||
|
||||
WFIFOHEAD(fd, MAX_SKILL * 37 + 4);
|
||||
@@ -5458,13 +5458,12 @@ void clif_skillinfoblock(struct map_session_data *sd)
|
||||
/// 0111 <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <skill name>.24B <upgradable>.B
|
||||
void clif_addskill(struct map_session_data *sd, int skill_id)
|
||||
{
|
||||
int fd;
|
||||
uint16 idx = 0;
|
||||
|
||||
nullpo_retv(sd);
|
||||
|
||||
fd = sd->fd;
|
||||
if (!fd || !(idx = skill_get_index(skill_id)))
|
||||
int fd = sd->fd;
|
||||
uint16 idx = skill_get_index(skill_id);
|
||||
|
||||
if (!session_isActive(fd) || !idx)
|
||||
return;
|
||||
|
||||
if( sd->status.skill[idx].id <= 0 )
|
||||
@@ -5491,13 +5490,12 @@ void clif_addskill(struct map_session_data *sd, int skill_id)
|
||||
void clif_deleteskill(struct map_session_data *sd, int skill_id)
|
||||
{
|
||||
#if PACKETVER >= 20081217
|
||||
int fd;
|
||||
uint16 idx = 0;
|
||||
|
||||
nullpo_retv(sd);
|
||||
|
||||
fd = sd->fd;
|
||||
if (!fd || !(idx = skill_get_index(skill_id)))
|
||||
int fd = sd->fd;
|
||||
uint16 idx = skill_get_index(skill_id);
|
||||
|
||||
if (!session_isActive(fd) || !idx)
|
||||
return;
|
||||
|
||||
WFIFOHEAD(fd,packet_len(0x441));
|
||||
@@ -5511,11 +5509,14 @@ void clif_deleteskill(struct map_session_data *sd, int skill_id)
|
||||
/// Updates a skill in the skill tree (ZC_SKILLINFO_UPDATE).
|
||||
/// 010e <skill id>.W <level>.W <sp cost>.W <attack range>.W <upgradable>.B
|
||||
void clif_skillup(struct map_session_data *sd, uint16 skill_id, int lv, int range, int upgradable) {
|
||||
int fd;
|
||||
|
||||
nullpo_retv(sd);
|
||||
|
||||
fd = sd->fd;
|
||||
int fd = sd->fd;
|
||||
uint16 idx = skill_get_index(skill_id);
|
||||
|
||||
if (!session_isActive(fd) || !idx)
|
||||
return;
|
||||
|
||||
WFIFOHEAD(fd, packet_len(0x10e));
|
||||
WFIFOW(fd, 0) = 0x10e;
|
||||
WFIFOW(fd, 2) = skill_id;
|
||||
@@ -5531,9 +5532,12 @@ void clif_skillup(struct map_session_data *sd, uint16 skill_id, int lv, int rang
|
||||
/// 07e1 <skill id>.W <type>.L <level>.W <sp cost>.W <attack range>.W <upgradable>.B
|
||||
void clif_skillinfo(struct map_session_data *sd,int skill_id, int inf)
|
||||
{
|
||||
nullpo_retv(sd);
|
||||
|
||||
const int fd = sd->fd;
|
||||
uint16 idx = skill_get_index(skill_id);
|
||||
if (!idx)
|
||||
|
||||
if (!session_isActive(fd) || !idx)
|
||||
return;
|
||||
|
||||
WFIFOHEAD(fd,packet_len(0x7e1));
|
||||
@@ -6354,10 +6358,7 @@ void clif_displaymessage(const int fd, const char* mes)
|
||||
{
|
||||
nullpo_retv(mes);
|
||||
|
||||
//Scrapped, as these are shared by disconnected players =X [Skotlex]
|
||||
if (fd == 0)
|
||||
;
|
||||
else {
|
||||
if( session_isActive( fd ) ){
|
||||
char *message, *line;
|
||||
|
||||
message = aStrdup(mes);
|
||||
@@ -6739,7 +6740,7 @@ void clif_wis_message(struct map_session_data* sd, const char* nick, const char*
|
||||
/// 3 = everyone ignored by target
|
||||
void clif_wis_end(int fd, int result)
|
||||
{
|
||||
struct map_session_data *sd = (session_isValid(fd) ? (struct map_session_data *)session[fd]->session_data : NULL);
|
||||
struct map_session_data *sd = (session_isActive(fd) ? (struct map_session_data *)session[fd]->session_data : NULL);
|
||||
#if PACKETVER < 20131223
|
||||
const int cmd = 0x98;
|
||||
#else
|
||||
@@ -7381,7 +7382,7 @@ void clif_showvendingboard(struct block_list* bl, const char* message, int fd)
|
||||
WBUFL(buf,2) = bl->id;
|
||||
safestrncpy(WBUFCP(buf,6), message, 80);
|
||||
|
||||
if( fd ) {
|
||||
if( session_isActive(fd) ) {
|
||||
WFIFOHEAD(fd,packet_len(0x131));
|
||||
memcpy(WFIFOP(fd,0),buf,packet_len(0x131));
|
||||
WFIFOSET(fd,packet_len(0x131));
|
||||
@@ -7401,7 +7402,7 @@ void clif_closevendingboard(struct block_list* bl, int fd)
|
||||
|
||||
WBUFW(buf,0) = 0x132;
|
||||
WBUFL(buf,2) = bl->id;
|
||||
if( fd ) {
|
||||
if( session_isActive(fd) ) {
|
||||
WFIFOHEAD(fd,packet_len(0x132));
|
||||
memcpy(WFIFOP(fd,0),buf,packet_len(0x132));
|
||||
WFIFOSET(fd,packet_len(0x132));
|
||||
@@ -8695,7 +8696,7 @@ void clif_guild_memberlist(struct map_session_data *sd)
|
||||
|
||||
nullpo_retv(sd);
|
||||
|
||||
if( (fd = sd->fd) == 0 )
|
||||
if( !session_isActive(fd = sd->fd) )
|
||||
return;
|
||||
if( (g = sd->guild) == NULL )
|
||||
return;
|
||||
@@ -8924,13 +8925,12 @@ void clif_guild_skillinfo(struct map_session_data* sd)
|
||||
/// 016f <subject>.60B <notice>.120B
|
||||
void clif_guild_notice(struct map_session_data* sd)
|
||||
{
|
||||
int fd;
|
||||
struct guild* g;
|
||||
|
||||
nullpo_retv(sd);
|
||||
nullpo_retv(g = sd->guild);
|
||||
|
||||
fd = sd->fd;
|
||||
int fd = sd->fd;
|
||||
|
||||
if ( !session_isActive(fd) )
|
||||
return;
|
||||
@@ -9140,13 +9140,13 @@ void clif_guild_allianceack(struct map_session_data *sd,int flag)
|
||||
/// 1 = Enemy
|
||||
void clif_guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
|
||||
{
|
||||
int fd;
|
||||
|
||||
nullpo_retv(sd);
|
||||
|
||||
fd = sd->fd;
|
||||
if (fd <= 0)
|
||||
int fd = sd->fd;
|
||||
|
||||
if ( !session_isActive(fd) )
|
||||
return;
|
||||
|
||||
WFIFOHEAD(fd,packet_len(0x184));
|
||||
WFIFOW(fd,0)=0x184;
|
||||
WFIFOL(fd,2)=guild_id;
|
||||
@@ -9375,17 +9375,13 @@ void clif_GM_kickack(struct map_session_data *sd, int id)
|
||||
|
||||
void clif_GM_kick(struct map_session_data *sd, struct map_session_data *tsd)
|
||||
{
|
||||
int fd;
|
||||
|
||||
nullpo_retv(tsd);
|
||||
|
||||
fd = tsd->fd;
|
||||
|
||||
if (sd == NULL)
|
||||
tsd->state.keepshop = true;
|
||||
|
||||
if (fd > 0)
|
||||
clif_authfail_fd(fd, 15);
|
||||
if (session_isActive(tsd->fd))
|
||||
clif_authfail_fd(tsd->fd, 15);
|
||||
else
|
||||
map_quit(tsd);
|
||||
|
||||
@@ -19111,7 +19107,7 @@ int clif_autoshadowspell_list(struct map_session_data *sd) {
|
||||
nullpo_ret(sd);
|
||||
fd = sd->fd;
|
||||
|
||||
if( !fd )
|
||||
if( !session_isActive(fd) )
|
||||
return 0;
|
||||
|
||||
if( sd->menuskill_id == SC_AUTOSHADOWSPELL )
|
||||
|
||||
Reference in New Issue
Block a user