-
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 'Set Member Rank' and 'Update Guild Ranks' functions in Gui…
…ldDialog (#388) * Reorder GuildReply replycode handlers to match integer ids; stub out IDs missing from eoserv with todo action items * Handle setting GuildRankID during login * Implement set member rank and update rank list functions in GuildDialog
- Loading branch information
1 parent
8deaf27
commit efde12a
Showing
12 changed files
with
376 additions
and
77 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,32 @@ | ||
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 GuildAcceptHandler : InGameOnlyPacketHandler<GuildAcceptServerPacket> | ||
{ | ||
private readonly ICharacterRepository _characterRepository; | ||
|
||
public override PacketFamily Family => PacketFamily.Guild; | ||
|
||
public override PacketAction Action => PacketAction.Accept; | ||
|
||
public GuildAcceptHandler(IPlayerInfoProvider playerInfoProvider, | ||
ICharacterRepository characterRepository) | ||
: base(playerInfoProvider) | ||
{ | ||
_characterRepository = characterRepository; | ||
} | ||
|
||
public override bool HandlePacket(GuildAcceptServerPacket packet) | ||
{ | ||
_characterRepository.MainCharacter = _characterRepository.MainCharacter.WithGuildRankID(packet.Rank); | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Collections.Generic; | ||
using AutomaticTypeMapper; | ||
using EOLib.Domain.Login; | ||
using EOLib.Domain.Notifiers; | ||
using EOLib.Net.Handlers; | ||
using Moffat.EndlessOnline.SDK.Protocol.Net; | ||
using Moffat.EndlessOnline.SDK.Protocol.Net.Server; | ||
|
||
namespace EOLib.PacketHandlers.Guild | ||
{ | ||
[AutoMappedType] | ||
public class GuildRankHandler : InGameOnlyPacketHandler<GuildRankServerPacket> | ||
{ | ||
private readonly IEnumerable<IGuildNotifier> _guildNotifiers; | ||
|
||
public override PacketFamily Family => PacketFamily.Guild; | ||
|
||
public override PacketAction Action => PacketAction.Rank; | ||
|
||
public GuildRankHandler(IPlayerInfoProvider playerInfoProvider, | ||
IEnumerable<IGuildNotifier> guildNotifiers) | ||
: base(playerInfoProvider) | ||
{ | ||
_guildNotifiers = guildNotifiers; | ||
} | ||
|
||
public override bool HandlePacket(GuildRankServerPacket packet) | ||
{ | ||
foreach (var notifier in _guildNotifiers) | ||
notifier.NotifyRanks(packet.Ranks); | ||
|
||
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
Oops, something went wrong.