mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 01:38:20 +00:00
Script for when archway rebuild is done (#739)
This commit is contained in:
parent
e4a15a0f2e
commit
f8c1e2fb52
@ -106,6 +106,7 @@ set(DSCRIPT_SOURCES "ActivityManager.cpp"
|
||||
"FvPassThroughWall.cpp"
|
||||
"FvRaceSmashEggImagineServer.cpp"
|
||||
"GfApeSmashingQB.cpp"
|
||||
"GfArchway.cpp"
|
||||
"GfBanana.cpp"
|
||||
"GfBananaCluster.cpp"
|
||||
"GfCampfire.cpp"
|
||||
|
@ -116,6 +116,7 @@
|
||||
#include "BaseEnemyApe.h"
|
||||
#include "GfApeSmashingQB.h"
|
||||
#include "ZoneGfProperty.h"
|
||||
#include "GfArchway.h"
|
||||
|
||||
// SG Scripts
|
||||
#include "SGCannon.h"
|
||||
@ -494,6 +495,9 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
|
||||
script = new GfApeSmashingQB();
|
||||
else if (scriptName == "scripts\\zone\\PROPERTY\\GF\\L_ZONE_GF_PROPERTY.lua")
|
||||
script = new ZoneGfProperty();
|
||||
else if (scriptName == "scripts\\ai\\GF\\L_GF_ARCHWAY.lua") {
|
||||
script = new GfArchway();
|
||||
}
|
||||
|
||||
// SG
|
||||
else if (scriptName == "scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua")
|
||||
|
8
dScripts/GfArchway.cpp
Normal file
8
dScripts/GfArchway.cpp
Normal 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
10
dScripts/GfArchway.h
Normal 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;
|
||||
};
|
Loading…
Reference in New Issue
Block a user