mirror of
https://github.com/mangosfour/server.git
synced 2025-12-24 10:37:02 +00:00
[12195] Improve AreaTrigger teleport requirement checks
Implement AreaLockStatus concept by rsa Also drop basicly unneeded `areatrigger_teleport`.required_failed_text field. This concept is still in testing phase, please feedback results of some glitches that might exist! TODO: Use Player::GetAreaLockStatus or GetAreaTriggerLockStatus for other "CanEnter" checks as well. Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
7901613472
commit
9022705faf
22 changed files with 304 additions and 162 deletions
|
|
@ -140,7 +140,6 @@ DBCStorage <LockEntry> sLockStore(LockEntryfmt);
|
|||
DBCStorage <MailTemplateEntry> sMailTemplateStore(MailTemplateEntryfmt);
|
||||
DBCStorage <MapEntry> sMapStore(MapEntryfmt);
|
||||
|
||||
// DBC used only for initialization sMapDifficultyMap at startup.
|
||||
DBCStorage <MapDifficultyEntry> sMapDifficultyStore(MapDifficultyEntryfmt); // only for loading
|
||||
MapDifficultyMap sMapDifficultyMap;
|
||||
|
||||
|
|
@ -540,8 +539,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
// fill data
|
||||
for(uint32 i = 1; i < sMapDifficultyStore.GetNumRows(); ++i)
|
||||
if(MapDifficultyEntry const* entry = sMapDifficultyStore.LookupEntry(i))
|
||||
sMapDifficultyMap[MAKE_PAIR32(entry->MapId,entry->Difficulty)] = MapDifficulty(entry->resetTime,entry->maxPlayers);
|
||||
sMapDifficultyStore.Clear();
|
||||
sMapDifficultyMap[MAKE_PAIR32(entry->MapId, entry->Difficulty)] = entry;
|
||||
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMovieStore, dbcPath,"Movie.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sNumTalentsAtLevelStore, dbcPath,"NumTalentsAtLevel.dbc");
|
||||
|
|
@ -1024,10 +1022,10 @@ bool Map2ZoneCoordinates(float& x,float& y,uint32 zone)
|
|||
return true;
|
||||
}
|
||||
|
||||
MapDifficulty const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty)
|
||||
MapDifficultyEntry const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty)
|
||||
{
|
||||
MapDifficultyMap::const_iterator itr = sMapDifficultyMap.find(MAKE_PAIR32(mapId,difficulty));
|
||||
return itr != sMapDifficultyMap.end() ? &itr->second : NULL;
|
||||
return itr != sMapDifficultyMap.end() ? itr->second : NULL;
|
||||
}
|
||||
|
||||
PvPDifficultyEntry const* GetBattlegroundBracketByLevel( uint32 mapid, uint32 level )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue