aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-06-19 23:20:06 -0300
committerariel- <ariel-@users.noreply.github.com>2017-06-19 23:20:06 -0300
commit85a7d5ce9ac68b30da2277cc91d4b70358f1880d (patch)
treedf3d2084ee2e35008903c03178039b9c986e2d08 /src/server/scripts/World
parent052fc24315ace866ea1cf610e85df119b68100c9 (diff)
Core: ported headers cleanup from master branch
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/action_ip_logger.cpp6
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp9
-rw-r--r--src/server/scripts/World/boss_emerald_dragons.cpp21
-rw-r--r--src/server/scripts/World/chat_log.cpp4
-rw-r--r--src/server/scripts/World/duel_reset.cpp7
-rw-r--r--src/server/scripts/World/go_scripts.cpp18
-rw-r--r--src/server/scripts/World/guards.cpp7
-rw-r--r--src/server/scripts/World/item_scripts.cpp40
-rw-r--r--src/server/scripts/World/mob_generic_creature.cpp7
-rw-r--r--src/server/scripts/World/npc_innkeeper.cpp4
-rw-r--r--src/server/scripts/World/npc_professions.cpp11
-rw-r--r--src/server/scripts/World/npcs_special.cpp57
12 files changed, 110 insertions, 81 deletions
diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp
index 3c515b38dfe..9dc3fba9896 100644
--- a/src/server/scripts/World/action_ip_logger.cpp
+++ b/src/server/scripts/World/action_ip_logger.cpp
@@ -16,9 +16,9 @@
*/
#include "ScriptMgr.h"
-#include "Channel.h"
-#include "Guild.h"
-#include "Group.h"
+#include "DatabaseEnv.h"
+#include "Player.h"
+#include "WorldSession.h"
enum IPLoggingTypes
{
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp
index a3fb056ba8f..a7d730f185a 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -35,10 +35,15 @@ at_brewfest
at_area_52_entrance
EndContentData */
-#include "GameTime.h"
#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
+#include "DBCStructure.h"
+#include "GameObject.h"
+#include "GameTime.h"
+#include "MotionMaster.h"
+#include "ObjectAccessor.h"
#include "Player.h"
+#include "ScriptedCreature.h"
+#include "TemporarySummon.h"
/*######
## at_coilfang_waterfall
diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp
index c674a32f43f..65bd57c2a16 100644
--- a/src/server/scripts/World/boss_emerald_dragons.cpp
+++ b/src/server/scripts/World/boss_emerald_dragons.cpp
@@ -17,12 +17,13 @@
*/
#include "ObjectMgr.h"
-#include "ScriptMgr.h"
+#include "MotionMaster.h"
+#include "PassiveAI.h"
#include "ScriptedCreature.h"
-#include "SpellScript.h"
+#include "ScriptMgr.h"
#include "Spell.h"
#include "SpellAuraEffects.h"
-#include "PassiveAI.h"
+#include "SpellScript.h"
//
// Emerald Dragon NPCs and IDs (kept here for reference)
@@ -397,7 +398,7 @@ class boss_lethon : public CreatureScript
switch (eventId)
{
case EVENT_SHADOW_BOLT_WHIRL:
- me->CastSpell((Unit*)NULL, SPELL_SHADOW_BOLT_WHIRL, false);
+ me->CastSpell((Unit*)nullptr, SPELL_SHADOW_BOLT_WHIRL, false);
events.ScheduleEvent(EVENT_SHADOW_BOLT_WHIRL, urand(15000, 30000));
break;
default:
@@ -437,7 +438,7 @@ class npc_spirit_shade : public CreatureScript
{
if (moveType == FOLLOW_MOTION_TYPE && data == _summonerGuid.GetCounter())
{
- me->CastSpell((Unit*)NULL, SPELL_DARK_OFFERING, false);
+ me->CastSpell((Unit*)nullptr, SPELL_DARK_OFFERING, false);
me->DespawnOrUnsummon(1000);
}
}
@@ -770,11 +771,11 @@ class spell_mark_of_nature : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellInfo*/) override
{
- if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_NATURE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_AURA_OF_NATURE))
- return false;
- return true;
+ return ValidateSpellInfo(
+ {
+ SPELL_MARK_OF_NATURE,
+ SPELL_AURA_OF_NATURE
+ });
}
void FilterTargets(std::list<WorldObject*>& targets)
diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp
index 9b3465174a4..90e7d4863ca 100644
--- a/src/server/scripts/World/chat_log.cpp
+++ b/src/server/scripts/World/chat_log.cpp
@@ -17,8 +17,10 @@
#include "ScriptMgr.h"
#include "Channel.h"
-#include "Guild.h"
#include "Group.h"
+#include "Guild.h"
+#include "Log.h"
+#include "Player.h"
class ChatLogScript : public PlayerScript
{
diff --git a/src/server/scripts/World/duel_reset.cpp b/src/server/scripts/World/duel_reset.cpp
index 3d8692780b6..8a794091e60 100644
--- a/src/server/scripts/World/duel_reset.cpp
+++ b/src/server/scripts/World/duel_reset.cpp
@@ -15,11 +15,14 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "GameTime.h"
#include "ScriptMgr.h"
-#include "Player.h"
+#include "GameTime.h"
#include "Pet.h"
+#include "Player.h"
+#include "SpellHistory.h"
#include "SpellInfo.h"
+#include "SpellMgr.h"
+#include "World.h"
class DuelResetScript : public PlayerScript
{
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index c6a61a1d508..d9aa9358ee7 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -46,14 +46,22 @@ go_bells
EndContentData */
#include "ScriptMgr.h"
+#include "DBCStructure.h"
+#include "GameEventMgr.h"
+#include "GameObject.h"
+#include "GameObjectAI.h"
+#include "GameTime.h"
+#include "Log.h"
+#include "MotionMaster.h"
+#include "ObjectMgr.h"
+#include "Player.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
-#include "GameObjectAI.h"
#include "Spell.h"
-#include "Player.h"
+#include "SpellInfo.h"
+#include "SpellMgr.h"
+#include "TemporarySummon.h"
#include "WorldSession.h"
-#include "GameEventMgr.h"
-#include "GameTime.h"
/*######
## go_cat_figurine
@@ -1765,7 +1773,7 @@ public:
break;
std::vector<Player*> playersNearby;
- me->GetPlayerListInGrid(playersNearby, me->GetMap()->GetVisibilityRange());
+ me->GetPlayerListInGrid(playersNearby, me->GetVisibilityRange());
for (Player* player : playersNearby)
{
if (player->GetTeamId() == TEAM_HORDE)
diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp
index a5d3ce8d500..638e53c45c5 100644
--- a/src/server/scripts/World/guards.cpp
+++ b/src/server/scripts/World/guards.cpp
@@ -30,8 +30,9 @@ guard_shattrath_scryer
EndContentData */
#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
#include "GuardAI.h"
+#include "MotionMaster.h"
+#include "ObjectAccessor.h"
#include "Player.h"
#include "SpellInfo.h"
@@ -120,7 +121,7 @@ public:
if (me->IsWithinMeleeRange(me->GetVictim()))
{
bool healing = false;
- SpellInfo const* info = NULL;
+ SpellInfo const* info = nullptr;
//Select a healing spell if less than 30% hp
if (me->HealthBelowPct(30))
@@ -156,7 +157,7 @@ public:
if (!me->IsNonMeleeSpellCast(false))
{
bool healing = false;
- SpellInfo const* info = NULL;
+ SpellInfo const* info = nullptr;
//Select a healing spell if less than 30% hp ONLY 33% of the time
if (me->HealthBelowPct(30) && 33 > urand(0, 99))
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index 64caa7ec4d1..8253aa23414 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -31,9 +31,13 @@ item_only_for_flight Items which should only useable while flying
EndContentData */
#include "ScriptMgr.h"
+#include "GameObject.h"
+#include "Item.h"
+#include "Player.h"
#include "ScriptedCreature.h"
#include "Spell.h"
-#include "Player.h"
+#include "SpellMgr.h"
+#include "TemporarySummon.h"
/*#####
# item_only_for_flight
@@ -76,7 +80,7 @@ public:
return false;
// error
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
+ player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
return true;
}
};
@@ -119,7 +123,7 @@ public:
targets.GetUnitTarget()->GetEntry() == 20748 && !targets.GetUnitTarget()->HasAura(32578))
return false;
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
+ player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
return true;
}
};
@@ -139,7 +143,7 @@ public:
return false;
else
{
- player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL);
+ player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, nullptr);
return true;
}
}
@@ -159,7 +163,7 @@ public:
ItemPosCountVec dest;
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg
if (msg == EQUIP_ERR_OK)
- player->StoreNewItem(dest, 39883, true, Item::GenerateItemRandomPropertyId(39883));
+ player->StoreNewItem(dest, 39883, true, GenerateItemRandomPropertyId(39883));
return true;
}
@@ -179,7 +183,7 @@ public:
ItemPosCountVec dest;
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar
if (msg == EQUIP_ERR_OK)
- player->StoreNewItem(dest, 44718, true, Item::GenerateItemRandomPropertyId(44718));
+ player->StoreNewItem(dest, 44718, true, GenerateItemRandomPropertyId(44718));
return true;
}
@@ -225,7 +229,7 @@ public:
bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const & /*targets*/) override
{
- GameObject* go = NULL;
+ GameObject* go = nullptr;
for (uint8 i = 0; i < CaribouTrapsNum; ++i)
{
go = player->FindNearestGameObject(CaribouTraps[i], 5.0f);
@@ -241,7 +245,7 @@ public:
float x, y, z;
go->GetClosePoint(x, y, z, go->GetCombatReach() / 3, 7.0f);
- go->SummonGameObject(GO_HIGH_QUALITY_FUR, *go, G3D::Quat(), 1);
+ go->SummonGameObject(GO_HIGH_QUALITY_FUR, *go, QuaternionData(), 1);
if (TempSummon* summon = player->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, go->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000))
{
summon->SetVisible(false);
@@ -268,16 +272,16 @@ class item_petrov_cluster_bombs : public ItemScript
public:
item_petrov_cluster_bombs() : ItemScript("item_petrov_cluster_bombs") { }
- bool OnUse(Player* player, Item* item, const SpellCastTargets & /*targets*/) override
+ bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/) override
{
if (player->GetZoneId() != ZONE_ID_HOWLING)
return false;
if (!player->GetTransport() || player->GetAreaId() != AREA_ID_SHATTERED_STRAITS)
{
- player->SendEquipError(EQUIP_ERR_NONE, item, NULL);
+ player->SendEquipError(EQUIP_ERR_NONE, item, nullptr);
- if (const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(SPELL_PETROV_BOMB))
+ if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_PETROV_BOMB))
Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_HERE);
return true;
@@ -334,7 +338,7 @@ class item_dehta_trap_smasher : public ItemScript
public:
item_dehta_trap_smasher() : ItemScript("item_dehta_trap_smasher") { }
- bool OnUse(Player* player, Item* /*item*/, const SpellCastTargets & /*targets*/) override
+ bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/) override
{
if (player->GetQuestStatus(QUEST_CANNOT_HELP_THEMSELVES) != QUEST_STATUS_INCOMPLETE)
return false;
@@ -343,7 +347,7 @@ public:
if (!pMammoth)
return false;
- GameObject* pTrap = NULL;
+ GameObject* pTrap = nullptr;
for (uint8 i = 0; i < MammothTrapsNum; ++i)
{
pTrap = player->FindNearestGameObject(MammothTraps[i], 11.0f);
@@ -370,7 +374,7 @@ class item_trident_of_nazjan : public ItemScript
public:
item_trident_of_nazjan() : ItemScript("item_Trident_of_Nazjan") { }
- bool OnUse(Player* player, Item* item, const SpellCastTargets & /*targets*/) override
+ bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/) override
{
if (player->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE)
{
@@ -379,9 +383,9 @@ public:
pLeviroth->AI()->AttackStart(player);
return false;
} else
- player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL);
+ player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, nullptr);
} else
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
+ player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
return true;
}
};
@@ -404,10 +408,10 @@ public:
if (player->FindNearestCreature(NPC_VANIRAS_SENTRY_TOTEM, 10.0f))
return false;
else
- player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, NULL);
+ player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, nullptr);
}
else
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
+ player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
return true;
}
};
diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp
index a7370fde1b5..0c71177ccac 100644
--- a/src/server/scripts/World/mob_generic_creature.cpp
+++ b/src/server/scripts/World/mob_generic_creature.cpp
@@ -17,8 +17,9 @@
*/
#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
+#include "Creature.h"
#include "PassiveAI.h"
+#include "SpellMgr.h"
class trigger_periodic : public CreatureScript
{
@@ -29,13 +30,13 @@ public:
{
trigger_periodicAI(Creature* creature) : NullCreatureAI(creature)
{
- spell = me->m_spells[0] ? sSpellMgr->GetSpellInfo(me->m_spells[0]) : NULL;
+ spell = me->m_spells[0] ? sSpellMgr->GetSpellInfo(me->m_spells[0]) : nullptr;
interval = me->GetAttackTime(BASE_ATTACK);
timer = interval;
}
uint32 timer, interval;
- const SpellInfo* spell;
+ SpellInfo const* spell;
void UpdateAI(uint32 diff) override
{
diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp
index d5cba9a7225..7db733c7f78 100644
--- a/src/server/scripts/World/npc_innkeeper.cpp
+++ b/src/server/scripts/World/npc_innkeeper.cpp
@@ -57,7 +57,7 @@ public:
{
if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !player->HasAura(SPELL_TRICK_OR_TREATED))
{
- const char* localizedEntry;
+ char const* localizedEntry;
switch (player->GetSession()->GetSessionDbcLocale())
{
case LOCALE_frFR: localizedEntry = LOCALE_TRICK_OR_TREAT_2; break;
@@ -76,7 +76,7 @@ public:
if (me->IsInnkeeper())
{
- const char* localizedEntry;
+ char const* localizedEntry;
switch (player->GetSession()->GetSessionDbcLocale())
{
case LOCALE_deDE: localizedEntry = LOCALE_INNKEEPER_3; break;
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index bfc8f19add0..9f1df957784 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -24,11 +24,14 @@ SDCategory: NPCs/GOBs
EndScriptData */
#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-#include "ScriptedGossip.h"
#include "GameObjectAI.h"
+#include "Item.h"
+#include "Log.h"
#include "Player.h"
+#include "ScriptedCreature.h"
+#include "ScriptedGossip.h"
#include "SpellInfo.h"
+#include "SpellMgr.h"
#include "WorldSession.h"
/*
@@ -288,7 +291,7 @@ bool EquippedOk(Player* player, uint32 spellId)
if (!reqSpell)
continue;
- Item* item = NULL;
+ Item* item = nullptr;
for (uint8 j = EQUIPMENT_SLOT_START; j < EQUIPMENT_SLOT_END; ++j)
{
item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, j);
@@ -433,7 +436,7 @@ void ProcessUnlearnAction(Player* player, Creature* creature, uint32 spellId, ui
player->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, creature, 0, 0);
}
else
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, NULL, NULL);
+ player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, nullptr, nullptr);
CloseGossipMenuFor(player);
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 7a8b8e77e9a..8fc60e6ace7 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -17,26 +17,27 @@
*/
#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-#include "ScriptedGossip.h"
-#include "ScriptedEscortAI.h"
-#include "ObjectMgr.h"
-#include "ScriptMgr.h"
-#include "World.h"
-#include "PassiveAI.h"
+#include "CellImpl.h"
+#include "CombatAI.h"
+#include "CreatureTextMgr.h"
#include "GameEventMgr.h"
-#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
-#include "Cell.h"
-#include "CellImpl.h"
-#include "SpellHistory.h"
-#include "SpellAuras.h"
+#include "Log.h"
+#include "MotionMaster.h"
+#include "MoveSplineInit.h"
+#include "ObjectAccessor.h"
+#include "ObjectMgr.h"
+#include "PassiveAI.h"
#include "Pet.h"
-#include "CreatureTextMgr.h"
-#include "CombatAI.h"
+#include "ScriptedEscortAI.h"
+#include "ScriptedGossip.h"
+#include "ScriptMgr.h"
#include "SmartAI.h"
+#include "SpellAuras.h"
+#include "SpellHistory.h"
+#include "SpellMgr.h"
#include "Vehicle.h"
-#include "MoveSplineInit.h"
+#include "World.h"
/*########
# npc_air_force_bots
@@ -104,13 +105,13 @@ public:
{
npc_air_force_botsAI(Creature* creature) : ScriptedAI(creature)
{
- SpawnAssoc = NULL;
+ SpawnAssoc = nullptr;
SpawnedGUID.Clear();
// find the correct spawnhandling
- static uint32 entryCount = sizeof(spawnAssociations) / sizeof(SpawnAssociation);
+ static uint8 constexpr const EntryCount = uint8(std::extent<decltype(spawnAssociations)>::value);
- for (uint8 i = 0; i < entryCount; ++i)
+ for (uint8 i = 0; i < EntryCount; ++i)
{
if (spawnAssociations[i].thisCreatureEntry == creature->GetEntry())
{
@@ -128,7 +129,7 @@ public:
if (!spawnedTemplate)
{
TC_LOG_ERROR("sql.sql", "TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", SpawnAssoc->spawnedCreatureEntry);
- SpawnAssoc = NULL;
+ SpawnAssoc = nullptr;
return;
}
}
@@ -148,7 +149,7 @@ public:
else
{
TC_LOG_ERROR("sql.sql", "TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", SpawnAssoc->spawnedCreatureEntry);
- SpawnAssoc = NULL;
+ SpawnAssoc = nullptr;
}
return summoned;
@@ -161,7 +162,7 @@ public:
if (creature && creature->IsAlive())
return creature;
- return NULL;
+ return nullptr;
}
void MoveInLineOfSight(Unit* who) override
@@ -177,7 +178,7 @@ public:
if (!playerTarget)
return;
- Creature* lastSpawnedGuard = SpawnedGUID.IsEmpty() ? NULL : GetSummonedGuard();
+ Creature* lastSpawnedGuard = SpawnedGUID.IsEmpty() ? nullptr : GetSummonedGuard();
// prevent calling Unit::GetUnit at next MoveInLineOfSight call - speedup
if (!lastSpawnedGuard)
@@ -846,7 +847,7 @@ public:
void Initialize()
{
DoctorGUID.Clear();
- Coord = NULL;
+ Coord = nullptr;
}
ObjectGuid DoctorGUID;
@@ -1810,7 +1811,7 @@ public:
void DamageTaken(Unit* doneBy, uint32& damage) override
{
me->AddThreat(doneBy, float(damage)); // just to create threat reference
- _damageTimes[doneBy->GetGUID()] = time(NULL);
+ _damageTimes[doneBy->GetGUID()] = time(nullptr);
damage = 0;
}
@@ -1830,7 +1831,7 @@ public:
{
case EVENT_TD_CHECK_COMBAT:
{
- time_t now = time(NULL);
+ time_t now = time(nullptr);
for (std::unordered_map<ObjectGuid, time_t>::iterator itr = _damageTimes.begin(); itr != _damageTimes.end();)
{
// If unit has not dealt damage to training dummy for 5 seconds, remove him from combat
@@ -2180,7 +2181,7 @@ public:
GameObject* FindNearestLauncher()
{
- GameObject* launcher = NULL;
+ GameObject* launcher = nullptr;
if (isCluster())
{
@@ -2295,7 +2296,7 @@ public:
break;
}
- const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
+ SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (spellInfo && spellInfo->Effects[0].Effect == SPELL_EFFECT_SUMMON_OBJECT_WILD)
return spellInfo->Effects[0].MiscValue;
@@ -2340,7 +2341,7 @@ public:
float displacement = 0.7f;
for (uint8 i = 0; i < 4; i++)
- me->SummonGameObject(GetFireworkGameObjectId(), me->GetPositionX() + (i % 2 == 0 ? displacement : -displacement), me->GetPositionY() + (i > 1 ? displacement : -displacement), me->GetPositionZ() + 4.0f, me->GetOrientation(), G3D::Quat(), 1);
+ me->SummonGameObject(GetFireworkGameObjectId(), me->GetPositionX() + (i % 2 == 0 ? displacement : -displacement), me->GetPositionY() + (i > 1 ? displacement : -displacement), me->GetPositionZ() + 4.0f, me->GetOrientation(), QuaternionData(), 1);
}
else
//me->CastSpell(me, GetFireworkSpell(me->GetEntry()), true);