diff --git a/sql/mangos.sql b/sql/mangos.sql index 4cc2eecf5..7c5817f30 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -22,7 +22,7 @@ DROP TABLE IF EXISTS `db_version`; CREATE TABLE `db_version` ( `version` varchar(120) default NULL, - `required_2008_11_29_01_mangos_spell_proc_event` bit(1) default NULL + `required_2008_11_29_02_mangos_spell_elixir` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -13741,6 +13741,7 @@ INSERT INTO `spell_elixir` VALUES (41610,0xB), (41611,0xB), (42735,0x3), +(45373,0x1), (46837,0xB), (46839,0xB); /*!40000 ALTER TABLE `spell_elixir` ENABLE KEYS */; diff --git a/sql/updates/2008_11_29_02_mangos_spell_elixir.sql b/sql/updates/2008_11_29_02_mangos_spell_elixir.sql new file mode 100644 index 000000000..7d6d353a2 --- /dev/null +++ b/sql/updates/2008_11_29_02_mangos_spell_elixir.sql @@ -0,0 +1,5 @@ +ALTER TABLE db_version CHANGE COLUMN required_2008_11_29_01_mangos_spell_proc_event required_2008_11_29_02_mangos_spell_elixir bit; + +DELETE FROM `spell_elixir` WHERE `entry` = 45373; +INSERT INTO `spell_elixir` VALUES +(45373,0x1); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 934dfb636..17c5d931a 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -139,6 +139,7 @@ pkgdata_DATA = \ 2008_11_18_02_mangos_mangos_string.sql \ 2008_11_27_01_mangos_playercreateinfo_item.sql \ 2008_11_29_01_mangos_spell_proc_event.sql \ + 2008_11_29_02_mangos_spell_elixir.sql \ README ## Additional files to include when running 'make dist' @@ -259,4 +260,5 @@ EXTRA_DIST = \ 2008_11_18_02_mangos_mangos_string.sql \ 2008_11_27_01_mangos_playercreateinfo_item.sql \ 2008_11_29_01_mangos_spell_proc_event.sql \ + 2008_11_29_02_mangos_spell_elixir.sql \ README diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index cff2fade4..900e7ed55 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2571,13 +2571,23 @@ void Spell::SendCastResult(uint8 result) break; case SPELL_FAILED_REQUIRES_AREA: // hardcode areas limitation case - if( m_spellInfo->Id==41618 || m_spellInfo->Id==41620 ) - data << uint32(3842); - else if( m_spellInfo->Id==41617 || m_spellInfo->Id==41619 ) - data << uint32(3905); - // normal case - else - data << uint32(m_spellInfo->AreaId); + switch(m_spellInfo->Id) + { + case 41617: // Cenarion Mana Salve + case 41619: // Cenarion Healing Salve + data << uint32(3905); + break; + case 41618: // Bottled Nethergon Energy + case 41620: // Bottled Nethergon Vapor + data << uint32(3842); + break; + case 45373: // Bloodberry Elixir + data << uint32(4075); + break; + default: // default case + data << uint32(m_spellInfo->AreaId); + break; + } break; case SPELL_FAILED_TOTEMS: if(m_spellInfo->Totem[0]) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 044b3272f..605336504 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2052,6 +2052,11 @@ bool IsSpellAllowedInLocation(SpellEntry const *spellInfo,uint32 map_id,uint32 z { if(uint32 mask = spellmgr.GetSpellElixirMask(spellInfo->Id)) { + if(mask & ELIXIR_BATTLE_MASK) + { + if(spellInfo->Id==45373) // Bloodberry Elixir + return zone_id==4075; + } if(mask & ELIXIR_UNSTABLE_MASK) { // in the Blade's Edge Mountains Plateaus and Gruul's Lair. @@ -2059,9 +2064,8 @@ bool IsSpellAllowedInLocation(SpellEntry const *spellInfo,uint32 map_id,uint32 z } if(mask & ELIXIR_SHATTRATH_MASK) { - // in Tempest Keep, Serpentshrine Cavern, Caverns of Time: Mount Hyjal, Black Temple - // TODO: and the Sunwell Plateau - if(zone_id ==3607 || map_id==534 || map_id==564) + // in Tempest Keep, Serpentshrine Cavern, Caverns of Time: Mount Hyjal, Black Temple, Sunwell Plateau + if(zone_id ==3607 || map_id==534 || map_id==564 || zone_id==4075) return true; MapEntry const* mapEntry = sMapStore.LookupEntry(map_id); @@ -2079,8 +2083,8 @@ bool IsSpellAllowedInLocation(SpellEntry const *spellInfo,uint32 map_id,uint32 z // special cases zone check (maps checked by multimap common id) switch(spellInfo->Id) { - case 41618: - case 41620: + case 41618: // Bottled Nethergon Energy + case 41620: // Bottled Nethergon Vapor { MapEntry const* mapEntry = sMapStore.LookupEntry(map_id); if(!mapEntry) @@ -2088,9 +2092,8 @@ bool IsSpellAllowedInLocation(SpellEntry const *spellInfo,uint32 map_id,uint32 z return mapEntry->multimap_id==206; } - - case 41617: - case 41619: + case 41617: // Cenarion Mana Salve + case 41619: // Cenarion Healing Salve { MapEntry const* mapEntry = sMapStore.LookupEntry(map_id); if(!mapEntry) @@ -2098,14 +2101,9 @@ bool IsSpellAllowedInLocation(SpellEntry const *spellInfo,uint32 map_id,uint32 z return mapEntry->multimap_id==207; } - // Dragonmaw Illusion - case 40216: - case 42016: - { - if ( area_id != 3759 && area_id != 3966 && area_id != 3939 ) - return false; - break; - } + case 40216: // Dragonmaw Illusion + case 42016: // Dragonmaw Illusion + return area_id == 3759 || area_id == 3966 || area_id == 3939; } return true; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 998d4c81d..82bf61c38 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "6859" + #define REVISION_NR "6860" #endif // __REVISION_NR_H__