Skip to content

Commit d6a6b38

Browse files
committed
fix: fields without owner
1 parent 015169e commit d6a6b38

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/creatures/combat/condition.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,10 +1775,6 @@ bool ConditionDamage::getNextDamage(int32_t &damage) {
17751775
}
17761776

17771777
bool ConditionDamage::doDamage(const std::shared_ptr<Creature> &creature, int32_t healthChange) const {
1778-
if (owner == 0) {
1779-
return false;
1780-
}
1781-
17821778
const auto &attacker = g_game().getPlayerByGUID(owner) ? g_game().getPlayerByGUID(owner)->getCreature() : g_game().getCreatureByID(owner);
17831779
bool isPlayer = attacker && attacker->getPlayer();
17841780
if (creature->isSuppress(getType(), isPlayer)) {
@@ -1817,6 +1813,7 @@ void ConditionDamage::endCondition(std::shared_ptr<Creature>) {
18171813
}
18181814

18191815
void ConditionDamage::addCondition(std::shared_ptr<Creature> creature, const std::shared_ptr<Condition> addCondition) {
1816+
g_logger().warn("ConditionDamage::addCondition");
18201817
if (addCondition->getType() != conditionType) {
18211818
return;
18221819
}

0 commit comments

Comments
 (0)