Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4
# Conflicts: # src/server/game/AI/CoreAI/PetAI.cpp # src/server/game/Battlegrounds/Battleground.cpp # src/server/game/Battlegrounds/Zones/BattlegroundTP.cpp # src/server/game/DungeonFinding/LFGMgr.h # src/server/game/DungeonFinding/LFGQueue.h # src/server/game/Entities/Creature/Creature.h # src/server/game/Entities/Pet/Pet.cpp # src/server/game/Entities/Player/Player.cpp # src/server/game/Entities/Player/Player.h # src/server/game/Entities/Unit/Unit.h # src/server/game/Globals/ObjectMgr.h # src/server/game/Groups/Group.cpp # src/server/game/Groups/Group.h # src/server/game/Guilds/Guild.cpp # src/server/game/Guilds/Guild.h # src/server/game/Handlers/GuildHandler.cpp # src/server/game/Handlers/LFGHandler.cpp # src/server/game/Handlers/MiscHandler.cpp # src/server/game/Handlers/NPCHandler.cpp # src/server/game/Instances/InstanceScript.cpp # src/server/game/Maps/Map.cpp # src/server/game/Maps/Map.h # src/server/game/Maps/ZoneScript.cpp # src/server/game/Server/WorldSession.cpp # src/server/game/Spells/SpellEffects.cpp # src/server/game/Weather/Weather.cpp # src/server/game/Weather/WeatherMgr.cpp # src/server/scripts/Commands/cs_reload.cpp # src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp # src/server/scripts/EasternKingdoms/Deadmines/deadmines.h # src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp # src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp # src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h # src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp # src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.h # src/server/scripts/Spells/spell_dk.cpp # src/server/scripts/Spells/spell_druid.cpp # src/server/scripts/Spells/spell_generic.cpp # src/server/scripts/Spells/spell_hunter.cpp # src/server/scripts/Spells/spell_mage.cpp # src/server/scripts/Spells/spell_pet.cpp # src/server/scripts/Spells/spell_shaman.cpp # src/server/scripts/Spells/spell_warrior.cpp
This commit is contained in:
commit
2cfdd3cbe0
1450 files changed
+72503
-36529
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*/)
|
||||
@@ -729,7 +733,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)
|
||||
@@ -780,7 +784,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)
|
||||
@@ -812,7 +816,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;
|
||||
}
|
||||
}
|
||||
@@ -820,7 +824,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;
|
||||
}
|
||||
|
||||
@@ -856,7 +860,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)
|
||||
@@ -1111,7 +1115,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)
|
||||
@@ -1225,7 +1229,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
|
||||
@@ -1244,7 +1248,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);
|
||||
|
||||
@@ -1359,7 +1363,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;
|
||||
}
|
||||
|
||||
@@ -1436,28 +1440,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;
|
||||
}
|
||||
|
||||
@@ -1906,9 +1909,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;
|
||||
|
||||
@@ -1951,9 +1954,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;
|
||||
|
||||
@@ -2012,9 +2015,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;
|
||||
@@ -2298,11 +2301,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2485,8 +2488,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
|
||||
{
|
||||
@@ -2946,7 +2949,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:
|
||||
@@ -3192,7 +3195,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;
|
||||
@@ -3295,7 +3298,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
|
||||
@@ -3379,7 +3382,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
|
||||
{
|
||||
@@ -3625,7 +3628,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();
|
||||
}
|
||||
@@ -3654,14 +3657,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;
|
||||
}
|
||||
@@ -3802,7 +3805,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;
|
||||
@@ -3826,8 +3829,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;
|
||||
@@ -4115,7 +4118,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)
|
||||
@@ -4163,7 +4166,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;
|
||||
@@ -4468,14 +4471,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)
|
||||
@@ -4764,7 +4767,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)
|
||||
@@ -4878,9 +4881,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
|
||||
GameObject* pGameObj = new GameObject;
|
||||
|
||||
G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(fo, 0.f, 0.f);
|
||||
|
||||
if (!pGameObj->Create(cMap->GenerateLowGuid<HighGuid::GameObject>(), name_id, cMap, 0, Position(fx, fy, fz, fo), rot, 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;
|
||||
@@ -5420,7 +5421,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();
|
||||
@@ -5495,7 +5496,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*/)
|
||||
@@ -5646,7 +5647,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