mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8879] Re-implement buff selection for item 47499.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
df8d59b770
commit
47cda41d93
2 changed files with 27 additions and 8 deletions
|
|
@ -1343,15 +1343,34 @@ void Spell::EffectDummy(uint32 i)
|
||||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 spell_id;
|
uint32 spell_id = 0;
|
||||||
switch(urand(1, 3))
|
switch(m_caster->getClass())
|
||||||
{
|
{
|
||||||
case 1: spell_id = 67016; break;
|
case CLASS_WARRIOR:
|
||||||
case 2: spell_id = 67017; break;
|
case CLASS_DEATH_KNIGHT:
|
||||||
default:spell_id = 67018; break;
|
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);
|
||||||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8878"
|
#define REVISION_NR "8879"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue