[8879] Re-implement buff selection for item 47499.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
LordJZ 2009-11-27 14:39:47 +03:00 committed by VladimirMangos
parent df8d59b770
commit 47cda41d93
2 changed files with 27 additions and 8 deletions

View file

@ -1343,15 +1343,34 @@ void Spell::EffectDummy(uint32 i)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
uint32 spell_id;
switch(urand(1, 3))
uint32 spell_id = 0;
switch(m_caster->getClass())
{
case 1: spell_id = 67016; break;
case 2: spell_id = 67017; break;
default:spell_id = 67018; break;
case CLASS_WARRIOR:
case CLASS_DEATH_KNIGHT:
spell_id = 67018; // STR for Warriors, Death Knights
break;
case CLASS_ROGUE:
case CLASS_HUNTER:
spell_id = 67017; // AP for Rogues, Hunters
break;
case CLASS_PRIEST:
case CLASS_MAGE:
case CLASS_WARLOCK:
spell_id = 67016; // SPD for Priests, Mages, Warlocks
break;
case CLASS_SHAMAN:
// random (SPD, AP)
spell_id = roll_chance_i(50) ? 67016 : 67017;
break;
case CLASS_PALADIN:
case CLASS_DRUID:
default:
// random (SPD, STR)
spell_id = roll_chance_i(50) ? 67016 : 67018;
break;
}
m_caster->CastSpell(m_caster, spell_id, true, NULL);
m_caster->CastSpell(m_caster, spell_id, true);
return;
}
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8878"
#define REVISION_NR "8879"
#endif // __REVISION_NR_H__