2022-02-05 12:00:10 +00:00
# include "FvPassThroughWall.h"
# include "InventoryComponent.h"
2022-07-05 06:00:10 +00:00
# include "MissionComponent.h"
2022-02-05 12:00:10 +00:00
void FvPassThroughWall : : OnCollisionPhantom ( Entity * self , Entity * target ) {
2023-06-09 08:27:05 +00:00
auto * missionComponent = target - > GetComponent < MissionComponent > ( ) ;
2022-07-28 13:39:57 +00:00
if ( missionComponent = = nullptr ) return ;
2022-02-05 12:00:10 +00:00
2022-07-28 13:39:57 +00:00
//Because at the moment we do not have an ItemComponent component, we check to make sure a Maelstrom-Infused hood is equipped. There are only three in the game right now.
2023-06-09 08:27:05 +00:00
auto * inventoryComponent = target - > GetComponent < InventoryComponent > ( ) ;
2022-07-28 13:39:57 +00:00
// If no inventory component is found then abort.
if ( inventoryComponent = = nullptr ) return ;
// If no Maelstrom hoods are equipped then abort.
if ( ! inventoryComponent - > IsEquipped ( WhiteMaelstromHood ) & & ! inventoryComponent - > IsEquipped ( BlackMaelstromHood ) & & ! inventoryComponent - > IsEquipped ( RedMaelstromHood ) ) return ;
2022-02-05 12:00:10 +00:00
2022-07-28 13:39:57 +00:00
// Progress mission Friend of the Ninja since all prerequisites are met.
missionComponent - > ForceProgress ( friendOfTheNinjaMissionId , friendOfTheNinjaMissionUid , 1 ) ;
}