Commit 4ec2638f authored by hujiebin's avatar hujiebin

fix:进场特效类型

parent 078f5b17
...@@ -610,13 +610,6 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -610,13 +610,6 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) {
} }
// 进场特效类型 // 进场特效类型
var entryEffectType int // 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip ,顺序从小到大 var entryEffectType int // 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip ,顺序从小到大
if result.Owner != nil && result.Owner.Id != nil {
if cp, _ := rpc.GetUserCp(model, *result.Owner.Id); cp != nil {
result.CpLevel = cp.CpLevel.Level
if cp.CpUserInfo != nil && cp.CpUserInfo.Avatar != nil {
result.CpUserAvatar = *cp.CpUserInfo.Avatar
}
}
var cpEntryEffect bool var cpEntryEffect bool
if cp, _ := rpc.GetUserCp(model, userId); cp != nil { if cp, _ := rpc.GetUserCp(model, userId); cp != nil {
for _, v := range cp.MyPrivilegeList { for _, v := range cp.MyPrivilegeList {
...@@ -624,6 +617,10 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -624,6 +617,10 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) {
cpEntryEffect = true cpEntryEffect = true
} }
} }
result.CpLevel = cp.CpLevel.Level
if cp.CpUserInfo != nil && cp.CpUserInfo.Avatar != nil {
result.CpUserAvatar = *cp.CpUserInfo.Avatar
}
} }
if result.Owner.IsVip { if result.Owner.IsVip {
entryEffectType = 4 entryEffectType = 4
...@@ -640,7 +637,6 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -640,7 +637,6 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) {
entryEffectType = 1 entryEffectType = 1
} }
result.EntryEffectType = entryEffectType result.EntryEffectType = entryEffectType
}
resp.ResponseOk(c, result) resp.ResponseOk(c, result)
return myContext, nil return myContext, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment