-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Kick Member; fixup Guild Accept (#386)
* Add overload to EOMessageBoxFactory for dialog resource ID, prepend, and append data. Use for guild create/join dialog messages. * Fix casing for guild display * Implement Guild Remove action in GuildDialog * More complete handling for accepting member into guild * Use Capitalize() extension method in more places * Use Capitalize method in even more places
- Loading branch information
1 parent
e486caa
commit 8deaf27
Showing
16 changed files
with
207 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace EOLib.Extensions | ||
{ | ||
public static class StringExtensions | ||
{ | ||
public static string Capitalize(this string str) | ||
{ | ||
if (string.IsNullOrWhiteSpace(str)) | ||
return str; | ||
|
||
if (str.Length == 1) | ||
return str.ToUpperInvariant(); | ||
|
||
return char.ToUpperInvariant(str[0]) + str.Substring(1).ToLowerInvariant(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using AutomaticTypeMapper; | ||
using EOLib.Domain.Character; | ||
using EOLib.Domain.Login; | ||
using EOLib.Net.Handlers; | ||
using Moffat.EndlessOnline.SDK.Protocol.Net; | ||
using Moffat.EndlessOnline.SDK.Protocol.Net.Server; | ||
|
||
namespace EOLib.PacketHandlers.Guild | ||
{ | ||
[AutoMappedType] | ||
|
||
public class GuildKickHandler : InGameOnlyPacketHandler<GuildKickServerPacket> | ||
{ | ||
private readonly ICharacterRepository _characterRepository; | ||
|
||
public override PacketFamily Family => PacketFamily.Guild; | ||
|
||
public override PacketAction Action => PacketAction.Kick; | ||
|
||
public GuildKickHandler(IPlayerInfoProvider playerInfoProvider, | ||
ICharacterRepository characterRepository) | ||
: base(playerInfoProvider) | ||
{ | ||
_characterRepository = characterRepository; | ||
} | ||
|
||
public override bool HandlePacket(GuildKickServerPacket packet) | ||
{ | ||
_characterRepository.MainCharacter = _characterRepository.MainCharacter | ||
.WithGuildTag(" ") | ||
.WithGuildName(string.Empty) | ||
.WithGuildRank(string.Empty); | ||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.