Show
Ignore:
Timestamp:
11/19/08 13:36:54 (17 years ago)
Author:
yumileroy
Message:

[svn] Add SpellExtraInfoMap?. Currently support:
Limited-number-of-players spell; shared damage spell; target-in-line cone spell (e.g. dark glare).
Change angle of cone spells from 120 degree to 60 degree.

Original author: megamage
Date: 2008-10-25 15:46:52-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/SpellMgr.cpp

    r108 r110  
    19691969} 
    19701970 
     1971// set data in core for now 
     1972void SpellMgr::LoadSpellExtraInfo() 
     1973{ 
     1974    SpellExtraInfo info; 
     1975    info.info[SPELL_EXTRA_INFO_CONE_TYPE] = 0; 
     1976    info.info[SPELL_EXTRA_INFO_MAX_TARGETS] = 0; 
     1977    info.info[SPELL_EXTRA_INFO_SHARE_DAMAGE] = 0; 
     1978 
     1979    info.info[SPELL_EXTRA_INFO_CONE_TYPE] = 1; 
     1980    SpellEntry const* tempSpell; 
     1981    for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i) 
     1982    { 
     1983        tempSpell = GetSpellStore()->LookupEntry(i); 
     1984        if(tempSpell && tempSpell->SpellVisual == 3879) 
     1985            mSpellExtraInfoMap[tempSpell->Id] = info; 
     1986    } 
     1987    info.info[SPELL_EXTRA_INFO_CONE_TYPE] = 2; 
     1988    mSpellExtraInfoMap[26029] = info; // dark glare 
     1989    mSpellExtraInfoMap[37433] = info; // spout 
     1990    mSpellExtraInfoMap[43140] = info; // flame breath 
     1991    mSpellExtraInfoMap[43215] = info; // flame breath 
     1992    info.info[SPELL_EXTRA_INFO_CONE_TYPE] = 0; 
     1993 
     1994    info.info[SPELL_EXTRA_INFO_SHARE_DAMAGE] = 1; 
     1995    for(uint32 i = 0; i < 46000; ++i) 
     1996    { 
     1997        switch(i) 
     1998        { 
     1999            case 24340: case 26558: case 28884:     // Meteor 
     2000            case 36837: case 38903: case 41276:     // Meteor 
     2001            case 26789:                             // Shard of the Fallen Star 
     2002            case 31436:                             // Malevolent Cleave 
     2003            case 35181:                             // Dive Bomb 
     2004            case 40810: case 43267: case 43268:     // Saber Lash 
     2005            case 42384:                             // Brutal Swipe 
     2006            case 45150:                             // Meteor Slash 
     2007                mSpellExtraInfoMap[i] = info; 
     2008                break; 
     2009            default: 
     2010                break; 
     2011        } 
     2012    } 
     2013    info.info[SPELL_EXTRA_INFO_SHARE_DAMAGE] = 0; 
     2014 
     2015    info.info[SPELL_EXTRA_INFO_MAX_TARGETS] = 1; 
     2016    for(uint32 i = 0; i < 46000; ++i) 
     2017    { 
     2018        switch(i) 
     2019        { 
     2020            case 44978: case 45001: case 45002:     // Wild Magic 
     2021            case 45004: case 45006: case 45010:     // Wild Magic 
     2022            case 31347: // Doom 
     2023            case 41635: // Prayer of Mending 
     2024                mSpellExtraInfoMap[i] = info; 
     2025                break; 
     2026            default: 
     2027                break; 
     2028        } 
     2029    } 
     2030    info.info[SPELL_EXTRA_INFO_MAX_TARGETS] = 3; 
     2031    mSpellExtraInfoMap[41376] = info;   //Spite 
     2032    info.info[SPELL_EXTRA_INFO_MAX_TARGETS] = 0; 
     2033} 
     2034 
    19712035/// Some checks for spells, to prevent adding depricated/broken spells for trainers, spell book, etc 
    19722036bool SpellMgr::IsSpellValid(SpellEntry const* spellInfo, Player* pl, bool msg)