Skip to content

Commit

Permalink
[9244] Implement talent Rime
Browse files Browse the repository at this point in the history
And apply SPELLMOD_COST to rune spell cast as part this.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
Laise authored and VladimirMangos committed Jan 23, 2010
1 parent 6bc47bc commit 8fa5de6
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 6 deletions.
10 changes: 6 additions & 4 deletions sql/mangos.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0',
`required_9222_01_mangos_playercreateinfo_spell` bit(1) default NULL
`required_9244_02_mangos_spell_chain` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';

--
Expand Down Expand Up @@ -17325,6 +17325,10 @@ INSERT INTO spell_chain VALUES
(51423,49020,49020,2,0),
(51424,51423,49020,3,0),
(51425,51424,49020,4,0),
/*Rime*/
(49188,0,49188,1,0),
(56822,49188,49188,2,0),
(59057,56822,49188,3,0),
/*Threat of Thassarian*/
(65661,0,65661,1,0),
(66191,65661,65661,2,0),
Expand Down Expand Up @@ -18351,7 +18355,7 @@ INSERT INTO `spell_proc_event` VALUES
(48988, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(49018, 0x00000000, 15, 0x01400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(49137, 0x00000000, 15, 0x00000000, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(49188, 0x00000000, 15, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(49188, 0x00000000, 15, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(49208, 0x00000000, 15, 0x00440000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(49222, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3),
(49503, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
Expand Down Expand Up @@ -18510,7 +18514,6 @@ INSERT INTO `spell_proc_event` VALUES
(56636, 0x00000000, 4, 0x00000020, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 6),
(56816, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000030, 0.000000, 0.000000, 0),
(56821, 0x00000000, 8, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(56822, 0x00000000, 15, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(56834, 0x00000000, 15, 0x00440000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(56835, 0x00000000, 15, 0x00440000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(57345, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 45),
Expand Down Expand Up @@ -18538,7 +18541,6 @@ INSERT INTO `spell_proc_event` VALUES
(58872, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0),
(58874, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0),
(58901, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 45),
(59057, 0x00000000, 15, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(59176, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
(59327, 0x00000000, 15, 0x08000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
(59345, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 45),
Expand Down
5 changes: 5 additions & 0 deletions sql/updates/9244_01_mangos_spell_proc_event.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ALTER TABLE db_version CHANGE COLUMN required_9222_01_mangos_playercreateinfo_spell required_9244_01_mangos_spell_proc_event bit;

DELETE FROM spell_proc_event WHERE entry IN (49188,56822,59057);
INSERT INTO `spell_proc_event` VALUES
(49188, 0x00000000, 15, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
6 changes: 6 additions & 0 deletions sql/updates/9244_02_mangos_spell_chain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE db_version CHANGE COLUMN required_9244_01_mangos_spell_proc_event required_9244_02_mangos_spell_chain bit;

INSERT INTO `spell_chain` VALUES
(49188, 0, 49188, 1, 0),
(56822, 49188, 49188, 2, 0),
(59057, 56822, 49188, 3, 0);
4 changes: 4 additions & 0 deletions sql/updates/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ pkgdata_DATA = \
9220_01_mangos_spell_proc_event.sql \
9220_02_mangos_spell_chain.sql \
9222_01_mangos_playercreateinfo_spell.sql \
9244_01_mangos_spell_proc_event.sql \
9244_02_mangos_spell_chain.sql \
README

## Additional files to include when running 'make dist'
Expand Down Expand Up @@ -476,4 +478,6 @@ EXTRA_DIST = \
9220_01_mangos_spell_proc_event.sql \
9220_02_mangos_spell_chain.sql \
9222_01_mangos_playercreateinfo_spell.sql \
9244_01_mangos_spell_proc_event.sql \
9244_02_mangos_spell_chain.sql \
README
10 changes: 10 additions & 0 deletions src/game/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3757,6 +3757,16 @@ SpellCastResult Spell::CheckOrTakeRunePower(bool take)
if (runeCost[rune] <= 0)
continue;

int32 runeCostTemp = runeCost[rune] * 10000;
if(Player* modOwner = plr->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runeCostTemp, this);

if (runeCostTemp <= 0)
{
--runeCost[rune];
continue;
}

if(plr->GetRuneCooldown(i) == 0)
{
if (take)
Expand Down
8 changes: 8 additions & 0 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7620,6 +7620,14 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
return false;
break;
}
// Freezing Fog (Rime triggered)
case 59052:
{
// Howling Blast cooldown reset
if (GetTypeId() == TYPEID_PLAYER)
((Player*)this)->RemoveSpellCategoryCooldown(1248, true);
break;
}
// Druid - Savage Defense
case 62606:
{
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9243"
#define REVISION_NR "9244"
#endif // __REVISION_NR_H__
2 changes: 1 addition & 1 deletion src/shared/revision_sql.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_9136_07_characters_characters"
#define REVISION_DB_MANGOS "required_9222_01_mangos_playercreateinfo_spell"
#define REVISION_DB_MANGOS "required_9244_02_mangos_spell_chain"
#define REVISION_DB_REALMD "required_9010_01_realmd_realmlist"
#endif // __REVISION_SQL_H__

0 comments on commit 8fa5de6

Please sign in to comment.