邮件补偿
This commit is contained in:
parent
3c31586879
commit
8ee28c28e2
@ -350,6 +350,21 @@ func (p *Player) Login() {
|
|||||||
BaseMod := p.PlayMod.getBaseMod()
|
BaseMod := p.PlayMod.getBaseMod()
|
||||||
BaseMod.Login()
|
BaseMod.Login()
|
||||||
p.PlayMod.getCardMod().Login(G_GameLogicPtr.SeverInfo.OpenTime)
|
p.PlayMod.getCardMod().Login(G_GameLogicPtr.SeverInfo.OpenTime)
|
||||||
|
if p.PlayerBaseMod.Data.UserName == "388faebe29ffe56666a04ea22b902b0f" {
|
||||||
|
VarMod := p.PlayMod.getVarMod()
|
||||||
|
Mail1, _ := VarMod.GetVar(1)
|
||||||
|
if Mail1 != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
VarMod.SetVar(1, 1)
|
||||||
|
Items := make([]*item.Item, 0)
|
||||||
|
Items = append(Items, &item.Item{Id: item.ITEM_ENERGY_ID, Num: 200})
|
||||||
|
MailMod := p.PlayMod.getMailMod()
|
||||||
|
MailMod.Send("Test Players' Refund",
|
||||||
|
`Welcome back to our game!
|
||||||
|
Here comes your refund for your scene progress and payment in test version!
|
||||||
|
Have fun in new version!`, Items)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Player) Outline() {
|
func (p *Player) Outline() {
|
||||||
|
|||||||
@ -8,10 +8,10 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Var struct {
|
type Var struct {
|
||||||
DailyVar map[int]interface{}
|
DailyVar map[int]interface{}
|
||||||
WeeklyVar map[int]interface{}
|
WeeklyVar map[int]interface{}
|
||||||
MonthVar map[int]interface{}
|
MonthVar map[int]interface{}
|
||||||
|
Var map[int]interface{}
|
||||||
DailyResetTime int64
|
DailyResetTime int64
|
||||||
WeeklyResetTime int64
|
WeeklyResetTime int64
|
||||||
MonthResetTime int64
|
MonthResetTime int64
|
||||||
@ -61,3 +61,15 @@ func (v *Var) GetMonthVar(key int) (interface{}, error) {
|
|||||||
}
|
}
|
||||||
return val, nil
|
return val, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v *Var) SetVar(key int, value interface{}) {
|
||||||
|
v.Var[key] = value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *Var) GetVar(key int) (interface{}, error) {
|
||||||
|
val, ok := v.Var[key]
|
||||||
|
if !ok {
|
||||||
|
return nil, fmt.Errorf("key not exist")
|
||||||
|
}
|
||||||
|
return val, nil
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user