Disabled combat event listener

This commit is contained in:
Eddoursul 2024-01-31 08:59:16 +01:00
parent 98b5adf210
commit 2a551af37a
4 changed files with 7 additions and 2 deletions

Binary file not shown.

View File

@ -12,7 +12,7 @@ void EventListener::Install()
//RE::ScriptEventSourceHolder::GetSingleton()->AddEventSink<RE::TESContainerChangedEvent>(EventListener::GetSingleton()); //RE::ScriptEventSourceHolder::GetSingleton()->AddEventSink<RE::TESContainerChangedEvent>(EventListener::GetSingleton());
RE::UI::GetSingleton()->AddEventSink<RE::MenuOpenCloseEvent>(EventListener::GetSingleton()); RE::UI::GetSingleton()->AddEventSink<RE::MenuOpenCloseEvent>(EventListener::GetSingleton());
SKSE::GetModCallbackEventSource()->AddEventSink(EventListener::GetSingleton()); SKSE::GetModCallbackEventSource()->AddEventSink(EventListener::GetSingleton());
RE::ScriptEventSourceHolder::GetSingleton()->GetEventSource<RE::TESCombatEvent>()->AddEventSink(EventListener::GetSingleton()); //RE::ScriptEventSourceHolder::GetSingleton()->GetEventSource<RE::TESCombatEvent>()->AddEventSink(EventListener::GetSingleton());
RE::ScriptEventSourceHolder::GetSingleton()->GetEventSource<RE::TESHitEvent>()->AddEventSink(EventListener::GetSingleton()); RE::ScriptEventSourceHolder::GetSingleton()->GetEventSource<RE::TESHitEvent>()->AddEventSink(EventListener::GetSingleton());
} }
@ -78,6 +78,7 @@ auto EventListener::ProcessEvent(
return RE::BSEventNotifyControl::kContinue; return RE::BSEventNotifyControl::kContinue;
} }
/*
auto EventListener::ProcessEvent( auto EventListener::ProcessEvent(
const RE::TESCombatEvent* a_event, const RE::TESCombatEvent* a_event,
RE::BSTEventSource<RE::TESCombatEvent>* a_eventSource) RE::BSTEventSource<RE::TESCombatEvent>* a_eventSource)
@ -100,6 +101,7 @@ auto EventListener::ProcessEvent(
return RE::BSEventNotifyControl::kContinue; return RE::BSEventNotifyControl::kContinue;
} }
*/
auto EventListener::ProcessEvent( auto EventListener::ProcessEvent(
const RE::TESHitEvent* a_event, const RE::TESHitEvent* a_event,

View File

@ -10,7 +10,7 @@ class EventListener :
public RE::BSTEventSink<RE::TESContainerChangedEvent>, public RE::BSTEventSink<RE::TESContainerChangedEvent>,
public RE::BSTEventSink<RE::MenuOpenCloseEvent>, public RE::BSTEventSink<RE::MenuOpenCloseEvent>,
public RE::BSTEventSink<RE::TESActivateEvent>, public RE::BSTEventSink<RE::TESActivateEvent>,
public RE::BSTEventSink<RE::TESCombatEvent>, //public RE::BSTEventSink<RE::TESCombatEvent>,
public RE::BSTEventSink<RE::TESHitEvent> public RE::BSTEventSink<RE::TESHitEvent>
{ {
public: public:
@ -43,10 +43,12 @@ public:
RE::BSTEventSource<RE::TESActivateEvent>* a_eventSource) RE::BSTEventSource<RE::TESActivateEvent>* a_eventSource)
-> RE::BSEventNotifyControl override; -> RE::BSEventNotifyControl override;
/*
auto ProcessEvent( auto ProcessEvent(
const RE::TESCombatEvent* a_event, const RE::TESCombatEvent* a_event,
RE::BSTEventSource<RE::TESCombatEvent>* a_eventSource) RE::BSTEventSource<RE::TESCombatEvent>* a_eventSource)
-> RE::BSEventNotifyControl override; -> RE::BSEventNotifyControl override;
*/
auto ProcessEvent( auto ProcessEvent(
const RE::TESHitEvent* a_event, const RE::TESHitEvent* a_event,

View File

@ -42,6 +42,7 @@ event OnUpdate()
endevent endevent
Event OnCombatStateChange(string eventName, string bTargetIsPlayer, float fCombatState, Form sender) Event OnCombatStateChange(string eventName, string bTargetIsPlayer, float fCombatState, Form sender)
return
if bTargetIsPlayer ; start combat or searching if bTargetIsPlayer ; start combat or searching
if fCombatState as int == 1 ; combat if fCombatState as int == 1 ; combat
if bIsBrawling if bIsBrawling