-Fix bugreport:7014 based on Kichi solution (chorus skill wasn't checking partner condition)
--Add kind of handler in skill_check_condition_castbegin for group check and move some from unit unit_skilluse_id2 (wich not really meant for check) -Cleanup leftover from r17153 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17161 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
3a330a455a
commit
9d93ffa2d0
@ -52,8 +52,6 @@
|
||||
|
||||
#define ATCOMMAND_LENGTH 50
|
||||
#define ACMD_FUNC(x) static int atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message)
|
||||
#define MAX_MSG 1500
|
||||
|
||||
|
||||
typedef struct AtCommandInfo AtCommandInfo;
|
||||
typedef struct AliasInfo AliasInfo;
|
||||
@ -76,7 +74,6 @@ struct AliasInfo {
|
||||
char atcommand_symbol = '@'; // first char of the commands
|
||||
char charcommand_symbol = '#';
|
||||
|
||||
static char* msg_table[MAX_MSG]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
|
||||
static DBMap* atcommand_db = NULL; //name -> AtCommandInfo
|
||||
static DBMap* atcommand_alias_db = NULL; //alias -> AtCommandInfo
|
||||
static config_t atcommand_config;
|
||||
|
@ -106,8 +106,8 @@ static int block_free_count = 0, block_free_lock = 0;
|
||||
static struct block_list *bl_list[BL_LIST_MAX];
|
||||
static int bl_list_count = 0;
|
||||
|
||||
#define MAX_MSG 1500
|
||||
static char* msg_table[MAX_MSG]; // map Server messages
|
||||
#define MAP_MAX_MSG 1500
|
||||
static char* msg_table[MAP_MAX_MSG]; // map Server messages
|
||||
|
||||
struct map_data map[MAX_MAP_PER_SERVER];
|
||||
int map_num = 0;
|
||||
@ -3838,11 +3838,11 @@ int do_init(int argc, char *argv[])
|
||||
}
|
||||
|
||||
int map_msg_config_read(char *cfgName){
|
||||
return _msg_config_read(cfgName,MAX_MSG,msg_table);
|
||||
return _msg_config_read(cfgName,MAP_MAX_MSG,msg_table);
|
||||
}
|
||||
const char* map_msg_txt(int msg_number){
|
||||
return _msg_txt(msg_number,MAX_MSG,msg_table);
|
||||
return _msg_txt(msg_number,MAP_MAX_MSG,msg_table);
|
||||
}
|
||||
void map_do_final_msg(void){
|
||||
_do_final_msg(MAX_MSG,msg_table);
|
||||
_do_final_msg(MAP_MAX_MSG,msg_table);
|
||||
}
|
||||
|
@ -502,6 +502,7 @@ int can_copy (struct map_session_data *sd, uint16 skill_id, struct block_list* b
|
||||
}
|
||||
|
||||
// [MouseJstr] - skill ok to cast? and when?
|
||||
//done before check_condition_begin, requirement
|
||||
int skillnotok (uint16 skill_id, struct map_session_data *sd)
|
||||
{
|
||||
int16 idx,m;
|
||||
@ -12438,6 +12439,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
|
||||
struct status_change *sc;
|
||||
struct skill_condition require;
|
||||
int i;
|
||||
uint inf2;
|
||||
|
||||
nullpo_ret(sd);
|
||||
|
||||
@ -12558,6 +12560,20 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
|
||||
//Can only update state when weapon/arrow info is checked.
|
||||
sd->state.arrow_atk = require.ammo?1:0;
|
||||
|
||||
// perform skill-group checks
|
||||
inf2 = skill_get_inf2(skill_id);
|
||||
if(inf2&INF2_CHORUS_SKILL) {
|
||||
if ( skill_check_pc_partner(sd,skill_id,&skill_lv,skill_get_splash(skill_id,skill_lv),0) < 1 ){
|
||||
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if(inf2&INF2_ENSEMBLE_SKILL){
|
||||
if (skill_check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1) {
|
||||
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
// perform skill-specific checks (and actions)
|
||||
switch( skill_id ) {
|
||||
case SO_SPELLFIST:
|
||||
|
@ -1132,21 +1132,6 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui
|
||||
}
|
||||
sd->skill_id_old = skill_id;
|
||||
break;
|
||||
case BD_LULLABY:
|
||||
case BD_RICHMANKIM:
|
||||
case BD_ETERNALCHAOS:
|
||||
case BD_DRUMBATTLEFIELD:
|
||||
case BD_RINGNIBELUNGEN:
|
||||
case BD_ROKISWEIL:
|
||||
case BD_INTOABYSS:
|
||||
case BD_SIEGFRIED:
|
||||
case CG_MOONLIT:
|
||||
if (skill_check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1)
|
||||
{
|
||||
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case WL_WHITEIMPRISON:
|
||||
if( battle_check_target(src,target,BCT_SELF|BCT_ENEMY) < 0 ) {
|
||||
clif_skill_fail(sd,skill_id,USESKILL_FAIL_TOTARGET,0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user