mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
fix(guild): implement alliance application toggle (#166)
Alliance applications were hardcoded to always-open. Add a `recruiting` column to guild_alliances and handle OperateJoint actions 0x06 (Allow) and 0x07 (Deny) confirmed via Wii U debug symbols. Only the parent guild leader can toggle the setting, matching the existing disband guard.
This commit is contained in:
@@ -304,13 +304,15 @@ type mockGuildRepo struct {
|
||||
deletedPostID uint32
|
||||
|
||||
// Alliance
|
||||
alliance *GuildAlliance
|
||||
getAllianceErr error
|
||||
createAllianceErr error
|
||||
deleteAllianceErr error
|
||||
removeAllyErr error
|
||||
deletedAllianceID uint32
|
||||
removedAllyArgs []uint32
|
||||
alliance *GuildAlliance
|
||||
getAllianceErr error
|
||||
createAllianceErr error
|
||||
deleteAllianceErr error
|
||||
removeAllyErr error
|
||||
setAllianceRecruitErr error
|
||||
deletedAllianceID uint32
|
||||
removedAllyArgs []uint32
|
||||
allianceRecruitingSet *bool
|
||||
|
||||
// Cooking
|
||||
meals []*GuildMeal
|
||||
@@ -454,6 +456,11 @@ func (m *mockGuildRepo) DeleteAlliance(id uint32) error {
|
||||
return m.deleteAllianceErr
|
||||
}
|
||||
|
||||
func (m *mockGuildRepo) SetAllianceRecruiting(_ uint32, recruiting bool) error {
|
||||
m.allianceRecruitingSet = &recruiting
|
||||
return m.setAllianceRecruitErr
|
||||
}
|
||||
|
||||
func (m *mockGuildRepo) RemoveGuildFromAlliance(allyID, guildID, sub1, sub2 uint32) error {
|
||||
m.removedAllyArgs = []uint32{allyID, guildID, sub1, sub2}
|
||||
return m.removeAllyErr
|
||||
|
||||
Reference in New Issue
Block a user