diff options
author | ForesterDev <11771800+ForesterDev@users.noreply.github.com> | 2019-10-13 19:43:23 +0400 |
---|---|---|
committer | Aokromes <Aokromes@users.noreply.github.com> | 2019-10-13 17:43:23 +0200 |
commit | c03c88d0c02c5dda9f14dec1ed151ca30a92118e (patch) | |
tree | 8b910b4553538085dd45f031bbf2c9ac15c1e80f | |
parent | fed030da190c9c53ad013d3e460ba1afbe1f02a2 (diff) |
Core/Defines: define UNIT_FLAG_SWIMMING (#23630)
5 files changed, 9 insertions, 9 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index afe4ebe8100..68b3322efe2 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12650,7 +12650,7 @@ bool Unit::CanSwim() const return false; if (IsPet() && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PET_IN_COMBAT)) return true; - return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_RENAME | UNIT_FLAG_UNK_15); + return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_RENAME | UNIT_FLAG_SWIMMING); } void Unit::NearTeleportTo(Position const& pos, bool casting /*= false*/) diff --git a/src/server/game/Entities/Unit/UnitDefines.h b/src/server/game/Entities/Unit/UnitDefines.h index 731843bc82c..c8277c7011e 100644 --- a/src/server/game/Entities/Unit/UnitDefines.h +++ b/src/server/game/Entities/Unit/UnitDefines.h @@ -136,7 +136,7 @@ enum UnitFlags : uint32 UNIT_FLAG_PVP = 0x00001000, // changed in 3.0.3 UNIT_FLAG_SILENCED = 0x00002000, // silenced, 2.1.1 UNIT_FLAG_CANNOT_SWIM = 0x00004000, // 2.0.8 - UNIT_FLAG_UNK_15 = 0x00008000, + UNIT_FLAG_SWIMMING = 0x00008000, // shows swim animation in water UNIT_FLAG_NON_ATTACKABLE_2 = 0x00010000, // removes attackable icon, if on yourself, cannot assist self but can cast TARGET_SELF spells - added by SPELL_AURA_MOD_UNATTACKABLE UNIT_FLAG_PACIFIED = 0x00020000, // 3.0.3 ok UNIT_FLAG_STUNNED = 0x00040000, // 3.0.3 ok diff --git a/src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp b/src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp index 2fffd3d2fbb..11740b530ee 100644 --- a/src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp +++ b/src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp @@ -48,7 +48,7 @@ TC_API_EXPORT EnumText EnumUtils<UnitFlags>::ToString(UnitFlags value) case UNIT_FLAG_PVP: return { "UNIT_FLAG_PVP", "UNIT_FLAG_PVP", "changed in 3.0.3" }; case UNIT_FLAG_SILENCED: return { "UNIT_FLAG_SILENCED", "UNIT_FLAG_SILENCED", "silenced, 2.1.1" }; case UNIT_FLAG_CANNOT_SWIM: return { "UNIT_FLAG_CANNOT_SWIM", "UNIT_FLAG_CANNOT_SWIM", "2.0.8" }; - case UNIT_FLAG_UNK_15: return { "UNIT_FLAG_UNK_15", "UNIT_FLAG_UNK_15", "" }; + case UNIT_FLAG_SWIMMING: return { "UNIT_FLAG_SWIMMING", "UNIT_FLAG_SWIMMING", "shows swim animation in water" }; case UNIT_FLAG_NON_ATTACKABLE_2: return { "UNIT_FLAG_NON_ATTACKABLE_2", "UNIT_FLAG_NON_ATTACKABLE_2", "removes attackable icon, if on yourself, cannot assist self but can cast TARGET_SELF spells - added by SPELL_AURA_MOD_UNATTACKABLE" }; case UNIT_FLAG_PACIFIED: return { "UNIT_FLAG_PACIFIED", "UNIT_FLAG_PACIFIED", "3.0.3 ok" }; case UNIT_FLAG_STUNNED: return { "UNIT_FLAG_STUNNED", "UNIT_FLAG_STUNNED", "3.0.3 ok" }; @@ -92,7 +92,7 @@ TC_API_EXPORT UnitFlags EnumUtils<UnitFlags>::FromIndex(size_t index) case 12: return UNIT_FLAG_PVP; case 13: return UNIT_FLAG_SILENCED; case 14: return UNIT_FLAG_CANNOT_SWIM; - case 15: return UNIT_FLAG_UNK_15; + case 15: return UNIT_FLAG_SWIMMING; case 16: return UNIT_FLAG_NON_ATTACKABLE_2; case 17: return UNIT_FLAG_PACIFIED; case 18: return UNIT_FLAG_STUNNED; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 58d82908a06..d77c8cf3ac3 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -577,7 +577,7 @@ public: me->RestoreFaction(); CombatAI::Reset(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SWIMMING); } void SpellHit(Unit* pCaster, SpellInfo const* pSpell) override @@ -669,7 +669,7 @@ public: return true; me->SetImmuneToPC(false); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SWIMMING); player->CastSpell(me, SPELL_DUEL, false); player->CastSpell(player, SPELL_DUEL_FLAG, true); diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index 8ad846f9fbd..bf6b06ff0e8 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -282,10 +282,10 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader if (Unit* caster = GetCaster()) { // flags taken from sniffs - if (caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6)) + if (caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SWIMMING|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6)) { caster->ToCreature()->SetReactState(REACT_PASSIVE); - caster->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_UNK_6); + caster->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SWIMMING|UNIT_FLAG_UNK_6); caster->SetImmuneToAll(true, true); } } @@ -296,7 +296,7 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader if (Unit* caster = GetCaster()) { caster->ToCreature()->SetReactState(REACT_AGGRESSIVE); - caster->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_UNK_6); + caster->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SWIMMING|UNIT_FLAG_UNK_6); caster->SetImmuneToAll(false); } } |