Changeset 138

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

[svn] Enable linked spells: cast spells/remove auras when spells casted/spells hitting/auras removed. Add new table "spell_linked_spell". Some illustrations provided in sql.
Let trigger creature cast AOE spells when summoned. Illustration provided in sql.
Let active creatures always visible if possible. (seems does not work for now, need to find out why)

Original author: megamage
Date: 2008-10-30 11:32:10-05:00

Location:
trunk
Files:
1 added
4 modified

Legend:

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

    r123 r138  
    14831483        ((Creature*)this)->AI()->JustSummoned(pCreature); 
    14841484 
     1485    if(pCreature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER && pCreature->m_spells[0]) 
     1486        pCreature->CastSpell(pCreature, pCreature->m_spells[0], true, 0, 0, GetGUID()); 
     1487 
    14851488    //return the creature therewith the summoner has access to it 
    14861489    return pCreature; 
  • trunk/src/game/Spell.cpp

    r131 r138  
    927927    { 
    928928        if(spell_triggered > 0) 
    929             m_caster->CastSpell(unit, spell_triggered, true); 
     929            unit->CastSpell(unit, spell_triggered, true/*, 0, 0, m_caster->GetGUID()*/); 
    930930        else 
    931931            unit->RemoveAurasDueToSpell(-spell_triggered); 
  • trunk/src/game/Unit.cpp

    r136 r138  
    85728572        { 
    85738573            // Units far than max visible distance for creature or not in our map are not visible too 
    8574             if (!IsWithinDistInMap(u,World::GetMaxVisibleDistanceForCreature()+(inVisibleList ? World::GetVisibleUnitGreyDistance() : 0.0f))) 
     8574            // Active unit should always be visibile 
     8575            if (!IsWithinDistInMap(u, u->isActive()  
     8576                ? (MAX_VISIBILITY_DISTANCE - (inVisibleList ? 0.0f : World::GetVisibleUnitGreyDistance())) 
     8577                : (World::GetMaxVisibleDistanceForCreature() + (inVisibleList ? World::GetVisibleUnitGreyDistance() : 0.0f)))) 
    85758578                return false; 
    85768579        } 
  • trunk/src/game/World.cpp

    r122 r138  
    10971097    spellmgr.LoadSpellExtraAttr(); 
    10981098 
     1099    sLog.outString( "Loading linked spells..." ); 
     1100    spellmgr.LoadSpellLinked(); 
     1101 
    10991102    sLog.outString( "Loading player Create Info & Level Stats..." ); 
    11001103    objmgr.LoadPlayerInfo();