Skip to content

Commit

Permalink
Use appropriate guild rank defaults. Prevents access to guild managem…
Browse files Browse the repository at this point in the history
…ent menu items when joining a newly created guild.
  • Loading branch information
ethanmoffat committed Oct 27, 2024
1 parent c8c6879 commit 0f2969d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion EOLib/Domain/Interact/Guild/GuildActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public void LeaveGuild()
_characterRepository.MainCharacter = _characterRepository.MainCharacter
.WithGuildTag(" ")
.WithGuildName(string.Empty)
.WithGuildRank(string.Empty);
.WithGuildRank(string.Empty)
.WithGuildRankID(0);
}

public void RequestToCreateGuild(string guildTag, string guildName, string guildDescription)
Expand Down
3 changes: 2 additions & 1 deletion EOLib/PacketHandlers/Guild/GuildAgreeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public override bool HandlePacket(GuildAgreeServerPacket packet)
_characterRepository.MainCharacter = _characterRepository.MainCharacter
.WithGuildTag(packet.GuildTag.ToUpper())
.WithGuildName(packet.GuildName.Capitalize())
.WithGuildRank(packet.RankName.Capitalize());
.WithGuildRank(packet.RankName.Capitalize())
.WithGuildRankID(9);

foreach (var notifier in _guildNotifiers)
notifier.NotifyAcceptedIntoGuild();
Expand Down
3 changes: 2 additions & 1 deletion EOLib/PacketHandlers/Guild/GuildKickHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public override bool HandlePacket(GuildKickServerPacket packet)
_characterRepository.MainCharacter = _characterRepository.MainCharacter
.WithGuildTag(" ")
.WithGuildName(string.Empty)
.WithGuildRank(string.Empty);
.WithGuildRank(string.Empty)
.WithGuildRankID(0);
return true;
}
}
Expand Down

0 comments on commit 0f2969d

Please sign in to comment.