修复了threaten.target调用会出现错误的bug,另外优化了一下threaten的调用

This commit is contained in:
IceCola 2024-03-25 02:27:46 +08:00 committed by GitHub
parent d462dc5cbd
commit 168953b1bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 10 deletions

View File

@ -4390,18 +4390,13 @@ export class Get extends Uninstantable {
zeroplayer = true;
zerotarget = true;
}
if (typeof temp3 == 'function' && temp3(player, target) != undefined) {
threaten *= temp3(player, target);
if (typeof temp3 == 'object') {
temp3 = temp3.target;
}
else if (typeof temp3 == 'object') {
if (typeof temp3.target == 'number') {
threaten *= temp3;
}
else if (typeof temp3.target == 'function' && temp3(player, target) != undefined) {
threaten *= temp3(player, target);
}
if (typeof temp3 == 'function') {
temp3 = temp3(player, target);
}
else if (typeof temp3 == 'number') {
if (typeof temp3 == 'number') {
threaten *= temp3;
}
}