mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[10548] Implement missing part spell 47568 functionality.
Original patch prowided by False.Genesis.
This commit is contained in:
parent
958c3ac04c
commit
7f49bd357e
4 changed files with 22 additions and 5 deletions
|
|
@ -20984,16 +20984,20 @@ void Player::ConvertRune(uint8 index, RuneType newType)
|
|||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void Player::ActivateRunes(RuneType type, uint32 count)
|
||||
bool Player::ActivateRunes(RuneType type, uint32 count)
|
||||
{
|
||||
bool modify = false;
|
||||
for(uint32 j = 0; count > 0 && j < MAX_RUNES; ++j)
|
||||
{
|
||||
if (GetRuneCooldown(j) && GetCurrentRune(j) == type)
|
||||
{
|
||||
SetRuneCooldown(j, 0);
|
||||
--count;
|
||||
modify = true;
|
||||
}
|
||||
}
|
||||
|
||||
return modify;
|
||||
}
|
||||
|
||||
void Player::ResyncRunes()
|
||||
|
|
|
|||
|
|
@ -2380,7 +2380,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void SetCurrentRune(uint8 index, RuneType currentRune) { m_runes->runes[index].CurrentRune = currentRune; }
|
||||
void SetRuneCooldown(uint8 index, uint16 cooldown) { m_runes->runes[index].Cooldown = cooldown; m_runes->SetRuneState(index, (cooldown == 0) ? true : false); }
|
||||
void ConvertRune(uint8 index, RuneType newType);
|
||||
void ActivateRunes(RuneType type, uint32 count);
|
||||
bool ActivateRunes(RuneType type, uint32 count);
|
||||
void ResyncRunes();
|
||||
void AddRunePower(uint8 index);
|
||||
void InitRunes();
|
||||
|
|
|
|||
|
|
@ -2731,6 +2731,19 @@ void Spell::EffectTriggerSpell(SpellEffectIndex effIndex)
|
|||
pet->CastSpell(pet, 28305, true);
|
||||
return;
|
||||
}
|
||||
// Empower Rune Weapon
|
||||
case 53258:
|
||||
{
|
||||
// remove cooldown of frost/death, undead/blood activated in main spell
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
bool res1 = ((Player*)unitTarget)->ActivateRunes(RUNE_FROST, 2);
|
||||
bool res2 = ((Player*)unitTarget)->ActivateRunes(RUNE_DEATH, 2);
|
||||
if (res1 || res2)
|
||||
((Player*)unitTarget)->ResyncRunes();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// normal case
|
||||
|
|
@ -7913,8 +7926,8 @@ void Spell::EffectActivateRune(SpellEffectIndex eff_idx)
|
|||
return;
|
||||
|
||||
int32 count = damage; // max amount of reset runes
|
||||
plr->ActivateRunes(RuneType(m_spellInfo->EffectMiscValue[eff_idx]), count);
|
||||
plr->ResyncRunes();
|
||||
if (plr->ActivateRunes(RuneType(m_spellInfo->EffectMiscValue[eff_idx]), count))
|
||||
plr->ResyncRunes();
|
||||
}
|
||||
|
||||
void Spell::EffectTitanGrip(SpellEffectIndex eff_idx)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10547"
|
||||
#define REVISION_NR "10548"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue