mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7137] Implement SPELL_EFFECT_ALLOW_RENAME_PET, and then item 43850 work.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
6bc449d053
commit
c54383360a
3 changed files with 17 additions and 7 deletions
|
|
@ -290,6 +290,7 @@ class Spell
|
|||
void EffectCharge(uint32 i);
|
||||
void EffectProspecting(uint32 i);
|
||||
void EffectMilling(uint32 i);
|
||||
void EffectRenamePet(uint32 i);
|
||||
void EffectSendTaxi(uint32 i);
|
||||
void EffectSummonCritter(uint32 i);
|
||||
void EffectKnockBack(uint32 i);
|
||||
|
|
|
|||
|
|
@ -216,8 +216,8 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
|||
&Spell::EffectTitanGrip, //155 SPELL_EFFECT_TITAN_GRIP Allows you to equip two-handed axes, maces and swords in one hand, but you attack $49152s1% slower than normal.
|
||||
&Spell::EffectNULL, //156 Add Socket
|
||||
&Spell::EffectCreateItem, //157 SPELL_EFFECT_CREATE_ITEM_2 create/learn item/spell for profession
|
||||
&Spell::EffectMilling, //158 milling
|
||||
&Spell::EffectNULL //159 allow rename pet once again
|
||||
&Spell::EffectMilling, //158 SPELL_EFFECT_MILLING milling
|
||||
&Spell::EffectRenamePet //159 SPELL_EFFECT_ALLOW_RENAME_PET allow rename pet once again
|
||||
};
|
||||
|
||||
void Spell::EffectNULL(uint32 /*i*/)
|
||||
|
|
@ -6426,7 +6426,7 @@ void Spell::EffectQuestFail(uint32 i)
|
|||
((Player*)unitTarget)->FailQuest(m_spellInfo->EffectMiscValue[i]);
|
||||
}
|
||||
|
||||
void Spell::EffectActivateRune(uint32 i)
|
||||
void Spell::EffectActivateRune(uint32 eff_idx)
|
||||
{
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
@ -6438,15 +6438,24 @@ void Spell::EffectActivateRune(uint32 i)
|
|||
|
||||
for(uint32 j = 0; j < MAX_RUNES; ++j)
|
||||
{
|
||||
if(plr->GetRuneCooldown(j) && plr->GetCurrentRune(j) == m_spellInfo->EffectMiscValue[i])
|
||||
if(plr->GetRuneCooldown(j) && plr->GetCurrentRune(j) == m_spellInfo->EffectMiscValue[eff_idx])
|
||||
{
|
||||
plr->SetRuneCooldown(j, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Spell::EffectTitanGrip(uint32 i)
|
||||
void Spell::EffectTitanGrip(uint32 /*eff_idx*/)
|
||||
{
|
||||
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->SetCanTitanGrip(true);
|
||||
}
|
||||
|
||||
void Spell::EffectRenamePet(uint32 /*eff_idx*/)
|
||||
{
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT ||
|
||||
!((Creature*)unitTarget)->isPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
|
||||
return;
|
||||
|
||||
unitTarget->SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_ALLOWED);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7136"
|
||||
#define REVISION_NR "7137"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue