mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[142] Implement worgen transformations
Signed-off-by: Yaki Khadafi <ElSolDolLo@gmail.com>
This commit is contained in:
parent
0dd98c1e8d
commit
9a00d62017
7 changed files with 34 additions and 5 deletions
|
|
@ -8171,6 +8171,9 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
|||
if (IsNonCombatSpell(spell->m_spellInfo))
|
||||
InterruptSpell(CurrentSpellTypes(i), false);
|
||||
|
||||
if (getRace() == RACE_WORGEN && !IsInWorgenForm(true))
|
||||
CastSpell(this, 97709, true); // cast Altered Form
|
||||
|
||||
if (creatureNotInCombat)
|
||||
{
|
||||
// should probably be removed for the attacked (+ it's party/group) only, not global
|
||||
|
|
@ -11626,6 +11629,16 @@ bool Unit::IsSplineEnabled() const
|
|||
return movespline->Initialized();
|
||||
}
|
||||
|
||||
bool Unit::IsInWorgenForm(bool inPermanent) const
|
||||
{
|
||||
AuraList const& vTransformAuras = GetAurasByType(SPELL_AURA_WORGEN_TRANSFORM);
|
||||
for (AuraList::const_iterator itr = vTransformAuras.begin(); itr != vTransformAuras.end(); ++itr)
|
||||
if (!inPermanent || (*itr)->GetHolder()->IsPermanent())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Unit::BuildForceMoveRootPacket(WorldPacket* data, bool apply, uint32 value)
|
||||
{
|
||||
if (apply)
|
||||
|
|
@ -11677,7 +11690,6 @@ void Unit::BuildSendPlayVisualPacket(WorldPacket* data, uint32 value, bool impac
|
|||
data->WriteGuidBytes<0, 4, 1, 6, 7, 2, 3, 5>(GetObjectGuid());
|
||||
}
|
||||
|
||||
|
||||
void Unit::BuildMoveWaterWalkPacket(WorldPacket* data, bool apply, uint32 value)
|
||||
{
|
||||
if (apply)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue