Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[11452] Implement spell 14537 effects.
Also re-add in correct way sql update for prev. commit. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
- Loading branch information
stfxpi
authored and
VladimirMangos
committed
May 9, 2011
1 parent
ea490ba
commit a9b664a
Showing
6 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ALTER TABLE db_version CHANGE COLUMN required_11433_01_mangos_item_template required_11452_01_mangos_spell_bonus_data bit; | ||
|
||
DELETE FROM spell_bonus_data WHERE entry IN (15662, 11538, 21179); | ||
INSERT INTO spell_bonus_data VALUES | ||
(15662, 0, 0, 0, 0, 'Item - Six Demon Bag - Fireball'), | ||
(11538, 0, 0, 0, 0, 'Item - Six Demon Bag - Frostbolt'), | ||
(21179, 0, 0, 0, 0, 'Item - Six Demon Bag - Chain Lightning'); |
2 changes: 2 additions & 0 deletions
2
sql/updates/9_01_mangos_spell_proc_event.sql → ...ates/11452_02_mangos_spell_proc_event.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
ALTER TABLE db_version CHANGE COLUMN required_11452_01_mangos_spell_bonus_data required_11452_02_mangos_spell_proc_event bit; | ||
|
||
DELETE FROM spell_proc_event WHERE entry = 63156; | ||
INSERT INTO spell_proc_event VALUES | ||
(63156, 0x00, 5, 0x00000001, 0x00000001, 0x00000001, 0x000000C0, 0x000000C0, 0x000000C0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -887,6 +887,37 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) | |
} | ||
return; | ||
} | ||
case 14537: // Six Demon Bag | ||
{ | ||
if (!unitTarget) | ||
return; | ||
|
||
Unit* newTarget = unitTarget; | ||
uint32 spell_id = 0; | ||
uint32 roll = urand(0, 99); | ||
if (roll < 25) // Fireball (25% chance) | ||
spell_id = 15662; | ||
else if (roll < 50) // Frostbolt (25% chance) | ||
spell_id = 11538; | ||
else if (roll < 70) // Chain Lighting (20% chance) | ||
spell_id = 21179; | ||
else if (roll < 80) // Polymorph (10% chance) | ||
{ | ||
spell_id = 14621; | ||
if (urand(0, 9) < 3) // 30% chance to self-cast | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
VladimirMangos
|
||
newTarget = m_caster; | ||
} | ||
else if (roll < 95) // Enveloping Winds (15% chance) | ||
spell_id = 25189; | ||
else // Summon Felhund minion (5% chance) | ||
{ | ||
spell_id = 14642; | ||
newTarget = m_caster; | ||
} | ||
|
||
m_caster->CastSpell(newTarget, spell_id, true, m_CastItem); | ||
return; | ||
} | ||
case 15998: // Capture Worg Pup | ||
case 29435: // Capture Female Kaliri Hatchling | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "11451" | ||
#define REVISION_NR "11452" | ||
#endif // __REVISION_NR_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_11436_01_characters_character_queststatus" | ||
#define REVISION_DB_MANGOS "required_11433_01_mangos_item_template" | ||
#define REVISION_DB_MANGOS "required_11452_02_mangos_spell_proc_event" | ||
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version" | ||
#endif // __REVISION_SQL_H__ |
you could also write ... if (roll < 73) ... to prevent calculating the random number in this line - one might be enough :)