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

@@ -24674,7 +24674,7 @@ TypeID = 5460
Name = "a helmet of the deep"
Description = "Enables underwater exploration"
Flags = {Take,Armor}
Attributes = {Weight=21000,SlotType=HEAD,ArmorValue=2} # TODO: Drown protection!
Attributes = {Weight=21000,SlotType=HEAD,ArmorValue=2,AbsorbDrown=100}
TypeID = 5461
Name = "pirate boots"

View File

@@ -671,7 +671,7 @@
<movevent event="AddItem" itemid="2151" function="onAddField" />
<!-- Helmets -->
<movevent event="Equip" itemid="5460" slot="head" function="onEquipItem" script="misc/helmet_of_the_deep.lua" />
<movevent event="Equip" itemid="5460" slot="head" function="onEquipItem" />
<movevent event="DeEquip" itemid="5460" slot="head" function="onDeEquipItem" />
<!-- Boots -->

View File

@@ -1,4 +0,0 @@
function onEquip(player, item, slot)
player:removeCondition(CONDITION_DROWN)
return true
end