mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 02:04:04 +00:00
fix: add Nexus Tower missing scripts (#1349)
add final missing scripts for nt also fix the turnin for the breadcrumb missions not showing the completion window. Fix another missing script Add another script fix include guards Fix dirt clouds not appearing on mission accept
This commit is contained in:
@@ -47,10 +47,6 @@ std::vector<LWOMAPID> EntityManager::m_GhostingExcludedZones = {
|
||||
|
||||
// Configure some exceptions for ghosting, nessesary for some special objects.
|
||||
std::vector<LOT> EntityManager::m_GhostingExcludedLOTs = {
|
||||
// NT - Pipes
|
||||
9524,
|
||||
12408,
|
||||
|
||||
// AG - Footrace
|
||||
4967
|
||||
};
|
||||
|
@@ -621,3 +621,12 @@ bool MissionComponent::HasCollectible(int32_t collectibleID) {
|
||||
bool MissionComponent::HasMission(uint32_t missionId) {
|
||||
return GetMission(missionId) != nullptr;
|
||||
}
|
||||
|
||||
void MissionComponent::ResetMission(const int32_t missionId) {
|
||||
auto* mission = GetMission(missionId);
|
||||
|
||||
if (!mission) return;
|
||||
|
||||
m_Missions.erase(missionId);
|
||||
GameMessages::SendResetMissions(m_Parent, m_Parent->GetSystemAddress(), missionId);
|
||||
}
|
||||
|
@@ -170,6 +170,7 @@ public:
|
||||
*/
|
||||
bool HasMission(uint32_t missionId);
|
||||
|
||||
void ResetMission(const int32_t missionId);
|
||||
private:
|
||||
/**
|
||||
* All the missions owned by this entity, mapped by mission ID
|
||||
|
@@ -29,11 +29,11 @@ uint32_t OfferedMission::GetMissionId() const {
|
||||
return this->missionId;
|
||||
}
|
||||
|
||||
bool OfferedMission::GetOfferMission() const {
|
||||
bool OfferedMission::GetOffersMission() const {
|
||||
return this->offersMission;
|
||||
}
|
||||
|
||||
bool OfferedMission::GetAcceptMission() const {
|
||||
bool OfferedMission::GetAcceptsMission() const {
|
||||
return this->acceptsMission;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,10 @@ void MissionOfferComponent::OfferMissions(Entity* entity, const uint32_t specifi
|
||||
const auto selected = canAcceptPool[GeneralUtils::GenerateRandomNumber<int>(0, canAcceptPool.size() - 1)];
|
||||
|
||||
GameMessages::SendOfferMission(entity->GetObjectID(), entity->GetSystemAddress(), selected, m_Parent->GetObjectID());
|
||||
} else if (std::find(offered.begin(), offered.end(), missionId) == offered.end() && offeredMission->GetOfferMission()) {
|
||||
} else if (
|
||||
std::find(offered.begin(), offered.end(), missionId) == offered.end()
|
||||
&&
|
||||
(offeredMission->GetOffersMission() || offeredMission->GetAcceptsMission())) {
|
||||
GameMessages::SendOfferMission(entity->GetObjectID(), entity->GetSystemAddress(), missionId, m_Parent->GetObjectID());
|
||||
}
|
||||
}
|
||||
|
@@ -30,13 +30,13 @@ struct OfferedMission {
|
||||
* Returns if this mission is offered by the entity
|
||||
* @return true if this mission is offered by the entity, false otherwise
|
||||
*/
|
||||
bool GetOfferMission() const;
|
||||
bool GetOffersMission() const;
|
||||
|
||||
/**
|
||||
* Returns if this mission may be accepted by the entity (currently unused)
|
||||
* @return true if this mission may be accepted by the entity, false otherwise
|
||||
*/
|
||||
bool GetAcceptMission() const;
|
||||
bool GetAcceptsMission() const;
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -345,6 +345,19 @@ void GameMessages::SendStartPathing(Entity* entity) {
|
||||
SEND_PACKET_BROADCAST;
|
||||
}
|
||||
|
||||
void GameMessages::SendResetMissions(Entity* entity, const SystemAddress& sysAddr, const int32_t missionid) {
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(entity->GetObjectID());
|
||||
bitStream.Write(eGameMessageType::RESET_MISSIONS);
|
||||
|
||||
bitStream.Write(missionid != -1);
|
||||
if (missionid != -1) bitStream.Write(missionid);
|
||||
|
||||
SEND_PACKET;
|
||||
}
|
||||
|
||||
void GameMessages::SendPlatformResync(Entity* entity, const SystemAddress& sysAddr, bool bStopAtDesiredWaypoint,
|
||||
int iIndex, int iDesiredWaypointIndex, int nextIndex,
|
||||
eMovementPlatformState movementState) {
|
||||
|
@@ -74,6 +74,7 @@ namespace GameMessages {
|
||||
int iIndex = 0, int iDesiredWaypointIndex = 1, int nextIndex = 1,
|
||||
eMovementPlatformState movementState = eMovementPlatformState::Moving);
|
||||
|
||||
void SendResetMissions(Entity* entity, const SystemAddress& sysAddr, const int32_t missionid = -1);
|
||||
void SendRestoreToPostLoadStats(Entity* entity, const SystemAddress& sysAddr);
|
||||
void SendServerDoneLoadingAllObjects(Entity* entity, const SystemAddress& sysAddr);
|
||||
void SendGMLevelBroadcast(const LWOOBJID& objectID, eGameMasterLevel level);
|
||||
|
@@ -349,6 +349,17 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
});
|
||||
}
|
||||
|
||||
if (chatCommand == "resetmission") {
|
||||
uint32_t missionId;
|
||||
if (!GeneralUtils::TryParse(args[0], missionId)) {
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Invalid mission ID.");
|
||||
return;
|
||||
}
|
||||
auto* missionComponent = entity->GetComponent<MissionComponent>();
|
||||
if (!missionComponent) return;
|
||||
missionComponent->ResetMission(missionId);
|
||||
}
|
||||
|
||||
if (user->GetMaxGMLevel() == eGameMasterLevel::CIVILIAN || entity->GetGMLevel() >= eGameMasterLevel::CIVILIAN) {
|
||||
if (chatCommand == "die") {
|
||||
entity->Smash(entity->GetObjectID());
|
||||
|
Reference in New Issue
Block a user