合并本地领先源码:旧UI、GM疲劳燃烧、白金徽章孔、宠物修复、支援兵普攻开关
This commit is contained in:
1 parent
f2debaf9bf
commit
70b3c5a6dc
57 files changed
+4256
-30
No files matched your search
@@ -261,6 +261,14 @@ bool CompanionEquipmentProbeEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
// 支援兵普攻开关:启动器在客户端目录放置 90CN_basic_attack.disabled。
|
||||
// 只影响 CompanionBasicAttack 回退程序,12 格技能程序不变。
|
||||
bool CompanionBasicAttackEnabled() {
|
||||
static const bool disabled =
|
||||
CompanionFlagFilePresent(L"90CN_basic_attack.disabled");
|
||||
return !disabled;
|
||||
}
|
||||
|
||||
bool CompanionEquipmentApplyEnabled() {
|
||||
// Production default: the mode1 equipment rows are replayed for every
|
||||
// companion APC. A disable flag exists for a one-restart rollback.
|
||||
@@ -1924,6 +1932,42 @@ bool ApplyDynamicRuntimeKeyPrograms(
|
||||
return false;
|
||||
}
|
||||
|
||||
// 关闭普攻时把 CompanionBasicAttack 的技能码改成空占位码,
|
||||
// 只禁用技能冷却后的普攻回退,不触碰 0..11 的 12 格技能程序。
|
||||
if (!CompanionBasicAttackEnabled()) {
|
||||
void* basicProgram =
|
||||
programs[Contract::kBasicAttackProgramIndex];
|
||||
std::uint8_t* basic =
|
||||
reinterpret_cast<std::uint8_t*>(basicProgram);
|
||||
if (basic) {
|
||||
std::uintptr_t basicBegin =
|
||||
*reinterpret_cast<std::uintptr_t*>(
|
||||
basic +
|
||||
g_native.kRuntimeKeyProgramBytecodeBeginOffset);
|
||||
std::uintptr_t basicEnd =
|
||||
*reinterpret_cast<std::uintptr_t*>(
|
||||
basic +
|
||||
g_native.kRuntimeKeyProgramBytecodeEndOffset);
|
||||
std::uintptr_t basicCapacity =
|
||||
*reinterpret_cast<std::uintptr_t*>(
|
||||
basic +
|
||||
g_native.kRuntimeKeyProgramBytecodeCapacityOffset);
|
||||
if (basicBegin && basicEnd >= basicBegin &&
|
||||
basicCapacity >= basicEnd &&
|
||||
basicEnd - basicBegin >=
|
||||
g_native.kRuntimeKeySkillCodeOffset + 4) {
|
||||
*reinterpret_cast<std::uint32_t*>(
|
||||
basicBegin +
|
||||
g_native.kRuntimeKeySkillCodeOffset) =
|
||||
Contract::kSkillCodeBias +
|
||||
Contract::kPlaceholderSkillId;
|
||||
Log("companion basic attack disabled actor=%p program=%p",
|
||||
actor,
|
||||
basicProgram);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::uint8_t* directBytecode[
|
||||
Contract::kQuickSlotCount] = {};
|
||||
std::size_t directBytecodeSize[
|
||||
|
||||
Reference in new issue
Block a user