fix: error while amputating
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
-- TODO Move this to server side for 42.13
|
||||
|
||||
|
||||
local DataController = require("TOC/Controllers/DataController")
|
||||
local ItemsController = require("TOC/Controllers/ItemsController")
|
||||
local CachedDataHandler = require("TOC/Handlers/CachedDataHandler")
|
||||
@@ -193,7 +196,10 @@ function AmputationHandler:execute(damagePlayer)
|
||||
-- TODO Test this again for 42.13
|
||||
-- If the part was actually infected, heal the player, if they were in time (infectionLevel < 20)
|
||||
local infectionLevel = self.patientPl:getStats():get(CharacterStat.ZOMBIE_INFECTION)
|
||||
if infectionLevel < 20 and bodyPart:isInfected() and not dcInst:getIsIgnoredPartInfected() then
|
||||
|
||||
|
||||
|
||||
if infectionLevel < 20 and bodyPart:IsInfected() and not dcInst:getIsIgnoredPartInfected() then
|
||||
LocalPlayerController.HealZombieInfection(bd, bodyPart, self.limbName, dcInst)
|
||||
end
|
||||
|
||||
@@ -205,7 +211,7 @@ function AmputationHandler:execute(damagePlayer)
|
||||
triggerEvent("OnAmputatedLimb", self.limbName)
|
||||
end
|
||||
|
||||
---Deletes the instance
|
||||
---Delete the instance
|
||||
function AmputationHandler:close()
|
||||
AmputationHandler.instance = nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user