mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Compile fix.
This commit is contained in:
parent
aa668bc66f
commit
a8b04f09e0
3 changed files with 22 additions and 19 deletions
|
|
@ -4328,13 +4328,13 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
Pet* NewSummon = new Pet;
|
||||
|
||||
// petentry==0 for hunter "call pet" (current pet summoned if any)
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER && NewSummon->LoadPetFromDB((Player*)m_caster,petentry))
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER && NewSummon->LoadPetFromDB((Player*)m_caster, petentry))
|
||||
{
|
||||
if(NewSummon->getPetType()==SUMMON_PET)
|
||||
if(NewSummon->getPetType() == SUMMON_PET)
|
||||
{
|
||||
// Remove Demonic Sacrifice auras (known pet)
|
||||
Unit::AuraList const& auraClassScripts = m_caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for(Unit::AuraList::const_iterator itr = auraClassScripts.begin();itr!=auraClassScripts.end();)
|
||||
for(Unit::AuraList::const_iterator itr = auraClassScripts.begin(); itr != auraClassScripts.end();)
|
||||
{
|
||||
if((*itr)->GetModifier()->m_miscvalue == 2228)
|
||||
{
|
||||
|
|
@ -4360,7 +4360,7 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
|
||||
if(!cInfo)
|
||||
{
|
||||
sLog.outError("EffectSummonPet: creature entry %u not found.",petentry);
|
||||
sLog.outError("EffectSummonPet: creature entry %u not found.", petentry);
|
||||
delete NewSummon;
|
||||
return;
|
||||
}
|
||||
|
|
@ -4415,7 +4415,7 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
|
||||
// this enables popup window (pet dismiss, cancel), hunter pet additional flags set later
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE);
|
||||
NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
|
||||
if(m_caster->IsPvP())
|
||||
NewSummon->SetPvP(true);
|
||||
|
|
@ -4425,13 +4425,13 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
NewSummon->InitLevelupSpellsForLevel();
|
||||
NewSummon->InitTalentForLevel();
|
||||
|
||||
if(NewSummon->getPetType()==SUMMON_PET)
|
||||
if(NewSummon->getPetType() == SUMMON_PET)
|
||||
{
|
||||
// Remove Demonic Sacrifice auras (new pet)
|
||||
Unit::AuraList const& auraClassScripts = m_caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for(Unit::AuraList::const_iterator itr = auraClassScripts.begin();itr!=auraClassScripts.end();)
|
||||
for(Unit::AuraList::const_iterator itr = auraClassScripts.begin(); itr != auraClassScripts.end();)
|
||||
{
|
||||
if((*itr)->GetModifier()->m_miscvalue==2228)
|
||||
if((*itr)->GetModifier()->m_miscvalue == 2228)
|
||||
{
|
||||
m_caster->RemoveAurasDueToSpell((*itr)->GetId());
|
||||
itr = auraClassScripts.begin();
|
||||
|
|
@ -4441,12 +4441,15 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
}
|
||||
|
||||
// generate new name for summon pet
|
||||
std::string new_name=sObjectMgr.GeneratePetName(petentry);
|
||||
std::string new_name = sObjectMgr.GeneratePetName(petentry);
|
||||
if(!new_name.empty())
|
||||
NewSummon->SetName(new_name);
|
||||
}
|
||||
else if(NewSummon->getPetType()==HUNTER_PET)
|
||||
NewSummon->SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_NOT_ALLOWED);
|
||||
else if(NewSummon->getPetType() == HUNTER_PET)
|
||||
{
|
||||
NewSummon->RemoveByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);
|
||||
NewSummon->SetByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_ABANDONED);
|
||||
}
|
||||
|
||||
NewSummon->AIM_Initialize();
|
||||
NewSummon->SetHealth(NewSummon->GetMaxHealth());
|
||||
|
|
@ -6953,7 +6956,7 @@ void Spell::EffectRenamePet(uint32 /*eff_idx*/)
|
|||
!((Creature*)unitTarget)->isPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
|
||||
return;
|
||||
|
||||
unitTarget->SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_ALLOWED);
|
||||
unitTarget->RemoveByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);
|
||||
}
|
||||
|
||||
void Spell::EffectPlayMusic(uint32 i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue