优化
This commit is contained in:
parent
7175dd3c78
commit
5b70a69ca1
@ -134,6 +134,7 @@ func ReqGmCommand_(player *Player, Command string) error {
|
|||||||
case "setSevenLoginActive":
|
case "setSevenLoginActive":
|
||||||
num, _ := strconv.Atoi(arg[1])
|
num, _ := strconv.Atoi(arg[1])
|
||||||
player.PlayMod.getSevenLoginMod().Active = num
|
player.PlayMod.getSevenLoginMod().Active = num
|
||||||
|
player.PushClientRes(player.PlayMod.getSevenLoginMod().BackData())
|
||||||
case "pay":
|
case "pay":
|
||||||
ChargeId, _ := strconv.Atoi(arg[1])
|
ChargeId, _ := strconv.Atoi(arg[1])
|
||||||
player.TeLog("pay", map[string]interface{}{
|
player.TeLog("pay", map[string]interface{}{
|
||||||
|
|||||||
@ -57,7 +57,11 @@ func (m *MailMgr) Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *MailMgr) AddMail(msg *msg.Msg) (interface{}, error) {
|
func (m *MailMgr) AddMail(msg *msg.Msg) (interface{}, error) {
|
||||||
ServerMail := msg.Extra.(*ServerMail)
|
ServerMail, ok := msg.Extra.(*ServerMail)
|
||||||
|
if !ok {
|
||||||
|
log.Error("AddMail error: invalid mail data")
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
m.list[ServerMail.Id] = ServerMail
|
m.list[ServerMail.Id] = ServerMail
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,7 +92,8 @@ func TestFixUserData(t *testing.T) {
|
|||||||
func TestRandInt(t *testing.T) {
|
func TestRandInt(t *testing.T) {
|
||||||
p1 := new(game.Player)
|
p1 := new(game.Player)
|
||||||
p1.InitPlayer("3625212")
|
p1.InitPlayer("3625212")
|
||||||
p1.Charge(122)
|
SevenMod := p1.GetSevenLoginMod()
|
||||||
|
SevenMod.BackData()
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEndless(t *testing.T) {
|
func TestEndless(t *testing.T) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user