Added a method to get the value of whether an event's broadcasting di…#946
Added a method to get the value of whether an event's broadcasting di…#946asherkin merged 2 commits intoalliedmodders:masterfrom OkyHp:master
Conversation
|
This information is already included in the callback arguments - what are you doing that needs this info from the event handle? |
|
There is one problem: in another plugin, the notification for the event is disabled, but in another plugin, in the same event, it returns a different value when checked. |
asherkin
left a comment
There was a problem hiding this comment.
Thanks - that is a pretty annoying limitation of the param on the pre-hook, and something we'll need to document.
The core of this is fairly good, but I've left a couple of small inlines for changes before we can get this merged.
core/smn_events.cpp
Outdated
| {"Event.GetInt", sm_GetEventInt}, | ||
| {"Event.GetFloat", sm_GetEventFloat}, | ||
| {"Event.GetString", sm_GetEventString}, | ||
| {"Event.BroadcastDisabled.get", sm_GetEventBroadcast}, |
There was a problem hiding this comment.
Could you move this down under Event.BroadcastDisabled.set please. It's more readable to keep the properties together.
plugins/include/events.inc
Outdated
| * @return The boolean value of the whether an event's broadcasting disabled. | ||
| * @error Invalid Handle. | ||
| */ | ||
| native bool GetEventBroadcast(Handle event); No newline at end of file |
There was a problem hiding this comment.
We're trying to avoid adding any more "legacy" API where possible, so could you remove this one and keep only the MethodMap property.
|
Thanks for the contribution! |
…sabled or not