Added toggle of cicatrization update at startup

This commit is contained in:
ZioPao
2023-11-17 14:50:30 +01:00
parent 38141bc5db
commit 0d85638464
2 changed files with 10 additions and 7 deletions

View File

@@ -32,12 +32,12 @@ function PlayerHandler.InitializePlayer(playerObj, isForced)
CachedDataHandler.CalculateAmputatedLimbs(username)
CachedDataHandler.CalculateHighestAmputatedLimbs(username)
--Setup the CicatrizationUpdate event
--Setup the CicatrizationUpdate event and triggers it once
Events.OnAmputatedLimb.Add(PlayerHandler.ToggleCicatrizationUpdate)
PlayerHandler.ToggleCicatrizationUpdate()
-- Since isForced is used to reset an existing player data, we're gonna clean their ISHealthPanel table too
if isForced then
--ISHealthPanel.highestAmputations = {}
local ItemsHandler = require("TOC/Handlers/ItemsHandler")
ItemsHandler.Player.DeleteAllOldAmputationItems(playerObj)
CachedDataHandler.Reset(username)