[7141] Implement heroic raid instance mode support.

* Heroic mode player amount for instances in DB. Can be used for any instances but added for heroic raid instance.
* Output transfer error at max playrs limit.
* FIXME notes ;) for raid required implementing store 2 reset time and do global reset for 2 modes. But currently raid have inmmap entry data
same reset time for both cases.
* Update instances list where mounts allowed.
* Simplify and fix code for SMSG_RAID_INSTANCE_INFO.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Energy 2009-01-22 02:52:21 +03:00 committed by VladimirMangos
parent 2a891a8c92
commit f26d6151c8
11 changed files with 87 additions and 52 deletions

View file

@ -449,7 +449,7 @@ void InstanceSaveManager::LoadResetTimes()
// add the global reset times to the priority queue
for(uint32 i = 0; i < sInstanceTemplate.MaxEntry; i++)
{
InstanceTemplate* temp = (InstanceTemplate*)objmgr.GetInstanceTemplate(i);
InstanceTemplate const* temp = objmgr.GetInstanceTemplate(i);
if(!temp) continue;
// only raid/heroic maps have a global reset time
const MapEntry* entry = sMapStore.LookupEntry(temp->map);
@ -578,7 +578,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, bool warn, uint32 timeLe
{
// global reset for all instances of the given map
// note: this isn't fast but it's meant to be executed very rarely
Map *map = (MapInstanced*)MapManager::Instance().GetBaseMap(mapid);
Map const *map = MapManager::Instance().GetBaseMap(mapid);
if(!map->Instanceable())
return;
uint64 now = (uint64)time(NULL);
@ -586,7 +586,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, bool warn, uint32 timeLe
if(!warn)
{
// this is called one minute before the reset time
InstanceTemplate* temp = (InstanceTemplate*)objmgr.GetInstanceTemplate(mapid);
InstanceTemplate const* temp = objmgr.GetInstanceTemplate(mapid);
if(!temp || !temp->reset_delay)
{
sLog.outError("InstanceSaveManager::ResetOrWarnAll: no instance template or reset delay for map %d", mapid);