Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources
This commit is contained in:
1 parent
7fff6c424f
commit
5ff847159c
1243 files changed
+29780
-36517
No files matched your search
@@ -16,50 +16,54 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Log.h"
|
||||
#include "UpdateMask.h"
|
||||
#include "World.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "SkillExtraItems.h"
|
||||
#include "Unit.h"
|
||||
#include "Spell.h"
|
||||
#include "DynamicObject.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "Group.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Pet.h"
|
||||
#include "GameObject.h"
|
||||
#include "GossipDef.h"
|
||||
#include "Creature.h"
|
||||
#include "Totem.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "Battleground.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Language.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "Util.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "CellImpl.h"
|
||||
#include "Formulas.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "PathGenerator.h"
|
||||
#include "AreaTrigger.h"
|
||||
#include "Battleground.h"
|
||||
#include "CellImpl.h"
|
||||
#include "Common.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DynamicObject.h"
|
||||
#include "Formulas.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "GossipDef.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "Group.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Item.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "PathGenerator.h"
|
||||
#include "Pet.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "AreaTrigger.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "SkillExtraItems.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Totem.h"
|
||||
#include "Unit.h"
|
||||
#include "UpdateMask.h"
|
||||
#include "Util.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||
{
|
||||
@@ -305,7 +309,7 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
|
||||
data << uint32(m_spellInfo->Id);
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
|
||||
m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), nullptr, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
||||
}
|
||||
|
||||
void Spell::EffectEnvironmentalDMG(SpellEffIndex /*effIndex*/)
|
||||
@@ -716,7 +720,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
// original caster guid only for GO cast
|
||||
m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID);
|
||||
m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, nullptr, nullptr, m_originalCasterGUID);
|
||||
}
|
||||
|
||||
void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
|
||||
@@ -764,7 +768,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
// original caster guid only for GO cast
|
||||
m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID);
|
||||
m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, nullptr, nullptr, m_originalCasterGUID);
|
||||
}
|
||||
|
||||
void Spell::EffectForceCast(SpellEffIndex effIndex)
|
||||
@@ -796,7 +800,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
|
||||
break;
|
||||
case 52463: // Hide In Mine Car
|
||||
case 52349: // Overtake
|
||||
unitTarget->CastCustomSpell(unitTarget, spellInfo->Id, &damage, NULL, NULL, true, NULL, NULL, m_originalCasterGUID);
|
||||
unitTarget->CastCustomSpell(unitTarget, spellInfo->Id, &damage, nullptr, nullptr, true, nullptr, nullptr, m_originalCasterGUID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -804,7 +808,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case 72298: // Malleable Goo Summon
|
||||
unitTarget->CastSpell(unitTarget, spellInfo->Id, true, NULL, NULL, m_originalCasterGUID);
|
||||
unitTarget->CastSpell(unitTarget, spellInfo->Id, true, nullptr, nullptr, m_originalCasterGUID);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -840,7 +844,7 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex)
|
||||
|
||||
finish();
|
||||
|
||||
m_caster->CastSpell((Unit*)NULL, spellInfo, false);
|
||||
m_caster->CastSpell((Unit*)nullptr, spellInfo, false);
|
||||
}
|
||||
|
||||
void Spell::EffectJump(SpellEffIndex effIndex)
|
||||
@@ -1095,7 +1099,7 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
|
||||
&& effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
|
||||
return;
|
||||
|
||||
WorldObject* target = NULL;
|
||||
WorldObject* target = nullptr;
|
||||
|
||||
// call events for object target if present
|
||||
if (effectHandleMode == SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
@@ -1204,7 +1208,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit::AuraEffectList const& RejorRegr = unitTarget->GetAuraEffectsByType(SPELL_AURA_PERIODIC_HEAL);
|
||||
// find most short by duration
|
||||
AuraEffect* targetAura = NULL;
|
||||
AuraEffect* targetAura = nullptr;
|
||||
for (Unit::AuraEffectList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellInfo()->SpellFamilyName == SPELLFAMILY_DRUID
|
||||
@@ -1223,7 +1227,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
|
||||
|
||||
int32 tickheal = (targetAura->GetAmount() + targetAura->GetBonusAmount()) * targetAura->GetDonePct();
|
||||
if (Player* modOwner = m_caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod<SPELLMOD_DOT>(targetAura->GetId(), tickheal);
|
||||
modOwner->ApplySpellMod(targetAura->GetId(), SPELLMOD_DOT, tickheal);
|
||||
|
||||
unitTarget->SpellHealingBonusTaken(m_caster, targetAura->GetSpellInfo(), tickheal, DOT);
|
||||
|
||||
@@ -1338,7 +1342,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
|
||||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(newitemid);
|
||||
if (!pProto)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1415,28 +1419,27 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
|
||||
else
|
||||
{
|
||||
// if not created by another reason from full inventory or unique items amount limitation
|
||||
player->SendEquipError(msg, NULL, NULL, newitemid);
|
||||
player->SendEquipError(msg, nullptr, nullptr, newitemid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (num_to_add)
|
||||
{
|
||||
uint32 projectId = GetSpellInfo()->ResearchProjectId;
|
||||
|
||||
uint16 projectId = static_cast<uint16>(GetSpellInfo()->ResearchProjectId);
|
||||
if (projectId && !player->ArchProjectCompleteable(projectId))
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC, NULL, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
// create the new item and store it
|
||||
Item* pItem = player->StoreNewItem(dest, newitemid, true, Item::GenerateItemRandomPropertyId(newitemid));
|
||||
Item* pItem = player->StoreNewItem(dest, newitemid, true, GenerateItemRandomPropertyId(newitemid));
|
||||
|
||||
// was it successful? return error if not
|
||||
if (!pItem)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1882,9 +1885,9 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
|
||||
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
||||
if (m_CastItem == m_targets.GetItemTarget())
|
||||
m_targets.SetItemTarget(NULL);
|
||||
m_targets.SetItemTarget(nullptr);
|
||||
|
||||
m_CastItem = NULL;
|
||||
m_CastItem = nullptr;
|
||||
m_castItemGUID.Clear();
|
||||
m_castItemEntry = 0;
|
||||
|
||||
@@ -1903,9 +1906,9 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
|
||||
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
||||
if (m_CastItem == m_targets.GetItemTarget())
|
||||
m_targets.SetItemTarget(NULL);
|
||||
m_targets.SetItemTarget(nullptr);
|
||||
|
||||
m_CastItem = NULL;
|
||||
m_CastItem = nullptr;
|
||||
m_castItemGUID.Clear();
|
||||
m_castItemEntry = 0;
|
||||
|
||||
@@ -1927,9 +1930,9 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
|
||||
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
||||
if (m_CastItem == m_targets.GetItemTarget())
|
||||
m_targets.SetItemTarget(NULL);
|
||||
m_targets.SetItemTarget(nullptr);
|
||||
|
||||
m_CastItem = NULL;
|
||||
m_CastItem = nullptr;
|
||||
m_castItemGUID.Clear();
|
||||
m_castItemEntry = 0;
|
||||
|
||||
@@ -1988,9 +1991,9 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
||||
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
if (Player* modOwner = m_originalCaster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod<SPELLMOD_DURATION>(m_spellInfo->Id, duration);
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration);
|
||||
|
||||
TempSummon* summon = NULL;
|
||||
TempSummon* summon = nullptr;
|
||||
|
||||
// determine how many units should be summoned
|
||||
uint32 numSummons;
|
||||
@@ -2272,11 +2275,11 @@ void Spell::EffectDispel(SpellEffIndex effIndex)
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->GetCategory() == SPELLCATEGORY_DEVOUR_MAGIC)
|
||||
{
|
||||
int32 heal_amount = m_spellInfo->Effects[EFFECT_1].CalcValue(m_caster);
|
||||
m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, NULL, NULL, true);
|
||||
m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, nullptr, nullptr, true);
|
||||
// Glyph of Felhunter
|
||||
if (Unit* owner = m_caster->GetOwner())
|
||||
if (owner->GetAura(56249))
|
||||
owner->CastCustomSpell(owner, 19658, &heal_amount, NULL, NULL, true);
|
||||
owner->CastCustomSpell(owner, 19658, &heal_amount, nullptr, nullptr, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2459,8 +2462,8 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
|
||||
unitTarget = player;
|
||||
// and add a scroll
|
||||
DoCreateItem(effIndex, m_spellInfo->Effects[effIndex].ItemType);
|
||||
itemTarget = NULL;
|
||||
m_targets.SetItemTarget(NULL);
|
||||
itemTarget = nullptr;
|
||||
m_targets.SetItemTarget(nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2705,7 +2708,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
|
||||
return;
|
||||
|
||||
Player* owner = NULL;
|
||||
Player* owner = nullptr;
|
||||
if (m_originalCaster)
|
||||
{
|
||||
owner = m_originalCaster->ToPlayer();
|
||||
@@ -2914,7 +2917,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
||||
// Skyshatter Harness item set bonus
|
||||
// Stormstrike
|
||||
if (AuraEffect* aurEff = m_caster->IsScriptOverriden(m_spellInfo, 5634))
|
||||
m_caster->CastSpell(m_caster, 38430, true, NULL, aurEff);
|
||||
m_caster->CastSpell(m_caster, 38430, true, nullptr, aurEff);
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DRUID:
|
||||
@@ -3160,7 +3163,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
|
||||
Map* map = target->GetMap();
|
||||
|
||||
if (!pGameObj->Create(map->GenerateLowGuid<HighGuid::GameObject>(), gameobject_id, map,
|
||||
m_caster->GetPhaseMask(), Position(x, y, z, target->GetOrientation()), G3D::Quat(), 255, GO_STATE_READY))
|
||||
m_caster->GetPhaseMask(), Position(x, y, z, target->GetOrientation()), QuaternionData(), 255, GO_STATE_READY))
|
||||
{
|
||||
delete pGameObj;
|
||||
return;
|
||||
@@ -3263,7 +3266,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
|
||||
uint32 spell_id = roll_chance_i(20) ? 8854 : 8855;
|
||||
|
||||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
||||
m_caster->CastSpell(m_caster, spell_id, true, nullptr);
|
||||
return;
|
||||
}
|
||||
// Brittle Armor - need remove one 24575 Brittle Armor aura
|
||||
@@ -3347,7 +3350,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
|
||||
uint8 bag = 19;
|
||||
uint8 slot = 0;
|
||||
Item* item = NULL;
|
||||
Item* item = nullptr;
|
||||
|
||||
while (bag) // 256 = 0 due to var type
|
||||
{
|
||||
@@ -3593,7 +3596,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
// proc a spellcast
|
||||
if (Aura* chargesAura = m_caster->GetAura(59907))
|
||||
{
|
||||
m_caster->CastSpell(unitTarget, spell_heal, true, NULL, NULL, m_caster->ToTempSummon()->GetSummonerGUID());
|
||||
m_caster->CastSpell(unitTarget, spell_heal, true, nullptr, nullptr, m_caster->ToTempSummon()->GetSummonerGUID());
|
||||
if (chargesAura->ModCharges(-1))
|
||||
m_caster->ToTempSummon()->UnSummon();
|
||||
}
|
||||
@@ -3622,14 +3625,14 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
Creature* totem = unitTarget->GetMap()->GetCreature(unitTarget->m_SummonSlot[slot]);
|
||||
if (totem && totem->IsTotem())
|
||||
{
|
||||
m_caster->CastCustomSpell(totem, 55277, &basepoints0, NULL, NULL, true);
|
||||
m_caster->CastCustomSpell(totem, 55277, &basepoints0, nullptr, nullptr, true);
|
||||
}
|
||||
}
|
||||
// Glyph of Stoneclaw Totem
|
||||
if (AuraEffect* aur=unitTarget->GetAuraEffect(63298, 0))
|
||||
{
|
||||
basepoints0 *= aur->GetAmount();
|
||||
m_caster->CastCustomSpell(unitTarget, 55277, &basepoints0, NULL, NULL, true);
|
||||
m_caster->CastCustomSpell(unitTarget, 55277, &basepoints0, nullptr, nullptr, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3770,7 +3773,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
|
||||
};
|
||||
|
||||
Map* map = m_caster->GetMap();
|
||||
if (!pGameObj->Create(map->GenerateLowGuid<HighGuid::GameObject>(), gameobject_id, map, 0, pos, G3D::Quat(), 0, GO_STATE_READY))
|
||||
if (!pGameObj->Create(map->GenerateLowGuid<HighGuid::GameObject>(), gameobject_id, map, 0, pos, QuaternionData(), 0, GO_STATE_READY))
|
||||
{
|
||||
delete pGameObj;
|
||||
return;
|
||||
@@ -3794,8 +3797,8 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
|
||||
WorldPacket data(SMSG_DUEL_REQUESTED, 8 + 8);
|
||||
data << uint64(pGameObj->GetGUID());
|
||||
data << uint64(caster->GetGUID());
|
||||
caster->GetSession()->SendPacket(&data);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
caster->SendDirectMessage(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
|
||||
// create duel-info
|
||||
DuelInfo* duel = new DuelInfo;
|
||||
@@ -4083,7 +4086,7 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex)
|
||||
player->DestroyItemCount(foodItem, count, true);
|
||||
/// @todo fix crash when a spell has two effects, both pointed at the same item target
|
||||
|
||||
m_caster->CastCustomSpell(pet, m_spellInfo->Effects[effIndex].TriggerSpell, &benefit, NULL, NULL, true);
|
||||
m_caster->CastCustomSpell(pet, m_spellInfo->Effects[effIndex].TriggerSpell, &benefit, nullptr, nullptr, true);
|
||||
}
|
||||
|
||||
void Spell::EffectDismissPet(SpellEffIndex effIndex)
|
||||
@@ -4131,7 +4134,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
|
||||
|
||||
Map* map = m_caster->GetMap();
|
||||
if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), go_id, map, 0, Position(x, y, z, m_caster->GetOrientation()), G3D::Quat(), 255, GO_STATE_READY))
|
||||
if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), go_id, map, 0, Position(x, y, z, m_caster->GetOrientation()), QuaternionData(), 255, GO_STATE_READY))
|
||||
{
|
||||
delete go;
|
||||
return;
|
||||
@@ -4436,14 +4439,14 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
|
||||
|
||||
float speed = G3D::fuzzyGt(m_spellInfo->Speed, 0.0f) ? m_spellInfo->Speed : SPEED_CHARGE;
|
||||
// Spell is not using explicit target - no generated path
|
||||
if (m_preGeneratedPath.GetPathType() == PATHFIND_BLANK)
|
||||
if (!m_preGeneratedPath)
|
||||
{
|
||||
//unitTarget->GetContactPoint(m_caster, pos.m_positionX, pos.m_positionY, pos.m_positionZ);
|
||||
Position pos = unitTarget->GetFirstCollisionPosition(unitTarget->GetObjectSize(), unitTarget->GetRelativeAngle(m_caster));
|
||||
m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speed);
|
||||
}
|
||||
else
|
||||
m_caster->GetMotionMaster()->MoveCharge(m_preGeneratedPath, speed);
|
||||
m_caster->GetMotionMaster()->MoveCharge(*m_preGeneratedPath, speed);
|
||||
}
|
||||
|
||||
if (effectHandleMode == SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
@@ -4731,7 +4734,7 @@ void Spell::EffectDestroyAllTotems(SpellEffIndex /*effIndex*/)
|
||||
}
|
||||
ApplyPct(mana, damage);
|
||||
if (mana)
|
||||
m_caster->CastCustomSpell(m_caster, 39104, &mana, NULL, NULL, true);
|
||||
m_caster->CastCustomSpell(m_caster, 39104, &mana, nullptr, nullptr, true);
|
||||
}
|
||||
|
||||
void Spell::EffectDurabilityDamage(SpellEffIndex effIndex)
|
||||
@@ -4845,7 +4848,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
|
||||
GameObject* pGameObj = new GameObject;
|
||||
|
||||
if (!pGameObj->Create(cMap->GenerateLowGuid<HighGuid::GameObject>(), name_id, cMap, 0, Position(fx, fy, fz, m_caster->GetOrientation()), G3D::Quat(), 255, GO_STATE_READY))
|
||||
if (!pGameObj->Create(cMap->GenerateLowGuid<HighGuid::GameObject>(), name_id, cMap, 0, Position(fx, fy, fz, m_caster->GetOrientation()), QuaternionData(), 255, GO_STATE_READY))
|
||||
{
|
||||
delete pGameObj;
|
||||
return;
|
||||
@@ -5386,7 +5389,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
|
||||
if (Player* modOwner = m_originalCaster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod<SPELLMOD_DURATION>(m_spellInfo->Id, duration);
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration);
|
||||
|
||||
//TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
|
||||
Map* map = caster->GetMap();
|
||||
@@ -5461,7 +5464,7 @@ void Spell::EffectPlayMusic(SpellEffIndex effIndex)
|
||||
WorldPacket data(SMSG_PLAY_MUSIC, 4);
|
||||
data << uint32(soundid);
|
||||
data << uint64(unitTarget->GetGUID());
|
||||
unitTarget->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
unitTarget->ToPlayer()->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Spell::EffectSpecCount(SpellEffIndex /*effIndex*/)
|
||||
@@ -5612,7 +5615,7 @@ void Spell::EffectRechargeManaGem(SpellEffIndex /*effIndex*/)
|
||||
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item_id);
|
||||
if (!pProto)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL);
|
||||
player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, nullptr, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user