fix:头像框 聊天框,造型逻辑修改

This commit is contained in:
yushunrui 2024-01-12 22:52:56 +08:00 committed by xichaoyin
parent 55aa5eac26
commit 3d7644dce4

View File

@ -297,12 +297,10 @@ export class UserFun {
if (val == -1 && !gud.headFrames[conf.id]) { if (val == -1 && !gud.headFrames[conf.id]) {
change = true; change = true;
gud.headFrames[conf.id] = -1; gud.headFrames[conf.id] = -1;
} else if (!gud.headFrames[conf.id] || gud.headFrames[conf.id] < G.time) { }
else if (val >= 0) {
change = true; change = true;
gud.headFrames[conf.id] = G.time + val * v; gud.headFrames[conf.id] = G.time + val * v;
} else {
change = true;
gud.headFrames[conf.id] += val * v;
} }
} }
} }
@ -341,19 +339,15 @@ export class UserFun {
if (conf?.cond?.[0] == 'time') { if (conf?.cond?.[0] == 'time') {
let val = conf.cond[1]; let val = conf.cond[1];
if (val == -1 && !gud.chatFrames[conf.id]) { if (val == -1 && !gud.headFrames[conf.id]) {
change = true; change = true;
gud.chatFrames[conf.id] = -1; gud.headFrames[conf.id] = -1;
} else if (!gud.chatFrames[conf.id] || gud.chatFrames[conf.id] < G.time) { } else if (val >= 0) {
change = true; change = true;
gud.chatFrames[conf.id] = G.time + val * v; gud.headFrames[conf.id] = G.time + val * v;
} else {
change = true;
gud.chatFrames[conf.id] += val * v;
} }
} }
} }
if (change) { if (change) {
PlayerFun.changeAttr(uid, {chatFrames: gud.chatFrames}); PlayerFun.changeAttr(uid, {chatFrames: gud.chatFrames});
G.server.sendMsgByUid(uid, 'msg_s2c/PlayerChange', {chatFrames: gud.chatFrames}); G.server.sendMsgByUid(uid, 'msg_s2c/PlayerChange', {chatFrames: gud.chatFrames});
@ -388,15 +382,13 @@ export class UserFun {
if (conf?.cond?.[0] == 'time') { if (conf?.cond?.[0] == 'time') {
let val = conf.cond[1]; let val = conf.cond[1];
if (val == -1) { if (val == -1 && !gud.headFrames[conf.id]) {
change = true; change = true;
gud.model[conf.id] = {id: conf.id + '', time: -1}; gud.headFrames[conf.id] = -1;
} else if (gud.model[conf.id].time < G.time) { }
else if (val >= 0) {
change = true; change = true;
gud.model[conf.id] = {id: conf.id + '', time: G.time + val * v}; gud.headFrames[conf.id] = G.time + val * v;
} else {
change = true;
gud.model[conf.id] = {id: conf.id + '', time: gud.model[conf.id].time += val * v}
} }
} }
} }