mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
refactor: effects, audio, animation and UI text game messages as structs
Converts PlayAnimation, PlayNDAudioEmitter, PlayEmbeddedEffectOnAllClientsNearObject,
PlayFXEffect, StopFXEffect, BroadcastTextToChatbox, Play2DAmbientSound,
Stop2DAmbientSound, UIMessageServerToSingleClient, UIMessageServerToAllClients,
StartCelebrationEffect, DisplayMessageBox, DisplayChatBubble, ChangeIdleFlags,
SetNameBillboardState, ShowBillboardInteractIcon, PlayCinematic, EndCinematic,
SlashCommandTextFeedback, PlayEmote and SetEmoteLockState (21 old Send
functions, 23 with overloads) and the received MessageBoxRespond,
ChoiceBoxRespond, CinematicUpdate and PlayEmote to NetGameMsgs in
EffectsMessages.{h,cpp}. The high traffic messages get a constructor for their
required fields. UI messages own their AMF arguments. Every caller is switched,
the received messages are registered in GameMessageHandler's map, and the old
functions and switch cases are deleted. Handlers are copied verbatim.
No wire change and no change in recipients: functions that always broadcast
whatever address they were given are sent with Send(UNASSIGNED_SYSTEM_ADDRESS),
functions that only did SEND_PACKET use SendToClient. Quirks are kept and
documented on the structs (PlayAnimation's UTF-8 sized name, the always written
null terminator in BroadcastTextToChatbox, StartCelebrationEffect always
writing celebrationID, SetNameBillboardState having no payload).
Verified byte for byte against a frozen verbatim copy of the old functions over
an input grid, to one client and broadcast; received messages compared with the
old handlers' read sequences and every truncated payload rejected; hand
computed golden bytes; round trips; a deliberate width mutation made the tests
fail. The byte-equality helper gains a Broadcast mode for functions that
ignored their address.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "DLUVanityTeleportingObject.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "dServer.h"
|
||||
#include "VanityUtilities.h"
|
||||
#include "RenderComponent.h"
|
||||
@@ -17,14 +18,14 @@ void DLUVanityTeleportingObject::OnStartup(Entity* self) {
|
||||
void DLUVanityTeleportingObject::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "setupTeleport") {
|
||||
RenderComponent::PlayAnimation(self, u"interact");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 6478, u"teleportBeam", "teleportBeam");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 6478, u"teleportRings", "teleportRings");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 6478, u"teleportBeam", "teleportBeam").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 6478, u"teleportRings", "teleportRings").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddTimer("teleport", 2.0f);
|
||||
self->AddTimer("stopFX", 2.0f);
|
||||
} else if (timerName == "stopFX") {
|
||||
GameMessages::SendStopFXEffect(self, true, "teleportBeam");
|
||||
GameMessages::SendStopFXEffect(self, true, "teleportRings");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "teleportBeam").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "teleportRings").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == "teleport") {
|
||||
std::vector<VanityObjectLocation>& locations = m_Object->m_Locations[Game::server->GetZoneID()];
|
||||
|
||||
@@ -37,8 +38,8 @@ void DLUVanityTeleportingObject::OnTimerDone(Entity* self, std::string timerName
|
||||
|
||||
self->SetPosition(newLocation.m_Position);
|
||||
self->SetRotation(newLocation.m_Rotation);
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 6478, u"teleportBeam", "teleportBeam");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 6478, u"teleportRings", "teleportRings");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 6478, u"teleportBeam", "teleportBeam").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 6478, u"teleportRings", "teleportRings").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("stopFX", 2.0f);
|
||||
self->AddTimer("setupTeleport", m_TeleportInterval);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "BaseCombatAIComponent.h"
|
||||
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
#include "RenderComponent.h"
|
||||
@@ -527,7 +528,12 @@ void BossSpiderQueenEnemyServer::OnTimerDone(Entity* self, const std::string tim
|
||||
}
|
||||
}
|
||||
|
||||
GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(self, u"camshake-bridge", self->GetObjectID(), 100.0f);
|
||||
GameMessages::PlayEmbeddedEffectOnAllClientsNearObject embeddedEffect;
|
||||
embeddedEffect.target = self->GetObjectID();
|
||||
embeddedEffect.effectName = u"camshake-bridge";
|
||||
embeddedEffect.fromObjectID = self->GetObjectID();
|
||||
embeddedEffect.radius = 100.0f;
|
||||
embeddedEffect.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
} else if (timerName == "AdvanceComplete") {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"SetColGroup", 11, 0, 0, "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "DestroyableComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "EntityInfo.h"
|
||||
@@ -36,7 +37,7 @@ void AmDarklingDragon::OnDie(Entity* self, Entity* killer) {
|
||||
}
|
||||
|
||||
void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t damage) {
|
||||
GameMessages::SendPlayFXEffect(self, -1, u"gothit", "", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"gothit", "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
if (true) {
|
||||
auto weakpoint = self->GetVar<int32_t>(u"weakspot");
|
||||
@@ -70,7 +71,11 @@ void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t
|
||||
}
|
||||
|
||||
self->SetVar<int32_t>(u"weakpoint", 2);
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_NONE, eAnimationFlags::IDLE_COMBAT, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::ChangeIdleFlags idleFlags;
|
||||
idleFlags.target = self->GetObjectID();
|
||||
idleFlags.flagsOn = eAnimationFlags::IDLE_NONE;
|
||||
idleFlags.flagsOff = eAnimationFlags::IDLE_COMBAT;
|
||||
idleFlags.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
float animationTime = RenderComponent::PlayAnimation(self, u"stunstart", 1.7f);
|
||||
|
||||
self->AddTimer("timeToStunLoop", 1.0f);
|
||||
@@ -134,7 +139,11 @@ void AmDarklingDragon::OnTimerDone(Entity* self, std::string timerName) {
|
||||
skillComponent->Interrupt();
|
||||
skillComponent->Reset();
|
||||
}
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_COMBAT, eAnimationFlags::IDLE_NONE, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::ChangeIdleFlags idleFlags;
|
||||
idleFlags.target = self->GetObjectID();
|
||||
idleFlags.flagsOn = eAnimationFlags::IDLE_COMBAT;
|
||||
idleFlags.flagsOff = eAnimationFlags::IDLE_NONE;
|
||||
idleFlags.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar<int32_t>(u"weakspot", -1);
|
||||
GameMessages::SendNotifyObject(self->GetObjectID(), self->GetObjectID(), u"DragonRevive", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "eAnimationFlags.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "RenderComponent.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void FvMaelstromDragon::OnStartup(Entity* self) {
|
||||
self->SetVar<int32_t>(u"weakspot", 0);
|
||||
@@ -49,7 +50,7 @@ void FvMaelstromDragon::OnDie(Entity* self, Entity* killer) {
|
||||
}
|
||||
|
||||
void FvMaelstromDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t damage) {
|
||||
GameMessages::SendPlayFXEffect(self, -1, u"gothit", "", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"gothit", "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
if (true) {
|
||||
auto weakpoint = self->GetVar<int32_t>(u"weakspot");
|
||||
@@ -86,7 +87,11 @@ void FvMaelstromDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_
|
||||
|
||||
self->SetVar<int32_t>(u"weakpoint", 2);
|
||||
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_NONE, eAnimationFlags::IDLE_COMBAT, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::ChangeIdleFlags idleFlags;
|
||||
idleFlags.target = self->GetObjectID();
|
||||
idleFlags.flagsOn = eAnimationFlags::IDLE_NONE;
|
||||
idleFlags.flagsOff = eAnimationFlags::IDLE_COMBAT;
|
||||
idleFlags.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
RenderComponent::PlayAnimation(self, u"stunstart", 1.7f);
|
||||
|
||||
self->AddTimer("timeToStunLoop", 1.0f);
|
||||
@@ -152,7 +157,11 @@ void FvMaelstromDragon::OnTimerDone(Entity* self, std::string timerName) {
|
||||
skillComponent->Interrupt();
|
||||
skillComponent->Reset();
|
||||
}
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_COMBAT, eAnimationFlags::IDLE_NONE, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::ChangeIdleFlags idleFlags;
|
||||
idleFlags.target = self->GetObjectID();
|
||||
idleFlags.flagsOn = eAnimationFlags::IDLE_COMBAT;
|
||||
idleFlags.flagsOff = eAnimationFlags::IDLE_NONE;
|
||||
idleFlags.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar<int32_t>(u"weakspot", -1);
|
||||
|
||||
GameMessages::SendNotifyObject(self->GetObjectID(), self->GetObjectID(), u"DragonRevive", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "SkillComponent.h"
|
||||
@@ -40,7 +41,11 @@ void BaseEnemyApe::OnHit(Entity* self, Entity* attacker) {
|
||||
skillComponent->Reset();
|
||||
}
|
||||
RenderComponent::PlayAnimation(self, u"disable", 1.7f);
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_NONE, eAnimationFlags::IDLE_COMBAT, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::ChangeIdleFlags idleFlags;
|
||||
idleFlags.target = self->GetObjectID();
|
||||
idleFlags.flagsOn = eAnimationFlags::IDLE_NONE;
|
||||
idleFlags.flagsOff = eAnimationFlags::IDLE_COMBAT;
|
||||
idleFlags.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
const auto reviveTime = self->GetVar<float_t>(u"reviveTime") != 0.0f
|
||||
? self->GetVar<float_t>(u"reviveTime") : 12.0f;
|
||||
self->AddTimer("reviveTime", reviveTime);
|
||||
@@ -57,7 +62,11 @@ void BaseEnemyApe::OnTimerDone(Entity* self, std::string timerName) {
|
||||
destroyableComponent->SetArmor(destroyableComponent->GetMaxArmor() / timesStunned);
|
||||
}
|
||||
Game::entityManager->SerializeEntity(self);
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_COMBAT, eAnimationFlags::IDLE_NONE, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::ChangeIdleFlags idleFlags;
|
||||
idleFlags.target = self->GetObjectID();
|
||||
idleFlags.flagsOn = eAnimationFlags::IDLE_COMBAT;
|
||||
idleFlags.flagsOff = eAnimationFlags::IDLE_NONE;
|
||||
idleFlags.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar<uint32_t>(u"timesStunned", timesStunned + 1);
|
||||
StunApe(self, false);
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
#include "NpcEpsilonServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void NpcEpsilonServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
||||
|
||||
//If we are completing the Nexus Force join mission, play the celebration for it:
|
||||
if (missionID == 1851) {
|
||||
GameMessages::SendStartCelebrationEffect(target, target->GetSystemAddress(), 22);
|
||||
GameMessages::StartCelebrationEffect celebration;
|
||||
celebration.target = target->GetObjectID();
|
||||
celebration.celebrationID = 22;
|
||||
celebration.SendToClient(target->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "MovementAIComponent.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
@@ -62,7 +63,7 @@ void AmShieldGenerator::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
self->AddTimer("BuffPlayers", 3.0f);
|
||||
} else if (timerName == "PlayFX") {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 5351, u"generatorOn", "generatorOn");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 5351, u"generatorOn", "generatorOn").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddTimer("PlayFX", 1.5f);
|
||||
} else if (timerName == "RefreshEnemies") {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MovementAIComponent.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "SkillComponent.h"
|
||||
@@ -82,7 +83,7 @@ void AmShieldGeneratorQuickbuild::OnTimerDone(Entity* self, std::string timerNam
|
||||
|
||||
self->AddTimer("BuffPlayers", 3.0f);
|
||||
} else if (timerName == "PlayFX") {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 5351, u"generatorOn", "generatorOn");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 5351, u"generatorOn", "generatorOn").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddTimer("PlayFX", 1.5f);
|
||||
} else if (timerName == "RefreshEnemies") {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "AmSkullkinDrill.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MovingPlatformComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "ProximityMonitorComponent.h"
|
||||
@@ -12,7 +13,7 @@ void AmSkullkinDrill::OnStartup(Entity* self) {
|
||||
self->SetNetworkVar(u"bIsInUse", false);
|
||||
self->SetVar(u"bActive", true);
|
||||
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"spin", "active");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"spin", "active").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
auto* movingPlatformComponent = self->GetComponent<MovingPlatformComponent>();
|
||||
|
||||
@@ -135,8 +136,8 @@ void AmSkullkinDrill::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
self->SetNetworkVar(u"bIsInUse", true);
|
||||
|
||||
GameMessages::SendPlayFXEffect(user->GetObjectID(), 5499, u"on-anim", "tornado");
|
||||
GameMessages::SendPlayFXEffect(user->GetObjectID(), 5502, u"on-anim", "staff");
|
||||
GameMessages::PlayFXEffect(user->GetObjectID(), 5499, u"on-anim", "tornado").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(user->GetObjectID(), 5502, u"on-anim", "staff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
const auto userID = user->GetObjectID();
|
||||
|
||||
@@ -174,8 +175,8 @@ void AmSkullkinDrill::OnArrived(Entity* self, uint32_t waypointIndex) {
|
||||
|
||||
if (waypointIndex == 1) {
|
||||
RenderComponent::PlayAnimation(self, u"no-spin");
|
||||
GameMessages::SendStopFXEffect(self, true, "active");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"indicator", "indicator");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "active").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"indicator", "indicator").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->SetVar(u"bActive", false);
|
||||
|
||||
@@ -194,8 +195,8 @@ void AmSkullkinDrill::OnArrived(Entity* self, uint32_t waypointIndex) {
|
||||
return;
|
||||
} else {
|
||||
RenderComponent::PlayAnimation(self, u"idle");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"spin", "active");
|
||||
GameMessages::SendStopFXEffect(self, true, "indicator");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"spin", "active").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "indicator").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +213,10 @@ void AmSkullkinDrill::PlayCinematic(Entity* self) {
|
||||
return;
|
||||
}
|
||||
|
||||
GameMessages::SendPlayCinematic(player->GetObjectID(), cine, player->GetSystemAddress());
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = player->GetObjectID();
|
||||
cinematic.pathName = cine;
|
||||
cinematic.Send(player->GetSystemAddress());
|
||||
}
|
||||
|
||||
void AmSkullkinDrill::PlayAnim(Entity* self, Entity* player, const std::string& animName) {
|
||||
@@ -259,7 +263,7 @@ void AmSkullkinDrill::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t
|
||||
auto* standObj = GetStandObj(self);
|
||||
|
||||
if (standObj != nullptr) {
|
||||
GameMessages::SendPlayFXEffect(standObj->GetObjectID(), 4946, u"explode", "explode");
|
||||
GameMessages::PlayFXEffect(standObj->GetObjectID(), 4946, u"explode", "explode").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,8 +324,8 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
self->SetVar(u"userID", LWOOBJID_EMPTY);
|
||||
|
||||
GameMessages::SendStopFXEffect(player, true, "tornado");
|
||||
GameMessages::SendStopFXEffect(player, true, "staff");
|
||||
GameMessages::StopFXEffect(player->GetObjectID(), true, "tornado").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::StopFXEffect(player->GetObjectID(), true, "staff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
} else if (data[0] == "TryUnFreezeAgain") {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "AmSkullkinDrillStand.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "dpEntity.h"
|
||||
#include "Entity.h"
|
||||
#include "RenderComponent.h"
|
||||
@@ -31,7 +32,7 @@ void AmSkullkinDrillStand::OnProximityUpdate(Entity* self, Entity* entering, std
|
||||
|
||||
GameMessages::SendKnockback(entering->GetObjectID(), self->GetObjectID(), self->GetObjectID(), 0, newVec);
|
||||
|
||||
GameMessages::SendPlayFXEffect(entering->GetObjectID(), 1378, u"create", "pushBack");
|
||||
GameMessages::PlayFXEffect(entering->GetObjectID(), 1378, u"create", "pushBack").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
RenderComponent::PlayAnimation(entering, u"knockback-recovery");
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "dZoneManager.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionState.h"
|
||||
#include "InventoryComponent.h"
|
||||
@@ -62,8 +63,8 @@ void ImgBrickConsoleQB::OnUse(Entity* self, Entity* user) {
|
||||
const auto& facility = Game::entityManager->GetEntitiesInGroup("FacilityPipes");
|
||||
|
||||
if (!facility.empty()) {
|
||||
GameMessages::SendStopFXEffect(facility[0], true, location + "PipeEnergy");
|
||||
GameMessages::SendPlayFXEffect(facility[0]->GetObjectID(), onFX, u"create", location + "PipeOn");
|
||||
GameMessages::StopFXEffect(facility[0]->GetObjectID(), true, location + "PipeEnergy").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(facility[0]->GetObjectID(), onFX, u"create", location + "PipeOn").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,8 +109,8 @@ void ImgBrickConsoleQB::SpawnBrick(Entity* self) {
|
||||
void ImgBrickConsoleQB::SmashCanister(Entity* self) {
|
||||
const auto brick = Game::entityManager->GetEntitiesInGroup("Imagination");
|
||||
if (!brick.empty()) {
|
||||
GameMessages::SendPlayFXEffect(brick[0]->GetObjectID(), 122, u"create", "bluebrick");
|
||||
GameMessages::SendPlayFXEffect(brick[0]->GetObjectID(), 1034, u"cast", "imaginationexplosion");
|
||||
GameMessages::PlayFXEffect(brick[0]->GetObjectID(), 122, u"create", "bluebrick").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(brick[0]->GetObjectID(), 1034, u"cast", "imaginationexplosion").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
const auto canisters = Game::entityManager->GetEntitiesInGroup("Canister");
|
||||
@@ -138,8 +139,8 @@ void ImgBrickConsoleQB::OnQuickBuildComplete(Entity* self, Entity* target) {
|
||||
const auto& facility = Game::entityManager->GetEntitiesInGroup("FacilityPipes");
|
||||
|
||||
if (!facility.empty()) {
|
||||
GameMessages::SendStopFXEffect(facility[0], true, location + "PipeOff");
|
||||
GameMessages::SendPlayFXEffect(facility[0]->GetObjectID(), energyFX, u"create", location + "PipeEnergy");
|
||||
GameMessages::StopFXEffect(facility[0]->GetObjectID(), true, location + "PipeOff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(facility[0]->GetObjectID(), energyFX, u"create", location + "PipeEnergy").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
const auto consoles = Game::entityManager->GetEntitiesInGroup("Console");
|
||||
@@ -182,10 +183,10 @@ void ImgBrickConsoleQB::OnDie(Entity* self, Entity* killer) {
|
||||
const auto& facility = Game::entityManager->GetEntitiesInGroup("FacilityPipes");
|
||||
|
||||
if (!facility.empty()) {
|
||||
GameMessages::SendStopFXEffect(facility[0], true, location + "PipeEnergy");
|
||||
GameMessages::SendStopFXEffect(facility[0], true, location + "PipeOn");
|
||||
GameMessages::SendPlayFXEffect(facility[0]->GetObjectID(), offFX, u"create", location + "PipeOff");
|
||||
GameMessages::SendPlayFXEffect(facility[0]->GetObjectID(), 2750, u"create", location + "imagination_canister");
|
||||
GameMessages::StopFXEffect(facility[0]->GetObjectID(), true, location + "PipeEnergy").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::StopFXEffect(facility[0]->GetObjectID(), true, location + "PipeOn").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(facility[0]->GetObjectID(), offFX, u"create", location + "PipeOff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(facility[0]->GetObjectID(), 2750, u"create", location + "imagination_canister").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "RaceMaelstromGeiser.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "PossessableComponent.h"
|
||||
#include "PossessorComponent.h"
|
||||
#include "EntityManager.h"
|
||||
@@ -68,7 +69,7 @@ void RaceMaelstromGeiser::OnProximityUpdate(Entity* self, Entity* entering, std:
|
||||
|
||||
void RaceMaelstromGeiser::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "downTime") {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 4048, u"rebuild_medium", "geiser", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 4048, u"rebuild_medium", "geiser").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddTimer("buildUpTime", 1);
|
||||
} else if (timerName == "buildUpTime") {
|
||||
@@ -76,7 +77,7 @@ void RaceMaelstromGeiser::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
self->AddTimer("killTime", 1.5f);
|
||||
} else if (timerName == "killTime") {
|
||||
GameMessages::SendStopFXEffect(self, true, "geiser");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "geiser").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->SetVar(u"AmFiring", false);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "GfCaptainsCannon.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
@@ -32,7 +33,7 @@ void GfCaptainsCannon::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
RenderComponent::PlayAnimation(user, u"cannon-strike-no-equip");
|
||||
|
||||
GameMessages::SendPlayFXEffect(user->GetObjectID(), 6039, u"hook", "hook", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(user->GetObjectID(), 6039, u"hook", "hook").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddTimer("FireCannon", 1.667f);
|
||||
}
|
||||
@@ -52,7 +53,10 @@ void GfCaptainsCannon::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "FireCannon") {
|
||||
float cinematicTime = 6.3f;
|
||||
|
||||
GameMessages::SendPlayCinematic(playerId, u"Cannon_Cam", player->GetSystemAddress());
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = playerId;
|
||||
cinematic.pathName = u"Cannon_Cam";
|
||||
cinematic.Send(player->GetSystemAddress());
|
||||
|
||||
self->AddTimer("cinematicTimer", cinematicTime);
|
||||
|
||||
@@ -64,7 +68,10 @@ void GfCaptainsCannon::OnTimerDone(Entity* self, std::string timerName) {
|
||||
RenderComponent::PlayAnimation(shark, u"cannon");
|
||||
}
|
||||
|
||||
GameMessages::SendPlay2DAmbientSound(player, "{7457d85c-4537-4317-ac9d-2f549219ea87}");
|
||||
GameMessages::Play2DAmbientSound ambientSound;
|
||||
ambientSound.target = player->GetObjectID();
|
||||
ambientSound.audioGUID = "{7457d85c-4537-4317-ac9d-2f549219ea87}";
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
} else if (timerName == "cinematicTimer") {
|
||||
GameMessages::SendSetStunned(playerId, eStateChangeType::POP, player->GetSystemAddress(),
|
||||
LWOOBJID_EMPTY, true, true, true, true, true, true, true, true
|
||||
@@ -73,7 +80,7 @@ void GfCaptainsCannon::OnTimerDone(Entity* self, std::string timerName) {
|
||||
self->SetVar<bool>(u"bIsInUse", false);
|
||||
self->SetNetworkVar<bool>(u"bIsInUse", false);
|
||||
|
||||
GameMessages::SendStopFXEffect(player, true, "hook");
|
||||
GameMessages::StopFXEffect(player->GetObjectID(), true, "hook").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "MastTeleport.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Preconditions.h"
|
||||
#include "eEndBehavior.h"
|
||||
#include "DestroyableComponent.h"
|
||||
@@ -49,12 +50,20 @@ void MastTeleport::OnTimerDone(Entity* self, std::string timerName) {
|
||||
const auto leanIn = self->GetVar<float>(u"LeanIn");
|
||||
|
||||
if (!cinematic.empty()) {
|
||||
GameMessages::SendPlayCinematic(playerId, GeneralUtils::ASCIIToUTF16(cinematic), player->GetSystemAddress(),
|
||||
true, true, false, false, eEndBehavior::RETURN, false, leanIn
|
||||
);
|
||||
GameMessages::PlayCinematic playCinematic;
|
||||
playCinematic.target = playerId;
|
||||
playCinematic.pathName = GeneralUtils::ASCIIToUTF16(cinematic);
|
||||
playCinematic.allowGhostUpdates = true;
|
||||
playCinematic.bCloseMultiInteract = true;
|
||||
playCinematic.bSendServerNotify = false;
|
||||
playCinematic.bUseControlledObjectForAudioListener = false;
|
||||
playCinematic.endBehavior = eEndBehavior::RETURN;
|
||||
playCinematic.hidePlayerDuringCine = false;
|
||||
playCinematic.leadIn = leanIn;
|
||||
playCinematic.Send(player->GetSystemAddress());
|
||||
}
|
||||
|
||||
GameMessages::SendPlayFXEffect(playerId, 6039, u"hook", "hook", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(playerId, 6039, u"hook", "hook").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
float animationTime = 6.25f;
|
||||
animationTime = RenderComponent::PlayAnimation(player, "crow-swing-no-equip", 4.0f);
|
||||
@@ -63,7 +72,7 @@ void MastTeleport::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
self->AddTimer("PlayerAnimDone", animationTime);
|
||||
} else if (timerName == "PlayerAnimDone") {
|
||||
GameMessages::SendStopFXEffect(player, true, "hook");
|
||||
GameMessages::StopFXEffect(player->GetObjectID(), true, "hook").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
auto forward = QuatUtils::Forward(self->GetRotation());
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "BankInteractServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Entity.h"
|
||||
#include "Amf3.h"
|
||||
|
||||
@@ -8,7 +9,11 @@ void BankInteractServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
args.Insert("state", "bank");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(user, user->GetSystemAddress(), "pushGameState", args);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = user->GetObjectID();
|
||||
uiMessage.strMessageName = "pushGameState";
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(user->GetSystemAddress());
|
||||
}
|
||||
|
||||
void BankInteractServer::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1,
|
||||
@@ -18,7 +23,11 @@ void BankInteractServer::OnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
|
||||
args.Insert("visible", false);
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(sender, sender->GetSystemAddress(), "ToggleBank", args);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = sender->GetObjectID();
|
||||
uiMessage.strMessageName = "ToggleBank";
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(sender->GetSystemAddress());
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"CloseBank", 0, 0, LWOOBJID_EMPTY, "", sender->GetSystemAddress());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "BaseInteractDropLootServer.h"
|
||||
#include "Loot.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void BaseInteractDropLootServer::OnUse(Entity* self, Entity* user) {
|
||||
BaseUse(self, user);
|
||||
@@ -17,7 +18,7 @@ void BaseInteractDropLootServer::BaseUse(Entity* self, Entity* user) {
|
||||
auto useSound = self->GetVar<std::string>(u"sound1");
|
||||
|
||||
if (!useSound.empty()) {
|
||||
GameMessages::SendPlayNDAudioEmitter(self, user->GetSystemAddress(), useSound);
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), useSound).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
self->SetNetworkVar(u"bInUse", true);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "ExplodingAsset.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "eMissionTaskType.h"
|
||||
@@ -59,7 +60,12 @@ void ExplodingAsset::OnHit(Entity* self, Entity* attacker) {
|
||||
self->SetBoolean(u"bIsHit", true);
|
||||
self->SetOwnerOverride(attacker->GetObjectID());
|
||||
|
||||
GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(self, u"camshake", self->GetObjectID(), 16);
|
||||
GameMessages::PlayEmbeddedEffectOnAllClientsNearObject embeddedEffect;
|
||||
embeddedEffect.target = self->GetObjectID();
|
||||
embeddedEffect.effectName = u"camshake";
|
||||
embeddedEffect.fromObjectID = self->GetObjectID();
|
||||
embeddedEffect.radius = 16;
|
||||
embeddedEffect.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->Smash(attacker->GetObjectID());
|
||||
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
@@ -92,14 +98,14 @@ void ExplodingAsset::OnProximityUpdate(Entity* self, Entity* entering, std::stri
|
||||
|
||||
if (status == "ENTER") {
|
||||
RenderComponent::PlayAnimation(self, u"bounce");
|
||||
GameMessages::SendPlayFXEffect(self, -1, u"anim", "bouncin", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"anim", "bouncin").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar(u"playersNearChest", self->GetVar<int32_t>(u"playersNearChest") + 1);
|
||||
} else if (status == "LEAVE") {
|
||||
self->SetVar(u"playersNearChest", self->GetVar<int32_t>(u"playersNearChest") - 1);
|
||||
|
||||
if (self->GetVar<int32_t>(u"playersNearChest") < 1) {
|
||||
RenderComponent::PlayAnimation(self, u"idle");
|
||||
GameMessages::SendStopFXEffect(self, true, "bouncin");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "bouncin").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar<int32_t>(u"playersNearChest", 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "MailBoxServer.h"
|
||||
#include "Amf3.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Entity.h"
|
||||
|
||||
void MailBoxServer::OnUse(Entity* self, Entity* user) {
|
||||
@@ -8,13 +9,21 @@ void MailBoxServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
args.Insert("state", "Mail");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(user, user->GetSystemAddress(), "pushGameState", args);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = user->GetObjectID();
|
||||
uiMessage.strMessageName = "pushGameState";
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(user->GetSystemAddress());
|
||||
}
|
||||
|
||||
void MailBoxServer::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) {
|
||||
if (args == "toggleMail") {
|
||||
AMFArrayValue args;
|
||||
args.Insert("visible", false);
|
||||
GameMessages::SendUIMessageServerToSingleClient(sender, sender->GetSystemAddress(), "ToggleMail", args);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = sender->GetObjectID();
|
||||
uiMessage.strMessageName = "ToggleMail";
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(sender->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "PropertyDevice.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionState.h"
|
||||
@@ -19,7 +20,7 @@ void PropertyDevice::OnQuickBuildComplete(Entity* self, Entity* target) {
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
if (missionComponent != nullptr) {
|
||||
if (missionComponent->GetMissionState(m_PropertyMissionID) == eMissionState::ACTIVE) {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 641, u"create", "callhome");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 641, u"create", "callhome").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
missionComponent->ForceProgress(m_PropertyMissionID, 1793, self->GetLOT());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "StoryBoxInteractServer.h"
|
||||
#include "Character.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "dServer.h"
|
||||
#include "Amf3.h"
|
||||
#include "Entity.h"
|
||||
@@ -14,7 +15,11 @@ void StoryBoxInteractServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
args.Insert("state", "Story");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(user, user->GetSystemAddress(), "pushGameState", args);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = user->GetObjectID();
|
||||
uiMessage.strMessageName = "pushGameState";
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(user->GetSystemAddress());
|
||||
}
|
||||
|
||||
user->AddCallbackTimer(0.1f, [user, customText]() {
|
||||
@@ -23,7 +28,11 @@ void StoryBoxInteractServer::OnUse(Entity* self, Entity* user) {
|
||||
args.Insert("visible", true);
|
||||
args.Insert("text", customText);
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(user, user->GetSystemAddress(), "ToggleStoryBox", args);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = user->GetObjectID();
|
||||
uiMessage.strMessageName = "ToggleStoryBox";
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(user->GetSystemAddress());
|
||||
});
|
||||
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "TokenConsoleServer.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Character.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
#include "eTerminateType.h"
|
||||
@@ -18,7 +19,7 @@ void TokenConsoleServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
//play sound
|
||||
if (self->HasVar(u"sound1")) {
|
||||
GameMessages::SendPlayNDAudioEmitter(self, user->GetSystemAddress(), self->GetVarAsString(u"sound1"));
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), self->GetVarAsString(u"sound1")).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
//figure out which faction the player belongs to:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "WishingWellServer.h"
|
||||
#include "ScriptedActivityComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Loot.h"
|
||||
#include "EntityManager.h"
|
||||
#include "eTerminateType.h"
|
||||
@@ -18,7 +19,7 @@ void WishingWellServer::OnUse(Entity* self, Entity* user) {
|
||||
const auto audio = self->GetVar<std::string>(u"sound1");
|
||||
|
||||
if (!audio.empty()) {
|
||||
GameMessages::SendPlayNDAudioEmitter(self, user->GetSystemAddress(), audio);
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), audio).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
Loot::DropActivityLoot(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "NsLegoClubDoor.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Amf3.h"
|
||||
|
||||
void NsLegoClubDoor::OnStartup(Entity* self) {
|
||||
@@ -41,7 +42,11 @@ void NsLegoClubDoor::OnUse(Entity* self, Entity* user) {
|
||||
auto* player = user;
|
||||
|
||||
if (CheckChoice(self, player)) {
|
||||
GameMessages::SendUIMessageServerToSingleClient(player, player->GetSystemAddress(), "QueueChoiceBox", teleportArgs);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = player->GetObjectID();
|
||||
uiMessage.strMessageName = "QueueChoiceBox";
|
||||
uiMessage.args = std::move(teleportArgs);
|
||||
uiMessage.SendToClient(player->GetSystemAddress());
|
||||
} else if (self->GetVar<int32_t>(u"currentZone") != m_ChoiceZoneID) {
|
||||
AMFArrayValue multiArgs;
|
||||
multiArgs.Insert("state", "Lobby");
|
||||
@@ -52,7 +57,11 @@ void NsLegoClubDoor::OnUse(Entity* self, Entity* user) {
|
||||
context->Insert("HelpVisible", "show");
|
||||
context->Insert("type", "Lego_Club_Valid");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(player, player->GetSystemAddress(), "pushGameState", multiArgs);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = player->GetObjectID();
|
||||
uiMessage.strMessageName = "pushGameState";
|
||||
uiMessage.args = std::move(multiArgs);
|
||||
uiMessage.SendToClient(player->GetSystemAddress());
|
||||
} else {
|
||||
BaseOnUse(self, player);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "NsLupTeleport.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Amf3.h"
|
||||
|
||||
void NsLupTeleport::OnStartup(Entity* self) {
|
||||
@@ -41,7 +42,11 @@ void NsLupTeleport::OnUse(Entity* self, Entity* user) {
|
||||
auto* player = user;
|
||||
|
||||
if (CheckChoice(self, player)) {
|
||||
GameMessages::SendUIMessageServerToSingleClient(player, player->GetSystemAddress(), "QueueChoiceBox", args);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = player->GetObjectID();
|
||||
uiMessage.strMessageName = "QueueChoiceBox";
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(player->GetSystemAddress());
|
||||
} else {
|
||||
BaseOnUse(self, player);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "NsTokenConsoleServer.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Character.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
@@ -39,7 +40,7 @@ void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) {
|
||||
const auto useSound = self->GetVar<std::string>(u"sound1");
|
||||
|
||||
if (!useSound.empty()) {
|
||||
GameMessages::SendPlayNDAudioEmitter(self, user->GetSystemAddress(), useSound);
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), useSound).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
// Player must be in faction to interact with this entity.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NtAssemblyTubeServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionTaskType.h"
|
||||
@@ -47,9 +48,19 @@ void NtAssemblyTubeServer::RunAssemblyTube(Entity* self, Entity* player) {
|
||||
|
||||
if (!teleCinematic.empty()) {
|
||||
const auto teleCinematicUname = teleCinematic;
|
||||
GameMessages::SendPlayCinematic(player->GetObjectID(), teleCinematicUname, player->GetSystemAddress(),
|
||||
true, true, true, false, eEndBehavior::RETURN, false, -1, false, true
|
||||
);
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = player->GetObjectID();
|
||||
cinematic.pathName = teleCinematicUname;
|
||||
cinematic.allowGhostUpdates = true;
|
||||
cinematic.bCloseMultiInteract = true;
|
||||
cinematic.bSendServerNotify = true;
|
||||
cinematic.bUseControlledObjectForAudioListener = false;
|
||||
cinematic.endBehavior = eEndBehavior::RETURN;
|
||||
cinematic.hidePlayerDuringCine = false;
|
||||
cinematic.leadIn = -1;
|
||||
cinematic.leavePlayerLockedWhenFinished = false;
|
||||
cinematic.lockPlayer = true;
|
||||
cinematic.Send(player->GetSystemAddress());
|
||||
}
|
||||
|
||||
RenderComponent::PlayAnimation(player, u"tube-sucker", 4.0f);
|
||||
@@ -104,7 +115,7 @@ void NtAssemblyTubeServer::TeleportPlayer(Entity* self, Entity* player) {
|
||||
const auto useSound = self->GetVar<std::string>(u"sound1");
|
||||
|
||||
if (!useSound.empty()) {
|
||||
GameMessages::SendPlayNDAudioEmitter(player, player->GetSystemAddress(), useSound);
|
||||
GameMessages::PlayNDAudioEmitter(player->GetObjectID(), useSound).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "NtBeamImaginationCollectors.h"
|
||||
#include "GeneralUtils.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void NtBeamImaginationCollectors::OnStartup(Entity* self) {
|
||||
self->AddTimer("PlayFX", GetRandomNum());
|
||||
@@ -23,7 +24,7 @@ void NtBeamImaginationCollectors::OnTimerDone(Entity* self, std::string timerNam
|
||||
return;
|
||||
}
|
||||
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, m_FxName, "Beam");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, m_FxName, "Beam").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddTimer("PlayFX", GetRandomNum());
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void NtCombatChallengeExplodingDummy::OnDie(Entity* self, Entity* killer) {
|
||||
const auto challengeObjectID = self->GetVar<LWOOBJID>(u"challengeObjectID");
|
||||
@@ -36,6 +37,11 @@ void NtCombatChallengeExplodingDummy::OnHitOrHealResult(Entity* self, Entity* at
|
||||
if (skillComponent != nullptr) {
|
||||
skillComponent->CalculateBehavior(1338, 30875, attacker->GetObjectID());
|
||||
}
|
||||
GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(self, u"camshake", self->GetObjectID(), 16.0f);
|
||||
GameMessages::PlayEmbeddedEffectOnAllClientsNearObject embeddedEffect;
|
||||
embeddedEffect.target = self->GetObjectID();
|
||||
embeddedEffect.effectName = u"camshake";
|
||||
embeddedEffect.fromObjectID = self->GetObjectID();
|
||||
embeddedEffect.radius = 16.0f;
|
||||
embeddedEffect.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->Smash(attacker->GetObjectID());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NtCombatChallengeServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ActivityMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "EntityInfo.h"
|
||||
@@ -33,7 +34,7 @@ void NtCombatChallengeServer::OnHitOrHealResult(Entity* self, Entity* attacker,
|
||||
self->SetVar(u"totalDmg", totalDmg);
|
||||
self->SetNetworkVar(u"totalDmg", totalDmg);
|
||||
|
||||
GameMessages::SendPlayNDAudioEmitter(self, attacker->GetSystemAddress(), scoreSound);
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), scoreSound).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +56,7 @@ void NtCombatChallengeServer::OnMessageBoxResponse(Entity* self, Entity* sender,
|
||||
inventoryComponent->RemoveItem(3039, 1, eInventoryType::ALL);
|
||||
}
|
||||
|
||||
GameMessages::SendPlayNDAudioEmitter(self, sender->GetSystemAddress(), startSound);
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), startSound).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddTimer("start_delay", 2.0f);
|
||||
|
||||
@@ -164,9 +165,9 @@ void NtCombatChallengeServer::OnActivityTimerUpdate(Entity* self, float timeRema
|
||||
self->SetNetworkVar(u"update_time", std::ceil(timeRemaining));
|
||||
|
||||
if (timeRemaining <= 3) {
|
||||
GameMessages::SendPlayNDAudioEmitter(self, UNASSIGNED_SYSTEM_ADDRESS, timerLowSound);
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), timerLowSound).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else {
|
||||
GameMessages::SendPlayNDAudioEmitter(self, UNASSIGNED_SYSTEM_ADDRESS, timerSound);
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), timerSound).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +190,7 @@ void NtCombatChallengeServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (gameTick <= 0) {
|
||||
ResetGame(self);
|
||||
|
||||
GameMessages::SendPlayNDAudioEmitter(self, UNASSIGNED_SYSTEM_ADDRESS, stopSound);
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), stopSound).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddTimer("reset_tick", 5);
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NtParadoxPanelServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Character.h"
|
||||
@@ -53,7 +54,7 @@ void NtParadoxPanelServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
GameMessages::SendKnockback(user->GetObjectID(), self->GetObjectID(), self->GetObjectID(), 0, { dir.x * 15, 5, dir.z * 15 });
|
||||
|
||||
GameMessages::SendPlayFXEffect(self, 6432, u"create", "console_sparks", LWOOBJID_EMPTY, 1.0, 1.0, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 6432, u"create", "console_sparks").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddCallbackTimer(2, [this, self, playerID]() {
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
@@ -64,7 +65,7 @@ void NtParadoxPanelServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"bActive", 0, 0, player->GetObjectID(), "", player->GetSystemAddress());
|
||||
|
||||
GameMessages::SendStopFXEffect(self, true, "console_sparks");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "console_sparks").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->SetVar(u"bActive", false);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NtParadoxTeleServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionTaskType.h"
|
||||
@@ -69,7 +70,10 @@ void NtParadoxTeleServer::TeleportPlayer(Entity* self, Entity* player) {
|
||||
|
||||
if (!teleCinematic.empty()) {
|
||||
const auto teleCinematicUname = teleCinematic;
|
||||
GameMessages::SendPlayCinematic(player->GetObjectID(), teleCinematicUname, player->GetSystemAddress());
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = player->GetObjectID();
|
||||
cinematic.pathName = teleCinematicUname;
|
||||
cinematic.Send(player->GetSystemAddress());
|
||||
}
|
||||
|
||||
GameMessages::SendTeleport(player->GetObjectID(), destPosition, destRotation, player->GetSystemAddress(), true);
|
||||
@@ -93,7 +97,7 @@ void NtParadoxTeleServer::TeleportPlayer(Entity* self, Entity* player) {
|
||||
const auto useSound = self->GetVar<std::string>(u"sound1");
|
||||
|
||||
if (!useSound.empty()) {
|
||||
GameMessages::SendPlayNDAudioEmitter(player, player->GetSystemAddress(), useSound);
|
||||
GameMessages::PlayNDAudioEmitter(player->GetObjectID(), useSound).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +114,9 @@ void NtParadoxTeleServer::UnlockPlayer(Entity* self, Entity* player) {
|
||||
|
||||
if (!teleCinematic.empty()) {
|
||||
const auto teleCinematicUname = teleCinematic;
|
||||
GameMessages::SendEndCinematic(player->GetObjectID(), teleCinematicUname, player->GetSystemAddress());
|
||||
GameMessages::EndCinematic endCinematic;
|
||||
endCinematic.target = player->GetObjectID();
|
||||
endCinematic.pathName = teleCinematicUname;
|
||||
endCinematic.Send(player->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NtVentureCannonServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Entity.h"
|
||||
#include "GeneralUtils.h"
|
||||
@@ -35,9 +36,12 @@ void NtVentureCannonServer::OnUse(Entity* self, Entity* user) {
|
||||
RenderComponent::PlayAnimation(player, u"scale-down", 4.0f);
|
||||
|
||||
const auto enterCinematicUname = enterCinematic;
|
||||
GameMessages::SendPlayCinematic(player->GetObjectID(), enterCinematicUname, player->GetSystemAddress());
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = player->GetObjectID();
|
||||
cinematic.pathName = enterCinematicUname;
|
||||
cinematic.Send(player->GetSystemAddress());
|
||||
|
||||
GameMessages::SendPlayNDAudioEmitter(player, player->GetSystemAddress(), "{e8bf79ce-7453-4a7d-b872-fee65e97ff15}");
|
||||
GameMessages::PlayNDAudioEmitter(player->GetObjectID(), "{e8bf79ce-7453-4a7d-b872-fee65e97ff15}").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->AddCallbackTimer(3, [this, self]() {
|
||||
self->SetNetworkVar(u"bIsInUse", false);
|
||||
@@ -62,9 +66,14 @@ void NtVentureCannonServer::EnterCannonEnded(Entity* self, Entity* player) {
|
||||
if (!cannonEffectGroup.empty()) {
|
||||
auto* cannonEffect = cannonEffectGroup[0];
|
||||
|
||||
GameMessages::SendPlayFXEffect(cannonEffect, 6036, u"create", "cannon_blast", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(cannonEffect->GetObjectID(), 6036, u"create", "cannon_blast").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(cannonEffect, u"camshake-bridge", cannonEffect->GetObjectID(), 100);
|
||||
GameMessages::PlayEmbeddedEffectOnAllClientsNearObject embeddedEffect;
|
||||
embeddedEffect.target = cannonEffect->GetObjectID();
|
||||
embeddedEffect.effectName = u"camshake-bridge";
|
||||
embeddedEffect.fromObjectID = cannonEffect->GetObjectID();
|
||||
embeddedEffect.radius = 100;
|
||||
embeddedEffect.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
FirePlayer(self, player);
|
||||
@@ -78,9 +87,19 @@ void NtVentureCannonServer::EnterCannonEnded(Entity* self, Entity* player) {
|
||||
}
|
||||
|
||||
const auto exitCinematicUname = exitCinematic;
|
||||
GameMessages::SendPlayCinematic(player->GetObjectID(), exitCinematicUname, player->GetSystemAddress(),
|
||||
true, true, true, false, eEndBehavior::RETURN, false, 0, false, false
|
||||
);
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = player->GetObjectID();
|
||||
cinematic.pathName = exitCinematicUname;
|
||||
cinematic.allowGhostUpdates = true;
|
||||
cinematic.bCloseMultiInteract = true;
|
||||
cinematic.bSendServerNotify = true;
|
||||
cinematic.bUseControlledObjectForAudioListener = false;
|
||||
cinematic.endBehavior = eEndBehavior::RETURN;
|
||||
cinematic.hidePlayerDuringCine = false;
|
||||
cinematic.leadIn = 0;
|
||||
cinematic.leavePlayerLockedWhenFinished = false;
|
||||
cinematic.lockPlayer = false;
|
||||
cinematic.Send(player->GetSystemAddress());
|
||||
|
||||
self->AddCallbackTimer(1.5f, [this, self, playerID]() {
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "PetMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void HydrantBroken::OnStartup(Entity* self) {
|
||||
self->AddTimer("playEffect", 1);
|
||||
@@ -39,6 +40,6 @@ void HydrantBroken::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
self->Kill();
|
||||
} else if (timerName == "playEffect") {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 384, u"water", "water", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 384, u"water", "water").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "EnemySpiderSpawner.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "DestroyableComponent.h"
|
||||
@@ -12,7 +13,7 @@ void EnemySpiderSpawner::OnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
int32_t param2, int32_t param3) {
|
||||
if (args == "prepEgg") {
|
||||
// Highlight eggs about to hatch with Maelstrom effect
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2856, u"maelstrom", "test", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2856, u"maelstrom", "test").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
// Make indestructible
|
||||
auto dest = static_cast<DestroyableComponent*>(self->GetComponent(eReplicaComponentType::DESTROYABLE));
|
||||
@@ -37,7 +38,7 @@ void EnemySpiderSpawner::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "StartSpawnTime") {
|
||||
SpawnSpiderling(self);
|
||||
} else if (timerName == "SpawnSpiderling") {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 644, u"create", "egg_puff_b", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 644, u"create", "egg_puff_b").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
//TODO: set the aggro radius larger
|
||||
|
||||
@@ -63,6 +64,6 @@ void EnemySpiderSpawner::OnTimerDone(Entity* self, std::string timerName) {
|
||||
//--------------------------------------------------------------
|
||||
void EnemySpiderSpawner::SpawnSpiderling(Entity* self) {
|
||||
//Initiate the actual spawning
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2260, u"rebuild_medium", "dropdustmedium", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2260, u"rebuild_medium", "dropdustmedium").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("SpawnSpiderling", spawnTime);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Character.h"
|
||||
#include "Entity.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "RenderComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
@@ -62,7 +63,10 @@ void ZoneAgProperty::OnPlayerLoaded(Entity* self, Entity* player) {
|
||||
}
|
||||
|
||||
if (Game::zoneManager->GetZone()->GetZoneID().GetMapID() == 1102) {
|
||||
GameMessages::SendPlay2DAmbientSound(player, GUIDMaelstrom);
|
||||
GameMessages::Play2DAmbientSound ambientSound;
|
||||
ambientSound.target = player->GetObjectID();
|
||||
ambientSound.audioGUID = GUIDMaelstrom;
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"maelstromSkyOn", 0, 0,
|
||||
LWOOBJID_EMPTY, "", player->GetSystemAddress());
|
||||
|
||||
@@ -256,8 +260,15 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
|
||||
DestroySpawner(self->GetVar<std::string>(SpiderScreamSpawner));
|
||||
|
||||
for (auto* player : Game::entityManager->GetEntitiesByComponent(eReplicaComponentType::CHARACTER)) {
|
||||
GameMessages::SendStop2DAmbientSound(player, true, GUIDMaelstrom);
|
||||
GameMessages::SendPlay2DAmbientSound(player, GUIDPeaceful);
|
||||
GameMessages::Stop2DAmbientSound stopAmbientSound;
|
||||
stopAmbientSound.target = player->GetObjectID();
|
||||
stopAmbientSound.force = true;
|
||||
stopAmbientSound.audioGUID = GUIDMaelstrom;
|
||||
stopAmbientSound.SendToClient(player->GetSystemAddress());
|
||||
GameMessages::Play2DAmbientSound ambientSound;
|
||||
ambientSound.target = player->GetObjectID();
|
||||
ambientSound.audioGUID = GUIDPeaceful;
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
}
|
||||
} else if (timerName == "ShowVendor") {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"vendorOn", 0, 0, LWOOBJID_EMPTY, "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "PropertyBankInteract.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Amf3.h"
|
||||
#include "Entity.h"
|
||||
|
||||
@@ -24,7 +25,11 @@ void PropertyBankInteract::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
args.Insert("state", "bank");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(user, user->GetSystemAddress(), "pushGameState", args);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = user->GetObjectID();
|
||||
uiMessage.strMessageName = "pushGameState";
|
||||
uiMessage.args = std::move(args);
|
||||
uiMessage.SendToClient(user->GetSystemAddress());
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"OpenBank", 0, 0, LWOOBJID_EMPTY,
|
||||
"", user->GetSystemAddress());
|
||||
@@ -37,7 +42,11 @@ void PropertyBankInteract::OnFireEventServerSide(Entity* self, Entity* sender, s
|
||||
|
||||
amfArgs.Insert("visible", false);
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(sender, sender->GetSystemAddress(), "ToggleBank", amfArgs);
|
||||
GameMessages::UIMessageServerToSingleClient uiMessage;
|
||||
uiMessage.target = sender->GetObjectID();
|
||||
uiMessage.strMessageName = "ToggleBank";
|
||||
uiMessage.args = std::move(amfArgs);
|
||||
uiMessage.SendToClient(sender->GetSystemAddress());
|
||||
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"CloseBank", 0, 0, LWOOBJID_EMPTY,
|
||||
"", sender->GetSystemAddress());
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "CatapultBaseServer.h"
|
||||
#include "PetMessages.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Entity.h"
|
||||
#include "RenderComponent.h"
|
||||
@@ -28,7 +29,7 @@ void CatapultBaseServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
// tell the arm to the play the platform animation, which is just the arm laying there but with bouncer
|
||||
for (auto* obj : arm) {
|
||||
RenderComponent::PlayAnimation(obj, u"idle-platform");
|
||||
GameMessages::SendPlayNDAudioEmitter(obj, UNASSIGNED_SYSTEM_ADDRESS, "{8cccf912-69e3-4041-a20b-63e4afafc993}");
|
||||
GameMessages::PlayNDAudioEmitter(obj->GetObjectID(), "{8cccf912-69e3-4041-a20b-63e4afafc993}").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
// set the art so we can use it again
|
||||
self->SetVar(u"Arm", obj->GetObjectID());
|
||||
break;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "FallingTile.h"
|
||||
#include "MovingPlatformComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void FallingTile::OnStartup(Entity* self) {
|
||||
auto* movingPlatfromComponent = self->GetComponent<MovingPlatformComponent>();
|
||||
@@ -44,12 +45,12 @@ void FallingTile::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
movingPlatfromComponent->GotoWaypoint(1);
|
||||
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"down", "down");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"down", "down").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == "flipBack") {
|
||||
self->SetVar<bool>(u"AboutToFall", false);
|
||||
|
||||
movingPlatfromComponent->GotoWaypoint(0);
|
||||
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"up", "up");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"up", "up").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "NjGarmadonCelebration.h"
|
||||
#include "Character.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
void NjGarmadonCelebration::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
@@ -13,6 +14,9 @@ void NjGarmadonCelebration::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
if (!character->GetPlayerFlag(ePlayerFlag::NJ_GARMADON_CINEMATIC_SEEN)) {
|
||||
character->SetPlayerFlag(ePlayerFlag::NJ_GARMADON_CINEMATIC_SEEN, true);
|
||||
|
||||
GameMessages::SendStartCelebrationEffect(target, target->GetSystemAddress(), GarmadonCelebrationID);
|
||||
GameMessages::StartCelebrationEffect celebration;
|
||||
celebration.target = target->GetObjectID();
|
||||
celebration.celebrationID = GarmadonCelebrationID;
|
||||
celebration.SendToClient(target->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Character.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "eMissionState.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
@@ -54,7 +55,7 @@ void NjWuNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, e
|
||||
|
||||
// Stop the dragon effects
|
||||
for (auto* dragon : Game::entityManager->GetEntitiesInGroup(m_DragonStatueGroup)) {
|
||||
GameMessages::SendStopFXEffect(dragon, true, "on");
|
||||
GameMessages::StopFXEffect(dragon->GetObjectID(), true, "on").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "SkillComponent.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void RainOfArrows::OnStartup(Entity* self) {
|
||||
|
||||
@@ -60,7 +61,7 @@ void RainOfArrows::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
self->AddTimer("FireSkill", 0.7f);
|
||||
} else if (timerName == "PlayArrowSound") {
|
||||
GameMessages::SendPlayNDAudioEmitter(self, UNASSIGNED_SYSTEM_ADDRESS, m_ArrowsGUID);
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), m_ArrowsGUID).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == "FireSkill") {
|
||||
if (child != nullptr) {
|
||||
child->Smash();
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "BuffComponent.h"
|
||||
#include "SkillComponent.h"
|
||||
@@ -265,7 +266,7 @@ void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* co
|
||||
}
|
||||
|
||||
RenderComponent::PlayAnimation(frakjaw, StunnedAnimation);
|
||||
GameMessages::SendPlayNDAudioEmitter(frakjaw, UNASSIGNED_SYSTEM_ADDRESS, CounterSmashAudio);
|
||||
GameMessages::PlayNDAudioEmitter(frakjaw->GetObjectID(), CounterSmashAudio).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
// Before wave 4 we should lower frakjaw from the ledge
|
||||
if (self->GetVar<uint32_t>(WaveNumberVariable) == 3) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "BaseConsoleTeleportServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "CharacterComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
#include "EntityManager.h"
|
||||
@@ -11,7 +12,15 @@ void BaseConsoleTeleportServer::BaseOnUse(Entity* self, Entity* user) {
|
||||
|
||||
const auto& teleportLocString = self->GetVar<std::u16string>(u"teleportString");
|
||||
|
||||
GameMessages::SendDisplayMessageBox(player->GetObjectID(), true, self->GetObjectID(), u"TransferBox", 0, teleportLocString, u"", player->GetSystemAddress());
|
||||
GameMessages::DisplayMessageBox messageBox;
|
||||
messageBox.target = player->GetObjectID();
|
||||
messageBox.bShow = true;
|
||||
messageBox.callbackClient = self->GetObjectID();
|
||||
messageBox.identifier = u"TransferBox";
|
||||
messageBox.imageID = 0;
|
||||
messageBox.text = teleportLocString;
|
||||
messageBox.userData = u"";
|
||||
messageBox.Send(player->GetSystemAddress());
|
||||
}
|
||||
|
||||
void BaseConsoleTeleportServer::BaseOnMessageBoxResponse(Entity* self, Entity* sender, int32_t button, const std::u16string& identifier, const std::u16string& userData) {
|
||||
@@ -30,7 +39,7 @@ void BaseConsoleTeleportServer::BaseOnMessageBoxResponse(Entity* self, Entity* s
|
||||
const auto& teleportFXs = self->GetVar<std::vector<std::u16string>>(u"teleportEffectTypes");
|
||||
|
||||
for (const auto& type : teleportFXs) {
|
||||
GameMessages::SendPlayFXEffect(player->GetObjectID(), teleportFXID, type, "FX" + GeneralUtils::UTF16ToWTF8(type));
|
||||
GameMessages::PlayFXEffect(player->GetObjectID(), teleportFXID, type, "FX" + GeneralUtils::UTF16ToWTF8(type)).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "BasePropertyServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "Character.h"
|
||||
@@ -106,8 +107,15 @@ void BasePropertyServer::BasePlayerLoaded(Entity* self, Entity* player) {
|
||||
}
|
||||
}
|
||||
|
||||
GameMessages::SendStop2DAmbientSound(player, true, GUIDMaelstrom);
|
||||
GameMessages::SendPlay2DAmbientSound(player, GUIDPeaceful);
|
||||
GameMessages::Stop2DAmbientSound stopAmbientSound;
|
||||
stopAmbientSound.target = player->GetObjectID();
|
||||
stopAmbientSound.force = true;
|
||||
stopAmbientSound.audioGUID = GUIDMaelstrom;
|
||||
stopAmbientSound.SendToClient(player->GetSystemAddress());
|
||||
GameMessages::Play2DAmbientSound ambientSound;
|
||||
ambientSound.target = player->GetObjectID();
|
||||
ambientSound.audioGUID = GUIDPeaceful;
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
|
||||
self->AddTimer(TurnSkyOffTimer, 1.5f);
|
||||
|
||||
@@ -116,7 +124,7 @@ void BasePropertyServer::BasePlayerLoaded(Entity* self, Entity* player) {
|
||||
self->AddTimer(KillFXObjectTimer, 1.0f);
|
||||
}
|
||||
|
||||
GameMessages::SendPlay2DAmbientSound(player, GUIDPeaceful);
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
|
||||
// activate property safe spawner network
|
||||
ActivateSpawner(self->GetVar<std::string>(PropObjsSpawner));
|
||||
@@ -138,10 +146,20 @@ void BasePropertyServer::BasePlayerLoaded(Entity* self, Entity* player) {
|
||||
if (!flagMsg.flag) {
|
||||
StartMaelstrom(self, player);
|
||||
SpawnSpots(self);
|
||||
GameMessages::SendPlay2DAmbientSound(player, GUIDMaelstrom);
|
||||
GameMessages::Play2DAmbientSound ambientSound;
|
||||
ambientSound.target = player->GetObjectID();
|
||||
ambientSound.audioGUID = GUIDMaelstrom;
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
} else {
|
||||
GameMessages::SendStop2DAmbientSound(player, true, GUIDMaelstrom);
|
||||
GameMessages::SendPlay2DAmbientSound(player, GUIDPeaceful);
|
||||
GameMessages::Stop2DAmbientSound stopAmbientSound;
|
||||
stopAmbientSound.target = player->GetObjectID();
|
||||
stopAmbientSound.force = true;
|
||||
stopAmbientSound.audioGUID = GUIDMaelstrom;
|
||||
stopAmbientSound.SendToClient(player->GetSystemAddress());
|
||||
GameMessages::Play2DAmbientSound ambientSound;
|
||||
ambientSound.target = player->GetObjectID();
|
||||
ambientSound.audioGUID = GUIDPeaceful;
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
|
||||
self->AddTimer(TurnSkyOffTimer, 1.5f);
|
||||
self->AddTimer(KillFXObjectTimer, 1.0f);
|
||||
@@ -385,8 +403,15 @@ void BasePropertyServer::BaseTimerDone(Entity* self, const std::string& timerNam
|
||||
if (player == nullptr)
|
||||
return;
|
||||
|
||||
GameMessages::SendStop2DAmbientSound(player, true, GUIDMaelstrom);
|
||||
GameMessages::SendPlay2DAmbientSound(player, GUIDPeaceful);
|
||||
GameMessages::Stop2DAmbientSound stopAmbientSound;
|
||||
stopAmbientSound.target = player->GetObjectID();
|
||||
stopAmbientSound.force = true;
|
||||
stopAmbientSound.audioGUID = GUIDMaelstrom;
|
||||
stopAmbientSound.SendToClient(player->GetSystemAddress());
|
||||
GameMessages::Play2DAmbientSound ambientSound;
|
||||
ambientSound.target = player->GetObjectID();
|
||||
ambientSound.audioGUID = GUIDPeaceful;
|
||||
ambientSound.SendToClient(player->GetSystemAddress());
|
||||
|
||||
self->AddTimer(ShowVendorTimer, 5.0f);
|
||||
} else if (timerName == KillMarkerTimer) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "BaseSurvivalServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ActivityMessages.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "EntityManager.h"
|
||||
@@ -219,7 +220,7 @@ void BaseSurvivalServer::OnActivityTimerDone(Entity* self, const std::string& na
|
||||
for (const auto& playerID : state.players) {
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
if (player != nullptr) {
|
||||
GameMessages::SendPlayNDAudioEmitter(player, player->GetSystemAddress(), spawnSoundGUID);
|
||||
GameMessages::PlayNDAudioEmitter(player->GetObjectID(), spawnSoundGUID).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "BaseWavesServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ActivityMessages.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "EntityManager.h"
|
||||
@@ -198,7 +199,7 @@ void BaseWavesServer::OnActivityTimerDone(Entity* self, const std::string& name)
|
||||
for (const auto& playerID : state.players) {
|
||||
auto* player = Game::entityManager->GetEntity(playerID);
|
||||
if (player != nullptr) {
|
||||
GameMessages::SendPlayNDAudioEmitter(player, player->GetSystemAddress(), spawnSoundGUID);
|
||||
GameMessages::PlayNDAudioEmitter(player->GetObjectID(), spawnSoundGUID).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
} else if (name == NextWaveTickTimer) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "ChooseYourDestinationNsToNt.h"
|
||||
#include "Character.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "eTerminateType.h"
|
||||
|
||||
bool ChooseYourDestinationNsToNt::CheckChoice(Entity* self, Entity* player) {
|
||||
@@ -56,7 +57,15 @@ void ChooseYourDestinationNsToNt::BaseChoiceBoxRespond(Entity* self, Entity* sen
|
||||
self->SetVar(u"teleportString", strText);
|
||||
self->SetVar(u"transferZoneID", GeneralUtils::to_u16string(newMap.value()));
|
||||
|
||||
GameMessages::SendDisplayMessageBox(sender->GetObjectID(), true, self->GetObjectID(), u"TransferBox", 0, strText, u"", sender->GetSystemAddress());
|
||||
GameMessages::DisplayMessageBox messageBox;
|
||||
messageBox.target = sender->GetObjectID();
|
||||
messageBox.bShow = true;
|
||||
messageBox.callbackClient = self->GetObjectID();
|
||||
messageBox.identifier = u"TransferBox";
|
||||
messageBox.imageID = 0;
|
||||
messageBox.text = strText;
|
||||
messageBox.userData = u"";
|
||||
messageBox.Send(sender->GetSystemAddress());
|
||||
} else {
|
||||
GameMessages::SendTerminateInteraction(sender->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "ProximityMonitorComponent.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionState.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
@@ -41,8 +42,13 @@ void NtFactionSpyServer::OnProximityUpdate(Entity* self, Entity* entering, std::
|
||||
self->SetVar<std::u16string>(m_CinematicRootVariable, cinematicSplit.at(0));
|
||||
}
|
||||
|
||||
GameMessages::SendPlayCinematic(entering->GetObjectID(), cinematic, entering->GetSystemAddress(),
|
||||
true, true, true);
|
||||
GameMessages::PlayCinematic playCinematic;
|
||||
playCinematic.target = entering->GetObjectID();
|
||||
playCinematic.pathName = cinematic;
|
||||
playCinematic.allowGhostUpdates = true;
|
||||
playCinematic.bCloseMultiInteract = true;
|
||||
playCinematic.bSendServerNotify = true;
|
||||
playCinematic.Send(entering->GetSystemAddress());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "SpawnPetBaseServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "PetComponent.h"
|
||||
#include "EntityInfo.h"
|
||||
@@ -39,7 +40,10 @@ void SpawnPetBaseServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
auto spawnCinematic = self->GetVar<std::u16string>(u"spawnCinematic");
|
||||
if (!spawnCinematic.empty()) {
|
||||
GameMessages::SendPlayCinematic(user->GetObjectID(), spawnCinematic, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = user->GetObjectID();
|
||||
cinematic.pathName = spawnCinematic;
|
||||
cinematic.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "SkillComponent.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void ActMine::OnStartup(Entity* self) {
|
||||
self->SetVar(u"QuickBuildComplete", false);
|
||||
@@ -27,7 +28,7 @@ void ActMine::OnProximityUpdate(Entity* self, Entity* entering, std::string name
|
||||
auto* detroyable = self->GetComponent<DestroyableComponent>();
|
||||
if (!detroyable) return;
|
||||
if (status == "ENTER" && self->GetVar<bool>(u"QuickBuildComplete") == true && detroyable->IsEnemy(entering)) {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 242, u"orange", "sirenlight_B");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 242, u"orange", "sirenlight_B").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("Tick", TICK_TIME);
|
||||
}
|
||||
}
|
||||
@@ -40,7 +41,7 @@ void ActMine::OnTimerDone(Entity* self, std::string timerName) {
|
||||
skill->CalculateBehavior(SKILL_ID, BEHAVIOR_ID, LWOOBJID_EMPTY);
|
||||
self->AddTimer("BlowedUp", BLOWED_UP_TIME);
|
||||
} else {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 242, u"orange", "sirenlight_B");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 242, u"orange", "sirenlight_B").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("Tick", TICK_TIME);
|
||||
self->SetVar(u"NumWarnings", self->GetVar<int>(u"NumWarnings") + 1);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "AgBusDoor.h"
|
||||
#include "Entity.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ProximityMonitorComponent.h"
|
||||
|
||||
void AgBusDoor::OnStartup(Entity* self) {
|
||||
@@ -55,11 +56,11 @@ void AgBusDoor::MoveDoor(Entity* self, bool bOpen) {
|
||||
}
|
||||
|
||||
//This is currently commented out because it might be the reason that people's audio is cutting out.
|
||||
GameMessages::SendPlayNDAudioEmitter(self, UNASSIGNED_SYSTEM_ADDRESS, "{9a24f1fa-3177-4745-a2df-fbd996d6e1e3}");
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), "{9a24f1fa-3177-4745-a2df-fbd996d6e1e3}").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
void AgBusDoor::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "dustTimer") {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 642, u"create", "busDust", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 642, u"create", "busDust").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "AgJetEffectServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
@@ -14,7 +15,7 @@ void AgJetEffectServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
auto entities = Game::entityManager->GetEntitiesInGroup("Jet_FX");
|
||||
if (entities.empty()) return;
|
||||
GameMessages::SendPlayFXEffect(entities.at(0), 641, u"create", "radarDish", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(entities.at(0)->GetObjectID(), 641, u"create", "radarDish").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("radarDish", 2.0f);
|
||||
self->AddTimer("PlayEffect", 2.5f);
|
||||
self->AddTimer("CineDone", 7.5f + 5.0f); // 7.5f is time the cinematic takes to play
|
||||
@@ -38,7 +39,7 @@ void AgJetEffectServer::OnQuickBuildComplete(Entity* self, Entity* target) {
|
||||
|
||||
void AgJetEffectServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "radarDish") {
|
||||
GameMessages::SendStopFXEffect(self, true, "radarDish");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "radarDish").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == "PlayEffect") {
|
||||
auto entities = Game::entityManager->GetEntitiesInGroup("mortarMain");
|
||||
if (entities.empty()) return;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "AgShipPlayerShockServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "RenderComponent.h"
|
||||
#include "Entity.h"
|
||||
#include "eTerminateType.h"
|
||||
@@ -13,11 +14,11 @@ void AgShipPlayerShockServer::OnUse(Entity* self, Entity* user) {
|
||||
RenderComponent::PlayAnimation(user, shockAnim);
|
||||
GameMessages::SendKnockback(user->GetObjectID(), self->GetObjectID(), self->GetObjectID(), 0, NiPoint3(-20, 10, -20));
|
||||
|
||||
GameMessages::SendPlayFXEffect(self, 1430, u"create", "console_sparks", LWOOBJID_EMPTY, 1.0, 1.0, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 1430, u"create", "console_sparks").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("FXTime", fxTime);
|
||||
}
|
||||
|
||||
void AgShipPlayerShockServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
GameMessages::SendStopFXEffect(self, true, "console_sparks");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "console_sparks").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
active = false;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "EntityInfo.h"
|
||||
#include "GeneralUtils.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "RenderComponent.h"
|
||||
#include "Entity.h"
|
||||
@@ -39,18 +40,24 @@ void AgShipShake::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
self->AddTimer("ShipShakeIdle", static_cast<float>(time));
|
||||
|
||||
if (ref)
|
||||
GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(ref, FXName, ref->GetObjectID(), 500.0f);
|
||||
if (ref) {
|
||||
GameMessages::PlayEmbeddedEffectOnAllClientsNearObject embeddedEffect;
|
||||
embeddedEffect.target = ref->GetObjectID();
|
||||
embeddedEffect.effectName = FXName;
|
||||
embeddedEffect.fromObjectID = ref->GetObjectID();
|
||||
embeddedEffect.radius = 500.0f;
|
||||
embeddedEffect.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
|
||||
if (debrisObject)
|
||||
GameMessages::SendPlayFXEffect(debrisObject, -1, u"DebrisFall", "Debris", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
|
||||
GameMessages::PlayFXEffect(debrisObject->GetObjectID(), -1, u"DebrisFall", "Debris").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
const auto randomFx = GeneralUtils::GenerateRandomNumber<int>(0, 3);
|
||||
|
||||
if (shipFxObject) {
|
||||
std::string effectType = "shipboom" + std::to_string(randomFx);
|
||||
GameMessages::SendPlayFXEffect(shipFxObject, 559, GeneralUtils::ASCIIToUTF16(effectType), "FX", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
|
||||
GameMessages::PlayFXEffect(shipFxObject->GetObjectID(), 559, GeneralUtils::ASCIIToUTF16(effectType), "FX").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
self->AddTimer("ShipShakeExplode", 5.0f);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "Entity.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
#include "RenderComponent.h"
|
||||
|
||||
@@ -38,7 +39,7 @@ void AgSpiderBossMessage::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
// knockback the target
|
||||
auto forward = QuatUtils::Forward(self->GetRotation());
|
||||
box.boxTarget = target->GetObjectID();
|
||||
GameMessages::SendPlayFXEffect(target->GetObjectID(), 1378, u"create", "pushBack");
|
||||
GameMessages::PlayFXEffect(target->GetObjectID(), 1378, u"create", "pushBack").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
RenderComponent::PlayAnimation(target, "knockback-recovery");
|
||||
forward.y += 15;
|
||||
forward.x *= 100;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Entity.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void ActNinjaSensei::OnStartup(Entity* self) {
|
||||
auto students = Game::entityManager->GetEntitiesInGroup(this->m_StudentGroup);
|
||||
@@ -19,54 +20,54 @@ void ActNinjaSensei::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
if (timerName == "crane") {
|
||||
for (auto student : students) {
|
||||
if (student) GameMessages::SendPlayAnimation(student, u"crane");
|
||||
if (student) GameMessages::PlayAnimation(student->GetObjectID(), u"crane").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
GameMessages::SendPlayAnimation(self, u"crane");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"crane").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("bow", 15.33);
|
||||
}
|
||||
|
||||
if (timerName == "bow") {
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
for (auto student : students) {
|
||||
if (student) GameMessages::SendPlayAnimation(student, u"bow");
|
||||
if (student) GameMessages::PlayAnimation(student->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("tiger", 5);
|
||||
}
|
||||
|
||||
if (timerName == "tiger") {
|
||||
GameMessages::SendPlayAnimation(self, u"tiger");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"tiger").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
for (auto student : students) {
|
||||
if (student) GameMessages::SendPlayAnimation(student, u"tiger");
|
||||
if (student) GameMessages::PlayAnimation(student->GetObjectID(), u"tiger").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
GameMessages::SendPlayAnimation(self, u"tiger");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"tiger").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("bow2", 15.33);
|
||||
}
|
||||
|
||||
if (timerName == "bow2") {
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
for (auto student : students) {
|
||||
if (student) GameMessages::SendPlayAnimation(student, u"bow");
|
||||
if (student) GameMessages::PlayAnimation(student->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("mantis", 5);
|
||||
}
|
||||
|
||||
if (timerName == "mantis") {
|
||||
GameMessages::SendPlayAnimation(self, u"mantis");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"mantis").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
for (auto student : students) {
|
||||
if (student) GameMessages::SendPlayAnimation(student, u"mantis");
|
||||
if (student) GameMessages::PlayAnimation(student->GetObjectID(), u"mantis").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
GameMessages::SendPlayAnimation(self, u"mantis");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"mantis").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("bow3", 15.3);
|
||||
}
|
||||
|
||||
if (timerName == "bow3") {
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
for (auto student : students) {
|
||||
if (student) GameMessages::SendPlayAnimation(student, u"bow");
|
||||
if (student) GameMessages::PlayAnimation(student->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("repeat", 5);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "EntityManager.h"
|
||||
#include "QuickBuildComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eEndBehavior.h"
|
||||
|
||||
@@ -30,7 +31,7 @@ void ActParadoxPipeFix::OnQuickBuildComplete(Entity* self, Entity* target) {
|
||||
const auto refinery = Game::entityManager->GetEntitiesInGroup("Paradox");
|
||||
|
||||
if (!refinery.empty()) {
|
||||
GameMessages::SendPlayFXEffect(refinery[0]->GetObjectID(), 3999, u"create", "pipeFX");
|
||||
GameMessages::PlayFXEffect(refinery[0]->GetObjectID(), 3999, u"create", "pipeFX").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
for (auto* object : groupObjs) {
|
||||
@@ -43,7 +44,17 @@ void ActParadoxPipeFix::OnQuickBuildComplete(Entity* self, Entity* target) {
|
||||
missionComponent->ForceProgressTaskType(769, 1, 1, false);
|
||||
}
|
||||
|
||||
GameMessages::SendPlayCinematic(player->GetObjectID(), u"ParadoxPipeFinish", player->GetSystemAddress(), true, true, false, false, eEndBehavior::RETURN, false, 2.0f);
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = player->GetObjectID();
|
||||
cinematic.pathName = u"ParadoxPipeFinish";
|
||||
cinematic.allowGhostUpdates = true;
|
||||
cinematic.bCloseMultiInteract = true;
|
||||
cinematic.bSendServerNotify = false;
|
||||
cinematic.bUseControlledObjectForAudioListener = false;
|
||||
cinematic.endBehavior = eEndBehavior::RETURN;
|
||||
cinematic.hidePlayerDuringCine = false;
|
||||
cinematic.leadIn = 2.0f;
|
||||
cinematic.Send(player->GetSystemAddress());
|
||||
}
|
||||
|
||||
object->SetVar(u"PlayerID", LWOOBJID_EMPTY);
|
||||
@@ -56,7 +67,7 @@ void ActParadoxPipeFix::OnQuickBuildNotifyState(Entity* self, eQuickBuildState s
|
||||
const auto refinery = Game::entityManager->GetEntitiesInGroup("Paradox");
|
||||
|
||||
if (!refinery.empty()) {
|
||||
GameMessages::SendStopFXEffect(refinery[0], true, "pipeFX");
|
||||
GameMessages::StopFXEffect(refinery[0]->GetObjectID(), true, "pipeFX").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "FvFacilityBrick.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "EntityManager.h"
|
||||
|
||||
@@ -17,43 +18,43 @@ void FvFacilityBrick::OnNotifyObject(Entity* self, Entity* sender, const std::st
|
||||
auto* const canisterSpawner = canisterObjs.empty() ? nullptr : canisterObjs[0];
|
||||
|
||||
if (name == "ConsoleLeftUp") {
|
||||
GameMessages::SendStopFXEffect(self, true, "LeftPipeOff");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2775, u"create", "LeftPipeEnergy");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "LeftPipeOff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2775, u"create", "LeftPipeEnergy").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (name == "ConsoleLeftDown") {
|
||||
self->SetVar(u"ConsoleLEFTActive", false);
|
||||
|
||||
GameMessages::SendStopFXEffect(self, true, "LeftPipeEnergy");
|
||||
GameMessages::SendStopFXEffect(self, true, "LeftPipeOn");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2774, u"create", "LeftPipeOff");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "LeftPipeEnergy").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "LeftPipeOn").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2774, u"create", "LeftPipeOff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (name == "ConsoleLeftActive") {
|
||||
self->SetVar(u"ConsoleLEFTActive", true);
|
||||
|
||||
GameMessages::SendStopFXEffect(self, true, "LeftPipeEnergy");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2776, u"create", "LeftPipeOn");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "LeftPipeEnergy").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2776, u"create", "LeftPipeOn").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
else if (name == "ConsoleRightUp") {
|
||||
GameMessages::SendStopFXEffect(self, true, "RightPipeOff");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2778, u"create", "RightPipeEnergy");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "RightPipeOff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2778, u"create", "RightPipeEnergy").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (name == "ConsoleRightDown") {
|
||||
self->SetVar(u"ConsoleRIGHTActive", false);
|
||||
|
||||
GameMessages::SendStopFXEffect(self, true, "RightPipeEnergy");
|
||||
GameMessages::SendStopFXEffect(self, true, "RightPipeOn");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2777, u"create", "RightPipeOff");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "RightPipeEnergy").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "RightPipeOn").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2777, u"create", "RightPipeOff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (name == "ConsoleRightActive") {
|
||||
self->SetVar(u"ConsoleRIGHTActive", true);
|
||||
|
||||
GameMessages::SendStopFXEffect(self, true, "RightPipeOff");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2779, u"create", "RightPipeEnergy");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "RightPipeOff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2779, u"create", "RightPipeEnergy").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
if (self->GetVar<bool>(u"ConsoleLEFTActive") && self->GetVar<bool>(u"ConsoleRIGHTActive")) {
|
||||
auto* object = Game::entityManager->GetEntitiesInGroup("Brick")[0];
|
||||
|
||||
if (object != nullptr) {
|
||||
GameMessages::SendPlayFXEffect(object->GetObjectID(), 122, u"create", "bluebrick");
|
||||
GameMessages::SendPlayFXEffect(object->GetObjectID(), 1034, u"cast", "imaginationexplosion");
|
||||
GameMessages::PlayFXEffect(object->GetObjectID(), 122, u"create", "bluebrick").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(object->GetObjectID(), 1034, u"cast", "imaginationexplosion").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
object = Game::entityManager->GetEntitiesInGroup("Canister")[0];
|
||||
@@ -70,7 +71,7 @@ void FvFacilityBrick::OnNotifyObject(Entity* self, Entity* sender, const std::st
|
||||
auto* object = Game::entityManager->GetEntitiesInGroup("Brick")[0];
|
||||
|
||||
if (object != nullptr) {
|
||||
GameMessages::SendStopFXEffect(object, true, "bluebrick");
|
||||
GameMessages::StopFXEffect(object->GetObjectID(), true, "bluebrick").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
if (bugSpawner) {
|
||||
@@ -101,8 +102,8 @@ void FvFacilityBrick::OnFireEventServerSide(Entity* self, Entity* sender, std::s
|
||||
return;
|
||||
}
|
||||
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2774, u"create", "LeftPipeOff");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2777, u"create", "RightPipeOff");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2750, u"create", "imagination_canister");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2751, u"create", "canister_light_filler");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2774, u"create", "LeftPipeOff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2777, u"create", "RightPipeOff").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2750, u"create", "imagination_canister").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 2751, u"create", "canister_light_filler").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#include "FvFacilityPipes.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void FvFacilityPipes::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) {
|
||||
if (args == "startFX") {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), m_LeftPipeEffectID, m_EffectType, m_LeftPipeEffectName);
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), m_RightPipeEffectID, m_EffectType, m_RightPipeEffectName);
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), m_ImaginationCanisterEffectID, m_EffectType, m_ImaginationCanisterEffectName);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), m_LeftPipeEffectID, m_EffectType, m_LeftPipeEffectName).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), m_RightPipeEffectID, m_EffectType, m_RightPipeEffectName).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), m_ImaginationCanisterEffectID, m_EffectType, m_ImaginationCanisterEffectName).Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
|
||||
#include "Entity.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void ForceFieldEffect::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
if (!target) return;
|
||||
|
||||
GameMessages::SendPlayFXEffect(target, 3671, u"cast", "", LWOOBJID_EMPTY);
|
||||
GameMessages::PlayFXEffect(target->GetObjectID(), 3671, u"cast", "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "InstanceExitTransferPlayerToLastNonInstance.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "CharacterComponent.h"
|
||||
#include "Character.h"
|
||||
#include "dServer.h"
|
||||
@@ -10,16 +11,15 @@ void InstanceExitTransferPlayerToLastNonInstance::OnUse(Entity* self, Entity* us
|
||||
if (transferText.empty())
|
||||
transferText = u"DRAGON_EXIT_QUESTION";
|
||||
|
||||
GameMessages::SendDisplayMessageBox(
|
||||
user->GetObjectID(),
|
||||
true,
|
||||
self->GetObjectID(),
|
||||
u"Instance_Exit",
|
||||
1,
|
||||
transferText,
|
||||
u"",
|
||||
user->GetSystemAddress()
|
||||
);
|
||||
GameMessages::DisplayMessageBox messageBox;
|
||||
messageBox.target = user->GetObjectID();
|
||||
messageBox.bShow = true;
|
||||
messageBox.callbackClient = self->GetObjectID();
|
||||
messageBox.identifier = u"Instance_Exit";
|
||||
messageBox.imageID = 1;
|
||||
messageBox.text = transferText;
|
||||
messageBox.userData = u"";
|
||||
messageBox.Send(user->GetSystemAddress());
|
||||
}
|
||||
|
||||
void InstanceExitTransferPlayerToLastNonInstance::OnMessageBoxResponse(Entity* self, Entity* sender, int32_t button, const std::u16string& identifier, const std::u16string& userData) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "GfOrgan.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Entity.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
@@ -9,7 +10,7 @@ void GfOrgan::OnUse(Entity* self, Entity* user) {
|
||||
return;
|
||||
}
|
||||
|
||||
GameMessages::SendPlayNDAudioEmitter(self, UNASSIGNED_SYSTEM_ADDRESS, "{15d5f8bd-139a-4c31-8904-970c480cd70f}");
|
||||
GameMessages::PlayNDAudioEmitter(self->GetObjectID(), "{15d5f8bd-139a-4c31-8904-970c480cd70f}").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetBoolean(u"bIsInUse", true);
|
||||
self->AddTimer("reset", 5.0f);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "SGCannon.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "ActivityMessages.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "Character.h"
|
||||
@@ -132,10 +133,15 @@ void SGCannon::OnMessageBoxResponse(Entity* self, Entity* sender, int32_t button
|
||||
if (!player) return;
|
||||
|
||||
if (identifier == u"Scoreboardinfo") {
|
||||
GameMessages::SendDisplayMessageBox(player->GetObjectID(), true,
|
||||
Game::zoneManager->GetZoneControlObject()->GetObjectID(),
|
||||
u"Shooting_Gallery_Retry", 2, u"Retry?",
|
||||
u"", player->GetSystemAddress());
|
||||
GameMessages::DisplayMessageBox messageBox;
|
||||
messageBox.target = player->GetObjectID();
|
||||
messageBox.bShow = true;
|
||||
messageBox.callbackClient = Game::zoneManager->GetZoneControlObject()->GetObjectID();
|
||||
messageBox.identifier = u"Shooting_Gallery_Retry";
|
||||
messageBox.imageID = 2;
|
||||
messageBox.text = u"Retry?";
|
||||
messageBox.userData = u"";
|
||||
messageBox.Send(player->GetSystemAddress());
|
||||
} else {
|
||||
if ((button == 1 && (identifier == u"Shooting_Gallery_Retry" || identifier == u"RePlay")) || identifier == u"SG1" || button == 0) {
|
||||
if (IsPlayerInActivity(self, player->GetObjectID())) return;
|
||||
@@ -187,7 +193,7 @@ void SGCannon::SpawnWaveTimerFunc(Entity* self) {
|
||||
|
||||
const auto* player = Game::entityManager->GetEntity(self->GetVar<LWOOBJID>(PlayerIDVariable));
|
||||
if (player != nullptr) {
|
||||
GameMessages::SendPlayFXEffect(player->GetObjectID(), -1, u"SG-start", "");
|
||||
GameMessages::PlayFXEffect(player->GetObjectID(), -1, u"SG-start", "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
GameMessages::StartActivityTime startActivityTime;
|
||||
startActivityTime.target = self->GetObjectID();
|
||||
@@ -362,7 +368,7 @@ void SGCannon::StartGame(Entity* self) {
|
||||
activityStart.target = self->GetObjectID();
|
||||
activityStart.Send(player->GetSystemAddress());
|
||||
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"start", "");
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"start", "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
self->SetNetworkVar<bool>(ClearVariable, true);
|
||||
DoGameStartup(self);
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
#include "Entity.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void NpcNpJetpackGuy::OnUse(Entity* self, Entity* user) {
|
||||
// No effect ID, the client plays the object's own effect of this type.
|
||||
GameMessages::SendPlayFXEffect(self, -1, u"launch", "", LWOOBJID_EMPTY);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"launch", "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NsConcertInstrument.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "Item.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "EntityManager.h"
|
||||
@@ -121,7 +122,10 @@ void NsConcertInstrument::StartPlayingInstrument(Entity* self, Entity* player) {
|
||||
EquipInstruments(self, player);
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"startPlaying", 0, 0,
|
||||
player->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::SendPlayCinematic(player->GetObjectID(), cinematics.at(instrumentLot), UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = player->GetObjectID();
|
||||
cinematic.pathName = cinematics.at(instrumentLot);
|
||||
cinematic.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddCallbackTimer(1.0f, [player, instrumentLot]() {
|
||||
RenderComponent::PlayAnimation(player, animations.at(instrumentLot), 2.0f);
|
||||
});
|
||||
@@ -153,7 +157,11 @@ void NsConcertInstrument::StopPlayingInstrument(Entity* self, Entity* player) {
|
||||
missions->Progress(eMissionTaskType::SCRIPT, self->GetLOT());
|
||||
}
|
||||
|
||||
GameMessages::SendEndCinematic(player->GetObjectID(), cinematics.at(instrumentLot), UNASSIGNED_SYSTEM_ADDRESS, 1.0f);
|
||||
GameMessages::EndCinematic endCinematic;
|
||||
endCinematic.target = player->GetObjectID();
|
||||
endCinematic.pathName = cinematics.at(instrumentLot);
|
||||
endCinematic.leadOut = 1.0f;
|
||||
endCinematic.Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
RenderComponent::PlayAnimation(player, smashAnimations.at(instrumentLot), 2.0f);
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"stopCheckingMovement", 0, 0,
|
||||
player->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "NsConcertChoiceBuildManager.h"
|
||||
#include "DestroyableComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MovingPlatformComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
|
||||
@@ -206,8 +207,7 @@ void NsConcertQuickBuild::UpdateEffects(Entity* self) {
|
||||
for (const auto& effectName : setIterator->second.effects) {
|
||||
const auto effectObjects = Game::entityManager->GetEntitiesInGroup(quickBuildFX.at(effectName));
|
||||
for (auto* effectObject : effectObjects) {
|
||||
GameMessages::SendPlayFXEffect(effectObject, 0, GeneralUtils::ASCIIToUTF16(effectName),
|
||||
effectName + "Effect", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(effectObject->GetObjectID(), 0, GeneralUtils::ASCIIToUTF16(effectName), effectName + "Effect").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -220,7 +220,7 @@ void NsConcertQuickBuild::CancelEffects(Entity* self) {
|
||||
for (const auto& effectName : setIterator->second.effects) {
|
||||
const auto effectObjects = Game::entityManager->GetEntitiesInGroup(quickBuildFX.at(effectName));
|
||||
for (auto* effectObject : effectObjects) {
|
||||
GameMessages::SendStopFXEffect(effectObject, true, effectName + "Effect");
|
||||
GameMessages::StopFXEffect(effectObject->GetObjectID(), true, effectName + "Effect").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "NsGetFactionMissionServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "Character.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
@@ -38,7 +39,10 @@ void NsGetFactionMissionServer::OnRespondToMission(Entity* self, int missionID,
|
||||
factionMissions.push_back(778);
|
||||
|
||||
if (celebrationID != -1) {
|
||||
GameMessages::SendStartCelebrationEffect(player, player->GetSystemAddress(), celebrationID);
|
||||
GameMessages::StartCelebrationEffect celebration;
|
||||
celebration.target = player->GetObjectID();
|
||||
celebration.celebrationID = celebrationID;
|
||||
celebration.SendToClient(player->GetSystemAddress());
|
||||
}
|
||||
|
||||
if (flagID != -1) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "PetMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void RockHydrantBroken::OnStartup(Entity* self) {
|
||||
self->AddTimer("playEffect", 1);
|
||||
@@ -40,6 +41,6 @@ void RockHydrantBroken::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
self->Kill();
|
||||
} else if (timerName == "playEffect") {
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 4737, u"water", "water", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), 4737, u"water", "water").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "MissionComponent.h"
|
||||
#include "Item.h"
|
||||
#include "eMissionState.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
||||
auto* character = target->GetCharacter();
|
||||
@@ -17,7 +18,10 @@ void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionI
|
||||
if (missionID == 768 && missionState == eMissionState::AVAILABLE) {
|
||||
// Players who have not touched the orb yet get a camera pan showing where it is.
|
||||
if (character && !character->GetPlayerFlag(71)) {
|
||||
GameMessages::SendPlayCinematic(target->GetObjectID(), u"MissionCam", target->GetSystemAddress());
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = target->GetObjectID();
|
||||
cinematic.pathName = u"MissionCam";
|
||||
cinematic.Send(target->GetSystemAddress());
|
||||
}
|
||||
} else if (missionID == 768 && missionState >= eMissionState::READY_TO_COMPLETE) {
|
||||
//remove the inventory items
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "AgPropguards.h"
|
||||
#include "Character.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "eMissionState.h"
|
||||
@@ -17,7 +18,10 @@ void AgPropguards::OnMissionDialogueOK(Entity* self, Entity* target, int mission
|
||||
if ((missionState == eMissionState::AVAILABLE || missionState == eMissionState::ACTIVE)
|
||||
&& !character->GetPlayerFlag(flag)) {
|
||||
// If the player just started the mission, play a cinematic highlighting the target
|
||||
GameMessages::SendPlayCinematic(target->GetObjectID(), u"MissionCam", target->GetSystemAddress());
|
||||
GameMessages::PlayCinematic cinematic;
|
||||
cinematic.target = target->GetObjectID();
|
||||
cinematic.pathName = u"MissionCam";
|
||||
cinematic.Send(target->GetSystemAddress());
|
||||
} else if (missionState == eMissionState::READY_TO_COMPLETE) {
|
||||
// Makes the guard disappear once the mission has been completed
|
||||
const auto zoneControlID = Game::entityManager->GetZoneControlEntity()->GetObjectID();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "SpecialCoinSpawner.h"
|
||||
#include "CharacterComponent.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void SpecialCoinSpawner::OnStartup(Entity* self) {
|
||||
self->SetProximityRadius(1.5f, "powerupEnter");
|
||||
@@ -10,7 +11,7 @@ void SpecialCoinSpawner::OnProximityUpdate(Entity* self, Entity* entering, const
|
||||
if (!entering->IsPlayer()) return;
|
||||
auto character = entering->GetCharacter();
|
||||
if (!character) return;
|
||||
GameMessages::SendPlayFXEffect(self, -1, u"pickup", "", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"pickup", "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
character->SetCoins(character->GetCoins() + this->m_CurrencyDenomination, eLootSourceType::CURRENCY);
|
||||
self->Smash(entering->GetObjectID(), eKillType::SILENT);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "SpecialPowerupSpawner.h"
|
||||
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
@@ -15,7 +16,7 @@ void SpecialPowerupSpawner::OnProximityUpdate(Entity* self, Entity* entering, co
|
||||
if (!entering->IsPlayer()) return;
|
||||
if (self->GetVar<bool>(u"bIsDead")) return;
|
||||
|
||||
GameMessages::SendPlayFXEffect(self, -1, u"pickup", "", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"pickup", "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
auto skillComponent = self->GetComponent<SkillComponent>();
|
||||
if (!skillComponent) return;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "SpecialSpeedBuffSpawner.h"
|
||||
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
#include "SkillComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
@@ -15,7 +16,7 @@ void SpecialSpeedBuffSpawner::OnProximityUpdate(Entity* self, Entity* entering,
|
||||
if (!entering->IsPlayer()) return;
|
||||
if (self->GetVar<bool>(u"bIsDead")) return;
|
||||
|
||||
GameMessages::SendPlayFXEffect(self, -1, u"pickup", "", LWOOBJID_EMPTY, 1, 1, true);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"pickup", "").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
|
||||
auto skillComponent = entering->GetComponent<SkillComponent>();
|
||||
if (!skillComponent) return;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "LupGenericInteract.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void LupGenericInteract::OnUse(Entity* self, Entity* user) {
|
||||
GameMessages::SendPlayAnimation(self, u"interact");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"interact").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
#include "WildAmbientCrab.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void WildAmbientCrab::OnStartup(Entity* self){
|
||||
self->SetVar(u"flipped", true);
|
||||
GameMessages::SendPlayAnimation(self, u"idle");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"idle").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
void WildAmbientCrab::OnUse(Entity* self, Entity* user) {
|
||||
auto flipped = self->GetVar<bool>(u"flipped");
|
||||
if (flipped) {
|
||||
self->AddTimer("Flipping", 0.6f);
|
||||
GameMessages::SendPlayAnimation(self, u"flip-over");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"flip-over").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar(u"flipped", false);
|
||||
} else if (!flipped) {
|
||||
self->AddTimer("Flipback", 0.8f);
|
||||
GameMessages::SendPlayAnimation(self, u"flip-back");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"flip-back").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar(u"flipped", true);
|
||||
}
|
||||
}
|
||||
|
||||
void WildAmbientCrab::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "Flipping") GameMessages::SendPlayAnimation(self, u"over-idle");
|
||||
else if (timerName == "Flipback") GameMessages::SendPlayAnimation(self, u"idle");
|
||||
if (timerName == "Flipping") GameMessages::PlayAnimation(self->GetObjectID(), u"over-idle").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
else if (timerName == "Flipback") GameMessages::PlayAnimation(self->GetObjectID(), u"idle").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "WildAndScared.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void WildAndScared::OnUse(Entity* self, Entity* user) {
|
||||
GameMessages::SendPlayAnimation(self, u"scared");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"scared").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "WildGfGlowbug.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void WildGfGlowbug::OnStartup(Entity* self){
|
||||
self->SetVar(u"switch", false);
|
||||
@@ -9,9 +10,9 @@ void WildGfGlowbug::OnFireEventServerSide(Entity* self, Entity* sender, std::str
|
||||
if (args == "physicsReady") {
|
||||
auto switchState = self->GetVar<bool>(u"switch");
|
||||
if (!switchState) {
|
||||
GameMessages::SendStopFXEffect(self, true, "glowlight");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "glowlight").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (switchState) {
|
||||
GameMessages::SendPlayFXEffect(self, -1, u"light", "glowlight", LWOOBJID_EMPTY);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"light", "glowlight").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,10 +20,10 @@ void WildGfGlowbug::OnFireEventServerSide(Entity* self, Entity* sender, std::str
|
||||
void WildGfGlowbug::OnUse(Entity* self, Entity* user) {
|
||||
auto switchState = self->GetVar<bool>(u"switch");
|
||||
if (switchState) {
|
||||
GameMessages::SendStopFXEffect(self, true, "glowlight");
|
||||
GameMessages::StopFXEffect(self->GetObjectID(), true, "glowlight").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar(u"switch", false);
|
||||
} else if (!switchState) {
|
||||
GameMessages::SendPlayFXEffect(self, -1, u"light", "glowlight", LWOOBJID_EMPTY);
|
||||
GameMessages::PlayFXEffect(self->GetObjectID(), -1, u"light", "glowlight").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar(u"switch", true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#include "WildNinjaBricks.h"
|
||||
#include "Entity.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void WildNinjaBricks::OnStartup(Entity* self) {
|
||||
self->AddToGroup("Ninjastuff");
|
||||
}
|
||||
|
||||
void WildNinjaBricks::OnNotifyObject(Entity* self, Entity* sender, const std::string& name, int32_t param1, int32_t param2) {
|
||||
if (name == "Crane") GameMessages::SendPlayAnimation(self, u"crane");
|
||||
else if (name == "Tiger") GameMessages::SendPlayAnimation(self, u"tiger");
|
||||
else if (name == "Mantis") GameMessages::SendPlayAnimation(self, u"mantis");
|
||||
if (name == "Crane") GameMessages::PlayAnimation(self->GetObjectID(), u"crane").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
else if (name == "Tiger") GameMessages::PlayAnimation(self->GetObjectID(), u"tiger").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
else if (name == "Mantis") GameMessages::PlayAnimation(self->GetObjectID(), u"mantis").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#include "WildNinjaSensei.h"
|
||||
#include "Entity.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void WildNinjaSensei::OnStartup(Entity* self) {
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->AddTimer("CraneStart", 5);
|
||||
}
|
||||
|
||||
@@ -12,25 +13,25 @@ void WildNinjaSensei::OnTimerDone(Entity* self, std::string timerName) {
|
||||
for (auto ninja : ninjas) ninja->NotifyObject(self, "Crane");
|
||||
self->AddTimer("Bow", 15.5f);
|
||||
self->AddTimer("TigerStart", 25);
|
||||
GameMessages::SendPlayAnimation(self, u"crane");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"crane").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == "TigerStart") {
|
||||
auto ninjas = Game::entityManager->GetEntitiesInGroup("Ninjastuff");
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
for (auto ninja : ninjas) ninja->NotifyObject(self, "Tiger");
|
||||
self->AddTimer("Bow", 15.5f);
|
||||
self->AddTimer("MantisStart", 25);
|
||||
GameMessages::SendPlayAnimation(self, u"tiger");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"tiger").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == "MantisStart") {
|
||||
auto ninjas = Game::entityManager->GetEntitiesInGroup("Ninjastuff");
|
||||
GameMessages::SendPlayAnimation(self, u"tiger");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"tiger").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
for (auto ninja : ninjas) ninja->NotifyObject(self, "Mantis");
|
||||
self->AddTimer("Bow", 15.5f);
|
||||
self->AddTimer("CraneStart", 25);
|
||||
GameMessages::SendPlayAnimation(self, u"mantis");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"mantis").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
} else if (timerName == "Bow") {
|
||||
auto ninjas = Game::entityManager->GetEntitiesInGroup("Ninjastuff");
|
||||
for (auto ninja : ninjas) ninja->NotifyObject(self, "Bow");
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
#include "WildNinjaStudent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void WildNinjaStudent::OnStartup(Entity* self) {
|
||||
self->AddToGroup("Ninjastuff");
|
||||
GameMessages::SendPlayAnimation(self, u"bow");
|
||||
GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
void WildNinjaStudent::OnNotifyObject(Entity* self, Entity* sender, const std::string& name, int32_t param1, int32_t param2) {
|
||||
if (name == "Crane") GameMessages::SendPlayAnimation(self, u"crane");
|
||||
else if (name == "Tiger") GameMessages::SendPlayAnimation(self, u"tiger");
|
||||
else if (name == "Mantis") GameMessages::SendPlayAnimation(self, u"mantis");
|
||||
else if (name == "Bow") GameMessages::SendPlayAnimation(self, u"bow");
|
||||
if (name == "Crane") GameMessages::PlayAnimation(self->GetObjectID(), u"crane").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
else if (name == "Tiger") GameMessages::PlayAnimation(self->GetObjectID(), u"tiger").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
else if (name == "Mantis") GameMessages::PlayAnimation(self->GetObjectID(), u"mantis").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
else if (name == "Bow") GameMessages::PlayAnimation(self->GetObjectID(), u"bow").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#include "WildPants.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EffectsMessages.h"
|
||||
|
||||
void WildPants::OnStartup(Entity* self) {
|
||||
self->SetProximityRadius(5, "scardyPants");
|
||||
}
|
||||
|
||||
void WildPants::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) {
|
||||
if (status == "ENTER") GameMessages::SendPlayAnimation(self, u"scared");
|
||||
if (status == "ENTER") GameMessages::PlayAnimation(self->GetObjectID(), u"scared").Send(UNASSIGNED_SYSTEM_ADDRESS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user