{"action":"created","issue":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/1063","repository_url":"https://api.github.com/repos/OpenMW/openmw","labels_url":"https://api.github.com/repos/OpenMW/openmw/issues/1063/labels{/name}","comments_url":"https://api.github.com/repos/OpenMW/openmw/issues/1063/comments","events_url":"https://api.github.com/repos/OpenMW/openmw/issues/1063/events","html_url":"https://github.com/OpenMW/openmw/pull/1063","id":177487636,"number":1063,"title":"Drain and Fortify fixes","user":{"login":"Allofich","id":19624336,"avatar_url":"https://avatars.githubusercontent.com/u/19624336?v=3","gravatar_id":"","url":"https://api.github.com/users/Allofich","html_url":"https://github.com/Allofich","followers_url":"https://api.github.com/users/Allofich/followers","following_url":"https://api.github.com/users/Allofich/following{/other_user}","gists_url":"https://api.github.com/users/Allofich/gists{/gist_id}","starred_url":"https://api.github.com/users/Allofich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Allofich/subscriptions","organizations_url":"https://api.github.com/users/Allofich/orgs","repos_url":"https://api.github.com/users/Allofich/repos","events_url":"https://api.github.com/users/Allofich/events{/privacy}","received_events_url":"https://api.github.com/users/Allofich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2016-09-16T18:15:01Z","updated_at":"2017-01-01T22:09:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenMW/openmw/pulls/1063","html_url":"https://github.com/OpenMW/openmw/pull/1063","diff_url":"https://github.com/OpenMW/openmw/pull/1063.diff","patch_url":"https://github.com/OpenMW/openmw/pull/1063.patch"},"body":"Fixes https://bugs.openmw.org/issues/3049, https://bugs.openmw.org/issues/2796 and https://bugs.openmw.org/issues/2680.\n\nAdds a new variable mDrainAndFortifyModifier to the health, magicka and fatigue stats, which is used to track the sum of drain and fortify modifiers, which are applied to the current values, rather than the modified values as they are now.\n\nThis new variable could be saved in saved games. Instead, right now when a game is loaded I set it to a value that would never be used to indicate that a saved game was just loaded and the variable should be updated to the correct value once without applying the modifiers.\n\nI also took out some unnecessary processing on dead actors. Otherwise the drained/fortified modifiers would be reversed on character death (since the effects were done), and show a positive health if the player opened the inventory during the death animation after dying from a drain effect.\n\nNote that if the code from this PR is used on an existing saved game, any drain and fortify effects should be removed first or else the stats won't be correct.\n"},"comment":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/comments/269921840","html_url":"https://github.com/OpenMW/openmw/pull/1063#issuecomment-269921840","issue_url":"https://api.github.com/repos/OpenMW/openmw/issues/1063","id":269921840,"user":{"login":"scrawl","id":720642,"avatar_url":"https://avatars.githubusercontent.com/u/720642?v=3","gravatar_id":"","url":"https://api.github.com/users/scrawl","html_url":"https://github.com/scrawl","followers_url":"https://api.github.com/users/scrawl/followers","following_url":"https://api.github.com/users/scrawl/following{/other_user}","gists_url":"https://api.github.com/users/scrawl/gists{/gist_id}","starred_url":"https://api.github.com/users/scrawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrawl/subscriptions","organizations_url":"https://api.github.com/users/scrawl/orgs","repos_url":"https://api.github.com/users/scrawl/repos","events_url":"https://api.github.com/users/scrawl/events{/privacy}","received_events_url":"https://api.github.com/users/scrawl/received_events","type":"User","site_admin":false},"created_at":"2017-01-01T22:09:34Z","updated_at":"2017-01-01T22:09:34Z","body":"There's a problem with the save repairing logic, I think. Won't work for actors in inactive cells, will it?\r\n1. load game (with format = old)\r\n2. stats in active cells get fixed, stats in inactive cells dont get fixed yet\r\n3. save game\r\n4. load game (with format = current)\r\n\r\nDo you think we could do the repairing pass within the esm loader?"}}
{"actor":{"display_login":"scrawl"}}