Core/Defines: define UNIT_FLAG_SWIMMING (#23630)

(cherry picked from commit c03c88d0c0)
This commit is contained in:
ForesterDev
2019-10-13 19:43:23 +04:00
committed by Shauren
parent 3da3683a90
commit 4a47e1c6be
5 changed files with 9 additions and 9 deletions

View File

@@ -584,7 +584,7 @@ public:
me->RestoreFaction();
CombatAI::Reset();
me->AddUnitFlag(UNIT_FLAG_UNK_15);
me->AddUnitFlag(UNIT_FLAG_SWIMMING);
}
void SpellHit(Unit* pCaster, SpellInfo const* pSpell) override
@@ -676,7 +676,7 @@ public:
return true;
me->SetImmuneToPC(false);
me->RemoveUnitFlag(UNIT_FLAG_UNK_15);
me->RemoveUnitFlag(UNIT_FLAG_SWIMMING);
player->CastSpell(me, SPELL_DUEL, false);
player->CastSpell(player, SPELL_DUEL_FLAG, true);

View File

@@ -282,10 +282,10 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader
if (Unit* caster = GetCaster())
{
// flags taken from sniffs
if (caster->HasUnitFlag(UnitFlags(UNIT_FLAG_UNK_15 | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6)))
if (caster->HasUnitFlag(UnitFlags(UNIT_FLAG_SWIMMING | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_UNK_6)))
{
caster->ToCreature()->SetReactState(REACT_PASSIVE);
caster->AddUnitFlag(UnitFlags(UNIT_FLAG_UNK_15 | UNIT_FLAG_UNK_6));
caster->AddUnitFlag(UnitFlags(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->RemoveUnitFlag(UnitFlags(UNIT_FLAG_UNK_15 | UNIT_FLAG_UNK_6));
caster->RemoveUnitFlag(UnitFlags(UNIT_FLAG_SWIMMING | UNIT_FLAG_UNK_6));
caster->SetImmuneToAll(false);
}
}