diff --git a/data/libs/functions/creature.lua b/data/libs/functions/creature.lua index ec4aa41c5bd..d43a31f287d 100644 --- a/data/libs/functions/creature.lua +++ b/data/libs/functions/creature.lua @@ -223,3 +223,14 @@ function Creature.getKillers(self, onlyPlayers) end return killers end + +function Creature:addEventStamina(target) + local player = self:getPlayer() + local monster = target:getMonster() + if player and monster and monster:getName() == staminaBonus.target then + local playerId = player:getId() + if not staminaBonus.eventsTrainer[playerId] then + staminaBonus.eventsTrainer[playerId] = addEvent(addStamina, staminaBonus.period, playerId) + end + end +end