Guest User

Untitled

a guest
May 21st, 2012
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. add to spellproc_warrior.cpp
  2. class TasteOfBloodSpellProc : public SpellProc
  3. {
  4.     SPELL_PROC_FACTORY_FUNCTION( TasteOfBloodSpellProc );
  5.  
  6.     bool CanProc(Unit* victim, SpellEntry* CastingSpell)
  7.     {
  8.         if( CastingSpell == NULL )
  9.             return false;
  10.         if( CastingSpell->NameHash != SPELL_HASH_REND )
  11.             return false;
  12.         return true;
  13.     }
  14.  
  15.     bool DoEffect(Unit* victim, SpellEntry* CastingSpell, uint32 flag, uint32 dmg, uint32 abs, int* dmg_overwrite, uint32 weapon_damage_type)
  16.     {
  17.         if(!(flag & PROC_ON_SPELL_HIT))
  18.             return true;
  19.         return false;
  20.     }
  21. };
  22. add into SpellProcMgr::SetupWarrior()
  23. AddByNameHash(SPELL_HASH_TASTE_OF_BLOOD, &TasteOfBloodSpellProc::Create);
Advertisement
Add Comment
Please, Sign In to add comment