Merge branch 'main' into proper-rocket-holding

This commit is contained in:
Aaron Kimbrell 2022-05-12 08:21:17 -05:00 committed by GitHub
commit 20b45bc27f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 64 additions and 35 deletions

View File

@ -27,6 +27,7 @@ std::vector<LWOMAPID> EntityManager::m_GhostingExcludedZones = {
// Racing zones // Racing zones
1203, 1203,
1261,
1303, 1303,
1403, 1403,

View File

@ -0,0 +1,15 @@
#include "AmTeapotServer.h"
#include "InventoryComponent.h"
#include "GameMessages.h"
void AmTeapotServer::OnUse(Entity* self, Entity* user) {
auto* inventoryComponent = user->GetComponent<InventoryComponent>();
if (!inventoryComponent) return;
if (inventoryComponent->GetLotCount(BLUE_FLOWER_LEAVES) >= 10){
inventoryComponent->RemoveItem(BLUE_FLOWER_LEAVES, 10);
inventoryComponent->AddItem(WU_S_IMAGINATION_TEA, 1);
}
GameMessages::SendTerminateInteraction(user->GetObjectID(), FROM_INTERACTION, self->GetObjectID());
}

10
dScripts/AmTeapotServer.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
#include "CppScripts.h"
class AmTeapotServer : public CppScripts::Script {
public:
void OnUse(Entity* self, Entity* user) override;
private:
LOT BLUE_FLOWER_LEAVES = 12317;
LOT WU_S_IMAGINATION_TEA = 12109;
};

View File

@ -226,6 +226,7 @@
#include "AmSkullkinTower.h" #include "AmSkullkinTower.h"
#include "AmDarklingDragon.h" #include "AmDarklingDragon.h"
#include "AmBlueX.h" #include "AmBlueX.h"
#include "AmTeapotServer.h"
// NJ Scripts // NJ Scripts
#include "NjGarmadonCelebration.h" #include "NjGarmadonCelebration.h"
@ -704,6 +705,8 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
script = new BaseEnemyApe(); script = new BaseEnemyApe();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_BLUE_X.lua") else if (scriptName == "scripts\\02_server\\Map\\AM\\L_BLUE_X.lua")
script = new AmBlueX(); script = new AmBlueX();
else if (scriptName == "scripts\\02_server\\Map\\AM\\L_TEAPOT_SERVER.lua")
script = new AmTeapotServer();
// Ninjago // Ninjago
else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_GARMADON_CELEBRATION_SERVER.lua") else if (scriptName == "scripts\\02_server\\Map\\njhub\\L_GARMADON_CELEBRATION_SERVER.lua")

View File

@ -1092,7 +1092,7 @@ void HandlePacket(Packet* packet) {
noBBB: noBBB:
// Tell the client it's done loading: // Tell the client it's done loading:
GameMessages::SendInvalidZoneTransferList(player, packet->systemAddress, u"https://forms.zohopublic.eu/virtualoffice204/form/DLUInGameSurvey/formperma/kpU-IL5v2-Wt41QcB5UFnYjzlLp-j2LEisF8e11PisU", u"", false, false); GameMessages::SendInvalidZoneTransferList(player, packet->systemAddress, GeneralUtils::ASCIIToUTF16(Game::config->GetValue("source")), u"", false, false);
GameMessages::SendServerDoneLoadingAllObjects(player, packet->systemAddress); GameMessages::SendServerDoneLoadingAllObjects(player, packet->systemAddress);
//Send the player it's mail count: //Send the player it's mail count: