mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7091] Work vs spell attributes (compare 303 and 308)
Add some comments Use correct flag for SPELL_ATTR_EX_NO_INITIAL_AGGRO Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
7cd3fa8680
commit
7cded2ed9c
3 changed files with 22 additions and 28 deletions
|
|
@ -252,7 +252,7 @@ enum ItemQualities
|
|||
#define SPELL_ATTR_EX_NEGATIVE 0x00000080 // 7
|
||||
#define SPELL_ATTR_EX_NOT_IN_COMBAT_TARGET 0x00000100 // 8 Spell req target not to be in combat state
|
||||
#define SPELL_ATTR_EX_UNK9 0x00000200 // 9
|
||||
#define SPELL_ATTR_EX_UNK10 0x00000400 // 10
|
||||
#define SPELL_ATTR_EX_NO_INITIAL_AGGRO 0x00000400 // 10 no generates threat on cast 100%
|
||||
#define SPELL_ATTR_EX_UNK11 0x00000800 // 11
|
||||
#define SPELL_ATTR_EX_UNK12 0x00001000 // 12
|
||||
#define SPELL_ATTR_EX_UNK13 0x00002000 // 13
|
||||
|
|
@ -303,7 +303,7 @@ enum ItemQualities
|
|||
#define SPELL_ATTR_EX2_UNK25 0x02000000 // 25
|
||||
#define SPELL_ATTR_EX2_UNK26 0x04000000 // 26 unaffected by school immunity
|
||||
#define SPELL_ATTR_EX2_UNK27 0x08000000 // 27
|
||||
#define SPELL_ATTR_EX2_UNK28 0x10000000 // 28
|
||||
#define SPELL_ATTR_EX2_UNK28 0x10000000 // 28 no breaks stealth if it fails??
|
||||
#define SPELL_ATTR_EX2_CANT_CRIT 0x20000000 // 29 Spell can't crit
|
||||
#define SPELL_ATTR_EX2_UNK30 0x40000000 // 30
|
||||
#define SPELL_ATTR_EX2_UNK31 0x80000000 // 31
|
||||
|
|
@ -324,8 +324,8 @@ enum ItemQualities
|
|||
#define SPELL_ATTR_EX3_UNK13 0x00002000 // 13
|
||||
#define SPELL_ATTR_EX3_UNK14 0x00004000 // 14 "Honorless Target" only this spells have this flag
|
||||
#define SPELL_ATTR_EX3_UNK15 0x00008000 // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag
|
||||
#define SPELL_ATTR_EX3_UNK16 0x00010000 // 16
|
||||
#define SPELL_ATTR_EX3_NO_INITIAL_AGGRO 0x00020000 // 17 no initial aggro
|
||||
#define SPELL_ATTR_EX3_UNK16 0x00010000 // 16 no triggers effects that trigger on casting a spell??
|
||||
#define SPELL_ATTR_EX3_UNK17 0x00020000 // 17 no triggers effects that trigger on casting a spell??
|
||||
#define SPELL_ATTR_EX3_UNK18 0x00040000 // 18
|
||||
#define SPELL_ATTR_EX3_UNK19 0x00080000 // 19
|
||||
#define SPELL_ATTR_EX3_DEATH_PERSISTENT 0x00100000 // 20 Death persistent spells
|
||||
|
|
@ -333,7 +333,7 @@ enum ItemQualities
|
|||
#define SPELL_ATTR_EX3_REQ_WAND 0x00400000 // 22 Req wand
|
||||
#define SPELL_ATTR_EX3_UNK23 0x00800000 // 23
|
||||
#define SPELL_ATTR_EX3_REQ_OFFHAND 0x01000000 // 24 Req offhand weapon
|
||||
#define SPELL_ATTR_EX3_UNK25 0x02000000 // 25
|
||||
#define SPELL_ATTR_EX3_UNK25 0x02000000 // 25 no cause spell pushback ?
|
||||
#define SPELL_ATTR_EX3_UNK26 0x04000000 // 26
|
||||
#define SPELL_ATTR_EX3_UNK27 0x08000000 // 27
|
||||
#define SPELL_ATTR_EX3_UNK28 0x10000000 // 28
|
||||
|
|
@ -345,7 +345,7 @@ enum ItemQualities
|
|||
#define SPELL_ATTR_EX4_UNK1 0x00000002 // 1 proc on finishing move?
|
||||
#define SPELL_ATTR_EX4_UNK2 0x00000004 // 2
|
||||
#define SPELL_ATTR_EX4_UNK3 0x00000008 // 3
|
||||
#define SPELL_ATTR_EX4_UNK4 0x00000010 // 4
|
||||
#define SPELL_ATTR_EX4_UNK4 0x00000010 // 4 This will no longer cause guards to attack on use??
|
||||
#define SPELL_ATTR_EX4_UNK5 0x00000020 // 5
|
||||
#define SPELL_ATTR_EX4_UNK6 0x00000040 // 6
|
||||
#define SPELL_ATTR_EX4_UNK7 0x00000080 // 7
|
||||
|
|
|
|||
|
|
@ -1091,30 +1091,24 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
return;
|
||||
}
|
||||
|
||||
// exclude Arcane Missiles Dummy Aura aura for now (attack on hit)
|
||||
// TODO: find way to not need this?
|
||||
if(!(m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE &&
|
||||
m_spellInfo->SpellFamilyFlags & 0x800LL))
|
||||
unit->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
|
||||
if( !(m_spellInfo->AttributesEx & SPELL_ATTR_EX_NO_INITIAL_AGGRO) )
|
||||
{
|
||||
unit->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
if(!unit->IsStandState() && !unit->hasUnitState(UNIT_STAT_STUNNED))
|
||||
unit->SetStandState(PLAYER_STATE_NONE);
|
||||
|
||||
if( !(m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_NO_INITIAL_AGGRO) )
|
||||
if(!unit->isInCombat() && unit->GetTypeId() != TYPEID_PLAYER && ((Creature*)unit)->AI())
|
||||
((Creature*)unit)->AI()->AttackStart(m_caster);
|
||||
|
||||
unit->SetInCombatWith(m_caster);
|
||||
m_caster->SetInCombatWith(unit);
|
||||
|
||||
if(Player *attackedPlayer = unit->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
{
|
||||
if(!unit->IsStandState() && !unit->hasUnitState(UNIT_STAT_STUNNED))
|
||||
unit->SetStandState(PLAYER_STATE_NONE);
|
||||
|
||||
if(!unit->isInCombat() && unit->GetTypeId() != TYPEID_PLAYER && ((Creature*)unit)->AI())
|
||||
((Creature*)unit)->AI()->AttackStart(m_caster);
|
||||
|
||||
unit->SetInCombatWith(m_caster);
|
||||
m_caster->SetInCombatWith(unit);
|
||||
|
||||
if(Player *attackedPlayer = unit->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
{
|
||||
m_caster->SetContestedPvP(attackedPlayer);
|
||||
}
|
||||
unit->AddThreat(m_caster, 0.0f);
|
||||
m_caster->SetContestedPvP(attackedPlayer);
|
||||
}
|
||||
unit->AddThreat(m_caster, 0.0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1129,7 +1123,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
// assisting case, healing and resurrection
|
||||
if(unit->hasUnitState(UNIT_STAT_ATTACK_PLAYER))
|
||||
m_caster->SetContestedPvP();
|
||||
if( unit->isInCombat() && !(m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_NO_INITIAL_AGGRO) )
|
||||
if( unit->isInCombat() && !(m_spellInfo->AttributesEx & SPELL_ATTR_EX_NO_INITIAL_AGGRO) )
|
||||
{
|
||||
m_caster->SetInCombatState(unit->GetCombatTimer() > 0);
|
||||
unit->getHostilRefManager().threatAssist(m_caster, 0.0f);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7090"
|
||||
#define REVISION_NR "7091"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue