lt 3 ماه پیش
والد
کامیت
071d35c91e

+ 5 - 1
RO_Server_Trunk-branch_0.1.39/roserver/game/model/role.go

@@ -1187,7 +1187,11 @@ func (this *Role) Update(ms uint64) {
 
 	this.roleArena.Update(ms)
 	this.roleMail.Update(ms)
-	this.GetRoleBase().Update(ms)
+	if this.base == nil {
+		util.WarnF("uid=%v Role.Update skip: base==nil", this.GetUUid())
+	} else {
+		this.GetRoleBase().Update(ms)
+	}
 	this.roleTower.Update(ms)
 	this.roleRune.Update(ms)
 	this.roleHead.Update(ms)

+ 1 - 1
RO_Server_Trunk-branch_0.1.39/roserver/game/model/role_base.go

@@ -215,7 +215,7 @@ func (this *RoleBase) Rename(name string) {
 
 // 时效性头像刷新
 func (this *RoleBase) Update(ms uint64) {
-	if this.roleBase.Head_Info == nil || len(this.roleBase.Head_Info.HeadFrameList) <= 0 {
+	if this.roleBase == nil || this.roleBase.Head_Info == nil || len(this.roleBase.Head_Info.HeadFrameList) <= 0 {
 		return
 	}
 	if this.headFrameTick != 0 && this.headFrameTick > ms+1000*60 {