azerothcore / mod-eluna

Eluna Lua Engine © for WoW Emulators
https://elunaluaengine.github.io/
GNU General Public License v3.0
96 stars 126 forks source link

feat: add OnBattlegroundDesertion hook #146

Closed 0xCiBeR closed 1 year ago

0xCiBeR commented 1 year ago

Added OnBattlegroundDesertion hook.

Sample Lua code to test:

local function onDeserter(event, player, type)
    player:SendAreaTriggerMessage( "It works!" )
    print("it works")
end
RegisterPlayerEvent(57, onDeserter)
0xCiBeR commented 1 year ago

Hey @r-o-b-o-t-o just leaving a ping here so you can check the PR when you have the time.. Thanks!

0xCiBeR commented 1 year ago

Hey! Is there anything else required on my side to merge the PR? Seems tests passed fine :)

55Honey commented 1 year ago

Please be patient until it's reviewed. I can't think of anything missing from a quick glance.

r-o-b-o-t-o commented 1 year ago

Thanks for the PR!

Sorry for taking this long, I needed to remove another player hook first. This also resulted in your event being changed from 59 to 57. I edited your sample Lua code in your first message.