summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-08-28 02:33:12 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-08-28 02:33:12 +0000
commite53bc2afb3cb04344bd4f7acb20904930dd84667 (patch)
tree2196fc2372a0c69a99570336a77e251fc79863c9
parent9ca0347c41430b8cdc19bce6a01c2e10b30ce85e (diff)
downloadhercules-e53bc2afb3cb04344bd4f7acb20904930dd84667.tar.gz
hercules-e53bc2afb3cb04344bd4f7acb20904930dd84667.tar.bz2
hercules-e53bc2afb3cb04344bd4f7acb20904930dd84667.tar.xz
hercules-e53bc2afb3cb04344bd4f7acb20904930dd84667.zip
* Added a null pointer check to AB_CLEMENTIA and AB_CANTO.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14945 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Renewal.txt2
-rw-r--r--src/map/skill.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/Changelog-Renewal.txt b/Changelog-Renewal.txt
index d037e4693..f7b07c8fd 100644
--- a/Changelog-Renewal.txt
+++ b/Changelog-Renewal.txt
@@ -1,8 +1,8 @@
Date Added
2011/08/27
+ * Added a null pointer check to AB_CLEMENTIA and AB_CANTO. [Inkfish]
* Fixed skillratio of Archbishop skills is 100% higher than it's supposed be.(it's initialized to be 100% not 0) [Inkfish]
-2011/08/27
* Reverted unnecessary signature change of clif_skill_fail from r14941. [Gepard]
2011/08/26
* Rev. 14941 Renewal changes in renewal branch? Am I dreaming? [L0ne_W0lf]
diff --git a/src/map/skill.c b/src/map/skill.c
index d8b55fde4..9bca2dfb1 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -295,7 +295,7 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, int skill
return battle_config.max_heal;
// iRO Wiki states as of 2011/08/22:
- // heal = ( [(Base Level + INT) / 5] × 30 ) × (Heal Level / 10) × (1 + (Modifiers / 100)) + MATK
+ // heal = ( [(Base Level + INT) / 5] ?30 ) ?(Heal Level / 10) ?(1 + (Modifiers / 100)) + MATK
// fixme: Does not match up with iRO's heal, level 1 or level 10
// with 219 mak + HP_MEDITATO, level 1 = 361; level 10 = 1839
if( skill_id == AB_HIGHNESSHEAL ) {
@@ -5753,12 +5753,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case AB_CLEMENTIA:
case AB_CANTO:
if( sd == NULL || sd->status.party_id == 0 || (flag & 1) ) {
- int lv = 0;
+ int lv = 1;
switch(skillid) {
- case AB_CLEMENTIA: lv = pc_checkskill(sd,AL_BLESSING); break;
- case AB_CANTO: lv = pc_checkskill(sd,AL_INCAGI); break;
+ case AB_CLEMENTIA: if( sd ) lv = pc_checkskill(sd,AL_BLESSING); break;
+ case AB_CANTO: if( sd ) lv = pc_checkskill(sd,AL_INCAGI); break;
}
- clif_skill_nodamage(bl, bl, skillid, skilllv, sc_start(bl,type,100,(lv < 1)? 1: lv,skill_get_time(skillid,skilllv)));
+ clif_skill_nodamage(bl, bl, skillid, skilllv, sc_start(bl,type,100,lv,skill_get_time(skillid,skilllv)));
}
else if( sd )
party_foreachsamemap(skill_area_sub, sd, skill_get_splash(skillid, skilllv), src, skillid, skilllv, tick, flag|BCT_PARTY|1, skill_castend_nodamage_id);