| 223 | } |
| 224 | |
| 225 | bool LibraryManager::PostStartupFindLibraries() |
| 226 | { |
| 227 | if (PostLoaded) { |
| 228 | return !CriticalInitFailed; |
| 229 | } |
| 230 | |
| 231 | #if defined(OSI_EOCAPP) |
| 232 | FindGameActionManagerEoCApp(); |
| 233 | FindGameActionsEoCApp(); |
| 234 | FindStatusMachineEoCApp(); |
| 235 | FindHitFuncsEoCApp(); |
| 236 | FindItemFuncsEoCApp(); |
| 237 | FindStatusTypesEoCApp(); |
| 238 | FindCustomStatsEoCApp(); |
| 239 | FindCharacterStatFuncsEoCApp(); |
| 240 | #else |
| 241 | FindGameActionManagerEoCPlugin(); |
| 242 | FindGameActionsEoCPlugin(); |
| 243 | FindStatusMachineEoCPlugin(); |
| 244 | FindHitFuncsEoCPlugin(); |
| 245 | FindItemFuncsEoCPlugin(); |
| 246 | FindStatusTypesEoCPlugin(); |
| 247 | FindCustomStatsEoCPlugin(); |
| 248 | FindCharacterStatFuncsEoCPlugin(); |
| 249 | #endif |
| 250 | |
| 251 | if (!CriticalInitFailed) { |
| 252 | EnableCustomStats(); |
| 253 | InitPropertyMaps(); |
| 254 | |
| 255 | DetourTransactionBegin(); |
| 256 | DetourUpdateThread(GetCurrentThread()); |
| 257 | |
| 258 | if (StatusHitVMT != nullptr) { |
| 259 | StatusHitEnter.Wrap(StatusHitVMT->Enter); |
| 260 | } |
| 261 | |
| 262 | if (StatusHealVMT != nullptr) { |
| 263 | StatusHealEnter.Wrap(StatusHealVMT->Enter); |
| 264 | } |
| 265 | |
| 266 | if (CharacterHit != nullptr) { |
| 267 | CharacterHitHook.Wrap(CharacterHit); |
| 268 | } |
| 269 | |
| 270 | if (StatusMachineApplyStatus != nullptr) { |
| 271 | ApplyStatusHook.Wrap(StatusMachineApplyStatus); |
| 272 | } |
| 273 | |
| 274 | DetourTransactionCommit(); |
| 275 | } |
| 276 | |
| 277 | PostLoaded = true; |
| 278 | return !CriticalInitFailed; |
| 279 | } |
| 280 | |
| 281 | void LibraryManager::Cleanup() |
| 282 | { |
no test coverage detected