mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
Added spell cast flags research.
This commit is contained in:
parent
6e1988bfc7
commit
4181b8f28b
5 changed files with 65 additions and 53 deletions
|
|
@ -420,7 +420,7 @@ enum SpellCastTargetFlags
|
|||
TARGET_FLAG_UNK2 = 0x00010000, // pguid, not used in any spells as of 3.0.3 (can be set dynamically)
|
||||
TARGET_FLAG_GLYPH = 0x00020000, // used in glyph spells
|
||||
TARGET_FLAG_UNK3 = 0x00040000, //
|
||||
TARGET_FLAG_UNK4 = 0x00080000 // uint32, loop { vec3, guid -> if guid == 0 break }
|
||||
TARGET_FLAG_VISUAL_CHAIN = 0x00080000 // uint32, loop { vec3, guid -> if guid == 0 break }
|
||||
};
|
||||
|
||||
enum SpellEffectIndex
|
||||
|
|
|
|||
|
|
@ -1510,7 +1510,7 @@ struct SpellEntry
|
|||
uint32 Category; // 1 m_category
|
||||
uint32 Dispel; // 2 m_dispelType
|
||||
uint32 Mechanic; // 3 m_mechanic
|
||||
uint32 Attributes; // 4 m_attribute
|
||||
uint32 Attributes; // 4 m_attributes
|
||||
uint32 AttributesEx; // 5 m_attributesEx
|
||||
uint32 AttributesEx2; // 6 m_attributesExB
|
||||
uint32 AttributesEx3; // 7 m_attributesExC
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
|
|||
#define SPELL_ATTR_LEVEL_DAMAGE_CALCULATION 0x00080000 // 19 spelldamage depends on caster level
|
||||
#define SPELL_ATTR_STOP_ATTACK_TARGET 0x00100000 // 20 Stop attack after use this spell (and not begin attack if use)
|
||||
#define SPELL_ATTR_IMPOSSIBLE_DODGE_PARRY_BLOCK 0x00200000 // 21 Cannot be dodged/parried/blocked
|
||||
#define SPELL_ATTR_UNK22 0x00400000 // 22
|
||||
#define SPELL_ATTR_SET_TRACKING_TARGET 0x00400000 // 22 SetTrackingTarget
|
||||
#define SPELL_ATTR_UNK23 0x00800000 // 23 castable while dead?
|
||||
#define SPELL_ATTR_CASTABLE_WHILE_MOUNTED 0x01000000 // 24 castable while mounted
|
||||
#define SPELL_ATTR_DISABLED_WHILE_ACTIVE 0x02000000 // 25 Activate and start cooldown after aura fade or remove summoned creature or go
|
||||
|
|
|
|||
|
|
@ -3588,12 +3588,12 @@ void Spell::SendSpellStart()
|
|||
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Sending SMSG_SPELL_START id=%u", m_spellInfo->Id);
|
||||
|
||||
uint32 castFlags = CAST_FLAG_UNKNOWN1;
|
||||
uint32 castFlags = CAST_FLAG_UNKNOWN2;
|
||||
if (IsRangedSpell())
|
||||
castFlags |= CAST_FLAG_AMMO;
|
||||
|
||||
if (m_spellInfo->runeCostID)
|
||||
castFlags |= CAST_FLAG_UNKNOWN10;
|
||||
castFlags |= CAST_FLAG_UNKNOWN19;
|
||||
|
||||
WorldPacket data(SMSG_SPELL_START, (8+8+4+4+2));
|
||||
if (m_CastItem)
|
||||
|
|
@ -3602,16 +3602,17 @@ void Spell::SendSpellStart()
|
|||
data << m_caster->GetPackGUID();
|
||||
|
||||
data << m_caster->GetPackGUID();
|
||||
data << uint8(m_cast_count); // pending spell cast?
|
||||
data << uint8(m_cast_count); // pending spell cast
|
||||
data << uint32(m_spellInfo->Id); // spellId
|
||||
data << uint32(castFlags); // cast flags
|
||||
data << uint32(m_timer); // delay?
|
||||
|
||||
data << m_targets;
|
||||
|
||||
if ( castFlags & CAST_FLAG_UNKNOWN6 ) // predicted power?
|
||||
if (castFlags & CAST_FLAG_PREDICTED_POWER) // predicted power
|
||||
data << uint32(0);
|
||||
|
||||
if ( castFlags & CAST_FLAG_UNKNOWN7 ) // rune cooldowns list
|
||||
if (castFlags & CAST_FLAG_PREDICTED_RUNES) // predicted runes
|
||||
{
|
||||
uint8 v1 = 0;//m_runesState;
|
||||
uint8 v2 = 0;//((Player*)m_caster)->GetRunesState();
|
||||
|
|
@ -3626,13 +3627,13 @@ void Spell::SendSpellStart()
|
|||
}
|
||||
}
|
||||
|
||||
if ( castFlags & CAST_FLAG_AMMO )
|
||||
if (castFlags & CAST_FLAG_AMMO) // projectile info
|
||||
WriteAmmoToPacket(&data);
|
||||
|
||||
if ( castFlags & CAST_FLAG_UNKNOWN21 )
|
||||
if (castFlags & CAST_FLAG_IMMUNITY) // cast immunity
|
||||
{
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
data << uint32(0); // used for SetCastSchoolImmunities
|
||||
data << uint32(0); // used for SetCastImmunities
|
||||
}
|
||||
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
|
|
@ -3646,15 +3647,15 @@ void Spell::SendSpellGo()
|
|||
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
|
||||
|
||||
uint32 castFlags = CAST_FLAG_UNKNOWN3;
|
||||
uint32 castFlags = CAST_FLAG_UNKNOWN9;
|
||||
if (IsRangedSpell())
|
||||
castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual
|
||||
|
||||
if ((m_caster->GetTypeId() == TYPEID_PLAYER) && (m_caster->getClass() == CLASS_DEATH_KNIGHT) && m_spellInfo->runeCostID)
|
||||
{
|
||||
castFlags |= CAST_FLAG_UNKNOWN10; // same as in SMSG_SPELL_START
|
||||
castFlags |= CAST_FLAG_UNKNOWN6; // makes cooldowns visible
|
||||
castFlags |= CAST_FLAG_UNKNOWN7; // rune cooldowns list
|
||||
castFlags |= CAST_FLAG_UNKNOWN19; // same as in SMSG_SPELL_START
|
||||
castFlags |= CAST_FLAG_PREDICTED_POWER; // makes cooldowns visible
|
||||
castFlags |= CAST_FLAG_PREDICTED_RUNES; // rune cooldowns list
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_SPELL_GO, 50); // guess size
|
||||
|
|
@ -3674,10 +3675,10 @@ void Spell::SendSpellGo()
|
|||
|
||||
data << m_targets;
|
||||
|
||||
if ( castFlags & CAST_FLAG_UNKNOWN6 ) // unknown wotlk, predicted power?
|
||||
if (castFlags & CAST_FLAG_PREDICTED_POWER) // predicted power
|
||||
data << uint32(0);
|
||||
|
||||
if ( castFlags & CAST_FLAG_UNKNOWN7 ) // rune cooldowns list
|
||||
if (castFlags & CAST_FLAG_PREDICTED_RUNES) // predicted runes
|
||||
{
|
||||
uint8 v1 = m_runesState;
|
||||
uint8 v2 = m_caster->getClass() == CLASS_DEATH_KNIGHT ? ((Player*)m_caster)->GetRunesState() : 0;
|
||||
|
|
@ -3692,19 +3693,19 @@ void Spell::SendSpellGo()
|
|||
}
|
||||
}
|
||||
|
||||
if ( castFlags & CAST_FLAG_UNKNOWN4 ) // unknown wotlk
|
||||
if (castFlags & CAST_FLAG_ADJUST_MISSILE) // adjust missile trajectory duration
|
||||
{
|
||||
data << float(0);
|
||||
data << uint32(0);
|
||||
}
|
||||
|
||||
if ( castFlags & CAST_FLAG_AMMO )
|
||||
if (castFlags & CAST_FLAG_AMMO) // projectile info
|
||||
WriteAmmoToPacket(&data);
|
||||
|
||||
if ( castFlags & CAST_FLAG_UNKNOWN5 ) // unknown wotlk
|
||||
if (castFlags & CAST_FLAG_VISUAL_CHAIN) // spell visual chain effect
|
||||
{
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
data << uint32(0); // SpellVisual.dbc id?
|
||||
data << uint32(0); // overrides previous field if > 0 and violencelevel client cvar < 2
|
||||
}
|
||||
|
||||
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||
|
|
@ -3712,6 +3713,17 @@ void Spell::SendSpellGo()
|
|||
data << uint8(0); // The value increase for each time, can remind of a cast count for the spell
|
||||
}
|
||||
|
||||
if (m_targets.m_targetMask & TARGET_FLAG_VISUAL_CHAIN) // probably used (or can be used) with CAST_FLAG_VISUAL_CHAIN flag
|
||||
{
|
||||
data << uint32(0); // count
|
||||
|
||||
//for(int = 0; i < count; ++i)
|
||||
//{
|
||||
// // position and guid?
|
||||
// data << float(0) << float(0) << float(0) << uint64(0);
|
||||
//}
|
||||
}
|
||||
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,29 +39,29 @@ class Aura;
|
|||
enum SpellCastFlags
|
||||
{
|
||||
CAST_FLAG_NONE = 0x00000000,
|
||||
CAST_FLAG_UNKNOWN0 = 0x00000001, // may be pending spell cast
|
||||
CAST_FLAG_UNKNOWN1 = 0x00000002,
|
||||
CAST_FLAG_UNKNOWN11 = 0x00000004,
|
||||
CAST_FLAG_UNKNOWN12 = 0x00000008,
|
||||
CAST_FLAG_UNKNOWN2 = 0x00000010,
|
||||
CAST_FLAG_HIDDEN_COMBATLOG = 0x00000001, // hide in combat log?
|
||||
CAST_FLAG_UNKNOWN2 = 0x00000002,
|
||||
CAST_FLAG_UNKNOWN3 = 0x00000004,
|
||||
CAST_FLAG_UNKNOWN4 = 0x00000008,
|
||||
CAST_FLAG_UNKNOWN5 = 0x00000010,
|
||||
CAST_FLAG_AMMO = 0x00000020, // Projectiles visual
|
||||
CAST_FLAG_UNKNOWN8 = 0x00000040,
|
||||
CAST_FLAG_UNKNOWN9 = 0x00000080,
|
||||
CAST_FLAG_UNKNOWN3 = 0x00000100,
|
||||
CAST_FLAG_UNKNOWN13 = 0x00000200,
|
||||
CAST_FLAG_UNKNOWN14 = 0x00000400,
|
||||
CAST_FLAG_UNKNOWN6 = 0x00000800, // wotlk, trigger rune cooldown
|
||||
CAST_FLAG_UNKNOWN15 = 0x00001000,
|
||||
CAST_FLAG_UNKNOWN16 = 0x00002000,
|
||||
CAST_FLAG_UNKNOWN17 = 0x00004000,
|
||||
CAST_FLAG_UNKNOWN18 = 0x00008000,
|
||||
CAST_FLAG_UNKNOWN19 = 0x00010000,
|
||||
CAST_FLAG_UNKNOWN4 = 0x00020000, // wotlk
|
||||
CAST_FLAG_UNKNOWN10 = 0x00040000,
|
||||
CAST_FLAG_UNKNOWN5 = 0x00080000, // wotlk
|
||||
CAST_FLAG_UNKNOWN20 = 0x00100000,
|
||||
CAST_FLAG_UNKNOWN7 = 0x00200000, // wotlk, rune cooldown list
|
||||
CAST_FLAG_UNKNOWN21 = 0x04000000
|
||||
CAST_FLAG_UNKNOWN7 = 0x00000040, // !0x41 mask used to call CGTradeSkillInfo::DoRecast
|
||||
CAST_FLAG_UNKNOWN8 = 0x00000080,
|
||||
CAST_FLAG_UNKNOWN9 = 0x00000100,
|
||||
CAST_FLAG_UNKNOWN10 = 0x00000200,
|
||||
CAST_FLAG_UNKNOWN11 = 0x00000400,
|
||||
CAST_FLAG_PREDICTED_POWER = 0x00000800, // wotlk, trigger rune cooldown
|
||||
CAST_FLAG_UNKNOWN13 = 0x00001000,
|
||||
CAST_FLAG_UNKNOWN14 = 0x00002000,
|
||||
CAST_FLAG_UNKNOWN15 = 0x00004000,
|
||||
CAST_FLAG_UNKNOWN16 = 0x00008000,
|
||||
CAST_FLAG_UNKNOWN17 = 0x00010000,
|
||||
CAST_FLAG_ADJUST_MISSILE = 0x00020000, // wotlk
|
||||
CAST_FLAG_UNKNOWN19 = 0x00040000, // spell cooldown related (may be category cooldown)
|
||||
CAST_FLAG_VISUAL_CHAIN = 0x00080000, // wotlk
|
||||
CAST_FLAG_UNKNOWN21 = 0x00100000,
|
||||
CAST_FLAG_PREDICTED_RUNES = 0x00200000, // wotlk, rune cooldown list
|
||||
CAST_FLAG_IMMUNITY = 0x04000000 // spell cast school imminity info
|
||||
};
|
||||
|
||||
enum SpellNotifyPushType
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue