326 bool apply_direct_bonus =
true;
389 for (Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
393 (*i)->GetCasterGUID() != unitCaster->
GetGUID())
397 if ((*i)->GetSpellInfo()->SpellFamilyFlags[0] & 0x4)
404 if ((*i)->GetSpellInfo()->SpellFamilyFlags[2] & 0x00000002)
427 if (!unitCaster->
HasAura(56235))
442 int32 bp0 = aurEff->GetId() == 54037 ? 4 : 8;
445 unitCaster->
CastSpell(
nullptr, 54425, args);
461 for (Unit::AuraEffectList::const_iterator i = ImprMindBlast.begin(); i != ImprMindBlast.end(); ++i)
464 ((*i)->GetSpellInfo()->SpellIconID == 95))
467 int32 const chance = (*i)->GetSpellInfo()->GetEffect(
EFFECT_1).CalcValue(unitCaster);
512 if (
uint32 combo = player->GetComboPoints())
518 bool needConsume =
true;
519 uint32 spellId = aurEff->GetId();
521 uint32 doses = aurEff->GetBase()->GetStackAmount();
527 for (Unit::AuraEffectList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
529 if ((*iter)->GetSpellInfo()->SpellFamilyName ==
SPELLFAMILY_ROGUE && (*iter)->GetSpellInfo()->SpellIconID == 1960)
531 uint32 chance = (*iter)->GetSpellInfo()->GetEffect(
EFFECT_2).CalcValue(unitCaster);
541 for (
uint32 i = 0; i < doses; ++i)
549 if (unitCaster->
HasAura(37169))
559 if (
uint32 combo = player->GetComboPoints())
562 damage += std::lroundf(ap * combo * 0.07f);
565 if (unitCaster->
HasAura(37169))
580 if (unitCaster->
HasAura(57627))
589 for (Unit::AuraEffectList::const_iterator iter = decSpeedList.begin(); iter != decSpeedList.end(); ++iter)
591 if ((*iter)->GetSpellInfo()->SpellIconID == 15 && (*iter)->GetSpellInfo()->Dispel == 0)
613 if (dmg_max == 0.0f && dmg_min > dmg_max)
630 float minTotal = 0.f;
631 float maxTotal = 0.f;
633 float tmpMin, tmpMax;
641 float average = (minTotal + maxTotal) / 2;
675 if (unitCaster &&
damage > 0 && apply_direct_bonus)
718 switch (triggered_spell_id)
727 if (unitCaster->
HasAura(63093))
728 unitCaster->
CastSpell(
nullptr, 65047,
true);
769 if (triggered_spell_id == 0)
779 TC_LOG_ERROR(
"spells.effect.nospell",
"Spell::EffectTriggerSpell spell {} tried to trigger unknown spell {}",
m_spellInfo->
Id, triggered_spell_id);
826 if (triggered_spell_id == 0)
836 TC_LOG_ERROR(
"spells.effect.nospell",
"Spell::EffectTriggerMissileSpell spell {} tried to trigger unknown spell {}.",
m_spellInfo->
Id, triggered_spell_id);
880 if (triggered_spell_id == 0)
891 TC_LOG_ERROR(
"spells.effect.nospell",
"Spell::EffectForceCast of spell {}: triggering unknown spell id {}.",
m_spellInfo->
Id, triggered_spell_id);
914 switch (spellInfo->
Id)
935 if (triggered_spell_id == 0)
945 TC_LOG_ERROR(
"spells.effect.nospell",
"EffectTriggerRitualOfSummoning of spell {}: triggering unknown spell id {}.",
m_spellInfo->
Id, triggered_spell_id);
960 runSpeed *= creature->GetCreatureTemplate()->speed_run;
962 float multiplier = spellEffectInfo.
Amplitude;
963 if (multiplier <= 0.0f)
966 speedXY = std::min(runSpeed * 3.0f * multiplier, std::max(28.0f, unitCaster->
GetSpeed(
MOVE_RUN) * 4.0f));
968 float duration = dist / speedXY;
969 float durationSqr = duration * duration;
970 float minHeight = spellEffectInfo.
MiscValue ? spellEffectInfo.
MiscValue / 10.0f : 0.5f;
998 float speedXY, speedZ;
1018 float speedXY, speedZ;
1052 TC_LOG_ERROR(
"spells",
"Spell::EffectTeleportUnits - spellId {} attempted to teleport creature to a different map.",
m_spellInfo->
Id);
1117 float gainMultiplier = 0.f;
1121 int32 const gain =
int32(newDamage * gainMultiplier);
1207 newDamage =
int32(newDamage * dmgMultiplier);
1233 int32 damageAmount = 0;
1236 damageAmount += aurEff->GetAmount();
1240 addhealth += damageAmount;
1248 for (Unit::AuraEffectList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
1251 && (*i)->GetSpellInfo()->SpellFamilyFlags[0] & 0x50)
1267 int32 tickcount = 0;
1275 addhealth += tickheal * tickcount;
1278 if (!unitCaster->
HasAura(54824))
1361 if (unitCaster && unitCaster->
IsAlive())
1378 uint32 newitemid = itemId;
1416 float perfectCreateChance = 0.0f;
1418 uint32 perfectItemType = itemId;
1422 newitemid = perfectItemType;
1431 float additionalCreateChance=0.0f;
1433 uint8 additionalMaxNum=0;
1437 while (
roll_chance_f(additionalCreateChance) && items_count <= additionalMaxNum)
1441 num_to_add *= items_count;
1453 num_to_add -= no_space;
1479 player->
SendNewItem(pItem, num_to_add,
true, bgType == 0);
1566 float radius = 0.0f;
1571 radius = std::max(radius, spellEffectInfo.
CalcRadius(unitCaster));
1625 int32 level_multiplier = 0;
1626 int32 level_diff = 0;
1630 level_diff = unitCaster->
GetLevel() - 40;
1631 level_multiplier = 2;
1634 level_diff = unitCaster->
GetLevel() - 60;
1635 level_multiplier = 10;
1638 level_diff = unitCaster->
GetLevel() - 60;
1639 level_multiplier = 4;
1664 damage -= level_multiplier * level_diff;
1711 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!",
1774 TC_LOG_DEBUG(
"spells",
"WORLD: Open Lock - No Player Caster!");
1834 TC_LOG_DEBUG(
"spells",
"WORLD: Open Lock - No GameObject/Item Target!");
1839 int32 reqSkillValue = 0;
1936 player->
StoreItem(dest, pNewItem,
true);
1957 player->
BankItem(dest, pNewItem,
true);
1981 player->
EquipItem(dest, pNewItem,
true);
2053 switch (properties->
ID)
2083 if (properties->
Flags & 512)
2089 switch (properties->
Title)
2114 if (!summon || !summon->
IsTotem())
2148 for (
uint32 count = 0; count < numSummons; ++count)
2203 spellId = spellInfo->
Id;
2212 unitCaster->
CastSpell(summon, spellId, args);
2254 player->
LearnSpell(itemEffect.SpellID,
false);
2279 if (dispelList.empty())
2282 size_t remaining = dispelList.size();
2287 successList.reserve(
damage);
2291 for (
int32 count = 0; count < damage && remaining > 0;)
2294 auto itr = dispelList.begin();
2295 std::advance(itr,
urand(0, remaining - 1));
2297 if (itr->RollDispel())
2299 auto successItr = std::find_if(successList.begin(), successList.end(), [&itr](
DispelableAura& dispelAura) ->
bool
2301 if (dispelAura.GetAura()->GetId() == itr->GetAura()->GetId() && dispelAura.GetAura()->GetCaster() == itr->GetAura()->GetCaster())
2307 if (successItr == successList.end())
2308 successList.emplace_back(itr->GetAura(), 0, 1);
2310 successItr->IncrementCharges();
2312 if (!itr->DecrementCharge())
2315 std::swap(*itr, dispelList[remaining]);
2328 dataFail <<
uint32(itr->GetAura()->GetId());
2336 if (successList.empty())
2344 dataSuccess <<
uint8(0);
2345 dataSuccess <<
uint32(successList.size());
2346 for (DispelChargesList::iterator itr = successList.begin(); itr != successList.end(); ++itr)
2349 dataSuccess <<
uint32(itr->GetAura()->GetId());
2350 dataSuccess <<
uint8(0);
2364 if (owner->GetAura(56249))
2365 owner->CastSpell(owner, 19658, args);
2580 sLog->OutCommand(player->
GetSession()->
GetAccountId(),
"GM {} (Account: {}) enchanting(perm): {} (Entry: {}) for player: {} (Account: {})",
2621 bool add_socket =
false;
2632 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.",
2645 sLog->OutCommand(player->
GetSession()->
GetAccountId(),
"GM {} (Account: {}) enchanting(perm): {} (Entry: {}) for player: {} (Account: {})",
2685 case 2: spell_id = 36744;
break;
2687 case 4: spell_id = 36753;
break;
2688 case 5: spell_id = 36751;
break;
2690 case 6: spell_id = 36754;
break;
2691 case 7: spell_id = 36755;
break;
2693 case 9: spell_id = 36761;
break;
2694 case 10: spell_id = 36758;
break;
2695 case 11: spell_id = 36760;
break;
2697 TC_LOG_ERROR(
"spells",
"Spell::EffectEnchantItemTmp: Damage {} not handled in S'RW.",
damage);
2704 TC_LOG_ERROR(
"spells",
"Spell::EffectEnchantItemTmp: unknown spell id {}", spell_id);
2776 sLog->OutCommand(player->
GetSession()->
GetAccountId(),
"GM {} (Account: {}) enchanting(temp): {} (Entry: {}) for player: {} (Account: {})",
2808 if (creatureTarget->
IsPet())
2857 if (!owner && unitCaster->
IsTotem())
2876 if (petentry == 0 || OldSummon->
GetEntry() == petentry)
2929 std::string new_name =
sObjectMgr->GeneratePetName(petentry);
2930 if (!new_name.empty())
2954 if (!learn_spellproto)
3032 float totalDamagePercentMod = 1.0f;
3033 int32 fixed_bonus = 0;
3034 int32 spell_bonus = 0;
3045 if (unitCaster->
HasAura(58388))
3075 totalDamagePercentMod *= 1.5f;
3088 for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
3090 if (itr->second->GetBase()->GetSpellInfo()->Dispel ==
DISPEL_POISON)
3099 totalDamagePercentMod *= 1.2f;
3118 unitCaster->
CastSpell(
nullptr, 38430, aurEff);
3131 AddPct(totalDamagePercentMod, rendAndTear->GetAmount());
3149 AddPct(totalDamagePercentMod, aurEff->GetAmount());
3158 AddPct(bonusPct, aurEff->GetAmount());
3159 AddPct(totalDamagePercentMod, bonusPct);
3164 AddPct(totalDamagePercentMod, 20);
3173 AddPct(totalDamagePercentMod, runic);
3179 bool consumeDiseases =
true;
3184 consumeDiseases =
false;
3189 AddPct(bonusPct, aurEff->GetAmount());
3190 AddPct(totalDamagePercentMod, bonusPct);
3205 AddPct(bonusPct, aurEff->GetAmount());
3207 AddPct(totalDamagePercentMod, bonusPct);
3214 bool normalized =
false;
3215 float weaponDamagePercentMod = 1.0f;
3218 switch (spellEffectInfo.Effect)
3252 fixed_bonus =
int32(fixed_bonus * weapon_total_pct);
3254 spell_bonus =
int32(spell_bonus * weapon_total_pct);
3264 switch (spellEffectInfo.Effect)
3269 weaponDamage += fixed_bonus;
3272 weaponDamage =
int32(weaponDamage * weaponDamagePercentMod);
3279 weaponDamage += spell_bonus;
3280 weaponDamage =
int32(weaponDamage * totalDamagePercentMod);
3287 weaponDamage = std::max(weaponDamage, 0);
3300 if (!unitCaster || !unitCaster->
IsAlive())
3324 int32 addhealth = 0;
3350 SpellInfo const* curSpellInfo = spell->m_spellInfo;
3398 if (!pGameObj->
Create(map->
GenerateLowGuid<
HighGuid::GameObject>(), gameobject_id, map,
m_caster->
GetPhaseMask(),
Position(x, y, z, target->
GetOrientation()), rot, 255,
GO_STATE_READY))
3421 linkedTrap->SetRespawnTime(duration > 0 ? duration /
IN_MILLISECONDS : 0);
3477 Item* item =
nullptr;
3482 if (item && item->
GetEntry() == 38587)
3520 for (
uint8 i = 0; i < 15; ++i)
3560 unitCaster->
CastSpell(parent, 62496,
true);
3590 pair.second->ScaleThreat(0.0f);
3683 caster->
duel = std::make_unique<DuelInfo>(target, caster, isMounted);
3684 target->
duel = std::make_unique<DuelInfo>(caster, caster, isMounted);
3689 sScriptMgr->OnPlayerDuelRequest(target, caster);
3784 case 1: minLevel = 15;
break;
3785 case 2: minLevel = 50;
break;
3786 case 3: minLevel = 30;
break;
3787 case 4: minLevel = 70;
break;
3788 case 5: minLevel = 80;
break;
3790 if (minLevel && player->
GetLevel() < minLevel)
3803 if (newGlyphProperties->GlyphSlotFlags != newGlyphSlot->Type)
3820 player->
CastSpell(player, newGlyphProperties->SpellID,
true);
3910 if (drunkMod >
static_cast<int32>(100 - currentDrunk))
3912 else if (drunkMod <
static_cast<int32>(0 - currentDrunk))
3915 currentDrunk += drunkMod;
3920 player->
CastSpell(player, 67468,
false);
4008 if (!go->
Create(map->
GenerateLowGuid<
HighGuid::GameObject>(), go_id, map, unitCaster->
GetPhaseMask(),
Position(x, y, z, unitCaster->
GetOrientation()), rot, 255,
GO_STATE_READY))
4036 Player* player =
nullptr;
4170 data << unitCaster->
GetGUID();
4176 for (Unit::AttackerSet::const_iterator itr = unitCaster->
getAttackers().begin(); itr != unitCaster->
getAttackers().end(); ++itr)
4177 if ((*itr)->GetTypeId() ==
TYPEID_UNIT && !(*itr)->CanHaveThreatList())
4178 attackerSet.insert(*itr);
4180 for (Unit::AttackerSet::const_iterator itr = attackerSet.begin(); itr != attackerSet.end(); ++itr)
4181 (*itr)->AttackStop();
4241 int32 const reqValue = targetLevel < 10 ? 0 : (targetLevel < 20 ? (targetLevel - 10) * 10 : targetLevel * 5);
4317 if (creatureTarget->isWorldBoss() || creatureTarget->IsDungeonBoss())
4326 float speedz = float(
damage) * ratio;
4327 if (speedxy < 0.01f && speedz < 0.01f)
4353 float speedz =
damage/ 10.f;
4386 if (logQuest == quest_id)
4404 sScriptMgr->OnQuestStatusChange(player, quest_id);
4437 float speedZ = (2 * speedXY * speedXY * distZ +
Movement::gravity * distXY * distXY) / (2 * speedXY * distXY);
4439 if (!std::isfinite(speedZ))
4473 float speedZ = (2 * speedXY * speedXY * distZ +
Movement::gravity * distXY * distXY) / (2 * speedXY * distXY);
4475 if (!std::isfinite(speedZ))
4495 for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
4497 Aura* aura = itr->second;
4505 for (
auto itr = dispel_list.begin(); itr != dispel_list.end(); ++itr)
4587 if (totem && totem->
IsTotem())
4604 unitCaster->
CastSpell(unitCaster, 39104, args);
4691 TC_LOG_ERROR(
"sql.sql",
"Gameobject (Entry: {}) does not exist and is not created by spell (ID: {}) cast.", name_id,
m_spellInfo->
Id);
4710 float dis = (float)
rand_norm() * (max_dis - min_dis) + min_dis;
4731 switch (goinfo->
type)
4741 switch (
urand(0, 2))
4743 case 0: lastSec = 3;
break;
4744 case 1: lastSec = 7;
break;
4745 case 2: lastSec = 13;
break;
4779 TC_LOG_DEBUG(
"spells",
"AddObject at SpellEfects.cpp EffectTransmitted");
4787 linkedTrap->SetRespawnTime(duration > 0 ? duration/
IN_MILLISECONDS : 0);
4790 linkedTrap->SetOwnerGUID(unitCaster->
GetGUID());
4886 Player* target =
nullptr;
4892 if (!player || !target || target->
IsAlive())
4913 for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
4915 Aura* aura = itr->second;
4937 stealList.emplace_back(aura, chance, charges);
4941 if (stealList.empty())
4944 size_t remaining = stealList.size();
4949 successList.reserve(
damage);
4953 for (
int32 count = 0; count < damage && remaining > 0;)
4956 DispelChargesList::iterator itr = stealList.begin();
4957 std::advance(itr,
urand(0, remaining - 1));
4959 if (itr->RollDispel())
4961 successList.emplace_back(itr->GetAura()->GetId(), itr->GetAura()->GetCasterGUID());
4962 if (!itr->DecrementCharge())
4965 std::swap(*itr, stealList[remaining]);
4978 dataFail <<
uint32(itr->GetAura()->GetId());
4986 if (successList.empty())
4993 dataSuccess <<
uint8(0);
4994 dataSuccess <<
uint32(successList.size());
4995 for (
auto itr = successList.begin(); itr != successList.end(); ++itr)
4997 dataSuccess <<
uint32(itr->first);
4998 dataSuccess <<
uint8(0);
5027 creatureEntry = 24008;
5062 if (quest->IsAutoAccept() && player->
CanAddQuest(quest,
false))
5089 for (
uint32 j = 0; j < MAX_RUNES && count > 0; ++j)
5191 if (!targetFaction || (casterFaction && !casterFaction->
IsFriendlyTo(*targetFaction)))
5234 level = skill202 / 5;
5236 float radius = 5.0f;
5244 for (
uint32 count = 0; count < numGuardians; ++count)
5258 ((
Guardian*)summon)->InitStatsForLevel(level);
5390 for (; n_buttons; --n_buttons, ++button_id)
5447 pItem->SetSpellCharges(x, pProto->
Effects[x].Charges);
5476 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 MAX_ITEM_PROTO_SPELLS
#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
@ SPELLCATEGORY_DEVOUR_MAGIC
@ 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
void SetState(ItemUpdateState state, Player *forplayer=nullptr)
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
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)
void SetFlag(uint16 index, uint32 newFlag)
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 KilledMonsterCredit(uint32 entry, ObjectGuid guid=ObjectGuid::Empty)
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
Item * StoreNewItem(ItemPosCountVec const &pos, uint32 item, bool update, int32 randomPropertyId=0, GuidSet const &allowedLooters=GuidSet())
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)
void SendTalentWipeConfirm(ObjectGuid trainerGuid) const
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)
void SendEquipError(InventoryResult msg, Item *pItem, Item *pItem2=nullptr, uint32 itemid=0) const
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
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(uint32 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 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)
WorldPacket const * Write() override
void SendNotification(const char *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
std::array< ItemEffect, MAX_ITEM_PROTO_SPELLS > Effects
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]