Fixed atcommand skilltree (fixes #1320)
* Resolves the command not searching the skill_tree array using the correct class index.
This commit is contained in:
parent
f0ed0cfe0a
commit
08893675a1
@ -5664,7 +5664,7 @@ ACMD_FUNC(skilltree)
|
|||||||
{
|
{
|
||||||
struct map_session_data *pl_sd = NULL;
|
struct map_session_data *pl_sd = NULL;
|
||||||
uint16 skill_id;
|
uint16 skill_id;
|
||||||
int meets, j, c=0;
|
int meets, i, j, c=0;
|
||||||
char target[NAME_LENGTH];
|
char target[NAME_LENGTH];
|
||||||
struct skill_tree_entry *ent;
|
struct skill_tree_entry *ent;
|
||||||
nullpo_retr(-1, sd);
|
nullpo_retr(-1, sd);
|
||||||
@ -5680,12 +5680,14 @@ ACMD_FUNC(skilltree)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
c = pc_calc_skilltree_normalize_job(pl_sd);
|
i = pc_calc_skilltree_normalize_job(pl_sd);
|
||||||
c = pc_mapid2jobid(c, pl_sd->status.sex);
|
c = pc_mapid2jobid(i, pl_sd->status.sex);
|
||||||
|
|
||||||
sprintf(atcmd_output, msg_txt(sd,1168), job_name(c), pc_checkskill(pl_sd, NV_BASIC)); // Player is using %s skill tree (%d basic points).
|
sprintf(atcmd_output, msg_txt(sd,1168), job_name(c), pc_checkskill(pl_sd, NV_BASIC)); // Player is using %s skill tree (%d basic points).
|
||||||
clif_displaymessage(fd, atcmd_output);
|
clif_displaymessage(fd, atcmd_output);
|
||||||
|
|
||||||
|
c = pc_class2idx(c);
|
||||||
|
|
||||||
ARR_FIND( 0, MAX_SKILL_TREE, j, skill_tree[c][j].id == 0 || skill_tree[c][j].id == skill_id );
|
ARR_FIND( 0, MAX_SKILL_TREE, j, skill_tree[c][j].id == 0 || skill_tree[c][j].id == skill_id );
|
||||||
if( j == MAX_SKILL_TREE || skill_tree[c][j].id == 0 )
|
if( j == MAX_SKILL_TREE || skill_tree[c][j].id == 0 )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user