mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +00:00
Adv 2.0 Phase L2 step 6: arena render reads → DnDCharacter
renderArenaStreakEntry now takes *DnDCharacter and reads c.Level instead of AdventureCharacter.CombatLevel. renderArenaStatus drops its unused *AdventureCharacter arg. Callers in handleArenaMenu / handleArenaStatus updated; menu path uses ensureCharForDnDCmd to fetch (or auto-migrate) the sheet. Tests switched accordingly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,11 @@ func (p *AdventurePlugin) handleArenaMenu(ctx MessageContext) error {
|
||||
|
||||
stats := loadArenaPersonalStats(ctx.Sender)
|
||||
monster := arenaGetMonster(1, 1)
|
||||
text := renderArenaStreakEntry(char, stats, tier, monster)
|
||||
dndChar, err := p.ensureCharForDnDCmd(ctx.Sender, char)
|
||||
if err != nil {
|
||||
return p.SendDM(ctx.Sender, "Failed to load character sheet.")
|
||||
}
|
||||
text := renderArenaStreakEntry(dndChar, stats, tier, monster)
|
||||
return p.SendDM(ctx.Sender, text)
|
||||
}
|
||||
|
||||
@@ -297,8 +301,7 @@ func (p *AdventurePlugin) handleArenaBail(ctx MessageContext) error {
|
||||
}
|
||||
|
||||
func (p *AdventurePlugin) handleArenaStatus(ctx MessageContext) error {
|
||||
char, err := loadAdvCharacter(ctx.Sender)
|
||||
if err != nil {
|
||||
if _, err := loadAdvCharacter(ctx.Sender); err != nil {
|
||||
return p.SendDM(ctx.Sender, "No adventurer found.")
|
||||
}
|
||||
|
||||
@@ -307,7 +310,7 @@ func (p *AdventurePlugin) handleArenaStatus(ctx MessageContext) error {
|
||||
return p.SendDM(ctx.Sender, "No active arena run. Start one with `!arena`.")
|
||||
}
|
||||
|
||||
return p.SendDM(ctx.Sender, renderArenaStatus(run, char))
|
||||
return p.SendDM(ctx.Sender, renderArenaStatus(run))
|
||||
}
|
||||
|
||||
func (p *AdventurePlugin) handleArenaStats(ctx MessageContext) error {
|
||||
|
||||
Reference in New Issue
Block a user