Skip to content

Commit

Permalink
Finish guild chat implementation (#383)
Browse files Browse the repository at this point in the history
- Use guild chat icon and rename from "GSymbol"
- Don't show speech bubble for local guild chat
- Use correct chat colors for guild messages
  • Loading branch information
ethanmoffat authored Oct 23, 2024
1 parent 4d0562f commit e073abf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions EOLib/Domain/Chat/ChatActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public ChatActions(IChatRepository chatRepository,
ChatType.PM => ChatResult.HideSpeechBubble,
ChatType.Global => ChatResult.HideSpeechBubble,
ChatType.Admin => ChatResult.HideSpeechBubble,
ChatType.Guild => ChatResult.HideSpeechBubble,
ChatType.Announce => ChatResult.AdminAnnounce,
_ => ChatResult.Ok,
}, chat);
Expand Down Expand Up @@ -168,8 +169,7 @@ private void AddChatForLocalDisplay(ChatType chatType, string chat, string targe
_chatRepository.AllChat[ChatTab.Global].Add(new ChatData(ChatTab.Global, who, chat));
break;
case ChatType.Guild:
//todo: there are special cases here for guild chat that aren't handled
_chatRepository.AllChat[ChatTab.Group].Add(new ChatData(ChatTab.Group, who, chat));
_chatRepository.AllChat[ChatTab.Group].Add(new ChatData(ChatTab.Group, who, chat, ChatIcon.Guild));
break;
case ChatType.Party:
_chatRepository.AllChat[ChatTab.Local].Add(new ChatData(ChatTab.Local, who, chat, ChatIcon.PlayerPartyDark, ChatColor.PM, log: false));
Expand Down
2 changes: 1 addition & 1 deletion EOLib/Domain/Chat/ChatIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public enum ChatIcon
DownArrow,
UpArrow,
DotDotDotDot,
GSymbol,
Guild,
Skeleton,
Trophy,
Information,
Expand Down
2 changes: 1 addition & 1 deletion EOLib/PacketHandlers/Chat/GuildMessageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override bool HandlePacket(TalkRequestServerPacket packet)

protected override void PostChat(string name, string message)
{
var data = new ChatData(ChatTab.Group, name, message);
var data = new ChatData(ChatTab.Group, name, message, ChatIcon.Guild, ChatColor.PM);
_chatRepository.AllChat[ChatTab.Group].Add(data);
}
}
Expand Down

0 comments on commit e073abf

Please sign in to comment.