mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +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
|
|
@ -3390,7 +3390,17 @@ void Spell::cast(bool skipCheck)
|
||||||
else if (m_spellInfo->Id == 20594)
|
else if (m_spellInfo->Id == 20594)
|
||||||
AddTriggeredSpell(65116); // Stoneskin - armor 10% for 8 sec
|
AddTriggeredSpell(65116); // Stoneskin - armor 10% for 8 sec
|
||||||
else if (m_spellInfo->Id == 68992) // Darkflight
|
else if (m_spellInfo->Id == 68992) // Darkflight
|
||||||
|
{
|
||||||
AddPrecastSpell(96223); // Run Speed Marker
|
AddPrecastSpell(96223); // Run Speed Marker
|
||||||
|
AddPrecastSpell(97709); // Altered Form
|
||||||
|
}
|
||||||
|
else if (m_spellInfo->Id == 68996) // Two Forms
|
||||||
|
{
|
||||||
|
if (m_caster->IsInWorgenForm())
|
||||||
|
m_caster->RemoveSpellsCausingAura(SPELL_AURA_WORGEN_TRANSFORM);
|
||||||
|
else
|
||||||
|
AddPrecastSpell(97709); // Altered Form
|
||||||
|
}
|
||||||
// Chaos Bane strength buff
|
// Chaos Bane strength buff
|
||||||
else if (m_spellInfo->Id == 71904)
|
else if (m_spellInfo->Id == 71904)
|
||||||
AddTriggeredSpell(73422);
|
AddTriggeredSpell(73422);
|
||||||
|
|
@ -5665,6 +5675,11 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
if (m_caster->IsInWater())
|
if (m_caster->IsInWater())
|
||||||
return SPELL_FAILED_ONLY_ABOVEWATER;
|
return SPELL_FAILED_ONLY_ABOVEWATER;
|
||||||
}
|
}
|
||||||
|
else if (m_spellInfo->Id == 68996) // Two forms
|
||||||
|
{
|
||||||
|
if (m_caster->isInCombat())
|
||||||
|
return SPELL_FAILED_AFFECTING_COMBAT;
|
||||||
|
}
|
||||||
else if (m_spellInfo->SpellIconID == 156) // Holy Shock
|
else if (m_spellInfo->SpellIconID == 156) // Holy Shock
|
||||||
{
|
{
|
||||||
// spell different for friends and enemies
|
// spell different for friends and enemies
|
||||||
|
|
|
||||||
|
|
@ -393,7 +393,7 @@ enum AuraType
|
||||||
SPELL_AURA_355 = 355,
|
SPELL_AURA_355 = 355,
|
||||||
SPELL_AURA_MOD_DAMAGE_DONE_FROM_PCT_POWER = 356,
|
SPELL_AURA_MOD_DAMAGE_DONE_FROM_PCT_POWER = 356,
|
||||||
SPELL_AURA_357 = 357,
|
SPELL_AURA_357 = 357,
|
||||||
SPELL_AURA_358 = 358,
|
SPELL_AURA_WORGEN_TRANSFORM = 358,
|
||||||
SPELL_AURA_359 = 359,
|
SPELL_AURA_359 = 359,
|
||||||
SPELL_AURA_PROC_DUPLICATE_SPELLS = 360,
|
SPELL_AURA_PROC_DUPLICATE_SPELLS = 360,
|
||||||
SPELL_AURA_361 = 361,
|
SPELL_AURA_361 = 361,
|
||||||
|
|
|
||||||
|
|
@ -411,7 +411,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS] =
|
||||||
&Aura::HandleUnused, //355 0 spells in 4.3.4
|
&Aura::HandleUnused, //355 0 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //356 SPELL_AURA_MOD_DAMAGE_DONE_FROM_PCT_POWER 2 spells in 4.3.4
|
&Aura::HandleNULL, //356 SPELL_AURA_MOD_DAMAGE_DONE_FROM_PCT_POWER 2 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //357 1 spells in 4.3.4 Enable Tower Assault Unit Frame
|
&Aura::HandleNULL, //357 1 spells in 4.3.4 Enable Tower Assault Unit Frame
|
||||||
&Aura::HandleNULL, //358 5 spells in 4.3.4 forces client-side transformation to worgen form
|
&Aura::HandleNoImmediateEffect, //358 SPELL_AURA_WORGEN_TRANSFORM 5 spells in 4.3.4 forces client-side transformation to worgen form
|
||||||
&Aura::HandleNULL, //359 1 spells in 4.3.4 healing done vs aurastate?
|
&Aura::HandleNULL, //359 1 spells in 4.3.4 healing done vs aurastate?
|
||||||
&Aura::HandleNULL, //360 SPELL_AURA_PROC_DUPLICATE_SPELLS 2 spells in 4.3.4
|
&Aura::HandleNULL, //360 SPELL_AURA_PROC_DUPLICATE_SPELLS 2 spells in 4.3.4
|
||||||
&Aura::HandleNULL, //361 4 spells in 4.3.4 some damage spells
|
&Aura::HandleNULL, //361 4 spells in 4.3.4 some damage spells
|
||||||
|
|
|
||||||
|
|
@ -8171,6 +8171,9 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
||||||
if (IsNonCombatSpell(spell->m_spellInfo))
|
if (IsNonCombatSpell(spell->m_spellInfo))
|
||||||
InterruptSpell(CurrentSpellTypes(i), false);
|
InterruptSpell(CurrentSpellTypes(i), false);
|
||||||
|
|
||||||
|
if (getRace() == RACE_WORGEN && !IsInWorgenForm(true))
|
||||||
|
CastSpell(this, 97709, true); // cast Altered Form
|
||||||
|
|
||||||
if (creatureNotInCombat)
|
if (creatureNotInCombat)
|
||||||
{
|
{
|
||||||
// should probably be removed for the attacked (+ it's party/group) only, not global
|
// 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();
|
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)
|
void Unit::BuildForceMoveRootPacket(WorldPacket* data, bool apply, uint32 value)
|
||||||
{
|
{
|
||||||
if (apply)
|
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());
|
data->WriteGuidBytes<0, 4, 1, 6, 7, 2, 3, 5>(GetObjectGuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Unit::BuildMoveWaterWalkPacket(WorldPacket* data, bool apply, uint32 value)
|
void Unit::BuildMoveWaterWalkPacket(WorldPacket* data, bool apply, uint32 value)
|
||||||
{
|
{
|
||||||
if (apply)
|
if (apply)
|
||||||
|
|
|
||||||
|
|
@ -1961,6 +1961,8 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
||||||
|
|
||||||
bool IsSplineEnabled() const;
|
bool IsSplineEnabled() const;
|
||||||
|
|
||||||
|
bool IsInWorgenForm(bool inPermanent = false) const;
|
||||||
|
|
||||||
// Packet builders
|
// Packet builders
|
||||||
void BuildForceMoveRootPacket(WorldPacket* data, bool apply, uint32 value);
|
void BuildForceMoveRootPacket(WorldPacket* data, bool apply, uint32 value);
|
||||||
void BuildMoveWaterWalkPacket(WorldPacket* data, bool apply, uint32 value);
|
void BuildMoveWaterWalkPacket(WorldPacket* data, bool apply, uint32 value);
|
||||||
|
|
|
||||||
|
|
@ -390,7 +390,7 @@ pAuraProcHandler AuraProcHandler[TOTAL_AURAS] =
|
||||||
&Unit::HandleNULLProc, //355 0 spells in 4.3.4
|
&Unit::HandleNULLProc, //355 0 spells in 4.3.4
|
||||||
&Unit::HandleNULLProc, //356 SPELL_AURA_MOD_DAMAGE_DONE_FROM_PCT_POWER 2 spells in 4.3.4
|
&Unit::HandleNULLProc, //356 SPELL_AURA_MOD_DAMAGE_DONE_FROM_PCT_POWER 2 spells in 4.3.4
|
||||||
&Unit::HandleNULLProc, //357 1 spells in 4.3.4 Enable Tower Assault Unit Frame
|
&Unit::HandleNULLProc, //357 1 spells in 4.3.4 Enable Tower Assault Unit Frame
|
||||||
&Unit::HandleNULLProc, //358 5 spells in 4.3.4 worgen form/mount related
|
&Unit::HandleNULLProc, //358 SPELL_AURA_WORGEN_TRANSFORM 5 spells in 4.3.4 forces client-side transformation to worgen form
|
||||||
&Unit::HandleNULLProc, //359 1 spells in 4.3.4 healing done vs aurastate?
|
&Unit::HandleNULLProc, //359 1 spells in 4.3.4 healing done vs aurastate?
|
||||||
&Unit::HandleNULLProc, //360 SPELL_AURA_PROC_DUPLICATE_SPELLS 2 spells in 4.3.4
|
&Unit::HandleNULLProc, //360 SPELL_AURA_PROC_DUPLICATE_SPELLS 2 spells in 4.3.4
|
||||||
&Unit::HandleNULLProc, //361 4 spells in 4.3.4 some damage spells
|
&Unit::HandleNULLProc, //361 4 spells in 4.3.4 some damage spells
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "0141"
|
#define REVISION_NR "0142"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue