[8731] Restore difficulty 1 spawn use for creatures with special difficulty 1 versions.

* Rename creature template `heroic_entry` => `difficulty_entry_1`
  Possible need add 2 more fields for 2-3
* Use 2 more EventAI EFLAG_* flags for 2-3 difficulty support, update checks.
* Update area trigger code.

Note: support for specialized creature version for difficulties 2-3 not added yet
      and will be used same as difficulty 1 mode.

TODO: Rename area triggers heroickey/etc fields ?
This commit is contained in:
VladimirMangos 2009-10-25 06:13:39 +03:00
parent 00c2035cc7
commit fad1fb92f4
15 changed files with 86 additions and 78 deletions

View file

@ -184,13 +184,13 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
MapDifficulty const* mapDiff = GetMapDifficultyData(entry->MapID,player->GetDifficulty(entry->map_type == MAP_RAID));
if (!mapDiff)
{
bool isHeroicTargetMap = entry->map_type == MAP_RAID
? (player->GetRaidDifficulty() >= RAID_DIFFICULTY_10MAN_HEROIC)
: (player->GetDungeonDifficulty() >= DUNGEON_DIFFICULTY_HEROIC);
bool isNormalTargetMap = entry->map_type == MAP_RAID
? (player->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
: (player->GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL);
//Send aborted message
// FIX ME: what about absent normal/heroic mode with specific players limit...
player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, isHeroicTargetMap ? DUNGEON_DIFFICULTY_HEROIC : DUNGEON_DIFFICULTY_NORMAL);
player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, isNormalTargetMap ? DUNGEON_DIFFICULTY_NORMAL : DUNGEON_DIFFICULTY_HEROIC);
return false;
}