- Added missing include npc.h to map.c
- Now when job changing to another class tree, status changes from skills that belong to your previous class are cleared. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11716 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
a5b2c3b30c
commit
39b8a6f75a
@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
|
||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||
|
||||
2007/11/12
|
||||
* Now when job changing to another class tree, status changes from skills
|
||||
that belong to your previous class are cleared. [Skotlex]
|
||||
* Applied Rayce's improvements to the npc script parser [ultramage]
|
||||
* Made on-touch areas work with walking npcs (is somewhat process
|
||||
intensive, but people do not really care about that, do they?) [Skotlex]
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "charcommand.h"
|
||||
#include "log.h"
|
||||
#include "irc.h"
|
||||
#include "npc.h"
|
||||
#ifndef TXT_ONLY
|
||||
#include "mail.h"
|
||||
#endif
|
||||
|
18
src/map/pc.c
18
src/map/pc.c
@ -5606,9 +5606,25 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
|
||||
sd->change_level = sd->status.job_level;
|
||||
else if (!sd->change_level)
|
||||
sd->change_level = 40; //Assume 40?
|
||||
pc_setglobalreg (sd, "jobchange_level", sd->change_level);
|
||||
}
|
||||
|
||||
pc_setglobalreg (sd, "jobchange_level", sd->change_level);
|
||||
if(sd->cloneskill_id) {
|
||||
sd->cloneskill_id = 0;
|
||||
pc_setglobalreg(sd, "CLONE_SKILL", 0);
|
||||
pc_setglobalreg(sd, "CLONE_SKILL_LV", 0);
|
||||
}
|
||||
if ((b_class&&MAPID_UPPERMASK) != (sd->class_&MAPID_UPPERMASK))
|
||||
{ //Things to remove when changing class tree.
|
||||
const int class_ = pc_class2idx(sd->status.class_);
|
||||
int id;
|
||||
for(i = 0; i < MAX_SKILL_TREE && (id = skill_tree[class_][i].id) > 0; i++) {
|
||||
//Remove status specific to your current tree skills.
|
||||
id = SkillStatusChangeTable(id);
|
||||
if (id > SC_COMMON_MAX && sd->sc.data[id].timer != -1)
|
||||
status_change_end(&sd->bl, id, -1);
|
||||
}
|
||||
}
|
||||
|
||||
sd->status.class_ = job;
|
||||
fame_flag = pc_famerank(sd->status.char_id,sd->class_&MAPID_UPPERMASK);
|
||||
|
Loading…
x
Reference in New Issue
Block a user