|
|
@@ -11,9 +11,10 @@ import (
|
|
|
//网易P1日志
|
|
|
|
|
|
const (
|
|
|
- SDKPlatform_Quick = "SDKQuick"
|
|
|
- SDKPlatform_NBSDK = "SDKNB"
|
|
|
- SDKPlatform_UniSDK = "SDKUni" //SDKUni
|
|
|
+ SDKPlatform_Quick = "SDKQuick"
|
|
|
+ SDKPlatform_NBSDK = "SDKNB"
|
|
|
+ SDKPlatform_UniSDK = "SDKUni" //SDKUni
|
|
|
+ SDKPlatform_YouYi_IOS = "SDKYOUYI_IOS"
|
|
|
)
|
|
|
|
|
|
func neteaseWriteLog(prefix string, logInfo interface{}) {
|
|
|
@@ -25,7 +26,7 @@ func neteaseWriteLog(prefix string, logInfo interface{}) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//OnlineRoleNum
|
|
|
+// OnlineRoleNum
|
|
|
type NeteaseLogOnlineRoleNum struct {
|
|
|
Server int `json:"server"`
|
|
|
Online int `json:"online"`
|
|
|
@@ -36,7 +37,7 @@ func (this *NeteaseLogOnlineRoleNum) Log(role *Role) {
|
|
|
neteaseWriteLog("OnlineRoleNum", this)
|
|
|
}
|
|
|
|
|
|
-//LogoutRole
|
|
|
+// LogoutRole
|
|
|
type NeteaseLogCommonInfo struct {
|
|
|
IPv4 string `json:"ip"`
|
|
|
Server int `json:"server"`
|
|
|
@@ -89,7 +90,7 @@ type PayDetail struct {
|
|
|
GoodsType int `json:"prepaid_type"` //s
|
|
|
}
|
|
|
|
|
|
-//充值日志
|
|
|
+// 充值日志
|
|
|
type NeteaseLogRoleCharge struct {
|
|
|
NeteaseLogCommonInfo
|
|
|
|
|
|
@@ -114,7 +115,7 @@ type NeteaseLogRoleCharge struct {
|
|
|
Aid uint64 `json:"aid"`
|
|
|
}
|
|
|
|
|
|
-//金币购买道具日志
|
|
|
+// 金币购买道具日志
|
|
|
type NeteaseLogGoldBuyItem struct {
|
|
|
NeteaseLogCommonInfo
|
|
|
|
|
|
@@ -136,7 +137,7 @@ type NeteaseLogGoldBuyItem struct {
|
|
|
Aid uint64 `json:"aid"`
|
|
|
}
|
|
|
|
|
|
-//金币购买其他物品
|
|
|
+// 金币购买其他物品
|
|
|
type NeteaseLogGoldBuyOther struct {
|
|
|
NeteaseLogCommonInfo
|
|
|
RoleId string `json:"role_id"` //角色唯一标识,在所有服唯一
|
|
|
@@ -151,7 +152,7 @@ type NeteaseLogGoldBuyOther struct {
|
|
|
Aid uint64 `json:"aid"`
|
|
|
}
|
|
|
|
|
|
-//获得元宝日志
|
|
|
+// 获得元宝日志
|
|
|
type NeteaseLogRoleGetGold struct {
|
|
|
NeteaseLogCommonInfo
|
|
|
|
|
|
@@ -168,7 +169,7 @@ type NeteaseLogRoleGetGold struct {
|
|
|
Aid uint64 `json:"aid"`
|
|
|
}
|
|
|
|
|
|
-//获得元宝日志 计费监控
|
|
|
+// 获得元宝日志 计费监控
|
|
|
type NeteaseLogRoleGetGoldJF struct {
|
|
|
NeteaseLogCommonInfo
|
|
|
|
|
|
@@ -198,7 +199,7 @@ type UseReason struct {
|
|
|
Info int `json:"info"`
|
|
|
}
|
|
|
|
|
|
-//使用元宝日志 计费监控
|
|
|
+// 使用元宝日志 计费监控
|
|
|
type NeteaseLogRoleUseGoldJF struct {
|
|
|
NeteaseLogCommonInfo
|
|
|
|
|
|
@@ -218,7 +219,7 @@ type NeteaseLogRoleUseGoldJF struct {
|
|
|
UseTime uint64 `json:"use_time"`
|
|
|
}
|
|
|
|
|
|
-//聊天监控
|
|
|
+// 聊天监控
|
|
|
type NeteaseLogRoleChat struct {
|
|
|
NeteaseLogCommonInfo
|
|
|
|
|
|
@@ -426,7 +427,7 @@ func (this *Role) WriteChargeLog(payRewardInfo *serverproto.PayOrderSaveInfo) in
|
|
|
return nLog.Gold
|
|
|
}
|
|
|
|
|
|
-//计费:充值获取金币
|
|
|
+// 计费:充值获取金币
|
|
|
func (this *Role) WriteChargeAddGoldLogJF(payRewardInfo *serverproto.PayOrderSaveInfo, gold int32) {
|
|
|
if payRewardInfo == nil {
|
|
|
return
|
|
|
@@ -449,7 +450,7 @@ func (this *Role) WriteChargeAddGoldLogJF(payRewardInfo *serverproto.PayOrderSav
|
|
|
nLog.LogRoleGetGoldJF(this)
|
|
|
}
|
|
|
|
|
|
-//计费:非充值获取金币
|
|
|
+// 计费:非充值获取金币
|
|
|
func (this *Role) WriteAddGoldLogJF(gold int32, addFrom int32) {
|
|
|
nLog := &NeteaseLogRoleGetGoldJF{
|
|
|
TotalGold: int(gold),
|
|
|
@@ -464,7 +465,7 @@ func (this *Role) WriteAddGoldLogJF(gold int32, addFrom int32) {
|
|
|
nLog.LogRoleGetGoldJF(this)
|
|
|
}
|
|
|
|
|
|
-//非计费:获取金币
|
|
|
+// 非计费:获取金币
|
|
|
func (this *Role) WriteAddGoldLog(gold int32, addFrom int32, reason int32) {
|
|
|
//nLog := &NeteaseLogRoleGetGold{
|
|
|
// Gold: int(gold),
|
|
|
@@ -480,7 +481,7 @@ func (this *Role) WriteAddGoldLog(gold int32, addFrom int32, reason int32) {
|
|
|
//nLog.LogRoleGetGold(this)
|
|
|
}
|
|
|
|
|
|
-//计费:消耗金币
|
|
|
+// 计费:消耗金币
|
|
|
func (this *Role) WriteUseGoldLogJF(st AddItemST) {
|
|
|
nLog := &NeteaseLogRoleUseGoldJF{
|
|
|
UseTime: uint64(util.GetTimeSeconds()),
|