summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-01 18:34:05 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-01 18:34:05 +0000
commit293439505d1fef24ca1596ee034d1897dc30ae0b (patch)
treeba15f0339f0421d1ec7cbef1fdde4905adf37554 /src/map
parent2f3928c61a4b13eeb29a0a66802b7d334f319af3 (diff)
downloadhercules-293439505d1fef24ca1596ee034d1897dc30ae0b.tar.gz
hercules-293439505d1fef24ca1596ee034d1897dc30ae0b.tar.bz2
hercules-293439505d1fef24ca1596ee034d1897dc30ae0b.tar.xz
hercules-293439505d1fef24ca1596ee034d1897dc30ae0b.zip
- Corrected homunculus's aspd being halved after using some aspd adjusting skill.
- Cleaned up the resetskill function (even though the functionality is the same as before) - Corrected item 1459 (unused Partizan with no slots) being wlv3 instead of 2 (as the other two partizans) - Changed the name of the four second versions of homunculi to not have a 2. (so you get a 'lif' and not a 'lif2' - Removed flag graffiti from abracadabra - Updated the stun times of Bash, Npc-StunAttack and meteor Assault to 5 secs as reported by Ultra Mage (still pending more data to see if all others need updating as well) - Removed the log info message 'created homunc...', and the 'loaded homunc' message will only show if the save_log is enabled. - Some cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9760 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/intif.c2
-rw-r--r--src/map/pc.c62
-rw-r--r--src/map/status.c2
-rw-r--r--src/map/unit.c6
4 files changed, 35 insertions, 37 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 6d49d434d..ad749d5f9 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -118,7 +118,7 @@ int intif_rename(struct map_session_data *sd, int type, char *name)
if (CheckForCharServer())
return 1;
- WFIFOHEAD(inter_fd,NAME_LENGTH+11);
+ WFIFOHEAD(inter_fd,NAME_LENGTH+12);
WFIFOW(inter_fd,0) = 0x3006;
WFIFOL(inter_fd,2) = sd->status.account_id;
WFIFOL(inter_fd,6) = sd->status.char_id;
diff --git a/src/map/pc.c b/src/map/pc.c
index 9b4b9698d..ecd82369c 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4717,48 +4717,52 @@ int pc_resetstate(struct map_session_data* sd)
*/
int pc_resetskill(struct map_session_data* sd, int flag)
{
- int i, skill, inf2, skill_point=0;
+ int i, lv, inf2, skill_point=0;
nullpo_retr(0, sd);
if (pc_checkskill(sd, SG_DEVIL) && !pc_nextjobexp(sd))
clif_status_load(&sd->bl, SI_DEVIL, 0); //Remove perma blindness due to skill-reset. [Skotlex]
for (i = 1; i < MAX_SKILL; i++) {
- if ((skill = sd->status.skill[i].lv) > 0) {
- inf2 = skill_get_inf2(i);
- if ((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) &&
- !(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL))) //Avoid reseting wedding/linker skills.
- {
- if (!sd->status.skill[i].flag)
- skill_point += skill;
- else if (sd->status.skill[i].flag > 2 && sd->status.skill[i].flag != 13)
- skill_point += (sd->status.skill[i].flag - 2);
- if (!(flag&2)) {
- sd->status.skill[i].lv = 0;
- sd->status.skill[i].flag = 0;
- }
- }
- else if (battle_config.quest_skill_reset && (inf2&INF2_QUEST_SKILL) && !(flag&2))
- {
+ lv= sd->status.skill[i].lv;
+ if (lv < 1) continue;
+
+ inf2 = skill_get_inf2(i);
+
+ if(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL)) //Avoid reseting wedding/linker skills.
+ 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))
+ { //Wipe them
sd->status.skill[i].lv = 0;
sd->status.skill[i].flag = 0;
}
- } else {
+ continue;
+ }
+ if (!sd->status.skill[i].flag)
+ skill_point += lv;
+ else if (sd->status.skill[i].flag > 2 && sd->status.skill[i].flag != 13)
+ skill_point += (sd->status.skill[i].flag - 2);
+
+ if (!(flag&2)) {
sd->status.skill[i].lv = 0;
+ sd->status.skill[i].flag = 0;
}
}
- if (!(flag&2)) {
- if (sd->status.skill_point > USHRT_MAX - skill_point)
- sd->status.skill_point = USHRT_MAX;
- else
- sd->status.skill_point += skill_point;
-
- if (flag&1) {
- clif_updatestatus(sd,SP_SKILLPOINT);
- clif_skillinfoblock(sd);
- status_calc_pc(sd,0);
- }
+ if (flag&2 || !skill_point) return skill_point;
+
+ if (sd->status.skill_point > USHRT_MAX - skill_point)
+ sd->status.skill_point = USHRT_MAX;
+ else
+ sd->status.skill_point += skill_point;
+
+ if (flag&1) {
+ clif_updatestatus(sd,SP_SKILLPOINT);
+ clif_skillinfoblock(sd);
+ status_calc_pc(sd,0);
}
return skill_point;
}
diff --git a/src/map/status.c b/src/map/status.c
index 9b228701c..5f53f6655 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2871,7 +2871,7 @@ void status_calc_bl_sub_hom(struct homun_data *hd, unsigned long flag) //[orn]
skill = skill*status->aspd_rate/1000;
status->amotion = cap_value(skill,battle_config.max_aspd,2000);
- status->adelay = 2*status->amotion;
+ status->adelay = status->amotion;
}
if(flag&(SCB_AGI|SCB_DSPD)) {
diff --git a/src/map/unit.c b/src/map/unit.c
index a03b24d74..30c47de06 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -268,9 +268,6 @@ int unit_walktoxy( struct block_list *bl, int x, int y, int easy) {
nullpo_retr(0, bl);
- if ( status_isdead(bl) ) //[orn]
- return 0;
-
ud = unit_bl2ud(bl);
if( ud == NULL) return 0;
@@ -678,9 +675,6 @@ int unit_can_move(struct block_list *bl)
if (DIFF_TICK(ud->canmove_tick, gettick()) > 0)
return 0;
- if (status_isdead(bl))
- return 0;
-
if (sd && (
pc_issit(sd) ||
sd->state.blockedmove