azerothcore/mod-eluna

Unit:SendUnitSay does not work

Closed this issue · 2 comments

Hi,

I am using the docker way of setting up Azerothcore with the current version and installed this eluna module, also with current version.
Everything seems to be working great, except that Unit:SendUnitSay() seems to be not working.

I have this example script:


local function OnPlayerResurrected(event, player)
    local creaturesInRange = player:GetCreaturesInRange(200, 29445)
    for key, unit in pairs(creaturesInRange) do
        if (unit:GetName() == "Thorim") then
            unit:SendUnitYell("Wie kann das sein?!", 0)
            unit:SendUnitSay("Wie kann das sein?!", 0)
            unit:SendUnitSay("Offenbar seid ihr wohl stärker als ich dachte.", 0)
            unit:SendUnitWhisper("Offenbar seid ihr wohl stärker als ich dachte.", 0, player)
            unit:SendUnitWhisper("Wohlmöglich könntet ihr mir bei einer Sache helfen?", 0, player)
            unit:SendUnitWhisper("Keine Zeit für Fragen! Wenn ihr bereit seid, müsst ihr mich bloß annicken.", 0, player)
        end
    end
end

RegisterPlayerEvent(PLAYER_EVENT_ON_RESURRECT, OnPlayerResurrected)

As you can see in this screenshot, yelling and whispering works, but say does not.

image

I didn't find anything related to this, so that's why I am posting this.

BR & Thanks in advance

Thanks for the issue.
I can not reproduce this.

local function command( event, player, command, chathandler )
    player:SendUnitSay('Player says this.', 0)
    if player:GetSelection() then
        player:GetSelection():SendUnitSay('Selection says this.', 0)
    else
        player:SendUnitSay('No Selection', 0)
    end
end
RegisterPlayerEvent(42, command)

Using the above script and doing .tele durotar.
Target the goblin Rezlak and type .asdf or any non-existing command.
See how it is printed in chat as well as in a say-bubble.
Target the Elder-Mottled Boar nearby and use .asdf again.
The say is only printed in chat.

Cannot reproduce either:
image