Changeset 55 for trunk/src/game

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

[svn] Remove unused script event functions HealBy? and DamageDeal?. Add new function SpellHitTarget?.
Fix a bug in r57_trinity.sql.

Original author: megamage
Date: 2008-10-18 11:50:02-05:00

Location:
trunk/src/game
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/CreatureAI.h

    r44 r55  
    8383        virtual void EnterEvadeMode() = 0; 
    8484 
    85         // Called at any heal cast/item used (call non implemented) 
    86         virtual void HealBy(Unit * /*healer*/, uint32 /*amount_healed*/) {} 
    87  
    88         // Called at any Damage to any victim (before damage apply) 
    89         virtual void DamageDeal(Unit * /*done_to*/, uint32 & /*damage*/) {} 
    90  
    9185        // Called at any Damage from any attacker (before damage apply) 
    9286        virtual void DamageTaken(Unit *done_by, uint32 & /*damage*/) { AttackedBy(done_by); } 
     
    111105        // Called when hit by a spell 
    112106        virtual void SpellHit(Unit*, const SpellEntry*) {} 
     107 
     108        // Called when spell hits a target 
     109        virtual void SpellHitTarget(Unit* target, const SpellEntry*) {}  
    113110 
    114111        // Called when vitim entered water and creature can not enter water 
  • trunk/src/game/Spell.cpp

    r53 r55  
    945945            ((Creature*)unit)->AI()->SpellHit(m_caster ,m_spellInfo); 
    946946    } 
     947 
     948    if(m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->AI()) 
     949        ((Creature*)m_caster)->AI()->SpellHitTarget(unit, m_spellInfo); 
    947950} 
    948951 
  • trunk/src/game/Unit.cpp

    r44 r55  
    478478    } 
    479479 
    480     //Script Event damage Deal 
    481     if( GetTypeId()== TYPEID_UNIT && ((Creature *)this)->AI()) 
    482         ((Creature *)this)->AI()->DamageDeal(pVictim, damage); 
    483480    //Script Event damage taken 
    484481    if( pVictim->GetTypeId()== TYPEID_UNIT && ((Creature *)pVictim)->AI() )