42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
package comm
|
|
|
|
import "go_dreamfactory/pb"
|
|
|
|
/*
|
|
业务模块 对外接口定义处
|
|
*/
|
|
|
|
type (
|
|
//邮件业务模块对外接口定义 提供给其他模块使用的
|
|
Imail interface {
|
|
CreateNewMail(uId string)
|
|
}
|
|
//道具背包接口
|
|
IItems interface {
|
|
//查询用户背包物品数量
|
|
QueryUserPackItemAmount(uId string, itemid int32) (amount uint32)
|
|
//查询用户背包多个物品数量
|
|
QueryUserPackItemsAmount(uId string, itemid ...int32) (result map[int32]uint32)
|
|
///添加单个物品到背包 (可以加物品和减物品)
|
|
AddItemToUserPack(uId string, itemid, addnum int32) (code pb.ErrorCode)
|
|
///添加多个物品到背包 (可以加物品和减物品)
|
|
AddItemsToUserPack(uId string, items map[int32]int32) (code pb.ErrorCode)
|
|
}
|
|
|
|
//英雄
|
|
IHero interface {
|
|
// 获取英雄
|
|
// heroId 英雄ID
|
|
GetHero(heroId string) (*pb.DB_HeroData, pb.ErrorCode)
|
|
// 佩戴装备
|
|
UpdateEquipment(hero *pb.DB_HeroData, equip []*pb.DB_Equipment) pb.ErrorCode
|
|
}
|
|
|
|
//玩家
|
|
IUser interface {
|
|
//获取玩家英雄列表
|
|
//uid 玩家ID
|
|
GetHeroList(uid string) []*pb.DB_HeroData
|
|
}
|
|
)
|