facility_up.go 552 B

12345678910111213141516171819202122232425262728
  1. package event
  2. import (
  3. eventBase "f1-game/internal/event/base"
  4. nameEvent "f1-game/internal/name/event"
  5. "f1-game/internal/pb"
  6. )
  7. type FacilityUp struct {
  8. eventBase.DataEvent[*pb.I32I32]
  9. }
  10. func NewFacilityUp(playerID int64, facilityID, level int32) *FacilityUp {
  11. return &FacilityUp{
  12. DataEvent: eventBase.NewDataEvent(playerID, nameEvent.Lord_FacilityUp, &pb.I32I32{
  13. Key: facilityID,
  14. Value: level,
  15. }),
  16. }
  17. }
  18. func (p *FacilityUp) FacilityID() int32 {
  19. return p.Data().Key
  20. }
  21. func (p *FacilityUp) Level() int32 {
  22. return p.Data().Value
  23. }