mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Implement one hand wielding two-hand weapon ability (warrior talent 46917)
Signed-off-by: TERRANZ <TERRANZ@mangos.ru> Small slot checking fixes and make dual wielding dependent from related ability. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
4f55ef857a
commit
558909614a
4 changed files with 53 additions and 35 deletions
|
|
@ -212,7 +212,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
|||
&Spell::EffectNULL, //152 SPELL_EFFECT_152 summon Refer-a-Friend
|
||||
&Spell::EffectNULL, //153 SPELL_EFFECT_CREATE_PET misc value is creature entry
|
||||
&Spell::EffectNULL, //154 unused
|
||||
&Spell::EffectNULL, //155 Allows you to equip two-handed axes, maces and swords in one hand, but you attack $49152s1% slower than normal.
|
||||
&Spell::EffectTitanGrip, //155 Allows you to equip two-handed axes, maces and swords in one hand, but you attack $49152s1% slower than normal.
|
||||
&Spell::EffectNULL, //156 Add Socket
|
||||
&Spell::EffectNULL, //157 create/learn random item/spell for profession
|
||||
&Spell::EffectMilling, //158 milling
|
||||
|
|
@ -3443,7 +3443,7 @@ void Spell::EffectDispel(uint32 i)
|
|||
|
||||
void Spell::EffectDualWield(uint32 /*i*/)
|
||||
{
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->SetCanDualWield(true);
|
||||
}
|
||||
|
||||
|
|
@ -5532,18 +5532,14 @@ void Spell::EffectAddExtraAttacks(uint32 /*i*/)
|
|||
|
||||
void Spell::EffectParry(uint32 /*i*/)
|
||||
{
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->SetCanParry(true);
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::EffectBlock(uint32 /*i*/)
|
||||
{
|
||||
if (unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
((Player*)unitTarget)->SetCanBlock(true);
|
||||
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->SetCanBlock(true);
|
||||
}
|
||||
|
||||
void Spell::EffectMomentMove(uint32 i)
|
||||
|
|
@ -6340,3 +6336,9 @@ void Spell::EffectActivateRune(uint32 i)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::EffectTitanGrip(uint32 i)
|
||||
{
|
||||
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->SetCanTitanGrip(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue