329 bool apply_direct_bonus =
true;
392 for (Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
396 (*i)->GetCasterGUID() != unitCaster->
GetGUID())
400 if ((*i)->GetSpellInfo()->SpellFamilyFlags[0] & 0x4)
407 if ((*i)->GetSpellInfo()->SpellFamilyFlags[2] & 0x00000002)
430 if (!unitCaster->
HasAura(56235))
445 int32 bp0 = aurEff->GetId() == 54037 ? 4 : 8;
448 unitCaster->
CastSpell(
nullptr, 54425, args);
464 for (Unit::AuraEffectList::const_iterator i = ImprMindBlast.begin(); i != ImprMindBlast.end(); ++i)
467 ((*i)->GetSpellInfo()->SpellIconID == 95))
470 int32 const chance = (*i)->GetSpellInfo()->GetEffect(
EFFECT_1).CalcValue(unitCaster);
515 if (
uint32 combo = player->GetComboPoints())
521 bool needConsume =
true;
522 uint32 spellId = aurEff->GetId();
524 uint32 doses = aurEff->GetBase()->GetStackAmount();
530 for (Unit::AuraEffectList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
532 if ((*iter)->GetSpellInfo()->SpellFamilyName ==
SPELLFAMILY_ROGUE && (*iter)->GetSpellInfo()->SpellIconID == 1960)
534 uint32 chance = (*iter)->GetSpellInfo()->GetEffect(
EFFECT_2).CalcValue(unitCaster);
544 for (
uint32 i = 0; i < doses; ++i)
552 if (unitCaster->
HasAura(37169))
562 if (
uint32 combo = player->GetComboPoints())
565 damage += std::lroundf(ap * combo * 0.07f);
568 if (unitCaster->
HasAura(37169))
583 if (unitCaster->
HasAura(57627))
592 for (Unit::AuraEffectList::const_iterator iter = decSpeedList.begin(); iter != decSpeedList.end(); ++iter)
594 if ((*iter)->GetSpellInfo()->SpellIconID == 15 && (*iter)->GetSpellInfo()->Dispel == 0)
616 if (dmg_max == 0.0f && dmg_min > dmg_max)
633 float minTotal = 0.f;
634 float maxTotal = 0.f;
636 float tmpMin, tmpMax;
644 float average = (minTotal + maxTotal) / 2;
678 if (unitCaster && apply_direct_bonus)
721 switch (triggered_spell_id)
730 if (unitCaster->
HasAura(63093))
731 unitCaster->
CastSpell(
nullptr, 65047,
true);
772 if (triggered_spell_id == 0)
782 TC_LOG_ERROR(
"spells.effect.nospell",
"Spell::EffectTriggerSpell spell {} tried to trigger unknown spell {}",
m_spellInfo->
Id, triggered_spell_id);
829 if (triggered_spell_id == 0)
839 TC_LOG_ERROR(
"spells.effect.nospell",
"Spell::EffectTriggerMissileSpell spell {} tried to trigger unknown spell {}.",
m_spellInfo->
Id, triggered_spell_id);
883 if (triggered_spell_id == 0)
894 TC_LOG_ERROR(
"spells.effect.nospell",
"Spell::EffectForceCast of spell {}: triggering unknown spell id {}.",
m_spellInfo->
Id, triggered_spell_id);
917 switch (spellInfo->
Id)
938 if (triggered_spell_id == 0)
948 TC_LOG_ERROR(
"spells.effect.nospell",
"EffectTriggerRitualOfSummoning of spell {}: triggering unknown spell id {}.",
m_spellInfo->
Id, triggered_spell_id);
963 runSpeed *= creature->GetCreatureTemplate()->speed_run;
965 float multiplier = spellEffectInfo.
Amplitude;
966 if (multiplier <= 0.0f)
969 speedXY = std::min(runSpeed * 3.0f * multiplier, std::max(28.0f, unitCaster->
GetSpeed(
MOVE_RUN) * 4.0f));
971 float duration = dist / speedXY;
972 float durationSqr = duration * duration;
973 float minHeight = spellEffectInfo.
MiscValue ? spellEffectInfo.
MiscValue / 10.0f : 0.5f;
1001 float speedXY, speedZ;
1021 float speedXY, speedZ;
1055 TC_LOG_ERROR(
"spells",
"Spell::EffectTeleportUnits - spellId {} attempted to teleport creature to a different map.",
m_spellInfo->
Id);
1120 float gainMultiplier = 0.f;
1124 int32 const gain =
int32(newDamage * gainMultiplier);
1210 newDamage =
int32(newDamage * dmgMultiplier);
1236 int32 damageAmount = 0;
1239 damageAmount += aurEff->GetAmount();
1243 addhealth += damageAmount;
1251 for (Unit::AuraEffectList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
1254 && (*i)->GetSpellInfo()->SpellFamilyFlags[0] & 0x50)
1270 int32 tickcount = 0;
1278 addhealth += tickheal * tickcount;
1281 if (!unitCaster->
HasAura(54824))
1364 if (unitCaster && unitCaster->
IsAlive())
1381 uint32 newitemid = itemId;
1419 float perfectCreateChance = 0.0f;
1421 uint32 perfectItemType = itemId;
1425 newitemid = perfectItemType;
1434 float additionalCreateChance=0.0f;
1436 uint8 additionalMaxNum=0;
1440 while (
roll_chance_f(additionalCreateChance) && items_count <= additionalMaxNum)
1444 num_to_add *= items_count;
1456 num_to_add -= no_space;
1482 player->
SendNewItem(pItem, num_to_add,
true, bgType == 0);
1569 float radius = 0.0f;
1574 radius = std::max(radius, spellEffectInfo.
CalcRadius(unitCaster));
1628 int32 level_multiplier = 0;
1629 int32 level_diff = 0;
1633 level_diff = unitCaster->
GetLevel() - 40;
1634 level_multiplier = 2;
1637 level_diff = unitCaster->
GetLevel() - 60;
1638 level_multiplier = 10;
1641 level_diff = unitCaster->
GetLevel() - 60;
1642 level_multiplier = 4;
1667 damage -= level_multiplier * level_diff;
1714 TC_LOG_ERROR(
"entities.player.cheat",
"Possible hacking attempt: Player {} {} tried to loot a gameobject {} which is on respawn timer without being in GM mode!",
1777 TC_LOG_DEBUG(
"spells",
"WORLD: Open Lock - No Player Caster!");
1837 TC_LOG_DEBUG(
"spells",
"WORLD: Open Lock - No GameObject/Item Target!");
1842 int32 reqSkillValue = 0;
1939 player->
StoreItem(dest, pNewItem,
true);
1960 player->
BankItem(dest, pNewItem,
true);
1984 player->
EquipItem(dest, pNewItem,
true);
2056 switch (properties->
ID)
2086 if (properties->
Flags & 512)
2092 switch (properties->
Title)
2117 if (!summon || !summon->
IsTotem())
2151 for (
uint32 count = 0; count < numSummons; ++count)
2206 spellId = spellInfo->
Id;
2215 unitCaster->
CastSpell(summon, spellId, args);
2257 player->
LearnSpell(itemEffect.SpellID,
false);
2282 if (dispelList.empty())
2285 size_t remaining = dispelList.size();
2290 successList.reserve(
damage);
2294 for (
int32 count = 0; count < damage && remaining > 0;)
2297 auto itr = dispelList.begin();
2298 std::advance(itr,
urand(0, remaining - 1));
2300 if (itr->RollDispel())
2302 auto successItr = std::find_if(successList.begin(), successList.end(), [&itr](
DispelableAura& dispelAura) ->
bool
2304 if (dispelAura.GetAura()->GetId() == itr->GetAura()->GetId() && dispelAura.GetAura()->GetCaster() == itr->GetAura()->GetCaster())
2310 if (successItr == successList.end())
2311 successList.emplace_back(itr->GetAura(), 0, 1);
2313 successItr->IncrementCharges();
2315 if (!itr->DecrementCharge())
2318 std::swap(*itr, dispelList[remaining]);
2331 dataFail <<
uint32(itr->GetAura()->GetId());
2339 if (successList.empty())
2347 dataSuccess <<
uint8(0);
2348 dataSuccess <<
uint32(successList.size());
2349 for (DispelChargesList::iterator itr = successList.begin(); itr != successList.end(); ++itr)
2352 dataSuccess <<
uint32(itr->GetAura()->GetId());
2353 dataSuccess <<
uint8(0);
2573 sLog->OutCommand(player->
GetSession()->
GetAccountId(),
"GM {} (Account: {}) enchanting(perm): {} (Entry: {}) for player: {} (Account: {})",
2614 bool add_socket =
false;
2625 TC_LOG_ERROR(
"spells",
"Spell::EffectEnchantItemPrismatic: attempt to apply the enchant spell {} with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC ({}), but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET ({}), not supported yet.",
2638 sLog->OutCommand(player->
GetSession()->
GetAccountId(),
"GM {} (Account: {}) enchanting(perm): {} (Entry: {}) for player: {} (Account: {})",
2678 case 2: spell_id = 36744;
break;
2680 case 4: spell_id = 36753;
break;
2681 case 5: spell_id = 36751;
break;
2683 case 6: spell_id = 36754;
break;
2684 case 7: spell_id = 36755;
break;
2686 case 9: spell_id = 36761;
break;
2687 case 10: spell_id = 36758;
break;
2688 case 11: spell_id = 36760;
break;
2690 TC_LOG_ERROR(
"spells",
"Spell::EffectEnchantItemTmp: Damage {} not handled in S'RW.",
damage);
2697 TC_LOG_ERROR(
"spells",
"Spell::EffectEnchantItemTmp: unknown spell id {}", spell_id);
2769 sLog->OutCommand(player->
GetSession()->
GetAccountId(),
"GM {} (Account: {}) enchanting(temp): {} (Entry: {}) for player: {} (Account: {})",
2801 if (creatureTarget->
IsPet())
2850 if (!owner && unitCaster->
IsTotem())
2869 if (petentry == 0 || OldSummon->
GetEntry() == petentry)
2922 std::string new_name =
sObjectMgr->GeneratePetName(petentry);
2923 if (!new_name.empty())
2947 if (!learn_spellproto)
3025 float totalDamagePercentMod = 1.0f;
3026 int32 fixed_bonus = 0;
3027 int32 spell_bonus = 0;
3038 if (unitCaster->
HasAura(58388))
3068 totalDamagePercentMod *= 1.5f;
3081 for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
3083 if (itr->second->GetBase()->GetSpellInfo()->Dispel ==
DISPEL_POISON)
3092 totalDamagePercentMod *= 1.2f;
3111 unitCaster->
CastSpell(
nullptr, 38430, aurEff);
3124 AddPct(totalDamagePercentMod, rendAndTear->GetAmount());
3142 AddPct(totalDamagePercentMod, aurEff->GetAmount());
3151 AddPct(bonusPct, aurEff->GetAmount());
3152 AddPct(totalDamagePercentMod, bonusPct);
3157 AddPct(totalDamagePercentMod, 20);
3166 AddPct(totalDamagePercentMod, runic);
3172 bool consumeDiseases =
true;
3177 consumeDiseases =
false;
3182 AddPct(bonusPct, aurEff->GetAmount());
3183 AddPct(totalDamagePercentMod, bonusPct);
3198 AddPct(bonusPct, aurEff->GetAmount());
3200 AddPct(totalDamagePercentMod, bonusPct);
3207 bool normalized =
false;
3208 float weaponDamagePercentMod = 1.0f;
3211 switch (spellEffectInfo.Effect)
3245 fixed_bonus =
int32(fixed_bonus * weapon_total_pct);
3247 spell_bonus =
int32(spell_bonus * weapon_total_pct);
3257 switch (spellEffectInfo.Effect)
3262 weaponDamage += fixed_bonus;
3265 weaponDamage =
int32(weaponDamage * weaponDamagePercentMod);
3272 weaponDamage += spell_bonus;
3273 weaponDamage =
int32(weaponDamage * totalDamagePercentMod);
3280 weaponDamage = std::max(weaponDamage, 0);
3293 if (!unitCaster || !unitCaster->
IsAlive())
3317 int32 addhealth = 0;
3343 SpellInfo const* curSpellInfo = spell->m_spellInfo;
3391 if (!pGameObj->
Create(map->
GenerateLowGuid<
HighGuid::GameObject>(), gameobject_id, map,
m_caster->
GetPhaseMask(),
Position(x, y, z, target->
GetOrientation()), rot, 255,
GO_STATE_READY))
3414 linkedTrap->SetRespawnTime(duration > 0 ? duration /
IN_MILLISECONDS : 0);
3470 Item* item =
nullptr;
3475 if (item && item->
GetEntry() == 38587)
3513 for (
uint8 i = 0; i < 15; ++i)
3553 unitCaster->
CastSpell(parent, 62496,
true);
3583 pair.second->ScaleThreat(0.0f);
3676 caster->
duel = std::make_unique<DuelInfo>(target, caster, isMounted);
3677 target->
duel = std::make_unique<DuelInfo>(caster, caster, isMounted);
3682 sScriptMgr->OnPlayerDuelRequest(target, caster);
3774 switch (
m_misc.GlyphSlot)
3777 case 1: minLevel = 15;
break;
3778 case 2: minLevel = 50;
break;
3779 case 3: minLevel = 30;
break;
3780 case 4: minLevel = 70;
break;
3781 case 5: minLevel = 80;
break;
3783 if (minLevel && player->
GetLevel() < minLevel)
3796 if (newGlyphProperties->GlyphSlotFlags != newGlyphSlot->Type)
3813 player->
CastSpell(player, newGlyphProperties->SpellID,
true);
3903 if (drunkMod >
static_cast<int32>(100 - currentDrunk))
3905 else if (drunkMod <
static_cast<int32>(0 - currentDrunk))
3908 currentDrunk += drunkMod;
3912 if (currentDrunk == 100 && drunkMod > 0 &&
roll_chance_i(25))
3913 player->
CastSpell(player, 67468,
false);
4001 if (!go->
Create(map->
GenerateLowGuid<
HighGuid::GameObject>(), go_id, map, unitCaster->
GetPhaseMask(),
Position(x, y, z, unitCaster->
GetOrientation()), rot, 255,
GO_STATE_READY))
4029 Player* player =
nullptr;
4163 data << unitCaster->
GetGUID();
4169 for (Unit::AttackerSet::const_iterator itr = unitCaster->
getAttackers().begin(); itr != unitCaster->
getAttackers().end(); ++itr)
4170 if ((*itr)->GetTypeId() ==
TYPEID_UNIT && !(*itr)->CanHaveThreatList())
4171 attackerSet.insert(*itr);
4173 for (Unit::AttackerSet::const_iterator itr = attackerSet.begin(); itr != attackerSet.end(); ++itr)
4174 (*itr)->AttackStop();
4234 int32 const reqValue = targetLevel < 10 ? 0 : (targetLevel < 20 ? (targetLevel - 10) * 10 : targetLevel * 5);
4310 if (creatureTarget->isWorldBoss() || creatureTarget->IsDungeonBoss())
4319 float speedz = float(
damage) * ratio;
4320 if (speedxy < 0.01f && speedz < 0.01f)
4346 float speedz =
damage/ 10.f;
4379 if (logQuest == quest_id)
4397 sScriptMgr->OnQuestStatusChange(player, quest_id);
4430 float speedZ = (2 * speedXY * speedXY * distZ +
Movement::gravity * distXY * distXY) / (2 * speedXY * distXY);
4432 if (!std::isfinite(speedZ))
4466 float speedZ = (2 * speedXY * speedXY * distZ +
Movement::gravity * distXY * distXY) / (2 * speedXY * distXY);
4468 if (!std::isfinite(speedZ))
4488 for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
4490 Aura* aura = itr->second;
4498 for (
auto itr = dispel_list.begin(); itr != dispel_list.end(); ++itr)
4580 if (totem && totem->
IsTotem())
4597 unitCaster->
CastSpell(unitCaster, 39104, args);
4684 TC_LOG_ERROR(
"sql.sql",
"Gameobject (Entry: {}) does not exist and is not created by spell (ID: {}) cast.", name_id,
m_spellInfo->
Id);
4703 float dis = (float)
rand_norm() * (max_dis - min_dis) + min_dis;
4724 switch (goinfo->
type)
4734 switch (
urand(0, 2))
4736 case 0: lastSec = 3;
break;
4737 case 1: lastSec = 7;
break;
4738 case 2: lastSec = 13;
break;
4772 TC_LOG_DEBUG(
"spells",
"AddObject at SpellEfects.cpp EffectTransmitted");
4780 linkedTrap->SetRespawnTime(duration > 0 ? duration/
IN_MILLISECONDS : 0);
4783 linkedTrap->SetOwnerGUID(unitCaster->
GetGUID());
4879 Player* target =
nullptr;
4885 if (!player || !target || target->
IsAlive())
4906 for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
4908 Aura* aura = itr->second;
4930 stealList.emplace_back(aura, chance, charges);
4934 if (stealList.empty())
4937 size_t remaining = stealList.size();
4942 successList.reserve(
damage);
4946 for (
int32 count = 0; count < damage && remaining > 0;)
4949 DispelChargesList::iterator itr = stealList.begin();
4950 std::advance(itr,
urand(0, remaining - 1));
4952 if (itr->RollDispel())
4954 successList.emplace_back(itr->GetAura()->GetId(), itr->GetAura()->GetCasterGUID());
4955 if (!itr->DecrementCharge())
4958 std::swap(*itr, stealList[remaining]);
4971 dataFail <<
uint32(itr->GetAura()->GetId());
4979 if (successList.empty())
4986 dataSuccess <<
uint8(0);
4987 dataSuccess <<
uint32(successList.size());
4988 for (
auto itr = successList.begin(); itr != successList.end(); ++itr)
4990 dataSuccess <<
uint32(itr->first);
4991 dataSuccess <<
uint8(0);
5020 creatureEntry = 24008;
5055 if (quest->IsAutoAccept() && player->
CanAddQuest(quest,
false))
5082 for (
uint32 j = 0; j < MAX_RUNES && count > 0; ++j)
5184 if (!targetFaction || (casterFaction && !casterFaction->
IsFriendlyTo(*targetFaction)))
5227 level = skill202 / 5;
5229 float radius = 5.0f;
5237 for (
uint32 count = 0; count < numGuardians; ++count)
5251 ((
Guardian*)summon)->InitStatsForLevel(level);
5383 for (; n_buttons; --n_buttons, ++button_id)
5440 pItem->SetSpellCharges(x, pProto->
Effects[x].Charges);
5469 TC_LOG_DEBUG(
"spells",
"EffectBind: New homebind X: {}, Y: {}, Z: {}, MapId: {}, AreaId: {}",
@ ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET
@ SUMMON_PROP_FLAG_PERSONAL_SPAWN
#define MAX_SPELL_EFFECTS
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
SkillRaceClassInfoEntry const * GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_)
DBCStorage< GlyphSlotEntry > sGlyphSlotStore(GlyphSlotfmt)
DBCStorage< SummonPropertiesEntry > sSummonPropertiesStore(SummonPropertiesfmt)
DBCStorage< SkillTiersEntry > sSkillTiersStore(SkillTiersfmt)
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
DBCStorage< FactionTemplateEntry > sFactionTemplateStore(FactionTemplateEntryfmt)
DBCStorage< TaxiNodesEntry > sTaxiNodesStore(TaxiNodesEntryfmt)
DBCStorage< GlyphPropertiesEntry > sGlyphPropertiesStore(GlyphPropertiesfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
#define MAX_VEHICLE_SEATS
#define MAX_ITEM_ENCHANTMENT_EFFECTS
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
@ DYNAMIC_OBJECT_FARSIGHT_FOCUS
@ DYNAMIC_OBJECT_AREA_SPELL
#define FISHING_BOBBER_READY_TIME
@ PRISMATIC_ENCHANTMENT_SLOT
@ EQUIP_ERR_CLIENT_LOCKED_OUT
@ EQUIP_ERR_ITEM_NOT_FOUND
@ EQUIP_ERR_ITEM_MAX_COUNT
int32 GenerateItemRandomPropertyId(uint32 item_id)
@ ITEM_SUBCLASS_WEAPON_DAGGER
@ ITEM_FIELD_FLAG_UNLOCKED
@ ITEM_SPELLTRIGGER_LEARN_SPELL_ID
@ ITEM_FLAG_NO_REAGENT_COST
@ ITEM_FLAG_IS_PROSPECTABLE
#define MAX_ITEM_PROTO_DAMAGES
#define TC_LOG_WARN(filterType__,...)
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_ERROR(filterType__,...)
LootStore LootTemplates_Spell("spell_loot_template", "spell id (random item creating)", false)
@ TEMPSUMMON_DEAD_DESPAWN
@ TEMPSUMMON_TIMED_DESPAWN
#define DEFAULT_PLAYER_BOUNDING_RADIUS
ScriptMapMap sEventScripts
@ EQUIPMENT_SLOT_MAINHAND
std::vector< ItemPosCount > ItemPosCountVec
#define INVENTORY_SLOT_BAG_0
@ REPUTATION_SOURCE_SPELL
#define MAX_QUEST_LOG_SIZE
int32 irand(int32 min, int32 max)
uint32 urand(uint32 min, uint32 max)
bool roll_chance_f(float chance)
bool roll_chance_i(int chance)
@ GAMEOBJECT_TYPE_SPELL_FOCUS
@ GAMEOBJECT_TYPE_DUEL_ARBITER
@ GAMEOBJECT_TYPE_FISHINGHOLE
@ GAMEOBJECT_TYPE_FLAGDROP
@ GAMEOBJECT_TYPE_QUESTGIVER
@ GAMEOBJECT_TYPE_FLAGSTAND
@ GAMEOBJECT_TYPE_FISHINGNODE
@ SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER
@ SPELL_ATTR7_DISPEL_CHARGES
@ SPELL_ATTR7_SUMMON_PLAYER_TOTEM
@ SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE
@ SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE
@ SPELL_EFFECT_SUMMON_OBJECT_SLOT1
@ SPELL_EFFECT_WEAPON_DAMAGE
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
@ SPELL_EFFECT_TRIGGER_SPELL
@ SPELL_EFFECT_WEAPON_PERCENT_DAMAGE
@ SPELL_EFFECT_KNOCK_BACK_DEST
@ SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
@ SPELL_EFFECT_FORCE_CAST
@ SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC
@ SPELL_EFFECT_FORCE_CAST_WITH_VALUE
@ SPELL_PREVENTION_TYPE_SILENCE
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_DAMAGE_CLASS_MAGIC
@ SPELL_DAMAGE_CLASS_MELEE
#define MAX_GLYPH_SLOT_INDEX
@ SPELLFAMILY_DEATHKNIGHT
GameObjectDestructibleState
uint32 const CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD
@ AURA_STATE_DEADLY_POISON
@ SPELL_FAILED_INTERRUPTED_COMBAT
@ SPELL_FAILED_GLYPH_SOCKET_LOCKED
@ SPELL_FAILED_DONT_REPORT
@ SPELL_FAILED_NO_DUELING
@ SPELL_FAILED_INVALID_GLYPH
@ SPELL_ATTR4_NOT_STEALABLE
@ SUMMON_CATEGORY_VEHICLE
@ SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS
@ AURA_REMOVE_BY_ENEMY_SPELL
@ SPELL_AURA_PREVENT_RESURRECTION
@ SPELL_AURA_MOD_AURA_DURATION_BY_DISPEL_NOT_STACK
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_ADD_FLAT_MODIFIER
@ SPELL_AURA_CONTROL_VEHICLE
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_MOD_DECREASE_SPEED
@ SPELL_INTERRUPT_FLAG_INTERRUPT
@ CHANNEL_INTERRUPT_FLAG_INTERRUPT
@ TARGET_FLAG_DEST_LOCATION
@ TARGET_FLAG_GAMEOBJECT_MASK
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD
Will ignore GCD.
@ TRIGGERED_CAST_DIRECTLY
Will ignore combo point requirement.
@ TRIGGERED_IGNORE_CAST_IN_PROGRESS
Will ignore aura scaling.
@ TRIGGERED_IGNORE_GCD
Not triggered.
SpellEffectHandlerFn SpellEffectHandlers[TOTAL_SPELL_EFFECTS]
@ SPELL_ATTR0_CU_SHARE_DAMAGE
@ PROC_SPELL_TYPE_MASK_ALL
@ PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS
@ PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG
@ PROC_FLAG_TAKEN_SPELL_MELEE_DMG_CLASS
@ PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG
std::vector< std::pair< uint32, ObjectGuid > > DispelList
void(Spell::*)() SpellEffectHandlerFn
@ SPELL_EFFECT_HANDLE_LAUNCH_TARGET
@ SPELL_EFFECT_HANDLE_LAUNCH
@ SPELL_EFFECT_HANDLE_HIT
@ SPELL_EFFECT_HANDLE_HIT_TARGET
@ UNIT_PET_FLAG_CAN_BE_RENAMED
NPCFlags
Non Player Character flags.
float baseMoveSpeed[MAX_MOVE_TYPE]
float playerBaseMoveSpeed[MAX_MOVE_TYPE]
@ UNIT_MOD_DAMAGE_OFFHAND
@ UNIT_MOD_DAMAGE_MAINHAND
#define CURRENT_FIRST_NON_MELEE_SPELL
@ CURRENT_CHANNELED_SPELL
@ CURRENT_AUTOREPEAT_SPELL
@ UNIT_STATE_ALL_ERASABLE
std::vector< DispelableAura > DispelChargesList
@ PLAYER_VISIBLE_ITEM_16_ENTRYID
@ ITEM_FIELD_MAXDURABILITY
T ApplyPct(T &base, U pct)
T CalculatePct(T base, U pct)
@ VEHICLE_SPELL_RIDE_HARDCODED
void UpdateApplyEffectMask(uint8 newEffMask, bool canHandleNewEffects)
uint8 GetEffectsToApply() const
SpellInfo const * GetSpellInfo() const
ObjectGuid GetCasterGUID() const
static Aura * TryCreate(AuraCreateInfo &createInfo)
AuraApplication const * GetApplicationOfTarget(ObjectGuid guid) const
DynamicObject * GetDynobjOwner() const
void _RegisterForTargets()
ObjectGuid GetCasterGUID() const
int32 CalcDispelChance(Unit const *auraTarget, bool offensive) const
int32 GetDuration() const
DynObjAura * ToDynObjAura()
uint8 GetStackAmount() const
void _ApplyEffectForTargets(uint8 effIndex)
SpellInfo const * GetSpellInfo() const
ObjectGuid GetOwnerGUID() const override
void SetDisplayId(uint32 modelId) override
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
CreatureTemplate const * GetCreatureTemplate() const
void SetImmuneToAll(bool apply) override
void SetCasterViewpoint()
void SetDuration(int32 newDuration)
bool CreateDynamicObject(ObjectGuid::LowType guidlow, Unit *caster, SpellInfo const *spell, Position const &pos, float radius, DynamicObjectType type)
virtual bool OnGossipHello(Player *)
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
GameObjectTemplate const * GetGOInfo() const
uint32 GetFaction() const override
void SetOwnerGUID(ObjectGuid owner)
void SetDestructibleState(GameObjectDestructibleState state, WorldObject *attackerOrHealer=nullptr, bool setHealth=false)
void AddToSkillupList(ObjectGuid const &PlayerGuidLow)
void SetLootState(LootState s, Unit *unit=nullptr)
GameObjectAI * AI() const
GameObject * GetLinkedTrap()
void SetRespawnTime(int32 respawn)
bool IsInSkillupList(ObjectGuid const &playerGuid) const
void TriggeringLinkedGameObject(uint32 trapEntry, Unit *target)
GameobjectTypes GetGoType() const
ObjectGuid::LowType GetSpawnId() const
void ActivateObject(GameObjectActions action, WorldObject *spellCaster=nullptr, uint32 spellId=0, int32 effectIndex=-1)
void SetLevel(uint32 level)
void ModifyHealth(int32 change, WorldObject *attackerOrHealer=nullptr, uint32 spellId=0)
void AddUniqueUse(Player *player)
bool Create(ObjectGuid::LowType guidlow, uint32 name_id, Map *map, uint32 phaseMask, Position const &pos, QuaternionData const &rotation, uint32 animprogress, GOState go_state, uint32 artKit=0, bool dynamic=false, ObjectGuid::LowType spawnid=0)
void SetSpellId(uint32 id)
void SetFaction(uint32 faction) override
std::string const & GetNameForLocaleIdx(LocaleConstant locale) const override
void SetState(ItemUpdateState state, Player *forplayer=nullptr)
void SetItemFlag(ItemFieldFlags flags)
uint32 GetEnchantmentId(EnchantmentSlot slot) const
static Item * CreateItem(uint32 itemEntry, uint32 count, Player const *player=nullptr)
uint32 GetEnchantmentDuration(EnchantmentSlot slot) const
void SetCount(uint32 value)
ItemTemplate const * GetTemplate() const
bool IsWeaponVellum() const
bool IsArmorVellum() const
Player * GetOwner() const
ObjectGuid GetOwnerGUID() const
void SetCreator(ObjectGuid guid)
uint32 GetEnchantmentCharges(EnchantmentSlot slot) const
void ClearSoulboundTradeable(Player *currentOwner)
void SetEnchantment(EnchantmentSlot slot, uint32 id, uint32 duration, uint32 charges, ObjectGuid caster=ObjectGuid::Empty)
void ScriptsStart(std::map< uint32, std::multimap< uint32, ScriptInfo > > const &scripts, uint32 id, Object *source, Object *target)
Put scripts in the execution queue.
ObjectGuid::LowType GenerateLowGuid()
GameObject * GetGameObject(ObjectGuid const &guid)
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Creature * GetCreature(ObjectGuid const &guid)
float GetFollowAngle() const override
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false)
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false)
void MoveDistract(uint32 time, float orientation)
std::string ToString() const
static Creature * ToCreature(Object *o)
PackedGuid const & GetPackGUID() const
static Unit * ToUnit(Object *o)
uint32 GetUInt32Value(uint16 index) const
static GameObject * ToGameObject(Object *o)
virtual void SetDynamicFlag(uint32 flag)
void SetGuidValue(uint16 index, ObjectGuid value)
bool HasFlag(uint16 index, uint32 flag) const
static ObjectGuid GetGUID(Object const *o)
void SetUInt32Value(uint16 index, uint32 value)
static Player * ToPlayer(Object *o)
Player * GetOwner() const
void InitTalentForLevel()
void SavePetToDB(PetSaveMode mode)
PetType getPetType() const
bool isControlled() const
void setDeathState(DeathState s) override
void Remove(PetSaveMode mode, bool returnreagent=false)
uint32 GetCurrentFoodBenefitLevel(uint32 itemlevel) const
bool learnSpell(uint32 spell_id)
bool HasIgnore(ObjectGuid const &ignoreGuid)
void SetRuneCooldown(uint8 index, uint32 cooldown, bool casted=false)
void SendEquipError(InventoryResult msg, Item const *item1=nullptr, Item const *item2=nullptr, uint32 itemId=0) const
void KilledMonsterCredit(uint32 entry, ObjectGuid guid=ObjectGuid::Empty)
void SendPlayerBound(ObjectGuid const &binderGuid, uint32 areaId) const
uint32 GetArmorProficiency() const
static bool IsEquipmentPos(uint16 pos)
void LearnSpell(uint32 spell_id, bool dependent, uint32 fromSkill=0)
void SendTalentsInfoData(bool pet)
bool HasPvPForcingQuest() const
uint32 GetNextResetTalentsCost() const
InventoryResult CanEquipItem(uint8 slot, uint16 &dest, Item *pItem, bool swap, bool not_loading=true) const
void SetCanTitanGrip(bool value, uint32 penaltySpellId=0, int32 allowedItemClass=0, int32 allowedItemSubClassMask=0)
Item * StoreNewItem(ItemPosCountVec const &pos, uint32 itemId, bool update, int32 randomPropertyId=0, GuidSet const &allowedLooters=GuidSet())
uint32 EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
uint8 GetDrunkValue() const
void SendDirectMessage(WorldPacket const *data) const
uint16 GetSkillValue(uint32 skill) const
Item * BankItem(ItemPosCountVec const &dest, Item *pItem, bool update)
Item * GetItemByEntry(uint32 entry) const
uint16 FindQuestSlot(uint32 quest_id) const
void SetCanParry(bool value)
InventoryResult CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *pItem, bool swap=false) const
void SendProficiency(ItemClass itemClass, uint32 itemSubclassMask) const
void UpdatePvPState(bool onlyFFA=false)
void DurabilityLossAll(double percent, bool inventory)
bool UpdateCraftSkill(uint32 spellid)
void SetResurrectRequestData(WorldObject const *caster, uint32 health, uint32 mana, uint32 appliedAura)
void SpawnCorpseBones(bool triggerSave=true)
void SetDrunkValue(uint8 newDrunkValue, uint32 itemId=0)
void SendPreparedGossip(WorldObject *source)
void UpdateTalentGroupCount(uint8 count)
void ActivateTalentGroup(uint8 group)
uint32 GetGlyphSlot(uint8 slot) const
void PetSpellInitialize()
void SetFallInformation(uint32 time, float z)
void ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool apply_dur=true, bool ignore_condition=false)
bool CanAddQuest(Quest const *quest, bool msg) const
void SetSkill(uint32 id, uint16 step, uint16 newVal, uint16 maxVal)
uint16 GetPureSkillValue(uint32 skill) const
uint8 GetRunesState() const
void RemoveTradeableItem(Item *item)
void SetCanBlock(bool value)
bool GetCommandStatus(uint32 command) const
Item * StoreItem(ItemPosCountVec const &pos, Item *pItem, bool update)
WorldSession * GetSession() const
Item * GetItemByPos(uint16 pos) const
void SendBindPointUpdate()
uint32 GetQuestSlotQuestId(uint16 slot) const
void DestroyItem(uint8 bag, uint8 slot, bool update)
bool IsResurrectRequested() const
static bool IsInventoryPos(uint16 pos)
uint32 DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check=false)
void RemovePet(Pet *pet, PetSaveMode mode, bool returnreagent=false)
int32 CalculateReputationGain(ReputationSource source, uint32 creatureOrQuestLevel, int32 rep, int32 faction, bool noQuestBonus=false)
uint32 GetRuneCooldown(uint8 index) const
void SendLoot(ObjectGuid guid, LootType loot_type)
bool ActivateTaxiPathTo(std::vector< uint32 > const &nodes, Creature *npc=nullptr, uint32 spellid=0)
ActionButton const * GetActionButton(uint8 button)
void DurabilityLoss(Item *item, double percent)
uint32 GetWeaponProficiency() const
Battleground * GetBattleground() const
void SetQuestSlot(uint16 slot, uint32 quest_id, uint32 timer=0)
void RemoveSpell(uint32 spell_id, bool disabled=false, bool learn_low_rank=true)
void SetRewardedQuest(uint32 quest_id)
void SendNewItem(Item *item, uint32 count, bool received, bool created, bool broadcast=false, bool sendChatMessage=true)
void AutoUnequipOffhandIfNeed(bool force=false)
void AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const &store, bool broadcast=false, bool createdByPlayer=false)
RuneType GetCurrentRune(uint8 index) const
bool IsGameMaster() const
Item * EquipItem(uint16 pos, Item *pItem, bool update)
void SetGlyph(uint8 slot, uint32 glyph)
void AddQuestAndCheckCompletion(Quest const *quest, Object *questGiver)
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options=0)
void DurabilityPointsLossAll(int32 points, bool inventory)
Pet * SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, uint32 despwtime)
bool CanTakeQuest(Quest const *quest, bool msg) const
uint8 GetActiveTalentGroup() const
void SendSummonRequestFrom(Unit *summoner)
void AreaExploredOrEventHappens(uint32 questId)
bool TakeQuestSourceItem(uint32 questId, bool msg)
void RemoveActiveQuest(uint32 questId, bool update=true)
QuestStatus GetQuestStatus(uint32 quest_id) const
uint32 GetGlyph(uint8 group, uint8 slot) const
PlayerSocial * GetSocial()
void AddArmorProficiency(uint32 newflag)
InventoryResult CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *pItem, bool swap, bool not_loading=true) const
void SetHomebind(WorldLocation const &loc, uint32 areaId)
void FailQuest(uint32 quest_id)
void ItemAddedQuestCheck(uint32 entry, uint32 count)
Item * GetWeaponForAttack(WeaponAttackType attackType, bool useable=false) const
static bool IsBankPos(uint16 pos)
bool RewardHonor(Unit *victim, uint32 groupsize, int32 honor=-1, bool pvptoken=false)
void RemoveItem(uint8 bag, uint8 slot, bool update)
bool HasSpell(uint32 spell) const override
void SendRespecWipeConfirm(ObjectGuid const &guid, uint32 cost) const
std::unique_ptr< DuelInfo > duel
void RemoveRewardedQuest(uint32 questId, bool update=true)
void DurabilityPointsLoss(Item *item, int32 points)
void RemovedInsignia(Player *looterPlr)
void AddWeaponProficiency(uint32 newflag)
void PrepareGossipMenu(WorldObject *source, uint32 menuId=0, bool showQuests=false)
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 item, uint32 count, uint32 *no_space_count=nullptr) const
RuneType GetBaseRune(uint8 index) const
ReputationMgr & GetReputationMgr()
PlayerMenu * PlayerTalkClass
void AddPetAura(PetAura const *petSpell)
void RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject *pRewardSource)
void ResurrectPlayer(float restore_percent, bool applySickness=false)
bool UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLevel, uint32 Multiplicator=1)
bool HasFlag(QuestFlags flag) const
bool ModifyReputation(FactionEntry const *factionEntry, int32 standing, bool spillOverOnly=false)
void SetItemTarget(Item *item)
void SetDst(float x, float y, float z, float orientation, uint32 mapId=MAPID_INVALID)
void SetGOTarget(GameObject *target)
ObjectGuid GetObjectTargetGUID() const
void SetUnitTarget(Unit *target)
Item * GetItemTarget() const
Unit * GetUnitTarget() const
WorldLocation const * GetDstPos() const
float CalcRadius(WorldObject *caster=nullptr, Spell *=nullptr) const
float CalcValueMultiplier(WorldObject *caster, Spell *spell=nullptr) const
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
SpellEffIndex EffectIndex
uint32 GetProvidedTargetMask() const
bool HasCooldown(SpellInfo const *spellInfo, uint32 itemId=0, bool ignoreCategoryCooldown=false) const
void LockSpellSchool(SpellSchoolMask schoolMask, uint32 lockoutTime)
uint32 ChannelInterruptFlags
uint32 GetMaxTicks() const
float GetMaxRange(bool positive=false, WorldObject *caster=nullptr, Spell *spell=nullptr) const
uint32 GetCategory() const
bool IsLootCrafting() const
uint32 GetDispelMask() const
bool NeedsToBeTriggeredByCaster(SpellInfo const *triggeringSpell) const
float GetMinRange(bool positive=false) const
std::array< uint32, 2 > SpellVisual
SpellSchoolMask GetSchoolMask() const
bool HasAttribute(SpellAttr0 attribute) const
int32 CalcPowerCost(WorldObject const *caster, SpellSchoolMask schoolMask, Spell *spell=nullptr) const
int32 GetDuration() const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
uint32 ManaCostPercentage
int32 EquippedItemSubClassMask
uint32 GetExplicitTargetMask() const
uint32 GetAllEffectsMechanicMask() const
bool HasAura(AuraType aura) const
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > const & GetEffects() const
void EffectSummonRaFFriend()
SpellInfo const * GetSpellInfo() const
GameObject * gameObjTarget
SpellMissInfo targetMissInfo
void EffectEnchantHeldItem()
void EffectActivateRune()
void EffectHealMaxHealth()
void EffectSummonObject()
void EffectTameCreature()
void EffectGameObjectDamage()
SpellCastTargets m_targets
void EffectSummonChangeItem()
std::unique_ptr< PathGenerator > m_preGeneratedPath
void EffectStealBeneficialBuff()
void EffectInterruptCast()
void EffectSummonPlayer()
void EffectEnchantItemPrismatic()
void EffectSkinPlayerCorpse()
void ExecuteLogEffectSummonObject(uint8 effIndex, WorldObject *obj)
SpellEffectHandleMode effectHandleMode
void EffectHealMechanical()
void EffectGameObjectRepair()
void EffectSummonObjectWild()
void EffectActivateObject()
void EffectPersistentAA()
void EffectModifyThreatPercent()
void EffectForceDeselect()
void AddComboPointGain(Unit *target, int8 amount)
void EffectDestroyAllTotems()
WeaponAttackType m_attackType
void EffectResurrectPet()
void EffectTriggerSpell()
ObjectGuid m_originalCasterGUID
WorldObject *const m_caster
std::string GetDebugInfo() const
void EffectDurabilityDamage()
void ExecuteLogEffectOpenLock(uint8 effIndex, Object *obj)
void ExecuteLogEffectTakeTargetPower(uint8 effIndex, Unit *target, uint32 powerType, uint32 powerTaken, float gainMultiplier)
void DoCreateItem(uint32 itemId)
void EffectDispelMechanic()
void EffectSelfResurrect()
void EffectRechargeManaGem()
void EffectTriggerRitualOfSummoning()
void CalculateJumpSpeeds(SpellEffectInfo const &spellEffectInfo, float dist, float &speedXY, float &speedZ)
void EffectEnvironmentalDMG()
void EffectRedirectThreat()
void EffectAddComboPoints()
SpellEffectInfo const * effectInfo
Unit * GetUnitCasterForEffectHandlers() const
void EffectAddExtraAttacks()
void EffectTriggerMissileSpell()
void EffectEnchantItemTmp()
SpellSchoolMask m_spellSchoolMask
void EffectCreateRandomItem()
void EffectTeleUnitsFaceCaster()
void ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject *obj)
void EffectPullTowardsDest()
void EffectKillCreditPersonal()
void ExecuteLogEffectInterruptCast(uint8 effIndex, Unit *victim, uint32 spellId)
SpellCastResult prepare(SpellCastTargets const &targets, AuraEffect const *triggeredByAura=nullptr)
void ExecuteLogEffectResurrect(uint8 effIndex, Unit *target)
void SendLoot(ObjectGuid guid, LootType loottype)
void SummonGuardian(SpellEffectInfo const &spellEffectInfo, uint32 entry, SummonPropertiesEntry const *properties, uint32 numSummons)
void EffectResurrectNew()
void EffectUntrainTalents()
void ExecuteLogEffectCreateItem(uint8 effIndex, uint32 entry)
void EffectScriptEffect()
WorldLocation * destTarget
void EffectGameObjectSetDestructionState()
SpellCastResult CanOpenLock(SpellEffectInfo const &spellEffectInfo, uint32 lockid, SkillType &skillid, int32 &reqSkillValue, int32 &skillValue)
void EffectQuestComplete()
void ExecuteLogEffectDestroyItem(uint8 effIndex, uint32 entry)
void EffectDiscoverTaxi()
void EffectTeleportUnits()
void EffectLearnPetSpell()
void CallScriptSuccessfulDispel(SpellEffIndex effIndex)
void EffectDurabilityDamagePCT()
SpellValue *const m_spellValue
void SendResurrectRequest(Player *target)
void EffectActivateSpec()
void EffectEnchantItemPerm()
void EffectCreateTamedPet()
void ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit *victim, int32 itemId, int32 slot)
ObjectGuid m_castItemGUID
int64 GetUnitTargetCountForEffect(SpellEffIndex effect) const
void ExecuteLogEffectExtraAttacks(uint8 effIndex, Unit *victim, uint32 attCount)
void finish(bool ok=true)
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, uint32 *param1=nullptr, uint32 *param2=nullptr)
SpellInfo const *const m_spellInfo
void EffectUnlearnSpecialization()
int32 CalculateDamage(SpellEffectInfo const &spellEffectInfo) const
virtual void UnSummon(uint32 msTime=0)
void ModifyThreatByPercent(Unit *target, int32 percent)
Unit * GetCurrentVictim()
auto const & GetThreatenedByMeList() const
bool IsThreatListEmpty(bool includeOffline=false) const
void AddThreat(Unit *target, float amount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false, bool ignoreRedirects=false)
== AFFECT MY THREAT LIST ==
void RegisterRedirectThreat(uint32 spellId, ObjectGuid const &victim, uint32 pct)
== REDIRECT SYSTEM ==
void MatchUnitThreatToHighestThreat(Unit *target)
void UnSummon(uint32 msTime=0) override
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true)
float GetPctModifierValue(UnitMods unitMod, UnitModifierPctType modifierType) const
void ClearUnitState(uint32 f)
void ReplaceAllDynamicFlags(uint32 flag) override
void SetMinion(Minion *minion, bool apply)
uint32 SpellHealingBonusTaken(Unit *caster, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype) const
int32 ModifyPower(Powers power, int32 val, bool withPowerUpdate=true)
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void JumpTo(float speedXY, float speedZ, bool forward=true, Optional< Position > dest={})
void RemoveGameObject(GameObject *gameObj, bool del)
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
uint32 m_lastSanctuaryTime
void SetChannelObjectGuid(ObjectGuid guid)
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
bool CanHaveThreatList() const
====================== THREAT & COMBAT ====================
float GetSpeed(UnitMoveType mtype) const
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
ThreatManager & GetThreatManager()
virtual void SetCanDualWield(bool value)
uint32 MeleeDamageBonusTaken(Unit *attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const *spellProto=nullptr, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL)
std::multimap< uint32, AuraApplication * > AuraApplicationMap
ShapeshiftForm GetShapeshiftForm() const
void SetFaction(uint32 faction) override
void RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId, ObjectGuid casterGUID, WorldObject *dispeller, uint8 chargesRemoved=1)
uint32 SpellHealingBonusDone(Unit *victim, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, SpellEffectInfo const &spellEffectInfo, Optional< float > const &donePctTotal, uint32 stack=1) const
Pet * CreateTamedPetFrom(Creature *creatureTarget, uint32 spell_id=0)
static void CalcAbsorbResist(DamageInfo &damageInfo, Spell *spell=nullptr)
Unit * GetVehicleBase() const
MotionMaster * GetMotionMaster()
Powers GetPowerType() const
bool HasUnitFlag(UnitFlags flags) const
void SetCreatedBySpell(int32 spellId)
uint32 GetMaxHealth() const
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
ObjectGuid m_ObjectSlot[MAX_GAMEOBJECT_SLOT]
uint32 GetSpellCritDamageReduction(uint32 damage) const
AuraEffect * IsScriptOverriden(SpellInfo const *spell, int32 script) const
float GetCombatReach() const override
int32 HealBySpell(HealInfo &healInfo, bool critical=false)
void SetHealth(uint32 val)
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage const *log)
void SetPetFlag(UnitPetFlag flags)
TempSummon * ToTempSummon()
CharmInfo * GetCharmInfo()
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, uint8 itemDamagesMask=0) const
void SetVirtualItem(uint32 slot, uint32 itemId)
uint32 SpellDamageBonusDone(Unit *victim, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, SpellEffectInfo const &spellEffectInfo, Optional< float > const &donePctTotal, uint32 stack=1) const
uint32 GetDiseasesByCaster(ObjectGuid casterGUID, bool remove=false)
void AddGameObject(GameObject *gameObj)
virtual bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, SpellEffectInfo const &spellEffectInfo, WorldObject const *caster, bool requireImmunityPurgesEffectAttribute=false) const
int32 GetHealthGain(int32 dVal)
bool Attack(Unit *victim, bool meleeAttack)
static void ProcSkillsAndAuras(Unit *actor, Unit *actionTarget, uint32 typeMaskActor, uint32 typeMaskActionTarget, uint32 spellTypeMask, uint32 spellPhaseMask, uint32 hitMask, Spell *spell, DamageInfo *damageInfo, HealInfo *healInfo)
AuraApplication * _CreateAuraApplication(Aura *aura, uint8 effMask)
uint32 GetMaxPower(Powers power) const
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true, SpellCastResult result=SPELL_FAILED_INTERRUPTED, Optional< SpellCastResult > resultOther={})
uint32 GetFaction() const override
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool force=false)
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
void GetDispellableAuraList(WorldObject const *caster, uint32 dispelMask, DispelChargesList &dispelList, bool isReflect=false) const
AttackerSet const & getAttackers() const
std::multimap< uint32, Aura * > AuraMap
virtual uint32 GetShieldBlockValue() const =0
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool HasAuraType(AuraType auraType) const
void NearTeleportTo(Position const &pos, bool casting=false)
uint32 GetAttackTime(WeaponAttackType att) const
void RemoveAurasDueToSpellBySteal(uint32 spellId, ObjectGuid casterGUID, WorldObject *stealer)
std::set< Unit * > AttackerSet
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void AddExtraAttacks(uint32 count)
void EnergizeBySpell(Unit *victim, uint32 spellId, int32 damage, Powers powerType)
void SetOwnerGUID(ObjectGuid owner)
bool HasUnitState(const uint32 f) const
uint32 HasUnitTypeMask(uint32 mask) const
uint8 GetComboPoints(Unit const *who=nullptr) const
--------—Combo point system----------------—
uint32 CountPctFromMaxHealth(int32 pct) const
virtual void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float &minDamage, float &maxDamage, uint8 damageIndex) const =0
SpellHistory * GetSpellHistory()
bool IsControlledByPlayer() const
AuraEffect * GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const
void SetMaxHealth(uint32 val)
void SetCreatorGUID(ObjectGuid creator)
uint32 GetPower(Powers power) const
void CombatStop(bool includingCast=false, bool mutualPvP=true)
uint32 GetCreatureTypeMask() const
AuraApplicationMap & GetAppliedAuras()
std::list< AuraEffect * > AuraEffectList
void RemoveMovementImpairingAuras(bool withRoot)
uint32 GetCreateMana() const
virtual bool IsEngaged() const
uint32 MeleeDamageBonusDone(Unit *pVictim, uint32 damage, WeaponAttackType attType, SpellInfo const *spellProto=nullptr, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL)
void ReplaceAllNpcFlags(NPCFlags flags)
AuraMap & GetOwnedAuras()
int32 SpellBaseDamageBonusDone(SpellSchoolMask schoolMask) const
void KnockbackFrom(float x, float y, float speedXY, float speedZ)
ObjectGuid m_SummonSlot[MAX_SUMMON_SLOT]
ObjectGuid GetTarget() const
float GetTotalAttackPowerValue(WeaponAttackType attType) const
void RemoveUnitFlag(UnitFlags flags)
ObjectGuid GetPetGUID() const
uint32 SpellDamageBonusTaken(Unit *caster, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype) const
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
void WorldRelocate(WorldLocation const &loc)
WorldLocation GetWorldLocation() const
uint32 GetPhaseMask() const
virtual void SendMessageToSet(WorldPacket const *data, bool self) const
InstanceScript * GetInstanceScript() const
bool IsWithinLOS(float x, float y, float z, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
ObjectGuid GetPrivateObjectOwner() const
void GetClosePoint(float &x, float &y, float &z, float size, float distance2d=0, float relAngle=0) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
void MovePositionToFirstCollision(Position &pos, float dist, float angle)
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
ZoneScript * GetZoneScript() const
bool IsPrivateObject() const
int32 ModSpellDuration(SpellInfo const *spellInfo, WorldObject const *target, int32 duration, bool positive, uint32 effectMask) const
std::string const & GetName() const
float ApplyEffectModifiers(SpellInfo const *spellInfo, uint8 effIndex, float value) const
Player * GetSpellModOwner() const
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
void SetName(std::string newname)
float GetVisibilityRange() const
void PlayDirectSound(uint32 soundId, Player *target=nullptr)
virtual uint32 GetFaction() const =0
float GetDistance(WorldObject const *obj) const
Position GetFirstCollisionPosition(float dist, float angle)
bool IsFriendlyTo(WorldObject const *target) const
virtual float GetCombatReach() const
Player * GetAffectingPlayer() const
void GetRandomPoint(Position const &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const
FactionTemplateEntry const * GetFactionTemplateEntry() const
int32 CalculateSpellDamage(SpellEffectInfo const &spellEffectInfo, int32 const *basePoints=nullptr) const
void Initialize(uint16 opcode, size_t newres=200)
void SendNotification(char const *format,...) ATTR_PRINTF(2
bool HasPermission(uint32 permissionId)
uint32 GetAccountId() const
void SendDiscoverNewTaxiNode(uint32 nodeid)
@ CONFIG_SKILL_PROSPECTING
TC_GAME_API float gravity
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
uint32 hk_honor_at_level(uint8 level, float multiplier=1.0f)
AuraCreateInfo & SetBaseAmount(int32 const *bp)
AuraCreateInfo & SetCaster(Unit *caster)
static void VisitWorldObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
void SetIsCommandFollow(bool val)
void SetIsAtStay(bool val)
void SetIsFollowing(bool val)
void SetIsReturning(bool val)
bool HasCommandState(CommandStates state) const
void SetIsCommandAttack(bool val)
SkillType GetRequiredLootSkill() const
bool IsFriendlyTo(FactionTemplateEntry const &entry) const
bool CannotBeUsedUnderImmunity() const
struct GameObjectTemplate::@191::@200 spellFocus
struct GameObjectTemplate::@191::@202 goober
struct GameObjectTemplate::@191::@196 chest
struct GameObjectTemplate::@191::@195 questgiver
struct GameObjectTemplate::@191::@194 button
uint32 GetRequiredSkillRank() const
std::array< ItemEffect, MAX_ITEM_PROTO_SPELLS > Effects
uint32 GetBaseItemLevel() const
uint32 GetMaxStackSize() const
bool HasSignature() const
bool HasFlag(ItemFlags flag) const
float GetExactDist2d(const float x, const float y) const
float GetRelativeAngle(float x, float y) const
float GetExactDist(float x, float y, float z) const
float GetPositionZ() const
float GetOrientation() const
float GetAbsoluteAngle(float x, float y) const
void SetOrientation(float orientation)
float GetPositionX() const
void GetPosition(float &x, float &y) const
float GetPositionY() const
void Relocate(float x, float y)
static QuaternionData fromEulerAnglesZYX(float Z, float Y, float X)
uint32 Value[MAX_SKILL_STEP]
uint32 Effect[MAX_ITEM_ENCHANTMENT_EFFECTS]
int32 EffectBasePoints[MAX_SPELL_EFFECTS]