summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorepoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-20 14:01:10 +0000
committerepoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-20 14:01:10 +0000
commit78fe9886d39b11a38903ffc513a70fa2b00e43f3 (patch)
tree24d372dab35483df25a60a0a6ebb8ddbc8eb5e2f /src/map/pc.c
parente697781ab5e618988b37951ab4e16a3e23e18655 (diff)
downloadhercules-78fe9886d39b11a38903ffc513a70fa2b00e43f3.tar.gz
hercules-78fe9886d39b11a38903ffc513a70fa2b00e43f3.tar.bz2
hercules-78fe9886d39b11a38903ffc513a70fa2b00e43f3.tar.xz
hercules-78fe9886d39b11a38903ffc513a70fa2b00e43f3.zip
- Fixed Clown/Gypsy/Minstrel/Wanderer not receiving skill points upon change-sex
- Fixed missing casts from void* to struct online_char_data* in char.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15735 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index a91340bf8..c277279c8 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5804,11 +5804,16 @@ int pc_resetstate(struct map_session_data* sd)
* /resetskill
* if flag&1, perform block resync and status_calc call.
* if flag&2, just count total amount of skill points used by player, do not really reset.
+ * if flag&4, just reset the skills if the player class is a bard/dancer type (for changesex.)
*------------------------------------------*/
int pc_resetskill(struct map_session_data* sd, int flag)
{
int i, lv, inf2, skill_point=0;
nullpo_ret(sd);
+
+ if( flag&4 && (sd->class_&MAPID_UPPERMASK) != MAPID_BARDDANCER )
+ return 0;
+
if( !(flag&2) ) { //Remove stuff lost when resetting skills.
/**
@@ -5865,6 +5870,9 @@ int pc_resetskill(struct map_session_data* sd, int flag)
if( i == NV_BASIC && (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE )
continue;
+ if( flag&4 && !skill_ischangesex(i) )
+ continue;
+
if( inf2&INF2_QUEST_SKILL && !battle_config.quest_skill_learn )
{ //Only handle quest skills in a special way when you can't learn them manually
if( battle_config.quest_skill_reset && !(flag&2) )