Changeset 253 for trunk/src/game/Pet.cpp

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

Backed out changeset 835660b317dc

Original author: KingPin? <KingPin?@Trinitycore.org>
Date: 2008-11-17 22:07:21-06:00

Files:
1 modified

Legend:

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

    r250 r253  
    287287            ++iter; 
    288288            m_charmInfo->GetActionBarEntry(index)->SpellOrAction = atol((*iter).c_str()); 
    289             // patch for old data where some spells have ACT_DECIDE but should have ACT_CAST 
    290             // so overwrite old state  
    291             SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_charmInfo->GetActionBarEntry(index)->SpellOrAction); 
    292             if (spellInfo && spellInfo->AttributesEx & SPELL_ATTR_EX_PET_NOT_AUTOCAST) 
    293                 m_charmInfo->GetActionBarEntry(index)->Type = ACT_CAST; 
    294289        } 
    295290 
     
    12921287            Field *fields = result->Fetch(); 
    12931288 
    1294             addSpell(fields[0].GetUInt16(), (ActiveStates)fields[2].GetUInt16(), PETSPELL_UNCHANGED, fields[1].GetUInt16()); 
     1289            addSpell(fields[0].GetUInt16(), fields[2].GetUInt16(), PETSPELL_UNCHANGED, fields[1].GetUInt16()); 
    12951290        } 
    12961291        while( result->NextRow() ); 
     
    14231418} 
    14241419 
    1425 bool Pet::addSpell(uint16 spell_id, ActiveStates active, PetSpellState state, uint16 slot_id, PetSpellType type) 
     1420bool Pet::addSpell(uint16 spell_id, uint16 active, PetSpellState state, uint16 slot_id, PetSpellType type) 
    14261421{ 
    14271422    SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id); 
     
    14391434        return false; 
    14401435    } 
    1441     // same spells don't have autocast option 
    1442     if (spellInfo->AttributesEx & SPELL_ATTR_EX_PET_NOT_AUTOCAST) 
    1443         active = ACT_CAST; 
    14441436 
    14451437    PetSpellMap::iterator itr = m_spells.find(spell_id); 
     
    15171509        CastSpell(this, spell_id, true); 
    15181510    else if(state == PETSPELL_NEW) 
    1519         m_charmInfo->AddSpellToAB(oldspell_id, spell_id, active); 
     1511        m_charmInfo->AddSpellToAB(oldspell_id, spell_id); 
    15201512 
    15211513    if(newspell->active == ACT_ENABLED) 
     
    16671659        return; 
    16681660 
    1669     /*if(const SpellEntry *tempSpell = GetSpellStore()->LookupEntry(spellid)) 
     1661    if(const SpellEntry *tempSpell = GetSpellStore()->LookupEntry(spellid)) 
    16701662        if(tempSpell->EffectImplicitTargetA[0] != TARGET_ALL_AROUND_CASTER 
    16711663            && tempSpell->EffectImplicitTargetA[0] != TARGET_CHAIN_DAMAGE) 
    1672             return;    */ 
     1664            return;     
    16731665 
    16741666    PetSpellMap::const_iterator itr = m_spells.find((uint16)spellid);