diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/collision/Management/VMapManager2.cpp | 3 | ||||
| -rwxr-xr-x | src/server/game/DataStores/DBCStores.cpp | 8 | ||||
| -rwxr-xr-x | src/server/game/DataStores/DBCStores.h | 2 | ||||
| -rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 7 |
4 files changed, 18 insertions, 2 deletions
diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp index 6139a27fb52..b9f0f25c2f9 100644 --- a/src/server/collision/Management/VMapManager2.cpp +++ b/src/server/collision/Management/VMapManager2.cpp @@ -30,6 +30,7 @@ #include <ace/Null_Mutex.h> #include <ace/Singleton.h> #include "DisableMgr.h" +#include "DBCStores.h" using G3D::Vector3; @@ -234,7 +235,7 @@ namespace VMAP floor = info.ground_Z; ASSERT(floor < std::numeric_limits<float>::max()); type = info.hitModel->GetLiquidType(); // entry from LiquidType.dbc - if (reqLiquidType && !(type & reqLiquidType)) + if (reqLiquidType && !(GetLiquidFlags(type) & reqLiquidType)) return false; if (info.hitInstance->GetLiquidLevel(pos, info, level)) return true; diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 4fa8e09cead..acc130dcddf 100755 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -864,6 +864,14 @@ uint32 const* GetTalentTabPages(uint8 cls) return sTalentTabPages[cls]; } +uint32 GetLiquidFlags(uint32 liquidType) +{ + if (LiquidTypeEntry const* liq = sLiquidTypeStore.LookupEntry(liquidType)) + return 1 << liq->Type; + + return 0; +} + // script support functions DBCStorage <SoundEntriesEntry> const* GetSoundEntriesStore() { return &sSoundEntriesStore; } DBCStorage <SpellRangeEntry> const* GetSpellRangeStore() { return &sSpellRangeStore; } diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 0bbf06c5311..3f8d19c1f5e 100755 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -60,6 +60,8 @@ MapDifficulty const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &di uint32 const* /*[MAX_TALENT_TABS]*/ GetTalentTabPages(uint8 cls); +uint32 GetLiquidFlags(uint32 liquidType); + PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level); PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 729a2fe0b00..54178cd6720 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -23075,7 +23075,12 @@ void Player::UpdateUnderwaterState(Map* m, float x, float y, float z) RemoveAurasDueToSpell(_lastLiquid->SpellId); if (liquid && liquid->SpellId) - AddAura(liquid->SpellId, this); + { + if (res & (LIQUID_MAP_UNDER_WATER | LIQUID_MAP_IN_WATER | LIQUID_MAP_WATER_WALK)) + CastSpell(this, liquid->SpellId, this); + else + RemoveAurasDueToSpell(liquid->SpellId); + } _lastLiquid = liquid; } |
