Change placement of PLAYER_EVENT_ON_KILLED_BY_CREATURE core hook #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🍰 Pullrequest
Placement was missing some causes of death. Due to new placement added check to make sure that player is the unit hitting the hook not an NPC
Proof
-User reported issue
Issues
How2Test
User reported that prior to movement if you wrote a script like the following:
local function PlayerDeath(event, killer, killed)
SendWorldMessage("|r Hardcore - Player: " .. killed:GetName() .. "|r got killed by Creature: " .. killer:GetName() .. "|r - with Level:" .. killed:GetLevel() .."")
end
RegisterPlayerEvent(8, PlayerDeath)
and then died to ticking damage, example was given for NPC https://www.wowhead.com/wotlk/npc=3203/fizzle-darkstorm and spell casted by him https://www.wowhead.com/wotlk/spell=7290/soul-siphon and if death occurred due to this it would not fire the event. After movement and guard checks the hook now fires when death is from that damage.
Todo / Checklist