mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7056] Proc system add
Add use autorepeat flag and set more corect triggers flag for ranged autorepeat spells Restore work paladin 20210 and ranks after client switch Add 6-7 scripted paladin shock spell (also add it in dummy and fix flag) Hidden cooldown and hacky (need more fixes in triggers) fix for 33953 Remove not used code Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
e07baf2914
commit
71b33ca2f1
11 changed files with 67 additions and 41 deletions
|
|
@ -22,7 +22,7 @@
|
|||
DROP TABLE IF EXISTS `db_version`;
|
||||
CREATE TABLE `db_version` (
|
||||
`version` varchar(120) default NULL,
|
||||
`required_7053_01_mangos_spell_proc_event` bit(1) default NULL
|
||||
`required_7056_01_mangos_spell_proc_event` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
|
|
@ -16272,11 +16272,11 @@ INSERT INTO `spell_proc_event` VALUES
|
|||
(20165, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 20.000000, 0.000000, 0),
|
||||
(20166, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 20.000000, 0.000000, 0),
|
||||
(20182, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0),
|
||||
(20210, 0x00000000, 10, 0xC0200000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20212, 0x00000000, 10, 0xC0200000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20213, 0x00000000, 10, 0xC0200000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20214, 0x00000000, 10, 0xC0200000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20215, 0x00000000, 10, 0xC0200000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20210, 0x00000000, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20212, 0x00000000, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20213, 0x00000000, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20214, 0x00000000, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20215, 0x00000000, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(20234, 0x00000000, 10, 0x00008000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||
(20235, 0x00000000, 10, 0x00008000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||
(20375, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 7.000000, 0.000000, 0),
|
||||
|
|
@ -16468,6 +16468,7 @@ INSERT INTO `spell_proc_event` VALUES
|
|||
(33881, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(33882, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(33883, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||
(33953, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 45),
|
||||
(34080, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0.000000, 0.000000, 0),
|
||||
(34138, 0x00000000, 11, 0x00000080, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||
(34139, 0x00000000, 10, 0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||
|
|
@ -16894,7 +16895,7 @@ INSERT INTO `spell_proc_event` VALUES
|
|||
(60818, 0x00000000, 10, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||
(60826, 0x00000000, 15, 0x01400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||
(61188, 0x00000000, 5, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||
(61324, 0x00000000, 10, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0;
|
||||
(61324, 0x00000000, 10, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||
/*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
|
|
|||
25
sql/updates/7056_01_mangos_spell_proc_event.sql
Normal file
25
sql/updates/7056_01_mangos_spell_proc_event.sql
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_7053_01_mangos_spell_proc_event required_7056_01_mangos_spell_proc_event bit;
|
||||
|
||||
-- (20210) Illumination (Rank 1)
|
||||
DELETE FROM `spell_proc_event` WHERE `entry` IN (20210);
|
||||
INSERT INTO `spell_proc_event` VALUES (20210, 0x00, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
|
||||
|
||||
-- (20212) Illumination (Rank 2)
|
||||
DELETE FROM `spell_proc_event` WHERE `entry` IN (20212);
|
||||
INSERT INTO `spell_proc_event` VALUES (20212, 0x00, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
|
||||
|
||||
-- (20213) Illumination (Rank 3)
|
||||
DELETE FROM `spell_proc_event` WHERE `entry` IN (20213);
|
||||
INSERT INTO `spell_proc_event` VALUES (20213, 0x00, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
|
||||
|
||||
-- (20214) Illumination (Rank 4)
|
||||
DELETE FROM `spell_proc_event` WHERE `entry` IN (20214);
|
||||
INSERT INTO `spell_proc_event` VALUES (20214, 0x00, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
|
||||
|
||||
-- (20215) Illumination (Rank 5)
|
||||
DELETE FROM `spell_proc_event` WHERE `entry` IN (20215);
|
||||
INSERT INTO `spell_proc_event` VALUES (20215, 0x00, 10, 0xC0000000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
|
||||
|
||||
-- (33953) Essence of Life ()
|
||||
DELETE FROM `spell_proc_event` WHERE `entry` IN (33953);
|
||||
INSERT INTO `spell_proc_event` VALUES (33953, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 45);
|
||||
|
|
@ -123,6 +123,7 @@ pkgdata_DATA = \
|
|||
7051_01_mangos_spell_proc_event.sql \
|
||||
7052_01_mangos_spell_proc_event.sql \
|
||||
7053_01_mangos_spell_proc_event.sql \
|
||||
7056_01_mangos_spell_proc_event.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -226,4 +227,5 @@ EXTRA_DIST = \
|
|||
7051_01_mangos_spell_proc_event.sql \
|
||||
7052_01_mangos_spell_proc_event.sql \
|
||||
7053_01_mangos_spell_proc_event.sql \
|
||||
7056_01_mangos_spell_proc_event.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -4844,22 +4844,8 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType)
|
|||
UpdateAllCritPercentages();
|
||||
}
|
||||
|
||||
void Player::UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, MeleeHitOutcome outcome, bool defence)
|
||||
void Player::UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, bool defence)
|
||||
{
|
||||
/* Not need, this checked on call this func from trigger system
|
||||
switch(outcome)
|
||||
{
|
||||
case MELEE_HIT_CRIT:
|
||||
case MELEE_HIT_DODGE:
|
||||
case MELEE_HIT_PARRY:
|
||||
case MELEE_HIT_BLOCK:
|
||||
case MELEE_HIT_BLOCK_CRIT:
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
*/
|
||||
uint32 plevel = getLevel(); // if defense than pVictim == attacker
|
||||
uint32 greylevel = MaNGOS::XP::GetGrayLevel(plevel);
|
||||
uint32 moblevel = pVictim->getLevelForTarget(this);
|
||||
|
|
|
|||
|
|
@ -1739,7 +1739,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
|
||||
void UpdateDefense();
|
||||
void UpdateWeaponSkill (WeaponAttackType attType);
|
||||
void UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, MeleeHitOutcome outcome, bool defence);
|
||||
void UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, bool defence);
|
||||
|
||||
void SetSkill(uint32 id, uint16 currVal, uint16 maxVal);
|
||||
uint16 GetMaxSkillValue(uint32 skill) const; // max + perm. bonus
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ enum ItemQualities
|
|||
#define SPELL_ATTR_EX2_UNK2 0x00000004 // 2
|
||||
#define SPELL_ATTR_EX2_UNK3 0x00000008 // 3
|
||||
#define SPELL_ATTR_EX2_UNK4 0x00000010 // 4
|
||||
#define SPELL_ATTR_EX2_UNK5 0x00000020 // 5
|
||||
#define SPELL_ATTR_EX2_AUTOREPEAT_FLAG 0x00000020 // 5
|
||||
#define SPELL_ATTR_EX2_UNK6 0x00000040 // 6
|
||||
#define SPELL_ATTR_EX2_UNK7 0x00000080 // 7
|
||||
#define SPELL_ATTR_EX2_UNK8 0x00000100 // 8 not set in 3.0.3
|
||||
|
|
|
|||
|
|
@ -709,8 +709,17 @@ void Spell::prepareDataForTriggerSystem()
|
|||
m_procVictim = PROC_FLAG_TAKEN_MELEE_SPELL_HIT;
|
||||
break;
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
// Auto attack
|
||||
if (m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_AUTOREPEAT_FLAG)
|
||||
{
|
||||
m_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_HIT;
|
||||
m_procVictim = PROC_FLAG_TAKEN_RANGED_HIT;
|
||||
}
|
||||
else // Ranged spell attack
|
||||
{
|
||||
m_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT;
|
||||
m_procVictim = PROC_FLAG_TAKEN_RANGED_SPELL_HIT;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (IsPositiveSpell(m_spellInfo->Id)) // Check for positive spell
|
||||
|
|
@ -718,13 +727,12 @@ void Spell::prepareDataForTriggerSystem()
|
|||
m_procAttacker = PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL;
|
||||
m_procVictim = PROC_FLAG_TAKEN_POSITIVE_SPELL;
|
||||
}
|
||||
// Wands
|
||||
else if (IsAutoRepeatRangedSpell(m_spellInfo) && m_spellInfo->Id != SPELL_ID_AUTOSHOT)
|
||||
else if (m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_AUTOREPEAT_FLAG) // Wands auto attack
|
||||
{
|
||||
m_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT;
|
||||
m_procVictim = PROC_FLAG_TAKEN_RANGED_SPELL_HIT;
|
||||
m_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_HIT;
|
||||
m_procVictim = PROC_FLAG_TAKEN_RANGED_HIT;
|
||||
}
|
||||
else
|
||||
else // Negative spell
|
||||
{
|
||||
m_procAttacker = PROC_FLAG_SUCCESSFUL_NEGATIVE_SPELL_HIT;
|
||||
m_procVictim = PROC_FLAG_TAKEN_NEGATIVE_SPELL_HIT;
|
||||
|
|
|
|||
|
|
@ -1517,6 +1517,8 @@ void Spell::EffectDummy(uint32 i)
|
|||
case 20930: hurt = 25902; heal = 25903; break;
|
||||
case 27174: hurt = 27176; heal = 27175; break;
|
||||
case 33072: hurt = 33073; heal = 33074; break;
|
||||
case 48824: hurt = 48822; heal = 48820; break;
|
||||
case 48825: hurt = 48823; heal = 48821; break;
|
||||
default:
|
||||
sLog.outError("Spell::EffectDummy: Spell %u not handled in HS",m_spellInfo->Id);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -417,10 +417,9 @@ inline bool isSpellBreakStealth(SpellEntry const* spellInfo)
|
|||
|
||||
inline bool IsAutoRepeatRangedSpell(SpellEntry const* spellInfo)
|
||||
{
|
||||
return (spellInfo->Attributes & SPELL_ATTR_RANGED) && (spellInfo->AttributesEx2 == 0x000020 /*autorepeat*/);
|
||||
return (spellInfo->Attributes & SPELL_ATTR_RANGED) && (spellInfo->AttributesEx2 & SPELL_ATTR_EX2_AUTOREPEAT_FLAG);
|
||||
}
|
||||
|
||||
|
||||
uint8 GetErrorAtShapeshiftedCast (SpellEntry const *spellInfo, uint32 form);
|
||||
|
||||
inline bool IsChanneledSpell(SpellEntry const* spellInfo)
|
||||
|
|
|
|||
|
|
@ -5825,8 +5825,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
return false;
|
||||
// procspell is triggered spell but we need mana cost of original casted spell
|
||||
uint32 originalSpellId = procSpell->Id;
|
||||
// Holy Shock
|
||||
if(procSpell->SpellFamilyFlags & 0x00200000)
|
||||
// Holy Shock heal
|
||||
if(procSpell->SpellFamilyFlags & 0x0001000000000000LL)
|
||||
{
|
||||
switch(procSpell->Id)
|
||||
{
|
||||
|
|
@ -5835,6 +5835,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
case 25903: originalSpellId = 20930; break;
|
||||
case 27175: originalSpellId = 27174; break;
|
||||
case 33074: originalSpellId = 33072; break;
|
||||
case 48820: originalSpellId = 48824; break;
|
||||
case 48821: originalSpellId = 48825; break;
|
||||
default:
|
||||
sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in HShock",procSpell->Id);
|
||||
return false;
|
||||
|
|
@ -5847,7 +5849,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
return false;
|
||||
}
|
||||
// percent stored in effect 1 (class scripts) base points
|
||||
basepoints0 = originalSpell->manaCost*(auraSpellInfo->EffectBasePoints[1]+1)/100;
|
||||
int32 cost = originalSpell->manaCost + originalSpell->ManaCostPercentage * GetCreateMana() / 100;
|
||||
basepoints0 = cost*(auraSpellInfo->EffectBasePoints[1]+1)/100;
|
||||
trigger_spell_id = 20272;
|
||||
target = this;
|
||||
}
|
||||
|
|
@ -9816,7 +9819,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||
if (procExtra&(PROC_EX_NORMAL_HIT|PROC_EX_MISS|PROC_EX_RESIST))
|
||||
{
|
||||
if (pTarget->GetTypeId() != TYPEID_PLAYER && pTarget->GetCreatureType() != CREATURE_TYPE_CRITTER)
|
||||
((Player*)this)->UpdateCombatSkills(pTarget, attType, MELEE_HIT_MISS, isVictim);
|
||||
((Player*)this)->UpdateCombatSkills(pTarget, attType, isVictim);
|
||||
}
|
||||
// Update defence if player is victim and parry/dodge/block
|
||||
if (isVictim && procExtra&(PROC_EX_DODGE|PROC_EX_PARRY|PROC_EX_BLOCK))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7055"
|
||||
#define REVISION_NR "7056"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue