-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Critical hits are not being calculated for melee attacks #252
Comments
what you mean with normal melee attacks? |
@joseluis2g knight auto-attack hit (without elemental damage on weapon) |
yeah I tested it, and not its not the combat type, I did some modifications adding the critical function to combatheal and now when you use runes it only hit a few creatures. |
hello folks, I do something and now the hits is calculated:
but with this cause crash here, someone can test it? |
before this if (g_game.combatChangeHealth(caster, target, damage)) { add this if (caster && caster->getPlayer()) {
caster->getPlayer()->doCriticalDamage(damage);
} |
I'll compile it now, did you tested? |
you call caster and you do not check if it exist if (casterPlayer) { should be if (caster && casterPlayer) { :) edit: if (caster) {
Player* casterPlayer = caster->getPlayer();
if (casterPlayer) {
casterPlayer->doCriticalDamage(damage);
}
} |
@joseluis2g sure, I'm compile, could you add me on skype to we trade some ideas? |
im at discord, I dont know why but my skype isnt working :/ |
#235 doesn't completely fixed the critical hit calculations. There's a bug where normal melee attacks are not triggering critical damage. I suspect the error is the damage type check on
Combat::doCombat
methods before callingPlayer::doCriticalDamage
The text was updated successfully, but these errors were encountered: