diff --git a/CharactersPage.js b/CharactersPage.js index 78d9fc71f..5c8373bc1 100644 --- a/CharactersPage.js +++ b/CharactersPage.js @@ -2041,7 +2041,7 @@ function observe_character_sheet_changes(documentToObserve) { if (mutationTarget.hasClass('ct-conditions-summary')) { // conditions update from sidebar const conditionsSet = read_conditions(documentToObserve); character_sheet_changed({conditions: conditionsSet}); - } else if((firstRemoved.hasClass('ct-health-summary__hp-item') && firstRemoved.children('#ct-health-summary-max-label').length) || firstRemoved.find('[aria-label*="Hit Points Adjustment"]')){ // this is to catch if the player just died look at the removed node to get value - to prevent 0/0 hp + } else if((firstRemoved.hasClass('ct-health-summary__hp-item') && firstRemoved.children('#ct-health-summary-max-label').length) || firstRemoved.find('[aria-label*="Hit Points Adjustment"]').length){ // this is to catch if the player just died look at the removed node to get value - to prevent 0/0 hp let maxhp = parseInt(firstRemoved.find(`.ct-health-summary__hp-number, [aria-label*='Max Hit']`).text()); send_character_hp(maxhp); }else if ( @@ -2051,7 +2051,7 @@ function observe_character_sheet_changes(documentToObserve) { mutationTarget.hasClass('ct-health-summary__deathsaves') || mutationTarget.hasClass('ct-health-summary__deathsaves-mark') || mutationTarget.hasClass('[class*="styles_mark"]') || - mutationTarget.parents('[class*="styles_hitPointsBox"]').length>0 + (mutationTarget.parents('[class*="styles_hitPointsBox"]').length>0 && mutationTarget.find("input[class*=styles_input]").length == 0) ) { send_character_hp(); }