mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
refactor(Core): replace NULL with nullptr (#4593)
This commit is contained in:
@@ -1272,14 +1272,14 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
{
|
||||
if (player)
|
||||
player->RemoveSpellCooldown(spellId);
|
||||
target->CastSpell(target, spellId, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, spellId, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
|
||||
if (spellId2)
|
||||
{
|
||||
if (player)
|
||||
player->RemoveSpellCooldown(spellId2);
|
||||
target->CastSpell(target, spellId2, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, spellId2, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
|
||||
if (player)
|
||||
@@ -1298,7 +1298,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
continue;
|
||||
|
||||
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
target->CastSpell(target, itr->first, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, itr->first, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
|
||||
// xinef: talent stance auras are not on m_spells map, so iterate talents
|
||||
@@ -1317,7 +1317,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
continue;
|
||||
|
||||
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
target->CastSpell(target, itr->first, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, itr->first, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
|
||||
// Also do it for Glyphs
|
||||
@@ -1331,7 +1331,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
if (!spellInfo || !spellInfo->HasAttribute(SpellAttr0(SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE)))
|
||||
continue;
|
||||
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
target->CastSpell(target, glyph->SpellId, TriggerCastFlags(TRIGGERED_FULL_MASK & ~(TRIGGERED_IGNORE_SHAPESHIFT | TRIGGERED_IGNORE_CASTER_AURASTATE)), NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, glyph->SpellId, TriggerCastFlags(TRIGGERED_FULL_MASK & ~(TRIGGERED_IGNORE_SHAPESHIFT | TRIGGERED_IGNORE_CASTER_AURASTATE)), nullptr, this, target->GetGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1341,7 +1341,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(24932);
|
||||
if (spellInfo && spellInfo->Stances & (1 << (GetMiscValue() - 1)))
|
||||
target->CastSpell(target, 24932, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, 24932, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
// Improved Barkskin - apply/remove armor bonus due to shapeshift
|
||||
if (player->HasTalent(63410, player->GetActiveSpec()) || player->HasTalent(63411, player->GetActiveSpec()))
|
||||
@@ -1362,7 +1362,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
{
|
||||
int32 HotWMod = (*i)->GetAmount() / 2; // For each 2% Intelligence, you get 1% stamina and 1% attack power.
|
||||
|
||||
target->CastCustomSpell(target, HotWSpellId, &HotWMod, nullptr, nullptr, true, NULL, this, target->GetGUID());
|
||||
target->CastCustomSpell(target, HotWSpellId, &HotWMod, nullptr, nullptr, true, nullptr, this, target->GetGUID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1386,7 +1386,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
|
||||
spellId3 = 47180;
|
||||
break;
|
||||
}
|
||||
target->CastSpell(target, spellId3, true, NULL, this, target->GetGUID());
|
||||
target->CastSpell(target, spellId3, true, nullptr, this, target->GetGUID());
|
||||
}
|
||||
// Master Shapeshifter - Cat
|
||||
if (AuraEffect const* aurEff = target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2851, 0))
|
||||
@@ -1912,7 +1912,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
{
|
||||
int32 basePoints = int32(std::min(oldPower, FurorChance));
|
||||
target->SetPower(POWER_ENERGY, 0);
|
||||
target->CastCustomSpell(target, 17099, &basePoints, nullptr, nullptr, true, NULL, this);
|
||||
target->CastCustomSpell(target, 17099, &basePoints, nullptr, nullptr, true, nullptr, this);
|
||||
break;
|
||||
}
|
||||
case FORM_BEAR:
|
||||
@@ -1976,12 +1976,12 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
case FORM_DIREBEAR:
|
||||
case FORM_CAT:
|
||||
if (AuraEffect* dummy = target->GetAuraEffect(37315, 0))
|
||||
target->CastSpell(target, 37316, true, NULL, dummy);
|
||||
target->CastSpell(target, 37316, true, nullptr, dummy);
|
||||
break;
|
||||
// Nordrassil Regalia - bonus
|
||||
case FORM_MOONKIN:
|
||||
if (AuraEffect* dummy = target->GetAuraEffect(37324, 0))
|
||||
target->CastSpell(target, 37325, true, NULL, dummy);
|
||||
target->CastSpell(target, 37325, true, nullptr, dummy);
|
||||
break;
|
||||
case FORM_BATTLESTANCE:
|
||||
case FORM_DEFENSIVESTANCE:
|
||||
@@ -2050,7 +2050,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
{
|
||||
if (Item* pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
|
||||
{
|
||||
target->ToPlayer()->_ApplyWeaponDamage(EQUIPMENT_SLOT_MAINHAND, pItem->GetTemplate(), NULL, apply);
|
||||
target->ToPlayer()->_ApplyWeaponDamage(EQUIPMENT_SLOT_MAINHAND, pItem->GetTemplate(), nullptr, apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2530,7 +2530,7 @@ void AuraEffect::HandleAuraModDisarm(AuraApplication const* aurApp, uint8 mode,
|
||||
|
||||
if (attacktype < MAX_ATTACK)
|
||||
{
|
||||
target->ToPlayer()->_ApplyWeaponDamage(slot, pItem->GetTemplate(), NULL, !apply);
|
||||
target->ToPlayer()->_ApplyWeaponDamage(slot, pItem->GetTemplate(), nullptr, !apply);
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraMods(pItem, WeaponAttackType(attacktype), !apply);
|
||||
}
|
||||
}
|
||||
@@ -4934,7 +4934,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
case 13139: // net-o-matic
|
||||
// root to self part of (root_target->charge->root_self sequence
|
||||
if (caster)
|
||||
caster->CastSpell(caster, 13138, true, NULL, this);
|
||||
caster->CastSpell(caster, 13138, true, nullptr, this);
|
||||
break;
|
||||
case 34026: // kill command
|
||||
{
|
||||
@@ -4942,7 +4942,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
if (!pet)
|
||||
break;
|
||||
|
||||
target->CastSpell(target, 34027, true, NULL, this);
|
||||
target->CastSpell(target, 34027, true, nullptr, this);
|
||||
|
||||
// set 3 stacks and 3 charges (to make all auras not disappear at once)
|
||||
Aura* owner_aura = target->GetAura(34027, GetCasterGUID());
|
||||
@@ -4966,10 +4966,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
switch (caster->getGender())
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
caster->CastSpell(target, 37095, true, NULL, this); // Blood Elf Disguise
|
||||
caster->CastSpell(target, 37095, true, nullptr, this); // Blood Elf Disguise
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
caster->CastSpell(target, 37093, true, NULL, this);
|
||||
caster->CastSpell(target, 37093, true, nullptr, this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -4986,7 +4986,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
}
|
||||
case 39850: // Rocket Blast
|
||||
if (roll_chance_i(20)) // backfire stun
|
||||
target->CastSpell(target, 51581, true, NULL, this);
|
||||
target->CastSpell(target, 51581, true, nullptr, this);
|
||||
break;
|
||||
case 43873: // Headless Horseman Laugh
|
||||
target->PlayDistanceSound(11965);
|
||||
@@ -4997,10 +4997,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
switch (caster->getGender())
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
caster->CastSpell(target, 46356, true, NULL, this);
|
||||
caster->CastSpell(target, 46356, true, nullptr, this);
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
caster->CastSpell(target, 46355, true, NULL, this);
|
||||
caster->CastSpell(target, 46355, true, nullptr, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5086,7 +5086,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
}
|
||||
|
||||
if (finalSpelId)
|
||||
caster->CastSpell(target, finalSpelId, true, NULL, this);
|
||||
caster->CastSpell(target, finalSpelId, true, nullptr, this);
|
||||
}
|
||||
|
||||
switch (m_spellInfo->SpellFamilyName)
|
||||
@@ -5115,7 +5115,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
|
||||
}
|
||||
case 52172: // Coyote Spirit Despawn Aura
|
||||
case 60244: // Blood Parrot Despawn Aura
|
||||
target->CastSpell((Unit*)NULL, GetAmount(), true, NULL, this);
|
||||
target->CastSpell((Unit*)nullptr, GetAmount(), true, nullptr, this);
|
||||
break;
|
||||
// Halls of Lightning, Arc Lightning
|
||||
case 52921:
|
||||
@@ -5373,7 +5373,7 @@ void AuraEffect::HandleChannelDeathItem(AuraApplication const* aurApp, uint8 mod
|
||||
Item* newitem = plCaster->StoreNewItem(dest, GetSpellInfo()->Effects[m_effIndex].ItemType, true);
|
||||
if (!newitem)
|
||||
{
|
||||
plCaster->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
plCaster->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
plCaster->SendNewItem(newitem, count, true, true);
|
||||
@@ -5527,9 +5527,9 @@ void AuraEffect::HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, boo
|
||||
return;
|
||||
// If amount avalible cast with basepoints (Crypt Fever for example)
|
||||
if (GetAmount())
|
||||
caster->CastCustomSpell(target, triggeredSpellId, &m_amount, nullptr, nullptr, true, NULL, this);
|
||||
caster->CastCustomSpell(target, triggeredSpellId, &m_amount, nullptr, nullptr, true, nullptr, this);
|
||||
else
|
||||
caster->CastSpell(target, triggeredSpellId, true, NULL, this);
|
||||
caster->CastSpell(target, triggeredSpellId, true, nullptr, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5714,7 +5714,7 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
||||
if (GetSpellInfo()->SpellFamilyFlags[1] & 0x80000000)
|
||||
{
|
||||
if (caster)
|
||||
caster->CastCustomSpell(53352, SPELLVALUE_BASE_POINT0, m_amount, target, true, NULL, this);
|
||||
caster->CastCustomSpell(53352, SPELLVALUE_BASE_POINT0, m_amount, target, true, nullptr, this);
|
||||
break;
|
||||
}
|
||||
switch (GetSpellInfo()->Id)
|
||||
@@ -5748,7 +5748,7 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
|
||||
{
|
||||
case 49016: // Hysteria
|
||||
uint32 damage = uint32(target->CountPctFromMaxHealth(1));
|
||||
Unit::DealDamage(target, target, damage, NULL, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
Unit::DealDamage(target, target, damage, nullptr, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
||||
break;
|
||||
}
|
||||
// Blood of the North
|
||||
@@ -5829,7 +5829,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
||||
case 27808:
|
||||
if (caster)
|
||||
{
|
||||
caster->CastCustomSpell(29879, SPELLVALUE_BASE_POINT0, int32(target->CountPctFromMaxHealth(21)), target, true, NULL, this);
|
||||
caster->CastCustomSpell(29879, SPELLVALUE_BASE_POINT0, int32(target->CountPctFromMaxHealth(21)), target, true, nullptr, this);
|
||||
if (GetTickNumber() == 1)
|
||||
caster->CastSpell(target, 27808, true);
|
||||
}
|
||||
@@ -5872,7 +5872,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
||||
// so instakill will be naturally done before trigger spell
|
||||
case 31347:
|
||||
{
|
||||
target->CastSpell(target, 31350, true, NULL, this);
|
||||
target->CastSpell(target, 31350, true, nullptr, this);
|
||||
Unit::Kill(target, target);
|
||||
return;
|
||||
}
|
||||
@@ -5893,7 +5893,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
||||
if (!caster || target->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
caster->CastSpell(caster, 38495, true, NULL, this);
|
||||
caster->CastSpell(caster, 38495, true, nullptr, this);
|
||||
|
||||
Creature* creatureTarget = target->ToCreature();
|
||||
|
||||
@@ -5954,20 +5954,20 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
||||
{
|
||||
// Mana Tide
|
||||
case 16191:
|
||||
target->CastCustomSpell(target, triggerSpellId, &m_amount, nullptr, nullptr, true, NULL, this);
|
||||
target->CastCustomSpell(target, triggerSpellId, &m_amount, nullptr, nullptr, true, nullptr, this);
|
||||
return;
|
||||
// Poison (Grobbulus)
|
||||
case 28158:
|
||||
case 54362:
|
||||
// Slime Pool (Dreadscale & Acidmaw)
|
||||
case 66882:
|
||||
target->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, (int32)((((float)m_tickNumber / 60) * 0.9f + 0.1f) * 10000 * 2 / 3), NULL, true, NULL, this);
|
||||
target->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, (int32)((((float)m_tickNumber / 60) * 0.9f + 0.1f) * 10000 * 2 / 3), nullptr, true, nullptr, this);
|
||||
return;
|
||||
// Eye of Eternity, Malygos, Arcane Overload
|
||||
case 56432:
|
||||
if (triggerSpellId == 56438)
|
||||
{
|
||||
target->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, (int32)(10000 * (1.0f - 0.02f * (m_tickNumber + 1))), NULL, true, NULL, this);
|
||||
target->CastCustomSpell(triggerSpellId, SPELLVALUE_RADIUS_MOD, (int32)(10000 * (1.0f - 0.02f * (m_tickNumber + 1))), nullptr, true, nullptr, this);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -6059,7 +6059,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
||||
if (GetSpellInfo()->Effects[GetEffIndex()].TargetA.GetCheckType() == TARGET_CHECK_ENTRY || GetSpellInfo()->Effects[GetEffIndex()].TargetB.GetCheckType() == TARGET_CHECK_ENTRY)
|
||||
triggerFlags = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST);
|
||||
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, NULL, triggerFlags, NULL, this);
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, nullptr, triggerFlags, nullptr, this);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
#endif
|
||||
@@ -6085,7 +6085,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
|
||||
CustomSpellValues values;
|
||||
values.AddSpellMod(SPELLVALUE_BASE_POINT0, GetAmount());
|
||||
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, &values, TRIGGERED_FULL_MASK, NULL, this);
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, &values, TRIGGERED_FULL_MASK, nullptr, this);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
#endif
|
||||
@@ -6213,7 +6213,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
|
||||
|
||||
int32 dmg = damage;
|
||||
if (CanApplyResilience())
|
||||
Unit::ApplyResilience(target, NULL, &dmg, crit, CR_CRIT_TAKEN_SPELL);
|
||||
Unit::ApplyResilience(target, nullptr, &dmg, crit, CR_CRIT_TAKEN_SPELL);
|
||||
damage = dmg;
|
||||
|
||||
Unit::CalcAbsorbResist(caster, target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, GetSpellInfo());
|
||||
@@ -6295,7 +6295,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
|
||||
|
||||
int32 dmg = damage;
|
||||
if (CanApplyResilience())
|
||||
Unit::ApplyResilience(target, NULL, &dmg, crit, CR_CRIT_TAKEN_SPELL);
|
||||
Unit::ApplyResilience(target, nullptr, &dmg, crit, CR_CRIT_TAKEN_SPELL);
|
||||
damage = dmg;
|
||||
|
||||
Unit::CalcAbsorbResist(caster, target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, m_spellInfo);
|
||||
@@ -6580,7 +6580,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
|
||||
if (manaFeedVal > 0)
|
||||
{
|
||||
int32 feedAmount = CalculatePct(gainedAmount, manaFeedVal);
|
||||
caster->CastCustomSpell(caster, 32554, &feedAmount, nullptr, nullptr, true, NULL, this);
|
||||
caster->CastCustomSpell(caster, 32554, &feedAmount, nullptr, nullptr, true, nullptr, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6713,7 +6713,7 @@ void AuraEffect::HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEve
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell %u from aura %u proc", triggeredSpellInfo->Id, GetId());
|
||||
#endif
|
||||
triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, NULL, this);
|
||||
triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, nullptr, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6738,7 +6738,7 @@ void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell %u with value %d from aura %u proc", triggeredSpellInfo->Id, basepoints0, GetId());
|
||||
#endif
|
||||
triggerCaster->CastCustomSpell(triggerTarget, triggerSpellId, &basepoints0, nullptr, nullptr, true, NULL, this);
|
||||
triggerCaster->CastCustomSpell(triggerTarget, triggerSpellId, &basepoints0, nullptr, nullptr, true, nullptr, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6803,7 +6803,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
|
||||
|
||||
if (Unit* triggerTarget = target->GetNextRandomRaidMemberOrPet(radius))
|
||||
{
|
||||
target->CastSpell(triggerTarget, GetSpellInfo(), true, NULL, this, GetCasterGUID());
|
||||
target->CastSpell(triggerTarget, GetSpellInfo(), true, nullptr, this, GetCasterGUID());
|
||||
if (Aura* aura = triggerTarget->GetAura(GetId(), GetCasterGUID()))
|
||||
aura->SetCharges(jumps);
|
||||
}
|
||||
@@ -6813,7 +6813,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
|
||||
#endif
|
||||
target->CastSpell(target, triggerSpellId, true, NULL, this, GetCasterGUID());
|
||||
target->CastSpell(target, triggerSpellId, true, nullptr, this, GetCasterGUID());
|
||||
}
|
||||
|
||||
void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurApp, ProcEventInfo& /*eventInfo*/)
|
||||
@@ -6847,7 +6847,7 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
|
||||
|
||||
if (Unit* triggerTarget = target->GetNextRandomRaidMemberOrPet(radius))
|
||||
{
|
||||
target->CastCustomSpell(triggerTarget, GetId(), &value, nullptr, nullptr, true, NULL, this, GetCasterGUID());
|
||||
target->CastCustomSpell(triggerTarget, GetId(), &value, nullptr, nullptr, true, nullptr, this, GetCasterGUID());
|
||||
if (Aura* aura = triggerTarget->GetAura(GetId(), GetCasterGUID()))
|
||||
aura->SetCharges(jumps);
|
||||
}
|
||||
@@ -6857,5 +6857,5 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
|
||||
#endif
|
||||
target->CastCustomSpell(target, triggerSpellId, &value, nullptr, nullptr, true, NULL, this, GetCasterGUID());
|
||||
target->CastCustomSpell(target, triggerSpellId, &value, nullptr, nullptr, true, nullptr, this, GetCasterGUID());
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ uint8 Aura::BuildEffectMaskForOwner(SpellInfo const* spellProto, uint8 avalibleE
|
||||
return effMask & avalibleEffectMask;
|
||||
}
|
||||
|
||||
Aura* Aura::TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount /*= NULL*/, Item* castItem /*= NULL*/, uint64 casterGUID /*= 0*/, bool* refresh /*= NULL*/, bool periodicReset /*= false*/)
|
||||
Aura* Aura::TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount /*= nullptr*/, Item* castItem /*= nullptr*/, uint64 casterGUID /*= 0*/, bool* refresh /*= nullptr*/, bool periodicReset /*= false*/)
|
||||
{
|
||||
ASSERT(spellproto);
|
||||
ASSERT(owner);
|
||||
@@ -339,7 +339,7 @@ Aura* Aura::TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMas
|
||||
return Create(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID);
|
||||
}
|
||||
|
||||
Aura* Aura::TryCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount /*= NULL*/, Item* castItem /*= NULL*/, uint64 casterGUID /*= 0*/)
|
||||
Aura* Aura::TryCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount /*= nullptr*/, Item* castItem /*= nullptr*/, uint64 casterGUID /*= 0*/)
|
||||
{
|
||||
ASSERT(spellproto);
|
||||
ASSERT(owner);
|
||||
@@ -428,7 +428,7 @@ void Aura::_InitEffects(uint8 effMask, Unit* caster, int32* baseAmount)
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (effMask & (uint8(1) << i))
|
||||
m_effects[i] = new AuraEffect(this, i, baseAmount ? baseAmount + i : NULL, caster);
|
||||
m_effects[i] = new AuraEffect(this, i, baseAmount ? baseAmount + i : nullptr, caster);
|
||||
else
|
||||
m_effects[i] = nullptr;
|
||||
}
|
||||
@@ -488,7 +488,7 @@ void Aura::_ApplyForTarget(Unit* target, Unit* caster, AuraApplication* auraApp)
|
||||
if (m_spellInfo->IsCooldownStartedOnEvent())
|
||||
{
|
||||
Item* castItem = m_castItemGuid ? caster->ToPlayer()->GetItemByGuid(m_castItemGuid) : nullptr;
|
||||
caster->ToPlayer()->AddSpellAndCategoryCooldowns(m_spellInfo, castItem ? castItem->GetEntry() : 0, NULL, true);
|
||||
caster->ToPlayer()->AddSpellAndCategoryCooldowns(m_spellInfo, castItem ? castItem->GetEntry() : 0, nullptr, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1109,7 +1109,7 @@ void Aura::UnregisterSingleTarget()
|
||||
Unit* caster = GetCaster();
|
||||
// TODO: find a better way to do this.
|
||||
if (!caster)
|
||||
caster = ObjectAccessor::GetObjectInOrOutOfWorld(GetCasterGUID(), (Unit*)NULL);
|
||||
caster = ObjectAccessor::GetObjectInOrOutOfWorld(GetCasterGUID(), (Unit*)nullptr);
|
||||
if (!caster)
|
||||
{
|
||||
sLog->outMisc("Aura::UnregisterSingleTarget (A1) - %u, %u, %u, %s", GetId(), GetOwner()->GetTypeId(), GetOwner()->GetEntry(), GetOwner()->GetName().c_str());
|
||||
@@ -1390,7 +1390,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
damage = target->SpellHealingBonusTaken(caster, GetSpellInfo(), damage, DOT);
|
||||
|
||||
int32 basepoints0 = damage;
|
||||
caster->CastCustomSpell(target, 64801, &basepoints0, nullptr, nullptr, true, NULL, GetEffect(0));
|
||||
caster->CastCustomSpell(target, 64801, &basepoints0, nullptr, nullptr, true, nullptr, GetEffect(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1408,8 +1408,8 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
int32 basepoints0 = aurEff->GetAmount() * GetEffect(0)->GetTotalTicks() * int32(damage) / 100;
|
||||
int32 heal = int32(CalculatePct(basepoints0, 15));
|
||||
|
||||
caster->CastCustomSpell(target, 63675, &basepoints0, nullptr, nullptr, true, NULL, GetEffect(0));
|
||||
caster->CastCustomSpell(caster, 75999, &heal, nullptr, nullptr, true, NULL, GetEffect(0));
|
||||
caster->CastCustomSpell(target, 63675, &basepoints0, nullptr, nullptr, true, nullptr, GetEffect(0));
|
||||
caster->CastCustomSpell(caster, 75999, &heal, nullptr, nullptr, true, nullptr, GetEffect(0));
|
||||
}
|
||||
}
|
||||
// Power Word: Shield
|
||||
@@ -1533,7 +1533,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
{
|
||||
int32 remainingDamage = aurEff->GetAmount() * (aurEff->GetTotalTicks() - aurEff->GetTickNumber());
|
||||
if (remainingDamage > 0)
|
||||
caster->CastCustomSpell(caster, 72373, NULL, &remainingDamage, NULL, true);
|
||||
caster->CastCustomSpell(caster, 72373, nullptr, &remainingDamage, nullptr, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1544,7 +1544,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
case 66: // Invisibility
|
||||
if (removeMode != AURA_REMOVE_BY_EXPIRE)
|
||||
break;
|
||||
target->CastSpell(target, 32612, true, NULL, GetEffect(1));
|
||||
target->CastSpell(target, 32612, true, nullptr, GetEffect(1));
|
||||
target->CombatStop();
|
||||
break;
|
||||
case 74396: // Fingers of Frost
|
||||
@@ -1572,7 +1572,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
if (absorb->GetAmount() <= 0) // removed by damage, not dispel
|
||||
if (AuraEffect* dummy = caster->GetDummyAuraEffect(SPELLFAMILY_MAGE, 2945, 0))
|
||||
if (roll_chance_i(dummy->GetSpellInfo()->ProcChance))
|
||||
caster->CastSpell(target, 55080, true, NULL, GetEffect(0));
|
||||
caster->CastSpell(target, 55080, true, nullptr, GetEffect(0));
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
@@ -1613,7 +1613,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 178, 1))
|
||||
{
|
||||
int32 basepoints0 = aurEff->GetAmount() * caster->GetCreateMana() / 100;
|
||||
caster->CastCustomSpell(caster, 64103, &basepoints0, nullptr, nullptr, true, NULL, GetEffect(0));
|
||||
caster->CastCustomSpell(caster, 64103, &basepoints0, nullptr, nullptr, true, nullptr, GetEffect(0));
|
||||
}
|
||||
}
|
||||
// Power word: shield
|
||||
|
||||
@@ -80,8 +80,8 @@ public:
|
||||
typedef std::map<uint64, AuraApplication*> ApplicationMap;
|
||||
|
||||
static uint8 BuildEffectMaskForOwner(SpellInfo const* spellProto, uint8 avalibleEffectMask, WorldObject* owner);
|
||||
static Aura* TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0, bool* refresh = NULL, bool periodicReset = false);
|
||||
static Aura* TryCreate(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0);
|
||||
static Aura* TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount = nullptr, Item* castItem = nullptr, uint64 casterGUID = 0, bool* refresh = nullptr, bool periodicReset = false);
|
||||
static Aura* TryCreate(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount = nullptr, Item* castItem = nullptr, uint64 casterGUID = 0);
|
||||
static Aura* Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID);
|
||||
explicit Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* castItem, uint64 casterGUID);
|
||||
void _InitEffects(uint8 effMask, Unit* caster, int32* baseAmount);
|
||||
|
||||
@@ -1120,7 +1120,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
|
||||
CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
|
||||
if (!target)
|
||||
{
|
||||
//TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set NULL target, effect %u", m_spellInfo->Id, effIndex);
|
||||
//TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set nullptr target, effect %u", m_spellInfo->Id, effIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3026,7 +3026,7 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo* target)
|
||||
|
||||
for (uint32 effectNumber = 0; effectNumber < MAX_SPELL_EFFECTS; ++effectNumber)
|
||||
if (effectMask & (1 << effectNumber))
|
||||
HandleEffects(nullptr, NULL, go, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET);
|
||||
HandleEffects(nullptr, nullptr, go, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET);
|
||||
|
||||
// xinef: inform ai about spellhit
|
||||
go->AI()->SpellHit(m_caster, m_spellInfo);
|
||||
@@ -3047,7 +3047,7 @@ void Spell::DoAllEffectOnTarget(ItemTargetInfo* target)
|
||||
|
||||
for (uint32 effectNumber = 0; effectNumber < MAX_SPELL_EFFECTS; ++effectNumber)
|
||||
if (effectMask & (1 << effectNumber))
|
||||
HandleEffects(nullptr, target->item, NULL, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET);
|
||||
HandleEffects(nullptr, target->item, nullptr, effectNumber, SPELL_EFFECT_HANDLE_HIT_TARGET);
|
||||
|
||||
CallScriptOnHitHandlers();
|
||||
|
||||
@@ -3343,7 +3343,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
{
|
||||
// Xinef: Creature should focus to cast target if there is explicit target or self if casting positive spell
|
||||
// Xinef: Creature should not rotate like a retard when casting spell... based on halion behavior
|
||||
m_caster->ToCreature()->FocusTarget(this, m_targets.GetObjectTarget() != NULL ? m_targets.GetObjectTarget() : m_caster);
|
||||
m_caster->ToCreature()->FocusTarget(this, m_targets.GetObjectTarget() != nullptr ? m_targets.GetObjectTarget() : m_caster);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3610,7 +3610,7 @@ void Spell::_cast(bool skipCheck)
|
||||
// Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells
|
||||
if ((m_spellInfo->Speed > 0.0f && !m_spellInfo->IsChanneled())/* xinef: we dont need this shit || m_spellInfo->Id == 14157*/)
|
||||
{
|
||||
// Remove used for cast item if need (it can be already NULL after TakeReagents call
|
||||
// Remove used for cast item if need (it can be already nullptr after TakeReagents call
|
||||
// in case delayed spell remove item at cast delay start
|
||||
TakeCastItem();
|
||||
|
||||
@@ -3654,7 +3654,7 @@ void Spell::_cast(bool skipCheck)
|
||||
}
|
||||
|
||||
// Interrupt Spell casting
|
||||
// handle this here, in other places SpellHitTarget can be set to NULL, if there is an error in this function
|
||||
// handle this here, in other places SpellHitTarget can be set to nullptr, if there is an error in this function
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER))
|
||||
if (Unit* target = m_targets.GetUnitTarget())
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
@@ -3719,7 +3719,7 @@ void Spell::handle_immediate()
|
||||
// spell is finished, perform some last features of the spell here
|
||||
_handle_finish_phase();
|
||||
|
||||
// Remove used for cast item if need (it can be already NULL after TakeReagents call
|
||||
// Remove used for cast item if need (it can be already nullptr after TakeReagents call
|
||||
TakeCastItem();
|
||||
|
||||
// handle ammo consumption for Hunter's volley spell
|
||||
@@ -5312,7 +5312,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id);
|
||||
if (!conditions.empty() && !sConditionMgr->IsObjectMeetToConditions(condInfo, conditions))
|
||||
{
|
||||
// mLastFailedCondition can be NULL if there was an error processing the condition in Condition::Meets (i.e. wrong data for ConditionTarget or others)
|
||||
// mLastFailedCondition can be nullptr if there was an error processing the condition in Condition::Meets (i.e. wrong data for ConditionTarget or others)
|
||||
if (condInfo.mLastFailedCondition && condInfo.mLastFailedCondition->ErrorType)
|
||||
{
|
||||
if (condInfo.mLastFailedCondition->ErrorType == SPELL_FAILED_CUSTOM_ERROR)
|
||||
|
||||
@@ -290,7 +290,7 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
|
||||
data << uint32(m_spellInfo->Id);
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
|
||||
Unit::DealDamage(m_caster, unitTarget, unitTarget->GetHealth(), NULL, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
Unit::DealDamage(m_caster, unitTarget, unitTarget->GetHealth(), nullptr, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
||||
}
|
||||
|
||||
void Spell::EffectEnvironmentalDMG(SpellEffIndex /*effIndex*/)
|
||||
@@ -1092,7 +1092,7 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex)
|
||||
|
||||
finish();
|
||||
|
||||
m_caster->CastSpell((Unit*)NULL, spellInfo, false);
|
||||
m_caster->CastSpell((Unit*)nullptr, spellInfo, false);
|
||||
}
|
||||
|
||||
void Spell::EffectJump(SpellEffIndex effIndex)
|
||||
@@ -1669,7 +1669,7 @@ void Spell::DoCreateItem(uint8 /*effIndex*/, uint32 itemId)
|
||||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(newitemid);
|
||||
if (!pProto)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1762,7 +1762,7 @@ void Spell::DoCreateItem(uint8 /*effIndex*/, uint32 itemId)
|
||||
// was it successful? return error if not
|
||||
if (!pItem)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2854,7 +2854,7 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
|
||||
unitTarget = p_caster;
|
||||
// and add a scroll
|
||||
DoCreateItem(effIndex, m_spellInfo->Effects[effIndex].ItemType);
|
||||
itemTarget = NULL;
|
||||
itemTarget = nullptr;
|
||||
m_targets.SetItemTarget(nullptr);
|
||||
}
|
||||
else
|
||||
@@ -3422,7 +3422,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
||||
// Skyshatter Harness item set bonus
|
||||
// Stormstrike
|
||||
if (AuraEffect* aurEff = m_caster->IsScriptOverriden(m_spellInfo, 5634))
|
||||
m_caster->CastSpell(m_caster, 38430, true, NULL, aurEff);
|
||||
m_caster->CastSpell(m_caster, 38430, true, nullptr, aurEff);
|
||||
// Lava lash damage increased by Flametongue weapon
|
||||
if (m_caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 688, EFFECT_0))
|
||||
AddPct(totalDamagePercentMod, 25.0f);
|
||||
@@ -6289,7 +6289,7 @@ void Spell::EffectRechargeManaGem(SpellEffIndex /*effIndex*/)
|
||||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item_id);
|
||||
if (!pProto)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, nullptr);
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1275,7 +1275,7 @@ bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod) const
|
||||
return false;
|
||||
|
||||
SpellInfo const* affectSpell = sSpellMgr->GetSpellInfo(mod->spellId);
|
||||
// False if affect_spell == NULL or spellFamily not equal
|
||||
// False if affect_spell == nullptr or spellFamily not equal
|
||||
if (!affectSpell || affectSpell->SpellFamilyName != SpellFamilyName)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -271,13 +271,13 @@ public:
|
||||
bool IsFarDestTargetEffect() const;
|
||||
bool IsUnitOwnedAuraEffect() const;
|
||||
|
||||
int32 CalcValue(Unit const* caster = NULL, int32 const* basePoints = NULL, Unit const* target = nullptr) const;
|
||||
int32 CalcValue(Unit const* caster = nullptr, int32 const* basePoints = nullptr, Unit const* target = nullptr) const;
|
||||
int32 CalcBaseValue(int32 value) const;
|
||||
float CalcValueMultiplier(Unit* caster, Spell* spell = nullptr) const;
|
||||
float CalcDamageMultiplier(Unit* caster, Spell* spell = nullptr) const;
|
||||
|
||||
bool HasRadius() const;
|
||||
float CalcRadius(Unit* caster = NULL, Spell* = nullptr) const;
|
||||
float CalcRadius(Unit* caster = nullptr, Spell* = nullptr) const;
|
||||
|
||||
uint32 GetProvidedTargetMask() const;
|
||||
uint32 GetMissingTargetMask(bool srcSet = false, bool destSet = false, uint32 mask = 0) const;
|
||||
@@ -479,14 +479,14 @@ public:
|
||||
SpellSpecificType GetSpellSpecific() const;
|
||||
|
||||
float GetMinRange(bool positive = false) const;
|
||||
float GetMaxRange(bool positive = false, Unit* caster = NULL, Spell* spell = nullptr) const;
|
||||
float GetMaxRange(bool positive = false, Unit* caster = nullptr, Spell* spell = nullptr) const;
|
||||
|
||||
int32 GetDuration() const;
|
||||
int32 GetMaxDuration() const;
|
||||
|
||||
uint32 GetMaxTicks() const;
|
||||
|
||||
uint32 CalcCastTime(Unit* caster = NULL, Spell* spell = nullptr) const;
|
||||
uint32 CalcCastTime(Unit* caster = nullptr, Spell* spell = nullptr) const;
|
||||
uint32 GetRecoveryTime() const;
|
||||
|
||||
int32 CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, Spell* spell = nullptr) const;
|
||||
|
||||
@@ -508,7 +508,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
|
||||
if (difficultyEntry->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is NULL, using mode %u", spellId, mode, mode - 2);
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is nullptr, using mode %u", spellId, mode, mode - 2);
|
||||
#endif
|
||||
mode -= 2;
|
||||
}
|
||||
|
||||
@@ -352,38 +352,38 @@ public:
|
||||
// examples:
|
||||
// -shadowstep - explicit target is the unit you want to go behind of
|
||||
// -chain heal - explicit target is the unit to be healed first
|
||||
// -holy nova/arcane explosion - explicit target = NULL because target you are selecting doesn't affect how spell targets are selected
|
||||
// -holy nova/arcane explosion - explicit target = nullptr because target you are selecting doesn't affect how spell targets are selected
|
||||
// you can determine if spell requires explicit targets by dbc columns:
|
||||
// - Targets - mask of explicit target types
|
||||
// - ImplicitTargetXX set to TARGET_XXX_TARGET_YYY, _TARGET_ here means that explicit target is used by the effect, so spell needs one too
|
||||
|
||||
// returns: WorldLocation which was selected as a spell destination or NULL
|
||||
// returns: WorldLocation which was selected as a spell destination or nullptr
|
||||
WorldLocation const* GetExplTargetDest();
|
||||
|
||||
void SetExplTargetDest(WorldLocation& loc);
|
||||
|
||||
// returns: WorldObject which was selected as an explicit spell target or NULL if there's no target
|
||||
// returns: WorldObject which was selected as an explicit spell target or nullptr if there's no target
|
||||
WorldObject* GetExplTargetWorldObject();
|
||||
|
||||
// returns: Unit which was selected as an explicit spell target or NULL if there's no target
|
||||
// returns: Unit which was selected as an explicit spell target or nullptr if there's no target
|
||||
Unit* GetExplTargetUnit();
|
||||
|
||||
// returns: GameObject which was selected as an explicit spell target or NULL if there's no target
|
||||
// returns: GameObject which was selected as an explicit spell target or nullptr if there's no target
|
||||
GameObject* GetExplTargetGObj();
|
||||
|
||||
// returns: Item which was selected as an explicit spell target or NULL if there's no target
|
||||
// returns: Item which was selected as an explicit spell target or nullptr if there's no target
|
||||
Item* GetExplTargetItem();
|
||||
|
||||
// methods useable only during spell hit on target, or during spell launch on target:
|
||||
// returns: target of current effect if it was Unit otherwise NULL
|
||||
// returns: target of current effect if it was Unit otherwise nullptr
|
||||
Unit* GetHitUnit();
|
||||
// returns: target of current effect if it was Creature otherwise NULL
|
||||
// returns: target of current effect if it was Creature otherwise nullptr
|
||||
Creature* GetHitCreature();
|
||||
// returns: target of current effect if it was Player otherwise NULL
|
||||
// returns: target of current effect if it was Player otherwise nullptr
|
||||
Player* GetHitPlayer();
|
||||
// returns: target of current effect if it was Item otherwise NULL
|
||||
// returns: target of current effect if it was Item otherwise nullptr
|
||||
Item* GetHitItem();
|
||||
// returns: target of current effect if it was GameObject otherwise NULL
|
||||
// returns: target of current effect if it was GameObject otherwise nullptr
|
||||
GameObject* GetHitGObj();
|
||||
// returns: destination of current effect
|
||||
WorldLocation* GetHitDest();
|
||||
@@ -802,13 +802,13 @@ public:
|
||||
|
||||
// returns guid of object which casted the aura (m_originalCaster of the Spell class)
|
||||
uint64 GetCasterGUID() const;
|
||||
// returns unit which casted the aura or NULL if not avalible (caster logged out for example)
|
||||
// returns unit which casted the aura or nullptr if not avalible (caster logged out for example)
|
||||
Unit* GetCaster() const;
|
||||
// returns object on which aura was casted, target for non-area auras, area aura source for area auras
|
||||
WorldObject* GetOwner() const;
|
||||
// returns owner if it's unit or unit derived object, NULL otherwise (only for persistent area auras NULL is returned)
|
||||
// returns owner if it's unit or unit derived object, nullptr otherwise (only for persistent area auras nullptr is returned)
|
||||
Unit* GetUnitOwner() const;
|
||||
// returns owner if it's dynobj, NULL otherwise
|
||||
// returns owner if it's dynobj, nullptr otherwise
|
||||
DynamicObject* GetDynobjOwner() const;
|
||||
|
||||
// removes aura with remove mode (see AuraRemoveMode enum)
|
||||
@@ -853,7 +853,7 @@ public:
|
||||
|
||||
// check if aura has effect of given effindex
|
||||
bool HasEffect(uint8 effIndex) const;
|
||||
// returns aura effect of given effect index or NULL
|
||||
// returns aura effect of given effect index or nullptr
|
||||
AuraEffect* GetEffect(uint8 effIndex) const;
|
||||
|
||||
// check if aura has effect of given aura type
|
||||
@@ -863,8 +863,8 @@ public:
|
||||
// Do not call these in hooks in which AuraApplication is not avalible, otherwise result will differ from expected (the functions will return nullptr)
|
||||
|
||||
// returns currently processed target of an aura
|
||||
// Return value does not need to be NULL-checked, the only situation this will (always)
|
||||
// return NULL is when the call happens in an unsupported hook, in other cases, it is always valid
|
||||
// Return value does not need to be nullptr-checked, the only situation this will (always)
|
||||
// return nullptr is when the call happens in an unsupported hook, in other cases, it is always valid
|
||||
Unit* GetTarget() const;
|
||||
// returns AuraApplication object of currently processed target
|
||||
AuraApplication const* GetTargetApplication() const;
|
||||
|
||||
Reference in New Issue
Block a user