mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +00:00
Adv 2.0 L4f: render/twinbee reader-port off AdvCharacter to dndLevelForUser
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,8 @@ var twinBeeWeights = []twinBeeActionWeight{
|
||||
}
|
||||
|
||||
// twinBeeMaxTier returns the highest tier TwinBee should visit,
|
||||
// based on the best player's combined adventure level.
|
||||
// based on the best player's combined adventure level. Combat component
|
||||
// reads from D&D level (post-L4f) instead of legacy combat level.
|
||||
func twinBeeMaxTier() int {
|
||||
chars, err := loadAllAdvCharacters()
|
||||
if err != nil || len(chars) == 0 {
|
||||
@@ -39,7 +40,7 @@ func twinBeeMaxTier() int {
|
||||
if !c.Alive {
|
||||
continue
|
||||
}
|
||||
combined := c.CombatLevel + c.MiningSkill + c.ForagingSkill + c.FishingSkill
|
||||
combined := dndLevelForUser(c.UserID) + c.MiningSkill + c.ForagingSkill + c.FishingSkill
|
||||
if combined > bestLevel {
|
||||
bestLevel = combined
|
||||
}
|
||||
@@ -282,7 +283,7 @@ func (p *AdventurePlugin) distributeTwinBeeRewards(result *TwinBeeResult) TwinBe
|
||||
weight := 4 // minimum (level 1 in all 4 skills)
|
||||
for _, c := range chars {
|
||||
if c.UserID == uid {
|
||||
weight = c.CombatLevel + c.MiningSkill + c.ForagingSkill + c.FishingSkill
|
||||
weight = dndLevelForUser(c.UserID) + c.MiningSkill + c.ForagingSkill + c.FishingSkill
|
||||
if weight < 4 {
|
||||
weight = 4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user