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

[svn] Add function GameObject::CastSpell?. Used for hunter's trap and so.
Use original caster instead caster to check spell hit result.
Let spell triggers have the same faction as the summoner.
Fix the bug that trigger creatures attack enemy. (no need use civilian extra flag in the future, 128 is enough)
Fix shadow step.

Original author: megamage
Date: 2008-11-02 00:59:44-05:00

Files:
1 modified

Legend:

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

    r141 r145  
    14841484 
    14851485    if(pCreature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER && pCreature->m_spells[0]) 
     1486    { 
     1487        if(GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER) 
     1488            pCreature->setFaction(((Unit*)this)->getFaction()); 
    14861489        pCreature->CastSpell(pCreature, pCreature->m_spells[0], true, 0, 0, GetGUID()); 
     1490    } 
    14871491 
    14881492    //return the creature therewith the summoner has access to it