2018-10-11 22:57:05 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "Runtime/GCNTypes.hpp"
|
|
|
|
#include "Runtime/Weapon/CProjectileInfo.hpp"
|
|
|
|
#include "Runtime/World/CPatterned.hpp"
|
2018-10-11 22:57:05 +00:00
|
|
|
|
2019-03-23 00:36:10 +00:00
|
|
|
namespace urde {
|
|
|
|
class CGenDescription;
|
|
|
|
class CElementGen;
|
|
|
|
class CWeaponDescription;
|
2019-03-24 05:45:47 +00:00
|
|
|
class CTargetableProjectile;
|
|
|
|
} // namespace urde
|
2019-03-23 00:36:10 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde::MP1 {
|
|
|
|
class CBloodFlower : public CPatterned {
|
2019-03-23 00:36:10 +00:00
|
|
|
TLockedToken<CGenDescription> x568_podEffectDesc;
|
|
|
|
std::unique_ptr<CElementGen> x574_podEffect;
|
2019-03-24 05:45:47 +00:00
|
|
|
TLockedToken<CWeaponDescription> x578_projectileDesc;
|
2019-03-23 00:36:10 +00:00
|
|
|
float x584_curAttackTime = 0.f;
|
|
|
|
float x588_projectileOffset = 0.f;
|
|
|
|
u32 x58c_projectileState = 0;
|
|
|
|
CProjectileInfo x590_projectileInfo;
|
|
|
|
float x5b8_ = 0.f;
|
|
|
|
float x5bc_projectileDelay = 0.f;
|
|
|
|
float x5c0_ = 0.f;
|
2019-03-24 05:45:47 +00:00
|
|
|
TLockedToken<CGenDescription> x5c4_visorParticle;
|
|
|
|
s16 x5d4_visorSfx;
|
2019-03-23 00:36:10 +00:00
|
|
|
u32 x5d8_effectState = 0;
|
2019-03-24 05:45:47 +00:00
|
|
|
CDamageInfo x5dc_projectileDamage;
|
2019-03-23 00:36:10 +00:00
|
|
|
CDamageInfo x5f8_podDamage;
|
|
|
|
float x614_;
|
|
|
|
CAssetId x618_;
|
|
|
|
CAssetId x61c_;
|
|
|
|
CAssetId x620_;
|
|
|
|
|
|
|
|
void ActivateTriggers(CStateManager& mgr, bool activate);
|
2019-05-14 22:30:15 +00:00
|
|
|
void CalculateAttackTime(CStateManager&);
|
2019-03-23 00:36:10 +00:00
|
|
|
void UpdateFire(CStateManager& mgr);
|
|
|
|
void TurnEffectsOn(u32, CStateManager&);
|
|
|
|
void TurnEffectsOff(u32, CStateManager&);
|
|
|
|
void LaunchPollenProjectile(const zeus::CTransform&, CStateManager&, float, s32);
|
2019-03-24 05:45:47 +00:00
|
|
|
CTargetableProjectile* CreateArcProjectile(CStateManager&, const TToken<CWeaponDescription>&, const zeus::CTransform&,
|
|
|
|
const CDamageInfo&, TUniqueId);
|
|
|
|
|
2018-10-11 22:57:05 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
DEFINE_PATTERNED(BloodFlower)
|
2018-10-11 22:57:05 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CBloodFlower(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
|
|
|
|
const CPatternedInfo&, CAssetId, CAssetId, const CActorParameters&, CAssetId, const CDamageInfo&,
|
|
|
|
const CDamageInfo&, const CDamageInfo&, CAssetId, CAssetId, CAssetId, float, CAssetId, u32);
|
2019-03-23 00:36:10 +00:00
|
|
|
|
2019-08-09 19:46:49 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
void Think(float dt, CStateManager& mgr) override;
|
2019-08-09 22:07:52 +00:00
|
|
|
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override;
|
2019-08-09 19:46:49 +00:00
|
|
|
void Render(const CStateManager& mgr) const override;
|
|
|
|
void Touch(CActor&, CStateManager&) override {}
|
|
|
|
CProjectileInfo* GetProjectileInfo() override { return &x590_projectileInfo; }
|
2019-03-23 00:36:10 +00:00
|
|
|
|
2019-08-09 19:46:49 +00:00
|
|
|
bool ShouldAttack(CStateManager&, float) override;
|
|
|
|
bool ShouldTurn(CStateManager&, float) override;
|
|
|
|
bool Leash(CStateManager&, float) override { return x5c0_ < x3d0_playerLeashTime; }
|
|
|
|
void Active(CStateManager&, EStateMsg, float) override;
|
|
|
|
void InActive(CStateManager&, EStateMsg, float) override;
|
|
|
|
void BulbAttack(CStateManager&, EStateMsg, float) override;
|
|
|
|
void PodAttack(CStateManager&, EStateMsg, float) override;
|
2018-10-11 22:57:05 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde::MP1
|