mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Adv 2.0 L4d reader flip: pet helpers off AdvCharacter to PetState
All ten helpers in adventure_pets.go now take PetState (or *PetState for petGrantXP) instead of *AdventureCharacter. mistyHousingHint takes raw NPC counters since Misty fields stay on AdvCharacter for a later phase. mistyReactivatePet returns bool; caller flips both stores. DeathTransitionParams gained Pet PetState so combat_bridge no longer touches the DB; arena caller loads PetState. PetState.HasPet() mirrors AdvCharacter's. petMidnightCheck loads PetState per char. L4 grep-empty exit criterion now holds for adventure_pets.go. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -116,13 +116,14 @@ func (p *AdventurePlugin) sendMorningDMs() {
|
||||
|
||||
// Pet arrival check (fires before normal morning DM)
|
||||
house, _ := loadHouseState(char.UserID)
|
||||
if petShouldArrive(&char, house) {
|
||||
pet, _ := loadPetState(char.UserID)
|
||||
if petShouldArrive(pet, house) {
|
||||
p.petArrivalDM(char.UserID)
|
||||
continue
|
||||
}
|
||||
|
||||
// Morning pet event
|
||||
petEvent := petMorningEvent(&char)
|
||||
petEvent := petMorningEvent(pet)
|
||||
if petEvent != "" {
|
||||
char.PetMorningDefense = true
|
||||
_ = saveAdvCharacter(&char)
|
||||
|
||||
Reference in New Issue
Block a user