Core/Chat: Fixed addon chat messages using C_ChatInfo.SendAddonMessageLogged
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user