mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 02:08:20 +00:00
Merge pull request #487 from EmosewaMC/quickbuild-fixes
Added a GM send after QB complete
This commit is contained in:
commit
9b6caef6b5
@ -380,7 +380,7 @@ void RebuildComponent::StartRebuild(Entity* user) {
|
|||||||
|
|
||||||
EntityManager::Instance()->SerializeEntity(user);
|
EntityManager::Instance()->SerializeEntity(user);
|
||||||
|
|
||||||
GameMessages::SendRebuildNotifyState(m_Parent, m_State, eRebuildState::REBUILD_COMPLETED, user->GetObjectID());
|
GameMessages::SendRebuildNotifyState(m_Parent, m_State, eRebuildState::REBUILD_BUILDING, user->GetObjectID());
|
||||||
GameMessages::SendEnableRebuild(m_Parent, true, false, false, eFailReason::REASON_NOT_GIVEN, 0.0f, user->GetObjectID());
|
GameMessages::SendEnableRebuild(m_Parent, true, false, false, eFailReason::REASON_NOT_GIVEN, 0.0f, user->GetObjectID());
|
||||||
|
|
||||||
m_State = eRebuildState::REBUILD_BUILDING;
|
m_State = eRebuildState::REBUILD_BUILDING;
|
||||||
@ -421,7 +421,10 @@ void RebuildComponent::CompleteRebuild(Entity* user) {
|
|||||||
EntityManager::Instance()->SerializeEntity(user);
|
EntityManager::Instance()->SerializeEntity(user);
|
||||||
|
|
||||||
GameMessages::SendRebuildNotifyState(m_Parent, m_State, eRebuildState::REBUILD_COMPLETED, user->GetObjectID());
|
GameMessages::SendRebuildNotifyState(m_Parent, m_State, eRebuildState::REBUILD_COMPLETED, user->GetObjectID());
|
||||||
GameMessages::SendEnableRebuild(m_Parent, false, true, false, eFailReason::REASON_NOT_GIVEN, m_ResetTime, user->GetObjectID());
|
GameMessages::SendPlayFXEffect(m_Parent, 507, u"create", "BrickFadeUpVisCompleteEffect", LWOOBJID_EMPTY, 0.4f, 1.0f, true);
|
||||||
|
GameMessages::SendEnableRebuild(m_Parent, false, false, true, eFailReason::REASON_NOT_GIVEN, m_ResetTime, user->GetObjectID());
|
||||||
|
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, m_Parent->GetObjectID());
|
||||||
|
|
||||||
|
|
||||||
m_State = eRebuildState::REBUILD_COMPLETED;
|
m_State = eRebuildState::REBUILD_COMPLETED;
|
||||||
m_Timer = 0.0f;
|
m_Timer = 0.0f;
|
||||||
@ -429,9 +432,6 @@ void RebuildComponent::CompleteRebuild(Entity* user) {
|
|||||||
|
|
||||||
EntityManager::Instance()->SerializeEntity(m_Parent);
|
EntityManager::Instance()->SerializeEntity(m_Parent);
|
||||||
|
|
||||||
GameMessages::SendPlayFXEffect(m_Parent, 507, u"create", "BrickFadeUpVisCompleteEffect", LWOOBJID_EMPTY, 0.4f, 1.0f, true);
|
|
||||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, m_Parent->GetObjectID());
|
|
||||||
|
|
||||||
// Removes extra item requirements, isn't live accurate.
|
// Removes extra item requirements, isn't live accurate.
|
||||||
// In live, all items were removed at the start of the quickbuild, then returned if it was cancelled.
|
// In live, all items were removed at the start of the quickbuild, then returned if it was cancelled.
|
||||||
// TODO: fix?
|
// TODO: fix?
|
||||||
@ -484,6 +484,7 @@ void RebuildComponent::CompleteRebuild(Entity* user) {
|
|||||||
character->SetPlayerFlag(flagNumber, true);
|
character->SetPlayerFlag(flagNumber, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GameMessages::SendPlayAnimation(user, u"rebuild-celebrate", 1.09f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RebuildComponent::ResetRebuild(bool failed) {
|
void RebuildComponent::ResetRebuild(bool failed) {
|
||||||
|
Loading…
Reference in New Issue
Block a user