Remade access_requirement table, now each difficulty mode for each instance has its own entry (for future Dungeon Finder development)

Added completed achievement as new requirement type
Removed obsolete access_id from areatrigger_teleport table
Implemented automatic downscaling of raid difficulty when requested mode does not exist
Changed dungeon_difficulty in characters table to instance_mode_mask saving both dungeon and raid difficulty in form (dungeon diff | raid diff << 4)

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-07-29 18:11:41 +02:00
parent dfe5ae36d3
commit ade1bbdd62
19 changed files with 172 additions and 156 deletions
+3 -2
View File
@@ -5312,10 +5312,11 @@ SpellCastResult Spell::CheckCast(bool strict)
// check if our map is dungeon
if (sMapStore.LookupEntry(m_caster->GetMapId())->IsDungeon())
{
InstanceTemplate const* instance = ObjectMgr::GetInstanceTemplate(m_caster->GetMapId());
Map const* pMap = m_caster->GetMap();
InstanceTemplate const* instance = ObjectMgr::GetInstanceTemplate(pMap->GetId());
if (!instance)
return SPELL_FAILED_TARGET_NOT_IN_INSTANCE;
if (!target->Satisfy(objmgr.GetAccessRequirement(instance->access_id), m_caster->GetMapId()))
if (!target->Satisfy(objmgr.GetAccessRequirement(pMap->GetId(), pMap->GetDifficulty()), pMap->GetId()))
return SPELL_FAILED_BAD_TARGETS;
}
break;