Core/Player: update Mount Capabilities uppon changing liquid status in order to keep mount auras up to date
This commit is contained in:
1 parent
4e955af00b
commit
702ee5e596
3 files changed
+35
-20
No files matched your search
@@ -3304,6 +3304,11 @@ void Unit::ProcessTerrainStatusUpdate(ZLiquidStatus status, Optional<LiquidData>
|
||||
Player* player = GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
if (curLiquid && curLiquid->SpellId && (!player || !player->IsGameMaster()))
|
||||
CastSpell(this, curLiquid->SpellId, true);
|
||||
|
||||
// Update mount capabilities when changing liquidstatus (enabling / disabling flight auras for example)
|
||||
if (player)
|
||||
player->UpdateMountCapabilities();
|
||||
|
||||
_lastLiquid = curLiquid;
|
||||
}
|
||||
}
|
||||
@@ -8341,6 +8346,8 @@ MountCapabilityEntry const* Unit::GetMountCapability(uint32 mountType) const
|
||||
if (!(mountCapability->Flags & MOUNT_CAPABILITY_FLAG_GROUND))
|
||||
continue;
|
||||
}
|
||||
else if (!(mountCapability->Flags & MOUNT_CAPABILITY_FLAG_UNDERWATER))
|
||||
continue;
|
||||
}
|
||||
else if (isInWater)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user