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
@@ -67,7 +67,7 @@ bool LoginQueryHolder::Initialize()
// !!! NOTE: including unused `zone`,`online`
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADFROM, "SELECT guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags,"
"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost,"
"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty,"
"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, instance_mode_mask,"
"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk,"
"health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars FROM characters WHERE guid = '%u'", GUID_LOPART(m_guid));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGROUP, "SELECT guid FROM group_member WHERE memberGuid =%u", GUID_LOPART(m_guid));
@@ -931,10 +931,6 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if (!at)
return;
// MapManager::CanPlayerEnter() calls players->Satisfy() so this is not needed here
// if (!GetPlayer()->Satisfy(objmgr.GetAccessRequirement(at->access_id), at->target_mapId, true))
// return;
// Check only if target map != current player's map
// check if player can enter instance : instance not full, and raid instance not in encounter fight
if (GetPlayer()->GetMapId() != at->target_mapId && !sMapMgr.CanPlayerEnter(at->target_mapId, GetPlayer(), false))
@@ -1623,7 +1619,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
{
_player->ResetInstances(INSTANCE_RESET_CHANGE_DIFFICULTY, true);
_player->SetRaidDifficulty(Difficulty(mode));
}
}
}
void WorldSession::HandleCancelMountAuraOpcode(WorldPacket & /*recv_data*/)