mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +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
|
|
@ -537,19 +537,22 @@ bool ChatHandler::HandleGonameCommand(const char* args)
|
|||
|
||||
// if the player or the player's group is bound to another instance
|
||||
// the player will not be bound to another one
|
||||
InstancePlayerBind *pBind = _player->GetBoundInstance(target->GetMapId(), target->GetDungeonDifficulty());
|
||||
InstancePlayerBind *pBind = _player->GetBoundInstance(target->GetMapId(), target->GetDifficulty(cMap->IsRaid()));
|
||||
if (!pBind)
|
||||
{
|
||||
Group *group = _player->GetGroup();
|
||||
// if no bind exists, create a solo bind
|
||||
InstanceGroupBind *gBind = group ? group->GetBoundInstance(target->GetMapId(), target->GetDungeonDifficulty()) : NULL;
|
||||
InstanceGroupBind *gBind = group ? group->GetBoundInstance(target) : NULL;
|
||||
// if no bind exists, create a solo bind
|
||||
if (!gBind)
|
||||
if (InstanceSave *save = sInstanceSaveManager.GetInstanceSave(target->GetInstanceId()))
|
||||
_player->BindToInstance(save, !save->CanReset());
|
||||
}
|
||||
|
||||
_player->SetDungeonDifficulty(target->GetDungeonDifficulty());
|
||||
if(cMap->IsRaid())
|
||||
_player->SetRaidDifficulty(target->GetRaidDifficulty());
|
||||
else
|
||||
_player->SetDungeonDifficulty(target->GetDungeonDifficulty());
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_APPEARING_AT, chrNameLink.c_str());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue