Necrosis CATA , WOLTK, TBC, Classic , Mastery, SOD

Necrosis CATA , WOLTK, TBC, Classic , Mastery, SOD

675k Downloads

[WotLK] fix SendChatMessage error in random dungeon Instance

simshi opened this issue ยท 1 comments

commented

Necrosis/Message.lua

Lines 29 to 39 in 4a5ee34

if (type == "WORLD") then
if UnitInRaid("player") then
-- send to all raid members
SendChatMessage(msg, "RAID")
elseif UnitInParty("player") then
-- send to party members
SendChatMessage(msg, "PARTY")
else
-- not in a group so lets use the 'say' channel
if (inInstance) then SendChatMessage(msg, "SAY") end
end

SendChatMessage by party errors with something like "not in a party", it can be fixed by below code:

		elseif IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
			SendChatMessage(msg, "INSTANCE_CHAT")
		elseif UnitInParty("player") then
			-- send to party members
			SendChatMessage(msg, "PARTY")
commented

thanks a lot , have fun