mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8035] Return found guardian in search function. Update caller.
This commit is contained in:
parent
cb8cffc11e
commit
0b4c37f751
4 changed files with 7 additions and 7 deletions
|
|
@ -3621,7 +3621,7 @@ void Spell::EffectSummonGuardian(uint32 i)
|
|||
// FIXME: some guardians have control spell applied and controlled by player and anyway player can't summon in this time
|
||||
// so this code hack in fact
|
||||
if( m_caster->GetTypeId() == TYPEID_PLAYER && (duration <= 0 || GetSpellRecoveryTime(m_spellInfo) == 0) )
|
||||
if(((Player*)m_caster)->HasGuardianWithEntry(pet_entry))
|
||||
if(m_caster->FindGuardianWithEntry(pet_entry))
|
||||
return; // find old guardian, ignore summon
|
||||
|
||||
// in another case summon new
|
||||
|
|
@ -6584,4 +6584,4 @@ void Spell::EffectRenamePet(uint32 /*eff_idx*/)
|
|||
return;
|
||||
|
||||
unitTarget->SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_ALLOWED);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue