猫猫回礼奖励补发
This commit is contained in:
parent
0fbebc856e
commit
ea6eaa79a4
@ -163,7 +163,6 @@ func (p *Player) SendActivityMail2(items []*item.Item, mail_title, mail_content
|
|||||||
|
|
||||||
// 活动模块 零点更新
|
// 活动模块 零点更新
|
||||||
func (p *Player) ActivityZeroUpdate() {
|
func (p *Player) ActivityZeroUpdate() {
|
||||||
p.CatReturnGiftZeroUpdate()
|
|
||||||
p.ActivityLogin()
|
p.ActivityLogin()
|
||||||
type zeroHandler struct {
|
type zeroHandler struct {
|
||||||
actType int
|
actType int
|
||||||
@ -183,14 +182,7 @@ func (p *Player) ActivityZeroUpdate() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (p *Player) CatReturnGiftLogin() {
|
func (p *Player) CatReturnGiftLogin() {
|
||||||
activityInfo := p.GetActivityInfo(activity.ACT_TYPE_CAT_RETURN_GIFT)
|
p.CatReturnGiftZeroUpdate()
|
||||||
var aid int
|
|
||||||
var id int
|
|
||||||
if activityInfo != nil {
|
|
||||||
id = activityInfo.Id
|
|
||||||
aid = activityInfo.AId
|
|
||||||
}
|
|
||||||
p.GetCatReturnGiftMod().Login(id, aid)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 猫猫回礼0点更新
|
// 猫猫回礼0点更新
|
||||||
@ -209,8 +201,11 @@ func (p *Player) CatReturnGiftZeroUpdate() {
|
|||||||
items := make([]*item.Item, 0)
|
items := make([]*item.Item, 0)
|
||||||
if cfg != nil {
|
if cfg != nil {
|
||||||
for _, v := range cfg.RewardList {
|
for _, v := range cfg.RewardList {
|
||||||
if oldScore >= int(v.Score) && oldReward < int(v.Id) {
|
if oldScore >= int(v.Total) && oldReward < int(v.Id) {
|
||||||
items = append(items, item.MsgToItem(v.Reward)...)
|
items = append(items, item.MsgToItem(v.Reward)...)
|
||||||
|
if v.StarReward > 0 {
|
||||||
|
items = append(items, item.NewItem(item.ITEM_STAR_ID, GoUtil.FormatStarItemNum(int(v.StarReward), p.GetOrderFactor())))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -417,8 +417,8 @@ func (p *Player) ZeroUpdate(a []interface{}) {
|
|||||||
p.PlayroomBackData()
|
p.PlayroomBackData()
|
||||||
p.ChampionshipZeroUpdate()
|
p.ChampionshipZeroUpdate()
|
||||||
p.BackChampship()
|
p.BackChampship()
|
||||||
p.InitActivity()
|
// p.InitActivity()
|
||||||
p.ActivityZeroUpdate()
|
// p.ActivityZeroUpdate()
|
||||||
|
|
||||||
// 每日任务
|
// 每日任务
|
||||||
p.PlayMod.getDailyTaskMod().ZeroUpdate(p.GetPlayerBaseMod().GetLevel(), p.GetOrderFactor(), p.GetDailyTaskActivityId())
|
p.PlayMod.getDailyTaskMod().ZeroUpdate(p.GetPlayerBaseMod().GetLevel(), p.GetOrderFactor(), p.GetDailyTaskActivityId())
|
||||||
@ -474,7 +474,7 @@ func (p *Player) Login() {
|
|||||||
p.LimitedTimePlayroomTrigger() // playroom数值变化
|
p.LimitedTimePlayroomTrigger() // playroom数值变化
|
||||||
LimitedTimePlayroomWorkTrigger(p) // playroom打工
|
LimitedTimePlayroomWorkTrigger(p) // playroom打工
|
||||||
LimitedTimeEnergyAdd(p) // 能量定时处理
|
LimitedTimeEnergyAdd(p) // 能量定时处理
|
||||||
p.ActivityLogin() // 活动登录
|
//p.ActivityLogin() // 活动登录
|
||||||
p.Compensation()
|
p.Compensation()
|
||||||
SyncMailMsg(p) // 同步邮件
|
SyncMailMsg(p) // 同步邮件
|
||||||
Duration := BaseMod.Login()
|
Duration := BaseMod.Login()
|
||||||
|
|||||||
11
src/server/unit_test/cat_return_gift_test.go
Normal file
11
src/server/unit_test/cat_return_gift_test.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package unit
|
||||||
|
|
||||||
|
import "testing"
|
||||||
|
|
||||||
|
func TestCatReturnGift(t *testing.T) {
|
||||||
|
player := getTestPlayer()
|
||||||
|
player.GetCatReturnGiftMod().AddScore(100)
|
||||||
|
player.GetCatReturnGiftMod().AId = 1776168200
|
||||||
|
player.GetCatReturnGiftMod().Id = 26
|
||||||
|
player.CatReturnGiftZeroUpdate()
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user