implement absorbDrown damage properly on items

This commit is contained in:
ErikasKontenis
2019-12-05 17:15:19 +02:00
parent 6fff6a868a
commit 9eca23b2e1
5 changed files with 8 additions and 6 deletions

View File

@@ -646,6 +646,10 @@ uint32_t MoveEvent::EquipItem(MoveEvent* moveEvent, Player* player, Item* item,
player->sendIcons();
}
if (it.abilities->absorbPercent[combatTypeToIndex(COMBAT_DROWNDAMAGE)] == 100) {
player->removeCondition(CONDITION_DROWN);
}
if (it.abilities->regeneration) {
Condition* condition = Condition::createCondition(static_cast<ConditionId_t>(slot), CONDITION_REGENERATION, -1, 0);