mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Scripts: Mark script base class constructors noexcept
This commit is contained in:
@@ -18,11 +18,9 @@
|
||||
#include "AreaTrigger.h"
|
||||
#include "AreaTriggerAI.h"
|
||||
|
||||
AreaTriggerAI::AreaTriggerAI(AreaTrigger* a, uint32 scriptId) : _scriptId(scriptId ? scriptId : a->GetScriptId()), at(a)
|
||||
AreaTriggerAI::AreaTriggerAI(AreaTrigger* a, uint32 scriptId) noexcept : _scriptId(scriptId ? scriptId : a->GetScriptId()), at(a)
|
||||
{
|
||||
ASSERT(_scriptId, "A AreaTriggerAI was initialized with an invalid scriptId!");
|
||||
}
|
||||
|
||||
AreaTriggerAI::~AreaTriggerAI()
|
||||
{
|
||||
}
|
||||
AreaTriggerAI::~AreaTriggerAI() = default;
|
||||
|
||||
@@ -32,7 +32,11 @@ class TC_GAME_API AreaTriggerAI
|
||||
protected:
|
||||
AreaTrigger* const at;
|
||||
public:
|
||||
explicit AreaTriggerAI(AreaTrigger* a, uint32 scriptId = {});
|
||||
explicit AreaTriggerAI(AreaTrigger* a, uint32 scriptId = {}) noexcept;
|
||||
AreaTriggerAI(AreaTriggerAI const&) = delete;
|
||||
AreaTriggerAI(AreaTriggerAI&&) = delete;
|
||||
AreaTriggerAI& operator=(AreaTriggerAI const&) = delete;
|
||||
AreaTriggerAI& operator=(AreaTriggerAI&&) = delete;
|
||||
virtual ~AreaTriggerAI();
|
||||
|
||||
// Called when the AreaTrigger has just been initialized, just before added to map
|
||||
|
||||
@@ -188,7 +188,7 @@ void CasterAI::UpdateAI(uint32 diff)
|
||||
// TurretAI
|
||||
//////////////
|
||||
|
||||
TurretAI::TurretAI(Creature* creature, uint32 scriptId) : CreatureAI(creature, scriptId)
|
||||
TurretAI::TurretAI(Creature* creature, uint32 scriptId) noexcept : CreatureAI(creature, scriptId)
|
||||
{
|
||||
if (!creature->m_spells[0])
|
||||
TC_LOG_ERROR("scripts.ai", "TurretAI set for creature with spell1 = 0. AI will do nothing ({})", creature->GetGUID().ToString());
|
||||
@@ -226,7 +226,7 @@ void TurretAI::UpdateAI(uint32 /*diff*/)
|
||||
// VehicleAI
|
||||
//////////////
|
||||
|
||||
VehicleAI::VehicleAI(Creature* creature, uint32 scriptId) : CreatureAI(creature, scriptId), _hasConditions(false), _conditionsTimer(VEHICLE_CONDITION_CHECK_TIME)
|
||||
VehicleAI::VehicleAI(Creature* creature, uint32 scriptId) noexcept : CreatureAI(creature, scriptId), _hasConditions(false), _conditionsTimer(VEHICLE_CONDITION_CHECK_TIME)
|
||||
{
|
||||
LoadConditions();
|
||||
_dismiss = false;
|
||||
|
||||
@@ -68,7 +68,7 @@ class TC_GAME_API CasterAI : public CombatAI
|
||||
struct TC_GAME_API TurretAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit TurretAI(Creature* creature, uint32 scriptId = {});
|
||||
explicit TurretAI(Creature* creature, uint32 scriptId = {}) noexcept;
|
||||
bool CanAIAttack(Unit const* who) const override;
|
||||
void AttackStart(Unit* who) override;
|
||||
void UpdateAI(uint32 diff) override;
|
||||
@@ -85,7 +85,7 @@ struct TC_GAME_API TurretAI : public CreatureAI
|
||||
struct TC_GAME_API VehicleAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit VehicleAI(Creature* creature, uint32 scriptId = {});
|
||||
explicit VehicleAI(Creature* creature, uint32 scriptId = {}) noexcept;
|
||||
|
||||
void UpdateAI(uint32 diff) override;
|
||||
void MoveInLineOfSight(Unit*) override { }
|
||||
|
||||
@@ -15,14 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Conversation.h"
|
||||
#include "ConversationAI.h"
|
||||
#include "Conversation.h"
|
||||
|
||||
ConversationAI::ConversationAI(Conversation* c, uint32 scriptId) : _scriptId(scriptId ? scriptId : c->GetScriptId()), conversation(c)
|
||||
ConversationAI::ConversationAI(Conversation* c, uint32 scriptId) noexcept : _scriptId(scriptId ? scriptId : c->GetScriptId()), conversation(c)
|
||||
{
|
||||
ASSERT(_scriptId, "A ConversationAI was initialized with an invalid scriptId!");
|
||||
}
|
||||
|
||||
ConversationAI::~ConversationAI()
|
||||
{
|
||||
}
|
||||
ConversationAI::~ConversationAI() = default;
|
||||
|
||||
@@ -32,7 +32,11 @@ class TC_GAME_API ConversationAI
|
||||
protected:
|
||||
Conversation* const conversation;
|
||||
public:
|
||||
explicit ConversationAI(Conversation* c, uint32 scriptId = {});
|
||||
explicit ConversationAI(Conversation* c, uint32 scriptId = {}) noexcept;
|
||||
ConversationAI(ConversationAI const&) = delete;
|
||||
ConversationAI(ConversationAI&&) = delete;
|
||||
ConversationAI& operator=(ConversationAI const&) = delete;
|
||||
ConversationAI& operator=(ConversationAI&&) = delete;
|
||||
virtual ~ConversationAI();
|
||||
|
||||
// Called when the Conversation has just been initialized, just before added to map
|
||||
|
||||
@@ -26,11 +26,13 @@ int32 GameObjectAI::Permissible(GameObject const* /*go*/)
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
GameObjectAI::GameObjectAI(GameObject* go, uint32 scriptId) : _scriptId(scriptId ? scriptId : go->GetScriptId()), me(go)
|
||||
GameObjectAI::GameObjectAI(GameObject* go, uint32 scriptId) noexcept : _scriptId(scriptId ? scriptId : go->GetScriptId()), me(go)
|
||||
{
|
||||
ASSERT(_scriptId, "A GameObjectAI was initialized with an invalid scriptId!");
|
||||
}
|
||||
|
||||
GameObjectAI::~GameObjectAI() = default;
|
||||
|
||||
Optional<QuestGiverStatus> GameObjectAI::GetDialogStatus(Player const* /*player*/)
|
||||
{
|
||||
return {};
|
||||
|
||||
@@ -50,8 +50,12 @@ class TC_GAME_API GameObjectAI
|
||||
GameObject* const me;
|
||||
|
||||
public:
|
||||
explicit GameObjectAI(GameObject* go, uint32 scriptId = {});
|
||||
virtual ~GameObjectAI() { }
|
||||
explicit GameObjectAI(GameObject* go, uint32 scriptId = {}) noexcept;
|
||||
GameObjectAI(GameObjectAI const&) = delete;
|
||||
GameObjectAI(GameObjectAI&&) = delete;
|
||||
GameObjectAI& operator=(GameObjectAI const&) = delete;
|
||||
GameObjectAI& operator=(GameObjectAI&&) = delete;
|
||||
virtual ~GameObjectAI();
|
||||
|
||||
// Gets the id of the AI (script id)
|
||||
uint32 GetId() const { return _scriptId; }
|
||||
|
||||
@@ -19,18 +19,18 @@
|
||||
#include "Creature.h"
|
||||
#include "World.h"
|
||||
|
||||
PassiveAI::PassiveAI(Creature* c, uint32 scriptId) : CreatureAI(c, scriptId)
|
||||
PassiveAI::PassiveAI(Creature* c, uint32 scriptId) noexcept : CreatureAI(c, scriptId)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetCanMelee(false);
|
||||
}
|
||||
|
||||
PossessedAI::PossessedAI(Creature* c, uint32 scriptId) : CreatureAI(c, scriptId)
|
||||
PossessedAI::PossessedAI(Creature* c, uint32 scriptId) noexcept : CreatureAI(c, scriptId)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
NullCreatureAI::NullCreatureAI(Creature* c, uint32 scriptId) : CreatureAI(c, scriptId)
|
||||
NullCreatureAI::NullCreatureAI(Creature* c, uint32 scriptId) noexcept : CreatureAI(c, scriptId)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetCanMelee(false);
|
||||
@@ -73,7 +73,7 @@ void PossessedAI::JustDied(Unit* /*u*/)
|
||||
me->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
}
|
||||
|
||||
CritterAI::CritterAI(Creature* creature, uint32 scriptId) : PassiveAI(creature, scriptId)
|
||||
CritterAI::CritterAI(Creature* creature, uint32 scriptId) noexcept : PassiveAI(creature, scriptId)
|
||||
{
|
||||
me->SetCanMelee(false, true);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
class TC_GAME_API PassiveAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit PassiveAI(Creature* creature, uint32 scriptId = {});
|
||||
explicit PassiveAI(Creature* creature, uint32 scriptId = {}) noexcept;
|
||||
|
||||
void MoveInLineOfSight(Unit*) override { }
|
||||
void AttackStart(Unit*) override { }
|
||||
@@ -36,7 +36,7 @@ class TC_GAME_API PassiveAI : public CreatureAI
|
||||
class TC_GAME_API PossessedAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit PossessedAI(Creature* creature, uint32 scriptId = {});
|
||||
explicit PossessedAI(Creature* creature, uint32 scriptId = {}) noexcept;
|
||||
|
||||
void MoveInLineOfSight(Unit*) override { }
|
||||
void AttackStart(Unit* target) override;
|
||||
@@ -54,7 +54,7 @@ class TC_GAME_API PossessedAI : public CreatureAI
|
||||
class TC_GAME_API NullCreatureAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit NullCreatureAI(Creature* creature, uint32 scriptId = {});
|
||||
explicit NullCreatureAI(Creature* creature, uint32 scriptId = {}) noexcept;
|
||||
|
||||
void MoveInLineOfSight(Unit*) override { }
|
||||
void AttackStart(Unit*) override { }
|
||||
@@ -71,7 +71,7 @@ class TC_GAME_API NullCreatureAI : public CreatureAI
|
||||
class TC_GAME_API CritterAI : public PassiveAI
|
||||
{
|
||||
public:
|
||||
explicit CritterAI(Creature* creature, uint32 scriptId = {});
|
||||
explicit CritterAI(Creature* creature, uint32 scriptId = {}) noexcept;
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override;
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScheduledChangeAI.h"
|
||||
|
||||
ScheduledChangeAI::ScheduledChangeAI(Creature* creature, uint32 scriptId /*= {}*/): CreatureAI(creature, scriptId)
|
||||
{
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
class TC_GAME_API ScheduledChangeAI final : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit ScheduledChangeAI(Creature* creature, uint32 scriptId = {});
|
||||
using CreatureAI::CreatureAI;
|
||||
|
||||
void MoveInLineOfSight(Unit*) override { }
|
||||
void AttackStart(Unit*) override { }
|
||||
|
||||
@@ -33,7 +33,7 @@ int32 TotemAI::Permissible(Creature const* creature)
|
||||
return PERMIT_BASE_NO;
|
||||
}
|
||||
|
||||
TotemAI::TotemAI(Creature* creature, uint32 scriptId) : NullCreatureAI(creature, scriptId), _victimGUID()
|
||||
TotemAI::TotemAI(Creature* creature, uint32 scriptId) noexcept : NullCreatureAI(creature, scriptId), _victimGUID()
|
||||
{
|
||||
ASSERT(creature->IsTotem(), "TotemAI: AI assigned to a non-totem creature (%s)!", creature->GetGUID().ToString().c_str());
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class Totem;
|
||||
class TC_GAME_API TotemAI : public NullCreatureAI
|
||||
{
|
||||
public:
|
||||
explicit TotemAI(Creature* creature, uint32 scriptId = {});
|
||||
explicit TotemAI(Creature* creature, uint32 scriptId = {}) noexcept;
|
||||
|
||||
void AttackStart(Unit* victim) override;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ AISpellInfoType* GetAISpellInfo(uint32 spellId, Difficulty difficulty)
|
||||
return Trinity::Containers::MapGetValuePtr(UnitAI::AISpellInfo, { spellId, difficulty });
|
||||
}
|
||||
|
||||
CreatureAI::CreatureAI(Creature* creature, uint32 scriptId)
|
||||
CreatureAI::CreatureAI(Creature* creature, uint32 scriptId) noexcept
|
||||
: UnitAI(creature), me(creature), _boundary(nullptr),
|
||||
_negateBoundary(false), _scriptId(scriptId ? scriptId : creature->GetScriptId()), _isEngaged(false), _moveInLOSLocked(false)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ class TC_GAME_API CreatureAI : public UnitAI
|
||||
Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, Milliseconds despawnTime = 30s, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
|
||||
public:
|
||||
explicit CreatureAI(Creature* creature, uint32 scriptId = {});
|
||||
explicit CreatureAI(Creature* creature, uint32 scriptId = {}) noexcept;
|
||||
|
||||
virtual ~CreatureAI();
|
||||
|
||||
|
||||
@@ -122,9 +122,7 @@ void SummonList::DoActionImpl(int32 action, StorageType& summons, uint16 max)
|
||||
}
|
||||
}
|
||||
|
||||
ScriptedAI::ScriptedAI(Creature* creature) : ScriptedAI(creature, creature->GetScriptId()) { }
|
||||
|
||||
ScriptedAI::ScriptedAI(Creature* creature, uint32 scriptId) : CreatureAI(creature, scriptId), _isCombatMovementAllowed(true)
|
||||
ScriptedAI::ScriptedAI(Creature* creature, uint32 scriptId) noexcept : CreatureAI(creature, scriptId), _isCombatMovementAllowed(true)
|
||||
{
|
||||
_difficulty = me->GetMap()->GetDifficultyID();
|
||||
}
|
||||
@@ -528,7 +526,7 @@ void ScriptedAI::SetCombatMovement(bool allowMovement)
|
||||
}
|
||||
|
||||
// BossAI - for instanced bosses
|
||||
BossAI::BossAI(Creature* creature, uint32 bossId) : ScriptedAI(creature), instance(creature->GetInstanceScript()), summons(creature), _bossId(bossId)
|
||||
BossAI::BossAI(Creature* creature, uint32 bossId) noexcept : ScriptedAI(creature), instance(creature->GetInstanceScript()), summons(creature), _bossId(bossId)
|
||||
{
|
||||
if (instance)
|
||||
SetBoundary(instance->GetBossBoundary(bossId));
|
||||
@@ -657,7 +655,7 @@ void BossAI::_DespawnAtEvade(Seconds delayToRespawn /*= 30s*/, Creature* who /*=
|
||||
}
|
||||
|
||||
// WorldBossAI - for non-instanced bosses
|
||||
WorldBossAI::WorldBossAI(Creature* creature) : ScriptedAI(creature), summons(creature) { }
|
||||
WorldBossAI::WorldBossAI(Creature* creature) noexcept : ScriptedAI(creature), summons(creature) { }
|
||||
|
||||
WorldBossAI::~WorldBossAI() = default;
|
||||
|
||||
|
||||
@@ -133,8 +133,7 @@ class TC_GAME_API DummyEntryCheckPredicate
|
||||
struct TC_GAME_API ScriptedAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit ScriptedAI(Creature* creature);
|
||||
explicit ScriptedAI(Creature* creature, uint32 scriptId);
|
||||
explicit ScriptedAI(Creature* creature, uint32 scriptId = 0) noexcept;
|
||||
virtual ~ScriptedAI() { }
|
||||
|
||||
// *************
|
||||
@@ -308,7 +307,7 @@ struct TC_GAME_API ScriptedAI : public CreatureAI
|
||||
class TC_GAME_API BossAI : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
BossAI(Creature* creature, uint32 bossId);
|
||||
explicit BossAI(Creature* creature, uint32 bossId) noexcept;
|
||||
virtual ~BossAI();
|
||||
|
||||
InstanceScript* const instance;
|
||||
@@ -355,7 +354,7 @@ class TC_GAME_API BossAI : public ScriptedAI
|
||||
class TC_GAME_API WorldBossAI : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
WorldBossAI(Creature* creature);
|
||||
explicit WorldBossAI(Creature* creature) noexcept;
|
||||
virtual ~WorldBossAI();
|
||||
|
||||
void JustSummoned(Creature* summon) override;
|
||||
|
||||
@@ -34,7 +34,7 @@ enum Points
|
||||
POINT_HOME = 0xFFFFFE
|
||||
};
|
||||
|
||||
EscortAI::EscortAI(Creature* creature) : ScriptedAI(creature), _pauseTimer(2500ms), _playerCheckTimer(1000), _escortState(STATE_ESCORT_NONE), _maxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE),
|
||||
EscortAI::EscortAI(Creature* creature) noexcept : ScriptedAI(creature), _pauseTimer(2500ms), _playerCheckTimer(1000), _escortState(STATE_ESCORT_NONE), _maxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE),
|
||||
_escortQuest(nullptr), _activeAttacker(true), _instantRespawn(false), _returnToStart(false), _despawnAtEnd(true), _despawnAtFar(true),
|
||||
_hasImmuneToNPCFlags(false), _started(false), _ended(false), _resume(false)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ enum EscortState : uint32
|
||||
struct TC_GAME_API EscortAI : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
explicit EscortAI(Creature* creature);
|
||||
explicit EscortAI(Creature* creature) noexcept;
|
||||
~EscortAI() { }
|
||||
|
||||
void InitializeAI() override;
|
||||
|
||||
@@ -31,7 +31,7 @@ enum Points
|
||||
POINT_COMBAT_START = 0xFFFFFF
|
||||
};
|
||||
|
||||
FollowerAI::FollowerAI(Creature* creature) : ScriptedAI(creature), _updateFollowTimer(2500), _followState(STATE_FOLLOW_NONE), _questForFollow(0) { }
|
||||
FollowerAI::FollowerAI(Creature* creature) noexcept : ScriptedAI(creature), _updateFollowTimer(2500), _followState(STATE_FOLLOW_NONE), _questForFollow(0) { }
|
||||
|
||||
void FollowerAI::MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ enum FollowerState : uint32
|
||||
class TC_GAME_API FollowerAI : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
explicit FollowerAI(Creature* creature);
|
||||
explicit FollowerAI(Creature* creature) noexcept;
|
||||
~FollowerAI() { }
|
||||
|
||||
void MoveInLineOfSight(Unit*) override;
|
||||
|
||||
@@ -71,9 +71,11 @@ SmartScript::SmartScript()
|
||||
mAllEventFlags = 0;
|
||||
}
|
||||
|
||||
SmartScript::~SmartScript()
|
||||
{
|
||||
}
|
||||
SmartScript::SmartScript(SmartScript const& other) = default;
|
||||
SmartScript::SmartScript(SmartScript&& other) noexcept = default;
|
||||
SmartScript& SmartScript::operator=(SmartScript const& other) = default;
|
||||
SmartScript& SmartScript::operator=(SmartScript&& other) noexcept = default;
|
||||
SmartScript::~SmartScript() = default;
|
||||
|
||||
bool SmartScript::IsSmart(Creature* c, bool silent) const
|
||||
{
|
||||
|
||||
@@ -42,6 +42,10 @@ class TC_GAME_API SmartScript
|
||||
{
|
||||
public:
|
||||
SmartScript();
|
||||
SmartScript(SmartScript const& other);
|
||||
SmartScript(SmartScript&& other) noexcept;
|
||||
SmartScript& operator=(SmartScript const& other);
|
||||
SmartScript& operator=(SmartScript&& other) noexcept;
|
||||
~SmartScript();
|
||||
|
||||
void OnInitialize(WorldObject* obj, AreaTriggerEntry const* at = nullptr, SceneTemplate const* scene = nullptr, Quest const* qst = nullptr, uint32 evnt = 0);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldStateMgr.h"
|
||||
|
||||
BattlegroundScript::BattlegroundScript(BattlegroundMap* map) : battlegroundMap(map), battleground(map->GetBG())
|
||||
BattlegroundScript::BattlegroundScript(BattlegroundMap* map) noexcept : battlegroundMap(map), battleground(map->GetBG())
|
||||
{
|
||||
#ifdef TRINITY_API_USE_DYNAMIC_LINKING
|
||||
BattlegroundScriptTemplate const* scriptTemplate = sBattlegroundMgr->FindBattlegroundScriptTemplate(battlegroundMap->GetId(), battlegroundMap->GetBG()->GetTypeID());
|
||||
|
||||
@@ -32,7 +32,7 @@ class ModuleReference;
|
||||
class TC_GAME_API BattlegroundScript : public ZoneScript
|
||||
{
|
||||
public:
|
||||
explicit BattlegroundScript(BattlegroundMap* map);
|
||||
explicit BattlegroundScript(BattlegroundMap* map) noexcept;
|
||||
~BattlegroundScript() override = default;
|
||||
|
||||
virtual void OnInit() { }
|
||||
|
||||
@@ -64,7 +64,7 @@ DungeonEncounterEntry const* BossInfo::GetDungeonEncounterForDifficulty(Difficul
|
||||
return itr != DungeonEncounters.end() ? *itr : nullptr;
|
||||
}
|
||||
|
||||
InstanceScript::InstanceScript(InstanceMap* map) : instance(map), _instanceSpawnGroups(sObjectMgr->GetInstanceSpawnGroupsForMap(map->GetId())),
|
||||
InstanceScript::InstanceScript(InstanceMap* map) noexcept : instance(map), _instanceSpawnGroups(sObjectMgr->GetInstanceSpawnGroupsForMap(map->GetId())),
|
||||
_entranceId(0), _temporaryEntranceId(0), _combatResurrectionTimer(0), _combatResurrectionCharges(0), _combatResurrectionTimerStarted(false)
|
||||
{
|
||||
#ifdef TRINITY_API_USE_DYNAMIC_LINKING
|
||||
|
||||
@@ -182,7 +182,7 @@ typedef std::map<uint32 /*entry*/, uint32 /*type*/> ObjectInfoMap;
|
||||
class TC_GAME_API InstanceScript : public ZoneScript
|
||||
{
|
||||
public:
|
||||
explicit InstanceScript(InstanceMap* map);
|
||||
explicit InstanceScript(InstanceMap* map) noexcept;
|
||||
InstanceScript(InstanceScript const& right) = delete;
|
||||
InstanceScript(InstanceScript&& right) = delete;
|
||||
InstanceScript& operator=(InstanceScript const& right) = delete;
|
||||
|
||||
@@ -26,7 +26,7 @@ ControlZoneHandler& ControlZoneHandler::operator=(ControlZoneHandler const& righ
|
||||
ControlZoneHandler& ControlZoneHandler::operator=(ControlZoneHandler&& right) noexcept = default;
|
||||
ControlZoneHandler::~ControlZoneHandler() = default;
|
||||
|
||||
ZoneScript::ZoneScript() = default;
|
||||
ZoneScript::ZoneScript() noexcept = default;
|
||||
ZoneScript::ZoneScript(ZoneScript const& right) = default;
|
||||
ZoneScript::ZoneScript(ZoneScript&& right) noexcept = default;
|
||||
ZoneScript& ZoneScript::operator=(ZoneScript const& right) = default;
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
class TC_GAME_API ZoneScript
|
||||
{
|
||||
public:
|
||||
ZoneScript();
|
||||
ZoneScript() noexcept;
|
||||
ZoneScript(ZoneScript const& right);
|
||||
ZoneScript(ZoneScript&& right) noexcept;
|
||||
ZoneScript& operator=(ZoneScript const& right);
|
||||
|
||||
@@ -150,8 +150,8 @@ enum Spells
|
||||
class ScriptRegistryInterface
|
||||
{
|
||||
public:
|
||||
ScriptRegistryInterface() { }
|
||||
virtual ~ScriptRegistryInterface() { }
|
||||
ScriptRegistryInterface() = default;
|
||||
virtual ~ScriptRegistryInterface() = default;
|
||||
|
||||
ScriptRegistryInterface(ScriptRegistryInterface const&) = delete;
|
||||
ScriptRegistryInterface(ScriptRegistryInterface&&) = delete;
|
||||
@@ -183,7 +183,7 @@ class ScriptRegistry;
|
||||
class ScriptRegistryCompositum
|
||||
: public ScriptRegistryInterface
|
||||
{
|
||||
ScriptRegistryCompositum() { }
|
||||
ScriptRegistryCompositum() noexcept = default;
|
||||
|
||||
template<class>
|
||||
friend class ScriptRegistry;
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
void QueueForDelayedDelete(T&& any)
|
||||
{
|
||||
_delayed_delete_queue.push_back(
|
||||
std::make_unique<
|
||||
std::make_unique<
|
||||
DeleteableObject<typename std::decay<T>::type>
|
||||
>(std::forward<T>(any))
|
||||
);
|
||||
@@ -317,7 +317,7 @@ class ScriptRegistry final
|
||||
: public SpecializedScriptRegistry<
|
||||
ScriptType, is_script_database_bound<ScriptType>::value>
|
||||
{
|
||||
ScriptRegistry()
|
||||
ScriptRegistry() noexcept
|
||||
{
|
||||
sScriptRegistryCompositum->Register(this);
|
||||
}
|
||||
@@ -360,7 +360,7 @@ public:
|
||||
virtual void BeforeUnload() { }
|
||||
|
||||
/// Called manually to sync scriptnames
|
||||
virtual void OnScriptNamesSync() { };
|
||||
virtual void OnScriptNamesSync() { }
|
||||
};
|
||||
|
||||
template<typename ScriptType, typename Base>
|
||||
@@ -1004,7 +1004,7 @@ class SpecializedScriptRegistry<ScriptType, true>
|
||||
friend class CreatureGameObjectAreaTriggerConversationScriptRegistrySwapHooks;
|
||||
|
||||
public:
|
||||
SpecializedScriptRegistry() { }
|
||||
SpecializedScriptRegistry() noexcept = default;
|
||||
|
||||
typedef std::unordered_map<
|
||||
uint32 /*script id*/,
|
||||
@@ -1052,7 +1052,7 @@ public:
|
||||
}
|
||||
|
||||
// Adds a database bound script
|
||||
void AddScript(ScriptType* script)
|
||||
void AddScript(ScriptType* script) noexcept
|
||||
{
|
||||
ASSERT(script,
|
||||
"Tried to call AddScript with a nullpointer!");
|
||||
@@ -1169,7 +1169,7 @@ public:
|
||||
typedef std::unordered_multimap<std::string /*context*/, std::unique_ptr<ScriptType>> ScriptStoreType;
|
||||
typedef typename ScriptStoreType::iterator ScriptStoreIteratorType;
|
||||
|
||||
SpecializedScriptRegistry() { }
|
||||
SpecializedScriptRegistry() noexcept = default;
|
||||
|
||||
void ReleaseContext(std::string const& context) final override
|
||||
{
|
||||
@@ -1201,7 +1201,7 @@ public:
|
||||
}
|
||||
|
||||
// Adds a non database bound script
|
||||
void AddScript(ScriptType* script)
|
||||
void AddScript(ScriptType* script) noexcept
|
||||
{
|
||||
ASSERT(script,
|
||||
"Tried to call AddScript with a nullpointer!");
|
||||
@@ -1266,7 +1266,7 @@ private:
|
||||
if (!V) \
|
||||
return R;
|
||||
|
||||
ScriptObject::ScriptObject(char const* name) : _name(name)
|
||||
ScriptObject::ScriptObject(char const* name) noexcept : _name(name)
|
||||
{
|
||||
sScriptMgr->IncreaseScriptCount();
|
||||
}
|
||||
@@ -1420,8 +1420,8 @@ void ScriptMgr::FillSpellSummary()
|
||||
UnitAI::FillAISpellInfo();
|
||||
}
|
||||
|
||||
template<typename T, typename O>
|
||||
void CreateSpellOrAuraScripts(uint32 spellId, std::vector<T*>& scriptVector, T*(SpellScriptLoader::*extractor)() const, O* objectInvoker)
|
||||
template<typename T, Trinity::invocable_r<T*, SpellScriptLoader const*> GetScriptFn, typename O>
|
||||
void CreateSpellOrAuraScripts(uint32 spellId, std::vector<T*>& scriptVector, GetScriptFn extractor, O* objectInvoker)
|
||||
{
|
||||
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
|
||||
for (auto itr = bounds.first; itr != bounds.second; ++itr)
|
||||
@@ -1430,11 +1430,11 @@ void CreateSpellOrAuraScripts(uint32 spellId, std::vector<T*>& scriptVector, T*(
|
||||
if (!itr->second.second)
|
||||
continue;
|
||||
|
||||
SpellScriptLoader* tmpscript = sScriptMgr->GetSpellScriptLoader(itr->second.first);
|
||||
SpellScriptLoader const* tmpscript = sScriptMgr->GetSpellScriptLoader(itr->second.first);
|
||||
if (!tmpscript)
|
||||
continue;
|
||||
|
||||
T* script = (tmpscript->*extractor)();
|
||||
T* script = extractor(tmpscript);
|
||||
if (!script)
|
||||
continue;
|
||||
|
||||
@@ -1451,12 +1451,12 @@ void CreateSpellOrAuraScripts(uint32 spellId, std::vector<T*>& scriptVector, T*(
|
||||
|
||||
void ScriptMgr::CreateSpellScripts(uint32 spellId, std::vector<SpellScript*>& scriptVector, Spell* invoker) const
|
||||
{
|
||||
CreateSpellOrAuraScripts(spellId, scriptVector, &SpellScriptLoader::GetSpellScript, invoker);
|
||||
CreateSpellOrAuraScripts(spellId, scriptVector, [](SpellScriptLoader const* loader) { return loader->GetSpellScript(); }, invoker);
|
||||
}
|
||||
|
||||
void ScriptMgr::CreateAuraScripts(uint32 spellId, std::vector<AuraScript*>& scriptVector, Aura* invoker) const
|
||||
{
|
||||
CreateSpellOrAuraScripts(spellId, scriptVector, &SpellScriptLoader::GetAuraScript, invoker);
|
||||
CreateSpellOrAuraScripts(spellId, scriptVector, [](SpellScriptLoader const* loader) { return loader->GetAuraScript(); }, invoker);
|
||||
}
|
||||
|
||||
SpellScriptLoader* ScriptMgr::GetSpellScriptLoader(uint32 scriptId)
|
||||
@@ -2383,7 +2383,7 @@ void ScriptMgr::OnEventTrigger(WorldObject* object, WorldObject* invoker, uint32
|
||||
tmpscript->OnTrigger(object, invoker, eventId);
|
||||
}
|
||||
|
||||
SpellScriptLoader::SpellScriptLoader(char const* name)
|
||||
SpellScriptLoader::SpellScriptLoader(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<SpellScriptLoader>::Instance()->AddScript(this);
|
||||
@@ -2399,7 +2399,7 @@ AuraScript* SpellScriptLoader::GetAuraScript() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ServerScript::ServerScript(char const* name)
|
||||
ServerScript::ServerScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<ServerScript>::Instance()->AddScript(this);
|
||||
@@ -2431,7 +2431,7 @@ void ServerScript::OnPacketReceive(WorldSession* /*session*/, WorldPacket& /*pac
|
||||
{
|
||||
}
|
||||
|
||||
WorldScript::WorldScript(char const* name)
|
||||
WorldScript::WorldScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<WorldScript>::Instance()->AddScript(this);
|
||||
@@ -2471,7 +2471,7 @@ void WorldScript::OnShutdown()
|
||||
{
|
||||
}
|
||||
|
||||
FormulaScript::FormulaScript(char const* name)
|
||||
FormulaScript::FormulaScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<FormulaScript>::Instance()->AddScript(this);
|
||||
@@ -2508,7 +2508,7 @@ void FormulaScript::OnGroupRateCalculation(float& /*rate*/, uint32 /*count*/, bo
|
||||
}
|
||||
|
||||
template <class TMap>
|
||||
MapScript<TMap>::MapScript(MapEntry const* mapEntry) : _mapEntry(mapEntry)
|
||||
MapScript<TMap>::MapScript(MapEntry const* mapEntry) noexcept : _mapEntry(mapEntry)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2547,7 +2547,7 @@ template class TC_GAME_API MapScript<Map>;
|
||||
template class TC_GAME_API MapScript<InstanceMap>;
|
||||
template class TC_GAME_API MapScript<BattlegroundMap>;
|
||||
|
||||
WorldMapScript::WorldMapScript(char const* name, uint32 mapId)
|
||||
WorldMapScript::WorldMapScript(char const* name, uint32 mapId) noexcept
|
||||
: ScriptObject(name), MapScript(sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (!GetEntry())
|
||||
@@ -2561,7 +2561,7 @@ WorldMapScript::WorldMapScript(char const* name, uint32 mapId)
|
||||
|
||||
WorldMapScript::~WorldMapScript() = default;
|
||||
|
||||
InstanceMapScript::InstanceMapScript(char const* name, uint32 mapId)
|
||||
InstanceMapScript::InstanceMapScript(char const* name, uint32 mapId) noexcept
|
||||
: ScriptObject(name), MapScript(sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (!GetEntry())
|
||||
@@ -2580,7 +2580,7 @@ InstanceScript* InstanceMapScript::GetInstanceScript(InstanceMap* /*map*/) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BattlegroundMapScript::BattlegroundMapScript(char const* name, uint32 mapId)
|
||||
BattlegroundMapScript::BattlegroundMapScript(char const* name, uint32 mapId) noexcept
|
||||
: ScriptObject(name), MapScript(sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (!GetEntry())
|
||||
@@ -2599,7 +2599,7 @@ BattlegroundScript* BattlegroundMapScript::GetBattlegroundScript(BattlegroundMap
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ItemScript::ItemScript(char const* name)
|
||||
ItemScript::ItemScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<ItemScript>::Instance()->AddScript(this);
|
||||
@@ -2632,7 +2632,7 @@ bool ItemScript::OnCastItemCombatSpell(Player* /*player*/, Unit* /*victim*/, Spe
|
||||
return true;
|
||||
}
|
||||
|
||||
UnitScript::UnitScript(char const* name)
|
||||
UnitScript::UnitScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<UnitScript>::Instance()->AddScript(this);
|
||||
@@ -2660,7 +2660,7 @@ void UnitScript::ModifySpellDamageTaken(Unit* /*target*/, Unit* /*attacker*/, in
|
||||
{
|
||||
}
|
||||
|
||||
CreatureScript::CreatureScript(char const* name)
|
||||
CreatureScript::CreatureScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<CreatureScript>::Instance()->AddScript(this);
|
||||
@@ -2668,7 +2668,7 @@ CreatureScript::CreatureScript(char const* name)
|
||||
|
||||
CreatureScript::~CreatureScript() = default;
|
||||
|
||||
GameObjectScript::GameObjectScript(char const* name)
|
||||
GameObjectScript::GameObjectScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<GameObjectScript>::Instance()->AddScript(this);
|
||||
@@ -2676,7 +2676,7 @@ GameObjectScript::GameObjectScript(char const* name)
|
||||
|
||||
GameObjectScript::~GameObjectScript() = default;
|
||||
|
||||
AreaTriggerScript::AreaTriggerScript(char const* name)
|
||||
AreaTriggerScript::AreaTriggerScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<AreaTriggerScript>::Instance()->AddScript(this);
|
||||
@@ -2711,7 +2711,7 @@ bool OnlyOnceAreaTriggerScript::OnTrigger(Player* player, AreaTriggerEntry const
|
||||
void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone(InstanceScript* instance, uint32 triggerId) { instance->ResetAreaTriggerDone(triggerId); }
|
||||
void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone(Player const* player, AreaTriggerEntry const* trigger) { if (InstanceScript* instance = player->GetInstanceScript()) ResetAreaTriggerDone(instance, trigger->ID); }
|
||||
|
||||
BattlefieldScript::BattlefieldScript(char const* name)
|
||||
BattlefieldScript::BattlefieldScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<BattlefieldScript>::Instance()->AddScript(this);
|
||||
@@ -2719,7 +2719,7 @@ BattlefieldScript::BattlefieldScript(char const* name)
|
||||
|
||||
BattlefieldScript::~BattlefieldScript() = default;
|
||||
|
||||
OutdoorPvPScript::OutdoorPvPScript(char const* name)
|
||||
OutdoorPvPScript::OutdoorPvPScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<OutdoorPvPScript>::Instance()->AddScript(this);
|
||||
@@ -2727,7 +2727,7 @@ OutdoorPvPScript::OutdoorPvPScript(char const* name)
|
||||
|
||||
OutdoorPvPScript::~OutdoorPvPScript() = default;
|
||||
|
||||
CommandScript::CommandScript(char const* name)
|
||||
CommandScript::CommandScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<CommandScript>::Instance()->AddScript(this);
|
||||
@@ -2735,7 +2735,7 @@ CommandScript::CommandScript(char const* name)
|
||||
|
||||
CommandScript::~CommandScript() = default;
|
||||
|
||||
WeatherScript::WeatherScript(char const* name)
|
||||
WeatherScript::WeatherScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<WeatherScript>::Instance()->AddScript(this);
|
||||
@@ -2751,7 +2751,7 @@ void WeatherScript::OnUpdate(Weather* /*weather*/, uint32 /*diff*/)
|
||||
{
|
||||
}
|
||||
|
||||
AuctionHouseScript::AuctionHouseScript(char const* name)
|
||||
AuctionHouseScript::AuctionHouseScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<AuctionHouseScript>::Instance()->AddScript(this);
|
||||
@@ -2775,7 +2775,7 @@ void AuctionHouseScript::OnAuctionExpire(AuctionHouseObject* /*ah*/, AuctionPost
|
||||
{
|
||||
}
|
||||
|
||||
ConditionScript::ConditionScript(char const* name)
|
||||
ConditionScript::ConditionScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<ConditionScript>::Instance()->AddScript(this);
|
||||
@@ -2788,7 +2788,7 @@ bool ConditionScript::OnConditionCheck(Condition const* /*condition*/, Condition
|
||||
return true;
|
||||
}
|
||||
|
||||
VehicleScript::VehicleScript(char const* name)
|
||||
VehicleScript::VehicleScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<VehicleScript>::Instance()->AddScript(this);
|
||||
@@ -2820,7 +2820,7 @@ void VehicleScript::OnRemovePassenger(Vehicle* /*veh*/, Unit* /*passenger*/)
|
||||
{
|
||||
}
|
||||
|
||||
DynamicObjectScript::DynamicObjectScript(char const* name)
|
||||
DynamicObjectScript::DynamicObjectScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<DynamicObjectScript>::Instance()->AddScript(this);
|
||||
@@ -2832,7 +2832,7 @@ void DynamicObjectScript::OnUpdate(DynamicObject* /*obj*/, uint32 /*diff*/)
|
||||
{
|
||||
}
|
||||
|
||||
TransportScript::TransportScript(char const* name)
|
||||
TransportScript::TransportScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<TransportScript>::Instance()->AddScript(this);
|
||||
@@ -2860,7 +2860,7 @@ void TransportScript::OnUpdate(Transport* /*transport*/, uint32 /*diff*/)
|
||||
{
|
||||
}
|
||||
|
||||
AchievementScript::AchievementScript(char const* name)
|
||||
AchievementScript::AchievementScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<AchievementScript>::Instance()->AddScript(this);
|
||||
@@ -2872,7 +2872,7 @@ void AchievementScript::OnCompleted(Player* /*player*/, AchievementEntry const*
|
||||
{
|
||||
}
|
||||
|
||||
AchievementCriteriaScript::AchievementCriteriaScript(char const* name)
|
||||
AchievementCriteriaScript::AchievementCriteriaScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<AchievementCriteriaScript>::Instance()->AddScript(this);
|
||||
@@ -2880,7 +2880,7 @@ AchievementCriteriaScript::AchievementCriteriaScript(char const* name)
|
||||
|
||||
AchievementCriteriaScript::~AchievementCriteriaScript() = default;
|
||||
|
||||
PlayerScript::PlayerScript(char const* name)
|
||||
PlayerScript::PlayerScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<PlayerScript>::Instance()->AddScript(this);
|
||||
@@ -3024,7 +3024,7 @@ void PlayerScript::OnPlayerChoiceResponse(Player* /*player*/, uint32 /*choiceId*
|
||||
{
|
||||
}
|
||||
|
||||
AccountScript::AccountScript(char const* name)
|
||||
AccountScript::AccountScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<AccountScript>::Instance()->AddScript(this);
|
||||
@@ -3056,7 +3056,7 @@ void AccountScript::OnFailedPasswordChange(uint32 /*accountId*/)
|
||||
{
|
||||
}
|
||||
|
||||
GuildScript::GuildScript(char const* name)
|
||||
GuildScript::GuildScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<GuildScript>::Instance()->AddScript(this);
|
||||
@@ -3110,7 +3110,7 @@ void GuildScript::OnBankEvent(Guild* /*guild*/, uint8 /*eventType*/, uint8 /*tab
|
||||
{
|
||||
}
|
||||
|
||||
GroupScript::GroupScript(char const* name)
|
||||
GroupScript::GroupScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<GroupScript>::Instance()->AddScript(this);
|
||||
@@ -3138,7 +3138,7 @@ void GroupScript::OnDisband(Group* /*group*/)
|
||||
{
|
||||
}
|
||||
|
||||
AreaTriggerEntityScript::AreaTriggerEntityScript(char const* name)
|
||||
AreaTriggerEntityScript::AreaTriggerEntityScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<AreaTriggerEntityScript>::Instance()->AddScript(this);
|
||||
@@ -3151,7 +3151,7 @@ AreaTriggerAI* AreaTriggerEntityScript::GetAI(AreaTrigger* /*at*/) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ConversationScript::ConversationScript(char const* name)
|
||||
ConversationScript::ConversationScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<ConversationScript>::Instance()->AddScript(this);
|
||||
@@ -3164,7 +3164,7 @@ ConversationAI* ConversationScript::GetAI(Conversation* /*conversation*/) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SceneScript::SceneScript(char const* name)
|
||||
SceneScript::SceneScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<SceneScript>::Instance()->AddScript(this);
|
||||
@@ -3188,7 +3188,7 @@ void SceneScript::OnSceneComplete(Player* /*player*/, uint32 /*sceneInstanceID*/
|
||||
{
|
||||
}
|
||||
|
||||
QuestScript::QuestScript(char const* name)
|
||||
QuestScript::QuestScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<QuestScript>::Instance()->AddScript(this);
|
||||
@@ -3208,7 +3208,7 @@ void QuestScript::OnQuestObjectiveChange(Player* /*player*/, Quest const* /*ques
|
||||
{
|
||||
}
|
||||
|
||||
WorldStateScript::WorldStateScript(char const* name)
|
||||
WorldStateScript::WorldStateScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<WorldStateScript>::Instance()->AddScript(this);
|
||||
@@ -3220,7 +3220,7 @@ void WorldStateScript::OnValueChange(int32 /*worldStateId*/, int32 /*oldValue*/,
|
||||
{
|
||||
}
|
||||
|
||||
EventScript::EventScript(char const* name)
|
||||
EventScript::EventScript(char const* name) noexcept
|
||||
: ScriptObject(name)
|
||||
{
|
||||
ScriptRegistry<EventScript>::Instance()->AddScript(this);
|
||||
|
||||
@@ -188,7 +188,7 @@ class TC_GAME_API ScriptObject
|
||||
|
||||
protected:
|
||||
|
||||
ScriptObject(char const* name);
|
||||
explicit ScriptObject(char const* name) noexcept;
|
||||
virtual ~ScriptObject();
|
||||
|
||||
private:
|
||||
@@ -200,7 +200,7 @@ class TC_GAME_API SpellScriptLoader : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit SpellScriptLoader(char const* name);
|
||||
explicit SpellScriptLoader(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -215,7 +215,7 @@ class TC_GAME_API ServerScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit ServerScript(char const* name);
|
||||
explicit ServerScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -247,7 +247,7 @@ class TC_GAME_API WorldScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit WorldScript(char const* name);
|
||||
explicit WorldScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -282,7 +282,7 @@ class TC_GAME_API FormulaScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit FormulaScript(char const* name);
|
||||
explicit FormulaScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -317,7 +317,7 @@ class TC_GAME_API MapScript
|
||||
|
||||
protected:
|
||||
|
||||
explicit MapScript(MapEntry const* mapEntry);
|
||||
explicit MapScript(MapEntry const* mapEntry) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -348,7 +348,7 @@ class TC_GAME_API WorldMapScript : public ScriptObject, public MapScript<Map>
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit WorldMapScript(char const* name, uint32 mapId);
|
||||
explicit WorldMapScript(char const* name, uint32 mapId) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -359,7 +359,7 @@ class TC_GAME_API InstanceMapScript : public ScriptObject, public MapScript<Inst
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit InstanceMapScript(char const* name, uint32 mapId);
|
||||
explicit InstanceMapScript(char const* name, uint32 mapId) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -373,7 +373,7 @@ class TC_GAME_API BattlegroundMapScript : public ScriptObject, public MapScript<
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit BattlegroundMapScript(char const* name, uint32 mapId);
|
||||
explicit BattlegroundMapScript(char const* name, uint32 mapId) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -387,7 +387,7 @@ class TC_GAME_API ItemScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit ItemScript(char const* name);
|
||||
explicit ItemScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -413,7 +413,7 @@ class TC_GAME_API UnitScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit UnitScript(char const* name);
|
||||
explicit UnitScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -439,7 +439,7 @@ class TC_GAME_API CreatureScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit CreatureScript(char const* name);
|
||||
explicit CreatureScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -453,7 +453,7 @@ class TC_GAME_API GameObjectScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit GameObjectScript(char const* name);
|
||||
explicit GameObjectScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -467,7 +467,7 @@ class TC_GAME_API AreaTriggerScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit AreaTriggerScript(char const* name);
|
||||
explicit AreaTriggerScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -501,7 +501,7 @@ class TC_GAME_API BattlefieldScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit BattlefieldScript(char const* name);
|
||||
explicit BattlefieldScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -514,7 +514,7 @@ class TC_GAME_API OutdoorPvPScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit OutdoorPvPScript(char const* name);
|
||||
explicit OutdoorPvPScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -528,7 +528,7 @@ class TC_GAME_API CommandScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit CommandScript(char const* name);
|
||||
explicit CommandScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -542,7 +542,7 @@ class TC_GAME_API WeatherScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit WeatherScript(char const* name);
|
||||
explicit WeatherScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -558,7 +558,7 @@ class TC_GAME_API AuctionHouseScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit AuctionHouseScript(char const* name);
|
||||
explicit AuctionHouseScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -581,7 +581,7 @@ class TC_GAME_API ConditionScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit ConditionScript(char const* name);
|
||||
explicit ConditionScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -595,7 +595,7 @@ class TC_GAME_API VehicleScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit VehicleScript(char const* name);
|
||||
explicit VehicleScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -624,7 +624,7 @@ class TC_GAME_API DynamicObjectScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit DynamicObjectScript(char const* name);
|
||||
explicit DynamicObjectScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -637,7 +637,7 @@ class TC_GAME_API TransportScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit TransportScript(char const* name);
|
||||
explicit TransportScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -662,7 +662,7 @@ class TC_GAME_API AchievementScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit AchievementScript(char const* name);
|
||||
explicit AchievementScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -676,7 +676,7 @@ class TC_GAME_API AchievementCriteriaScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit AchievementCriteriaScript(char const* name);
|
||||
explicit AchievementCriteriaScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -690,7 +690,7 @@ class TC_GAME_API PlayerScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit PlayerScript(char const* name);
|
||||
explicit PlayerScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -798,7 +798,7 @@ class TC_GAME_API AccountScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit AccountScript(char const* name);
|
||||
explicit AccountScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -827,7 +827,7 @@ class TC_GAME_API GuildScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit GuildScript(char const* name);
|
||||
explicit GuildScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -870,7 +870,7 @@ class TC_GAME_API GroupScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit GroupScript(char const* name);
|
||||
explicit GroupScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -896,7 +896,7 @@ class TC_GAME_API AreaTriggerEntityScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit AreaTriggerEntityScript(char const* name);
|
||||
explicit AreaTriggerEntityScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -910,7 +910,7 @@ class TC_GAME_API ConversationScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit ConversationScript(char const* name);
|
||||
explicit ConversationScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -924,7 +924,7 @@ class TC_GAME_API SceneScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit SceneScript(char const* name);
|
||||
explicit SceneScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -947,7 +947,7 @@ class TC_GAME_API QuestScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit QuestScript(char const* name);
|
||||
explicit QuestScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -967,7 +967,7 @@ class TC_GAME_API WorldStateScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit WorldStateScript(char const* name);
|
||||
explicit WorldStateScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -981,7 +981,7 @@ class TC_GAME_API EventScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit EventScript(char const* name);
|
||||
explicit EventScript(char const* name) noexcept;
|
||||
|
||||
public:
|
||||
|
||||
@@ -1332,7 +1332,7 @@ template <Trinity::SpellScripts::IsSpellOrAuraScript Script1, Trinity::SpellScri
|
||||
class GenericSpellAndAuraScriptLoader : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
GenericSpellAndAuraScriptLoader(char const* name, ArgsType&& args) : SpellScriptLoader(name), _args(std::move(args)) { }
|
||||
GenericSpellAndAuraScriptLoader(char const* name, ArgsType&& args) noexcept : SpellScriptLoader(name), _args(std::move(args)) { }
|
||||
|
||||
private:
|
||||
SpellScript* GetSpellScript() const override
|
||||
@@ -1367,7 +1367,7 @@ template <class AI>
|
||||
class GenericCreatureScript : public CreatureScript
|
||||
{
|
||||
public:
|
||||
GenericCreatureScript(char const* name) : CreatureScript(name) { }
|
||||
GenericCreatureScript(char const* name) noexcept : CreatureScript(name) { }
|
||||
CreatureAI* GetAI(Creature* me) const override { return new AI(me); }
|
||||
};
|
||||
#define RegisterCreatureAI(ai_name) new GenericCreatureScript<ai_name>(#ai_name)
|
||||
@@ -1376,7 +1376,7 @@ template <class AI, AI* (*AIFactory)(Creature*)>
|
||||
class FactoryCreatureScript : public CreatureScript
|
||||
{
|
||||
public:
|
||||
FactoryCreatureScript(char const* name) : CreatureScript(name) { }
|
||||
FactoryCreatureScript(char const* name) noexcept : CreatureScript(name) { }
|
||||
CreatureAI* GetAI(Creature* me) const override { return AIFactory(me); }
|
||||
};
|
||||
#define RegisterCreatureAIWithFactory(ai_name, factory_fn) new FactoryCreatureScript<ai_name, &factory_fn>(#ai_name)
|
||||
@@ -1385,7 +1385,7 @@ template <class AI>
|
||||
class GenericGameObjectScript : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
GenericGameObjectScript(char const* name) : GameObjectScript(name) { }
|
||||
GenericGameObjectScript(char const* name) noexcept : GameObjectScript(name) { }
|
||||
GameObjectAI* GetAI(GameObject* go) const override { return new AI(go); }
|
||||
};
|
||||
#define RegisterGameObjectAI(ai_name) new GenericGameObjectScript<ai_name>(#ai_name)
|
||||
@@ -1394,7 +1394,7 @@ template <class AI, AI* (*AIFactory)(GameObject*)>
|
||||
class FactoryGameObjectScript : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
FactoryGameObjectScript(char const* name) : GameObjectScript(name) { }
|
||||
FactoryGameObjectScript(char const* name) noexcept : GameObjectScript(name) { }
|
||||
GameObjectAI* GetAI(GameObject* me) const override { return AIFactory(me); }
|
||||
};
|
||||
#define RegisterGameObjectAIWithFactory(ai_name, factory_fn) new FactoryGameObjectScript<ai_name, &factory_fn>(#ai_name)
|
||||
@@ -1403,7 +1403,7 @@ template <class AI>
|
||||
class GenericAreaTriggerEntityScript : public AreaTriggerEntityScript
|
||||
{
|
||||
public:
|
||||
GenericAreaTriggerEntityScript(char const* name) : AreaTriggerEntityScript(name) { }
|
||||
GenericAreaTriggerEntityScript(char const* name) noexcept : AreaTriggerEntityScript(name) { }
|
||||
AreaTriggerAI* GetAI(AreaTrigger* at) const override { return new AI(at); }
|
||||
};
|
||||
#define RegisterAreaTriggerAI(ai_name) new GenericAreaTriggerEntityScript<ai_name>(#ai_name)
|
||||
@@ -1412,7 +1412,7 @@ template <class AI>
|
||||
class GenericConversationScript : public ConversationScript
|
||||
{
|
||||
public:
|
||||
GenericConversationScript(char const* name) : ConversationScript(name) {}
|
||||
GenericConversationScript(char const* name) noexcept : ConversationScript(name) {}
|
||||
ConversationAI* GetAI(Conversation* conversation) const override { return new AI(conversation); }
|
||||
};
|
||||
#define RegisterConversationAI(ai_name) new GenericConversationScript<ai_name>(#ai_name)
|
||||
@@ -1421,7 +1421,7 @@ template<class Script>
|
||||
class GenericBattlegroundMapScript : public BattlegroundMapScript
|
||||
{
|
||||
public:
|
||||
GenericBattlegroundMapScript(char const* name, uint32 mapId) : BattlegroundMapScript(name, mapId) { }
|
||||
GenericBattlegroundMapScript(char const* name, uint32 mapId) noexcept : BattlegroundMapScript(name, mapId) { }
|
||||
|
||||
BattlegroundScript* GetBattlegroundScript(BattlegroundMap* map) const override { return new Script(map); }
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ bool SpellScriptBase::_Validate(SpellInfo const* entry)
|
||||
return true;
|
||||
}
|
||||
|
||||
SpellScriptBase::SpellScriptBase(): m_currentScriptState(SPELL_SCRIPT_STATE_NONE), m_scriptSpellId(0)
|
||||
SpellScriptBase::SpellScriptBase() noexcept : m_currentScriptState(SPELL_SCRIPT_STATE_NONE), m_scriptSpellId(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ template TC_GAME_API SpellScriptBase::HookList<SpellScript::DamageAndHealingCalc
|
||||
template TC_GAME_API SpellScriptBase::HookList<SpellScript::OnCalculateResistAbsorbHandler>& SpellScriptBase::HookList<SpellScript::OnCalculateResistAbsorbHandler>::operator+=(SpellScript::OnCalculateResistAbsorbHandler&& hook);
|
||||
template TC_GAME_API SpellScriptBase::HookList<SpellScript::EmpowerStageCompletedHandler>& SpellScriptBase::HookList<SpellScript::EmpowerStageCompletedHandler>::operator+=(SpellScript::EmpowerStageCompletedHandler&& hook);
|
||||
|
||||
SpellScript::SpellScript(): m_spell(nullptr), m_hitPreventEffectMask(0), m_hitPreventDefaultEffectMask(0)
|
||||
SpellScript::SpellScript() noexcept : m_spell(nullptr), m_hitPreventEffectMask(0), m_hitPreventDefaultEffectMask(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -948,7 +948,7 @@ std::string AuraScript::EffectBase::ToString() const
|
||||
}
|
||||
}
|
||||
|
||||
AuraScript::AuraScript(): SpellScriptBase(), m_aura(nullptr), m_auraApplication(nullptr), m_defaultActionPrevented(false)
|
||||
AuraScript::AuraScript() noexcept : m_aura(nullptr), m_auraApplication(nullptr), m_defaultActionPrevented(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ class TC_GAME_API SpellScriptBase
|
||||
// internal use classes & functions
|
||||
// DO NOT OVERRIDE THESE IN SCRIPTS
|
||||
public:
|
||||
SpellScriptBase();
|
||||
SpellScriptBase() noexcept;
|
||||
virtual ~SpellScriptBase();
|
||||
|
||||
SpellScriptBase(SpellScriptBase const& right) = delete;
|
||||
@@ -842,7 +842,7 @@ public:
|
||||
// left for custom compatibility only, DO NOT USE
|
||||
#define PrepareSpellScript(CLASSNAME)
|
||||
|
||||
SpellScript();
|
||||
SpellScript() noexcept;
|
||||
~SpellScript();
|
||||
bool _Validate(SpellInfo const* entry) override;
|
||||
bool _Load(Spell* spell);
|
||||
@@ -2090,7 +2090,7 @@ public:
|
||||
#define PrepareAuraScript(CLASSNAME)
|
||||
|
||||
public:
|
||||
AuraScript();
|
||||
AuraScript() noexcept;
|
||||
~AuraScript();
|
||||
bool _Validate(SpellInfo const* entry) override;
|
||||
bool _Load(Aura* aura);
|
||||
|
||||
Reference in New Issue
Block a user