Merge pull request #11138 from Ascathor/master

Core/Code: Unify codestyle for brackets: {} to { }.
This commit is contained in:
Aokromes
2013-10-28 09:57:48 -07:00
353 changed files with 2069 additions and 1066 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ public:
typedef std::map<std::string, Realm> RealmMap;
RealmList();
~RealmList() {}
~RealmList() { }
void Initialize(uint32 updateInterval);
+1 -1
View File
@@ -206,7 +206,7 @@ AuthSocket::AuthSocket(RealmSocket& socket) :
}
// Close patch file descriptor before leaving
AuthSocket::~AuthSocket(void) {}
AuthSocket::~AuthSocket(void) { }
// Accept the connection
void AuthSocket::OnAccept(void)
+1 -1
View File
@@ -23,7 +23,7 @@
#include "RealmSocket.h"
#include "Log.h"
RealmSocket::Session::Session(void) {}
RealmSocket::Session::Session(void) { }
RealmSocket::Session::~Session(void) { }
@@ -35,7 +35,7 @@ class BIHWrap
RayCallback& _callback;
uint32 objects_size;
MDLCallback(RayCallback& callback, const T* const* objects_array, uint32 objects_size ) : objects(objects_array), _callback(callback), objects_size(objects_size) {}
MDLCallback(RayCallback& callback, const T* const* objects_array, uint32 objects_size ) : objects(objects_array), _callback(callback), objects_size(objects_size) { }
/// Intersect ray
bool operator() (const G3D::Ray& ray, uint32 idx, float& maxDist, bool /*stopAtFirst*/)
@@ -66,7 +66,7 @@ class BIHWrap
int unbalanced_times;
public:
BIHWrap() : unbalanced_times(0) {}
BIHWrap() : unbalanced_times(0) { }
void insert(const T& obj)
{
+1 -1
View File
@@ -150,7 +150,7 @@ struct DynamicTreeIntersectionCallback
{
bool did_hit;
uint32 phase_mask;
DynamicTreeIntersectionCallback(uint32 phasemask) : did_hit(false), phase_mask(phasemask) {}
DynamicTreeIntersectionCallback(uint32 phasemask) : did_hit(false), phase_mask(phasemask) { }
bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
{
did_hit = obj.intersectRay(r, distance, true, phase_mask);
@@ -49,9 +49,9 @@ namespace VMAP
bool iEnableHeightCalc;
public:
IVMapManager() : iEnableLineOfSightCalc(true), iEnableHeightCalc(true) {}
IVMapManager() : iEnableLineOfSightCalc(true), iEnableHeightCalc(true) { }
virtual ~IVMapManager(void) {}
virtual ~IVMapManager(void) { }
virtual int loadMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
@@ -33,7 +33,7 @@ namespace MMAP
// dummy struct to hold map's mmap data
struct MMapData
{
MMapData(dtNavMesh* mesh) : navMesh(mesh) {}
MMapData(dtNavMesh* mesh) : navMesh(mesh) { }
~MMapData()
{
for (NavMeshQuerySet::iterator i = navMeshQueries.begin(); i != navMeshQueries.end(); ++i)
@@ -58,7 +58,7 @@ namespace MMAP
class MMapManager
{
public:
MMapManager() : loadedTiles(0) {}
MMapManager() : loadedTiles(0) { }
~MMapManager();
bool loadMap(const std::string& basePath, uint32 mapId, int32 x, int32 y);
@@ -53,7 +53,7 @@ namespace VMAP
class ManagedModel
{
public:
ManagedModel() : iModel(0), iRefCount(0) {}
ManagedModel() : iModel(0), iRefCount(0) { }
void setModel(WorldModel* model) { iModel = model; }
WorldModel* getModel() { return iModel; }
void incRefCount() { ++iRefCount; }
+3 -3
View File
@@ -36,7 +36,7 @@ namespace VMAP
class MapRayCallback
{
public:
MapRayCallback(ModelInstance* val): prims(val), hit(false) {}
MapRayCallback(ModelInstance* val): prims(val), hit(false) { }
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool pStopAtFirstHit=true)
{
bool result = prims[entry].intersectRay(ray, distance, pStopAtFirstHit);
@@ -53,7 +53,7 @@ namespace VMAP
class AreaInfoCallback
{
public:
AreaInfoCallback(ModelInstance* val): prims(val) {}
AreaInfoCallback(ModelInstance* val): prims(val) { }
void operator()(const Vector3& point, uint32 entry)
{
#ifdef VMAP_DEBUG
@@ -69,7 +69,7 @@ namespace VMAP
class LocationInfoCallback
{
public:
LocationInfoCallback(ModelInstance* val, LocationInfo &info): prims(val), locInfo(info), result(false) {}
LocationInfoCallback(ModelInstance* val, LocationInfo &info): prims(val), locInfo(info), result(false) { }
void operator()(const Vector3& point, uint32 entry)
{
#ifdef VMAP_DEBUG
+2 -2
View File
@@ -31,7 +31,7 @@ namespace VMAP
struct LocationInfo
{
LocationInfo(): hitInstance(0), hitModel(0), ground_Z(-G3D::inf()) {}
LocationInfo(): hitInstance(0), hitModel(0), ground_Z(-G3D::inf()) { }
const ModelInstance* hitInstance;
const GroupModel* hitModel;
float ground_Z;
@@ -86,7 +86,7 @@ namespace VMAP
struct AreaInfo
{
AreaInfo(): result(false), ground_Z(-G3D::inf()), flags(0), adtId(0),
rootId(0), groupId(0) {}
rootId(0), groupId(0) { }
bool result;
float ground_Z;
uint32 flags;
+1 -1
View File
@@ -76,7 +76,7 @@ namespace VMAP
class WmoLiquid* liquid;
GroupModel_Raw() : mogpflags(0), GroupWMOID(0), liquidflags(0),
liquid(NULL) {}
liquid(NULL) { }
~GroupModel_Raw();
bool Read(FILE* f);
@@ -37,7 +37,7 @@ using G3D::AABox;
struct GameobjectModelData
{
GameobjectModelData(const std::string& name_, const AABox& box) :
bound(box), name(name_) {}
bound(box), name(name_) { }
AABox bound;
std::string name;
@@ -45,7 +45,7 @@ class GameObjectModel /*, public Intersectable*/
float iScale;
VMAP::WorldModel* iModel;
GameObjectModel() : phasemask(0), iModel(NULL) {}
GameObjectModel() : phasemask(0), iModel(NULL) { }
bool initialize(const GameObject& go, const GameObjectDisplayInfoEntry& info);
public:
+1 -1
View File
@@ -63,7 +63,7 @@ namespace VMAP
class ModelInstance: public ModelSpawn
{
public:
ModelInstance(): iInvScale(0.0f), iModel(0) {}
ModelInstance(): iInvScale(0.0f), iModel(0) { }
ModelInstance(const ModelSpawn &spawn, WorldModel* model);
void setUnloaded() { iModel = 0; }
bool intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool pStopAtFirstHit) const;
+4 -4
View File
@@ -84,7 +84,7 @@ namespace VMAP
class TriBoundFunc
{
public:
TriBoundFunc(std::vector<Vector3> &vert): vertices(vert.begin()) {}
TriBoundFunc(std::vector<Vector3> &vert): vertices(vert.begin()) { }
void operator()(const MeshTriangle &tri, G3D::AABox &out) const
{
G3D::Vector3 lo = vertices[tri.idx0];
@@ -360,7 +360,7 @@ namespace VMAP
struct GModelRayCallback
{
GModelRayCallback(const std::vector<MeshTriangle> &tris, const std::vector<Vector3> &vert):
vertices(vert.begin()), triangles(tris.begin()), hit(false) {}
vertices(vert.begin()), triangles(tris.begin()), hit(false) { }
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool /*pStopAtFirstHit*/)
{
bool result = IntersectTriangle(triangles[entry], vertices, ray, distance);
@@ -420,7 +420,7 @@ namespace VMAP
struct WModelRayCallBack
{
WModelRayCallBack(const std::vector<GroupModel> &mod): models(mod.begin()), hit(false) {}
WModelRayCallBack(const std::vector<GroupModel> &mod): models(mod.begin()), hit(false) { }
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool pStopAtFirstHit)
{
bool result = models[entry].IntersectRay(ray, distance, pStopAtFirstHit);
@@ -446,7 +446,7 @@ namespace VMAP
class WModelAreaCallback {
public:
WModelAreaCallback(const std::vector<GroupModel> &vals, const Vector3 &down):
prims(vals.begin()), hit(vals.end()), minVol(G3D::inf()), zDist(G3D::inf()), zVec(down) {}
prims(vals.begin()), hit(vals.end()), minVol(G3D::inf()), zDist(G3D::inf()), zVec(down) { }
std::vector<GroupModel>::const_iterator prims;
std::vector<GroupModel>::const_iterator hit;
float minVol;
+6 -6
View File
@@ -36,8 +36,8 @@ namespace VMAP
class MeshTriangle
{
public:
MeshTriangle(){}
MeshTriangle(uint32 na, uint32 nb, uint32 nc): idx0(na), idx1(nb), idx2(nc) {}
MeshTriangle(){ }
MeshTriangle(uint32 na, uint32 nb, uint32 nc): idx0(na), idx1(nb), idx2(nc) { }
uint32 idx0;
uint32 idx1;
@@ -59,7 +59,7 @@ namespace VMAP
bool writeToFile(FILE* wf);
static bool readFromFile(FILE* rf, WmoLiquid* &liquid);
private:
WmoLiquid(): iHeight(0), iFlags(0) {}
WmoLiquid(): iHeight(0), iFlags(0) { }
uint32 iTilesX; //!< number of tiles in x direction, each
uint32 iTilesY;
G3D::Vector3 iCorner; //!< the lower corner
@@ -74,10 +74,10 @@ namespace VMAP
class GroupModel
{
public:
GroupModel(): iLiquid(0) {}
GroupModel(): iLiquid(0) { }
GroupModel(const GroupModel &other);
GroupModel(uint32 mogpFlags, uint32 groupWMOID, const G3D::AABox &bound):
iBound(bound), iMogpFlags(mogpFlags), iGroupWMOID(groupWMOID), iLiquid(0) {}
iBound(bound), iMogpFlags(mogpFlags), iGroupWMOID(groupWMOID), iLiquid(0) { }
~GroupModel() { delete iLiquid; }
//! pass mesh data to object and create BIH. Passed vectors get get swapped with old geometry!
@@ -107,7 +107,7 @@ namespace VMAP
class WorldModel
{
public:
WorldModel(): RootWMOID(0) {}
WorldModel(): RootWMOID(0) { }
//! pass group models to WorldModel and create BIH. Passed vector is swapped with old geometry!
void setGroupModels(std::vector<GroupModel> &models);
+4 -4
View File
@@ -28,7 +28,7 @@ class Creature;
class AggressorAI : public CreatureAI
{
public:
explicit AggressorAI(Creature* c) : CreatureAI(c) {}
explicit AggressorAI(Creature* c) : CreatureAI(c) { }
void UpdateAI(uint32);
static int Permissible(const Creature*);
@@ -39,7 +39,7 @@ typedef std::vector<uint32> SpellVct;
class CombatAI : public CreatureAI
{
public:
explicit CombatAI(Creature* c) : CreatureAI(c) {}
explicit CombatAI(Creature* c) : CreatureAI(c) { }
void InitializeAI();
void Reset();
@@ -100,8 +100,8 @@ struct VehicleAI : public CreatureAI
void UpdateAI(uint32 diff);
static int Permissible(const Creature*);
void Reset();
void MoveInLineOfSight(Unit*) {}
void AttackStart(Unit*) {}
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit*) { }
void OnCharmed(bool apply);
private:
+2 -2
View File
@@ -18,7 +18,7 @@
#include "GameObjectAI.h"
//GameObjectAI::GameObjectAI(GameObject* g) : go(g) {}
//GameObjectAI::GameObjectAI(GameObject* g) : go(g) { }
int GameObjectAI::Permissible(const GameObject* go)
{
if (go->GetAIName() == "GameObjectAI")
@@ -26,4 +26,4 @@ int GameObjectAI::Permissible(const GameObject* go)
return PERMIT_BASE_NO;
}
NullGameObjectAI::NullGameObjectAI(GameObject* g) : GameObjectAI(g) {}
NullGameObjectAI::NullGameObjectAI(GameObject* g) : GameObjectAI(g) { }
+12 -12
View File
@@ -30,18 +30,18 @@ class GameObjectAI
protected:
GameObject* const go;
public:
explicit GameObjectAI(GameObject* g) : go(g) {}
virtual ~GameObjectAI() {}
explicit GameObjectAI(GameObject* g) : go(g) { }
virtual ~GameObjectAI() { }
virtual void UpdateAI(uint32 /*diff*/) {}
virtual void UpdateAI(uint32 /*diff*/) { }
virtual void InitializeAI() { Reset(); }
virtual void Reset() { }
// Pass parameters between AI
virtual void DoAction(int32 /*param = 0 */) {}
virtual void SetGUID(uint64 /*guid*/, int32 /*id = 0 */) {}
virtual void DoAction(int32 /*param = 0 */) { }
virtual void SetGUID(uint64 /*guid*/, int32 /*id = 0 */) { }
virtual uint64 GetGUID(int32 /*id = 0 */) const { return 0; }
static int Permissible(GameObject const* go);
@@ -52,14 +52,14 @@ class GameObjectAI
virtual bool QuestAccept(Player* /*player*/, Quest const* /*quest*/) { return false; }
virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; }
virtual uint32 GetDialogStatus(Player* /*player*/) { return 100; }
virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {}
virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) { }
virtual uint32 GetData(uint32 /*id*/) const { return 0; }
virtual void SetData64(uint32 /*id*/, uint64 /*value*/) {}
virtual void SetData64(uint32 /*id*/, uint64 /*value*/) { }
virtual uint64 GetData64(uint32 /*id*/) const { return 0; }
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) {}
virtual void EventInform(uint32 /*eventId*/) {}
virtual void SetData(uint32 /*id*/, uint32 /*value*/) { }
virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) { }
virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) { }
virtual void EventInform(uint32 /*eventId*/) { }
};
class NullGameObjectAI : public GameObjectAI
@@ -67,7 +67,7 @@ class NullGameObjectAI : public GameObjectAI
public:
explicit NullGameObjectAI(GameObject* g);
void UpdateAI(uint32 /*diff*/) {}
void UpdateAI(uint32 /*diff*/) { }
static int Permissible(GameObject const* /*go*/) { return PERMIT_BASE_IDLE; }
};
+11 -11
View File
@@ -26,8 +26,8 @@ class PassiveAI : public CreatureAI
public:
explicit PassiveAI(Creature* c);
void MoveInLineOfSight(Unit*) {}
void AttackStart(Unit*) {}
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit*) { }
void UpdateAI(uint32);
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
@@ -38,10 +38,10 @@ class PossessedAI : public CreatureAI
public:
explicit PossessedAI(Creature* c);
void MoveInLineOfSight(Unit*) {}
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit* target);
void UpdateAI(uint32);
void EnterEvadeMode() {}
void EnterEvadeMode() { }
void JustDied(Unit*);
void KilledUnit(Unit* victim);
@@ -54,11 +54,11 @@ class NullCreatureAI : public CreatureAI
public:
explicit NullCreatureAI(Creature* c);
void MoveInLineOfSight(Unit*) {}
void AttackStart(Unit*) {}
void UpdateAI(uint32) {}
void EnterEvadeMode() {}
void OnCharmed(bool /*apply*/) {}
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit*) { }
void UpdateAI(uint32) { }
void EnterEvadeMode() { }
void OnCharmed(bool /*apply*/) { }
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -66,7 +66,7 @@ class NullCreatureAI : public CreatureAI
class CritterAI : public PassiveAI
{
public:
explicit CritterAI(Creature* c) : PassiveAI(c) {}
explicit CritterAI(Creature* c) : PassiveAI(c) { }
void DamageTaken(Unit* done_by, uint32& /*damage*/);
void EnterEvadeMode();
@@ -75,7 +75,7 @@ class CritterAI : public PassiveAI
class TriggerAI : public NullCreatureAI
{
public:
explicit TriggerAI(Creature* c) : NullCreatureAI(c) {}
explicit TriggerAI(Creature* c) : NullCreatureAI(c) { }
void IsSummonedBy(Unit* summoner);
};
+3 -3
View File
@@ -45,9 +45,9 @@ class PetAI : public CreatureAI
// The following aren't used by the PetAI but need to be defined to override
// default CreatureAI functions which interfere with the PetAI
//
void MoveInLineOfSight(Unit* /*who*/) {} // CreatureAI interferes with returning pets
void MoveInLineOfSight_Safe(Unit* /*who*/) {} // CreatureAI interferes with returning pets
void EnterEvadeMode() {} // For fleeing, pets don't use this type of Evade mechanic
void MoveInLineOfSight(Unit* /*who*/) { } // CreatureAI interferes with returning pets
void MoveInLineOfSight_Safe(Unit* /*who*/) { } // CreatureAI interferes with returning pets
void EnterEvadeMode() { } // For fleeing, pets don't use this type of Evade mechanic
private:
bool _isVisible(Unit*) const;
+2 -2
View File
@@ -27,9 +27,9 @@ class ReactorAI : public CreatureAI
{
public:
explicit ReactorAI(Creature* c) : CreatureAI(c) {}
explicit ReactorAI(Creature* c) : CreatureAI(c) { }
void MoveInLineOfSight(Unit*) {}
void MoveInLineOfSight(Unit*) { }
void UpdateAI(uint32 diff);
static int Permissible(const Creature*);
+20 -20
View File
@@ -120,8 +120,8 @@ class UnitAI
protected:
Unit* const me;
public:
explicit UnitAI(Unit* unit) : me(unit) {}
virtual ~UnitAI() {}
explicit UnitAI(Unit* unit) : me(unit) { }
virtual ~UnitAI() { }
virtual bool CanAIAttack(Unit const* /*target*/) const { return true; }
virtual void AttackStart(Unit* /*target*/);
@@ -129,16 +129,16 @@ class UnitAI
virtual void InitializeAI() { if (!me->isDead()) Reset(); }
virtual void Reset() {};
virtual void Reset() { };
// Called when unit is charmed
virtual void OnCharmed(bool apply) = 0;
// Pass parameters between AI
virtual void DoAction(int32 /*param*/) {}
virtual void DoAction(int32 /*param*/) { }
virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; }
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
virtual void SetGUID(uint64 /*guid*/, int32 /*id*/ = 0) {}
virtual void SetData(uint32 /*id*/, uint32 /*value*/) { }
virtual void SetGUID(uint64 /*guid*/, int32 /*id*/ = 0) { }
virtual uint64 GetGUID(int32 /*id*/ = 0) const { return 0; }
Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
@@ -225,17 +225,17 @@ class UnitAI
// Called at any Damage from any attacker (before damage apply)
// Note: it for recalculation damage or special reaction at damage
// for attack reaction use AttackedBy called for not DOT damage in Unit::DealDamage also
virtual void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) {}
virtual void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) { }
// Called when the creature receives heal
virtual void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) {}
virtual void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) { }
// Called when the unit heals
virtual void HealDone(Unit* /*done_to*/, uint32& /*addhealth*/) {}
virtual void HealDone(Unit* /*done_to*/, uint32& /*addhealth*/) { }
/// Called when a spell is interrupted by Spell::EffectInterruptCast
/// Use to reschedule next planned cast of spell.
virtual void SpellInterrupted(uint32 /*spellId*/, uint32 /*unTimeMs*/) {}
virtual void SpellInterrupted(uint32 /*spellId*/, uint32 /*unTimeMs*/) { }
void AttackStartCaster(Unit* victim, float dist);
@@ -254,15 +254,15 @@ class UnitAI
static AISpellInfoType* AISpellInfo;
static void FillAISpellInfo();
virtual void sGossipHello(Player* /*player*/) {}
virtual void sGossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) {}
virtual void sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, char const* /*code*/) {}
virtual void sQuestAccept(Player* /*player*/, Quest const* /*quest*/) {}
virtual void sQuestSelect(Player* /*player*/, Quest const* /*quest*/) {}
virtual void sQuestComplete(Player* /*player*/, Quest const* /*quest*/) {}
virtual void sQuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) {}
virtual void sGossipHello(Player* /*player*/) { }
virtual void sGossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) { }
virtual void sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, char const* /*code*/) { }
virtual void sQuestAccept(Player* /*player*/, Quest const* /*quest*/) { }
virtual void sQuestSelect(Player* /*player*/, Quest const* /*quest*/) { }
virtual void sQuestComplete(Player* /*player*/, Quest const* /*quest*/) { }
virtual void sQuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { }
virtual bool sOnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/) { return false; }
virtual void sOnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
virtual void sOnGameEvent(bool /*start*/, uint16 /*eventId*/) { }
};
class PlayerAI : public UnitAI
@@ -270,7 +270,7 @@ class PlayerAI : public UnitAI
protected:
Player* const me;
public:
explicit PlayerAI(Player* player) : UnitAI((Unit*)player), me(player) {}
explicit PlayerAI(Player* player) : UnitAI((Unit*)player), me(player) { }
void OnCharmed(bool apply);
};
@@ -279,7 +279,7 @@ class SimpleCharmedAI : public PlayerAI
{
public:
void UpdateAI(uint32 diff);
SimpleCharmedAI(Player* player): PlayerAI(player) {}
SimpleCharmedAI(Player* player): PlayerAI(player) { }
};
#endif
+21 -21
View File
@@ -79,9 +79,9 @@ class CreatureAI : public UnitAI
public:
void Talk(uint8 id, uint64 WhisperGuid = 0);
explicit CreatureAI(Creature* creature) : UnitAI(creature), me(creature), m_MoveInLineOfSight_locked(false) {}
explicit CreatureAI(Creature* creature) : UnitAI(creature), me(creature), m_MoveInLineOfSight_locked(false) { }
virtual ~CreatureAI() {}
virtual ~CreatureAI() { }
/// == Reactions At =================================
@@ -95,61 +95,61 @@ class CreatureAI : public UnitAI
virtual void EnterEvadeMode();
// Called for reaction at enter to combat if not in combat yet (enemy can be NULL)
virtual void EnterCombat(Unit* /*victim*/) {}
virtual void EnterCombat(Unit* /*victim*/) { }
// Called when the creature is killed
virtual void JustDied(Unit* /*killer*/) {}
virtual void JustDied(Unit* /*killer*/) { }
// Called when the creature kills a unit
virtual void KilledUnit(Unit* /*victim*/) {}
virtual void KilledUnit(Unit* /*victim*/) { }
// Called when the creature summon successfully other creature
virtual void JustSummoned(Creature* /*summon*/) {}
virtual void IsSummonedBy(Unit* /*summoner*/) {}
virtual void JustSummoned(Creature* /*summon*/) { }
virtual void IsSummonedBy(Unit* /*summoner*/) { }
virtual void SummonedCreatureDespawn(Creature* /*summon*/) {}
virtual void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) {}
virtual void SummonedCreatureDespawn(Creature* /*summon*/) { }
virtual void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) { }
// Called when hit by a spell
virtual void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) {}
virtual void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) { }
// Called when spell hits a target
virtual void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) {}
virtual void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) { }
// Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc)
virtual void AttackedBy(Unit* /*attacker*/) {}
virtual void AttackedBy(Unit* /*attacker*/) { }
virtual bool IsEscorted() { return false; }
// Called when creature is spawned or respawned (for reseting variables)
virtual void JustRespawned() { Reset(); }
// Called at waypoint reached or point movement finished
virtual void MovementInform(uint32 /*type*/, uint32 /*id*/) {}
virtual void MovementInform(uint32 /*type*/, uint32 /*id*/) { }
void OnCharmed(bool apply);
// Called at reaching home after evade
virtual void JustReachedHome() {}
virtual void JustReachedHome() { }
void DoZoneInCombat(Creature* creature = NULL, float maxRangeToNearestTarget = 50.0f);
// Called at text emote receive from player
virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) {}
virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) { }
// Called when owner takes damage
virtual void OwnerAttackedBy(Unit* /*attacker*/) {}
virtual void OwnerAttackedBy(Unit* /*attacker*/) { }
// Called when owner attacks something
virtual void OwnerAttacked(Unit* /*target*/) {}
virtual void OwnerAttacked(Unit* /*target*/) { }
/// == Triggered Actions Requested ==================
// Called when creature attack expected (if creature can and no have current victim)
// Note: for reaction at hostile action must be called AttackedBy function.
//virtual void AttackStart(Unit*) {}
//virtual void AttackStart(Unit*) { }
// Called at World update tick
//virtual void UpdateAI(const uint32 /*diff*/) {}
//virtual void UpdateAI(const uint32 /*diff*/) { }
/// == State checks =================================
@@ -157,7 +157,7 @@ class CreatureAI : public UnitAI
//virtual bool IsVisible(Unit*) const { return false; }
// called when the corpse of this creature gets removed
virtual void CorpseRemoved(uint32& /*respawnDelay*/) {}
virtual void CorpseRemoved(uint32& /*respawnDelay*/) { }
// Called when victim entered water and creature can not enter water
//virtual bool CanReachByRangeAttack(Unit*) { return false; }
@@ -167,7 +167,7 @@ class CreatureAI : public UnitAI
// Pointer to controlled by AI creature
//Creature* const me;
virtual void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool /*apply*/) {}
virtual void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool /*apply*/) { }
virtual void OnSpellClick(Unit* /*clicker*/, bool& /*result*/) { }
+4 -4
View File
@@ -25,13 +25,13 @@
struct SelectableAI : public FactoryHolder<CreatureAI>, public Permissible<Creature>
{
SelectableAI(const char* id) : FactoryHolder<CreatureAI>(id) {}
SelectableAI(const char* id) : FactoryHolder<CreatureAI>(id) { }
};
template<class REAL_AI>
struct CreatureAIFactory : public SelectableAI
{
CreatureAIFactory(const char* name) : SelectableAI(name) {}
CreatureAIFactory(const char* name) : SelectableAI(name) { }
CreatureAI* Create(void*) const;
@@ -53,13 +53,13 @@ typedef FactoryHolder<CreatureAI>::FactoryHolderRepository CreatureAIRepository;
//GO
struct SelectableGameObjectAI : public FactoryHolder<GameObjectAI>, public Permissible<GameObject>
{
SelectableGameObjectAI(const char* id) : FactoryHolder<GameObjectAI>(id) {}
SelectableGameObjectAI(const char* id) : FactoryHolder<GameObjectAI>(id) { }
};
template<class REAL_GO_AI>
struct GameObjectAIFactory : public SelectableGameObjectAI
{
GameObjectAIFactory(const char* name) : SelectableGameObjectAI(name) {}
GameObjectAIFactory(const char* name) : SelectableGameObjectAI(name) { }
GameObjectAI* Create(void*) const;
+2 -2
View File
@@ -327,7 +327,7 @@ class EventMap
typedef std::multimap<uint32, uint32> EventStore;
public:
EventMap() : _time(0), _phase(0) {}
EventMap() : _time(0), _phase(0) { }
/**
* @name Reset
@@ -686,7 +686,7 @@ enum AICondition
struct AISpellInfoType
{
AISpellInfoType() : target(AITARGET_SELF), condition(AICOND_COMBAT)
, cooldown(AI_DEFAULT_COOLDOWN), realCooldown(0), maxRange(0.0f){}
, cooldown(AI_DEFAULT_COOLDOWN), realCooldown(0), maxRange(0.0f){ }
AITarget target;
AICondition condition;
uint32 cooldown;
+2 -2
View File
@@ -564,7 +564,7 @@ typedef UNORDERED_MAP<uint32, CreatureEventAI_Summon> CreatureEventAI_Summon_Map
struct CreatureEventAIHolder
{
CreatureEventAIHolder(CreatureEventAI_Event const& p) : Event(p), Time(0), Enabled(true){}
CreatureEventAIHolder(CreatureEventAI_Event const& p) : Event(p), Time(0), Enabled(true){ }
CreatureEventAI_Event Event;
uint32 Time;
@@ -592,7 +592,7 @@ class CreatureEventAI : public CreatureAI
void MoveInLineOfSight(Unit* who);
void SpellHit(Unit* unit, const SpellInfo* spell);
void DamageTaken(Unit* done_by, uint32& damage);
void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) {}
void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) { }
void UpdateAI(uint32 diff);
void ReceiveEmote(Player* player, uint32 textEmote);
static int Permissible(const Creature*);
@@ -27,8 +27,8 @@ class CreatureEventAIMgr
friend class ACE_Singleton<CreatureEventAIMgr, ACE_Null_Mutex>;
private:
CreatureEventAIMgr(){}
~CreatureEventAIMgr(){}
CreatureEventAIMgr(){ }
~CreatureEventAIMgr(){ }
public:
void LoadCreatureEventAI_Texts();
@@ -116,7 +116,7 @@ private:
class EntryCheckPredicate
{
public:
EntryCheckPredicate(uint32 entry) : _entry(entry) {}
EntryCheckPredicate(uint32 entry) : _entry(entry) { }
bool operator()(uint64 guid) { return GUID_ENPART(guid) == _entry; }
private:
@@ -132,7 +132,7 @@ class DummyEntryCheckPredicate
struct ScriptedAI : public CreatureAI
{
explicit ScriptedAI(Creature* creature);
virtual ~ScriptedAI() {}
virtual ~ScriptedAI() { }
// *************
//CreatureAI Functions
@@ -141,34 +141,34 @@ struct ScriptedAI : public CreatureAI
void AttackStartNoMove(Unit* target);
// Called at any Damage from any attacker (before damage apply)
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) {}
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) { }
//Called at World update tick
virtual void UpdateAI(uint32 diff);
//Called at creature death
void JustDied(Unit* /*killer*/) {}
void JustDied(Unit* /*killer*/) { }
//Called at creature killing another unit
void KilledUnit(Unit* /*victim*/) {}
void KilledUnit(Unit* /*victim*/) { }
// Called when the creature summon successfully other creature
void JustSummoned(Creature* /*summon*/) {}
void JustSummoned(Creature* /*summon*/) { }
// Called when a summoned creature is despawned
void SummonedCreatureDespawn(Creature* /*summon*/) {}
void SummonedCreatureDespawn(Creature* /*summon*/) { }
// Called when hit by a spell
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) {}
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) { }
// Called when spell hits a target
void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) {}
void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) { }
//Called at waypoint reached or PointMovement end
void MovementInform(uint32 /*type*/, uint32 /*id*/) {}
void MovementInform(uint32 /*type*/, uint32 /*id*/) { }
// Called when AI is temporarily replaced or put back when possess is applied or removed
void OnPossess(bool /*apply*/) {}
void OnPossess(bool /*apply*/) { }
// *************
// Variables
@@ -185,10 +185,10 @@ struct ScriptedAI : public CreatureAI
// *************
//Called at creature reset either by death or evade
void Reset() {}
void Reset() { }
//Called at creature aggro either by MoveInLOS or Attack Start
void EnterCombat(Unit* /*victim*/) {}
void EnterCombat(Unit* /*victim*/) { }
// Called before EnterCombat even before the creature is in combat.
void AttackStart(Unit* /*target*/);
@@ -334,7 +334,7 @@ class BossAI : public ScriptedAI
{
public:
BossAI(Creature* creature, uint32 bossId);
virtual ~BossAI() {}
virtual ~BossAI() { }
InstanceScript* const instance;
BossBoundaryMap const* GetBoundary() const { return _boundary; }
@@ -385,7 +385,7 @@ class WorldBossAI : public ScriptedAI
{
public:
WorldBossAI(Creature* creature);
virtual ~WorldBossAI() {}
virtual ~WorldBossAI() { }
void JustSummoned(Creature* summon);
void SummonedCreatureDespawn(Creature* summon);
@@ -35,7 +35,7 @@ npc_escortAI::npc_escortAI(Creature* creature) : ScriptedAI(creature),
DespawnAtFar(true),
ScriptWP(false),
HasImmuneToNPCFlags(false)
{}
{ }
void npc_escortAI::AttackStart(Unit* who)
{
@@ -39,7 +39,7 @@ struct npc_escortAI : public ScriptedAI
{
public:
explicit npc_escortAI(Creature* creature);
~npc_escortAI() {}
~npc_escortAI() { }
// CreatureAI functions
void AttackStart(Unit* who);
@@ -72,7 +72,7 @@ struct npc_escortAI : public ScriptedAI
bool GetWaypointPosition(uint32 pointId, float& x, float& y, float& z);
virtual void WaypointReached(uint32 pointId) = 0;
virtual void WaypointStart(uint32 /*pointId*/) {}
virtual void WaypointStart(uint32 /*pointId*/) { }
void Start(bool isActiveAttacker = true, bool run = false, uint64 playerGUID = 0, Quest const* quest = NULL, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
@@ -26,7 +26,7 @@ FollowerAI::FollowerAI(Creature* creature) : ScriptedAI(creature),
m_uiUpdateFollowTimer(2500),
m_uiFollowState(STATE_FOLLOW_NONE),
m_pQuestForFollow(NULL)
{}
{ }
void FollowerAI::AttackStart(Unit* who)
{
@@ -22,7 +22,7 @@ class FollowerAI : public ScriptedAI
{
public:
explicit FollowerAI(Creature* creature);
~FollowerAI() {}
~FollowerAI() { }
//virtual void WaypointReached(uint32 uiPointId) = 0;
+1 -1
View File
@@ -933,7 +933,7 @@ class SmartTrigger : public AreaTriggerScript
{
public:
SmartTrigger() : AreaTriggerScript("SmartTrigger") {}
SmartTrigger() : AreaTriggerScript("SmartTrigger") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
{
+3 -3
View File
@@ -45,7 +45,7 @@ enum SmartEscortVars
class SmartAI : public CreatureAI
{
public:
~SmartAI(){}
~SmartAI(){ }
explicit SmartAI(Creature* c);
// Start moving to the desired MovePoint
@@ -237,8 +237,8 @@ class SmartAI : public CreatureAI
class SmartGameObjectAI : public GameObjectAI
{
public:
SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) {}
~SmartGameObjectAI() {}
SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) { }
~SmartGameObjectAI() { }
void UpdateAI(uint32 diff);
void InitializeAI();
@@ -1291,7 +1291,7 @@ struct SmartScriptHolder
{
SmartScriptHolder() : entryOrGuid(0), source_type(SMART_SCRIPT_TYPE_CREATURE)
, event_id(0), link(0), event(), action(), target(), timer(0), active(false), runOnce(false)
, enableTimed(false) {}
, enableTimed(false) { }
int32 entryOrGuid;
SmartScriptType source_type;
@@ -1322,7 +1322,7 @@ typedef UNORDERED_MAP<uint32, ObjectList*> ObjectListMap;
class SmartWaypointMgr
{
friend class ACE_Singleton<SmartWaypointMgr, ACE_Null_Mutex>;
SmartWaypointMgr() {}
SmartWaypointMgr() { }
public:
~SmartWaypointMgr();
@@ -1348,9 +1348,9 @@ typedef UNORDERED_MAP<int32, SmartAIEventList> SmartAIEventMap;
class SmartAIMgr
{
friend class ACE_Singleton<SmartAIMgr, ACE_Null_Mutex>;
SmartAIMgr(){}
SmartAIMgr(){ }
public:
~SmartAIMgr(){}
~SmartAIMgr(){ }
void LoadSmartAIFromDB();
@@ -47,7 +47,7 @@ namespace Trinity
{
public:
AchievementChatBuilder(Player const& player, ChatMsg msgtype, int32 textId, uint32 ach_id)
: i_player(player), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) {}
: i_player(player), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
char const* text = sObjectMgr->GetTrinityString(i_textId, loc_idx);
@@ -202,7 +202,7 @@ struct AchievementCriteriaData
struct AchievementCriteriaDataSet
{
AchievementCriteriaDataSet() : criteria_id(0) {}
AchievementCriteriaDataSet() : criteria_id(0) { }
typedef std::vector<AchievementCriteriaData> Storage;
void Add(AchievementCriteriaData const& data) { storage.push_back(data); }
bool Meets(Player const* source, Unit const* target, uint32 miscValue = 0) const;
@@ -293,8 +293,8 @@ class AchievementMgr
class AchievementGlobalMgr
{
friend class ACE_Singleton<AchievementGlobalMgr, ACE_Null_Mutex>;
AchievementGlobalMgr() {}
~AchievementGlobalMgr() {}
AchievementGlobalMgr() { }
~AchievementGlobalMgr() { }
public:
AchievementCriteriaEntryList const& GetAchievementCriteriaByType(AchievementCriteriaTypes type) const
+4 -4
View File
@@ -80,7 +80,7 @@ class BfCapturePoint
virtual ~BfCapturePoint() { }
virtual void FillInitialWorldStates(WorldPacket& /*data*/) {}
virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
// Send world state update to all players present
void SendUpdateWorldState(uint32 field, uint32 value);
@@ -98,7 +98,7 @@ class BfCapturePoint
// Returns true if the state of the objective has changed, in this case, the OutdoorPvP must send a world state ui update.
virtual bool Update(uint32 diff);
virtual void ChangeTeam(TeamId /*oldTeam*/) {}
virtual void ChangeTeam(TeamId /*oldTeam*/) { }
virtual void SendChangePhase();
bool SetCapturePointData(GameObject* capturePoint);
@@ -223,7 +223,7 @@ class Battlefield : public ZoneScript
void InvitePlayersInZoneToWar();
/// Called when a Unit is kill in battlefield zone
virtual void HandleKill(Player* /*killer*/, Unit* /*killed*/) {};
virtual void HandleKill(Player* /*killer*/, Unit* /*killed*/) { };
uint32 GetTypeId() { return m_TypeId; }
uint32 GetZoneId() { return m_ZoneId; }
@@ -398,7 +398,7 @@ class Battlefield : public ZoneScript
void KickAfkPlayers();
// use for switch off all worldstate for client
virtual void SendRemoveWorldStates(Player* /*player*/) {}
virtual void SendRemoveWorldStates(Player* /*player*/) { }
// use for send a packet for all player list
void BroadcastPacketToZone(WorldPacket& data) const;
@@ -87,7 +87,7 @@ namespace Trinity
{
public:
Battleground2ChatBuilder(ChatMsg msgtype, int32 textId, Player const* source, int32 arg1, int32 arg2)
: _msgtype(msgtype), _textId(textId), _source(source), _arg1(arg1), _arg2(arg2) {}
: _msgtype(msgtype), _textId(textId), _source(source), _arg1(arg1), _arg2(arg2) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
+12 -12
View File
@@ -162,7 +162,7 @@ struct BattlegroundPlayer
struct BattlegroundObjectInfo
{
BattlegroundObjectInfo() : object(NULL), timer(0), spellid(0) {}
BattlegroundObjectInfo() : object(NULL), timer(0), spellid(0) { }
GameObject *object;
int32 timer;
@@ -287,7 +287,7 @@ class Battleground
virtual void StartingEventOpenDoors() { }
virtual void ResetBGSubclass() { } // must be implemented in BG subclass
virtual void DestroyGate(Player* /*player*/, GameObject* /*go*/) {}
virtual void DestroyGate(Player* /*player*/, GameObject* /*go*/) { }
/* achievement req. */
virtual bool IsAllNodesControlledByTeam(uint32 /*team*/) const { return false; }
@@ -409,7 +409,7 @@ class Battleground
// Packet Transfer
// method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!)
virtual void FillInitialWorldStates(WorldPacket& /*data*/) {}
virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
void SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender = NULL, bool self = true);
void SendPacketToAll(WorldPacket* packet);
void YellToAll(Creature* creature, const char* text, uint32 language);
@@ -474,17 +474,17 @@ class Battleground
virtual void HandleKillUnit(Creature* /*unit*/, Player* /*killer*/);
// Battleground events
virtual void EventPlayerDroppedFlag(Player* /*player*/) {}
virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) {}
virtual void EventPlayerDroppedFlag(Player* /*player*/) { }
virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) { }
void EventPlayerLoggedIn(Player* player);
void EventPlayerLoggedOut(Player* player);
virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/) {}
virtual void EventPlayerUsedGO(Player* /*player*/, GameObject* /*go*/){}
virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/) { }
virtual void EventPlayerUsedGO(Player* /*player*/, GameObject* /*go*/){ }
// this function can be used by spell to interact with the BG map
virtual void DoAction(uint32 /*action*/, uint64 /*var*/) {}
virtual void DoAction(uint32 /*action*/, uint64 /*var*/) { }
virtual void HandlePlayerResurrect(Player* /*player*/) {}
virtual void HandlePlayerResurrect(Player* /*player*/) { }
// Death related
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
@@ -531,8 +531,8 @@ class Battleground
bool CanAwardArenaPoints() const { return m_LevelMin >= BG_AWARD_ARENA_POINTS_MIN_LEVEL; }
virtual uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const { return 0; }
virtual void SetDroppedFlagGUID(uint64 /*guid*/, int32 /*team*/ = -1) {}
virtual void HandleQuestComplete(uint32 /*questid*/, Player* /*player*/) {}
virtual void SetDroppedFlagGUID(uint64 /*guid*/, int32 /*team*/ = -1) { }
virtual void HandleQuestComplete(uint32 /*questid*/, Player* /*player*/) { }
virtual bool CanActivateGO(int32 /*entry*/, uint32 /*team*/) const { return true; }
virtual bool IsSpellAllowed(uint32 /*spellId*/, Player const* /*player*/) const { return true; }
uint32 GetTeamScore(uint32 TeamID) const;
@@ -559,7 +559,7 @@ class Battleground
// Scorekeeping
BattlegroundScoreMap PlayerScores; // Player scores
// must be implemented in BG subclass
virtual void RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/) {}
virtual void RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/) { }
// Player lists, those need to be accessible by inherited classes
BattlegroundPlayerMap m_Players;
@@ -106,7 +106,7 @@ class BattlegroundQueue
class SelectionPool
{
public:
SelectionPool(): PlayerCount(0) {};
SelectionPool(): PlayerCount(0) { };
void Init();
bool AddGroup(GroupQueueInfo* ginfo, uint32 desiredCount);
bool KickGroup(uint32 size);
@@ -163,9 +163,9 @@ class BGQueueRemoveEvent : public BasicEvent
public:
BGQueueRemoveEvent(uint64 pl_guid, uint32 bgInstanceGUID, BattlegroundTypeId BgTypeId, BattlegroundQueueTypeId bgQueueTypeId, uint32 removeTime)
: m_PlayerGuid(pl_guid), m_BgInstanceGUID(bgInstanceGUID), m_RemoveTime(removeTime), m_BgTypeId(BgTypeId), m_BgQueueTypeId(bgQueueTypeId)
{}
{ }
virtual ~BGQueueRemoveEvent() {}
virtual ~BGQueueRemoveEvent() { }
virtual bool Execute(uint64 e_time, uint32 p_time);
virtual void Abort(uint64 e_time);
@@ -249,7 +249,7 @@ enum BG_EY_Objectives
struct BattlegroundEYPointIconsStruct
{
BattlegroundEYPointIconsStruct(uint32 _WorldStateControlIndex, uint32 _WorldStateAllianceControlledIndex, uint32 _WorldStateHordeControlledIndex)
: WorldStateControlIndex(_WorldStateControlIndex), WorldStateAllianceControlledIndex(_WorldStateAllianceControlledIndex), WorldStateHordeControlledIndex(_WorldStateHordeControlledIndex) {}
: WorldStateControlIndex(_WorldStateControlIndex), WorldStateAllianceControlledIndex(_WorldStateAllianceControlledIndex), WorldStateHordeControlledIndex(_WorldStateHordeControlledIndex) { }
uint32 WorldStateControlIndex;
uint32 WorldStateAllianceControlledIndex;
uint32 WorldStateHordeControlledIndex;
@@ -270,7 +270,7 @@ struct BattlegroundEYLosingPointStruct
: SpawnNeutralObjectType(_SpawnNeutralObjectType),
DespawnObjectTypeAlliance(_DespawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance),
DespawnObjectTypeHorde(_DespawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde)
{}
{ }
uint32 SpawnNeutralObjectType;
uint32 DespawnObjectTypeAlliance;
@@ -286,7 +286,7 @@ struct BattlegroundEYCapturingPointStruct
SpawnObjectTypeAlliance(_SpawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance),
SpawnObjectTypeHorde(_SpawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde),
GraveYardId(_GraveYardId)
{}
{ }
uint32 DespawnNeutralObjectType;
uint32 SpawnObjectTypeAlliance;
+2 -2
View File
@@ -51,7 +51,7 @@ class ChannelMgr
void MakeNotOnPacket(WorldPacket* data, std::string const& name);
};
class AllianceChannelMgr : public ChannelMgr {};
class HordeChannelMgr : public ChannelMgr {};
class AllianceChannelMgr : public ChannelMgr { };
class HordeChannelMgr : public ChannelMgr { };
#endif
+4 -4
View File
@@ -50,8 +50,8 @@ class ChatHandler
{
public:
WorldSession* GetSession() { return m_session; }
explicit ChatHandler(WorldSession* session) : m_session(session), sentErrorMessage(false) {}
virtual ~ChatHandler() {}
explicit ChatHandler(WorldSession* session) : m_session(session), sentErrorMessage(false) { }
virtual ~ChatHandler() { }
static void FillMessageData(WorldPacket* data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit* speaker);
@@ -129,7 +129,7 @@ class ChatHandler
bool ShowHelpForCommand(ChatCommand* table, const char* cmd);
protected:
explicit ChatHandler() : m_session(NULL), sentErrorMessage(false) {} // for CLI subclass
explicit ChatHandler() : m_session(NULL), sentErrorMessage(false) { } // for CLI subclass
static bool SetDataForCommandInTable(ChatCommand* table, const char* text, uint32 permission, std::string const& help, std::string const& fullcommand);
bool ExecuteCommandInTable(ChatCommand* table, const char* text, std::string const& fullcmd);
bool ShowHelpForSubCommands(ChatCommand* table, char const* cmd, char const* subcmd);
@@ -146,7 +146,7 @@ class CliHandler : public ChatHandler
{
public:
typedef void Print(void*, char const*);
explicit CliHandler(void* callbackArg, Print* zprint) : m_callbackArg(callbackArg), m_print(zprint) {}
explicit CliHandler(void* callbackArg, Print* zprint) : m_callbackArg(callbackArg), m_print(zprint) { }
// overwrite functions
const char *GetTrinityString(int32 entry) const;
+1 -1
View File
@@ -281,7 +281,7 @@ namespace Trinity
class ThreatOrderPred
{
public:
ThreatOrderPred(bool ascending = false) : m_ascending(ascending) {}
ThreatOrderPred(bool ascending = false) : m_ascending(ascending) { }
bool operator() (HostileReference const* a, HostileReference const* b) const
{
return m_ascending ? a->getThreat() < b->getThreat() : a->getThreat() > b->getThreat();
+2 -2
View File
@@ -123,8 +123,8 @@ class ThreatManagerEvent : public ThreatRefStatusChangeEvent
private:
ThreatContainer* iThreatContainer;
public:
ThreatManagerEvent(uint32 pType) : ThreatRefStatusChangeEvent(pType), iThreatContainer(NULL) {}
ThreatManagerEvent(uint32 pType, HostileReference* pHostileReference) : ThreatRefStatusChangeEvent(pType, pHostileReference), iThreatContainer(NULL) {}
ThreatManagerEvent(uint32 pType) : ThreatRefStatusChangeEvent(pType), iThreatContainer(NULL) { }
ThreatManagerEvent(uint32 pType, HostileReference* pHostileReference) : ThreatRefStatusChangeEvent(pType, pHostileReference), iThreatContainer(NULL) { }
void setThreatContainer(ThreatContainer* pThreatContainer) { iThreatContainer = pThreatContainer; }
+8 -8
View File
@@ -2101,8 +2101,8 @@ struct WorldStateUI
// Structures not used for casting to loaded DBC data and not required then packing
struct MapDifficulty
{
MapDifficulty() : resetTime(0), maxPlayers(0), hasErrorMessage(false) {}
MapDifficulty(uint32 _resetTime, uint32 _maxPlayers, bool _hasErrorMessage) : resetTime(_resetTime), maxPlayers(_maxPlayers), hasErrorMessage(_hasErrorMessage) {}
MapDifficulty() : resetTime(0), maxPlayers(0), hasErrorMessage(false) { }
MapDifficulty(uint32 _resetTime, uint32 _maxPlayers, bool _hasErrorMessage) : resetTime(_resetTime), maxPlayers(_maxPlayers), hasErrorMessage(_hasErrorMessage) { }
uint32 resetTime;
uint32 maxPlayers;
@@ -2111,8 +2111,8 @@ struct MapDifficulty
struct TalentSpellPos
{
TalentSpellPos() : talent_id(0), rank(0) {}
TalentSpellPos(uint16 _talent_id, uint8 _rank) : talent_id(_talent_id), rank(_rank) {}
TalentSpellPos() : talent_id(0), rank(0) { }
TalentSpellPos(uint16 _talent_id, uint8 _rank) : talent_id(_talent_id), rank(_rank) { }
uint16 talent_id;
uint8 rank;
@@ -2122,8 +2122,8 @@ typedef std::map<uint32, TalentSpellPos> TalentSpellPosMap;
struct TaxiPathBySourceAndDestination
{
TaxiPathBySourceAndDestination() : ID(0), price(0) {}
TaxiPathBySourceAndDestination(uint32 _id, uint32 _price) : ID(_id), price(_price) {}
TaxiPathBySourceAndDestination() : ID(0), price(0) { }
TaxiPathBySourceAndDestination(uint32 _id, uint32 _price) : ID(_id), price(_price) { }
uint32 ID;
uint32 price;
@@ -2133,8 +2133,8 @@ typedef std::map<uint32, TaxiPathSetForSource> TaxiPathSetBySource;
struct TaxiPathNodePtr
{
TaxiPathNodePtr() : i_ptr(NULL) {}
TaxiPathNodePtr(TaxiPathNodeEntry const* ptr) : i_ptr(ptr) {}
TaxiPathNodePtr() : i_ptr(NULL) { }
TaxiPathNodePtr(TaxiPathNodeEntry const* ptr) : i_ptr(ptr) { }
TaxiPathNodeEntry const* i_ptr;
operator TaxiPathNodeEntry const& () const { return *i_ptr; }
};
+2 -2
View File
@@ -151,7 +151,7 @@ typedef UNORDERED_MAP<uint32, LFGDungeonData> LFGDungeonContainer;
struct LfgJoinResultData
{
LfgJoinResultData(LfgJoinResult _result = LFG_JOIN_OK, LfgRoleCheckState _state = LFG_ROLECHECK_DEFAULT):
result(_result), state(_state) {}
result(_result), state(_state) { }
LfgJoinResult result;
LfgRoleCheckState state;
LfgLockPartyMap lockmap;
@@ -178,7 +178,7 @@ struct LfgQueueStatusData
LfgQueueStatusData(uint32 _dungeonId = 0, int32 _waitTime = -1, int32 _waitTimeAvg = -1, int32 _waitTimeTank = -1, int32 _waitTimeHealer = -1,
int32 _waitTimeDps = -1, uint32 _queuedTime = 0, uint8 _tanks = 0, uint8 _healers = 0, uint8 _dps = 0) :
dungeonId(_dungeonId), waitTime(_waitTime), waitTimeAvg(_waitTimeAvg), waitTimeTank(_waitTimeTank), waitTimeHealer(_waitTimeHealer),
waitTimeDps(_waitTimeDps), queuedTime(_queuedTime), tanks(_tanks), healers(_healers), dps(_dps) {}
waitTimeDps(_waitTimeDps), queuedTime(_queuedTime), tanks(_tanks), healers(_healers), dps(_dps) { }
uint32 dungeonId;
int32 waitTime;
@@ -22,7 +22,7 @@ namespace lfg
LfgPlayerData::LfgPlayerData(): m_State(LFG_STATE_NONE), m_OldState(LFG_STATE_NONE),
m_Team(0), m_Group(0), m_Roles(0), m_Comment("")
{}
{ }
LfgPlayerData::~LfgPlayerData()
{
+1 -1
View File
@@ -71,7 +71,7 @@ struct LfgQueueData
struct LfgWaitTime
{
LfgWaitTime(): time(-1), number(0) {}
LfgWaitTime(): time(-1), number(0) { }
int32 time; ///< Wait time
uint32 number; ///< Number of people used to get that wait time
};
+4 -4
View File
@@ -246,7 +246,7 @@ typedef UNORDERED_MAP<uint32, EquipmentInfoContainerInternal> EquipmentInfoConta
// from `creature` table
struct CreatureData
{
CreatureData() : dbData(true) {}
CreatureData() : dbData(true) { }
uint32 id; // entry in creature_template
uint16 mapid;
uint32 phaseMask;
@@ -325,7 +325,7 @@ typedef UNORDERED_MAP<uint32, CreatureAddon> CreatureAddonContainer;
struct VendorItem
{
VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost)
: item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) {}
: item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) { }
uint32 item;
uint32 maxcount; // 0 for infinity item amount
@@ -367,7 +367,7 @@ struct VendorItemData
struct VendorItemCount
{
explicit VendorItemCount(uint32 _item, uint32 _count)
: itemId(_item), count(_count), lastIncrementTime(time(NULL)) {}
: itemId(_item), count(_count), lastIncrementTime(time(NULL)) { }
uint32 itemId;
uint32 count;
@@ -399,7 +399,7 @@ typedef UNORDERED_MAP<uint32 /*spellid*/, TrainerSpell> TrainerSpellMap;
struct TrainerSpellData
{
TrainerSpellData() : trainerType(0) {}
TrainerSpellData() : trainerType(0) { }
~TrainerSpellData() { spellList.clear(); }
TrainerSpellMap spellList;
@@ -60,8 +60,8 @@ class CreatureGroup
public:
//Group cannot be created empty
explicit CreatureGroup(uint32 id) : m_leader(NULL), m_groupID(id), m_Formed(false) {}
~CreatureGroup() {}
explicit CreatureGroup(uint32 id) : m_leader(NULL), m_groupID(id), m_Formed(false) { }
~CreatureGroup() { }
Creature* getLeader() const { return m_leader; }
uint32 GetId() const { return m_groupID; }
@@ -41,14 +41,14 @@ class TempSummon : public Creature
{
public:
explicit TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
virtual ~TempSummon() {}
virtual ~TempSummon() { }
void Update(uint32 time);
virtual void InitStats(uint32 lifetime);
virtual void InitSummon();
virtual void UnSummon(uint32 msTime = 0);
void RemoveFromWorld();
void SetTempSummonType(TempSummonType type);
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) {}
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) { }
Unit* GetSummoner() const;
Creature* GetSummonerCreatureBase() const;
uint64 GetSummonerGUID() const { return m_summonerGUID; }
@@ -589,7 +589,7 @@ enum GOState
// from `gameobject`
struct GameObjectData
{
explicit GameObjectData() : dbData(true) {}
explicit GameObjectData() : dbData(true) { }
uint32 id; // entry in gamobject_template
uint16 mapid;
uint32 phaseMask;
@@ -33,10 +33,10 @@ struct EnchStoreItem
float chance;
EnchStoreItem()
: ench(0), chance(0) {}
: ench(0), chance(0) { }
EnchStoreItem(uint32 _ench, float _chance)
: ench(_ench), chance(_chance) {}
: ench(_ench), chance(_chance) { }
};
typedef std::vector<EnchStoreItem> EnchStoreList;
+7 -7
View File
@@ -1881,7 +1881,7 @@ namespace Trinity
{
public:
MonsterChatBuilder(WorldObject const& obj, ChatMsg msgtype, int32 textId, uint32 language, uint64 targetGUID)
: i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {}
: i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
char const* text = sObjectMgr->GetTrinityString(i_textId, loc_idx);
@@ -1902,7 +1902,7 @@ namespace Trinity
{
public:
MonsterCustomChatBuilder(WorldObject const& obj, ChatMsg msgtype, const char* text, uint32 language, uint64 targetGUID)
: i_object(obj), i_msgtype(msgtype), i_text(text), i_language(language), i_targetGUID(targetGUID) {}
: i_object(obj), i_msgtype(msgtype), i_text(text), i_language(language), i_targetGUID(targetGUID) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
/// @todo i_object.GetName() also must be localized?
@@ -2426,10 +2426,10 @@ namespace Trinity
{
public:
NearUsedPosDo(WorldObject const& obj, WorldObject const* searcher, float angle, ObjectPosSelector& selector)
: i_object(obj), i_searcher(searcher), i_angle(angle), i_selector(selector) {}
: i_object(obj), i_searcher(searcher), i_angle(angle), i_selector(selector) { }
void operator()(Corpse*) const {}
void operator()(DynamicObject*) const {}
void operator()(Corpse*) const { }
void operator()(DynamicObject*) const { }
void operator()(Creature* c) const
{
@@ -2850,7 +2850,7 @@ struct WorldObjectChangeAccumulator
UpdateDataMapType& i_updateDatas;
WorldObject& i_object;
std::set<uint64> plr_list;
WorldObjectChangeAccumulator(WorldObject &obj, UpdateDataMapType &d) : i_updateDatas(d), i_object(obj) {}
WorldObjectChangeAccumulator(WorldObject &obj, UpdateDataMapType &d) : i_updateDatas(d), i_object(obj) { }
void Visit(PlayerMapType &m)
{
Player* source = NULL;
@@ -2912,7 +2912,7 @@ struct WorldObjectChangeAccumulator
}
}
template<class SKIP> void Visit(GridRefManager<SKIP> &) {}
template<class SKIP> void Visit(GridRefManager<SKIP> &) { }
};
void WorldObject::BuildUpdate(UpdateDataMapType& data_map)
+6 -6
View File
@@ -200,7 +200,7 @@ class Object
virtual bool hasQuest(uint32 /* quest_id */) const { return false; }
virtual bool hasInvolvedQuest(uint32 /* quest_id */) const { return false; }
virtual void BuildUpdate(UpdateDataMapType&) {}
virtual void BuildUpdate(UpdateDataMapType&) { }
void BuildFieldsUpdate(Player*, UpdateDataMapType &) const;
void SetFieldNotifyFlag(uint16 flag) { _fieldNotifyFlags |= flag; }
@@ -275,13 +275,13 @@ struct Position
{
struct PositionXYZStreamer
{
explicit PositionXYZStreamer(Position& pos) : m_pos(&pos) {}
explicit PositionXYZStreamer(Position& pos) : m_pos(&pos) { }
Position* m_pos;
};
struct PositionXYZOStreamer
{
explicit PositionXYZOStreamer(Position& pos) : m_pos(&pos) {}
explicit PositionXYZOStreamer(Position& pos) : m_pos(&pos) { }
Position* m_pos;
};
@@ -536,7 +536,7 @@ class MapObject
friend class ObjectGridLoader; //grid loader for loading creatures
protected:
MapObject() : _moveState(MAP_OBJECT_CELL_MOVE_NONE) {}
MapObject() : _moveState(MAP_OBJECT_CELL_MOVE_NONE) { }
private:
Cell _currentCell;
@@ -650,7 +650,7 @@ class WorldObject : public Object, public WorldLocation
void SendObjectDeSpawnAnim(uint64 guid);
virtual void SaveRespawnTime() {}
virtual void SaveRespawnTime() { }
void AddObjectToRemoveList();
float GetGridActivationRange() const;
@@ -789,7 +789,7 @@ namespace Trinity
class ObjectDistanceOrderPred
{
public:
ObjectDistanceOrderPred(WorldObject const* pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) {}
ObjectDistanceOrderPred(WorldObject const* pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) { }
bool operator()(WorldObject const* pLeft, WorldObject const* pRight) const
{
return m_ascending ? m_refObj->GetDistanceOrder(pLeft, pRight) : !m_refObj->GetDistanceOrder(pLeft, pRight);
@@ -34,7 +34,7 @@ struct ObjectPosSelector
{
struct UsedPos
{
UsedPos(float sign_, float size_, float dist_) : sign(sign_), size(size_), dist(dist_) {}
UsedPos(float sign_, float size_, float dist_) : sign(sign_), size(size_), dist(dist_) { }
float sign;
+1 -1
View File
@@ -6215,7 +6215,7 @@ bool Player::UpdateFishingSkill()
// levels sync. with spell requirement for skill levels to learn
// bonus abilities in sSkillLineAbilityStore
// Used only to avoid scan DBC at each skill grow
static uint32 bonusSkillLevels[] = {75, 150, 225, 300, 375, 450};
static uint32 bonusSkillLevels[ ] = {75, 150, 225, 300, 375, 450};
static const size_t bonusSkillLevelsSize = sizeof(bonusSkillLevels) / sizeof(uint32);
bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
+12 -12
View File
@@ -111,7 +111,7 @@ struct PlayerTalent
// Spell modifier (used for modify other spells)
struct SpellModifier
{
SpellModifier(Aura* _ownerAura = NULL) : op(SPELLMOD_DAMAGE), type(SPELLMOD_FLAT), charges(0), value(0), mask(), spellId(0), ownerAura(_ownerAura) {}
SpellModifier(Aura* _ownerAura = NULL) : op(SPELLMOD_DAMAGE), type(SPELLMOD_FLAT), charges(0), value(0), mask(), spellId(0), ownerAura(_ownerAura) { }
SpellModOp op : 8;
SpellModType type : 8;
int16 charges : 16;
@@ -179,7 +179,7 @@ enum ReputationSource
struct ActionButton
{
ActionButton() : packedData(0), uState(ACTIONBUTTON_NEW) {}
ActionButton() : packedData(0), uState(ACTIONBUTTON_NEW) { }
uint32 packedData;
ActionButtonUpdateState uState;
@@ -205,7 +205,7 @@ typedef std::map<uint8, ActionButton> ActionButtonList;
struct PlayerCreateInfoItem
{
PlayerCreateInfoItem(uint32 id, uint32 amount) : item_id(id), item_amount(amount) {}
PlayerCreateInfoItem(uint32 id, uint32 amount) : item_id(id), item_amount(amount) { }
uint32 item_id;
uint32 item_amount;
@@ -215,7 +215,7 @@ typedef std::list<PlayerCreateInfoItem> PlayerCreateInfoItems;
struct PlayerClassLevelInfo
{
PlayerClassLevelInfo() : basehealth(0), basemana(0) {}
PlayerClassLevelInfo() : basehealth(0), basemana(0) { }
uint16 basehealth;
uint16 basemana;
};
@@ -238,8 +238,8 @@ typedef std::list<uint32> PlayerCreateInfoSpells;
struct PlayerCreateInfoAction
{
PlayerCreateInfoAction() : button(0), type(0), action(0) {}
PlayerCreateInfoAction(uint8 _button, uint32 _action, uint8 _type) : button(_button), type(_type), action(_action) {}
PlayerCreateInfoAction() : button(0), type(0), action(0) { }
PlayerCreateInfoAction(uint8 _button, uint32 _action, uint8 _type) : button(_button), type(_type), action(_action) { }
uint8 button;
uint8 type;
@@ -270,7 +270,7 @@ struct PlayerInfo
struct PvPInfo
{
PvPInfo() : IsHostile(false), IsInHostileArea(false), IsInNoPvPArea(false), IsInFFAPvPArea(false), EndTimer(0) {}
PvPInfo() : IsHostile(false), IsInHostileArea(false), IsInNoPvPArea(false), IsInFFAPvPArea(false), EndTimer(0) { }
bool IsHostile;
bool IsInHostileArea; ///> Marks if player is in an area which forces PvP flag
@@ -281,7 +281,7 @@ struct PvPInfo
struct DuelInfo
{
DuelInfo() : initiator(NULL), opponent(NULL), startTimer(0), startTime(0), outOfBound(0), isMounted(false) {}
DuelInfo() : initiator(NULL), opponent(NULL), startTimer(0), startTime(0), outOfBound(0), isMounted(false) { }
Player* initiator;
Player* opponent;
@@ -343,7 +343,7 @@ struct Runes
struct EnchantDuration
{
EnchantDuration() : item(NULL), slot(MAX_ENCHANTMENT_SLOT), leftduration(0) {};
EnchantDuration() : item(NULL), slot(MAX_ENCHANTMENT_SLOT), leftduration(0) { };
EnchantDuration(Item* _item, EnchantmentSlot _slot, uint32 _leftduration) : item(_item), slot(_slot),
leftduration(_leftduration){ ASSERT(item); };
@@ -667,7 +667,7 @@ typedef std::map<uint32, EquipmentSet> EquipmentSets;
struct ItemPosCount
{
ItemPosCount(uint16 _pos, uint32 _count) : pos(_pos), count(_count) {}
ItemPosCount(uint16 _pos, uint32 _count) : pos(_pos), count(_count) { }
bool isContainedIn(std::vector<ItemPosCount> const& vec) const;
uint16 pos;
uint32 count;
@@ -833,7 +833,7 @@ struct InstancePlayerBind
/* permanent PlayerInstanceBinds are created in Raid/Heroic instances for players
that aren't already permanently bound when they are inside when a boss is killed
or when they enter an instance that the group leader is permanently bound to. */
InstancePlayerBind() : save(NULL), perm(false) {}
InstancePlayerBind() : save(NULL), perm(false) { }
};
struct AccessRequirement
@@ -900,7 +900,7 @@ class PlayerTaxi
{
public:
PlayerTaxi();
~PlayerTaxi() {}
~PlayerTaxi() { }
// Nodes
void InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level);
void LoadTaxiMask(std::string const& data);
+7 -7
View File
@@ -36,7 +36,7 @@ class Totem : public Minion
{
public:
Totem(SummonPropertiesEntry const* properties, Unit* owner);
virtual ~Totem() {}
virtual ~Totem() { }
void Update(uint32 time);
void InitStats(uint32 duration);
void InitSummon();
@@ -48,12 +48,12 @@ class Totem : public Minion
bool UpdateStats(Stats /*stat*/) { return true; }
bool UpdateAllStats() { return true; }
void UpdateResistances(uint32 /*school*/) {}
void UpdateArmor() {}
void UpdateMaxHealth() {}
void UpdateMaxPower(Powers /*power*/) {}
void UpdateAttackPowerAndDamage(bool /*ranged*/) {}
void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
void UpdateResistances(uint32 /*school*/) { }
void UpdateArmor() { }
void UpdateMaxHealth() { }
void UpdateMaxPower(Powers /*power*/) { }
void UpdateAttackPowerAndDamage(bool /*ranged*/) { }
void UpdateDamagePhysical(WeaponAttackType /*attType*/) { }
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
+10 -10
View File
@@ -786,7 +786,7 @@ struct DiminishingReturn
{
DiminishingReturn(DiminishingGroup group, uint32 t, uint32 count)
: DRGroup(group), stack(0), hitTime(t), hitCount(count)
{}
{ }
DiminishingGroup DRGroup:16;
uint16 stack:16;
@@ -804,7 +804,7 @@ class DispelInfo
{
public:
explicit DispelInfo(Unit* dispeller, uint32 dispellerSpellId, uint8 chargesRemoved) :
_dispellerUnit(dispeller), _dispellerSpell(dispellerSpellId), _chargesRemoved(chargesRemoved) {}
_dispellerUnit(dispeller), _dispellerSpell(dispellerSpellId), _chargesRemoved(chargesRemoved) { }
Unit* GetDispeller() const { return _dispellerUnit; }
uint32 GetDispellerSpellId() const { return _dispellerSpell; }
@@ -822,7 +822,7 @@ private:
struct CleanDamage
{
CleanDamage(uint32 mitigated, uint32 absorbed, WeaponAttackType _attackType, MeleeHitOutcome _hitOutCome) :
absorbed_damage(absorbed), mitigated_damage(mitigated), attackType(_attackType), hitOutCome(_hitOutCome) {}
absorbed_damage(absorbed), mitigated_damage(mitigated), attackType(_attackType), hitOutCome(_hitOutCome) { }
uint32 absorbed_damage;
uint32 mitigated_damage;
@@ -951,7 +951,7 @@ struct SpellNonMeleeDamage
SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _schoolMask)
: target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), overkill(0), schoolMask(_schoolMask),
absorb(0), resist(0), physicalLog(false), unused(false), blocked(0), HitInfo(0), cleanDamage(0)
{}
{ }
Unit *target;
Unit *attacker;
@@ -972,7 +972,7 @@ struct SpellNonMeleeDamage
struct SpellPeriodicAuraLogInfo
{
SpellPeriodicAuraLogInfo(AuraEffect const* _auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier, bool _critical)
: auraEff(_auraEff), damage(_damage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier), critical(_critical){}
: auraEff(_auraEff), damage(_damage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier), critical(_critical){ }
AuraEffect const* auraEff;
uint32 damage;
@@ -1027,7 +1027,7 @@ enum CurrentSpellTypes
struct GlobalCooldown
{
explicit GlobalCooldown(uint32 _dur = 0, uint32 _time = 0) : duration(_dur), cast_time(_time) {}
explicit GlobalCooldown(uint32 _dur = 0, uint32 _time = 0) : duration(_dur), cast_time(_time) { }
uint32 duration;
uint32 cast_time;
@@ -1038,7 +1038,7 @@ typedef UNORDERED_MAP<uint32 /*category*/, GlobalCooldown> GlobalCooldownList;
class GlobalCooldownMgr // Shared by Player and CharmInfo
{
public:
GlobalCooldownMgr() {}
GlobalCooldownMgr() { }
public:
bool HasGlobalCooldown(SpellInfo const* spellInfo) const;
@@ -1080,7 +1080,7 @@ enum CommandStates
struct UnitActionBarEntry
{
UnitActionBarEntry() : packedData(uint32(ACT_DISABLED) << 24) {}
UnitActionBarEntry() : packedData(uint32(ACT_DISABLED) << 24) { }
uint32 packedData;
@@ -2255,7 +2255,7 @@ namespace Trinity
class PowerPctOrderPred
{
public:
PowerPctOrderPred(Powers power, bool ascending = true) : m_power(power), m_ascending(ascending) {}
PowerPctOrderPred(Powers power, bool ascending = true) : m_power(power), m_ascending(ascending) { }
bool operator() (const Unit* a, const Unit* b) const
{
float rA = a->GetMaxPower(m_power) ? float(a->GetPower(m_power)) / float(a->GetMaxPower(m_power)) : 0.0f;
@@ -2271,7 +2271,7 @@ namespace Trinity
class HealthPctOrderPred
{
public:
HealthPctOrderPred(bool ascending = true) : m_ascending(ascending) {}
HealthPctOrderPred(bool ascending = true) : m_ascending(ascending) { }
bool operator() (const Unit* a, const Unit* b) const
{
float rA = a->GetMaxHealth() ? float(a->GetHealth()) / float(a->GetMaxHealth()) : 0.0f;
+1 -1
View File
@@ -114,7 +114,7 @@ class VehicleJoinEvent : public BasicEvent
{
friend class Vehicle;
protected:
VehicleJoinEvent(Vehicle* v, Unit* u) : Target(v), Passenger(u), Seat(Target->Seats.end()) {}
VehicleJoinEvent(Vehicle* v, Unit* u) : Target(v), Passenger(u), Seat(Target->Seats.end()) { }
~VehicleJoinEvent();
bool Execute(uint64, uint32);
void Abort(uint64);
@@ -81,7 +81,7 @@ struct VehicleSeat
struct VehicleAccessory
{
VehicleAccessory(uint32 entry, int8 seatId, bool isMinion, uint8 summonType, uint32 summonTime) :
AccessoryEntry(entry), IsMinion(isMinion), SummonTime(summonTime), SeatId(seatId), SummonedType(summonType) {}
AccessoryEntry(entry), IsMinion(isMinion), SummonTime(summonTime), SeatId(seatId), SummonedType(summonType) { }
uint32 AccessoryEntry;
uint32 IsMinion;
uint32 SummonTime;
+2 -2
View File
@@ -55,7 +55,7 @@ typedef std::map<uint32 /*condition id*/, GameEventFinishCondition> GameEventCon
struct GameEventData
{
GameEventData() : start(1), end(0), nextstart(0), occurence(0), length(0), holiday_id(HOLIDAY_NONE), state(GAMEEVENT_NORMAL) {}
GameEventData() : start(1), end(0), nextstart(0), occurence(0), length(0), holiday_id(HOLIDAY_NONE), state(GAMEEVENT_NORMAL) { }
time_t start; // occurs after this time
time_t end; // occurs before this time
time_t nextstart; // after this time the follow-up events count this phase completed
@@ -98,7 +98,7 @@ class GameEventMgr
private:
GameEventMgr();
~GameEventMgr() {};
~GameEventMgr() { };
public:
typedef std::set<uint16> ActiveEvents;
+1 -1
View File
@@ -75,7 +75,7 @@ class HashMapHolder
private:
//Non instanceable only static
HashMapHolder() {}
HashMapHolder() { }
static LockType i_lock;
static MapType m_objectMap;
+6 -6
View File
@@ -467,8 +467,8 @@ struct PetLevelInfo
struct MailLevelReward
{
MailLevelReward() : raceMask(0), mailTemplateId(0), senderEntry(0) {}
MailLevelReward(uint32 _raceMask, uint32 _mailTemplateId, uint32 _senderEntry) : raceMask(_raceMask), mailTemplateId(_mailTemplateId), senderEntry(_senderEntry) {}
MailLevelReward() : raceMask(0), mailTemplateId(0), senderEntry(0) { }
MailLevelReward(uint32 _raceMask, uint32 _mailTemplateId, uint32 _senderEntry) : raceMask(_raceMask), mailTemplateId(_mailTemplateId), senderEntry(_senderEntry) { }
uint32 raceMask;
uint32 mailTemplateId;
@@ -556,8 +556,8 @@ struct QuestPOIPoint
int32 x;
int32 y;
QuestPOIPoint() : x(0), y(0) {}
QuestPOIPoint(int32 _x, int32 _y) : x(_x), y(_y) {}
QuestPOIPoint() : x(0), y(0) { }
QuestPOIPoint(int32 _x, int32 _y) : x(_x), y(_y) { }
};
struct QuestPOI
@@ -571,8 +571,8 @@ struct QuestPOI
uint32 Unk4;
std::vector<QuestPOIPoint> points;
QuestPOI() : Id(0), ObjectiveIndex(0), MapId(0), AreaId(0), Unk2(0), Unk3(0), Unk4(0) {}
QuestPOI(uint32 id, int32 objIndex, uint32 mapId, uint32 areaId, uint32 unk2, uint32 unk3, uint32 unk4) : Id(id), ObjectiveIndex(objIndex), MapId(mapId), AreaId(areaId), Unk2(unk2), Unk3(unk3), Unk4(unk4) {}
QuestPOI() : Id(0), ObjectiveIndex(0), MapId(0), AreaId(0), Unk2(0), Unk3(0), Unk4(0) { }
QuestPOI(uint32 id, int32 objIndex, uint32 mapId, uint32 areaId, uint32 unk2, uint32 unk3, uint32 unk4) : Id(id), ObjectiveIndex(objIndex), MapId(mapId), AreaId(areaId), Unk2(unk2), Unk3(unk3), Unk4(unk4) { }
};
typedef std::vector<QuestPOI> QuestPOIVector;
+2 -2
View File
@@ -31,8 +31,8 @@ class WorldObject;
struct CellArea
{
CellArea() {}
CellArea(CellCoord low, CellCoord high) : low_bound(low), high_bound(high) {}
CellArea() { }
CellArea(CellCoord low, CellCoord high) : low_bound(low), high_bound(high) { }
bool operator!() const { return low_bound == high_bound; }
+1 -1
View File
@@ -52,7 +52,7 @@ class Grid
/** destructor to clean up its resources. This includes unloading the
grid if it has not been unload.
*/
~Grid() {}
~Grid() { }
/** an object of interested enters the grid
*/
+2 -2
View File
@@ -86,11 +86,11 @@ struct CoordPair
{
CoordPair(uint32 x=0, uint32 y=0)
: x_coord(x), y_coord(y)
{}
{ }
CoordPair(const CoordPair<LIMIT> &obj)
: x_coord(obj.x_coord), y_coord(obj.y_coord)
{}
{ }
CoordPair<LIMIT> & operator=(const CoordPair<LIMIT> &obj)
{
+1 -1
View File
@@ -45,7 +45,7 @@ class GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
this->getTarget()->decSize();
}
public:
GridReference() : Reference<GridRefManager<OBJECT>, OBJECT>() {}
GridReference() : Reference<GridRefManager<OBJECT>, OBJECT>() { }
~GridReference() { this->unlink(); }
GridReference* next() { return (GridReference*)Reference<GridRefManager<OBJECT>, OBJECT>::next(); }
};
+1 -1
View File
@@ -34,7 +34,7 @@ class GridState
void setMagic() { i_Magic = MAGIC_TESTVAL; }
unsigned int i_Magic;
#endif
virtual ~GridState() {};
virtual ~GridState() { };
virtual void Update(Map &, NGridType&, GridInfo &, uint32 t_diff) const = 0;
};
+2 -2
View File
@@ -34,10 +34,10 @@ class GridInfo
public:
GridInfo()
: i_timer(0), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)),
i_unloadActiveLockCount(0), i_unloadExplicitLock(false), i_unloadReferenceLock(false) {}
i_unloadActiveLockCount(0), i_unloadExplicitLock(false), i_unloadReferenceLock(false) { }
GridInfo(time_t expiry, bool unload = true )
: i_timer(expiry), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)),
i_unloadActiveLockCount(0), i_unloadExplicitLock(!unload), i_unloadReferenceLock(false) {}
i_unloadActiveLockCount(0), i_unloadExplicitLock(!unload), i_unloadReferenceLock(false) { }
const TimeTracker& getTimeTracker() const { return i_timer; }
bool getUnloadLock() const { return i_unloadActiveLockCount || i_unloadExplicitLock || i_unloadReferenceLock; }
void setUnloadExplicitLock(bool on) { i_unloadExplicitLock = on; }
+91 -91
View File
@@ -45,7 +45,7 @@ namespace Trinity
std::set<Unit*> i_visibleNow;
Player::ClientGUIDs vis_guids;
VisibleNotifier(Player &player) : i_player(player), vis_guids(player.m_clientGUIDs) {}
VisibleNotifier(Player &player) : i_player(player), vis_guids(player.m_clientGUIDs) { }
template<class T> void Visit(GridRefManager<T> &m);
void SendToSelf(void);
};
@@ -54,8 +54,8 @@ namespace Trinity
{
WorldObject &i_object;
explicit VisibleChangesNotifier(WorldObject &object) : i_object(object) {}
template<class T> void Visit(GridRefManager<T> &) {}
explicit VisibleChangesNotifier(WorldObject &object) : i_object(object) { }
template<class T> void Visit(GridRefManager<T> &) { }
void Visit(PlayerMapType &);
void Visit(CreatureMapType &);
void Visit(DynamicObjectMapType &);
@@ -63,7 +63,7 @@ namespace Trinity
struct PlayerRelocationNotifier : public VisibleNotifier
{
PlayerRelocationNotifier(Player &player) : VisibleNotifier(player) {}
PlayerRelocationNotifier(Player &player) : VisibleNotifier(player) { }
template<class T> void Visit(GridRefManager<T> &m) { VisibleNotifier::Visit(m); }
void Visit(CreatureMapType &);
@@ -73,8 +73,8 @@ namespace Trinity
struct CreatureRelocationNotifier
{
Creature &i_creature;
CreatureRelocationNotifier(Creature &c) : i_creature(c) {}
template<class T> void Visit(GridRefManager<T> &) {}
CreatureRelocationNotifier(Creature &c) : i_creature(c) { }
template<class T> void Visit(GridRefManager<T> &) { }
void Visit(CreatureMapType &);
void Visit(PlayerMapType &);
};
@@ -86,8 +86,8 @@ namespace Trinity
CellCoord &p;
const float i_radius;
DelayedUnitRelocation(Cell &c, CellCoord &pair, Map &map, float radius) :
i_map(map), cell(c), p(pair), i_radius(radius) {}
template<class T> void Visit(GridRefManager<T> &) {}
i_map(map), cell(c), p(pair), i_radius(radius) { }
template<class T> void Visit(GridRefManager<T> &) { }
void Visit(CreatureMapType &);
void Visit(PlayerMapType &);
};
@@ -96,8 +96,8 @@ namespace Trinity
{
Unit &i_unit;
bool isCreature;
explicit AIRelocationNotifier(Unit &unit) : i_unit(unit), isCreature(unit.GetTypeId() == TYPEID_UNIT) {}
template<class T> void Visit(GridRefManager<T> &) {}
explicit AIRelocationNotifier(Unit &unit) : i_unit(unit), isCreature(unit.GetTypeId() == TYPEID_UNIT) { }
template<class T> void Visit(GridRefManager<T> &) { }
void Visit(CreatureMapType &);
};
@@ -105,7 +105,7 @@ namespace Trinity
{
GridType &i_grid;
uint32 i_timeDiff;
GridUpdater(GridType &grid, uint32 diff) : i_grid(grid), i_timeDiff(diff) {}
GridUpdater(GridType &grid, uint32 diff) : i_grid(grid), i_timeDiff(diff) { }
template<class T> void updateObjects(GridRefManager<T> &m)
{
@@ -141,7 +141,7 @@ namespace Trinity
void Visit(PlayerMapType &m);
void Visit(CreatureMapType &m);
void Visit(DynamicObjectMapType &m);
template<class SKIP> void Visit(GridRefManager<SKIP> &) {}
template<class SKIP> void Visit(GridRefManager<SKIP> &) { }
void SendPacket(Player* player)
{
@@ -160,10 +160,10 @@ namespace Trinity
struct ObjectUpdater
{
uint32 i_timeDiff;
explicit ObjectUpdater(const uint32 diff) : i_timeDiff(diff) {}
explicit ObjectUpdater(const uint32 diff) : i_timeDiff(diff) { }
template<class T> void Visit(GridRefManager<T> &m);
void Visit(PlayerMapType &) {}
void Visit(CorpseMapType &) {}
void Visit(PlayerMapType &) { }
void Visit(CorpseMapType &) { }
void Visit(CreatureMapType &);
};
@@ -180,7 +180,7 @@ namespace Trinity
Check &i_check;
WorldObjectSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(GameObjectMapType &m);
void Visit(PlayerMapType &m);
@@ -188,7 +188,7 @@ namespace Trinity
void Visit(CorpseMapType &m);
void Visit(DynamicObjectMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -200,7 +200,7 @@ namespace Trinity
Check &i_check;
WorldObjectLastSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(GameObjectMapType &m);
void Visit(PlayerMapType &m);
@@ -208,7 +208,7 @@ namespace Trinity
void Visit(CorpseMapType &m);
void Visit(DynamicObjectMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -220,7 +220,7 @@ namespace Trinity
Check& i_check;
WorldObjectListSearcher(WorldObject const* searcher, std::list<WorldObject*> &objects, Check & check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(PlayerMapType &m);
void Visit(CreatureMapType &m);
@@ -228,7 +228,7 @@ namespace Trinity
void Visit(GameObjectMapType &m);
void Visit(DynamicObjectMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Do>
@@ -239,7 +239,7 @@ namespace Trinity
Do const& i_do;
WorldObjectWorker(WorldObject const* searcher, Do const& _do, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_do(_do) { }
void Visit(GameObjectMapType &m)
{
@@ -285,7 +285,7 @@ namespace Trinity
i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Gameobject searchers
@@ -298,11 +298,11 @@ namespace Trinity
Check &i_check;
GameObjectSearcher(WorldObject const* searcher, GameObject* & result, Check& check)
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(GameObjectMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Last accepted by Check GO if any (Check can change requirements at each call)
@@ -314,11 +314,11 @@ namespace Trinity
Check& i_check;
GameObjectLastSearcher(WorldObject const* searcher, GameObject* & result, Check& check)
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(GameObjectMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -329,18 +329,18 @@ namespace Trinity
Check& i_check;
GameObjectListSearcher(WorldObject const* searcher, std::list<GameObject*> &objects, Check & check)
: i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(GameObjectMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Functor>
struct GameObjectWorker
{
GameObjectWorker(WorldObject const* searcher, Functor& func)
: _func(func), _phaseMask(searcher->GetPhaseMask()) {}
: _func(func), _phaseMask(searcher->GetPhaseMask()) { }
void Visit(GameObjectMapType& m)
{
@@ -349,7 +349,7 @@ namespace Trinity
_func(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
private:
Functor& _func;
@@ -367,12 +367,12 @@ namespace Trinity
Check & i_check;
UnitSearcher(WorldObject const* searcher, Unit* & result, Check & check)
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(CreatureMapType &m);
void Visit(PlayerMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Last accepted by Check Unit if any (Check can change requirements at each call)
@@ -384,12 +384,12 @@ namespace Trinity
Check & i_check;
UnitLastSearcher(WorldObject const* searcher, Unit* & result, Check & check)
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(CreatureMapType &m);
void Visit(PlayerMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// All accepted by Check units if any
@@ -401,12 +401,12 @@ namespace Trinity
Check& i_check;
UnitListSearcher(WorldObject const* searcher, std::list<Unit*> &objects, Check & check)
: i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(PlayerMapType &m);
void Visit(CreatureMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Creature searchers
@@ -419,11 +419,11 @@ namespace Trinity
Check & i_check;
CreatureSearcher(WorldObject const* searcher, Creature* & result, Check & check)
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(CreatureMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Last accepted by Check Creature if any (Check can change requirements at each call)
@@ -435,11 +435,11 @@ namespace Trinity
Check & i_check;
CreatureLastSearcher(WorldObject const* searcher, Creature* & result, Check & check)
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(CreatureMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -450,11 +450,11 @@ namespace Trinity
Check& i_check;
CreatureListSearcher(WorldObject const* searcher, std::list<Creature*> &objects, Check & check)
: i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(CreatureMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Do>
@@ -464,7 +464,7 @@ namespace Trinity
Do& i_do;
CreatureWorker(WorldObject const* searcher, Do& _do)
: i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
: i_phaseMask(searcher->GetPhaseMask()), i_do(_do) { }
void Visit(CreatureMapType &m)
{
@@ -473,7 +473,7 @@ namespace Trinity
i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Player searchers
@@ -486,11 +486,11 @@ namespace Trinity
Check & i_check;
PlayerSearcher(WorldObject const* searcher, Player* & result, Check & check)
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(PlayerMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -501,11 +501,11 @@ namespace Trinity
Check& i_check;
PlayerListSearcher(WorldObject const* searcher, std::list<Player*> &objects, Check & check)
: i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
: i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(PlayerMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -521,7 +521,7 @@ namespace Trinity
void Visit(PlayerMapType& m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Do>
@@ -531,7 +531,7 @@ namespace Trinity
Do& i_do;
PlayerWorker(WorldObject const* searcher, Do& _do)
: i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
: i_phaseMask(searcher->GetPhaseMask()), i_do(_do) { }
void Visit(PlayerMapType &m)
{
@@ -540,7 +540,7 @@ namespace Trinity
i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Do>
@@ -551,7 +551,7 @@ namespace Trinity
Do& i_do;
PlayerDistWorker(WorldObject const* searcher, float _dist, Do& _do)
: i_searcher(searcher), i_dist(_dist), i_do(_do) {}
: i_searcher(searcher), i_dist(_dist), i_do(_do) { }
void Visit(PlayerMapType &m)
{
@@ -560,7 +560,7 @@ namespace Trinity
i_do(itr->GetSource());
}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// CHECKS && DO classes
@@ -570,7 +570,7 @@ namespace Trinity
class AnyDeadUnitObjectInRangeCheck
{
public:
AnyDeadUnitObjectInRangeCheck(Unit* searchObj, float range) : i_searchObj(searchObj), i_range(range) {}
AnyDeadUnitObjectInRangeCheck(Unit* searchObj, float range) : i_searchObj(searchObj), i_range(range) { }
bool operator()(Player* u);
bool operator()(Corpse* u);
bool operator()(Creature* u);
@@ -585,7 +585,7 @@ namespace Trinity
public:
AnyDeadUnitSpellTargetInRangeCheck(Unit* searchObj, float range, SpellInfo const* spellInfo, SpellTargetCheckTypes check)
: AnyDeadUnitObjectInRangeCheck(searchObj, range), i_spellInfo(spellInfo), i_check(searchObj, searchObj, spellInfo, check, NULL)
{}
{ }
bool operator()(Player* u);
bool operator()(Corpse* u);
bool operator()(Creature* u);
@@ -600,11 +600,11 @@ namespace Trinity
class RespawnDo
{
public:
RespawnDo() {}
RespawnDo() { }
void operator()(Creature* u) const { u->Respawn(); }
void operator()(GameObject* u) const { u->Respawn(); }
void operator()(WorldObject*) const {}
void operator()(Corpse*) const {}
void operator()(WorldObject*) const { }
void operator()(Corpse*) const { }
};
// GameObject checks
@@ -612,7 +612,7 @@ namespace Trinity
class GameObjectFocusCheck
{
public:
GameObjectFocusCheck(Unit const* unit, uint32 focusId) : i_unit(unit), i_focusId(focusId) {}
GameObjectFocusCheck(Unit const* unit, uint32 focusId) : i_unit(unit), i_focusId(focusId) { }
bool operator()(GameObject* go) const
{
if (go->GetGOInfo()->type != GAMEOBJECT_TYPE_SPELL_FOCUS)
@@ -634,7 +634,7 @@ namespace Trinity
class NearestGameObjectFishingHole
{
public:
NearestGameObjectFishingHole(WorldObject const& obj, float range) : i_obj(obj), i_range(range) {}
NearestGameObjectFishingHole(WorldObject const& obj, float range) : i_obj(obj), i_range(range) { }
bool operator()(GameObject* go)
{
if (go->GetGOInfo()->type == GAMEOBJECT_TYPE_FISHINGHOLE && go->isSpawned() && i_obj.IsWithinDistInMap(go, i_range) && i_obj.IsWithinDistInMap(go, (float)go->GetGOInfo()->fishinghole.radius))
@@ -656,7 +656,7 @@ namespace Trinity
class NearestGameObjectCheck
{
public:
NearestGameObjectCheck(WorldObject const& obj) : i_obj(obj), i_range(999) {}
NearestGameObjectCheck(WorldObject const& obj) : i_obj(obj), i_range(999) { }
bool operator()(GameObject* go)
{
if (i_obj.IsWithinDistInMap(go, i_range))
@@ -679,7 +679,7 @@ namespace Trinity
class NearestGameObjectEntryInObjectRangeCheck
{
public:
NearestGameObjectEntryInObjectRangeCheck(WorldObject const& obj, uint32 entry, float range) : i_obj(obj), i_entry(entry), i_range(range) {}
NearestGameObjectEntryInObjectRangeCheck(WorldObject const& obj, uint32 entry, float range) : i_obj(obj), i_entry(entry), i_range(range) { }
bool operator()(GameObject* go)
{
if (go->GetEntry() == i_entry && i_obj.IsWithinDistInMap(go, i_range))
@@ -703,7 +703,7 @@ namespace Trinity
class NearestGameObjectTypeInObjectRangeCheck
{
public:
NearestGameObjectTypeInObjectRangeCheck(WorldObject const& obj, GameobjectTypes type, float range) : i_obj(obj), i_type(type), i_range(range) {}
NearestGameObjectTypeInObjectRangeCheck(WorldObject const& obj, GameobjectTypes type, float range) : i_obj(obj), i_type(type), i_range(range) { }
bool operator()(GameObject* go)
{
if (go->GetGoType() == i_type && i_obj.IsWithinDistInMap(go, i_range))
@@ -726,7 +726,7 @@ namespace Trinity
class GameObjectWithDbGUIDCheck
{
public:
GameObjectWithDbGUIDCheck(WorldObject const& /*obj*/, uint32 db_guid) : i_db_guid(db_guid) {}
GameObjectWithDbGUIDCheck(WorldObject const& /*obj*/, uint32 db_guid) : i_db_guid(db_guid) { }
bool operator()(GameObject const* go) const
{
return go->GetDBTableGUIDLow() == i_db_guid;
@@ -740,7 +740,7 @@ namespace Trinity
class MostHPMissingInRange
{
public:
MostHPMissingInRange(Unit const* obj, float range, uint32 hp) : i_obj(obj), i_range(range), i_hp(hp) {}
MostHPMissingInRange(Unit const* obj, float range, uint32 hp) : i_obj(obj), i_range(range), i_hp(hp) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) && u->GetMaxHealth() - u->GetHealth() > i_hp)
@@ -759,7 +759,7 @@ namespace Trinity
class FriendlyCCedInRange
{
public:
FriendlyCCedInRange(Unit const* obj, float range) : i_obj(obj), i_range(range) {}
FriendlyCCedInRange(Unit const* obj, float range) : i_obj(obj), i_range(range) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
@@ -777,7 +777,7 @@ namespace Trinity
class FriendlyMissingBuffInRange
{
public:
FriendlyMissingBuffInRange(Unit const* obj, float range, uint32 spellid) : i_obj(obj), i_range(range), i_spell(spellid) {}
FriendlyMissingBuffInRange(Unit const* obj, float range, uint32 spellid) : i_obj(obj), i_range(range), i_spell(spellid) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
@@ -796,7 +796,7 @@ namespace Trinity
class AnyUnfriendlyUnitInObjectRangeCheck
{
public:
AnyUnfriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {}
AnyUnfriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u))
@@ -813,7 +813,7 @@ namespace Trinity
class AnyUnfriendlyNoTotemUnitInObjectRangeCheck
{
public:
AnyUnfriendlyNoTotemUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {}
AnyUnfriendlyNoTotemUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) { }
bool operator()(Unit* u)
{
if (!u->IsAlive())
@@ -840,7 +840,7 @@ namespace Trinity
{
public:
AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck(Unit const* funit, float range)
: i_funit(funit), i_range(range) {}
: i_funit(funit), i_range(range) { }
bool operator()(const Unit* u)
{
@@ -859,7 +859,7 @@ namespace Trinity
class CreatureWithDbGUIDCheck
{
public:
CreatureWithDbGUIDCheck(WorldObject const* /*obj*/, uint32 lowguid) : i_lowguid(lowguid) {}
CreatureWithDbGUIDCheck(WorldObject const* /*obj*/, uint32 lowguid) : i_lowguid(lowguid) { }
bool operator()(Creature* u)
{
return u->GetDBTableGUIDLow() == i_lowguid;
@@ -871,7 +871,7 @@ namespace Trinity
class AnyFriendlyUnitInObjectRangeCheck
{
public:
AnyFriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range, bool playerOnly = false) : i_obj(obj), i_funit(funit), i_range(range), i_playerOnly(playerOnly) {}
AnyFriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range, bool playerOnly = false) : i_obj(obj), i_funit(funit), i_range(range), i_playerOnly(playerOnly) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && i_funit->IsFriendlyTo(u) && (!i_playerOnly || u->GetTypeId() == TYPEID_PLAYER))
@@ -889,7 +889,7 @@ namespace Trinity
class AnyGroupedUnitInObjectRangeCheck
{
public:
AnyGroupedUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range, bool raid) : _source(obj), _refUnit(funit), _range(range), _raid(raid) {}
AnyGroupedUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range, bool raid) : _source(obj), _refUnit(funit), _range(range), _raid(raid) { }
bool operator()(Unit* u)
{
if (G3D::fuzzyEq(_range, 0))
@@ -916,7 +916,7 @@ namespace Trinity
class AnyUnitInObjectRangeCheck
{
public:
AnyUnitInObjectRangeCheck(WorldObject const* obj, float range) : i_obj(obj), i_range(range) {}
AnyUnitInObjectRangeCheck(WorldObject const* obj, float range) : i_obj(obj), i_range(range) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range))
@@ -933,7 +933,7 @@ namespace Trinity
class NearestAttackableUnitInObjectRangeCheck
{
public:
NearestAttackableUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {}
NearestAttackableUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) { }
bool operator()(Unit* u)
{
if (u->isTargetableForAttack() && i_obj->IsWithinDistInMap(u, i_range) &&
@@ -993,7 +993,7 @@ namespace Trinity
public:
CallOfHelpCreatureInRangeDo(Unit* funit, Unit* enemy, float range)
: i_funit(funit), i_enemy(enemy), i_range(range)
{}
{ }
void operator()(Creature* u)
{
if (u == i_funit)
@@ -1161,7 +1161,7 @@ namespace Trinity
{
public:
NearestAssistCreatureInCreatureRangeCheck(Creature* obj, Unit* enemy, float range)
: i_obj(obj), i_enemy(enemy), i_range(range) {}
: i_obj(obj), i_enemy(enemy), i_range(range) { }
bool operator()(Creature* u)
{
@@ -1194,7 +1194,7 @@ namespace Trinity
{
public:
NearestCreatureEntryWithLiveStateInObjectRangeCheck(WorldObject const& obj, uint32 entry, bool alive, float range)
: i_obj(obj), i_entry(entry), i_alive(alive), i_range(range) {}
: i_obj(obj), i_entry(entry), i_alive(alive), i_range(range) { }
bool operator()(Creature* u)
{
@@ -1219,7 +1219,7 @@ namespace Trinity
class AnyPlayerInObjectRangeCheck
{
public:
AnyPlayerInObjectRangeCheck(WorldObject const* obj, float range, bool reqAlive = true) : _obj(obj), _range(range), _reqAlive(reqAlive) {}
AnyPlayerInObjectRangeCheck(WorldObject const* obj, float range, bool reqAlive = true) : _obj(obj), _range(range), _reqAlive(reqAlive) { }
bool operator()(Player* u)
{
if (_reqAlive && !u->IsAlive())
@@ -1264,7 +1264,7 @@ namespace Trinity
class AllFriendlyCreaturesInGrid
{
public:
AllFriendlyCreaturesInGrid(Unit const* obj) : unit(obj) {}
AllFriendlyCreaturesInGrid(Unit const* obj) : unit(obj) { }
bool operator() (Unit* u)
{
if (u->IsAlive() && u->IsVisible() && u->IsFriendlyTo(unit))
@@ -1279,7 +1279,7 @@ namespace Trinity
class AllGameObjectsWithEntryInRange
{
public:
AllGameObjectsWithEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
AllGameObjectsWithEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) { }
bool operator() (GameObject* go)
{
if (go->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(go, m_fRange, false))
@@ -1296,7 +1296,7 @@ namespace Trinity
class AllCreaturesOfEntryInRange
{
public:
AllCreaturesOfEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
AllCreaturesOfEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) { }
bool operator() (Unit* unit)
{
if (unit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(unit, m_fRange, false))
@@ -1314,7 +1314,7 @@ namespace Trinity
class PlayerAtMinimumRangeAway
{
public:
PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : unit(unit), fRange(fMinRange) {}
PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : unit(unit), fRange(fMinRange) { }
bool operator() (Player* player)
{
//No threat list check, must be done explicit if expected to be in combat with creature
@@ -1333,7 +1333,7 @@ namespace Trinity
{
public:
GameObjectInRangeCheck(float _x, float _y, float _z, float _range, uint32 _entry = 0) :
x(_x), y(_y), z(_z), range(_range), entry(_entry) {}
x(_x), y(_y), z(_z), range(_range), entry(_entry) { }
bool operator() (GameObject* go)
{
if (!entry || (go->GetGOInfo() && go->GetGOInfo()->entry == entry))
@@ -1348,7 +1348,7 @@ namespace Trinity
class AllWorldObjectsInRange
{
public:
AllWorldObjectsInRange(const WorldObject* object, float maxRange) : m_pObject(object), m_fRange(maxRange) {}
AllWorldObjectsInRange(const WorldObject* object, float maxRange) : m_pObject(object), m_fRange(maxRange) { }
bool operator() (WorldObject* go)
{
return m_pObject->IsWithinDist(go, m_fRange, false) && m_pObject->InSamePhase(go);
@@ -1361,7 +1361,7 @@ namespace Trinity
class ObjectTypeIdCheck
{
public:
ObjectTypeIdCheck(TypeID typeId, bool equals) : _typeId(typeId), _equals(equals) {}
ObjectTypeIdCheck(TypeID typeId, bool equals) : _typeId(typeId), _equals(equals) { }
bool operator()(WorldObject* object)
{
return (object->GetTypeId() == _typeId) == _equals;
@@ -1375,7 +1375,7 @@ namespace Trinity
class ObjectGUIDCheck
{
public:
ObjectGUIDCheck(uint64 GUID) : _GUID(GUID) {}
ObjectGUIDCheck(uint64 GUID) : _GUID(GUID) { }
bool operator()(WorldObject* object)
{
return object->GetGUID() == _GUID;
@@ -1388,7 +1388,7 @@ namespace Trinity
class UnitAuraCheck
{
public:
UnitAuraCheck(bool present, uint32 spellId, uint64 casterGUID = 0) : _present(present), _spellId(spellId), _casterGUID(casterGUID) {}
UnitAuraCheck(bool present, uint32 spellId, uint64 casterGUID = 0) : _present(present), _spellId(spellId), _casterGUID(casterGUID) { }
bool operator()(Unit* unit) const
{
return unit->HasAura(_spellId, _casterGUID) == _present;
@@ -1412,7 +1412,7 @@ namespace Trinity
class LocalizedPacketDo
{
public:
explicit LocalizedPacketDo(Builder& builder) : i_builder(builder) {}
explicit LocalizedPacketDo(Builder& builder) : i_builder(builder) { }
~LocalizedPacketDo()
{
@@ -1432,7 +1432,7 @@ namespace Trinity
{
public:
typedef std::vector<WorldPacket*> WorldPacketList;
explicit LocalizedPacketListDo(Builder& builder) : i_builder(builder) {}
explicit LocalizedPacketListDo(Builder& builder) : i_builder(builder) { }
~LocalizedPacketListDo()
{
+1 -1
View File
@@ -64,7 +64,7 @@ class ObjectWorldLoader
public:
explicit ObjectWorldLoader(ObjectGridLoader& gloader)
: i_cell(gloader.i_cell), i_map(gloader.i_map), i_corpses (0)
{}
{ }
void Visit(CorpseMapType &m);
+5 -5
View File
@@ -34,12 +34,12 @@ class ObjectGridLoader
public:
ObjectGridLoader(NGridType &grid, Map* map, const Cell &cell)
: i_cell(cell), i_grid(grid), i_map(map), i_gameObjects(0), i_creatures(0), i_corpses (0)
{}
{ }
void Visit(GameObjectMapType &m);
void Visit(CreatureMapType &m);
void Visit(CorpseMapType &) const {}
void Visit(DynamicObjectMapType&) const {}
void Visit(CorpseMapType &) const { }
void Visit(DynamicObjectMapType&) const { }
void LoadN(void);
@@ -59,7 +59,7 @@ class ObjectGridStoper
{
public:
void Visit(CreatureMapType &m);
template<class T> void Visit(GridRefManager<T> &) {}
template<class T> void Visit(GridRefManager<T> &) { }
};
//Move the foreign creatures back to respawn positions before unloading the NGrid
@@ -68,7 +68,7 @@ class ObjectGridEvacuator
public:
void Visit(CreatureMapType &m);
void Visit(GameObjectMapType &m);
template<class T> void Visit(GridRefManager<T> &) {}
template<class T> void Visit(GridRefManager<T> &) { }
};
//Clean up and remove from world
+1 -1
View File
@@ -152,7 +152,7 @@ struct InstanceGroupBind
bool perm;
/* permanent InstanceGroupBinds exist if the leader has a permanent
PlayerInstanceBind for the same instance. */
InstanceGroupBind() : save(NULL), perm(false) {}
InstanceGroupBind() : save(NULL), perm(false) { }
};
/** request member stats checken **/
+1 -1
View File
@@ -32,7 +32,7 @@ class GroupReference : public Reference<Group, Player>
void targetObjectDestroyLink();
void sourceObjectDestroyLink();
public:
GroupReference() : Reference<Group, Player>(), iSubGroup(0) {}
GroupReference() : Reference<Group, Player>(), iSubGroup(0) { }
~GroupReference() { unlink(); }
GroupReference* next() { return (GroupReference*)Reference<Group, Player>::next(); }
GroupReference const* next() const { return (GroupReference const*)Reference<Group, Player>::next(); }
+1 -1
View File
@@ -503,7 +503,7 @@ namespace Trinity
{
public:
EmoteChatBuilder(Player const& player, uint32 text_emote, uint32 emote_num, Unit const* target)
: i_player(player), i_text_emote(text_emote), i_emote_num(emote_num), i_target(target) {}
: i_player(player), i_text_emote(text_emote), i_emote_num(emote_num), i_target(target) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
+3 -3
View File
@@ -148,7 +148,7 @@ class InstanceSaveManager
friend class InstanceSave;
private:
InstanceSaveManager() : lock_instLists(false) {};
InstanceSaveManager() : lock_instLists(false) { };
~InstanceSaveManager();
public:
@@ -163,9 +163,9 @@ class InstanceSaveManager
uint16 mapid;
uint16 instanceId;
InstResetEvent() : type(0), difficulty(DUNGEON_DIFFICULTY_NORMAL), mapid(0), instanceId(0) {}
InstResetEvent() : type(0), difficulty(DUNGEON_DIFFICULTY_NORMAL), mapid(0), instanceId(0) { }
InstResetEvent(uint8 t, uint32 _mapid, Difficulty d, uint16 _instanceid)
: type(t), difficulty(d), mapid(_mapid), instanceId(_instanceid) {}
: type(t), difficulty(d), mapid(_mapid), instanceId(_instanceid) { }
bool operator == (const InstResetEvent& e) const { return e.instanceId == instanceId; }
};
typedef std::multimap<time_t /*resetTime*/, InstResetEvent> ResetTimeQueue;
+9 -9
View File
@@ -101,7 +101,7 @@ struct MinionData
struct BossInfo
{
BossInfo() : state(TO_BE_DECIDED) {}
BossInfo() : state(TO_BE_DECIDED) { }
EncounterState state;
DoorSet door[MAX_DOOR_TYPES];
MinionSet minion;
@@ -111,7 +111,7 @@ struct BossInfo
struct DoorInfo
{
explicit DoorInfo(BossInfo* _bossInfo, DoorType _type, BoundaryType _boundary)
: bossInfo(_bossInfo), type(_type), boundary(_boundary) {}
: bossInfo(_bossInfo), type(_type), boundary(_boundary) { }
BossInfo* bossInfo;
DoorType type;
BoundaryType boundary;
@@ -119,7 +119,7 @@ struct DoorInfo
struct MinionInfo
{
explicit MinionInfo(BossInfo* _bossInfo) : bossInfo(_bossInfo) {}
explicit MinionInfo(BossInfo* _bossInfo) : bossInfo(_bossInfo) { }
BossInfo* bossInfo;
};
@@ -131,14 +131,14 @@ typedef std::map<uint32 /*entry*/, MinionInfo> MinionInfoMap;
class InstanceScript : public ZoneScript
{
public:
explicit InstanceScript(Map* map) : instance(map), completedEncounters(0) {}
explicit InstanceScript(Map* map) : instance(map), completedEncounters(0) { }
virtual ~InstanceScript() {}
virtual ~InstanceScript() { }
Map* instance;
//On creation, NOT load.
virtual void Initialize() {}
virtual void Initialize() { }
//On load
virtual void Load(char const* data) { LoadBossState(data); }
@@ -148,14 +148,14 @@ class InstanceScript : public ZoneScript
void SaveToDB();
virtual void Update(uint32 /*diff*/) {}
virtual void Update(uint32 /*diff*/) { }
//Used by the map's CanEnter function.
//This is to prevent players from entering during boss encounters.
virtual bool IsEncounterInProgress() const;
//Called when a player successfully enters the instance.
virtual void OnPlayerEnter(Player* /*player*/) {}
virtual void OnPlayerEnter(Player* /*player*/) { }
//Handle open / close objects
//use HandleGameObject(0, boolen, GO); in OnObjectCreate in instance scripts
@@ -212,7 +212,7 @@ class InstanceScript : public ZoneScript
void SendEncounterUnit(uint32 type, Unit* unit = NULL, uint8 param1 = 0, uint8 param2 = 0);
virtual void FillInitialWorldStates(WorldPacket& /*data*/) {}
virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
protected:
void SetBossNumber(uint32 number) { bosses.resize(number); }
+10 -10
View File
@@ -117,7 +117,7 @@ struct LootStoreItem
LootStoreItem(uint32 _itemid, float _chanceOrQuestChance, uint16 _lootmode, uint8 _group, int32 _mincountOrRef, uint8 _maxcount)
: itemid(_itemid), chance(fabs(_chanceOrQuestChance)), mincountOrRef(_mincountOrRef), lootmode(_lootmode),
group(_group), needs_quest(_chanceOrQuestChance < 0), maxcount(_maxcount)
{}
{ }
bool Roll(bool rate) const; // Checks if the entry takes it's chance (at loot generation)
bool IsValid(LootStore const& store, uint32 entry) const;
@@ -148,7 +148,7 @@ struct LootItem
explicit LootItem(LootStoreItem const& li);
// Empty constructor for creating an empty LootItem to be filled in with DB data
LootItem() : canSave(true){};
LootItem() : canSave(true){ };
// Basic checks for player/item compatibility - if false no chance to see the item in the loot
bool AllowedForPlayer(Player const* player) const;
@@ -162,10 +162,10 @@ struct QuestItem
bool is_looted;
QuestItem()
: index(0), is_looted(false) {}
: index(0), is_looted(false) { }
QuestItem(uint8 _index, bool _islooted = false)
: index(_index), is_looted(_islooted) {}
: index(_index), is_looted(_islooted) { }
};
struct Loot;
@@ -183,7 +183,7 @@ class LootStore
{
public:
explicit LootStore(char const* name, char const* entryName, bool ratesAllowed)
: m_name(name), m_entryName(entryName), m_ratesAllowed(ratesAllowed) {}
: m_name(name), m_entryName(entryName), m_ratesAllowed(ratesAllowed) { }
virtual ~LootStore() { Clear(); }
@@ -256,9 +256,9 @@ class LootTemplate
class LootValidatorRef : public Reference<Loot, LootValidatorRef>
{
public:
LootValidatorRef() {}
void targetObjectDestroyLink() {}
void sourceObjectDestroyLink() {}
LootValidatorRef() { }
void targetObjectDestroyLink() { }
void sourceObjectDestroyLink() { }
};
//=====================================================
@@ -303,7 +303,7 @@ struct Loot
// Only set for inventory items that can be right-click looted
uint32 containerID;
Loot(uint32 _gold = 0) : gold(_gold), unlootedCount(0), loot_type(LOOT_CORPSE), maxDuplicates(1), containerID(0) {}
Loot(uint32 _gold = 0) : gold(_gold), unlootedCount(0), loot_type(LOOT_CORPSE), maxDuplicates(1), containerID(0) { }
~Loot() { clear(); }
// For deleting items at loot removal since there is no backward interface to the Item()
@@ -381,7 +381,7 @@ struct LootView
Player* viewer;
PermissionTypes permission;
LootView(Loot &_loot, Player* _viewer, PermissionTypes _permission = ALL_PERMISSION)
: loot(_loot), viewer(_viewer), permission(_permission) {}
: loot(_loot), viewer(_viewer), permission(_permission) { }
};
extern LootStore LootTemplates_Creature;
+3 -3
View File
@@ -102,7 +102,7 @@ class MailSender
class MailReceiver
{
public: // Constructors
explicit MailReceiver(uint32 receiver_lowguid) : m_receiver(NULL), m_receiver_lowguid(receiver_lowguid) {}
explicit MailReceiver(uint32 receiver_lowguid) : m_receiver(NULL), m_receiver_lowguid(receiver_lowguid) { }
MailReceiver(Player* receiver);
MailReceiver(Player* receiver, uint32 receiver_lowguid);
public: // Accessors
@@ -120,9 +120,9 @@ class MailDraft
public: // Constructors
explicit MailDraft(uint16 mailTemplateId, bool need_items = true)
: m_mailTemplateId(mailTemplateId), m_mailTemplateItemsNeed(need_items), m_money(0), m_COD(0)
{}
{ }
MailDraft(std::string const& subject, std::string const& body)
: m_mailTemplateId(0), m_mailTemplateItemsNeed(false), m_subject(subject), m_body(body), m_money(0), m_COD(0) {}
: m_mailTemplateId(0), m_mailTemplateItemsNeed(false), m_subject(subject), m_body(body), m_money(0), m_COD(0) { }
public: // Accessors
uint16 GetMailTemplateId() const { return m_mailTemplateId; }
std::string const& GetSubject() const { return m_subject; }
+1 -1
View File
@@ -693,7 +693,7 @@ struct ResetNotifier
for (typename GridRefManager<T>::iterator iter=m.begin(); iter != m.end(); ++iter)
iter->GetSource()->ResetAllNotifies();
}
template<class T> void Visit(GridRefManager<T> &) {}
template<class T> void Visit(GridRefManager<T> &) { }
void Visit(CreatureMapType &m) { resetNotify<Creature>(m);}
void Visit(PlayerMapType &m) { resetNotify<Player>(m);}
};
+1 -1
View File
@@ -30,7 +30,7 @@ class MapInstanced : public Map
typedef UNORDERED_MAP< uint32, Map*> InstancedMaps;
MapInstanced(uint32 id, time_t expiry);
~MapInstanced() {}
~MapInstanced() { }
// functions overwrite Map versions
void Update(const uint32);
+1 -1
View File
@@ -42,7 +42,7 @@ class MapReference : public Reference<Map, Player>
getTarget()->m_mapRefManager.decSize();
}
public:
MapReference() : Reference<Map, Player>() {}
MapReference() : Reference<Map, Player>() { }
~MapReference() { unlink(); }
MapReference* next() { return (MapReference*)Reference<Map, Player>::next(); }
MapReference const* next() const { return (MapReference const*)Reference<Map, Player>::next(); }
+5 -5
View File
@@ -26,8 +26,8 @@ class GameObject;
class ZoneScript
{
public:
ZoneScript() {}
virtual ~ZoneScript() {}
ZoneScript() { }
virtual ~ZoneScript() { }
virtual uint32 GetCreatureEntry(uint32 /*guidlow*/, CreatureData const* data) { return data->id; }
virtual uint32 GetGameObjectEntry(uint32 /*guidlow*/, uint32 entry) { return entry; }
@@ -42,13 +42,13 @@ class ZoneScript
//All-purpose data storage 64 bit
virtual uint64 GetData64(uint32 /*DataId*/) const { return 0; }
virtual void SetData64(uint32 /*DataId*/, uint64 /*Value*/) {}
virtual void SetData64(uint32 /*DataId*/, uint64 /*Value*/) { }
//All-purpose data storage 32 bit
virtual uint32 GetData(uint32 /*DataId*/) const { return 0; }
virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) {}
virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) { }
virtual void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/) {}
virtual void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/) { }
};
#endif
@@ -3553,7 +3553,7 @@ struct MmapTileHeader
bool usesLiquids : 1;
MmapTileHeader() : mmapMagic(MMAP_MAGIC), dtVersion(DT_NAVMESH_VERSION),
mmapVersion(MMAP_VERSION), size(0), usesLiquids(true) {}
mmapVersion(MMAP_VERSION), size(0), usesLiquids(true) { }
};
enum NavTerrain
+2 -2
View File
@@ -79,13 +79,13 @@ class MovementGeneratorMedium : public MovementGenerator
struct SelectableMovement : public FactoryHolder<MovementGenerator, MovementGeneratorType>
{
SelectableMovement(MovementGeneratorType mgt) : FactoryHolder<MovementGenerator, MovementGeneratorType>(mgt) {}
SelectableMovement(MovementGeneratorType mgt) : FactoryHolder<MovementGenerator, MovementGeneratorType>(mgt) { }
};
template<class REAL_MOVEMENT>
struct MovementGeneratorFactory : public SelectableMovement
{
MovementGeneratorFactory(MovementGeneratorType mgt) : SelectableMovement(mgt) {}
MovementGeneratorFactory(MovementGeneratorType mgt) : SelectableMovement(mgt) { }
MovementGenerator* Create(void *) const;
};
@@ -26,7 +26,7 @@ template<class T>
class ConfusedMovementGenerator : public MovementGeneratorMedium< T, ConfusedMovementGenerator<T> >
{
public:
explicit ConfusedMovementGenerator() : i_nextMoveTime(0) {}
explicit ConfusedMovementGenerator() : i_nextMoveTime(0) { }
void DoInitialize(T*);
void DoFinalize(T*);
@@ -25,7 +25,7 @@ template<class T>
class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovementGenerator<T> >
{
public:
FleeingMovementGenerator(uint64 fright) : i_frightGUID(fright), i_nextCheckTime(0) {}
FleeingMovementGenerator(uint64 fright) : i_frightGUID(fright), i_nextCheckTime(0) { }
void DoInitialize(T*);
void DoFinalize(T*);
@@ -47,7 +47,7 @@ class TimedFleeingMovementGenerator : public FleeingMovementGenerator<Creature>
public:
TimedFleeingMovementGenerator(uint64 fright, uint32 time) :
FleeingMovementGenerator<Creature>(fright),
i_totalFleeTime(time) {}
i_totalFleeTime(time) { }
MovementGeneratorType GetMovementGeneratorType() { return TIMED_FLEEING_MOTION_TYPE; }
bool Update(Unit*, uint32);
@@ -31,8 +31,8 @@ class HomeMovementGenerator<Creature> : public MovementGeneratorMedium< Creature
{
public:
HomeMovementGenerator() : arrived(false) {}
~HomeMovementGenerator() {}
HomeMovementGenerator() : arrived(false) { }
~HomeMovementGenerator() { }
void DoInitialize(Creature*);
void DoFinalize(Creature*);
@@ -37,7 +37,7 @@ extern IdleMovementGenerator si_idleMovement;
class RotateMovementGenerator : public MovementGenerator
{
public:
explicit RotateMovementGenerator(uint32 time, RotateDirection direction) : m_duration(time), m_maxDuration(time), m_direction(direction) {}
explicit RotateMovementGenerator(uint32 time, RotateDirection direction) : m_duration(time), m_maxDuration(time), m_direction(direction) { }
void Initialize(Unit*);
void Finalize(Unit*);
@@ -53,7 +53,7 @@ class RotateMovementGenerator : public MovementGenerator
class DistractMovementGenerator : public MovementGenerator
{
public:
explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) {}
explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) { }
void Initialize(Unit*);
void Finalize(Unit*);
@@ -69,7 +69,7 @@ class AssistanceDistractMovementGenerator : public DistractMovementGenerator
{
public:
AssistanceDistractMovementGenerator(uint32 timer) :
DistractMovementGenerator(timer) {}
DistractMovementGenerator(timer) { }
MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_DISTRACT_MOTION_TYPE; }
void Finalize(Unit*);
@@ -27,7 +27,7 @@ class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementG
{
public:
PointMovementGenerator(uint32 _id, float _x, float _y, float _z, bool _generatePath, float _speed = 0.0f) : id(_id),
i_x(_x), i_y(_y), i_z(_z), speed(_speed), m_generatePath(_generatePath), i_recalculateSpeed(false) {}
i_x(_x), i_y(_y), i_z(_z), speed(_speed), m_generatePath(_generatePath), i_recalculateSpeed(false) { }
void DoInitialize(T*);
void DoFinalize(T*);
@@ -53,7 +53,7 @@ class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
{
public:
AssistanceMovementGenerator(float _x, float _y, float _z) :
PointMovementGenerator<Creature>(0, _x, _y, _z, true) {}
PointMovementGenerator<Creature>(0, _x, _y, _z, true) { }
MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_MOTION_TYPE; }
void Finalize(Unit*);
@@ -63,10 +63,10 @@ class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
class EffectMovementGenerator : public MovementGenerator
{
public:
explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) {}
void Initialize(Unit*) {}
explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) { }
void Initialize(Unit*) { }
void Finalize(Unit*);
void Reset(Unit*) {}
void Reset(Unit*) { }
bool Update(Unit*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return EFFECT_MOTION_TYPE; }
private:
@@ -25,7 +25,7 @@ template<class T>
class RandomMovementGenerator : public MovementGeneratorMedium< T, RandomMovementGenerator<T> >
{
public:
RandomMovementGenerator(float spawn_dist = 0.0f) : i_nextMoveTime(0), wander_distance(spawn_dist) {}
RandomMovementGenerator(float spawn_dist = 0.0f) : i_nextMoveTime(0), wander_distance(spawn_dist) { }
void _setRandomLocation(T*);
void DoInitialize(T*);
@@ -68,10 +68,10 @@ class ChaseMovementGenerator : public TargetedMovementGeneratorMedium<T, ChaseMo
{
public:
ChaseMovementGenerator(Unit* target)
: TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target) {}
: TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target) { }
ChaseMovementGenerator(Unit* target, float offset, float angle)
: TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target, offset, angle) {}
~ChaseMovementGenerator() {}
: TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target, offset, angle) { }
~ChaseMovementGenerator() { }
MovementGeneratorType GetMovementGeneratorType() { return CHASE_MOTION_TYPE; }
@@ -92,10 +92,10 @@ class FollowMovementGenerator : public TargetedMovementGeneratorMedium<T, Follow
{
public:
FollowMovementGenerator(Unit* target)
: TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target){}
: TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target){ }
FollowMovementGenerator(Unit* target, float offset, float angle)
: TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target, offset, angle) {}
~FollowMovementGenerator() {}
: TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target, offset, angle) { }
~FollowMovementGenerator() { }
MovementGeneratorType GetMovementGeneratorType() { return FOLLOW_MOTION_TYPE; }
@@ -108,7 +108,7 @@ class FollowMovementGenerator : public TargetedMovementGeneratorMedium<T, Follow
static void _addUnitStateMove(T* u) { u->AddUnitState(UNIT_STATE_FOLLOW_MOVE); }
bool EnableWalking() const;
bool _lostTarget(T*) const { return false; }
void _reachTarget(T*) {}
void _reachTarget(T*) { }
private:
void _updateSpeed(T* owner);
};
@@ -42,8 +42,8 @@ template<class T, class P>
class PathMovementBase
{
public:
PathMovementBase() : i_path(NULL), i_currentNode(0) {}
virtual ~PathMovementBase() {};
PathMovementBase() : i_path(NULL), i_currentNode(0) { }
virtual ~PathMovementBase() { };
// template pattern, not defined .. override required
void LoadPath(T &);
@@ -63,7 +63,7 @@ class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Crea
{
public:
WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true)
: i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating) {}
: i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating) { }
~WaypointMovementGenerator() { i_path = NULL; }
void DoInitialize(Creature*);
void DoFinalize(Creature*);
@@ -92,7 +92,7 @@ inline uint32 computeDuration(float length, float velocity)
struct FallInitializer
{
FallInitializer(float _start_elevation) : start_elevation(_start_elevation) {}
FallInitializer(float _start_elevation) : start_elevation(_start_elevation) { }
float start_elevation;
inline int32 operator()(Spline<int32>& s, int32 i)
{
@@ -106,7 +106,7 @@ enum{
struct CommonInitializer
{
CommonInitializer(float _velocity) : velocityInv(1000.f/_velocity), time(minimal_duration) {}
CommonInitializer(float _velocity) : velocityInv(1000.f/_velocity), time(minimal_duration) { }
float velocityInv;
int32 time;
inline int32 operator()(Spline<int32>& s, int32 i)
+4 -4
View File
@@ -26,10 +26,10 @@ namespace Movement
{
struct Location : public Vector3
{
Location() : orientation(0) {}
Location(float x, float y, float z, float o) : Vector3(x, y, z), orientation(o) {}
Location(const Vector3& v) : Vector3(v), orientation(0) {}
Location(const Vector3& v, float o) : Vector3(v), orientation(o) {}
Location() : orientation(0) { }
Location(float x, float y, float z, float o) : Vector3(x, y, z), orientation(o) { }
Location(const Vector3& v) : Vector3(v), orientation(0) { }
Location(const Vector3& v, float o) : Vector3(v), orientation(o) { }
float orientation;
};

Some files were not shown because too many files have changed in this diff Show More