This commit is contained in:
hahwu 2026-03-09 11:29:18 +08:00
parent 7175dd3c78
commit 5b70a69ca1
3 changed files with 8 additions and 2 deletions

View File

@ -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{}{

View File

@ -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
} }

View File

@ -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) {