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 | |
| 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')
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_modify.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 12 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_reset.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h | 2 | ||||
| -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 |
14 files changed, 43 insertions, 43 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 4719a460c4f..6c6721fcf17 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -796,7 +796,7 @@ public: static bool HandleDebugThreatListCommand(ChatHandler* handler, char const* /*args*/) { Creature* target = handler->getSelectedCreature(); - if (!target || target->isTotem() || target->isPet()) + if (!target || target->isTotem() || target->IsPet()) return false; ThreatContainer::StorageType const &threatList = target->getThreatManager().getThreatList(); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index e6a7b096a34..37999124d83 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1877,7 +1877,7 @@ public: Unit* target = handler->getSelectedUnit(); if (player->GetSelection() && target) { - if (target->GetTypeId() != TYPEID_UNIT || target->isPet()) + if (target->GetTypeId() != TYPEID_UNIT || target->IsPet()) { handler->SendSysMessage(LANG_SELECT_CREATURE); handler->SetSentErrorMessage(true); @@ -2594,7 +2594,7 @@ public: Player* player = handler->GetSession()->GetPlayer(); Creature* creatureTarget = handler->getSelectedCreature(); - if (!creatureTarget || creatureTarget->isPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER) + if (!creatureTarget || creatureTarget->IsPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER) { handler->PSendSysMessage(LANG_SELECT_CREATURE); handler->SetSentErrorMessage(true); diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index ff4ef587fad..55d92ea014f 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -442,7 +442,7 @@ public: target->ToPlayer()->SendTalentsInfoData(false); return true; } - else if (target->ToCreature()->isPet()) + else if (target->ToCreature()->IsPet()) { Unit* owner = target->GetOwner(); if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet*)target)->IsPermanentPetFor(owner->ToPlayer())) diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 43c9b294419..bd4b3f8178b 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -394,7 +394,7 @@ public: return false; } - if (creature->isPet()) + if (creature->IsPet()) { if (((Pet*)creature)->getPetType() == HUNTER_PET) { @@ -435,7 +435,7 @@ public: else unit = handler->getSelectedCreature(); - if (!unit || unit->isPet() || unit->isTotem()) + if (!unit || unit->IsPet() || unit->isTotem()) { handler->SendSysMessage(LANG_SELECT_CREATURE); handler->SetSentErrorMessage(true); @@ -836,7 +836,7 @@ public: Creature* creature = handler->getSelectedCreature(); - if (!creature || creature->isPet()) + if (!creature || creature->IsPet()) { handler->SendSysMessage(LANG_SELECT_CREATURE); handler->SetSentErrorMessage(true); @@ -920,7 +920,7 @@ public: { type_str = guid_str; creature = handler->getSelectedCreature(); - if (!creature || creature->isPet()) + if (!creature || creature->IsPet()) return false; lowguid = creature->GetDBTableGUIDLow(); } @@ -1022,7 +1022,7 @@ public: creature->SetPhaseMask(phasemask, true); - if (!creature->isPet()) + if (!creature->IsPet()) creature->SaveToDB(); return true; @@ -1272,7 +1272,7 @@ public: static bool HandleNpcTameCommand(ChatHandler* handler, char const* /*args*/) { Creature* creatureTarget = handler->getSelectedCreature(); - if (!creatureTarget || creatureTarget->isPet()) + if (!creatureTarget || creatureTarget->IsPet()) { handler->PSendSysMessage (LANG_SELECT_CREATURE); handler->SetSentErrorMessage (true); diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index bfb3c8aeff1..c1bffc6c349 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -211,7 +211,7 @@ public: { // Try reset talents as Hunter Pet Creature* creature = handler->getSelectedCreature(); - if (!*args && creature && creature->isPet()) + if (!*args && creature && creature->IsPet()) { Unit* owner = creature->GetOwner(); if (owner && owner->GetTypeId() == TYPEID_PLAYER && creature->ToPet()->IsPermanentPetFor(owner->ToPlayer())) diff --git a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp index 45f5e17095f..8f7a6b68932 100644 --- a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp @@ -80,7 +80,7 @@ public: Talk(SAY_CONVERTED); DoCast(me, SPELL_CONVERT_CREDIT); - if (me->isPet()) + if (me->IsPet()) me->ToPet()->SetDuration(7500); Credit = true; } else Timer -= diff; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index 87a09749724..5a854f342b0 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -191,7 +191,7 @@ hyjal_trashAI::hyjal_trashAI(Creature* creature) : npc_escortAI(creature) void hyjal_trashAI::DamageTaken(Unit* done_by, uint32 &damage) { - if (done_by->GetTypeId() == TYPEID_PLAYER || done_by->isPet()) + if (done_by->GetTypeId() == TYPEID_PLAYER || done_by->IsPet()) { damageTaken += damage; if (instance) diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index 901438409a4..5ef35bf5aa1 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -201,7 +201,7 @@ class PlayerOrPetCheck bool operator()(WorldObject* object) const { if (object->GetTypeId() != TYPEID_PLAYER) - if (!object->ToCreature()->isPet()) + if (!object->ToCreature()->IsPet()) return true; return false; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h index 612be3b71e8..35d11522580 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.h @@ -355,7 +355,7 @@ class PlayerOrPetCheck bool operator()(WorldObject* object) const { if (object->GetTypeId() != TYPEID_PLAYER) - if (!object->ToCreature()->isPet()) + if (!object->ToCreature()->IsPet()) return true; return false; 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) |
