GmAction.go
328 Bytes
package action
import (
"pro2d/common/logger"
"pro2d/models"
"strconv"
)
type GmAction struct {
}
func (gm *GmAction) AddExp(role *models.RoleModel, properties map[string]interface{}) int {
logger.Debug(properties)
exp, _ := strconv.Atoi(properties["exp"].(string))
role.IncrPropertyChan("exp", int64(exp))
return 0
}