yoiker
Member
- Joined
- Jan 21, 2012
- Messages
- 194
- Solutions
- 1
- Reaction score
- 9
Hi good morning my country. I wish someone who knows could add sources here I found this forum and I liked my combat.cpp that is not in my combat.cpp as there used TFS 1.2
this is what I want to add:
https://otland.net/threads/pvp-play...el-and-less-damage-using-physical-dmg.178061/
and this is my combat.cpp which of course is not equal
Sorry for my bad translation
this is what I want to add:
https://otland.net/threads/pvp-play...el-and-less-damage-using-physical-dmg.178061/
and this is my combat.cpp which of course is not equal
Code:
void Combat::CombatHealthFunc(Creature* caster, Creature* target, const CombatParams& params, CombatDamage* data)
{
assert(data);
CombatDamage damage = *data;
if (g_game.combatBlockHit(damage, caster, target, params.blockedByShield, params.blockedByArmor, params.itemId != 0)) {
return;
}
if ((damage.primary.value < 0 || damage.secondary.value < 0) && caster) {
Player* targetPlayer = target->getPlayer();
if (targetPlayer && caster->getPlayer() && targetPlayer->getSkull() != SKULL_BLACK) {
damage.primary.value /= 2;
damage.secondary.value /= 2;
}
}
if (g_game.combatChangeHealth(caster, target, damage)) {
CombatConditionFunc(caster, target, params, nullptr);
CombatDispelFunc(caster, target, params, nullptr);
}
}
Sorry for my bad translation