Skip to content

Commit

Permalink
fix: fields without owner
Browse files Browse the repository at this point in the history
  • Loading branch information
murilo09 committed Jan 8, 2025
1 parent 015169e commit d6a6b38
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/creatures/combat/condition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1775,10 +1775,6 @@ bool ConditionDamage::getNextDamage(int32_t &damage) {
}

bool ConditionDamage::doDamage(const std::shared_ptr<Creature> &creature, int32_t healthChange) const {
if (owner == 0) {
return false;
}

const auto &attacker = g_game().getPlayerByGUID(owner) ? g_game().getPlayerByGUID(owner)->getCreature() : g_game().getCreatureByID(owner);
bool isPlayer = attacker && attacker->getPlayer();
if (creature->isSuppress(getType(), isPlayer)) {
Expand Down Expand Up @@ -1817,6 +1813,7 @@ void ConditionDamage::endCondition(std::shared_ptr<Creature>) {
}

void ConditionDamage::addCondition(std::shared_ptr<Creature> creature, const std::shared_ptr<Condition> addCondition) {
g_logger().warn("ConditionDamage::addCondition");
if (addCondition->getType() != conditionType) {
return;
}
Expand Down

0 comments on commit d6a6b38

Please sign in to comment.