Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/AI/EventAI/CreatureEventAI.cpp src/server/game/Achievements/AchievementMgr.cpp src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Pet/Pet.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Transport/Transport.cpp src/server/game/Entities/Unit/StatSystem.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Entities/Unit/Unit.h src/server/game/Handlers/BattleGroundHandler.cpp src/server/game/Handlers/ChatHandler.cpp src/server/game/Handlers/ItemHandler.cpp src/server/game/Handlers/NPCHandler.cpp src/server/game/Handlers/PetHandler.cpp src/server/game/Handlers/SpellHandler.cpp src/server/game/Instances/InstanceScript.cpp src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/SpellEffects.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp src/server/scripts/EasternKingdoms/boss_kruul.cpp src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp src/server/scripts/EasternKingdoms/zone_ghostlands.cpp src/server/scripts/EasternKingdoms/zone_ironforge.cpp src/server/scripts/EasternKingdoms/zone_loch_modan.cpp src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp src/server/scripts/Kalimdor/zone_azshara.cpp src/server/scripts/Kalimdor/zone_darkshore.cpp src/server/scripts/Kalimdor/zone_durotar.cpp src/server/scripts/Kalimdor/zone_felwood.cpp src/server/scripts/Kalimdor/zone_feralas.cpp src/server/scripts/Kalimdor/zone_orgrimmar.cpp src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp src/server/scripts/Kalimdor/zone_tanaris.cpp src/server/scripts/Kalimdor/zone_thousand_needles.cpp src/server/scripts/Kalimdor/zone_thunder_bluff.cpp src/server/scripts/Kalimdor/zone_ungoro_crater.cpp src/server/scripts/Northrend/zone_dalaran.cpp src/server/scripts/Spells/spell_pet.cpp src/server/scripts/Spells/spell_shaman.cpp
This commit is contained in:
commit
87d9d1d705
490 files changed
+3524
-2995
No files matched your search
@@ -271,7 +271,7 @@ void Spell::EffectResurrectNew(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || unitTarget->isAlive())
|
||||
if (!unitTarget || unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
if (unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
@@ -297,7 +297,7 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive())
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -321,7 +321,7 @@ void Spell::EffectEnvironmentalDMG(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive())
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
uint32 absorb = 0;
|
||||
@@ -339,7 +339,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
|
||||
return;
|
||||
|
||||
if (unitTarget && unitTarget->isAlive())
|
||||
if (unitTarget && unitTarget->IsAlive())
|
||||
{
|
||||
bool apply_direct_bonus = true;
|
||||
switch (m_spellInfo->SpellFamilyName)
|
||||
@@ -953,7 +953,7 @@ void Spell::EffectJump(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
|
||||
return;
|
||||
|
||||
if (m_caster->isInFlight())
|
||||
if (m_caster->IsInFlight())
|
||||
return;
|
||||
|
||||
if (!unitTarget)
|
||||
@@ -972,7 +972,7 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH)
|
||||
return;
|
||||
|
||||
if (m_caster->isInFlight())
|
||||
if (m_caster->IsInFlight())
|
||||
return;
|
||||
|
||||
if (!m_targets.HasDst())
|
||||
@@ -1003,7 +1003,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || unitTarget->isInFlight())
|
||||
if (!unitTarget || unitTarget->IsInFlight())
|
||||
return;
|
||||
|
||||
// Pre effects
|
||||
@@ -1196,7 +1196,7 @@ void Spell::EffectPowerDrain(SpellEffIndex effIndex)
|
||||
|
||||
Powers powerType = Powers(m_spellInfo->Effects[effIndex].MiscValue);
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive() || unitTarget->getPowerType() != powerType || damage < 0)
|
||||
if (!unitTarget || !unitTarget->IsAlive() || unitTarget->getPowerType() != powerType || damage < 0)
|
||||
return;
|
||||
|
||||
// add spell damage bonus
|
||||
@@ -1270,7 +1270,7 @@ void Spell::EffectPowerBurn(SpellEffIndex effIndex)
|
||||
|
||||
Powers powerType = Powers(m_spellInfo->Effects[effIndex].MiscValue);
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive() || unitTarget->getPowerType() != powerType || damage < 0)
|
||||
if (!unitTarget || !unitTarget->IsAlive() || unitTarget->getPowerType() != powerType || damage < 0)
|
||||
return;
|
||||
|
||||
// burn x% of target's mana, up to maximum of 2x% of caster's mana (Mana Burn)
|
||||
@@ -1299,7 +1299,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
|
||||
return;
|
||||
|
||||
if (unitTarget && unitTarget->isAlive() && damage >= 0)
|
||||
if (unitTarget && unitTarget->IsAlive() && damage >= 0)
|
||||
{
|
||||
// Try to get original caster
|
||||
Unit* caster = m_originalCasterGUID ? m_originalCaster : m_caster;
|
||||
@@ -1396,7 +1396,7 @@ void Spell::EffectHealPct(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive() || damage < 0)
|
||||
if (!unitTarget || !unitTarget->IsAlive() || damage < 0)
|
||||
return;
|
||||
|
||||
// Skip if m_originalCaster not available
|
||||
@@ -1414,7 +1414,7 @@ void Spell::EffectHealMechanical(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive() || damage < 0)
|
||||
if (!unitTarget || !unitTarget->IsAlive() || damage < 0)
|
||||
return;
|
||||
|
||||
// Skip if m_originalCaster not available
|
||||
@@ -1431,7 +1431,7 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive() || damage < 0)
|
||||
if (!unitTarget || !unitTarget->IsAlive() || damage < 0)
|
||||
return;
|
||||
|
||||
damage = m_caster->SpellDamageBonusDone(unitTarget, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE);
|
||||
@@ -1445,7 +1445,7 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex)
|
||||
// get max possible damage, don't count overkill for heal
|
||||
uint32 healthGain = uint32(-unitTarget->GetHealthGain(-damage) * healMultiplier);
|
||||
|
||||
if (m_caster->isAlive())
|
||||
if (m_caster->IsAlive())
|
||||
{
|
||||
healthGain = m_caster->SpellHealingBonusDone(m_caster, m_spellInfo, healthGain, HEAL);
|
||||
healthGain = m_caster->SpellHealingBonusTaken(m_caster, m_spellInfo, healthGain, HEAL);
|
||||
@@ -1503,7 +1503,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
|
||||
// the maximum number of created additional items
|
||||
uint8 additionalMaxNum=0;
|
||||
// get the chance and maximum number for creating extra items
|
||||
if (canCreateExtraItems(player, m_spellInfo->Id, additionalCreateChance, additionalMaxNum))
|
||||
if (CanCreateExtraItems(player, m_spellInfo->Id, additionalCreateChance, additionalMaxNum))
|
||||
{
|
||||
// roll with this chance till we roll not to create or we create the max num
|
||||
while (roll_chance_f(additionalCreateChance) && items_count <= additionalMaxNum)
|
||||
@@ -1668,7 +1668,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
|
||||
if (!unitTarget)
|
||||
return;
|
||||
if (!unitTarget->isAlive())
|
||||
if (!unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
if (m_spellInfo->Effects[effIndex].MiscValue < 0 || m_spellInfo->Effects[effIndex].MiscValue >= int8(MAX_POWERS))
|
||||
@@ -1774,7 +1774,7 @@ void Spell::EffectEnergizePct(SpellEffIndex effIndex)
|
||||
|
||||
if (!unitTarget)
|
||||
return;
|
||||
if (!unitTarget->isAlive())
|
||||
if (!unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
if (m_spellInfo->Effects[effIndex].MiscValue < 0 || m_spellInfo->Effects[effIndex].MiscValue >= int8(MAX_POWERS))
|
||||
@@ -1799,7 +1799,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
|
||||
if (gameObjTarget)
|
||||
{
|
||||
// Players shouldn't be able to loot gameobjects that are currently despawned
|
||||
if (!gameObjTarget->isSpawned() && !player->isGameMaster())
|
||||
if (!gameObjTarget->isSpawned() && !player->IsGameMaster())
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Possible hacking attempt: Player %s [guid: %u] tried to loot a gameobject [entry: %u id: %u] which is on respawn time without being in GM mode!",
|
||||
player->GetName().c_str(), player->GetGUIDLow(), gameObjTarget->GetEntry(), gameObjTarget->GetGUIDLow());
|
||||
@@ -2170,7 +2170,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
||||
case SUMMON_TYPE_TOTEM:
|
||||
{
|
||||
summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id);
|
||||
if (!summon || !summon->isTotem())
|
||||
if (!summon || !summon->IsTotem())
|
||||
return;
|
||||
|
||||
// Mana Tide Totem
|
||||
@@ -2418,7 +2418,7 @@ void Spell::EffectDistract(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
// Check for possible target
|
||||
if (!unitTarget || unitTarget->isInCombat())
|
||||
if (!unitTarget || unitTarget->IsInCombat())
|
||||
return;
|
||||
|
||||
// target must be OK to do this
|
||||
@@ -2445,7 +2445,7 @@ void Spell::EffectPickPocket(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
// victim have to be alive and humanoid or undead
|
||||
if (unitTarget->isAlive() && (unitTarget->GetCreatureTypeMask() &CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) != 0)
|
||||
if (unitTarget->IsAlive() && (unitTarget->GetCreatureTypeMask() &CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) != 0)
|
||||
m_caster->ToPlayer()->SendLoot(unitTarget->GetGUID(), LOOT_PICKPOCKETING);
|
||||
}
|
||||
|
||||
@@ -2494,7 +2494,7 @@ void Spell::EffectTeleUnitsFaceCaster(SpellEffIndex effIndex)
|
||||
if (!unitTarget)
|
||||
return;
|
||||
|
||||
if (unitTarget->isInFlight())
|
||||
if (unitTarget->IsInFlight())
|
||||
return;
|
||||
|
||||
float dis = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
|
||||
@@ -2771,7 +2771,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/)
|
||||
|
||||
Creature* creatureTarget = unitTarget->ToCreature();
|
||||
|
||||
if (creatureTarget->isPet())
|
||||
if (creatureTarget->IsPet())
|
||||
return;
|
||||
|
||||
if (m_caster->getClass() != CLASS_HUNTER)
|
||||
@@ -2820,7 +2820,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
|
||||
if (m_originalCaster)
|
||||
{
|
||||
owner = m_originalCaster->ToPlayer();
|
||||
if (!owner && m_originalCaster->ToCreature()->isTotem())
|
||||
if (!owner && m_originalCaster->ToCreature()->IsTotem())
|
||||
owner = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
}
|
||||
|
||||
@@ -2877,7 +2877,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
if (m_caster->ToCreature()->isTotem())
|
||||
if (m_caster->ToCreature()->IsTotem())
|
||||
pet->SetReactState(REACT_AGGRESSIVE);
|
||||
else
|
||||
pet->SetReactState(REACT_DEFENSIVE);
|
||||
@@ -2930,7 +2930,7 @@ void Spell::EffectTaunt(SpellEffIndex /*effIndex*/)
|
||||
// this effect use before aura Taunt apply for prevent taunt already attacking target
|
||||
// for spell as marked "non effective at already attacking target"
|
||||
if (!unitTarget || !unitTarget->CanHaveThreatList()
|
||||
|| unitTarget->getVictim() == m_caster)
|
||||
|| unitTarget->GetVictim() == m_caster)
|
||||
{
|
||||
SendCastResult(SPELL_FAILED_DONT_REPORT);
|
||||
return;
|
||||
@@ -2959,7 +2959,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_LAUNCH_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive())
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
// multiple weapon dmg effect workaround
|
||||
@@ -3188,7 +3188,7 @@ void Spell::EffectThreat(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive() || !m_caster->isAlive())
|
||||
if (!unitTarget || !unitTarget->IsAlive() || !m_caster->IsAlive())
|
||||
return;
|
||||
|
||||
if (!unitTarget->CanHaveThreatList())
|
||||
@@ -3202,7 +3202,7 @@ void Spell::EffectHealMaxHealth(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive())
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
int32 addhealth = 0;
|
||||
@@ -3221,7 +3221,7 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive())
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
/// @todo not all spells that used this effect apply cooldown at school spells
|
||||
@@ -3421,7 +3421,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
case 22984:
|
||||
case 22985:
|
||||
{
|
||||
if (!unitTarget || !unitTarget->isAlive())
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
// Onyxia Scale Cloak
|
||||
@@ -3650,7 +3650,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
}
|
||||
case 52173: // Coyote Spirit Despawn
|
||||
case 60243: // Blood Parrot Despawn
|
||||
if (unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->ToCreature()->isSummon())
|
||||
if (unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->ToCreature()->IsSummon())
|
||||
unitTarget->ToTempSummon()->UnSummon();
|
||||
return;
|
||||
case 52479: // Gift of the Harvester
|
||||
@@ -3765,7 +3765,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
}
|
||||
case 60123: // Lightwell
|
||||
{
|
||||
if (m_caster->GetTypeId() != TYPEID_UNIT || !m_caster->ToCreature()->isSummon())
|
||||
if (m_caster->GetTypeId() != TYPEID_UNIT || !m_caster->ToCreature()->IsSummon())
|
||||
return;
|
||||
|
||||
uint32 spell_heal;
|
||||
@@ -3813,7 +3813,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
continue;
|
||||
|
||||
Creature* totem = unitTarget->GetMap()->GetCreature(unitTarget->m_SummonSlot[slot]);
|
||||
if (totem && totem->isTotem())
|
||||
if (totem && totem->IsTotem())
|
||||
{
|
||||
m_caster->CastCustomSpell(totem, 55277, &basepoints0, NULL, NULL, true);
|
||||
}
|
||||
@@ -3872,7 +3872,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
// Judgement (seal trigger)
|
||||
if (m_spellInfo->Category == SPELLCATEGORY_JUDGEMENT)
|
||||
{
|
||||
if (!unitTarget || !unitTarget->isAlive())
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
return;
|
||||
uint32 spellId1 = 0;
|
||||
uint32 spellId2 = 0;
|
||||
@@ -3965,7 +3965,7 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
|
||||
Unit::AttackerSet const& attackers = unitTarget->getAttackers();
|
||||
for (Unit::AttackerSet::const_iterator itr = attackers.begin(); itr != attackers.end();)
|
||||
{
|
||||
if (!(*itr)->canSeeOrDetect(unitTarget))
|
||||
if (!(*itr)->CanSeeOrDetect(unitTarget))
|
||||
(*(itr++))->AttackStop();
|
||||
else
|
||||
++itr;
|
||||
@@ -4107,7 +4107,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/)
|
||||
TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell Effect: Stuck");
|
||||
TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", target->GetName().c_str(), target->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||
|
||||
if (target->isInFlight())
|
||||
if (target->IsInFlight())
|
||||
return;
|
||||
|
||||
target->TeleportTo(target->GetStartPosition(), TELE_TO_SPELL);
|
||||
@@ -4336,7 +4336,7 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex)
|
||||
if (!pet)
|
||||
return;
|
||||
|
||||
if (!pet->isAlive())
|
||||
if (!pet->IsAlive())
|
||||
return;
|
||||
|
||||
int32 benefit = pet->GetCurrentFoodBenefitLevel(foodItem->GetTemplate()->ItemLevel);
|
||||
@@ -4357,7 +4357,7 @@ void Spell::EffectDismissPet(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isPet())
|
||||
if (!unitTarget || !unitTarget->IsPet())
|
||||
return;
|
||||
|
||||
Pet* pet = unitTarget->ToPet();
|
||||
@@ -4439,7 +4439,7 @@ void Spell::EffectResurrect(SpellEffIndex effIndex)
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (unitTarget->isAlive() || !unitTarget->IsInWorld())
|
||||
if (unitTarget->IsAlive() || !unitTarget->IsInWorld())
|
||||
return;
|
||||
|
||||
Player* target = unitTarget->ToPlayer();
|
||||
@@ -4461,7 +4461,7 @@ void Spell::EffectAddExtraAttacks(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || !unitTarget->isAlive() || !unitTarget->getVictim())
|
||||
if (!unitTarget || !unitTarget->IsAlive() || !unitTarget->GetVictim())
|
||||
return;
|
||||
|
||||
if (unitTarget->m_extraAttacks)
|
||||
@@ -4469,7 +4469,7 @@ void Spell::EffectAddExtraAttacks(SpellEffIndex effIndex)
|
||||
|
||||
unitTarget->m_extraAttacks = damage;
|
||||
|
||||
ExecuteLogEffectExtraAttacks(effIndex, unitTarget->getVictim(), damage);
|
||||
ExecuteLogEffectExtraAttacks(effIndex, unitTarget->GetVictim(), damage);
|
||||
}
|
||||
|
||||
void Spell::EffectParry(SpellEffIndex /*effIndex*/)
|
||||
@@ -4495,7 +4495,7 @@ void Spell::EffectLeap(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
if (!unitTarget || unitTarget->isInFlight())
|
||||
if (!unitTarget || unitTarget->IsInFlight())
|
||||
return;
|
||||
|
||||
if (!m_targets.HasDst())
|
||||
@@ -4569,7 +4569,7 @@ void Spell::EffectSelfResurrect(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
|
||||
return;
|
||||
|
||||
if (!m_caster || m_caster->isAlive())
|
||||
if (!m_caster || m_caster->IsAlive())
|
||||
return;
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -4850,7 +4850,7 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
Pet* pet = player->GetPet();
|
||||
if (pet && pet->isAlive())
|
||||
if (pet && pet->IsAlive())
|
||||
return;
|
||||
|
||||
if (damage < 0)
|
||||
@@ -4891,7 +4891,7 @@ void Spell::EffectDestroyAllTotems(SpellEffIndex /*effIndex*/)
|
||||
continue;
|
||||
|
||||
Creature* totem = m_caster->GetMap()->GetCreature(m_caster->m_SummonSlot[slot]);
|
||||
if (totem && totem->isTotem())
|
||||
if (totem && totem->IsTotem())
|
||||
{
|
||||
uint32 spell_id = totem->GetUInt32Value(UNIT_CREATED_BY_SPELL);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
|
||||
@@ -5193,7 +5193,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Effect: SkinPlayerCorpse");
|
||||
if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->isAlive()))
|
||||
if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->IsAlive()))
|
||||
return;
|
||||
|
||||
unitTarget->ToPlayer()->RemovedInsignia((Player*)m_caster);
|
||||
@@ -5504,7 +5504,7 @@ void Spell::EffectGameObjectDamage(SpellEffIndex /*effIndex*/)
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
FactionTemplateEntry const* casterFaction = caster->getFactionTemplateEntry();
|
||||
FactionTemplateEntry const* casterFaction = caster->GetFactionTemplateEntry();
|
||||
FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetUInt32Value(GAMEOBJECT_FACTION));
|
||||
// Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons)
|
||||
if ((casterFaction && targetFaction && !casterFaction->IsFriendlyTo(*targetFaction)) || !targetFaction)
|
||||
@@ -5540,7 +5540,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
if (caster->isTotem())
|
||||
if (caster->IsTotem())
|
||||
caster = caster->ToTotem()->GetOwner();
|
||||
|
||||
// in another case summon new
|
||||
@@ -5606,7 +5606,7 @@ void Spell::EffectRenamePet(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT ||
|
||||
!unitTarget->ToCreature()->isPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
|
||||
!unitTarget->ToCreature()->IsPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
|
||||
return;
|
||||
|
||||
unitTarget->SetByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);
|
||||
@@ -5861,7 +5861,7 @@ void Spell::EffectResurrectWithAura(SpellEffIndex effIndex)
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (unitTarget->isAlive())
|
||||
if (unitTarget->IsAlive())
|
||||
return;
|
||||
|
||||
if (target->IsRessurectRequested()) // already have one active request
|
||||
|
||||
Reference in new issue
Block a user