package qznn

import "github.com/sirupsen/logrus"

func (p *Game) EventInfo(playerID int32, eventName, msg string) {
	playerItem, exists := p.PlayerMap[playerID]
	if !exists {
		logrus.Infof("[不存在:%d][%s]%s", playerID, eventName, msg)
	} else {
		if playerItem.RoomID > 0 {
			room := p.RoomMap[playerItem.RoomID]
			logrus.Infof("[%d-%d][%s]%s", room.ID, playerItem.ID, eventName, msg)
		} else {
			logrus.Infof("[%d][%s]%s", playerItem.ID, eventName, msg)
		}
	}
}
