mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-12 18:12:43 +00:00
[Bug Fix] Swim Skillup and Underwater Fall Damage Fix (#3885)
* [Bug Fix] Swim Skillup and Underwater Fall Damage Fix No fall damage underwater, need to move to skill up swimming * Requested Changes
This commit is contained in:
parent
e52e4d5b3f
commit
51dc62dfb1
@ -5062,7 +5062,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (zone->watermap) {
|
if (zone->watermap) {
|
||||||
if (zone->watermap->InLiquid(glm::vec3(m_Position))) {
|
if (zone->watermap->InLiquid(glm::vec3(m_Position)) && IsMoving()) {
|
||||||
CheckIncreaseSkill(EQ::skills::SkillSwimming, nullptr, -17);
|
CheckIncreaseSkill(EQ::skills::SkillSwimming, nullptr, -17);
|
||||||
|
|
||||||
// Dismount horses when entering water
|
// Dismount horses when entering water
|
||||||
@ -6242,6 +6242,13 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ed->dmgtype == EQ::constants::EnvironmentalDamage::Falling) {
|
if (ed->dmgtype == EQ::constants::EnvironmentalDamage::Falling) {
|
||||||
|
if (zone->HasWaterMap()) {
|
||||||
|
auto target_position = glm::vec3(GetX(), GetY(), GetZ());
|
||||||
|
if (!zone->watermap->InLiquid(target_position)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32 mod = spellbonuses.ReduceFallDamage + itembonuses.ReduceFallDamage + aabonuses.ReduceFallDamage;
|
uint32 mod = spellbonuses.ReduceFallDamage + itembonuses.ReduceFallDamage + aabonuses.ReduceFallDamage;
|
||||||
damage -= damage * mod / 100;
|
damage -= damage * mod / 100;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user