111 lines
3.5 KiB
Go
111 lines
3.5 KiB
Go
package comm
|
|
|
|
import "go_dreamfactory/lego/core"
|
|
|
|
type LogHandleType string
|
|
|
|
const (
|
|
LogHandleType_Insert LogHandleType = "insert"
|
|
LogHandleType_Update LogHandleType = "update"
|
|
LogHandleType_Delete LogHandleType = "delete"
|
|
)
|
|
|
|
const (
|
|
SC_ServiceGateRouteComp core.S_Comps = "SC_GateRouteComp" //s_comps.ISC_GateRouteComp
|
|
)
|
|
|
|
const (
|
|
Service_Gateway = "gateway"
|
|
Service_Worker = "worker"
|
|
Service_DB = "dbservice"
|
|
)
|
|
|
|
//ERR
|
|
const (
|
|
MainTypeNotify = "notify" //通知
|
|
SubTypeErrorNotify = "errornotify" //错误通知
|
|
)
|
|
|
|
//模块名定义处
|
|
const (
|
|
ModuleGate core.M_Modules = "gateway" //gate模块 网关服务模块
|
|
ModuleGM core.M_Modules = "gm" //gm模块
|
|
ModuleUser core.M_Modules = "user" //用户模块
|
|
ModulePack core.M_Modules = "pack" //背包模块
|
|
ModuleMail core.M_Modules = "mail" //邮件模块
|
|
ModuleFriend core.M_Modules = "friend" //好友模块
|
|
ModuleMgoLog core.M_Modules = "mgolog" //日志模块
|
|
ModuleEquipment core.M_Modules = "equipment" //装备模块
|
|
ModuleHero core.M_Modules = "hero" //英雄模块
|
|
ModuleForum core.M_Modules = "forum" //论坛模块
|
|
ModuleItems core.M_Modules = "items" //道具模块
|
|
ModuleShop core.M_Modules = "shop" //商店模块
|
|
ModuleTask core.M_Modules = "task" //任务模块
|
|
ModuleStory core.M_Modules = "story" //主线模块
|
|
ModuleNotify core.M_Modules = "notify" //公告模块
|
|
)
|
|
|
|
//RPC服务接口定义处
|
|
const ( //Rpc
|
|
Rpc_GatewayRoute core.Rpc_Key = "Rpc_GatewayRoute" //网关路由
|
|
Rpc_GatewayAgentBind core.Rpc_Key = "Rpc_GatewayAgentBind" //代理绑定 绑定用户Id
|
|
Rpc_GatewayAgentUnBind core.Rpc_Key = "Rpc_GatewayAgentUnBind" //代理解绑 解绑用户Id
|
|
Rpc_GatewayAgentSendMsg core.Rpc_Key = "Rpc_GatewayAgentSendMsg" //代理发送消息 向用户发送消息
|
|
Rpc_GatewaySendBatchMsg core.Rpc_Key = "Rpc_GatewaySendBatchMsg" //向多个用户发送消息
|
|
Rpc_GatewaySendRadioMsg core.Rpc_Key = "Rpc_GatewaySendRadioMsg" //广播消息
|
|
Rpc_GatewayAgentClose core.Rpc_Key = "Rpc_GatewayAgentClose" //代理关闭 关闭用户连接
|
|
Rpc_NoticeUserClose core.Rpc_Key = "Rpc_NoticeUserClose" //通知用户离线
|
|
)
|
|
|
|
//事件类型定义处
|
|
const (
|
|
EventUserLogin core.Event_Key = "Event_UserLogin" //登录事件
|
|
EventCreateUser core.Event_Key = "Event_CreateUser" //创建角色事件
|
|
EventUserOffline core.Event_Key = "Event_UserOffline" //用户离线事件
|
|
)
|
|
|
|
const (
|
|
DBServiceStatus string = "DBService_status"
|
|
)
|
|
|
|
const (
|
|
Hp string = "hp" //生命
|
|
Atk string = "atk" //攻击
|
|
Def string = "def" //防御
|
|
HpPro string = "hppro" //生命附加值
|
|
AtkPro string = "atkpro" //攻击附加值
|
|
DefPro string = "defpro" //防御附加值
|
|
Speed string = "speed" //速度
|
|
)
|
|
|
|
const (
|
|
CardTypeHero int32 = 1 //英雄卡
|
|
CardTypeStar int32 = 2 //升星卡
|
|
CardTypeLevel int32 = 3 //升级卡
|
|
CardTypeSkill int32 = 4 //技能升级卡
|
|
CardTypeMonster int32 = 5 //怪物卡
|
|
)
|
|
|
|
const (
|
|
ResGold = "gold" //金币
|
|
ResExp = "exp" //经验
|
|
ResDiamond = "diamond" //钻石
|
|
ResTaskActive = "taskActive" //任务活跃度
|
|
)
|
|
|
|
type TaskType int32
|
|
|
|
const (
|
|
TaskTypeUpEquip TaskType = 101 //任意装备升级
|
|
TaskTypeGetHero TaskType = 102 //获取星级英雄
|
|
)
|
|
|
|
//任务标签:日常/周常/成就
|
|
type TaskTag int32
|
|
|
|
const (
|
|
TASK_DAILY TaskTag = 1 //每日任务
|
|
TASK_WEEKLY TaskTag = 2 //周任务
|
|
TASK_ACHIEVE TaskTag = 3 //成就
|
|
)
|