Commit b4f02941 authored by hujiebin's avatar hujiebin

fix:要用user的信息

parent 4ec2638f
...@@ -609,6 +609,7 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -609,6 +609,7 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) {
model.Log.Errorf("GetRoomInfo: GetUserBase: %s", err.Error()) model.Log.Errorf("GetRoomInfo: GetUserBase: %s", err.Error())
} }
// 进场特效类型 // 进场特效类型
var entryEffectType int // 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip ,顺序从小到大 var entryEffectType int // 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip ,顺序从小到大
var cpEntryEffect bool var cpEntryEffect bool
if cp, _ := rpc.GetUserCp(model, userId); cp != nil { if cp, _ := rpc.GetUserCp(model, userId); cp != nil {
...@@ -622,15 +623,17 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -622,15 +623,17 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) {
result.CpUserAvatar = *cp.CpUserInfo.Avatar result.CpUserAvatar = *cp.CpUserInfo.Avatar
} }
} }
if result.Owner.IsVip { if user, _ := user_cv.GetUserDetail(model, userId, userId); user != nil {
entryEffectType = 4 if user.IsVip {
} entryEffectType = 4
if result.Owner.Noble.Level > 0 { }
entryEffectType = 3 if user.Noble.Level > 0 {
} entryEffectType = 3
for _, v := range result.Owner.Svip.Privileges { }
if len(v.MysteryCode) > 0 { for _, v := range user.Svip.Privileges {
entryEffectType = 2 if len(v.MysteryCode) > 0 {
entryEffectType = 2
}
} }
} }
if cpEntryEffect { if cpEntryEffect {
......
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