This commit is contained in:
shoopea 2020-01-26 15:08:00 +08:00
parent fa005d77d4
commit 23bb28fec5
3 changed files with 135 additions and 5 deletions

View File

@ -15,7 +15,7 @@ import (
func startCron() *cron.Cron { func startCron() *cron.Cron {
c := cron.New(cron.WithLocation(time.UTC)) c := cron.New(cron.WithLocation(time.UTC))
c.AddFunc("15 7,15,23 * * *", cronSendWarReport) c.AddFunc("15 7,15,23 * * *", cronSendWarReport)
c.AddFunc("59 6,14,22 * * *", cronSetDef) c.AddFunc("58 6,14,22 * * *", cronSetDef)
c.AddFunc("02 1,3,5,9,11,13,17,19,21 * * *", cronGetHammerTime) c.AddFunc("02 1,3,5,9,11,13,17,19,21 * * *", cronGetHammerTime)
c.AddFunc("10 7,15,23 * * *", cronGetHammerTime) c.AddFunc("10 7,15,23 * * *", cronGetHammerTime)
c.AddFunc("13 3,7,11,15,19,23 * * *", cronTribute) c.AddFunc("13 3,7,11,15,19,23 * * *", cronTribute)

View File

@ -5490,7 +5490,53 @@
"auction": "true", "auction": "true",
"names": [ "names": [
"Guisarme" "Guisarme"
] ],
"craft": {
"cmd": "/craft_w95",
"mana": 800,
"items": [
{
"item": "r95",
"quantity": 1
},
{
"item": "k95",
"quantity": 6
},
{
"item": "23",
"quantity": 111
},
{
"item": "14",
"quantity": 92
},
{
"item": "27",
"quantity": 39
},
{
"item": "18",
"quantity": 9
},
{
"item": "32",
"quantity": 7
},
{
"item": "36",
"quantity": 3
},
{
"item": "38",
"quantity": 3
},
{
"item": "15"
,"quantity": 3
}
]
}
}, },
{ {
"item_type": "item_other", "item_type": "item_other",
@ -5500,7 +5546,49 @@
"auction": "true", "auction": "true",
"names": [ "names": [
"Meteor Bow" "Meteor Bow"
] ],
"craft": {
"cmd": "/craft_w96",
"mana": 800,
"items": [
{
"item": "r96",
"quantity": 1
},
{
"item": "k96",
"quantity": 5
},
{
"item": "23",
"quantity": 103
},
{
"item": "14",
"quantity": 97
},
{
"item": "32",
"quantity": 21
},
{
"item": "18",
"quantity": 7
},
{
"item": "36",
"quantity": 5
},
{
"item": "17",
"quantity": 3
},
{
"item": "38",
"quantity": 2
}
]
}
}, },
{ {
"item_type": "item_other", "item_type": "item_other",
@ -5510,7 +5598,49 @@
"auction": "true", "auction": "true",
"names": [ "names": [
"Nightfall Bow" "Nightfall Bow"
] ],
"craft": {
"cmd": "/craft_w97",
"mana": 800,
"items": [
{
"item": "r97",
"quantity": 1
},
{
"item": "k97",
"quantity": 5
},
{
"item": "23",
"quantity": 103
},
{
"item": "14",
"quantity": 97
},
{
"item": "27",
"quantity": 91
},
{
"item": "18",
"quantity": 7
},
{
"item": "36",
"quantity": 5
},
{
"item": "15",
"quantity": 3
},
{
"item": "38",
"quantity": 2
}
]
}
}, },
{ {
"item_type": "item_other", "item_type": "item_other",

View File

@ -87,7 +87,7 @@ func getObjItem(objID64 int64) (*ChatWarsItem, error) {
defer muxObjItem.RUnlock() defer muxObjItem.RUnlock()
if id, ok := cacheObjItemId[objID64]; ok { if id, ok := cacheObjItemId[objID64]; ok {
//log.Printf("Matching item name %s with %s.\n", name, obj.Name) //log.Printf("Matching item name %s with %s.\n", name, obj.Name)
return &objItems[id], nil return objItems[id], nil
} else { } else {
return nil, errors.New("Item not found.") return nil, errors.New("Item not found.")
} }