The-Sickness / Incoming-BG

AN Interface GUI for calling out Inc's by clicking a button
1 stars 0 forks source link

Other players are complaining about the full zone being printed in an incoming call out. #2

Closed Olioliolioo closed 1 year ago

Olioliolioo commented 1 year ago

Temporary fixes-- remove GetRealZoneText() from functions :

local function AllClearButtonOnClick() local location = GetSubZoneText()

-- Check if location is in the defined battleground locations
if not location then
    print("You are not in a BattleGround.")
    return
end

local message = buttonMessages.allClear[buttonMessageIndices.allClear] .. " at " .. location
SendChatMessage(message, "INSTANCE_CHAT")

end allClearButton:SetScript("OnClick", AllClearButtonOnClick)

-- Function to handle the Send More button click event local function SendMoreButtonOnClick() local location = GetSubZoneText()

-- Check if location is in the defined battleground locations
if not location then
    print("You are not in a BattleGround.")
    return
end

local message = buttonMessages.sendMore[buttonMessageIndices.sendMore] .. " at " .. location
SendChatMessage(message, "INSTANCE_CHAT")

end sendMoreButton:SetScript("OnClick", SendMoreButtonOnClick)

-- Function to handle the INC button click event local function IncButtonOnClick() local location = GetSubZoneText()

-- Check if location is in the defined battleground locations
if not location then
    print("You are not in a BattleGround.")
    return
end

local message = buttonMessages.inc[buttonMessageIndices.inc] .. " at " .. location
SendChatMessage(message, "INSTANCE_CHAT")

end incButton:SetScript("OnClick", IncButtonOnClick)

-- Register the slash command SLASH_INC1 = "/inc" SlashCmdList["INC"] = function() if IncCallout:IsShown() then IncCallout:Hide() end end

The-Sickness commented 1 year ago

Ok. I didn't see that as an issue. But I will correct if folks don't like the message that is displayed.

The-Sickness commented 1 year ago

Code has been fixed