mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[6860] Implement correct effects stacking and zone limitations for item 34537.
Signed-off-by: Malah <Backbone@getmangos.com> C++ code part rewrited for more correct work. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
eef8369ed6
commit
5f33f4abf4
6 changed files with 41 additions and 25 deletions
|
|
@ -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 */;
|
||||
|
|
|
|||
5
sql/updates/2008_11_29_02_mangos_spell_elixir.sql
Normal file
5
sql/updates/2008_11_29_02_mangos_spell_elixir.sql
Normal file
|
|
@ -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);
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2571,14 +2571,24 @@ 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 )
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 41617: // Cenarion Mana Salve
|
||||
case 41619: // Cenarion Healing Salve
|
||||
data << uint32(3905);
|
||||
// normal case
|
||||
else
|
||||
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])
|
||||
data << uint32(m_spellInfo->Totem[0]);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "6859"
|
||||
#define REVISION_NR "6860"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue