Script for when archway rebuild is done (#739)

This commit is contained in:
Aaron Kimbrell 2022-08-18 15:33:32 -05:00 committed by GitHub
parent e4a15a0f2e
commit f8c1e2fb52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 0 deletions

View File

@ -106,6 +106,7 @@ set(DSCRIPT_SOURCES "ActivityManager.cpp"
"FvPassThroughWall.cpp" "FvPassThroughWall.cpp"
"FvRaceSmashEggImagineServer.cpp" "FvRaceSmashEggImagineServer.cpp"
"GfApeSmashingQB.cpp" "GfApeSmashingQB.cpp"
"GfArchway.cpp"
"GfBanana.cpp" "GfBanana.cpp"
"GfBananaCluster.cpp" "GfBananaCluster.cpp"
"GfCampfire.cpp" "GfCampfire.cpp"

View File

@ -116,6 +116,7 @@
#include "BaseEnemyApe.h" #include "BaseEnemyApe.h"
#include "GfApeSmashingQB.h" #include "GfApeSmashingQB.h"
#include "ZoneGfProperty.h" #include "ZoneGfProperty.h"
#include "GfArchway.h"
// SG Scripts // SG Scripts
#include "SGCannon.h" #include "SGCannon.h"
@ -494,6 +495,9 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
script = new GfApeSmashingQB(); script = new GfApeSmashingQB();
else if (scriptName == "scripts\\zone\\PROPERTY\\GF\\L_ZONE_GF_PROPERTY.lua") else if (scriptName == "scripts\\zone\\PROPERTY\\GF\\L_ZONE_GF_PROPERTY.lua")
script = new ZoneGfProperty(); script = new ZoneGfProperty();
else if (scriptName == "scripts\\ai\\GF\\L_GF_ARCHWAY.lua") {
script = new GfArchway();
}
// SG // SG
else if (scriptName == "scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua") else if (scriptName == "scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua")

8
dScripts/GfArchway.cpp Normal file
View File

@ -0,0 +1,8 @@
#include "GfArchway.h"
#include "Entity.h"
#include "SkillComponent.h"
void GfArchway::OnRebuildComplete(Entity* self, Entity* target) {
auto* skillComponent = target->GetComponent<SkillComponent>();
if (skillComponent) skillComponent->CalculateBehavior(SHIELDING_SKILL, SHIELDING_BEHAVIOR, target->GetObjectID(), true);
}

10
dScripts/GfArchway.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
#include "CppScripts.h"
class GfArchway : public CppScripts::Script {
public:
void OnRebuildComplete(Entity* self, Entity* target) override;
private:
const uint32_t SHIELDING_SKILL = 863;
const uint32_t SHIELDING_BEHAVIOR = 3788;
};