93SpellCastTargets::SpellCastTargets(
Unit* caster,
uint32 targetMask,
uint64 targetGuid,
uint64 itemTargetGuid,
uint64 srcTransportGuid,
uint64 destTransportGuid,
Position srcPos,
Position destPos,
float elevation,
float missileSpeed, std::string targetString) :
100 m_src._transportGUID = srcTransportGuid;
101 if (
m_src._transportGUID)
102 m_src._transportOffset.Relocate(srcPos);
104 m_src._position.Relocate(srcPos);
106 m_dst._transportGUID = destTransportGuid;
107 if (
m_dst._transportGUID)
108 m_dst._transportOffset.Relocate(destPos);
110 m_dst._position.Relocate(destPos);
133 if (
m_src._transportGUID)
134 data >>
m_src._transportOffset.PositionXYZStream();
136 data >>
m_src._position.PositionXYZStream();
141 if (
m_src._transportGUID)
144 m_src._position.Relocate(caster);
150 if (
m_dst._transportGUID)
151 data >>
m_dst._transportOffset.PositionXYZStream();
153 data >>
m_dst._position.PositionXYZStream();
158 if (
m_dst._transportGUID)
161 m_dst._position.Relocate(caster);
188 if (
m_src._transportGUID)
189 data <<
m_src._transportOffset.PositionXYZStream();
191 data <<
m_src._position.PositionXYZStream();
197 if (
m_dst._transportGUID)
198 data <<
m_dst._transportOffset.PositionXYZStream();
200 data <<
m_dst._position.PositionXYZStream();
339 return &
m_src._position;
364 if (
m_src._transportGUID)
367 m_src._position.GetPositionOffsetTo(pos, offset);
368 m_src._transportOffset.RelocateOffset(offset);
370 m_src._position.Relocate(pos);
385 return &
m_dst._position;
416 if (
m_dst._transportGUID)
419 m_dst._position.GetPositionOffsetTo(pos, offset);
420 m_dst._transportOffset.RelocateOffset(offset);
422 m_dst._position.Relocate(pos);
454 m_src._position.Relocate(transport);
455 m_src._position.RelocateOffset(
m_src._transportOffset);
463 m_dst._position.Relocate(transport);
464 m_dst._position.RelocateOffset(
m_dst._transportOffset);
482 SF_LOG_INFO(
"spells",
"Source location: transport guid:" UI64FMTD " trans offset: %s position: %s",
m_src._transportGUID,
m_src._transportOffset.ToString().c_str(),
m_src._position.ToString().c_str());
484 SF_LOG_INFO(
"spells",
"Destination location: transport guid:" UI64FMTD " trans offset: %s position: %s",
m_dst._transportGUID,
m_dst._transportOffset.ToString().c_str(),
m_dst._position.ToString().c_str());
521 case SPELL_DAMAGE_CLASS_MELEE:
522 if (m_spellInfo->AttributesEx3 & SPELL_ATTR3_REQ_OFFHAND)
523 m_attackType = WeaponAttackType::OFF_ATTACK;
525 m_attackType = WeaponAttackType::BASE_ATTACK;
527 case SPELL_DAMAGE_CLASS_RANGED:
528 m_attackType = m_spellInfo->IsRangedWeaponSpell() ? WeaponAttackType::RANGED_ATTACK : WeaponAttackType::BASE_ATTACK;
532 if (m_spellInfo->AttributesEx2 & SPELL_ATTR2_AUTOREPEAT_FLAG)
533 m_attackType = WeaponAttackType::RANGED_ATTACK;
535 m_attackType = WeaponAttackType::BASE_ATTACK;
547 if (originalCasterGUID)
556 m_originalCaster = ObjectAccessor::GetUnit(*m_caster, m_originalCasterGUID);
557 if (m_originalCaster && !m_originalCaster->IsInWorld())
558 m_originalCaster = NULL;
619 SF_LOG_ERROR(
"spells",
"SPELL: deleting spell for spell ID %u. However, spell still referenced.",
m_spellInfo->Id);
724 if (redirect && (redirect != target))
735 uint32 processedAreaEffectsMask = 0;
765 uint8 mask = (1 << i);
768 if (ihit->effectMask & mask)
784 if (!ihit->scaleAura && ihit->targetGUID !=
m_caster->GetGUID())
824 uint32 effectMask = 1 << effIndex;
833 if (effectMask & processedEffectMask)
839 if (effects[j].IsEffect() &&
846 effectMask |= 1 << j;
849 processedEffectMask |= effectMask;
879 ASSERT(
false &&
"Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_SRC");
896 ASSERT(
false &&
"Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_DEST");
910 ASSERT(
false &&
"Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT");
920 ASSERT(
false &&
"Spell::SelectEffectImplicitTargets: received not implemented select target category");
929 ASSERT(
false &&
"Spell::SelectImplicitChannelTargets: received not implemented target reference type");
936 SF_LOG_DEBUG(
"spells",
"Spell::SelectImplicitChannelTargets: cannot find channel spell for spell ID %u, effect %u",
m_spellInfo->Id, effIndex);
946 if (target && target->
ToUnit())
949 SF_LOG_DEBUG(
"spells",
"SPELL: cannot find channel spell target for spell ID %u, effect %u",
m_spellInfo->Id, effIndex);
962 SF_LOG_DEBUG(
"spells",
"SPELL: cannot find channel spell destination for spell ID %u, effect %u",
m_spellInfo->Id, effIndex);
968 ASSERT(
false &&
"Spell::SelectImplicitChannelTargets: received not implemented target type");
977 ASSERT(
false &&
"Spell::SelectImplicitNearbyTargets: received not implemented target reference type");
998 ASSERT(
false &&
"Spell::SelectImplicitNearbyTargets: received not implemented selection check type");
1007 SF_LOG_DEBUG(
"spells",
"Spell::SelectImplicitNearbyTargets: no conditions entry for target with TARGET_CHECK_ENTRY of spell ID %u, effect %u - selecting default targets",
m_spellInfo->Id, effIndex);
1034 SF_LOG_DEBUG(
"spells",
"Spell::SelectImplicitNearbyTargets: cannot find nearby target for spell ID %u, effect %u",
m_spellInfo->Id, effIndex);
1054 ASSERT(
false &&
"Spell::SelectImplicitNearbyTargets: received not implemented target object type");
1065 ASSERT(
false &&
"Spell::SelectImplicitConeTargets: received not implemented target reference type");
1068 std::list<WorldObject*> targets;
1072 float coneAngle =
M_PI / 2;
1083 if (!targets.empty())
1091 std::list<Unit*> unitTargets;
1092 std::list<GameObject*> gObjTargets;
1094 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
1099 gObjTargets.push_back(gObjTarget);
1102 for (std::list<Unit*>::iterator itr = unitTargets.begin(); itr != unitTargets.end(); ++itr)
1105 for (std::list<GameObject*>::iterator itr = gObjTargets.begin(); itr != gObjTargets.end(); ++itr)
1113 Unit* referer = NULL;
1129 if (ihit->effectMask & (1 << effIndex))
1138 ASSERT(
false &&
"Spell::SelectImplicitAreaTargets: received not implemented target reference type");
1159 ASSERT(
false &&
"Spell::SelectImplicitAreaTargets: received not implemented target reference type");
1162 std::list<WorldObject*> targets;
1174 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
1176 switch ((*itr)->GetTypeId())
1206 if (!(
m_targets.GetUnitTarget() &&
m_targets.GetUnitTarget()->GetDisplayId() ==
m_targets.GetUnitTarget()->GetNativeDisplayId() &&
1208 ||
m_targets.GetUnitTarget()->isDead())))
1213 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
1215 switch ((*itr)->GetTypeId())
1219 if (!(*itr)->ToUnit()->isDead())
1239 std::list<Unit*> unitTargets;
1240 std::list<GameObject*> gObjTargets;
1243 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
1248 gObjTargets.push_back(gObjTarget);
1251 if (!unitTargets.empty())
1275 unitTargets.clear();
1287 if (
m_spellInfo->SpellFamilyFlags[0] == 0x10000000)
1289 maxSize =
m_caster->HasAura(55675) ? 6 : 5;
1306 for (std::list<Unit*>::iterator itr = unitTargets.begin(); itr != unitTargets.end();)
1308 if (!(*itr)->IsInRaidWith(
m_caster))
1309 itr = unitTargets.erase(itr);
1315 if (
m_spellInfo->SpellFamilyFlags[1] == 0x04000000)
1317 maxSize =
m_caster->HasAura(62970) ? 6 : 5;
1324 for (std::list<Unit*>::iterator itr = unitTargets.begin(); itr != unitTargets.end();)
1325 if (!(*itr)->IsInRaidWith(
m_caster))
1326 itr = unitTargets.erase(itr);
1334 if (maxSize && power != -1)
1338 if (unitTargets.size() > maxSize)
1341 unitTargets.resize(maxSize);
1346 for (std::list<Unit*>::iterator itr = unitTargets.begin(); itr != unitTargets.end();)
1347 if ((*itr)->getPowerType() != (
Powers)power)
1348 itr = unitTargets.erase(itr);
1352 if (unitTargets.size() > maxSize)
1355 unitTargets.resize(maxSize);
1364 for (std::list<Unit*>::iterator itr = unitTargets.begin(); itr != unitTargets.end(); ++itr)
1368 if (!gObjTargets.empty())
1373 for (std::list<GameObject*>::iterator itr = gObjTargets.begin(); itr != gObjTargets.end(); ++itr)
1387 m_targets.SetDst(playerCaster->m_homebindX, playerCaster->m_homebindY, playerCaster->m_homebindZ, playerCaster->GetOrientation(), playerCaster->m_homebindMapId);
1394 m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation, (
int32)st->target_mapId);
1395 else if (st->target_mapId ==
m_caster->GetMapId())
1396 m_targets.SetDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation);
1409 float dis = (float)
rand_norm() * (max_dis - min_dis) + min_dis;
1410 float x, y, z, angle;
1411 angle = (float)
rand_norm() *
static_cast<float>(
M_PI * 35.0f / 180.0f) -
static_cast<float>(
M_PI * 17.5f / 180.0f);
1415 float liquidLevel =
m_caster->GetMap()->GetWaterOrGroundLevel(x, y, z, &ground);
1416 if (liquidLevel <= ground)
1424 if (ground + 0.75 > liquidLevel)
1441 float objSize =
m_caster->GetObjectSize();
1450 dist = objSize + (dist - objSize) * (
float)
rand_norm();
1454 m_caster->GetFirstCollisionPosition(pos, dist, angle);
1456 m_caster->GetNearPosition(pos, dist, angle);
1480 dist = objSize + (dist - objSize) * (
float)
rand_norm();
1517 m_caster->MovePosition(pos, dist, angle);
1524 bool checkIfValid =
true;
1530 checkIfValid =
false;
1533 target =
m_caster->GetCharmerOrOwner();
1536 target =
m_caster->GetGuardianPet();
1540 target =
m_caster->ToTempSummon()->GetSummoner();
1543 target =
m_caster->GetVehicleBase();
1562 if (target && target->
ToUnit())
1568 ASSERT((
m_targets.GetObjectTarget() ||
m_targets.GetItemTarget()) &&
"Spell::SelectImplicitTargetObjectTargets - no explicit object or item target available!");
1598 if (effMask & (1 << k))
1602 std::list<WorldObject*> targets;
1610 std::list<Unit*> unitTargets;
1611 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
1615 for (std::list<Unit*>::iterator itr = unitTargets.begin(); itr != unitTargets.end(); ++itr)
1626 if (x < 100000.0f && x > -100000.0f)
return x;
1627 if (x >= 100000.0f)
return 100000.0f;
1628 if (x <= 100000.0f)
return -100000.0f;
1632#define DEBUG_TRAJ(a)
1643 float srcToDestDelta =
m_targets.GetDstPos()->m_positionZ -
m_targets.GetSrcPos()->m_positionZ;
1645 std::list<WorldObject*> targets;
1649 if (targets.empty())
1655 float a = (srcToDestDelta - dist2d * b) / (dist2d * dist2d);
1662 std::list<WorldObject*>::const_iterator itr = targets.begin();
1663 for (; itr != targets.end(); ++itr)
1669 const float size = std::max((*itr)->GetObjectSize() * 0.7f, 1.0f);
1671 const float objDist2d =
m_targets.GetSrcPos()->GetExactDist2d(*itr) * std::cos(
m_targets.GetSrcPos()->GetRelativeAngle(*itr));
1672 const float dz = (*itr)->GetPositionZ() -
m_targets.GetSrcPos()->m_positionZ;
1674 DEBUG_TRAJ(
SF_LOG_ERROR(
"spells",
"Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);)
1676 float dist = objDist2d - size;
1677 float height = dist * (a * dist + b);
1679 if (dist < bestDist&& height < dz + size && height > dz - size)
1681 bestDist = dist > 0 ? dist : 0;
1685#define CHECK_DIST {\
1686 DEBUG_TRAJ(SF_LOG_ERROR("spells", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\
1687 if (dist > bestDist)\
1689 if (dist < objDist2d + size && dist > objDist2d - size)\
1710 float sqrt1 = b * b + 4 * a * height;
1713 sqrt1 = sqrt(sqrt1);
1714 dist = (sqrt1 - b) / (2 * a);
1719 float sqrt2 = b * b + 4 * a * height;
1722 sqrt2 = sqrt(sqrt2);
1723 dist = (sqrt2 - b) / (2 * a);
1726 dist = (-sqrt2 - b) / (2 * a);
1732 dist = (-sqrt1 - b) / (2 * a);
1739 float x =
m_targets.GetSrcPos()->m_positionX + std::cos(
m_caster->GetOrientation()) * bestDist;
1740 float y =
m_targets.GetSrcPos()->m_positionY + std::sin(
m_caster->GetOrientation()) * bestDist;
1741 float z =
m_targets.GetSrcPos()->m_positionZ + bestDist * (a * bestDist + b);
1743 if (itr != targets.end())
1745 float distSq = (*itr)->GetExactDistSq(x, y, z);
1746 float sizeSq = (*itr)->GetObjectSize();
1749 if (distSq > sizeSq)
1751 float factor = 1 - sqrt(sizeSq / distSq);
1752 x += factor * ((*itr)->GetPositionX() - x);
1753 y += factor * ((*itr)->GetPositionY() - y);
1754 z += factor * ((*itr)->GetPositionZ() - z);
1756 distSq = (*itr)->GetExactDistSq(x, y, z);
1767 veh->SetLastShootPos(*
m_targets.GetDstPos());
1793 if (!
m_spellInfo->Effects[effIndex].GetImplicitTargetType())
1803 switch (
m_spellInfo->Effects[effIndex].GetImplicitTargetType())
1883 retMask &=
sConditionMgr->GetSearcherTypeMaskForConditionList(*condList);
1887template<
class SEARCHER>
1896 if (searchInGrid || searchInWorld)
1911 cell.
Visit(p, world_object_notifier, map, radius, x, y);
1916 cell.
Visit(p, grid_object_notifier, map, radius, x, y);
1925 if (!containerTypeMask)
1936 if (!containerTypeMask)
1946 float jumpRadius = 0.0f;
1974 float searchRadius = jumpRadius;
1976 searchRadius *= chainTargets;
1978 std::list<WorldObject*> tempTargets;
1980 tempTargets.remove(target);
1986 for (std::list<WorldObject*>::iterator itr = tempTargets.begin(); itr != tempTargets.end();)
1988 std::list<WorldObject*>::iterator checkItr = itr++;
1989 if (!
m_caster->HasInArc(
static_cast<float>(
M_PI), *checkItr))
1990 tempTargets.erase(checkItr);
1994 while (chainTargets)
1997 std::list<WorldObject*>::iterator foundItr = tempTargets.end();
2002 for (std::list<WorldObject*>::iterator itr = tempTargets.begin(); itr != tempTargets.end(); ++itr)
2010 maxHPDeficit = deficit;
2018 for (std::list<WorldObject*>::iterator itr = tempTargets.begin(); itr != tempTargets.end(); ++itr)
2020 if (foundItr == tempTargets.end())
2030 if (foundItr == tempTargets.end())
2033 tempTargets.erase(foundItr);
2034 targets.push_back(target);
2140 effectMask &= ~(1 << effIndex);
2153 effectMask &= ~(1 << effIndex);
2160 if (targetGUID == ihit->targetGUID)
2162 ihit->effectMask |= effectMask;
2163 ihit->scaleAura =
false;
2168 ihit->scaleAura =
true;
2183 targetInfo.
crit =
false;
2249 effectMask &= ~(1 << effIndex);
2258 effectMask &= ~(1 << effIndex);
2274 if (targetGUID == ihit->targetGUID)
2276 ihit->effectMask |= effectMask;
2315 effectMask &= ~(1 << effIndex);
2324 if (item == ihit->item)
2326 ihit->effectMask |= effectMask;
2361 if (
m_spellInfo->Effects[i].IsFarUnitTargetEffect())
2362 if ((1 << i) & mask)
2363 farMask |= (1 << i);
2375 if (farMask & (1 << i))
2412 Unit* spellHitTarget = NULL;
2415 spellHitTarget = unit;
2434 spellHitTarget = NULL;
2447 m_caster->ToPlayer()->RestoreSpellMods(
this, 14177);
2451 if (canEffectTrigger && !procAttacker && !procVictim)
2453 bool positive =
true;
2460 if (mask & (1 << i) && !
m_spellInfo->IsPositiveEffect(i))
2590 m_caster->ToPlayer()->UpdatePvP(
true);
2598 if (!unit || !effectMask)
2608 if (effectMask & (1 << effectNumber))
2610 effectMask &= ~(1 << effectNumber);
2644 else if (
m_caster->IsFriendlyTo(unit))
2657 m_caster->ToPlayer()->UpdatePvP(
true);
2680 uint8 aura_effmask = 0;
2682 if (effectMask & (1 << i) &&
m_spellInfo->Effects[i].IsUnitOwnedAuraEffect())
2683 aura_effmask |= 1 << i;
2709 bool refresh =
false;
2729 if (diminishMod == 0.0f)
2743 bool positive =
m_spellAura->GetSpellInfo()->IsPositive();
2745 positive = aurApp->IsPositive();
2747 duration =
m_originalCaster->ModSpellDuration(aurSpellInfo, unit, duration, positive, effectMask);
2759 int32 origDuration = duration;
2763 if (
int32 amplitude = eff->GetAmplitude())
2764 duration = std::max(std::max(origDuration / amplitude, 1) * amplitude, duration);
2784 if (effectMask & (1 << effectNumber))
2804 SF_LOG_DEBUG(
"spells",
"Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura",
m_spellInfo->Id, i->triggeredSpell->Id);
2808 if (i->triggeredSpell->GetDuration() == -1)
2818 triggeredAur->SetDuration(_duration);
2829 for (std::vector<int32>::const_iterator i = spellTriggered->begin(); i != spellTriggered->end(); ++i)
2857 if (effectMask & (1 << effectNumber))
2867 if (!target->
item || !effectMask)
2874 if (effectMask & (1 << effectNumber))
2889 uint8 channelAuraMask = 0;
2892 channelAuraMask |= 1 << i;
2894 channelAuraMask &= channelTargetEffectMask;
2897 if (channelAuraMask)
2906 if (ihit->missCondition ==
SPELL_MISS_NONE && (channelTargetEffectMask & ihit->effectMask))
2915 if (channelAuraMask & ihit->effectMask)
2921 ihit->effectMask &= ~aurApp->GetEffectMask();
2930 channelTargetEffectMask &= ~ihit->effectMask;
2936 return channelTargetEffectMask == 0;
2971 if (triggeredByAura)
2995 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
true);
2998 uint32 tmpPeriodicPowerCost = 0;
3012 uint32 maxPowerForCost = 0;
3031 switch (costResult.
Status)
3034 SF_LOG_DEBUG(
"spells",
"CalculateManaCost: Not implemented yet!");
3048 if (!
m_caster->IsControlledByPlayer())
3054 if (spellScaler && casterScaler)
3055 tmpPowerCost *= casterScaler->
ratio / spellScaler->
ratio;
3061 for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
3063 if (!((*i)->GetMiscValue() &
m_spellInfo->SchoolMask))
3066 if (!((*i)->GetMiscValueB() & (1 <<
m_powerType)))
3069 tmpPowerCost += (*i)->GetAmount();
3074 for (Unit::AuraEffectList::const_iterator i = aurasPct.begin(); i != aurasPct.end(); ++i)
3076 if (!((*i)->GetMiscValue() &
m_spellInfo->SchoolMask))
3079 if (!((*i)->GetMiscValueB() & (1 <<
m_powerType)))
3082 tmpPowerCost +=
CalculatePct(tmpPowerCost, (*i)->GetAmount());
3090 tmpPowerCost =
m_caster->GetHealth();
3110 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
false);
3146 player->SetSpellModTakingSpell(
this,
true);
3149 player->SetSpellModTakingSpell(
this,
false);
3193 m_caster->SetCurrentCastedSpell(
this);
3224 m_caster->ToPlayer()->RestoreSpellMods(
this);
3243 m_caster->ToPlayer()->RemoveSpellMods(
this);
3282 sScriptMgr->OnPlayerSpellCast(playerCaster,
this, skipCheck);
3288 if (
Pet* playerPet = playerCaster->GetPet())
3290 playerPet->AI()->OwnerAttacked(
m_targets.GetObjectTarget()->ToUnit());
3304 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
true);
3320 m_caster->ToPlayer()->RestoreSpellMods(
this);
3323 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
false);
3338 if (!my_trade->IsInAcceptProcess())
3344 m_caster->ToPlayer()->RestoreSpellMods(
this);
3347 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
false);
3366 m_caster->ToPlayer()->RestoreSpellMods(
this);
3369 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
false);
3404 if (targetItem->GetOwnerGUID() !=
m_caster->GetGUID())
3443 for (std::vector<int32>::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i)
3445 m_caster->RemoveAurasDueToSpell(-(*i));
3452 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
false);
3482 else if (duration == -1)
3522 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
true);
3534 bool single_missile = (
m_targets.HasDst());
3539 if (ihit->processed ==
false)
3541 if (single_missile || ihit->timeDelay <= t_offset)
3543 ihit->timeDelay = t_offset;
3546 else if (next_time == 0 || ihit->timeDelay < next_time)
3547 next_time = ihit->timeDelay;
3554 if (ighit->processed ==
false)
3556 if (single_missile || ighit->timeDelay <= t_offset)
3558 else if (next_time == 0 || ighit->timeDelay < next_time)
3559 next_time = ighit->timeDelay;
3566 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
false);
3634 m_caster->m_movedPlayer->ClearComboPoints();
3784 ((
Puppet*)charm)->UnSummon();
3788 creatureCaster->ReleaseFocus(
this);
3810 for (Unit::AuraEffectList::const_iterator i = vIgnoreReset.begin(); i != vIgnoreReset.end(); ++i)
3831 m_caster->ToPlayer()->UpdatePotionCooldown(
this);
3835 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
true);
3839 m_caster->ToPlayer()->RemoveSpellMods(
this);
3840 m_caster->ToPlayer()->SetSpellModTakingSpell(
this,
false);
3856 if (
m_caster->ToPlayer()->GetSession()->PlayerLoading())
3880 spellInfo ? spellInfo->
Id : 0,
3881 static_cast<uint32>(result),
3882 static_cast<uint32>(customError),
3883 static_cast<uint32>(opcode));
3888 data <<
uint8(cast_count);
3895 size_t dataPos = data.
wpos();
3906 switch (spellInfo->
Id)
3925 if (spellInfo->
Totem[0])
3927 if (spellInfo->
Totem[1])
3971 data <<
uint32(customError);
3981 if (spellInfo->
Reagent[i] <= 0)
3989 missingItem = itemid;
3994 data <<
uint32(missingItem);
4004 if ((diff / 4) == 1)
4039 bool hasTargetMask =
m_targets.GetTargetMask() != 0;
4062 data.
WriteBits(runeCooldownPassedCount, 3);
4076 data.
WriteBits(predictedPowerCount, 21);
4089 data.
WriteBit(!hasAmmoInventoryType);
4094 if (hasDestLocation)
4097 data.
WriteBit(destTransportGuid[1]);
4098 data.
WriteBit(destTransportGuid[6]);
4099 data.
WriteBit(destTransportGuid[2]);
4100 data.
WriteBit(destTransportGuid[7]);
4101 data.
WriteBit(destTransportGuid[0]);
4102 data.
WriteBit(destTransportGuid[3]);
4103 data.
WriteBit(destTransportGuid[5]);
4104 data.
WriteBit(destTransportGuid[4]);
4109 if (hasSourceLocation)
4112 data.
WriteBit(srcTransportGuid[4]);
4113 data.
WriteBit(srcTransportGuid[3]);
4114 data.
WriteBit(srcTransportGuid[5]);
4115 data.
WriteBit(srcTransportGuid[1]);
4116 data.
WriteBit(srcTransportGuid[7]);
4117 data.
WriteBit(srcTransportGuid[0]);
4118 data.
WriteBit(srcTransportGuid[6]);
4119 data.
WriteBit(srcTransportGuid[2]);
4142 data.
WriteBit(!hasCastSchoolImmunities);
4164 if (hasTargetString)
4213 if (hasDestLocation)
4217 if (destTransportGuid)
4218 m_targets.GetDst()->_transportOffset.GetPosition(x, y, z);
4220 m_targets.GetDst()->_position.GetPosition(x, y, z);
4239 if (hasSourceLocation)
4243 if (srcTransportGuid)
4244 m_targets.GetSrc()->_transportOffset.GetPosition(x, y, z);
4246 m_targets.GetSrc()->_position.GetPosition(x, y, z);
4267 if (hasCastSchoolImmunities)
4272 if (hasCastImmunities)
4281 if (predictedPowerCount > 0)
4288 data <<
uint32(castFlags);
4302 if (hasAmmoInventoryType)
4305 if (hasPredictedHeal)
4313 if (hasAmmoDisplayId)
4320 if (hasTargetString)
4323 if (hasPredictedType)
4329 data << float(
m_targets.GetElevation());
4331 for (
uint8 i = 0; i < runeCooldownPassedCount; ++i)
4334 float baseCd = float(
m_caster->ToPlayer()->GetRuneBaseCooldown(i));
4335 data <<
uint8((baseCd -
float(
m_caster->ToPlayer()->GetRuneCooldown(i))) / baseCd * 255);
4338 m_caster->SendMessageToSet(&data,
true);
4389 bool hasTargetMask =
m_targets.GetTargetMask() != 0;
4406 if ((*ihit).effectMask == 0)
4418 if (hasSourceLocation)
4421 data.
WriteBit(srcTransportGuid[3]);
4422 data.
WriteBit(srcTransportGuid[7]);
4423 data.
WriteBit(srcTransportGuid[4]);
4424 data.
WriteBit(srcTransportGuid[2]);
4425 data.
WriteBit(srcTransportGuid[0]);
4426 data.
WriteBit(srcTransportGuid[6]);
4427 data.
WriteBit(srcTransportGuid[1]);
4428 data.
WriteBit(srcTransportGuid[5]);
4436 size_t missTypeCountPos = data.
bitwpos();
4439 size_t missCountPos = data.
bitwpos();
4493 data.
WriteBit(!hasRunesStateBefore);
4494 data.
WriteBits(predictedPowerCount, 21);
4500 if (hasTargetString)
4521 data.
WriteBits(runeCooldownPassedCount, 3);
4524 uint32 missTypeCount = 0;
4541 data.
WriteBit(!hasRunesStateAfter);
4547 size_t hitCountPos = data.
bitwpos();
4550 if (hasDestLocation)
4553 data.
WriteBit(destTransportGuid[0]);
4554 data.
WriteBit(destTransportGuid[3]);
4555 data.
WriteBit(destTransportGuid[2]);
4556 data.
WriteBit(destTransportGuid[1]);
4557 data.
WriteBit(destTransportGuid[4]);
4558 data.
WriteBit(destTransportGuid[5]);
4559 data.
WriteBit(destTransportGuid[6]);
4560 data.
WriteBit(destTransportGuid[7]);
4601 data.
PutBits(missCountPos, missCount, 24);
4602 data.
PutBits(missTypeCountPos, missTypeCount, 25);
4603 data.
PutBits(hitCountPos, hitCount, 24);
4688 if (hasDestLocation)
4692 if (destTransportGuid)
4693 m_targets.GetDst()->_transportOffset.GetPosition(x, y, z);
4695 m_targets.GetDst()->_position.GetPosition(x, y, z);
4720 data <<
uint32(castFlags);
4722 if (hasSourceLocation)
4726 if (srcTransportGuid)
4727 m_targets.GetSrc()->_transportOffset.GetPosition(x, y, z);
4729 m_targets.GetSrc()->_position.GetPosition(x, y, z);
4746 if (hasPredictedType)
4752 if (predictedPowerCount > 0)
4759 if (hasRunesStateAfter)
4762 for (
uint8 i = 0; i < runeCooldownPassedCount; ++i)
4765 float baseCd = float(
m_caster->ToPlayer()->GetRuneBaseCooldown(i));
4766 data <<
uint8((baseCd -
float(
m_caster->ToPlayer()->GetRuneCooldown(i))) / baseCd * 255);
4769 if (hasRunesStateBefore)
4784 if (hasTargetString)
4801 m_caster->SendMessageToSet(&data,
true);
4810 bool hasSpellCastLogData =
false;
4811 uint32 spellCastLogDataCount = 0;
4824 for (std::list<SpellLogExtraAttacksHelper>::const_iterator extraAttack = helper.
ExtraAttacks.begin(); extraAttack != helper.
ExtraAttacks.end(); ++extraAttack)
4825 data.
WriteGuidMask(extraAttack->Guid, 5, 4, 2, 3, 1, 0, 6, 7);
4828 for (std::list<SpellLogEnergizeHelper>::const_iterator energize = helper.
Energizes.begin(); energize != helper.
Energizes.end(); ++energize)
4836 for (std::list<ObjectGuid>::const_iterator target = helper.
Targets.begin(); target != helper.
Targets.end(); ++target)
4842 data.
WriteBit(hasSpellCastLogData);
4843 if (hasSpellCastLogData)
4844 data.
WriteBits(spellCastLogDataCount, 21);
4847 if (hasSpellCastLogData)
4849 for (
uint32 i = 0; i < spellCastLogDataCount; ++i)
4862 uint32 effIndex = itr->first;
4865 for (std::list<ObjectGuid>::const_iterator target = helper.
Targets.begin(); target != helper.
Targets.end(); ++target)
4868 for (std::list<SpellLogEnergizeHelper>::const_iterator energize = helper.
Energizes.begin(); energize != helper.
Energizes.end(); ++energize)
4871 data <<
uint32(energize->PowerType);
4872 data <<
uint32(energize->Value);
4874 data << float(energize->Multiplier);
4878 for (std::list<SpellLogExtraAttacksHelper>::const_iterator extraAttack = helper.
ExtraAttacks.begin(); extraAttack != helper.
ExtraAttacks.end(); ++extraAttack)
4881 data <<
uint32(extraAttack->Count);
4885 for (std::list<uint32>::const_iterator petFeedEntry = helper.
PetFeed.begin(); petFeedEntry != helper.
PetFeed.end(); ++petFeedEntry)
4886 data <<
uint32(*petFeedEntry);
4890 for (std::list<uint32>::const_iterator itemEntry = helper.
CreatedItems.begin(); itemEntry != helper.
CreatedItems.end(); ++itemEntry)
4891 data <<
uint32(*itemEntry);
4897 m_caster->SendMessageToSet(&data,
true);
4943 m_caster->SendMessageToSet(&data,
true);
5000 data <<
uint8(result);
5004 m_caster->SendMessageToSet(&data,
true);
5011 data <<
uint8(result);
5020 m_caster->SendMessageToSet(&data,
true);
5038 m_caster->SendMessageToSet(&data,
true);
5044 if (!channelTarget && !
m_spellInfo->NeedsExplicitUnitTarget())
5049 uint32 MechanicImmunityMask =
m_caster->GetMechanicImmunityMask();
5066 if (SchoolImmunityMask || MechanicImmunityMask)
5082 if (SchoolImmunityMask || MechanicImmunityMask)
5084 data <<
uint32(SchoolImmunityMask);
5085 data <<
uint32(MechanicImmunityMask);
5093 data <<
uint32(duration);
5099 m_caster->SendMessageToSet(&data,
true);
5118 data <<
uint32(sentName.size() + 1);
5170 bool expendable =
false;
5171 bool withoutCharges =
false;
5188 (charges > 0) ? --charges : ++charges;
5195 withoutCharges = (charges == 0);
5200 if (expendable && withoutCharges)
5232 if (ihit->targetGUID == targetGUID)
5263 SF_LOG_ERROR(
"spells",
"Spell::TakePower: Unknown power type '%d'", powerType);
5311 if (runeCost[i] > 0)
5336 runeCost[i] = runeCostData->
RuneCost[i];
5365 runeCost[
uint8(rune)]--;
5407 if (castItemTemplate && castItemTemplate->
ItemId == itemid)
5424 if (
m_targets.GetItemTargetEntry() == itemid)
5440 float threat = 0.0f;
5443 if (threatEntry->apPctMod != 0.0f)
5446 threat += threatEntry->flatMod;
5499 if (ihit->targetGUID == targetGUID)
5592 bool checkForm =
true;
5595 for (Unit::AuraEffectList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)
5615 for (Unit::AuraEffectList::const_iterator blockItr = blockSpells.begin(); blockItr != blockSpells.end(); ++blockItr)
5619 bool reqCombat =
true;
5621 for (Unit::AuraEffectList::const_iterator j = stateAuras.begin(); j != stateAuras.end(); ++j)
5626 if ((*j)->GetMiscValue() == 1)
5669 return vehicleCheck;
5677 if (!conditions.empty() && !
sConditionMgr->IsObjectMeetToConditions(condInfo, conditions))
5730 m_targets.GetDstPos()->GetPosition(x, y, z);
5754 if (!
m_caster->ToPlayer()->InBattleground())
5759 if (player->InArena())
5770 m_caster->GetZoneAndAreaId(zone, area);
5841 if (!unit || !unit->
HasAura(17743))
5870 if (!learn_spellproto)
5883 if (guild->GetLeaderGUID() !=
m_caster->ToPlayer()->GetGUID())
5901 if (!learn_spellproto)
5913 if (
m_caster->HasAura(gp->SpellId))
5990 int32 skillValue =
m_caster->ToPlayer()->GetSkillValue(skill);
5992 int32 ReqValue = (skillValue < 100 ? (TargetLevel - 10) * 10 : TargetLevel * 5);
5993 if (ReqValue > skillValue)
5998 skillValue < sWorld->GetConfigMaxSkillValue() &&
5999 (ReqValue < 0 ? 0 : ReqValue) > (std::rand() % (skillValue + 37) + (skillValue - 25)))
6015 Item* pTempItem = NULL;
6032 if (
m_caster->ToPlayer()->InBattleground() &&
6040 lockId = go->GetGOInfo()->GetLockId();
6045 lockId = itm->GetTemplate()->LockID;
6048 int32 reqSkillValue = 0;
6049 int32 skillValue = 0;
6063 if ((canFailAtMax || skillValue < sWorld->GetConfigMaxSkillValue()) && reqSkillValue > (std::rand() % (skillValue + 37) + (skillValue - 25)))
6081 if (!SummonProperties)
6083 switch (SummonProperties->
Category)
6101 if (
m_targets.GetUnitTarget()->GetPetGUID())
6114 pet->CastSpell(pet, 32752,
true, NULL, NULL, pet->GetGUID());
6144 if (targetBind->perm && targetBind->save != casterBind->save)
6150 if (!target->
Satisfy(
sObjectMgr->GetAccessRequirement(mapId, difficulty), mapId))
6252 if (target->IsMounted())
6255 if (target->GetCharmerGUID())
6274 bool allowMount = !
m_caster->GetMap()->IsInstance() ||
m_caster->GetMap()->IsBattlegroundOrArena();
6281 if (
m_caster->IsInDisallowedMountForm())
6358 if (!plrCaster->GetComboPoints())
6372 if (!owner->IsAlive())
6375 if (!target &&
m_targets.GetUnitTarget())
6387 if (creatureCaster->HasSpellCooldown(
m_spellInfo->Id))
6404 uint8 school_immune = 0;
6405 uint32 mechanic_immune = 0;
6406 uint32 dispel_immune = 0;
6432 usableInStun =
false;
6443 bool foundNotStun =
false;
6445 for (Unit::AuraEffectList::const_iterator i = stunAuras.begin(); i != stunAuras.end(); ++i)
6447 uint32 auraMechanicMask = (*i)->GetSpellInfo()->GetAllEffectsMechanicMask();
6450 foundNotStun =
true;
6472 if (school_immune || mechanic_immune || dispel_immune)
6476 for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
6478 Aura const* aura = itr->second->GetBase();
6493 switch (part->GetAuraType())
6523 return prevented_reason;
6530 bool isRatedBattleground =
false;
6531 bool isArena = !isRatedBattleground;
6575 if (aureff->GetBase()->GetStackAmount() >=
m_spellInfo->StackAmount)
6579 else if (
m_spellInfo->Effects[j].IsAreaAuraEffect())
6593 if (ihit->targetGUID == targetguid)
6629 if (!
m_caster->IsWithinMeleeRange(target, max_range))
6632 else if (!
m_caster->IsWithinCombatRange(target, max_range))
6637 if (
m_caster->IsWithinMeleeRange(target))
6640 else if (min_range &&
m_caster->IsWithinCombatRange(target, min_range))
6734 if (
m_targets.GetUnitTarget()->IsFullHealth())
6756 if (
m_targets.GetUnitTarget()->GetPower(power) ==
m_targets.GetUnitTarget()->GetMaxPower(power))
6797 if (targetItem->GetOwnerGUID() !=
m_caster->GetGUID())
6798 checkReagents =
true;
6835 for (
uint8 i = 0; i < 2; ++i)
6889 && (
m_targets.GetItemTarget()->IsVellum()))
6915 bool isItemUsable =
false;
6923 isItemUsable =
true;
6930 if (pEnchant && isItemUsable)
6981 if (item_disenchantskilllevel ==
uint32(-1))
6985 if (item_quality > 4 || item_quality < 2)
7004 uint32 item_prospectingskilllevel =
m_targets.GetItemTarget()->GetTemplate()->RequiredSkillRank;
7008 if (
m_targets.GetItemTarget()->GetCount() < 5)
7027 uint32 item_millingskilllevel =
m_targets.GetItemTarget()->GetTemplate()->RequiredSkillRank;
7031 if (
m_targets.GetItemTarget()->GetCount() < 5)
7140 int32 delaytime = 500;
7141 int32 delayReduce = 100;
7144 if (delayReduce >= 100)
7147 AddPct(delaytime, -delayReduce);
7157 SF_LOG_INFO(
"spells",
"Spell %u partially interrupted for (%d) ms at damage",
m_spellInfo->Id, delaytime);
7165 data <<
uint32(delaytime);
7167 m_caster->SendMessageToSet(&data,
true);
7180 int32 delayReduce = 100;
7183 if (delayReduce >= 100)
7186 AddPct(delaytime, -delayReduce);
7205 dynObj->Delay(delaytime);
7347 if (itr->effectMask & (1 << effect))
7351 if (itr->effectMask & (1 << effect))
7355 if (itr->effectMask & (1 << effect))
7377 SF_LOG_ERROR(
"spells",
"~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
7406 if (
m_Spell->GetDelayStart() != 0)
7441 m_Spell->GetCaster()->m_Events.AddEvent(
this,
m_Spell->GetDelayStart() + n_offset,
false);
7451 m_Spell->SetDelayStart(e_time);
7453 m_Spell->GetCaster()->m_Events.AddEvent(
this, e_time +
m_Spell->GetDelayMoment(),
false);
7466 m_Spell->GetCaster()->m_Events.AddEvent(
this, e_time + 1,
false);
7479 return m_Spell->IsDeletable();
7524 bool ammoTaken =
false;
7527 if (!(mask & 1 << i))
7579 if (targetAmount > 10)
7608 bool reqKey =
false;
7612 switch (lockInfo->
Type[j])
7633 reqSkillValue = lockInfo->
Skill[j];
7637 0 :
m_caster->ToPlayer()->GetSkillValue(skillId);
7642 skillValue +=
m_spellInfo->Effects[effIndex].CalcValue();
7644 if (skillValue < reqSkillValue)
7704 if (!(*itr)->_Load(
this))
7706 std::list<SpellScript*>::iterator bitr = itr;
7712 SF_LOG_DEBUG(
"spells",
"Spell::LoadScripts: Script `%s` for spell `%u` is loaded now", (*itr)->_GetScriptName()->c_str(),
m_spellInfo->Id);
7723 std::list<SpellScript::CastHandler>::iterator hookItrEnd = (*scritr)->BeforeCast.end(), hookItr = (*scritr)->BeforeCast.begin();
7724 for (; hookItr != hookItrEnd; ++hookItr)
7725 (*hookItr).Call(*scritr);
7727 (*scritr)->_FinishScriptCall();
7736 std::list<SpellScript::CastHandler>::iterator hookItrEnd = (*scritr)->OnCast.end(), hookItr = (*scritr)->OnCast.begin();
7737 for (; hookItr != hookItrEnd; ++hookItr)
7738 (*hookItr).Call(*scritr);
7740 (*scritr)->_FinishScriptCall();
7749 std::list<SpellScript::CastHandler>::iterator hookItrEnd = (*scritr)->AfterCast.end(), hookItr = (*scritr)->AfterCast.begin();
7750 for (; hookItr != hookItrEnd; ++hookItr)
7751 (*hookItr).Call(*scritr);
7753 (*scritr)->_FinishScriptCall();
7763 std::list<SpellScript::CheckCastHandler>::iterator hookItrEnd = (*scritr)->OnCheckCast.end(), hookItr = (*scritr)->OnCheckCast.begin();
7764 for (; hookItr != hookItrEnd; ++hookItr)
7768 retVal = tempResult;
7771 (*scritr)->_FinishScriptCall();
7779 (*scritr)->_InitHit();
7785 bool preventDefault =
false;
7788 std::list<SpellScript::EffectHandler>::iterator effItr, effEndItr;
7793 effItr = (*scritr)->OnEffectLaunch.begin();
7794 effEndItr = (*scritr)->OnEffectLaunch.end();
7798 effItr = (*scritr)->OnEffectLaunchTarget.begin();
7799 effEndItr = (*scritr)->OnEffectLaunchTarget.end();
7803 effItr = (*scritr)->OnEffectHit.begin();
7804 effEndItr = (*scritr)->OnEffectHit.end();
7808 effItr = (*scritr)->OnEffectHitTarget.begin();
7809 effEndItr = (*scritr)->OnEffectHitTarget.end();
7816 (*scritr)->_PrepareScriptCall(hookType);
7817 for (; effItr != effEndItr; ++effItr)
7819 if (!(*scritr)->_IsEffectPrevented(effIndex) && (*effItr).IsEffectAffected(
m_spellInfo, effIndex))
7820 (*effItr).Call(*scritr, effIndex);
7822 if (!preventDefault)
7823 preventDefault = (*scritr)->_IsDefaultEffectPrevented(effIndex);
7825 (*scritr)->_FinishScriptCall();
7827 return preventDefault;
7835 std::list<SpellScript::HitHandler>::iterator hookItrEnd = (*scritr)->BeforeHit.end(), hookItr = (*scritr)->BeforeHit.begin();
7836 for (; hookItr != hookItrEnd; ++hookItr)
7837 (*hookItr).Call(*scritr);
7839 (*scritr)->_FinishScriptCall();
7848 std::list<SpellScript::HitHandler>::iterator hookItrEnd = (*scritr)->OnHit.end(), hookItr = (*scritr)->OnHit.begin();
7849 for (; hookItr != hookItrEnd; ++hookItr)
7850 (*hookItr).Call(*scritr);
7852 (*scritr)->_FinishScriptCall();
7861 std::list<SpellScript::HitHandler>::iterator hookItrEnd = (*scritr)->AfterHit.end(), hookItr = (*scritr)->AfterHit.begin();
7862 for (; hookItr != hookItrEnd; ++hookItr)
7863 (*hookItr).Call(*scritr);
7865 (*scritr)->_FinishScriptCall();
7874 std::list<SpellScript::ObjectAreaTargetSelectHandler>::iterator hookItrEnd = (*scritr)->OnObjectAreaTargetSelect.end(), hookItr = (*scritr)->OnObjectAreaTargetSelect.begin();
7875 for (; hookItr != hookItrEnd; ++hookItr)
7876 if ((*hookItr).IsEffectAffected(
m_spellInfo, effIndex))
7877 (*hookItr).Call(*scritr, targets);
7879 (*scritr)->_FinishScriptCall();
7888 std::list<SpellScript::ObjectTargetSelectHandler>::iterator hookItrEnd = (*scritr)->OnObjectTargetSelect.end(), hookItr = (*scritr)->OnObjectTargetSelect.begin();
7889 for (; hookItr != hookItrEnd; ++hookItr)
7890 if ((*hookItr).IsEffectAffected(
m_spellInfo, effIndex))
7891 (*hookItr).Call(*scritr, target);
7893 (*scritr)->_FinishScriptCall();
7905 std::list<SpellScript::ObjectTargetSelectHandler>::iterator targetSelectHookEnd = (*itr)->OnObjectTargetSelect.end(), targetSelectHookItr = (*itr)->OnObjectTargetSelect.begin();
7906 for (; targetSelectHookItr != targetSelectHookEnd; ++targetSelectHookItr)
7907 if (((*targetSelectHookItr).IsEffectAffected(
m_spellInfo, effIndex) && !(*targetSelectHookItr).IsEffectAffected(
m_spellInfo, effIndexToCheck)) ||
7908 (!(*targetSelectHookItr).IsEffectAffected(
m_spellInfo, effIndex) && (*targetSelectHookItr).IsEffectAffected(
m_spellInfo, effIndexToCheck)))
7911 std::list<SpellScript::ObjectAreaTargetSelectHandler>::iterator areaTargetSelectHookEnd = (*itr)->OnObjectAreaTargetSelect.end(), areaTargetSelectHookItr = (*itr)->OnObjectAreaTargetSelect.begin();
7912 for (; areaTargetSelectHookItr != areaTargetSelectHookEnd; ++areaTargetSelectHookItr)
7913 if (((*areaTargetSelectHookItr).IsEffectAffected(
m_spellInfo, effIndex) && !(*areaTargetSelectHookItr).IsEffectAffected(
m_spellInfo, effIndexToCheck)) ||
7914 (!(*areaTargetSelectHookItr).IsEffectAffected(
m_spellInfo, effIndex) && (*areaTargetSelectHookItr).IsEffectAffected(
m_spellInfo, effIndexToCheck)))
7938 for (Unit::AuraEffectList::const_iterator i = targetTriggers.begin(); i != targetTriggers.end(); ++i)
7942 SpellInfo const* auraSpellInfo = (*i)->GetSpellInfo();
7943 uint32 auraSpellIdx = (*i)->GetEffIndex();
7948 int32 auraBaseAmount = (*i)->GetBaseAmount();
7950 int32 chance =
m_caster->CalculateSpellDamage(NULL, auraSpellInfo, auraSpellIdx, &auraBaseAmount);
7955 spellTriggerInfo.
chance = chance * (*i)->GetBase()->GetStackAmount();
8082 if (!
_referer->IsInPartyWith(unitTarget))
8094 if (!
_referer->IsInRaidWith(unitTarget))
8114 if (dist <
_range && WorldObjectSpellTargetCheck::operator ()(target))
8163 if (!
_caster->HasInLine(target, 0))
@ CONDITION_SOURCE_TYPE_SPELL
std::list< Condition * > ConditionList
@ CREATURE_FLAG_EXTRA_ALL_DIMINISH
#define MAX_SPELL_REAGENTS
@ ACHIEVEMENT_TIMED_TYPE_SPELL_CASTER
@ ACHIEVEMENT_TIMED_TYPE_ITEM
@ ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET
@ ITEM_ENCHANTMENT_TYPE_USE_SPELL
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2
@ ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
@ ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL
@ ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
DBCStorage< SummonPropertiesEntry > sSummonPropertiesStore(SummonPropertiesfmt)
DBCStorage< LockEntry > sLockStore(LockEntryfmt)
DBCStorage< SpellRuneCostEntry > sSpellRuneCostStore(SpellRuneCostfmt)
DBCStorage< SpellPowerEntry > sSpellPowerStore(SpellPowerEntryfmt)
DBCStorage< GtNPCManaCostScalerEntry > sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< GlyphPropertiesEntry > sGlyphPropertiesStore(GlyphPropertiesfmt)
AreaTableEntry const * GetAreaEntryByAreaID(uint32 area_id)
#define MAX_SPELL_EFFECTS
#define MAX_ITEM_ENCHANTMENT_EFFECTS
CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAP > CellCoord
@ GRID_MAP_TYPE_MASK_PLAYER
@ GRID_MAP_TYPE_MASK_CREATURE
@ GRID_MAP_TYPE_MASK_GAMEOBJECT
@ GRID_MAP_TYPE_MASK_CORPSE
@ ENCHANTMENT_CAN_SOULBOUND
@ ITEM_SUBCLASS_WEAPON_CROSSBOW
@ ITEM_SUBCLASS_WEAPON_GUN
@ ITEM_SUBCLASS_WEAPON_BOW
@ ITEM_SUBCLASS_WEAPON_WAND
@ ITEM_SUBCLASS_WEAPON_THROWN
@ ITEM_SPELLTRIGGER_ON_USE
@ ITEM_SPELLTRIGGER_ON_NO_DELAY_USE
@ ITEM_PROTO_FLAG_TRIGGERED_CAST
@ ITEM_PROTO_FLAG_MILLABLE
@ ITEM_PROTO_FLAG_PROSPECTABLE
#define MAX_ITEM_PROTO_SPELLS
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
#define SF_LOG_INFO(filterType__,...)
LootStore LootTemplates_Milling("milling_loot_template", "item entry (herb)", true)
LootStore LootTemplates_Prospecting("prospecting_loot_template", "item entry (ore)", true)
#define DEFAULT_WORLD_OBJECT_SIZE
bool IS_GAMEOBJECT_GUID(uint64 guid)
uint32 GUID_HIPART(uint64 guid)
std::vector< ItemPosCount > ItemPosCountVec
@ PLAYER_FLAGS_ALLOW_ONLY_ABILITY
@ GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
@ SPELL_ATTR0_ON_NEXT_SWING
@ SPELL_ATTR0_STOP_ATTACK_TARGET
@ SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY
@ SPELL_ATTR0_CASTABLE_WHILE_DEAD
@ SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION
@ SPELL_ATTR0_OUTDOORS_ONLY
@ SPELL_ATTR0_ONLY_STEALTHED
@ SPELL_ATTR0_INDOORS_ONLY
@ SPELL_ATTR0_CASTABLE_WHILE_MOUNTED
@ SPELL_EFFECT_POWER_BURN
@ SPELL_EFFECT_SUMMON_PET
@ SPELL_EFFECT_DISENCHANT
@ SPELL_EFFECT_PROSPECTING
@ SPELL_EFFECT_ENCHANT_HELD_ITEM
@ SPELL_EFFECT_ENCHANT_ITEM
@ SPELL_EFFECT_GAMEOBJECT_REPAIR
@ SPELL_EFFECT_SUMMON_RAF_FRIEND
@ SPELL_EFFECT_WEAPON_DAMAGE
@ SPELL_EFFECT_APPLY_GLYPH
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
@ SPELL_EFFECT_SUMMON_PLAYER
@ SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER
@ SPELL_EFFECT_RESURRECT_PET
@ SPELL_EFFECT_CREATE_MANA_GEM
@ SPELL_EFFECT_ADD_EXTRA_ATTACKS
@ SPELL_EFFECT_WEAPON_PERCENT_DAMAGE
@ SPELL_EFFECT_ACTIVATE_RUNE
@ SPELL_EFFECT_CREATE_ITEM_2
@ SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL
@ SPELL_EFFECT_UNLOCK_GUILD_VAULT_TAB
@ SPELL_EFFECT_POWER_DRAIN
@ SPELL_EFFECT_RESURRECT_NEW
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ SPELL_EFFECT_TALENT_SPEC_SELECT
@ SPELL_EFFECT_GAMEOBJECT_SET_DESTRUCTION_STATE
@ SPELL_EFFECT_GAMEOBJECT_DAMAGE
@ SPELL_EFFECT_LEARN_SPELL
@ SPELL_EFFECT_TELEPORT_UNITS
@ SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC
@ SPELL_EFFECT_CREATE_TAMED_PET
@ SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY
@ SPELL_EFFECT_STEAL_BENEFICIAL_BUFF
@ SPELL_EFFECT_CREATE_ITEM
@ SPELL_EFFECT_APPLY_AURA
@ SPELL_EFFECT_LEARN_PET_SPELL
#define CLASSMASK_WAND_USERS
@ SPELL_PREVENTION_TYPE_SILENCE
@ SPELL_PREVENTION_TYPE_PACIFY
@ SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY
@ SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE
@ SPELL_ATTR1_DRAIN_ALL_POWER
@ SPELL_ATTR1_CANT_BE_REFLECTED
@ TARGET_UNIT_PASSENGER_1
@ TARGET_UNIT_TARGET_CHAINHEAL_ALLY
@ TARGET_DEST_CASTER_RANDOM
@ TARGET_DEST_DYNOBJ_ENEMY
@ TARGET_UNIT_PASSENGER_6
@ TARGET_DEST_CASTER_FRONT_LEAP
@ TARGET_DEST_CHANNEL_TARGET
@ TARGET_DEST_DEST_RANDOM
@ TARGET_UNIT_PASSENGER_2
@ TARGET_UNIT_CHANNEL_TARGET
@ TARGET_DEST_CASTER_FISHING
@ TARGET_DEST_TARGET_RANDOM
@ TARGET_UNIT_PASSENGER_4
@ TARGET_UNIT_PASSENGER_7
@ TARGET_DEST_TARGET_ENEMY
@ TARGET_DEST_DYNOBJ_NONE
@ TARGET_DEST_DYNOBJ_ALLY
@ TARGET_UNIT_PASSENGER_5
@ TARGET_UNIT_PASSENGER_3
@ TARGET_DEST_CASTER_SUMMON
@ TARGET_GAMEOBJECT_TARGET
@ TARGET_GAMEOBJECT_ITEM_TARGET
@ TARGET_UNIT_PASSENGER_0
@ TARGET_DEST_CHANNEL_CASTER
@ SPELL_ATTR7_IS_CHEAT_SPELL
@ SPELL_ATTR2_AUTOREPEAT_FLAG
@ SPELL_ATTR2_CAN_TARGET_DEAD
@ SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS
@ SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS
@ SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC
@ SPELL_DAMAGE_CLASS_RANGED
@ SPELL_DAMAGE_CLASS_MAGIC
@ SPELL_DAMAGE_CLASS_NONE
@ SPELL_DAMAGE_CLASS_MELEE
@ SPELL_ATTR4_NOT_USABLE_IN_ARENA_OR_RATED_BG
@ SPELL_ATTR4_AREA_TARGET_CHAIN
@ SPELL_ATTR4_USABLE_IN_ARENA
@ SPELL_ATTR4_PROC_ONLY_ON_CASTER
@ SPELL_ATTR6_IGNORE_CASTER_AURAS
@ SPELL_ATTR6_CAST_BY_CHARMER
@ SPELL_ATTR3_ONLY_TARGET_PLAYERS
@ SPELL_ATTR3_ONLY_TARGET_GHOSTS
@ SPELL_ATTR3_NO_INITIAL_AGGRO
@ SPELL_ATTR3_BATTLEGROUND
@ SPELL_ATTR3_CANT_TRIGGER_PROC
@ SPELL_ATTR3_REQ_OFFHAND
@ SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2
@ SPELL_CUSTOM_ERROR_NONE
@ SPELL_CUSTOM_ERROR_GM_ONLY
@ SPELL_ATTR5_USABLE_WHILE_CONFUSED
@ SPELL_ATTR5_USABLE_WHILE_FEARED
@ SPELL_ATTR5_HASTE_AFFECT_DURATION
@ SPELL_ATTR5_USABLE_WHILE_STUNNED
#define IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK
@ SPELL_ATTR9_USABLE_IN_RATED_BATTLEGROUNDS
@ SPELL_ATTR9_SPECIAL_DELAY_CALCULATION
@ SPELL_ATTR9_NOT_USABLE_IN_ARENA
@ SPELL_ATTR8_AURA_SEND_AMOUNT
SkillType SkillByLockType(LockType locktype)
@ SPELL_FAILED_ITEM_AT_MAX_CHARGES
@ SPELL_FAILED_NOT_IN_RATED_BATTLEGROUND
@ SPELL_FAILED_NEED_EXOTIC_AMMO
@ SPELL_FAILED_ITEM_ENCHANT_TRADE_WINDOW
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_FAILED_ITEM_NOT_READY
@ SPELL_FAILED_REQUIRES_SPELL_FOCUS
@ SPELL_FAILED_NOT_IN_ARENA
@ SPELL_FAILED_ONLY_OUTDOORS
@ SPELL_FAILED_SPELL_IN_PROGRESS
@ SPELL_FAILED_ON_USE_ENCHANT
@ SPELL_FAILED_AFFECTING_COMBAT
@ SPELL_FAILED_NOT_TRADEABLE
@ SPELL_FAILED_BAD_IMPLICIT_TARGETS
@ SPELL_FAILED_EQUIPPED_ITEM_CLASS
@ SPELL_FAILED_CANT_BE_CHARMED
@ SPELL_FAILED_ALREADY_AT_FULL_HEALTH
@ SPELL_FAILED_ALREADY_HAVE_CHARM
@ SPELL_FAILED_NO_COMBO_POINTS
@ SPELL_FAILED_EQUIPPED_ITEM_CLASS_MAINHAND
@ SPELL_FAILED_NO_MOUNTS_ALLOWED
@ SPELL_FAILED_OUT_OF_RANGE
@ SPELL_FAILED_CUSTOM_ERROR
@ SPELL_FAILED_ONLY_INDOORS
@ SPELL_FAILED_CASTER_DEAD
@ SPELL_FAILED_NO_CHARGES_REMAIN
@ SPELL_FAILED_ONLY_BATTLEGROUNDS
@ SPELL_FAILED_NOT_SHAPESHIFT
@ SPELL_FAILED_UNIQUE_GLYPH
@ SPELL_FAILED_NEED_MORE_ITEMS
@ SPELL_FAILED_LINE_OF_SIGHT
@ SPELL_FAILED_TARGET_IS_PLAYER_CONTROLLED
@ SPELL_FAILED_TARGET_NOT_IN_INSTANCE
@ SPELL_FAILED_NOT_BEHIND
@ SPELL_FAILED_TARGET_NOT_LOOTED
@ SPELL_FAILED_INTERRUPTED
@ SPELL_FAILED_UNIT_NOT_INFRONT
@ SPELL_FAILED_CASTER_AURASTATE
@ SPELL_FAILED_ONLY_ABOVEWATER
@ SPELL_FAILED_TARGET_LOCKED_TO_RAID_INSTANCE
@ SPELL_FAILED_TOO_MANY_OF_ITEM
@ SPELL_FAILED_REQUIRES_AREA
@ SPELL_FAILED_EQUIPPED_ITEM
@ SPELL_FAILED_DONT_REPORT
@ SPELL_FAILED_PREVENTED_BY_MECHANIC
@ SPELL_FAILED_TARGET_FRIENDLY
@ SPELL_FAILED_EQUIPPED_ITEM_CLASS_OFFHAND
@ SPELL_FAILED_CANT_BE_MILLED
@ SPELL_FAILED_NOT_ON_TAXI
@ SPELL_FAILED_ITEM_NOT_FOUND
@ SPELL_FAILED_NOT_MOUNTED
@ SPELL_FAILED_TOTEM_CATEGORY
@ SPELL_FAILED_NOT_IN_BATTLEGROUND
@ SPELL_FAILED_NOT_TRADING
@ SPELL_FAILED_ONLY_STEALTHED
@ SPELL_FAILED_WRONG_PET_FOOD
@ SPELL_FAILED_ALREADY_HAVE_SUMMON
@ SPELL_FAILED_LOW_CASTLEVEL
@ SPELL_FAILED_ITEM_ALREADY_ENCHANTED
@ SPELL_FAILED_CANT_BE_DISENCHANTED
@ SPELL_FAILED_CANT_BE_PROSPECTED
@ SPELL_FAILED_ALREADY_AT_FULL_POWER
@ SPELL_FAILED_FISHING_TOO_LOW
@ SPELL_FAILED_TARGET_UNSKINNABLE
@ SPELL_FAILED_NOT_INFRONT
@ SPELL_FAILED_FOOD_LOWLEVEL
@ SPELL_FAILED_SPELL_UNAVAILABLE
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ SPELL_FAILED_TOO_SHALLOW
static float tangent(float x)
@ SPELL_EFFECT_HANDLE_LAUNCH_TARGET
@ SPELL_EFFECT_HANDLE_LAUNCH
@ SPELL_EFFECT_HANDLE_HIT
@ SPELL_EFFECT_HANDLE_HIT_TARGET
@ CAST_FLAG_ADJUST_MISSILE
@ CAST_FLAG_HEAL_PREDICTION
@ CAST_FLAG_POWER_LEFT_SELF
@ CAST_FLAG_HAS_TRAJECTORY
void(Spell::* pEffect)(SpellEffIndex effIndex)
@ SPELL_AURA_DISPEL_IMMUNITY
@ SPELL_AURA_ABILITY_IGNORE_AURASTATE
@ SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE
@ SPELL_AURA_MOD_IGNORE_SHAPESHIFT
@ SPELL_AURA_PERIODIC_MANA_LEECH
@ SPELL_AURA_MOD_POSSESS_PET
@ SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS
@ SPELL_AURA_CAST_WHILE_WALKING
@ SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE
@ SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT
@ SPELL_AURA_ADD_TARGET_TRIGGER
@ SPELL_AURA_SCHOOL_IMMUNITY
@ SPELL_AURA_MOD_POWER_COST_SCHOOL
@ SPELL_AURA_MECHANIC_IMMUNITY
@ SPELL_AURA_MOD_PACIFY_SILENCE
@ SPELL_AURA_REDUCE_PUSHBACK
@ SPELL_AURA_IGNORE_MELEE_RESET
@ SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED
@ SPELL_AURA_BLOCK_SPELL_FAMILY
@ SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER
@ SPELL_ATTR0_CU_DIRECT_DAMAGE
@ SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET
@ SPELL_ATTR0_CU_CONE_BACK
@ SPELL_ATTR0_CU_PICKPOCKET
@ SPELL_ATTR0_CU_CONE_LINE
@ SPELL_ATTR0_CU_NO_INITIAL_THREAT
int32 GetDiminishingReturnsLimitDuration(DiminishingGroup group, SpellInfo const *spellproto)
DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const *spellproto, bool triggered)
DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group)
@ PROC_EX_INTERNAL_CANT_PROC
@ PROC_EX_INTERNAL_TRIGGERED
@ PROC_EX_INTERNAL_REQ_FAMILY
@ PROC_FLAG_DONE_SPELL_RANGED_DMG_CLASS
@ PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS
@ PROC_FLAG_TAKEN_RANGED_AUTO_ATTACK
@ PROC_FLAG_DONE_PERIODIC
@ PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS
@ PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS
@ PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG
@ PROC_FLAG_TAKEN_SPELL_RANGED_DMG_CLASS
@ PROC_FLAG_TAKEN_PERIODIC
@ PROC_FLAG_DONE_MAINHAND_ATTACK
@ PROC_FLAG_DONE_RANGED_AUTO_ATTACK
@ PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_NEG
@ PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG
@ PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS
@ PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_POS
@ PROC_FLAG_TAKEN_SPELL_MELEE_DMG_CLASS
@ PROC_FLAG_DONE_TRAP_ACTIVATION
@ PROC_FLAG_DONE_OFFHAND_ATTACK
@ PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG
@ SPELL_SCRIPT_HOOK_AFTER_CAST
@ SPELL_SCRIPT_HOOK_EFFECT_HIT
@ SPELL_SCRIPT_HOOK_AFTER_HIT
@ SPELL_SCRIPT_HOOK_EFFECT_LAUNCH
@ SPELL_SCRIPT_HOOK_OBJECT_AREA_TARGET_SELECT
@ SPELL_SCRIPT_HOOK_BEFORE_HIT
@ SPELL_SCRIPT_HOOK_CHECK_CAST
@ SPELL_SCRIPT_HOOK_EFFECT_LAUNCH_TARGET
@ SPELL_SCRIPT_HOOK_BEFORE_CAST
@ SPELL_SCRIPT_HOOK_OBJECT_TARGET_SELECT
@ SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET
@ SPELL_SCRIPT_HOOK_ON_CAST
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
@ EFFECT_IMPLICIT_TARGET_CASTER
@ EFFECT_IMPLICIT_TARGET_EXPLICIT
@ TARGET_SELECT_CATEGORY_CONE
@ TARGET_SELECT_CATEGORY_AREA
@ TARGET_SELECT_CATEGORY_DEFAULT
@ TARGET_SELECT_CATEGORY_NEARBY
@ TARGET_SELECT_CATEGORY_NYI
@ TARGET_SELECT_CATEGORY_CHANNEL
@ TARGET_CHECK_RAID_CLASS
@ TARGET_FLAG_CORPSE_ALLY
@ TARGET_FLAG_UNIT_MINIPET
@ TARGET_FLAG_GAMEOBJECT_ITEM
@ TARGET_FLAG_DEST_LOCATION
@ TARGET_FLAG_SOURCE_LOCATION
@ TARGET_FLAG_CORPSE_ENEMY
@ TARGET_FLAG_CORPSE_MASK
@ TARGET_FLAG_GAMEOBJECT_MASK
@ TARGET_OBJECT_TYPE_UNIT
@ TARGET_OBJECT_TYPE_CORPSE
@ TARGET_OBJECT_TYPE_UNIT_AND_DEST
@ TARGET_OBJECT_TYPE_DEST
@ TARGET_OBJECT_TYPE_GOBJ
@ TARGET_OBJECT_TYPE_CORPSE_ALLY
@ TARGET_OBJECT_TYPE_CORPSE_ENEMY
@ TARGET_OBJECT_TYPE_GOBJ_ITEM
@ TARGET_REFERENCE_TYPE_SRC
@ TARGET_REFERENCE_TYPE_TARGET
@ TARGET_REFERENCE_TYPE_LAST
@ TARGET_REFERENCE_TYPE_CASTER
@ TARGET_REFERENCE_TYPE_DEST
@ AURA_INTERRUPT_FLAG_SPELL_ATTACK
@ AURA_INTERRUPT_FLAG_CAST
@ AURA_INTERRUPT_FLAG_TALK
@ AURA_INTERRUPT_FLAG_HITBYSPELL
@ AURA_INTERRUPT_FLAG_NOT_SEATED
@ MOVEMENTFLAG_FALLING_FAR
@ SPELLMOD_NOT_LOSE_CASTING_TIME
@ SPELLMOD_SPELL_COST_REFUND_ON_FAIL
@ SPELLMOD_GLOBAL_COOLDOWN
@ TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ TRIGGERED_FULL_MASK
Will ignore most target checks (mostly DBC target checks).
@ TRIGGERED_IGNORE_POWER_AND_REAGENT_COST
Will ignore Spell and Category cooldowns.
@ TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD
Will ignore GCD.
@ TRIGGERED_CAST_DIRECTLY
Will ignore combo point requirement.
@ TRIGGERED_IGNORE_TARGET_CHECK
Will ignore equipped item requirements.
@ TRIGGERED_IGNORE_CASTER_AURASTATE
Will ignore shapeshift checks.
@ TRIGGERED_IGNORE_AURA_SCALING
Will not take away cast item or update related achievement criteria.
@ TRIGGERED_IGNORE_CAST_IN_PROGRESS
Will ignore aura scaling.
@ TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE
Will ignore caster aura states including combat requirements and death state.
@ TRIGGERED_IGNORE_SHAPESHIFT
Will not adjust facing to target (if any).
@ TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS
In Spell::prepare, will be cast directly without setting containers for executed spell.
@ TRIGGERED_IGNORE_CAST_ITEM
Will ignore power and reagent cost.
@ TRIGGERED_IGNORE_COMBO_POINTS
Will not check if a current cast is in progress.
@ TRIGGERED_IGNORE_GCD
Not triggered.
@ TRIGGERED_DISALLOW_PROC_EVENTS
Will ignore caster aura restrictions or requirements.
@ TRIGGERED_IGNORE_CASTER_AURAS
Will ignore mounted/on vehicle restrictions.
@ TRIGGERED_DONT_REPORT_CAST_ERROR
Disallows proc events from triggered spell (default).
@ TRIGGERED_IGNORE_SET_FACING
Will ignore interruptible aura's at cast.
@ CURRENT_CHANNELED_SPELL
@ CURRENT_AUTOREPEAT_SPELL
@ SPELL_INTERRUPT_FLAG_INTERRUPT
@ SPELL_INTERRUPT_FLAG_MOVEMENT
@ SPELL_FACING_FLAG_INFRONT
@ UNIT_STATE_ATTACK_PLAYER
@ UNIT_FLAG_NON_ATTACKABLE
uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition)
@ UNIT_FLAG2_ALLOW_CHEAT_SPELLS
@ UNIT_FIELD_MOD_CASTING_SPEED
@ UNIT_FIELD_CHANNEL_OBJECT
@ UNIT_FIELD_CHANNEL_SPELL
@ UNIT_FIELD_CREATED_BY_SPELL
@ PLAYER_FIELD_PLAYER_FLAGS
bool roll_chance_i(int chance)
T CalculatePct(T base, U pct)
SpellInfo const * GetSpellInfo() const
int32 GetDuration() const
AuraEffect * GetEffect(uint8 effIndex) const
static Aura * TryRefreshStackOrCreate(SpellInfo const *spellproto, uint32 tryEffMask, WorldObject *owner, Unit *caster, int32 *baseAmount=NULL, Item *castItem=NULL, uint64 casterGUID=0, bool *refresh=NULL)
void SetDuration(int32 duration, bool withMods=false)
SpellInfo const * GetSpellInfo() const
bool CanFlyIn() const
Return if we can use mount in battlefield.
void WriteGuidBytes(const ObjectGuid &guid, Offsets... offsets)
bool WriteBit(uint32 bit)
void WriteGuidMask(const ObjectGuid &guid, Offsets... offsets)
size_t bitwpos() const
Returns position of last written bit.
void WriteString(std::string const &str)
void appendPackGUID(uint64 guid)
void PutBits(size_t pos, T value, uint32 bitCount)
void WriteBits(T value, size_t bits)
void WriteByteSeq(uint8 b)
void readPackGUID(uint64 &guid)
uint64 GetOwnerGUID() const
virtual void SpellHit(Unit *, SpellInfo const *)
CreatureTemplate const * GetCreatureTemplate() const
bool IsInRange(float x, float y, float z, float radius) const
GameobjectTypes GetGoType() const
void threatAssist(Unit *victim, float baseThreat, SpellInfo const *threatSpell=NULL)
ItemTemplate const * GetTemplate() const
Player * GetOwner() const
bool IsFitToSpellRequirements(SpellInfo const *spellInfo) const
static WorldObject * GetWorldObject(WorldObject const &, uint64)
static Unit * GetUnit(WorldObject const &, uint64 guid)
static Corpse * GetCorpse(WorldObject const &u, uint64 guid)
static Player * FindPlayer(uint64)
static Unit * FindUnit(uint64)
GameObject * ToGameObject()
bool HasFlag(uint16 index, uint32 flag) const
Player * GetOwner() const
bool HaveInDiet(ItemTemplate const *item) const
uint32 GetCurrentFoodBenefitLevel(uint32 itemlevel) const
void SendEquipError(InventoryResult msg, Item *pItem, Item *pItem2=NULL, uint32 itemid=0)
void SetLastPotionId(uint32 item_id)
InstancePlayerBind * GetBoundInstance(uint32 mapid, DifficultyID difficulty)
bool IsInSameRaidWith(Player const *p) const
void SetLastUsedRune(RuneType type)
void SetRuneCooldown(uint8 index, uint32 cooldown)
bool HasItemFitToSpellRequirements(SpellInfo const *spellInfo, Item const *ignoreItem=NULL) const
uint16 GetSkillValue(uint32 skill) const
void CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx)
Item * GetItemByEntry(uint32 entry) const
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
uint8 GetRunesState() const
void RestoreBaseRune(uint8 index)
WorldSession * GetSession() const
Item * GetItemByGuid(uint64 guid) const
bool CanNoReagentCast(SpellInfo const *spellInfo) const
T ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell *spell=NULL)
uint32 GetRuneCooldown(uint8 index) const
void AddSpellAndCategoryCooldowns(SpellInfo const *spellInfo, uint32 itemId, Spell *spell=NULL, bool infinityCooldown=false)
bool Satisfy(AccessRequirement const *ar, uint32 target_map, bool report=false)
TradeData * GetTradeData() const
RuneType GetCurrentRune(uint8 index) const
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 item, uint32 count, uint32 *no_space_count=NULL) const
void DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check=false)
uint32 GetRuneBaseCooldown(uint8 index) const
Player * GetSelectedPlayer() const
Item * GetWeaponForAttack(WeaponAttackType attackType, bool useable=false) const
void RecordSpellCastFailure(uint32 spellId, uint32 failure, uint32 customError, uint32 opcode)
SpellDestination const * GetSrc() const
void SetItemTarget(Item *item)
void RemoveObjectTarget()
WorldObject * GetObjectTarget() const
uint64 GetGOTargetGUID() const
uint64 GetObjectTargetGUID() const
uint64 GetCorpseTargetGUID() const
void ModDst(Position const &pos)
GameObject * GetGOTarget() const
void SetTradeItemTarget(Player *caster)
Corpse * GetCorpseTarget() const
uint64 m_objectTargetGUID
void SetDst(float x, float y, float z, float orientation, uint32 mapId=MAPID_INVALID)
void SetSrc(float x, float y, float z)
SpellDestination const * GetDst() const
void SetGOTarget(GameObject *target)
void UpdateTradeSlotItem()
void SetUnitTarget(Unit *target)
void Read(ByteBuffer &data, Unit *caster)
WorldObject * m_objectTarget
Unit * GetUnitTarget() const
void Update(Unit *caster)
uint64 GetUnitTargetGUID() const
void ModSrc(Position const &pos)
void Write(ByteBuffer &data)
Position const * GetSrcPos() const
WorldLocation const * GetDstPos() const
std::list< Condition * > * ImplicitTargetConditions
float CalcRadius(Unit *caster=NULL, Spell *=NULL) const
SpellImplicitTargetInfo TargetA
SpellImplicitTargetInfo TargetB
virtual bool IsDeletable() const
virtual void Abort(uint64 e_time)
virtual bool Execute(uint64 e_time, uint32 p_time)
void SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
SpellInfo const * GetSpellInfo() const
void CallScriptAfterCastHandlers()
void HandleHolyPower(Player *caster)
GameObject * SearchSpellFocus()
GameObject * gameObjTarget
void PrepareTriggersExecutedOnHit()
bool m_referencedFromCurrentSpell
void cast(bool skipCheck=false)
void SendChannelStart(uint32 duration)
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 cast_count, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, Opcodes opcode=SMSG_CAST_FAILED)
SpellCastTargets m_targets
void SendPetCastResult(SpellCastResult result)
void SearchChainTargets(std::list< WorldObject * > &targets, uint32 chainTargets, WorldObject *target, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectType, ConditionList *condList, bool isChainHeal)
void SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, uint32 &processedEffectMask)
void SelectExplicitTargets()
TriggerCastFlags _triggeredCastFlags
bool IsAutoRepeat() const
void SetSpellValue(SpellValueMod mod, int32 value)
void prepareDataForTriggerSystem(AuraEffect const *triggeredByAura)
void ExecuteLogEffectSummonObject(uint8 effIndex, WorldObject *obj)
SpellCastResult CanOpenLock(uint32 effIndex, uint32 lockid, SkillType &skillid, int32 &reqSkillValue, int32 &skillValue)
SpellEffectHandleMode effectHandleMode
bool IsValidDeadOrAliveTarget(Unit const *target) const
uint32 GetSearcherTypeMask(SpellTargetObjectTypes objType, ConditionList *condList) const
bool IsNeedSendToClient() const
SpellResearchData const * m_researchData
void CallScriptObjectAreaTargetSelectHandlers(std::list< WorldObject * > &targets, SpellEffIndex effIndex)
void SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, uint32 effMask)
SpellDestination m_destTargets[MAX_SPELL_EFFECTS]
void _handle_finish_phase()
void PrepareTargetProcessing()
void SetExecutedCurrently(bool yes)
Spell(Unit *caster, SpellInfo const *info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID=0, bool skipCheck=false)
uint8 m_delayAtDamageCount
void SendChannelUpdate(uint32 time)
SpellCastResult CheckItems()
void prepare(SpellCastTargets const *targets, AuraEffect const *triggeredByAura=NULL)
std::list< GOTargetInfo > m_UniqueGOTargetInfo
WeaponAttackType m_attackType
void SendInterrupted(uint8 result)
uint64 m_originalCasterGUID
LogHelperMap m_effectExecuteData
bool UpdateChanneledTargetList()
void TriggerGlobalCooldown()
void SearchTargets(SEARCHER &searcher, uint32 containerMask, Unit *referer, Position const *pos, float radius)
void ExecuteLogEffectOpenLock(uint8 effIndex, Object *obj)
void AddGOTarget(GameObject *target, uint32 effectMask)
void HandleThreatSpells()
void SelectImplicitChainTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, WorldObject *target, uint32 effMask)
void ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit *target, uint32 powerType, uint32 powerTaken, float gainMultiplier)
void CancelGlobalCooldown()
int32 CalculateDamage(uint8 i, Unit const *target) const
void PrepareScriptHitHandlers()
DiminishingLevels m_diminishLevel
void CallScriptOnCastHandlers()
void AddDestTarget(SpellDestination const &dest, uint32 effIndex)
void SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
float m_damageMultipliers[3]
bool HaveTargetsForEffect(uint8 effect) const
void HandleEffects(Unit *pUnitTarget, Item *pItemTarget, GameObject *pGOTarget, uint32 i, SpellEffectHandleMode mode)
void _handle_immediate_phase()
SpellCastResult CheckCasterAuras() const
void DoAllEffectOnLaunchTarget(TargetInfo &targetInfo, float *multiplier)
void CallScriptBeforeCastHandlers()
int32 m_periodicPowerCost
void SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, uint32 effMask)
SpellCustomErrors m_customError
bool CallScriptEffectHandlers(SpellEffIndex effIndex, SpellEffectHandleMode mode)
void SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
void SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
void CallScriptObjectTargetSelectHandlers(WorldObject *&target, SpellEffIndex effIndex)
PathGenerator m_preGeneratedPath
HitTriggerSpellList m_hitTriggerSpells
int32 m_periodicPowerTimer
bool CheckEffectTarget(Unit const *target, uint32 eff) const
void SetDelayStart(uint64 m_time)
SpellCastResult CheckPower()
SpellInfo const * m_triggeredByAuraSpell
uint64 handle_delayed(uint64 t_offset)
void SearchAreaTargets(std::list< WorldObject * > &targets, float range, Position const *position, Unit *referer, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList *condList)
uint8 m_channelTargetEffectMask
void SelectImplicitCasterObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
CurrentSpellTypes GetCurrentContainer() const
std::list< TargetInfo > m_UniqueTargetInfo
SpellMissInfo DoSpellHitOnUnit(Unit *unit, uint32 effectMask, bool scaleAura)
void AddUnitTarget(Unit *target, uint32 effectMask, bool checkIfValid=true, bool implicit=true)
SpellSchoolMask m_spellSchoolMask
std::list< SpellScript * > m_loadedScripts
void ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject *obj)
void SelectImplicitTrajTargets()
void SelectSpellTargets()
void ExecuteLogEffectInterruptCast(uint8 effIndex, Unit *victim, uint32 spellId)
void ExecuteLogEffectResurrect(uint8 effIndex, Unit *target)
SpellCastResult CheckPetCast(Unit *target)
bool IsNextMeleeSwingSpell() const
SpellCastResult CheckCast(bool strict)
SpellCastResult CallScriptCheckCastHandlers()
std::list< ItemTargetInfo > m_UniqueItemInfo
void SelectEffectTypeImplicitTargets(uint8 effIndex)
void ExecuteLogEffectCreateItem(uint8 effIndex, uint32 entry)
void InitExplicitTargets(SpellCastTargets const &targets)
void CallScriptBeforeHitHandlers()
WorldLocation * destTarget
uint8 m_applyMultiplierMask
void DoTriggersOnSpellHit(Unit *unit, uint32 effMask)
void SetReferencedFromCurrent(bool yes)
bool CanExecuteTriggersOnHit(uint32 effMask, SpellInfo const *triggeredByAura=NULL) const
void ExecuteLogEffectDestroyItem(uint8 effIndex, uint32 entry)
void CheckEffectExecuteData() const
void update(uint32 difftime)
void SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType, uint32 effMask)
bool CheckScriptEffectImplicitTargets(uint32 effIndex, uint32 effIndexToCheck)
DiminishingGroup m_diminishGroup
void AddItemTarget(Item *item, uint32 effectMask)
UsedSpellMods m_appliedMods
SpellValue *const m_spellValue
void SendResurrectRequest(Player *target)
void SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const &targetType)
bool IsAutoActionResetSpell() const
void ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit *victim, int32 itemId, int32 slot)
void ExecuteLogEffectExtraAttacks(uint8 effIndex, Unit *victim, uint32 attCount)
WorldObject * SearchNearbyTarget(float range, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectionType, ConditionList *condList=NULL)
void finish(bool ok=true)
SpellCastResult CheckRange(bool strict)
SpellInfo const *const m_spellInfo
bool HasGlobalCooldown() const
void FinishTargetProcessing()
void CallScriptOnHitHandlers()
SpellCastResult CheckRuneCost(uint32 runeCostID)
void TakeRunePower(bool didHit)
SpellCastResult CheckArenaAndRatedBattlegroundCastRules()
void CallScriptAfterHitHandlers()
void DoAllEffectOnTarget(TargetInfo *target)
bool CanAutoCast(Unit *target)
SpellTargetCheckTypes GetCheckType() const
SpellTargetReferenceTypes GetReferenceType() const
SpellTargetSelectionCategories GetSelectionCategory() const
SpellTargetObjectTypes GetObjectType() const
float CalcDirectionAngle() const
Targets GetTarget() const
uint32 RequiresSpellFocus
SpellEffectInfo Effects[MAX_SPELL_EFFECTS]
uint32 ReagentCount[MAX_SPELL_REAGENTS]
uint32 GetDispelMask() const
SpellSchoolMask GetSchoolMask() const
uint32 MaxAffectedTargets
int32 EquippedItemSubClassMask
uint32 GetAllEffectsMechanicMask() const
int32 Reagent[MAX_SPELL_REAGENTS]
uint32 m_lastSanctuaryTime
DiminishingLevels GetDiminishing(DiminishingGroup group)
void IncrDiminishing(DiminishingGroup group)
bool CanHaveThreatList() const
uint32 GetCombatTimer() const
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster=0) const
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except=0)
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Player * GetSpellModOwner() const
uint64 GetCharmerOrOwnerGUID() const
std::multimap< uint32, AuraApplication * > AuraApplicationMap
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
bool isSpellCrit(Unit *victim, SpellInfo const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType=WeaponAttackType::BASE_ATTACK) const
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
uint32 SpellCriticalHealingBonus(SpellInfo const *spellProto, uint32 damage, Unit *victim)
Aura * GetAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
void DealDamageMods(Unit *victim, uint32 &damage, uint32 *absorb)
float ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration, Unit *caster, DiminishingLevels Level, int32 limitduration)
bool IsStandState() const
void DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
int32 ModifyPower(Powers power, int32 val)
int32 HealBySpell(Unit *victim, SpellInfo const *spellInfo, uint32 addHealth, bool critical=false)
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
uint64 GetCharmerGUID() const
uint32 GetCreatureType() const
virtual bool IsImmunedToSpell(SpellInfo const *spellInfo) const
uint64 GetTransGUID() const override
AttackerSet const & getAttackers() const
HostileRefManager & getHostileRefManager()
void RemoveAurasByType(AuraType auraType, uint64 casterGUID=0, Aura *except=NULL, bool negative=true, bool positive=true)
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID=0) const
int32 GetPower(Powers power) const
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log)
bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask) const
virtual bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, uint32 index) const
AuraApplication * GetAuraApplication(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0, AuraApplication *except=NULL) const
bool HasUnitState(const uint32 f) const
bool IsFriendlyTo(Unit const *unit) const
void CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=WeaponAttackType::BASE_ATTACK, bool crit=false)
bool IsControlledByPlayer() const
float GetTotalAuraMultiplierByMiscMask(AuraType auratype, uint32 misc_mask) const
std::list< AuraEffect * > AuraEffectList
void SetStandState(uint8 state)
void ProcDamageAndSpell(Unit *victim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType=WeaponAttackType::BASE_ATTACK, SpellInfo const *procSpell=NULL, SpellInfo const *procAura=NULL)
static IVMapManager * createOrGetVMapManager()
bool IsWithinDist3d(float x, float y, float z, float dist) const
bool IsWithinLOSInMap(WorldObject const *obj) const
float GetTransOffsetX() const
bool GetDistanceOrder(WorldObject const *obj1, WorldObject const *obj2, bool is3D=true) const
float GetTransOffsetY() const
float GetTransOffsetZ() const
void GetFirstCollisionPosition(Position &pos, float dist, float angle)
void GetContactPoint(WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const
float GetDistance(WorldObject const *obj) const
float GetTransOffsetO() const
void GetNearPosition(Position &pos, float dist, float angle)
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true) const
float GetObjectSize() const
virtual uint64 GetTransGUID() const
void Initialize(Opcodes opcode, size_t newres=200)
LocaleConstant GetSessionDbLocaleIndex() const
uint32 GetRecruiterId() const
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
uint32 GetAccountId() const
@ SMSG_SPELL_CHANNEL_UPDATE
@ SMSG_SPELL_CHANNEL_START
@ SMSG_SPELL_FAILED_OTHER
@ RATE_POWER_RUNICPOWER_INCOME
bool IsDisabledFor(DisableType type, uint32 entry, Unit const *unit, uint8 flags)
void RandomResizeList(std::list< T > &list, uint32 size)
RuntimeMetrics & GetRuntimeMetrics()
@ SPELL_POWER_COST_UNSUPPORTED_POWER_TYPE
@ SPELL_POWER_COST_UNKNOWN_POWER_TYPE
SpellPowerCostCalculationResult CalculateSpellPowerCosts(SpellPowerCostCalculationData const &data)
bool HasMechanic(uint32 mask, uint32 mechanic)
CellCoord ComputeCellCoord(float x, float y)
void Visit(CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, WorldObject const &, float) const
SpellCastResult ErrorType
Condition * mLastFailedCondition
WorldObject * mConditionTargets[MAX_CONDITION_TARGETS]
SkillType GetRequiredLootSkill() const
_Spell Spells[MAX_ITEM_PROTO_SPELLS]
uint32 RequiredDisenchantSkill
uint32 Type[MAX_LOCK_CASE]
uint32 Index[MAX_LOCK_CASE]
uint32 Skill[MAX_LOCK_CASE]
float GetPositionZ() const
float GetOrientation() const
float GetRelativeAngle(Position const *pos) const
float GetPositionX() const
float GetPositionY() const
void RelocateOffset(Position const &offset)
void Relocate(float x, float y)
SpellPowerCostCalculationStatus Status
Position const * _position
WorldObjectSpellAreaTargetCheck(float range, Position const *position, Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
bool operator()(WorldObject *target)
bool operator()(WorldObject *target)
WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit *caster, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
WorldObjectSpellNearbyTargetCheck(float range, Unit *caster, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
bool operator()(WorldObject *target)
Position const * _position
~WorldObjectSpellTargetCheck()
SpellInfo const * _spellInfo
ConditionList * _condList
WorldObjectSpellTargetCheck(Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
ConditionSourceInfo * _condSrcInfo
bool operator()(WorldObject *target)
SpellTargetCheckTypes _targetSelectionType
bool operator()(WorldObject *target)
WorldObjectSpellTrajTargetCheck(float range, Position const *position, Unit *caster, SpellInfo const *spellInfo)
SpellInfo const * triggeredSpell
SpellInfo const * triggeredByAura
SpellMissInfo missCondition
SpellMissInfo reflectResult
WorldLocation _transportOffset
uint32 type[MAX_ITEM_ENCHANTMENT_EFFECTS]
std::list< SpellLogExtraAttacksHelper > ExtraAttacks
std::list< ObjectGuid > Targets
std::list< uint32 > PetFeed
std::list< SpellLogEnergizeHelper > Energizes
std::list< uint32 > CreatedItems
float ManaCostPercentageFloat
float ChannelCostPercentageFloat
bool NoRunicPowerGain() const
SpellValue(SpellInfo const *proto)
int32 EffectBasePoints[MAX_SPELL_EFFECTS]
uint32 MaxAffectedTargets