Core/Chat: Fixed addon chat messages using C_ChatInfo.SendAddonMessageLogged

This commit is contained in:
hondacrx
2019-01-11 18:01:10 -05:00
parent 4cad206647
commit b7a6caf342
5 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -659,7 +659,7 @@ namespace Game.Chat
SendToAll(new ChannelSayBuilder(this, lang, what, guid), !playerInfo.IsModerator() ? guid : ObjectGuid.Empty);
}
public void AddonSay(ObjectGuid guid, string prefix, string what)
public void AddonSay(ObjectGuid guid, string prefix, string what, bool isLogged)
{
if (what.IsEmpty())
return;
@@ -681,7 +681,7 @@ namespace Game.Chat
return;
}
SendToAllWithAddon(new ChannelWhisperBuilder(this, Language.Addon, what, prefix, guid), prefix, !playerInfo.IsModerator() ? guid : ObjectGuid.Empty);
SendToAllWithAddon(new ChannelWhisperBuilder(this, isLogged ? Language.AddonLogged : Language.Addon, what, prefix, guid), prefix, !playerInfo.IsModerator() ? guid : ObjectGuid.Empty);
}
public void Invite(Player player, string newname)
@@ -151,10 +151,10 @@ namespace Game.Chat
ChatPkt packet = new ChatPkt();
Player player = Global.ObjAccessor.FindConnectedPlayer(_guid);
if (player)
packet.Initialize(ChatMsg.Channel, Language.Addon, player, player, _what, 0, _source.GetName(localeIdx), LocaleConstant.enUS, _prefix);
packet.Initialize(ChatMsg.Channel, _lang, player, player, _what, 0, _source.GetName(localeIdx), LocaleConstant.enUS, _prefix);
else
{
packet.Initialize(ChatMsg.Channel, Language.Addon, null, null, _what, 0, _source.GetName(localeIdx), LocaleConstant.enUS, _prefix);
packet.Initialize(ChatMsg.Channel, _lang, null, null, _what, 0, _source.GetName(localeIdx), LocaleConstant.enUS, _prefix);
packet.SenderGUID = _guid;
packet.TargetGUID = _guid;
}