mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
refactor: remaining game messages as structs, switch removed
Every game message still written or read by hand is now a NetGameMsg with Serialize and Deserialize, in per-domain files: - MovementMessages: teleport, platforms (resync and its request), orient to angle, node rotation lock, gravity scale, jetpack mode, control scheme, respawn checkpoint, rails (set/start, ready, cancel, arrived), mount inventory ID, dismount complete, possession ack, ghost reference override and position, camera cycling (eCameraTargetCyclingMode moves here). - ZoneMessages: player loaded (the old PLAYER_LOADED case), ready for updates, player ready, restore to post load stats, server done loading, invalid zone transfer list, zone summary display/dismissed, level processing complete, object world state, and the localized announcement WorldMigration wrote by hand. - PlayerMessages: chat mode, GM level, LEGO score, currency, reputation, GM invis, pickup currency, zone and player statistics, chat commands, bug reports, verify ack. - ObjectMessages: fire event client/server side, notify client (zone) object, notify object, script network vars, failed preconditions, terminate interaction, set name, request use, request server object info. - QuickBuildMessages: notify state, enable, cancel. - ActivityMessages gains match response/update/request, leaderboard request and data, shooting gallery score/rotation/fire, activity state change. - MissionMessages gains MissionDialogueCancelled (a no-op, as before). The wire structs left in GameMessages.h move to their domains (tooltip and emote to Effects, loot and item use to Inventory, model build to Building, behavior sound to Property, skill sets to Skill) and gain the missing direction. The dismount logic moves to PossessorComponent::OnDismountComplete. Every inbound message is registered in the GameMessageHandler map; the switch is gone, and GameMessages.cpp only holds the GameMsg/NetGameMsg base code. Call sites build the structs (NotifyClientObject, TerminateInteraction, Teleport, PlatformResync, FireEventClientSide, NotifyObject and NotifyClientZoneObject get convenience constructors like PlayFXEffect). Dead senders are dropped: SendSetShootingGalleryParams (no callers, field order was a guess), SendTeamPickupItem (the struct already existed), SendRequestActivitySummaryLeaderboardData (the struct covers it). Verified with RemainingMessagesTests: every old Send* function is frozen verbatim in Legacy/RemainingMessagesLegacy.h and compared byte for byte (same bits, destination and broadcast flag) over grids of inputs; every old Handle* read sequence is frozen as a Read* oracle and compared with the struct's Deserialize; round trips, truncation and a golden packet. PlayerLoaded (0x00dc36f0), SetGMLevel (0x00dd6230), MissionDialogueCancelled (0x00d9cc10) and LocalizedAnnouncementServerToSingleClient (0x00f23c50) were checked against the client. Behaviour notes: an inbound message that fails to deserialize is dropped, so ParseChatMessage over MAX_MESSAGE_LENGTH is dropped instead of truncated, and PLAYER_LOADED / READY_FOR_UPDATES / MISSION_DIALOGUE_CANCELLED now read their (unused) client fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "AgCagedBricksServer.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Character.h"
|
||||
#include "EntityManager.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
@@ -10,7 +11,7 @@ void AgCagedBricksServer::OnUse(Entity* self, Entity* user) {
|
||||
//Tell the client to spawn the baby spiderling:
|
||||
auto spooders = Game::entityManager->GetEntitiesInGroup("cagedSpider");
|
||||
for (auto spodder : spooders) {
|
||||
GameMessages::SendFireEventClientSide(spodder->GetObjectID(), user->GetSystemAddress(), u"toggle", LWOOBJID_EMPTY, 0, 0, user->GetObjectID());
|
||||
GameMessages::FireEventClientSide(spodder->GetObjectID(), u"toggle", LWOOBJID_EMPTY, user->GetObjectID()).SendToClient(user->GetSystemAddress());
|
||||
}
|
||||
|
||||
//Set the flag & mission status:
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "ScriptedActivityComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ActivityMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "LeaderboardManager.h"
|
||||
#include "dServer.h"
|
||||
#include "eMissionTaskType.h"
|
||||
@@ -21,9 +22,9 @@ void NpcAgCourseStarter::OnUse(Entity* self, Entity* user) {
|
||||
const auto& userSysAddr = user->GetSystemAddress();
|
||||
|
||||
if (scriptedActivityComponent->PlayerHasActivityData(userId)) {
|
||||
GameMessages::SendNotifyClientObject(selfId, u"exit", 0, 0, LWOOBJID_EMPTY, "", userSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"exit", 0, 0, LWOOBJID_EMPTY, "").Send(userSysAddr);
|
||||
} else {
|
||||
GameMessages::SendNotifyClientObject(selfId, u"start", 0, 0, LWOOBJID_EMPTY, "", userSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"start", 0, 0, LWOOBJID_EMPTY, "").Send(userSysAddr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,14 +37,14 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3
|
||||
const auto& senderSysAddr = sender->GetSystemAddress();
|
||||
|
||||
if (identifier == u"player_dialog_cancel_course" && button == 1) {
|
||||
GameMessages::SendNotifyClientObject(selfId, u"stop_timer", 0, 0, LWOOBJID_EMPTY, "", senderSysAddr);
|
||||
GameMessages::SendNotifyClientObject(selfId, u"cancel_timer", 0, 0, LWOOBJID_EMPTY, "", senderSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"stop_timer", 0, 0, LWOOBJID_EMPTY, "").Send(senderSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"cancel_timer", 0, 0, LWOOBJID_EMPTY, "").Send(senderSysAddr);
|
||||
|
||||
scriptedActivityComponent->RemoveActivityPlayerData(senderId);
|
||||
|
||||
Game::entityManager->SerializeEntity(self);
|
||||
} else if (identifier == u"player_dialog_start_course" && button == 1) {
|
||||
GameMessages::SendNotifyClientObject(selfId, u"start_timer", 0, 0, LWOOBJID_EMPTY, "", senderSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"start_timer", 0, 0, LWOOBJID_EMPTY, "").Send(senderSysAddr);
|
||||
GameMessages::ActivityStart activityStart;
|
||||
activityStart.target = selfId;
|
||||
activityStart.Send(senderSysAddr);
|
||||
@@ -57,12 +58,12 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3
|
||||
|
||||
Game::entityManager->SerializeEntity(self);
|
||||
} else if (identifier == u"FootRaceCancel") {
|
||||
GameMessages::SendNotifyClientObject(selfId, u"stop_timer", 0, 0, LWOOBJID_EMPTY, "", senderSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"stop_timer", 0, 0, LWOOBJID_EMPTY, "").Send(senderSysAddr);
|
||||
|
||||
if (scriptedActivityComponent->PlayerHasActivityData(senderId)) {
|
||||
GameMessages::SendNotifyClientObject(selfId, u"exit", 0, 0, LWOOBJID_EMPTY, "", senderSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"exit", 0, 0, LWOOBJID_EMPTY, "").Send(senderSysAddr);
|
||||
} else {
|
||||
GameMessages::SendNotifyClientObject(selfId, u"start", 0, 0, LWOOBJID_EMPTY, "", senderSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"start", 0, 0, LWOOBJID_EMPTY, "").Send(senderSysAddr);
|
||||
}
|
||||
|
||||
scriptedActivityComponent->RemoveActivityPlayerData(senderId);
|
||||
@@ -80,8 +81,7 @@ void NpcAgCourseStarter::OnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
if (!scriptedActivityComponent->PlayerHasActivityData(senderId)) return;
|
||||
|
||||
if (args == "course_cancel") {
|
||||
GameMessages::SendNotifyClientObject(selfId, u"cancel_timer", 0, 0,
|
||||
LWOOBJID_EMPTY, "", senderSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"cancel_timer", 0, 0, LWOOBJID_EMPTY, "").Send(senderSysAddr);
|
||||
scriptedActivityComponent->RemoveActivityPlayerData(senderId);
|
||||
} else if (args == "course_finish") {
|
||||
const auto raceEndTime = Game::server->GetUptime();
|
||||
@@ -102,11 +102,8 @@ void NpcAgCourseStarter::OnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
Game::entityManager->SerializeEntity(self);
|
||||
LeaderboardManager::SaveScore(senderId, scriptedActivityComponent->GetActivityID(), raceTimeElapsed);
|
||||
|
||||
GameMessages::SendNotifyClientObject(selfId, u"ToggleLeaderBoard",
|
||||
scriptedActivityComponent->GetActivityID(), 0, senderId,
|
||||
"", senderSysAddr);
|
||||
GameMessages::SendNotifyClientObject(selfId, u"stop_timer", 1, raceTimeElapsed, LWOOBJID_EMPTY, "",
|
||||
senderSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"ToggleLeaderBoard", scriptedActivityComponent->GetActivityID(), 0, senderId, "").Send(senderSysAddr);
|
||||
GameMessages::NotifyClientObject(selfId, u"stop_timer", 1, raceTimeElapsed, LWOOBJID_EMPTY, "").Send(senderSysAddr);
|
||||
|
||||
scriptedActivityComponent->RemoveActivityPlayerData(senderId);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "eMissionState.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "ObjectMessages.h"
|
||||
|
||||
void NpcCowboyServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
||||
if (missionID != 1880) {
|
||||
@@ -34,7 +35,6 @@ void NpcCowboyServer::OnMissionDialogueOK(Entity* self, Entity* target, int miss
|
||||
auto spawners = Game::zoneManager->GetSpawnersByName("PlungerGunTargets");
|
||||
for (auto* spawner : spawners) {
|
||||
for (const auto entity : spawner->GetSpawnedObjectIDs())
|
||||
GameMessages::SendNotifyClientObject(entity, u"SetVisibility", visible, 0,
|
||||
target->GetObjectID(), "", target->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(entity, u"SetVisibility", visible, 0, target->GetObjectID(), "").Send(target->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NpcNjAssistantServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "Item.h"
|
||||
@@ -10,7 +11,7 @@ void NpcNjAssistantServer::OnMissionDialogueOK(Entity* self, Entity* target, int
|
||||
if (missionID != mailMission) return;
|
||||
|
||||
if (missionState == eMissionState::COMPLETE || missionState == eMissionState::READY_TO_COMPLETE) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"switch", 0, 0, LWOOBJID_EMPTY, "", target->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"switch", 0, 0, LWOOBJID_EMPTY, "").Send(target->GetSystemAddress());
|
||||
|
||||
auto* inv = static_cast<InventoryComponent*>(target->GetComponent(eReplicaComponentType::INVENTORY));
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "dZoneManager.h"
|
||||
#include "Entity.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "eMissionState.h"
|
||||
#include "Spawner.h"
|
||||
|
||||
@@ -39,8 +40,7 @@ void NpcWispServer::OnMissionDialogueOK(Entity* self, Entity* target, int missio
|
||||
auto spawners = Game::zoneManager->GetSpawnersByName(group);
|
||||
for (const auto* spawner : spawners) {
|
||||
for (const auto objId : spawner->GetSpawnedObjectIDs())
|
||||
GameMessages::SendNotifyClientObject(objId, u"SetVisibility", visible, 0,
|
||||
target->GetObjectID(), "", target->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(objId, u"SetVisibility", visible, 0, target->GetObjectID(), "").Send(target->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "ZoneAgSpiderQueen.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "ZoneAgProperty.h"
|
||||
#include "DestroyableComponent.h"
|
||||
@@ -36,16 +37,14 @@ void ZoneAgSpiderQueen::BasePlayerLoaded(Entity* self, Entity* player) {
|
||||
}
|
||||
|
||||
self->SetNetworkVar(u"unclaimed", true);
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"maelstromSkyOn", 0, 0, LWOOBJID_EMPTY,
|
||||
"", player->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"maelstromSkyOn", 0, 0, LWOOBJID_EMPTY, "").Send(player->GetSystemAddress());
|
||||
}
|
||||
|
||||
void
|
||||
ZoneAgSpiderQueen::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2,
|
||||
int32_t param3) {
|
||||
if (args == "ClearProperty") {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PlayCinematic", 0, 0,
|
||||
LWOOBJID_EMPTY, destroyedCinematic, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"PlayCinematic", 0, 0, LWOOBJID_EMPTY, destroyedCinematic).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("tornadoOff", 0.5f);
|
||||
} else {
|
||||
ZoneAgProperty::BaseOnFireEventServerSide(self, sender, args);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "AmDrawBridge.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "SimplePhysicsComponent.h"
|
||||
#include "eTerminateType.h"
|
||||
|
||||
@@ -26,7 +27,7 @@ void AmDrawBridge::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
auto* player = user;
|
||||
|
||||
GameMessages::SendTerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
void AmDrawBridge::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "AmTeapotServer.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Item.h"
|
||||
#include "eTerminateType.h"
|
||||
|
||||
@@ -14,5 +15,5 @@ void AmTeapotServer::OnUse(Entity* self, Entity* user) {
|
||||
inventoryComponent->AddItem(WU_S_IMAGINATION_TEA, 1);
|
||||
}
|
||||
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionState.h"
|
||||
#include "InventoryComponent.h"
|
||||
@@ -89,7 +90,7 @@ void ImgBrickConsoleQB::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
self->SetNetworkVar(u"used", true);
|
||||
|
||||
GameMessages::SendTerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "CombatMessages.h"
|
||||
#include "MovementMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
@@ -39,7 +41,7 @@ void GfCaptainsCannon::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
auto rotation = self->GetRotation();
|
||||
|
||||
GameMessages::SendTeleport(user->GetObjectID(), position, rotation, user->GetSystemAddress());
|
||||
GameMessages::Teleport(user->GetObjectID(), position, rotation).SendToClient(user->GetSystemAddress());
|
||||
|
||||
RenderComponent::PlayAnimation(user, u"cannon-strike-no-equip");
|
||||
|
||||
@@ -107,6 +109,6 @@ void GfCaptainsCannon::OnTimerDone(Entity* self, std::string timerName) {
|
||||
missionComponent->ForceProgress(601, 910, 1);
|
||||
}
|
||||
|
||||
GameMessages::SendTerminateInteraction(playerId, eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(playerId, eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "GfTikiTorch.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
@@ -8,6 +9,7 @@
|
||||
#include "RenderComponent.h"
|
||||
#include "eTerminateType.h"
|
||||
#include "Loot.h"
|
||||
#include "InventoryMessages.h"
|
||||
|
||||
void GfTikiTorch::OnStartup(Entity* self) {
|
||||
LightTorch(self);
|
||||
@@ -43,7 +45,7 @@ void GfTikiTorch::OnTimerDone(Entity* self, std::string timerName) {
|
||||
Entity* player = Game::entityManager->GetEntity(self->GetI64(u"userID"));
|
||||
|
||||
if (player != nullptr && player->GetCharacter()) {
|
||||
GameMessages::SendTerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
self->SetBoolean(u"isInUse", false);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "CombatMessages.h"
|
||||
#include "MovementMessages.h"
|
||||
#include "Preconditions.h"
|
||||
#include "eEndBehavior.h"
|
||||
#include "DestroyableComponent.h"
|
||||
@@ -51,9 +52,9 @@ void MastTeleport::OnTimerDone(Entity* self, std::string timerName) {
|
||||
auto position = self->GetPosition();
|
||||
auto rotation = self->GetRotation();
|
||||
|
||||
GameMessages::SendTeleport(playerId, position, rotation, player->GetSystemAddress(), true);
|
||||
GameMessages::Teleport(playerId, position, rotation, true).SendToClient(player->GetSystemAddress());
|
||||
|
||||
GameMessages::SendTeleport(playerId, position, rotation, player->GetSystemAddress(), true);
|
||||
GameMessages::Teleport(playerId, position, rotation, true).SendToClient(player->GetSystemAddress());
|
||||
|
||||
const auto cinematic = GeneralUtils::UTF16ToWTF8(self->GetVar<std::u16string>(u"Cinematic"));
|
||||
const auto leanIn = self->GetVar<float>(u"LeanIn");
|
||||
@@ -97,9 +98,13 @@ void MastTeleport::OnTimerDone(Entity* self, std::string timerName) {
|
||||
position.y += 12;
|
||||
position.z += (forward.z * 20.5f);
|
||||
|
||||
GameMessages::SendOrientToAngle(playerId, true, rads, player->GetSystemAddress());
|
||||
GameMessages::OrientToAngle orientToAngle;
|
||||
orientToAngle.target = playerId;
|
||||
orientToAngle.bRelativeToCurrent = true;
|
||||
orientToAngle.fAngle = rads;
|
||||
orientToAngle.Send(player->GetSystemAddress());
|
||||
|
||||
GameMessages::SendTeleport(playerId, position, QuatUtils::IDENTITY, player->GetSystemAddress());
|
||||
GameMessages::Teleport(playerId, position, QuatUtils::IDENTITY).SendToClient(player->GetSystemAddress());
|
||||
|
||||
GameMessages::SetStunned stun;
|
||||
stun.target = playerId;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "BankInteractServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Entity.h"
|
||||
#include "Amf3.h"
|
||||
|
||||
@@ -29,6 +30,6 @@ void BankInteractServer::OnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(sender->GetSystemAddress());
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"CloseBank", 0, 0, LWOOBJID_EMPTY, "", sender->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"CloseBank", 0, 0, LWOOBJID_EMPTY, "").Send(sender->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "Binoculars.h"
|
||||
#include "Character.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Game.h"
|
||||
#include "dServer.h"
|
||||
|
||||
@@ -15,6 +16,6 @@ void Binoculars::OnUse(Entity* self, Entity* user) {
|
||||
if (!flagMsg.flag) {
|
||||
auto* const character = user->GetCharacter();
|
||||
if (character) character->SetPlayerFlag(flag, true);
|
||||
GameMessages::SendFireEventClientSide(self->GetObjectID(), user->GetSystemAddress(), u"achieve", LWOOBJID_EMPTY, 0, -1, LWOOBJID_EMPTY);
|
||||
GameMessages::FireEventClientSide(self->GetObjectID(), u"achieve", LWOOBJID_EMPTY, LWOOBJID_EMPTY).SendToClient(user->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "ImaginationBackpackHealServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionTaskType.h"
|
||||
#include "eMissionState.h"
|
||||
@@ -15,8 +16,7 @@ void ImaginationBackpackHealServer::OnSkillEventFired(Entity* self, Entity* cast
|
||||
auto* missionComponent = caster->GetComponent<MissionComponent>();
|
||||
if (missionComponent != nullptr && missionComponent->GetMissionState(healMission) == eMissionState::ACTIVE) {
|
||||
missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT());
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"ClearMaelstrom", 0, 0,
|
||||
caster->GetObjectID(), "", caster->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"ClearMaelstrom", 0, 0, caster->GetObjectID(), "").Send(caster->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "PropertyPlatform.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "MovementMessages.h"
|
||||
#include "MovingPlatformComponent.h"
|
||||
|
||||
void PropertyPlatform::OnQuickBuildComplete(Entity* self, Entity* target) {
|
||||
@@ -9,8 +10,7 @@ void PropertyPlatform::OnQuickBuildComplete(Entity* self, Entity* target) {
|
||||
// movingPlatform->StopPathing();
|
||||
// movingPlatform->SetNoAutoStart(true);
|
||||
// }
|
||||
GameMessages::SendPlatformResync(self, UNASSIGNED_SYSTEM_ADDRESS, true, 0,
|
||||
0, 0, eMovementPlatformState::Stationary);
|
||||
GameMessages::PlatformResync(*self, true, 0, 0, 0, eMovementPlatformState::Stationary).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
void PropertyPlatform::OnUse(Entity* self, Entity* user) {
|
||||
@@ -20,8 +20,7 @@ void PropertyPlatform::OnUse(Entity* self, Entity* user) {
|
||||
// if (movingPlatform != nullptr) {
|
||||
// movingPlatform->GotoWaypoint(1);
|
||||
// }
|
||||
GameMessages::SendPlatformResync(self, UNASSIGNED_SYSTEM_ADDRESS, true, 0,
|
||||
1, 1, eMovementPlatformState::Moving);
|
||||
GameMessages::PlatformResync(*self, true, 0, 1, 1, eMovementPlatformState::Moving).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddCallbackTimer(movementDelay + effectDelay, [self, this]() {
|
||||
self->SetNetworkVar<float_t>(u"startEffect", dieDelay);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Character.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "dServer.h"
|
||||
#include "Amf3.h"
|
||||
#include "Entity.h"
|
||||
@@ -54,7 +55,7 @@ void StoryBoxInteractServer::OnUse(Entity* self, Entity* user) {
|
||||
if (!flagMsg.flag) {
|
||||
auto* const character = user->GetCharacter();
|
||||
if (character) character->SetPlayerFlag(boxFlag, true);
|
||||
GameMessages::SendFireEventClientSide(self->GetObjectID(), user->GetSystemAddress(), u"achieve", LWOOBJID_EMPTY, 0, -1, LWOOBJID_EMPTY);
|
||||
GameMessages::FireEventClientSide(self->GetObjectID(), u"achieve", LWOOBJID_EMPTY, LWOOBJID_EMPTY).SendToClient(user->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "InventoryComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Character.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
#include "eTerminateType.h"
|
||||
@@ -38,5 +39,5 @@ void TokenConsoleServer::OnUse(Entity* self, Entity* user) {
|
||||
inv->AddItem(tokenLOT, tokensToGive, eLootSourceType::NONE);
|
||||
}
|
||||
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "eMissionState.h"
|
||||
#include "Game.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "ObjectMessages.h"
|
||||
|
||||
void VisToggleNotifierServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionId, eMissionState missionState) {
|
||||
auto itr = m_GameVariables.find(missionId);
|
||||
@@ -16,7 +17,7 @@ void VisToggleNotifierServer::OnMissionDialogueOK(Entity* self, Entity* target,
|
||||
for (const auto spawner : spawners) {
|
||||
const auto& spawnedObjIds = spawner->GetSpawnedObjectIDs();
|
||||
for (const auto& objId : spawnedObjIds) {
|
||||
GameMessages::SendNotifyClientObject(objId, u"SetVisibility", visible);
|
||||
GameMessages::NotifyClientObject(objId, u"SetVisibility", visible).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "ScriptedActivityComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Loot.h"
|
||||
#include "EntityManager.h"
|
||||
#include "eTerminateType.h"
|
||||
@@ -29,7 +30,7 @@ void WishingWellServer::OnUse(Entity* self, Entity* user) {
|
||||
GeneralUtils::GenerateRandomNumber<int32_t>(1, 1000)
|
||||
);
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"StartCooldown", 0, 0, LWOOBJID_EMPTY, "", user->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"StartCooldown", 0, 0, LWOOBJID_EMPTY, "").Send(user->GetSystemAddress());
|
||||
|
||||
const auto userID = user->GetObjectID();
|
||||
|
||||
@@ -38,10 +39,10 @@ void WishingWellServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
if (user == nullptr) return;
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"StopCooldown", 0, 0, LWOOBJID_EMPTY, "", user->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"StopCooldown", 0, 0, LWOOBJID_EMPTY, "").Send(user->GetSystemAddress());
|
||||
});
|
||||
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
void WishingWellServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "InventoryComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Character.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
@@ -58,5 +59,5 @@ void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
missionComponent->ForceProgressTaskType(863, 1, 1, false);
|
||||
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "NTPipeVisibilityServer.h"
|
||||
#include "Entity.h"
|
||||
#include "Character.h"
|
||||
#include "ObjectMessages.h"
|
||||
|
||||
void NTPipeVisibilityServer::OnQuickBuildComplete(Entity* self, Entity* target) {
|
||||
const auto flag = self->GetVar<int32_t>(u"flag");
|
||||
@@ -11,5 +12,5 @@ void NTPipeVisibilityServer::OnQuickBuildComplete(Entity* self, Entity* target)
|
||||
|
||||
character->SetPlayerFlag(flag, true);
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PipeBuilt");
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"PipeBuilt").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "CombatMessages.h"
|
||||
#include "MovementMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionTaskType.h"
|
||||
@@ -103,7 +104,7 @@ void NtAssemblyTubeServer::TeleportPlayer(Entity* self, Entity* player) {
|
||||
const auto destPosition = destination->GetPosition();
|
||||
const auto destRotation = destination->GetRotation();
|
||||
|
||||
GameMessages::SendTeleport(player->GetObjectID(), destPosition, destRotation, player->GetSystemAddress(), true);
|
||||
GameMessages::Teleport(player->GetObjectID(), destPosition, destRotation, true).SendToClient(player->GetSystemAddress());
|
||||
|
||||
RenderComponent::PlayAnimation(player, u"tube-resurrect", 4.0f);
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ActivityMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
|
||||
void NtCombatChallengeServer::OnUse(Entity* self, Entity* user) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"UI_Open", 0, 0, user->GetObjectID(), "", user->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"UI_Open", 0, 0, user->GetObjectID(), "").Send(user->GetSystemAddress());
|
||||
}
|
||||
|
||||
void NtCombatChallengeServer::OnDie(Entity* self, Entity* killer) {
|
||||
@@ -40,7 +41,7 @@ void NtCombatChallengeServer::OnHitOrHealResult(Entity* self, Entity* attacker,
|
||||
|
||||
void NtCombatChallengeServer::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1,
|
||||
int32_t param2, int32_t param3) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"UI_Close", 0, 0, sender->GetObjectID(), "", sender->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"UI_Close", 0, 0, sender->GetObjectID(), "").Send(sender->GetSystemAddress());
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +67,7 @@ void NtCombatChallengeServer::OnMessageBoxResponse(Entity* self, Entity* sender,
|
||||
|
||||
self->SetNetworkVar(u"toggle", true);
|
||||
} else if (identifier == u"CloseButton") {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"UI_Close", 1, 0, sender->GetObjectID(), "", sender->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"UI_Close", 1, 0, sender->GetObjectID(), "").Send(sender->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NtImagimeterVisibility.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Entity.h"
|
||||
#include "Character.h"
|
||||
#include "ePlayerFlag.h"
|
||||
@@ -8,5 +9,5 @@ void NTImagimeterVisibility::OnQuickBuildComplete(Entity* self, Entity* target)
|
||||
auto* character = target->GetCharacter();
|
||||
if (character) character->SetPlayerFlag(ePlayerFlag::NT_PLINTH_REBUILD, true);
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PlinthBuilt", 0, 0, LWOOBJID_EMPTY, "", target->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"PlinthBuilt", 0, 0, LWOOBJID_EMPTY, "").Send(target->GetSystemAddress());
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "CombatMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Character.h"
|
||||
@@ -11,9 +12,9 @@
|
||||
#include "eStateChangeType.h"
|
||||
|
||||
void NtParadoxPanelServer::OnUse(Entity* self, Entity* user) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"bActive", 1, 0, user->GetObjectID(), "", user->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"bActive", 1, 0, user->GetObjectID(), "").Send(user->GetSystemAddress());
|
||||
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->SetVar(u"bActive", true);
|
||||
|
||||
@@ -40,7 +41,7 @@ void NtParadoxPanelServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
RenderComponent::PlayAnimation(player, u"rebuild-celebrate");
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"SparkStop", 0, 0, player->GetObjectID(), "", player->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"SparkStop", 0, 0, player->GetObjectID(), "").Send(player->GetSystemAddress());
|
||||
GameMessages::SetStunned stun;
|
||||
stun.target = player->GetObjectID();
|
||||
stun.StateChangeType = eStateChangeType::POP;
|
||||
@@ -81,7 +82,7 @@ void NtParadoxPanelServer::OnUse(Entity* self, Entity* user) {
|
||||
return;
|
||||
}
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"bActive", 0, 0, player->GetObjectID(), "", player->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"bActive", 0, 0, player->GetObjectID(), "").Send(player->GetSystemAddress());
|
||||
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "console_sparks").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "CombatMessages.h"
|
||||
#include "MovementMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionTaskType.h"
|
||||
@@ -85,7 +86,7 @@ void NtParadoxTeleServer::TeleportPlayer(Entity* self, Entity* player) {
|
||||
cinematic.Send(player->GetSystemAddress());
|
||||
}
|
||||
|
||||
GameMessages::SendTeleport(player->GetObjectID(), destPosition, destRotation, player->GetSystemAddress(), true);
|
||||
GameMessages::Teleport(player->GetObjectID(), destPosition, destRotation, true).SendToClient(player->GetSystemAddress());
|
||||
|
||||
RenderComponent::PlayAnimation(player, u"paradox-teleport-in", 4.0f);
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "CombatMessages.h"
|
||||
#include "MovementMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Entity.h"
|
||||
#include "GeneralUtils.h"
|
||||
@@ -40,7 +42,7 @@ void NtVentureCannonServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
auto destRotation = self->GetRotation();
|
||||
|
||||
GameMessages::SendTeleport(playerID, destPosition, destRotation, player->GetSystemAddress(), true);
|
||||
GameMessages::Teleport(playerID, destPosition, destRotation, true).SendToClient(player->GetSystemAddress());
|
||||
|
||||
RenderComponent::PlayAnimation(player, u"scale-down", 4.0f);
|
||||
|
||||
@@ -140,7 +142,7 @@ void NtVentureCannonServer::UnlockCannonPlayer(Entity* self, Entity* player) {
|
||||
|
||||
self->SetNetworkVar(u"bIsInUse", false);
|
||||
|
||||
GameMessages::SendTerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
void NtVentureCannonServer::FirePlayer(Entity* self, Entity* player) {
|
||||
@@ -158,7 +160,7 @@ void NtVentureCannonServer::FirePlayer(Entity* self, Entity* player) {
|
||||
const auto destPosition = destination->GetPosition();
|
||||
const auto destRotation = destination->GetRotation();
|
||||
|
||||
GameMessages::SendTeleport(player->GetObjectID(), destPosition, destRotation, player->GetSystemAddress(), true);
|
||||
GameMessages::Teleport(player->GetObjectID(), destPosition, destRotation, true).SendToClient(player->GetSystemAddress());
|
||||
|
||||
RenderComponent::PlayAnimation(player, u"venture-cannon-out", 4.0f);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
|
||||
void HydrantBroken::OnStartup(Entity* self) {
|
||||
self->AddTimer("playEffect", 1);
|
||||
@@ -19,7 +20,7 @@ void HydrantBroken::OnStartup(Entity* self) {
|
||||
msg.bActive = true;
|
||||
msg.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
GameMessages::SendNotifyObject(bouncer->GetObjectID(), self->GetObjectID(), u"enableCollision", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyObject(bouncer->GetObjectID(), self->GetObjectID(), u"enableCollision").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
self->AddTimer("KillBroken", 25);
|
||||
@@ -35,7 +36,7 @@ void HydrantBroken::OnTimerDone(Entity* self, std::string timerName) {
|
||||
msg.bActive = false;
|
||||
msg.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
GameMessages::SendNotifyObject(bouncer->GetObjectID(), self->GetObjectID(), u"disableCollision", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyObject(bouncer->GetObjectID(), self->GetObjectID(), u"disableCollision").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
self->Kill();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "SpawnGryphonServer.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionState.h"
|
||||
#include "eTerminateType.h"
|
||||
@@ -21,7 +22,7 @@ void SpawnGryphonServer::OnUse(Entity* self, Entity* user) {
|
||||
if (missionComponent != nullptr && inventoryComponent != nullptr
|
||||
&& missionComponent->GetMissionState(1391) == eMissionState::ACTIVE) {
|
||||
inventoryComponent->RemoveItem(12483, inventoryComponent->GetLotCount(12483), eInventoryType::ALL);
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::TerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Entity.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "RenderComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
@@ -67,8 +68,7 @@ void ZoneAgProperty::OnPlayerLoaded(Entity* self, Entity* player) {
|
||||
ambientSound.target = player->GetObjectID();
|
||||
ambientSound.audioGUID = GUIDMaelstrom;
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"maelstromSkyOn", 0, 0,
|
||||
LWOOBJID_EMPTY, "", player->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"maelstromSkyOn", 0, 0, LWOOBJID_EMPTY, "").Send(player->GetSystemAddress());
|
||||
|
||||
self->SetNetworkVar(u"unclaimed", true);
|
||||
|
||||
@@ -176,8 +176,7 @@ void ZoneAgProperty::StartMaelstrom(Entity* self, Entity* player) {
|
||||
StartTornadoFx(self);
|
||||
|
||||
if (player != nullptr) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"maelstromSkyOn", 0, 0, LWOOBJID_EMPTY,
|
||||
"", player->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"maelstromSkyOn", 0, 0, LWOOBJID_EMPTY, "").Send(player->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +204,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
|
||||
|
||||
auto* entity = entities[0];
|
||||
|
||||
GameMessages::SendNotifyClientObject(Game::entityManager->GetZoneControlEntity()->GetObjectID(), u"GuardChat", 0, 0, entity->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(Game::entityManager->GetZoneControlEntity()->GetObjectID(), u"GuardChat", 0, 0, entity->GetObjectID(), "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
LoadProperty(self);
|
||||
|
||||
self->AddTimer("KillGuard", 5);
|
||||
@@ -235,8 +234,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
|
||||
self->AddTimer("turnSkyOff", 1.5f);
|
||||
self->AddTimer("killFXObject", 8);
|
||||
} else if (timerName == "turnSkyOff") {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"SkyOff", 0, 0, LWOOBJID_EMPTY,
|
||||
"", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"SkyOff", 0, 0, LWOOBJID_EMPTY, "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == "killSpider") {
|
||||
for (auto* entity : Game::entityManager->GetEntitiesInGroup(self->GetVar<std::string>(EnemiesGroup))) {
|
||||
entity->Kill();
|
||||
@@ -271,13 +269,12 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
}
|
||||
} else if (timerName == "ShowVendor") {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"vendorOn", 0, 0, LWOOBJID_EMPTY, "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"vendorOn", 0, 0, LWOOBJID_EMPTY, "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
for (const auto& ambient : self->GetVar<std::vector<std::string>>(AmbientFXSpawner)) {
|
||||
ActivateSpawner(ambient);
|
||||
}
|
||||
} else if (timerName == "BoundsVisOn") {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"boundsAnim", 0, 0,
|
||||
LWOOBJID_EMPTY, "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"boundsAnim", 0, 0, LWOOBJID_EMPTY, "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == "runPlayerLoadedAgain") {
|
||||
CheckForOwner(self);
|
||||
} else if (timerName == "pollTornadoFX") {
|
||||
@@ -424,8 +421,7 @@ void ZoneAgProperty::BaseOnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
|
||||
auto* const character = player->GetCharacter();
|
||||
if (character) character->SetPlayerFlag(self->GetVar<int32_t>(defeatedProperyFlag), true);
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PlayCinematic", 0, 0,
|
||||
LWOOBJID_EMPTY, destroyedCinematic, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"PlayCinematic", 0, 0, LWOOBJID_EMPTY, destroyedCinematic).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddTimer("tornadoOff", 0.5f);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Amf3.h"
|
||||
#include "Entity.h"
|
||||
|
||||
@@ -31,8 +32,7 @@ void PropertyBankInteract::OnUse(Entity* self, Entity* user) {
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(user->GetSystemAddress());
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"OpenBank", 0, 0, LWOOBJID_EMPTY,
|
||||
"", user->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"OpenBank", 0, 0, LWOOBJID_EMPTY, "").Send(user->GetSystemAddress());
|
||||
}
|
||||
|
||||
void PropertyBankInteract::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1,
|
||||
@@ -48,7 +48,6 @@ void PropertyBankInteract::OnFireEventServerSide(Entity* self, Entity* sender, s
|
||||
uiMessage.args = std::move(amfArgs);
|
||||
uiMessage.SendToClient(sender->GetSystemAddress());
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"CloseBank", 0, 0, LWOOBJID_EMPTY,
|
||||
"", sender->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"CloseBank", 0, 0, LWOOBJID_EMPTY, "").Send(sender->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "eMissionState.h"
|
||||
|
||||
void VeBricksampleServer::OnUse(Entity* self, Entity* user) {
|
||||
@@ -15,7 +16,7 @@ void VeBricksampleServer::OnUse(Entity* self, Entity* user) {
|
||||
inventoryComponent->AddItem(loot, 1, eLootSourceType::NONE);
|
||||
|
||||
for (auto* brickEntity : Game::entityManager->GetEntitiesInGroup("Bricks")) {
|
||||
GameMessages::SendNotifyClientObject(brickEntity->GetObjectID(), u"Pickedup");
|
||||
GameMessages::NotifyClientObject(brickEntity->GetObjectID(), u"Pickedup").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Character.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "eMissionState.h"
|
||||
#include "Entity.h"
|
||||
|
||||
@@ -22,7 +23,7 @@ void VeEpsilonServer::OnMissionDialogueOK(Entity* self, Entity* target, int miss
|
||||
// Notify the client that all objects have updated
|
||||
self->AddCallbackTimer(3.0f, [this]() {
|
||||
for (const auto* console : Game::entityManager->GetEntitiesInGroup(m_ConsoleGroup)) {
|
||||
GameMessages::SendNotifyClientObject(console->GetObjectID(), u"");
|
||||
GameMessages::NotifyClientObject(console->GetObjectID(), u"").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "InventoryComponent.h"
|
||||
#include "Character.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Loot.h"
|
||||
#include "eTerminateType.h"
|
||||
|
||||
@@ -22,6 +23,6 @@ void VeMissionConsole::OnUse(Entity* self, Entity* user) {
|
||||
character->SetPlayerFlag(flag, true);
|
||||
}
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"");
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::TerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "PetMessages.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Entity.h"
|
||||
#include "RenderComponent.h"
|
||||
@@ -65,7 +66,7 @@ void CatapultBaseServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (bouncer == nullptr) return;
|
||||
|
||||
// kill the bouncer
|
||||
GameMessages::SendNotifyClientObject(bouncer->GetObjectID(), u"TimeToDie");
|
||||
GameMessages::NotifyClientObject(bouncer->GetObjectID(), u"TimeToDie").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
bouncer->Smash(self->GetObjectID(), eKillType::VIOLENT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include "CatapultBouncerServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "EntityManager.h"
|
||||
|
||||
void CatapultBouncerServer::OnQuickBuildComplete(Entity* self, Entity* target) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"Built", 0, 0, LWOOBJID_EMPTY, "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"Built", 0, 0, LWOOBJID_EMPTY, "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->SetNetworkVar<bool>(u"Built", true);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "Character.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "RenderComponent.h"
|
||||
@@ -158,7 +159,7 @@ void CavePrisonCage::OnTimerDone(Entity* self, std::string timerName) {
|
||||
return;
|
||||
}
|
||||
|
||||
GameMessages::SendNotifyClientObject(villager->GetObjectID(), u"TimeToChat", 0, 0, LWOOBJID_EMPTY, "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(villager->GetObjectID(), u"TimeToChat", 0, 0, LWOOBJID_EMPTY, "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
// Get the builder and make sure it still exists
|
||||
auto* builder = Game::entityManager->GetEntity(self->GetVar<LWOOBJID>(u"Builder"));
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "eMissionState.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
@@ -30,8 +31,7 @@ void NjWuNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, e
|
||||
|
||||
// Hide the chest
|
||||
for (auto* chest : Game::entityManager->GetEntitiesInGroup(m_DragonChestGroup)) {
|
||||
GameMessages::SendNotifyClientObject(chest->GetObjectID(), m_ShowChestNotification, 0, -1,
|
||||
target->GetObjectID(), "", target->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(chest->GetObjectID(), m_ShowChestNotification, 0, -1, target->GetObjectID(), "").Send(target->GetSystemAddress());
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -43,8 +43,7 @@ void NjWuNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, e
|
||||
|
||||
// Show the chest
|
||||
for (auto* chest : Game::entityManager->GetEntitiesInGroup(m_DragonChestGroup)) {
|
||||
GameMessages::SendNotifyClientObject(chest->GetObjectID(), m_ShowChestNotification, 1, -1,
|
||||
target->GetObjectID(), "", target->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(chest->GetObjectID(), m_ShowChestNotification, 1, -1, target->GetObjectID(), "").Send(target->GetSystemAddress());
|
||||
}
|
||||
|
||||
auto playerID = target->GetObjectID();
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "dZoneManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MovementMessages.h"
|
||||
#include "ObjectMessages.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "BuffComponent.h"
|
||||
#include "SkillComponent.h"
|
||||
@@ -84,8 +86,7 @@ void NjMonastryBossInstance::OnPlayerLoaded(Entity* self, Entity* player) {
|
||||
self->AddCallbackTimer(0.0f, [self, player]() {
|
||||
if (player != nullptr) {
|
||||
// If we don't have enough players yet, wait for the others to load and notify the client to play a cool cinematic
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PlayerLoaded", 0, 0,
|
||||
player->GetObjectID(), "", player->GetSystemAddress());
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"PlayerLoaded", 0, 0, player->GetObjectID(), "").Send(player->GetSystemAddress());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -114,7 +115,7 @@ void NjMonastryBossInstance::OnPlayerExit(Entity* self, Entity* player) {
|
||||
// resize the instance to account for such.
|
||||
if (totalPlayersLoaded.size() <= 2) self->SetVar<bool>(LargeTeamVariable, false);
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"PlayerLeft", 0, 0, player->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"PlayerLeft", 0, 0, player->GetObjectID(), "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::OnActivityTimerDone(Entity* self, const std::string& name) {
|
||||
@@ -173,8 +174,7 @@ void NjMonastryBossInstance::OnActivityTimerDone(Entity* self, const std::string
|
||||
}
|
||||
|
||||
ActivityTimerStart(self, SpawnLowerFrakjawTimer, 1.0f, 1.0f);
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, BottomFrakSpawn, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0, LWOOBJID_EMPTY, BottomFrakSpawn).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == SpawnLowerFrakjawTimer) {
|
||||
auto spawners = Game::zoneManager->GetSpawnersByName(LowerFrakjawSpawner);
|
||||
if (!spawners.empty()) {
|
||||
@@ -182,8 +182,7 @@ void NjMonastryBossInstance::OnActivityTimerDone(Entity* self, const std::string
|
||||
spawner->Activate();
|
||||
}
|
||||
} else if (timerName == SpawnRailTimer) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, FireRailSpawn, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0, LWOOBJID_EMPTY, FireRailSpawn).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
auto spawners = Game::zoneManager->GetSpawnersByName(FireRailSpawner);
|
||||
if (!spawners.empty()) {
|
||||
@@ -230,15 +229,10 @@ void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* co
|
||||
|
||||
switch (state) {
|
||||
case eQuickBuildState::BUILDING:
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification,
|
||||
0, 0, counterWeight->GetObjectID(),
|
||||
BaseCounterweightQB + std::to_string(self->GetVar<uint32_t>(WaveNumberVariable)),
|
||||
UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0, counterWeight->GetObjectID(), BaseCounterweightQB + std::to_string(self->GetVar<uint32_t>(WaveNumberVariable))).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
return;
|
||||
case eQuickBuildState::INCOMPLETE:
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), EndCinematicNotification,
|
||||
0, 0, LWOOBJID_EMPTY, "",
|
||||
UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), EndCinematicNotification, 0, 0, LWOOBJID_EMPTY, "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
return;
|
||||
case eQuickBuildState::RESETTING:
|
||||
ActivityTimerStart(self, SpawnCounterWeightTimer, 0.0f, 0.0f);
|
||||
@@ -255,8 +249,7 @@ void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* co
|
||||
|
||||
auto* frakjaw = Game::entityManager->GetEntity(self->GetVar<LWOOBJID>(LedgeFrakjawVariable));
|
||||
if (frakjaw == nullptr) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"LedgeFrakjawDead", 0,
|
||||
0, LWOOBJID_EMPTY, "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"LedgeFrakjawDead", 0, 0, LWOOBJID_EMPTY, "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -304,8 +297,7 @@ void NjMonastryBossInstance::HandleLowerFrakjawSpawned(Entity* self, Entity* low
|
||||
NjMonastryBossInstance::HandleLowerFrakjawDied(self, lowerFrakjaw);
|
||||
});
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"LedgeFrakjawDead", 0, 0,
|
||||
LWOOBJID_EMPTY, "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"LedgeFrakjawDead", 0, 0, LWOOBJID_EMPTY, "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
if (self->GetVar<bool>(LargeTeamVariable)) {
|
||||
// Double frakjaws health for large teams
|
||||
@@ -397,37 +389,30 @@ void NjMonastryBossInstance::HandleWaveEnemyDied(Entity* self, Entity* waveEnemy
|
||||
|
||||
void NjMonastryBossInstance::TeleportPlayer(Entity* player, uint32_t position) {
|
||||
for (const auto* spawnPoint : Game::entityManager->GetEntitiesInGroup("SpawnPoint" + std::to_string(position))) {
|
||||
GameMessages::SendTeleport(player->GetObjectID(), spawnPoint->GetPosition(), spawnPoint->GetRotation(),
|
||||
player->GetSystemAddress(), true);
|
||||
GameMessages::Teleport(player->GetObjectID(), spawnPoint->GetPosition(), spawnPoint->GetRotation(), true).SendToClient(player->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::SummonWave(Entity* self, Entity* frakjaw) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0, LWOOBJID_EMPTY,
|
||||
LedgeFrakSummon, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0, LWOOBJID_EMPTY, LedgeFrakSummon).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
RenderComponent::PlayAnimation(frakjaw, SummonAnimation);
|
||||
|
||||
// Stop the music for the first, fourth and fifth wave
|
||||
const auto wave = self->GetVar<uint32_t>(WaveNumberVariable);
|
||||
if (wave >= 1 && wave < (m_Waves.size() - 1)) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), StopMusicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(wave - 1),
|
||||
UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), StopMusicNotification, 0, 0, LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(wave - 1)).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
// After frakjaw moves down the music stays the same
|
||||
if (wave < (m_Waves.size() - 1)) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), StartMusicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(wave),
|
||||
UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), StartMusicNotification, 0, 0, LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(wave)).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
ActivityTimerStart(self, SpawnWaveTimer, 4.0f, 4.0f);
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::LowerFrakjawSummon(Entity* self, Entity* frakjaw) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, BottomFrakSummon, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0, LWOOBJID_EMPTY, BottomFrakSummon).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
ActivityTimerStart(self, SpawnWaveTimer, 2.0f, 2.0f);
|
||||
RenderComponent::PlayAnimation(frakjaw, SummonAnimation);
|
||||
}
|
||||
@@ -451,10 +436,8 @@ void NjMonastryBossInstance::LowerFrakjaw(Entity* self, Entity* frakjaw) {
|
||||
RenderComponent::PlayAnimation(frakjaw, TeleportOutAnimation);
|
||||
ActivityTimerStart(self, LowerFrakjawCamTimer, 2.0f, 2.0f);
|
||||
|
||||
GameMessages::SendNotifyClientObject(frakjaw->GetObjectID(), StopMusicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(m_Waves.size() - 3), UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::SendNotifyClientObject(frakjaw->GetObjectID(), StartMusicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(m_Waves.size() - 2), UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(frakjaw->GetObjectID(), StopMusicNotification, 0, 0, LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(m_Waves.size() - 3)).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(frakjaw->GetObjectID(), StartMusicNotification, 0, 0, LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(m_Waves.size() - 2)).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::SpawnOnNetwork(Entity* self, const LOT& toSpawn, const uint32_t& numberToSpawn, const std::string& spawnerName) {
|
||||
@@ -475,16 +458,13 @@ void NjMonastryBossInstance::WaveOver(Entity* self) {
|
||||
if (wave >= m_Waves.size() - 1)
|
||||
return;
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, BaseCounterweightSpawn + std::to_string(wave),
|
||||
UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0, LWOOBJID_EMPTY, BaseCounterweightSpawn + std::to_string(wave)).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
ActivityTimerStart(self, SpawnCounterWeightTimer, 1.5f, 1.5f);
|
||||
RemovePoison(self);
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::FightOver(Entity* self) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"GroundFrakjawDead", 0, 0,
|
||||
LWOOBJID_EMPTY, "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), u"GroundFrakjawDead", 0, 0, LWOOBJID_EMPTY, "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
// Remove all the enemies from the battlefield
|
||||
for (auto i = 1; i < 5; i++) {
|
||||
@@ -500,13 +480,9 @@ void NjMonastryBossInstance::FightOver(Entity* self) {
|
||||
ActivityTimerStart(self, SpawnRailTimer, 1.5f, 1.5f);
|
||||
|
||||
// Set the music to play the victory music
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), StopMusicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(m_Waves.size() - 2),
|
||||
UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), FlashMusicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, "Monastery_Frakjaw_Battle_Win", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, TreasureChestSpawning, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), StopMusicNotification, 0, 0, LWOOBJID_EMPTY, AudioWaveAudio + std::to_string(m_Waves.size() - 2)).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), FlashMusicNotification, 0, 0, LWOOBJID_EMPTY, "Monastery_Frakjaw_Battle_Win").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::NotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0, LWOOBJID_EMPTY, TreasureChestSpawning).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
auto treasureChests = Game::entityManager->GetEntitiesInGroup(ChestSpawnpointGroup);
|
||||
for (auto* treasureChest : treasureChests) {
|
||||
|
||||
Reference in New Issue
Block a user