scope AddItemBonuses
private struct AddItemBonuses
static method onPickUp takes nothing returns nothing
local unit u = GetManipulatingUnit()
local item i = GetManipulatedItem()
// Bracer of Agility (lvl 1)
if GetItemTypeId(i) == 'I0AE' then
call LinkBonusToItem(u, BONUS_STRENGTH, 2, i)
call LinkBonusToItem(u, BONUS_AGILITY, 7, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 2, i)
call LinkBonusToItem(u, BONUS_DAMAGE, 9, i)
call LinkBonusToItem(u, BONUS_ATTACK_SPEED, 0.08, i)
// Bracer of Agility (lvl 2)
elseif GetItemTypeId(i) == 'I0BG' then
call LinkBonusToItem(u, BONUS_STRENGTH, 4, i)
call LinkBonusToItem(u, BONUS_AGILITY, 10, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 4, i)
call LinkBonusToItem(u, BONUS_DAMAGE, 12, i)
call LinkBonusToItem(u, BONUS_ATTACK_SPEED, 0.11, i)
// Bracer of Agility (lvl 3)
elseif GetItemTypeId(i) == 'I0AN' then
call LinkBonusToItem(u, BONUS_STRENGTH, 6, i)
call LinkBonusToItem(u, BONUS_AGILITY, 13, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 6, i)
call LinkBonusToItem(u, BONUS_DAMAGE, 15, i)
call LinkBonusToItem(u, BONUS_ATTACK_SPEED, 0.14, i)
// Bracer of Agility (lvl 4)
elseif GetItemTypeId(i) == 'I0BF' then
call LinkBonusToItem(u, BONUS_STRENGTH, 8, i)
call LinkBonusToItem(u, BONUS_AGILITY, 16, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 8, i)
call LinkBonusToItem(u, BONUS_DAMAGE, 18, i)
call LinkBonusToItem(u, BONUS_ATTACK_SPEED, 0.17, i)
// Bracer of Agility (lvl 5)
elseif GetItemTypeId(i) == 'I0BH' then
call LinkBonusToItem(u, BONUS_STRENGTH, 10, i)
call LinkBonusToItem(u, BONUS_AGILITY, 19, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 10, i)
call LinkBonusToItem(u, BONUS_DAMAGE, 24, i)
call LinkBonusToItem(u, BONUS_ATTACK_SPEED, 0.23, i)
// Bracer of Strength (lvl 1)
elseif GetItemTypeId(i) == 'I0B3' then
call LinkBonusToItem(u, BONUS_STRENGTH, 7, i)
call LinkBonusToItem(u, BONUS_AGILITY, 2, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 2, i)
call LinkBonusToItem(u, BONUS_HEALTH_REGEN, 4, i)
call LinkBonusToItem(u, BONUS_HEALTH, 400, i)
// Bracer of Strength (lvl 2)
elseif GetItemTypeId(i) == 'I0BJ' then
call LinkBonusToItem(u, BONUS_STRENGTH, 10, i)
call LinkBonusToItem(u, BONUS_AGILITY, 4, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 4, i)
call LinkBonusToItem(u, BONUS_HEALTH_REGEN, 6, i)
call LinkBonusToItem(u, BONUS_HEALTH, 650, i)
// Bracer of Strength (lvl 3)
elseif GetItemTypeId(i) == 'I0BK' then
call LinkBonusToItem(u, BONUS_STRENGTH, 13, i)
call LinkBonusToItem(u, BONUS_AGILITY, 6, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 6, i)
call LinkBonusToItem(u, BONUS_HEALTH_REGEN, 8, i)
call LinkBonusToItem(u, BONUS_HEALTH, 900, i)
// Bracer of Strength (lvl 4)
elseif GetItemTypeId(i) == 'I0BD' then
call LinkBonusToItem(u, BONUS_STRENGTH, 16, i)
call LinkBonusToItem(u, BONUS_AGILITY, 8, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 8, i)
call LinkBonusToItem(u, BONUS_HEALTH_REGEN, 10, i)
call LinkBonusToItem(u, BONUS_HEALTH, 1150, i)
// Bracer of Strength (lvl 5)
elseif GetItemTypeId(i) == 'I0BI' then
call LinkBonusToItem(u, BONUS_STRENGTH, 19, i)
call LinkBonusToItem(u, BONUS_AGILITY, 10, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 10, i)
call LinkBonusToItem(u, BONUS_HEALTH_REGEN, 12, i)
call LinkBonusToItem(u, BONUS_HEALTH, 1400, i)
// Bracer of Intelligence (lvl 1)
elseif GetItemTypeId(i) == 'I0AV' then
call LinkBonusToItem(u, BONUS_STRENGTH, 2, i)
call LinkBonusToItem(u, BONUS_AGILITY, 2, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 7, i)
call LinkBonusToItem(u, BONUS_MANA_REGEN, 0.12, i)
call LinkBonusToItem(u, BONUS_MANA, 300, i)
// Bracer of Intelligence (lvl 2)
elseif GetItemTypeId(i) == 'I0BE' then
call LinkBonusToItem(u, BONUS_STRENGTH, 4, i)
call LinkBonusToItem(u, BONUS_AGILITY, 4, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 10, i)
call LinkBonusToItem(u, BONUS_MANA_REGEN, 0.16, i)
call LinkBonusToItem(u, BONUS_MANA, 480, i)
// Bracer of Intelligence (lvl 3)
elseif GetItemTypeId(i) == 'I0BL' then
call LinkBonusToItem(u, BONUS_STRENGTH, 6, i)
call LinkBonusToItem(u, BONUS_AGILITY, 6, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 13, i)
call LinkBonusToItem(u, BONUS_MANA_REGEN, 0.20, i)
call LinkBonusToItem(u, BONUS_MANA, 660, i)
// Bracer of Intelligence (lvl 4)
elseif GetItemTypeId(i) == 'I0BM' then
call LinkBonusToItem(u, BONUS_STRENGTH, 8, i)
call LinkBonusToItem(u, BONUS_AGILITY, 8, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 16, i)
call LinkBonusToItem(u, BONUS_MANA_REGEN, 0.24, i)
call LinkBonusToItem(u, BONUS_MANA, 840, i)
// Bracer of Intelligence (lvl 5)
elseif GetItemTypeId(i) == 'I0BN' then
call LinkBonusToItem(u, BONUS_STRENGTH, 10, i)
call LinkBonusToItem(u, BONUS_AGILITY, 10, i)
call LinkBonusToItem(u, BONUS_INTELLIGENCE, 19, i)
call LinkBonusToItem(u, BONUS_MANA_REGEN, 0.28, i)
call LinkBonusToItem(u, BONUS_MANA, 1020, i)
endif
set i = null
set u = null
endmethod
static method onInit takes nothing returns nothing
call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_PICKUP_ITEM, function thistype.onPickUp)
endmethod
endstruct
endscope