mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[DZ] Clear Respawn Timers on Creation
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "repositories/dynamic_zone_lockouts_repository.h"
|
||||
#include "repositories/instance_list_repository.h"
|
||||
#include "repositories/instance_list_player_repository.h"
|
||||
#include "repositories/respawn_times_repository.h"
|
||||
|
||||
DynamicZoneBase::DynamicZoneBase(DynamicZonesRepository::DynamicZoneInstance&& entry)
|
||||
{
|
||||
@@ -68,6 +69,8 @@ uint32_t DynamicZoneBase::CreateInstance()
|
||||
|
||||
m_instance_id = instance.id;
|
||||
|
||||
ClearInstanceRespawnTimers();
|
||||
|
||||
return m_instance_id;
|
||||
}
|
||||
|
||||
@@ -876,3 +879,14 @@ void DynamicZoneBase::SyncCharacterLockouts(uint32_t char_id, std::vector<DzLock
|
||||
CharacterExpeditionLockoutsRepository::InsertLockouts(GetDatabase(), char_id, lockouts);
|
||||
}
|
||||
}
|
||||
|
||||
void DynamicZoneBase::ClearInstanceRespawnTimers()
|
||||
{
|
||||
RespawnTimesRepository::DeleteWhere(
|
||||
GetDatabase(),
|
||||
fmt::format(
|
||||
"`instance_id` = {}",
|
||||
GetInstanceID()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -195,6 +195,7 @@ protected:
|
||||
void AddInternalMember(const DynamicZoneMember& member);
|
||||
uint32_t Create();
|
||||
uint32_t CreateInstance();
|
||||
void ClearInstanceRespawnTimers();
|
||||
void LoadRepositoryResult(DynamicZonesRepository::DynamicZoneInstance&& dz_entry);
|
||||
void RemoveInternalMember(uint32_t character_id);
|
||||
void SaveMembers(const std::vector<DynamicZoneMember>& members);
|
||||
|
||||
Reference in New Issue
Block a user