From 884424e83290729598f57502e9a273f502bc1b50 Mon Sep 17 00:00:00 2001 From: Matias Date: Tue, 25 Jun 2013 03:01:07 -0400 Subject: - Fixing "@channel ban" not working if the target name has a space after the first char --- src/map/atcommand.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 65da7aa24..050e2f572 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9017,11 +9017,17 @@ ACMD(channel) { return false; } - if( sub2[0] == '\0' || ( pl_sd = map_nick2sd(sub2) ) == NULL ) { - sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found - clif->message(fd, atcmd_output); - return false; + if (!message || !*message || sscanf(message, "%s %s %24[^\n]", key, sub1, sub2) < 1) { + sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found + clif->message(fd, atcmd_output); + return false; } + + if( sub2[0] == '\0' || ( pl_sd = map_nick2sd(sub2) ) == NULL ) { + sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found + clif->message(fd, atcmd_output); + return false; + } if( pc_has_permission(pl_sd, PC_PERM_HCHSYS_ADMIN) ) { clif->message(fd, msg_txt(1464)); // Ban failed, not possible to ban this user. -- cgit v1.2.3-60-g2f50 From 25914bae30eced388cf8640eead19fbb11a65ade Mon Sep 17 00:00:00 2001 From: Matias Date: Tue, 25 Jun 2013 13:53:51 -0400 Subject: Revert "- Fixing battle->calc_cardfix applying target's cards twice on PvP/Cart Termination." This reverts commit 5ed710e084608dbd9aaf3a9af1b12719a938ac43. --- src/map/atcommand.c | 14 ++++---------- src/map/battle.c | 2 +- src/map/party.c | 7 +------ src/map/pc.c | 8 -------- src/map/status.c | 9 --------- 5 files changed, 6 insertions(+), 34 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 050e2f572..65da7aa24 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9017,17 +9017,11 @@ ACMD(channel) { return false; } - if (!message || !*message || sscanf(message, "%s %s %24[^\n]", key, sub1, sub2) < 1) { - sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found - clif->message(fd, atcmd_output); - return false; - } - if( sub2[0] == '\0' || ( pl_sd = map_nick2sd(sub2) ) == NULL ) { - sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found - clif->message(fd, atcmd_output); - return false; - } + sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found + clif->message(fd, atcmd_output); + return false; + } if( pc_has_permission(pl_sd, PC_PERM_HCHSYS_ADMIN) ) { clif->message(fd, msg_txt(1464)); // Ban failed, not possible to ban this user. diff --git a/src/map/battle.c b/src/map/battle.c index 280867b0a..370adcd02 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -629,7 +629,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li else if( cardfix != 1000 ) damage = damage * cardfix / 1000; - }else if( tsd && !(nk&NK_NO_CARDFIX_DEF) && !(left&2 )){ + }else if( tsd && !(nk&NK_NO_CARDFIX_DEF) ){ if( !(nk&NK_NO_ELEFIX) ) { int ele_fix = tsd->subele[s_ele]; diff --git a/src/map/party.c b/src/map/party.c index 18a426364..8a632a8ef 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -573,12 +573,7 @@ int party_member_withdraw(int party_id, int account_id, int char_id) if( p->instance_id ) instance_check_kick(sd); } - if (sd && sd->sc.data[SC_DANCING]) { - status_change_end(&sd->bl, SC_DANCING, INVALID_TIMER); - status_change_end(&sd->bl, SC_DRUMBATTLE, INVALID_TIMER); - status_change_end(&sd->bl, SC_NIBELUNGEN, INVALID_TIMER); - status_change_end(&sd->bl, SC_SIEGFRIED, INVALID_TIMER); - } + return 0; } diff --git a/src/map/pc.c b/src/map/pc.c index 5efb49d68..55ce993b4 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -17,7 +17,6 @@ #include "atcommand.h" // get_atcommand_level() #include "battle.h" // battle_config #include "battleground.h" -#include "chat.h" #include "chrif.h" #include "clif.h" #include "date.h" // is_day_of_*() @@ -1667,13 +1666,6 @@ int pc_disguise(struct map_session_data *sd, int class_) { clif->cartlist(sd); clif->updatestatus(sd,SP_CARTINFO); } - if (sd->chatID) { - struct chat_data* cd; - nullpo_retr(1, sd); - cd = (struct chat_data*)map_id2bl(sd->chatID); - if( cd != NULL || (struct block_list*)sd == cd->owner ) - clif->dispchat(cd,0); - } } return 1; } diff --git a/src/map/status.c b/src/map/status.c index a6acaf874..b7e906910 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6514,15 +6514,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val undead_flag = battle->check_undead(status->race,status->def_ele); //Check for inmunities / sc fails switch (type) { - case SC_DRUMBATTLE: - case SC_NIBELUNGEN: - case SC_INTOABYSS: - case SC_SIEGFRIED: - if( bl->type == BL_PC) { - struct map_session_data *sd = BL_CAST(BL_PC,bl); - if (!sd->status.party_id) return 0; - } - break; case SC_ANGRIFFS_MODUS: case SC_GOLDENE_FERSE: if ((type==SC_GOLDENE_FERSE && sc->data[SC_ANGRIFFS_MODUS]) -- cgit v1.2.3-60-g2f50 From 2c80baac08003c0ddb2df4db661dd631897c7cf2 Mon Sep 17 00:00:00 2001 From: Matias Date: Tue, 25 Jun 2013 17:04:20 -0400 Subject: Fixing an issue with "@channel ban" not allowing you to ban a character with a space after the first char of their name --- src/map/atcommand.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a1bc52924..224aede5a 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9045,11 +9045,17 @@ ACMD(channel) { return false; } - if( sub2[0] == '\0' || ( pl_sd = iMap->nick2sd(sub2) ) == NULL ) { - sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found - clif->message(fd, atcmd_output); - return false; + if (!message || !*message || sscanf(message, "%s %s %24[^\n]", key, sub1, sub2) < 1) { + sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found + clif->message(fd, atcmd_output); + return false; } + + if( sub2[0] == '\0' || ( pl_sd = map_nick2sd(sub2) ) == NULL ) { + sprintf(atcmd_output, msg_txt(1434), sub2);// Player '%s' was not found + clif->message(fd, atcmd_output); + return false; + } if( pc_has_permission(pl_sd, PC_PERM_HCHSYS_ADMIN) ) { clif->message(fd, msg_txt(1464)); // Ban failed, not possible to ban this user. -- cgit v1.2.3-60-g2f50