mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 10:18:21 +00:00
Initial NPC script and gating
- TEMP: Adds guilds gating. - FV Guild Master script added which will toggle the guild UI.
This commit is contained in:
parent
2fdcf62ec6
commit
192948a87f
@ -472,6 +472,13 @@ enum eGameActivities : uint32_t {
|
||||
ACTIVITY_PET_TAMING
|
||||
};
|
||||
|
||||
enum eGuildCreationResponses {
|
||||
CREATED = 0,
|
||||
REJECTED_BAD_NAME,
|
||||
REJECTED_EXISTS,
|
||||
UNKNOWN_ERROR
|
||||
};
|
||||
|
||||
enum ePlayerFlags {
|
||||
BTARR_TESTING = 0,
|
||||
PLAYER_HAS_ENTERED_PET_RANCH = 1,
|
||||
|
@ -194,9 +194,9 @@ void AuthPackets::SendLoginResponse(dServer* server, const SystemAddress& sysAdd
|
||||
PacketUtils::WritePacketString("Talk_Like_A_Pirate", 33, &packet);
|
||||
|
||||
// 7 unknown strings - perhaps other IP addresses?
|
||||
PacketUtils::WritePacketString("", 33, &packet);
|
||||
PacketUtils::WritePacketString("", 33, &packet);
|
||||
PacketUtils::WritePacketString("", 33, &packet);
|
||||
PacketUtils::WritePacketString("guilds", 33, &packet);
|
||||
PacketUtils::WritePacketString("ninjago2", 33, &packet);
|
||||
PacketUtils::WritePacketString("test", 33, &packet);
|
||||
PacketUtils::WritePacketString("", 33, &packet);
|
||||
PacketUtils::WritePacketString("", 33, &packet);
|
||||
PacketUtils::WritePacketString("", 33, &packet);
|
||||
|
@ -139,6 +139,7 @@
|
||||
#include "TreasureChestDragonServer.h"
|
||||
#include "InstanceExitTransferPlayerToLastNonInstance.h"
|
||||
#include "FvFreeGfNinjas.h"
|
||||
#include "FvGuildCreate.h"
|
||||
#include "FvPandaServer.h"
|
||||
#include "FvPandaSpawnerServer.h"
|
||||
#include "ZoneFvProperty.h"
|
||||
@ -569,6 +570,8 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
|
||||
script = new InstanceExitTransferPlayerToLastNonInstance();
|
||||
else if (scriptName == "scripts\\ai\\FV\\L_NPC_FREE_GF_NINJAS.lua")
|
||||
script = new FvFreeGfNinjas();
|
||||
else if (scriptName == "scripts\\ai\\FV\\L_GUILD_CREATE.lua")
|
||||
script = new FvGuildCreate();
|
||||
else if (scriptName == "scripts\\ai\\FV\\L_FV_PANDA_SPAWNER_SERVER.lua")
|
||||
script = new FvPandaSpawnerServer();
|
||||
else if (scriptName == "scripts\\ai\\FV\\L_FV_PANDA_SERVER.lua")
|
||||
|
@ -3,6 +3,7 @@ set(DSCRIPTS_SOURCES_AI_FV
|
||||
"FvFlyingCreviceDragon.cpp"
|
||||
"FvDragonSmashingGolemQb.cpp"
|
||||
"FvFreeGfNinjas.cpp"
|
||||
"FvGuildCreate.cpp"
|
||||
"FvPandaSpawnerServer.cpp"
|
||||
"FvPandaServer.cpp"
|
||||
"FvBrickPuzzleServer.cpp"
|
||||
|
14
dScripts/ai/FV/FvGuildCreate.cpp
Normal file
14
dScripts/ai/FV/FvGuildCreate.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "FvGuildCreate.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
// Server script for Guild Master NPC in FV area.
|
||||
// This NPC will react to a user interaction and display
|
||||
// the guild creation screen.
|
||||
|
||||
void FvGuildCreate::OnUse(Entity* self, Entity* user) {
|
||||
AMFStringValue* value = new AMFStringValue();
|
||||
value->SetStringValue("ToggleGuildCreate");
|
||||
AMFArrayValue args;
|
||||
GameMessages::SendUIMessageServerToSingleClient(user, user->GetSystemAddress(), value->GetStringValue(), &args);
|
||||
delete value;
|
||||
}
|
7
dScripts/ai/FV/FvGuildCreate.h
Normal file
7
dScripts/ai/FV/FvGuildCreate.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
class FvGuildCreate : public CppScripts::Script {
|
||||
public:
|
||||
void OnUse(Entity* self, Entity* user) override;
|
||||
};
|
Loading…
Reference in New Issue
Block a user