Issue information

Issue ID
#5919
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jun 3, 2012 15:14
Last Post
Hercules Elf Bot
Jun 9, 2012 17:31
Confirmation
N/A

Hercules Elf Bot - Jun 3, 2012 15:14

Originally posted by [b]Ikari Gendo[/b]
DMG should be: [(Skill Level x 20 + 100) x (Caster’s Base Level / 150)] + Caster’s INT but it is only int atm on all lvl's

Hercules Elf Bot - Jun 3, 2012 15:40

Originally posted by [b]malufett[/b]
Its working as intended.....

@battle.c
[CODE]if( !skill_num ) {
/**
* RK Enchant Blade
**/
if( sc->data[SC_ENCHANTBLADE] && sd && ( (flag.rh && sd->weapontype1) || (flag.lh && sd->weapontype2) ) ) {
//[( ( Skill Lv x 20 ) + 100 ) x ( casterBaseLevel / 150 )] + casterInt
wd.damage += ( ( ( sc->data[SC_ENCHANTBLADE]->val1 * 20 ) + 100 ) * ( status_get_lv(src) / 150 ) ) + status_get_int(src);
}
}[/CODE]

Hercules Elf Bot - Jun 3, 2012 16:07

Originally posted by [b]Ikari Gendo[/b]
if it works is intend why is the dmg from lvl 1 the same as from lvl 5 ?

testing with a runeknight twith 73 int:

Skill lvl 1 dmg is 73 on a "miss"
Skill lvl 5 dmg is 73 on a "miss"

Hercules Elf Bot - Jun 3, 2012 17:01

Originally posted by [b]malufett[/b]
hmm..now I analyzed the code above and it seems that mathematically the code is fine but programatically its wrong..

[quote]( ( ( sc->data[SC_ENCHANTBLADE]->val1 * 20 ) + 100 ) * [b]( status_get_lv(src) / 150 )[/b] ) + status_get_int(src)[/quote]

see the blacken area it generates 0 therefore this bug is confirmed...^^,

Hercules Elf Bot - Jun 4, 2012 17:12

Originally posted by [b]malufett[/b]
Fixed @ [rev='16233']

Hercules Elf Bot - Jun 4, 2012 21:57

Originally posted by [b]Ikari Gendo[/b]
still 73 dmg on skill lvl 5 ?

Hercules Elf Bot - Jun 5, 2012 11:57

Originally posted by [b]Ikari Gendo[/b]
the fix still uses [b]status_get_lv(src) / 150 [/b]only withour () so if it was 0 befor, the () won't change 0

Hercules Elf Bot - Jun 5, 2012 13:19

Originally posted by [b]malufett[/b]
[b]x * (status_get_lv(src) / 150)[/b] is different from [b](x * status_get_lv(src) / 150)[/b]

code 1:
5 * (100/150) = 5 * (0) = 0
code 2:
5*100/150 = 500/150 = 3

see the difference? any int,short,char,long variables when undergo division its not convertible to float/double type unless you do type casting...

This post has been edited by malufett on Jun 5, 2012 14:30

Hercules Elf Bot - Jun 5, 2012 15:00

Originally posted by [b]Ikari Gendo[/b]
ok i see that but with you fix the dmg is still as low as before

Hercules Elf Bot - Jun 5, 2012 15:34

Originally posted by [b]malufett[/b]
here is my test
lvl 50 novice int 99

(note miss hits)
lvl1 - 139 [u]( 1*20 + 100) * 50 / 150 + 99[/u] = [u]120*50/150 + 99[/u] = [u]6000/150 + 99[/u] = [u]40 + 99[/u] = [b]139[/b]
lvl2 - 145
lvl3 - 152
lvl4 - 159
lvl5 - 165

its working fine....

Hercules Elf Bot - Jun 5, 2012 20:51

Originally posted by [b]Ikari Gendo[/b]
i'll post you a screenshot from the test plz explain it to me how i can hit 72 if it is fixed.
[url="http://s7.directupload.net/images/120605/pfffovck.jpg"]http://s7.directupload.net/images/120605/pfffovck.jpg[/url]

Hercules Elf Bot - Jun 6, 2012 11:24

Originally posted by [b]malufett[/b]
make sure your server is updated...
[size=3]note: [b]fresh checkout[/b][/size]

[size=3]here is my screenie.....[/size]
[size=3][img]http://i50.tinypic.com/2d28vhd.jpg[/img][/size]


[size=3]Equation:[/size]
[u]( 5*20 + 100) * 133 / 150 + 72[/u][color=#282828][font=helvetica, arial, sans-serif][size=3] = [/size][/font][/color][u]200*133/150 + 72[/u][color=#282828][font=helvetica, arial, sans-serif][size=3] =[u]266[/u][/size][/font][/color][u]00/150 + 72[/u][color=#282828][font=helvetica, arial, sans-serif][size=3] = [/size][/font][/color][u]177 + 72[/u][color=#282828][font=helvetica, arial, sans-serif][size=3] = [/size][/font][/color][b]249[/b]

Hercules Elf Bot - Jun 6, 2012 17:41

Originally posted by [b]Ikari Gendo[/b]
i have done :"svn co https://rathena.svn.sourceforge.net/svnroot/rathena/trunk trunk"
and after that compiled by "make" in the trunk directory

Hercules Elf Bot - Jun 6, 2012 23:15

Originally posted by [b]GM Takumirai[/b]
did you do this..
make clean
./configure
make all
ls *sql

Hercules Elf Bot - Jun 7, 2012 14:10

Originally posted by [b]Ikari Gendo[/b]
it works now great thank at all post can be closed