mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
implement rest of equipment scripts (#1714)
This commit is contained in:
22
dScripts/EquipmentTriggers/ImaginationBackPack.cpp
Normal file
22
dScripts/EquipmentTriggers/ImaginationBackPack.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "ImaginationBackPack.h"
|
||||
|
||||
#include "SkillComponent.h"
|
||||
|
||||
void ImaginationBackPack::OnFactionTriggerItemEquipped(Entity* itemOwner, LWOOBJID itemObjId) {
|
||||
LOG("Subscribing to PlayerResurrectionFinished");
|
||||
itemOwner->Subscribe(itemObjId, this, "PlayerResurrectionFinished");
|
||||
}
|
||||
|
||||
void ImaginationBackPack::NotifyPlayerResurrectionFinished(Entity& self, GameMessages::PlayerResurrectionFinished& msg) {
|
||||
LOG("PlayerResurrectionFinished");
|
||||
auto* skillComponent = self.GetComponent<SkillComponent>();
|
||||
if (!skillComponent) return;
|
||||
LOG("Casting skill 1334");
|
||||
skillComponent->CastSkill(1334);
|
||||
}
|
||||
|
||||
void ImaginationBackPack::OnFactionTriggerItemUnequipped(Entity* itemOwner, LWOOBJID itemObjId) {
|
||||
LOG("Unsubscribing from PlayerResurrectionFinished");
|
||||
itemOwner->Unsubscribe(itemObjId, "PlayerResurrectionFinished");
|
||||
}
|
||||
|
Reference in New Issue
Block a user