mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
Parrot crash script to become a sneaky ninja and steal the pirate's booty (#752)
This commit is contained in:
parent
500b7885e2
commit
b70e7334e8
@ -116,6 +116,7 @@ set(DSCRIPT_SOURCES "ActivityManager.cpp"
|
||||
"GfJailWalls.cpp"
|
||||
"GfMaelstromGeyser.cpp"
|
||||
"GfOrgan.cpp"
|
||||
"GfParrotCrash.cpp"
|
||||
"GfTikiTorch.cpp"
|
||||
"GrowingFlower.cpp"
|
||||
"HydrantBroken.cpp"
|
||||
|
@ -119,6 +119,7 @@
|
||||
#include "GfArchway.h"
|
||||
#include "GfMaelstromGeyser.h"
|
||||
#include "PirateRep.h"
|
||||
#include "GfParrotCrash.h"
|
||||
|
||||
// SG Scripts
|
||||
#include "SGCannon.h"
|
||||
@ -504,6 +505,8 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
|
||||
script = new GfMaelstromGeyser();
|
||||
else if (scriptName == "scripts\\ai\\GF\\L_PIRATE_REP.lua")
|
||||
script = new PirateRep();
|
||||
else if (scriptName == "scripts\\ai\\GF\\L_GF_PARROT_CRASH.lua")
|
||||
script = new GfParrotCrash();
|
||||
|
||||
// SG
|
||||
else if (scriptName == "scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua")
|
||||
|
13
dScripts/GfParrotCrash.cpp
Normal file
13
dScripts/GfParrotCrash.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
#include "GfParrotCrash.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "Entity.h"
|
||||
#include "dLogger.h"
|
||||
|
||||
void GfParrotCrash::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) {
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
if (args == "Slow") {
|
||||
skillComponent->CalculateBehavior(m_SlowSkillID, m_SlowBehaviorID, sender->GetObjectID());
|
||||
} else if (args == "Unslow") {
|
||||
skillComponent->CalculateBehavior(m_UnslowSkillID, m_UnslowBehaviorID, sender->GetObjectID());
|
||||
}
|
||||
}
|
13
dScripts/GfParrotCrash.h
Normal file
13
dScripts/GfParrotCrash.h
Normal file
@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
class GfParrotCrash : public CppScripts::Script {
|
||||
public:
|
||||
void OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) override;
|
||||
private:
|
||||
const uint32_t m_SlowSkillID = 795;
|
||||
const uint32_t m_SlowBehaviorID = 14214;
|
||||
const uint32_t m_UnslowSkillID = 796;
|
||||
const uint32_t m_UnslowBehaviorID = 14215;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user