fix bug with village url

This commit is contained in:
Dawid Wysokiński 2020-06-06 14:59:11 +02:00 committed by Kichiyaki
parent 79feaeff04
commit f6076f02d2
3 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ type handler struct {
api *sdk.SDK
}
func AttachHandlers(c *cron.Cron, cfg Config) {
func Attach(c *cron.Cron, cfg Config) {
h := &handler{
since: time.Now(),
serverRepo: cfg.ServerRepo,

View File

@ -50,7 +50,7 @@ func newMessageData(cfg newMessageDataConfig) messageData {
cfg.ennoblement.Village.Name,
cfg.ennoblement.Village.X,
cfg.ennoblement.Village.Y)
data.villageURL = utils.FormatVillageURL(cfg.world, cfg.host, cfg.ennoblement.VillageID)
data.villageURL = utils.FormatVillageURL(cfg.world, cfg.host, cfg.ennoblement.Village.ID)
}
if !isPlayerNil(cfg.ennoblement.OldOwner) {
data.oldOwnerName = cfg.ennoblement.OldOwner.Name

View File

@ -66,7 +66,7 @@ func main() {
c := cron.New(cron.WithChain(
cron.SkipIfStillRunning(cron.VerbosePrintfLogger(log.New(os.Stdout, "cron: ", log.LstdFlags))),
))
_cron.AttachHandlers(c, _cron.Config{
_cron.Attach(c, _cron.Config{
ServerRepo: serverRepo,
TribeRepo: tribeRepo,
Discord: sess,