mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-20 07:15:02 +08:00
fix: 获取buff性能优化
This commit is contained in:
1 parent
c476303527
commit
e9b9e4b069
5 files changed
+37
-23
No files matched your search
@@ -62,6 +62,21 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
if (h.magicDef === void 0 || h.magicDef === null) {
|
||||
h.magicDef = 0;
|
||||
}
|
||||
if (!core.status.hero.buff) {
|
||||
const buff = {};
|
||||
core.status.hero.buff = buff;
|
||||
const toDelete = [];
|
||||
for (const [key, value] of Object.entries(flags)) {
|
||||
if (/__\w+_buff__/.test(key)) {
|
||||
const name = key.slice(2, -7);
|
||||
buff[name] = value;
|
||||
toDelete.push(key);
|
||||
}
|
||||
}
|
||||
toDelete.forEach(v => {
|
||||
delete flags[v];
|
||||
});
|
||||
}
|
||||
},
|
||||
win: function (reason, norank, noexit) {
|
||||
// 游戏获胜事件
|
||||
|
||||
Reference in new issue
Block a user