Skip to content

Commit

Permalink
Perf skill wheel bonus
Browse files Browse the repository at this point in the history
this fixes the excessive damage output from skill wheel such as enhanced ethereal speak, the damage output still too high in comparison to real tibia.
  • Loading branch information
mdbeng committed Feb 4, 2025
1 parent 2a5a0e7 commit 57ceb16
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7230,7 +7230,17 @@ bool Game::combatChangeHealth(const std::shared_ptr<Creature> &attacker, const s
if (attackerPlayer && targetPlayer && attackerPlayer->getSkull() == SKULL_BLACK && attackerPlayer->getSkullClient(targetPlayer) == SKULL_NONE) {
return false;
}


if (damage.origin != ORIGIN_NONE) {
const auto events = target->getCreatureEvents(CREATURE_EVENT_HEALTHCHANGE);
if (!events.empty()) {
for (const auto &creatureEvent : events) {
creatureEvent->executeHealthChange(target, attacker, damage);
}
damage.origin = ORIGIN_NONE;
return combatChangeHealth(attacker, target, damage);
}
}
// Wheel of destiny apply combat effects
applyWheelOfDestinyEffectsToDamage(damage, attackerPlayer, target);

Expand Down Expand Up @@ -7454,17 +7464,6 @@ bool Game::combatChangeHealth(const std::shared_ptr<Creature> &attacker, const s
return true;
}

if (damage.origin != ORIGIN_NONE) {
const auto events = target->getCreatureEvents(CREATURE_EVENT_HEALTHCHANGE);
if (!events.empty()) {
for (const auto &creatureEvent : events) {
creatureEvent->executeHealthChange(target, attacker, damage);
}
damage.origin = ORIGIN_NONE;
return combatChangeHealth(attacker, target, damage);
}
}

// Apply Custom PvP Damage (must be placed here to avoid recursive calls)
if (attackerPlayer && targetPlayer) {
applyPvPDamage(damage, attackerPlayer, targetPlayer);
Expand Down

0 comments on commit 57ceb16

Please sign in to comment.