[7175] Fix some hunter abilites

56342 and ranks - proc on trap activation
 34497 and ranks - mana restor amount
 56333 and ranks
 add some cast as trap activation

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
pasdVn 2009-01-25 17:46:37 +03:00
parent 3f876e89cd
commit be736100cb
7 changed files with 33 additions and 8 deletions

View file

@ -22,7 +22,7 @@
DROP TABLE IF EXISTS `db_version`; DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` ( CREATE TABLE `db_version` (
`version` varchar(120) default NULL, `version` varchar(120) default NULL,
`required_7168_01_mangos_command` bit(1) default NULL `required_7175_01_mangos_spell_proc_event` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
-- --
@ -17106,6 +17106,9 @@ INSERT INTO `spell_proc_event` VALUES
(55680, 0x00000000, 6, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (55680, 0x00000000, 6, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(55689, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (55689, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(56218, 0x00000000, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (56218, 0x00000000, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(56333, 0x00000000, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(56336, 0x00000000, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(56337, 0x00000000, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(56342, 0x00000000, 9, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (56342, 0x00000000, 9, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(56343, 0x00000000, 9, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (56343, 0x00000000, 9, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(56344, 0x00000000, 9, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (56344, 0x00000000, 9, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),

View file

@ -0,0 +1,13 @@
ALTER TABLE db_version CHANGE COLUMN required_7168_01_mangos_command required_7175_01_mangos_spell_proc_event bit;
-- (56333) T.N.T. (Rank 1)
DELETE FROM `spell_proc_event` WHERE `entry` IN (56333);
INSERT INTO `spell_proc_event` VALUES (56333, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (56336) T.N.T. (Rank 2)
DELETE FROM `spell_proc_event` WHERE `entry` IN (56336);
INSERT INTO `spell_proc_event` VALUES (56336, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
-- (56337) T.N.T. (Rank 3)
DELETE FROM `spell_proc_event` WHERE `entry` IN (56337);
INSERT INTO `spell_proc_event` VALUES (56337, 0x00, 9, 0x00000004, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);

View file

@ -151,6 +151,7 @@ pkgdata_DATA = \
7150_01_mangos_playercreateinfo_spell.sql \ 7150_01_mangos_playercreateinfo_spell.sql \
7156_01_mangos_spell_proc_event.sql \ 7156_01_mangos_spell_proc_event.sql \
7168_01_mangos_command.sql \ 7168_01_mangos_command.sql \
7175_01_mangos_spell_proc_event.sql \
README README
## Additional files to include when running 'make dist' ## Additional files to include when running 'make dist'
@ -282,4 +283,5 @@ EXTRA_DIST = \
7150_01_mangos_playercreateinfo_spell.sql \ 7150_01_mangos_playercreateinfo_spell.sql \
7156_01_mangos_spell_proc_event.sql \ 7156_01_mangos_spell_proc_event.sql \
7168_01_mangos_command.sql \ 7168_01_mangos_command.sql \
7175_01_mangos_spell_proc_event.sql \
README README

View file

@ -750,7 +750,7 @@ void Spell::prepareDataForTriggerSystem()
} }
// Hunter traps spells (for Entrapment trigger) // Hunter traps spells (for Entrapment trigger)
// Gives your Immolation Trap, Frost Trap, Explosive Trap, and Snake Trap .... // Gives your Immolation Trap, Frost Trap, Explosive Trap, and Snake Trap ....
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->SpellFamilyFlags & 0x0000200000000014LL) if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->SpellFamilyFlags & 0x000020000000001CLL)
m_procAttacker |= PROC_FLAG_ON_TRAP_ACTIVATION; m_procAttacker |= PROC_FLAG_ON_TRAP_ACTIVATION;
} }

View file

@ -888,7 +888,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP
return false; return false;
// Always trigger for this // Always trigger for this
if (EventProcFlag & (PROC_FLAG_KILLED | PROC_FLAG_KILL)) if (EventProcFlag & (PROC_FLAG_KILLED | PROC_FLAG_KILL | PROC_FLAG_ON_TRAP_ACTIVATION))
return true; return true;
if (spellProcEvent) // Exist event data if (spellProcEvent) // Exist event data

View file

@ -5278,7 +5278,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
return false; return false;
// mana cost save // mana cost save
basepoints0 = procSpell->manaCost * 40/100; int32 mana = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
basepoints0 = mana * 40/100;
if(basepoints0 <= 0) if(basepoints0 <= 0)
return false; return false;
@ -5297,9 +5298,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if ( dummySpell->SpellIconID == 3579 ) if ( dummySpell->SpellIconID == 3579 )
{ {
// Proc only from periodic (from trap activation proc another aura of this spell) // Proc only from periodic (from trap activation proc another aura of this spell)
if (!(procFlag & PROC_FLAG_ON_DO_PERIODIC)) if (!(procFlag & PROC_FLAG_ON_DO_PERIODIC) || !roll_chance_i(triggerAmount))
return false;
if (!roll_chance_i(triggeredByAura->GetModifier()->m_amount))
return false; return false;
triggered_spell_id = 56453; triggered_spell_id = 56453;
target = this; target = this;
@ -6615,6 +6614,14 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
return false; return false;
break; break;
} }
// Lock and Load
case 56453:
{
// Proc only from trap activation (from periodic proc another aura of this spell)
if (!(procFlags & PROC_FLAG_ON_TRAP_ACTIVATION) || !roll_chance_i(triggerAmount))
return false;
break;
}
} }
if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(trigger_spell_id)) if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(trigger_spell_id))

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7174" #define REVISION_NR "7175"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__