mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
Use reset time for normal/heroic from new DBC. Improve basic support for raid difficalties.
This commit is contained in:
parent
9850551751
commit
a9af7f2b1c
24 changed files with 340 additions and 173 deletions
|
|
@ -2334,11 +2334,11 @@ bool InstanceMap::Add(Player *player)
|
|||
if(!mapSave)
|
||||
{
|
||||
sLog.outDetail("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
|
||||
mapSave = sInstanceSaveManager.AddInstanceSave(GetId(), GetInstanceId(), GetSpawnMode(), 0, true);
|
||||
mapSave = sInstanceSaveManager.AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true);
|
||||
}
|
||||
|
||||
// check for existing instance binds
|
||||
InstancePlayerBind *playerBind = player->GetBoundInstance(GetId(), GetSpawnMode());
|
||||
InstancePlayerBind *playerBind = player->GetBoundInstance(GetId(), Difficulty(GetSpawnMode()));
|
||||
if(playerBind && playerBind->perm)
|
||||
{
|
||||
// cannot enter other instances if bound permanently
|
||||
|
|
@ -2354,7 +2354,7 @@ bool InstanceMap::Add(Player *player)
|
|||
if(pGroup)
|
||||
{
|
||||
// solo saves should be reset when entering a group
|
||||
InstanceGroupBind *groupBind = pGroup->GetBoundInstance(GetId(), GetSpawnMode());
|
||||
InstanceGroupBind *groupBind = pGroup->GetBoundInstance(this);
|
||||
if(playerBind)
|
||||
{
|
||||
sLog.outError("InstanceMap::Add: player %s(%d) is being put in instance %d,%d,%d,%d,%d,%d but he is in group %d and is bound to instance %d,%d,%d,%d,%d,%d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(pGroup->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset());
|
||||
|
|
@ -2573,7 +2573,7 @@ void InstanceMap::UnloadAll(bool pForce)
|
|||
void InstanceMap::SendResetWarnings(uint32 timeLeft) const
|
||||
{
|
||||
for(MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
|
||||
itr->getSource()->SendInstanceResetWarning(GetId(), itr->getSource()->GetDungeonDifficulty(), timeLeft);
|
||||
itr->getSource()->SendInstanceResetWarning(GetId(), itr->getSource()->GetDifficulty(IsRaid()), timeLeft);
|
||||
}
|
||||
|
||||
void InstanceMap::SetResetSchedule(bool on)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue