[FIXED] Does not recognize the broadcasts sent as it's own, removed API function
2 posters
Page 1 of 1
[FIXED] Does not recognize the broadcasts sent as it's own, removed API function
When playing a local sound the sound gets played twice due to the program not recognizing it was the sender of the sound, effectively sending it twice
- Code:
# HG changeset patch
# User arekku
# Date 1397769599 -7200
# Thu Apr 17 23:19:59 2014 +0200
# Node ID 2a0bcb432097c58289b58df70ca30183507fe50a
# Parent a58c41890b0b81eac9a80b69a502209ecf2be935
Fix for program not recognizing the messages it sent on it's own.
Fix for API change, GetNumRaidMembers() does not exist anymore.
diff -r a58c41890b0b -r 2a0bcb432097 totalRP2/totalRP2_Communication.lua
--- a/totalRP2/totalRP2_Communication.lua Thu Apr 17 22:45:10 2014 +0200
+++ b/totalRP2/totalRP2_Communication.lua Thu Apr 17 23:19:59 2014 +0200
@@ -59,9 +59,9 @@
TRP2_Error("Internal Error : Tentative de TRP2_SecureSendAddonMessageGroup avec une taille de "..taille.."!\nEnvoi annulé !");
return;
end
- if GetNumRaidMembers() > 0 then
+ if IsInRaid() then
ChatThrottleLib:SendAddonMessage(prior,TRP2_COMM_PREFIX,Prefixe..TRP2_ReservedChar..Message, "RAID");
- elseif GetNumPartyMembers() > 0 then
+ elseif GetNumGroupMembers() > 0 then
ChatThrottleLib:SendAddonMessage(prior,TRP2_COMM_PREFIX,Prefixe..TRP2_ReservedChar..Message, "PARTY");
end
end
@@ -83,7 +83,7 @@
end
function TRP2_ReceiveMessageChannel(message,sender)
- if sender == TRP2_Joueur or TRP2_EstIgnore(sender) or not TRP2_GetConfigValueFor("ActivateExchange",true) then
+ if sender == TRP2_ChatName or TRP2_EstIgnore(sender) or not TRP2_GetConfigValueFor("ActivateExchange",true) then
return;
end
local messageTab = TRP2_fetchInformations(message);
diff -r a58c41890b0b -r 2a0bcb432097 totalRP2/totalRP2_VariablesGlobales.lua
--- a/totalRP2/totalRP2_VariablesGlobales.lua Thu Apr 17 22:45:10 2014 +0200
+++ b/totalRP2/totalRP2_VariablesGlobales.lua Thu Apr 17 23:19:59 2014 +0200
@@ -14,6 +14,7 @@
BINDING_HEADER_TRP2 = TRP2_addonname;
TRP2_version = "1025";
TRP2_Joueur = UnitName("player");
+TRP2_ChatName = UnitName("player",false) .. "-" .. string.gsub(GetRealmName(),"[- ]","") -- Figure out what our chat lines looks like in broadcast/chat channels
TRP2_Royaume = GetRealmName();
TRP2_locRace,TRP2_enRace = UnitRace("player");
TRP2_locClass,TRP2_enClass = UnitClass("player");
arekku- Posts : 14
Join date : 2014-02-17
Re: [FIXED] Does not recognize the broadcasts sent as it's own, removed API function
Thank you for sharing this. I will look into fixing that issue for version 1.026. It must have something to do with the new naming system with connected realm.
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|