Files
bl/logic/controller/gold_exp.go

24 lines
670 B
Go
Raw Normal View History

package controller
import (
"blazing/common/socket/errorcode"
"blazing/logic/service/item"
"blazing/logic/service/player"
)
func (h Controller) PlayerGoldCount(data *item.GoldOnlineRemainInboundInfo, c *player.Player) (result *item.GoldOnlineRemainOutboundInfo, err errorcode.ErrorCode) {
return &item.GoldOnlineRemainOutboundInfo{
GoldNumber: c.User.GetGold(uint(c.Info.UserID)),
Coin: c.Info.Coins,
}, 0
}
func (h Controller) PlayerExp(data *item.ExpTotalRemainInboundInfo, c *player.Player) (result *item.ExpTotalRemainOutboundInfo, err errorcode.ErrorCode) {
return &item.ExpTotalRemainOutboundInfo{
TotalExp: uint32(c.Info.ExpPool),
}, 0
}