summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-27 13:53:52 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-27 13:53:52 +0000
commit658432776ff20aa99b8e83e25671797c746edb0c (patch)
tree4fe236c4f14919f43b778117ee793c9cf7bcd3e3
parentd8b0f15444e87644ccee5a5e1ea4449c9b918fec (diff)
downloadhercules-658432776ff20aa99b8e83e25671797c746edb0c.tar.gz
hercules-658432776ff20aa99b8e83e25671797c746edb0c.tar.bz2
hercules-658432776ff20aa99b8e83e25671797c746edb0c.tar.xz
hercules-658432776ff20aa99b8e83e25671797c746edb0c.zip
- Readded the check which prevents Cloaking from activating when your learned level is less than 3 and you aren't next to a wall.
- Some cleanups to the Frenzy/Berserk status change, it should probably work correctly now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7917 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt6
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/status.c13
3 files changed, 17 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 66434285f..fa13d41f5 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,7 +4,11 @@ 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.
2006/07/27
- * Removed a redeclared variable i in the parsing of the fame list (char-txt
+ * Readded the check which prevents Cloaking from activating when your
+ learned level is less than 3 and you aren't next to a wall. [Skotlex]
+ * Some cleanups to the Frenzy/Berserk status change, it should probably
+ work correctly now. [Skotlex]
+ * Removed a redeclared variable i in the parsing of the fame list (char-sql
server) which seems to be the cause of the random memory corruptions.
[Skotlex]
* Updated item_db.sql to latest. [Toms]
diff --git a/src/map/skill.c b/src/map/skill.c
index e36b39cad..3749ce6d2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4722,7 +4722,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|| i==SC_SAFETYWALL || i==SC_SMA
)
continue;
- if(i==SC_BERSERK) tsc->data[i].val4=1; //Mark a dispelled berserk to avoid setting hp to 100.
+ if(i==SC_BERSERK) tsc->data[i].val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.
status_change_end(bl,i,-1);
}
}
diff --git a/src/map/status.c b/src/map/status.c
index 747547386..a93ea6fc9 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4428,6 +4428,14 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
if (sc->data[SC_QUAGMIRE].timer!=-1 || sc->data[SC_DONTFORGETME].timer!=-1)
return 0;
break;
+ case SC_CLOAKING:
+ //Avoid cloaking with no wall and low skill level. [Skotlex]
+ //Due to the cloaking card, we have to check the wall versus to known
+ //skill level rather than the used one. [Skotlex]
+ //if (sd && val1 < 3 && skill_check_cloaking(bl))
+ if (sd && pc_checkskill(sd, AS_CLOAKING)< 3 && skill_check_cloaking(bl,sc))
+ return 0;
+ break;
case SC_MODECHANGE:
{
int mode;
@@ -4998,6 +5006,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
//HP healing is performing after the calc_status call.
if (sd) sd->canregen_tick = gettick() + 300000;
//Val2 holds HP penalty
+ if (!val4) val4 = skill_get_time2(StatusSkillChangeTable[type],val1);
if (!val4) val4 = 10000; //Val4 holds damage interval
val3 = tick/val4; //val3 holds skill duration
tick = val4;
@@ -5853,8 +5862,8 @@ int status_change_end( struct block_list* bl , int type,int tid )
break;
case SC_BERSERK:
- //val4 indicates if the skill was dispelled. [Skotlex]
- if(status->hp > 100 && !sc->data[type].val4)
+ //If val2 is removed, no HP penalty (dispelled?) [Skotlex]
+ if(status->hp > 100 && sc->data[type].val2)
status_zap(bl, status->hp-100, 0);
if(sc->data[SC_ENDURE].timer != -1)
status_change_end(bl, SC_ENDURE, -1);