diff options
| author | Malcrom <malcromdev@gmail.com> | 2013-06-11 18:39:51 -0230 |
|---|---|---|
| committer | Malcrom <malcromdev@gmail.com> | 2013-06-11 18:39:51 -0230 |
| commit | 047608e7de743e4f59ec2450a474c6a9c5234b68 (patch) | |
| tree | 4c769af362a74d08ee19252a268fe0d5d6895573 /src/server/scripts/Spells | |
| parent | 9ec22fffa00135cd776afebe2899bf54fb52f15f (diff) | |
Core/SAI: Add check so npc will not send text to pet. Also updated isPet() to IsPet().
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_pet.cpp | 46 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 2 |
5 files changed, 28 insertions, 28 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 08f65d8323f..913811bdedd 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -482,7 +482,7 @@ class spell_hun_pet_carrion_feeder : public SpellScriptLoader bool Load() { - if (!GetCaster()->isPet()) + if (!GetCaster()->IsPet()) return false; return true; } @@ -539,7 +539,7 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader bool Load() { - if (!GetCaster()->isPet()) + if (!GetCaster()->IsPet()) return false; return true; } diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 0c9817ba167..437aa3fd755 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1640,7 +1640,7 @@ class spell_item_crystal_prison_dummy_dnd : public SpellScriptLoader void HandleDummy(SpellEffIndex /* effIndex */) { if (Creature* target = GetHitCreature()) - if (target->isDead() && !target->isPet()) + if (target->isDead() && !target->IsPet()) { GetCaster()->SummonGameObject(OBJECT_IMPRISONED_DOOMGUARD, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0, 0, 0, 0, uint32(target->GetRespawnTime()-time(NULL))); target->DespawnOrUnsummon(); diff --git a/src/server/scripts/Spells/spell_pet.cpp b/src/server/scripts/Spells/spell_pet.cpp index c4d5562ab39..a54b06a6510 100644 --- a/src/server/scripts/Spells/spell_pet.cpp +++ b/src/server/scripts/Spells/spell_pet.cpp @@ -240,7 +240,7 @@ public: void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { float ownerBonus = CalculatePct(owner->GetStat(STAT_STAMINA), 75); @@ -284,7 +284,7 @@ public: void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) { PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->getLevel()); pet->ToPet()->SetCreateHealth(pInfo->health); @@ -294,7 +294,7 @@ public: void CalculateAttackPowerAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { @@ -322,7 +322,7 @@ public: void CalculateDamageDoneAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { //the damage bonus used for pets is either fire or shadow damage, whatever is higher @@ -377,7 +377,7 @@ public: void CalculateIntellectAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { float ownerBonus = 0.0f; @@ -420,7 +420,7 @@ public: void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) { PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->getLevel()); pet->ToPet()->SetCreateMana(pInfo->mana); @@ -430,7 +430,7 @@ public: void CalculateArmorAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { float ownerBonus = 0.0f; @@ -442,7 +442,7 @@ public: void CalculateFireResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { float ownerBonus = 0.0f; @@ -489,7 +489,7 @@ public: void CalculateFrostResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { float ownerBonus = 0.0f; @@ -501,7 +501,7 @@ public: void CalculateArcaneResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { float ownerBonus = 0.0f; @@ -513,7 +513,7 @@ public: void CalculateNatureResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { float ownerBonus = 0.0f; @@ -556,7 +556,7 @@ public: void CalculateShadowResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { float ownerBonus = 0.0f; @@ -795,7 +795,7 @@ public: void CalculateAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) if (AuraEffect* /* aurEff */ect = owner->GetAuraEffect(SPELL_WARLOCK_GLYPH_OF_VOIDWALKER, EFFECT_0)) amount += /* aurEff */ect->GetAmount(); @@ -885,7 +885,7 @@ public: void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* pet = GetUnitOwner()) - if (pet->isPet()) + if (pet->IsPet()) if (Unit* owner = pet->ToPet()->GetOwner()) { float mod = 0.45f; @@ -924,7 +924,7 @@ public: { if (Unit* pet = GetUnitOwner()) { - if (!pet->isPet()) + if (!pet->IsPet()) return; Unit* owner = pet->ToPet()->GetOwner(); @@ -954,7 +954,7 @@ public: { if (Unit* pet = GetUnitOwner()) { - if (!pet->isPet()) + if (!pet->IsPet()) return; Unit* owner = pet->ToPet()->GetOwner(); @@ -1019,7 +1019,7 @@ public: { if (Unit* pet = GetUnitOwner()) { - if (!pet->isPet()) + if (!pet->IsPet()) return; Unit* owner = pet->ToPet()->GetOwner(); @@ -1038,7 +1038,7 @@ public: { if (Unit* pet = GetUnitOwner()) { - if (!pet->isPet()) + if (!pet->IsPet()) return; Unit* owner = pet->ToPet()->GetOwner(); @@ -1057,7 +1057,7 @@ public: { if (Unit* pet = GetUnitOwner()) { - if (!pet->isPet()) + if (!pet->IsPet()) return; Unit* owner = pet->ToPet()->GetOwner(); @@ -1106,7 +1106,7 @@ public: { if (Unit* pet = GetUnitOwner()) { - if (!pet->isPet()) + if (!pet->IsPet()) return; Unit* owner = pet->ToPet()->GetOwner(); @@ -1125,7 +1125,7 @@ public: { if (Unit* pet = GetUnitOwner()) { - if (!pet->isPet()) + if (!pet->IsPet()) return; Unit* owner = pet->ToPet()->GetOwner(); @@ -1144,7 +1144,7 @@ public: { if (Unit* pet = GetUnitOwner()) { - if (!pet->isPet()) + if (!pet->IsPet()) return; Unit* owner = pet->ToPet()->GetOwner(); @@ -1348,7 +1348,7 @@ public: if (GetCaster()->GetOwner()->ToPlayer()) { // Pet's base damage changes depending on happiness - if (GetCaster()->isPet() && GetCaster()->ToPet()->isHunterPet()) + if (GetCaster()->IsPet() && GetCaster()->ToPet()->isHunterPet()) { switch (GetCaster()->ToPet()->GetHappinessState()) { diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 4cc464af9ab..51740cc7667 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -50,7 +50,7 @@ class spell_generic_quest_update_entry_SpellScript : public SpellScript void HandleDummy(SpellEffIndex /*effIndex*/) { if (Creature* creatureTarget = GetHitCreature()) - if (!creatureTarget->isPet() && creatureTarget->GetEntry() == _originalEntry) + if (!creatureTarget->IsPet() && creatureTarget->GetEntry() == _originalEntry) { creatureTarget->UpdateEntry(_newEntry); if (_shouldAttack && creatureTarget->IsAIEnabled) diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 7b2e5c02bfa..0c9af2e3804 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -349,7 +349,7 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader { if (Creature* targetCreature = GetHitCreature()) { - if (targetCreature->isPet()) + if (targetCreature->IsPet()) { CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(targetCreature->GetEntry()); switch (ci->family) |
