diff options
author | Spp <spp@jorge.gr> | 2011-09-15 14:08:17 +0200 |
---|---|---|
committer | Spp <spp@jorge.gr> | 2011-09-15 14:12:57 +0200 |
commit | af05915b9e36497eda8f2f061c29ffee0c8042b6 (patch) | |
tree | fa9e603e2a8d90b9842148ee9fa767f475566b67 | |
parent | 9006e4e8dc1c2cbf30303dd2d5e34f3d9a2380a9 (diff) |
[Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions)
431 files changed, 3131 insertions, 3131 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index 73b2148a3b7..0696377c0c3 100755 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -73,7 +73,7 @@ extern int main(int argc, char **argv) { sLog->SetLogDB(false); // Command line parsing to get the configuration file name - char const *cfg_file = _TRINITY_REALM_CONFIG; + char const* cfg_file = _TRINITY_REALM_CONFIG; int c = 1; while(c < argc) { diff --git a/src/server/authserver/Realms/RealmList.cpp b/src/server/authserver/Realms/RealmList.cpp index 7fb9aadb14c..c81af80d31d 100755 --- a/src/server/authserver/Realms/RealmList.cpp +++ b/src/server/authserver/Realms/RealmList.cpp @@ -78,7 +78,7 @@ void RealmList::UpdateRealms(bool init) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 realmId = fields[0].GetUInt32(); const std::string& name = fields[1].GetString(); const std::string& address = fields[2].GetString(); diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index 8ec1fcd1fd3..bffe406ddfc 100755 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -147,11 +147,11 @@ typedef struct AuthHandler class PatcherRunnable: public ACE_Based::Runnable { public: - PatcherRunnable(class AuthSocket *); + PatcherRunnable(class AuthSocket* ); void run(); private: - AuthSocket * mySocket; + AuthSocket* mySocket; }; typedef struct PATCH_INFO @@ -948,7 +948,7 @@ bool AuthSocket::_HandleXferAccept() return true; } -PatcherRunnable::PatcherRunnable(class AuthSocket * as) +PatcherRunnable::PatcherRunnable(class AuthSocket* as) { mySocket = as; } @@ -1016,7 +1016,7 @@ void Patcher::LoadPatchMD5(char *szFileName) // Try to open the patch file std::string path = "./patches/"; path += szFileName; - FILE *pPatch = fopen(path.c_str(), "rb"); + FILE* pPatch = fopen(path.c_str(), "rb"); sLog->outDebug(LOG_FILTER_NETWORKIO, "Loading patch info from %s\n", path.c_str()); if (!pPatch) diff --git a/src/server/authserver/Server/AuthSocket.h b/src/server/authserver/Server/AuthSocket.h index 018af07a239..75df3d69a05 100755 --- a/src/server/authserver/Server/AuthSocket.h +++ b/src/server/authserver/Server/AuthSocket.h @@ -62,7 +62,7 @@ public: void _SetVSFields(const std::string& rI); - FILE *pPatch; + FILE* pPatch; ACE_Thread_Mutex patcherLock; private: diff --git a/src/server/authserver/Server/RealmAcceptor.h b/src/server/authserver/Server/RealmAcceptor.h index 99817dfddac..fc302adfccb 100755 --- a/src/server/authserver/Server/RealmAcceptor.h +++ b/src/server/authserver/Server/RealmAcceptor.h @@ -36,7 +36,7 @@ public: } protected: - virtual int make_svc_handler(RealmSocket *&sh) + virtual int make_svc_handler(RealmSocket* &sh) { if (sh == 0) ACE_NEW_RETURN(sh, RealmSocket, -1); diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp index c80b2c4f08f..4d92747d262 100755 --- a/src/server/authserver/Server/RealmSocket.cpp +++ b/src/server/authserver/Server/RealmSocket.cpp @@ -177,7 +177,7 @@ bool RealmSocket::send(const char *buf, size_t len) message_block.rd_ptr(un); } - ACE_Message_Block *mb = message_block.clone(); + ACE_Message_Block* mb = message_block.clone(); if (msg_queue()->enqueue_tail(mb, (ACE_Time_Value *)(&ACE_Time_Value::zero)) == -1) { @@ -196,7 +196,7 @@ int RealmSocket::handle_output(ACE_HANDLE) if (closing_) return -1; - ACE_Message_Block *mb = 0; + ACE_Message_Block* mb = 0; if (msg_queue()->is_empty()) { diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h index 685411e236d..12769c07185 100755 --- a/src/server/authserver/Server/RealmSocket.h +++ b/src/server/authserver/Server/RealmSocket.h @@ -69,7 +69,7 @@ private: ssize_t noblk_send(ACE_Message_Block &message_block); ACE_Message_Block input_buffer_; - Session *session_; + Session* session_; std::string remote_address_; }; diff --git a/src/server/collision/BoundingIntervalHierarchy.cpp b/src/server/collision/BoundingIntervalHierarchy.cpp index e411d1c2889..1540d1af667 100755 --- a/src/server/collision/BoundingIntervalHierarchy.cpp +++ b/src/server/collision/BoundingIntervalHierarchy.cpp @@ -238,7 +238,7 @@ void BIH::subdivide(int left, int right, std::vector<uint32> &tempTree, buildDat stats.updateLeaf(depth + 1, 0); } -bool BIH::writeToFile(FILE *wf) const +bool BIH::writeToFile(FILE* wf) const { uint32 treeSize = tree.size(); uint32 check=0, count=0; @@ -252,7 +252,7 @@ bool BIH::writeToFile(FILE *wf) const return check == (3 + 3 + 2 + treeSize + count); } -bool BIH::readFromFile(FILE *rf) +bool BIH::readFromFile(FILE* rf) { uint32 treeSize; Vector3 lo, hi; diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h index f7bfdf73ccc..f4636b38bac 100755 --- a/src/server/collision/BoundingIntervalHierarchy.h +++ b/src/server/collision/BoundingIntervalHierarchy.h @@ -334,8 +334,8 @@ class BIH } } - bool writeToFile(FILE *wf) const; - bool readFromFile(FILE *rf); + bool writeToFile(FILE* wf) const; + bool readFromFile(FILE* rf); protected: std::vector<uint32> tree; diff --git a/src/server/collision/Management/VMapFactory.cpp b/src/server/collision/Management/VMapFactory.cpp index 93236bbb674..21907fef263 100755 --- a/src/server/collision/Management/VMapFactory.cpp +++ b/src/server/collision/Management/VMapFactory.cpp @@ -53,7 +53,7 @@ namespace VMAP } } - IVMapManager *gVMapManager = 0; + IVMapManager* gVMapManager = 0; Table<unsigned int , bool>* iIgnoreSpellIds=0; //=============================================== diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp index c8a0a19d6e6..6b5c9b5a2c6 100644 --- a/src/server/collision/Maps/MapTree.cpp +++ b/src/server/collision/Maps/MapTree.cpp @@ -41,7 +41,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); @@ -51,14 +51,14 @@ namespace VMAP } bool didHit() { return hit; } protected: - ModelInstance *prims; + ModelInstance* prims; bool hit; }; class AreaInfoCallback { public: - AreaInfoCallback(ModelInstance *val): prims(val) {} + AreaInfoCallback(ModelInstance* val): prims(val) {} void operator()(const Vector3& point, uint32 entry) { #ifdef VMAP_DEBUG @@ -67,14 +67,14 @@ namespace VMAP prims[entry].intersectPoint(point, aInfo); } - ModelInstance *prims; + ModelInstance* prims; AreaInfo aInfo; }; 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 @@ -84,7 +84,7 @@ namespace VMAP result = true; } - ModelInstance *prims; + ModelInstance* prims; LocationInfo &locInfo; bool result; }; @@ -245,7 +245,7 @@ namespace VMAP basePath.push_back('/'); std::string fullname = basePath + VMapManager2::getMapFileName(mapID); bool success = true; - FILE *rf = fopen(fullname.c_str(), "rb"); + FILE* rf = fopen(fullname.c_str(), "rb"); if (!rf) return false; // TODO: check magic number when implemented... @@ -275,12 +275,12 @@ namespace VMAP //========================================================= - bool StaticMapTree::InitMap(const std::string &fname, VMapManager2 *vm) + bool StaticMapTree::InitMap(const std::string &fname, VMapManager2* vm) { sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : initializing StaticMapTree '%s'", fname.c_str()); bool success = true; std::string fullname = iBasePath + fname; - FILE *rf = fopen(fullname.c_str(), "rb"); + FILE* rf = fopen(fullname.c_str(), "rb"); if (!rf) return false; else @@ -309,7 +309,7 @@ namespace VMAP #endif if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn)) { - WorldModel *model = vm->acquireModelInstance(iBasePath, spawn.name); + WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name); sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : loading %s", spawn.name.c_str()); if (model) { @@ -331,7 +331,7 @@ namespace VMAP //========================================================= - void StaticMapTree::UnloadMap(VMapManager2 *vm) + void StaticMapTree::UnloadMap(VMapManager2* vm) { for (loadedSpawnMap::iterator i = iLoadedSpawns.begin(); i != iLoadedSpawns.end(); ++i) { @@ -345,7 +345,7 @@ namespace VMAP //========================================================= - bool StaticMapTree::LoadMapTile(uint32 tileX, uint32 tileY, VMapManager2 *vm) + bool StaticMapTree::LoadMapTile(uint32 tileX, uint32 tileY, VMapManager2* vm) { if (!iIsTiled) { @@ -380,7 +380,7 @@ namespace VMAP if (result) { // acquire model instance - WorldModel *model = vm->acquireModelInstance(iBasePath, spawn.name); + WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name); if (!model) sLog->outError("StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY); @@ -426,7 +426,7 @@ namespace VMAP //========================================================= - void StaticMapTree::UnloadMapTile(uint32 tileX, uint32 tileY, VMapManager2 *vm) + void StaticMapTree::UnloadMapTile(uint32 tileX, uint32 tileY, VMapManager2* vm) { uint32 tileID = packTileID(tileX, tileY); loadedTileMap::iterator tile = iLoadedTiles.find(tileID); diff --git a/src/server/collision/Maps/MapTree.h b/src/server/collision/Maps/MapTree.h index 8b288842a71..47716a925b5 100755 --- a/src/server/collision/Maps/MapTree.h +++ b/src/server/collision/Maps/MapTree.h @@ -32,8 +32,8 @@ namespace VMAP struct LocationInfo { LocationInfo(): hitInstance(0), hitModel(0), ground_Z(-G3D::inf()) {}; - const ModelInstance *hitInstance; - const GroupModel *hitModel; + const ModelInstance* hitInstance; + const GroupModel* hitModel; float ground_Z; }; @@ -45,7 +45,7 @@ namespace VMAP uint32 iMapID; bool iIsTiled; BIH iTree; - ModelInstance *iTreeValues; // the tree entries + ModelInstance* iTreeValues; // the tree entries uint32 iNTreeValues; // Store all the map tile idents that are loaded for that map @@ -74,10 +74,10 @@ namespace VMAP bool getAreaInfo(G3D::Vector3 &pos, uint32 &flags, int32 &adtId, int32 &rootId, int32 &groupId) const; bool GetLocationInfo(const Vector3 &pos, LocationInfo &info) const; - bool InitMap(const std::string &fname, VMapManager2 *vm); - void UnloadMap(VMapManager2 *vm); - bool LoadMapTile(uint32 tileX, uint32 tileY, VMapManager2 *vm); - void UnloadMapTile(uint32 tileX, uint32 tileY, VMapManager2 *vm); + bool InitMap(const std::string &fname, VMapManager2* vm); + void UnloadMap(VMapManager2* vm); + bool LoadMapTile(uint32 tileX, uint32 tileY, VMapManager2* vm); + void UnloadMapTile(uint32 tileX, uint32 tileY, VMapManager2* vm); bool isTiled() const { return iIsTiled; } uint32 numLoadedTiles() const { return iLoadedTiles.size(); } }; diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp index 4509caa8154..bfbbef3d915 100644 --- a/src/server/collision/Maps/TileAssembler.cpp +++ b/src/server/collision/Maps/TileAssembler.cpp @@ -39,7 +39,7 @@ template<> struct BoundsTrait<VMAP::ModelSpawn*> namespace VMAP { - bool readChunk(FILE *rf, char *dest, const char *compare, uint32 len) + bool readChunk(FILE* rf, char *dest, const char *compare, uint32 len) { if (fread(dest, sizeof(char), len, rf) != len) return false; return memcmp(dest, compare, len) == 0; @@ -113,7 +113,7 @@ namespace VMAP // write map tree file std::stringstream mapfilename; mapfilename << iDestDir << '/' << std::setfill('0') << std::setw(3) << map_iter->first << ".vmtree"; - FILE *mapfile = fopen(mapfilename.str().c_str(), "wb"); + FILE* mapfile = fopen(mapfilename.str().c_str(), "wb"); if (!mapfile) { success = false; @@ -157,7 +157,7 @@ namespace VMAP uint32 x, y; StaticMapTree::unpackTileID(tile->first, x, y); tilefilename << std::setw(2) << x << '_' << std::setw(2) << y << ".vmtile"; - FILE *tilefile = fopen(tilefilename.str().c_str(), "wb"); + FILE* tilefile = fopen(tilefilename.str().c_str(), "wb"); // file header if (success && fwrite(VMAP_MAGIC, 1, 8, tilefile) != 8) success = false; // write number of tile spawns @@ -202,7 +202,7 @@ namespace VMAP bool TileAssembler::readMapSpawns() { std::string fname = iSrcDir + "/dir_bin"; - FILE *dirf = fopen(fname.c_str(), "rb"); + FILE* dirf = fopen(fname.c_str(), "rb"); if (!dirf) { printf("Could not read dir_bin file!\n"); @@ -251,7 +251,7 @@ namespace VMAP modelPosition.iScale = spawn.iScale; modelPosition.init(); - FILE *rf = fopen(modelFilename.c_str(), "rb"); + FILE* rf = fopen(modelFilename.c_str(), "rb"); if (!rf) { printf("ERROR: Can't open model file: %s\n", modelFilename.c_str()); @@ -363,7 +363,7 @@ namespace VMAP if (filename.length() >0) filename.push_back('/'); filename.append(pModelFilename); - FILE *rf = fopen(filename.c_str(), "rb"); + FILE* rf = fopen(filename.c_str(), "rb"); if (!rf) { @@ -466,7 +466,7 @@ namespace VMAP delete[] vectorarray; } // ----- liquid - WmoLiquid *liquid = 0; + WmoLiquid* liquid = 0; if (liquidflags& 1) { WMOLiquidHeader hlq; diff --git a/src/server/collision/Models/ModelInstance.cpp b/src/server/collision/Models/ModelInstance.cpp index 957b15e9282..a86f6cac45a 100644 --- a/src/server/collision/Models/ModelInstance.cpp +++ b/src/server/collision/Models/ModelInstance.cpp @@ -26,7 +26,7 @@ using G3D::Ray; namespace VMAP { - ModelInstance::ModelInstance(const ModelSpawn &spawn, WorldModel *model): ModelSpawn(spawn), iModel(model) + ModelInstance::ModelInstance(const ModelSpawn &spawn, WorldModel* model): ModelSpawn(spawn), iModel(model) { iInvRot = G3D::Matrix3::fromEulerAnglesZYX(G3D::pi()*iRot.y/180.f, G3D::pi()*iRot.x/180.f, G3D::pi()*iRot.z/180.f).inverse(); iInvScale = 1.f/iScale; @@ -151,7 +151,7 @@ namespace VMAP return false; } - bool ModelSpawn::readFromFile(FILE *rf, ModelSpawn &spawn) + bool ModelSpawn::readFromFile(FILE* rf, ModelSpawn &spawn) { uint32 check = 0, nameLen; check += fread(&spawn.flags, sizeof(uint32), 1, rf); @@ -197,7 +197,7 @@ namespace VMAP return true; } - bool ModelSpawn::writeToFile(FILE *wf, const ModelSpawn &spawn) + bool ModelSpawn::writeToFile(FILE* wf, const ModelSpawn &spawn) { uint32 check=0; check += fwrite(&spawn.flags, sizeof(uint32), 1, wf); diff --git a/src/server/collision/Models/ModelInstance.h b/src/server/collision/Models/ModelInstance.h index 289fd5ff3fe..c29f6756654 100755 --- a/src/server/collision/Models/ModelInstance.h +++ b/src/server/collision/Models/ModelInstance.h @@ -56,15 +56,15 @@ namespace VMAP // temp? const G3D::AABox& getBounds() const { return iBound; } - static bool readFromFile(FILE *rf, ModelSpawn &spawn); - static bool writeToFile(FILE *rw, const ModelSpawn &spawn); + static bool readFromFile(FILE* rf, ModelSpawn &spawn); + static bool writeToFile(FILE* rw, const ModelSpawn &spawn); }; class ModelInstance: public ModelSpawn { public: ModelInstance(): iModel(0) {} - ModelInstance(const ModelSpawn &spawn, WorldModel *model); + ModelInstance(const ModelSpawn &spawn, WorldModel* model); void setUnloaded() { iModel = 0; } bool intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool pStopAtFirstHit) const; void intersectPoint(const G3D::Vector3& p, AreaInfo &info) const; @@ -73,7 +73,7 @@ namespace VMAP protected: G3D::Matrix3 iInvRot; float iInvScale; - WorldModel *iModel; + WorldModel* iModel; }; } // namespace VMAP diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp index 501be416a26..3dad4a10174 100644 --- a/src/server/collision/Models/WorldModel.cpp +++ b/src/server/collision/Models/WorldModel.cpp @@ -202,7 +202,7 @@ namespace VMAP iTilesX * iTilesY; } - bool WmoLiquid::writeToFile(FILE *wf) + bool WmoLiquid::writeToFile(FILE* wf) { bool result = true; if (result && fwrite(&iTilesX, sizeof(uint32), 1, wf) != 1) result = false; @@ -216,10 +216,10 @@ namespace VMAP return result; } - bool WmoLiquid::readFromFile(FILE *rf, WmoLiquid *&out) + bool WmoLiquid::readFromFile(FILE* rf, WmoLiquid* &out) { bool result = true; - WmoLiquid *liquid = new WmoLiquid(); + WmoLiquid* liquid = new WmoLiquid(); if (result && fread(&liquid->iTilesX, sizeof(uint32), 1, rf) != 1) result = false; if (result && fread(&liquid->iTilesY, sizeof(uint32), 1, rf) != 1) result = false; if (result && fread(&liquid->iCorner, sizeof(Vector3), 1, rf) != 1) result = false; @@ -254,7 +254,7 @@ namespace VMAP meshTree.build(triangles, bFunc); } - bool GroupModel::writeToFile(FILE *wf) + bool GroupModel::writeToFile(FILE* wf) { bool result = true; uint32 chunkSize, count; @@ -300,7 +300,7 @@ namespace VMAP return result; } - bool GroupModel::readFromFile(FILE *rf) + bool GroupModel::readFromFile(FILE* rf) { char chunk[8]; bool result = true; @@ -501,7 +501,7 @@ namespace VMAP bool WorldModel::writeFile(const std::string &filename) { - FILE *wf = fopen(filename.c_str(), "wb"); + FILE* wf = fopen(filename.c_str(), "wb"); if (!wf) return false; @@ -535,7 +535,7 @@ namespace VMAP bool WorldModel::readFile(const std::string &filename) { - FILE *rf = fopen(filename.c_str(), "rb"); + FILE* rf = fopen(filename.c_str(), "rb"); if (!rf) return false; diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h index e3b11ccef29..7acd3c80376 100755 --- a/src/server/collision/Models/WorldModel.h +++ b/src/server/collision/Models/WorldModel.h @@ -56,8 +56,8 @@ namespace VMAP float *GetHeightStorage() { return iHeight; } uint8 *GetFlagsStorage() { return iFlags; } uint32 GetFileSize(); - bool writeToFile(FILE *wf); - static bool readFromFile(FILE *rf, WmoLiquid *&liquid); + bool writeToFile(FILE* wf); + static bool readFromFile(FILE* rf, WmoLiquid* &liquid); private: WmoLiquid(): iHeight(0), iFlags(0) {}; uint32 iTilesX; //!< number of tiles in x direction, each @@ -80,13 +80,13 @@ namespace VMAP //! pass mesh data to object and create BIH. Passed vectors get get swapped with old geometry! void setMeshData(std::vector<Vector3> &vert, std::vector<MeshTriangle> &tri); - void setLiquidData(WmoLiquid *liquid) { iLiquid = liquid; } + void setLiquidData(WmoLiquid* liquid) { iLiquid = liquid; } bool IntersectRay(const G3D::Ray &ray, float &distance, bool stopAtFirstHit) const; bool IsInsideObject(const Vector3 &pos, const Vector3 &down, float &z_dist) const; bool GetLiquidLevel(const Vector3 &pos, float &liqHeight) const; uint32 GetLiquidType() const; - bool writeToFile(FILE *wf); - bool readFromFile(FILE *rf); + bool writeToFile(FILE* wf); + bool readFromFile(FILE* rf); const G3D::AABox& GetBound() const { return iBound; } uint32 GetMogpFlags() const { return iMogpFlags; } uint32 GetWmoID() const { return iGroupWMOID; } @@ -97,7 +97,7 @@ namespace VMAP std::vector<Vector3> vertices; std::vector<MeshTriangle> triangles; BIH meshTree; - WmoLiquid *iLiquid; + WmoLiquid* iLiquid; }; /*! Holds a model (converted M2 or WMO) in its original coordinate space */ class WorldModel diff --git a/src/server/collision/VMapDefinitions.h b/src/server/collision/VMapDefinitions.h index 96ceb982d00..74e5a9f1dbb 100644 --- a/src/server/collision/VMapDefinitions.h +++ b/src/server/collision/VMapDefinitions.h @@ -27,6 +27,6 @@ namespace VMAP const char VMAP_MAGIC[] = "VMAP_3.0"; // defined in TileAssembler.cpp currently... - bool readChunk(FILE *rf, char *dest, const char *compare, uint32 len); + bool readChunk(FILE* rf, char *dest, const char *compare, uint32 len); } #endif diff --git a/src/server/game/AI/CoreAI/GameObjectAI.cpp b/src/server/game/AI/CoreAI/GameObjectAI.cpp index e30ead861ce..e47d75fc514 100644 --- a/src/server/game/AI/CoreAI/GameObjectAI.cpp +++ b/src/server/game/AI/CoreAI/GameObjectAI.cpp @@ -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") diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index 0d8841dafd3..659aa778aca 100755 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -259,7 +259,7 @@ void PetAI::UpdateAllies() m_AllySet.insert(me->GetGUID()); if (group) //add group { - for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); if (!Target || !group->SameSubGroup((Player*)owner, Target)) diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index 39bdf219880..b9ea57aa235 100755 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -42,7 +42,7 @@ void UnitAI::DoMeleeAttackIfReady() if (me->HasUnitState(UNIT_STAT_CASTING)) return; - Unit *victim = me->getVictim(); + Unit* victim = me->getVictim(); //Make sure our attack is ready and we aren't currently casting before checking distance if (me->isAttackReady() && me->IsWithinMeleeRange(victim)) { diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index d09939c3243..27807283edc 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -1017,7 +1017,7 @@ void CreatureEventAI::AttackStart(Unit* who) } } -void CreatureEventAI::MoveInLineOfSight(Unit *who) +void CreatureEventAI::MoveInLineOfSight(Unit* who) { if (me->getVictim()) return; diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index ffa52db8f06..8bb3bda8dd6 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -96,7 +96,7 @@ class SmartAI : public CreatureAI // Tell creature to attack and follow the victim void AttackStart(Unit* who); - // Called if IsVisible(Unit *who) is true at each *who move, reaction at visibility zone enter + // Called if IsVisible(Unit* who) is true at each *who move, reaction at visibility zone enter void MoveInLineOfSight(Unit* who); // Called when hit by a spell diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 037949c8d2e..48b7361f9a5 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -377,7 +377,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un } case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM: { - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(miscvalue1); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(miscvalue1); if (!pProto) return false; return pProto->ItemLevel >= equipped_item.item_level && pProto->Quality >= equipped_item.item_quality; @@ -443,9 +443,9 @@ void AchievementMgr::ResetAchievementCriteria(AchievementCriteriaTypes type, uin AchievementCriteriaEntryList const& achievementCriteriaList = sAchievementMgr->GetAchievementCriteriaByType(type); for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i != achievementCriteriaList.end(); ++i) { - AchievementCriteriaEntry const *achievementCriteria = (*i); + AchievementCriteriaEntry const* achievementCriteria = (*i); - AchievementEntry const *achievement = sAchievementStore.LookupEntry(achievementCriteria->referredAchievement); + AchievementEntry const* achievement = sAchievementStore.LookupEntry(achievementCriteria->referredAchievement); if (!achievement) continue; @@ -744,8 +744,8 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui AchievementCriteriaEntryList const& achievementCriteriaList = sAchievementMgr->GetAchievementCriteriaByType(type); for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i != achievementCriteriaList.end(); ++i) { - AchievementCriteriaEntry const *achievementCriteria = (*i); - AchievementEntry const *achievement = sAchievementStore.LookupEntry(achievementCriteria->referredAchievement); + AchievementCriteriaEntry const* achievementCriteria = (*i); + AchievementEntry const* achievement = sAchievementStore.LookupEntry(achievementCriteria->referredAchievement); if (!achievement) continue; @@ -1281,7 +1281,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui if (miscValue2 != achievementCriteria->roll_greed_on_loot.rollValue) continue; - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(miscValue1); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(miscValue1); if (!pProto) continue; @@ -1928,7 +1928,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry, SendCriteriaUpdate(entry, progress, timeElapsed, timedCompleted); } -void AchievementMgr::RemoveCriteriaProgress(const AchievementCriteriaEntry *entry) +void AchievementMgr::RemoveCriteriaProgress(const AchievementCriteriaEntry* entry) { CriteriaProgressMap::iterator criteriaProgress = m_criteriaProgress.find(entry->ID); if (criteriaProgress == m_criteriaProgress.end()) @@ -1950,7 +1950,7 @@ void AchievementMgr::UpdateTimedAchievements(uint32 timeDiff) // Time is up, remove timer and reset progress if (itr->second <= timeDiff) { - AchievementCriteriaEntry const *entry = sAchievementCriteriaStore.LookupEntry(itr->first); + AchievementCriteriaEntry const* entry = sAchievementCriteriaStore.LookupEntry(itr->first); RemoveCriteriaProgress(entry); m_timedAchievements.erase(itr++); } @@ -1971,7 +1971,7 @@ void AchievementMgr::StartTimedAchievement(AchievementCriteriaTimedTypes type, u if ((*i)->timerStartEvent != entry) continue; - AchievementEntry const *achievement = sAchievementStore.LookupEntry((*i)->referredAchievement); + AchievementEntry const* achievement = sAchievementStore.LookupEntry((*i)->referredAchievement); if (m_timedAchievements.find((*i)->ID) == m_timedAchievements.end() && !IsCompletedCriteria(*i, achievement)) { // Start the timer @@ -2097,7 +2097,7 @@ void AchievementMgr::SendRespondInspectAchievements(Player* player) const /** * used by SMSG_RESPOND_INSPECT_ACHIEVEMENT and SMSG_ALL_ACHIEVEMENT_DATA */ -void AchievementMgr::BuildAllDataPacket(WorldPacket *data) const +void AchievementMgr::BuildAllDataPacket(WorldPacket* data) const { AchievementEntry const* achievement = NULL; for (CompletedAchievementMap::const_iterator iter = m_completedAchievements.begin(); iter != m_completedAchievements.end(); ++iter) @@ -2247,7 +2247,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 criteria_id = fields[0].GetUInt32(); AchievementCriteriaEntry const* criteria = sAchievementCriteriaStore.LookupEntry(criteria_id); @@ -2389,7 +2389,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 achievement_id = fields[0].GetUInt32(); if (!sAchievementStore.LookupEntry(achievement_id)) @@ -2427,7 +2427,7 @@ void AchievementGlobalMgr::LoadRewards() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); const AchievementEntry* pAchievement = sAchievementStore.LookupEntry(entry); if (!pAchievement) @@ -2533,7 +2533,7 @@ void AchievementGlobalMgr::LoadRewardLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index 6324c978dd9..df5631c5bc6 100755 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -274,7 +274,7 @@ class AchievementMgr bool IsCompletedCriteria(AchievementCriteriaEntry const* achievementCriteria, AchievementEntry const* achievement); bool IsCompletedAchievement(AchievementEntry const* entry); bool CanUpdateCriteria(AchievementCriteriaEntry const* criteria, AchievementEntry const* achievement); - void BuildAllDataPacket(WorldPacket *data) const; + void BuildAllDataPacket(WorldPacket* data) const; Player* m_player; CriteriaProgressMap m_criteriaProgress; @@ -324,7 +324,7 @@ class AchievementGlobalMgr return iter != m_achievementRewardLocales.end() ? &iter->second : NULL; } - AchievementCriteriaDataSet const* GetCriteriaDataSet(AchievementCriteriaEntry const *achievementCriteria) const + AchievementCriteriaDataSet const* GetCriteriaDataSet(AchievementCriteriaEntry const* achievementCriteria) const { AchievementCriteriaDataMap::const_iterator iter = m_criteriaDataMap.find(achievementCriteria->ID); return iter != m_criteriaDataMap.end() ? &iter->second : NULL; diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp index 70c72fba7e6..9d5bdd159f7 100755 --- a/src/server/game/Addons/AddonMgr.cpp +++ b/src/server/game/Addons/AddonMgr.cpp @@ -52,7 +52,7 @@ void LoadFromDB() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); std::string name = fields[0].GetString(); uint32 crc = fields[1].GetUInt32(); diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index f0282d71169..0a2ff750a1b 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -47,7 +47,7 @@ AuctionHouseMgr::~AuctionHouseMgr() delete itr->second; } -AuctionHouseObject * AuctionHouseMgr::GetAuctionsMap(uint32 factionTemplateId) +AuctionHouseObject* AuctionHouseMgr::GetAuctionsMap(uint32 factionTemplateId) { if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION)) return &mNeutralAuctions; @@ -64,7 +64,7 @@ AuctionHouseObject * AuctionHouseMgr::GetAuctionsMap(uint32 factionTemplateId) return &mNeutralAuctions; } -uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 time, Item *pItem, uint32 count) +uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 time, Item* pItem, uint32 count) { uint32 MSV = pItem->GetTemplate()->SellPrice; @@ -87,15 +87,15 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 } //does not clear ram -void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction, SQLTransaction& trans) +void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction& trans) { - Item *pItem = GetAItem(auction->item_guidlow); + Item* pItem = GetAItem(auction->item_guidlow); if (!pItem) return; uint32 bidder_accId = 0; uint64 bidder_guid = MAKE_NEW_GUID(auction->bidder, 0, HIGHGUID_PLAYER); - Player *bidder = ObjectAccessor::FindPlayer(bidder_guid); + Player* bidder = ObjectAccessor::FindPlayer(bidder_guid); // data for gm.log if (sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { @@ -163,10 +163,10 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction, SQLTransaction& } } -void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry * auction, SQLTransaction& trans) +void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry* auction, SQLTransaction& trans) { uint64 owner_guid = MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER); - Player *owner = ObjectAccessor::FindPlayer(owner_guid); + Player* owner = ObjectAccessor::FindPlayer(owner_guid); uint32 owner_accId = sObjectMgr->GetPlayerAccountIdByGUID(owner_guid); // owner exist (online or offline) if (owner || owner_accId) @@ -193,10 +193,10 @@ void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry * auction, SQLTran } //call this method to send mail to auction owner, when auction is successful, it does not clear ram -void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction, SQLTransaction& trans) +void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry* auction, SQLTransaction& trans) { uint64 owner_guid = MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER); - Player *owner = ObjectAccessor::FindPlayer(owner_guid); + Player* owner = ObjectAccessor::FindPlayer(owner_guid); uint32 owner_accId = sObjectMgr->GetPlayerAccountIdByGUID(owner_guid); // owner exist if (owner || owner_accId) @@ -231,15 +231,15 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction, SQLTrans } //does not clear ram -void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry * auction, SQLTransaction& trans) +void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, SQLTransaction& trans) { //return an item in auction to its owner by mail - Item *pItem = GetAItem(auction->item_guidlow); + Item* pItem = GetAItem(auction->item_guidlow); if (!pItem) return; uint64 owner_guid = MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER); - Player *owner = ObjectAccessor::FindPlayer(owner_guid); + Player* owner = ObjectAccessor::FindPlayer(owner_guid); uint32 owner_accId = sObjectMgr->GetPlayerAccountIdByGUID(owner_guid); // owner exist if (owner || owner_accId) @@ -257,10 +257,10 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry * auction, SQLTransact } //this function sends mail to old bidder -void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry *auction, uint32 newPrice, Player* newBidder, SQLTransaction& trans) +void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 newPrice, Player* newBidder, SQLTransaction& trans) { uint64 oldBidder_guid = MAKE_NEW_GUID(auction->bidder, 0, HIGHGUID_PLAYER); - Player *oldBidder = ObjectAccessor::FindPlayer(oldBidder_guid); + Player* oldBidder = ObjectAccessor::FindPlayer(oldBidder_guid); uint32 oldBidder_accId = 0; if (!oldBidder) @@ -285,7 +285,7 @@ void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry *auction, uint32 new void AuctionHouseMgr::SendAuctionCancelledToBidderMail(AuctionEntry* auction, SQLTransaction& trans) { uint64 bidder_guid = MAKE_NEW_GUID(auction->bidder, 0, HIGHGUID_PLAYER); - Player *bidder = ObjectAccessor::FindPlayer(bidder_guid); + Player* bidder = ObjectAccessor::FindPlayer(bidder_guid); uint32 bidder_accId = 0; if (!bidder) @@ -328,14 +328,14 @@ void AuctionHouseMgr::LoadAuctionItems() uint32 item_guid = fields[11].GetUInt32(); uint32 item_template = fields[12].GetUInt32(); - ItemTemplate const *proto = sObjectMgr->GetItemTemplate(item_template); + ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item_template); if (!proto) { sLog->outError("AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template); continue; } - Item *item = NewItemOrBag(proto); + Item* item = NewItemOrBag(proto); if (!item->LoadFromDB(item_guid, 0, fields, item_template)) { delete item; @@ -372,7 +372,7 @@ void AuctionHouseMgr::LoadAuctions() { Field* fields = result->Fetch(); - AuctionEntry *aItem = new AuctionEntry(); + AuctionEntry* aItem = new AuctionEntry(); if (!aItem->LoadFromDB(fields)) { aItem->DeleteFromDB(trans); @@ -454,7 +454,7 @@ AuctionHouseEntry const* AuctionHouseMgr::GetAuctionHouseEntry(uint32 factionTem return sAuctionHouseStore.LookupEntry(houseid); } -void AuctionHouseObject::AddAuction(AuctionEntry *auction) +void AuctionHouseObject::AddAuction(AuctionEntry* auction) { ASSERT(auction); @@ -462,7 +462,7 @@ void AuctionHouseObject::AddAuction(AuctionEntry *auction) sScriptMgr->OnAuctionAdd(this, auction); } -bool AuctionHouseObject::RemoveAuction(AuctionEntry *auction, uint32 /*item_template*/) +bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction, uint32 /*item_template*/) { bool wasInMap = AuctionsMap.erase(auction->Id) ? true : false; @@ -530,7 +530,7 @@ void AuctionHouseObject::BuildListBidderItems(WorldPacket& data, Player* player, { for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) { - AuctionEntry *Aentry = itr->second; + AuctionEntry* Aentry = itr->second; if (Aentry && Aentry->bidder == player->GetGUIDLow()) { if (itr->second->BuildAuctionInfo(data)) @@ -545,7 +545,7 @@ void AuctionHouseObject::BuildListOwnerItems(WorldPacket& data, Player* player, { for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) { - AuctionEntry *Aentry = itr->second; + AuctionEntry* Aentry = itr->second; if (Aentry && Aentry->owner == player->GetGUIDLow()) { if (Aentry->BuildAuctionInfo(data)) @@ -566,12 +566,12 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) { - AuctionEntry *Aentry = itr->second; - Item *item = sAuctionMgr->GetAItem(Aentry->item_guidlow); + AuctionEntry* Aentry = itr->second; + Item* item = sAuctionMgr->GetAItem(Aentry->item_guidlow); if (!item) continue; - ItemTemplate const *proto = item->GetTemplate(); + ItemTemplate const* proto = item->GetTemplate(); if (itemClass != 0xffffffff && proto->Class != itemClass) continue; @@ -601,7 +601,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player // local name if (loc_idx >= 0) - if (ItemLocale const *il = sObjectMgr->GetItemLocale(proto->ItemId)) + if (ItemLocale const* il = sObjectMgr->GetItemLocale(proto->ItemId)) ObjectMgr::GetLocaleString(il->Name, loc_idx, name); // DO NOT use GetItemEnchantMod(proto->RandomProperty) as it may return a result @@ -614,7 +614,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player // Append the suffix to the name (ie: of the Monkey) if one exists // These are found in ItemRandomProperties.dbc, not ItemRandomSuffix.dbc // even though the DBC names seem misleading - const ItemRandomPropertiesEntry *itemRandProp = sItemRandomPropertiesStore.LookupEntry(propRefID); + const ItemRandomPropertiesEntry* itemRandProp = sItemRandomPropertiesStore.LookupEntry(propRefID); if (itemRandProp) { @@ -650,7 +650,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player //this function inserts to WorldPacket auction's data bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const { - Item *pItem = sAuctionMgr->GetAItem(item_guidlow); + Item* pItem = sAuctionMgr->GetAItem(item_guidlow); if (!pItem) { sLog->outError("auction to item, that doesn't exist !!!!"); @@ -791,7 +791,7 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup() { Field* fields = expAuctions->Fetch(); - AuctionEntry *auction = new AuctionEntry(); + AuctionEntry* auction = new AuctionEntry(); // Can't use LoadFromDB() because it assumes the auction map is loaded if (!auction->LoadFromFieldList(fields)) diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index ed5c5b206bc..d1fb26cbc80 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.h +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h @@ -101,9 +101,9 @@ class AuctionHouseObject return itr != AuctionsMap.end() ? itr->second : NULL; } - void AddAuction(AuctionEntry *auction); + void AddAuction(AuctionEntry* auction); - bool RemoveAuction(AuctionEntry *auction, uint32 item_template); + bool RemoveAuction(AuctionEntry* auction, uint32 item_template); void Update(); @@ -146,14 +146,14 @@ class AuctionHouseMgr } //auction messages - void SendAuctionWonMail(AuctionEntry * auction, SQLTransaction& trans); - void SendAuctionSalePendingMail(AuctionEntry * auction, SQLTransaction& trans); - void SendAuctionSuccessfulMail(AuctionEntry * auction, SQLTransaction& trans); - void SendAuctionExpiredMail(AuctionEntry * auction, SQLTransaction& trans); - void SendAuctionOutbiddedMail(AuctionEntry * auction, uint32 newPrice, Player* newBidder, SQLTransaction& trans); + void SendAuctionWonMail(AuctionEntry* auction, SQLTransaction& trans); + void SendAuctionSalePendingMail(AuctionEntry* auction, SQLTransaction& trans); + void SendAuctionSuccessfulMail(AuctionEntry* auction, SQLTransaction& trans); + void SendAuctionExpiredMail(AuctionEntry* auction, SQLTransaction& trans); + void SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 newPrice, Player* newBidder, SQLTransaction& trans); void SendAuctionCancelledToBidderMail(AuctionEntry* auction, SQLTransaction& trans); - static uint32 GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 time, Item *pItem, uint32 count); + static uint32 GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 time, Item* pItem, uint32 count); static AuctionHouseEntry const* GetAuctionHouseEntry(uint32 factionTemplateId); public: diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index 91f9e3cc960..45f41eebd26 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -194,7 +194,7 @@ bool ArenaTeam::LoadArenaTeamFromDB(QueryResult result) if (!result) return false; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); TeamId = fields[0].GetUInt32(); TeamName = fields[1].GetString(); @@ -224,7 +224,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result) do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); // Prevent crash if db records are broken when all members in result are already processed and current team doesn't have any members if (!fields) diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp index d433a5e8b36..cf335ec1971 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp @@ -148,7 +148,7 @@ void ArenaTeamMgr::DistributeArenaPoints() // At first update all points for all team members for (ArenaTeamContainer::iterator teamItr = GetArenaTeamMapBegin(); teamItr != GetArenaTeamMapEnd(); ++teamItr) - if (ArenaTeam * at = teamItr->second) + if (ArenaTeam* at = teamItr->second) at->UpdateArenaPointsHelper(PlayerPoints); SQLTransaction trans = CharacterDatabase.BeginTransaction(); @@ -172,7 +172,7 @@ void ArenaTeamMgr::DistributeArenaPoints() sWorld->SendWorldText(LANG_DIST_ARENA_POINTS_TEAM_START); for (ArenaTeamContainer::iterator titr = GetArenaTeamMapBegin(); titr != GetArenaTeamMapEnd(); ++titr) { - if (ArenaTeam * at = titr->second) + if (ArenaTeam* at = titr->second) { at->FinishWeek(); at->SaveToDB(); diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 0090e910e8a..a7176e3b550 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -124,7 +124,7 @@ template<class Do> void Battleground::BroadcastWorker(Do& _do) { for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) - if (Player *plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER))) + if (Player* plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER))) _do(plr); } @@ -325,10 +325,10 @@ inline void Battleground::_ProcessRessurect(uint32 diff) { for (std::map<uint64, std::vector<uint64> >::iterator itr = m_ReviveQueue.begin(); itr != m_ReviveQueue.end(); ++itr) { - Creature *sh = NULL; + Creature* sh = NULL; for (std::vector<uint64>::const_iterator itr2 = (itr->second).begin(); itr2 != (itr->second).end(); ++itr2) { - Player *plr = ObjectAccessor::FindPlayer(*itr2); + Player* plr = ObjectAccessor::FindPlayer(*itr2); if (!plr) continue; @@ -359,7 +359,7 @@ inline void Battleground::_ProcessRessurect(uint32 diff) { for (std::vector<uint64>::const_iterator itr = m_ResurrectQueue.begin(); itr != m_ResurrectQueue.end(); ++itr) { - Player *plr = ObjectAccessor::FindPlayer(*itr); + Player* plr = ObjectAccessor::FindPlayer(*itr); if (!plr) continue; plr->ResurrectPlayer(1.0f); @@ -424,7 +424,7 @@ inline void Battleground::_ProcessJoin(uint32 diff) { m_ResetStatTimer = 0; for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if (Player *plr = ObjectAccessor::FindPlayer(itr->first)) + if (Player* plr = ObjectAccessor::FindPlayer(itr->first)) plr->ResetAllPowers(); } @@ -472,7 +472,7 @@ inline void Battleground::_ProcessJoin(uint32 diff) { // TODO : add arena sound PlaySoundToAll(SOUND_ARENA_START); for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if (Player *plr = ObjectAccessor::FindPlayer(itr->first)) + if (Player* plr = ObjectAccessor::FindPlayer(itr->first)) { // BG Status packet WorldPacket status; @@ -488,7 +488,7 @@ inline void Battleground::_ProcessJoin(uint32 diff) for (Unit::AuraApplicationMap::iterator iter = auraMap.begin(); iter != auraMap.end();) { AuraApplication * aurApp = iter->second; - Aura * aura = aurApp->GetBase(); + Aura* aura = aurApp->GetBase(); if (!aura->IsPermanent() && aura->GetDuration() <= 30*IN_MILLISECONDS && aurApp->IsPositive() @@ -594,7 +594,7 @@ void Battleground::SendPacketToAll(WorldPacket* packet) player->GetSession()->SendPacket(packet); } -void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player *sender, bool self) +void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender, bool self) { for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) if (Player* player = _GetPlayerForTeam(TeamID, itr, "SendPacketToTeam")) @@ -963,8 +963,8 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac if (isRated() && GetStatus() == STATUS_IN_PROGRESS) { //left a rated match while the encounter was in progress, consider as loser - ArenaTeam * winner_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team))); - ArenaTeam * loser_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(team)); + ArenaTeam* winner_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team))); + ArenaTeam* loser_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(team)); if (winner_arena_team && loser_arena_team && winner_arena_team != loser_arena_team) loser_arena_team->MemberLost(plr, GetArenaMatchmakerRating(GetOtherTeam(team))); } @@ -985,8 +985,8 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac if (isRated() && GetStatus() == STATUS_IN_PROGRESS) { //left a rated match while the encounter was in progress, consider as loser - ArenaTeam * others_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team))); - ArenaTeam * players_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(team)); + ArenaTeam* others_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(GetOtherTeam(team))); + ArenaTeam* players_arena_team = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamIdForTeam(team)); if (others_arena_team && players_arena_team) players_arena_team->OfflineMemberLost(guid, GetArenaMatchmakerRating(GetOtherTeam(team))); } @@ -1373,7 +1373,7 @@ void Battleground::AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid { m_ReviveQueue[npc_guid].push_back(player_guid); - Player *plr = ObjectAccessor::FindPlayer(player_guid); + Player* plr = ObjectAccessor::FindPlayer(player_guid); if (!plr) return; @@ -1389,7 +1389,7 @@ void Battleground::RemovePlayerFromResurrectQueue(uint64 player_guid) if (*itr2 == player_guid) { (itr->second).erase(itr2); - if (Player *plr = ObjectAccessor::FindPlayer(player_guid)) + if (Player* plr = ObjectAccessor::FindPlayer(player_guid)) plr->RemoveAurasDueToSpell(SPELL_WAITING_FOR_RESURRECT); return; } @@ -1402,7 +1402,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float // If the assert is called, means that m_BgObjects must be resized! ASSERT(type < m_BgObjects.size()); - Map *map = GetBgMap(); + Map* map = GetBgMap(); if (!map) return false; // Must be created this way, adding to godatamap would add it to the base map of the instance @@ -1451,7 +1451,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float // It would be nice to correctly implement GO_ACTIVATED state and open/close doors in gameobject code void Battleground::DoorClose(uint32 type) { - if (GameObject *obj = GetBgMap()->GetGameObject(m_BgObjects[type])) + if (GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type])) { // If doors are open, close it if (obj->getLootState() == GO_ACTIVATED && obj->GetGoState() != GO_STATE_READY) @@ -1468,7 +1468,7 @@ void Battleground::DoorClose(uint32 type) void Battleground::DoorOpen(uint32 type) { - if (GameObject *obj = GetBgMap()->GetGameObject(m_BgObjects[type])) + if (GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type])) { // Change state to be sure they will be opened obj->SetLootState(GO_READY); @@ -1481,7 +1481,7 @@ void Battleground::DoorOpen(uint32 type) GameObject* Battleground::GetBGObject(uint32 type) { - GameObject *obj = GetBgMap()->GetGameObject(m_BgObjects[type]); + GameObject* obj = GetBgMap()->GetGameObject(m_BgObjects[type]); if (!obj) sLog->outError("Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", type, GUID_LOPART(m_BgObjects[type]), m_MapId, m_InstanceID); @@ -1490,7 +1490,7 @@ GameObject* Battleground::GetBGObject(uint32 type) Creature* Battleground::GetBGCreature(uint32 type) { - Creature *creature = GetBgMap()->GetCreature(m_BgCreatures[type]); + Creature* creature = GetBgMap()->GetCreature(m_BgCreatures[type]); if (!creature) sLog->outError("Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!", type, GUID_LOPART(m_BgCreatures[type]), m_MapId, m_InstanceID); @@ -1500,7 +1500,7 @@ Creature* Battleground::GetBGCreature(uint32 type) void Battleground::SpawnBGObject(uint32 type, uint32 respawntime) { if (Map* map = GetBgMap()) - if (GameObject *obj = map->GetGameObject(m_BgObjects[type])) + if (GameObject* obj = map->GetGameObject(m_BgObjects[type])) { if (respawntime) obj->SetLootState(GO_JUST_DEACTIVATED); @@ -1533,7 +1533,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f pCreature->SetHomePosition(x, y, z, o); - CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(entry); + CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry); if (!cinfo) { sLog->outError("Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!", @@ -1559,7 +1559,7 @@ bool Battleground::DelCreature(uint32 type) if (!m_BgCreatures[type]) return true; - if (Creature *creature = GetBgMap()->GetCreature(m_BgCreatures[type])) + if (Creature* creature = GetBgMap()->GetCreature(m_BgCreatures[type])) { creature->AddObjectToRemoveList(); m_BgCreatures[type] = 0; @@ -1668,7 +1668,7 @@ void Battleground::SendWarningToAll(int32 entry, ...) data << msg.c_str(); data << (uint8)0; for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) - if (Player *plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER))) + if (Player* plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER))) if (plr->GetSession()) plr->GetSession()->SendPacket(&data); } @@ -1699,7 +1699,7 @@ const char* Battleground::GetTrinityString(int32 entry) // buffs are in their positions when battleground starts void Battleground::HandleTriggerBuff(uint64 go_guid) { - GameObject *obj = GetBgMap()->GetGameObject(go_guid); + GameObject* obj = GetBgMap()->GetGameObject(go_guid); if (!obj || obj->GetGoType() != GAMEOBJECT_TYPE_TRAP || !obj->isSpawned()) return; @@ -1857,7 +1857,7 @@ void Battleground::UpdateArenaWorldState() UpdateWorldState(0xe11, GetAlivePlayersCountByTeam(ALLIANCE)); } -void Battleground::SetBgRaid(uint32 TeamID, Group *bg_raid) +void Battleground::SetBgRaid(uint32 TeamID, Group* bg_raid) { Group*& old_raid = TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE]; if (old_raid) diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 4f2f87c14c6..6e791127c33 100755 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -476,10 +476,10 @@ class Battleground void SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 strId1 = 0, int32 strId2 = 0); // Raid Group - Group *GetBgRaid(uint32 TeamID) const { return TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE]; } - void SetBgRaid(uint32 TeamID, Group *bg_raid); + Group* GetBgRaid(uint32 TeamID) const { return TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE]; } + void SetBgRaid(uint32 TeamID, Group* bg_raid); - virtual void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true); + virtual void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true); static BattlegroundTeamId GetTeamIndexByTeamId(uint32 Team) { return Team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE; } uint32 GetPlayersCountByTeam(uint32 Team) const { return m_PlayersCount[GetTeamIndexByTeamId(Team)]; } @@ -630,7 +630,7 @@ class Battleground bool m_IsRated; // is this battle rated? bool m_PrematureCountDown; uint32 m_PrematureCountDownTimer; - char const *m_Name; + char const* m_Name; /* Pre- and post-update hooks */ @@ -673,7 +673,7 @@ class Battleground uint32 m_InvitedHorde; // Raid Group - Group *m_BgRaids[BG_TEAMS_COUNT]; // 0 - alliance, 1 - horde + Group* m_BgRaids[BG_TEAMS_COUNT]; // 0 - alliance, 1 - horde // Players count by team uint32 m_PlayersCount[BG_TEAMS_COUNT]; diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index bd45fee29f5..faf04196b40 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -174,7 +174,7 @@ void BattlegroundMgr::Update(uint32 diff) } } -void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battleground *bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame) +void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame) { // we can be in 2 queues in same time... @@ -227,7 +227,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battlegro } } -void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg) +void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg) { uint8 type = (bg->isArena() ? 1 : 0); // last check on 3.0.3 @@ -291,7 +291,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg) } else { - Player *plr = ObjectAccessor::FindPlayer(itr2->first); + Player* plr = ObjectAccessor::FindPlayer(itr2->first); uint32 team = bg->GetPlayerTeam(itr2->first); if (!team && plr) team = plr->GetBGTeam(); @@ -396,7 +396,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg) data->put(wpos, scoreCount); } -void BattlegroundMgr::BuildGroupJoinedBattlegroundPacket(WorldPacket *data, GroupJoinBattlegroundResult result) +void BattlegroundMgr::BuildGroupJoinedBattlegroundPacket(WorldPacket* data, GroupJoinBattlegroundResult result) { data->Initialize(SMSG_GROUP_JOINED_BATTLEGROUND, 4); *data << int32(result); @@ -404,26 +404,26 @@ void BattlegroundMgr::BuildGroupJoinedBattlegroundPacket(WorldPacket *data, Grou *data << uint64(0); // player guid } -void BattlegroundMgr::BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value) +void BattlegroundMgr::BuildUpdateWorldStatePacket(WorldPacket* data, uint32 field, uint32 value) { data->Initialize(SMSG_UPDATE_WORLD_STATE, 4+4); *data << uint32(field); *data << uint32(value); } -void BattlegroundMgr::BuildPlaySoundPacket(WorldPacket *data, uint32 soundid) +void BattlegroundMgr::BuildPlaySoundPacket(WorldPacket* data, uint32 soundid) { data->Initialize(SMSG_PLAY_SOUND, 4); *data << uint32(soundid); } -void BattlegroundMgr::BuildPlayerLeftBattlegroundPacket(WorldPacket *data, uint64 guid) +void BattlegroundMgr::BuildPlayerLeftBattlegroundPacket(WorldPacket* data, uint64 guid) { data->Initialize(SMSG_BATTLEGROUND_PLAYER_LEFT, 8); *data << uint64(guid); } -void BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket(WorldPacket *data, Player *plr) +void BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket(WorldPacket* data, Player* plr) { data->Initialize(SMSG_BATTLEGROUND_PLAYER_JOINED, 8); *data << uint64(plr->GetGUID()); @@ -500,8 +500,8 @@ uint32 BattlegroundMgr::CreateClientVisibleInstanceId(BattlegroundTypeId bgTypeI Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated) { // get the template BG - Battleground *bg_template = GetBattlegroundTemplate(bgTypeId); - BattlegroundSelectionWeightMap *selectionWeights = NULL; + Battleground* bg_template = GetBattlegroundTemplate(bgTypeId); + BattlegroundSelectionWeightMap* selectionWeights = NULL; if (!bg_template) { @@ -552,7 +552,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId } } - Battleground *bg = NULL; + Battleground* bg = NULL; // create a copy of the BG template switch(bgTypeId) { @@ -625,7 +625,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId uint32 BattlegroundMgr::CreateBattleground(CreateBattlegroundData& data) { // Create the BG - Battleground *bg = NULL; + Battleground* bg = NULL; switch (data.bgTypeId) { case BATTLEGROUND_AV: bg = new BattlegroundAV; break; @@ -652,8 +652,8 @@ uint32 BattlegroundMgr::CreateBattleground(CreateBattlegroundData& data) bg->SetArenaorBGType(data.IsArena); bg->SetMinPlayersPerTeam(data.MinPlayersPerTeam); bg->SetMaxPlayersPerTeam(data.MaxPlayersPerTeam); - bg->SetMinPlayers(data.MinPlayersPerTeam * 2); - bg->SetMaxPlayers(data.MaxPlayersPerTeam * 2); + bg->SetMinPlayers(data.MinPlayersPerTeam* 2); + bg->SetMaxPlayers(data.MaxPlayersPerTeam* 2); bg->SetName(data.BattlegroundName); bg->SetTeamStartLoc(ALLIANCE, data.Team1StartLocX, data.Team1StartLocY, data.Team1StartLocZ, data.Team1StartLocO); bg->SetTeamStartLoc(HORDE, data.Team2StartLocX, data.Team2StartLocY, data.Team2StartLocZ, data.Team2StartLocO); @@ -672,7 +672,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() uint32 oldMSTime = getMSTime(); uint8 selectionWeight; - BattlemasterListEntry const *bl; + BattlemasterListEntry const* bl; // 0 1 2 3 4 5 6 7 8 9 10 QueryResult result = WorldDatabase.Query("SELECT id, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, AllianceStartLoc, AllianceStartO, HordeStartLoc, HordeStartO, Weight, ScriptName FROM battleground_template"); @@ -688,7 +688,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 bgTypeID_ = fields[0].GetUInt32(); if (DisableMgr::IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeID_, NULL)) @@ -805,7 +805,7 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution() sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Automatic Arena Point Distribution initialized."); } -void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket *data, uint64 guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere) +void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere) { if (!plr) return; @@ -869,9 +869,9 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket *data, uint64 guid } } -void BattlegroundMgr::SendToBattleground(Player *pl, uint32 instanceId, BattlegroundTypeId bgTypeId) +void BattlegroundMgr::SendToBattleground(Player* pl, uint32 instanceId, BattlegroundTypeId bgTypeId) { - Battleground *bg = GetBattleground(instanceId, bgTypeId); + Battleground* bg = GetBattleground(instanceId, bgTypeId); if (bg) { uint32 mapid = bg->GetMapId(); @@ -890,7 +890,7 @@ void BattlegroundMgr::SendToBattleground(Player *pl, uint32 instanceId, Battlegr } } -void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player *pl, Battleground *bg, uint64 guid) +void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* pl, Battleground* bg, uint64 guid) { WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12); uint32 time_ = 30000 - bg->GetLastResurrectTime(); // resurrect every 30 seconds @@ -1080,7 +1080,7 @@ void BattlegroundMgr::LoadBattleMastersEntry() { ++count; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); uint32 bgTypeId = fields[1].GetUInt32(); diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h index b453ba59170..7f35e5366a5 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.h +++ b/src/server/game/Battlegrounds/BattlegroundMgr.h @@ -65,15 +65,15 @@ class BattlegroundMgr void Update(uint32 diff); /* Packet Building */ - void BuildPlayerJoinedBattlegroundPacket(WorldPacket *data, Player *plr); - void BuildPlayerLeftBattlegroundPacket(WorldPacket *data, uint64 guid); - void BuildBattlegroundListPacket(WorldPacket *data, uint64 guid, Player *plr, BattlegroundTypeId bgTypeId, uint8 fromWhere); - void BuildGroupJoinedBattlegroundPacket(WorldPacket *data, GroupJoinBattlegroundResult result); - void BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value); - void BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg); - void BuildBattlegroundStatusPacket(WorldPacket *data, Battleground *bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame = 1); - void BuildPlaySoundPacket(WorldPacket *data, uint32 soundid); - void SendAreaSpiritHealerQueryOpcode(Player *pl, Battleground *bg, uint64 guid); + void BuildPlayerJoinedBattlegroundPacket(WorldPacket* data, Player* plr); + void BuildPlayerLeftBattlegroundPacket(WorldPacket* data, uint64 guid); + void BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere); + void BuildGroupJoinedBattlegroundPacket(WorldPacket* data, GroupJoinBattlegroundResult result); + void BuildUpdateWorldStatePacket(WorldPacket* data, uint32 field, uint32 value); + void BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg); + void BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame = 1); + void BuildPlaySoundPacket(WorldPacket* data, uint32 soundid); + void SendAreaSpiritHealerQueryOpcode(Player* pl, Battleground* bg, uint64 guid); /* Battlegrounds */ Battleground* GetBattlegroundThroughClientInstance(uint32 instanceId, BattlegroundTypeId bgTypeId); @@ -91,7 +91,7 @@ class BattlegroundMgr void CreateInitialBattlegrounds(); void DeleteAllBattlegrounds(); - void SendToBattleground(Player *pl, uint32 InstanceID, BattlegroundTypeId bgTypeId); + void SendToBattleground(Player* pl, uint32 InstanceID, BattlegroundTypeId bgTypeId); /* Battleground queues */ //these queues are instantiated when creating BattlegroundMrg diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 2dbe799150c..198f3019304 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -105,7 +105,7 @@ bool BattlegroundQueue::SelectionPool::KickGroup(uint32 size) // used when building selection pools // returns true if we can invite more players, or when we added group to selection pool // returns false when selection pool is full -bool BattlegroundQueue::SelectionPool::AddGroup(GroupQueueInfo *ginfo, uint32 desiredCount) +bool BattlegroundQueue::SelectionPool::AddGroup(GroupQueueInfo* ginfo, uint32 desiredCount) { //if group is larger than desired count - don't allow to add it to pool if (!ginfo->IsInvitedToBGInstanceGUID && desiredCount >= PlayerCount + ginfo->Players.size()) @@ -125,7 +125,7 @@ bool BattlegroundQueue::SelectionPool::AddGroup(GroupQueueInfo *ginfo, uint32 de /*********************************************************/ // add group or player (grp == NULL) to bg queue with the given leader and bg specifications -GroupQueueInfo * BattlegroundQueue::AddGroup(Player *leader, Group* grp, BattlegroundTypeId BgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 arenateamid) +GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, BattlegroundTypeId BgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 arenateamid) { BattlegroundBracketId bracketId = bracketEntry->GetBracketId(); @@ -159,7 +159,7 @@ GroupQueueInfo * BattlegroundQueue::AddGroup(Player *leader, Group* grp, Battleg //announce world (this don't need mutex) if (isRated && sWorld->getBoolConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE)) { - ArenaTeam *Team = sArenaTeamMgr->GetArenaTeamById(arenateamid); + ArenaTeam* Team = sArenaTeamMgr->GetArenaTeamById(arenateamid); if (Team) sWorld->SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, Team->GetName().c_str(), ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating); } @@ -169,9 +169,9 @@ GroupQueueInfo * BattlegroundQueue::AddGroup(Player *leader, Group* grp, Battleg //ACE_Guard<ACE_Recursive_Thread_Mutex> guard(m_Lock); if (grp) { - for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *member = itr->getSource(); + Player* member = itr->getSource(); if (!member) continue; // this should never happen PlayerQueueInfo& pl_info = m_QueuedPlayers[member->GetGUID()]; @@ -283,7 +283,7 @@ uint32 BattlegroundQueue::GetAverageQueueWaitTime(GroupQueueInfo* ginfo, Battleg //remove player from queue and from group info, if group info is empty then remove it too void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount) { - //Player *plr = ObjectAccessor::FindPlayer(guid); + //Player* plr = ObjectAccessor::FindPlayer(guid); int32 bracket_id = -1; // signed for proper for-loop finish QueuedPlayersMap::iterator itr; @@ -351,16 +351,16 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount) // announce to world if arena team left queue for rated match, show only once if (group->ArenaType && group->IsRated && group->Players.empty() && sWorld->getBoolConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE)) - if (ArenaTeam *Team = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId)) + if (ArenaTeam* Team = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId)) sWorld->SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, Team->GetName().c_str(), group->ArenaType, group->ArenaType, group->ArenaTeamRating); // if player leaves queue and he is invited to rated arena match, then he have to lose if (group->IsInvitedToBGInstanceGUID && group->IsRated && decreaseInvitedCount) { - if (ArenaTeam * at = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId)) + if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId)) { sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating); - if (Player *plr = ObjectAccessor::FindPlayer(guid)) + if (Player* plr = ObjectAccessor::FindPlayer(guid)) at->MemberLost(plr, group->OpponentsMatchmakerRating); else at->OfflineMemberLost(guid, group->OpponentsMatchmakerRating); @@ -381,7 +381,7 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount) { // remove next player, this is recursive // first send removal information - if (Player *plr2 = ObjectAccessor::FindPlayer(group->Players.begin()->first)) + if (Player* plr2 = ObjectAccessor::FindPlayer(group->Players.begin()->first)) { Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(group->BgTypeId); BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(group->BgTypeId, group->ArenaType); @@ -415,7 +415,7 @@ bool BattlegroundQueue::GetPlayerGroupInfoData(uint64 guid, GroupQueueInfo* ginf return true; } -bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, Battleground* bg, uint32 side) +bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg, uint32 side) { // set side if needed if (side) diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h index c2579b7623a..30c913e4f22 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.h +++ b/src/server/game/Battlegrounds/BattlegroundQueue.h @@ -33,7 +33,7 @@ struct GroupQueueInfo; // type predefinitio struct PlayerQueueInfo // stores information for players in queue { uint32 LastOnlineTime; // for tracking and removing offline players from queue after 5 minutes - GroupQueueInfo * GroupInfo; // pointer to the associated groupqueueinfo + GroupQueueInfo* GroupInfo; // pointer to the associated groupqueueinfo }; struct GroupQueueInfo // stores information about the group in queue (also used when joined as solo!) @@ -75,7 +75,7 @@ class BattlegroundQueue bool CheckPremadeMatch(BattlegroundBracketId bracket_id, uint32 MinPlayersPerTeam, uint32 MaxPlayersPerTeam); bool CheckNormalMatch(Battleground* bg_template, BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers); bool CheckSkirmishForSameFaction(BattlegroundBracketId bracket_id, uint32 minPlayersPerTeam); - GroupQueueInfo * AddGroup(Player* leader, Group* group, BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 ArenaTeamId = 0); + GroupQueueInfo* AddGroup(Player* leader, Group* group, BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 ArenaTeamId = 0); void RemovePlayer(uint64 guid, bool decreaseInvitedCount); bool IsPlayerInvited(uint64 pl_guid, const uint32 bgInstanceGuid, const uint32 removeTime); bool GetPlayerGroupInfoData(uint64 guid, GroupQueueInfo* ginfo); @@ -104,7 +104,7 @@ class BattlegroundQueue { public: void Init(); - bool AddGroup(GroupQueueInfo *ginfo, uint32 desiredCount); + bool AddGroup(GroupQueueInfo* ginfo, uint32 desiredCount); bool KickGroup(uint32 size); uint32 GetPlayerCount() const {return PlayerCount;} public: @@ -118,7 +118,7 @@ class BattlegroundQueue private: - bool InviteGroupToBG(GroupQueueInfo * ginfo, Battleground* bg, uint32 side); + bool InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg, uint32 side); uint32 m_WaitTimes[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS][COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME]; uint32 m_WaitTimeLastPlayer[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS]; uint32 m_SumOfWaitTimes[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS]; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp index 809c214b790..7c7a6262c58 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAA.cpp @@ -47,7 +47,7 @@ void BattlegroundAA::StartingEventOpenDoors() { } -void BattlegroundAA::AddPlayer(Player *plr) +void BattlegroundAA::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAA.h b/src/server/game/Battlegrounds/Zones/BattlegroundAA.h index c94d54916e0..33e193bd4ef 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAA.h @@ -35,12 +35,12 @@ class BattlegroundAA : public Battleground ~BattlegroundAA(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); bool SetupBattleground(); void HandleKillPlayer(Player* player, Player* killer); }; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 8bc64a0f7d8..e2a39ff4666 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -204,7 +204,7 @@ void BattlegroundAB::StartingEventOpenDoors() DoorOpen(BG_AB_OBJECT_GATE_H); } -void BattlegroundAB::AddPlayer(Player *plr) +void BattlegroundAB::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in the constructor @@ -218,7 +218,7 @@ void BattlegroundAB::RemovePlayer(Player* /*plr*/, uint64 /*guid*/, uint32 /*tea } -void BattlegroundAB::HandleAreaTrigger(Player *Source, uint32 Trigger) +void BattlegroundAB::HandleAreaTrigger(Player* Source, uint32 Trigger) { if (GetStatus() != STATUS_IN_PROGRESS) return; @@ -406,7 +406,7 @@ void BattlegroundAB::_NodeDeOccupied(uint8 node) std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[node]]; if (!ghost_list.empty()) { - WorldSafeLocsEntry const *ClosestGrave = NULL; + WorldSafeLocsEntry const* ClosestGrave = NULL; for (std::vector<uint64>::const_iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr) { Player* plr = ObjectAccessor::FindPlayer(*itr); @@ -428,7 +428,7 @@ void BattlegroundAB::_NodeDeOccupied(uint8 node) } /* Invoked if a player used a banner as a gameobject */ -void BattlegroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*target_obj*/) +void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/) { if (GetStatus() != STATUS_IN_PROGRESS) return; @@ -679,7 +679,7 @@ WorldSafeLocsEntry const* BattlegroundAB::GetClosestGraveYard(Player* player) return good_entry; } -void BattlegroundAB::UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor) +void BattlegroundAB::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor) { BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID()); if (itr == m_PlayerScores.end()) // player not found... diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h index 84398389c10..c848c5f23f8 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h @@ -245,23 +245,23 @@ class BattlegroundAB : public Battleground BattlegroundAB(); ~BattlegroundAB(); - void AddPlayer(Player *plr); + void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); virtual bool SetupBattleground(); virtual void Reset(); void EndBattleground(uint32 winner); virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player); /* Scorekeeping */ - virtual void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true); + virtual void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true); virtual void FillInitialWorldStates(WorldPacket& data); /* Nodes occupying */ - virtual void EventPlayerClickedOnFlag(Player *source, GameObject* target_obj); + virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj); /* achievement req. */ bool IsAllNodesConrolledByTeam(uint32 team) const; // overwrited diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index d5dbdca976f..efe8075a03e 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -422,7 +422,7 @@ void BattlegroundAV::StartingEventOpenDoors() DoorOpen(BG_AV_OBJECT_DOOR_A); } -void BattlegroundAV::AddPlayer(Player *plr) +void BattlegroundAV::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -486,7 +486,7 @@ void BattlegroundAV::RemovePlayer(Player* plr, uint64 /*guid*/, uint32 /*team*/) plr->RemoveAurasDueToSpell(AV_BUFF_H_CAPTAIN); } -void BattlegroundAV::HandleAreaTrigger(Player *Source, uint32 Trigger) +void BattlegroundAV::HandleAreaTrigger(Player* Source, uint32 Trigger) { // this is wrong way to implement these things. On official it done by gameobject spell cast. if (GetStatus() != STATUS_IN_PROGRESS) @@ -853,7 +853,7 @@ uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node) //called when using banner -void BattlegroundAV::EventPlayerClickedOnFlag(Player *source, GameObject* target_obj) +void BattlegroundAV::EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) { if (GetStatus() != STATUS_IN_PROGRESS) return; @@ -1029,8 +1029,8 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object) std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[node]]; if (!ghost_list.empty()) { - Player *plr; - WorldSafeLocsEntry const *ClosestGrave = NULL; + Player* plr; + WorldSafeLocsEntry const* ClosestGrave = NULL; for (std::vector<uint64>::iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr) { plr = ObjectAccessor::FindPlayer(*ghost_list.begin()); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h index 83fd559fdd4..3ae1f52a4f9 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h @@ -1539,21 +1539,21 @@ class BattlegroundAV : public Battleground ~BattlegroundAV(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); bool SetupBattleground(); virtual void ResetBGSubclass(); /*general stuff*/ void UpdateScore(uint16 team, int16 points); - void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true); + void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true); /*handlestuff*/ //these are functions which get called from extern - virtual void EventPlayerClickedOnFlag(Player *source, GameObject* target_obj); + virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj); void HandleKillPlayer(Player* player, Player* killer); void HandleKillUnit(Creature* unit, Player* killer); void HandleQuestComplete(uint32 questid, Player* player); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp index e88103acb25..1db59547d92 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp @@ -62,7 +62,7 @@ void BattlegroundBE::StartingEventOpenDoors() SpawnBGObject(i, 60); } -void BattlegroundBE::AddPlayer(Player *plr) +void BattlegroundBE::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -105,7 +105,7 @@ bool BattlegroundBE::HandlePlayerUnderMap(Player* player) return true; } -void BattlegroundBE::HandleAreaTrigger(Player *Source, uint32 Trigger) +void BattlegroundBE::HandleAreaTrigger(Player* Source, uint32 Trigger) { // this is wrong way to implement these things. On official it done by gameobject spell cast. if (GetStatus() != STATUS_IN_PROGRESS) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h index 65475997b90..13aef8f561b 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h @@ -55,12 +55,12 @@ class BattlegroundBE : public Battleground ~BattlegroundBE(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); bool SetupBattleground(); virtual void Reset(); virtual void FillInitialWorldStates(WorldPacket &d); @@ -68,6 +68,6 @@ class BattlegroundBE : public Battleground bool HandlePlayerUnderMap(Player* plr); /* Scorekeeping */ - void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true); + void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true); }; #endif diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp index 3c1e3612d1a..6fb07ebb678 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp @@ -88,7 +88,7 @@ void BattlegroundDS::StartingEventOpenDoors() SpawnBGObject(i, getWaterFallTimer()); } -void BattlegroundDS::AddPlayer(Player *plr) +void BattlegroundDS::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -125,7 +125,7 @@ void BattlegroundDS::HandleKillPlayer(Player* player, Player* killer) CheckArenaWinConditions(); } -void BattlegroundDS::HandleAreaTrigger(Player *Source, uint32 Trigger) +void BattlegroundDS::HandleAreaTrigger(Player* Source, uint32 Trigger) { if (GetStatus() != STATUS_IN_PROGRESS) return; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h index 02da03d6450..e5b2d613810 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h @@ -64,12 +64,12 @@ class BattlegroundDS : public Battleground ~BattlegroundDS(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); bool SetupBattleground(); virtual void Reset(); virtual void FillInitialWorldStates(WorldPacket &d); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index 77d2c72da32..8c5b0468aca 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -137,7 +137,7 @@ void BattlegroundEY::AddPoints(uint32 Team, uint32 Points) void BattlegroundEY::CheckSomeoneJoinedPoint() { - GameObject *obj = NULL; + GameObject* obj = NULL; for (uint8 i = 0; i < EY_POINTS_MAX; ++i) { obj = HashMapHolder<GameObject>::Find(m_BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REAVER + i]); @@ -146,7 +146,7 @@ void BattlegroundEY::CheckSomeoneJoinedPoint() uint8 j = 0; while (j < m_PlayersNearPoint[EY_POINTS_MAX].size()) { - Player *plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]); + Player* plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]); if (!plr) { sLog->outError("BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j])); @@ -177,7 +177,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint() //reset current point counts for (uint8 i = 0; i < 2*EY_POINTS_MAX; ++i) m_CurrentPointPlayersCount[i] = 0; - GameObject *obj = NULL; + GameObject* obj = NULL; for (uint8 i = 0; i < EY_POINTS_MAX; ++i) { obj = HashMapHolder<GameObject>::Find(m_BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REAVER + i]); @@ -186,7 +186,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint() uint8 j = 0; while (j < m_PlayersNearPoint[i].size()) { - Player *plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]); + Player* plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]); if (!plr) { sLog->outError("BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j])); @@ -241,7 +241,7 @@ void BattlegroundEY::UpdatePointStatuses() for (uint8 i = 0; i < m_PlayersNearPoint[point].size(); ++i) { - Player *plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[point][i]); + Player* plr = ObjectAccessor::FindPlayer(m_PlayersNearPoint[point][i]); if (plr) { this->UpdateWorldStateForPlayer(PROGRESS_BAR_STATUS, m_PointBarStatus[point], plr); @@ -330,7 +330,7 @@ void BattlegroundEY::UpdatePointsIcons(uint32 Team, uint32 Point) } } -void BattlegroundEY::AddPlayer(Player *plr) +void BattlegroundEY::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map @@ -341,7 +341,7 @@ void BattlegroundEY::AddPlayer(Player *plr) m_PlayerScores[plr->GetGUID()] = sc; } -void BattlegroundEY::RemovePlayer(Player *plr, uint64 guid, uint32 /*team*/) +void BattlegroundEY::RemovePlayer(Player* plr, uint64 guid, uint32 /*team*/) { // sometimes flag aura not removed :( for (int j = EY_POINTS_MAX; j >= 0; --j) @@ -365,7 +365,7 @@ void BattlegroundEY::RemovePlayer(Player *plr, uint64 guid, uint32 /*team*/) } } -void BattlegroundEY::HandleAreaTrigger(Player *Source, uint32 Trigger) +void BattlegroundEY::HandleAreaTrigger(Player* Source, uint32 Trigger) { if (GetStatus() != STATUS_IN_PROGRESS) return; @@ -491,7 +491,7 @@ bool BattlegroundEY::SetupBattleground() sLog->outError("BattlegroundEY: Cannot spawn buff"); } - WorldSafeLocsEntry const *sg = NULL; + WorldSafeLocsEntry const* sg = NULL; sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_ALLIANCE); if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE)) { @@ -563,7 +563,7 @@ void BattlegroundEY::RespawnFlagAfterDrop() { RespawnFlag(true); - GameObject *obj = HashMapHolder<GameObject>::Find(GetDroppedFlagGUID()); + GameObject* obj = HashMapHolder<GameObject>::Find(GetDroppedFlagGUID()); if (obj) obj->Delete(); else @@ -581,7 +581,7 @@ void BattlegroundEY::HandleKillPlayer(Player* player, Player* killer) EventPlayerDroppedFlag(player); } -void BattlegroundEY::EventPlayerDroppedFlag(Player *Source) +void BattlegroundEY::EventPlayerDroppedFlag(Player* Source) { if (GetStatus() != STATUS_IN_PROGRESS) { @@ -617,7 +617,7 @@ void BattlegroundEY::EventPlayerDroppedFlag(Player *Source) SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL); } -void BattlegroundEY::EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj) +void BattlegroundEY::EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj) { if (GetStatus() != STATUS_IN_PROGRESS || IsFlagPickedup() || !Source->IsWithinDistInMap(target_obj, 10)) return; @@ -649,7 +649,7 @@ void BattlegroundEY::EventPlayerClickedOnFlag(Player *Source, GameObject* target PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL, Source->GetName()); } -void BattlegroundEY::EventTeamLostPoint(Player *Source, uint32 Point) +void BattlegroundEY::EventTeamLostPoint(Player* Source, uint32 Point) { if (GetStatus() != STATUS_IN_PROGRESS) return; @@ -697,7 +697,7 @@ void BattlegroundEY::EventTeamLostPoint(Player *Source, uint32 Point) DelCreature(Point + 6);//NULL checks are in DelCreature! 0-5 spirit guides } -void BattlegroundEY::EventTeamCapturedPoint(Player *Source, uint32 Point) +void BattlegroundEY::EventTeamCapturedPoint(Player* Source, uint32 Point) { if (GetStatus() != STATUS_IN_PROGRESS) return; @@ -736,7 +736,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player *Source, uint32 Point) if (m_BgCreatures[Point]) DelCreature(Point); - WorldSafeLocsEntry const *sg = NULL; + WorldSafeLocsEntry const* sg = NULL; sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveYardId); if (!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, Team)) sLog->outError("BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u", @@ -764,7 +764,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player *Source, uint32 Point) } } -void BattlegroundEY::EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType) +void BattlegroundEY::EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType) { if (GetStatus() != STATUS_IN_PROGRESS || GetFlagPickerGUID() != Source->GetGUID()) return; @@ -803,7 +803,7 @@ void BattlegroundEY::EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1); } -void BattlegroundEY::UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor) +void BattlegroundEY::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor) { BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID()); if (itr == m_PlayerScores.end()) // player not found @@ -871,7 +871,7 @@ void BattlegroundEY::FillInitialWorldStates(WorldPacket& data) data << uint32(0xc0d) << uint32(0x17b); } -WorldSafeLocsEntry const *BattlegroundEY::GetClosestGraveYard(Player* player) +WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveYard(Player* player) { uint32 g_id = 0; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h index 1418effd6e9..08a34f71ba1 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h @@ -336,7 +336,7 @@ class BattlegroundEY : public Battleground ~BattlegroundEY(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); @@ -348,32 +348,32 @@ class BattlegroundEY : public Battleground void RespawnFlag(bool send_message); void RespawnFlagAfterDrop(); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); void HandleBuffUse(uint64 buff_guid); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void HandleAreaTrigger(Player* Source, uint32 Trigger); void HandleKillPlayer(Player* player, Player* killer); virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player); virtual bool SetupBattleground(); virtual void Reset(); void UpdateTeamScore(uint32 Team); void EndBattleground(uint32 winner); - void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true); + void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true); virtual void FillInitialWorldStates(WorldPacket& data); void SetDroppedFlagGUID(uint64 guid) { m_DroppedFlagGUID = guid;} uint64 GetDroppedFlagGUID() const { return m_DroppedFlagGUID;} /* Battleground Events */ - virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj); - virtual void EventPlayerDroppedFlag(Player *Source); + virtual void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj); + virtual void EventPlayerDroppedFlag(Player* Source); /* achievement req. */ bool IsAllNodesConrolledByTeam(uint32 team) const; private: virtual void PostUpdateImpl(uint32 diff); - void EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType); - void EventTeamCapturedPoint(Player *Source, uint32 Point); - void EventTeamLostPoint(Player *Source, uint32 Point); + void EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType); + void EventTeamCapturedPoint(Player* Source, uint32 Point); + void EventTeamLostPoint(Player* Source, uint32 Point); void UpdatePointsCount(uint32 Team); void UpdatePointsIcons(uint32 Team, uint32 Point); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index c7ca9cac571..47c13d8f860 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -292,7 +292,7 @@ bool BattlegroundIC::IsAllNodesConrolledByTeam(uint32 team) const return count == NODE_TYPE_WORKSHOP; } -void BattlegroundIC::AddPlayer(Player *plr) +void BattlegroundIC::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -479,7 +479,7 @@ void BattlegroundIC::RealocatePlayers(ICNodePointType nodeType) std::vector<uint64> ghost_list = m_ReviveQueue[m_BgCreatures[BG_IC_NPC_SPIRIT_GUIDE_1+nodeType-2]]; if (!ghost_list.empty()) { - WorldSafeLocsEntry const *ClosestGrave = NULL; + WorldSafeLocsEntry const* ClosestGrave = NULL; for (std::vector<uint64>::const_iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr) { Player* plr = ObjectAccessor::FindPlayer(*itr); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index 700e1d4f0a3..ed8a271921d 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -862,19 +862,19 @@ class BattlegroundIC : public Battleground ~BattlegroundIC(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); virtual void PostUpdateImpl(uint32 diff); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); bool SetupBattleground(); void SpawnLeader(uint32 teamid); void HandleKillUnit(Creature* unit, Player* killer); void HandleKillPlayer(Player* player, Player* killer); void EndBattleground(uint32 winner); - void EventPlayerClickedOnFlag(Player *source, GameObject* /*target_obj*/); + void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/); void EventPlayerDamagedGO(Player* /*plr*/, GameObject* go, uint32 eventType); void DestroyGate(Player* player, GameObject* go); @@ -882,7 +882,7 @@ class BattlegroundIC : public Battleground virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player); /* Scorekeeping */ - void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true); + void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true); void FillInitialWorldStates(WorldPacket& data); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp index beb2e617c25..58dc20c30cb 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp @@ -59,7 +59,7 @@ void BattlegroundNA::StartingEventOpenDoors() SpawnBGObject(i, 60); } -void BattlegroundNA::AddPlayer(Player *plr) +void BattlegroundNA::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -102,7 +102,7 @@ bool BattlegroundNA::HandlePlayerUnderMap(Player* player) return true; } -void BattlegroundNA::HandleAreaTrigger(Player *Source, uint32 Trigger) +void BattlegroundNA::HandleAreaTrigger(Player* Source, uint32 Trigger) { if (GetStatus() != STATUS_IN_PROGRESS) return; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h index 8c217459110..beddbaaeedf 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h @@ -56,12 +56,12 @@ class BattlegroundNA : public Battleground ~BattlegroundNA(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); bool SetupBattleground(); virtual void Reset(); virtual void FillInitialWorldStates(WorldPacket &d); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp index c8f3474a172..e2d64aa39f7 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRB.cpp @@ -43,7 +43,7 @@ void BattlegroundRB::StartingEventOpenDoors() { } -void BattlegroundRB::AddPlayer(Player *plr) +void BattlegroundRB::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRB.h b/src/server/game/Battlegrounds/Zones/BattlegroundRB.h index be32bd654ea..0878654d7dd 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRB.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRB.h @@ -34,15 +34,15 @@ class BattlegroundRB : public Battleground BattlegroundRB(); ~BattlegroundRB(); - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); /* Scorekeeping */ - void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true); + void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true); private: }; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp index 0c64b8ad8d8..8ede4a6329c 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp @@ -59,7 +59,7 @@ void BattlegroundRL::StartingEventOpenDoors() SpawnBGObject(i, 60); } -void BattlegroundRL::AddPlayer(Player *plr) +void BattlegroundRL::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -102,7 +102,7 @@ bool BattlegroundRL::HandlePlayerUnderMap(Player* player) return true; } -void BattlegroundRL::HandleAreaTrigger(Player *Source, uint32 Trigger) +void BattlegroundRL::HandleAreaTrigger(Player* Source, uint32 Trigger) { // this is wrong way to implement these things. On official it done by gameobject spell cast. if (GetStatus() != STATUS_IN_PROGRESS) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h index 87fe34e65d6..52ce7d3ca40 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h @@ -52,14 +52,14 @@ class BattlegroundRL : public Battleground ~BattlegroundRL(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void Reset(); virtual void FillInitialWorldStates(WorldPacket &d); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); bool SetupBattleground(); void HandleKillPlayer(Player* player, Player* killer); bool HandlePlayerUnderMap(Player* plr); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp index aa80be6f6cb..81a75c23cb5 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp @@ -102,7 +102,7 @@ void BattlegroundRV::StartingEventOpenDoors() setTimer(BG_RV_FIRST_TIMER); } -void BattlegroundRV::AddPlayer(Player *plr) +void BattlegroundRV::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -150,7 +150,7 @@ bool BattlegroundRV::HandlePlayerUnderMap(Player* player) return true; } -void BattlegroundRV::HandleAreaTrigger(Player *Source, uint32 Trigger) +void BattlegroundRV::HandleAreaTrigger(Player* Source, uint32 Trigger) { if (GetStatus() != STATUS_IN_PROGRESS) return; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h index 6cda12cb79d..9a6efe64524 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.h @@ -105,14 +105,14 @@ class BattlegroundRV : public Battleground ~BattlegroundRV(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); virtual void Reset(); virtual void FillInitialWorldStates(WorldPacket &d); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); bool SetupBattleground(); void HandleKillPlayer(Player* player, Player* killer); bool HandlePlayerUnderMap(Player* plr); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index d477096e8e6..775467fecde 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -62,7 +62,7 @@ bool BattlegroundSA::SetupBattleground() bool BattlegroundSA::ResetObjs() { for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if (Player *plr = ObjectAccessor::FindPlayer(itr->first)) + if (Player* plr = ObjectAccessor::FindPlayer(itr->first)) SendTransportsRemove(plr); uint32 atF = BG_SA_Factions[Attackers]; @@ -150,7 +150,7 @@ bool BattlegroundSA::ResetObjs() //Graveyards! for (uint8 i = 0;i < BG_SA_MAX_GY; i++) { - WorldSafeLocsEntry const *sg = NULL; + WorldSafeLocsEntry const* sg = NULL; sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]); if (!sg) @@ -245,7 +245,7 @@ bool BattlegroundSA::ResetObjs() for (int i = BG_SA_BOAT_ONE; i <= BG_SA_BOAT_TWO; i++) for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if (Player *plr = ObjectAccessor::FindPlayer(itr->first)) + if (Player* plr = ObjectAccessor::FindPlayer(itr->first)) SendTransportInit(plr); TeleportPlayers(); @@ -431,7 +431,7 @@ void BattlegroundSA::FillInitialWorldStates(WorldPacket& data) data << uint32(BG_SA_LEFT_ATT_TOKEN_ALL) << ally_attacks; } -void BattlegroundSA::AddPlayer(Player *plr) +void BattlegroundSA::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -492,7 +492,7 @@ void BattlegroundSA::TeleportPlayers() { for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) { - if (Player *plr = ObjectAccessor::FindPlayer(itr->first)) + if (Player* plr = ObjectAccessor::FindPlayer(itr->first)) { // should remove spirit of redemption if (plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION)) @@ -684,7 +684,7 @@ void BattlegroundSA::SendTime() UpdateWorldState(BG_SA_TIMER_SEC_DECS, ((end_of_round%60000)%10000)/1000); } -void BattlegroundSA::EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj) +void BattlegroundSA::EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj) { switch(target_obj->GetEntry()) { @@ -708,14 +708,14 @@ void BattlegroundSA::EventPlayerClickedOnFlag(Player *Source, GameObject* target }; } -void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source) +void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source) { if (GraveyardStatus[i] == Attackers) return; DelCreature(BG_SA_MAXNPC + i); GraveyardStatus[i] = Source->GetTeamId(); - WorldSafeLocsEntry const *sg = NULL; + WorldSafeLocsEntry const* sg = NULL; sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]); AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], (GraveyardStatus[i] == TEAM_ALLIANCE? ALLIANCE : HORDE)); uint32 npc = 0; @@ -798,7 +798,7 @@ void BattlegroundSA::EventPlayerUsedGO(Player* Source, GameObject* object) //Achievement Storm the Beach (1310) for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) { - if (Player *plr = ObjectAccessor::FindPlayer(itr->first)) + if (Player* plr = ObjectAccessor::FindPlayer(itr->first)) if (plr->GetTeamId() == Attackers) plr->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 65246); } @@ -822,7 +822,7 @@ void BattlegroundSA::EventPlayerUsedGO(Player* Source, GameObject* object) //Achievement Storm the Beach (1310) for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) { - if (Player *plr = ObjectAccessor::FindPlayer(itr->first)) + if (Player* plr = ObjectAccessor::FindPlayer(itr->first)) if (plr->GetTeamId() == Attackers && RoundScores[1].winner == Attackers) plr->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 65246); } @@ -865,7 +865,7 @@ void BattlegroundSA::UpdateDemolisherSpawns() { if (m_BgCreatures[i]) { - if (Creature *Demolisher = GetBGCreature(i)) + if (Creature* Demolisher = GetBGCreature(i)) { if (Demolisher->isDead()) { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h index 1bc00459cd5..9d8325f2c6f 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h @@ -423,7 +423,7 @@ class BattlegroundSA : public Battleground /* inherited from BattlegroundClass */ /// Called when a player join battle - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); /// Called when battle start virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); @@ -439,7 +439,7 @@ class BattlegroundSA : public Battleground /// Return the nearest graveyard where player can respawn virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player); /// Called when a player click on flag (graveyard flag) - virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj); + virtual void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj); /// Called when a player use a gamobject (relic) virtual void EventPlayerUsedGO(Player* Source, GameObject* object); /// Return gate id, relative to bg data, according to gameobject id @@ -477,12 +477,12 @@ class BattlegroundSA : public Battleground void EndBattleground(uint32 winner); /// CAlled when a player leave battleground - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); /* Scorekeeping */ /// Update score board - void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true); + void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true); // Achievement Defense of the Ancients bool gateDestroyed; @@ -530,7 +530,7 @@ class BattlegroundSA : public Battleground * \param i : id of graveyard * \param Source : Player who capture gy */ - void CaptureGraveyard(BG_SA_Graveyards i, Player *Source); + void CaptureGraveyard(BG_SA_Graveyards i, Player* Source); /// Switch on/off timer worldstate void ToggleTimer(); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index c0c39cae117..a567ecf7e33 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -202,7 +202,7 @@ void BattlegroundWS::StartingEventOpenDoors() StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, WS_EVENT_START_BATTLE); } -void BattlegroundWS::AddPlayer(Player *plr) +void BattlegroundWS::AddPlayer(Player* plr) { Battleground::AddPlayer(plr); //create score and add it to map, default values are set in constructor @@ -254,7 +254,7 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team) PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); - if (GameObject *obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID(team))) + if (GameObject* obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID(team))) obj->Delete(); else sLog->outError("unknown droped flag bg, guid: %u", GUID_LOPART(GetDroppedFlagGUID(team))); @@ -263,7 +263,7 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team) m_BothFlagsKept = false; } -void BattlegroundWS::EventPlayerCapturedFlag(Player *Source) +void BattlegroundWS::EventPlayerCapturedFlag(Player* Source) { if (GetStatus() != STATUS_IN_PROGRESS) return; @@ -349,7 +349,7 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player *Source) } } -void BattlegroundWS::EventPlayerDroppedFlag(Player *Source) +void BattlegroundWS::EventPlayerDroppedFlag(Player* Source) { if (GetStatus() != STATUS_IN_PROGRESS) { @@ -435,7 +435,7 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player *Source) } } -void BattlegroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj) +void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj) { if (GetStatus() != STATUS_IN_PROGRESS) return; @@ -556,7 +556,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player *Source, GameObject* target Source->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT); } -void BattlegroundWS::RemovePlayer(Player *plr, uint64 guid, uint32 /*team*/) +void BattlegroundWS::RemovePlayer(Player* plr, uint64 guid, uint32 /*team*/) { // sometimes flag aura not removed :( if (IsAllianceFlagPickedup() && m_FlagKeepers[BG_TEAM_ALLIANCE] == guid) @@ -599,7 +599,7 @@ void BattlegroundWS::UpdateTeamScore(uint32 team) UpdateWorldState(BG_WS_FLAG_CAPTURES_HORDE, GetTeamScore(team)); } -void BattlegroundWS::HandleAreaTrigger(Player *Source, uint32 Trigger) +void BattlegroundWS::HandleAreaTrigger(Player* Source, uint32 Trigger) { // this is wrong way to implement these things. On official it done by gameobject spell cast. if (GetStatus() != STATUS_IN_PROGRESS) @@ -682,7 +682,7 @@ bool BattlegroundWS::SetupBattleground() return false; } - WorldSafeLocsEntry const *sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE); + WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE); if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE)) { sLog->outErrorDb("BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!"); @@ -754,7 +754,7 @@ void BattlegroundWS::HandleKillPlayer(Player* player, Player* killer) Battleground::HandleKillPlayer(player, killer); } -void BattlegroundWS::UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor) +void BattlegroundWS::UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor) { BattlegroundScoreMap::iterator itr = m_PlayerScores.find(Source->GetGUID()); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h index 7b3dee9becb..5360a04a873 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h @@ -163,7 +163,7 @@ class BattlegroundWS : public Battleground ~BattlegroundWS(); /* inherited from BattlegroundClass */ - virtual void AddPlayer(Player *plr); + virtual void AddPlayer(Player* plr); virtual void StartingEventCloseDoors(); virtual void StartingEventOpenDoors(); @@ -183,12 +183,12 @@ class BattlegroundWS : public Battleground bool IsForceTimerDone; /* Battleground Events */ - virtual void EventPlayerDroppedFlag(Player *Source); - virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj); - virtual void EventPlayerCapturedFlag(Player *Source); + virtual void EventPlayerDroppedFlag(Player* Source); + virtual void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj); + virtual void EventPlayerCapturedFlag(Player* Source); - void RemovePlayer(Player *plr, uint64 guid, uint32 team); - void HandleAreaTrigger(Player *Source, uint32 Trigger); + void RemovePlayer(Player* plr, uint64 guid, uint32 team); + void HandleAreaTrigger(Player* Source, uint32 Trigger); void HandleKillPlayer(Player* player, Player* killer); bool SetupBattleground(); virtual void Reset(); @@ -198,7 +198,7 @@ class BattlegroundWS : public Battleground void UpdateFlagState(uint32 team, uint32 value); void SetLastFlagCapture(uint32 team) { m_LastFlagCaptureTeam = team; } void UpdateTeamScore(uint32 team); - void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true); + void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true); void SetDroppedFlagGUID(uint64 guid, uint32 TeamID) { m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)] = guid;} uint64 GetDroppedFlagGUID(uint32 TeamID) { return m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)];} virtual void FillInitialWorldStates(WorldPacket& data); diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index d2665b65226..9cf8ee29b08 100755 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -62,7 +62,7 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team) if (result) //load { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); m_announce = fields[0].GetBool(); m_ownership = fields[1].GetBool(); m_password = fields[2].GetString(); @@ -169,7 +169,7 @@ void Channel::Join(uint64 p, const char *pass) return; } - Player *plr = ObjectAccessor::FindPlayer(p); + Player* plr = ObjectAccessor::FindPlayer(p); if (plr) { @@ -231,7 +231,7 @@ void Channel::Leave(uint64 p, bool send) } else { - Player *plr = ObjectAccessor::FindPlayer(p); + Player* plr = ObjectAccessor::FindPlayer(p); if (send) { @@ -274,7 +274,7 @@ void Channel::Leave(uint64 p, bool send) void Channel::KickOrBan(uint64 good, const char *badname, bool ban) { AccountTypes sec = SEC_PLAYER; - Player *gplr = ObjectAccessor::FindPlayer(good); + Player* gplr = ObjectAccessor::FindPlayer(good); if (gplr) sec = gplr->GetSession()->GetSecurity(); @@ -292,7 +292,7 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban) } else { - Player *bad = sObjectAccessor->FindPlayerByName(badname); + Player* bad = sObjectAccessor->FindPlayerByName(badname); if (bad == NULL || !IsOn(bad->GetGUID())) { WorldPacket data; @@ -338,7 +338,7 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban) void Channel::UnBan(uint64 good, const char *badname) { uint32 sec = 0; - Player *gplr = ObjectAccessor::FindPlayer(good); + Player* gplr = ObjectAccessor::FindPlayer(good); if (gplr) sec = gplr->GetSession()->GetSecurity(); @@ -356,7 +356,7 @@ void Channel::UnBan(uint64 good, const char *badname) } else { - Player *bad = sObjectAccessor->FindPlayerByName(badname); + Player* bad = sObjectAccessor->FindPlayerByName(badname); if (bad == NULL || !IsBanned(bad->GetGUID())) { WorldPacket data; @@ -379,7 +379,7 @@ void Channel::UnBan(uint64 good, const char *badname) void Channel::Password(uint64 p, const char *pass) { uint32 sec = 0; - Player *plr = ObjectAccessor::FindPlayer(p); + Player* plr = ObjectAccessor::FindPlayer(p); if (plr) sec = plr->GetSession()->GetSecurity(); @@ -411,7 +411,7 @@ void Channel::Password(uint64 p, const char *pass) void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set) { - Player *plr = ObjectAccessor::FindPlayer(p); + Player* plr = ObjectAccessor::FindPlayer(p); if (!plr) return; @@ -431,7 +431,7 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set) } else { - Player *newp = sObjectAccessor->FindPlayerByName(p2n); + Player* newp = sObjectAccessor->FindPlayerByName(p2n); if (!newp) { WorldPacket data; @@ -479,7 +479,7 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set) void Channel::SetOwner(uint64 p, const char *newname) { - Player *plr = ObjectAccessor::FindPlayer(p); + Player* plr = ObjectAccessor::FindPlayer(p); if (!plr) return; @@ -501,7 +501,7 @@ void Channel::SetOwner(uint64 p, const char *newname) return; } - Player *newp = sObjectAccessor->FindPlayerByName(newname); + Player* newp = sObjectAccessor->FindPlayerByName(newname); if (newp == NULL || !IsOn(newp->GetGUID())) { WorldPacket data; @@ -563,7 +563,7 @@ void Channel::List(Player* player) uint32 count = 0; for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) { - Player *plr = ObjectAccessor::FindPlayer(i->first); + Player* plr = ObjectAccessor::FindPlayer(i->first); // PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters // MODERATOR, GAME MASTER, ADMINISTRATOR can see all @@ -585,7 +585,7 @@ void Channel::List(Player* player) void Channel::Announce(uint64 p) { uint32 sec = 0; - Player *plr = ObjectAccessor::FindPlayer(p); + Player* plr = ObjectAccessor::FindPlayer(p); if (plr) sec = plr->GetSession()->GetSecurity(); @@ -623,7 +623,7 @@ void Channel::Say(uint64 p, const char *what, uint32 lang) if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL)) lang = LANG_UNIVERSAL; - Player *plr = ObjectAccessor::FindPlayer(p); + Player* plr = ObjectAccessor::FindPlayer(p); if (!IsOn(p)) { @@ -666,7 +666,7 @@ void Channel::Invite(uint64 p, const char *newname) return; } - Player *newp = sObjectAccessor->FindPlayerByName(newname); + Player* newp = sObjectAccessor->FindPlayerByName(newname); if (!newp) { WorldPacket data; @@ -683,7 +683,7 @@ void Channel::Invite(uint64 p, const char *newname) return; } - Player *plr = ObjectAccessor::FindPlayer(p); + Player* plr = ObjectAccessor::FindPlayer(p); if (!plr) return; @@ -745,11 +745,11 @@ void Channel::SetOwner(uint64 guid, bool exclaim) } } -void Channel::SendToAll(WorldPacket *data, uint64 p) +void Channel::SendToAll(WorldPacket* data, uint64 p) { for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) { - Player *plr = ObjectAccessor::FindPlayer(i->first); + Player* plr = ObjectAccessor::FindPlayer(i->first); if (plr) { if (!p || !plr->GetSocial()->HasIgnore(GUID_LOPART(p))) @@ -758,22 +758,22 @@ void Channel::SendToAll(WorldPacket *data, uint64 p) } } -void Channel::SendToAllButOne(WorldPacket *data, uint64 who) +void Channel::SendToAllButOne(WorldPacket* data, uint64 who) { for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) { if (i->first != who) { - Player *plr = ObjectAccessor::FindPlayer(i->first); + Player* plr = ObjectAccessor::FindPlayer(i->first); if (plr) plr->GetSession()->SendPacket(data); } } } -void Channel::SendToOne(WorldPacket *data, uint64 who) +void Channel::SendToOne(WorldPacket* data, uint64 who) { - Player *plr = ObjectAccessor::FindPlayer(who); + Player* plr = ObjectAccessor::FindPlayer(who); if (plr) plr->GetSession()->SendPacket(data); } @@ -789,7 +789,7 @@ void Channel::DeVoice(uint64 /*guid1*/, uint64 /*guid2*/) } // done -void Channel::MakeNotifyPacket(WorldPacket *data, uint8 notify_type) +void Channel::MakeNotifyPacket(WorldPacket* data, uint8 notify_type) { data->Initialize(SMSG_CHANNEL_NOTIFY, 1+m_name.size()+1); *data << uint8(notify_type); @@ -797,21 +797,21 @@ void Channel::MakeNotifyPacket(WorldPacket *data, uint8 notify_type) } // done 0x00 -void Channel::MakeJoined(WorldPacket *data, uint64 guid) +void Channel::MakeJoined(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_JOINED_NOTICE); *data << uint64(guid); } // done 0x01 -void Channel::MakeLeft(WorldPacket *data, uint64 guid) +void Channel::MakeLeft(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_LEFT_NOTICE); *data << uint64(guid); } // done 0x02 -void Channel::MakeYouJoined(WorldPacket *data) +void Channel::MakeYouJoined(WorldPacket* data) { MakeNotifyPacket(data, CHAT_YOU_JOINED_NOTICE); *data << uint8(GetFlags()); @@ -820,7 +820,7 @@ void Channel::MakeYouJoined(WorldPacket *data) } // done 0x03 -void Channel::MakeYouLeft(WorldPacket *data) +void Channel::MakeYouLeft(WorldPacket* data) { MakeNotifyPacket(data, CHAT_YOU_LEFT_NOTICE); *data << uint32(GetChannelId()); @@ -828,52 +828,52 @@ void Channel::MakeYouLeft(WorldPacket *data) } // done 0x04 -void Channel::MakeWrongPassword(WorldPacket *data) +void Channel::MakeWrongPassword(WorldPacket* data) { MakeNotifyPacket(data, CHAT_WRONG_PASSWORD_NOTICE); } // done 0x05 -void Channel::MakeNotMember(WorldPacket *data) +void Channel::MakeNotMember(WorldPacket* data) { MakeNotifyPacket(data, CHAT_NOT_MEMBER_NOTICE); } // done 0x06 -void Channel::MakeNotModerator(WorldPacket *data) +void Channel::MakeNotModerator(WorldPacket* data) { MakeNotifyPacket(data, CHAT_NOT_MODERATOR_NOTICE); } // done 0x07 -void Channel::MakePasswordChanged(WorldPacket *data, uint64 guid) +void Channel::MakePasswordChanged(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_PASSWORD_CHANGED_NOTICE); *data << uint64(guid); } // done 0x08 -void Channel::MakeOwnerChanged(WorldPacket *data, uint64 guid) +void Channel::MakeOwnerChanged(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_OWNER_CHANGED_NOTICE); *data << uint64(guid); } // done 0x09 -void Channel::MakePlayerNotFound(WorldPacket *data, const std::string& name) +void Channel::MakePlayerNotFound(WorldPacket* data, const std::string& name) { MakeNotifyPacket(data, CHAT_PLAYER_NOT_FOUND_NOTICE); *data << name; } // done 0x0A -void Channel::MakeNotOwner(WorldPacket *data) +void Channel::MakeNotOwner(WorldPacket* data) { MakeNotifyPacket(data, CHAT_NOT_OWNER_NOTICE); } // done 0x0B -void Channel::MakeChannelOwner(WorldPacket *data) +void Channel::MakeChannelOwner(WorldPacket* data) { std::string name = ""; @@ -885,7 +885,7 @@ void Channel::MakeChannelOwner(WorldPacket *data) } // done 0x0C -void Channel::MakeModeChange(WorldPacket *data, uint64 guid, uint8 oldflags) +void Channel::MakeModeChange(WorldPacket* data, uint64 guid, uint8 oldflags) { MakeNotifyPacket(data, CHAT_MODE_CHANGE_NOTICE); *data << uint64(guid); @@ -894,27 +894,27 @@ void Channel::MakeModeChange(WorldPacket *data, uint64 guid, uint8 oldflags) } // done 0x0D -void Channel::MakeAnnouncementsOn(WorldPacket *data, uint64 guid) +void Channel::MakeAnnouncementsOn(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_ANNOUNCEMENTS_ON_NOTICE); *data << uint64(guid); } // done 0x0E -void Channel::MakeAnnouncementsOff(WorldPacket *data, uint64 guid) +void Channel::MakeAnnouncementsOff(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_ANNOUNCEMENTS_OFF_NOTICE); *data << uint64(guid); } // done 0x11 -void Channel::MakeMuted(WorldPacket *data) +void Channel::MakeMuted(WorldPacket* data) { MakeNotifyPacket(data, CHAT_MUTED_NOTICE); } // done 0x12 -void Channel::MakePlayerKicked(WorldPacket *data, uint64 bad, uint64 good) +void Channel::MakePlayerKicked(WorldPacket* data, uint64 bad, uint64 good) { MakeNotifyPacket(data, CHAT_PLAYER_KICKED_NOTICE); *data << uint64(bad); @@ -922,13 +922,13 @@ void Channel::MakePlayerKicked(WorldPacket *data, uint64 bad, uint64 good) } // done 0x13 -void Channel::MakeBanned(WorldPacket *data) +void Channel::MakeBanned(WorldPacket* data) { MakeNotifyPacket(data, CHAT_BANNED_NOTICE); } // done 0x14 -void Channel::MakePlayerBanned(WorldPacket *data, uint64 bad, uint64 good) +void Channel::MakePlayerBanned(WorldPacket* data, uint64 bad, uint64 good) { MakeNotifyPacket(data, CHAT_PLAYER_BANNED_NOTICE); *data << uint64(bad); @@ -936,7 +936,7 @@ void Channel::MakePlayerBanned(WorldPacket *data, uint64 bad, uint64 good) } // done 0x15 -void Channel::MakePlayerUnbanned(WorldPacket *data, uint64 bad, uint64 good) +void Channel::MakePlayerUnbanned(WorldPacket* data, uint64 bad, uint64 good) { MakeNotifyPacket(data, CHAT_PLAYER_UNBANNED_NOTICE); *data << uint64(bad); @@ -944,91 +944,91 @@ void Channel::MakePlayerUnbanned(WorldPacket *data, uint64 bad, uint64 good) } // done 0x16 -void Channel::MakePlayerNotBanned(WorldPacket *data, const std::string &name) +void Channel::MakePlayerNotBanned(WorldPacket* data, const std::string &name) { MakeNotifyPacket(data, CHAT_PLAYER_NOT_BANNED_NOTICE); *data << name; } // done 0x17 -void Channel::MakePlayerAlreadyMember(WorldPacket *data, uint64 guid) +void Channel::MakePlayerAlreadyMember(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_PLAYER_ALREADY_MEMBER_NOTICE); *data << uint64(guid); } // done 0x18 -void Channel::MakeInvite(WorldPacket *data, uint64 guid) +void Channel::MakeInvite(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_INVITE_NOTICE); *data << uint64(guid); } // done 0x19 -void Channel::MakeInviteWrongFaction(WorldPacket *data) +void Channel::MakeInviteWrongFaction(WorldPacket* data) { MakeNotifyPacket(data, CHAT_INVITE_WRONG_FACTION_NOTICE); } // done 0x1A -void Channel::MakeWrongFaction(WorldPacket *data) +void Channel::MakeWrongFaction(WorldPacket* data) { MakeNotifyPacket(data, CHAT_WRONG_FACTION_NOTICE); } // done 0x1B -void Channel::MakeInvalidName(WorldPacket *data) +void Channel::MakeInvalidName(WorldPacket* data) { MakeNotifyPacket(data, CHAT_INVALID_NAME_NOTICE); } // done 0x1C -void Channel::MakeNotModerated(WorldPacket *data) +void Channel::MakeNotModerated(WorldPacket* data) { MakeNotifyPacket(data, CHAT_NOT_MODERATED_NOTICE); } // done 0x1D -void Channel::MakePlayerInvited(WorldPacket *data, const std::string& name) +void Channel::MakePlayerInvited(WorldPacket* data, const std::string& name) { MakeNotifyPacket(data, CHAT_PLAYER_INVITED_NOTICE); *data << name; } // done 0x1E -void Channel::MakePlayerInviteBanned(WorldPacket *data, const std::string& name) +void Channel::MakePlayerInviteBanned(WorldPacket* data, const std::string& name) { MakeNotifyPacket(data, CHAT_PLAYER_INVITE_BANNED_NOTICE); *data << name; } // done 0x1F -void Channel::MakeThrottled(WorldPacket *data) +void Channel::MakeThrottled(WorldPacket* data) { MakeNotifyPacket(data, CHAT_THROTTLED_NOTICE); } // done 0x20 -void Channel::MakeNotInArea(WorldPacket *data) +void Channel::MakeNotInArea(WorldPacket* data) { MakeNotifyPacket(data, CHAT_NOT_IN_AREA_NOTICE); } // done 0x21 -void Channel::MakeNotInLfg(WorldPacket *data) +void Channel::MakeNotInLfg(WorldPacket* data) { MakeNotifyPacket(data, CHAT_NOT_IN_LFG_NOTICE); } // done 0x22 -void Channel::MakeVoiceOn(WorldPacket *data, uint64 guid) +void Channel::MakeVoiceOn(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_VOICE_ON_NOTICE); *data << uint64(guid); } // done 0x23 -void Channel::MakeVoiceOff(WorldPacket *data, uint64 guid) +void Channel::MakeVoiceOff(WorldPacket* data, uint64 guid) { MakeNotifyPacket(data, CHAT_VOICE_OFF_NOTICE); *data << uint64(guid); diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h index c5466d65d3f..8ce13a6afa1 100755 --- a/src/server/game/Chat/Channels/Channel.h +++ b/src/server/game/Chat/Channels/Channel.h @@ -161,46 +161,46 @@ class Channel private: // initial packet data (notify type and channel name) - void MakeNotifyPacket(WorldPacket *data, uint8 notify_type); + void MakeNotifyPacket(WorldPacket* data, uint8 notify_type); // type specific packet data - void MakeJoined(WorldPacket *data, uint64 guid); //+ 0x00 - void MakeLeft(WorldPacket *data, uint64 guid); //+ 0x01 - void MakeYouJoined(WorldPacket *data); //+ 0x02 - void MakeYouLeft(WorldPacket *data); //+ 0x03 - void MakeWrongPassword(WorldPacket *data); //? 0x04 - void MakeNotMember(WorldPacket *data); //? 0x05 - void MakeNotModerator(WorldPacket *data); //? 0x06 - void MakePasswordChanged(WorldPacket *data, uint64 guid); //+ 0x07 - void MakeOwnerChanged(WorldPacket *data, uint64 guid); //? 0x08 - void MakePlayerNotFound(WorldPacket *data, const std::string& name); //+ 0x09 - void MakeNotOwner(WorldPacket *data); //? 0x0A - void MakeChannelOwner(WorldPacket *data); //? 0x0B - void MakeModeChange(WorldPacket *data, uint64 guid, uint8 oldflags); //+ 0x0C - void MakeAnnouncementsOn(WorldPacket *data, uint64 guid); //+ 0x0D - void MakeAnnouncementsOff(WorldPacket *data, uint64 guid); //+ 0x0E - void MakeMuted(WorldPacket *data); //? 0x11 - void MakePlayerKicked(WorldPacket *data, uint64 bad, uint64 good); //? 0x12 - void MakeBanned(WorldPacket *data); //? 0x13 - void MakePlayerBanned(WorldPacket *data, uint64 bad, uint64 good); //? 0x14 - void MakePlayerUnbanned(WorldPacket *data, uint64 bad, uint64 good); //? 0x15 - void MakePlayerNotBanned(WorldPacket *data, const std::string& name); //? 0x16 - void MakePlayerAlreadyMember(WorldPacket *data, uint64 guid); //+ 0x17 - void MakeInvite(WorldPacket *data, uint64 guid); //? 0x18 - void MakeInviteWrongFaction(WorldPacket *data); //? 0x19 - void MakeWrongFaction(WorldPacket *data); //? 0x1A - void MakeInvalidName(WorldPacket *data); //? 0x1B - void MakeNotModerated(WorldPacket *data); //? 0x1C - void MakePlayerInvited(WorldPacket *data, const std::string& name); //+ 0x1D - void MakePlayerInviteBanned(WorldPacket *data, const std::string &name);//? 0x1E - void MakeThrottled(WorldPacket *data); //? 0x1F - void MakeNotInArea(WorldPacket *data); //? 0x20 - void MakeNotInLfg(WorldPacket *data); //? 0x21 - void MakeVoiceOn(WorldPacket *data, uint64 guid); //+ 0x22 - void MakeVoiceOff(WorldPacket *data, uint64 guid); //+ 0x23 + void MakeJoined(WorldPacket* data, uint64 guid); //+ 0x00 + void MakeLeft(WorldPacket* data, uint64 guid); //+ 0x01 + void MakeYouJoined(WorldPacket* data); //+ 0x02 + void MakeYouLeft(WorldPacket* data); //+ 0x03 + void MakeWrongPassword(WorldPacket* data); //? 0x04 + void MakeNotMember(WorldPacket* data); //? 0x05 + void MakeNotModerator(WorldPacket* data); //? 0x06 + void MakePasswordChanged(WorldPacket* data, uint64 guid); //+ 0x07 + void MakeOwnerChanged(WorldPacket* data, uint64 guid); //? 0x08 + void MakePlayerNotFound(WorldPacket* data, const std::string& name); //+ 0x09 + void MakeNotOwner(WorldPacket* data); //? 0x0A + void MakeChannelOwner(WorldPacket* data); //? 0x0B + void MakeModeChange(WorldPacket* data, uint64 guid, uint8 oldflags); //+ 0x0C + void MakeAnnouncementsOn(WorldPacket* data, uint64 guid); //+ 0x0D + void MakeAnnouncementsOff(WorldPacket* data, uint64 guid); //+ 0x0E + void MakeMuted(WorldPacket* data); //? 0x11 + void MakePlayerKicked(WorldPacket* data, uint64 bad, uint64 good); //? 0x12 + void MakeBanned(WorldPacket* data); //? 0x13 + void MakePlayerBanned(WorldPacket* data, uint64 bad, uint64 good); //? 0x14 + void MakePlayerUnbanned(WorldPacket* data, uint64 bad, uint64 good); //? 0x15 + void MakePlayerNotBanned(WorldPacket* data, const std::string& name); //? 0x16 + void MakePlayerAlreadyMember(WorldPacket* data, uint64 guid); //+ 0x17 + void MakeInvite(WorldPacket* data, uint64 guid); //? 0x18 + void MakeInviteWrongFaction(WorldPacket* data); //? 0x19 + void MakeWrongFaction(WorldPacket* data); //? 0x1A + void MakeInvalidName(WorldPacket* data); //? 0x1B + void MakeNotModerated(WorldPacket* data); //? 0x1C + void MakePlayerInvited(WorldPacket* data, const std::string& name); //+ 0x1D + void MakePlayerInviteBanned(WorldPacket* data, const std::string &name);//? 0x1E + void MakeThrottled(WorldPacket* data); //? 0x1F + void MakeNotInArea(WorldPacket* data); //? 0x20 + void MakeNotInLfg(WorldPacket* data); //? 0x21 + void MakeVoiceOn(WorldPacket* data, uint64 guid); //+ 0x22 + void MakeVoiceOff(WorldPacket* data, uint64 guid); //+ 0x23 - void SendToAll(WorldPacket *data, uint64 p = 0); - void SendToAllButOne(WorldPacket *data, uint64 who); - void SendToOne(WorldPacket *data, uint64 who); + void SendToAll(WorldPacket* data, uint64 p = 0); + void SendToAllButOne(WorldPacket* data, uint64 who); + void SendToOne(WorldPacket* data, uint64 who); bool IsOn(uint64 who) const { return players.find(who) != players.end(); } bool IsBanned(uint64 guid) const { return banned.find(guid) != banned.end(); } diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp index 136cc89aaf3..651e5d15647 100755 --- a/src/server/game/Chat/Channels/ChannelMgr.cpp +++ b/src/server/game/Chat/Channels/ChannelMgr.cpp @@ -41,7 +41,7 @@ ChannelMgr::~ChannelMgr() channels.clear(); } -Channel *ChannelMgr::GetJoinChannel(std::string name, uint32 channel_id) +Channel* ChannelMgr::GetJoinChannel(std::string name, uint32 channel_id) { std::wstring wname; Utf8toWStr(name, wname); @@ -49,7 +49,7 @@ Channel *ChannelMgr::GetJoinChannel(std::string name, uint32 channel_id) if (channels.find(wname) == channels.end()) { - Channel *nchan = new Channel(name, channel_id, team); + Channel* nchan = new Channel(name, channel_id, team); channels[wname] = nchan; return nchan; } @@ -57,7 +57,7 @@ Channel *ChannelMgr::GetJoinChannel(std::string name, uint32 channel_id) return channels[wname]; } -Channel *ChannelMgr::GetChannel(std::string name, Player *p, bool pkt) +Channel* ChannelMgr::GetChannel(std::string name, Player* p, bool pkt) { std::wstring wname; Utf8toWStr(name, wname); @@ -100,7 +100,7 @@ void ChannelMgr::LeftChannel(std::string name) } } -void ChannelMgr::MakeNotOnPacket(WorldPacket *data, std::string name) +void ChannelMgr::MakeNotOnPacket(WorldPacket* data, std::string name) { data->Initialize(SMSG_CHANNEL_NOTIFY, (1+10)); // we guess size (*data) << (uint8)0x05 << name; diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h index 971bcaa196b..f46f8d360c1 100755 --- a/src/server/game/Chat/Channels/ChannelMgr.h +++ b/src/server/game/Chat/Channels/ChannelMgr.h @@ -35,12 +35,12 @@ class ChannelMgr ChannelMgr() {team = 0;} ~ChannelMgr(); - Channel *GetJoinChannel(std::string name, uint32 channel_id); - Channel *GetChannel(std::string name, Player *p, bool pkt = true); + Channel* GetJoinChannel(std::string name, uint32 channel_id); + Channel* GetChannel(std::string name, Player* p, bool pkt = true); void LeftChannel(std::string name); private: ChannelMap channels; - void MakeNotOnPacket(WorldPacket *data, std::string name); + void MakeNotOnPacket(WorldPacket* data, std::string name); }; class AllianceChannelMgr : public ChannelMgr {}; diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 25f1fadba47..91a9382b2e3 100755 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -65,7 +65,7 @@ static size_t appendCommandTable(ChatCommand* target, const ChatCommand* source) return count; } -ChatCommand * ChatHandler::getCommandTable() +ChatCommand* ChatHandler::getCommandTable() { static ChatCommand banCommandTable[] = { @@ -447,7 +447,7 @@ ChatCommand * ChatHandler::getCommandTable() { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); std::string name = fields[0].GetString(); SetDataForCommandInTable(commandTableCache, name.c_str(), fields[1].GetUInt16(), fields[2].GetString(), name); @@ -634,7 +634,7 @@ void ChatHandler::PSendSysMessage(const char *format, ...) SendSysMessage(str); } -bool ChatHandler::ExecuteCommandInTable(ChatCommand *table, const char* text, const std::string& fullcmd) +bool ChatHandler::ExecuteCommandInTable(ChatCommand* table, const char* text, const std::string& fullcmd) { char const* oldtext = text; std::string cmd = ""; @@ -724,7 +724,7 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand *table, const char* text, co return false; } -bool ChatHandler::SetDataForCommandInTable(ChatCommand *table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand) +bool ChatHandler::SetDataForCommandInTable(ChatCommand* table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand) { std::string cmd = ""; @@ -879,7 +879,7 @@ Valid examples: return LinkExtractor(message).IsValidMessage(); } -bool ChatHandler::ShowHelpForSubCommands(ChatCommand *table, char const* cmd, char const* subcmd) +bool ChatHandler::ShowHelpForSubCommands(ChatCommand* table, char const* cmd, char const* subcmd) { std::string list; for (uint32 i = 0; table[i].Name != NULL; ++i) @@ -917,7 +917,7 @@ bool ChatHandler::ShowHelpForSubCommands(ChatCommand *table, char const* cmd, ch return true; } -bool ChatHandler::ShowHelpForCommand(ChatCommand *table, const char* cmd) +bool ChatHandler::ShowHelpForCommand(ChatCommand* table, const char* cmd) { if (*cmd) { @@ -975,7 +975,7 @@ bool ChatHandler::ShowHelpForCommand(ChatCommand *table, const char* cmd) } //Note: target_guid used only in CHAT_MSG_WHISPER_INFORM mode (in this case channelName ignored) -void ChatHandler::FillMessageData(WorldPacket *data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit *speaker) +void ChatHandler::FillMessageData(WorldPacket* data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit* speaker) { uint32 messageLength = (message ? strlen(message) : 0) + 1; @@ -1081,7 +1081,7 @@ Unit* ChatHandler::getSelectedUnit() return ObjectAccessor::GetUnit(*m_session->GetPlayer(), guid); } -WorldObject *ChatHandler::getSelectedObject() +WorldObject* ChatHandler::getSelectedObject() { if (!m_session) return NULL; diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index b3d9ae1e262..b33a4944e6b 100755 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -40,25 +40,25 @@ class ChatCommand bool AllowConsole; bool (*Handler)(ChatHandler*, const char* args); std::string Help; - ChatCommand * ChildCommands; + ChatCommand* ChildCommands; }; class ChatHandler { public: - WorldSession * GetSession() { return m_session; } + WorldSession* GetSession() { return m_session; } explicit ChatHandler(WorldSession* session) : m_session(session) {} explicit ChatHandler(Player* player) : m_session(player->GetSession()) {} virtual ~ChatHandler() {} - static void FillMessageData(WorldPacket *data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit *speaker); + static void FillMessageData(WorldPacket* data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit* speaker); - void FillMessageData(WorldPacket *data, uint8 type, uint32 language, uint64 target_guid, const char* message) + void FillMessageData(WorldPacket* data, uint8 type, uint32 language, uint64 target_guid, const char* message) { FillMessageData(data, m_session, type, language, NULL, target_guid, message, NULL); } - void FillSystemMessageData(WorldPacket *data, const char* message) + void FillSystemMessageData(WorldPacket* data, const char* message) { FillMessageData(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, 0, message); } @@ -126,10 +126,10 @@ class ChatHandler protected: explicit ChatHandler() : m_session(NULL) {} // for CLI subclass - static bool SetDataForCommandInTable(ChatCommand *table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand); - bool ExecuteCommandInTable(ChatCommand *table, const char* text, const std::string& fullcmd); - bool ShowHelpForCommand(ChatCommand *table, const char* cmd); - bool ShowHelpForSubCommands(ChatCommand *table, char const* cmd, char const* subcmd); + static bool SetDataForCommandInTable(ChatCommand* table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand); + bool ExecuteCommandInTable(ChatCommand* table, const char* text, const std::string& fullcmd); + bool ShowHelpForCommand(ChatCommand* table, const char* cmd); + bool ShowHelpForSubCommands(ChatCommand* table, char const* cmd, char const* subcmd); bool HandleNameAnnounceCommand(const char* args); bool HandleGMNameAnnounceCommand(const char* args); @@ -376,7 +376,7 @@ class ChatHandler private: bool _HandleGMTicketResponseAppendCommand(const char* args, bool newLine); - WorldSession * m_session; // != NULL for chat command call and NULL for CLI command + WorldSession* m_session; // != NULL for chat command call and NULL for CLI command // common global flag static bool load_command_table; diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index dde8fdd15c8..26f63aa77ee 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -165,7 +165,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss) return true; } -inline std::string ItemChatLink::FormatName(uint8 index, ItemLocale const *locale, char* const* suffixStrings) const +inline std::string ItemChatLink::FormatName(uint8 index, ItemLocale const* locale, char* const* suffixStrings) const { std::stringstream ss; if (locale == NULL || index >= locale->Name.size()) @@ -186,7 +186,7 @@ bool ItemChatLink::ValidateName(char* buffer, const char* context) bool res = (FormatName(LOCALE_enUS, NULL, suffixStrings) == buffer); if (!res) { - ItemLocale const *il = sObjectMgr->GetItemLocale(_item->ItemId); + ItemLocale const* il = sObjectMgr->GetItemLocale(_item->ItemId); for (uint8 index = LOCALE_koKR; index < TOTAL_LOCALES; ++index) { if (FormatName(index, il, suffixStrings) == buffer) @@ -243,7 +243,7 @@ bool QuestChatLink::ValidateName(char* buffer, const char* context) bool res = (_quest->GetTitle() == buffer); if (!res) - if (QuestLocale const *ql = sObjectMgr->GetQuestLocale(_quest->GetQuestId())) + if (QuestLocale const* ql = sObjectMgr->GetQuestLocale(_quest->GetQuestId())) for (uint8 i = 0; i < ql->Title.size(); i++) if (ql->Title[i] == buffer) { @@ -291,13 +291,13 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context) sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for spell %u", context, _spell->Id); return false; } - SkillLineAbilityEntry const *skillInfo = bounds.first->second; + SkillLineAbilityEntry const* skillInfo = bounds.first->second; if (!skillInfo) { sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line ability not found for spell %u", context, _spell->Id); return false; } - SkillLineEntry const *skillLine = sSkillLineStore.LookupEntry(skillInfo->skillId); + SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(skillInfo->skillId); if (!skillLine) { sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for skill %u", context, skillInfo->skillId); @@ -457,7 +457,7 @@ bool TalentChatLink::Initialize(std::istringstream& iss) return false; } // Validate talent - TalentEntry const *talentInfo = sTalentStore.LookupEntry(_talentId); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(_talentId); if (!talentInfo) { sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid talent id %u in |talent command", iss.str().c_str(), _talentId); diff --git a/src/server/game/Chat/Commands/Level0.cpp b/src/server/game/Chat/Commands/Level0.cpp index ad15cc99de9..338ad49463e 100755 --- a/src/server/game/Chat/Commands/Level0.cpp +++ b/src/server/game/Chat/Commands/Level0.cpp @@ -54,7 +54,7 @@ bool ChatHandler::HandleCommandsCommand(const char* /*args*/) bool ChatHandler::HandleStartCommand(const char* /*args*/) { - Player *chr = m_session->GetPlayer(); + Player* chr = m_session->GetPlayer(); if (chr->isInFlight()) { @@ -131,7 +131,7 @@ bool ChatHandler::HandleSaveCommand(const char* /*args*/) // save GM account without delay and output message if (!AccountMgr::IsPlayerAccount(m_session->GetSecurity())) { - if (Player *target = getSelectedPlayer()) + if (Player* target = getSelectedPlayer()) target->SaveToDB(); else player->SaveToDB(); diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp index 7a742765b0f..07b5cadd118 100755 --- a/src/server/game/Chat/Commands/Level1.cpp +++ b/src/server/game/Chat/Commands/Level1.cpp @@ -311,14 +311,14 @@ bool ChatHandler::HandleAppearCommand(const char* args) // if the player or the player's group is bound to another instance // the player will not be bound to another one - InstancePlayerBind *pBind = _player->GetBoundInstance(target->GetMapId(), target->GetDifficulty(cMap->IsRaid())); + InstancePlayerBind* pBind = _player->GetBoundInstance(target->GetMapId(), target->GetDifficulty(cMap->IsRaid())); if (!pBind) { Group* group = _player->GetGroup(); // if no bind exists, create a solo bind - InstanceGroupBind *gBind = group ? group->GetBoundInstance(target) : NULL; // if no bind exists, create a solo bind + InstanceGroupBind* gBind = group ? group->GetBoundInstance(target) : NULL; // if no bind exists, create a solo bind if (!gBind) - if (InstanceSave *save = sInstanceSaveMgr->GetInstanceSave(target->GetInstanceId())) + if (InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(target->GetInstanceId())) _player->BindToInstance(save, !save->CanReset()); } @@ -421,7 +421,7 @@ bool ChatHandler::HandleTaxiCheatCommand(const char* args) std::string argstr = (char*)args; - Player *chr = getSelectedPlayer(); + Player* chr = getSelectedPlayer(); if (!chr) { chr=m_session->GetPlayer(); @@ -476,7 +476,7 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args) // Search in AreaTable.dbc for (uint32 areaflag = 0; areaflag < sAreaStore.GetNumRows (); ++areaflag) { - AreaTableEntry const *areaEntry = sAreaStore.LookupEntry (areaflag); + AreaTableEntry const* areaEntry = sAreaStore.LookupEntry (areaflag); if (areaEntry) { int loc = GetSessionDbcLocale (); @@ -686,7 +686,7 @@ bool ChatHandler::HandleGroupSummonCommand(const char* args) if (HasLowerSecurity(target, 0)) return false; - Group *grp = target->GetGroup(); + Group* grp = target->GetGroup(); std::string nameLink = GetNameLink(target); @@ -711,9 +711,9 @@ bool ChatHandler::HandleGroupSummonCommand(const char* args) return false; } - for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *pl = itr->getSource(); + Player* pl = itr->getSource(); if (!pl || pl == m_session->GetPlayer() || !pl->GetSession()) continue; diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp index c03433e93b2..2055952a233 100755 --- a/src/server/game/Chat/Commands/Level2.cpp +++ b/src/server/game/Chat/Commands/Level2.cpp @@ -298,7 +298,7 @@ bool ChatHandler::HandlePInfoCommand(const char* args) if (!result) return false; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); total_player_time = fields[0].GetUInt32(); level = fields[1].GetUInt32(); money = fields[2].GetUInt32(); @@ -352,7 +352,7 @@ bool ChatHandler::HandlePInfoCommand(const char* args) if (QueryResult result = LoginDatabase.PQuery("SELECT unbandate, bandate = unbandate, bannedby, banreason FROM account_banned " "WHERE id = '%u' AND active ORDER BY bandate ASC LIMIT 1", accId)) { - Field * fields = result->Fetch(); + Field* fields = result->Fetch(); banTime = fields[1].GetBool() ? 0 : fields[0].GetUInt64(); bannedby = fields[2].GetString(); banreason = fields[3].GetString(); @@ -360,7 +360,7 @@ bool ChatHandler::HandlePInfoCommand(const char* args) else if (QueryResult result = CharacterDatabase.PQuery("SELECT unbandate, bandate = unbandate, bannedby, banreason FROM character_banned " "WHERE guid = '%u' AND active ORDER BY bandate ASC LIMIT 1", GUID_LOPART(target_guid))) { - Field * fields = result->Fetch(); + Field* fields = result->Fetch(); banTime = fields[1].GetBool() ? 0 : fields[0].GetUInt64(); bannedby = fields[2].GetString(); banreason = fields[3].GetString(); @@ -563,7 +563,7 @@ bool ChatHandler::HandleCharacterReputationCommand(const char* args) for (FactionStateList::const_iterator itr = targetFSL.begin(); itr != targetFSL.end(); ++itr) { const FactionState& faction = itr->second; - FactionEntry const *factionEntry = sFactionStore.LookupEntry(faction.ID); + FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction.ID); char const* factionName = factionEntry ? factionEntry->name[loc] : "#Not found#"; ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry); std::string rankName = GetTrinityString(ReputationRankStrIndex[rank]); @@ -834,7 +834,7 @@ bool ChatHandler::HandleWaterwalkCommand(const char* args) bool ChatHandler::HandleCreatePetCommand(const char* /*args*/) { Player* player = m_session->GetPlayer(); - Creature *creatureTarget = getSelectedCreature(); + Creature* creatureTarget = getSelectedCreature(); if (!creatureTarget || creatureTarget->isPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER) { @@ -912,8 +912,8 @@ bool ChatHandler::HandlePetLearnCommand(const char* args) if (!*args) return false; - Player *plr = m_session->GetPlayer(); - Pet *pet = plr->GetPet(); + Player* plr = m_session->GetPlayer(); + Pet* pet = plr->GetPet(); if (!pet) { @@ -955,8 +955,8 @@ bool ChatHandler::HandlePetUnlearnCommand(const char *args) if (!*args) return false; - Player *plr = m_session->GetPlayer(); - Pet *pet = plr->GetPet(); + Player* plr = m_session->GetPlayer(); + Pet* pet = plr->GetPet(); if (!pet) { @@ -1001,7 +1001,7 @@ bool ChatHandler::HandleLookupTitleCommand(const char* args) // Search in CharTitles.dbc for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); id++) { - CharTitlesEntry const *titleInfo = sCharTitlesStore.LookupEntry(id); + CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id); if (titleInfo) { int loc = GetSessionDbcLocale(); @@ -1074,7 +1074,7 @@ bool ChatHandler::HandleCharacterTitlesCommand(const char* args) // Search in CharTitles.dbc for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); id++) { - CharTitlesEntry const *titleInfo = sCharTitlesStore.LookupEntry(id); + CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id); if (titleInfo && target->HasTitle(titleInfo)) { std::string name = titleInfo->name[loc]; diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp index 334911be09d..91c25a49606 100755 --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -263,7 +263,7 @@ bool ChatHandler::HandleAddItemCommand(const char *args) sLog->outDetail(GetTrinityString(LANG_ADDITEM), itemId, count); - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(itemId); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemId); if (!pProto) { PSendSysMessage(LANG_COMMAND_ITEMIDINVALID, itemId); @@ -435,7 +435,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 item_guid = fields[0].GetUInt32(); uint32 item_bag = fields[1].GetUInt32(); uint32 item_slot = fields[2].GetUInt32(); @@ -490,7 +490,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 item_guid = fields[0].GetUInt32(); uint32 item_s = fields[1].GetUInt32(); uint32 item_r = fields[2].GetUInt32(); @@ -535,7 +535,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 item_guid = fields[0].GetUInt32(); uint32 owner = fields[1].GetUInt32(); uint32 owner_acc = fields[2].GetUInt32(); @@ -566,7 +566,7 @@ bool ChatHandler::HandleListItemCommand(const char *args) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 item_guid = fields[0].GetUInt32(); uint32 guild_guid = fields[1].GetUInt32(); std::string guild_name = fields[2].GetString(); @@ -649,7 +649,7 @@ bool ChatHandler::HandleListObjectCommand(const char *args) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); float x = fields[1].GetFloat(); float y = fields[2].GetFloat(); @@ -721,7 +721,7 @@ bool ChatHandler::HandleListCreatureCommand(const char *args) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); float x = fields[1].GetFloat(); float y = fields[2].GetFloat(); @@ -765,7 +765,7 @@ bool ChatHandler::HandleLookupItemCommand(const char *args) if (loc_idx >= 0) { uint8 uloc_idx = uint8(loc_idx); - if (ItemLocale const *il = sObjectMgr->GetItemLocale(itr->second.ItemId)) + if (ItemLocale const* il = sObjectMgr->GetItemLocale(itr->second.ItemId)) { if (il->Name.size() > uloc_idx && !il->Name[uloc_idx].empty()) { @@ -842,7 +842,7 @@ bool ChatHandler::HandleLookupItemSetCommand(const char *args) // Search in ItemSet.dbc for (uint32 id = 0; id < sItemSetStore.GetNumRows(); id++) { - ItemSetEntry const *set = sItemSetStore.LookupEntry(id); + ItemSetEntry const* set = sItemSetStore.LookupEntry(id); if (set) { int loc = GetSessionDbcLocale(); @@ -915,7 +915,7 @@ bool ChatHandler::HandleLookupSkillCommand(const char *args) // Search in SkillLine.dbc for (uint32 id = 0; id < sSkillLineStore.GetNumRows(); id++) { - SkillLineEntry const *skillInfo = sSkillLineStore.LookupEntry(id); + SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id); if (skillInfo) { int loc = GetSessionDbcLocale(); @@ -1002,7 +1002,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char *args) // Search in Spell.dbc for (uint32 id = 0; id < sSpellMgr->GetSpellInfoStoreSize(); id++) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id); if (spellInfo) { int loc = GetSessionDbcLocale(); @@ -1119,7 +1119,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char *args) if (loc_idx >= 0) { uint8 uloc_idx = uint8(loc_idx); - if (QuestLocale const *il = sObjectMgr->GetQuestLocale(qinfo->GetQuestId())) + if (QuestLocale const* il = sObjectMgr->GetQuestLocale(qinfo->GetQuestId())) { if (il->Title.size() > uloc_idx && !il->Title[uloc_idx].empty()) { @@ -1232,7 +1232,7 @@ bool ChatHandler::HandleLookupCreatureCommand(const char *args) { uint32 id = itr->second.Entry; uint8 localeIndex = GetSessionDbLocaleIndex(); - if (CreatureLocale const *cl = sObjectMgr->GetCreatureLocale(id)) + if (CreatureLocale const* cl = sObjectMgr->GetCreatureLocale(id)) { if (cl->Name.size() > localeIndex && !cl->Name[localeIndex].empty ()) { @@ -1309,7 +1309,7 @@ bool ChatHandler::HandleLookupObjectCommand(const char *args) for (GameObjectTemplateContainer::const_iterator itr = gotc->begin(); itr != gotc->end(); ++itr) { uint8 localeIndex = GetSessionDbLocaleIndex(); - if (GameObjectLocale const *gl = sObjectMgr->GetGameObjectLocale(itr->second.entry)) + if (GameObjectLocale const* gl = sObjectMgr->GetGameObjectLocale(itr->second.entry)) { if (gl->Name.size() > localeIndex && !gl->Name[localeIndex].empty()) { @@ -1370,7 +1370,7 @@ bool ChatHandler::HandleLookupFactionCommand(const char *args) return false; // Can be NULL at console call - Player *target = getSelectedPlayer (); + Player* target = getSelectedPlayer (); std::string namepart = args; std::wstring wnamepart; @@ -1387,7 +1387,7 @@ bool ChatHandler::HandleLookupFactionCommand(const char *args) for (uint32 id = 0; id < sFactionStore.GetNumRows(); ++id) { - FactionEntry const *factionEntry = sFactionStore.LookupEntry (id); + FactionEntry const* factionEntry = sFactionStore.LookupEntry (id); if (factionEntry) { FactionState const* repState = target ? target->GetReputationMgr().GetState(factionEntry) : NULL; @@ -1487,7 +1487,7 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(const char * args) // Search in TaxiNodes.dbc for (uint32 id = 0; id < sTaxiNodesStore.GetNumRows(); id++) { - TaxiNodesEntry const *nodeEntry = sTaxiNodesStore.LookupEntry(id); + TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(id); if (nodeEntry) { int loc = GetSessionDbcLocale(); @@ -1957,7 +1957,7 @@ bool ChatHandler::HandleAuraCommand(const char *args) // number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form uint32 spellID = extractSpellIdFromLink((char*)args); - if (SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellID)) + if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID)) Aura::TryRefreshStackOrCreate(spellInfo, MAX_EFFECT_MASK, target, target); return true; @@ -2027,7 +2027,7 @@ bool ChatHandler::HandleLinkGraveCommand(const char *args) uint32 zoneId = player->GetZoneId(); - AreaTableEntry const *areaEntry = GetAreaEntryByAreaID(zoneId); + AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId); if (!areaEntry || areaEntry->zone !=0) { PSendSysMessage(LANG_COMMAND_GRAVEYARDWRONGZONE, g_id, zoneId); @@ -2116,7 +2116,7 @@ bool ChatHandler::HandleExploreCheatCommand(const char *args) int flag = atoi((char*)args); - Player *chr = getSelectedPlayer(); + Player* chr = getSelectedPlayer(); if (chr == NULL) { SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -2282,7 +2282,7 @@ bool ChatHandler::HandleShowAreaCommand(const char *args) if (!*args) return false; - Player *chr = getSelectedPlayer(); + Player* chr = getSelectedPlayer(); if (chr == NULL) { SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -2313,7 +2313,7 @@ bool ChatHandler::HandleHideAreaCommand(const char *args) if (!*args) return false; - Player *chr = getSelectedPlayer(); + Player* chr = getSelectedPlayer(); if (chr == NULL) { SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -2390,7 +2390,7 @@ bool ChatHandler::HandleChangeWeather(const char *args) bool ChatHandler::HandleListAurasCommand (const char * /*args*/) { - Unit *unit = getSelectedUnit(); + Unit* unit = getSelectedUnit(); if (!unit) { SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE); @@ -3177,7 +3177,7 @@ bool ChatHandler::HandleBanInfoIPCommand(const char *args) return true; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); bool permanent = !fields[6].GetUInt64(); PSendSysMessage(LANG_BANINFO_IPENTRY, fields[0].GetCString(), fields[1].GetCString(), permanent ? GetTrinityString(LANG_BANINFO_NEVER) : fields[2].GetCString(), @@ -3332,7 +3332,7 @@ bool ChatHandler::HandleBanListHelper(QueryResult result) do { SendSysMessage("-------------------------------------------------------------------------------"); - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 account_id = fields[0].GetUInt32 (); std::string account_name; @@ -3348,7 +3348,7 @@ bool ChatHandler::HandleBanListHelper(QueryResult result) QueryResult banInfo = LoginDatabase.PQuery("SELECT bandate, unbandate, bannedby, banreason FROM account_banned WHERE id = %u ORDER BY unbandate", account_id); if (banInfo) { - Field *fields2 = banInfo->Fetch(); + Field* fields2 = banInfo->Fetch(); do { time_t t_ban = fields2[0].GetUInt64(); @@ -3425,7 +3425,7 @@ bool ChatHandler::HandleBanListIPCommand(const char *args) do { SendSysMessage("-------------------------------------------------------------------------------"); - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); time_t t_ban = fields[1].GetUInt64(); tm* aTm_ban = localtime(&t_ban); if (fields[1].GetUInt64() == fields[2].GetUInt64()) @@ -4091,7 +4091,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(const char* /*args*/) Player::BoundInstancesMap &binds = player->GetBoundInstances(Difficulty(i)); for (Player::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr) { - InstanceSave *save = itr->second.save; + InstanceSave* save = itr->second.save; std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); PSendSysMessage("map: %d inst: %d perm: %s diff: %d canReset: %s TTR: %s", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str()); counter++; @@ -4107,7 +4107,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(const char* /*args*/) Group::BoundInstancesMap &binds = group->GetBoundInstances(Difficulty(i)); for (Group::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr) { - InstanceSave *save = itr->second.save; + InstanceSave* save = itr->second.save; std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); PSendSysMessage("map: %d inst: %d perm: %s diff: %d canReset: %s TTR: %s", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str()); counter++; @@ -4148,7 +4148,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(const char *args) Player::BoundInstancesMap &binds = player->GetBoundInstances(Difficulty(i)); for (Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end();) { - InstanceSave *save = itr->second.save; + InstanceSave* save = itr->second.save; if (itr->first != player->GetMapId() && (!MapId || MapId == itr->first) && (diff == -1 || diff == save->GetDifficulty())) { std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); @@ -4391,7 +4391,7 @@ bool ChatHandler::HandleSendMoneyCommand(const char *args) bool ChatHandler::HandleSendMessageCommand(const char *args) { ///- Find the player - Player *rPlayer; + Player* rPlayer; if (!extractPlayerTarget((char*)args, &rPlayer)) return false; @@ -4435,7 +4435,7 @@ bool ChatHandler::HandleChannelSetOwnership(const char *args) return false; Player* player = m_session->GetPlayer(); - Channel *chn = NULL; + Channel* chn = NULL; if (ChannelMgr* cMgr = channelMgr(player->GetTeam())) chn = cMgr->GetChannel(channel, player); @@ -4540,7 +4540,7 @@ bool ChatHandler::HandleFreezeCommand(const char *args) //if player class = hunter || warlock remove pet if alive if ((player->getClass() == CLASS_HUNTER) || (player->getClass() == CLASS_WARLOCK)) { - if (Pet *pet = player->GetPet()) + if (Pet* pet = player->GetPet()) { pet->SavePetToDB(PET_SAVE_AS_CURRENT); // not let dismiss dead pet @@ -4550,7 +4550,7 @@ bool ChatHandler::HandleFreezeCommand(const char *args) } //m_session->GetPlayer()->CastSpell(player, spellID, false); - if (SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(9454)) + if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(9454)) Aura::TryRefreshStackOrCreate(spellInfo, MAX_EFFECT_MASK, player, player); //save player @@ -4606,7 +4606,7 @@ bool ChatHandler::HandleUnFreezeCommand(const char *args) return true; } //if player found: delete his freeze aura - Field *fields=result->Fetch(); + Field* fields=result->Fetch(); uint64 pguid = fields[0].GetUInt64(); CharacterDatabase.PQuery("DELETE FROM character_aura WHERE character_aura.spell = 9454 AND character_aura.guid = '%u'", pguid); @@ -4638,7 +4638,7 @@ bool ChatHandler::HandleListFreezeCommand(const char * /*args*/) //Output of the results do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); std::string fplayers = fields[0].GetString(); PSendSysMessage(LANG_COMMAND_FROZEN_PLAYERS, fplayers.c_str()); } while (result->NextRow()); @@ -4693,7 +4693,7 @@ bool ChatHandler::HandleGroupRemoveCommand(const char *args) bool ChatHandler::HandlePossessCommand(const char * /*args*/) { - Unit *pUnit = getSelectedUnit(); + Unit* pUnit = getSelectedUnit(); if (!pUnit) return false; @@ -4703,7 +4703,7 @@ bool ChatHandler::HandlePossessCommand(const char * /*args*/) bool ChatHandler::HandleUnPossessCommand(const char * /*args*/) { - Unit *pUnit = getSelectedUnit(); + Unit* pUnit = getSelectedUnit(); if (!pUnit) pUnit = m_session->GetPlayer(); @@ -4714,7 +4714,7 @@ bool ChatHandler::HandleUnPossessCommand(const char * /*args*/) bool ChatHandler::HandleBindSightCommand(const char * /*args*/) { - Unit *pUnit = getSelectedUnit(); + Unit* pUnit = getSelectedUnit(); if (!pUnit) return false; diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp index 47e9a1d2508..95ecac414cc 100755 --- a/src/server/game/Combat/HostileRefManager.cpp +++ b/src/server/game/Combat/HostileRefManager.cpp @@ -142,7 +142,7 @@ void HostileRefManager::deleteReferencesForFaction(uint32 faction) //================================================= // delete one reference, defined by Unit -void HostileRefManager::deleteReference(Unit *creature) +void HostileRefManager::deleteReference(Unit* creature) { HostileReference* ref = getFirst(); while (ref) @@ -161,7 +161,7 @@ void HostileRefManager::deleteReference(Unit *creature) //================================================= // set state for one reference, defined by Unit -void HostileRefManager::setOnlineOfflineState(Unit *creature, bool isOnline) +void HostileRefManager::setOnlineOfflineState(Unit* creature, bool isOnline) { HostileReference* ref = getFirst(); while (ref) diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index 858ef057baf..58d46dda62f 100755 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -283,7 +283,7 @@ HostileReference* ThreatContainer::addThreat(Unit* victim, float threat) //============================================================ -void ThreatContainer::modifyThreatPercent(Unit *victim, int32 percent) +void ThreatContainer::modifyThreatPercent(Unit* victim, int32 percent) { if (HostileReference* ref = getReferenceByTarget(victim)) ref->addThreatPercent(percent); @@ -394,7 +394,7 @@ void ThreatManager::clearReferences() //============================================================ -void ThreatManager::addThreat(Unit* victim, float threat, SpellSchoolMask schoolMask, SpellInfo const *threatSpell) +void ThreatManager::addThreat(Unit* victim, float threat, SpellSchoolMask schoolMask, SpellInfo const* threatSpell) { if (!ThreatCalcHelper::isValidProcess(victim, getOwner(), threatSpell)) return; @@ -460,7 +460,7 @@ Unit* ThreatManager::getHostilTarget() //============================================================ -float ThreatManager::getThreat(Unit *victim, bool alsoSearchOfflineList) +float ThreatManager::getThreat(Unit* victim, bool alsoSearchOfflineList) { float threat = 0.0f; HostileReference* ref = iThreatContainer.getReferenceByTarget(victim); @@ -485,7 +485,7 @@ void ThreatManager::tauntApply(Unit* taunter) //============================================================ -void ThreatManager::tauntFadeOut(Unit *taunter) +void ThreatManager::tauntFadeOut(Unit* taunter) { HostileReference* ref = iThreatContainer.getReferenceByTarget(taunter); if (ref) diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h index 7b2f51f3aa6..261f9cd93ab 100755 --- a/src/server/game/Combat/ThreatManager.h +++ b/src/server/game/Combat/ThreatManager.h @@ -160,7 +160,7 @@ class ThreatContainer HostileReference* addThreat(Unit* victim, float threat); - void modifyThreatPercent(Unit *victim, int32 percent); + void modifyThreatPercent(Unit* victim, int32 percent); HostileReference* selectNextVictim(Creature* attacker, HostileReference* currentVictim); @@ -184,7 +184,7 @@ class ThreatManager public: friend class HostileReference; - explicit ThreatManager(Unit *owner); + explicit ThreatManager(Unit* owner); ~ThreatManager() { clearReferences(); } @@ -194,9 +194,9 @@ class ThreatManager void doAddThreat(Unit* victim, float threat); - void modifyThreatPercent(Unit *victim, int32 percent); + void modifyThreatPercent(Unit* victim, int32 percent); - float getThreat(Unit *victim, bool alsoSearchOfflineList = false); + float getThreat(Unit* victim, bool alsoSearchOfflineList = false); bool isThreatListEmpty() { return iThreatContainer.empty(); } @@ -211,7 +211,7 @@ class ThreatManager Unit* getHostilTarget(); void tauntApply(Unit* taunter); - void tauntFadeOut(Unit *taunter); + void tauntFadeOut(Unit* taunter); void setCurrentVictim(HostileReference* hostileRef); @@ -246,7 +246,7 @@ class ThreatManager ThreatContainer& getOnlineContainer() { return iThreatContainer; } ThreatContainer& getOfflineContainer() { return iThreatOfflineContainer; } private: - void _addThreat(Unit *victim, float threat); + void _addThreat(Unit* victim, float threat); HostileReference* iCurrentVictim; Unit* iOwner; diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index e72a8cba67b..7e3b19336ee 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -113,7 +113,7 @@ bool Condition::Meets(Player* player, Unit* invoker) break; case CONDITION_INSTANCE_DATA: { - Map *map = player->GetMap(); + Map* map = player->GetMap(); if (map && map->IsDungeon() && ((InstanceMap*)map)->GetInstanceScript()) condMeets = ((InstanceMap*)map)->GetInstanceScript()->GetData(mConditionValue1) == mConditionValue2; break; @@ -392,7 +392,7 @@ void ConditionMgr::LoadConditions(bool isReload) do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); Condition* cond = new Condition(); int32 iSourceTypeOrReferenceId = fields[0].GetInt32(); @@ -933,7 +933,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) return false; } - ItemTemplate const *pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry); + ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->mSourceEntry); if (!pItemProto) { sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `item_tamplate`, ignoring.", cond->mSourceEntry); @@ -1041,7 +1041,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_ITEM: { - ItemTemplate const *proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1); + ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1); if (!proto) { sLog->outErrorDb("Item condition has non existing item (%u), skipped", cond->mConditionValue1); @@ -1057,7 +1057,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_ITEM_EQUIPPED: { - ItemTemplate const *proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1); + ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1); if (!proto) { sLog->outErrorDb("ItemEquipped condition has non existing item (%u), skipped", cond->mConditionValue1); @@ -1111,7 +1111,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_SKILL: { - SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(cond->mConditionValue1); + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(cond->mConditionValue1); if (!pSkill) { sLog->outErrorDb("Skill condition specifies non-existing skill (%u), skipped", cond->mConditionValue1); @@ -1323,7 +1323,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) } case CONDITION_NOITEM: { - ItemTemplate const *proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1); + ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->mConditionValue1); if (!proto) { sLog->outErrorDb("NoItem condition has non existing item (%u), skipped", cond->mConditionValue1); diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 85af0f6c1e2..e2506a36f63 100755 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -46,7 +46,7 @@ struct WMOAreaTableTripple int32 adtId; }; -typedef std::map<WMOAreaTableTripple, WMOAreaTableEntry const *> WMOAreaInfoByTripple; +typedef std::map<WMOAreaTableTripple, WMOAreaTableEntry const*> WMOAreaInfoByTripple; DBCStorage <AreaTableEntry> sAreaStore(AreaTableEntryfmt); DBCStorage <AreaGroupEntry> sAreaGroupStore(AreaGroupEntryfmt); @@ -397,7 +397,7 @@ void LoadDBCStores(const std::string& dataPath) for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) { - SkillLineAbilityEntry const *skillLine = sSkillLineAbilityStore.LookupEntry(j); + SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(j); if (!skillLine) continue; @@ -443,7 +443,7 @@ void LoadDBCStores(const std::string& dataPath) // Create Spelldifficulty searcher for (uint32 i = 0; i < sSpellDifficultyStore.GetNumRows(); ++i) { - SpellDifficultyEntry const *spellDiff = sSpellDifficultyStore.LookupEntry(i); + SpellDifficultyEntry const* spellDiff = sSpellDifficultyStore.LookupEntry(i); if (!spellDiff) continue; @@ -470,7 +470,7 @@ void LoadDBCStores(const std::string& dataPath) // create talent spells set for (unsigned int i = 0; i < sTalentStore.GetNumRows(); ++i) { - TalentEntry const *talentInfo = sTalentStore.LookupEntry(i); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(i); if (!talentInfo) continue; for (int j = 0; j < MAX_TALENT_RANK; j++) if (talentInfo->RankID[j]) @@ -484,7 +484,7 @@ void LoadDBCStores(const std::string& dataPath) // now have all max ranks (and then bit amount used for store talent ranks in inspect) for (uint32 talentTabId = 1; talentTabId < sTalentTabStore.GetNumRows(); ++talentTabId) { - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentTabId); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentTabId); if (!talentTabInfo) continue; @@ -649,7 +649,7 @@ char* GetPetName(uint32 petfamily, uint32 dbclang) { if (!petfamily) return NULL; - CreatureFamilyEntry const *pet_family = sCreatureFamilyStore.LookupEntry(petfamily); + CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(petfamily); if (!pet_family) return NULL; return pet_family->Name[dbclang]?pet_family->Name[dbclang]:NULL; diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 348388b72a4..855cd46735a 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -228,7 +228,7 @@ void LFGMgr::Update(uint32 diff) SetState(guid, LFG_STATE_PROPOSAL); if (Player* plr = ObjectAccessor::FindPlayer(itPlayers->first)) { - Group *grp = plr->GetGroup(); + Group* grp = plr->GetGroup(); if (grp) { uint64 gguid = grp->GetGUID(); diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index 4d62cfbb43d..c3c6cd86548 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -37,9 +37,9 @@ void LFGScripts::OnAddMember(Group* group, uint64 guid) sLog->outDebug(LOG_FILTER_LFG, "LFGScripts::OnAddMember [" UI64FMTD "]: added [" UI64FMTD "]", gguid, guid); LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_CLEAR_LOCK_LIST); - for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { - if (Player *plrg = itr->getSource()) + if (Player* plrg = itr->getSource()) { plrg->GetSession()->SendLfgUpdatePlayer(updateData); plrg->GetSession()->SendLfgUpdateParty(updateData); @@ -51,7 +51,7 @@ void LFGScripts::OnAddMember(Group* group, uint64 guid) sLFGMgr->Leave(NULL, group); if (sLFGMgr->GetState(guid) == LFG_STATE_QUEUED) - if (Player *plr = ObjectAccessor::FindPlayer(guid)) + if (Player* plr = ObjectAccessor::FindPlayer(guid)) sLFGMgr->Leave(plr); } @@ -82,7 +82,7 @@ void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod& method, } sLFGMgr->ClearState(guid); - if (Player *plr = ObjectAccessor::FindPlayer(guid)) + if (Player* plr = ObjectAccessor::FindPlayer(guid)) { /* if (method == GROUP_REMOVEMETHOD_LEAVE) @@ -116,7 +116,7 @@ void LFGScripts::OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLe return; sLog->outDebug(LOG_FILTER_LFG, "LFGScripts::OnChangeLeader [" UI64FMTD "]: old [" UI64FMTD "] new [" UI64FMTD "]", gguid, newLeaderGuid, oldLeaderGuid); - Player *plr = ObjectAccessor::FindPlayer(newLeaderGuid); + Player* plr = ObjectAccessor::FindPlayer(newLeaderGuid); LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_LEADER); if (plr) diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp index 5fdf8709852..cdd5d61b1c9 100755 --- a/src/server/game/Entities/Corpse/Corpse.cpp +++ b/src/server/game/Entities/Corpse/Corpse.cpp @@ -66,14 +66,14 @@ void Corpse::RemoveFromWorld() Object::RemoveFromWorld(); } -bool Corpse::Create(uint32 guidlow, Map *map) +bool Corpse::Create(uint32 guidlow, Map* map) { SetMap(map); Object::_Create(guidlow, 0, HIGHGUID_CORPSE); return true; } -bool Corpse::Create(uint32 guidlow, Player *owner) +bool Corpse::Create(uint32 guidlow, Player* owner) { ASSERT(owner); @@ -162,7 +162,7 @@ void Corpse::DeleteFromDB(SQLTransaction& trans) trans->Append(stmt); } -bool Corpse::LoadFromDB(uint32 guid, Field *fields) +bool Corpse::LoadFromDB(uint32 guid, Field* fields) { uint32 ownerGuid = fields[17].GetUInt32(); // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h index 2c092e8b207..bd68eb688f5 100755 --- a/src/server/game/Entities/Corpse/Corpse.h +++ b/src/server/game/Entities/Corpse/Corpse.h @@ -55,11 +55,11 @@ class Corpse : public WorldObject, public GridObject<Corpse> void AddToWorld(); void RemoveFromWorld(); - bool Create(uint32 guidlow, Map *map); - bool Create(uint32 guidlow, Player *owner); + bool Create(uint32 guidlow, Map* map); + bool Create(uint32 guidlow, Player* owner); void SaveToDB(); - bool LoadFromDB(uint32 guid, Field *fields); + bool LoadFromDB(uint32 guid, Field* fields); void DeleteBonesFromWorld(); void DeleteFromDB(SQLTransaction& trans); diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index b099fb5faa7..2489214dce3 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -253,9 +253,9 @@ void Creature::RemoveCorpse(bool setSpawnTime) /** * change the entry of creature until respawn */ -bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data) +bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData* data) { - CreatureTemplate const *normalInfo = sObjectMgr->GetCreatureTemplate(Entry); + CreatureTemplate const* normalInfo = sObjectMgr->GetCreatureTemplate(Entry); if (!normalInfo) { sLog->outErrorDb("Creature::InitEntry creature entry %u does not exist.", Entry); @@ -263,7 +263,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data } // get difficulty 1 mode entry - CreatureTemplate const *cinfo = normalInfo; + CreatureTemplate const* cinfo = normalInfo; for (uint8 diff = uint8(GetMap()->GetSpawnMode()); diff > 0;) { // we already have valid Map pointer for current creature! @@ -301,7 +301,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data } uint32 displayID = sObjectMgr->ChooseDisplayId(0, GetCreatureInfo(), data); - CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID); + CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID); if (!minfo) // Cancel load if no model defined { sLog->outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", Entry); @@ -343,7 +343,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data return true; } -bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data) +bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData* data) { if (!InitEntry(Entry, team, data)) return false; @@ -691,7 +691,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai) return false; } - UnitAI *oldAI = i_AI; + UnitAI* oldAI = i_AI; Motion_Initialize(); @@ -720,13 +720,13 @@ void Creature::Motion_Initialize() i_motionMaster.Initialize(); } -bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData *data) +bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData* data) { ASSERT(map); SetMap(map); SetPhaseMask(phaseMask, false); - CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(Entry); + CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(Entry); if (!cinfo) { sLog->outErrorDb("Creature::Create(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry); @@ -766,7 +766,7 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, LoadCreaturesAddon(); uint32 displayID = GetNativeDisplayId(); - CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID); + CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID); if (minfo && !isTotem()) // Cancel load if no model defined or if totem { SetDisplayId(displayID); @@ -953,21 +953,21 @@ void Creature::AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint3 SendMonsterMove(x, y, z, time); } -Player *Creature::GetLootRecipient() const +Player* Creature::GetLootRecipient() const { if (!m_lootRecipient) return NULL; return ObjectAccessor::FindPlayer(m_lootRecipient); } -Group *Creature::GetLootRecipientGroup() const +Group* Creature::GetLootRecipientGroup() const { if (!m_lootRecipientGroup) return NULL; return sGroupMgr->GetGroupByGUID(m_lootRecipientGroup); } -void Creature::SetLootRecipient(Unit *unit) +void Creature::SetLootRecipient(Unit* unit) { // set the player whose group should receive the right // to loot the creature after it dies @@ -1012,7 +1012,7 @@ void Creature::SaveToDB() { // this should only be used when the creature has already been loaded // preferably after adding to map, because mapid may not be valid otherwise - CreatureData const *data = sObjectMgr->GetCreatureData(m_DBTableGuid); + CreatureData const* data = sObjectMgr->GetCreatureData(m_DBTableGuid); if (!data) { sLog->outError("Creature::SaveToDB failed, cannot get creature data!"); @@ -1035,7 +1035,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) uint32 dynamicflags = GetUInt32Value(UNIT_DYNAMIC_FLAGS); // check if it's a custom model and if not, use 0 for displayId - CreatureTemplate const *cinfo = GetCreatureInfo(); + CreatureTemplate const* cinfo = GetCreatureInfo(); if (cinfo) { if (displayId == cinfo->Modelid1 || displayId == cinfo->Modelid2 || @@ -1109,7 +1109,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) WorldDatabase.CommitTransaction(trans); } -void Creature::SelectLevel(const CreatureTemplate *cinfo) +void Creature::SelectLevel(const CreatureTemplate* cinfo) { uint32 rank = isPet()? 0 : cinfo->rank; @@ -1214,7 +1214,7 @@ float Creature::GetSpellDamageMod(int32 Rank) } } -bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint32 team, const CreatureData *data) +bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint32 team, const CreatureData* data) { SetZoneScript(); if (m_zoneScript && data) @@ -1224,7 +1224,7 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint3 return false; } - CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(Entry); + CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(Entry); if (!cinfo) { sLog->outErrorDb("Creature::CreateFromProto(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry); @@ -1247,7 +1247,7 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint3 return true; } -bool Creature::LoadFromDB(uint32 guid, Map *map) +bool Creature::LoadFromDB(uint32 guid, Map* map) { CreatureData const* data = sObjectMgr->GetCreatureData(guid); @@ -1332,7 +1332,7 @@ void Creature::LoadEquipment(uint32 equip_entry, bool force) return; } - EquipmentInfo const *einfo = sObjectMgr->GetEquipmentInfo(equip_entry); + EquipmentInfo const* einfo = sObjectMgr->GetEquipmentInfo(equip_entry); if (!einfo) return; @@ -1524,7 +1524,7 @@ void Creature::setDeathState(DeathState s) SetFullHealth(); SetLootRecipient(NULL); ResetPlayerDamageReq(); - CreatureTemplate const *cinfo = GetCreatureInfo(); + CreatureTemplate const* cinfo = GetCreatureInfo(); AddUnitMovementFlag(MOVEMENTFLAG_WALKING); if (GetCreatureInfo()->InhabitType & INHABIT_AIR) AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_FLYING); @@ -1586,13 +1586,13 @@ void Creature::Respawn(bool force) if (m_originalEntry != GetEntry()) UpdateEntry(m_originalEntry); - CreatureTemplate const *cinfo = GetCreatureInfo(); + CreatureTemplate const* cinfo = GetCreatureInfo(); SelectLevel(cinfo); setDeathState(JUST_ALIVED); uint32 displayID = GetNativeDisplayId(); - CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID); + CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID); if (minfo) // Cancel load if no model defined { SetDisplayId(displayID); @@ -1621,7 +1621,7 @@ void Creature::ForcedDespawn(uint32 timeMSToDespawn) { if (timeMSToDespawn) { - ForcedDespawnDelayEvent *pEvent = new ForcedDespawnDelayEvent(*this); + ForcedDespawnDelayEvent* pEvent = new ForcedDespawnDelayEvent(*this); m_Events.AddEvent(pEvent, m_Events.CalculateTime(timeMSToDespawn)); return; @@ -1663,7 +1663,7 @@ bool Creature::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) return Unit::IsImmunedToSpellEffect(spellInfo, index); } -SpellInfo const *Creature::reachWithSpellAttack(Unit *pVictim) +SpellInfo const* Creature::reachWithSpellAttack(Unit* pVictim) { if (!pVictim) return NULL; @@ -1672,7 +1672,7 @@ SpellInfo const *Creature::reachWithSpellAttack(Unit *pVictim) { if (!m_spells[i]) continue; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]); if (!spellInfo) { sLog->outError("WORLD: unknown spell id %i", m_spells[i]); @@ -1710,7 +1710,7 @@ SpellInfo const *Creature::reachWithSpellAttack(Unit *pVictim) return NULL; } -SpellInfo const *Creature::reachWithSpellCure(Unit *pVictim) +SpellInfo const* Creature::reachWithSpellCure(Unit* pVictim) { if (!pVictim) return NULL; @@ -1719,7 +1719,7 @@ SpellInfo const *Creature::reachWithSpellCure(Unit *pVictim) { if (!m_spells[i]) continue; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]); if (!spellInfo) { sLog->outError("WORLD: unknown spell id %i", m_spells[i]); @@ -1864,7 +1864,7 @@ void Creature::CallAssistance() if (!assistList.empty()) { - AssistDelayEvent *e = new AssistDelayEvent(getVictim()->GetGUID(), *this); + AssistDelayEvent* e = new AssistDelayEvent(getVictim()->GetGUID(), *this); while (!assistList.empty()) { // Pushing guids because in delay can happen some creature gets despawned => invalid pointer @@ -1960,7 +1960,7 @@ bool Creature::_IsTargetAcceptable(const Unit* target) const return false; } - const Unit *myVictim = getAttackerForHelper(); + const Unit* myVictim = getAttackerForHelper(); const Unit* targetVictim = target->getAttackerForHelper(); // if I'm already fighting target, or I'm hostile towards the target, the target is acceptable @@ -1984,7 +1984,7 @@ void Creature::SaveRespawnTime() } // this should not be called by petAI or -bool Creature::canCreatureAttack(Unit const *pVictim, bool force) const +bool Creature::canCreatureAttack(Unit const* pVictim, bool force) const { if (!pVictim->IsInMap(this)) return false; @@ -2004,7 +2004,7 @@ bool Creature::canCreatureAttack(Unit const *pVictim, bool force) const //Use AttackDistance in distance check if threat radius is lower. This prevents creature bounce in and out of combat every update tick. float dist = std::max(GetAttackDistance(pVictim), sWorld->getFloatConfig(CONFIG_THREAT_RADIUS)) + m_CombatDistance; - if (Unit *unit = GetCharmerOrOwner()) + if (Unit* unit = GetCharmerOrOwner()) return pVictim->IsWithinDist(unit, dist); else return pVictim->IsInDist(&m_homePosition, dist); @@ -2025,7 +2025,7 @@ CreatureAddon const* Creature::GetCreatureAddon() const //creature_addon table bool Creature::LoadCreaturesAddon(bool reload) { - CreatureAddon const *cainfo = GetCreatureAddon(); + CreatureAddon const* cainfo = GetCreatureAddon(); if (!cainfo) return false; @@ -2072,7 +2072,7 @@ bool Creature::LoadCreaturesAddon(bool reload) { for (std::vector<uint32>::const_iterator itr = cainfo->auras.begin(); itr != cainfo->auras.end(); ++itr) { - SpellInfo const *AdditionalSpellInfo = sSpellMgr->GetSpellInfo(*itr); + SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(*itr); if (!AdditionalSpellInfo) { sLog->outErrorDb("Creature (GUID: %u Entry: %u) has wrong spell %u defined in `auras` field.", GetGUIDLow(), GetEntry(), *itr); @@ -2155,12 +2155,12 @@ void Creature::_AddCreatureCategoryCooldown(uint32 category, time_t apply_time) void Creature::AddCreatureSpellCooldown(uint32 spellid) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellid); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); if (!spellInfo) return; uint32 cooldown = spellInfo->GetRecoveryTime(); - if (Player *modOwner = GetSpellModOwner()) + if (Player* modOwner = GetSpellModOwner()) modOwner->ApplySpellMod(spellid, SPELLMOD_COOLDOWN, cooldown); if (cooldown) @@ -2172,7 +2172,7 @@ void Creature::AddCreatureSpellCooldown(uint32 spellid) bool Creature::HasCategoryCooldown(uint32 spell_id) const { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); if (!spellInfo) return false; @@ -2240,7 +2240,7 @@ void Creature::AllLootRemovedFromCorpse() return; float decayRate; - CreatureTemplate const *cinfo = GetCreatureInfo(); + CreatureTemplate const* cinfo = GetCreatureInfo(); decayRate = sWorld->getRate(RATE_CORPSE_DECAY_LOOTED); uint32 diff = uint32((m_corpseRemoveTime - now) * decayRate); @@ -2371,7 +2371,7 @@ const char* Creature::GetNameForLocaleIdx(LocaleConstant loc_idx) const if (loc_idx != DEFAULT_LOCALE) { uint8 uloc_idx = uint8(loc_idx); - CreatureLocale const *cl = sObjectMgr->GetCreatureLocale(GetEntry()); + CreatureLocale const* cl = sObjectMgr->GetCreatureLocale(GetEntry()); if (cl) { if (cl->Name.size() > uloc_idx && !cl->Name[uloc_idx].empty()) @@ -2401,6 +2401,6 @@ void Creature::FarTeleportTo(Map* map, float X, float Y, float Z, float O) bool Creature::IsDungeonBoss() const { - CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(GetEntry()); + CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(GetEntry()); return cinfo && (cinfo->flags_extra & CREATURE_FLAG_EXTRA_DUNGEON_BOSS); } diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 7ad0386dcae..19938b47bd6 100755 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -419,9 +419,9 @@ class Creature : public Unit, public GridObject<Creature> void DisappearAndDie(); - bool Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData *data = NULL); + bool Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData* data = NULL); bool LoadCreaturesAddon(bool reload = false); - void SelectLevel(const CreatureTemplate *cinfo); + void SelectLevel(const CreatureTemplate* cinfo); void LoadEquipment(uint32 equip_entry, bool force=false); uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; } @@ -457,7 +457,7 @@ class Creature : public Unit, public GridObject<Creature> bool isCanTrainingOf(Player* player, bool msg) const; bool isCanInteractWithBattleMaster(Player* player, bool msg) const; bool isCanTrainingAndResetTalentsOf(Player* pPlayer) const; - bool canCreatureAttack(Unit const *pVictim, bool force = true) const; + bool canCreatureAttack(Unit const* pVictim, bool force = true) const; bool IsImmunedToSpell(SpellInfo const* spellInfo); // redefine Unit::IsImmunedToSpell bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const; @@ -489,7 +489,7 @@ class Creature : public Unit, public GridObject<Creature> void Motion_Initialize(); void AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint32 MovementFlags, uint8 type); - CreatureAI * AI() const { return (CreatureAI*)i_AI; } + CreatureAI* AI() const { return (CreatureAI*)i_AI; } uint32 GetShieldBlockValue() const //dunno mob block value { @@ -526,8 +526,8 @@ class Creature : public Unit, public GridObject<Creature> TrainerSpellData const* GetTrainerSpells() const; - CreatureTemplate const *GetCreatureInfo() const { return m_creatureInfo; } - CreatureData const *GetCreatureData() const { return m_creatureData; } + CreatureTemplate const* GetCreatureInfo() const { return m_creatureInfo; } + CreatureData const* GetCreatureData() const { return m_creatureData; } CreatureAddon const* GetCreatureAddon() const; std::string GetAIName() const; @@ -546,7 +546,7 @@ class Creature : public Unit, public GridObject<Creature> void setDeathState(DeathState s); // override virtual Unit::setDeathState bool FallGround(); - bool LoadFromDB(uint32 guid, Map *map); + bool LoadFromDB(uint32 guid, Map* map); void SaveToDB(); // overriden in Pet virtual void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask); @@ -570,8 +570,8 @@ class Creature : public Unit, public GridObject<Creature> void RemoveLootMode(uint16 lootMode) { m_LootMode &= ~lootMode; } void ResetLootMode() { m_LootMode = LOOT_MODE_DEFAULT; } - SpellInfo const *reachWithSpellAttack(Unit *pVictim); - SpellInfo const *reachWithSpellCure(Unit *pVictim); + SpellInfo const* reachWithSpellAttack(Unit* pVictim); + SpellInfo const* reachWithSpellCure(Unit* pVictim); uint32 m_spells[CREATURE_MAX_SPELLS]; CreatureSpellCooldowns m_CreatureSpellCooldowns; @@ -651,10 +651,10 @@ class Creature : public Unit, public GridObject<Creature> void UpdateWaypointID(uint32 wpID){m_waypointID = wpID;} void SearchFormation(); - CreatureGroup *GetFormation() {return m_formation;} - void SetFormation(CreatureGroup *formation) {m_formation = formation;} + CreatureGroup* GetFormation() {return m_formation;} + void SetFormation(CreatureGroup* formation) {m_formation = formation;} - Unit *SelectVictim(); + Unit* SelectVictim(); void SetDisableReputationGain(bool disable) { DisableReputationGain = disable; } bool IsReputationGainDisabled() { return DisableReputationGain; } @@ -679,7 +679,7 @@ class Creature : public Unit, public GridObject<Creature> void FarTeleportTo(Map* map, float X, float Y, float Z, float O); protected: - bool CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint32 team, const CreatureData *data = NULL); + bool CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint32 team, const CreatureData* data = NULL); bool InitEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData* data=NULL); // vendor items @@ -733,7 +733,7 @@ class Creature : public Unit, public GridObject<Creature> uint32 m_path_id; //Formation var - CreatureGroup *m_formation; + CreatureGroup* m_formation; bool TriggerJustRespawned; }; diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index a9a0b6119b3..9096123bb65 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -28,7 +28,7 @@ CreatureGroupInfoType CreatureGroupMap; void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature* member) { - Map *map = member->FindMap(); + Map* map = member->FindMap(); if (!map) return; @@ -57,7 +57,7 @@ void CreatureGroupManager::RemoveCreatureFromGroup(CreatureGroup* group, Creatur if (group->isEmpty()) { - Map *map = member->FindMap(); + Map* map = member->FindMap(); if (!map) return; @@ -92,7 +92,7 @@ void CreatureGroupManager::LoadCreatureFormations() { do { - Field *fields = guidResult->Fetch(); + Field* fields = guidResult->Fetch(); uint32 guid = fields[0].GetUInt32(); guidSet.insert(guid); @@ -101,8 +101,8 @@ void CreatureGroupManager::LoadCreatureFormations() } uint32 count = 0; - Field *fields; - FormationInfo *group_member; + Field* fields; + FormationInfo* group_member; do { diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h index d68d18b788d..5aafe1dc2b3 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.h +++ b/src/server/game/Entities/Creature/CreatureGroups.h @@ -35,8 +35,8 @@ class CreatureGroupManager { friend class ACE_Singleton<CreatureGroupManager, ACE_Null_Mutex>; public: - void AddCreatureToGroup(uint32 group_id, Creature *creature); - void RemoveCreatureFromGroup(CreatureGroup* group, Creature *creature); + void AddCreatureToGroup(uint32 group_id, Creature* creature); + void RemoveCreatureFromGroup(CreatureGroup* group, Creature* creature); void LoadCreatureFormations(); }; @@ -49,7 +49,7 @@ extern CreatureGroupInfoType CreatureGroupMap; class CreatureGroup { private: - Creature *m_leader; //Important do not forget sometimes to work with pointers instead synonims :D:D + Creature* m_leader; //Important do not forget sometimes to work with pointers instead synonims :D:D typedef std::map<Creature*, FormationInfo*> CreatureGroupMemberType; CreatureGroupMemberType m_members; diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 0d91b476fdd..b5a857d1abc 100755 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -109,7 +109,7 @@ void GossipMenu::ClearMenu() _menuItemData.clear(); } -PlayerMenu::PlayerMenu(WorldSession *session) : _session(session) +PlayerMenu::PlayerMenu(WorldSession* session) : _session(session) { } @@ -187,7 +187,7 @@ void PlayerMenu::SendPointOfInterest(uint32 poiId) const std::string iconText = poi->icon_name; int32 locale = _session->GetSessionDbLocaleIndex(); if (locale >= 0) - if (PointOfInterestLocale const *localeData = sObjectMgr->GetPointOfInterestLocale(poiId)) + if (PointOfInterestLocale const* localeData = sObjectMgr->GetPointOfInterestLocale(poiId)) ObjectMgr::GetLocaleString(localeData->IconName, locale, iconText); WorldPacket data(SMSG_GOSSIP_POI, 4 + 4 + 4 + 4 + 4 + 10); // guess size @@ -261,13 +261,13 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title uint32 questID = qmi.QuestId; - if (Quest const *pQuest = sObjectMgr->GetQuestTemplate(questID)) + if (Quest const* pQuest = sObjectMgr->GetQuestTemplate(questID)) { std::string title = pQuest->GetTitle(); int loc_idx = _session->GetSessionDbLocaleIndex(); if (loc_idx >= 0) - if (QuestLocale const *ql = sObjectMgr->GetQuestLocale(questID)) + if (QuestLocale const* ql = sObjectMgr->GetQuestLocale(questID)) ObjectMgr::GetLocaleString(ql->Title, loc_idx, title); data << uint32(questID); @@ -294,7 +294,7 @@ void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, uint64 npcGUID) const sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus); } -void PlayerMenu::SendQuestGiverQuestDetails(Quest const *quest, uint64 npcGUID, bool activateAccept) const +void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, uint64 npcGUID, bool activateAccept) const { std::string questTitle = quest->GetTitle(); std::string questDetails = quest->GetDetails(); @@ -624,7 +624,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, uint64 npcGUID, b sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), quest->GetQuestId()); } -void PlayerMenu::SendQuestGiverRequestItems(Quest const *quest, uint64 npcGUID, bool canComplete, bool closeOnCancel) const +void PlayerMenu::SendQuestGiverRequestItems(Quest const* quest, uint64 npcGUID, bool canComplete, bool closeOnCancel) const { // We can always call to RequestItems, but this packet only goes out if there are actually // items. Otherwise, we'll skip straight to the OfferReward diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h index 16966965b47..517395578cf 100755 --- a/src/server/game/Entities/Creature/GossipDef.h +++ b/src/server/game/Entities/Creature/GossipDef.h @@ -272,10 +272,10 @@ class PlayerMenu void SendQuestGiverQuestList(QEmote eEmote, const std::string& Title, uint64 npcGUID); void SendQuestQueryResponse(Quest const* quest) const; - void SendQuestGiverQuestDetails(Quest const *quest, uint64 npcGUID, bool activateAccept) const; + void SendQuestGiverQuestDetails(Quest const* quest, uint64 npcGUID, bool activateAccept) const; void SendQuestGiverOfferReward(Quest const* quest, uint64 npcGUID, bool enableNext) const; - void SendQuestGiverRequestItems(Quest const *quest, uint64 npcGUID, bool canComplete, bool closeOnCancel) const; + void SendQuestGiverRequestItems(Quest const* quest, uint64 npcGUID, bool canComplete, bool closeOnCancel) const; private: GossipMenu _gossipMenu; diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index d1ad656ba3d..27b0ba53b3d 100755 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -22,7 +22,7 @@ #include "ObjectMgr.h" #include "TemporarySummon.h" -TempSummon::TempSummon(SummonPropertiesEntry const *properties, Unit *owner) : +TempSummon::TempSummon(SummonPropertiesEntry const* properties, Unit* owner) : Creature(), m_Properties(properties), m_type(TEMPSUMMON_MANUAL_DESPAWN), m_timer(0), m_lifetime(0) { @@ -174,7 +174,7 @@ void TempSummon::InitStats(uint32 duration) if (m_type == TEMPSUMMON_MANUAL_DESPAWN) m_type = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; - Unit *owner = GetSummoner(); + Unit* owner = GetSummoner(); if (owner && isTrigger() && m_spells[0]) { @@ -193,7 +193,7 @@ void TempSummon::InitStats(uint32 duration) { if (owner->m_SummonSlot[slot] && owner->m_SummonSlot[slot] != GetGUID()) { - Creature *oldSummon = GetMap()->GetCreature(owner->m_SummonSlot[slot]); + Creature* oldSummon = GetMap()->GetCreature(owner->m_SummonSlot[slot]); if (oldSummon && oldSummon->isSummon()) oldSummon->ToTempSummon()->UnSummon(); } @@ -228,7 +228,7 @@ void TempSummon::UnSummon(uint32 msTime) { if (msTime) { - ForcedUnsummonDelayEvent *pEvent = new ForcedUnsummonDelayEvent(*this); + ForcedUnsummonDelayEvent* pEvent = new ForcedUnsummonDelayEvent(*this); m_Events.AddEvent(pEvent, m_Events.CalculateTime(msTime)); return; @@ -272,7 +272,7 @@ void TempSummon::RemoveFromWorld() Creature::RemoveFromWorld(); } -Minion::Minion(SummonPropertiesEntry const *properties, Unit *owner) : TempSummon(properties, owner) +Minion::Minion(SummonPropertiesEntry const* properties, Unit* owner) : TempSummon(properties, owner) , m_owner(owner) { ASSERT(m_owner); @@ -306,7 +306,7 @@ bool Minion::IsGuardianPet() const return isPet() || (m_Properties && m_Properties->Category == SUMMON_CATEGORY_PET); } -Guardian::Guardian(SummonPropertiesEntry const *properties, Unit *owner) : Minion(properties, owner) +Guardian::Guardian(SummonPropertiesEntry const* properties, Unit* owner) : Minion(properties, owner) , m_bonusSpellDamage(0) { memset(m_statFromOwner, 0, sizeof(float)*MAX_STATS); @@ -340,7 +340,7 @@ void Guardian::InitSummon() m_owner->ToPlayer()->CharmSpellInitialize(); } -Puppet::Puppet(SummonPropertiesEntry const *properties, Unit *owner) : Minion(properties, owner) +Puppet::Puppet(SummonPropertiesEntry const* properties, Unit* owner) : Minion(properties, owner) { ASSERT(owner->GetTypeId() == TYPEID_PLAYER); m_owner = (Player*)owner; diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h index 8cf33ab1cd9..1982dec4bb8 100755 --- a/src/server/game/Entities/Creature/TemporarySummon.h +++ b/src/server/game/Entities/Creature/TemporarySummon.h @@ -24,7 +24,7 @@ class TempSummon : public Creature { public: - explicit TempSummon(SummonPropertiesEntry const *properties, Unit *owner); + explicit TempSummon(SummonPropertiesEntry const* properties, Unit* owner); virtual ~TempSummon() {} void Update(uint32 time); virtual void InitStats(uint32 lifetime); @@ -37,7 +37,7 @@ class TempSummon : public Creature uint64 GetSummonerGUID() { return m_summonerGUID; } TempSummonType const& GetSummonType() { return m_type; } - const SummonPropertiesEntry * const m_Properties; + const SummonPropertiesEntry* const m_Properties; private: TempSummonType m_type; uint32 m_timer; @@ -48,10 +48,10 @@ class TempSummon : public Creature class Minion : public TempSummon { public: - Minion(SummonPropertiesEntry const *properties, Unit *owner); + Minion(SummonPropertiesEntry const* properties, Unit* owner); void InitStats(uint32 duration); void RemoveFromWorld(); - Unit *GetOwner() { return m_owner; } + Unit* GetOwner() { return m_owner; } float GetFollowAngle() const { return m_followAngle; } void SetFollowAngle(float angle) { m_followAngle = angle; } bool IsPetGhoul() const {return GetEntry() == 26125;} // Ghoul may be guardian or pet @@ -64,7 +64,7 @@ class Minion : public TempSummon class Guardian : public Minion { public: - Guardian(SummonPropertiesEntry const *properties, Unit *owner); + Guardian(SummonPropertiesEntry const* properties, Unit* owner); void InitStats(uint32 duration); bool InitStatsForLevel(uint8 level); void InitSummon(); @@ -88,13 +88,13 @@ class Guardian : public Minion class Puppet : public Minion { public: - Puppet(SummonPropertiesEntry const *properties, Unit *owner); + Puppet(SummonPropertiesEntry const* properties, Unit* owner); void InitStats(uint32 duration); void InitSummon(); void Update(uint32 time); void RemoveFromWorld(); protected: - Player *m_owner; + Player* m_owner; }; class ForcedUnsummonDelayEvent : public BasicEvent diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 83ece2eda31..6105d6d5d57 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -154,7 +154,7 @@ void GameObject::RemoveFromWorld() } } -bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit) +bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit) { ASSERT(map); SetMap(map); @@ -465,7 +465,7 @@ void GameObject::Update(uint32 diff) { //Battleground gameobjects case if (ok->ToPlayer()->InBattleground()) - if (Battleground *bg = ok->ToPlayer()->GetBattleground()) + if (Battleground* bg = ok->ToPlayer()->GetBattleground()) bg->HandleTriggerBuff(GetGUID()); } } @@ -629,7 +629,7 @@ void GameObject::Delete() AddObjectToRemoveList(); } -void GameObject::getFishLoot(Loot *fishloot, Player* loot_owner) +void GameObject::getFishLoot(Loot* fishloot, Player* loot_owner) { fishloot->clear(); @@ -646,7 +646,7 @@ void GameObject::SaveToDB() { // this should only be used when the gameobject has already been loaded // preferably after adding to map, because mapid may not be valid otherwise - GameObjectData const *data = sObjectMgr->GetGOData(m_DBTableGuid); + GameObjectData const* data = sObjectMgr->GetGOData(m_DBTableGuid); if (!data) { sLog->outError("GameObject::SaveToDB failed, cannot get gameobject data!"); @@ -658,7 +658,7 @@ void GameObject::SaveToDB() void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) { - const GameObjectTemplate *goI = GetGOInfo(); + const GameObjectTemplate* goI = GetGOInfo(); if (!goI) return; @@ -712,7 +712,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) WorldDatabase.CommitTransaction(trans); } -bool GameObject::LoadFromDB(uint32 guid, Map *map) +bool GameObject::LoadFromDB(uint32 guid, Map* map) { GameObjectData const* data = sObjectMgr->GetGOData(guid); @@ -878,7 +878,7 @@ void GameObject::Respawn() } } -bool GameObject::ActivateToQuest(Player *pTarget) const +bool GameObject::ActivateToQuest(Player* pTarget) const { if (pTarget->HasQuestForGO(GetEntry())) return true; @@ -896,7 +896,7 @@ bool GameObject::ActivateToQuest(Player *pTarget) const //TODO: fix this hack //look for battlegroundAV for some objects which are only activated after mine gots captured by own team if (GetEntry() == BG_AV_OBJECTID_MINE_N || GetEntry() == BG_AV_OBJECTID_MINE_S) - if (Battleground *bg = pTarget->GetBattleground()) + if (Battleground* bg = pTarget->GetBattleground()) if (bg->GetTypeID(true) == BATTLEGROUND_AV && !(((BattlegroundAV*)bg)->PlayerCanDoMineQuest(GetEntry(), pTarget->GetTeam()))) return false; return true; @@ -997,14 +997,14 @@ void GameObject::UseDoorOrButton(uint32 time_to_restore, bool alternative /* = f void GameObject::SetGoArtKit(uint8 kit) { SetByteValue(GAMEOBJECT_BYTES_1, 2, kit); - GameObjectData *data = const_cast<GameObjectData*>(sObjectMgr->GetGOData(m_DBTableGuid)); + GameObjectData* data = const_cast<GameObjectData*>(sObjectMgr->GetGOData(m_DBTableGuid)); if (data) data->artKit = kit; } -void GameObject::SetGoArtKit(uint8 artkit, GameObject *go, uint32 lowguid) +void GameObject::SetGoArtKit(uint8 artkit, GameObject* go, uint32 lowguid) { - const GameObjectData *data = NULL; + const GameObjectData* data = NULL; if (go) { go->SetGoArtKit(artkit); @@ -1477,7 +1477,7 @@ void GameObject::Use(Unit* user) if (player->CanUseBattlegroundObject()) { // in battleground check - Battleground *bg = player->GetBattleground(); + Battleground* bg = player->GetBattleground(); if (!bg) return; if (player->GetVehicle()) @@ -1685,7 +1685,7 @@ const char* GameObject::GetNameForLocaleIdx(LocaleConstant loc_idx) const if (loc_idx != DEFAULT_LOCALE) { uint8 uloc_idx = uint8(loc_idx); - if (GameObjectLocale const *cl = sObjectMgr->GetGameObjectLocale(GetEntry())) + if (GameObjectLocale const* cl = sObjectMgr->GetGameObjectLocale(GetEntry())) if (cl->Name.size() > uloc_idx && !cl->Name[uloc_idx].empty()) return cl->Name[uloc_idx].c_str(); } diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index a0e6fff173f..be4ab451354 100755 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -623,7 +623,7 @@ class GameObject : public WorldObject, public GridObject<GameObject> void RemoveFromWorld(); void CleanupsBeforeDelete(bool finalCleanup = true); - bool Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit = 0); + bool Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit = 0); void Update(uint32 p_time); static GameObject* GetGameObject(WorldObject& object, uint64 guid); GameObjectTemplate const* GetGOInfo() const { return m_goInfo; } @@ -648,7 +648,7 @@ class GameObject : public WorldObject, public GridObject<GameObject> void SaveToDB(); void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask); - bool LoadFromDB(uint32 guid, Map *map); + bool LoadFromDB(uint32 guid, Map* map); void DeleteFromDB(); void SetOwnerGUID(uint64 owner) @@ -698,7 +698,7 @@ class GameObject : public WorldObject, public GridObject<GameObject> uint32 GetRespawnDelay() const { return m_respawnDelayTime; } void Refresh(); void Delete(); - void getFishLoot(Loot *loot, Player* loot_owner); + void getFishLoot(Loot* loot, Player* loot_owner); GameobjectTypes GetGoType() const { return GameobjectTypes(GetByteValue(GAMEOBJECT_BYTES_1, 1)); } void SetGoType(GameobjectTypes type) { SetByteValue(GAMEOBJECT_BYTES_1, 1, type); } GOState GetGoState() const { return GOState(GetByteValue(GAMEOBJECT_BYTES_1, 0)); } @@ -707,7 +707,7 @@ class GameObject : public WorldObject, public GridObject<GameObject> void SetGoArtKit(uint8 artkit); uint8 GetGoAnimProgress() const { return GetByteValue(GAMEOBJECT_BYTES_1, 3); } void SetGoAnimProgress(uint8 animprogress) { SetByteValue(GAMEOBJECT_BYTES_1, 3, animprogress); } - static void SetGoArtKit(uint8 artkit, GameObject *go, uint32 lowguid = 0); + static void SetGoArtKit(uint8 artkit, GameObject* go, uint32 lowguid = 0); void Use(Unit* user); @@ -745,7 +745,7 @@ class GameObject : public WorldObject, public GridObject<GameObject> bool hasQuest(uint32 quest_id) const; bool hasInvolvedQuest(uint32 quest_id) const; - bool ActivateToQuest(Player *pTarget) const; + bool ActivateToQuest(Player* pTarget) const; void UseDoorOrButton(uint32 time_to_restore = 0, bool alternative = false); // 0 = use `gameobject`.`spawntimesecs` void ResetDoorOrButton(); diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp index 007e22d5dfa..92abc595e77 100755 --- a/src/server/game/Entities/Item/Container/Bag.cpp +++ b/src/server/game/Entities/Item/Container/Bag.cpp @@ -31,13 +31,13 @@ Bag::Bag(): Item() m_valuesCount = CONTAINER_END; - memset(m_bagslot, 0, sizeof(Item *) * MAX_BAG_SIZE); + memset(m_bagslot, 0, sizeof(Item* ) * MAX_BAG_SIZE); } Bag::~Bag() { for (uint8 i = 0; i < MAX_BAG_SIZE; ++i) - if (Item *item = m_bagslot[i]) + if (Item* item = m_bagslot[i]) { if (item->IsInWorld()) { @@ -153,7 +153,7 @@ void Bag::RemoveItem(uint8 slot, bool /*update*/) SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (slot * 2), 0); } -void Bag::StoreItem(uint8 slot, Item *pItem, bool /*update*/) +void Bag::StoreItem(uint8 slot, Item* pItem, bool /*update*/) { ASSERT(slot < MAX_BAG_SIZE); @@ -168,7 +168,7 @@ void Bag::StoreItem(uint8 slot, Item *pItem, bool /*update*/) } } -void Bag::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const +void Bag::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const { Item::BuildCreateUpdateBlockForPlayer(data, target); @@ -189,7 +189,7 @@ bool Bag::IsEmpty() const uint32 Bag::GetItemCount(uint32 item, Item* eItem) const { - Item *pItem; + Item* pItem; uint32 count = 0; for (uint32 i=0; i < GetBagSize(); ++i) { @@ -215,9 +215,9 @@ uint32 Bag::GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipItem) { uint32 count = 0; for (uint32 i = 0; i < GetBagSize(); ++i) - if (Item *pItem = m_bagslot[i]) + if (Item* pItem = m_bagslot[i]) if (pItem != skipItem) - if (ItemTemplate const *pProto = pItem->GetTemplate()) + if (ItemTemplate const* pProto = pItem->GetTemplate()) if (pProto->ItemLimitCategory == limitCategory) count += m_bagslot[i]->GetCount(); diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h index df6253caf9e..463425076d4 100755 --- a/src/server/game/Entities/Item/Container/Bag.h +++ b/src/server/game/Entities/Item/Container/Bag.h @@ -38,7 +38,7 @@ class Bag : public Item bool Create(uint32 guidlow, uint32 itemid, Player const* owner); void Clear(); - void StoreItem(uint8 slot, Item *pItem, bool update); + void StoreItem(uint8 slot, Item* pItem, bool update); void RemoveItem(uint8 slot, bool update); Item* GetItemByPos(uint8 slot) const; @@ -58,7 +58,7 @@ class Bag : public Item // overwrite virtual Item::DeleteFromDB void DeleteFromDB(SQLTransaction& trans); - void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const; + void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const; protected: diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 75c810e8494..1394b018df4 100755 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -110,11 +110,11 @@ void AddItemsSetItem(Player* player, Item* item) } } -void RemoveItemsSetItem(Player*player, ItemTemplate const *proto) +void RemoveItemsSetItem(Player*player, ItemTemplate const* proto) { uint32 setid = proto->ItemSet; - ItemSetEntry const *set = sItemSetStore.LookupEntry(setid); + ItemSetEntry const* set = sItemSetStore.LookupEntry(setid); if (!set) { @@ -122,7 +122,7 @@ void RemoveItemsSetItem(Player*player, ItemTemplate const *proto) return; } - ItemSetEffect *eff = NULL; + ItemSetEffect* eff = NULL; size_t setindex = 0; for (; setindex < player->ItemSetEff.size(); setindex++) { @@ -168,7 +168,7 @@ void RemoveItemsSetItem(Player*player, ItemTemplate const *proto) } } -bool ItemCanGoIntoBag(ItemTemplate const *pProto, ItemTemplate const *pBagProto) +bool ItemCanGoIntoBag(ItemTemplate const* pProto, ItemTemplate const* pBagProto) { if (!pProto || !pBagProto) return false; @@ -264,7 +264,7 @@ bool Item::Create(uint32 guidlow, uint32 itemid, Player const* owner) SetUInt64Value(ITEM_FIELD_OWNER, owner ? owner->GetGUID() : 0); SetUInt64Value(ITEM_FIELD_CONTAINED, owner ? owner->GetGUID() : 0); - ItemTemplate const *itemProto = sObjectMgr->GetItemTemplate(itemid); + ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(itemid); if (!itemProto) return false; @@ -497,7 +497,7 @@ void Item::DeleteFromInventoryDB(SQLTransaction& trans) DeleteFromInventoryDB(trans, GetGUIDLow()); } -ItemTemplate const *Item::GetTemplate() const +ItemTemplate const* Item::GetTemplate() const { return sObjectMgr->GetItemTemplate(GetEntry()); } @@ -586,7 +586,7 @@ uint32 Item::GetSpell() int32 Item::GenerateItemRandomPropertyId(uint32 item_id) { - ItemTemplate const *itemProto = sObjectMgr->GetItemTemplate(item_id); + ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(item_id); if (!itemProto) return 0; @@ -606,7 +606,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id) if (itemProto->RandomProperty) { uint32 randomPropId = GetItemEnchantMod(itemProto->RandomProperty); - ItemRandomPropertiesEntry const *random_id = sItemRandomPropertiesStore.LookupEntry(randomPropId); + ItemRandomPropertiesEntry const* random_id = sItemRandomPropertiesStore.LookupEntry(randomPropId); if (!random_id) { sLog->outErrorDb("Enchantment id #%u used but it doesn't have records in 'ItemRandomProperties.dbc'", randomPropId); @@ -619,7 +619,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id) else { uint32 randomPropId = GetItemEnchantMod(itemProto->RandomSuffix); - ItemRandomSuffixEntry const *random_id = sItemRandomSuffixStore.LookupEntry(randomPropId); + ItemRandomSuffixEntry const* random_id = sItemRandomSuffixStore.LookupEntry(randomPropId); if (!random_id) { sLog->outErrorDb("Enchantment id #%u used but it doesn't have records in sItemRandomSuffixStore.", randomPropId); @@ -637,7 +637,7 @@ void Item::SetItemRandomProperties(int32 randomPropId) if (randomPropId > 0) { - ItemRandomPropertiesEntry const *item_rand = sItemRandomPropertiesStore.LookupEntry(randomPropId); + ItemRandomPropertiesEntry const* item_rand = sItemRandomPropertiesStore.LookupEntry(randomPropId); if (item_rand) { if (GetInt32Value(ITEM_FIELD_RANDOM_PROPERTIES_ID) != int32(item_rand->ID)) @@ -651,7 +651,7 @@ void Item::SetItemRandomProperties(int32 randomPropId) } else { - ItemRandomSuffixEntry const *item_rand = sItemRandomSuffixStore.LookupEntry(-randomPropId); + ItemRandomSuffixEntry const* item_rand = sItemRandomSuffixStore.LookupEntry(-randomPropId); if (item_rand) { if (GetInt32Value(ITEM_FIELD_RANDOM_PROPERTIES_ID) != -int32(item_rand->ID) || @@ -676,7 +676,7 @@ void Item::UpdateItemSuffixFactor() SetUInt32Value(ITEM_FIELD_PROPERTY_SEED, suffixFactor); } -void Item::SetState(ItemUpdateState state, Player *forplayer) +void Item::SetState(ItemUpdateState state, Player* forplayer) { if (uState == ITEM_NEW && state == ITEM_REMOVED) { @@ -778,7 +778,7 @@ bool Item::CanBeTraded(bool mail, bool trade) const return true; } -bool Item::HasEnchantRequiredSkill(const Player *pPlayer) const +bool Item::HasEnchantRequiredSkill(const Player* pPlayer) const { // Check all enchants for required skill @@ -1036,7 +1036,7 @@ Item* Item::CreateItem(uint32 item, uint32 count, Player const* player) if (count < 1) return NULL; //don't create item at zero count - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item); if (pProto) { if (count > pProto->GetMaxStackSize()) @@ -1044,7 +1044,7 @@ Item* Item::CreateItem(uint32 item, uint32 count, Player const* player) ASSERT(count !=0 && "pProto->Stackable == 0 but checked at loading already"); - Item *pItem = NewItemOrBag(pProto); + Item* pItem = NewItemOrBag(pProto); if (pItem->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), item, player)) { pItem->SetCount(count); @@ -1116,7 +1116,7 @@ bool ItemRequiredTarget::IsFitToRequirements(Unit* pUnitTarget) const void Item::BuildUpdate(UpdateDataMapType& data_map) { - if (Player *owner = GetOwner()) + if (Player* owner = GetOwner()) BuildFieldsUpdate(owner, data_map); ClearUpdateMask(false); } @@ -1136,7 +1136,7 @@ void Item::DeleteRefundDataFromDB(SQLTransaction* trans) (*trans)->PAppend("DELETE FROM item_refund_instance WHERE item_guid = '%u'", GetGUIDLow()); } -void Item::SetNotRefundable(Player *owner, bool changestate /*=true*/, SQLTransaction* trans /*=NULL*/) +void Item::SetNotRefundable(Player* owner, bool changestate /*=true*/, SQLTransaction* trans /*=NULL*/) { if (!HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE)) return; @@ -1154,7 +1154,7 @@ void Item::SetNotRefundable(Player *owner, bool changestate /*=true*/, SQLTransa owner->DeleteRefundReference(GetGUIDLow()); } -void Item::UpdatePlayedTime(Player *owner) +void Item::UpdatePlayedTime(Player* owner) { /* Here we update our played time We simply add a number to the current played time, diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h index c6f4ef6d60a..534f16042ea 100755 --- a/src/server/game/Entities/Item/Item.h +++ b/src/server/game/Entities/Item/Item.h @@ -33,7 +33,7 @@ struct ItemSetEffect { uint32 setid; uint32 item_count; - SpellInfo const *spells[8]; + SpellInfo const* spells[8]; }; enum InventoryResult @@ -221,7 +221,7 @@ struct ItemRequiredTarget bool IsFitToRequirements(Unit* pUnitTarget) const; }; -bool ItemCanGoIntoBag(ItemTemplate const *proto, ItemTemplate const *pBagProto); +bool ItemCanGoIntoBag(ItemTemplate const* proto, ItemTemplate const* pBagProto); class Item : public Object { @@ -264,7 +264,7 @@ class Item : public Object void SetInTrade(bool b = true) { mb_in_trade = b; } bool IsInTrade() const { return mb_in_trade; } - bool HasEnchantRequiredSkill(const Player *pPlayer) const; + bool HasEnchantRequiredSkill(const Player* pPlayer) const; uint32 GetEnchantRequiredLevel() const; bool IsFitToSpellRequirements(SpellInfo const* spellInfo) const; @@ -280,11 +280,11 @@ class Item : public Object InventoryResult CanBeMergedPartlyWith(ItemTemplate const* proto) const; uint8 GetSlot() const {return m_slot;} - Bag *GetContainer() { return m_container; } + Bag* GetContainer() { return m_container; } uint8 GetBagSlot() const; void SetSlot(uint8 slot) { m_slot = slot; } uint16 GetPos() const { return uint16(GetBagSlot()) << 8 | GetSlot(); } - void SetContainer(Bag *container) { m_container = container; } + void SetContainer(Bag* container) { m_container = container; } bool IsInBag() const { return m_container != NULL; } bool IsEquipped() const; @@ -321,7 +321,7 @@ class Item : public Object // Update States ItemUpdateState GetState() const { return uState; } - void SetState(ItemUpdateState state, Player *forplayer = NULL); + void SetState(ItemUpdateState state, Player* forplayer = NULL); void AddToUpdateQueueOf(Player* player); void RemoveFromUpdateQueueOf(Player* player); bool IsInUpdateQueue() const { return uQueuePos != -1; } @@ -339,7 +339,7 @@ class Item : public Object bool IsConjuredConsumable() const { return GetTemplate()->IsConjuredConsumable(); } // Item Refund system - void SetNotRefundable(Player *owner, bool changestate = true, SQLTransaction* trans = NULL); + void SetNotRefundable(Player* owner, bool changestate = true, SQLTransaction* trans = NULL); void SetRefundRecipient(uint32 pGuidLow) { m_refundRecipient = pGuidLow; } void SetPaidMoney(uint32 money) { m_paidMoney = money; } void SetPaidExtendedCost(uint32 iece) { m_paidExtendedCost = iece; } @@ -347,7 +347,7 @@ class Item : public Object uint32 GetPaidMoney() { return m_paidMoney; } uint32 GetPaidExtendedCost() { return m_paidExtendedCost; } - void UpdatePlayedTime(Player *owner); + void UpdatePlayedTime(Player* owner); uint32 GetPlayedTime(); bool IsRefundExpired(); @@ -361,7 +361,7 @@ class Item : public Object private: std::string m_text; uint8 m_slot; - Bag *m_container; + Bag* m_container; ItemUpdateState uState; int16 uQueuePos; bool mb_in_trade; // true if item is currently in trade-window diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index 6dcf16935cc..7f7f1c4ae7f 100755 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -57,7 +57,7 @@ void LoadRandomEnchantmentsTable() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); uint32 ench = fields[1].GetUInt32(); @@ -120,14 +120,14 @@ uint32 GetItemEnchantMod(int32 entry) uint32 GenerateEnchSuffixFactor(uint32 item_id) { - ItemTemplate const *itemProto = sObjectMgr->GetItemTemplate(item_id); + ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(item_id); if (!itemProto) return 0; if (!itemProto->RandomSuffix) return 0; - RandomPropertiesPointsEntry const *randomProperty = sRandomPropertiesPointsStore.LookupEntry(itemProto->ItemLevel); + RandomPropertiesPointsEntry const* randomProperty = sRandomPropertiesPointsStore.LookupEntry(itemProto->ItemLevel); if (!randomProperty) return 0; diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index aa056e793f0..4305f90d7a3 100755 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -183,7 +183,7 @@ void Object::RemoveFromWorld() ClearUpdateMask(true); } -void Object::BuildMovementUpdateBlock(UpdateData * data, uint32 flags) const +void Object::BuildMovementUpdateBlock(UpdateData* data, uint32 flags) const { ByteBuffer buf(500); @@ -195,7 +195,7 @@ void Object::BuildMovementUpdateBlock(UpdateData * data, uint32 flags) const data->AddUpdateBlock(buf); } -void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const +void Object::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const { if (!target) return; @@ -270,7 +270,7 @@ void Object::SendUpdateToPlayer(Player* player) player->GetSession()->SendPacket(&packet); } -void Object::BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) const +void Object::BuildValuesUpdateBlockForPlayer(UpdateData* data, Player* target) const { ByteBuffer buf(500); @@ -286,12 +286,12 @@ void Object::BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) c data->AddUpdateBlock(buf); } -void Object::BuildOutOfRangeUpdateBlock(UpdateData * data) const +void Object::BuildOutOfRangeUpdateBlock(UpdateData* data) const { data->AddOutOfRangeGUID(GetGUID()); } -void Object::DestroyForPlayer(Player *target, bool anim) const +void Object::DestroyForPlayer(Player* target, bool anim) const { ASSERT(target); @@ -414,14 +414,14 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const *data << (float)0; *data << (float)0; *data << (float)0; - *data << ((WorldObject *)this)->GetOrientation(); + *data << ((WorldObject* )this)->GetOrientation(); } else { - *data << ((WorldObject *)this)->GetPositionX(); - *data << ((WorldObject *)this)->GetPositionY(); - *data << ((WorldObject *)this)->GetPositionZ(); - *data << ((WorldObject *)this)->GetOrientation(); + *data << ((WorldObject* )this)->GetPositionX(); + *data << ((WorldObject* )this)->GetPositionY(); + *data << ((WorldObject* )this)->GetPositionZ(); + *data << ((WorldObject* )this)->GetOrientation(); } } } @@ -491,7 +491,7 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const } } -void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask *updateMask, Player *target) const +void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask* updateMask, Player* target) const { if (!target) return; @@ -1251,7 +1251,7 @@ void WorldObject::setActive(bool on) if (!IsInWorld()) return; - Map *map = FindMap(); + Map* map = FindMap(); if (!map) return; @@ -1298,7 +1298,7 @@ void WorldObject::GetZoneAndAreaId(uint32& zoneid, uint32& areaid) const InstanceScript* WorldObject::GetInstanceScript() { - Map *map = GetMap(); + Map* map = GetMap(); return map->IsDungeon() ? ((InstanceMap*)map)->GetInstanceScript() : NULL; } @@ -1354,7 +1354,7 @@ bool WorldObject::IsWithinLOS(float ox, float oy, float oz) const { float x, y, z; GetPosition(x, y, z); - VMAP::IVMapManager *vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); + VMAP::IVMapManager* vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); return vMapManager->isInLineOfSight(GetMapId(), x, y, z+2.0f, ox, oy, oz+2.0f); } @@ -1466,7 +1466,7 @@ void Position::GetPositionOffsetTo(const Position & endPos, Position & retOffset retOffset.m_orientation = endPos.GetOrientation() - GetOrientation(); } -float Position::GetAngle(const Position *obj) const +float Position::GetAngle(const Position* obj) const { if (!obj) return 0; return GetAngle(obj->GetPositionX(), obj->GetPositionY()); @@ -1502,7 +1502,7 @@ void Position::GetSinCos(const float x, const float y, float &vsin, float &vcos) } } -bool Position::HasInArc(float arc, const Position *obj) const +bool Position::HasInArc(float arc, const Position* obj) const { // always have self in arc if (obj == this) @@ -1524,7 +1524,7 @@ bool Position::HasInArc(float arc, const Position *obj) const return ((angle >= lborder) && (angle <= rborder)); } -bool WorldObject::IsInBetween(const WorldObject *obj1, const WorldObject *obj2, float size) const +bool WorldObject::IsInBetween(const WorldObject* obj1, const WorldObject* obj2, float size) const { if (GetPositionX() > std::max(obj1->GetPositionX(), obj2->GetPositionX()) || GetPositionX() < std::min(obj1->GetPositionX(), obj2->GetPositionX()) @@ -2002,7 +2002,7 @@ void WorldObject::MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisp player->GetSession()->SendPacket(&data); } -void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const* text, uint32 language, char const* name, uint64 targetGuid) const +void WorldObject::BuildMonsterChat(WorldPacket* data, uint8 msgtype, char const* text, uint32 language, char const* name, uint64 targetGuid) const { *data << (uint8)msgtype; *data << (uint32)language; @@ -2021,26 +2021,26 @@ void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const* *data << (uint8)0; // ChatTag } -void Unit::BuildHeartBeatMsg(WorldPacket *data) const +void Unit::BuildHeartBeatMsg(WorldPacket* data) const { data->Initialize(MSG_MOVE_HEARTBEAT, 32); data->append(GetPackGUID()); BuildMovementPacket(data); } -void WorldObject::SendMessageToSet(WorldPacket *data, bool self) +void WorldObject::SendMessageToSet(WorldPacket* data, bool self) { SendMessageToSetInRange(data, GetVisibilityRange(), self); } -void WorldObject::SendMessageToSetInRange(WorldPacket *data, float dist, bool /*self*/) +void WorldObject::SendMessageToSetInRange(WorldPacket* data, float dist, bool /*self*/) { Trinity::MessageDistDeliverer notifier(this, data, dist); VisitNearbyWorldObject(dist, notifier); } -void WorldObject::SendMessageToSet(WorldPacket *data, Player const* skipped_rcvr) +void WorldObject::SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr) { Trinity::MessageDistDeliverer notifier(this, data, GetVisibilityRange(), false, skipped_rcvr); VisitNearbyWorldObject(GetVisibilityRange(), notifier); @@ -2053,7 +2053,7 @@ void WorldObject::SendObjectDeSpawnAnim(uint64 guid) SendMessageToSet(&data, true); } -void WorldObject::SetMap(Map * map) +void WorldObject::SetMap(Map* map) { ASSERT(map); ASSERT(!IsInWorld() || GetTypeId() == TYPEID_CORPSE); @@ -2204,7 +2204,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert void WorldObject::SetZoneScript() { - if (Map *map = FindMap()) + if (Map* map = FindMap()) { if (map->IsDungeon()) m_zoneScript = (ZoneScript*)((InstanceMap*)map)->GetInstanceScript(); @@ -2215,9 +2215,9 @@ void WorldObject::SetZoneScript() TempSummon* WorldObject::SummonCreature(uint32 entry, const Position &pos, TempSummonType spwtype, uint32 duration, uint32 /*vehId*/) const { - if (Map *map = FindMap()) + if (Map* map = FindMap()) { - if (TempSummon *summon = map->SummonCreature(entry, pos, NULL, duration, isType(TYPEMASK_UNIT) ? (Unit*)this : NULL)) + if (TempSummon* summon = map->SummonCreature(entry, pos, NULL, duration, isType(TYPEMASK_UNIT) ? (Unit*)this : NULL)) { summon->SetTempSummonType(spwtype); return summon; @@ -2267,7 +2267,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy return NULL; } - Map *map = GetMap(); + Map* map = GetMap(); uint32 pet_number = sObjectMgr->GeneratePetNumber(); if (!pet->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number)) { @@ -2351,8 +2351,8 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float sLog->outErrorDb("Gameobject template %u not found in database!", entry); return NULL; } - Map *map = GetMap(); - GameObject *go = new GameObject(); + Map* map = GetMap(); + GameObject* go = new GameObject(); if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, map, GetPhaseMask(), x, y, z, ang, rotation0, rotation1, rotation2, rotation3, 100, GO_STATE_READY)) { delete go; @@ -2389,7 +2389,7 @@ Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint3 Creature* WorldObject::FindNearestCreature(uint32 entry, float range, bool alive) const { - Creature *creature = NULL; + Creature* creature = NULL; Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck checker(*this, entry, alive, range); Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(this, creature, checker); VisitNearbyObject(range, searcher); @@ -2398,7 +2398,7 @@ Creature* WorldObject::FindNearestCreature(uint32 entry, float range, bool alive GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range) const { - GameObject *go = NULL; + GameObject* go = NULL; Trinity::NearestGameObjectEntryInObjectRangeCheck checker(*this, entry, range); Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> searcher(this, go, checker); VisitNearbyGridObject(range, searcher); @@ -2743,7 +2743,7 @@ void WorldObject::DestroyForNearbyPlayers() VisitNearbyWorldObject(GetVisibilityRange(), searcher); for (std::list<Player*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter) { - Player *plr = (*iter); + Player* plr = (*iter); if (plr == this) continue; @@ -2816,7 +2816,7 @@ struct WorldObjectChangeAccumulator if (IS_PLAYER_GUID(guid)) { //Caster may be NULL if DynObj is in removelist - if (Player *caster = ObjectAccessor::FindPlayer(guid)) + if (Player* caster = ObjectAccessor::FindPlayer(guid)) if (caster->GetUInt64Value(PLAYER_FARSIGHT) == source->GetGUID()) BuildPacket(caster); } diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 3364ae338a9..ec2ec8f6edc 100755 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -140,14 +140,14 @@ class Object TypeID GetTypeId() const { return m_objectTypeId; } bool isType(uint16 mask) const { return (mask & m_objectType); } - virtual void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const; + virtual void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const; void SendUpdateToPlayer(Player* player); - void BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) const; - void BuildOutOfRangeUpdateBlock(UpdateData *data) const; - void BuildMovementUpdateBlock(UpdateData * data, uint32 flags = 0) const; + void BuildValuesUpdateBlockForPlayer(UpdateData* data, Player* target) const; + void BuildOutOfRangeUpdateBlock(UpdateData* data) const; + void BuildMovementUpdateBlock(UpdateData* data, uint32 flags = 0) const; - virtual void DestroyForPlayer(Player *target, bool anim = false) const; + virtual void DestroyForPlayer(Player* target, bool anim = false) const; int32 GetInt32Value(uint16 index) const { @@ -294,7 +294,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&) {} - void BuildFieldsUpdate(Player *, UpdateDataMapType &) const; + void BuildFieldsUpdate(Player* , UpdateDataMapType &) const; // FG: some hacky helpers void ForceValuesUpdateAtIndex(uint32); @@ -320,11 +320,11 @@ class Object std::string _ConcatFields(uint16 startIndex, uint16 size) const; void _LoadIntoDataField(const char* data, uint32 startOffset, uint32 count); - virtual void _SetUpdateBits(UpdateMask *updateMask, Player *target) const; + virtual void _SetUpdateBits(UpdateMask* updateMask, Player* target) const; - virtual void _SetCreateBits(UpdateMask *updateMask, Player *target) const; + virtual void _SetCreateBits(UpdateMask* updateMask, Player* target) const; void _BuildMovementUpdate(ByteBuffer * data, uint16 flags) const; - void _BuildValuesUpdate(uint8 updatetype, ByteBuffer *data, UpdateMask *updateMask, Player *target) const; + void _BuildValuesUpdate(uint8 updatetype, ByteBuffer *data, UpdateMask* updateMask, Player* target) const; uint16 m_objectType; @@ -382,7 +382,7 @@ struct Position { m_positionX = x; m_positionY = y; m_positionZ = z; m_orientation = orientation; } void Relocate(const Position &pos) { m_positionX = pos.m_positionX; m_positionY = pos.m_positionY; m_positionZ = pos.m_positionZ; m_orientation = pos.m_orientation; } - void Relocate(const Position *pos) + void Relocate(const Position* pos) { m_positionX = pos->m_positionX; m_positionY = pos->m_positionY; m_positionZ = pos->m_positionZ; m_orientation = pos->m_orientation; } void RelocateOffset(const Position &offset); void SetOrientation(float orientation) @@ -399,7 +399,7 @@ struct Position { x = m_positionX; y = m_positionY; z = m_positionZ; } void GetPosition(float &x, float &y, float &z, float &o) const { x = m_positionX; y = m_positionY; z = m_positionZ; o = m_orientation; } - void GetPosition(Position *pos) const + void GetPosition(Position* pos) const { if (pos) pos->Relocate(m_positionX, m_positionY, m_positionZ, m_orientation); @@ -420,37 +420,37 @@ struct Position { float dx = m_positionX - x; float dy = m_positionY - y; return dx*dx + dy*dy; } float GetExactDist2d(const float x, const float y) const { return sqrt(GetExactDist2dSq(x, y)); } - float GetExactDist2dSq(const Position *pos) const + float GetExactDist2dSq(const Position* pos) const { float dx = m_positionX - pos->m_positionX; float dy = m_positionY - pos->m_positionY; return dx*dx + dy*dy; } - float GetExactDist2d(const Position *pos) const + float GetExactDist2d(const Position* pos) const { return sqrt(GetExactDist2dSq(pos)); } float GetExactDistSq(float x, float y, float z) const { float dz = m_positionZ - z; return GetExactDist2dSq(x, y) + dz*dz; } float GetExactDist(float x, float y, float z) const { return sqrt(GetExactDistSq(x, y, z)); } - float GetExactDistSq(const Position *pos) const + float GetExactDistSq(const Position* pos) const { float dx = m_positionX - pos->m_positionX; float dy = m_positionY - pos->m_positionY; float dz = m_positionZ - pos->m_positionZ; return dx*dx + dy*dy + dz*dz; } - float GetExactDist(const Position *pos) const + float GetExactDist(const Position* pos) const { return sqrt(GetExactDistSq(pos)); } void GetPositionOffsetTo(const Position & endPos, Position & retOffset) const; - float GetAngle(const Position *pos) const; + float GetAngle(const Position* pos) const; float GetAngle(float x, float y) const; - float GetRelativeAngle(const Position *pos) const + float GetRelativeAngle(const Position* pos) const { return GetAngle(pos) - m_orientation; } float GetRelativeAngle(float x, float y) const { return GetAngle(x, y) - m_orientation; } void GetSinCos(float x, float y, float &vsin, float &vcos) const; bool IsInDist2d(float x, float y, float dist) const { return GetExactDist2dSq(x, y) < dist * dist; } - bool IsInDist2d(const Position *pos, float dist) const + bool IsInDist2d(const Position* pos, float dist) const { return GetExactDist2dSq(pos) < dist * dist; } bool IsInDist(float x, float y, float z, float dist) const { return GetExactDistSq(x, y, z) < dist * dist; } - bool IsInDist(const Position *pos, float dist) const + bool IsInDist(const Position* pos, float dist) const { return GetExactDistSq(pos) < dist * dist; } - bool HasInArc(float arcangle, const Position *pos) const; + bool HasInArc(float arcangle, const Position* pos) const; bool HasInLine(Unit const* target, float distance, float width) const; std::string ToString() const; }; @@ -640,7 +640,7 @@ class WorldObject : public Object, public WorldLocation virtual const char* GetNameForLocaleIdx(LocaleConstant /*locale_idx*/) const { return GetName(); } - float GetDistance(const WorldObject *obj) const + float GetDistance(const WorldObject* obj) const { float d = GetExactDist(obj) - GetObjectSize() - obj->GetObjectSize(); return d > 0.0f ? d : 0.0f; @@ -676,11 +676,11 @@ class WorldObject : public Object, public WorldLocation } bool IsWithinDist3d(float x, float y, float z, float dist) const { return IsInDist(x, y, z, dist + GetObjectSize()); } - bool IsWithinDist3d(const Position *pos, float dist) const + bool IsWithinDist3d(const Position* pos, float dist) const { return IsInDist(pos, dist + GetObjectSize()); } bool IsWithinDist2d(float x, float y, float dist) const { return IsInDist2d(x, y, dist + GetObjectSize()); } - bool IsWithinDist2d(const Position *pos, float dist) const + bool IsWithinDist2d(const Position* pos, float dist) const { return IsInDist2d(pos, dist + GetObjectSize()); } virtual bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D) const; // use only if you will sure about placing both object at same map @@ -701,13 +701,13 @@ class WorldObject : public Object, public WorldLocation bool isInFront(WorldObject const* target, float distance, float arc = M_PI) const; bool isInBack(WorldObject const* target, float distance, float arc = M_PI) const; - bool IsInBetween(const WorldObject *obj1, const WorldObject *obj2, float size = 0) const; + bool IsInBetween(const WorldObject* obj1, const WorldObject* obj2, float size = 0) const; virtual void CleanupsBeforeDelete(bool finalCleanup = true); // used in destructor or explicitly before mass creature delete to remove cross-references to already deleted units - virtual void SendMessageToSet(WorldPacket *data, bool self); - virtual void SendMessageToSetInRange(WorldPacket *data, float dist, bool self); - virtual void SendMessageToSet(WorldPacket *data, Player const* skipped_rcvr); + virtual void SendMessageToSet(WorldPacket* data, bool self); + virtual void SendMessageToSetInRange(WorldPacket* data, float dist, bool self); + virtual void SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr); virtual uint8 getLevelForTarget(WorldObject const* /*target*/) const { return 1; } @@ -720,7 +720,7 @@ class WorldObject : public Object, public WorldLocation void MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossEmote = false); void MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisper = false); void MonsterYellToZone(int32 textId, uint32 language, uint64 TargetGuid); - void BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const* text, uint32 language, char const* name, uint64 TargetGuid) const; + void BuildMonsterChat(WorldPacket* data, uint8 msgtype, char const* text, uint32 language, char const* name, uint64 TargetGuid) const; void PlayDistanceSound(uint32 sound_id, Player* target = NULL); void PlayDirectSound(uint32 sound_id, Player* target = NULL); @@ -760,17 +760,17 @@ class WorldObject : public Object, public WorldLocation // Low Level Packets void SendPlaySound(uint32 Sound, bool OnlySelf); - virtual void SetMap(Map * map); + virtual void SetMap(Map* map); virtual void ResetMap(); - Map * GetMap() const { ASSERT(m_currMap); return m_currMap; } - Map * FindMap() const { return m_currMap; } + Map* GetMap() const { ASSERT(m_currMap); return m_currMap; } + Map* FindMap() const { return m_currMap; } //used to check all object's GetMap() calls when object is not in world! //this function should be removed in nearest time... Map const* GetBaseMap() const; void SetZoneScript(); - ZoneScript * GetZoneScript() const { return m_zoneScript; } + ZoneScript* GetZoneScript() const { return m_zoneScript; } TempSummon* SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0, uint32 vehId = 0) const; TempSummon* SummonCreature(uint32 id, float x, float y, float z, float ang = 0, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0) @@ -823,7 +823,7 @@ class WorldObject : public Object, public WorldLocation uint32 LastUsedScriptID; // Transports - Transport *GetTransport() const { return m_transport; } + Transport* GetTransport() const { return m_transport; } virtual float GetTransOffsetX() const { return 0; } virtual float GetTransOffsetY() const { return 0; } virtual float GetTransOffsetZ() const { return 0; } @@ -831,16 +831,16 @@ class WorldObject : public Object, public WorldLocation virtual uint32 GetTransTime() const { return 0; } virtual int8 GetTransSeat() const { return -1; } virtual uint64 GetTransGUID() const; - void SetTransport(Transport *t) { m_transport = t; } + void SetTransport(Transport* t) { m_transport = t; } MovementInfo m_movementInfo; protected: std::string m_name; bool m_isActive; - ZoneScript *m_zoneScript; + ZoneScript* m_zoneScript; // transports - Transport *m_transport; + Transport* m_transport; //these functions are used mostly for Relocate() and Corpse/Player specific stuff... //use them ONLY in LoadFromDB()/Create() funcs and nowhere else! @@ -849,7 +849,7 @@ class WorldObject : public Object, public WorldLocation void SetLocationInstanceId(uint32 _instanceId) { m_InstanceId = _instanceId; } private: - Map * m_currMap; //current object's Map location + Map* m_currMap; //current object's Map location //uint32 m_mapId; // object at map with map_id uint32 m_InstanceId; // in map copy with instance id @@ -879,13 +879,13 @@ namespace Trinity class ObjectDistanceOrderPred { public: - ObjectDistanceOrderPred(const WorldObject *pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) {} - bool operator()(const WorldObject *pLeft, const WorldObject *pRight) const + ObjectDistanceOrderPred(const WorldObject* pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) {} + bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const { return m_ascending ? m_refObj->GetDistanceOrder(pLeft, pRight) : !m_refObj->GetDistanceOrder(pLeft, pRight); } private: - const WorldObject *m_refObj; + const WorldObject* m_refObj; const bool m_ascending; }; } diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index bea3395c860..2a151f50064 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -33,7 +33,7 @@ #define PET_XP_FACTOR 0.05f -Pet::Pet(Player *owner, PetType type) : Guardian(NULL, owner), +Pet::Pet(Player* owner, PetType type) : Guardian(NULL, owner), m_usedTalentCount(0), m_removed(false), m_owner(owner), m_happinessTimer(7500), m_petType(type), m_duration(0), m_auraRaidUpdateMask(0), m_loading(false), m_declinedname(NULL) @@ -130,7 +130,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c return false; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); // update for case of current pet "slot = 0" petentry = fields[1].GetUInt32(); @@ -162,7 +162,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c return false; } - Map *map = owner->GetMap(); + Map* map = owner->GetMap(); uint32 guid = sObjectMgr->GenerateLowGuid(HIGHGUID_PET); if (!Create(guid, map, owner->GetPhaseMask(), petentry, pet_number)) return false; @@ -182,7 +182,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c setFaction(owner->getFaction()); SetUInt32Value(UNIT_CREATED_BY_SPELL, summon_spell_id); - CreatureTemplate const *cinfo = GetCreatureInfo(); + CreatureTemplate const* cinfo = GetCreatureInfo(); if (cinfo->type == CREATURE_TYPE_CRITTER) { map->Add(this->ToCreature()); @@ -318,7 +318,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c { delete m_declinedname; m_declinedname = new DeclinedName; - Field *fields2 = result->Fetch(); + Field* fields2 = result->Fetch(); for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i) { m_declinedname->name[i] = fields2[i].GetString(); @@ -706,7 +706,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature) return false; } - CreatureTemplate const *cinfo = GetCreatureInfo(); + CreatureTemplate const* cinfo = GetCreatureInfo(); if (!cinfo) { sLog->outError("CreateBaseAtCreature() failed, creatureInfo is missing!"); @@ -736,7 +736,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner) return true; } -bool Pet::CreateBaseAtTamed(CreatureTemplate const* cinfo, Map * map, uint32 phaseMask) +bool Pet::CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phaseMask) { sLog->outDebug(LOG_FILTER_PETS, "Pet::CreateBaseForTamed"); uint32 guid=sObjectMgr->GenerateLowGuid(HIGHGUID_PET); @@ -765,7 +765,7 @@ bool Pet::CreateBaseAtTamed(CreatureTemplate const* cinfo, Map * map, uint32 pha // TODO: Move stat mods code to pet passive auras bool Guardian::InitStatsForLevel(uint8 petlevel) { - CreatureTemplate const *cinfo = GetCreatureInfo(); + CreatureTemplate const* cinfo = GetCreatureInfo(); ASSERT(cinfo); SetLevel(petlevel); @@ -1044,7 +1044,7 @@ void Pet::_LoadSpellCooldowns() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 spell_id = fields[0].GetUInt32(); time_t db_time = time_t(fields[1].GetUInt32()); @@ -1100,7 +1100,7 @@ void Pet::_LoadSpells() { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); addSpell(fields[0].GetUInt32(), ActiveStates(fields[1].GetUInt8()), PETSPELL_UNCHANGED); } @@ -1150,7 +1150,7 @@ void Pet::_LoadAuras(uint32 timediff) { int32 damage[3]; int32 baseDamage[3]; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint64 caster_guid = fields[0].GetUInt64(); uint32 spellid = fields[1].GetUInt32(); uint8 effmask = fields[2].GetUInt8(); @@ -1217,7 +1217,7 @@ void Pet::_SaveAuras(SQLTransaction& trans) if (!itr->second->CanBeSaved() || IsPetAura(itr->second)) continue; - Aura * aura = itr->second; + Aura* aura = itr->second; int32 damage[MAX_SPELL_EFFECTS]; int32 baseDamage[MAX_SPELL_EFFECTS]; @@ -1250,7 +1250,7 @@ void Pet::_SaveAuras(SQLTransaction& trans) bool Pet::addSpell(uint32 spell_id, ActiveStates active /*= ACT_DECIDE*/, PetSpellState state /*= PETSPELL_NEW*/, PetSpellType type /*= PETSPELL_NORMAL*/) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); if (!spellInfo) { // do pet spell book cleanup @@ -1306,7 +1306,7 @@ bool Pet::addSpell(uint32 spell_id, ActiveStates active /*= ACT_DECIDE*/, PetSpe // talent: unlearn all other talent ranks (high and low) if (TalentSpellPos const* talentPos = GetTalentSpellPos(spell_id)) { - if (TalentEntry const *talentInfo = sTalentStore.LookupEntry(talentPos->talent_id)) + if (TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentPos->talent_id)) { for (uint8 i = 0; i < MAX_TALENT_RANK; ++i) { @@ -1395,7 +1395,7 @@ void Pet::InitLevelupSpellsForLevel() { uint8 level = getLevel(); - if (PetLevelupSpellSet const *levelupSpells = GetCreatureInfo()->family ? sSpellMgr->GetPetLevelupSpellList(GetCreatureInfo()->family) : NULL) + if (PetLevelupSpellSet const* levelupSpells = GetCreatureInfo()->family ? sSpellMgr->GetPetLevelupSpellList(GetCreatureInfo()->family) : NULL) { // PetLevelupSpellSet ordered by levels, process in reversed order for (PetLevelupSpellSet::const_reverse_iterator itr = levelupSpells->rbegin(); itr != levelupSpells->rend(); ++itr) @@ -1412,7 +1412,7 @@ void Pet::InitLevelupSpellsForLevel() int32 petSpellsId = GetCreatureInfo()->PetSpellDataId ? -(int32)GetCreatureInfo()->PetSpellDataId : GetEntry(); // default spells (can be not learned if pet level (as owner level decrease result for example) less first possible in normal game) - if (PetDefaultSpellsEntry const *defSpells = sSpellMgr->GetPetDefaultSpellsEntry(petSpellsId)) + if (PetDefaultSpellsEntry const* defSpells = sSpellMgr->GetPetDefaultSpellsEntry(petSpellsId)) { for (uint8 i = 0; i < MAX_CREATURE_SPELL_DATA_SLOT; ++i) { @@ -1525,7 +1525,7 @@ void Pet::InitPetCreateSpells() bool Pet::resetTalents() { - Unit *owner = GetOwner(); + Unit* owner = GetOwner(); if (!owner || owner->GetTypeId() != TYPEID_PLAYER) return false; @@ -1537,7 +1537,7 @@ bool Pet::resetTalents() if (!ci) return false; // Check pet talent type - CreatureFamilyEntry const *pet_family = sCreatureFamilyStore.LookupEntry(ci->family); + CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family); if (!pet_family || pet_family->petTalentType < 0) return false; @@ -1554,12 +1554,12 @@ bool Pet::resetTalents() for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { - TalentEntry const *talentInfo = sTalentStore.LookupEntry(i); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(i); if (!talentInfo) continue; - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) continue; @@ -1635,7 +1635,7 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* online_pet /*= NULL*/) do { - Field *fields = resultPets->Fetch(); + Field* fields = resultPets->Fetch(); uint32 id = fields[0].GetUInt32(); @@ -1653,7 +1653,7 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* online_pet /*= NULL*/) bool need_execute = false; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 spell = fields[0].GetUInt32(); @@ -1687,7 +1687,7 @@ void Pet::InitTalentForLevel() SetFreeTalentPoints(talentPointsForLevel - m_usedTalentCount); - Unit *owner = GetOwner(); + Unit* owner = GetOwner(); if (!owner || owner->GetTypeId() != TYPEID_PLAYER) return; @@ -1699,7 +1699,7 @@ uint8 Pet::GetMaxTalentPointsForLevel(uint8 level) { uint8 points = (level >= 20) ? ((level - 16) / 4) : 0; // Mod points from owner SPELL_AURA_MOD_PET_TALENT_POINTS - if (Unit *owner = GetOwner()) + if (Unit* owner = GetOwner()) points+=owner->GetTotalAuraModifier(SPELL_AURA_MOD_PET_TALENT_POINTS); return points; } @@ -1774,7 +1774,7 @@ bool Pet::IsPermanentPetFor(Player* owner) } } -bool Pet::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 pet_number) +bool Pet::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 pet_number) { ASSERT(map); SetMap(map); diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index 1d1d3ea5705..973e5e99bee 100755 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -121,7 +121,7 @@ class Player; class Pet : public Guardian { public: - explicit Pet(Player *owner, PetType type = MAX_PET_TYPE); + explicit Pet(Player* owner, PetType type = MAX_PET_TYPE); virtual ~Pet(); void AddToWorld(); @@ -134,10 +134,10 @@ class Pet : public Guardian bool IsPermanentPetFor(Player* owner); // pet have tab in character windows and set UNIT_FIELD_PETNUMBER - bool Create (uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 pet_number); + bool Create (uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry, uint32 pet_number); bool CreateBaseAtCreature(Creature* creature); bool CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner); - bool CreateBaseAtTamed(CreatureTemplate const* cinfo, Map * map, uint32 phaseMask); + bool CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phaseMask); bool LoadPetFromDB(Player* owner, uint32 petentry = 0, uint32 petnumber = 0, bool current = false); bool isBeingLoaded() const { return m_loading;} void SavePetToDB(PetSaveMode mode); @@ -223,9 +223,9 @@ class Pet : public Guardian bool m_removed; // prevent overwrite pet state in DB at next Pet::Update if pet already removed(saved) - Player *GetOwner() { return m_owner; } + Player* GetOwner() { return m_owner; } protected: - Player *m_owner; + Player* m_owner; uint32 m_happinessTimer; PetType m_petType; int32 m_duration; // time until unsummon (used mostly for summoned guardians and not used for controlled pets) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 120137049cd..3f6babc5a28 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -446,7 +446,7 @@ inline void KillRewarder::_InitGroupData() if (_group) { // 2. In case when player is in group, initialize variables necessary for group calculations: - for (GroupReference *itr = _group->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = _group->GetFirstMember(); itr != NULL; itr = itr->next()) if (Player* member = itr->getSource()) if (member->isAlive() && member->IsAtGroupRewardDistance(_victim)) { @@ -588,7 +588,7 @@ void KillRewarder::_RewardGroup() } // 3.1.3. Reward each group member (even dead or corpse) within reward distance. - for (GroupReference *itr = _group->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = _group->GetFirstMember(); itr != NULL; itr = itr->next()) if (Player* member = itr->getSource()) if (member->IsAtGroupRewardDistance(_victim)) _RewardPlayer(member, isDungeon); @@ -631,7 +631,7 @@ UpdateMask Player::updateVisualBits; #ifdef _MSC_VER #pragma warning(disable:4355) #endif -Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputationMgr(this) +Player::Player (WorldSession* session): Unit(), m_achievementMgr(this), m_reputationMgr(this) { #ifdef _MSC_VER #pragma warning(default:4355) @@ -1548,7 +1548,7 @@ void Player::Update(uint32 p_time) UpdateAfkReport(now); if (isCharmed()) - if (Unit *charmer = GetCharmer()) + if (Unit* charmer = GetCharmer()) if (charmer->GetTypeId() == TYPEID_UNIT && charmer->isAlive()) UpdateCharmedAI(); @@ -1585,7 +1585,7 @@ void Player::Update(uint32 p_time) if (HasUnitState(UNIT_STAT_MELEE_ATTACKING) && !HasUnitState(UNIT_STAT_CASTING)) { - if (Unit *pVictim = getVictim()) + if (Unit* pVictim = getVictim()) { // default combat reach 10 // TODO add weapon, skill check @@ -1644,8 +1644,8 @@ void Player::Update(uint32 p_time) } } - /*Unit *owner = pVictim->GetOwner(); - Unit *u = owner ? owner : pVictim; + /*Unit* owner = pVictim->GetOwner(); + Unit* u = owner ? owner : pVictim; if (u->IsPvP() && (!duel || duel->opponent != u)) { UpdatePvP(true); @@ -1861,14 +1861,14 @@ bool Player::BuildEnumData(QueryResult result, WorldPacket* data) // 15 16 17 18 19 20 21 // "characters.at_login, character_pet.entry, character_pet.modelid, character_pet.level, characters.data, character_banned.guid, character_declinedname.genitive " - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); uint8 plrRace = fields[2].GetUInt8(); uint8 plrClass = fields[3].GetUInt8(); uint8 gender = fields[4].GetUInt8(); - PlayerInfo const *info = sObjectMgr->GetPlayerInfo(plrRace, plrClass); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(plrRace, plrClass); if (!info) { sLog->outError("Player %u has incorrect race/class pair. Don't build enum.", guid); @@ -1977,7 +1977,7 @@ bool Player::BuildEnumData(QueryResult result, WorldPacket* data) continue; } - SpellItemEnchantmentEntry const *enchant = NULL; + SpellItemEnchantmentEntry const* enchant = NULL; uint32 enchants = GetUInt32ValueFromArray(equipment, visualBase + 1); for (uint8 enchantSlot = PERM_ENCHANTMENT_SLOT; enchantSlot <= TEMP_ENCHANTMENT_SLOT; ++enchantSlot) @@ -2056,7 +2056,7 @@ void Player::SendTeleportAckPacket() } // this is not used anywhere -void Player::TeleportOutOfMap(Map *oldMap) +void Player::TeleportOutOfMap(Map* oldMap) { while (IsBeingTeleportedFar()) GetSession()->HandleMoveWorldportAckOpcode(); @@ -2208,7 +2208,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati // If the map is not created, assume it is possible to enter it. // It will be created in the WorldPortAck. - Map *map = sMapMgr->FindMap(mapid); + Map* map = sMapMgr->FindMap(mapid); if (!map || map->CanEnter(this)) { //lets reset near teleport flag if it wasn't reset during chained teleports @@ -2430,7 +2430,7 @@ void Player::RemoveFromWorld() if (m_uint32Values) { - if (WorldObject *viewpoint = GetViewpoint()) + if (WorldObject* viewpoint = GetViewpoint()) { sLog->outCrash("Player %s has viewpoint %u %u when removed from world", GetName(), viewpoint->GetEntry(), viewpoint->GetTypeId()); SetViewpoint(viewpoint, false); @@ -2732,7 +2732,7 @@ Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask) GameObject* Player::GetGameObjectIfCanInteractWith(uint64 guid, GameobjectTypes type) const { - if (GameObject *go = GetMap()->GetGameObject(guid)) + if (GameObject* go = GetMap()->GetGameObject(guid)) { if (go->GetGoType() == type) { @@ -3328,7 +3328,7 @@ void Player::SendInitialSpells() data << uint16(spellCooldowns); for (SpellCooldowns::const_iterator itr=m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); ++itr) { - SpellInfo const *sEntry = sSpellMgr->GetSpellInfo(itr->first); + SpellInfo const* sEntry = sSpellMgr->GetSpellInfo(itr->first); if (!sEntry) continue; @@ -3436,7 +3436,7 @@ void Player::AddNewMailDeliverTime(time_t deliver_time) bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); if (!spellInfo) { // do character spell book cleanup (all characters) @@ -3468,9 +3468,9 @@ bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning) PlayerTalentMap::iterator itr = m_talents[spec]->find(spell_id); if (itr != m_talents[spec]->end()) itr->second->state = PLAYERSPELL_UNCHANGED; - else if (TalentSpellPos const *talentPos = GetTalentSpellPos(spell_id)) + else if (TalentSpellPos const* talentPos = GetTalentSpellPos(spell_id)) { - if (TalentEntry const *talentInfo = sTalentStore.LookupEntry(talentPos->talent_id)) + if (TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentPos->talent_id)) { for (uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank) { @@ -3486,7 +3486,7 @@ bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning) } PlayerSpellState state = learning ? PLAYERSPELL_NEW : PLAYERSPELL_UNCHANGED; - PlayerTalent *newtalent = new PlayerTalent(); + PlayerTalent* newtalent = new PlayerTalent(); newtalent->state = state; newtalent->spec = spec; @@ -3499,7 +3499,7 @@ bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning) bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependent, bool disabled, bool loading /*=false*/) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); if (!spellInfo) { // do character spell book cleanup (all characters) @@ -3647,9 +3647,9 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen if (!disabled_case) // skip new spell adding if spell already known (disabled spells case) { // talent: unlearn all other talent ranks (high and low) - if (TalentSpellPos const *talentPos = GetTalentSpellPos(spell_id)) + if (TalentSpellPos const* talentPos = GetTalentSpellPos(spell_id)) { - if (TalentEntry const *talentInfo = sTalentStore.LookupEntry(talentPos->talent_id)) + if (TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentPos->talent_id)) { for (uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank) { @@ -3671,7 +3671,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen learnSpell(prev_spell, true); } - PlayerSpell *newspell = new PlayerSpell; + PlayerSpell* newspell = new PlayerSpell; newspell->state = state; newspell->active = active; newspell->dependent = dependent; @@ -3683,7 +3683,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen for (PlayerSpellMap::iterator itr2 = m_spells.begin(); itr2 != m_spells.end(); ++itr2) { if (itr2->second->state == PLAYERSPELL_REMOVED) continue; - SpellInfo const *i_spellInfo = sSpellMgr->GetSpellInfo(itr2->first); + SpellInfo const* i_spellInfo = sSpellMgr->GetSpellInfo(itr2->first); if (!i_spellInfo) continue; if (spellInfo->IsDifferentRankOf(i_spellInfo)) @@ -3791,7 +3791,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen // not ranked skills for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx) { - SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId); + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId); if (!pSkill) continue; @@ -3863,7 +3863,7 @@ void Player::AddTemporarySpell(uint32 spellId) // spell already added - do not do anything if (itr != m_spells.end()) return; - PlayerSpell *newspell = new PlayerSpell; + PlayerSpell* newspell = new PlayerSpell; newspell->state = PLAYERSPELL_TEMPORARY; newspell->active = true; newspell->dependent = false; @@ -3985,7 +3985,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) // remove pet auras for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) - if (PetAura const *petSpell = sSpellMgr->GetPetAura(spell_id, i)) + if (PetAura const* petSpell = sSpellMgr->GetPetAura(spell_id, i)) RemovePetAura(petSpell); // free talent points @@ -4008,7 +4008,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) } // remove dependent skill - SpellLearnSkillNode const *spellLearnSkill = sSpellMgr->GetSpellLearnSkill(spell_id); + SpellLearnSkillNode const* spellLearnSkill = sSpellMgr->GetSpellLearnSkill(spell_id); if (spellLearnSkill) { uint32 prev_spell = sSpellMgr->GetPrevSpellInChain(spell_id); @@ -4017,7 +4017,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) else { // search prev. skill setting by spell ranks chain - SpellLearnSkillNode const *prevSkill = sSpellMgr->GetSpellLearnSkill(prev_spell); + SpellLearnSkillNode const* prevSkill = sSpellMgr->GetSpellLearnSkill(prev_spell); while (!prevSkill && prev_spell) { prev_spell = sSpellMgr->GetPrevSpellInChain(prev_spell); @@ -4051,7 +4051,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx) { - SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId); + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId); if (!pSkill) continue; @@ -4071,7 +4071,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) // most likely will never be used, haven't heard of cases where players unlearn a mount if (Has310Flyer(false) && _spell_idx->second->skillId == SKILL_MOUNTS) { - SpellInfo const *pSpellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* pSpellInfo = sSpellMgr->GetSpellInfo(spell_id); for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) if (pSpellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED && pSpellInfo->Effects[i].CalcValue() == 310) @@ -4091,7 +4091,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) if (uint32 prev_id = sSpellMgr->GetPrevSpellInChain(spell_id)) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); // if talent then lesser rank also talent and need learn if (talentCosts) @@ -4155,7 +4155,7 @@ bool Player::Has310Flyer(bool checkAllSpells, uint32 excludeSpellId) else { SetHas310Flyer(false); - SpellInfo const *pSpellInfo; + SpellInfo const* pSpellInfo; for (PlayerSpellMap::iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr) { if (itr->first == excludeSpellId) @@ -4237,7 +4237,7 @@ void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns) // pet cooldowns if (removeActivePetCooldowns) - if (Pet *pet = GetPet()) + if (Pet* pet = GetPet()) { // notify player for (CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr) @@ -4263,7 +4263,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result) { // some cooldowns can be already set at aura loading... - //QueryResult *result = CharacterDatabase.PQuery("SELECT spell, item, time FROM character_spell_cooldown WHERE guid = '%u'", GetGUIDLow()); + //QueryResult* result = CharacterDatabase.PQuery("SELECT spell, item, time FROM character_spell_cooldown WHERE guid = '%u'", GetGUIDLow()); if (result) { @@ -4397,12 +4397,12 @@ bool Player::resetTalents(bool no_cost) for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { - TalentEntry const *talentInfo = sTalentStore.LookupEntry(i); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(i); if (!talentInfo) continue; - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) continue; @@ -4419,7 +4419,7 @@ bool Player::resetTalents(bool no_cost) if (talentInfo->RankID[rank] == 0) continue; removeSpell(talentInfo->RankID[rank], true); - if (const SpellInfo *_spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank])) + if (const SpellInfo* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank])) for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) // search through the SpellInfo for valid trigger spells if (_spellEntry->Effects[i].TriggerSpell > 0 && _spellEntry->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL) removeSpell(_spellEntry->Effects[i].TriggerSpell, true); // and remove any spells that the talent teaches @@ -4473,7 +4473,7 @@ Mail* Player::GetMail(uint32 id) return NULL; } -void Player::_SetCreateBits(UpdateMask *updateMask, Player *target) const +void Player::_SetCreateBits(UpdateMask* updateMask, Player* target) const { if (target == this) Object::_SetCreateBits(updateMask, target); @@ -4485,7 +4485,7 @@ void Player::_SetCreateBits(UpdateMask *updateMask, Player *target) const } } -void Player::_SetUpdateBits(UpdateMask *updateMask, Player *target) const +void Player::_SetUpdateBits(UpdateMask* updateMask, Player* target) const { if (target == this) Object::_SetUpdateBits(updateMask, target); @@ -4586,7 +4586,7 @@ void Player::InitVisibleBits() updateVisualBits.SetBit(PLAYER_CHOSEN_TITLE); } -void Player::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const +void Player::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const { for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i) { @@ -4617,7 +4617,7 @@ void Player::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c Unit::BuildCreateUpdateBlockForPlayer(data, target); } -void Player::DestroyForPlayer(Player *target, bool anim) const +void Player::DestroyForPlayer(Player* target, bool anim) const { Unit::DestroyForPlayer(target, anim); @@ -4796,7 +4796,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC { do { - Field *fields = resultMail->Fetch(); + Field* fields = resultMail->Fetch(); uint32 mail_id = fields[0].GetUInt32(); uint16 mailType = fields[1].GetUInt16(); @@ -4846,7 +4846,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC continue; } - Item *pItem = NewItemOrBag(itemProto); + Item* pItem = NewItemOrBag(itemProto); if (!pItem->LoadFromDB(item_guidlow, MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER), fields, item_template)) { pItem->FSetState(ITEM_REMOVED); @@ -4985,7 +4985,7 @@ void Player::DeleteOldCharacters(uint32 keepDays) sLog->outString("Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete", resultChars->GetRowCount()); do { - Field *charFields = resultChars->Fetch(); + Field* charFields = resultChars->Fetch(); Player::DeleteFromDB(charFields[0].GetUInt64(), charFields[1].GetUInt32(), true, true); } while(resultChars->NextRow()); } @@ -5036,7 +5036,7 @@ void Player::BuildPlayerRepop() // create a corpse and place it at the player's location CreateCorpse(); - Corpse *corpse = GetCorpse(); + Corpse* corpse = GetCorpse(); if (!corpse) { sLog->outError("Error creating corpse for Player %s [%u]", GetName(), GetGUIDLow()); @@ -5137,7 +5137,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness) { int32 delta = (int32(getLevel()) - startLevel + 1)*MINUTE; - if (Aura * aur = GetAura(15007, GetGUID())) + if (Aura* aur = GetAura(15007, GetGUID())) { aur->SetDuration(delta*IN_MILLISECONDS); } @@ -5212,7 +5212,7 @@ void Player::CreateCorpse() uint32 _uf, _pb, _pb2, _cfb1, _cfb2; - Corpse *corpse = new Corpse((m_ExtraFlags & PLAYER_EXTRA_PVP_DEATH) ? CORPSE_RESURRECTABLE_PVP : CORPSE_RESURRECTABLE_PVE); + Corpse* corpse = new Corpse((m_ExtraFlags & PLAYER_EXTRA_PVP_DEATH) ? CORPSE_RESURRECTABLE_PVP : CORPSE_RESURRECTABLE_PVE); SetPvPDeath(false); if (!corpse->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_CORPSE), this)) @@ -5289,7 +5289,7 @@ Corpse* Player::GetCorpse() const void Player::DurabilityLossAll(double percent, bool inventory) { for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) DurabilityLoss(pItem, percent); if (inventory) @@ -5298,7 +5298,7 @@ void Player::DurabilityLossAll(double percent, bool inventory) // for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++) for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) DurabilityLoss(pItem, percent); // keys not have durability @@ -5333,7 +5333,7 @@ void Player::DurabilityLoss(Item* item, double percent) void Player::DurabilityPointsLossAll(int32 points, bool inventory) { for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) DurabilityPointsLoss(pItem, points); if (inventory) @@ -5342,7 +5342,7 @@ void Player::DurabilityPointsLossAll(int32 points, bool inventory) // for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++) for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) DurabilityPointsLoss(pItem, points); // keys not have durability @@ -5385,7 +5385,7 @@ void Player::DurabilityPointsLoss(Item* item, int32 points) void Player::DurabilityPointLossForEquipSlot(EquipmentSlots slot) { - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, slot)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, slot)) DurabilityPointsLoss(pItem, 1); } @@ -5424,9 +5424,9 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g uint32 LostDurability = maxDurability - curDurability; if (LostDurability>0) { - ItemTemplate const *ditemProto = item->GetTemplate(); + ItemTemplate const* ditemProto = item->GetTemplate(); - DurabilityCostsEntry const *dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel); + DurabilityCostsEntry const* dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel); if (!dcost) { sLog->outError("RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel); @@ -5434,7 +5434,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g } uint32 dQualitymodEntryId = (ditemProto->Quality+1)*2; - DurabilityQualityEntry const *dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId); + DurabilityQualityEntry const* dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId); if (!dQualitymodEntry) { sLog->outError("RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId); @@ -5457,7 +5457,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g return TotalCost; } - Guild *pGuild = sGuildMgr->GetGuildById(GetGuildId()); + Guild* pGuild = sGuildMgr->GetGuildById(GetGuildId()); if (!pGuild) return TotalCost; @@ -5490,7 +5490,7 @@ void Player::RepopAtGraveyard() // note: this can be called also when the player is alive // for example from WorldSession::HandleMovementOpcodes - AreaTableEntry const *zone = GetAreaEntryByAreaID(GetAreaId()); + AreaTableEntry const* zone = GetAreaEntryByAreaID(GetAreaId()); // Such zones are considered unreachable as a ghost and the player must be automatically revived if ((!isAlive() && zone && zone->flags & AREA_FLAG_NEED_FLY) || GetTransport() || GetPositionZ() < -500.0f) @@ -5499,10 +5499,10 @@ void Player::RepopAtGraveyard() SpawnCorpseBones(); } - WorldSafeLocsEntry const *ClosestGrave = NULL; + WorldSafeLocsEntry const* ClosestGrave = NULL; // Special handle for battleground maps - if (Battleground *bg = GetBattleground()) + if (Battleground* bg = GetBattleground()) ClosestGrave = bg->GetClosestGraveYard(this); else ClosestGrave = sObjectMgr->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam()); @@ -5543,12 +5543,12 @@ bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, Area return true; } -void Player::JoinedChannel(Channel *c) +void Player::JoinedChannel(Channel* c) { m_channels.push_back(c); } -void Player::LeftChannel(Channel *c) +void Player::LeftChannel(Channel* c) { m_channels.remove(c); } @@ -5749,8 +5749,8 @@ float Player::GetMeleeCritFromAgility() if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; - GtChanceToMeleeCritBaseEntry const *critBase = sGtChanceToMeleeCritBaseStore.LookupEntry(pclass-1); - GtChanceToMeleeCritEntry const *critRatio = sGtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + GtChanceToMeleeCritBaseEntry const* critBase = sGtChanceToMeleeCritBaseStore.LookupEntry(pclass-1); + GtChanceToMeleeCritEntry const* critRatio = sGtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (critBase == NULL || critRatio == NULL) return 0.0f; @@ -5798,7 +5798,7 @@ void Player::GetDodgeFromAgility(float &diminishing, float &nondiminishing) level = GT_MAX_LEVEL; // Dodge per agility is proportional to crit per agility, which is available from DBC files - GtChanceToMeleeCritEntry const *dodgeRatio = sGtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + GtChanceToMeleeCritEntry const* dodgeRatio = sGtChanceToMeleeCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (dodgeRatio == NULL || pclass > MAX_CLASSES) return; @@ -5819,8 +5819,8 @@ float Player::GetSpellCritFromIntellect() if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; - GtChanceToSpellCritBaseEntry const *critBase = sGtChanceToSpellCritBaseStore.LookupEntry(pclass-1); - GtChanceToSpellCritEntry const *critRatio = sGtChanceToSpellCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + GtChanceToSpellCritBaseEntry const* critBase = sGtChanceToSpellCritBaseStore.LookupEntry(pclass-1); + GtChanceToSpellCritEntry const* critRatio = sGtChanceToSpellCritStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (critBase == NULL || critRatio == NULL) return 0.0f; @@ -5835,9 +5835,9 @@ float Player::GetRatingMultiplier(CombatRating cr) const if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; - GtCombatRatingsEntry const *Rating = sGtCombatRatingsStore.LookupEntry(cr*GT_MAX_LEVEL+level-1); + GtCombatRatingsEntry const* Rating = sGtCombatRatingsStore.LookupEntry(cr*GT_MAX_LEVEL+level-1); // gtOCTClassCombatRatingScalarStore.dbc starts with 1, CombatRating with zero, so cr+1 - GtOCTClassCombatRatingScalarEntry const *classRating = sGtOCTClassCombatRatingScalarStore.LookupEntry((getClass()-1)*GT_MAX_RATING+cr+1); + GtOCTClassCombatRatingScalarEntry const* classRating = sGtOCTClassCombatRatingScalarStore.LookupEntry((getClass()-1)*GT_MAX_RATING+cr+1); if (!Rating || !classRating) return 1.0f; // By default use minimum coefficient (not must be called) @@ -5871,8 +5871,8 @@ float Player::OCTRegenHPPerSpirit() if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; - GtOCTRegenHPEntry const *baseRatio = sGtOCTRegenHPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); - GtRegenHPPerSptEntry const *moreRatio = sGtRegenHPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + GtOCTRegenHPEntry const* baseRatio = sGtOCTRegenHPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + GtRegenHPPerSptEntry const* moreRatio = sGtRegenHPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (baseRatio == NULL || moreRatio == NULL) return 0.0f; @@ -5894,8 +5894,8 @@ float Player::OCTRegenMPPerSpirit() if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; -// GtOCTRegenMPEntry const *baseRatio = sGtOCTRegenMPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); - GtRegenMPPerSptEntry const *moreRatio = sGtRegenMPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); +// GtOCTRegenMPEntry const* baseRatio = sGtOCTRegenMPStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); + GtRegenMPPerSptEntry const* moreRatio = sGtRegenMPPerSptStore.LookupEntry((pclass-1)*GT_MAX_LEVEL + level-1); if (moreRatio == NULL) return 0.0f; @@ -6034,10 +6034,10 @@ void Player::SetRegularAttackTime() { for (uint8 i = 0; i < MAX_ATTACK; ++i) { - Item *tmpitem = GetWeaponForAttack(WeaponAttackType(i), true); + Item* tmpitem = GetWeaponForAttack(WeaponAttackType(i), true); if (tmpitem && !tmpitem->IsBroken()) { - ItemTemplate const *proto = tmpitem->GetTemplate(); + ItemTemplate const* proto = tmpitem->GetTemplate(); if (proto->Delay) SetAttackTime(WeaponAttackType(i), proto->Delay); } @@ -6230,7 +6230,7 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step) void Player::UpdateWeaponSkill (WeaponAttackType attType) { // no skill gain in pvp - Unit *pVictim = getVictim(); + Unit* pVictim = getVictim(); if (pVictim && pVictim->GetTypeId() == TYPEID_PLAYER) return; @@ -6249,7 +6249,7 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType) { case BASE_ATTACK: { - Item *tmpitem = GetWeaponForAttack(attType, true); + Item* tmpitem = GetWeaponForAttack(attType, true); if (!tmpitem) UpdateSkill(SKILL_UNARMED, weapon_skill_gain); @@ -6260,7 +6260,7 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType) case OFF_ATTACK: case RANGED_ATTACK: { - Item *tmpitem = GetWeaponForAttack(attType, true); + Item* tmpitem = GetWeaponForAttack(attType, true); if (tmpitem) UpdateSkill(tmpitem->GetSkill(), weapon_skill_gain); break; @@ -6271,7 +6271,7 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType) UpdateAllCritPercentages(); } -void Player::UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, bool defence) +void Player::UpdateCombatSkills(Unit* pVictim, WeaponAttackType attType, bool defence) { uint8 plevel = getLevel(); // if defense than pVictim == attacker uint8 greylevel = Trinity::XP::GetGrayLevel(plevel); @@ -6339,7 +6339,7 @@ void Player::UpdateSkillsForLevel() continue; uint32 pskill = itr->first; - SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(pskill); + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(pskill); if (!pSkill) continue; @@ -6445,7 +6445,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) // remove all spells that related to this skill for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) - if (SkillLineAbilityEntry const *pAbility = sSkillLineAbilityStore.LookupEntry(j)) + if (SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j)) if (pAbility->skillId == id) removeSpell(sSpellMgr->GetFirstSpellInChain(pAbility->spellId)); } @@ -6456,7 +6456,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) for (int i=0; i < PLAYER_MAX_SKILLS; ++i) if (!GetUInt32Value(PLAYER_SKILL_INDEX(i))) { - SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(id); + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(id); if (!pSkill) { sLog->outError("Skill not found in SkillLineStore: skill #%u", id); @@ -6763,7 +6763,7 @@ void Player::SaveRecallPosition() m_recallO = GetOrientation(); } -void Player::SendMessageToSetInRange(WorldPacket *data, float dist, bool self) +void Player::SendMessageToSetInRange(WorldPacket* data, float dist, bool self) { if (self) GetSession()->SendPacket(data); @@ -6772,7 +6772,7 @@ void Player::SendMessageToSetInRange(WorldPacket *data, float dist, bool self) VisitNearbyWorldObject(dist, notifier); } -void Player::SendMessageToSetInRange(WorldPacket *data, float dist, bool self, bool own_team_only) +void Player::SendMessageToSetInRange(WorldPacket* data, float dist, bool self, bool own_team_only) { if (self) GetSession()->SendPacket(data); @@ -6781,7 +6781,7 @@ void Player::SendMessageToSetInRange(WorldPacket *data, float dist, bool self, b VisitNearbyWorldObject(dist, notifier); } -void Player::SendMessageToSet(WorldPacket *data, Player const* skipped_rcvr) +void Player::SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr) { if (skipped_rcvr != this) GetSession()->SendPacket(data); @@ -6792,7 +6792,7 @@ void Player::SendMessageToSet(WorldPacket *data, Player const* skipped_rcvr) VisitNearbyWorldObject(GetVisibilityRange(), notifier); } -void Player::SendDirectMessage(WorldPacket *data) +void Player::SendDirectMessage(WorldPacket* data) { m_session->SendPacket(data); } @@ -6844,7 +6844,7 @@ void Player::CheckAreaExploreAndOutdoor() GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA); - AreaTableEntry const *p = GetAreaEntryByAreaFlagAndMap(areaFlag, GetMapId()); + AreaTableEntry const* p = GetAreaEntryByAreaFlagAndMap(areaFlag, GetMapId()); if (!p) { sLog->outError("PLAYER: Player %u discovered unknown area (x: %f y: %f map: %u", GetGUIDLow(), GetPositionX(), GetPositionY(), GetMapId()); @@ -6949,7 +6949,7 @@ int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, in } //Calculates how many reputation points player gains in victim's enemy factions -void Player::RewardReputation(Unit *pVictim, float rate) +void Player::RewardReputation(Unit* pVictim, float rate) { if (!pVictim || pVictim->GetTypeId() == TYPEID_PLAYER) return; @@ -6968,13 +6968,13 @@ void Player::RewardReputation(Unit *pVictim, float rate) { // support for: Championing - http://www.wowwiki.com/Championing - Map const *pMap = GetMap(); + Map const* pMap = GetMap(); if (pMap && pMap->IsDungeon()) { - InstanceTemplate const *pInstance = sObjectMgr->GetInstanceTemplate(pMap->GetId()); + InstanceTemplate const* pInstance = sObjectMgr->GetInstanceTemplate(pMap->GetId()); if (pInstance) { - AccessRequirement const *pAccessRequirement = sObjectMgr->GetAccessRequirement(pMap->GetId(), ((InstanceMap*)pMap)->GetDifficulty()); + AccessRequirement const* pAccessRequirement = sObjectMgr->GetAccessRequirement(pMap->GetId(), ((InstanceMap*)pMap)->GetDifficulty()); if (pAccessRequirement) { if (!pMap->IsRaid() && pAccessRequirement->levelMin == 80) @@ -7005,7 +7005,7 @@ void Player::RewardReputation(Unit *pVictim, float rate) if (recruitAFriend) donerep1 = int32(donerep1 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS))); - FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction1); + FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction1); uint32 current_reputation_rank1 = GetReputationMgr().GetRank(factionEntry1); if (factionEntry1 && current_reputation_rank1 <= Rep->reputation_max_cap1) GetReputationMgr().ModifyReputation(factionEntry1, donerep1); @@ -7019,7 +7019,7 @@ void Player::RewardReputation(Unit *pVictim, float rate) if (recruitAFriend) donerep2 = int32(donerep2 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS))); - FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction2); + FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction2); uint32 current_reputation_rank2 = GetReputationMgr().GetRank(factionEntry2); if (factionEntry2 && current_reputation_rank2 <= Rep->reputation_max_cap2) GetReputationMgr().ModifyReputation(factionEntry2, donerep2); @@ -7027,7 +7027,7 @@ void Player::RewardReputation(Unit *pVictim, float rate) } //Calculate how many reputation points player gain with the quest -void Player::RewardReputation(Quest const *pQuest) +void Player::RewardReputation(Quest const* pQuest) { bool recruitAFriend = GetsRecruitAFriendBonus(false); @@ -7051,7 +7051,7 @@ void Player::RewardReputation(Quest const *pQuest) uint32 row = ((pQuest->RewRepValueId[i] < 0) ? 1 : 0) + 1; uint32 field = abs(pQuest->RewRepValueId[i]); - if (const QuestFactionRewEntry *pRow = sQuestFactionRewardStore.LookupEntry(row)) + if (const QuestFactionRewEntry* pRow = sQuestFactionRewardStore.LookupEntry(row)) { int32 repPoints = pRow->QuestRewFactionValue[field]; @@ -7105,7 +7105,7 @@ void Player::UpdateHonorFields() ///Calculate the amount of honor gained based on the victim ///and the size of the group for which the honor is divided ///An exact honor value can also be given (overriding the calcs) -bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, int32 honor, bool pvptoken) +bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool pvptoken) { // do not reward honor in arenas, but enable onkill spellproc if (InArena()) @@ -7145,7 +7145,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, int32 honor, bool pvpt if (uVictim->GetTypeId() == TYPEID_PLAYER) { - Player *pVictim = uVictim->ToPlayer(); + Player* pVictim = uVictim->ToPlayer(); if (GetTeam() == pVictim->GetTeam() && !sWorld->IsFFAPvPRealm()) return false; @@ -7231,7 +7231,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, int32 honor, bool pvpt if (InBattleground() && honor > 0) { - if (Battleground *bg = GetBattleground()) + if (Battleground* bg = GetBattleground()) { bg->UpdatePlayerScore(this, SCORE_BONUS_HONOR, honor, false); //false: prevent looping } @@ -7421,7 +7421,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea) if (sWorld->getBoolConfig(CONFIG_WEATHER)) { - Weather *wth = sWeatherMgr->FindWeather(zone->ID); + Weather* wth = sWeatherMgr->FindWeather(zone->ID); if (wth) wth->SendWeatherUpdateToPlayer(this); else @@ -7661,12 +7661,12 @@ void Player::DuelComplete(DuelCompleteType type) //---------------------------------------------------------// -void Player::_ApplyItemMods(Item *item, uint8 slot, bool apply) +void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply) { if (slot >= INVENTORY_SLOT_BAG_END || !item) return; - ItemTemplate const *proto = item->GetTemplate(); + ItemTemplate const* proto = item->GetTemplate(); if (!proto) return; @@ -7696,12 +7696,12 @@ void Player::_ApplyItemMods(Item *item, uint8 slot, bool apply) sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_ApplyItemMods complete."); } -void Player::_ApplyItemBonuses(ItemTemplate const *proto, uint8 slot, bool apply, bool only_level_scale /*= false*/) +void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply, bool only_level_scale /*= false*/) { if (slot >= INVENTORY_SLOT_BAG_END || !proto) return; - ScalingStatDistributionEntry const *ssd = proto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(proto->ScalingStatDistribution) : NULL; + ScalingStatDistributionEntry const* ssd = proto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(proto->ScalingStatDistribution) : NULL; if (only_level_scale && !ssd) return; @@ -7710,7 +7710,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const *proto, uint8 slot, bool apply if (ssd && ssd_level > ssd->MaxLevel) ssd_level = ssd->MaxLevel; - ScalingStatValuesEntry const *ssv = proto->ScalingStatValue ? sScalingStatValuesStore.LookupEntry(ssd_level) : NULL; + ScalingStatValuesEntry const* ssv = proto->ScalingStatValue ? sScalingStatValuesStore.LookupEntry(ssd_level) : NULL; if (only_level_scale && !ssv) return; @@ -7970,7 +7970,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const *proto, uint8 slot, bool apply ApplyFeralAPBonus(feral_bonus, apply); } -void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const *proto, ScalingStatValuesEntry const *ssv, bool apply) +void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingStatValuesEntry const* ssv, bool apply) { WeaponAttackType attType = BASE_ATTACK; float damage = 0.0f; @@ -8031,7 +8031,7 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const *proto, ScalingSt UpdateDamagePhysical(attType); } -void Player::_ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType, bool apply) +void Player::_ApplyWeaponDependentAuraMods(Item* item, WeaponAttackType attackType, bool apply) { AuraEffectList const& auraCritList = GetAuraEffectsByType(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT); for (AuraEffectList::const_iterator itr = auraCritList.begin(); itr != auraCritList.end(); ++itr) @@ -8046,7 +8046,7 @@ void Player::_ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackTy _ApplyWeaponDependentAuraDamageMod(item, attackType, *itr, apply); } -void Player::_ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, AuraEffect const* aura, bool apply) +void Player::_ApplyWeaponDependentAuraCritMod(Item* item, WeaponAttackType attackType, AuraEffect const* aura, bool apply) { // generic not weapon specific case processes in aura code if (aura->GetSpellInfo()->EquippedItemClass == -1) @@ -8065,7 +8065,7 @@ void Player::_ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attac HandleBaseModValue(mod, FLAT_MOD, float (aura->GetAmount()), apply); } -void Player::_ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, AuraEffect const* aura, bool apply) +void Player::_ApplyWeaponDependentAuraDamageMod(Item* item, WeaponAttackType attackType, AuraEffect const* aura, bool apply) { //don't apply mod if item is broken if (item->IsBroken() || !CanUseAttackType(attackType)) @@ -8104,12 +8104,12 @@ void Player::_ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType att } } -void Player::ApplyItemEquipSpell(Item *item, bool apply, bool form_change) +void Player::ApplyItemEquipSpell(Item* item, bool apply, bool form_change) { if (!item) return; - ItemTemplate const *proto = item->GetTemplate(); + ItemTemplate const* proto = item->GetTemplate(); if (!proto) return; @@ -8209,7 +8209,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 // If usable, try to cast item spell if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (!item->IsBroken() && CanUseAttackType(attType)) - if (ItemTemplate const *proto = item->GetTemplate()) + if (ItemTemplate const* proto = item->GetTemplate()) { // Additional check for weapons if (proto->Class == ITEM_CLASS_WEAPON) @@ -8235,7 +8235,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 } } -void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item *item, ItemTemplate const* proto) +void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item* item, ItemTemplate const* proto) { // Can do effect if any damage done to target if (procVictim & PROC_FLAG_TAKEN_DAMAGE) @@ -8253,7 +8253,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 if (spellData.SpellTrigger != ITEM_SPELLTRIGGER_CHANCE_ON_HIT) continue; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId); if (!spellInfo) { sLog->outError("WORLD: unknown Item spellid %i", spellData.SpellId); @@ -8297,7 +8297,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 for (uint8 e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot) { uint32 enchant_id = item->GetEnchantmentId(EnchantmentSlot(e_slot)); - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) continue; for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s) { @@ -8320,7 +8320,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 continue; } - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]); if (!spellInfo) { sLog->outError("Player::CastItemCombatSpell(GUID: %u, name: %s, enchant: %i): unknown spell %i is casted, ignoring...", @@ -8356,7 +8356,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 } } -void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8 cast_count, uint32 glyphIndex) +void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 cast_count, uint32 glyphIndex) { ItemTemplate const* proto = item->GetTemplate(); // special learning case @@ -8365,7 +8365,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8 uint32 learn_spell_id = proto->Spells[0].SpellId; uint32 learning_spell_id = proto->Spells[1].SpellId; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(learn_spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(learn_spell_id); if (!spellInfo) { sLog->outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->ItemId, learn_spell_id); @@ -8397,7 +8397,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8 if (spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_USE) continue; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId); if (!spellInfo) { sLog->outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->ItemId, spellData.SpellId); @@ -8417,7 +8417,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8 for (uint8 e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot) { uint32 enchant_id = item->GetEnchantmentId(EnchantmentSlot(e_slot)); - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) continue; for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s) @@ -8425,7 +8425,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8 if (pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_USE_SPELL) continue; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]); if (!spellInfo) { sLog->outError("Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]); @@ -8451,7 +8451,7 @@ void Player::_RemoveAllItemMods() { if (m_items[i]) { - ItemTemplate const *proto = m_items[i]->GetTemplate(); + ItemTemplate const* proto = m_items[i]->GetTemplate(); if (!proto) continue; @@ -8473,7 +8473,7 @@ void Player::_RemoveAllItemMods() { if (m_items[i]->IsBroken() || !CanUseAttackType(GetAttackBySlot(i))) continue; - ItemTemplate const *proto = m_items[i]->GetTemplate(); + ItemTemplate const* proto = m_items[i]->GetTemplate(); if (!proto) continue; @@ -8502,7 +8502,7 @@ void Player::_ApplyAllItemMods() if (m_items[i]->IsBroken() || !CanUseAttackType(GetAttackBySlot(i))) continue; - ItemTemplate const *proto = m_items[i]->GetTemplate(); + ItemTemplate const* proto = m_items[i]->GetTemplate(); if (!proto) continue; @@ -8521,7 +8521,7 @@ void Player::_ApplyAllItemMods() { if (m_items[i]) { - ItemTemplate const *proto = m_items[i]->GetTemplate(); + ItemTemplate const* proto = m_items[i]->GetTemplate(); if (!proto) continue; @@ -8549,7 +8549,7 @@ void Player::_ApplyAllLevelScaleItemMods(bool apply) if (m_items[i]->IsBroken() || !CanUseAttackType(GetAttackBySlot(i))) continue; - ItemTemplate const *proto = m_items[i]->GetTemplate(); + ItemTemplate const* proto = m_items[i]->GetTemplate(); if (!proto) continue; @@ -8567,7 +8567,7 @@ void Player::_ApplyAmmoBonuses() float currentAmmoDPS; - ItemTemplate const *ammo_proto = sObjectMgr->GetItemTemplate(ammo_id); + ItemTemplate const* ammo_proto = sObjectMgr->GetItemTemplate(ammo_id); if (!ammo_proto || ammo_proto->Class != ITEM_CLASS_PROJECTILE || !CheckAmmoCompatibility(ammo_proto)) currentAmmoDPS = 0.0f; else @@ -8582,13 +8582,13 @@ void Player::_ApplyAmmoBonuses() UpdateDamagePhysical(RANGED_ATTACK); } -bool Player::CheckAmmoCompatibility(const ItemTemplate *ammo_proto) const +bool Player::CheckAmmoCompatibility(const ItemTemplate* ammo_proto) const { if (!ammo_proto) return false; // check ranged weapon - Item *weapon = GetWeaponForAttack(RANGED_ATTACK); + Item* weapon = GetWeaponForAttack(RANGED_ATTACK); if (!weapon || weapon->IsBroken()) return false; @@ -8632,7 +8632,7 @@ void Player::RemovedInsignia(Player* looterPlr) // We have to convert player corpse to bones, not to be able to resurrect there // SpawnCorpseBones isn't handy, 'cos it saves player while he in BG - Corpse *bones = sObjectAccessor->ConvertCorpseForPlayer(GetGUID(), true); + Corpse* bones = sObjectAccessor->ConvertCorpseForPlayer(GetGUID(), true); if (!bones) return; @@ -8658,14 +8658,14 @@ void Player::SendLoot(uint64 guid, LootType loot_type) if (uint64 lguid = GetLootGUID()) m_session->DoLootRelease(lguid); - Loot *loot = 0; + Loot* loot = 0; PermissionTypes permission = ALL_PERMISSION; sLog->outDebug(LOG_FILTER_LOOT, "Player::SendLoot"); if (IS_GAMEOBJECT_GUID(guid)) { sLog->outDebug(LOG_FILTER_LOOT, "IS_GAMEOBJECT_GUID(guid)"); - GameObject *go = GetMap()->GetGameObject(guid); + GameObject* go = GetMap()->GetGameObject(guid); // not check distance for GO in case owned GO (fishing bobber case, for example) // And permit out of range GO with no owner in case fishing hole @@ -8683,7 +8683,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type) //TODO: fix this big hack if ((go->GetEntry() == BG_AV_OBJECTID_MINE_N || go->GetEntry() == BG_AV_OBJECTID_MINE_S)) - if (Battleground *bg = GetBattleground()) + if (Battleground* bg = GetBattleground()) if (bg->GetTypeID(true) == BATTLEGROUND_AV) if (!(((BattlegroundAV*)bg)->PlayerCanDoMineQuest(go->GetEntry(), GetTeam()))) { @@ -8763,7 +8763,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type) } else if (IS_ITEM_GUID(guid)) { - Item *item = GetItemByGuid(guid); + Item* item = GetItemByGuid(guid); if (!item) { @@ -8800,7 +8800,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type) } else if (IS_CORPSE_GUID(guid)) // remove insignia { - Corpse *bones = ObjectAccessor::GetCorpse(*this, guid); + Corpse* bones = ObjectAccessor::GetCorpse(*this, guid); if (!bones || !(loot_type == LOOT_CORPSE || loot_type == LOOT_INSIGNIA) || bones->GetType() != CORPSE_BONES) { @@ -8815,7 +8815,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type) bones->lootForBody = true; uint32 pLevel = bones->loot.gold; bones->loot.clear(); - if (Battleground *bg = GetBattleground()) + if (Battleground* bg = GetBattleground()) if (bg->GetTypeID(true) == BATTLEGROUND_AV) loot->FillLoot(1, LootTemplates_Creature, this, true); // It may need a better formula @@ -8830,7 +8830,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type) } else { - Creature *creature = GetMap()->GetCreature(guid); + Creature* creature = GetMap()->GetCreature(guid); // must be in range and creature must be alive for pickpocket and must be dead for another loot if (!creature || creature->isAlive() != (loot_type == LOOT_PICKPOCKETING) || !creature->IsWithinDistInMap(this, INTERACTION_DISTANCE)) @@ -8867,7 +8867,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type) else { // the player whose group may loot the corpse - Player *recipient = creature->GetLootRecipient(); + Player* recipient = creature->GetLootRecipient(); if (!recipient) return; @@ -8994,7 +8994,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid) Battleground* bg = GetBattleground(); uint16 NumberOfFields = 0; uint32 mapid = GetMapId(); - OutdoorPvP * pvp = sOutdoorPvPMgr->GetOutdoorPvPToZoneId(zoneid); + OutdoorPvP* pvp = sOutdoorPvPMgr->GetOutdoorPvPToZoneId(zoneid); InstanceScript* instance = GetInstanceScript(); sLog->outDebug(LOG_FILTER_NETWORKIO, "Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid); @@ -9680,7 +9680,7 @@ void Player::ResetPetTalents() if (!pet || pet->getPetType() != HUNTER_PET || pet->m_usedTalentCount == 0) return; - CharmInfo *charmInfo = pet->GetCharmInfo(); + CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { sLog->outError("Object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); @@ -9927,7 +9927,7 @@ InventoryResult Player::CanUnequipItems(uint32 item, uint32 count) const InventoryResult res = EQUIP_ERR_OK; for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem->GetEntry() == item) { InventoryResult ires = CanUnequipItem(INVENTORY_SLOT_BAG_0 << 8 | i, false); @@ -9942,7 +9942,7 @@ InventoryResult Player::CanUnequipItems(uint32 item, uint32 count) const } for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem->GetEntry() == item) { tempcount += pItem->GetCount(); @@ -9951,7 +9951,7 @@ InventoryResult Player::CanUnequipItems(uint32 item, uint32 count) const } for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem->GetEntry() == item) { tempcount += pItem->GetCount(); @@ -9960,9 +9960,9 @@ InventoryResult Player::CanUnequipItems(uint32 item, uint32 count) const } for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i) - if (Bag *pBag = GetBagByPos(i)) + if (Bag* pBag = GetBagByPos(i)) for (uint32 j = 0; j < pBag->GetBagSize(); ++j) - if (Item *pItem = GetItemByPos(i, j)) + if (Item* pItem = GetItemByPos(i, j)) if (pItem->GetEntry() == item) { tempcount += pItem->GetCount(); @@ -9978,12 +9978,12 @@ uint32 Player::GetItemCount(uint32 item, bool inBankAlso, Item* skipItem) const { uint32 count = 0; for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem != skipItem && pItem->GetEntry() == item) count += pItem->GetCount(); for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem != skipItem && pItem->GetEntry() == item) count += pItem->GetCount(); @@ -9993,7 +9993,7 @@ uint32 Player::GetItemCount(uint32 item, bool inBankAlso, Item* skipItem) const if (skipItem && skipItem->GetTemplate()->GemProperties) for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem != skipItem && pItem->GetTemplate()->Socket[0].Color) count += pItem->GetGemCountWithID(item); @@ -10022,16 +10022,16 @@ uint32 Player::GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipIte { uint32 count = 0; for (int i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem != skipItem) - if (ItemTemplate const *pProto = pItem->GetTemplate()) + if (ItemTemplate const* pProto = pItem->GetTemplate()) if (pProto->ItemLimitCategory == limitCategory) count += pItem->GetCount(); for (int i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem != skipItem) - if (ItemTemplate const *pProto = pItem->GetTemplate()) + if (ItemTemplate const* pProto = pItem->GetTemplate()) if (pProto->ItemLimitCategory == limitCategory) count += pItem->GetCount(); @@ -10040,9 +10040,9 @@ uint32 Player::GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipIte count += pBag->GetItemCountWithLimitCategory(limitCategory, skipItem); for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem != skipItem) - if (ItemTemplate const *pProto = pItem->GetTemplate()) + if (ItemTemplate const* pProto = pItem->GetTemplate()) if (pProto->ItemLimitCategory == limitCategory) count += pItem->GetCount(); @@ -10056,29 +10056,29 @@ uint32 Player::GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipIte Item* Player::GetItemByGuid(uint64 guid) const { for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem->GetGUID() == guid) return pItem; for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem->GetGUID() == guid) return pItem; for (int i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; ++i) - if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) if (pItem->GetGUID() == guid) return pItem; for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i) - if (Bag *pBag = GetBagByPos(i)) + if (Bag* pBag = GetBagByPos(i)) for (uint32 j = 0; j < pBag->GetBagSize(); ++j) if (Item* pItem = pBag->GetItemByPos(j)) if (pItem->GetGUID() == guid) return pItem; for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; ++i) - if (Bag *pBag = GetBagByPos(i)) + if (Bag* pBag = GetBagByPos(i)) for (uint32 j = 0; j < pBag->GetBagSize(); ++j) if (Item* pItem = pBag->GetItemByPos(j)) if (pItem->GetGUID() == guid) @@ -10098,7 +10098,7 @@ Item* Player::GetItemByPos(uint8 bag, uint8 slot) const { if (bag == INVENTORY_SLOT_BAG_0 && (slot < BANK_SLOT_BAG_END || (slot >= KEYRING_SLOT_START && slot < CURRENCYTOKEN_SLOT_END))) return m_items[slot]; - else if (Bag *pBag = GetBagByPos(bag)) + else if (Bag* pBag = GetBagByPos(bag)) return pBag->GetItemByPos(slot); return NULL; } @@ -10273,7 +10273,7 @@ bool Player::HasItemCount(uint32 item, uint32 count, bool inBankAlso) const uint32 tempcount = 0; for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++) { - Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade()) { tempcount += pItem->GetCount(); @@ -10283,7 +10283,7 @@ bool Player::HasItemCount(uint32 item, uint32 count, bool inBankAlso) const } for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i) { - Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade()) { tempcount += pItem->GetCount(); @@ -10312,7 +10312,7 @@ bool Player::HasItemCount(uint32 item, uint32 count, bool inBankAlso) const { for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++) { - Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade()) { tempcount += pItem->GetCount(); @@ -10349,7 +10349,7 @@ bool Player::HasItemOrGemWithIdEquipped(uint32 item, uint32 count, uint8 except_ if (i == except_slot) continue; - Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (pItem && pItem->GetEntry() == item) { tempcount += pItem->GetCount(); @@ -10358,7 +10358,7 @@ bool Player::HasItemOrGemWithIdEquipped(uint32 item, uint32 count, uint8 except_ } } - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item); if (pProto && pProto->GemProperties) { for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i) @@ -10366,7 +10366,7 @@ bool Player::HasItemOrGemWithIdEquipped(uint32 item, uint32 count, uint8 except_ if (i == except_slot) continue; - Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (pItem && pItem->GetTemplate()->Socket[0].Color) { tempcount += pItem->GetGemCountWithID(item); @@ -10387,11 +10387,11 @@ bool Player::HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32 if (i == except_slot) continue; - Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (!pItem) continue; - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); if (!pProto) continue; @@ -10415,7 +10415,7 @@ bool Player::HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32 InventoryResult Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count) const { - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(entry); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(entry); if (!pProto) { if (no_space_count) @@ -10469,7 +10469,7 @@ InventoryResult Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Ite bool Player::HasItemTotemCategory(uint32 TotemCategory) const { - Item *pItem; + Item* pItem; for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i) { pItem = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i); @@ -10484,7 +10484,7 @@ bool Player::HasItemTotemCategory(uint32 TotemCategory) const } for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i) { - if (Bag *pBag = GetBagByPos(i)) + if (Bag* pBag = GetBagByPos(i)) { for (uint32 j = 0; j < pBag->GetBagSize(); ++j) { @@ -10497,7 +10497,7 @@ bool Player::HasItemTotemCategory(uint32 TotemCategory) const return false; } -InventoryResult Player::_CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec &dest, ItemTemplate const *pProto, uint32& count, bool swap, Item* pSrcItem) const +InventoryResult Player::_CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const { Item* pItem2 = GetItemByPos(bag, slot); @@ -10571,7 +10571,7 @@ InventoryResult Player::_CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, Item return EQUIP_ERR_OK; } -InventoryResult Player::_CanStoreItem_InBag(uint8 bag, ItemPosCountVec &dest, ItemTemplate const *pProto, uint32& count, bool merge, bool non_specialized, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const +InventoryResult Player::_CanStoreItem_InBag(uint8 bag, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool merge, bool non_specialized, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const { // skip specific bag already processed in first called _CanStoreItem_InBag if (bag == skip_bag) @@ -10641,7 +10641,7 @@ InventoryResult Player::_CanStoreItem_InBag(uint8 bag, ItemPosCountVec &dest, It return EQUIP_ERR_OK; } -InventoryResult Player::_CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, ItemPosCountVec &dest, ItemTemplate const *pProto, uint32& count, bool merge, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const +InventoryResult Player::_CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, ItemPosCountVec &dest, ItemTemplate const* pProto, uint32& count, bool merge, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const { //this is never called for non-bag slots so we can do this if (pSrcItem && pSrcItem->IsNotEmptyBag()) @@ -10692,11 +10692,11 @@ InventoryResult Player::_CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 s return EQUIP_ERR_OK; } -InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 entry, uint32 count, Item *pItem, bool swap, uint32* no_space_count) const +InventoryResult Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 entry, uint32 count, Item* pItem, bool swap, uint32* no_space_count) const { sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count); - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(entry); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(entry); if (!pProto) { if (no_space_count) @@ -11173,13 +11173,13 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const // check free space for all items for (int k = 0; k < count; ++k) { - Item *pItem = pItems[k]; + Item* pItem = pItems[k]; // no item if (!pItem) continue; sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanStoreItems %i. item = %u, count = %u", k + 1, pItem->GetEntry(), pItem->GetCount()); - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); // strange item if (!pProto) @@ -11193,7 +11193,7 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const if (pItem->IsBindedNotWith(this)) return EQUIP_ERR_DONT_OWN_THAT_ITEM; - ItemTemplate const *pBagProto; + ItemTemplate const* pBagProto; // item is 'one item only' InventoryResult res = CanTakeMoreSimilarItems(pItem); @@ -11371,7 +11371,7 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const InventoryResult Player::CanEquipNewItem(uint8 slot, uint16 &dest, uint32 item, bool swap) const { dest = 0; - Item *pItem = Item::CreateItem(item, 1, this); + Item* pItem = Item::CreateItem(item, 1, this); if (pItem) { InventoryResult result = CanEquipItem(slot, dest, pItem, swap); @@ -11382,13 +11382,13 @@ InventoryResult Player::CanEquipNewItem(uint8 slot, uint16 &dest, uint32 item, b return EQUIP_ERR_ITEM_NOT_FOUND; } -InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item *pItem, bool swap, bool not_loading) const +InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool swap, bool not_loading) const { dest = 0; if (pItem) { sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount()); - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); if (pProto) { // item used @@ -11431,7 +11431,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item *pItem, bool return EQUIP_ERR_CANT_DO_RIGHT_NOW; } - ScalingStatDistributionEntry const *ssd = pProto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(pProto->ScalingStatDistribution) : 0; + ScalingStatDistributionEntry const* ssd = pProto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(pProto->ScalingStatDistribution) : 0; // check allowed level (extend range to upper values if MaxLevel more or equal max player level, this let GM set high level with 1...max range items) if (ssd && ssd->MaxLevel < DEFAULT_MAX_LEVEL && ssd->MaxLevel < getLevel()) return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; @@ -11496,7 +11496,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item *pItem, bool if (!CanTitanGrip()) { // offhand item must can be stored in inventory for offhand item and it also must be unequipped - Item *offItem = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + Item* offItem = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); ItemPosCountVec off_dest; if (offItem && (!not_loading || CanUnequipItem(uint16(INVENTORY_SLOT_BAG_0) << 8 | EQUIPMENT_SLOT_OFFHAND, false) != EQUIP_ERR_OK || @@ -11526,7 +11526,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount()); - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); if (!pProto) return EQUIP_ERR_ITEM_NOT_FOUND; @@ -11553,7 +11553,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const return EQUIP_ERR_OK; } -InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *pItem, bool swap, bool not_loading) const +InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item* pItem, bool swap, bool not_loading) const { if (!pItem) return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND; @@ -11561,7 +11561,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest uint32 count = pItem->GetCount(); sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount()); - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); if (!pProto) return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND; @@ -11740,7 +11740,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest return EQUIP_ERR_BANK_FULL; } -InventoryResult Player::CanUseItem(Item *pItem, bool not_loading) const +InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const { if (pItem) { @@ -11752,7 +11752,7 @@ InventoryResult Player::CanUseItem(Item *pItem, bool not_loading) const //if (isStunned()) // return EQUIP_ERR_YOU_ARE_STUNNED; - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); if (pProto) { if (pItem->IsBindedNotWith(this)) @@ -11845,7 +11845,7 @@ InventoryResult Player::CanUseAmmo(uint32 item) const return EQUIP_ERR_YOU_ARE_DEAD; //if (isStunned()) // return EQUIP_ERR_YOU_ARE_STUNNED; - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item); if (pProto) { if (pProto->InventoryType!= INVTYPE_AMMO) @@ -11910,7 +11910,7 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr) count += itr->count; - Item *pItem = Item::CreateItem(item, count, this); + Item* pItem = Item::CreateItem(item, count, this); if (pItem) { ItemAddedQuestCheck(item, count); @@ -11919,7 +11919,7 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update pItem->SetItemRandomProperties(randomPropertyId); pItem = StoreItem(dest, pItem, update); - const ItemTemplate *proto = pItem->GetTemplate(); + const ItemTemplate* proto = pItem->GetTemplate(); for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger CastSpell(this, proto->Spells[i].SpellId, true, pItem); @@ -11971,7 +11971,7 @@ Item* Player::StoreItem(ItemPosCountVec const& dest, Item* pItem, bool update) } // Return stored item (if stored to stack, it can diff. from pItem). And pItem ca be deleted in this case. -Item* Player::_StoreItem(uint16 pos, Item *pItem, uint32 count, bool clone, bool update) +Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool update) { if (!pItem) return NULL; @@ -11981,7 +11981,7 @@ Item* Player::_StoreItem(uint16 pos, Item *pItem, uint32 count, bool clone, bool sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u, guid = %u", bag, slot, pItem->GetEntry(), count, pItem->GetGUIDLow()); - Item *pItem2 = GetItemByPos(bag, slot); + Item* pItem2 = GetItemByPos(bag, slot); if (!pItem2) { @@ -12071,7 +12071,7 @@ Item* Player::_StoreItem(uint16 pos, Item *pItem, uint32 count, bool clone, bool Item* Player::EquipNewItem(uint16 pos, uint32 item, bool update) { - if (Item *pItem = Item::CreateItem(item, 1, this)) + if (Item* pItem = Item::CreateItem(item, 1, this)) { ItemAddedQuestCheck(item, 1); GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM, item, 1); @@ -12081,7 +12081,7 @@ Item* Player::EquipNewItem(uint16 pos, uint32 item, bool update) return NULL; } -Item* Player::EquipItem(uint16 pos, Item *pItem, bool update) +Item* Player::EquipItem(uint16 pos, Item* pItem, bool update) { AddEnchantmentDurations(pItem); AddItemDurations(pItem); @@ -12089,7 +12089,7 @@ Item* Player::EquipItem(uint16 pos, Item *pItem, bool update) uint8 bag = pos >> 8; uint8 slot = pos & 255; - Item *pItem2 = GetItemByPos(bag, slot); + Item* pItem2 = GetItemByPos(bag, slot); if (!pItem2) { @@ -12097,7 +12097,7 @@ Item* Player::EquipItem(uint16 pos, Item *pItem, bool update) if (isAlive()) { - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); // item set bonuses applied only at equip and removed at unequip, and still active for broken items if (pProto && pProto->ItemSet) @@ -12190,7 +12190,7 @@ Item* Player::EquipItem(uint16 pos, Item *pItem, bool update) return pItem; } -void Player::QuickEquipItem(uint16 pos, Item *pItem) +void Player::QuickEquipItem(uint16 pos, Item* pItem) { if (pItem) { @@ -12211,7 +12211,7 @@ void Player::QuickEquipItem(uint16 pos, Item *pItem) } } -void Player::SetVisibleItemSlot(uint8 slot, Item *pItem) +void Player::SetVisibleItemSlot(uint8 slot, Item* pItem) { if (pItem) { @@ -12226,7 +12226,7 @@ void Player::SetVisibleItemSlot(uint8 slot, Item *pItem) } } -void Player::VisualizeItem(uint8 slot, Item *pItem) +void Player::VisualizeItem(uint8 slot, Item* pItem) { if (!pItem) return; @@ -12257,7 +12257,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update) // note2: if removeitem is to be used for delinking // the item must be removed from the player's updatequeue - Item *pItem = GetItemByPos(bag, slot); + Item* pItem = GetItemByPos(bag, slot); if (pItem) { sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry()); @@ -12270,7 +12270,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update) { if (slot < INVENTORY_SLOT_BAG_END) { - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); // item set bonuses applied only at equip and removed at unequip, and still active for broken items if (pProto && pProto->ItemSet) @@ -12320,7 +12320,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update) if (slot < EQUIPMENT_SLOT_END) SetVisibleItemSlot(slot, NULL); } - else if (Bag *pBag = GetBagByPos(bag)) + else if (Bag* pBag = GetBagByPos(bag)) pBag->RemoveItem(slot, update); pItem->SetUInt64Value(ITEM_FIELD_CONTAINED, 0); @@ -12376,7 +12376,7 @@ void Player::MoveItemToInventory(ItemPosCountVec const& dest, Item* pItem, bool void Player::DestroyItem(uint8 bag, uint8 slot, bool update) { - Item *pItem = GetItemByPos(bag, slot); + Item* pItem = GetItemByPos(bag, slot); if (pItem) { sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry()); @@ -12396,7 +12396,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update) pItem->SetSoulboundTradeable(NULL, this, false); RemoveTradeableItem(pItem); - const ItemTemplate *proto = pItem->GetTemplate(); + const ItemTemplate* proto = pItem->GetTemplate(); for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger RemoveAurasDueToSpell(proto->Spells[i].SpellId); @@ -12410,7 +12410,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update) // equipment and equipped bags can have applied bonuses if (slot < INVENTORY_SLOT_BAG_END) { - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); // item set bonuses applied only at equip and removed at unequip, and still active for broken items if (pProto && pProto->ItemSet) @@ -12446,7 +12446,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update) m_items[slot] = NULL; } - else if (Bag *pBag = GetBagByPos(bag)) + else if (Bag* pBag = GetBagByPos(bag)) pBag->RemoveItem(slot, update); if (IsInWorld() && update) @@ -12527,7 +12527,7 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ // in inventory bags for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++) { - if (Bag *pBag = GetBagByPos(i)) + if (Bag* pBag = GetBagByPos(i)) { for (uint32 j = 0; j < pBag->GetBagSize(); j++) { @@ -12703,7 +12703,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count) uint8 dstbag = dst >> 8; uint8 dstslot = dst & 255; - Item *pSrcItem = GetItemByPos(srcbag, srcslot); + Item* pSrcItem = GetItemByPos(srcbag, srcslot); if (!pSrcItem) { SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, pSrcItem, NULL); @@ -12732,7 +12732,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count) } sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count); - Item *pNewItem = pSrcItem->CloneItem(count, this); + Item* pNewItem = pSrcItem->CloneItem(count, this); if (!pNewItem) { SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, pSrcItem, NULL); @@ -12810,8 +12810,8 @@ void Player::SwapItem(uint16 src, uint16 dst) uint8 dstbag = dst >> 8; uint8 dstslot = dst & 255; - Item *pSrcItem = GetItemByPos(srcbag, srcslot); - Item *pDstItem = GetItemByPos(dstbag, dstslot); + Item* pSrcItem = GetItemByPos(srcbag, srcslot); + Item* pDstItem = GetItemByPos(dstbag, dstslot); if (!pSrcItem) return; @@ -13052,7 +13052,7 @@ void Player::SwapItem(uint16 src, uint16 dst) for (uint32 i=0; i < fullBag->GetBagSize(); ++i) { - Item *bagItem = fullBag->GetItemByPos(i); + Item* bagItem = fullBag->GetItemByPos(i); if (!bagItem) continue; @@ -13078,7 +13078,7 @@ void Player::SwapItem(uint16 src, uint16 dst) count = 0; // will pos in new bag for (uint32 i = 0; i< fullBag->GetBagSize(); ++i) { - Item *bagItem = fullBag->GetItemByPos(i); + Item* bagItem = fullBag->GetItemByPos(i); if (!bagItem) continue; @@ -13122,7 +13122,7 @@ void Player::SwapItem(uint16 src, uint16 dst) Bag* bag = pSrcItem->ToBag(); for (uint32 i = 0; i < bag->GetBagSize(); ++i) { - if (Item *bagItem = bag->GetItemByPos(i)) + if (Item* bagItem = bag->GetItemByPos(i)) { if (bagItem->m_lootGenerated) { @@ -13139,7 +13139,7 @@ void Player::SwapItem(uint16 src, uint16 dst) Bag* bag = pDstItem->ToBag(); for (uint32 i = 0; i < bag->GetBagSize(); ++i) { - if (Item *bagItem = bag->GetItemByPos(i)) + if (Item* bagItem = bag->GetItemByPos(i)) { if (bagItem->m_lootGenerated) { @@ -13155,7 +13155,7 @@ void Player::SwapItem(uint16 src, uint16 dst) AutoUnequipOffhandIfNeed(); } -void Player::AddItemToBuyBackSlot(Item *pItem) +void Player::AddItemToBuyBackSlot(Item* pItem) { if (pItem) { @@ -13197,7 +13197,7 @@ void Player::AddItemToBuyBackSlot(Item *pItem) uint32 eslot = slot - BUYBACK_SLOT_START; SetUInt64Value(PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), pItem->GetGUID()); - if (ItemTemplate const *pProto = pItem->GetTemplate()) + if (ItemTemplate const* pProto = pItem->GetTemplate()) SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, pProto->SellPrice * pItem->GetCount()); else SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, 0); @@ -13222,7 +13222,7 @@ void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del) sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot); if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END) { - Item *pItem = m_items[slot]; + Item* pItem = m_items[slot]; if (pItem) { pItem->RemoveFromWorld(); @@ -13410,7 +13410,7 @@ void Player::UpdateEnchantTime(uint32 time) } } -void Player::AddEnchantmentDurations(Item *item) +void Player::AddEnchantmentDurations(Item* item) { for (int x = 0; x < MAX_ENCHANTMENT_SLOT; ++x) { @@ -13423,7 +13423,7 @@ void Player::AddEnchantmentDurations(Item *item) } } -void Player::RemoveEnchantmentDurations(Item *item) +void Player::RemoveEnchantmentDurations(Item* item) { for (EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end();) { @@ -13484,7 +13484,7 @@ void Player::RemoveArenaEnchantments(EnchantmentSlot slot) } // duration == 0 will remove item enchant -void Player::AddEnchantmentDuration(Item *item, EnchantmentSlot slot, uint32 duration) +void Player::AddEnchantmentDuration(Item* item, EnchantmentSlot slot, uint32 duration) { if (!item) return; @@ -13508,13 +13508,13 @@ void Player::AddEnchantmentDuration(Item *item, EnchantmentSlot slot, uint32 dur } } -void Player::ApplyEnchantment(Item *item, bool apply) +void Player::ApplyEnchantment(Item* item, bool apply) { for (uint32 slot = 0; slot < MAX_ENCHANTMENT_SLOT; ++slot) ApplyEnchantment(item, EnchantmentSlot(slot), apply); } -void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool apply_dur, bool ignore_condition) +void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool apply_dur, bool ignore_condition) { if (!item || !item->IsEquipped()) return; @@ -13526,7 +13526,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool if (!enchant_id) return; - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) return; @@ -13545,7 +13545,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool && !item->GetTemplate()->Socket[slot-SOCK_ENCHANTMENT_SLOT].Color) { // Check if the requirements for the prismatic socket are met before applying the gem stats - SpellItemEnchantmentEntry const *pPrismaticEnchant = sSpellItemEnchantmentStore.LookupEntry(item->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT)); + SpellItemEnchantmentEntry const* pPrismaticEnchant = sSpellItemEnchantmentStore.LookupEntry(item->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT)); if (!pPrismaticEnchant || (pPrismaticEnchant->requiredSkill > 0 && pPrismaticEnchant->requiredSkillValue > GetSkillValue(pPrismaticEnchant->requiredSkill))) return; } @@ -13582,7 +13582,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool // Random Property Exist - try found basepoints for spell (basepoints depends from item suffix factor) if (item->GetItemRandomPropertyId()) { - ItemRandomSuffixEntry const *item_rand = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId())); + ItemRandomSuffixEntry const* item_rand = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId())); if (item_rand) { // Search enchant_amount @@ -13609,7 +13609,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool case ITEM_ENCHANTMENT_TYPE_RESISTANCE: if (!enchant_amount) { - ItemRandomSuffixEntry const *item_rand = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId())); + ItemRandomSuffixEntry const* item_rand = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId())); if (item_rand) { for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) @@ -13629,7 +13629,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool { if (!enchant_amount) { - ItemRandomSuffixEntry const *item_rand_suffix = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId())); + ItemRandomSuffixEntry const* item_rand_suffix = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId())); if (item_rand_suffix) { for (int k = 0; k < MAX_ITEM_ENCHANTMENT_EFFECTS; ++k) @@ -13899,7 +13899,7 @@ void Player::UpdateSkillEnchantments(uint16 skill_id, uint16 curr_value, uint16 if (!ench_id) continue; - SpellItemEnchantmentEntry const *Enchant = sSpellItemEnchantmentStore.LookupEntry(ench_id); + SpellItemEnchantmentEntry const* Enchant = sSpellItemEnchantmentStore.LookupEntry(ench_id); if (!Enchant) return; @@ -13917,7 +13917,7 @@ void Player::UpdateSkillEnchantments(uint16 skill_id, uint16 curr_value, uint16 if ((slot == SOCK_ENCHANTMENT_SLOT || slot == SOCK_ENCHANTMENT_SLOT_2 || slot == SOCK_ENCHANTMENT_SLOT_3) && !m_items[i]->GetTemplate()->Socket[slot-SOCK_ENCHANTMENT_SLOT].Color) { - SpellItemEnchantmentEntry const *pPrismaticEnchant = sSpellItemEnchantmentStore.LookupEntry(m_items[i]->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT)); + SpellItemEnchantmentEntry const* pPrismaticEnchant = sSpellItemEnchantmentStore.LookupEntry(m_items[i]->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT)); if (pPrismaticEnchant && pPrismaticEnchant->requiredSkill == skill_id) { @@ -13948,7 +13948,7 @@ void Player::SendItemDurations() } } -void Player::SendNewItem(Item *item, uint32 count, bool received, bool created, bool broadcast) +void Player::SendNewItem(Item* item, uint32 count, bool received, bool created, bool broadcast) { if (!item) // prevent crash return; @@ -14083,7 +14083,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool } else if (source->GetTypeId() == TYPEID_GAMEOBJECT) { - GameObject *go = source->ToGameObject(); + GameObject* go = source->ToGameObject(); switch (itr->second.OptionType) { @@ -14111,7 +14111,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool if (locale >= 0) { uint32 idxEntry = MAKE_PAIR32(menuId, itr->second.OptionIndex); - if (GossipMenuItemsLocale const *no = sObjectMgr->GetGossipMenuItemsLocale(idxEntry)) + if (GossipMenuItemsLocale const* no = sObjectMgr->GetGossipMenuItemsLocale(idxEntry)) { ObjectMgr::GetLocaleString(no->OptionText, locale, strOptionText); ObjectMgr::GetLocaleString(no->BoxText, locale, strBoxText); @@ -14343,7 +14343,7 @@ void Player::PrepareQuestMenu(uint64 guid) QuestRelationBounds pObjectQIR; // pets also can have quests - Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, guid); + Creature* pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, guid); if (pCreature) { pObjectQR = sObjectMgr->GetCreatureQuestRelationBounds(pCreature->GetEntry()); @@ -14353,9 +14353,9 @@ void Player::PrepareQuestMenu(uint64 guid) { //we should obtain map pointer from GetMap() in 99% of cases. Special case //only for quests which cast teleport spells on player - Map * _map = IsInWorld() ? GetMap() : sMapMgr->FindMap(GetMapId(), GetInstanceId()); + Map* _map = IsInWorld() ? GetMap() : sMapMgr->FindMap(GetMapId(), GetInstanceId()); ASSERT(_map); - GameObject *pGameObject = _map->GetGameObject(guid); + GameObject* pGameObject = _map->GetGameObject(guid); if (pGameObject) { pObjectQR = sObjectMgr->GetGOQuestRelationBounds(pGameObject->GetEntry()); @@ -14454,7 +14454,7 @@ void Player::SendPreparedQuest(uint64 guid) std::string title = ""; // need pet case for some quests - Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, guid); + Creature* pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, guid); if (pCreature) { uint32 textid = GetGossipTextId(pCreature); @@ -14475,7 +14475,7 @@ void Player::SendPreparedQuest(uint64 guid) int loc_idx = GetSession()->GetSessionDbLocaleIndex(); if (loc_idx >= 0) - if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textid)) + if (NpcTextLocale const* nl = sObjectMgr->GetNpcTextLocale(textid)) ObjectMgr::GetLocaleString(nl->Text_0[0], loc_idx, title); } else @@ -14484,7 +14484,7 @@ void Player::SendPreparedQuest(uint64 guid) int loc_idx = GetSession()->GetSessionDbLocaleIndex(); if (loc_idx >= 0) - if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textid)) + if (NpcTextLocale const* nl = sObjectMgr->GetNpcTextLocale(textid)) ObjectMgr::GetLocaleString(nl->Text_1[0], loc_idx, title); } } @@ -14498,20 +14498,20 @@ bool Player::IsActiveQuest(uint32 quest_id) const return m_QuestStatus.find(quest_id) != m_QuestStatus.end(); } -Quest const* Player::GetNextQuest(uint64 guid, Quest const *pQuest) +Quest const* Player::GetNextQuest(uint64 guid, Quest const* pQuest) { QuestRelationBounds pObjectQR; - Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, guid); + Creature* pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, guid); if (pCreature) pObjectQR = sObjectMgr->GetCreatureQuestRelationBounds(pCreature->GetEntry()); else { //we should obtain map pointer from GetMap() in 99% of cases. Special case //only for quests which cast teleport spells on player - Map * _map = IsInWorld() ? GetMap() : sMapMgr->FindMap(GetMapId(), GetInstanceId()); + Map* _map = IsInWorld() ? GetMap() : sMapMgr->FindMap(GetMapId(), GetInstanceId()); ASSERT(_map); - GameObject *pGameObject = _map->GetGameObject(guid); + GameObject* pGameObject = _map->GetGameObject(guid); if (pGameObject) pObjectQR = sObjectMgr->GetGOQuestRelationBounds(pGameObject->GetEntry()); else @@ -14528,7 +14528,7 @@ Quest const* Player::GetNextQuest(uint64 guid, Quest const *pQuest) return NULL; } -bool Player::CanSeeStartQuest(Quest const *pQuest) +bool Player::CanSeeStartQuest(Quest const* pQuest) { if (SatisfyQuestRace(pQuest, false) && SatisfyQuestSkillOrClass(pQuest, false) && SatisfyQuestExclusiveGroup(pQuest, false) && SatisfyQuestReputation(pQuest, false) && @@ -14542,7 +14542,7 @@ bool Player::CanSeeStartQuest(Quest const *pQuest) return false; } -bool Player::CanTakeQuest(Quest const *pQuest, bool msg) +bool Player::CanTakeQuest(Quest const* pQuest, bool msg) { return SatisfyQuestStatus(pQuest, msg) && SatisfyQuestExclusiveGroup(pQuest, msg) && SatisfyQuestRace(pQuest, msg) && SatisfyQuestLevel(pQuest, msg) @@ -14554,7 +14554,7 @@ bool Player::CanTakeQuest(Quest const *pQuest, bool msg) && SatisfyQuestConditions(pQuest, msg); } -bool Player::CanAddQuest(Quest const *pQuest, bool msg) +bool Player::CanAddQuest(Quest const* pQuest, bool msg) { if (!SatisfyQuestLog(msg)) return false; @@ -14650,7 +14650,7 @@ bool Player::CanCompleteQuest(uint32 quest_id) return false; } -bool Player::CanCompleteRepeatableQuest(Quest const *pQuest) +bool Player::CanCompleteRepeatableQuest(Quest const* pQuest) { // Solve problem that player don't have the quest and try complete it. // if repeatable she must be able to complete event if player don't have it. @@ -14669,7 +14669,7 @@ bool Player::CanCompleteRepeatableQuest(Quest const *pQuest) return true; } -bool Player::CanRewardQuest(Quest const *pQuest, bool msg) +bool Player::CanRewardQuest(Quest const* pQuest, bool msg) { // not auto complete quest and not completed quest (only cheating case, then ignore without message) if (!pQuest->IsDFQuest() && !pQuest->IsAutoComplete() && !(pQuest->GetFlags() & QUEST_FLAGS_AUTOCOMPLETE) && GetQuestStatus(pQuest->GetQuestId()) != QUEST_STATUS_COMPLETE) @@ -14705,7 +14705,7 @@ bool Player::CanRewardQuest(Quest const *pQuest, bool msg) return true; } -bool Player::CanRewardQuest(Quest const *pQuest, uint32 reward, bool msg) +bool Player::CanRewardQuest(Quest const* pQuest, uint32 reward, bool msg) { // prevent receive reward with quest items in bank or for not completed quest if (!CanRewardQuest(pQuest, msg)) @@ -14745,7 +14745,7 @@ bool Player::CanRewardQuest(Quest const *pQuest, uint32 reward, bool msg) return true; } -void Player::AddQuest(Quest const *pQuest, Object *questGiver) +void Player::AddQuest(Quest const* pQuest, Object* questGiver) { uint16 log_slot = FindQuestSlot(0); ASSERT(log_slot < MAX_QUEST_LOG_SIZE); @@ -14859,7 +14859,7 @@ void Player::IncompleteQuest(uint32 quest_id) } } -void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver, bool announce) +void Player::RewardQuest(Quest const* pQuest, uint32 reward, Object* questGiver, bool announce) { //this THING should be here to protect code from quest, which cast on player far teleport as a reward //should work fine, cause far teleport will be executed in Player::Update() @@ -15459,7 +15459,7 @@ bool Player::SatisfyQuestWeek(Quest const* qInfo, bool /*msg*/) return m_weeklyquests.find(qInfo->GetQuestId()) == m_weeklyquests.end(); } -bool Player::GiveQuestSourceItem(Quest const *pQuest) +bool Player::GiveQuestSourceItem(Quest const* pQuest) { uint32 srcitem = pQuest->GetSrcItemId(); if (srcitem > 0) @@ -15663,11 +15663,11 @@ void Player::AreaExploredOrEventHappens(uint32 questId) //not used in Trinityd, function for external script library void Player::GroupEventHappens(uint32 questId, WorldObject const* pEventObject) { - if (Group *pGroup = GetGroup()) + if (Group* pGroup = GetGroup()) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *pGroupGuy = itr->getSource(); + Player* pGroupGuy = itr->getSource(); // for any leave or dead (with not released body) group member at appropriate distance if (pGroupGuy && pGroupGuy->IsAtGroupRewardDistance(pEventObject) && !pGroupGuy->GetCorpse()) @@ -15915,7 +15915,7 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id) reqTarget = qInfo->ReqCreatureOrGOId[j]; if (reqTarget != entry) // if entry doesn't match, check for killcredits referenced in template { - CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(entry); + CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry); for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i) if (cinfo->KillCredit[i] == reqTarget) entry = cinfo->KillCredit[i]; @@ -16137,7 +16137,7 @@ bool Player::HasQuestForItem(uint32 itemid) const // examined item is a source item if (qinfo->ReqSourceId[j] == itemid) { - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(itemid); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemid); // 'unique' item if (pProto->MaxCount && int32(GetItemCount(itemid, true)) < pProto->MaxCount) @@ -16168,7 +16168,7 @@ void Player::SendQuestComplete(uint32 quest_id) } } -void Player::SendQuestReward(Quest const *pQuest, uint32 XP, Object * questGiver) +void Player::SendQuestReward(Quest const* pQuest, uint32 XP, Object* questGiver) { uint32 questid = pQuest->GetQuestId(); sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid); @@ -16248,7 +16248,7 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver) } } -void Player::SendPushToPartyResponse(Player *pPlayer, uint32 msg) +void Player::SendPushToPartyResponse(Player* pPlayer, uint32 msg) { if (pPlayer) { @@ -16429,7 +16429,7 @@ bool Player::LoadPositionFromDB(uint32& mapid, float& x, float& y, float& z, flo if (!result) return false; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); x = fields[0].GetFloat(); y = fields[1].GetFloat(); @@ -16480,7 +16480,7 @@ float Player::GetFloatValueFromArray(Tokens const& data, uint16 index) bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) { //// 0 1 2 3 4 5 6 7 8 9 10 11 - //QueryResult *result = CharacterDatabase.PQuery("SELECT guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, " + //QueryResult* result = CharacterDatabase.PQuery("SELECT guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, " // 12 13 14 15 16 17 18 19 20 21 22 23 24 //"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, " // 25 26 27 28 29 30 31 32 33 34 35 36 37 38 @@ -16632,7 +16632,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) if (!arena_team_id) continue; - if (ArenaTeam * at = sArenaTeamMgr->GetArenaTeamById(arena_team_id)) + if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(arena_team_id)) if (at->IsMember(GetGUID())) continue; @@ -16661,7 +16661,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) // Player was saved in Arena or Bg else if (mapEntry && mapEntry->IsBattlegroundOrArena()) { - Battleground *currentBg = NULL; + Battleground* currentBg = NULL; if (m_bgData.bgInstanceID) //saved in Battleground currentBg = sBattlegroundMgr->GetBattleground(m_bgData.bgInstanceID, BATTLEGROUND_TYPE_NONE); @@ -16800,16 +16800,16 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) RelocateToHomebind(); } - // fix crash (because of if (Map *map = _FindMap(instanceId)) in MapInstanced::CreateInstance) + // fix crash (because of if (Map* map = _FindMap(instanceId)) in MapInstanced::CreateInstance) if (instanceId) - if (InstanceSave * save = GetInstanceSave(mapId, mapEntry->IsRaid())) + if (InstanceSave* save = GetInstanceSave(mapId, mapEntry->IsRaid())) if (save->GetInstanceId() != instanceId) instanceId = 0; } // NOW player must have valid map // load the player's map here if it's not already loaded - Map *map = sMapMgr->CreateMap(mapId, this, instanceId); + Map* map = sMapMgr->CreateMap(mapId, this, instanceId); if (!map) { @@ -16830,7 +16830,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) map = sMapMgr->CreateMap(mapId, this, 0); if (!map) { - PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); mapId = info->mapId; Relocate(info->positionX, info->positionY, info->positionZ, 0.0f); sLog->outError("Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", guid, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation()); @@ -17191,7 +17191,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff) sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Loading auras for player %u", GetGUIDLow()); /* 0 1 2 3 4 5 6 7 8 9 10 - QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, + QueryResult* result = CharacterDatabase.PQuery("SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, 11 12 13 maxduration, remaintime, remaincharges FROM character_aura WHERE guid = '%u'", GetGUIDLow()); */ @@ -17268,9 +17268,9 @@ void Player::_LoadGlyphAuras() { if (uint32 glyph = GetGlyph(i)) { - if (GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyph)) + if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) { - if (GlyphSlotEntry const *gs = sGlyphSlotStore.LookupEntry(GetGlyphSlot(i))) + if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(GetGlyphSlot(i))) { if (gp->TypeFlags == gs->TypeFlags) { @@ -17298,7 +17298,7 @@ void Player::LoadCorpse() sObjectAccessor->ConvertCorpseForPlayer(GetGUID()); else { - if (Corpse *corpse = GetCorpse()) + if (Corpse* corpse = GetCorpse()) ApplyModFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTE_RELEASE_TIMER, corpse && !sMapStore.LookupEntry(corpse->GetMapId())->Instanceable()); else //Prevent Dead Player login without corpse @@ -17308,7 +17308,7 @@ void Player::LoadCorpse() void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff) { - //QueryResult *result = CharacterDatabase.PQuery("SELECT data, text, bag, slot, item, item_template FROM character_inventory JOIN item_instance ON character_inventory.item = item_instance.guid WHERE character_inventory.guid = '%u' ORDER BY bag, slot", GetGUIDLow()); + //QueryResult* result = CharacterDatabase.PQuery("SELECT data, text, bag, slot, item, item_template FROM character_inventory JOIN item_instance ON character_inventory.item = item_instance.guid WHERE character_inventory.guid = '%u' ORDER BY bag, slot", GetGUIDLow()); //NOTE: the "order by `bag`" is important because it makes sure //the bagMap is filled before items in the bags are loaded //NOTE2: the "order by `slot`" is needed because mainhand weapons are (wrongly?) @@ -17531,7 +17531,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F } // load mailed item which should receive current player -void Player::_LoadMailedItems(Mail *mail) +void Player::_LoadMailedItems(Mail* mail) { // data needs to be at first place for Item::LoadFromDB PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_MAILITEMS); @@ -17549,7 +17549,7 @@ void Player::_LoadMailedItems(Mail *mail) mail->AddItem(item_guid_low, item_template); - ItemTemplate const *proto = sObjectMgr->GetItemTemplate(item_template); + ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item_template); if (!proto) { @@ -17561,7 +17561,7 @@ void Player::_LoadMailedItems(Mail *mail) continue; } - Item *item = NewItemOrBag(proto); + Item* item = NewItemOrBag(proto); if (!item->LoadFromDB(item_guid_low, MAKE_NEW_GUID(fields[13].GetUInt32(), 0, HIGHGUID_PLAYER), fields, item_template)) { @@ -17582,7 +17582,7 @@ void Player::_LoadMailedItems(Mail *mail) void Player::_LoadMailInit(PreparedQueryResult resultUnread, PreparedQueryResult resultDelivery) { //set a count of unread mails - //QueryResult *resultMails = CharacterDatabase.PQuery("SELECT COUNT(id) FROM mail WHERE receiver = '%u' AND (checked & 1)=0 AND deliver_time <= '" UI64FMTD "'", GUID_LOPART(playerGuid), (uint64)cTime); + //QueryResult* resultMails = CharacterDatabase.PQuery("SELECT COUNT(id) FROM mail WHERE receiver = '%u' AND (checked & 1)=0 AND deliver_time <= '" UI64FMTD "'", GUID_LOPART(playerGuid), (uint64)cTime); if (resultUnread) unReadMails = (*resultUnread)[0].GetUInt8(); @@ -17601,8 +17601,8 @@ void Player::_LoadMail() { do { - Field *fields = result->Fetch(); - Mail *m = new Mail; + Field* fields = result->Fetch(); + Mail* m = new Mail; m->messageID = fields[0].GetUInt32(); m->messageType = fields[1].GetUInt8(); m->sender = fields[2].GetUInt32(); @@ -17642,7 +17642,7 @@ void Player::LoadPet() // just not added to the map if (IsInWorld()) { - Pet *pet = new Pet(this); + Pet* pet = new Pet(this); if (!pet->LoadPetFromDB(this, 0, 0, true)) delete pet; } @@ -17653,7 +17653,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result) uint16 slot = 0; //// 0 1 2 3 4 5 6 7 8 9 10 - //QueryResult *result = CharacterDatabase.PQuery("SELECT quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, itemcount1, itemcount2, itemcount3, + //QueryResult* result = CharacterDatabase.PQuery("SELECT quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, itemcount1, itemcount2, itemcount3, // 11 12 // itemcount4, playercount FROM character_queststatus WHERE guid = '%u'", GetGUIDLow()); @@ -17779,7 +17779,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result) m_DFQuests.clear(); - //QueryResult *result = CharacterDatabase.PQuery("SELECT quest, time FROM character_queststatus_daily WHERE guid = '%u'", GetGUIDLow()); + //QueryResult* result = CharacterDatabase.PQuery("SELECT quest, time FROM character_queststatus_daily WHERE guid = '%u'", GetGUIDLow()); if (result) { @@ -17848,7 +17848,7 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result) void Player::_LoadSpells(PreparedQueryResult result) { - //QueryResult *result = CharacterDatabase.PQuery("SELECT spell, active, disabled FROM character_spell WHERE guid = '%u'", GetGUIDLow()); + //QueryResult* result = CharacterDatabase.PQuery("SELECT spell, active, disabled FROM character_spell WHERE guid = '%u'", GetGUIDLow()); if (result) { @@ -17860,7 +17860,7 @@ void Player::_LoadSpells(PreparedQueryResult result) void Player::_LoadGroup(PreparedQueryResult result) { - //QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM group_member WHERE memberGuid=%u", GetGUIDLow()); + //QueryResult* result = CharacterDatabase.PQuery("SELECT guid FROM group_member WHERE memberGuid=%u", GetGUIDLow()); if (result) { if (Group* group = sGroupMgr->GetGroupByDbStoreId((*result)[0].GetUInt32())) @@ -17884,7 +17884,7 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) Group* group = GetGroup(); - //QueryResult *result = CharacterDatabase.PQuery("SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = '%u'", GUID_LOPART(m_guid)); + //QueryResult* result = CharacterDatabase.PQuery("SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = '%u'", GUID_LOPART(m_guid)); if (result) { do @@ -17932,7 +17932,7 @@ void Player::_LoadBoundInstances(PreparedQueryResult result) } // since non permanent binds are always solo bind, they can always be reset - if (InstanceSave *save = sInstanceSaveMgr->AddInstanceSave(mapId, instanceId, Difficulty(difficulty), resetTime, !perm, true)) + if (InstanceSave* save = sInstanceSaveMgr->AddInstanceSave(mapId, instanceId, Difficulty(difficulty), resetTime, !perm, true)) BindToInstance(save, perm, true); } while (result->NextRow()); @@ -17953,13 +17953,13 @@ InstancePlayerBind* Player::GetBoundInstance(uint32 mapid, Difficulty difficulty return NULL; } -InstanceSave * Player::GetInstanceSave(uint32 mapid, bool raid) +InstanceSave* Player::GetInstanceSave(uint32 mapid, bool raid) { - InstancePlayerBind *pBind = GetBoundInstance(mapid, GetDifficulty(raid)); - InstanceSave *pSave = pBind ? pBind->save : NULL; + InstancePlayerBind* pBind = GetBoundInstance(mapid, GetDifficulty(raid)); + InstanceSave* pSave = pBind ? pBind->save : NULL; if (!pBind || !pBind->perm) if (Group* group = GetGroup()) - if (InstanceGroupBind *groupBind = group->GetBoundInstance(this)) + if (InstanceGroupBind* groupBind = group->GetBoundInstance(this)) pSave = groupBind->save; return pSave; @@ -17982,7 +17982,7 @@ void Player::UnbindInstance(BoundInstancesMap::iterator &itr, Difficulty difficu } } -InstancePlayerBind* Player::BindToInstance(InstanceSave *save, bool permanent, bool load) +InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, bool load) { if (save) { @@ -18044,7 +18044,7 @@ void Player::SendRaidInfo() { if (itr->second.perm) { - InstanceSave *save = itr->second.save; + InstanceSave* save = itr->second.save; data << uint32(save->GetMapId()); // map id data << uint32(save->GetDifficulty()); // difficulty data << uint64(save->GetInstanceId()); // instance id @@ -18217,7 +18217,7 @@ bool Player::CheckInstanceLoginValid() bool Player::_LoadHomeBind(PreparedQueryResult result) { - PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); if (!info) { sLog->outError("Player (Name %s) has incorrect race/class pair. Can't be loaded.", GetName()); @@ -18533,7 +18533,7 @@ void Player::_SaveAuras(SQLTransaction& trans) if (!itr->second->CanBeSaved()) continue; - Aura * aura = itr->second; + Aura* aura = itr->second; int32 damage[MAX_SPELL_EFFECTS]; int32 baseDamage[MAX_SPELL_EFFECTS]; @@ -18584,7 +18584,7 @@ void Player::_SaveInventory(SQLTransaction& trans) // and remove those that aren't already for (uint8 i = BUYBACK_SLOT_START; i < BUYBACK_SLOT_END; ++i) { - Item *item = m_items[i]; + Item* item = m_items[i]; if (!item || item->GetState() == ITEM_NEW) continue; trans->PAppend("DELETE FROM character_inventory WHERE item = '%u'", item->GetGUIDLow()); @@ -18629,16 +18629,16 @@ void Player::_SaveInventory(SQLTransaction& trans) uint32 lowGuid = GetGUIDLow(); for (size_t i = 0; i < m_itemUpdateQueue.size(); ++i) { - Item *item = m_itemUpdateQueue[i]; + Item* item = m_itemUpdateQueue[i]; if (!item) continue; - Bag *container = item->GetContainer(); + Bag* container = item->GetContainer(); uint32 bag_guid = container ? container->GetGUIDLow() : 0; if (item->GetState() != ITEM_REMOVED) { - Item *test = GetItemByPos(item->GetBagSlot(), item->GetSlot()); + Item* test = GetItemByPos(item->GetBagSlot(), item->GetSlot()); if (test == NULL) { uint32 bagTestGUID = 0; @@ -18696,7 +18696,7 @@ void Player::_SaveMail(SQLTransaction& trans) for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr) { - Mail *m = (*itr); + Mail* m = (*itr); if (m->state == MAIL_STATE_CHANGED) { trans->PAppend("UPDATE mail SET has_items = '%u', expire_time = '" UI64FMTD "', deliver_time = '" UI64FMTD "', money = '%u', cod = '%u', checked = '%u' WHERE id = '%u'", @@ -19110,8 +19110,8 @@ void Player::ResetInstances(uint8 method, bool isRaid) for (BoundInstancesMap::iterator itr = m_boundInstances[diff].begin(); itr != m_boundInstances[diff].end();) { - InstanceSave *p = itr->second.save; - const MapEntry *entry = sMapStore.LookupEntry(itr->first); + InstanceSave* p = itr->second.save; + const MapEntry* entry = sMapStore.LookupEntry(itr->first); if (!entry || entry->IsRaid() != isRaid || !p->CanReset()) { ++itr; @@ -19129,7 +19129,7 @@ void Player::ResetInstances(uint8 method, bool isRaid) } // if the map is loaded, reset it - Map *map = sMapMgr->FindMap(p->GetMapId(), p->GetInstanceId()); + Map* map = sMapMgr->FindMap(p->GetMapId(), p->GetInstanceId()); if (map && map->IsDungeon()) if (!((InstanceMap*)map)->Reset(method)) { @@ -19257,7 +19257,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent) { //returning of reagents only for players, so best done here uint32 spellId = pet ? pet->GetUInt32Value(UNIT_CREATED_BY_SPELL) : m_oldpetspell; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (spellInfo) { @@ -19346,7 +19346,7 @@ void Player::StopCastingCharm() } } -inline void Player::BuildPlayerChat(WorldPacket *data, uint8 msgtype, const std::string& text, uint32 language) const +inline void Player::BuildPlayerChat(WorldPacket* data, uint8 msgtype, const std::string& text, uint32 language) const { *data << uint8(msgtype); *data << uint32(language); @@ -19395,7 +19395,7 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver) if (!isAddonMessage) // if not addon data language = LANG_UNIVERSAL; // whispers should always be readable - Player *rPlayer = ObjectAccessor::FindPlayer(receiver); + Player* rPlayer = ObjectAccessor::FindPlayer(receiver); std::string _text(text); sScriptMgr->OnPlayerChat(this, CHAT_MSG_WHISPER, language, _text, rPlayer); @@ -19447,7 +19447,7 @@ void Player::PetSpellInitialize() sLog->outDebug(LOG_FILTER_PETS, "Pet Spells Groups"); - CharmInfo *charmInfo = pet->GetCharmInfo(); + CharmInfo* charmInfo = pet->GetCharmInfo(); WorldPacket data(SMSG_PET_SPELLS, 8+2+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1); data << uint64(pet->GetGUID()); @@ -19513,7 +19513,7 @@ void Player::PossessSpellInitialize() if (!charm) return; - CharmInfo *charmInfo = charm->GetCharmInfo(); + CharmInfo* charmInfo = charm->GetCharmInfo(); if (!charmInfo) { @@ -19622,7 +19622,7 @@ void Player::CharmSpellInitialize() if (!charm) return; - CharmInfo *charmInfo = charm->GetCharmInfo(); + CharmInfo* charmInfo = charm->GetCharmInfo(); if (!charmInfo) { sLog->outError("Player::CharmSpellInitialize(): the player's charm ("UI64FMTD") has no charminfo!", charm->GetGUID()); @@ -19632,7 +19632,7 @@ void Player::CharmSpellInitialize() uint8 addlist = 0; if (charm->GetTypeId() != TYPEID_PLAYER) { - //CreatureInfo const *cinfo = charm->ToCreature()->GetCreatureInfo(); + //CreatureInfo const* cinfo = charm->ToCreature()->GetCreatureInfo(); //if (cinfo && cinfo->type == CREATURE_TYPE_DEMON && getClass() == CLASS_WARLOCK) { for (uint32 i = 0; i < MAX_SPELL_CHARM; ++i) @@ -19659,7 +19659,7 @@ void Player::CharmSpellInitialize() { for (uint32 i = 0; i < MAX_SPELL_CHARM; ++i) { - CharmSpellInfo *cspell = charmInfo->GetCharmSpell(i); + CharmSpellInfo* cspell = charmInfo->GetCharmSpell(i); if (cspell->GetAction()) data << uint32(cspell->packedData); } @@ -19677,7 +19677,7 @@ void Player::SendRemoveControlBar() GetSession()->SendPacket(&data); } -bool Player::IsAffectedBySpellmod(SpellInfo const *spellInfo, SpellModifier *mod, Spell* spell) +bool Player::IsAffectedBySpellmod(SpellInfo const* spellInfo, SpellModifier* mod, Spell* spell) { if (!mod || !spellInfo) return false; @@ -19744,7 +19744,7 @@ void Player::RestoreSpellMods(Spell* spell, uint32 ownerAuraId, Aura* aura) { for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end(); ++itr) { - SpellModifier *mod = *itr; + SpellModifier* mod = *itr; // spellmods without aura set cannot be charged if (!mod->ownerAura || !mod->ownerAura->IsUsingCharges()) @@ -19801,7 +19801,7 @@ void Player::RemoveSpellMods(Spell* spell) { for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end();) { - SpellModifier *mod = *itr; + SpellModifier* mod = *itr; ++itr; // spellmods without aura set cannot be charged @@ -19869,7 +19869,7 @@ void Player::RemovePetitionsAndSigns(uint64 guid, uint32 type) { do // this part effectively does nothing, since the deletion / modification only takes place _after_ the PetitionQuery. Though I don't know if the result remains intact if I execute the delete query beforehand. { // and SendPetitionQueryOpcode reads data from the DB - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint64 ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER); uint64 petitionguid = MAKE_NEW_GUID(fields[1].GetUInt32(), 0, HIGHGUID_ITEM); @@ -20246,7 +20246,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) if (itr->second->state == PLAYERSPELL_REMOVED) continue; uint32 unSpellId = itr->first; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(unSpellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(unSpellId); if (!spellInfo) { ASSERT(spellInfo); @@ -20319,7 +20319,7 @@ void Player::InitDataForForm(bool reapplyMods) void Player::InitDisplayIds() { - PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); if (!info) { sLog->outError("Player %u has incorrect race/class pair. Can't init display ids.", GetGUIDLow()); @@ -20343,7 +20343,7 @@ void Player::InitDisplayIds() } } -inline bool Player::_StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int32 price, ItemTemplate const *pProto, Creature *pVendor, VendorItem const* crItem, bool bStore) +inline bool Player::_StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int32 price, ItemTemplate const* pProto, Creature* pVendor, VendorItem const* crItem, bool bStore) { ItemPosCountVec vDest; uint16 uiDest = 0; @@ -20418,14 +20418,14 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 if (!isAlive()) return false; - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item); if (!pProto) { SendBuyError(BUY_ERR_CANT_FIND_ITEM, NULL, item, 0); return false; } - Creature *pCreature = GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR); + Creature* pCreature = GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: BuyItemFromVendor - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid))); @@ -20556,7 +20556,7 @@ uint32 Player::GetMaxPersonalArenaRatingRequirement(uint32 minarenaslot) const uint32 max_personal_rating = 0; for (uint8 i = minarenaslot; i < MAX_ARENA_SLOT; ++i) { - if (ArenaTeam * at = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamId(i))) + if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(GetArenaTeamId(i))) { uint32 p_rating = GetArenaPersonalRating(i); uint32 t_rating = at->GetRating(); @@ -20802,7 +20802,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot) if (!enchantmentcondition) return true; - SpellItemEnchantmentConditionEntry const *Condition = sSpellItemEnchantmentConditionStore.LookupEntry(enchantmentcondition); + SpellItemEnchantmentConditionEntry const* Condition = sSpellItemEnchantmentConditionStore.LookupEntry(enchantmentcondition); if (!Condition) return true; @@ -20814,7 +20814,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot) { if (i == slot) continue; - Item *pItem2 = GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* pItem2 = GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (pItem2 && !pItem2->IsBroken() && pItem2->GetTemplate()->Socket[0].Color) { for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot) @@ -20932,7 +20932,7 @@ void Player::ToggleMetaGemsActive(uint8 exceptslot, bool apply) if (slot == exceptslot) continue; - Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, slot); + Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, slot); if (!pItem || !pItem->GetTemplate()->Socket[0].Color) //if item has no sockets or no item is equipped go to next item continue; @@ -21001,7 +21001,7 @@ void Player::SetBattlegroundEntryPoint() void Player::LeaveBattleground(bool teleportToEntryPoint) { - if (Battleground *bg = GetBattleground()) + if (Battleground* bg = GetBattleground()) { bg->RemovePlayerAtLeave(GetGUID(), teleportToEntryPoint, true); @@ -21065,7 +21065,7 @@ void Player::ReportedAfkBy(Player* reporter) WorldLocation Player::GetStartPosition() const { - PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); uint32 mapId = info->mapId; if (getClass() == CLASS_DEATH_KNIGHT && HasSpell(50977)) mapId = 0; @@ -21228,7 +21228,7 @@ void Player::UpdateTriggerVisibility() { if (IS_CREATURE_GUID(*itr)) { - Creature *obj = GetMap()->GetCreature(*itr); + Creature* obj = GetMap()->GetCreature(*itr); if (!obj || !(obj->isTrigger() || obj->HasAuraType(SPELL_AURA_TRANSFORM))) // can transform into triggers continue; @@ -21354,7 +21354,7 @@ Player* Player::GetSelectedPlayer() const void Player::SendComboPoints() { - Unit *combotarget = ObjectAccessor::GetUnit(*this, m_comboTarget); + Unit* combotarget = ObjectAccessor::GetUnit(*this, m_comboTarget); if (combotarget) { WorldPacket data; @@ -21575,7 +21575,7 @@ void Player::SendUpdateToOutOfRangeGroupMembers() m_groupUpdateMask = GROUP_UPDATE_FLAG_NONE; m_auraRaidUpdateMask = 0; - if (Pet *pet = GetPet()) + if (Pet* pet = GetPet()) pet->ResetAuraUpdateMaskForRaid(); } @@ -21671,7 +21671,7 @@ void Player::resetSpells(bool myClassOnly) for (PlayerSpellMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(iter->first); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(iter->first); if (!spellInfo) continue; @@ -21708,7 +21708,7 @@ void Player::resetSpells(bool myClassOnly) void Player::learnDefaultSpells() { // learn default race/class spells - PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); for (PlayerCreateInfoSpells::const_iterator itr = info->spell.begin(); itr != info->spell.end(); ++itr) { uint32 tspell = *itr; @@ -21736,7 +21736,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest) return; } - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); if (!spellInfo) return; @@ -21764,7 +21764,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest) if (!HasSpell(first_spell)) return; - SpellInfo const *learnedInfo = sSpellMgr->GetSpellInfo(learned_0); + SpellInfo const* learnedInfo = sSpellMgr->GetSpellInfo(learned_0); if (!learnedInfo) return; @@ -21782,7 +21782,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest) if (itr->second->state == PLAYERSPELL_REMOVED || itr->first == learned_0) continue; - SpellInfo const *itrInfo = sSpellMgr->GetSpellInfo(itr->first); + SpellInfo const* itrInfo = sSpellMgr->GetSpellInfo(itr->first); if (!itrInfo) return; @@ -21820,7 +21820,7 @@ void Player::learnSkillRewardedSpells(uint32 skill_id, uint32 skill_value) uint32 classMask = getClassMask(); for (uint32 j=0; j<sSkillLineAbilityStore.GetNumRows(); ++j) { - SkillLineAbilityEntry const *pAbility = sSkillLineAbilityStore.LookupEntry(j); + SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j); if (!pAbility || pAbility->skillId != skill_id || pAbility->learnOnGetSkill != ABILITY_LEARNED_ON_GET_PROFESSION_SKILL) continue; // Check race if set @@ -21852,7 +21852,7 @@ void Player::SendAurasForTarget(Unit* target) WorldPacket data(SMSG_AURA_UPDATE_ALL); data.append(target->GetPackGUID()); - Unit::VisibleAuraMap const *visibleAuras = target->GetVisibleAuras(); + Unit::VisibleAuraMap const* visibleAuras = target->GetVisibleAuras(); for (Unit::VisibleAuraMap::const_iterator itr = visibleAuras->begin(); itr != visibleAuras->end(); ++itr) { AuraApplication * auraApp = itr->second; @@ -21926,7 +21926,7 @@ Battleground* Player::GetBattleground() const bool Player::InArena() const { - Battleground *bg = GetBattleground(); + Battleground* bg = GetBattleground(); if (!bg || !bg->isArena()) return false; @@ -21936,7 +21936,7 @@ bool Player::InArena() const bool Player::GetBGAccessByLevel(BattlegroundTypeId bgTypeId) const { // get a template bg instead of running one - Battleground *bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId); + Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId); if (!bg) return false; @@ -22036,12 +22036,12 @@ void Player::UpdateForQuestWorldObjects() { if (IS_GAMEOBJECT_GUID(*itr)) { - if (GameObject *obj = HashMapHolder<GameObject>::Find(*itr)) + if (GameObject* obj = HashMapHolder<GameObject>::Find(*itr)) obj->BuildValuesUpdateBlockForPlayer(&udata, this); } else if (IS_CRE_OR_VEH_GUID(*itr)) { - Creature *obj = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, *itr); + Creature* obj = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, *itr); if (!obj) continue; @@ -22083,7 +22083,7 @@ void Player::SummonIfPossible(bool agree) // drop flag at summon // this code can be reached only when GM is summoning player who carries flag, because player should be immune to summoning spells when he carries flag - if (Battleground *bg = GetBattleground()) + if (Battleground* bg = GetBattleground()) bg->EventPlayerDroppedFlag(this); m_summon_expire = 0; @@ -22093,7 +22093,7 @@ void Player::SummonIfPossible(bool agree) TeleportTo(m_summon_mapid, m_summon_x, m_summon_y, m_summon_z, GetOrientation()); } -void Player::RemoveItemDurations(Item *item) +void Player::RemoveItemDurations(Item* item) { for (ItemDurationList::iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); ++itr) { @@ -22105,7 +22105,7 @@ void Player::RemoveItemDurations(Item *item) } } -void Player::AddItemDurations(Item *item) +void Player::AddItemDurations(Item* item) { if (item->GetUInt32Value(ITEM_FIELD_DURATION)) { @@ -22116,7 +22116,7 @@ void Player::AddItemDurations(Item *item) void Player::AutoUnequipOffhandIfNeed(bool force /*= false*/) { - Item *offItem = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + Item* offItem = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); if (!offItem) return; @@ -22149,7 +22149,7 @@ void Player::AutoUnequipOffhandIfNeed(bool force /*= false*/) } } -OutdoorPvP * Player::GetOutdoorPvP() const +OutdoorPvP* Player::GetOutdoorPvP() const { return sOutdoorPvPMgr->GetOutdoorPvPToZoneId(GetZoneId()); } @@ -22166,7 +22166,7 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons case ITEM_CLASS_WEAPON: { for (uint8 i= EQUIPMENT_SLOT_MAINHAND; i < EQUIPMENT_SLOT_TABARD; ++i) - if (Item *item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i)) if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo)) return true; break; @@ -22175,17 +22175,17 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons { // tabard not have dependent spells for (uint8 i= EQUIPMENT_SLOT_START; i< EQUIPMENT_SLOT_MAINHAND; ++i) - if (Item *item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i)) + if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i)) if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo)) return true; // shields can be equipped to offhand slot - if (Item *item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND)) + if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND)) if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo)) return true; // ranged slot can have some armor subclasses - if (Item *item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED)) + if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED)) if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo)) return true; @@ -22221,7 +22221,7 @@ void Player::RemoveItemDependentAurasAndCasts(Item* pItem) { for (AuraMap::iterator itr = m_ownedAuras.begin(); itr != m_ownedAuras.end();) { - Aura * aura = itr->second; + Aura* aura = itr->second; // skip passive (passive item dependent spells work in another way) and not self applied auras SpellInfo const* spellInfo = aura->GetSpellInfo(); @@ -22318,7 +22318,7 @@ bool Player::GetsRecruitAFriendBonus(bool forXP) { if (Group* group = this->GetGroup()) { - for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupGuy = itr->getSource(); if (!pGroupGuy) @@ -22364,9 +22364,9 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar uint64 creature_guid = (pRewardSource->GetTypeId() == TYPEID_UNIT) ? pRewardSource->GetGUID() : uint64(0); // prepare data for near group iteration - if (Group *pGroup = GetGroup()) + if (Group* pGroup = GetGroup()) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupGuy = itr->getSource(); if (!pGroupGuy) @@ -22599,14 +22599,14 @@ void Player::SendCorpseReclaimDelay(bool load) Player* Player::GetNextRandomRaidMember(float radius) { - Group *pGroup = GetGroup(); + Group* pGroup = GetGroup(); if (!pGroup) return NULL; std::vector<Player*> nearMembers; nearMembers.reserve(pGroup->GetMembersCount()); - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); @@ -22883,7 +22883,7 @@ uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 n if ((hairstyle == newhairstyle) && (haircolor == newhaircolor) && (facialhair == newfacialhair) && (!newSkin || (newSkin->hair_id == skincolor))) return 0; - GtBarberShopCostBaseEntry const *bsc = sGtBarberShopCostBaseStore.LookupEntry(level - 1); + GtBarberShopCostBaseEntry const* bsc = sGtBarberShopCostBaseStore.LookupEntry(level - 1); if (!bsc) // shouldn't happen return 0xFFFFFFFF; @@ -23008,7 +23008,7 @@ bool Player::isTotalImmunity() void Player::UpdateCharmedAI() { //This should only called in Player::Update - Creature *charmer = GetCharmer()->ToCreature(); + Creature* charmer = GetCharmer()->ToCreature(); //kill self if charm aura has infinite duration if (charmer->IsInEvadeMode()) @@ -23179,11 +23179,11 @@ void Player::AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore cons void Player::StoreLootItem(uint8 lootSlot, Loot* loot) { - QuestItem *qitem = NULL; - QuestItem *ffaitem = NULL; - QuestItem *conditem = NULL; + QuestItem* qitem = NULL; + QuestItem* ffaitem = NULL; + QuestItem* conditem = NULL; - LootItem *item = loot->LootItemInSlot(lootSlot, this, &qitem, &ffaitem, &conditem); + LootItem* item = loot->LootItemInSlot(lootSlot, this, &qitem, &ffaitem, &conditem); if (!item) { @@ -23292,7 +23292,7 @@ void Player::_LoadSkills(PreparedQueryResult result) uint16 value = fields[1].GetUInt16(); uint16 max = fields[2].GetUInt16(); - SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(skill); + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill); if (!pSkill) { sLog->outError("Character %u has skill %u that does not exist.", GetGUIDLow(), skill); @@ -23529,12 +23529,12 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) if (talentRank >= MAX_TALENT_RANK) return; - TalentEntry const *talentInfo = sTalentStore.LookupEntry(talentId); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId); if (!talentInfo) return; - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) return; @@ -23565,7 +23565,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) // Check if it requires another talent if (talentInfo->DependsOn > 0) { - if (TalentEntry const *depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn)) + if (TalentEntry const* depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn)) { bool hasEnoughRank = false; for (uint8 rank = talentInfo->DependsOnRank; rank < MAX_TALENT_RANK; rank++) @@ -23589,7 +23589,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) for (uint32 i = 0; i < numRows; i++) // Loop through all talents. { // Someday, someone needs to revamp - const TalentEntry *tmpTalent = sTalentStore.LookupEntry(i); + const TalentEntry* tmpTalent = sTalentStore.LookupEntry(i); if (tmpTalent) // the way talents are tracked { if (tmpTalent->TalentTab == tTab) @@ -23637,7 +23637,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank) void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank) { - Pet *pet = GetPet(); + Pet* pet = GetPet(); if (!pet) return; @@ -23653,22 +23653,22 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank) if (talentRank >= MAX_PET_TALENT_RANK) return; - TalentEntry const *talentInfo = sTalentStore.LookupEntry(talentId); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId); if (!talentInfo) return; - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) return; - CreatureTemplate const *ci = pet->GetCreatureInfo(); + CreatureTemplate const* ci = pet->GetCreatureInfo(); if (!ci) return; - CreatureFamilyEntry const *pet_family = sCreatureFamilyStore.LookupEntry(ci->family); + CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family); if (!pet_family) return; @@ -23702,7 +23702,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank) // Check if it requires another talent if (talentInfo->DependsOn > 0) { - if (TalentEntry const *depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn)) + if (TalentEntry const* depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn)) { bool hasEnoughRank = false; for (uint8 rank = talentInfo->DependsOnRank; rank < MAX_TALENT_RANK; rank++) @@ -23726,7 +23726,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank) for (uint32 i = 0; i < numRows; ++i) // Loop through all talents. { // Someday, someone needs to revamp - const TalentEntry *tmpTalent = sTalentStore.LookupEntry(i); + const TalentEntry* tmpTalent = sTalentStore.LookupEntry(i); if (tmpTalent) // the way talents are tracked { if (tmpTalent->TalentTab == tTab) @@ -23816,7 +23816,7 @@ void Player::ResummonPetTemporaryUnSummonedIfAny() m_temporaryUnsummonedPetNumber = 0; } -bool Player::canSeeSpellClickOn(Creature const *c) const +bool Player::canSeeSpellClickOn(Creature const* c) const { if (!c->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK)) return false; @@ -23832,7 +23832,7 @@ bool Player::canSeeSpellClickOn(Creature const *c) const return false; } -void Player::BuildPlayerTalentsInfoData(WorldPacket *data) +void Player::BuildPlayerTalentsInfoData(WorldPacket* data) { *data << uint32(GetFreeTalentPoints()); // unspentTalentPoints *data << uint8(m_specsCount); // talent group count (0, 1 or 2) @@ -23899,7 +23899,7 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data) } } -void Player::BuildPetTalentsInfoData(WorldPacket *data) +void Player::BuildPetTalentsInfoData(WorldPacket* data) { uint32 unspentTalentPoints = 0; size_t pointsPos = data->wpos(); @@ -23909,7 +23909,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket *data) size_t countPos = data->wpos(); *data << uint8(talentIdCount); // [PH], talentIdCount - Pet *pet = GetPet(); + Pet* pet = GetPet(); if (!pet) return; @@ -23917,17 +23917,17 @@ void Player::BuildPetTalentsInfoData(WorldPacket *data) data->put<uint32>(pointsPos, unspentTalentPoints); // put real points - CreatureTemplate const *ci = pet->GetCreatureInfo(); + CreatureTemplate const* ci = pet->GetCreatureInfo(); if (!ci) return; - CreatureFamilyEntry const *pet_family = sCreatureFamilyStore.LookupEntry(ci->family); + CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family); if (!pet_family || pet_family->petTalentType < 0) return; for (uint32 talentTabId = 1; talentTabId < sTalentTabStore.GetNumRows(); ++talentTabId) { - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentTabId); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentTabId); if (!talentTabInfo) continue; @@ -23982,7 +23982,7 @@ void Player::SendTalentsInfoData(bool pet) GetSession()->SendPacket(&data); } -void Player::BuildEnchantmentsInfoData(WorldPacket *data) +void Player::BuildEnchantmentsInfoData(WorldPacket* data) { uint32 slotUsedMask = 0; size_t slotUsedMaskPos = data->wpos(); @@ -23990,7 +23990,7 @@ void Player::BuildEnchantmentsInfoData(WorldPacket *data) for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i) { - Item *item = GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (!item) continue; @@ -24202,7 +24202,7 @@ void Player::ResetMap() GetMapRef().unlink(); } -void Player::SetMap(Map * map) +void Player::SetMap(Map* map) { Unit::SetMap(map); m_mapRef.link(map, this); @@ -24349,12 +24349,12 @@ void Player::ActivateSpec(uint8 spec) // m_actionButtons.clear() is called in the next _LoadActionButtons for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { - TalentEntry const *talentInfo = sTalentStore.LookupEntry(i); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(i); if (!talentInfo) continue; - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) continue; @@ -24371,7 +24371,7 @@ void Player::ActivateSpec(uint8 spec) if (talentInfo->RankID[rank] == 0) continue; removeSpell(talentInfo->RankID[rank], true); // removes the talent, and all dependant, learned, and chained spells.. - if (const SpellInfo *_spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank])) + if (const SpellInfo* _spellEntry = sSpellMgr->GetSpellInfo(talentInfo->RankID[rank])) for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) // search through the SpellInfo for valid trigger spells if (_spellEntry->Effects[i].TriggerSpell > 0 && _spellEntry->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL) removeSpell(_spellEntry->Effects[i].TriggerSpell, true); // and remove any spells that the talent teaches @@ -24386,7 +24386,7 @@ void Player::ActivateSpec(uint8 spec) for (uint8 slot = 0; slot < MAX_GLYPH_SLOT_INDEX; ++slot) // remove secondary glyph if (uint32 oldglyph = m_Glyphs[m_activeSpec][slot]) - if (GlyphPropertiesEntry const *old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph)) + if (GlyphPropertiesEntry const* old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph)) RemoveAurasDueToSpell(old_gp->SpellId); SetActiveSpec(spec); @@ -24394,12 +24394,12 @@ void Player::ActivateSpec(uint8 spec) for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId) { - TalentEntry const *talentInfo = sTalentStore.LookupEntry(talentId); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId); if (!talentInfo) continue; - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) continue; @@ -24430,7 +24430,7 @@ void Player::ActivateSpec(uint8 spec) // apply primary glyph if (glyph) - if (GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyph)) + if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) CastSpell(this, gp->SpellId, true); SetGlyph(slot, glyph); @@ -24510,7 +24510,7 @@ void Player::DeleteRefundReference(uint32 it) } } -void Player::SendRefundInfo(Item *item) +void Player::SendRefundInfo(Item* item) { // This function call unsets ITEM_FLAGS_REFUNDABLE if played time is over 2 hours. item->UpdatePlayedTime(this); @@ -24573,7 +24573,7 @@ bool Player::AddItem(uint32 itemId, uint32 count) return true; } -void Player::RefundItem(Item *item) +void Player::RefundItem(Item* item) { if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE)) { diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 5ec32002854..ed3de8e8767 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -114,14 +114,14 @@ struct PlayerTalent // Spell modifier (used for modify other spells) struct SpellModifier { - SpellModifier(Aura * _ownerAura = NULL) : charges(0), ownerAura(_ownerAura) {} + SpellModifier(Aura* _ownerAura = NULL) : charges(0), ownerAura(_ownerAura) {} SpellModOp op : 8; SpellModType type : 8; int16 charges : 16; int32 value; flag96 mask; uint32 spellId; - Aura * const ownerAura; + Aura* const ownerAura; }; typedef UNORDERED_MAP<uint32, PlayerTalent*> PlayerTalentMap; @@ -276,8 +276,8 @@ struct DuelInfo { DuelInfo() : initiator(NULL), opponent(NULL), startTimer(0), startTime(0), outOfBound(0) {} - Player *initiator; - Player *opponent; + Player* initiator; + Player* opponent; time_t startTimer; time_t startTime; time_t outOfBound; @@ -824,7 +824,7 @@ enum PlayerDelayedOperations struct InstancePlayerBind { - InstanceSave *save; + InstanceSave* save; bool perm; /* 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 @@ -1063,7 +1063,7 @@ class Player : public Unit, public GridObject<Player> friend void Item::AddToUpdateQueueOf(Player* player); friend void Item::RemoveFromUpdateQueueOf(Player* player); public: - explicit Player (WorldSession *session); + explicit Player (WorldSession* session); ~Player (); void CleanupsBeforeDelete(bool finalCleanup = true); @@ -1075,7 +1075,7 @@ class Player : public Unit, public GridObject<Player> void RemoveFromWorld(); bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options = 0); - void TeleportOutOfMap(Map *oldMap); + void TeleportOutOfMap(Map* oldMap); bool TeleportTo(WorldLocation const &loc, uint32 options = 0) { @@ -1194,7 +1194,7 @@ class Player : public Unit, public GridObject<Player> void Yell(const std::string& text, const uint32 language); void TextEmote(const std::string& text); void Whisper(const std::string& text, const uint32 language, uint64 receiver); - void BuildPlayerChat(WorldPacket *data, uint8 msgtype, const std::string& text, uint32 language) const; + void BuildPlayerChat(WorldPacket* data, uint8 msgtype, const std::string& text, uint32 language) const; /*********************************************************/ /*** STORAGE SYSTEM ***/ @@ -1219,7 +1219,7 @@ class Player : public Unit, public GridObject<Player> Item* GetWeaponForAttack(WeaponAttackType attackType, bool useable = false) const; Item* GetShield(bool useable = false) const; static uint8 GetAttackBySlot(uint8 slot); // MAX_ATTACK if not weapon slot - std::vector<Item *> &GetItemUpdateQueue() { return m_itemUpdateQueue; } + std::vector<Item*> &GetItemUpdateQueue() { return m_itemUpdateQueue; } static bool IsInventoryPos(uint16 pos) { return IsInventoryPos(pos >> 8, pos & 255); } static bool IsInventoryPos(uint8 bag, uint8 slot); static bool IsEquipmentPos(uint16 pos) { return IsEquipmentPos(pos >> 8, pos & 255); } @@ -1252,7 +1252,7 @@ class Player : public Unit, public GridObject<Player> } InventoryResult CanStoreItems(Item** pItem, int count) const; InventoryResult CanEquipNewItem(uint8 slot, uint16& dest, uint32 item, bool swap) const; - InventoryResult CanEquipItem(uint8 slot, uint16& dest, Item *pItem, bool swap, bool not_loading = true) const; + InventoryResult CanEquipItem(uint8 slot, uint16& dest, Item* pItem, bool swap, bool not_loading = true) const; InventoryResult CanEquipUniqueItem(Item* pItem, uint8 except_slot = NULL_SLOT, uint32 limit_count = 1) const; InventoryResult CanEquipUniqueItem(ItemTemplate const* itemProto, uint8 except_slot = NULL_SLOT, uint32 limit_count = 1) const; @@ -1265,9 +1265,9 @@ class Player : public Unit, public GridObject<Player> InventoryResult CanUseAmmo(uint32 item) const; Item* StoreNewItem(ItemPosCountVec const& pos, uint32 item, bool update, int32 randomPropertyId = 0, AllowedLooterSet* allowedLooters = NULL); - Item* StoreItem(ItemPosCountVec const& pos, Item *pItem, bool update); + Item* StoreItem(ItemPosCountVec const& pos, Item* pItem, bool update); Item* EquipNewItem(uint16 pos, uint32 item, bool update); - Item* EquipItem(uint16 pos, Item *pItem, bool update); + Item* EquipItem(uint16 pos, Item* pItem, bool update); void AutoUnequipOffhandIfNeed(bool force = false); bool StoreNewItemInBestSlots(uint32 item_id, uint32 item_count); void AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store, bool broadcast = false); @@ -1275,7 +1275,7 @@ class Player : public Unit, public GridObject<Player> void StoreLootItem(uint8 lootSlot, Loot* loot); InventoryResult _CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const; - InventoryResult _CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item *pItem = NULL, bool swap = false, uint32* no_space_count = NULL) const; + InventoryResult _CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item* pItem = NULL, bool swap = false, uint32* no_space_count = NULL) const; void AddRefundReference(uint32 it); void DeleteRefundReference(uint32 it); @@ -1284,15 +1284,15 @@ class Player : public Unit, public GridObject<Player> void SetAmmo(uint32 item); void RemoveAmmo(); float GetAmmoDPS() const { return m_ammoDPS; } - bool CheckAmmoCompatibility(const ItemTemplate *ammo_proto) const; - void QuickEquipItem(uint16 pos, Item *pItem); - void VisualizeItem(uint8 slot, Item *pItem); - void SetVisibleItemSlot(uint8 slot, Item *pItem); - Item* BankItem(ItemPosCountVec const& dest, Item *pItem, bool update) + bool CheckAmmoCompatibility(const ItemTemplate* ammo_proto) const; + void QuickEquipItem(uint16 pos, Item* pItem); + void VisualizeItem(uint8 slot, Item* pItem); + void SetVisibleItemSlot(uint8 slot, Item* pItem); + Item* BankItem(ItemPosCountVec const& dest, Item* pItem, bool update) { return StoreItem(dest, pItem, update); } - Item* BankItem(uint16 pos, Item *pItem, bool update); + Item* BankItem(uint16 pos, Item* pItem, bool update); void RemoveItem(uint8 bag, uint8 slot, bool update); void MoveItemFromInventory(uint8 bag, uint8 slot, bool update); // in trade, auction, guild bank, mail.... @@ -1306,7 +1306,7 @@ class Player : public Unit, public GridObject<Player> void DestroyZoneLimitedItem(bool update, uint32 new_zone); void SplitItem(uint16 src, uint16 dst, uint32 count); void SwapItem(uint16 src, uint16 dst); - void AddItemToBuyBackSlot(Item *pItem); + void AddItemToBuyBackSlot(Item* pItem); Item* GetItemFromBuyBackSlot(uint32 slot); void RemoveItemFromBuyBackSlot(uint32 slot, bool del); uint32 GetMaxKeyringSize() const { return KEYRING_SLOT_END-KEYRING_SLOT_START; } @@ -1327,9 +1327,9 @@ class Player : public Unit, public GridObject<Player> Item* mainItem = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND); return mainItem && mainItem->GetTemplate()->InventoryType == INVTYPE_2HWEAPON && !CanTitanGrip(); } - void SendNewItem(Item *item, uint32 count, bool received, bool created, bool broadcast = false); + void SendNewItem(Item* item, uint32 count, bool received, bool created, bool broadcast = false); bool BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot); - bool _StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int32 price, ItemTemplate const *pProto, Creature *pVendor, VendorItem const* crItem, bool bStore); + bool _StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int32 price, ItemTemplate const* pProto, Creature* pVendor, VendorItem const* crItem, bool bStore); float GetReputationPriceDiscount(Creature const* pCreature) const; @@ -1341,17 +1341,17 @@ class Player : public Unit, public GridObject<Player> void UpdateSoulboundTradeItems(); void RemoveTradeableItem(Item* item); void UpdateItemDuration(uint32 time, bool realtimeonly = false); - void AddEnchantmentDurations(Item *item); - void RemoveEnchantmentDurations(Item *item); + void AddEnchantmentDurations(Item* item); + void RemoveEnchantmentDurations(Item* item); void RemoveArenaEnchantments(EnchantmentSlot slot); - void AddEnchantmentDuration(Item *item, EnchantmentSlot slot, uint32 duration); - void ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool apply_dur = true, bool ignore_condition = false); - void ApplyEnchantment(Item *item, bool apply); + void AddEnchantmentDuration(Item* item, EnchantmentSlot slot, uint32 duration); + void ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool apply_dur = true, bool ignore_condition = false); + void ApplyEnchantment(Item* item, bool apply); void UpdateSkillEnchantments(uint16 skill_id, uint16 curr_value, uint16 new_value); void SendEnchantmentDurations(); - void BuildEnchantmentsInfoData(WorldPacket *data); - void AddItemDurations(Item *item); - void RemoveItemDurations(Item *item); + void BuildEnchantmentsInfoData(WorldPacket* data); + void AddItemDurations(Item* item); + void RemoveItemDurations(Item* item); void SendItemDurations(); void LoadCorpse(); void LoadPet(); @@ -1381,18 +1381,18 @@ class Player : public Unit, public GridObject<Player> void PrepareQuestMenu(uint64 guid); void SendPreparedQuest(uint64 guid); bool IsActiveQuest(uint32 quest_id) const; - Quest const *GetNextQuest(uint64 guid, Quest const *pQuest); - bool CanSeeStartQuest(Quest const *pQuest); - bool CanTakeQuest(Quest const *pQuest, bool msg); - bool CanAddQuest(Quest const *pQuest, bool msg); + Quest const* GetNextQuest(uint64 guid, Quest const* pQuest); + bool CanSeeStartQuest(Quest const* pQuest); + bool CanTakeQuest(Quest const* pQuest, bool msg); + bool CanAddQuest(Quest const* pQuest, bool msg); bool CanCompleteQuest(uint32 quest_id); - bool CanCompleteRepeatableQuest(Quest const *pQuest); - bool CanRewardQuest(Quest const *pQuest, bool msg); - bool CanRewardQuest(Quest const *pQuest, uint32 reward, bool msg); - void AddQuest(Quest const *pQuest, Object *questGiver); + bool CanCompleteRepeatableQuest(Quest const* pQuest); + bool CanRewardQuest(Quest const* pQuest, bool msg); + bool CanRewardQuest(Quest const* pQuest, uint32 reward, bool msg); + void AddQuest(Quest const* pQuest, Object* questGiver); void CompleteQuest(uint32 quest_id); void IncompleteQuest(uint32 quest_id); - void RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver, bool announce = true); + void RewardQuest(Quest const* pQuest, uint32 reward, Object* questGiver, bool announce = true); void FailQuest(uint32 quest_id); bool SatisfyQuestSkillOrClass(Quest const* qInfo, bool msg); bool SatisfyQuestLevel(Quest const* qInfo, bool msg); @@ -1408,7 +1408,7 @@ class Player : public Unit, public GridObject<Player> bool SatisfyQuestPrevChain(Quest const* qInfo, bool msg); bool SatisfyQuestDay(Quest const* qInfo, bool msg); bool SatisfyQuestWeek(Quest const* qInfo, bool msg); - bool GiveQuestSourceItem(Quest const *pQuest); + bool GiveQuestSourceItem(Quest const* pQuest); bool TakeQuestSourceItem(uint32 questId, bool msg); bool GetQuestRewardStatus(uint32 quest_id) const; QuestStatus GetQuestStatus(uint32 quest_id) const; @@ -1474,12 +1474,12 @@ class Player : public Unit, public GridObject<Player> bool CanShareQuest(uint32 quest_id) const; void SendQuestComplete(uint32 quest_id); - void SendQuestReward(Quest const *pQuest, uint32 XP, Object* questGiver); + void SendQuestReward(Quest const* pQuest, uint32 XP, Object* questGiver); void SendQuestFailed(uint32 questId, InventoryResult reason = EQUIP_ERR_OK); void SendQuestTimerFailed(uint32 quest_id); void SendCanTakeQuestResponse(uint32 msg); void SendQuestConfirmAccept(Quest const* pQuest, Player* pReceiver); - void SendPushToPartyResponse(Player *pPlayer, uint32 msg); + void SendPushToPartyResponse(Player* pPlayer, uint32 msg); void SendQuestUpdateAddItem(Quest const* pQuest, uint32 item_idx, uint16 count); void SendQuestUpdateAddCreatureOrGo(Quest const* pQuest, uint64 guid, uint32 creatureOrGO_idx, uint16 old_count, uint16 add_count); void SendQuestUpdateAddPlayer(Quest const* pQuest, uint16 old_count, uint16 add_count); @@ -1567,8 +1567,8 @@ class Player : public Unit, public GridObject<Player> } uint64 GetSelection() const { return m_curSelection; } - Unit *GetSelectedUnit() const; - Player *GetSelectedPlayer() const; + Unit* GetSelectedUnit() const; + Player* GetSelectedPlayer() const; void SetSelection(uint64 guid) { m_curSelection = guid; SetUInt64Value(UNIT_FIELD_TARGET, guid); } uint8 GetComboPoints() { return m_comboPoints; } @@ -1654,8 +1654,8 @@ class Player : public Unit, public GridObject<Player> bool resetTalents(bool no_cost = false); uint32 resetTalentsCost() const; void InitTalentForLevel(); - void BuildPlayerTalentsInfoData(WorldPacket *data); - void BuildPetTalentsInfoData(WorldPacket *data); + void BuildPlayerTalentsInfoData(WorldPacket* data); + void BuildPetTalentsInfoData(WorldPacket* data); void SendTalentsInfoData(bool pet); void LearnTalent(uint32 talentId, uint32 talentRank); void LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank); @@ -1693,7 +1693,7 @@ class Player : public Unit, public GridObject<Player> SpellCooldowns const& GetSpellCooldownMap() const { return m_spellCooldowns; } void AddSpellMod(SpellModifier* mod, bool apply); - bool IsAffectedBySpellmod(SpellInfo const *spellInfo, SpellModifier *mod, Spell* spell = NULL); + bool IsAffectedBySpellmod(SpellInfo const* spellInfo, SpellModifier* mod, Spell* spell = NULL); template <class T> T ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell* spell = NULL); void RemoveSpellMods(Spell* spell); void RestoreSpellMods(Spell* spell, uint32 ownerAuraId = 0, Aura* aura = NULL); @@ -1790,7 +1790,7 @@ class Player : public Unit, public GridObject<Player> } /** todo: -maybe move UpdateDuelFlag+DuelComplete to independent DuelHandler.. **/ - DuelInfo *duel; + DuelInfo* duel; void UpdateDuelFlag(time_t currTime); void CheckDuelDistance(time_t currTime); void DuelComplete(DuelCompleteType type); @@ -1849,7 +1849,7 @@ class Player : public Unit, public GridObject<Player> uint32 GetBaseDefenseSkillValue() const { return GetBaseSkillValue(SKILL_DEFENSE); } uint32 GetBaseWeaponSkillValue(WeaponAttackType attType) const; - uint32 GetSpellByProto(ItemTemplate *proto); + uint32 GetSpellByProto(ItemTemplate* proto); float GetHealthBonusFromStamina(); float GetManaBonusFromIntellect(); @@ -1911,8 +1911,8 @@ class Player : public Unit, public GridObject<Player> WorldSession* GetSession() const { return m_session; } - void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const; - void DestroyForPlayer(Player *target, bool anim = false) const; + void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const; + void DestroyForPlayer(Player* target, bool anim = false) const; void SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool recruitAFriend = false, float group_rate=1.0f); // notifiers @@ -1933,17 +1933,17 @@ class Player : public Unit, public GridObject<Player> virtual bool SetPosition(float x, float y, float z, float orientation, bool teleport = false); bool SetPosition(const Position &pos, bool teleport = false) { return SetPosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); } - void UpdateUnderwaterState(Map * m, float x, float y, float z); + void UpdateUnderwaterState(Map* m, float x, float y, float z); - void SendMessageToSet(WorldPacket *data, bool self) {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet - void SendMessageToSetInRange(WorldPacket *data, float fist, bool self);// overwrite Object::SendMessageToSetInRange - void SendMessageToSetInRange(WorldPacket *data, float dist, bool self, bool own_team_only); - void SendMessageToSet(WorldPacket *data, Player const* skipped_rcvr); + void SendMessageToSet(WorldPacket* data, bool self) {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet + void SendMessageToSetInRange(WorldPacket* data, float fist, bool self);// overwrite Object::SendMessageToSetInRange + void SendMessageToSetInRange(WorldPacket* data, float dist, bool self, bool own_team_only); + void SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr); void SendTeleportPacket(Position &oldPos); void SendTeleportAckPacket(); - Corpse *GetCorpse() const; + Corpse* GetCorpse() const; void SpawnCorpseBones(); void CreateCorpse(); bool FallGround(uint8 FallMode = 0); @@ -1973,15 +1973,15 @@ class Player : public Unit, public GridObject<Player> bool CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone); - void JoinedChannel(Channel *c); - void LeftChannel(Channel *c); + void JoinedChannel(Channel* c); + void LeftChannel(Channel* c); void CleanupChannels(); void UpdateLocalChannels(uint32 newZone); void LeaveLFGChannel(); void UpdateDefense(); void UpdateWeaponSkill (WeaponAttackType attType); - void UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, bool defence); + void UpdateCombatSkills(Unit* pVictim, WeaponAttackType attType, bool defence); void SetSkill(uint16 id, uint16 step, uint16 currVal, uint16 maxVal); uint16 GetMaxSkillValue(uint32 skill) const; // max + perm. bonus + temp bonus @@ -2025,8 +2025,8 @@ class Player : public Unit, public GridObject<Player> ReputationMgr& GetReputationMgr() { return m_reputationMgr; } ReputationMgr const& GetReputationMgr() const { return m_reputationMgr; } ReputationRank GetReputationRank(uint32 faction_id) const; - void RewardReputation(Unit *pVictim, float rate); - void RewardReputation(Quest const *pQuest); + void RewardReputation(Unit* pVictim, float rate); + void RewardReputation(Quest const* pQuest); void UpdateSkillsForLevel(); void UpdateSkillsToMaxSkillsForLevel(); // for .levelup @@ -2036,7 +2036,7 @@ class Player : public Unit, public GridObject<Player> /*** PVP SYSTEM ***/ /*********************************************************/ void UpdateHonorFields(); - bool RewardHonor(Unit *pVictim, uint32 groupsize, int32 honor = -1, bool pvptoken = false); + bool RewardHonor(Unit* pVictim, uint32 groupsize, int32 honor = -1, bool pvptoken = false); uint32 GetHonorPoints() const { return GetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY); } uint32 GetArenaPoints() const { return GetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY); } void ModifyHonorPoints(int32 value, SQLTransaction* trans = NULL); //! If trans is specified, honor save query will be added to trans @@ -2078,28 +2078,28 @@ class Player : public Unit, public GridObject<Player> void ResetAllPowers(); - void _ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType, bool apply); - void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, AuraEffect const* aura, bool apply); - void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, AuraEffect const* aura, bool apply); + void _ApplyWeaponDependentAuraMods(Item* item, WeaponAttackType attackType, bool apply); + void _ApplyWeaponDependentAuraCritMod(Item* item, WeaponAttackType attackType, AuraEffect const* aura, bool apply); + void _ApplyWeaponDependentAuraDamageMod(Item* item, WeaponAttackType attackType, AuraEffect const* aura, bool apply); - void _ApplyItemMods(Item *item, uint8 slot, bool apply); + void _ApplyItemMods(Item* item, uint8 slot, bool apply); void _RemoveAllItemMods(); void _ApplyAllItemMods(); void _ApplyAllLevelScaleItemMods(bool apply); - void _ApplyItemBonuses(ItemTemplate const *proto, uint8 slot, bool apply, bool only_level_scale = false); - void _ApplyWeaponDamage(uint8 slot, ItemTemplate const *proto, ScalingStatValuesEntry const *ssv, bool apply); + void _ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply, bool only_level_scale = false); + void _ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingStatValuesEntry const* ssv, bool apply); void _ApplyAmmoBonuses(); bool EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot); void ToggleMetaGemsActive(uint8 exceptslot, bool apply); void CorrectMetaGemEnchants(uint8 slot, bool apply); void InitDataForForm(bool reapplyMods = false); - void ApplyItemEquipSpell(Item *item, bool apply, bool form_change = false); + void ApplyItemEquipSpell(Item* item, bool apply, bool form_change = false); void ApplyEquipSpell(SpellInfo const* spellInfo, Item* item, bool apply, bool form_change = false); void UpdateEquipSpellsAtFormChange(); void CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 procVictim, uint32 procEx); - void CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8 cast_count, uint32 glyphIndex); - void CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item *item, ItemTemplate const* proto); + void CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8 cast_count, uint32 glyphIndex); + void CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item* item, ItemTemplate const* proto); void SendEquipmentSetList(); void SetEquipmentSet(uint32 index, EquipmentSet eqset); @@ -2107,13 +2107,13 @@ class Player : public Unit, public GridObject<Player> void SendInitWorldStates(uint32 zone, uint32 area); void SendUpdateWorldState(uint32 Field, uint32 Value); - void SendDirectMessage(WorldPacket *data); + void SendDirectMessage(WorldPacket* data); void SendBGWeekendWorldStates(); void SendAurasForTarget(Unit* target); PlayerMenu* PlayerTalkClass; - std::vector<ItemSetEffect *> ItemSetEff; + std::vector<ItemSetEffect*> ItemSetEff; void SendLoot(uint64 guid, LootType loot_type); void SendLootRelease(uint64 guid); @@ -2233,7 +2233,7 @@ class Player : public Unit, public GridObject<Player> /*** OUTDOOR PVP SYSTEM ***/ /*********************************************************/ - OutdoorPvP * GetOutdoorPvP() const; + OutdoorPvP* GetOutdoorPvP() const; // returns true if the player is in active state for outdoor pvp objective capturing, false otherwise bool IsOutdoorPvPActive(); @@ -2265,8 +2265,8 @@ class Player : public Unit, public GridObject<Player> /*** VARIOUS SYSTEMS ***/ /*********************************************************/ void UpdateFallInformationIfNeed(MovementInfo const& minfo, uint16 opcode); - Unit *m_mover; - WorldObject *m_seer; + Unit* m_mover; + WorldObject* m_seer; void SetFallInformation(uint32 time, float z) { m_lastFallTime = time; @@ -2284,8 +2284,8 @@ class Player : public Unit, public GridObject<Player> m_mover = target; m_mover->m_movedPlayer = this; } - void SetSeer(WorldObject *target) { m_seer = target; } - void SetViewpoint(WorldObject *target, bool apply); + void SetSeer(WorldObject* target) { m_seer = target; } + void SetViewpoint(WorldObject* target, bool apply); WorldObject* GetViewpoint() const; void StopCastingCharm(); void StopCastingBindSight(); @@ -2368,10 +2368,10 @@ class Player : public Unit, public GridObject<Player> BoundInstancesMap m_boundInstances[MAX_DIFFICULTY]; InstancePlayerBind* GetBoundInstance(uint32 mapid, Difficulty difficulty); BoundInstancesMap& GetBoundInstances(Difficulty difficulty) { return m_boundInstances[difficulty]; } - InstanceSave * GetInstanceSave(uint32 mapid, bool raid); + InstanceSave* GetInstanceSave(uint32 mapid, bool raid); void UnbindInstance(uint32 mapid, Difficulty difficulty, bool unload = false); void UnbindInstance(BoundInstancesMap::iterator &itr, Difficulty difficulty, bool unload = false); - InstancePlayerBind* BindToInstance(InstanceSave *save, bool permanent, bool load = false); + InstancePlayerBind* BindToInstance(InstanceSave* save, bool permanent, bool load = false); void BindToInstance(); void SetPendingBind(InstanceSave* save, uint32 bindTimer) { _pendingBind = save; _pendingBindTimer = bindTimer; } bool HasPendingBind() const { return _pendingBind != NULL; } @@ -2401,10 +2401,10 @@ class Player : public Unit, public GridObject<Player> /*** GROUP SYSTEM ***/ /*********************************************************/ - Group * GetGroupInvite() { return m_groupInvite; } + Group* GetGroupInvite() { return m_groupInvite; } void SetGroupInvite(Group* group) { m_groupInvite = group; } - Group * GetGroup() { return m_group.getTarget(); } - const Group * GetGroup() const { return (const Group*)m_group.getTarget(); } + Group* GetGroup() { return m_group.getTarget(); } + const Group* GetGroup() const { return (const Group*)m_group.getTarget(); } GroupReference& GetGroupRef() { return m_group; } void SetGroup(Group* group, int8 subgroup = -1); uint8 GetSubGroup() const { return m_group.getSubGroup(); } @@ -2417,7 +2417,7 @@ class Player : public Unit, public GridObject<Player> // Battleground Group System void SetBattlegroundRaid(Group* group, int8 subgroup = -1); void RemoveFromBattlegroundRaid(); - Group * GetOriginalGroup() { return m_originalGroup.getTarget(); } + Group* GetOriginalGroup() { return m_originalGroup.getTarget(); } GroupReference& GetOriginalGroupRef() { return m_originalGroup; } uint8 GetOriginalSubGroup() const { return m_originalGroup.getSubGroup(); } void SetOriginalGroup(Group* group, int8 subgroup = -1); @@ -2428,7 +2428,7 @@ class Player : public Unit, public GridObject<Player> MapReference &GetMapRef() { return m_mapRef; } // Set map to player and add reference - void SetMap(Map * map); + void SetMap(Map* map); void ResetMap(); bool isAllowedToLoot(const Creature* creature); @@ -2525,7 +2525,7 @@ class Player : public Unit, public GridObject<Player> void _LoadInventory(PreparedQueryResult result, uint32 timeDiff); void _LoadMailInit(PreparedQueryResult resultUnread, PreparedQueryResult resultDelivery); void _LoadMail(); - void _LoadMailedItems(Mail *mail); + void _LoadMailedItems(Mail* mail); void _LoadQuestStatus(PreparedQueryResult result); void _LoadQuestStatusRewarded(PreparedQueryResult result); void _LoadDailyQuestStatus(PreparedQueryResult result); @@ -2564,8 +2564,8 @@ class Player : public Unit, public GridObject<Player> void _SaveStats(SQLTransaction& trans); void _SaveInstanceTimeRestrictions(SQLTransaction& trans); - void _SetCreateBits(UpdateMask *updateMask, Player *target) const; - void _SetUpdateBits(UpdateMask *updateMask, Player *target) const; + void _SetCreateBits(UpdateMask* updateMask, Player* target) const; + void _SetUpdateBits(UpdateMask* updateMask, Player* target) const; /*********************************************************/ /*** ENVIRONMENTAL SYSTEM ***/ @@ -2619,7 +2619,7 @@ class Player : public Unit, public GridObject<Player> PlayerMails m_mail; PlayerSpellMap m_spells; - PlayerTalentMap *m_talents[MAX_TALENT_SPECS]; + PlayerTalentMap* m_talents[MAX_TALENT_SPECS]; uint32 m_lastPotionId; // last used health/mana potion in combat, that block next potion use GlobalCooldownMgr m_GlobalCooldownMgr; @@ -2655,7 +2655,7 @@ class Player : public Unit, public GridObject<Player> float m_resurrectX, m_resurrectY, m_resurrectZ; uint32 m_resurrectHealth, m_resurrectMana; - WorldSession *m_session; + WorldSession* m_session; typedef std::list<Channel*> JoinedChannelsList; JoinedChannelsList m_channels; @@ -2709,7 +2709,7 @@ class Player : public Unit, public GridObject<Player> // Groups GroupReference m_group; GroupReference m_originalGroup; - Group *m_groupInvite; + Group* m_groupInvite; uint32 m_groupUpdateMask; uint64 m_auraRaidUpdateMask; bool m_bPassOnGroupLoot; @@ -2736,10 +2736,10 @@ class Player : public Unit, public GridObject<Player> private: // internal common parts for CanStore/StoreItem functions - InventoryResult _CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec& dest, ItemTemplate const *pProto, uint32& count, bool swap, Item *pSrcItem) const; - InventoryResult _CanStoreItem_InBag(uint8 bag, ItemPosCountVec& dest, ItemTemplate const *pProto, uint32& count, bool merge, bool non_specialized, Item *pSrcItem, uint8 skip_bag, uint8 skip_slot) const; - InventoryResult _CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, ItemPosCountVec& dest, ItemTemplate const *pProto, uint32& count, bool merge, Item *pSrcItem, uint8 skip_bag, uint8 skip_slot) const; - Item* _StoreItem(uint16 pos, Item *pItem, uint32 count, bool clone, bool update); + InventoryResult _CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const; + InventoryResult _CanStoreItem_InBag(uint8 bag, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool merge, bool non_specialized, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const; + InventoryResult _CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool merge, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot) const; + Item* _StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool update); Item* _LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, Field* fields); std::set<uint32> m_refundableItems; @@ -2806,8 +2806,8 @@ class Player : public Unit, public GridObject<Player> uint32 _pendingBindTimer; }; -void AddItemsSetItem(Player*player, Item *item); -void RemoveItemsSetItem(Player*player, ItemTemplate const *proto); +void AddItemsSetItem(Player*player, Item* item); +void RemoveItemsSetItem(Player*player, ItemTemplate const* proto); // "the bodies of template functions must be made available in a header file" template <class T> T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell* spell) @@ -2824,7 +2824,7 @@ template <class T> T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T &bas for (SpellModList::iterator itr = m_spellMods[op].begin(); itr != m_spellMods[op].end(); ++itr) { - SpellModifier *mod = *itr; + SpellModifier* mod = *itr; // Charges can be set only for mods with auras if (!mod->ownerAura) diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp index 31152f35efe..4d343d02146 100755 --- a/src/server/game/Entities/Player/SocialMgr.cpp +++ b/src/server/game/Entities/Player/SocialMgr.cpp @@ -182,7 +182,7 @@ void SocialMgr::GetFriendInfo(Player* player, uint32 friendGUID, FriendInfo &fri friendInfo.Level = 0; friendInfo.Class = 0; - Player *pFriend = ObjectAccessor::FindPlayer(friendGUID); + Player* pFriend = ObjectAccessor::FindPlayer(friendGUID); if (!pFriend) return; @@ -213,7 +213,7 @@ void SocialMgr::GetFriendInfo(Player* player, uint32 friendGUID, FriendInfo &fri } } -void SocialMgr::MakeFriendStatusPacket(FriendsResult result, uint32 guid, WorldPacket *data) +void SocialMgr::MakeFriendStatusPacket(FriendsResult result, uint32 guid, WorldPacket* data) { data->Initialize(SMSG_FRIEND_STATUS, 5); *data << uint8(result); @@ -272,7 +272,7 @@ void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket* packet) PlayerSocialMap::const_iterator itr2 = itr->second.m_playerSocialMap.find(guid); if (itr2 != itr->second.m_playerSocialMap.end() && (itr2->second.Flags & SOCIAL_FLAG_FRIEND)) { - Player *pFriend = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)); + Player* pFriend = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)); // PLAYER see his team only and PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters // MODERATOR, GAME MASTER, ADMINISTRATOR can see all diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h index af1f9c1d43c..ae47f7a24cd 100755 --- a/src/server/game/Entities/Player/SocialMgr.h +++ b/src/server/game/Entities/Player/SocialMgr.h @@ -147,7 +147,7 @@ class SocialMgr void GetFriendInfo(Player* player, uint32 friendGUID, FriendInfo &friendInfo); // Packet management - void MakeFriendStatusPacket(FriendsResult result, uint32 friend_guid, WorldPacket *data); + void MakeFriendStatusPacket(FriendsResult result, uint32 friend_guid, WorldPacket* data); void SendFriendStatus(Player* player, FriendsResult result, uint32 friend_guid, bool broadcast); void BroadcastToFriendListers(Player* player, WorldPacket* packet); // Loading diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 705ce0aac6f..fe1abea0f1d 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -45,14 +45,14 @@ void MapManager::LoadTransports() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 lowguid = fields[0].GetUInt32(); uint32 entry = fields[1].GetUInt32(); std::string name = fields[2].GetString(); uint32 period = fields[3].GetUInt32(); uint32 scriptId = sObjectMgr->GetScriptId(fields[4].GetCString()); - const GameObjectTemplate *goinfo = sObjectMgr->GetGameObjectTemplate(entry); + const GameObjectTemplate* goinfo = sObjectMgr->GetGameObjectTemplate(entry); if (!goinfo) { @@ -70,7 +70,7 @@ void MapManager::LoadTransports() std::set<uint32> mapsUsed; - Transport *t = new Transport(period, scriptId); + Transport* t = new Transport(period, scriptId); if (!t->GenerateWaypoints(goinfo->moTransport.taxiPathId, mapsUsed)) // skip transports with empty waypoints list { @@ -111,7 +111,7 @@ void MapManager::LoadTransports() { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); uint32 entry = fields[1].GetUInt32(); @@ -143,7 +143,7 @@ void MapManager::LoadTransportNPCs() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); uint32 entry = fields[1].GetUInt32(); uint32 transportEntry = fields[2].GetUInt32(); @@ -489,7 +489,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) for (PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end();) { - Player *plr = *itr; + Player* plr = *itr; ++itr; if (plr->isDead() && !plr->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) @@ -503,7 +503,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) RemoveFromWorld(); ResetMap(); - Map * newMap = sMapMgr->CreateMap(newMapid, this, 0); + Map* newMap = sMapMgr->CreateMap(newMapid, this, 0); SetMap(newMap); ASSERT (GetMap()); AddToWorld(); diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h index a63b0f5d5f0..8fcecffe239 100755 --- a/src/server/game/Entities/Transport/Transport.h +++ b/src/server/game/Entities/Transport/Transport.h @@ -45,10 +45,10 @@ class Transport : public GameObject typedef std::set<Creature*> CreatureSet; CreatureSet m_NPCPassengerSet; uint32 AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y, float z, float o, uint32 anim=0); - void UpdatePosition(MovementInfo *mi); + void UpdatePosition(MovementInfo* mi); void UpdateNPCPositions(); - void BuildStartMovePacket(Map const *targetMap); - void BuildStopMovePacket(Map const *targetMap); + void BuildStartMovePacket(Map const* targetMap); + void BuildStopMovePacket(Map const* targetMap); uint32 GetScriptId() const { return ScriptId; } private: struct WayPoint diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index f39f2765067..471a8324f90 100755 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -63,7 +63,7 @@ bool Player::UpdateStats(Stats stat) if (stat == STAT_STAMINA || stat == STAT_INTELLECT || stat == STAT_STRENGTH) { - Pet *pet = GetPet(); + Pet* pet = GetPet(); if (pet) pet->UpdateStats(stat); } @@ -190,7 +190,7 @@ void Player::UpdateResistances(uint32 school) float value = GetTotalAuraModValue(UnitMods(UNIT_MOD_RESISTANCE_START + school)); SetResistance(SpellSchools(school), int32(value)); - Pet *pet = GetPet(); + Pet* pet = GetPet(); if (pet) pet->UpdateResistances(school); } @@ -220,7 +220,7 @@ void Player::UpdateArmor() SetArmor(int32(value)); - Pet *pet = GetPet(); + Pet* pet = GetPet(); if (pet) pet->UpdateArmor(); @@ -365,7 +365,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged) if (Item* mainHand = m_items[EQUIPMENT_SLOT_MAINHAND]) { // also gains % attack power from equipped weapon - ItemTemplate const *proto = mainHand->GetTemplate(); + ItemTemplate const* proto = mainHand->GetTemplate(); if (!proto) continue; @@ -442,7 +442,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged) SetInt32Value(index_mod, (uint32)attPowerMod); //UNIT_FIELD_(RANGED)_ATTACK_POWER_MODS field SetFloatValue(index_mult, attPowerMultiplier); //UNIT_FIELD_(RANGED)_ATTACK_POWER_MULTIPLIER field - Pet *pet = GetPet(); //update pet's AP + Pet* pet = GetPet(); //update pet's AP //automatically update weapon damage after attack power modification if (ranged) { @@ -798,7 +798,7 @@ void Player::UpdateExpertise(WeaponAttackType attack) int32 expertise = int32(GetRatingBonusValue(CR_EXPERTISE)); - Item *weapon = GetWeaponForAttack(attack, true); + Item* weapon = GetWeaponForAttack(attack, true); AuraEffectList const& expAuras = GetAuraEffectsByType(SPELL_AURA_MOD_EXPERTISE); for (AuraEffectList::const_iterator itr = expAuras.begin(); itr != expAuras.end(); ++itr) @@ -1078,7 +1078,7 @@ bool Guardian::UpdateStats(Stats stat) ApplyStatBuffMod(stat, m_statFromOwner[stat], false); float ownersBonus = 0.0f; - Unit *owner = GetOwner(); + Unit* owner = GetOwner(); // Handle Death Knight Glyphs and Talents float mod = 0.75f; if (IsPetGhoul() && (stat == STAT_STAMINA || stat == STAT_STRENGTH)) @@ -1090,7 +1090,7 @@ bool Guardian::UpdateStats(Stats stat) default: break; } // Ravenous Dead - AuraEffect const *aurEff = NULL; + AuraEffect const* aurEff = NULL; // Check just if owner has Ravenous Dead since it's effect is not an aura aurEff = owner->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DEATHKNIGHT, 3010, 0); if (aurEff) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 617b0782f67..29df2c20442 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -745,7 +745,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam // in bg, count dmg if victim is also a player if (victim->GetTypeId() == TYPEID_PLAYER) - if (Battleground *bg = killer->GetBattleground()) + if (Battleground* bg = killer->GetBattleground()) bg->UpdatePlayerScore(killer, SCORE_DAMAGE_DONE, damage); killer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE, damage, 0, victim); @@ -892,7 +892,7 @@ void Unit::CastSpell(Unit* victim, uint32 spellId, TriggerCastFlags triggerFlags CastSpell(victim, spellInfo, triggerFlags, castItem, triggeredByAura, originalCaster); } -void Unit::CastSpell(Unit* victim, SpellInfo const* spellInfo, bool triggered, Item *castItem/*= NULL*/, AuraEffect const* triggeredByAura /*= NULL*/, uint64 originalCaster /*= 0*/) +void Unit::CastSpell(Unit* victim, SpellInfo const* spellInfo, bool triggered, Item* castItem/*= NULL*/, AuraEffect const* triggeredByAura /*= NULL*/, uint64 originalCaster /*= 0*/) { CastSpell(victim, spellInfo, triggered ? TRIGGERED_FULL_MASK : TRIGGERED_NONE, castItem, triggeredByAura, originalCaster); } @@ -998,7 +998,7 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, } // used for scripting -void Unit::CastSpell(GameObject *go, uint32 spellId, bool triggered, Item* castItem, AuraEffect* triggeredByAura, uint64 originalCaster) +void Unit::CastSpell(GameObject* go, uint32 spellId, bool triggered, Item* castItem, AuraEffect* triggeredByAura, uint64 originalCaster) { if (!go) return; @@ -1038,7 +1038,7 @@ uint32 Unit::SpellNonMeleeDamageLog(Unit* victim, uint32 spellID, uint32 damage) return damageInfo.damage; } -void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType, bool crit) +void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType, bool crit) { if (damage < 0) return; @@ -1144,7 +1144,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 dama damageInfo->damage = damage; } -void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss) +void Unit::DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss) { if (damageInfo == 0) return; @@ -1170,7 +1170,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss) } // TODO for melee need create structure as in -void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo *damageInfo, WeaponAttackType attackType) +void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* damageInfo, WeaponAttackType attackType) { damageInfo->attacker = this; damageInfo->target = victim; @@ -1367,7 +1367,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo *dam damageInfo->damage = 0; } -void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss) +void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) { Unit* victim = damageInfo->target; @@ -1883,7 +1883,7 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe *absorb = dmgInfo.GetAbsorb(); } -void Unit::CalcHealAbsorb(Unit* victim, const SpellInfo *healSpell, uint32 &healAmount, uint32 &absorb) +void Unit::CalcHealAbsorb(Unit* victim, const SpellInfo* healSpell, uint32 &healAmount, uint32 &absorb) { if (!healAmount) return; @@ -2296,7 +2296,7 @@ bool Unit::isBlockCritical() return false; } -int32 Unit::GetMechanicResistChance(const SpellInfo *spell) +int32 Unit::GetMechanicResistChance(const SpellInfo* spell) { if (!spell) return 0; @@ -4613,7 +4613,7 @@ void Unit::_UnregisterDynObject(DynamicObject* dynObj) m_dynObj.remove(dynObj); } -DynamicObject * Unit::GetDynObject(uint32 spellId) +DynamicObject* Unit::GetDynObject(uint32 spellId) { if (m_dynObj.empty()) return NULL; @@ -4749,7 +4749,7 @@ void Unit::RemoveAllGameObjects() } } -void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log) +void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage* log) { WorldPacket data(SMSG_SPELLNONMELEEDAMAGELOG, (16+4+4+4+1+4+4+1+1+4+4+1)); // we guess size data.append(log->target->GetPackGUID()); @@ -4794,7 +4794,7 @@ void Unit::ProcDamageAndSpell(Unit* victim, uint32 procAttacker, uint32 procVict victim->ProcDamageAndSpellFor(true, this, procVictim, procExtra, attType, procSpell, amount, procAura); } -void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo) +void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* pInfo) { AuraEffect const* aura = pInfo->auraEff; @@ -4874,7 +4874,7 @@ void Unit::SendSpellDamageImmune(Unit* target, uint32 spellId) SendMessageToSet(&data, true); } -void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo) +void Unit::SendAttackStateUpdate(CalcDamageInfo* damageInfo) { sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Sending SMSG_ATTACKERSTATEUPDATE"); @@ -10238,7 +10238,7 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius) // reserve place for players and pets because resizing vector every unit push is unefficient (vector is reallocated then) nearMembers.reserve(pGroup->GetMembersCount() * 2); - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) if (Player* Target = itr->getSource()) { // IsHostileTo check duel and controlled by enemy @@ -11954,7 +11954,7 @@ void Unit::ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply) } } -void Unit::ApplySpellDispelImmunity(const SpellInfo * spellProto, DispelType type, bool apply) +void Unit::ApplySpellDispelImmunity(const SpellInfo* spellProto, DispelType type, bool apply) { ApplySpellImmune(spellProto->Id, IMMUNITY_DISPEL, type, apply); @@ -11989,7 +11989,7 @@ float Unit::GetWeaponProcChance() const return 0; } -float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo * spellProto) const +float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo* spellProto) const { // proc per minute chance calculation if (PPM <= 0) return 0.0f; @@ -12035,7 +12035,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry) Pet* pet = plr->GetPet(); if (pet) { - Battleground *bg = ToPlayer()->GetBattleground(); + Battleground* bg = ToPlayer()->GetBattleground(); // don't unsummon pet in arena but SetFlag UNIT_FLAG_STUNNED to disable pet's interface if (bg && bg->isArena()) pet->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); @@ -14102,7 +14102,7 @@ bool InitTriggerAuraData() return true; } -uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition) +uint32 createProcExtendMask(SpellNonMeleeDamage* damageInfo, SpellMissInfo missCondition) { uint32 procEx = PROC_EX_NONE; // Check victim state @@ -14945,7 +14945,7 @@ void Unit::UpdateAuraForGroup(uint8 slot) } else if (GetTypeId() == TYPEID_UNIT && ToCreature()->isPet()) { - Pet *pet = ((Pet*)this); + Pet* pet = ((Pet*)this); if (pet->isControlled()) { Unit* owner = GetOwner(); @@ -15071,7 +15071,7 @@ Pet* Unit::CreateTamedPetFrom(uint32 creatureEntry, uint32 spell_id) return pet; } -bool Unit::InitTamedPet(Pet * pet, uint8 level, uint32 spell_id) +bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id) { pet->SetCreatorGUID(GetGUID()); pet->setFaction(getFaction()); @@ -15507,7 +15507,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss) // the reset time is set but not added to the scheduler // until the players leave the instance time_t resettime = creature->GetRespawnTimeEx() + 2 * HOUR; - if (InstanceSave *save = sInstanceSaveMgr->GetInstanceSave(creature->GetInstanceId())) + if (InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(creature->GetInstanceId())) if (save->GetResetTime() < resettime) save->SetResetTime(resettime); } } @@ -16179,7 +16179,7 @@ void Unit::GetRaidMember(std::list<Unit*> &nearMembers, float radius) Group* pGroup = owner->GetGroup(); if (pGroup) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); @@ -16215,7 +16215,7 @@ void Unit::GetPartyMemberInDist(std::list<Unit*> &TagUnitMap, float radius) { uint8 subgroup = owner->ToPlayer()->GetSubGroup(); - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); @@ -16252,7 +16252,7 @@ void Unit::GetPartyMembers(std::list<Unit*> &TagUnitMap) { uint8 subgroup = owner->ToPlayer()->GetSubGroup(); - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); @@ -16836,7 +16836,7 @@ void Unit::JumpTo(float speedXY, float speedZ, bool forward) } } -void Unit::JumpTo(WorldObject *obj, float speedZ) +void Unit::JumpTo(WorldObject* obj, float speedZ) { float x, y, z; obj->GetContactPoint(this, x, y, z); @@ -16951,7 +16951,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a RemoveAurasByType(SPELL_AURA_MOUNTED); // drop flag at invisible in bg - if (Battleground *bg = plr->GetBattleground()) + if (Battleground* bg = plr->GetBattleground()) bg->EventPlayerDroppedFlag(plr); WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0); @@ -17006,7 +17006,7 @@ void Unit::_ExitVehicle(Position const* exitPosition) m_vehicle->RemovePassenger(this); // This should be done before dismiss, because there may be some aura removal - Vehicle *vehicle = m_vehicle; + Vehicle* vehicle = m_vehicle; m_vehicle = NULL; SetControlled(false, UNIT_STAT_ROOT); // SMSG_MOVE_FORCE_UNROOT, ~MOVEMENTFLAG_ROOT diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index cb4bd39347b..19fa017e37c 100755 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -939,7 +939,7 @@ struct CalcDamageInfo // Spell damage info structure based on structure sending in SMSG_SPELLNONMELEEDAMAGELOG opcode struct SpellNonMeleeDamage{ - SpellNonMeleeDamage(Unit *_attacker, Unit *_target, uint32 _SpellID, uint32 _schoolMask) + 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) {} @@ -962,7 +962,7 @@ struct SpellNonMeleeDamage{ struct SpellPeriodicAuraLogInfo { - SpellPeriodicAuraLogInfo(AuraEffect const *_auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier, bool _critical) + 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){} AuraEffect const* auraEff; @@ -974,7 +974,7 @@ struct SpellPeriodicAuraLogInfo bool critical; }; -uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition); +uint32 createProcExtendMask(SpellNonMeleeDamage* damageInfo, SpellMissInfo missCondition); enum UnitAnimationState { @@ -1229,8 +1229,8 @@ class Unit : public WorldObject typedef std::multimap<uint32, Aura*> AuraMap; typedef std::multimap<uint32, AuraApplication*> AuraApplicationMap; typedef std::multimap<AuraStateType, AuraApplication*> AuraStateAurasMap; - typedef std::list<AuraEffect *> AuraEffectList; - typedef std::list<Aura *> AuraList; + typedef std::list<AuraEffect*> AuraEffectList; + typedef std::list<Aura*> AuraList; typedef std::list<AuraApplication *> AuraApplicationList; typedef std::list<DiminishingReturn> Diminishing; typedef std::set<uint32> ComboPointHolderSet; @@ -1268,17 +1268,17 @@ class Unit : public WorldObject void SetCanDualWield(bool value) { m_canDualWield = value; } float GetCombatReach() const { return m_floatValues[UNIT_FIELD_COMBATREACH]; } float GetMeleeReach() const { float reach = m_floatValues[UNIT_FIELD_COMBATREACH]; return reach > MIN_MELEE_REACH ? reach : MIN_MELEE_REACH; } - bool IsWithinCombatRange(const Unit *obj, float dist2compare) const; - bool IsWithinMeleeRange(const Unit *obj, float dist = MELEE_RANGE) const; + bool IsWithinCombatRange(const Unit* obj, float dist2compare) const; + bool IsWithinMeleeRange(const Unit* obj, float dist = MELEE_RANGE) const; void GetRandomContactPoint(const Unit* target, float &x, float &y, float &z, float distance2dMin, float distance2dMax) const; uint32 m_extraAttacks; bool m_canDualWield; - void _addAttacker(Unit *pAttacker) // must be called only from Unit::Attack(Unit*) + void _addAttacker(Unit* pAttacker) // must be called only from Unit::Attack(Unit*) { m_attackers.insert(pAttacker); } - void _removeAttacker(Unit *pAttacker) // must be called only from Unit::AttackStop() + void _removeAttacker(Unit* pAttacker) // must be called only from Unit::AttackStop() { m_attackers.erase(pAttacker); } @@ -1432,12 +1432,12 @@ class Unit : public WorldObject void Unmount(); uint16 GetMaxSkillValueForLevel(Unit const* target = NULL) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; } - void DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb); - uint32 DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage = NULL, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto = NULL, bool durabilityLoss = true); - void Kill(Unit *pVictim, bool durabilityLoss = true); - int32 DealHeal(Unit *pVictim, uint32 addhealth); + void DealDamageMods(Unit* pVictim, uint32 &damage, uint32* absorb); + uint32 DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDamage = NULL, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* spellProto = NULL, bool durabilityLoss = true); + void Kill(Unit* pVictim, bool durabilityLoss = true); + int32 DealHeal(Unit* pVictim, uint32 addhealth); - void ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellInfo const *procSpell = NULL, SpellInfo const* procAura = NULL); + void ProcDamageAndSpell(Unit* pVictim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType = BASE_ATTACK, SpellInfo const* procSpell = NULL, SpellInfo const* procAura = NULL); void ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const* procSpell, uint32 damage , SpellInfo const* procAura = NULL); void GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTriggeringProc, std::list<AuraApplication*>* procAuras, ProcEventInfo eventInfo); @@ -1446,13 +1446,13 @@ class Unit : public WorldObject void TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, std::list<AuraApplication*>& procAuras); void HandleEmoteCommand(uint32 anim_id); - void AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false); + void AttackerStateUpdate (Unit* pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false); - void CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *damageInfo, WeaponAttackType attackType = BASE_ATTACK); - void DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss); + void CalculateMeleeDamage(Unit* pVictim, uint32 damage, CalcDamageInfo* damageInfo, WeaponAttackType attackType = BASE_ATTACK); + void DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss); - void CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType = BASE_ATTACK, bool crit = false); - void DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss); + void CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType = BASE_ATTACK, bool crit = false); + void DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss); // player or player's pet resilience (-1%) float GetMeleeCritChanceReduction() const { return GetCombatRatingReduction(CR_CRIT_TAKEN_MELEE); } @@ -1471,17 +1471,17 @@ class Unit : public WorldObject void ApplyResilience(const Unit* pVictim, float * crit, int32 * damage, bool isCrit, CombatRating type) const; - float MeleeSpellMissChance(const Unit *pVictim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const; - SpellMissInfo MeleeSpellHitResult(Unit *pVictim, SpellInfo const *spell); - SpellMissInfo MagicSpellHitResult(Unit *pVictim, SpellInfo const *spell); - SpellMissInfo SpellHitResult(Unit *pVictim, SpellInfo const *spell, bool canReflect = false); + float MeleeSpellMissChance(const Unit* pVictim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const; + SpellMissInfo MeleeSpellHitResult(Unit* pVictim, SpellInfo const* spell); + SpellMissInfo MagicSpellHitResult(Unit* pVictim, SpellInfo const* spell); + SpellMissInfo SpellHitResult(Unit* pVictim, SpellInfo const* spell, bool canReflect = false); float GetUnitDodgeChance() const; float GetUnitParryChance() const; float GetUnitBlockChance() const; float GetUnitMissChance(WeaponAttackType attType) const; - float GetUnitCriticalChance(WeaponAttackType attackType, const Unit *pVictim) const; - int32 GetMechanicResistChance(const SpellInfo *spell); + float GetUnitCriticalChance(WeaponAttackType attackType, const Unit* pVictim) const; + int32 GetMechanicResistChance(const SpellInfo* spell); bool CanUseAttackType(uint8 attacktype) const { switch(attacktype) @@ -1498,10 +1498,10 @@ class Unit : public WorldObject uint32 GetDefenseSkillValue(Unit const* target = NULL) const; uint32 GetWeaponSkillValue(WeaponAttackType attType, Unit const* target = NULL) const; float GetWeaponProcChance() const; - float GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo * spellProto) const; + float GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo* spellProto) const; - MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttackType attType) const; - MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const; + MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* pVictim, WeaponAttackType attType) const; + MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* pVictim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const; bool isVendor() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_VENDOR); } bool isTrainer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TRAINER); } @@ -1553,33 +1553,33 @@ class Unit : public WorldObject virtual bool IsUnderWater() const; bool isInAccessiblePlaceFor(Creature const* c) const; - void SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false); + void SendHealSpellLog(Unit* pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false); int32 HealBySpell(Unit* pVictim, SpellInfo const* spellInfo, uint32 addHealth, bool critical = false); - void SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype); - void EnergizeBySpell(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype); - uint32 SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage); - void CastSpell(Unit* victim, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); + void SendEnergizeSpellLog(Unit* pVictim, uint32 SpellID, uint32 Damage, Powers powertype); + void EnergizeBySpell(Unit* pVictim, uint32 SpellID, uint32 Damage, Powers powertype); + uint32 SpellNonMeleeDamageLog(Unit* pVictim, uint32 spellID, uint32 damage); + void CastSpell(Unit* victim, uint32 spellId, bool triggered, Item* castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); void CastSpell(Unit* victim, uint32 spellId, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); - void CastSpell(Unit* victim, SpellInfo const *spellInfo, bool triggered, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); - void CastSpell(Unit* victim, SpellInfo const *spellInfo, TriggerCastFlags triggerFlags, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); - void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); - void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); - void CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); - void CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); - void CastSpell(GameObject *go, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect* triggeredByAura = NULL, uint64 originalCaster = 0); - Aura * AddAura(uint32 spellId, Unit* target); - Aura * AddAura(SpellInfo const *spellInfo, uint8 effMask, Unit* target); + void CastSpell(Unit* victim, SpellInfo const* spellInfo, bool triggered, Item* castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); + void CastSpell(Unit* victim, SpellInfo const* spellInfo, TriggerCastFlags triggerFlags, Item* castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); + void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item* castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); + void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item* castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); + void CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* Victim = NULL, bool triggered = true, Item* castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); + void CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim = NULL, bool triggered = true, Item* castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0); + void CastSpell(GameObject* go, uint32 spellId, bool triggered, Item* castItem = NULL, AuraEffect* triggeredByAura = NULL, uint64 originalCaster = 0); + Aura* AddAura(uint32 spellId, Unit* target); + Aura* AddAura(SpellInfo const* spellInfo, uint8 effMask, Unit* target); void SetAuraStack(uint32 spellId, Unit* target, uint32 stack); void SendPlaySpellVisual(uint32 id); void SendPlaySpellImpact(uint64 guid, uint32 id); void DeMorph(); - void SendAttackStateUpdate(CalcDamageInfo *damageInfo); + void SendAttackStateUpdate(CalcDamageInfo* damageInfo); void SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount); - void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log); + void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage* log); void SendSpellNonMeleeDamageLog(Unit* target, uint32 SpellID, uint32 Damage, SpellSchoolMask damageSchoolMask, uint32 AbsorbedDamage, uint32 Resist, bool PhysicalDamage, uint32 Blocked, bool CriticalHit = false); - void SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo); + void SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* pInfo); void SendSpellMiss(Unit* target, uint32 spellID, SpellMissInfo missInfo); void SendSpellDamageResist(Unit* target, uint32 spellId); void SendSpellDamageImmune(Unit* target, uint32 spellId); @@ -1591,7 +1591,7 @@ class Unit : public WorldObject void KnockbackFrom(float x, float y, float speedXY, float speedZ); void JumpTo(float speedXY, float speedZ, bool forward = true); - void JumpTo(WorldObject *obj, float speedZ); + void JumpTo(WorldObject* obj, float speedZ); void SetFacing(float ori, WorldObject* obj = NULL); void SendMonsterStop(bool on_death = false); @@ -1600,7 +1600,7 @@ class Unit : public WorldObject void SendMonsterMove(MonsterMoveData const& moveData, Player* receiver = NULL); void SendMonsterMoveExitVehicle(Position const* newPos); //void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, uint32 MovementFlags, uint32 Time, Player* player = NULL); - void SendMonsterMoveTransport(Unit *vehicleOwner); + void SendMonsterMoveTransport(Unit* vehicleOwner); void SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime = 0, Player* player = NULL); void SendMonsterMoveWithSpeedToCurrentDestination(Player* player = NULL); void SendMovementFlagUpdate(); @@ -1615,7 +1615,7 @@ class Unit : public WorldObject void SendClearTarget(); - void BuildHeartBeatMsg(WorldPacket *data) const; + void BuildHeartBeatMsg(WorldPacket* data) const; bool isAlive() const { return (m_deathState == ALIVE); }; bool isDying() const { return (m_deathState == JUST_DIED); }; @@ -1656,7 +1656,7 @@ class Unit : public WorldObject Unit* GetCharmerOrOwner() const { return GetCharmerGUID() ? GetCharmer() : GetOwner(); } Unit* GetCharmerOrOwnerOrSelf() const { - if (Unit *u = GetCharmerOrOwner()) + if (Unit* u = GetCharmerOrOwner()) return u; return (Unit*)this; @@ -1681,7 +1681,7 @@ class Unit : public WorldObject bool isPossessedByPlayer() const { return HasUnitState(UNIT_STAT_POSSESSED) && IS_PLAYER_GUID(GetCharmerGUID()); } bool isPossessing() const { - if (Unit *u = GetCharm()) + if (Unit* u = GetCharm()) return u->isPossessed(); else return false; @@ -1703,20 +1703,20 @@ class Unit : public WorldObject Pet* CreateTamedPetFrom(Creature* creatureTarget, uint32 spell_id = 0); Pet* CreateTamedPetFrom(uint32 creatureEntry, uint32 spell_id = 0); - bool InitTamedPet(Pet * pet, uint8 level, uint32 spell_id); + bool InitTamedPet(Pet* pet, uint8 level, uint32 spell_id); // aura apply/remove helpers - you should better not use these Aura* _TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0); void _AddAura(UnitAura* aura, Unit* caster); - AuraApplication * _CreateAuraApplication(Aura * aura, uint8 effMask); - void _ApplyAuraEffect(Aura * aura, uint8 effIndex); + AuraApplication * _CreateAuraApplication(Aura* aura, uint8 effMask); + void _ApplyAuraEffect(Aura* aura, uint8 effIndex); void _ApplyAura(AuraApplication * aurApp, uint8 effMask); void _UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMode); void _UnapplyAura(AuraApplication * aurApp, AuraRemoveMode removeMode); - void _RemoveNoStackAuraApplicationsDueToAura(Aura * aura); - void _RemoveNoStackAurasDueToAura(Aura * aura); - bool _IsNoStackAuraDueToAura(Aura * appliedAura, Aura * existingAura) const; - void _RegisterAuraEffect(AuraEffect * aurEff, bool apply); + void _RemoveNoStackAuraApplicationsDueToAura(Aura* aura); + void _RemoveNoStackAurasDueToAura(Aura* aura); + bool _IsNoStackAuraDueToAura(Aura* appliedAura, Aura* existingAura) const; + void _RegisterAuraEffect(AuraEffect* aurEff, bool apply); // m_ownedAuras container management AuraMap & GetOwnedAuras() { return m_ownedAuras; } @@ -1724,9 +1724,9 @@ class Unit : public WorldObject void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); void RemoveOwnedAura(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); - void RemoveOwnedAura(Aura * aura, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); + void RemoveOwnedAura(Aura* aura, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); - Aura * GetOwnedAura(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0, Aura* except = NULL) const; + Aura* GetOwnedAura(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0, Aura* except = NULL) const; // m_appliedAuras container management AuraApplicationMap & GetAppliedAuras() { return m_appliedAuras; } @@ -1735,14 +1735,14 @@ class Unit : public WorldObject void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT); void RemoveAura(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); void RemoveAura(AuraApplication * aurApp, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT); - void RemoveAura(Aura * aur, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT); + void RemoveAura(Aura* aur, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT); void RemoveAurasDueToSpell(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); void RemoveAuraFromStack(uint32 spellId, uint64 caster = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); - void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeller, uint8 chargesRemoved = 1); - void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer); + void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved = 1); + void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit* stealer); void RemoveAurasDueToItemSpell(Item* castItem, uint32 spellId); - void RemoveAurasByType(AuraType auraType, uint64 casterGUID = 0, Aura * except = NULL, bool negative = true, bool positive = true); + void RemoveAurasByType(AuraType auraType, uint64 casterGUID = 0, Aura* except = NULL, bool negative = true, bool positive = true); void RemoveNotOwnSingleTargetAuras(uint32 newPhase = 0x0); void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except = 0); void RemoveAurasWithAttribute(uint32 flags); @@ -1765,17 +1765,17 @@ class Unit : public WorldObject AuraList & GetSingleCastAuras() { return m_scAuras; } AuraList const& GetSingleCastAuras() const { return m_scAuras; } - AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const; - AuraEffect * GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const; - AuraEffect * GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const; // spell mustn't have familyflags - AuraEffect * GetAuraEffect(AuraType type, SpellFamilyNames family, uint32 familyFlag1 , uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID =0); + AuraEffect* GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const; + AuraEffect* GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const; + AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const; // spell mustn't have familyflags + AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames family, uint32 familyFlag1 , uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID =0); inline AuraEffect* GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId, effIndex);} AuraApplication * GetAuraApplication(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0, AuraApplication * except = NULL) const; - Aura * GetAura(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0) const; + Aura* GetAura(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0) const; AuraApplication * GetAuraApplicationOfRankedSpell(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0, AuraApplication * except = NULL) const; - Aura * GetAuraOfRankedSpell(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0) const; + Aura* GetAuraOfRankedSpell(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint8 reqEffMask = 0) const; bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster = 0) const; uint32 GetAuraCount(uint32 spellId) const; @@ -1789,7 +1789,7 @@ class Unit : public WorldObject bool HasNegativeAuraWithAttribute(uint32 flag, uint64 guid = 0); bool HasAuraWithMechanic(uint32 mechanicMask); - AuraEffect * IsScriptOverriden(SpellInfo const* spell, int32 script) const; + AuraEffect* IsScriptOverriden(SpellInfo const* spell, int32 script) const; uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false); uint32 GetDoTsByCaster(uint64 casterGUID) const; @@ -1939,17 +1939,17 @@ class Unit : public WorldObject // Threat related methods bool CanHaveThreatList() const; - void AddThreat(Unit* pVictim, float fThreat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell = NULL); + void AddThreat(Unit* pVictim, float fThreat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* threatSpell = NULL); float ApplyTotalThreatModifier(float fThreat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL); void DeleteThreatList(); void TauntApply(Unit* pVictim); - void TauntFadeOut(Unit *taunter); + void TauntFadeOut(Unit* taunter); ThreatManager& getThreatManager() { return m_ThreatManager; } void addHatedBy(HostileReference* pHostileReference) { m_HostileRefManager.insertFirst(pHostileReference); }; void removeHatedBy(HostileReference* /*pHostileReference*/) { /* nothing to do yet */ } HostileRefManager& getHostileRefManager() { return m_HostileRefManager; } - VisibleAuraMap const *GetVisibleAuras() { return &m_visibleAuras; } + VisibleAuraMap const* GetVisibleAuras() { return &m_visibleAuras; } AuraApplication * GetVisibleAura(uint8 slot) { VisibleAuraMap::iterator itr = m_visibleAuras.find(slot); @@ -1989,43 +1989,43 @@ class Unit : public WorldObject float GetAPMultiplier(WeaponAttackType attType, bool normalized); void ModifyAuraState(AuraStateType flag, bool apply); uint32 BuildAuraStateUpdateForTarget(Unit* target) const; - bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto = NULL, Unit const* Caster = NULL) const ; + bool HasAuraState(AuraStateType flag, SpellInfo const* spellProto = NULL, Unit const* Caster = NULL) const ; void UnsummonAllTotems(); - Unit* SelectMagnetTarget(Unit* victim, SpellInfo const *spellInfo = NULL); + Unit* SelectMagnetTarget(Unit* victim, SpellInfo const* spellInfo = NULL); int32 SpellBaseDamageBonus(SpellSchoolMask schoolMask); int32 SpellBaseHealingBonus(SpellSchoolMask schoolMask); - int32 SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVictim); - int32 SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit *pVictim); - uint32 SpellDamageBonus(Unit *pVictim, SpellInfo const *spellProto, uint32 damage, DamageEffectType damagetype, uint32 stack = 1); - uint32 SpellHealingBonus(Unit *pVictim, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); - bool isSpellBlocked(Unit *pVictim, SpellInfo const *spellProto, WeaponAttackType attackType = BASE_ATTACK); + int32 SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit* pVictim); + int32 SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit* pVictim); + uint32 SpellDamageBonus(Unit* pVictim, SpellInfo const* spellProto, uint32 damage, DamageEffectType damagetype, uint32 stack = 1); + uint32 SpellHealingBonus(Unit* pVictim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); + bool isSpellBlocked(Unit* pVictim, SpellInfo const* spellProto, WeaponAttackType attackType = BASE_ATTACK); bool isBlockCritical(); - bool isSpellCrit(Unit *pVictim, SpellInfo const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const; - uint32 SpellCriticalDamageBonus(SpellInfo const *spellProto, uint32 damage, Unit *pVictim); - uint32 SpellCriticalHealingBonus(SpellInfo const *spellProto, uint32 damage, Unit *pVictim); + bool isSpellCrit(Unit* pVictim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const; + uint32 SpellCriticalDamageBonus(SpellInfo const* spellProto, uint32 damage, Unit* pVictim); + uint32 SpellCriticalHealingBonus(SpellInfo const* spellProto, uint32 damage, Unit* pVictim); void SetLastManaUse(uint32 spellCastTime) { m_lastManaUse = spellCastTime; } bool IsUnderLastManaUseEffect() const; - void SetContestedPvP(Player *attackedPlayer = NULL); + void SetContestedPvP(Player* attackedPlayer = NULL); - void MeleeDamageBonus(Unit *pVictim, uint32 *damage, WeaponAttackType attType, SpellInfo const *spellProto = NULL); - uint32 GetCastingTimeForBonus(SpellInfo const *spellProto, DamageEffectType damagetype, uint32 CastingTime); + void MeleeDamageBonus(Unit* pVictim, uint32 *damage, WeaponAttackType attType, SpellInfo const* spellProto = NULL); + uint32 GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime); uint32 GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType auraType, uint8 effectIndex = 0) const; void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply); - void ApplySpellDispelImmunity(const SpellInfo * spellProto, DispelType type, bool apply); + void ApplySpellDispelImmunity(const SpellInfo* spellProto, DispelType type, bool apply); virtual bool IsImmunedToSpell(SpellInfo const* spellInfo); // redefined in Creature bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask); bool IsImmunedToDamage(SpellInfo const* spellInfo); virtual bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const; // redefined in Creature - static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const *spellInfo = NULL, uint8 effIndex = MAX_SPELL_EFFECTS); - uint32 CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellInfo const *spellInfo, WeaponAttackType attackType=MAX_ATTACK); - void CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, SpellInfo const *spellInfo = NULL); - void CalcHealAbsorb(Unit *pVictim, const SpellInfo *spellProto, uint32 &healAmount, uint32 &absorb); + static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const* spellInfo = NULL, uint8 effIndex = MAX_SPELL_EFFECTS); + uint32 CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType=MAX_ATTACK); + void CalcAbsorbResist(Unit* pVictim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, SpellInfo const* spellInfo = NULL); + void CalcHealAbsorb(Unit* pVictim, const SpellInfo* spellProto, uint32 &healAmount, uint32 &absorb); void UpdateSpeed(UnitMoveType mtype, bool forced); float GetSpeed(UnitMoveType mtype) const; @@ -2118,16 +2118,16 @@ class Unit : public WorldObject m_misdirectionTargetGUID = guid; } uint32 GetReducedThreatPercent() { return m_reducedThreatPercent; } - Unit *GetMisdirectionTarget() { return m_misdirectionTargetGUID ? GetUnit(*this, m_misdirectionTargetGUID) : NULL; } + Unit* GetMisdirectionTarget() { return m_misdirectionTargetGUID ? GetUnit(*this, m_misdirectionTargetGUID) : NULL; } bool IsAIEnabled, NeedChangeAI; bool CreateVehicleKit(uint32 id, uint32 creatureEntry); void RemoveVehicleKit(); - Vehicle *GetVehicleKit()const { return m_vehicleKit; } - Vehicle *GetVehicle() const { return m_vehicle; } - bool IsOnVehicle(const Unit *vehicle) const { return m_vehicle && m_vehicle == vehicle->GetVehicleKit(); } - Unit *GetVehicleBase() const; - Creature *GetVehicleCreatureBase() const; + Vehicle* GetVehicleKit()const { return m_vehicleKit; } + Vehicle* GetVehicle() const { return m_vehicle; } + bool IsOnVehicle(const Unit* vehicle) const { return m_vehicle && m_vehicle == vehicle->GetVehicleKit(); } + Unit* GetVehicleBase() const; + Creature* GetVehicleCreatureBase() const; float GetTransOffsetX() const { return m_movementInfo.t_pos.GetPositionX(); } float GetTransOffsetY() const { return m_movementInfo.t_pos.GetPositionY(); } float GetTransOffsetZ() const { return m_movementInfo.t_pos.GetPositionZ(); } @@ -2139,7 +2139,7 @@ class Unit : public WorldObject bool m_ControlledByPlayer; bool HandleSpellClick(Unit* clicker, int8 seatId = -1); - void EnterVehicle(Unit *base, int8 seatId = -1); + void EnterVehicle(Unit* base, int8 seatId = -1); void ExitVehicle(Position const* exitPosition = NULL); void ChangeSeat(int8 seatId, bool next = true); @@ -2202,7 +2202,7 @@ class Unit : public WorldObject protected: explicit Unit (); - UnitAI *i_AI, *i_disabledAI; + UnitAI* i_AI, *i_disabledAI; void _UpdateSpells(uint32 time); void _DeleteRemovedAuras(); @@ -2251,7 +2251,7 @@ class Unit : public WorldObject float m_speed_rate[MAX_MOVE_TYPE]; - CharmInfo *m_charmInfo; + CharmInfo* m_charmInfo; SharedVisionList m_sharedVision; virtual SpellSchoolMask GetMeleeDamageSchoolMask() const; @@ -2263,8 +2263,8 @@ class Unit : public WorldObject ThreatManager m_ThreatManager; - Vehicle *m_vehicle; - Vehicle *m_vehicleKit; + Vehicle* m_vehicle; + Vehicle* m_vehicleKit; uint32 m_unitTypeMask; @@ -2275,15 +2275,15 @@ class Unit : public WorldObject bool isAlwaysDetectableFor(WorldObject const* seer) const; private: - bool IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const *& spellProcEvent); - bool HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); - bool HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); - bool HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); - bool HandleObsModEnergyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); - bool HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); - bool HandleAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled); - bool HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); - bool HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const *procSpell, uint32 cooldown); + bool IsTriggeredAtSpellProcEvent(Unit* pVictim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const* & spellProcEvent); + bool HandleDummyAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); + bool HandleHasteAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); + bool HandleSpellCritChanceAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); + bool HandleObsModEnergyAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); + bool HandleModDamagePctTakenAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); + bool HandleAuraProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled); + bool HandleProcTriggerSpell(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); + bool HandleOverrideClassScriptAuraProc(Unit* pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 cooldown); bool HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura); bool HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura); @@ -2327,7 +2327,7 @@ namespace Trinity { public: PowerPctOrderPred(Powers power, bool ascending = true) : m_power(power), m_ascending(ascending) {} - bool operator() (const Unit *a, const Unit *b) const + 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; float rB = b->GetMaxPower(m_power) ? float(b->GetPower(m_power)) / float(b->GetMaxPower(m_power)) : 0.0f; @@ -2343,7 +2343,7 @@ namespace Trinity { public: HealthPctOrderPred(bool ascending = true) : m_ascending(ascending) {} - bool operator() (const Unit *a, const Unit *b) const + bool operator() (const Unit* a, const Unit* b) const { float rA = a->GetMaxHealth() ? float(a->GetHealth()) / float(a->GetMaxHealth()) : 0.0f; float rB = b->GetMaxHealth() ? float(b->GetHealth()) / float(b->GetMaxHealth()) : 0.0f; diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h index b706bf91721..aca6a5c6444 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.h +++ b/src/server/game/Entities/Vehicle/Vehicle.h @@ -48,7 +48,7 @@ class Vehicle bool AddPassenger(Unit* passenger, int8 seatId = -1); void EjectPassenger(Unit* passenger, Unit* controller); - void RemovePassenger(Unit *passenger); + void RemovePassenger(Unit* passenger); void RelocatePassengers(float x, float y, float z, float ang); void RemoveAllPassengers(); void Dismiss(); diff --git a/src/server/game/Entities/Vehicle/VehicleDefines.h b/src/server/game/Entities/Vehicle/VehicleDefines.h index f903cf80eea..4d46ce956de 100644 --- a/src/server/game/Entities/Vehicle/VehicleDefines.h +++ b/src/server/game/Entities/Vehicle/VehicleDefines.h @@ -55,8 +55,8 @@ enum VehicleSpells struct VehicleSeat { - explicit VehicleSeat(VehicleSeatEntry const *seatInfo) : SeatInfo(seatInfo), Passenger(0) {} - VehicleSeatEntry const *SeatInfo; + explicit VehicleSeat(VehicleSeatEntry const* seatInfo) : SeatInfo(seatInfo), Passenger(0) {} + VehicleSeatEntry const* SeatInfo; uint64 Passenger; }; diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 42a849b92cf..84ad326e445 100755 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -216,7 +216,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint16 event_id = fields[0].GetUInt16(); if (event_id == 0) @@ -279,7 +279,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint16 event_id = fields[0].GetUInt16(); @@ -324,7 +324,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint16 event_id = fields[0].GetUInt16(); @@ -377,7 +377,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); int16 event_id = fields[1].GetInt16(); @@ -420,7 +420,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); int16 event_id = fields[1].GetInt16(); @@ -463,7 +463,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); uint16 event_id = fields[1].GetUInt16(); @@ -519,7 +519,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 id = fields[0].GetUInt32(); uint32 quest = fields[1].GetUInt32(); @@ -560,7 +560,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 id = fields[0].GetUInt32(); uint32 quest = fields[1].GetUInt32(); @@ -601,7 +601,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 quest = fields[0].GetUInt32(); uint16 event_id = fields[1].GetUInt16(); @@ -644,7 +644,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint16 event_id = fields[0].GetUInt16(); uint32 condition = fields[1].GetUInt32(); @@ -686,7 +686,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint16 event_id = fields[0].GetUInt16(); uint32 condition = fields[1].GetUInt32(); @@ -734,7 +734,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); uint16 event_id = fields[1].GetUInt16(); @@ -774,7 +774,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint16 event_id = fields[0].GetUInt16(); @@ -840,7 +840,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint16 event_id = fields[0].GetUInt16(); @@ -879,7 +879,7 @@ void GameEventMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); int16 event_id = fields[1].GetInt16(); @@ -933,7 +933,7 @@ void GameEventMgr::Initialize() QueryResult result = WorldDatabase.Query("SELECT MAX(eventEntry) FROM game_event"); if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 maxEventId = fields[0].GetUInt16(); @@ -972,7 +972,7 @@ void GameEventMgr::StartArenaSeason() return; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint16 eventId = fields[0].GetUInt16(); if (eventId >= mGameEvent.size()) @@ -1121,7 +1121,7 @@ void GameEventMgr::UpdateEventNPCFlags(uint16 event_id) if (cr) { uint32 npcflag = GetNPCFlag(cr); - if (const CreatureTemplate * ci = cr->GetCreatureInfo()) + if (const CreatureTemplate* ci = cr->GetCreatureInfo()) npcflag |= ci->npcflag; cr->SetUInt32Value(UNIT_NPC_FLAGS, npcflag); // reset gossip options, since the flag change might have added / removed some @@ -1337,7 +1337,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate) CreatureData const* data2 = sObjectMgr->GetCreatureData(itr->first); if (data2 && activate) { - CreatureTemplate const *cinfo = sObjectMgr->GetCreatureTemplate(data2->id); + CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(data2->id); uint32 displayID = sObjectMgr->ChooseDisplayId(0, cinfo, data2); sObjectMgr->GetCreatureModelRandomGender(&displayID); diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 78f98ed9fca..510e702fac9 100755 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -140,7 +140,7 @@ class ObjectAccessor } // returns object if is in map - template<class T> static T* GetObjectInMap(uint64 guid, Map * map, T* /*typeSpecifier*/) + template<class T> static T* GetObjectInMap(uint64 guid, Map* map, T* /*typeSpecifier*/) { ASSERT(map); if (T * obj = GetObjectInWorld(guid, (T*)NULL)) @@ -192,7 +192,7 @@ class ObjectAccessor // these functions return objects if found in whole world // ACCESS LIKE THAT IS NOT THREAD SAFE - static Pet * FindPet(uint64); + static Pet* FindPet(uint64); static Player* FindPlayer(uint64); static Unit* FindUnit(uint64); Player* FindPlayerByName(const char* name); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index a7f92e1e649..8d0751ef9ab 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -303,7 +303,7 @@ void ObjectMgr::LoadCreatureLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -339,7 +339,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint16 menuId = fields[0].GetUInt16(); uint16 id = fields[1].GetUInt16(); @@ -371,7 +371,7 @@ void ObjectMgr::LoadPointOfInterestLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -417,7 +417,7 @@ void ObjectMgr::LoadCreatureTemplates() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -543,7 +543,7 @@ void ObjectMgr::LoadCreatureTemplateAddons() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -566,7 +566,7 @@ void ObjectMgr::LoadCreatureTemplateAddons() creatureAddon.auras.resize(tokens.size()); for (Tokens::iterator itr = tokens.begin(); itr != tokens.end(); ++itr) { - SpellInfo const *AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr))); + SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr))); if (!AdditionalSpellInfo) { sLog->outErrorDb("Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", entry, uint32(atol(*itr))); @@ -911,7 +911,7 @@ void ObjectMgr::LoadCreatureAddons() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); @@ -934,7 +934,7 @@ void ObjectMgr::LoadCreatureAddons() creatureAddon.auras.resize(tokens.size()); for (Tokens::iterator itr = tokens.begin(); itr != tokens.end(); ++itr) { - SpellInfo const *AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr))); + SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr))); if (!AdditionalSpellInfo) { sLog->outErrorDb("Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr))); @@ -1021,7 +1021,7 @@ void ObjectMgr::LoadEquipmentTemplates() if (!equipmentInfo.ItemEntry[i]) continue; - ItemEntry const *dbcItem = sItemStore.LookupEntry(equipmentInfo.ItemEntry[i]); + ItemEntry const* dbcItem = sItemStore.LookupEntry(equipmentInfo.ItemEntry[i]); if (!dbcItem) { @@ -1064,7 +1064,7 @@ CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId) return NULL; } -uint32 ObjectMgr::ChooseDisplayId(uint32 /*team*/, const CreatureTemplate *cinfo, const CreatureData *data /*= NULL*/) +uint32 ObjectMgr::ChooseDisplayId(uint32 /*team*/, const CreatureTemplate* cinfo, const CreatureData* data /*= NULL*/) { // Load creature model (display id) uint32 display_id = 0; @@ -1079,7 +1079,7 @@ uint32 ObjectMgr::ChooseDisplayId(uint32 /*team*/, const CreatureTemplate *cinfo return display_id; } -void ObjectMgr::ChooseCreatureFlags(const CreatureTemplate *cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, const CreatureData *data /*= NULL*/) +void ObjectMgr::ChooseCreatureFlags(const CreatureTemplate* cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, const CreatureData* data /*= NULL*/) { npcflag = cinfo->npcflag; unit_flags = cinfo->unit_flags; @@ -1107,7 +1107,7 @@ CreatureModelInfo const* ObjectMgr::GetCreatureModelRandomGender(uint32* display // If a model for another gender exists, 50% chance to use it if (minfo->modelid_other_gender != 0 && urand(0, 1) == 0) { - CreatureModelInfo const *minfo_tmp = GetCreatureModelInfo(minfo->modelid_other_gender); + CreatureModelInfo const* minfo_tmp = GetCreatureModelInfo(minfo->modelid_other_gender); if (!minfo_tmp) sLog->outErrorDb("Model (Entry: %u) has modelid_other_gender %u not found in table `creature_model_info`. ", *displayID, minfo->modelid_other_gender); else @@ -1138,7 +1138,7 @@ void ObjectMgr::LoadCreatureModelInfo() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 modelId = fields[0].GetUInt32(); @@ -1195,7 +1195,7 @@ void ObjectMgr::LoadLinkedRespawn() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guidLow = fields[0].GetUInt32(); uint32 linkedGuidLow = fields[1].GetUInt32(); @@ -1446,7 +1446,7 @@ void ObjectMgr::LoadCreatures() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[ 0].GetUInt32(); uint32 entry = fields[ 1].GetUInt32(); @@ -1629,7 +1629,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float // We use spawn coords to spawn if (!map->Instanceable() && map->IsLoaded(x, y)) { - GameObject *go = new GameObject; + GameObject* go = new GameObject; if (!go->LoadFromDB(guid, map)) { sLog->outError("AddGOData: cannot add gameobject entry %u to map", entry); @@ -1665,7 +1665,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos) // We use spawn coords to spawn if (!map->Instanceable() && map->IsLoaded(data.posX, data.posY)) { - Creature *creature = new Creature; + Creature* creature = new Creature; if (!creature->LoadFromDB(guid, map)) { sLog->outError("AddCreature: cannot add creature entry %u to map", guid); @@ -1680,7 +1680,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos) uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float x, float y, float z, float o, uint32 spawntimedelay) { - CreatureTemplate const *cInfo = GetCreatureTemplate(entry); + CreatureTemplate const* cInfo = GetCreatureTemplate(entry); if (!cInfo) return 0; @@ -1762,7 +1762,7 @@ void ObjectMgr::LoadGameobjects() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[ 0].GetUInt32(); uint32 entry = fields[ 1].GetUInt32(); @@ -1921,7 +1921,7 @@ void ObjectMgr::LoadCreatureRespawnTimes() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 loguid = fields[0].GetUInt32(); uint32 respawn_time = fields[1].GetUInt32(); @@ -1955,7 +1955,7 @@ void ObjectMgr::LoadGameobjectRespawnTimes() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 loguid = fields[0].GetUInt32(); uint32 respawn_time = fields[1].GetUInt32(); @@ -2073,7 +2073,7 @@ void ObjectMgr::LoadItemLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -2140,7 +2140,7 @@ void ObjectMgr::LoadItemTemplates() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -2253,7 +2253,7 @@ void ObjectMgr::LoadItemTemplates() // Checks - ItemEntry const *dbcitem = sItemStore.LookupEntry(entry); + ItemEntry const* dbcitem = sItemStore.LookupEntry(entry); if (dbcitem) { @@ -2710,7 +2710,7 @@ void ObjectMgr::LoadItemSetNameLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -2757,7 +2757,7 @@ void ObjectMgr::LoadItemSetNames() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); if (itemSetItems.find(entry) == itemSetItems.end()) @@ -2825,7 +2825,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 uiEntry = fields[0].GetUInt32(); uint32 uiAccessory = fields[1].GetUInt32(); @@ -2881,7 +2881,7 @@ void ObjectMgr::LoadVehicleAccessories() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 uiGUID = fields[0].GetUInt32(); uint32 uiAccessory = fields[1].GetUInt32(); @@ -3740,7 +3740,7 @@ void ObjectMgr::LoadQuests() // for example set of race quests can lead to single not race specific quest do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); Quest * newQuest = new Quest(fields); mQuestTemplates[newQuest->GetQuestId()] = newQuest; @@ -4343,7 +4343,7 @@ void ObjectMgr::LoadQuests() // check QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT for spell with SPELL_EFFECT_QUEST_COMPLETE for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(i); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(i); if (!spellInfo) continue; @@ -4396,7 +4396,7 @@ void ObjectMgr::LoadQuestLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -4427,7 +4427,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) { uint32 oldMSTime = getMSTime(); - ScriptMapMap *scripts = GetScriptsMapByType(type); + ScriptMapMap* scripts = GetScriptsMapByType(type); if (!scripts) return; @@ -4459,7 +4459,7 @@ void ObjectMgr::LoadScripts(ScriptsType type) do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); ScriptInfo tmp; tmp.type = type; tmp.id = fields[0].GetUInt32(); @@ -4863,7 +4863,7 @@ void ObjectMgr::LoadWaypointScripts() { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 action = fields[0].GetUInt32(); actionSet.erase(action); @@ -4895,7 +4895,7 @@ void ObjectMgr::LoadSpellScriptNames() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); int32 spellId = fields[0].GetInt32(); const char *scriptName = fields[1].GetCString(); @@ -4959,8 +4959,8 @@ void ObjectMgr::ValidateSpellScripts() for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsMap::iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr) { - SpellScript * spellScript = sitr->first->GetSpellScript(); - AuraScript * auraScript = sitr->first->GetAuraScript(); + SpellScript* spellScript = sitr->first->GetSpellScript(); + AuraScript* auraScript = sitr->first->GetAuraScript(); bool valid = true; if (!spellScript && !auraScript) { @@ -5059,7 +5059,7 @@ void ObjectMgr::LoadPageTextLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -5204,7 +5204,7 @@ void ObjectMgr::LoadInstanceEncounters() sLog->outString(); } -GossipText const *ObjectMgr::GetGossipText(uint32 Text_ID) const +GossipText const* ObjectMgr::GetGossipText(uint32 Text_ID) const { GossipTextMap::const_iterator itr = mGossipText.find(Text_ID); if (itr != mGossipText.end()) @@ -5234,7 +5234,7 @@ void ObjectMgr::LoadGossipText() ++count; cic = 0; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 Text_ID = fields[cic++].GetUInt32(); if (!Text_ID) @@ -5287,7 +5287,7 @@ void ObjectMgr::LoadNpcTextLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -5356,8 +5356,8 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) do { - Field *fields = result->Fetch(); - Mail *m = new Mail; + Field* fields = result->Fetch(); + Mail* m = new Mail; m->messageID = fields[0].GetUInt32(); m->messageType = fields[1].GetUInt8(); m->sender = fields[2].GetUInt32(); @@ -5369,7 +5369,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) m->checked = fields[7].GetUInt32(); m->mailTemplateId = fields[8].GetInt16(); - Player *pl = NULL; + Player* pl = NULL; if (serverUp) pl = ObjectAccessor::FindPlayer((uint64)m->receiver); @@ -5460,7 +5460,7 @@ void ObjectMgr::LoadQuestAreaTriggers() { ++count; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 trigger_ID = fields[0].GetUInt32(); uint32 quest_ID = fields[1].GetUInt32(); @@ -5519,7 +5519,7 @@ void ObjectMgr::LoadTavernAreaTriggers() { ++count; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 Trigger_ID = fields[0].GetUInt32(); @@ -5557,7 +5557,7 @@ void ObjectMgr::LoadAreaTriggerScripts() { ++count; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 Trigger_ID = fields[0].GetUInt32(); const char *scriptName = fields[1].GetCString(); @@ -5661,7 +5661,7 @@ uint32 ObjectMgr::GetTaxiMountDisplayId(uint32 id, uint32 team, bool allowed_alt mount_entry = team == ALLIANCE ? node->MountCreatureID[0] : node->MountCreatureID[1]; } - CreatureTemplate const *mount_info = GetCreatureTemplate(mount_entry); + CreatureTemplate const* mount_info = GetCreatureTemplate(mount_entry); if (mount_info) { mount_id = mount_info->GetRandomValidModelId(); @@ -5700,7 +5700,7 @@ void ObjectMgr::LoadGraveyardZones() { ++count; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 safeLocId = fields[0].GetUInt32(); uint32 zoneId = fields[1].GetUInt32(); @@ -5713,7 +5713,7 @@ void ObjectMgr::LoadGraveyardZones() continue; } - AreaTableEntry const *areaEntry = GetAreaEntryByAreaID(zoneId); + AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId); if (!areaEntry) { sLog->outErrorDb("Table `game_graveyard_zone` has a record for not existing zone id (%u), skipped.", zoneId); @@ -5740,7 +5740,7 @@ void ObjectMgr::LoadGraveyardZones() sLog->outString(); } -WorldSafeLocsEntry const *ObjectMgr::GetDefaultGraveYard(uint32 team) +WorldSafeLocsEntry const* ObjectMgr::GetDefaultGraveYard(uint32 team) { enum DefaultGraveyard { @@ -5755,7 +5755,7 @@ WorldSafeLocsEntry const *ObjectMgr::GetDefaultGraveYard(uint32 team) else return NULL; } -WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float z, uint32 MapId, uint32 team) +WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float z, uint32 MapId, uint32 team) { // search for zone associated closest graveyard uint32 zoneId = sMapMgr->GetZoneId(MapId, x, y, z); @@ -5982,7 +5982,7 @@ void ObjectMgr::LoadAreaTriggerTeleports() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); ++count; @@ -6043,7 +6043,7 @@ void ObjectMgr::LoadAccessRequirements() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); ++count; @@ -6064,7 +6064,7 @@ void ObjectMgr::LoadAccessRequirements() if (ar.item) { - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(ar.item); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(ar.item); if (!pProto) { sLog->outError("Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item, mapid, difficulty); @@ -6074,7 +6074,7 @@ void ObjectMgr::LoadAccessRequirements() if (ar.item2) { - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(ar.item2); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(ar.item2); if (!pProto) { sLog->outError("Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar.item2, mapid, difficulty); @@ -6123,13 +6123,13 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const { bool useParentDbValue = false; uint32 parentId = 0; - const MapEntry *mapEntry = sMapStore.LookupEntry(Map); + const MapEntry* mapEntry = sMapStore.LookupEntry(Map); if (!mapEntry || mapEntry->entrance_map < 0) return NULL; if (mapEntry->IsDungeon()) { - const InstanceTemplate *iTemplate = sObjectMgr->GetInstanceTemplate(Map); + const InstanceTemplate* iTemplate = sObjectMgr->GetInstanceTemplate(Map); if (!iTemplate) return NULL; @@ -6344,7 +6344,7 @@ void ObjectMgr::LoadGameObjectLocales() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -6442,7 +6442,7 @@ void ObjectMgr::LoadGameObjectTemplate() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -6629,7 +6629,7 @@ void ObjectMgr::LoadExplorationBaseXP() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint8 level = fields[0].GetUInt8(); uint32 basexp = fields[1].GetUInt32(); mBaseXPTable[level] = basexp; @@ -6671,7 +6671,7 @@ void ObjectMgr::LoadPetNames() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); std::string word = fields[0].GetString(); uint32 entry = fields[1].GetUInt32(); bool half = fields[2].GetBool(); @@ -6694,7 +6694,7 @@ void ObjectMgr::LoadPetNumber() QueryResult result = CharacterDatabase.Query("SELECT MAX(id) FROM character_pet"); if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); m_hiPetNumber = fields[0].GetUInt32()+1; } @@ -6709,7 +6709,7 @@ std::string ObjectMgr::GeneratePetName(uint32 entry) if (list0.empty() || list1.empty()) { - CreatureTemplate const *cinfo = GetCreatureTemplate(entry); + CreatureTemplate const* cinfo = GetCreatureTemplate(entry); char* petname = GetPetName(cinfo->family, sWorld->GetDefaultDbcLocale()); if (!petname) return cinfo->Name; @@ -6740,10 +6740,10 @@ void ObjectMgr::LoadCorpses() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[16].GetUInt32(); - Corpse *corpse = new Corpse(); + Corpse* corpse = new Corpse(); if (!corpse->LoadFromDB(guid, fields)) { delete corpse; @@ -6778,7 +6778,7 @@ void ObjectMgr::LoadReputationRewardRate() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 factionId = fields[0].GetUInt32(); @@ -6788,7 +6788,7 @@ void ObjectMgr::LoadReputationRewardRate() repRate.creature_rate = fields[2].GetFloat(); repRate.spell_rate = fields[3].GetFloat(); - FactionEntry const *factionEntry = sFactionStore.LookupEntry(factionId); + FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId); if (!factionEntry) { sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_reward_rate`", factionId); @@ -6847,7 +6847,7 @@ void ObjectMgr::LoadReputationOnKill() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 creature_id = fields[0].GetUInt32(); @@ -6870,7 +6870,7 @@ void ObjectMgr::LoadReputationOnKill() if (repOnKill.repfaction1) { - FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(repOnKill.repfaction1); + FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repOnKill.repfaction1); if (!factionEntry1) { sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction1); @@ -6880,7 +6880,7 @@ void ObjectMgr::LoadReputationOnKill() if (repOnKill.repfaction2) { - FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(repOnKill.repfaction2); + FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repOnKill.repfaction2); if (!factionEntry2) { sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction2); @@ -6916,7 +6916,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 factionId = fields[0].GetUInt32(); @@ -6935,7 +6935,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate() repTemplate.faction_rate[3] = fields[11].GetFloat(); repTemplate.faction_rank[3] = fields[12].GetUInt32(); - FactionEntry const *factionEntry = sFactionStore.LookupEntry(factionId); + FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId); if (!factionEntry) { @@ -6953,7 +6953,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate() { if (repTemplate.faction[i]) { - FactionEntry const *factionSpillover = sFactionStore.LookupEntry(repTemplate.faction[i]); + FactionEntry const* factionSpillover = sFactionStore.LookupEntry(repTemplate.faction[i]); if (!factionSpillover) { @@ -6975,25 +6975,25 @@ void ObjectMgr::LoadReputationSpilloverTemplate() } } - FactionEntry const *factionEntry0 = sFactionStore.LookupEntry(repTemplate.faction[0]); + FactionEntry const* factionEntry0 = sFactionStore.LookupEntry(repTemplate.faction[0]); if (repTemplate.faction[0] && !factionEntry0) { sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[0]); continue; } - FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(repTemplate.faction[1]); + FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repTemplate.faction[1]); if (repTemplate.faction[1] && !factionEntry1) { sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[1]); continue; } - FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(repTemplate.faction[2]); + FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repTemplate.faction[2]); if (repTemplate.faction[2] && !factionEntry2) { sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[2]); continue; } - FactionEntry const *factionEntry3 = sFactionStore.LookupEntry(repTemplate.faction[3]); + FactionEntry const* factionEntry3 = sFactionStore.LookupEntry(repTemplate.faction[3]); if (repTemplate.faction[3] && !factionEntry3) { sLog->outErrorDb("Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[3]); @@ -7030,7 +7030,7 @@ void ObjectMgr::LoadPointsOfInterest() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 point_id = fields[0].GetUInt32(); @@ -7083,14 +7083,14 @@ void ObjectMgr::LoadQuestPOI() if (points) { // The first result should have the highest questId - Field *fields = points->Fetch(); + Field* fields = points->Fetch(); uint32 questId = fields[0].GetUInt32(); POIs.resize(questId + 1); do { - Field *fields = points->Fetch(); + Field* fields = points->Fetch(); uint32 questId = fields[0].GetUInt32(); uint32 id = fields[1].GetUInt32(); @@ -7107,7 +7107,7 @@ void ObjectMgr::LoadQuestPOI() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 questId = fields[0].GetUInt32(); uint32 id = fields[1].GetUInt32(); @@ -7149,7 +7149,7 @@ void ObjectMgr::LoadNPCSpellClickSpells() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 npc_entry = fields[0].GetUInt32(); CreatureTemplate const* cInfo = GetCreatureTemplate(npc_entry); @@ -7160,7 +7160,7 @@ void ObjectMgr::LoadNPCSpellClickSpells() } uint32 spellid = fields[1].GetUInt32(); - SpellInfo const *spellinfo = sSpellMgr->GetSpellInfo(spellid); + SpellInfo const* spellinfo = sSpellMgr->GetSpellInfo(spellid); if (!spellinfo) { sLog->outErrorDb("Table npc_spellclick_spells references unknown spellid %u. Skipping entry.", spellid); @@ -7170,7 +7170,7 @@ void ObjectMgr::LoadNPCSpellClickSpells() uint32 auraRequired = fields[6].GetUInt32(); if (auraRequired) { - SpellInfo const *aurReqInfo = sSpellMgr->GetSpellInfo(auraRequired); + SpellInfo const* aurReqInfo = sSpellMgr->GetSpellInfo(auraRequired); if (!aurReqInfo) { sLog->outErrorDb("Table npc_spellclick_spells references unknown aura required %u. Skipping entry.", auraRequired); @@ -7181,7 +7181,7 @@ void ObjectMgr::LoadNPCSpellClickSpells() uint32 auraForbidden = fields[7].GetUInt32(); if (auraForbidden) { - SpellInfo const *aurForInfo = sSpellMgr->GetSpellInfo(auraForbidden); + SpellInfo const* aurForInfo = sSpellMgr->GetSpellInfo(auraForbidden); if (!aurForInfo) { sLog->outErrorDb("Table npc_spellclick_spells references unknown aura forbidden %u. Skipping entry.", auraForbidden); @@ -7798,7 +7798,7 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); int32 entry = fields[0].GetInt32(); @@ -7839,7 +7839,7 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max const char *ObjectMgr::GetTrinityString(int32 entry, LocaleConstant locale_idx) const { - if (TrinityStringLocale const *msl = GetTrinityStringLocale(entry)) + if (TrinityStringLocale const* msl = GetTrinityStringLocale(entry)) { if (msl->Content.size() > size_t(locale_idx) && !msl->Content[locale_idx].empty()) return msl->Content[locale_idx].c_str(); @@ -7874,7 +7874,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); int32 skill = fields[1].GetInt32(); @@ -7931,7 +7931,7 @@ SpellScriptsBounds ObjectMgr::GetSpellScriptsBounds(uint32 spell_id) return SpellScriptsBounds(mSpellScripts.lower_bound(spell_id), mSpellScripts.upper_bound(spell_id)); } -SkillRangeType GetSkillRangeType(SkillLineEntry const *pSkill, bool racial) +SkillRangeType GetSkillRangeType(SkillLineEntry const* pSkill, bool racial) { switch(pSkill->categoryId) { @@ -7983,7 +7983,7 @@ void ObjectMgr::LoadGameTele() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 id = fields[0].GetUInt32(); @@ -8109,7 +8109,7 @@ void ObjectMgr::LoadMailLevelRewards() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint8 level = fields[0].GetUInt8(); uint32 raceMask = fields[1].GetUInt32(); @@ -8168,7 +8168,7 @@ void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost, return; } - SpellInfo const *spellinfo = sSpellMgr->GetSpellInfo(spell); + SpellInfo const* spellinfo = sSpellMgr->GetSpellInfo(spell); if (!spellinfo) { sLog->outErrorDb("Table `npc_trainer` contains an entry (Entry: %u) for a non-existing spell (Spell: %u), ignoring", entry, spell); @@ -8641,7 +8641,7 @@ uint32 ObjectMgr::GetScriptId(const char *name) void ObjectMgr::CheckScripts(ScriptsType type, std::set<int32>& ids) { - ScriptMapMap *scripts = GetScriptsMapByType(type); + ScriptMapMap* scripts = GetScriptsMapByType(type); if (!scripts) return; for (ScriptMapMap::const_iterator itrMM = scripts->begin(); itrMM != scripts->end(); ++itrMM) @@ -8732,7 +8732,7 @@ void ObjectMgr::LoadCreatureClassLevelStats() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint8 Level = fields[0].GetUInt8(); uint8 Class = fields[1].GetUInt8(); @@ -8794,7 +8794,7 @@ void ObjectMgr::LoadFactionChangeAchievements() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 alliance = fields[0].GetUInt32(); uint32 horde = fields[1].GetUInt32(); @@ -8831,7 +8831,7 @@ void ObjectMgr::LoadFactionChangeItems() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 alliance = fields[0].GetUInt32(); uint32 horde = fields[1].GetUInt32(); @@ -8868,7 +8868,7 @@ void ObjectMgr::LoadFactionChangeSpells() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 alliance = fields[0].GetUInt32(); uint32 horde = fields[1].GetUInt32(); @@ -8905,7 +8905,7 @@ void ObjectMgr::LoadFactionChangeReputations() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 alliance = fields[0].GetUInt32(); uint32 horde = fields[1].GetUInt32(); diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 3190bc7af2c..95382b751f3 100755 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -547,7 +547,7 @@ enum SkillRangeType SKILL_RANGE_NONE, // 0..0 always }; -SkillRangeType GetSkillRangeType(SkillLineEntry const *pSkill, bool racial); +SkillRangeType GetSkillRangeType(SkillLineEntry const* pSkill, bool racial); #define MAX_PLAYER_NAME 12 // max allowed by client name length #define MAX_INTERNAL_PLAYER_NAME 15 // max server internal player name length (> MAX_PLAYER_NAME for support declined names) @@ -625,17 +625,17 @@ class ObjectMgr int LoadReferenceVendor(int32 vendor, int32 item_id, std::set<uint32> *skip_vendors); void LoadGameObjectTemplate(); - void AddGameobjectInfo(GameObjectTemplate *goinfo); + void AddGameobjectInfo(GameObjectTemplate* goinfo); CreatureTemplate const* GetCreatureTemplate(uint32 entry); CreatureTemplateContainer const* GetCreatureTemplates() { return &CreatureTemplateStore; } CreatureModelInfo const* GetCreatureModelInfo(uint32 modelId); CreatureModelInfo const* GetCreatureModelRandomGender(uint32* displayID); - static uint32 ChooseDisplayId(uint32 team, const CreatureTemplate *cinfo, const CreatureData *data = NULL); - static void ChooseCreatureFlags(const CreatureTemplate *cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, const CreatureData *data = NULL); - EquipmentInfo const *GetEquipmentInfo(uint32 entry); - CreatureAddon const *GetCreatureAddon(uint32 lowguid); - CreatureAddon const *GetCreatureTemplateAddon(uint32 entry); + static uint32 ChooseDisplayId(uint32 team, const CreatureTemplate* cinfo, const CreatureData* data = NULL); + static void ChooseCreatureFlags(const CreatureTemplate* cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, const CreatureData* data = NULL); + EquipmentInfo const* GetEquipmentInfo(uint32 entry); + CreatureAddon const* GetCreatureAddon(uint32 lowguid); + CreatureAddon const* GetCreatureTemplateAddon(uint32 entry); ItemTemplate const* GetItemTemplate(uint32 entry); ItemTemplateContainer const* GetItemTemplateStore() { return &ItemTemplateStore; } @@ -708,8 +708,8 @@ class ObjectMgr GossipText const* GetGossipText(uint32 Text_ID) const; - WorldSafeLocsEntry const *GetDefaultGraveYard(uint32 team); - WorldSafeLocsEntry const *GetClosestGraveYard(float x, float y, float z, uint32 MapId, uint32 team); + WorldSafeLocsEntry const* GetDefaultGraveYard(uint32 team); + WorldSafeLocsEntry const* GetClosestGraveYard(float x, float y, float z, uint32 MapId, uint32 team); bool AddGraveYardLink(uint32 id, uint32 zone, uint32 team, bool inDB = true); void RemoveGraveYardLink(uint32 id, uint32 zone, uint32 team, bool inDB = false); void LoadGraveyardZones(); diff --git a/src/server/game/Grids/GridReference.h b/src/server/game/Grids/GridReference.h index e3c4a6b0f54..601542daa0d 100755 --- a/src/server/game/Grids/GridReference.h +++ b/src/server/game/Grids/GridReference.h @@ -47,7 +47,7 @@ class GridReference : public Reference<GridRefManager<OBJECT>, OBJECT> public: GridReference() : Reference<GridRefManager<OBJECT>, OBJECT>() {} ~GridReference() { this->unlink(); } - GridReference *next() { return (GridReference*)Reference<GridRefManager<OBJECT>, OBJECT>::next(); } + GridReference* next() { return (GridReference*)Reference<GridRefManager<OBJECT>, OBJECT>::next(); } }; #endif diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp index 6ae6d4ed43b..dc938859e92 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp +++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp @@ -207,7 +207,7 @@ void DelayedUnitRelocation::Visit(PlayerMapType &m) for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { Player* player = iter->getSource(); - WorldObject const *viewPoint = player->m_seer; + WorldObject const* viewPoint = player->m_seer; if (!viewPoint->isNeedNotify(NOTIFY_VISIBILITY_CHANGED)) continue; @@ -234,7 +234,7 @@ void AIRelocationNotifier::Visit(CreatureMapType &m) { for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { - Creature *c = iter->getSource(); + Creature* c = iter->getSource(); CreatureUnitRelocationWorker(c, &i_unit); if (isCreature) CreatureUnitRelocationWorker((Creature*)&i_unit, c); @@ -246,7 +246,7 @@ MessageDistDeliverer::Visit(PlayerMapType &m) { for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { - Player *target = iter->getSource(); + Player* target = iter->getSource(); if (!target->InSamePhase(i_phaseMask)) continue; @@ -293,7 +293,7 @@ void MessageDistDeliverer::Visit(DynamicObjectMapType &m) { for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { - DynamicObject *target = iter->getSource(); + DynamicObject* target = iter->getSource(); if (!target->InSamePhase(i_phaseMask)) continue; diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 32ef215a5ee..8fc06c97cbb 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -120,13 +120,13 @@ namespace Trinity struct MessageDistDeliverer { - WorldObject *i_source; - WorldPacket *i_message; + WorldObject* i_source; + WorldPacket* i_message; uint32 i_phaseMask; float i_distSq; uint32 team; Player const* skipped_receiver; - MessageDistDeliverer(WorldObject *src, WorldPacket *msg, float dist, bool own_team_only = false, Player const* skipped = NULL) + MessageDistDeliverer(WorldObject* src, WorldPacket* msg, float dist, bool own_team_only = false, Player const* skipped = NULL) : i_source(src), i_message(msg), i_phaseMask(src->GetPhaseMask()), i_distSq(dist * dist) , team((own_team_only && src->GetTypeId() == TYPEID_PLAYER) ? ((Player*)src)->GetTeam() : 0) , skipped_receiver(skipped) @@ -985,7 +985,7 @@ namespace Trinity } private: - Creature const *me; + Creature const* me; float m_range; NearestHostileUnitCheck(NearestHostileUnitCheck const&); }; @@ -1022,7 +1022,7 @@ namespace Trinity } float GetLastRange() const { return m_range; } private: - Creature const *me; + Creature const* me; float m_range; bool m_force; NearestHostileUnitInAttackDistanceCheck(NearestHostileUnitInAttackDistanceCheck const&); diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index fade98b3ea8..58521b76bff 100755 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -98,7 +98,7 @@ template<class T> void AddUnitState(T* /*obj*/, CellPair const& /*cell_pair*/) { } -template<> void AddUnitState(Creature *obj, CellPair const& cell_pair) +template<> void AddUnitState(Creature* obj, CellPair const& cell_pair) { Cell cell(cell_pair); @@ -147,7 +147,7 @@ void LoadHelper(CellCorpseSet const& cell_corpses, CellPair &cell, CorpseMapType uint32 player_guid = itr->first; - Corpse *obj = sObjectAccessor->GetCorpseForPlayerGUID(player_guid); + Corpse* obj = sObjectAccessor->GetCorpseForPlayerGUID(player_guid); if (!obj) continue; diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index b9e00bc7231..039a2c8e517 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -45,7 +45,7 @@ Roll::~Roll() { } -void Roll::setLoot(Loot *pLoot) +void Roll::setLoot(Loot* pLoot) { link(pLoot, this); } @@ -93,7 +93,7 @@ Group::~Group() delete[] m_subGroupsCounts; } -bool Group::Create(Player *leader) +bool Group::Create(Player* leader) { uint64 leaderGuid = leader->GetGUID(); uint32 lowguid = sGroupMgr->GenerateGroupId(); @@ -140,7 +140,7 @@ bool Group::Create(Player *leader) return true; } -void Group::LoadGroupFromDB(Field *fields) +void Group::LoadGroupFromDB(Field* fields) { m_dbStoreId = fields[15].GetUInt32(); m_guid = MAKE_NEW_GUID(sGroupMgr->GenerateGroupId(), 0, HIGHGUID_GROUP); @@ -331,7 +331,7 @@ bool Group::AddMember(Player* player) player->SetGroup(this, subGroup); // if the same group invites the player back, cancel the homebind timer - InstanceGroupBind *bind = GetBoundInstance(player); + InstanceGroupBind* bind = GetBoundInstance(player); if (bind && bind->save->GetInstanceId() == player->GetInstanceId()) player->m_InstanceValid = true; } @@ -643,7 +643,7 @@ void Group::SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r) for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr) { - Player *p = ObjectAccessor::FindPlayer(itr->first); + Player* p = ObjectAccessor::FindPlayer(itr->first); if (!p || !p->GetSession()) continue; @@ -667,7 +667,7 @@ void Group::SendLootRoll(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr) { - Player *p = ObjectAccessor::FindPlayer(itr->first); + Player* p = ObjectAccessor::FindPlayer(itr->first); if (!p || !p->GetSession()) continue; @@ -690,7 +690,7 @@ void Group::SendLootRollWon(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumb for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr) { - Player *p = ObjectAccessor::FindPlayer(itr->first); + Player* p = ObjectAccessor::FindPlayer(itr->first); if (!p || !p->GetSession()) continue; @@ -710,7 +710,7 @@ void Group::SendLootAllPassed(uint32 NumberOfPlayers, const Roll &r) for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr != r.playerVote.end(); ++itr) { - Player *p = ObjectAccessor::FindPlayer(itr->first); + Player* p = ObjectAccessor::FindPlayer(itr->first); if (!p || !p->GetSession()) continue; @@ -720,7 +720,7 @@ void Group::SendLootAllPassed(uint32 NumberOfPlayers, const Roll &r) } // notify group members which player is the allowed looter for the given creature -void Group::SendLooter(Creature *pCreature, Player *pLooter) +void Group::SendLooter(Creature* pCreature, Player* pLooter) { ASSERT(pCreature); @@ -736,10 +736,10 @@ void Group::SendLooter(Creature *pCreature, Player *pLooter) BroadcastPacket(&data, false); } -void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject) +void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject) { std::vector<LootItem>::iterator i; - ItemTemplate const *item; + ItemTemplate const* item; uint8 itemSlot = 0; for (i = loot->items.begin(); i != loot->items.end(); ++i, ++itemSlot) @@ -761,9 +761,9 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject) Roll* r = new Roll(newitemGUID, *i); //a vector is filled with only near party members - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *member = itr->getSource(); + Player* member = itr->getSource(); if (!member || !member->GetSession()) continue; if (i->AllowedForPlayer(member)) @@ -799,7 +799,7 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject) { for (Roll::PlayerVote::const_iterator itr=r->playerVote.begin(); itr != r->playerVote.end(); ++itr) { - Player *p = ObjectAccessor::FindPlayer(itr->first); + Player* p = ObjectAccessor::FindPlayer(itr->first); if (!p || !p->GetSession()) continue; @@ -831,9 +831,9 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject) } } -void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject) +void Group::NeedBeforeGreed(Loot* loot, WorldObject* pLootedObject) { - ItemTemplate const *item; + ItemTemplate const* item; uint8 itemSlot = 0; for (std::vector<LootItem>::iterator i=loot->items.begin(); i != loot->items.end(); ++i, ++itemSlot) { @@ -848,7 +848,7 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject) uint64 newitemGUID = MAKE_NEW_GUID(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), 0, HIGHGUID_ITEM); Roll* r=new Roll(newitemGUID, *i); - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { Player* playerToRoll = itr->getSource(); if (!playerToRoll || !playerToRoll->GetSession()) @@ -890,7 +890,7 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject) { for (Roll::PlayerVote::const_iterator itr=r->playerVote.begin(); itr != r->playerVote.end(); ++itr) { - Player *p = ObjectAccessor::FindPlayer(itr->first); + Player* p = ObjectAccessor::FindPlayer(itr->first); if (!p || !p->GetSession()) continue; @@ -926,9 +926,9 @@ void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject) WorldPacket data(SMSG_LOOT_MASTER_LIST, 330); data << (uint8)GetMembersCount(); - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *looter = itr->getSource(); + Player* looter = itr->getSource(); if (!looter->IsInWorld()) continue; @@ -941,9 +941,9 @@ void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject) data.put<uint8>(0, real_count); - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *looter = itr->getSource(); + Player* looter = itr->getSource(); if (looter->IsWithinDistInMap(pLootedObject, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false)) looter->GetSession()->SendPacket(&data); } @@ -994,7 +994,7 @@ void Group::CountRollVote(uint64 playerGUID, uint64 Guid, uint32 NumberOfPlayers } //called when roll timer expires -void Group::EndRoll(Loot *pLoot) +void Group::EndRoll(Loot* pLoot) { for (Rolls::iterator itr = RollId.begin(); itr != RollId.end();) { @@ -1047,7 +1047,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers) player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT, roll->itemid, maxresul); ItemPosCountVec dest; - LootItem *item = &(roll->getLoot()->items[roll->itemSlot]); + LootItem* item = &(roll->getLoot()->items[roll->itemSlot]); InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, roll->itemid, item->count); if (msg == EQUIP_ERR_OK) { @@ -1096,7 +1096,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers) { player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT, roll->itemid, maxresul); - LootItem *item = &(roll->getLoot()->items[roll->itemSlot]); + LootItem* item = &(roll->getLoot()->items[roll->itemSlot]); if (rollvote == GREED) { @@ -1121,7 +1121,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers) item->is_looted = true; roll->getLoot()->NotifyItemRemoved(roll->itemSlot); roll->getLoot()->unlootedCount--; - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(roll->itemid); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(roll->itemid); player->AutoStoreLoot(pProto->DisenchantID, LootTemplates_Disenchant, true); } } @@ -1132,7 +1132,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers) SendLootAllPassed(NumberOfPlayers, *roll); // remove is_blocked so that the item is lootable by all players - LootItem *item = &(roll->getLoot()->items[roll->itemSlot]); + LootItem* item = &(roll->getLoot()->items[roll->itemSlot]); if (item) item->is_blocked = false; } @@ -1162,7 +1162,7 @@ void Group::SetTargetIcon(uint8 id, uint64 whoGuid, uint64 targetGuid) BroadcastPacket(&data, true); } -void Group::SendTargetIconList(WorldSession *session) +void Group::SendTargetIconList(WorldSession* session) { if (!session) return; @@ -1248,7 +1248,7 @@ void Group::UpdatePlayerOutOfRange(Player* pPlayer) WorldPacket data; pPlayer->GetSession()->BuildPartyMemberStatsChangedPacket(pPlayer, &data); - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { player = itr->getSource(); if (player && !player->IsWithinDist(pPlayer, player->GetSightRange(), false)) @@ -1258,9 +1258,9 @@ void Group::UpdatePlayerOutOfRange(Player* pPlayer) void Group::BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group, uint64 ignore) { - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *pl = itr->getSource(); + Player* pl = itr->getSource(); if (!pl || (ignore != 0 && pl->GetGUID() == ignore) || (ignorePlayersInBGRaid && pl->GetGroup() != this)) continue; @@ -1271,9 +1271,9 @@ void Group::BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int void Group::BroadcastReadyCheck(WorldPacket* packet) { - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *pl = itr->getSource(); + Player* pl = itr->getSource(); if (pl && pl->GetSession()) if (IsLeader(pl->GetGUID()) || IsAssistant(pl->GetGUID())) pl->GetSession()->SendPacket(packet); @@ -1284,7 +1284,7 @@ void Group::OfflineReadyCheck() { for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr) { - Player *pl = ObjectAccessor::FindPlayer(citr->guid); + Player* pl = ObjectAccessor::FindPlayer(citr->guid); if (!pl || !pl->GetSession()) { WorldPacket data(MSG_RAID_READY_CHECK_CONFIRM, 9); @@ -1409,7 +1409,7 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed) } // search next after current - Player *pNewLooter = NULL; + Player* pNewLooter = NULL; for (member_citerator itr = guid_itr; itr != m_memberSlots.end(); ++itr) { if (Player* pl = ObjectAccessor::FindPlayer(itr->guid)) @@ -1482,9 +1482,9 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* // check every member of the group to be able to join memberscount = 0; - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next(), ++memberscount) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next(), ++memberscount) { - Player *member = itr->getSource(); + Player* member = itr->getSource(); // offline member? don't let join if (!member) return ERR_BATTLEGROUND_JOIN_FAILED; @@ -1541,7 +1541,7 @@ void Group::SetDungeonDifficulty(Difficulty difficulty) if (!isBGGroup()) CharacterDatabase.PExecute("UPDATE groups SET difficulty = %u WHERE guid ='%u'", m_dungeonDifficulty, m_dbStoreId); - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { Player* player = itr->getSource(); if (!player->GetSession()) @@ -1558,7 +1558,7 @@ void Group::SetRaidDifficulty(Difficulty difficulty) if (!isBGGroup()) CharacterDatabase.PExecute("UPDATE groups SET raiddifficulty = %u WHERE guid ='%u'", m_raidDifficulty, m_dbStoreId); - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { Player* player = itr->getSource(); if (!player->GetSession()) @@ -1571,9 +1571,9 @@ void Group::SetRaidDifficulty(Difficulty difficulty) bool Group::InCombatToInstance(uint32 instanceId) { - for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *pPlayer = itr->getSource(); + Player* pPlayer = itr->getSource(); if (pPlayer && !pPlayer->getAttackers().empty() && pPlayer->GetInstanceId() == instanceId && (pPlayer->GetMap()->IsRaidOrHeroicDungeon())) for (std::set<Unit*>::const_iterator i = pPlayer->getAttackers().begin(); i != pPlayer->getAttackers().end(); ++i) if ((*i) && (*i)->GetTypeId() == TYPEID_UNIT && (*i)->ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND) @@ -1594,8 +1594,8 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo) for (BoundInstancesMap::iterator itr = m_boundInstances[diff].begin(); itr != m_boundInstances[diff].end();) { - InstanceSave *p = itr->second.save; - const MapEntry *entry = sMapStore.LookupEntry(itr->first); + InstanceSave* p = itr->second.save; + const MapEntry* entry = sMapStore.LookupEntry(itr->first); if (!entry || entry->IsRaid() != isRaid || (!p->CanReset() && method != INSTANCE_RESET_GROUP_DISBAND)) { ++itr; @@ -1614,7 +1614,7 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo) bool isEmpty = true; // if the map is loaded, reset it - Map *map = sMapMgr->FindMap(p->GetMapId(), p->GetInstanceId()); + Map* map = sMapMgr->FindMap(p->GetMapId(), p->GetInstanceId()); if (map && map->IsDungeon() && !(method == INSTANCE_RESET_GROUP_DISBAND && !p->CanReset())) { if (p->CanReset()) @@ -1690,7 +1690,7 @@ InstanceGroupBind* Group::GetBoundInstance(MapEntry const* mapEntry) return NULL; } -InstanceGroupBind* Group::BindToInstance(InstanceSave *save, bool permanent, bool load) +InstanceGroupBind* Group::BindToInstance(InstanceSave* save, bool permanent, bool load) { if (!save || isBGGroup()) return NULL; @@ -1740,7 +1740,7 @@ void Group::BroadcastGroupUpdate(void) for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr) { - Player *pp = ObjectAccessor::FindPlayer(citr->guid); + Player* pp = ObjectAccessor::FindPlayer(citr->guid); if (pp && pp->IsInWorld()) { pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2); @@ -1753,7 +1753,7 @@ void Group::BroadcastGroupUpdate(void) void Group::ResetMaxEnchantingLevel() { m_maxEnchantingLevel = 0; - Player *pMember = NULL; + Player* pMember = NULL; for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr) { pMember = ObjectAccessor::FindPlayer(citr->guid); @@ -1917,7 +1917,7 @@ uint8 Group::GetMemberGroup(uint64 guid) const return mslot->group; } -void Group::SetBattlegroundGroup(Battleground *bg) +void Group::SetBattlegroundGroup(Battleground* bg) { m_bgGroup = bg; } @@ -1986,7 +1986,7 @@ Group::Rolls::iterator Group::GetRoll(uint64 Guid) return RollId.end(); } -void Group::LinkMember(GroupReference *pRef) +void Group::LinkMember(GroupReference* pRef) { m_memberMgr.insertFirst(pRef); } diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index a48b33a8624..78f7a24a505 100755 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -127,8 +127,8 @@ class Roll : public LootValidatorRef public: Roll(uint64 _guid, LootItem const& li); ~Roll(); - void setLoot(Loot *pLoot); - Loot *getLoot(); + void setLoot(Loot* pLoot); + Loot* getLoot(); void targetObjectBuildLink(); uint64 itemGUID; @@ -148,7 +148,7 @@ class Roll : public LootValidatorRef struct InstanceGroupBind { - InstanceSave *save; + InstanceSave* save; bool perm; /* permanent InstanceGroupBinds exist if the leader has a permanent PlayerInstanceBind for the same instance. */ @@ -183,8 +183,8 @@ class Group ~Group(); // group manipulation methods - bool Create(Player *leader); - void LoadGroupFromDB(Field *field); + bool Create(Player* leader); + void LoadGroupFromDB(Field* field); void LoadMemberFromDB(uint32 guidLow, uint8 memberFlags, uint8 subgroup, uint8 roles); bool AddInvite(Player* player); void RemoveInvite(Player* player); @@ -238,7 +238,7 @@ class Group void ConvertToLFG(); void ConvertToRaid(); - void SetBattlegroundGroup(Battleground *bg); + void SetBattlegroundGroup(Battleground* bg); GroupJoinBattlegroundResult CanJoinBattlegroundQueue(Battleground const* bgOrTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot); void ChangeMembersGroup(uint64 guid, uint8 group); @@ -257,8 +257,8 @@ class Group void ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo); // -no description- - //void SendInit(WorldSession *session); - void SendTargetIconList(WorldSession *session); + //void SendInit(WorldSession* session); + void SendTargetIconList(WorldSession* session); void SendUpdate(); void UpdatePlayerOutOfRange(Player* pPlayer); // ignore: GUID of player that will be ignored @@ -275,22 +275,22 @@ class Group void SendLootRoll(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r); void SendLootRollWon(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r); void SendLootAllPassed(uint32 NumberOfPlayers, const Roll &r); - void SendLooter(Creature *pCreature, Player *pLooter); - void GroupLoot(Loot *loot, WorldObject* pLootedObject); - void NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject); - void MasterLoot(Loot *loot, WorldObject* pLootedObject); + void SendLooter(Creature* pCreature, Player* pLooter); + void GroupLoot(Loot* loot, WorldObject* pLootedObject); + void NeedBeforeGreed(Loot* loot, WorldObject* pLootedObject); + void MasterLoot(Loot* loot, WorldObject* pLootedObject); Rolls::iterator GetRoll(uint64 Guid); void CountTheRoll(Rolls::iterator roll, uint32 NumberOfPlayers); void CountRollVote(uint64 playerGUID, uint64 Guid, uint32 NumberOfPlayers, uint8 Choise); - void EndRoll(Loot *loot); + void EndRoll(Loot* loot); // related to disenchant rolls void ResetMaxEnchantingLevel(); - void LinkMember(GroupReference *pRef); + void LinkMember(GroupReference* pRef); void DelinkMember(GroupReference* /*pRef*/) const; - InstanceGroupBind* BindToInstance(InstanceSave *save, bool permanent, bool load = false); + InstanceGroupBind* BindToInstance(InstanceSave* save, bool permanent, bool load = false); void UnbindInstance(uint32 mapid, uint8 difficulty, bool unload = false); InstanceGroupBind* GetBoundInstance(Player* player); InstanceGroupBind* GetBoundInstance(Map* aMap); diff --git a/src/server/game/Groups/GroupMgr.h b/src/server/game/Groups/GroupMgr.h index 5950bb65246..e33d28be7d5 100644 --- a/src/server/game/Groups/GroupMgr.h +++ b/src/server/game/Groups/GroupMgr.h @@ -27,8 +27,8 @@ class GroupMgr ~GroupMgr(); public: - typedef std::map<uint32, Group *> GroupContainer; - typedef std::vector<Group *> GroupDbContainer; + typedef std::map<uint32, Group*> GroupContainer; + typedef std::vector<Group*> GroupDbContainer; Group* GetGroupByGUID(uint32 guid) const; diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h index 005422cb77e..2f5ad755443 100755 --- a/src/server/game/Groups/GroupReference.h +++ b/src/server/game/Groups/GroupReference.h @@ -34,7 +34,7 @@ class GroupReference : public Reference<Group, Player> public: GroupReference() : Reference<Group, Player>(), iSubGroup(0) {} ~GroupReference() { unlink(); } - GroupReference *next() { return (GroupReference*)Reference<Group, Player>::next(); } + GroupReference* next() { return (GroupReference*)Reference<Group, Player>::next(); } uint8 getSubGroup() const { return iSubGroup; } void setSubGroup(uint8 pSubGroup) { iSubGroup = pSubGroup; } }; diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 43e8a69344c..5fce91a3289 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -348,7 +348,7 @@ bool Guild::BankTab::LoadItemFromDB(Field* fields) return false; } - Item *pItem = NewItemOrBag(proto); + Item* pItem = NewItemOrBag(proto); if (!pItem->LoadFromDB(itemGuid, 0, fields, itemEntry)) { sLog->outError("Item (GUID %u, id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry); @@ -392,7 +392,7 @@ inline void Guild::BankTab::WritePacket(WorldPacket& data) const // Writes information about contents of specified slot into packet. void Guild::BankTab::WriteSlotPacket(WorldPacket& data, uint8 slotId) const { - Item *pItem = GetItem(slotId); + Item* pItem = GetItem(slotId); uint32 itemEntry = pItem ? pItem->GetEntry() : 0; data << uint8(slotId); @@ -946,7 +946,7 @@ void Guild::BankMoveItemData::LogAction(MoveItemData* pFrom) const m_pGuild->GetId()); } -Item* Guild::BankMoveItemData::_StoreItem(SQLTransaction& trans, BankTab* pTab, Item *pItem, ItemPosCount& pos, bool clone) const +Item* Guild::BankMoveItemData::_StoreItem(SQLTransaction& trans, BankTab* pTab, Item* pItem, ItemPosCount& pos, bool clone) const { uint8 slotId = uint8(pos.pos); uint32 count = pos.count; @@ -1201,7 +1201,7 @@ void Guild::Disband() /////////////////////////////////////////////////////////////////////////////// // HANDLE CLIENT COMMANDS -void Guild::HandleRoster(WorldSession *session /*= NULL*/) +void Guild::HandleRoster(WorldSession* session /*= NULL*/) { // Guess size WorldPacket data(SMSG_GUILD_ROSTER, (4 + m_motd.length() + 1 + m_info.length() + 1 + 4 + _GetRanksSize() * (4 + 4 + GUILD_BANK_MAX_TABS * (4 + 4)) + m_members.size() * 50)); @@ -1223,7 +1223,7 @@ void Guild::HandleRoster(WorldSession *session /*= NULL*/) sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_ROSTER)"); } -void Guild::HandleQuery(WorldSession *session) +void Guild::HandleQuery(WorldSession* session) { WorldPacket data(SMSG_GUILD_QUERY_RESPONSE, 8 * 32 + 200); // Guess size @@ -1733,7 +1733,7 @@ void Guild::SendInfo(WorldSession* session) const sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_INFO)"); } -void Guild::SendEventLog(WorldSession *session) const +void Guild::SendEventLog(WorldSession* session) const { WorldPacket data(MSG_GUILD_EVENT_LOG_QUERY, 1 + m_eventLog->GetSize() * (1 + 8 + 4)); m_eventLog->WritePacket(data); @@ -1741,7 +1741,7 @@ void Guild::SendEventLog(WorldSession *session) const sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_GUILD_EVENT_LOG_QUERY)"); } -void Guild::SendBankLog(WorldSession *session, uint8 tabId) const +void Guild::SendBankLog(WorldSession* session, uint8 tabId) const { // GUILD_BANK_MAX_TABS send by client for money log if (tabId < _GetPurchasedTabsSize() || tabId == GUILD_BANK_MAX_TABS) @@ -1764,7 +1764,7 @@ void Guild::SendBankTabData(WorldSession* session, uint8 tabId) const } } -void Guild::SendBankTabsInfo(WorldSession *session) const +void Guild::SendBankTabsInfo(WorldSession* session) const { WorldPacket data(SMSG_GUILD_BANK_LIST, 500); @@ -1783,13 +1783,13 @@ void Guild::SendBankTabsInfo(WorldSession *session) const sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); } -void Guild::SendBankTabText(WorldSession *session, uint8 tabId) const +void Guild::SendBankTabText(WorldSession* session, uint8 tabId) const { if (const BankTab* pTab = GetBankTab(tabId)) pTab->SendText(this, session); } -void Guild::SendPermissions(WorldSession *session) const +void Guild::SendPermissions(WorldSession* session) const { uint64 guid = session->GetPlayer()->GetGUID(); uint8 rankId = session->GetPlayer()->GetRank(); @@ -1809,7 +1809,7 @@ void Guild::SendPermissions(WorldSession *session) const sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_GUILD_PERMISSIONS)"); } -void Guild::SendMoneyInfo(WorldSession *session) const +void Guild::SendMoneyInfo(WorldSession* session) const { WorldPacket data(MSG_GUILD_BANK_MONEY_WITHDRAWN, 4); data << uint32(_GetMemberRemainingMoney(session->GetPlayer()->GetGUID())); @@ -2033,7 +2033,7 @@ bool Guild::Validate() /////////////////////////////////////////////////////////////////////////////// // Broadcasts -void Guild::BroadcastToGuild(WorldSession *session, bool officerOnly, const std::string& msg, uint32 language) const +void Guild::BroadcastToGuild(WorldSession* session, bool officerOnly, const std::string& msg, uint32 language) const { if (session && session->GetPlayer() && _HasRankRight(session->GetPlayer(), officerOnly ? GR_RIGHT_OFFCHATSPEAK : GR_RIGHT_GCHATSPEAK)) { @@ -2097,7 +2097,7 @@ bool Guild::AddMember(uint64 guid, uint8 rankId) stmt->setUInt32(0, lowguid); if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); pMember->SetStats( fields[0].GetString(), fields[1].GetUInt8(), @@ -2160,7 +2160,7 @@ void Guild::DeleteMember(uint64 guid, bool isDisbanding, bool isKicked) _SetLeaderGUID(newLeader); // If player not online data in data field will be loaded from guild tabs no need to update it !! - if (Player *newLeaderPlayer = newLeader->FindPlayer()) + if (Player* newLeaderPlayer = newLeader->FindPlayer()) newLeaderPlayer->SetRank(GR_GUILDMASTER); // If leader does not exist (at guild loading with deleted leader) do not send broadcasts @@ -2631,7 +2631,7 @@ bool Guild::_DoItemsMove(MoveItemData* pSrc, MoveItemData* pDest, bool sendError return true; } -void Guild::_SendBankContent(WorldSession *session, uint8 tabId) const +void Guild::_SendBankContent(WorldSession* session, uint8 tabId) const { uint64 guid = session->GetPlayer()->GetGUID(); if (_MemberHasTabRights(guid, tabId, GUILD_BANK_RIGHT_VIEW_TAB)) @@ -2652,7 +2652,7 @@ void Guild::_SendBankContent(WorldSession *session, uint8 tabId) const } } -void Guild::_SendBankMoneyUpdate(WorldSession *session) const +void Guild::_SendBankMoneyUpdate(WorldSession* session) const { WorldPacket data(SMSG_GUILD_BANK_LIST, 8 + 1 + 4 + 1 + 1); diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index 40a281bf122..51636dc218e 100755 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -527,7 +527,7 @@ private: virtual InventoryResult _CanStore(Item* pItem, bool swap) = 0; Guild* m_pGuild; - Player *m_pPlayer; + Player* m_pPlayer; uint8 m_container; uint8 m_slotId; Item* m_pItem; @@ -569,7 +569,7 @@ private: InventoryResult _CanStore(Item* pItem, bool swap); private: - Item* _StoreItem(SQLTransaction& trans, BankTab* pTab, Item *pItem, ItemPosCount& pos, bool clone) const; + Item* _StoreItem(SQLTransaction& trans, BankTab* pTab, Item* pItem, ItemPosCount& pos, bool clone) const; bool _ReserveSpace(uint8 slotId, Item* pItem, Item* pItemDest, uint32& count); void _CanStoreItemInTab(Item* pItem, uint8 skipSlotId, bool merge, uint32& count); }; @@ -596,8 +596,8 @@ public: const std::string& GetInfo() const { return m_info; } // Handle client commands - void HandleRoster(WorldSession *session = NULL); // NULL = broadcast - void HandleQuery(WorldSession *session); + void HandleRoster(WorldSession* session = NULL); // NULL = broadcast + void HandleQuery(WorldSession* session); void HandleSetMOTD(WorldSession* session, const std::string& motd); void HandleSetInfo(WorldSession* session, const std::string& info); void HandleSetEmblem(WorldSession* session, const EmblemInfo& emblemInfo); @@ -620,13 +620,13 @@ public: // Send info to client void SendInfo(WorldSession* session) const; - void SendEventLog(WorldSession *session) const; - void SendBankLog(WorldSession *session, uint8 tabId) const; - void SendBankTabsInfo(WorldSession *session) const; + void SendEventLog(WorldSession* session) const; + void SendBankLog(WorldSession* session, uint8 tabId) const; + void SendBankTabsInfo(WorldSession* session) const; void SendBankTabData(WorldSession* session, uint8 tabId) const; - void SendBankTabText(WorldSession *session, uint8 tabId) const; - void SendPermissions(WorldSession *session) const; - void SendMoneyInfo(WorldSession *session) const; + void SendBankTabText(WorldSession* session, uint8 tabId) const; + void SendPermissions(WorldSession* session) const; + void SendMoneyInfo(WorldSession* session) const; void SendLoginInfo(WorldSession* session) const; // Load from DB @@ -641,7 +641,7 @@ public: bool Validate(); // Broadcasts - void BroadcastToGuild(WorldSession *session, bool officerOnly, const std::string& msg, uint32 language = LANG_UNIVERSAL) const; + void BroadcastToGuild(WorldSession* session, bool officerOnly, const std::string& msg, uint32 language = LANG_UNIVERSAL) const; void BroadcastPacketToRank(WorldPacket* packet, uint8 rankId) const; void BroadcastPacket(WorldPacket* packet) const; @@ -689,8 +689,8 @@ protected: private: inline uint8 _GetRanksSize() const { return uint8(m_ranks.size()); } - inline const RankInfo *GetRankInfo(uint8 rankId) const { return rankId < _GetRanksSize() ? &m_ranks[rankId] : NULL; } - inline RankInfo *GetRankInfo(uint8 rankId) { return rankId < _GetRanksSize() ? &m_ranks[rankId] : NULL; } + inline const RankInfo* GetRankInfo(uint8 rankId) const { return rankId < _GetRanksSize() ? &m_ranks[rankId] : NULL; } + inline RankInfo* GetRankInfo(uint8 rankId) { return rankId < _GetRanksSize() ? &m_ranks[rankId] : NULL; } inline bool _HasRankRight(Player* player, uint32 right) const { return (_GetRankRights(player->GetRank()) & right) != GR_RIGHT_EMPTY; } inline uint8 _GetLowestRankId() const { return uint8(m_ranks.size() - 1); } @@ -760,8 +760,8 @@ private: void _MoveItems(MoveItemData* pSrc, MoveItemData* pDest, uint32 splitedAmount); bool _DoItemsMove(MoveItemData* pSrc, MoveItemData* pDest, bool sendError, uint32 splitedAmount = 0); - void _SendBankContent(WorldSession *session, uint8 tabId) const; - void _SendBankMoneyUpdate(WorldSession *session) const; + void _SendBankContent(WorldSession* session, uint8 tabId) const; + void _SendBankMoneyUpdate(WorldSession* session) const; void _SendBankContentUpdate(MoveItemData* pSrc, MoveItemData* pDest) const; void _SendBankContentUpdate(uint8 tabId, SlotIds slots) const; diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index e6589a27568..ca946b4a2c0 100755 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -44,7 +44,7 @@ InstanceSaveManager::~InstanceSaveManager() lock_instLists = true; for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr) { - InstanceSave *save = itr->second; + InstanceSave* save = itr->second; for (InstanceSave::PlayerListType::iterator itr2 = save->m_playerList.begin(), next = itr2; itr2 != save->m_playerList.end(); itr2 = next) { @@ -69,7 +69,7 @@ InstanceSaveManager::~InstanceSaveManager() */ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instanceId, Difficulty difficulty, time_t resetTime, bool canReset, bool load) { - if (InstanceSave *old_save = GetInstanceSave(instanceId)) + if (InstanceSave* old_save = GetInstanceSave(instanceId)) return old_save; const MapEntry* entry = sMapStore.LookupEntry(mapId); @@ -107,7 +107,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance sLog->outDebug(LOG_FILTER_MAPS, "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d", mapId, instanceId); - InstanceSave *save = new InstanceSave(mapId, instanceId, difficulty, resetTime, canReset); + InstanceSave* save = new InstanceSave(mapId, instanceId, difficulty, resetTime, canReset); if (!load) save->SaveToDB(); @@ -115,7 +115,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance return save; } -InstanceSave *InstanceSaveManager::GetInstanceSave(uint32 InstanceId) +InstanceSave* InstanceSaveManager::GetInstanceSave(uint32 InstanceId) { InstanceSaveHashMap::iterator itr = m_instanceSaveById.find(InstanceId); return itr != m_instanceSaveById.end() ? itr->second : NULL; @@ -166,11 +166,11 @@ void InstanceSave::SaveToDB() std::string data; uint32 completedEncounters = 0; - Map *map = sMapMgr->FindMap(GetMapId(), m_instanceid); + Map* map = sMapMgr->FindMap(GetMapId(), m_instanceid); if (map) { ASSERT(map->IsDungeon()); - if (InstanceScript *instanceScript = ((InstanceMap*)map)->GetInstanceScript()) + if (InstanceScript* instanceScript = ((InstanceMap*)map)->GetInstanceScript()) { data = instanceScript->GetSaveData(); completedEncounters = instanceScript->GetCompletedEncounterMask(); @@ -190,7 +190,7 @@ void InstanceSave::SaveToDB() time_t InstanceSave::GetResetTimeForDB() { // only save the reset time for normal instances - const MapEntry *entry = sMapStore.LookupEntry(GetMapId()); + const MapEntry* entry = sMapStore.LookupEntry(GetMapId()); if (!entry || entry->map_type == MAP_RAID || GetDifficulty() == DUNGEON_DIFFICULTY_HEROIC) return 0; else @@ -313,7 +313,7 @@ void InstanceSaveManager::LoadResetTimes() { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 instance = fields[1].GetUInt32(); time_t resettime = time_t(fields[0].GetUInt32() + 2 * HOUR); InstResetTimeMapDiffType::iterator itr = instResetTime.find(instance); @@ -339,7 +339,7 @@ void InstanceSaveManager::LoadResetTimes() { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 mapid = fields[0].GetUInt16(); Difficulty difficulty = Difficulty(fields[1].GetUInt32()); uint64 oldresettime = fields[2].GetUInt32(); @@ -511,7 +511,7 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr) void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId) { sLog->outDebug(LOG_FILTER_MAPS, "InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId); - Map *map = (MapInstanced*)sMapMgr->CreateBaseMap(mapid); + Map* map = (MapInstanced*)sMapMgr->CreateBaseMap(mapid); if (!map->Instanceable()) return; @@ -535,7 +535,7 @@ void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId) void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, bool warn, time_t resetTime) { // global reset for all instances of the given map - MapEntry const *mapEntry = sMapStore.LookupEntry(mapid); + MapEntry const* mapEntry = sMapStore.LookupEntry(mapid); if (!mapEntry->Instanceable()) return; @@ -583,14 +583,14 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b } // note: this isn't fast but it's meant to be executed very rarely - Map const *map = sMapMgr->CreateBaseMap(mapid); // _not_ include difficulty + Map const* map = sMapMgr->CreateBaseMap(mapid); // _not_ include difficulty MapInstanced::InstancedMaps &instMaps = ((MapInstanced*)map)->GetInstancedMaps(); MapInstanced::InstancedMaps::iterator mitr; uint32 timeLeft; for (mitr = instMaps.begin(); mitr != instMaps.end(); ++mitr) { - Map *map2 = mitr->second; + Map* map2 = mitr->second; if (!map2->IsDungeon()) continue; diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h index 82a45a6fd03..c79d2b5c3dc 100755 --- a/src/server/game/Instances/InstanceSaveMgr.h +++ b/src/server/game/Instances/InstanceSaveMgr.h @@ -164,7 +164,7 @@ class InstanceSaveManager void RemoveInstanceSave(uint32 InstanceId); static void DeleteInstanceFromDB(uint32 instanceid); - InstanceSave *GetInstanceSave(uint32 InstanceId); + InstanceSave* GetInstanceSave(uint32 InstanceId); /* statistics */ uint32 GetNumInstanceSaves() { return m_instanceSaveById.size(); } diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 101f0e4ce4d..fe8bfa6b844 100755 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -39,7 +39,7 @@ void InstanceScript::SaveToDB() CharacterDatabase.Execute(stmt); } -void InstanceScript::HandleGameObject(uint64 GUID, bool open, GameObject *go) +void InstanceScript::HandleGameObject(uint64 GUID, bool open, GameObject* go) { if (!go) go = instance->GetGameObject(GUID); @@ -58,7 +58,7 @@ bool InstanceScript::IsEncounterInProgress() const return false; } -void InstanceScript::LoadMinionData(const MinionData *data) +void InstanceScript::LoadMinionData(const MinionData* data) { while (data->entry) { @@ -70,7 +70,7 @@ void InstanceScript::LoadMinionData(const MinionData *data) sLog->outDebug(LOG_FILTER_TSCR, "InstanceScript::LoadMinionData: " UI64FMTD " minions loaded.", uint64(minions.size())); } -void InstanceScript::LoadDoorData(const DoorData *data) +void InstanceScript::LoadDoorData(const DoorData* data) { while (data->entry) { @@ -82,7 +82,7 @@ void InstanceScript::LoadDoorData(const DoorData *data) sLog->outDebug(LOG_FILTER_TSCR, "InstanceScript::LoadDoorData: " UI64FMTD " doors loaded.", uint64(doors.size())); } -void InstanceScript::UpdateMinionState(Creature *minion, EncounterState state) +void InstanceScript::UpdateMinionState(Creature* minion, EncounterState state) { switch (state) { @@ -103,7 +103,7 @@ void InstanceScript::UpdateMinionState(Creature *minion, EncounterState state) } } -void InstanceScript::UpdateDoorState(GameObject *door) +void InstanceScript::UpdateDoorState(GameObject* door) { DoorInfoMap::iterator lower = doors.lower_bound(door->GetEntry()); DoorInfoMap::iterator upper = doors.upper_bound(door->GetEntry()); @@ -132,7 +132,7 @@ void InstanceScript::UpdateDoorState(GameObject *door) door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY); } -void InstanceScript::AddDoor(GameObject *door, bool add) +void InstanceScript::AddDoor(GameObject* door, bool add) { DoorInfoMap::iterator lower = doors.lower_bound(door->GetEntry()); DoorInfoMap::iterator upper = doors.upper_bound(door->GetEntry()); @@ -175,7 +175,7 @@ void InstanceScript::AddDoor(GameObject *door, bool add) UpdateDoorState(door); } -void InstanceScript::AddMinion(Creature *minion, bool add) +void InstanceScript::AddMinion(Creature* minion, bool add) { MinionInfoMap::iterator itr = minions.find(minion->GetEntry()); if (itr == minions.end()) @@ -191,7 +191,7 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state) { if (id < bosses.size()) { - BossInfo *bossInfo = &bosses[id]; + BossInfo* bossInfo = &bosses[id]; if (bossInfo->state == TO_BE_DECIDED) // loading { bossInfo->state = state; @@ -292,7 +292,7 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData) if (!lPlayers.isEmpty()) { for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) - if (Player *pPlayer = itr->getSource()) + if (Player* pPlayer = itr->getSource()) pPlayer->SendUpdateWorldState(uiStateId, uiStateData); } else @@ -311,8 +311,8 @@ void InstanceScript::DoSendNotifyToInstance(const char *format, ...) va_start(ap, format); for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - if (Player *pPlayer = i->getSource()) - if (WorldSession *pSession = pPlayer->GetSession()) + if (Player* pPlayer = i->getSource()) + if (WorldSession* pSession = pPlayer->GetSession()) pSession->SendNotification(format, ap); } va_end(ap); @@ -326,7 +326,7 @@ void InstanceScript::DoUpdateAchievementCriteria(AchievementCriteriaTypes type, if (!PlayerList.isEmpty()) for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - if (Player *pPlayer = i->getSource()) + if (Player* pPlayer = i->getSource()) pPlayer->UpdateAchievementCriteria(type, miscValue1, miscValue2, unit); } @@ -337,7 +337,7 @@ void InstanceScript::DoStartTimedAchievement(AchievementCriteriaTimedTypes type, if (!PlayerList.isEmpty()) for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - if (Player *pPlayer = i->getSource()) + if (Player* pPlayer = i->getSource()) pPlayer->GetAchievementMgr().StartTimedAchievement(type, entry); } @@ -348,7 +348,7 @@ void InstanceScript::DoStopTimedAchievement(AchievementCriteriaTimedTypes type, if (!PlayerList.isEmpty()) for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - if (Player *pPlayer = i->getSource()) + if (Player* pPlayer = i->getSource()) pPlayer->GetAchievementMgr().RemoveTimedAchievement(type, entry); } diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index d2c98af0838..1751b7b3106 100755 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -106,17 +106,17 @@ struct BossInfo struct DoorInfo { - explicit DoorInfo(BossInfo *_bossInfo, DoorType _type, BoundaryType _boundary) + explicit DoorInfo(BossInfo* _bossInfo, DoorType _type, BoundaryType _boundary) : bossInfo(_bossInfo), type(_type), boundary(_boundary) {} - BossInfo *bossInfo; + BossInfo* bossInfo; DoorType type; BoundaryType boundary; }; struct MinionInfo { - explicit MinionInfo(BossInfo *_bossInfo) : bossInfo(_bossInfo) {} - BossInfo *bossInfo; + explicit MinionInfo(BossInfo* _bossInfo) : bossInfo(_bossInfo) {} + BossInfo* bossInfo; }; typedef std::multimap<uint32 /*entry*/, DoorInfo> DoorInfoMap; @@ -130,7 +130,7 @@ class InstanceScript : public ZoneScript virtual ~InstanceScript() {} - Map *instance; + Map* instance; //On creation, NOT load. virtual void Initialize() {} @@ -217,8 +217,8 @@ class InstanceScript : public ZoneScript void AddDoor(GameObject* door, bool add); void AddMinion(Creature* minion, bool add); - void UpdateDoorState(GameObject *door); - void UpdateMinionState(Creature *minion, EncounterState state); + void UpdateDoorState(GameObject* door); + void UpdateMinionState(Creature* minion, EncounterState state); std::string LoadBossState(char const* data); std::string GetBossSaveData(); diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index b613f794388..c8063ccb818 100755 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -63,8 +63,8 @@ class LootTemplate::LootGroup // A set of loot def void Verify(LootStore const& lootstore, uint32 id, uint8 group_id) const; void CollectLootIds(LootIdSet& set) const; void CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const; - LootStoreItemList * GetExplicitlyChancedItemList() { return &ExplicitlyChanced; } - LootStoreItemList * GetEqualChancedItemList() { return &EqualChanced; } + LootStoreItemList* GetExplicitlyChancedItemList() { return &ExplicitlyChanced; } + LootStoreItemList* GetEqualChancedItemList() { return &EqualChanced; } void CopyConditions(ConditionList conditions); private: LootStoreItemList ExplicitlyChanced; // Entries with chances defined in DB @@ -110,7 +110,7 @@ uint32 LootStore::LoadLootTable() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); uint32 item = fields[1].GetUInt32(); @@ -249,7 +249,7 @@ bool LootStoreItem::Roll(bool rate) const if (mincountOrRef < 0) // reference case return roll_chance_f(chance* (rate ? sWorld->getRate(RATE_DROP_ITEM_REFERENCED) : 1.0f)); - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(itemid); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemid); float qualityModifier = pProto && rate ? sWorld->getRate(qualityToRate[pProto->Quality]) : 1.0f; @@ -273,7 +273,7 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const if (mincountOrRef > 0) // item (quest or non-quest) entry, maybe grouped { - ItemTemplate const *proto = sObjectMgr->GetItemTemplate(itemid); + ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemid); if (!proto) { sLog->outErrorDb("Table '%s' entry %d item %d: item entry not listed in `item_template` - skipped", store.GetName(), entry, itemid); @@ -344,7 +344,7 @@ bool LootItem::AllowedForPlayer(Player const* player) const if (!sConditionMgr->IsPlayerMeetToConditions(const_cast<Player*>(player), conditions)) return false; - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(itemid); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itemid); if (!pProto) return false; @@ -430,18 +430,18 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo tab->Process(*this, store.IsRatesAllowed(), lootMode); // Processing is done there, callback via Loot::AddItem() // Setting access rights for group loot case - Group * pGroup = lootOwner->GetGroup(); + Group* pGroup = lootOwner->GetGroup(); if (!personal && pGroup) { roundRobinPlayer = lootOwner->GetGUID(); - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) if (Player* pl = itr->getSource()) // should actually be looted object instead of lootOwner but looter has to be really close so doesnt really matter FillNotNormalLootFor(pl, pl->IsAtGroupRewardDistance(lootOwner)); for (uint8 i = 0; i < items.size(); ++i) { - if (ItemTemplate const *proto = sObjectMgr->GetItemTemplate(items[i].itemid)) + if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(items[i].itemid)) if (proto->Quality < uint32(pGroup->GetLootThreshold())) items[i].is_underthreshold = true; } @@ -475,7 +475,7 @@ void Loot::FillNotNormalLootFor(Player* pl, bool presentAtLooting) // Process currency items uint32 max_slot = GetMaxSlotInLootFor(pl); - LootItem const *item = NULL; + LootItem const* item = NULL; uint32 itemsSize = uint32(items.size()); for (uint32 i = 0; i < max_slot; ++i) { @@ -493,7 +493,7 @@ void Loot::FillNotNormalLootFor(Player* pl, bool presentAtLooting) QuestItemList* Loot::FillFFALoot(Player* player) { - QuestItemList *ql = new QuestItemList(); + QuestItemList* ql = new QuestItemList(); for (uint8 i = 0; i < items.size(); ++i) { @@ -517,7 +517,7 @@ QuestItemList* Loot::FillFFALoot(Player* player) QuestItemList* Loot::FillQuestLoot(Player* player) { if (items.size() == MAX_NR_LOOT_ITEMS) return NULL; - QuestItemList *ql = new QuestItemList(); + QuestItemList* ql = new QuestItemList(); for (uint8 i = 0; i < quest_items.size(); ++i) { @@ -551,7 +551,7 @@ QuestItemList* Loot::FillQuestLoot(Player* player) QuestItemList* Loot::FillNonQuestNonFFAConditionalLoot(Player* player, bool presentAtLooting) { - QuestItemList *ql = new QuestItemList(); + QuestItemList* ql = new QuestItemList(); for (uint8 i = 0; i < items.size(); ++i) { @@ -661,7 +661,7 @@ void Loot::generateMoneyLoot(uint32 minAmount, uint32 maxAmount) } } -LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, QuestItem **qitem, QuestItem **ffaitem, QuestItem **conditem) +LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, QuestItem* *qitem, QuestItem* *ffaitem, QuestItem* *conditem) { LootItem* item = NULL; bool is_looted = true; @@ -671,7 +671,7 @@ LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, QuestItem **qite QuestItemMap::const_iterator itr = PlayerQuestItems.find(player->GetGUIDLow()); if (itr != PlayerQuestItems.end() && questSlot < itr->second->size()) { - QuestItem *qitem2 = &itr->second->at(questSlot); + QuestItem* qitem2 = &itr->second->at(questSlot); if (qitem) *qitem = qitem2; item = &quest_items[qitem2->index]; @@ -690,7 +690,7 @@ LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, QuestItem **qite for (QuestItemList::const_iterator iter=itr->second->begin(); iter!= itr->second->end(); ++iter) if (iter->index == lootSlot) { - QuestItem *ffaitem2 = (QuestItem*)&(*iter); + QuestItem* ffaitem2 = (QuestItem*)&(*iter); if (ffaitem) *ffaitem = ffaitem2; is_looted = ffaitem2->is_looted; @@ -707,7 +707,7 @@ LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, QuestItem **qite { if (iter->index == lootSlot) { - QuestItem *conditem2 = (QuestItem*)&(*iter); + QuestItem* conditem2 = (QuestItem*)&(*iter); if (conditem) *conditem = conditem2; is_looted = conditem2->is_looted; @@ -737,7 +737,7 @@ bool Loot::hasItemFor(Player* player) const QuestItemMap::const_iterator q_itr = lootPlayerQuestItems.find(player->GetGUIDLow()); if (q_itr != lootPlayerQuestItems.end()) { - QuestItemList *q_list = q_itr->second; + QuestItemList* q_list = q_itr->second; for (QuestItemList::const_iterator qi = q_list->begin() ; qi != q_list->end(); ++qi) { const LootItem &item = quest_items[qi->index]; @@ -750,7 +750,7 @@ bool Loot::hasItemFor(Player* player) const QuestItemMap::const_iterator ffa_itr = lootPlayerFFAItems.find(player->GetGUIDLow()); if (ffa_itr != lootPlayerFFAItems.end()) { - QuestItemList *ffa_list = ffa_itr->second; + QuestItemList* ffa_list = ffa_itr->second; for (QuestItemList::const_iterator fi = ffa_list->begin() ; fi != ffa_list->end(); ++fi) { const LootItem &item = items[fi->index]; @@ -763,7 +763,7 @@ bool Loot::hasItemFor(Player* player) const QuestItemMap::const_iterator nn_itr = lootPlayerNonQuestNonFFAConditionalItems.find(player->GetGUIDLow()); if (nn_itr != lootPlayerNonQuestNonFFAConditionalItems.end()) { - QuestItemList *conditional_list = nn_itr->second; + QuestItemList* conditional_list = nn_itr->second; for (QuestItemList::const_iterator ci = conditional_list->begin() ; ci != conditional_list->end(); ++ci) { const LootItem &item = items[ci->index]; @@ -903,7 +903,7 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv) QuestItemMap::const_iterator q_itr = lootPlayerQuestItems.find(lv.viewer->GetGUIDLow()); if (q_itr != lootPlayerQuestItems.end()) { - QuestItemList *q_list = q_itr->second; + QuestItemList* q_list = q_itr->second; for (QuestItemList::const_iterator qi = q_list->begin() ; qi != q_list->end(); ++qi) { LootItem &item = l.quest_items[qi->index]; @@ -921,7 +921,7 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv) QuestItemMap::const_iterator ffa_itr = lootPlayerFFAItems.find(lv.viewer->GetGUIDLow()); if (ffa_itr != lootPlayerFFAItems.end()) { - QuestItemList *ffa_list = ffa_itr->second; + QuestItemList* ffa_list = ffa_itr->second; for (QuestItemList::const_iterator fi = ffa_list->begin() ; fi != ffa_list->end(); ++fi) { LootItem &item = l.items[fi->index]; @@ -939,7 +939,7 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv) QuestItemMap::const_iterator nn_itr = lootPlayerNonQuestNonFFAConditionalItems.find(lv.viewer->GetGUIDLow()); if (nn_itr != lootPlayerNonQuestNonFFAConditionalItems.end()) { - QuestItemList *conditional_list = nn_itr->second; + QuestItemList* conditional_list = nn_itr->second; for (QuestItemList::const_iterator ci = conditional_list->begin() ; ci != conditional_list->end(); ++ci) { LootItem &item = l.items[ci->index]; @@ -1046,7 +1046,7 @@ void LootTemplate::LootGroup::Process(Loot& loot, uint16 lootMode) const if (uiAttemptCount == uiMaxAttempts) // already tried rolling too many times, just abort return; - LootStoreItem *item = NULL; + LootStoreItem* item = NULL; // begin rolling (normally called via Roll()) LootStoreItemList::iterator itr; @@ -1086,7 +1086,7 @@ void LootTemplate::LootGroup::Process(Loot& loot, uint16 lootMode) const if (item != NULL && item->lootmode & lootMode) // only add this item if roll succeeds and the mode matches { bool duplicate = false; - if (ItemTemplate const *_proto = sObjectMgr->GetItemTemplate(item->itemid)) + if (ItemTemplate const* _proto = sObjectMgr->GetItemTemplate(item->itemid)) { uint8 _item_counter = 0; for (LootItemList::const_iterator _item = loot.items.begin(); _item != loot.items.end(); ++_item) @@ -1227,7 +1227,7 @@ void LootTemplate::Process(Loot& loot, bool rate, uint16 lootMode, uint8 groupId if (!i->Roll(rate)) continue; // Bad luck for the entry - if (ItemTemplate const *_proto = sObjectMgr->GetItemTemplate(i->itemid)) + if (ItemTemplate const* _proto = sObjectMgr->GetItemTemplate(i->itemid)) { uint8 _item_counter = 0; LootItemList::const_iterator _item = loot.items.begin(); diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h index 28bcf395ebd..b0adeb03784 100755 --- a/src/server/game/Loot/LootMgr.h +++ b/src/server/game/Loot/LootMgr.h @@ -169,7 +169,7 @@ class LootTemplate; typedef std::vector<QuestItem> QuestItemList; typedef std::vector<LootItem> LootItemList; -typedef std::map<uint32, QuestItemList *> QuestItemMap; +typedef std::map<uint32, QuestItemList*> QuestItemMap; typedef std::vector<LootStoreItem> LootStoreItemList; typedef UNORDERED_MAP<uint32, LootTemplate*> LootTemplateMap; @@ -357,9 +357,9 @@ struct Loot struct LootView { Loot &loot; - Player *viewer; + Player* viewer; PermissionTypes permission; - LootView(Loot &_loot, Player *_viewer, PermissionTypes _permission = ALL_PERMISSION) + LootView(Loot &_loot, Player* _viewer, PermissionTypes _permission = ALL_PERMISSION) : loot(_loot), viewer(_viewer), permission(_permission) {} }; diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp index 8e869d473ef..f421c135233 100755 --- a/src/server/game/Mails/Mail.cpp +++ b/src/server/game/Mails/Mail.cpp @@ -230,7 +230,7 @@ void MailDraft::SendMailTo(SQLTransaction& trans, MailReceiver const& receiver, if (pReceiver->IsMailsLoaded()) { - Mail * m = new Mail; + Mail* m = new Mail; m->messageID = mailId; m->mailTemplateId = GetMailTemplateId(); m->subject = GetSubject(); diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 3bba445b99e..e3bd3518559 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -58,7 +58,7 @@ Map::~Map() while (!i_worldObjects.empty()) { - WorldObject *obj = *i_worldObjects.begin(); + WorldObject* obj = *i_worldObjects.begin(); ASSERT(obj->m_isWorldObject); //ASSERT(obj->GetTypeId() == TYPEID_CORPSE); obj->RemoveFromWorld(); @@ -76,7 +76,7 @@ bool Map::ExistMap(uint32 mapid, int gx, int gy) snprintf(tmp, len, (char *)(sWorld->GetDataPath()+"maps/%03u%02u%02u.map").c_str(), mapid, gx, gy); bool ret = false; - FILE *pf=fopen(tmp, "rb"); + FILE* pf=fopen(tmp, "rb"); if (!pf) sLog->outError("Map file '%s': does not exist!", tmp); @@ -305,8 +305,8 @@ void Map::SwitchGridContainers(T* obj, bool on) obj->m_isWorldObject = on; } -template void Map::SwitchGridContainers(Creature *, bool); -//template void Map::SwitchGridContainers(DynamicObject *, bool); +template void Map::SwitchGridContainers(Creature* , bool); +//template void Map::SwitchGridContainers(DynamicObject* , bool); template<class T> void Map::DeleteFromWorld(T* obj) @@ -524,7 +524,7 @@ void Map::Update(const uint32 t_diff) if (plr && plr->IsInWorld()) { //plr->Update(t_diff); - WorldSession * pSession = plr->GetSession(); + WorldSession* pSession = plr->GetSession(); MapSessionFilter updater(pSession); pSession->Update(t_diff, updater); } @@ -767,7 +767,7 @@ Map::PlayerRelocation(Player* player, float x, float y, float z, float orientati } void -Map::CreatureRelocation(Creature *creature, float x, float y, float z, float ang, bool respawnRelocationOnFail) +Map::CreatureRelocation(Creature* creature, float x, float y, float z, float ang, bool respawnRelocationOnFail) { ASSERT(CheckGridIntegrity(creature, false)); @@ -797,7 +797,7 @@ Map::CreatureRelocation(Creature *creature, float x, float y, float z, float ang ASSERT(CheckGridIntegrity(creature, true)); } -void Map::AddCreatureToMoveList(Creature *c, float x, float y, float z, float ang) +void Map::AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang) { if (!c) return; @@ -849,7 +849,7 @@ void Map::MoveAllCreaturesInMoveList() } } -bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) +bool Map::CreatureCellRelocation(Creature* c, Cell new_cell) { Cell const& old_cell = c->GetCurrentCell(); if (!old_cell.DiffGrid(new_cell)) // in same grid @@ -910,7 +910,7 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) return false; } -bool Map::CreatureRespawnRelocation(Creature *c) +bool Map::CreatureRespawnRelocation(Creature* c) { float resp_x, resp_y, resp_z, resp_o; c->GetRespawnCoord(resp_x, resp_y, resp_z, &resp_o); @@ -1068,7 +1068,7 @@ bool GridMap::loadData(char *filename) map_fileheader header; // Not return error if file not found - FILE *in = fopen(filename, "rb"); + FILE* in = fopen(filename, "rb"); if (!in) return true; @@ -1124,7 +1124,7 @@ void GridMap::unloadData() m_gridGetHeight = &GridMap::getHeightFromFlat; } -bool GridMap::loadAreaData(FILE *in, uint32 offset, uint32 /*size*/) +bool GridMap::loadAreaData(FILE* in, uint32 offset, uint32 /*size*/) { map_areaHeader header; fseek(in, offset, SEEK_SET); @@ -1142,7 +1142,7 @@ bool GridMap::loadAreaData(FILE *in, uint32 offset, uint32 /*size*/) return true; } -bool GridMap::loadHeihgtData(FILE *in, uint32 offset, uint32 /*size*/) +bool GridMap::loadHeihgtData(FILE* in, uint32 offset, uint32 /*size*/) { map_heightHeader header; fseek(in, offset, SEEK_SET); @@ -1188,7 +1188,7 @@ bool GridMap::loadHeihgtData(FILE *in, uint32 offset, uint32 /*size*/) return true; } -bool GridMap::loadLiquidData(FILE *in, uint32 offset, uint32 /*size*/) +bool GridMap::loadLiquidData(FILE* in, uint32 offset, uint32 /*size*/) { map_liquidHeader header; fseek(in, offset, SEEK_SET); @@ -1483,7 +1483,7 @@ uint8 GridMap::getTerrainType(float x, float y) } // Get water state on map -inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData *data) +inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data) { // Check water type (if no water return) if (!m_liquid_type && !m_liquidType) @@ -1545,7 +1545,7 @@ inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 R return LIQUID_MAP_ABOVE_WATER; } -inline GridMap *Map::GetGrid(float x, float y) +inline GridMap* Map::GetGrid(float x, float y) { // half opt method int gx=(int)(32-x/SIZE_OF_GRIDS); //grid x @@ -1561,7 +1561,7 @@ float Map::GetHeight(float x, float y, float z, bool pUseVmaps, float maxSearchD { // find raw .map surface under Z coordinates float mapHeight; - if (GridMap *gmap = const_cast<Map*>(this)->GetGrid(x, y)) + if (GridMap* gmap = const_cast<Map*>(this)->GetGrid(x, y)) { float _mapheight = gmap->getHeight(x, y); @@ -1670,7 +1670,7 @@ bool Map::GetAreaInfo(float x, float y, float z, uint32 &flags, int32 &adtId, in if (vmgr->getAreaInfo(GetId(), x, y, vmap_z, flags, adtId, rootId, groupId)) { // check if there's terrain between player height and object height - if (GridMap *gmap = const_cast<Map*>(this)->GetGrid(x, y)) + if (GridMap* gmap = const_cast<Map*>(this)->GetGrid(x, y)) { float _mapheight = gmap->getHeight(x, y); // z + 2.0f condition taken from GetHeight(), not sure if it's such a great choice... @@ -1704,7 +1704,7 @@ uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const areaflag = atEntry->exploreFlag; else { - if (GridMap *gmap = const_cast<Map*>(this)->GetGrid(x, y)) + if (GridMap* gmap = const_cast<Map*>(this)->GetGrid(x, y)) areaflag = gmap->getArea(x, y); // this used while not all *.map files generated (instances) else @@ -1723,13 +1723,13 @@ uint16 Map::GetAreaFlag(float x, float y, float z, bool *isOutdoors) const uint8 Map::GetTerrainType(float x, float y) const { - if (GridMap *gmap = const_cast<Map*>(this)->GetGrid(x, y)) + if (GridMap* gmap = const_cast<Map*>(this)->GetGrid(x, y)) return gmap->getTerrainType(x, y); else return 0; } -ZLiquidStatus Map::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData *data) const +ZLiquidStatus Map::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data) const { ZLiquidStatus result = LIQUID_MAP_NO_WATER; VMAP::IVMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); @@ -1788,7 +1788,7 @@ float Map::GetWaterLevel(float x, float y) const uint32 Map::GetAreaIdByAreaFlag(uint16 areaflag, uint32 map_id) { - AreaTableEntry const *entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id); + AreaTableEntry const* entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id); if (entry) return entry->ID; @@ -1798,7 +1798,7 @@ uint32 Map::GetAreaIdByAreaFlag(uint16 areaflag, uint32 map_id) uint32 Map::GetZoneIdByAreaFlag(uint16 areaflag, uint32 map_id) { - AreaTableEntry const *entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id); + AreaTableEntry const* entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id); if (entry) return (entry->zone != 0) ? entry->zone : entry->ID; @@ -1808,19 +1808,19 @@ uint32 Map::GetZoneIdByAreaFlag(uint16 areaflag, uint32 map_id) void Map::GetZoneAndAreaIdByAreaFlag(uint32& zoneid, uint32& areaid, uint16 areaflag, uint32 map_id) { - AreaTableEntry const *entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id); + AreaTableEntry const* entry = GetAreaEntryByAreaFlagAndMap(areaflag, map_id); areaid = entry ? entry->ID : 0; zoneid = entry ? ((entry->zone != 0) ? entry->zone : entry->ID) : 0; } -bool Map::IsInWater(float x, float y, float pZ, LiquidData *data) const +bool Map::IsInWater(float x, float y, float pZ, LiquidData* data) const { // Check surface in x, y point for liquid if (const_cast<Map*>(this)->GetGrid(x, y)) { LiquidData liquid_status; - LiquidData *liquid_ptr = data ? data : &liquid_status; + LiquidData* liquid_ptr = data ? data : &liquid_status; if (getLiquidStatus(x, y, pZ, MAP_ALL_LIQUIDS, liquid_ptr)) return true; } @@ -1988,7 +1988,7 @@ void Map::DelayedUpdate(const uint32 t_diff) for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end();) { NGridType *grid = i->getSource(); - GridInfo *info = i->getSource()->getGridInfoRef(); + GridInfo* info = i->getSource()->getGridInfoRef(); ++i; // The update might delete the map and we need the next map before the iterator gets invalid ASSERT(grid->GetGridState() >= 0 && grid->GetGridState() < MAX_GRID_STATE); si_GridStates[grid->GetGridState()]->Update(*this, *grid, *info, grid->getX(), grid->getY(), t_diff); @@ -1996,7 +1996,7 @@ void Map::DelayedUpdate(const uint32 t_diff) } } -void Map::AddObjectToRemoveList(WorldObject *obj) +void Map::AddObjectToRemoveList(WorldObject* obj) { ASSERT(obj->GetMapId() == GetId() && obj->GetInstanceId() == GetInstanceId()); @@ -2006,7 +2006,7 @@ void Map::AddObjectToRemoveList(WorldObject *obj) //sLog->outDebug(LOG_FILTER_MAPS, "Object (GUID: %u TypeId: %u) added to removing list.", obj->GetGUIDLow(), obj->GetTypeId()); } -void Map::AddObjectToSwitchList(WorldObject *obj, bool on) +void Map::AddObjectToSwitchList(WorldObject* obj, bool on) { ASSERT(obj->GetMapId() == GetId() && obj->GetInstanceId() == GetInstanceId()); @@ -2024,7 +2024,7 @@ void Map::RemoveAllObjectsInRemoveList() while (!i_objectsToSwitch.empty()) { std::map<WorldObject*, bool>::iterator itr = i_objectsToSwitch.begin(); - WorldObject *obj = itr->first; + WorldObject* obj = itr->first; bool on = itr->second; i_objectsToSwitch.erase(itr); @@ -2176,15 +2176,15 @@ void Map::RemoveFromActive(Creature* c) } } -template void Map::Add(Corpse *); -template void Map::Add(Creature *); -template void Map::Add(GameObject *); -template void Map::Add(DynamicObject *); +template void Map::Add(Corpse* ); +template void Map::Add(Creature* ); +template void Map::Add(GameObject* ); +template void Map::Add(DynamicObject* ); -template void Map::Remove(Corpse *, bool); -template void Map::Remove(Creature *, bool); -template void Map::Remove(GameObject *, bool); -template void Map::Remove(DynamicObject *, bool); +template void Map::Remove(Corpse* , bool); +template void Map::Remove(Creature* , bool); +template void Map::Remove(GameObject* , bool); +template void Map::Remove(DynamicObject* , bool); /* ******* Dungeon Instance Maps ******* */ @@ -2240,7 +2240,7 @@ bool InstanceMap::CanEnter(Player* player) } // cannot enter while an encounter is in progress on raids - /*Group *pGroup = player->GetGroup(); + /*Group* pGroup = player->GetGroup(); if (!player->isGameMaster() && pGroup && pGroup->InCombatToInstance(GetInstanceId()) && player->GetMapId() != GetId())*/ if (IsRaid() && GetInstanceScript() && GetInstanceScript()->IsEncounterInProgress()) { @@ -2255,7 +2255,7 @@ bool InstanceMap::CanEnter(Player* player) if (!playerList.isEmpty()) for (PlayerList::const_iterator i = playerList.begin(); i != playerList.end(); ++i) - if (Player *iPlayer = i->getSource()) + if (Player* iPlayer = i->getSource()) { if (iPlayer->isGameMaster()) // bypass GMs continue; @@ -2301,7 +2301,7 @@ bool InstanceMap::Add(Player* player) player->AddInstanceEnterTime(GetInstanceId(), time(NULL)); // get or create an instance save for the map - InstanceSave *mapSave = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); + InstanceSave* mapSave = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); if (!mapSave) { sLog->outDetail("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId()); @@ -2309,7 +2309,7 @@ bool InstanceMap::Add(Player* player) } // check for existing instance binds - InstancePlayerBind *playerBind = player->GetBoundInstance(GetId(), Difficulty(GetSpawnMode())); + InstancePlayerBind* playerBind = player->GetBoundInstance(GetId(), Difficulty(GetSpawnMode())); if (playerBind && playerBind->perm) { // cannot enter other instances if bound permanently @@ -2324,7 +2324,7 @@ bool InstanceMap::Add(Player* player) if (group) { // solo saves should be reset when entering a group - InstanceGroupBind *groupBind = group->GetBoundInstance(this); + InstanceGroupBind* groupBind = group->GetBoundInstance(this); if (playerBind) { sLog->outError("InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d, %d, %d, %d but he is in group %d and is bound to instance %d, %d, %d, %d, %d, %d!", player->GetName(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(group->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset()); @@ -2495,7 +2495,7 @@ void InstanceMap::PermBindAllPlayers(Player* player) if (!IsDungeon()) return; - InstanceSave *save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); + InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()); if (!save) { sLog->outError("Cannot bind player (GUID: %u, Name: %s), because no instance save is available for instance map (Name: %s, Entry: %u, InstanceId: %u)!", player->GetGUIDLow(), player->GetName(), player->GetMap()->GetMapName(), player->GetMapId(), GetInstanceId()); @@ -2509,7 +2509,7 @@ void InstanceMap::PermBindAllPlayers(Player* player) Player* plr = itr->getSource(); // players inside an instance cannot be bound to other instances // some players may already be permanently bound, in this case nothing happens - InstancePlayerBind *bind = plr->GetBoundInstance(save->GetMapId(), save->GetDifficulty()); + InstancePlayerBind* bind = plr->GetBoundInstance(save->GetMapId(), save->GetDifficulty()); if (!bind || !bind->perm) { plr->BindToInstance(save, true); @@ -2547,7 +2547,7 @@ void InstanceMap::SetResetSchedule(bool on) // it is assumed that the reset time will rarely (if ever) change while the reset is scheduled if (IsDungeon() && !HavePlayers() && !IsRaidOrHeroicDungeon()) { - if (InstanceSave *save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId())) + if (InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId())) sInstanceSaveMgr->ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), Difficulty(GetSpawnMode()), GetInstanceId())); else sLog->outError("InstanceMap::SetResetSchedule: cannot turn schedule %s, there is no save information for instance (map [id: %u, name: %s], instance id: %u, difficulty: %u)", diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index c778fe6ea5c..385f7abcaa5 100755 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -168,9 +168,9 @@ class GridMap uint8 *m_liquid_type; float *m_liquid_map; - bool loadAreaData(FILE *in, uint32 offset, uint32 size); - bool loadHeihgtData(FILE *in, uint32 offset, uint32 size); - bool loadLiquidData(FILE *in, uint32 offset, uint32 size); + bool loadAreaData(FILE* in, uint32 offset, uint32 size); + bool loadHeihgtData(FILE* in, uint32 offset, uint32 size); + bool loadLiquidData(FILE* in, uint32 offset, uint32 size); // Get height functions and pointers typedef float (GridMap::*pGetHeightPtr) (float x, float y) const; @@ -190,7 +190,7 @@ public: inline float getHeight(float x, float y) {return (this->*m_gridGetHeight)(x, y);} float getLiquidLevel(float x, float y); uint8 getTerrainType(float x, float y); - ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData *data = 0); + ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0); }; struct CreatureMover @@ -254,8 +254,8 @@ class Map : public GridRefManager<NGridType> return false; } - virtual bool Add(Player *); - virtual void Remove(Player *, bool); + virtual bool Add(Player* ); + virtual void Remove(Player* , bool); template<class T> void Add(T *); template<class T> void Remove(T *, bool); @@ -266,8 +266,8 @@ class Map : public GridRefManager<NGridType> //function for setting up visibility distance for maps on per-type/per-Id basis virtual void InitVisibilityDistance(); - void PlayerRelocation(Player *, float x, float y, float z, float orientation); - void CreatureRelocation(Creature *creature, float x, float y, float z, float ang, bool respawnRelocationOnFail = true); + void PlayerRelocation(Player* , float x, float y, float z, float orientation); + void CreatureRelocation(Creature* creature, float x, float y, float z, float ang, bool respawnRelocationOnFail = true); template<class T, class CONTAINER> void Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor); @@ -309,7 +309,7 @@ class Map : public GridRefManager<NGridType> // can return INVALID_HEIGHT if under z+2 z coord not found height float GetHeight(float x, float y, float z, bool pCheckVMap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const; - ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData *data = 0) const; + ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0) const; uint16 GetAreaFlag(float x, float y, float z, bool *isOutdoors=0) const; bool GetAreaInfo(float x, float y, float z, uint32 &mogpflags, int32 &adtId, int32 &rootId, int32 &groupId) const; @@ -318,7 +318,7 @@ class Map : public GridRefManager<NGridType> uint8 GetTerrainType(float x, float y) const; float GetWaterLevel(float x, float y) const; - bool IsInWater(float x, float y, float z, LiquidData *data = 0) const; + bool IsInWater(float x, float y, float z, LiquidData* data = 0) const; bool IsUnderWater(float x, float y, float z) const; static uint32 GetAreaIdByAreaFlag(uint16 areaflag, uint32 map_id); @@ -344,7 +344,7 @@ class Map : public GridRefManager<NGridType> void RemoveAllObjectsInRemoveList(); virtual void RemoveAllPlayers(); - bool CreatureRespawnRelocation(Creature *c); // used only in MoveAllCreaturesInMoveList and ObjectGridUnloader + bool CreatureRespawnRelocation(Creature* c); // used only in MoveAllCreaturesInMoveList and ObjectGridUnloader // assert print helper bool CheckGridIntegrity(Creature* c, bool moved) const; @@ -376,8 +376,8 @@ class Map : public GridRefManager<NGridType> return i_mapEntry->GetEntrancePos(mapid, x, y); } - void AddObjectToRemoveList(WorldObject *obj); - void AddObjectToSwitchList(WorldObject *obj, bool on); + void AddObjectToRemoveList(WorldObject* obj); + void AddObjectToSwitchList(WorldObject* obj, bool on); virtual void DelayedUpdate(const uint32 diff); void UpdateObjectVisibility(WorldObject* obj, Cell cell, CellPair cellpair); @@ -391,8 +391,8 @@ class Map : public GridRefManager<NGridType> uint32 GetPlayersCountExceptGMs() const; bool ActiveObjectsNearGrid(uint32 x, uint32 y) const; - void AddWorldObject(WorldObject *obj) { i_worldObjects.insert(obj); } - void RemoveWorldObject(WorldObject *obj) { i_worldObjects.erase(obj); } + void AddWorldObject(WorldObject* obj) { i_worldObjects.insert(obj); } + void RemoveWorldObject(WorldObject* obj) { i_worldObjects.erase(obj); } void SendToPlayers(WorldPacket const* data) const; @@ -438,7 +438,7 @@ class Map : public GridRefManager<NGridType> void LoadMapAndVMap(int gx, int gy); void LoadVMap(int gx, int gy); void LoadMap(int gx, int gy, bool reload = false); - GridMap *GetGrid(float x, float y); + GridMap* GetGrid(float x, float y); void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; } @@ -447,9 +447,9 @@ class Map : public GridRefManager<NGridType> void SendInitTransports(Player* player); void SendRemoveTransports(Player* player); - bool CreatureCellRelocation(Creature *creature, Cell new_cell); + bool CreatureCellRelocation(Creature* creature, Cell new_cell); - void AddCreatureToMoveList(Creature *c, float x, float y, float z, float ang); + void AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang); CreatureMoveList i_creaturesToMove; bool loaded(const GridPair &) const; @@ -513,7 +513,7 @@ class Map : public GridRefManager<NGridType> Map* m_parentMap; NGridType* i_grids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; - GridMap *GridMaps[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; + GridMap* GridMaps[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; std::bitset<TOTAL_NUMBER_OF_CELLS_PER_MAP*TOTAL_NUMBER_OF_CELLS_PER_MAP> marked_cells; //these functions used to process player/mob aggro reactions and @@ -521,7 +521,7 @@ class Map : public GridRefManager<NGridType> void ProcessRelocationNotifies(const uint32 diff); bool i_scriptLock; - std::set<WorldObject *> i_objectsToRemove; + std::set<WorldObject*> i_objectsToRemove; std::map<WorldObject*, bool> i_objectsToSwitch; std::set<WorldObject*> i_worldObjects; @@ -577,8 +577,8 @@ class InstanceMap : public Map public: InstanceMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent); ~InstanceMap(); - bool Add(Player *); - void Remove(Player *, bool); + bool Add(Player* ); + void Remove(Player* , bool); void Update(const uint32); void CreateInstanceData(bool load); bool Reset(uint8 method); @@ -607,8 +607,8 @@ class BattlegroundMap : public Map BattlegroundMap(uint32 id, time_t, uint32 InstanceId, Map* _parent, uint8 spawnMode); ~BattlegroundMap(); - bool Add(Player *); - void Remove(Player *, bool); + bool Add(Player* ); + void Remove(Player* , bool); bool CanEnter(Player* player); void SetUnload(); //void UnloadAll(bool pForce); diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index 24b16933000..88bfc9cdb69 100755 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -130,14 +130,14 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player* player) } else { - InstancePlayerBind *pBind = player->GetBoundInstance(GetId(), player->GetDifficulty(IsRaid())); - InstanceSave *pSave = pBind ? pBind->save : NULL; + InstancePlayerBind* pBind = player->GetBoundInstance(GetId(), player->GetDifficulty(IsRaid())); + InstanceSave* pSave = pBind ? pBind->save : NULL; // the player's permanent player bind is taken into consideration first // then the player's group bind and finally the solo bind. if (!pBind || !pBind->perm) { - InstanceGroupBind *groupBind = NULL; + InstanceGroupBind* groupBind = NULL; Group* group = player->GetGroup(); // use the player's difficulty setting (it may not be the same as the group's) if (group) @@ -170,7 +170,7 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player* player) return map; } -InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save, Difficulty difficulty) +InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save, Difficulty difficulty) { // load/create a map ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL); @@ -182,7 +182,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save, sLog->outError("CreateInstance: no entry for map %d", GetId()); ASSERT(false); } - const InstanceTemplate * iTemplate = sObjectMgr->GetInstanceTemplate(GetId()); + const InstanceTemplate* iTemplate = sObjectMgr->GetInstanceTemplate(GetId()); if (!iTemplate) { sLog->outError("CreateInstance: no instance template for map %d", GetId()); @@ -194,7 +194,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save, sLog->outDebug(LOG_FILTER_MAPS, "MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal"); - InstanceMap *map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this); + InstanceMap* map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this); ASSERT(map->IsDungeon()); bool load_data = save != NULL; @@ -220,7 +220,7 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun else spawnMode = REGULAR_DIFFICULTY; - BattlegroundMap *map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode); + BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode); ASSERT(map->IsBattlegroundOrArena()); map->SetBG(bg); bg->SetBgMap(map); diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h index 74874c99331..1913f0add51 100755 --- a/src/server/game/Maps/MapInstanced.h +++ b/src/server/game/Maps/MapInstanced.h @@ -27,7 +27,7 @@ class MapInstanced : public Map { friend class MapManager; public: - typedef UNORDERED_MAP< uint32, Map* > InstancedMaps; + typedef UNORDERED_MAP< uint32, Map*> InstancedMaps; MapInstanced(uint32 id, time_t expiry); ~MapInstanced() {} @@ -61,7 +61,7 @@ class MapInstanced : public Map private: - InstanceMap* CreateInstance(uint32 InstanceId, InstanceSave *save, Difficulty difficulty); + InstanceMap* CreateInstance(uint32 InstanceId, InstanceSave* save, Difficulty difficulty); BattlegroundMap* CreateBattleground(uint32 InstanceId, Battleground* bg); InstancedMaps m_InstancedMaps; diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index c26454701ed..9b91129ef03 100755 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -97,7 +97,7 @@ void MapManager::checkAndCorrectGridStatesArray() Map* MapManager::_createBaseMap(uint32 id) { - Map *m = _findMap(id); + Map* m = _findMap(id); if (m == NULL) { @@ -123,7 +123,7 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj, uint32 /*instanceI { ASSERT(obj); //if (!obj->IsInWorld()) sLog->outError("GetMap: called for map %d with object (typeid %d, guid %d, mapid %d, instanceid %d) who is not in world!", id, obj->GetTypeId(), obj->GetGUIDLow(), obj->GetMapId(), obj->GetInstanceId()); - Map *m = _createBaseMap(id); + Map* m = _createBaseMap(id); if (m && (obj->GetTypeId() == TYPEID_PLAYER) && m->Instanceable()) m = ((MapInstanced*)m)->CreateInstance(id, (Player*)obj); @@ -132,7 +132,7 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj, uint32 /*instanceI Map* MapManager::FindMap(uint32 mapid, uint32 instanceId) const { - Map *map = _findMap(mapid); + Map* map = _findMap(mapid); if (!map) return NULL; @@ -338,10 +338,10 @@ uint32 MapManager::GetNumInstances() uint32 ret = 0; for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr) { - Map *map = itr->second; + Map* map = itr->second; if (!map->Instanceable()) continue; - MapInstanced::InstancedMaps &maps = ((MapInstanced *)map)->GetInstancedMaps(); + MapInstanced::InstancedMaps &maps = ((MapInstanced* )map)->GetInstancedMaps(); for (MapInstanced::InstancedMaps::iterator mitr = maps.begin(); mitr != maps.end(); ++mitr) if (mitr->second->IsDungeon()) ret++; } @@ -355,10 +355,10 @@ uint32 MapManager::GetNumPlayersInInstances() uint32 ret = 0; for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr) { - Map *map = itr->second; + Map* map = itr->second; if (!map->Instanceable()) continue; - MapInstanced::InstancedMaps &maps = ((MapInstanced *)map)->GetInstancedMaps(); + MapInstanced::InstancedMaps &maps = ((MapInstanced* )map)->GetInstancedMaps(); for (MapInstanced::InstancedMaps::iterator mitr = maps.begin(); mitr != maps.end(); ++mitr) if (mitr->second->IsDungeon()) ret += ((InstanceMap*)mitr->second)->GetPlayers().getSize(); diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h index 0392c1f6579..926ff2c8051 100755 --- a/src/server/game/Maps/MapManager.h +++ b/src/server/game/Maps/MapManager.h @@ -124,7 +124,7 @@ class MapManager void LoadTransports(); void LoadTransportNPCs(); - typedef std::set<Transport *> TransportSet; + typedef std::set<Transport*> TransportSet; TransportSet m_Transports; typedef std::map<uint32, TransportSet> TransportMap; diff --git a/src/server/game/Maps/MapReference.h b/src/server/game/Maps/MapReference.h index ccd451bc8e9..1b939c329aa 100755 --- a/src/server/game/Maps/MapReference.h +++ b/src/server/game/Maps/MapReference.h @@ -44,10 +44,10 @@ class MapReference : public Reference<Map, Player> public: 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(); } - MapReference *nockeck_prev() { return (MapReference*)Reference<Map, Player>::nocheck_prev(); } - MapReference const *nocheck_prev() const { return (MapReference const*)Reference<Map, Player>::nocheck_prev(); } + MapReference* next() { return (MapReference*)Reference<Map, Player>::next(); } + MapReference const* next() const { return (MapReference const*)Reference<Map, Player>::next(); } + MapReference* nockeck_prev() { return (MapReference*)Reference<Map, Player>::nocheck_prev(); } + MapReference const* nocheck_prev() const { return (MapReference const*)Reference<Map, Player>::nocheck_prev(); } }; #endif diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index cf59106103f..f562010549b 100755 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -156,7 +156,7 @@ namespace Trinity return baseGain; } - inline uint32 Gain(Player *pl, Unit *u) + inline uint32 Gain(Player* pl, Unit* u) { uint32 gain; diff --git a/src/server/game/Movement/DestinationHolder.h b/src/server/game/Movement/DestinationHolder.h index 3ef03e1864f..2b36fe471b8 100755 --- a/src/server/game/Movement/DestinationHolder.h +++ b/src/server/game/Movement/DestinationHolder.h @@ -53,7 +53,7 @@ class DestinationHolder bool HasArrived(void) const { return (i_totalTravelTime == 0 || i_timeElapsed >= i_totalTravelTime); } bool UpdateTraveller(TRAVELLER &traveller, uint32 diff, bool micro_movement=false); uint32 StartTravel(TRAVELLER &traveller, bool sendMove = true); - void GetLocationNow(const Map * map, float &x, float &y, float &z, bool is3D = false) const; + void GetLocationNow(const Map* map, float &x, float &y, float &z, bool is3D = false) const; void GetLocationNowNoMicroMovement(float &x, float &y, float &z) const; // For use without micro movement float GetDistance3dFromDestSq(const WorldObject &obj) const; diff --git a/src/server/game/Movement/DestinationHolderImp.h b/src/server/game/Movement/DestinationHolderImp.h index fac415a27a5..f1e815c093e 100755 --- a/src/server/game/Movement/DestinationHolderImp.h +++ b/src/server/game/Movement/DestinationHolderImp.h @@ -143,7 +143,7 @@ DestinationHolder<TRAVELLER>::UpdateTraveller(TRAVELLER &traveller, uint32 diff, template<typename TRAVELLER> void -DestinationHolder<TRAVELLER>::GetLocationNow(const Map * map, float &x, float &y, float &z, bool is3D) const +DestinationHolder<TRAVELLER>::GetLocationNow(const Map* map, float &x, float &y, float &z, bool is3D) const { if (HasArrived()) { diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h index 1455493846e..b6fd3a848ac 100755 --- a/src/server/game/Movement/MotionMaster.h +++ b/src/server/game/Movement/MotionMaster.h @@ -94,7 +94,7 @@ class MotionMaster //: private std::stack<MovementGenerator *> void InitTop(); public: - explicit MotionMaster(Unit *unit) : i_top(-1), i_owner(unit), m_expList(NULL), m_cleanFlag(MMCF_NONE) + explicit MotionMaster(Unit* unit) : i_top(-1), i_owner(unit), m_expList(NULL), m_cleanFlag(MMCF_NONE) { for (uint8 i = 0; i < MAX_MOTION_SLOT; ++i) { @@ -185,7 +185,7 @@ class MotionMaster //: private std::stack<MovementGenerator *> void DelayedExpire(); Unit *i_owner; - ExpireList *m_expList; + ExpireList* m_expList; uint8 m_cleanFlag; }; #endif diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index 29957785830..00fc3dde11f 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -76,7 +76,7 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z) z = owner.GetPositionZ(); float temp_x, temp_y, angle = 0; - const Map * _map = owner.GetBaseMap(); + const Map* _map = owner.GetBaseMap(); //primitive path-finding for (uint8 i = 0; i < 18; ++i) { diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index dc3c805d59c..4ad2f0638d0 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -345,7 +345,7 @@ void FlightPathMovementGenerator::InitEndGridInfo() void FlightPathMovementGenerator::PreloadEndGrid() { // used to preload the final grid where the flightmaster is - Map *endMap = sMapMgr->FindMap(m_endMapId); + Map* endMap = sMapMgr->FindMap(m_endMapId); // Load the grid if (endMap) diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h index a1a131f9f6a..ea277eaafc6 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h @@ -82,7 +82,7 @@ class WaypointMovementGenerator MovementGeneratorType GetMovementGeneratorType() { return WAYPOINT_MOTION_TYPE; } private: - WaypointData *node; + WaypointData* node; uint32 path_id; TimeTrackerSmall i_nextMoveTime; WaypointPath const* waypoints; diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp index 869a594415e..0ce2a097422 100755 --- a/src/server/game/Movement/Waypoints/WaypointManager.cpp +++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp @@ -107,7 +107,7 @@ void WaypointMgr::ReloadPath(uint32 id) do { Field* fields = result->Fetch(); - WaypointData *wp = new WaypointData(); + WaypointData* wp = new WaypointData(); float x = fields[1].GetFloat(); float y = fields[2].GetFloat(); diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index 0bd4344c83b..a4432d7ca19 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -29,7 +29,7 @@ #include "GridNotifiersImpl.h" #include "CellImpl.h" -OPvPCapturePoint::OPvPCapturePoint(OutdoorPvP * pvp): +OPvPCapturePoint::OPvPCapturePoint(OutdoorPvP* pvp): m_capturePointGUID(0), m_capturePoint(NULL), m_maxValue(0), m_maxSpeed(0), m_value(0), m_team(TEAM_NEUTRAL), m_OldState(OBJECTIVESTATE_NEUTRAL), m_State(OBJECTIVESTATE_NEUTRAL), m_neutralValuePct(0), m_PvP(pvp) @@ -71,7 +71,7 @@ void OPvPCapturePoint::AddGO(uint32 type, uint32 guid, uint32 entry) { if (!entry) { - const GameObjectData *data = sObjectMgr->GetGOData(guid); + const GameObjectData* data = sObjectMgr->GetGOData(guid); if (!data) return; entry = data->id; @@ -84,7 +84,7 @@ void OPvPCapturePoint::AddCre(uint32 type, uint32 guid, uint32 entry) { if (!entry) { - const CreatureData *data = sObjectMgr->GetCreatureData(guid); + const CreatureData* data = sObjectMgr->GetCreatureData(guid); if (!data) return; entry = data->id; @@ -148,7 +148,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type) return false; } - Creature *cr = HashMapHolder<Creature>::Find(m_Creatures[type]); + Creature* cr = HashMapHolder<Creature>::Find(m_Creatures[type]); if (!cr) { // can happen when closing the core @@ -163,7 +163,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type) // explicit removal from map // beats me why this is needed, but with the recent removal "cleanup" some creatures stay in the map if "properly" deleted // so this is a big fat workaround, if AddObjectToRemoveList and DoDelayedMovesAndRemoves worked correctly, this wouldn't be needed - //if (Map * map = sMapMgr->FindMap(cr->GetMapId())) + //if (Map* map = sMapMgr->FindMap(cr->GetMapId())) // map->Remove(cr, false); // delete respawn time for this creature PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN_BY_GUID); @@ -182,7 +182,7 @@ bool OPvPCapturePoint::DelObject(uint32 type) if (!m_Objects[type]) return false; - GameObject *obj = HashMapHolder<GameObject>::Find(m_Objects[type]); + GameObject* obj = HashMapHolder<GameObject>::Find(m_Objects[type]); if (!obj) { m_Objects[type] = 0; @@ -432,11 +432,11 @@ void OPvPCapturePoint::SendObjectiveComplete(uint32 id, uint64 guid) void OutdoorPvP::HandleKill(Player* killer, Unit* killed) { - if (Group * pGroup = killer->GetGroup()) + if (Group* pGroup = killer->GetGroup()) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *pGroupGuy = itr->getSource(); + Player* pGroupGuy = itr->getSource(); if (!pGroupGuy) continue; @@ -463,7 +463,7 @@ void OutdoorPvP::HandleKill(Player* killer, Unit* killed) } } -bool OutdoorPvP::IsInsideObjective(Player *plr) const +bool OutdoorPvP::IsInsideObjective(Player* plr) const { for (OPvPCapturePointMap::const_iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr) if (itr->second->IsInsideObjective(plr)) @@ -472,12 +472,12 @@ bool OutdoorPvP::IsInsideObjective(Player *plr) const return false; } -bool OPvPCapturePoint::IsInsideObjective(Player *plr) const +bool OPvPCapturePoint::IsInsideObjective(Player* plr) const { return m_activePlayers[plr->GetTeamId()].find(plr) != m_activePlayers[plr->GetTeamId()].end(); } -bool OutdoorPvP::HandleCustomSpell(Player *plr, uint32 spellId, GameObject* go) +bool OutdoorPvP::HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go) { for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr) if (itr->second->HandleCustomSpell(plr, spellId, go)) @@ -486,14 +486,14 @@ bool OutdoorPvP::HandleCustomSpell(Player *plr, uint32 spellId, GameObject* go) return false; } -bool OPvPCapturePoint::HandleCustomSpell(Player *plr, uint32 /*spellId*/, GameObject* /*go*/) +bool OPvPCapturePoint::HandleCustomSpell(Player* plr, uint32 /*spellId*/, GameObject* /*go*/) { if (!plr->IsOutdoorPvPActive()) return false; return false; } -bool OutdoorPvP::HandleOpenGo(Player *plr, uint64 guid) +bool OutdoorPvP::HandleOpenGo(Player* plr, uint64 guid) { for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr) if (itr->second->HandleOpenGo(plr, guid) >= 0) @@ -572,7 +572,7 @@ void OutdoorPvP::RegisterZone(uint32 zoneId) sOutdoorPvPMgr->AddZone(zoneId, this); } -bool OutdoorPvP::HasPlayer(Player *plr) const +bool OutdoorPvP::HasPlayer(Player* plr) const { return m_players[plr->GetTeamId()].find(plr) != m_players[plr->GetTeamId()].end(); } @@ -593,7 +593,7 @@ void OutdoorPvP::TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2) TeamCastSpell(OTHER_TEAM(team), spellId2 ? -(int32)spellId2 : -(int32)spellId); } -void OutdoorPvP::OnGameObjectCreate(GameObject *go) +void OutdoorPvP::OnGameObjectCreate(GameObject* go) { if (go->GetGoType() != GAMEOBJECT_TYPE_CAPTURE_POINT) return; @@ -602,7 +602,7 @@ void OutdoorPvP::OnGameObjectCreate(GameObject *go) cp->m_capturePoint = go; } -void OutdoorPvP::OnGameObjectRemove(GameObject *go) +void OutdoorPvP::OnGameObjectRemove(GameObject* go) { if (go->GetGoType() != GAMEOBJECT_TYPE_CAPTURE_POINT) return; diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h index e3cb9ee5c17..8924ce8acbb 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.h +++ b/src/server/game/OutdoorPvP/OutdoorPvP.h @@ -91,7 +91,7 @@ class OPvPCapturePoint { public: - OPvPCapturePoint(OutdoorPvP * pvp); + OPvPCapturePoint(OutdoorPvP* pvp); virtual ~OPvPCapturePoint() {} @@ -110,9 +110,9 @@ class OPvPCapturePoint // checks if player is in range of a capture credit marker bool IsInsideObjective(Player* plr) const; - virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject* go); + virtual bool HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go); - virtual int32 HandleOpenGo(Player *plr, uint64 guid); + virtual int32 HandleOpenGo(Player* plr, uint64 guid); // 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); @@ -123,7 +123,7 @@ class OPvPCapturePoint virtual void SendChangePhase(); - virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid); + virtual bool HandleGossipOption(Player* plr, uint64 guid, uint32 gossipid); virtual bool CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso); @@ -133,7 +133,7 @@ class OPvPCapturePoint uint32 m_capturePointGUID; - GameObject *m_capturePoint; + GameObject* m_capturePoint; void AddGO(uint32 type, uint32 guid, uint32 entry = 0); void AddCre(uint32 type, uint32 guid, uint32 entry = 0); @@ -211,17 +211,17 @@ class OutdoorPvP : public ZoneScript virtual bool HandleAreaTrigger(Player* plr, uint32 trigger); // called on custom spell - virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject* go); + virtual bool HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go); // called on go use - virtual bool HandleOpenGo(Player *plr, uint64 guid); + virtual bool HandleOpenGo(Player* plr, uint64 guid); // setup stuff virtual bool SetupOutdoorPvP() {return true;} - void OnGameObjectCreate(GameObject *go); - void OnGameObjectRemove(GameObject *go); - void OnCreatureCreate(Creature *) {} + void OnGameObjectCreate(GameObject* go); + void OnGameObjectRemove(GameObject* go); + void OnCreatureCreate(Creature* ) {} // send world state update to all players present void SendUpdateWorldState(uint32 field, uint32 value); @@ -243,7 +243,7 @@ class OutdoorPvP : public ZoneScript virtual bool HandleDropFlag(Player* plr, uint32 spellId); - virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid); + virtual bool HandleGossipOption(Player* plr, uint64 guid, uint32 gossipid); virtual bool CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso); @@ -285,7 +285,7 @@ class OutdoorPvP : public ZoneScript void RegisterZone(uint32 zoneid); - bool HasPlayer(Player *plr) const; + bool HasPlayer(Player* plr) const; void TeamCastSpell(TeamId team, int32 spellId); }; diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp index 7626845e2c7..dda0e7bcb61 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp @@ -56,7 +56,7 @@ void OutdoorPvPMgr::InitOutdoorPvP() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); typeId = fields[0].GetUInt32(); @@ -110,12 +110,12 @@ void OutdoorPvPMgr::InitOutdoorPvP() sLog->outString(); } -void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP *handle) +void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP* handle) { m_OutdoorPvPMap[zoneid] = handle; } -void OutdoorPvPMgr::HandlePlayerEnterZone(Player *plr, uint32 zoneid) +void OutdoorPvPMgr::HandlePlayerEnterZone(Player* plr, uint32 zoneid) { OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneid); if (itr == m_OutdoorPvPMap.end()) @@ -128,7 +128,7 @@ void OutdoorPvPMgr::HandlePlayerEnterZone(Player *plr, uint32 zoneid) sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %u entered outdoorpvp id %u", plr->GetGUIDLow(), itr->second->GetTypeId()); } -void OutdoorPvPMgr::HandlePlayerLeaveZone(Player *plr, uint32 zoneid) +void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* plr, uint32 zoneid) { OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneid); if (itr == m_OutdoorPvPMap.end()) @@ -142,7 +142,7 @@ void OutdoorPvPMgr::HandlePlayerLeaveZone(Player *plr, uint32 zoneid) sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %u left outdoorpvp id %u", plr->GetGUIDLow(), itr->second->GetTypeId()); } -OutdoorPvP * OutdoorPvPMgr::GetOutdoorPvPToZoneId(uint32 zoneid) +OutdoorPvP* OutdoorPvPMgr::GetOutdoorPvPToZoneId(uint32 zoneid) { OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneid); if (itr == m_OutdoorPvPMap.end()) @@ -164,7 +164,7 @@ void OutdoorPvPMgr::Update(uint32 diff) } } -bool OutdoorPvPMgr::HandleCustomSpell(Player *plr, uint32 spellId, GameObject* go) +bool OutdoorPvPMgr::HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go) { for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr) { @@ -174,7 +174,7 @@ bool OutdoorPvPMgr::HandleCustomSpell(Player *plr, uint32 spellId, GameObject* g return false; } -ZoneScript * OutdoorPvPMgr::GetZoneScript(uint32 zoneId) +ZoneScript* OutdoorPvPMgr::GetZoneScript(uint32 zoneId) { OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneId); if (itr != m_OutdoorPvPMap.end()) @@ -183,7 +183,7 @@ ZoneScript * OutdoorPvPMgr::GetZoneScript(uint32 zoneId) return NULL; } -bool OutdoorPvPMgr::HandleOpenGo(Player *plr, uint64 guid) +bool OutdoorPvPMgr::HandleOpenGo(Player* plr, uint64 guid) { for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr) { @@ -193,7 +193,7 @@ bool OutdoorPvPMgr::HandleOpenGo(Player *plr, uint64 guid) return false; } -void OutdoorPvPMgr::HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid) +void OutdoorPvPMgr::HandleGossipOption(Player* plr, uint64 guid, uint32 gossipid) { for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr) { @@ -212,7 +212,7 @@ bool OutdoorPvPMgr::CanTalkTo(Player* player, Creature* creature, GossipMenuItem return false; } -void OutdoorPvPMgr::HandleDropFlag(Player *plr, uint32 spellId) +void OutdoorPvPMgr::HandleDropFlag(Player* plr, uint32 spellId) { for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr) { @@ -221,7 +221,7 @@ void OutdoorPvPMgr::HandleDropFlag(Player *plr, uint32 spellId) } } -void OutdoorPvPMgr::HandlePlayerResurrects(Player *plr, uint32 zoneid) +void OutdoorPvPMgr::HandlePlayerResurrects(Player* plr, uint32 zoneid) { OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneid); if (itr == m_OutdoorPvPMap.end()) diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h index 00b89527349..85df2c37aa7 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h @@ -59,7 +59,7 @@ class OutdoorPvPMgr void HandlePlayerResurrects(Player* plr, uint32 areaflag); // return assigned outdoor pvp - OutdoorPvP * GetOutdoorPvPToZoneId(uint32 zoneid); + OutdoorPvP* GetOutdoorPvPToZoneId(uint32 zoneid); // handle custom (non-exist in dbc) spell if registered bool HandleCustomSpell(Player* plr, uint32 spellId, GameObject* go); @@ -67,9 +67,9 @@ class OutdoorPvPMgr // handle custom go if registered bool HandleOpenGo(Player* plr, uint64 guid); - ZoneScript * GetZoneScript(uint32 zoneId); + ZoneScript* GetZoneScript(uint32 zoneId); - void AddZone(uint32 zoneid, OutdoorPvP * handle); + void AddZone(uint32 zoneid, OutdoorPvP* handle); void Update(uint32 diff); diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index e77639060aa..1107762a220 100755 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -545,7 +545,7 @@ void PoolMgr::Initialize() QueryResult result = WorldDatabase.Query("SELECT MAX(entry) FROM pool_template"); if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); max_pool_id = fields[0].GetUInt32(); } @@ -578,7 +578,7 @@ void PoolMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 pool_id = fields[0].GetUInt32(); @@ -612,7 +612,7 @@ void PoolMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); uint32 pool_id = fields[1].GetUInt32(); @@ -634,7 +634,7 @@ void PoolMgr::LoadFromDB() sLog->outErrorDb("`pool_creature` has an invalid chance (%f) for creature guid (%u) in pool id (%u), skipped.", chance, guid, pool_id); continue; } - PoolTemplateData *pPoolTemplate = &mPoolTemplate[pool_id]; + PoolTemplateData* pPoolTemplate = &mPoolTemplate[pool_id]; PoolObject plObject = PoolObject(guid, chance); PoolGroup<Creature>& cregroup = mPoolCreatureGroups[pool_id]; cregroup.SetPoolId(pool_id); @@ -670,7 +670,7 @@ void PoolMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); uint32 pool_id = fields[1].GetUInt32(); @@ -704,7 +704,7 @@ void PoolMgr::LoadFromDB() continue; } - PoolTemplateData *pPoolTemplate = &mPoolTemplate[pool_id]; + PoolTemplateData* pPoolTemplate = &mPoolTemplate[pool_id]; PoolObject plObject = PoolObject(guid, chance); PoolGroup<GameObject>& gogroup = mPoolGameobjectGroups[pool_id]; gogroup.SetPoolId(pool_id); @@ -740,7 +740,7 @@ void PoolMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 child_pool_id = fields[0].GetUInt32(); uint32 mother_pool_id = fields[1].GetUInt32(); @@ -766,7 +766,7 @@ void PoolMgr::LoadFromDB() sLog->outErrorDb("`pool_pool` has an invalid chance (%f) for pool id (%u) in mother pool id (%u), skipped.", chance, child_pool_id, mother_pool_id); continue; } - PoolTemplateData *pPoolTemplateMother = &mPoolTemplate[mother_pool_id]; + PoolTemplateData* pPoolTemplateMother = &mPoolTemplate[mother_pool_id]; PoolObject plObject = PoolObject(child_pool_id, chance); PoolGroup<Pool>& plgroup = mPoolPoolGroups[mother_pool_id]; plgroup.SetPoolId(mother_pool_id); @@ -880,7 +880,7 @@ void PoolMgr::LoadFromDB() continue; } - PoolTemplateData *pPoolTemplate = &mPoolTemplate[pool_id]; + PoolTemplateData* pPoolTemplate = &mPoolTemplate[pool_id]; PoolObject plObject = PoolObject(entry, 0.0f); PoolGroup<Quest>& questgroup = mPoolQuestGroups[pool_id]; questgroup.SetPoolId(pool_id); @@ -916,7 +916,7 @@ void PoolMgr::LoadFromDB() uint32 count = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 pool_entry = fields[0].GetUInt32(); uint32 pool_pool_id = fields[1].GetUInt32(); diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index 50fb0e452fb..22251ac0bd8 100755 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -20,7 +20,7 @@ #include "Player.h" #include "World.h" -Quest::Quest(Field * questRecord) +Quest::Quest(Field* questRecord) { QuestId = questRecord[0].GetUInt32(); QuestMethod = questRecord[1].GetUInt32(); @@ -166,12 +166,12 @@ Quest::Quest(Field * questRecord) ++m_rewchoiceitemscount; } -uint32 Quest::XPValue(Player *pPlayer) const +uint32 Quest::XPValue(Player* pPlayer) const { if (pPlayer) { int32 quest_level = (QuestLevel == -1 ? pPlayer->getLevel() : QuestLevel); - const QuestXPEntry *xpentry = sQuestXPStore.LookupEntry(quest_level); + const QuestXPEntry* xpentry = sQuestXPStore.LookupEntry(quest_level); if (!xpentry) return 0; diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index bbaf083bca5..8c415749d6b 100755 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -182,8 +182,8 @@ class Quest { friend class ObjectMgr; public: - Quest(Field * questRecord); - uint32 XPValue(Player *pPlayer) const; + Quest(Field* questRecord); + uint32 XPValue(Player* pPlayer) const; bool HasFlag(uint32 flag) const { return (QuestFlags & flag) != 0; } void SetFlag(uint32 flag) { QuestFlags |= flag; } diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index e285f5e1589..0aaa3da0a38 100755 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -41,7 +41,7 @@ ReputationRank ReputationMgr::ReputationToRank(int32 standing) int32 ReputationMgr::GetReputation(uint32 faction_id) const { - FactionEntry const *factionEntry = sFactionStore.LookupEntry(faction_id); + FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id); if (!factionEntry) { @@ -233,7 +233,7 @@ void ReputationMgr::Initialize() for (unsigned int i = 1; i < sFactionStore.GetNumRows(); i++) { - FactionEntry const *factionEntry = sFactionStore.LookupEntry(i); + FactionEntry const* factionEntry = sFactionStore.LookupEntry(i); if (factionEntry && (factionEntry->reputationListID >= 0)) { @@ -260,7 +260,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi sScriptMgr->OnPlayerReputationChange(m_player, factionEntry->ID, standing, incremental); bool res = false; // if spillover definition exists in DB, override DBC - if (const RepSpilloverTemplate *repTemplate = sObjectMgr->GetRepSpilloverTemplate(factionEntry->ID)) + if (const RepSpilloverTemplate* repTemplate = sObjectMgr->GetRepSpilloverTemplate(factionEntry->ID)) { for (uint32 i = 0; i < MAX_SPILLOVER_FACTIONS; ++i) { @@ -284,7 +284,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi if (!flist && factionEntry->team && factionEntry->spilloverRateOut != 0.0f) { spillOverRepOut *= factionEntry->spilloverRateOut; - if (FactionEntry const *parent = sFactionStore.LookupEntry(factionEntry->team)) + if (FactionEntry const* parent = sFactionStore.LookupEntry(factionEntry->team)) { FactionStateList::iterator parentState = m_factions.find(parent->reputationListID); // some team factions have own reputation standing, in this case do not spill to other sub-factions @@ -303,7 +303,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi // Spillover to affiliated factions for (SimpleFactionsList::const_iterator itr = flist->begin(); itr != flist->end(); ++itr) { - if (FactionEntry const *factionEntryCalc = sFactionStore.LookupEntry(*itr)) + if (FactionEntry const* factionEntryCalc = sFactionStore.LookupEntry(*itr)) { if (factionEntryCalc == factionEntry || GetRank(factionEntryCalc) > ReputationRank(factionEntryCalc->spilloverMaxRankIn)) continue; @@ -375,13 +375,13 @@ void ReputationMgr::SetVisible(FactionTemplateEntry const*factionTemplateEntry) if (!factionTemplateEntry->faction) return; - if (FactionEntry const *factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->faction)) + if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionTemplateEntry->faction)) // Never show factions of the opposing team if (!(factionEntry->BaseRepRaceMask[1] & m_player->getRaceMask() && factionEntry->BaseRepValue[1] == Reputation_Bottom)) SetVisible(factionEntry); } -void ReputationMgr::SetVisible(FactionEntry const *factionEntry) +void ReputationMgr::SetVisible(FactionEntry const* factionEntry) { if (factionEntry->reputationListID < 0) return; @@ -478,7 +478,7 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result) // Set initial reputations (so everything is nifty before DB data load) Initialize(); - //QueryResult *result = CharacterDatabase.PQuery("SELECT faction, standing, flags FROM character_reputation WHERE guid = '%u'", GetGUIDLow()); + //QueryResult* result = CharacterDatabase.PQuery("SELECT faction, standing, flags FROM character_reputation WHERE guid = '%u'", GetGUIDLow()); if (result) { @@ -486,7 +486,7 @@ void ReputationMgr::LoadFromDB(PreparedQueryResult result) { Field* fields = result->Fetch(); - FactionEntry const *factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt16()); + FactionEntry const* factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt16()); if (factionEntry && (factionEntry->reputationListID >= 0)) { FactionState* faction = &m_factions[factionEntry->reputationListID]; diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index 8efca3a8658..ec651439bc5 100755 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -44,7 +44,7 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O uint64 ownerGUID = (source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : (uint64)0; ///- Schedule script execution for all scripts in the script map - ScriptMap const *s2 = &(s->second); + ScriptMap const* s2 = &(s->second); bool immedScript = false; for (ScriptMap::const_iterator iter = s2->begin(); iter != s2->end(); ++iter) { @@ -100,7 +100,7 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou // Helpers for ScriptProcess method. inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* target, const ScriptInfo* scriptInfo) const { - Player *pPlayer = NULL; + Player* pPlayer = NULL; if (!source && !target) sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); else @@ -122,7 +122,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* target, const ScriptInfo* scriptInfo, bool bReverse) const { - Creature *pCreature = NULL; + Creature* pCreature = NULL; if (!source && !target) sLog->outError("%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str()); else @@ -245,7 +245,7 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script scriptInfo->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); else { - GameObject *pDoor = _FindGameObject(wSource, guid); + GameObject* pDoor = _FindGameObject(wSource, guid); if (!pDoor) sLog->outError("%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid); else if (pDoor->GetGoType() != GAMEOBJECT_TYPE_DOOR) @@ -268,7 +268,7 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script inline GameObject* Map::_FindGameObject(WorldObject* pSearchObject, uint32 guid) const { - GameObject *pGameObject = NULL; + GameObject* pGameObject = NULL; CellPair p(Trinity::ComputeCellPair(pSearchObject->GetPositionX(), pSearchObject->GetPositionY())); Cell cell(p); @@ -376,7 +376,7 @@ void Map::ScriptsProcess() } if (step.script->Talk.Flags & SF_TALK_USE_PLAYER) { - if (Player *pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) + if (Player* pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) { LocaleConstant loc_idx = pSource->GetSession()->GetSessionDbLocaleIndex(); std::string text(sObjectMgr->GetTrinityString(step.script->Talk.TextID, loc_idx)); @@ -411,7 +411,7 @@ void Map::ScriptsProcess() else { // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { uint64 targetGUID = target ? target->GetGUID() : 0; switch (step.script->Talk.ChatType) @@ -449,7 +449,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_EMOTE: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { if (step.script->Emote.Flags & SF_EMOTE_USE_STATE) cSource->SetUInt32Value(UNIT_NPC_EMOTESTATE, step.script->Emote.EmoteID); @@ -460,7 +460,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_FIELD_SET: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { // Validate field number. if (step.script->FieldSet.FieldID <= OBJECT_FIELD_ENTRY || step.script->FieldSet.FieldID >= cSource->GetValuesCount()) @@ -474,7 +474,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_MOVE_TO: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { cSource->SendMonsterMoveWithSpeed(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, step.script->MoveTo.TravelTime); cSource->GetMap()->CreatureRelocation(cSource, step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, 0); @@ -483,7 +483,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_FLAG_SET: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) @@ -497,7 +497,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_FLAG_REMOVE: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { // Validate field number. if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount()) @@ -513,13 +513,13 @@ void Map::ScriptsProcess() if (step.script->TeleportTo.Flags & SF_TELEPORT_USE_CREATURE) { // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script, true)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script, true)) cSource->NearTeleportTo(step.script->TeleportTo.DestX, step.script->TeleportTo.DestY, step.script->TeleportTo.DestZ, step.script->TeleportTo.Orientation); } else { // Source or target must be Player. - if (Player *pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) + if (Player* pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) pSource->TeleportTo(step.script->TeleportTo.MapID, step.script->TeleportTo.DestX, step.script->TeleportTo.DestY, step.script->TeleportTo.DestZ, step.script->TeleportTo.Orientation); } break; @@ -585,7 +585,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_KILL_CREDIT: // Source or target must be Player. - if (Player *pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) + if (Player* pSource = _GetScriptPlayerSourceOrTarget(source, target, step.script)) { if (step.script->KillCredit.Flags & SF_KILLCREDIT_REWARD_GROUP) pSource->RewardPlayerAndGroupAtEvent(step.script->KillCredit.CreatureEntry, pSource); @@ -604,7 +604,7 @@ void Map::ScriptsProcess() // Source or target must be WorldObject. if (WorldObject* pSummoner = _GetScriptWorldObject(source, true, step.script)) { - GameObject *pGO = _FindGameObject(pSummoner, step.script->RespawnGameobject.GOGuid); + GameObject* pGO = _FindGameObject(pSummoner, step.script->RespawnGameobject.GOGuid); if (!pGO) { sLog->outError("%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid); @@ -661,7 +661,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_ACTIVATE_OBJECT: // Source must be Unit. - if (Unit *pSource = _GetScriptUnit(source, true, step.script)) + if (Unit* pSource = _GetScriptUnit(source, true, step.script)) { // Target must be GameObject. if (!target) @@ -677,7 +677,7 @@ void Map::ScriptsProcess() break; } - if (GameObject *pGO = target->ToGameObject()) + if (GameObject* pGO = target->ToGameObject()) pGO->Use(pSource); } break; @@ -686,7 +686,7 @@ void Map::ScriptsProcess() { // Source (datalong2 != 0) or target (datalong2 == 0) must be Unit. bool bReverse = step.script->RemoveAura.Flags & SF_REMOVEAURA_REVERSE; - if (Unit *pTarget = _GetScriptUnit(bReverse ? source : target, bReverse, step.script)) + if (Unit* pTarget = _GetScriptUnit(bReverse ? source : target, bReverse, step.script)) pTarget->RemoveAurasDueToSpell(step.script->RemoveAura.SpellID); break; } @@ -842,7 +842,7 @@ void Map::ScriptsProcess() } //Lets choose our ScriptMap map - ScriptMapMap *datamap = GetScriptsMapByType(ScriptsType(step.script->CallScript.ScriptType)); + ScriptMapMap* datamap = GetScriptsMapByType(ScriptsType(step.script->CallScript.ScriptType)); //if no scriptmap present... if (!datamap) { @@ -857,7 +857,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_KILL: // Source or target must be Creature. - if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) + if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { if (cSource->isDead()) sLog->outError("%s creature is already dead (Entry: %u, GUID: %u)", @@ -873,7 +873,7 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_ORIENTATION: // Source must be Unit. - if (Unit *pSource = _GetScriptUnit(source, true, step.script)) + if (Unit* pSource = _GetScriptUnit(source, true, step.script)) { if (step.script->Orientation.Flags& SF_ORIENTATION_FACE_TARGET) { @@ -893,25 +893,25 @@ void Map::ScriptsProcess() case SCRIPT_COMMAND_EQUIP: // Source must be Creature. - if (Creature *cSource = _GetScriptCreature(source, true, step.script)) + if (Creature* cSource = _GetScriptCreature(source, true, step.script)) cSource->LoadEquipment(step.script->Equip.EquipmentID); break; case SCRIPT_COMMAND_MODEL: // Source must be Creature. - if (Creature *cSource = _GetScriptCreature(source, true, step.script)) + if (Creature* cSource = _GetScriptCreature(source, true, step.script)) cSource->SetDisplayId(step.script->Model.ModelID); break; case SCRIPT_COMMAND_CLOSE_GOSSIP: // Source must be Player. - if (Player *pSource = _GetScriptPlayer(source, true, step.script)) + if (Player* pSource = _GetScriptPlayer(source, true, step.script)) pSource->PlayerTalkClass->SendCloseGossip(); break; case SCRIPT_COMMAND_PLAYMOVIE: // Source must be Player. - if (Player *pSource = _GetScriptPlayer(source, true, step.script)) + if (Player* pSource = _GetScriptPlayer(source, true, step.script)) pSource->SendMovieStart(step.script->PlayMovie.MovieID); break; diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index e5168fbec9c..d37938eba48 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1218,7 +1218,7 @@ void ScriptMgr::OnPlayerReputationChange(Player* player, uint32 factionID, int32 FOREACH_SCRIPT(PlayerScript)->OnReputationChange(player, factionID, standing, incremental); } -void ScriptMgr::OnPlayerDuelRequest(Player *target, Player *challenger) +void ScriptMgr::OnPlayerDuelRequest(Player* target, Player* challenger) { FOREACH_SCRIPT(PlayerScript)->OnDuelRequest(target, challenger); } @@ -1228,7 +1228,7 @@ void ScriptMgr::OnPlayerDuelStart(Player* player1, Player* player2) FOREACH_SCRIPT(PlayerScript)->OnDuelStart(player1, player2); } -void ScriptMgr::OnPlayerDuelEnd(Player *winner, Player *loser, DuelCompleteType type) +void ScriptMgr::OnPlayerDuelEnd(Player* winner, Player* loser, DuelCompleteType type) { FOREACH_SCRIPT(PlayerScript)->OnDuelEnd(winner, loser, type); } diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 75325b5319b..61d24c949e6 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -69,7 +69,7 @@ struct OutdoorPvPData; #define VISIBLE_RANGE 166.0f //MAX visible range (size of grid) // Generic scripting text function. -void DoScriptText(int32 textEntry, WorldObject* pSource, Unit *pTarget = NULL); +void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* pTarget = NULL); /* TODO: Add more script type classes. diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp index a506218aeb2..9bbf98ce3fc 100755 --- a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp @@ -30,7 +30,7 @@ AddonHandler::~AddonHandler() { } -bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target) +bool AddonHandler::BuildAddonPacket(WorldPacket* Source, WorldPacket* Target) { ByteBuffer AddOnPacked; uLongf AddonRealSize; diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp index 4b6e26e410a..23aa4c7a55a 100755 --- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp @@ -125,12 +125,12 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) recv_data >> buyout; recv_data >> etime; - Player *pl = GetPlayer(); + Player* pl = GetPlayer(); if (!item || !bid || !etime) return; //check for cheaters - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer))); @@ -162,7 +162,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - Item *it = pl->GetItemByGuid(item); + Item* it = pl->GetItemByGuid(item); //do not allow to sell already auctioned items if (sAuctionMgr->GetAItem(GUID_LOPART(item))) { @@ -215,7 +215,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) uint32 auction_time = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME)); - AuctionEntry *AH = new AuctionEntry; + AuctionEntry* AH = new AuctionEntry; AH->Id = sObjectMgr->GenerateAuctionID(); if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION)) AH->auctioneer = 23442; @@ -262,7 +262,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data) if (!auctionId || !price) return; //check for cheaters - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionPlaceBid - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer))); @@ -273,10 +273,10 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data) if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - AuctionHouseObject *auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction()); + AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction()); - AuctionEntry *auction = auctionHouse->GetAuction(auctionId); - Player *pl = GetPlayer(); + AuctionEntry* auction = auctionHouse->GetAuction(auctionId); + Player* pl = GetPlayer(); if (!auction || auction->owner == pl->GetGUIDLow()) { @@ -380,7 +380,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data) recv_data >> auctionId; //sLog->outDebug("Cancel AUCTION AuctionID: %u", auctionId); - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionRemoveItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer))); @@ -393,13 +393,13 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data) AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction()); - AuctionEntry *auction = auctionHouse->GetAuction(auctionId); - Player *pl = GetPlayer(); + AuctionEntry* auction = auctionHouse->GetAuction(auctionId); + Player* pl = GetPlayer(); SQLTransaction trans = CharacterDatabase.BeginTransaction(); if (auction && auction->owner == pl->GetGUIDLow()) { - Item *pItem = sAuctionMgr->GetAItem(auction->item_guidlow); + Item* pItem = sAuctionMgr->GetAItem(auction->item_guidlow); if (pItem) { if (auction->bidder > 0) // If we have a bidder, we have to send him the money he paid @@ -465,7 +465,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data) outbiddedCount = 0; } - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); @@ -479,7 +479,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data) AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction()); WorldPacket data(SMSG_AUCTION_BIDDER_LIST_RESULT, (4+4+4)); - Player *pl = GetPlayer(); + Player* pl = GetPlayer(); data << (uint32) 0; //add 0 as count uint32 count = 0; uint32 totalcount = 0; @@ -488,7 +488,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data) --outbiddedCount; uint32 outbiddedAuctionId; recv_data >> outbiddedAuctionId; - AuctionEntry * auction = auctionHouse->GetAuction(outbiddedAuctionId); + AuctionEntry* auction = auctionHouse->GetAuction(outbiddedAuctionId); if (auction && auction->BuildAuctionInfo(data)) { ++totalcount; @@ -512,7 +512,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data) recv_data >> guid; recv_data >> listfrom; // not used in fact (this list not have page control in client) - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListOwnerItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); @@ -565,7 +565,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data) recv_data.read_skip<uint8>(); } - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp index 5d18e3309a3..69c1cc5edfe 100755 --- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp @@ -78,7 +78,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) uint32 instanceId; uint8 joinAsGroup; bool isPremade = false; - Group * grp = NULL; + Group* grp = NULL; recv_data >> guid; // battlemaster guid recv_data >> bgTypeId_; // battleground type id (DBC id) @@ -110,7 +110,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) return; // get bg instance or bg template if instance not found - Battleground *bg = NULL; + Battleground* bg = NULL; if (instanceId) bg = sBattlegroundMgr->GetBattlegroundThroughClientInstance(instanceId, bgTypeId); @@ -181,7 +181,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) BattlegroundQueue& bgQueue = sBattlegroundMgr->m_BattlegroundQueues[bgQueueTypeId]; - GroupQueueInfo * ginfo = bgQueue.AddGroup(_player, NULL, bgTypeId, bracketEntry, 0, false, isPremade, 0, 0); + GroupQueueInfo* ginfo = bgQueue.AddGroup(_player, NULL, bgTypeId, bracketEntry, 0, false, isPremade, 0, 0); uint32 avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId()); // already checked if queueSlot is valid, now just get it uint32 queueSlot = _player->AddBattlegroundQueueId(bgQueueTypeId); @@ -204,7 +204,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) isPremade = (grp->GetMembersCount() >= bg->GetMinPlayersPerTeam()); BattlegroundQueue& bgQueue = sBattlegroundMgr->m_BattlegroundQueues[bgQueueTypeId]; - GroupQueueInfo * ginfo = NULL; + GroupQueueInfo* ginfo = NULL; uint32 avgTime = 0; if (err > 0) @@ -214,9 +214,9 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId()); } - for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *member = itr->getSource(); + Player* member = itr->getSource(); if (!member) continue; // this should never happen WorldPacket data; @@ -248,7 +248,7 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recv_ { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message"); - Battleground *bg = _player->GetBattleground(); + Battleground* bg = _player->GetBattleground(); if (!bg) // can't be received if player not in battleground return; @@ -389,7 +389,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) return; } - Battleground *bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID, bgTypeId); + Battleground* bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID, bgTypeId); // bg template might and must be used in case of leaving queue, when instance is not created yet if (!bg && action == 0) @@ -456,7 +456,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) bgQueue.RemovePlayer(_player->GetGUID(), false); // this is still needed here if battleground "jumping" shouldn't add deserter debuff // also this is required to prevent stuck at old battleground after SetBattlegroundId set to new - if (Battleground *currentBg = _player->GetBattleground()) + if (Battleground* currentBg = _player->GetBattleground()) currentBg->RemovePlayerAtLeave(_player->GetGUID(), false, true); // set the destination instance id @@ -473,7 +473,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) // if player leaves rated arena match before match start, it is counted as he played but he lost if (ginfo.IsRated && ginfo.IsInvitedToBGInstanceGUID) { - ArenaTeam * at = sArenaTeamMgr->GetArenaTeamById(ginfo.Team); + ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ginfo.Team); if (at) { sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating); @@ -521,7 +521,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/) WorldPacket data; // we must update all queues here - Battleground *bg = NULL; + Battleground* bg = NULL; for (uint8 i = 0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; ++i) { BattlegroundQueueTypeId bgQueueTypeId = _player->GetBattlegroundQueueTypeId(i); @@ -582,7 +582,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY"); - Battleground *bg = _player->GetBattleground(); + Battleground* bg = _player->GetBattleground(); uint64 guid; recv_data >> guid; @@ -602,7 +602,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE"); - Battleground *bg = _player->GetBattleground(); + Battleground* bg = _player->GetBattleground(); uint64 guid; recv_data >> guid; @@ -626,7 +626,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) uint8 arenaslot; // 2v2, 3v3 or 5v5 uint8 asGroup; // asGroup uint8 isRated; // isRated - Group * grp = NULL; + Group* grp = NULL; recv_data >> guid >> arenaslot >> asGroup >> isRated; @@ -710,7 +710,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) { ateamId = _player->GetArenaTeamId(arenaslot); // check real arenateam existence only here (if it was moved to group->CanJoin .. () then we would ahve to get it twice) - ArenaTeam * at = sArenaTeamMgr->GetArenaTeamById(ateamId); + ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ateamId); if (!at) { _player->GetSession()->SendNotInArenaTeamPacket(arenatype); @@ -741,13 +741,13 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) else bg->SetRated(false); - GroupQueueInfo * ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, arenatype, isRated, false, arenaRating, matchmakerRating, ateamId); + GroupQueueInfo* ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, arenatype, isRated, false, arenaRating, matchmakerRating, ateamId); avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId()); } - for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *member = itr->getSource(); + Player* member = itr->getSource(); if (!member) continue; @@ -773,7 +773,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) } else { - GroupQueueInfo * ginfo = bgQueue.AddGroup(_player, NULL, bgTypeId, bracketEntry, arenatype, isRated, false, arenaRating, matchmakerRating, ateamId); + GroupQueueInfo* ginfo = bgQueue.AddGroup(_player, NULL, bgTypeId, bracketEntry, arenatype, isRated, false, arenaRating, matchmakerRating, ateamId); uint32 avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId()); uint32 queueSlot = _player->AddBattlegroundQueueId(bgQueueTypeId); @@ -790,7 +790,7 @@ void WorldSession::HandleReportPvPAFK(WorldPacket & recv_data) { uint64 playerGuid; recv_data >> playerGuid; - Player *reportedPlayer = ObjectAccessor::FindPlayer(playerGuid); + Player* reportedPlayer = ObjectAccessor::FindPlayer(playerGuid); if (!reportedPlayer) { diff --git a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp index 8a56d5f56ad..8f32ac84cb8 100755 --- a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp @@ -71,7 +71,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/) { if (itr->second.perm) { - InstanceSave *save = itr->second.save; + InstanceSave* save = itr->second.save; data << uint32(save->GetMapId()); data << uint32(save->GetDifficulty()); data << uint32(save->GetResetTime() - cur_time); diff --git a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp index e2b5a6b1165..d08e7d9f930 100755 --- a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp @@ -71,7 +71,7 @@ void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket) if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) { - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->Leave(_player->GetGUID(), true); cMgr->LeftChannel(channelname); } @@ -84,7 +84,7 @@ void WorldSession::HandleChannelList(WorldPacket& recvPacket) recvPacket >> channelname; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->List(_player); } @@ -97,7 +97,7 @@ void WorldSession::HandleChannelPassword(WorldPacket& recvPacket) recvPacket >> pass; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->Password(_player->GetGUID(), pass.c_str()); } @@ -113,7 +113,7 @@ void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket) return; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->SetOwner(_player->GetGUID(), newp.c_str()); } @@ -123,7 +123,7 @@ void WorldSession::HandleChannelOwner(WorldPacket& recvPacket) std::string channelname; recvPacket >> channelname; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->SendWhoOwner(_player->GetGUID()); } @@ -139,7 +139,7 @@ void WorldSession::HandleChannelModerator(WorldPacket& recvPacket) return; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->SetModerator(_player->GetGUID(), otp.c_str()); } @@ -155,7 +155,7 @@ void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket) return; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->UnsetModerator(_player->GetGUID(), otp.c_str()); } @@ -171,7 +171,7 @@ void WorldSession::HandleChannelMute(WorldPacket& recvPacket) return; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->SetMute(_player->GetGUID(), otp.c_str()); } @@ -188,7 +188,7 @@ void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket) return; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->UnsetMute(_player->GetGUID(), otp.c_str()); } @@ -204,7 +204,7 @@ void WorldSession::HandleChannelInvite(WorldPacket& recvPacket) return; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->Invite(_player->GetGUID(), otp.c_str()); } @@ -219,7 +219,7 @@ void WorldSession::HandleChannelKick(WorldPacket& recvPacket) return; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->Kick(_player->GetGUID(), otp.c_str()); } @@ -235,7 +235,7 @@ void WorldSession::HandleChannelBan(WorldPacket& recvPacket) return; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->Ban(_player->GetGUID(), otp.c_str()); } @@ -252,7 +252,7 @@ void WorldSession::HandleChannelUnban(WorldPacket& recvPacket) return; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->UnBan(_player->GetGUID(), otp.c_str()); } @@ -262,7 +262,7 @@ void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket) std::string channelname; recvPacket >> channelname; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->Announce(_player->GetGUID()); } @@ -279,7 +279,7 @@ void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket) recvPacket >> channelname; if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) { - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) { WorldPacket data(SMSG_CHANNEL_MEMBER_COUNT, chn->GetName().size()+1+1+4); data << chn->GetName(); @@ -296,7 +296,7 @@ void WorldSession::HandleSetChannelWatch(WorldPacket &recvPacket) std::string channelname; recvPacket >> channelname; /*if (ChannelMgr* cMgr = channelMgr(_player->GetTeam())) - if (Channel *chn = cMgr->GetChannel(channelname, _player)) + if (Channel* chn = cMgr->GetChannel(channelname, _player)) chn->JoinNotify(_player->GetGUID());*/ } diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index 05bb5e7d411..8cd2484bfa2 100755 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -444,7 +444,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte uint16 acctCharCount = 0; if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); // SELECT SUM(x) is MYSQL_TYPE_NEWDECIMAL - needs to be read as string const char* ch = fields[0].GetCString(); if (ch) @@ -478,7 +478,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte { if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); createInfo->CharCount = fields[0].GetUInt8(); if (createInfo->CharCount >= sWorld->getIntConfig(CONFIG_CHARACTERS_PER_REALM)) @@ -728,7 +728,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data) QueryResult result = CharacterDatabase.PQuery("SELECT account, name FROM characters WHERE guid='%u'", GUID_LOPART(guid)); if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); accountId = fields[0].GetUInt32(); name = fields[1].GetString(); } @@ -868,7 +868,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder) sLog->outStaticDebug("WORLD: Sent server info"); } - //QueryResult *result = CharacterDatabase.PQuery("SELECT guildid, rank FROM guild_member WHERE guid = '%u'", pCurrChar->GetGUIDLow()); + //QueryResult* result = CharacterDatabase.PQuery("SELECT guildid, rank FROM guild_member WHERE guid = '%u'", pCurrChar->GetGUIDLow()); if (PreparedQueryResult resultGuild = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADGUILD)) { Field* fields = resultGuild->Fetch(); @@ -1325,7 +1325,7 @@ void WorldSession::HandleRemoveGlyph(WorldPacket & recv_data) if (uint32 glyph = _player->GetGlyph(slot)) { - if (GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyph)) + if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) { _player->RemoveAurasDueToSpell(gp->SpellId); _player->SetGlyph(slot, 0); @@ -1354,7 +1354,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data) return; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 at_loginFlags = fields[0].GetUInt16(); if (!(at_loginFlags & AT_LOGIN_CUSTOMIZE)) @@ -1458,7 +1458,7 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data) uint64 itemGuid; recv_data.readPackGUID(itemGuid); - Item *item = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* item = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (!item && itemGuid) // cheating check 1 return; @@ -1499,13 +1499,13 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data) sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot); - Item *item = _player->GetItemByGuid(itemGuid); + Item* item = _player->GetItemByGuid(itemGuid); uint16 dstpos = i | (INVENTORY_SLOT_BAG_0 << 8); if (!item) { - Item *uItem = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i); + Item* uItem = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (!uItem) continue; @@ -1553,7 +1553,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) return; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 playerClass = fields[0].GetUInt32(); uint32 level = fields[1].GetUInt32(); uint32 at_loginFlags = fields[2].GetUInt16(); diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp index 4f4c6ea700b..cd80331069c 100755 --- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp @@ -543,7 +543,7 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recv_data) sScriptMgr->OnPlayerTextEmote(GetPlayer(), text_emote, emoteNum, guid); - EmotesTextEntry const *em = sEmotesTextStore.LookupEntry(text_emote); + EmotesTextEntry const* em = sEmotesTextStore.LookupEntry(text_emote); if (!em) return; diff --git a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp b/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp index f2840d4c73f..5941d15d2c7 100755 --- a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp @@ -31,7 +31,7 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket & recv_data) sLog->outStaticDebug("WORLD: Recvd CMSG_ATTACKSWING Message guidlow:%u guidhigh:%u", GUID_LOPART(guid), GUID_HIPART(guid)); - Unit *pEnemy = ObjectAccessor::GetUnit(*_player, guid); + Unit* pEnemy = ObjectAccessor::GetUnit(*_player, guid); if (!pEnemy) { diff --git a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp index fe671565aaf..48bc305ce30 100755 --- a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp @@ -27,8 +27,8 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket) { uint64 guid; - Player *pl; - Player *plTarget; + Player* pl; + Player* plTarget; recvPacket >> guid; diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp index d7eb9318189..57a54bd440f 100755 --- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp @@ -252,7 +252,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recv_data*/) if (!group) return; // Remember leader if online (group pointer will be invalid if group gets disbanded) - Player *leader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()); + Player* leader = ObjectAccessor::FindPlayer(group->GetLeaderGUID()); // uninvite, group can be deleted GetPlayer()->UninviteFromGroup(); @@ -384,7 +384,7 @@ void WorldSession::HandleGroupDisbandOpcode(WorldPacket & /*recv_data*/) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_DISBAND"); - Group *grp = GetPlayer()->GetGroup(); + Group* grp = GetPlayer()->GetGroup(); if (!grp) return; @@ -708,7 +708,7 @@ void WorldSession::HandleRaidReadyCheckFinishedOpcode(WorldPacket & /*recv_data* // Is any reaction need? } -void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacket *data) +void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacket* data) { uint32 mask = player->GetGroupUpdateFlag(); @@ -783,7 +783,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke } } - Pet *pet = player->GetPet(); + Pet* pet = player->GetPet(); if (mask & GROUP_UPDATE_FLAG_PET_GUID) { if (pet) @@ -896,7 +896,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data) return; } - Pet *pet = player->GetPet(); + Pet* pet = player->GetPet(); WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 4+2+2+2+1+2*6+8+1+8); data << uint8(0); // only for SMSG_PARTY_MEMBER_STATS_FULL, probably arena/bg related diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp index e114972661f..9e18e25f8f7 100755 --- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp @@ -148,7 +148,7 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recv_data) recv_data >> srcbag >> srcslot; //sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot); - Item *pSrcItem = _player->GetItemByPos(srcbag, srcslot); + Item* pSrcItem = _player->GetItemByPos(srcbag, srcslot); if (!pSrcItem) return; // only at cheat @@ -164,7 +164,7 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recv_data) if (dest == src) // prevent equip in same slot, only at cheat return; - Item *pDstItem = _player->GetItemByPos(dest); + Item* pDstItem = _player->GetItemByPos(dest); if (!pDstItem) // empty slot, simple case { _player->RemoveItem(srcbag, srcslot, true); @@ -255,7 +255,7 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket & recv_data) } } - Item *pItem = _player->GetItemByPos(bag, slot); + Item* pItem = _player->GetItemByPos(bag, slot); if (!pItem) { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); @@ -286,7 +286,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data) sLog->outDetail("STORAGE: Item Query = %u", item); - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item); if (pProto) { std::string Name = pProto->Name1; @@ -295,7 +295,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data) int loc_idx = GetSessionDbLocaleIndex(); if (loc_idx >= 0) { - if (ItemLocale const *il = sObjectMgr->GetItemLocale(pProto->ItemId)) + if (ItemLocale const* il = sObjectMgr->GetItemLocale(pProto->ItemId)) { ObjectMgr::GetLocaleString(il->Name, loc_idx, Name); ObjectMgr::GetLocaleString(il->Description, loc_idx, Description); @@ -445,7 +445,7 @@ void WorldSession::HandleReadItem(WorldPacket & recv_data) recv_data >> bag >> slot; //sLog->outDetail("STORAGE: Read bag = %u, slot = %u", bag, slot); - Item *pItem = _player->GetItemByPos(bag, slot); + Item* pItem = _player->GetItemByPos(bag, slot); if (pItem && pItem->GetTemplate()->PageText) { @@ -494,7 +494,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data) if (!itemguid) return; - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid))); @@ -506,7 +506,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data) if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - Item *pItem = _player->GetItemByGuid(itemguid); + Item* pItem = _player->GetItemByGuid(itemguid); if (pItem) { // prevent sell not owner item @@ -551,14 +551,14 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data) } } - ItemTemplate const *pProto = pItem->GetTemplate(); + ItemTemplate const* pProto = pItem->GetTemplate(); if (pProto) { if (pProto->SellPrice > 0) { if (count < pItem->GetCount()) // need split items { - Item *pNewItem = pItem->CloneItem(count, _player); + Item* pNewItem = pItem->CloneItem(count, _player); if (!pNewItem) { sLog->outError("WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), count); @@ -605,7 +605,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data) recv_data >> vendorguid >> slot; - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid))); @@ -617,7 +617,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data) if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - Item *pItem = _player->GetItemFromBuyBackSlot(slot); + Item* pItem = _player->GetItemFromBuyBackSlot(slot); if (pItem) { uint32 price = _player->GetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + slot - BUYBACK_SLOT_START); @@ -815,7 +815,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket & recv_data) recv_data >> srcbag >> srcslot >> dstbag; //sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u", srcbag, srcslot, dstbag); - Item *pItem = _player->GetItemByPos(srcbag, srcslot); + Item* pItem = _player->GetItemByPos(srcbag, srcslot); if (!pItem) return; @@ -867,7 +867,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket) // cheating protection /* not critical if "cheated", and check skip allow by slots in bank windows open by .bank command. - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER); if (!pCreature) { sLog->outDebug("WORLD: HandleBuyBankSlotOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); @@ -919,7 +919,7 @@ void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket) recvPacket >> srcbag >> srcslot; sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot); - Item *pItem = _player->GetItemByPos(srcbag, srcslot); + Item* pItem = _player->GetItemByPos(srcbag, srcslot); if (!pItem) return; @@ -949,7 +949,7 @@ void WorldSession::HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket) recvPacket >> srcbag >> srcslot; sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot); - Item *pItem = _player->GetItemByPos(srcbag, srcslot); + Item* pItem = _player->GetItemByPos(srcbag, srcslot); if (!pItem) return; @@ -1029,13 +1029,13 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data) recv_data.read_skip<uint64>(); // guid sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_NAME_QUERY %u", itemid); - ItemSetNameEntry const *pName = sObjectMgr->GetItemSetNameEntry(itemid); + ItemSetNameEntry const* pName = sObjectMgr->GetItemSetNameEntry(itemid); if (pName) { std::string Name = pName->name; int loc_idx = GetSessionDbLocaleIndex(); if (loc_idx >= 0) - if (ItemSetNameLocale const *isnl = sObjectMgr->GetItemSetNameLocale(itemid)) + if (ItemSetNameLocale const* isnl = sObjectMgr->GetItemSetNameLocale(itemid)) ObjectMgr::GetLocaleString(isnl->Name, loc_idx, Name); WorldPacket data(SMSG_ITEM_NAME_QUERY_RESPONSE, (4+Name.size()+1+4)); @@ -1057,7 +1057,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data) sLog->outDebug(LOG_FILTER_NETWORKIO, "WRAP: receive gift_bag = %u, gift_slot = %u, item_bag = %u, item_slot = %u", gift_bag, gift_slot, item_bag, item_slot); - Item *gift = _player->GetItemByPos(gift_bag, gift_slot); + Item* gift = _player->GetItemByPos(gift_bag, gift_slot); if (!gift) { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, NULL); @@ -1070,7 +1070,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data) return; } - Item *item = _player->GetItemByPos(item_bag, item_slot); + Item* item = _player->GetItemByPos(item_bag, item_slot); if (!item) { @@ -1169,7 +1169,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data) (gem_guids[1] && (gem_guids[1] == gem_guids[2]))) return; - Item *itemTarget = _player->GetItemByGuid(item_guid); + Item* itemTarget = _player->GetItemByGuid(item_guid); if (!itemTarget) //missing item to socket return; @@ -1180,11 +1180,11 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data) //this slot is excepted when applying / removing meta gem bonus uint8 slot = itemTarget->IsEquipped() ? itemTarget->GetSlot() : uint8(NULL_SLOT); - Item *Gems[MAX_GEM_SOCKETS]; + Item* Gems[MAX_GEM_SOCKETS]; for (int i = 0; i < MAX_GEM_SOCKETS; ++i) Gems[i] = gem_guids[i] ? _player->GetItemByGuid(gem_guids[i]) : NULL; - GemPropertiesEntry const *GemProps[MAX_GEM_SOCKETS]; + GemPropertiesEntry const* GemProps[MAX_GEM_SOCKETS]; for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get geminfo from dbc storage GemProps[i] = (Gems[i]) ? sGemPropertiesStore.LookupEntry(Gems[i]->GetTemplate()->GemProperties) : NULL; @@ -1375,7 +1375,7 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data) uint64 guid; recv_data >> guid; // item guid - Item *item = _player->GetItemByGuid(guid); + Item* item = _player->GetItemByGuid(guid); if (!item) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Item refund: item not found!"); @@ -1391,7 +1391,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data) uint64 guid; recv_data >> guid; // item guid - Item *item = _player->GetItemByGuid(guid); + Item* item = _player->GetItemByGuid(guid); if (!item) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Item refund: item not found!"); @@ -1415,7 +1415,7 @@ void WorldSession::HandleItemTextQuery(WorldPacket & recv_data ) WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, (4+10)); // guess size - if (Item *item = _player->GetItemByGuid(itemGuid)) + if (Item* item = _player->GetItemByGuid(itemGuid)) { data << uint8(0); // has text data << uint64(itemGuid); // item guid diff --git a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp index 7caf8f9ef07..a3edcd3f827 100755 --- a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp @@ -42,7 +42,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data) if (IS_GAMEOBJECT_GUID(lguid)) { - GameObject *go = player->GetMap()->GetGameObject(lguid); + GameObject* go = player->GetMap()->GetGameObject(lguid); // not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player, INTERACTION_DISTANCE))) @@ -55,7 +55,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data) } else if (IS_ITEM_GUID(lguid)) { - Item *pItem = player->GetItemByGuid(lguid); + Item* pItem = player->GetItemByGuid(lguid); if (!pItem) { @@ -67,7 +67,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data) } else if (IS_CORPSE_GUID(lguid)) { - Corpse *bones = ObjectAccessor::GetCorpse(*player, lguid); + Corpse* bones = ObjectAccessor::GetCorpse(*player, lguid); if (!bones) { player->SendLootRelease(lguid); @@ -247,7 +247,7 @@ void WorldSession::DoLootRelease(uint64 lguid) if (IS_GAMEOBJECT_GUID(lguid)) { - GameObject *go = GetPlayer()->GetMap()->GetGameObject(lguid); + GameObject* go = GetPlayer()->GetMap()->GetGameObject(lguid); // not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player, INTERACTION_DISTANCE))) @@ -285,7 +285,7 @@ void WorldSession::DoLootRelease(uint64 lguid) float chance_rate = sWorld->getRate(RATE_MINING_NEXT); int32 ReqValue = 175; - LockEntry const *lockInfo = sLockStore.LookupEntry(go->GetGOInfo()->chest.lockId); + LockEntry const* lockInfo = sLockStore.LookupEntry(go->GetGOInfo()->chest.lockId); if (lockInfo) ReqValue = lockInfo->Skill[0]; float skill = float(player->GetSkillValue(SKILL_MINING))/(ReqValue+25); @@ -343,7 +343,7 @@ void WorldSession::DoLootRelease(uint64 lguid) } else if (IS_CORPSE_GUID(lguid)) // ONLY remove insignia at BG { - Corpse *corpse = ObjectAccessor::GetCorpse(*player, lguid); + Corpse* corpse = ObjectAccessor::GetCorpse(*player, lguid); if (!corpse || !corpse->IsWithinDistInMap(_player, INTERACTION_DISTANCE)) return; @@ -357,7 +357,7 @@ void WorldSession::DoLootRelease(uint64 lguid) } else if (IS_ITEM_GUID(lguid)) { - Item *pItem = player->GetItemByGuid(lguid); + Item* pItem = player->GetItemByGuid(lguid); if (!pItem) return; @@ -439,7 +439,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data) return; } - Player *target = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(target_playerguid, 0, HIGHGUID_PLAYER)); + Player* target = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(target_playerguid, 0, HIGHGUID_PLAYER)); if (!target) return; @@ -448,11 +448,11 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data) if (_player->GetLootGUID() != lootguid) return; - Loot *pLoot = NULL; + Loot* pLoot = NULL; if (IS_CRE_OR_VEH_GUID(GetPlayer()->GetLootGUID())) { - Creature *pCreature = GetPlayer()->GetMap()->GetCreature(lootguid); + Creature* pCreature = GetPlayer()->GetMap()->GetCreature(lootguid); if (!pCreature) return; @@ -460,7 +460,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data) } else if (IS_GAMEOBJECT_GUID(GetPlayer()->GetLootGUID())) { - GameObject *pGO = GetPlayer()->GetMap()->GetGameObject(lootguid); + GameObject* pGO = GetPlayer()->GetMap()->GetGameObject(lootguid); if (!pGO) return; diff --git a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp index ffaa846767e..564478e75b9 100755 --- a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp @@ -113,7 +113,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data) return; } - Player *receive = ObjectAccessor::FindPlayer(rc); + Player* receive = ObjectAccessor::FindPlayer(rc); uint32 rc_team = 0; uint8 mails_count = 0; //do not allow to send to one player more than 100 mails @@ -130,12 +130,12 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data) rc_team = sObjectMgr->GetPlayerTeamByGUID(rc); if (QueryResult result = CharacterDatabase.PQuery("SELECT COUNT(*) FROM mail WHERE receiver = '%u'", GUID_LOPART(rc))) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); mails_count = fields[0].GetUInt32(); } if (QueryResult result = CharacterDatabase.PQuery("SELECT level FROM characters WHERE guid = '%u'", GUID_LOPART(rc))) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); receiveLevel = fields[0].GetUInt8(); } } @@ -298,8 +298,8 @@ void WorldSession::HandleMailMarkAsRead(WorldPacket & recv_data) if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX)) return; - Player *pl = _player; - Mail *m = pl->GetMail(mailId); + Player* pl = _player; + Mail* m = pl->GetMail(mailId); if (m) { if (pl->unReadMails) @@ -322,7 +322,7 @@ void WorldSession::HandleMailDelete(WorldPacket & recv_data) if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX)) return; - Mail *m = _player->GetMail(mailId); + Mail* m = _player->GetMail(mailId); Player* pl = _player; pl->m_mailsUpdated = true; if (m) @@ -350,8 +350,8 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data) if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX)) return; - Player *pl = _player; - Mail *m = pl->GetMail(mailId); + Player* pl = _player; + Mail* m = pl->GetMail(mailId); if (!m || m->state == MAIL_STATE_DELETED || m->deliver_time > time(NULL)) { pl->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR); @@ -375,7 +375,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data) { for (MailItemInfoVec::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2) { - Item *item = pl->GetMItem(itr2->item_guid); + Item* item = pl->GetMItem(itr2->item_guid); if (item) draft.AddItem(item); else @@ -424,7 +424,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data) return; } - Item *it = pl->GetMItem(itemId); + Item* it = pl->GetMItem(itemId); ItemPosCountVec dest; uint8 msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, it, false); @@ -437,7 +437,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data) if (m->COD > 0) //if there is COD, take COD money from player and send them to sender by mail { uint64 sender_guid = MAKE_NEW_GUID(m->sender, 0, HIGHGUID_PLAYER); - Player *receive = ObjectAccessor::FindPlayer(sender_guid); + Player* receive = ObjectAccessor::FindPlayer(sender_guid); uint32 sender_accId = 0; @@ -501,7 +501,7 @@ void WorldSession::HandleMailTakeMoney(WorldPacket & recv_data) if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX)) return; - Player *pl = _player; + Player* pl = _player; Mail* m = pl->GetMail(mailId); if (!m || m->state == MAIL_STATE_DELETED || m->deliver_time > time(NULL)) @@ -605,7 +605,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data) for (uint8 i = 0; i < item_count; ++i) { - Item *item = pl->GetMItem((*itr)->items[i].item_guid); + Item* item = pl->GetMItem((*itr)->items[i].item_guid); // item index (0-6?) data << uint8(i); // item guid low? @@ -658,7 +658,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data) if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX)) return; - Player *pl = _player; + Player* pl = _player; Mail* m = pl->GetMail(mailId); if (!m || (m->body.empty() && !m->mailTemplateId) || m->state == MAIL_STATE_DELETED || m->deliver_time > time(NULL)) @@ -667,7 +667,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data) return; } - Item *bodyItem = new Item; // This is not bag and then can be used new Item. + Item* bodyItem = new Item; // This is not bag and then can be used new Item. if (!bodyItem->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), MAIL_BODY_ITEM_TEMPLATE, pl)) { delete bodyItem; @@ -729,7 +729,7 @@ void WorldSession::HandleQueryNextMailTime(WorldPacket & /*recv_data*/) time_t now = time(NULL); for (PlayerMails::iterator itr = _player->GetMailBegin(); itr != _player->GetMailEnd(); ++itr) { - Mail *m = (*itr); + Mail* m = (*itr); // must be not checked yet if (m->checked & MAIL_CHECK_MASK_READ) continue; diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index da6edc34832..df8e047c825 100755 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -96,7 +96,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) recv_data >> code; Creature* unit = NULL; - GameObject *go = NULL; + GameObject* go = NULL; if (IS_CRE_OR_VEH_GUID(guid)) { unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); @@ -474,7 +474,7 @@ void WorldSession::HandleTogglePvP(WorldPacket & recv_data) GetPlayer()->pvpInfo.endTimer = time(NULL); // start toggle-off } - //if (OutdoorPvP * pvp = _player->GetOutdoorPvP()) + //if (OutdoorPvP* pvp = _player->GetOutdoorPvP()) // pvp->HandlePlayerActivityChanged(_player); } @@ -729,7 +729,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data) if (!GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) return; - Corpse *corpse = GetPlayer()->GetCorpse(); + Corpse* corpse = GetPlayer()->GetCorpse(); if (!corpse) return; @@ -905,7 +905,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data) return; } - if (OutdoorPvP * pvp = GetPlayer()->GetOutdoorPvP()) + if (OutdoorPvP* pvp = GetPlayer()->GetOutdoorPvP()) { if (pvp->HandleAreaTrigger(_player, Trigger_ID)) return; @@ -997,7 +997,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data) if (type > NUM_ACCOUNT_DATA_TYPES) return; - AccountData *adata = GetAccountData(AccountDataType(type)); + AccountData* adata = GetAccountData(AccountDataType(type)); uint32 size = adata->Data.size(); @@ -1201,7 +1201,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data) _player->SetSelection(guid); - Player *plr = ObjectAccessor::FindPlayer(guid); + Player* plr = ObjectAccessor::FindPlayer(guid); if (!plr) // wrong player return; @@ -1302,7 +1302,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data) return; } - Player *plr = sObjectAccessor->FindPlayerByName(charname.c_str()); + Player* plr = sObjectAccessor->FindPlayerByName(charname.c_str()); if (!plr) { @@ -1319,7 +1319,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data) return; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); std::string acc = fields[0].GetString(); if (acc.empty()) acc = "Unknown"; @@ -1414,7 +1414,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data) break; case 1: sLog->outDebug(LOG_FILTER_NETWORKIO, "Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow()); - if (WorldObject *target = _player->GetViewpoint()) + if (WorldObject* target = _player->GetViewpoint()) _player->SetSeer(target); else sLog->outError("Player %s requests non-existing seer " UI64FMTD, _player->GetName(), _player->GetUInt64Value(PLAYER_FARSIGHT)); @@ -1469,7 +1469,7 @@ void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data) void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_RESET_INSTANCES"); - Group *pGroup = _player->GetGroup(); + Group* pGroup = _player->GetGroup(); if (pGroup) { if (pGroup->IsLeader(_player->GetGUID())) @@ -1502,19 +1502,19 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) return; // cannot reset while in an instance - Map *map = _player->GetMap(); + Map* map = _player->GetMap(); if (map && map->IsDungeon()) { sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!", _player->GetName(), _player->GetGUIDLow()); return; } - Group *pGroup = _player->GetGroup(); + Group* pGroup = _player->GetGroup(); if (pGroup) { if (pGroup->IsLeader(_player->GetGUID())) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupGuy = itr->getSource(); if (!pGroupGuy) @@ -1557,7 +1557,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) } // cannot reset while in an instance - Map *map = _player->GetMap(); + Map* map = _player->GetMap(); if (map && map->IsDungeon()) { sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); @@ -1567,12 +1567,12 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) if (Difficulty(mode) == _player->GetRaidDifficulty()) return; - Group *pGroup = _player->GetGroup(); + Group* pGroup = _player->GetGroup(); if (pGroup) { if (pGroup->IsLeader(_player->GetGUID())) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupGuy = itr->getSource(); if (!pGroupGuy) @@ -1699,7 +1699,7 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recv_data*/) if (_player->isInFlight()) return; - AreaTableEntry const *atEntry = GetAreaEntryByAreaID(_player->GetAreaId()); + AreaTableEntry const* atEntry = GetAreaEntryByAreaID(_player->GetAreaId()); if (!atEntry || !(atEntry->flags & AREA_FLAG_WINTERGRASP_2)) return; diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp index 6bcad1ce106..c8c7e882046 100755 --- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp @@ -63,7 +63,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() if (GetPlayer()->m_InstanceValid == false && !mInstance) GetPlayer()->m_InstanceValid = true; - Map * oldMap = GetPlayer()->GetMap(); + Map* oldMap = GetPlayer()->GetMap(); ASSERT(oldMap); if (GetPlayer()->IsInWorld()) { @@ -72,7 +72,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() } // relocate the player to the teleport destination - Map * newMap = sMapMgr->CreateMap(loc.GetMapId(), GetPlayer(), 0); + Map* newMap = sMapMgr->CreateMap(loc.GetMapId(), GetPlayer(), 0); // the CanEnter checks are done in TeleporTo but conditions may change // while the player is in transit, for example the map may get full if (!newMap || !newMap->CanEnter(GetPlayer())) @@ -110,7 +110,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() _player->SetBGTeam(0); } // join to bg case - else if (Battleground *bg = _player->GetBattleground()) + else if (Battleground* bg = _player->GetBattleground()) { if (_player->IsInvitedForBattlegroundInstance(_player->GetBattlegroundId())) bg->AddPlayer(_player); @@ -136,7 +136,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() } // resurrect character at enter into instance where his corpse exist after add to map - Corpse *corpse = GetPlayer()->GetCorpse(); + Corpse* corpse = GetPlayer()->GetCorpse(); if (corpse && corpse->GetType() != CORPSE_BONES && corpse->GetMapId() == GetPlayer()->GetMapId()) { if (mEntry->IsDungeon()) @@ -200,8 +200,8 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data) sLog->outStaticDebug("Guid " UI64FMTD, guid); sLog->outStaticDebug("Flags %u, time %u", flags, time/IN_MILLISECONDS); - Unit *mover = _player->m_mover; - Player *plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL; + Unit* mover = _player->m_mover; + Player* plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL; if (!plMover || !plMover->IsBeingTeleportedNear()) return; @@ -244,11 +244,11 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data) { uint16 opcode = recv_data.GetOpcode(); - Unit *mover = _player->m_mover; + Unit* mover = _player->m_mover; ASSERT(mover != NULL); // there must always be a mover - Player *plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL; + Player* plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL; // ignore, waiting processing in WorldSession::HandleMoveWorldportAckOpcode and WorldSession::HandleMoveTeleportAck if (plMover && plMover->IsBeingTeleported()) @@ -313,7 +313,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data) if (!mover->GetTransport() && !mover->GetVehicle()) { - GameObject *go = mover->GetMap()->GetGameObject(movementInfo.t_guid); + GameObject* go = mover->GetMap()->GetGameObject(movementInfo.t_guid); if (!go || go->GetGoType() != GAMEOBJECT_TYPE_TRANSPORT) movementInfo.flags &= ~MOVEMENTFLAG_ONTRANSPORT; } @@ -478,7 +478,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) if (GetPlayer()->IsInWorld()) { - if (Unit *mover = ObjectAccessor::GetUnit(*GetPlayer(), guid)) + if (Unit* mover = ObjectAccessor::GetUnit(*GetPlayer(), guid)) { GetPlayer()->SetMover(mover); if (mover != GetPlayer() && mover->canFly()) diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp index ef72d8ab5ba..a675214930a 100755 --- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp @@ -135,7 +135,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle) if (!unit->isCanTrainingOf(_player, true)) return; - CreatureTemplate const *ci = unit->GetCreatureInfo(); + CreatureTemplate const* ci = unit->GetCreatureInfo(); if (!ci) { @@ -325,7 +325,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data) // If spiritguide, no need for gossip menu, just put player into resurrect queue if (unit->isSpiritGuide()) { - Battleground *bg = _player->GetBattleground(); + Battleground* bg = _player->GetBattleground(); if (bg) { bg->AddPlayerToResurrectQueue(unit->GetGUID(), _player->GetGUID()); @@ -413,8 +413,8 @@ void WorldSession::SendSpiritResurrect() _player->DurabilityLossAll(0.25f, true); // get corpse nearest graveyard - WorldSafeLocsEntry const *corpseGrave = NULL; - Corpse *corpse = _player->GetCorpse(); + WorldSafeLocsEntry const* corpseGrave = NULL; + Corpse* corpse = _player->GetCorpse(); if (corpse) corpseGrave = sObjectMgr->GetClosestGraveYard( corpse->GetPositionX(), corpse->GetPositionY(), corpse->GetPositionZ(), corpse->GetMapId(), _player->GetTeam()); @@ -425,7 +425,7 @@ void WorldSession::SendSpiritResurrect() // teleport to nearest from corpse graveyard, if different from nearest to player ghost if (corpseGrave) { - WorldSafeLocsEntry const *ghostGrave = sObjectMgr->GetClosestGraveYard( + WorldSafeLocsEntry const* ghostGrave = sObjectMgr->GetClosestGraveYard( _player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), _player->GetMapId(), _player->GetTeam()); if (corpseGrave != ghostGrave) @@ -461,7 +461,7 @@ void WorldSession::HandleBinderActivateOpcode(WorldPacket & recv_data) SendBindPoint(unit); } -void WorldSession::SendBindPoint(Creature *npc) +void WorldSession::SendBindPoint(Creature* npc) { // prevent set homebind to instances in any case if (GetPlayer()->GetMap()->Instanceable()) @@ -537,7 +537,7 @@ void WorldSession::SendStablePetCallback(QueryResult result, uint64 guid) data << uint64 (guid); - Pet *pet = _player->GetPet(); + Pet* pet = _player->GetPet(); size_t wpos = data.wpos(); data << uint8(0); // place holder for slot show number @@ -561,7 +561,7 @@ void WorldSession::SendStablePetCallback(QueryResult result, uint64 guid) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); data << uint32(fields[1].GetUInt32()); // petnumber data << uint32(fields[2].GetUInt32()); // creature entry @@ -609,7 +609,7 @@ void WorldSession::HandleStablePet(WorldPacket & recv_data) if (GetPlayer()->HasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - Pet *pet = _player->GetPet(); + Pet* pet = _player->GetPet(); // can't place in stable dead pet if (!pet||!pet->isAlive()||pet->getPetType() != HUNTER_PET) @@ -633,7 +633,7 @@ void WorldSession::HandleStablePetCallback(QueryResult result) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 slot = fields[1].GetUInt32(); @@ -690,7 +690,7 @@ void WorldSession::HandleUnstablePetCallback(QueryResult result, uint32 petnumbe uint32 creature_id = 0; if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); creature_id = fields[0].GetUInt32(); } @@ -722,7 +722,7 @@ void WorldSession::HandleUnstablePetCallback(QueryResult result, uint32 petnumbe if (pet) _player->RemovePet(pet, PET_SAVE_AS_DELETED); - Pet *newpet = new Pet(_player, HUNTER_PET); + Pet* newpet = new Pet(_player, HUNTER_PET); if (!newpet->LoadPetFromDB(_player, creature_id, petnumber)) { delete newpet; @@ -753,7 +753,7 @@ void WorldSession::HandleBuyStableSlot(WorldPacket & recv_data) if (GetPlayer()->m_stableSlots < MAX_PET_STABLES) { - StableSlotPricesEntry const *SlotPrice = sStableSlotPricesStore.LookupEntry(GetPlayer()->m_stableSlots+1); + StableSlotPricesEntry const* SlotPrice = sStableSlotPricesStore.LookupEntry(GetPlayer()->m_stableSlots+1); if (_player->HasEnoughMoney(SlotPrice->Price)) { ++GetPlayer()->m_stableSlots; @@ -817,7 +817,7 @@ void WorldSession::HandleStableSwapPetCallback(QueryResult result, uint32 petnum return; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 slot = fields[0].GetUInt8(); uint32 creature_id = fields[1].GetUInt32(); @@ -845,7 +845,7 @@ void WorldSession::HandleStableSwapPetCallback(QueryResult result, uint32 petnum _player->RemovePet(pet, pet->isAlive() ? PetSaveMode(slot) : PET_SAVE_AS_DELETED); // summon unstabled pet - Pet *newpet = new Pet(_player); + Pet* newpet = new Pet(_player); if (!newpet->LoadPetFromDB(_player, creature_id, petnumber)) { delete newpet; diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp index f763d5bc966..b5c0744d7d4 100755 --- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp @@ -137,9 +137,9 @@ void WorldSession::HandlePetStopAttack(WorldPacket &recv_data) pet->AttackStop(); } -void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2) +void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2) { - CharmInfo *charmInfo = pet->GetCharmInfo(); + CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { sLog->outError("WorldSession::HandlePetAction(petGuid: " UI64FMTD ", tagGuid: " UI64FMTD ", spellId: %u, flag: %u): object (entry: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", @@ -186,11 +186,11 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid } // only place where pet can be player - Unit *TargetUnit = ObjectAccessor::GetUnit(*_player, guid2); + Unit* TargetUnit = ObjectAccessor::GetUnit(*_player, guid2); if (!TargetUnit) return; - if (Unit *owner = pet->GetOwner()) + if (Unit* owner = pet->GetOwner()) if (!owner->canAttack(TargetUnit)) return; @@ -289,7 +289,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid unit_target = ObjectAccessor::GetUnit(*_player, guid2); // do not cast unknown spells - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellid); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); if (!spellInfo) { sLog->outError("WORLD: unknown PET spell id %i", spellid); @@ -333,7 +333,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid if (unit_target->GetTypeId() == TYPEID_PLAYER) pet->SendUpdateToPlayer((Player*)unit_target); } - else if (Unit *unit_target2 = spell->m_targets.GetUnitTarget()) + else if (Unit* unit_target2 = spell->m_targets.GetUnitTarget()) { pet->SetInFront(unit_target2); if (unit_target2->GetTypeId() == TYPEID_PLAYER) @@ -485,7 +485,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data) return; } - CharmInfo *charmInfo = pet->GetCharmInfo(); + CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { sLog->outError("WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); @@ -620,7 +620,7 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data) pet->SetName(name); - Unit *owner = pet->GetOwner(); + Unit* owner = pet->GetOwner(); if (owner && (owner->GetTypeId() == TYPEID_PLAYER) && owner->ToPlayer()->GetGroup()) owner->ToPlayer()->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_NAME); @@ -714,7 +714,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket) if (!pet->HasSpell(spellid) || spellInfo->IsAutocastable()) return; - CharmInfo *charmInfo = pet->GetCharmInfo(); + CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { sLog->outError("WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); @@ -754,7 +754,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) return; } - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { sLog->outError("WORLD: unknown PET spell id %i", spellId); diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp index 51286eee8f8..80cb3eda484 100755 --- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp @@ -90,7 +90,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) sLog->outDebug(LOG_FILTER_NETWORKIO, "Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str()); // prevent cheating - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC, UNIT_NPC_FLAG_PETITIONER); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC, UNIT_NPC_FLAG_PETITIONER); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC)); @@ -180,7 +180,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) } } - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(charterid); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(charterid); if (!pProto) { _player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, NULL, charterid, 0); @@ -202,7 +202,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) } _player->ModifyMoney(-(int32)cost); - Item *charter = _player->StoreNewItem(dest, charterid, true); + Item* charter = _player->StoreNewItem(dest, charterid, true); if (!charter) return; @@ -223,7 +223,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); ssInvalidPetitionGUIDs << '\'' << fields[0].GetUInt32() << "' , "; } while (result->NextRow()); } @@ -259,7 +259,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data) sLog->outError("Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName()); return; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 type = fields[0].GetUInt8(); // if guild petition and has guild => error, return; @@ -282,7 +282,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data) for (uint8 i = 1; i <= signs; ++i) { - Field *fields2 = result->Fetch(); + Field* fields2 = result->Fetch(); uint64 plguid = fields2[0].GetUInt64(); data << uint64(plguid); // Player GUID @@ -383,7 +383,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data) recv_data >> petitionguid; // guid recv_data >> newname; // new name - Item *item = _player->GetItemByGuid(petitionguid); + Item* item = _player->GetItemByGuid(petitionguid); if (!item) return; @@ -443,7 +443,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data) { sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SIGN"); // ok - Field *fields; + Field* fields; uint64 petitionguid; uint8 unk; recv_data >> petitionguid; // petition guid @@ -536,7 +536,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data) SendPacket(&data); // update for owner if online - if (Player *owner = ObjectAccessor::FindPlayer(ownerguid)) + if (Player* owner = ObjectAccessor::FindPlayer(ownerguid)) owner->GetSession()->SendPacket(&data); return; } @@ -554,12 +554,12 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data) SendPacket(&data); // update signs count on charter, required testing... - //Item *item = _player->GetItemByGuid(petitionguid)); + //Item* item = _player->GetItemByGuid(petitionguid)); //if (item) // item->SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1+1, signs); // update for owner if online - if (Player *owner = ObjectAccessor::FindPlayer(ownerguid)) + if (Player* owner = ObjectAccessor::FindPlayer(ownerguid)) owner->GetSession()->SendPacket(&data); } @@ -576,10 +576,10 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data) if (!result) return; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER); - Player *owner = ObjectAccessor::FindPlayer(ownerguid); + Player* owner = ObjectAccessor::FindPlayer(ownerguid); if (owner) // petition owner online { WorldPacket data(MSG_PETITION_DECLINE, 8); @@ -608,7 +608,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data) if (!result) return; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); type = fields[0].GetUInt8(); sLog->outDebug(LOG_FILTER_NETWORKIO, "OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid)); @@ -676,7 +676,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data) for (uint8 i = 1; i <= signs; ++i) { - Field *fields2 = result->Fetch(); + Field* fields2 = result->Fetch(); plguid = fields2[0].GetUInt64(); data << uint64(plguid); // Player GUID @@ -716,7 +716,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); ownerguidlo = fields[0].GetUInt32(); name = fields[1].GetString(); type = fields[2].GetUInt8(); @@ -881,7 +881,7 @@ void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recv_data) void WorldSession::SendPetitionShowList(uint64 guid) { - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); diff --git a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp index 0a738f4c99c..34dc612cc78 100755 --- a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp @@ -31,7 +31,7 @@ #include "Pet.h" #include "MapManager.h" -void WorldSession::SendNameQueryOpcode(Player *p) +void WorldSession::SendNameQueryOpcode(Player* p) { if (!p) return; @@ -85,7 +85,7 @@ void WorldSession::SendNameQueryOpcodeFromDBCallBack(QueryResult result) if (!result) return; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); std::string name = fields[1].GetString(); uint8 pRace = 0, pGender = 0, pClass = 0; @@ -126,7 +126,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data) recv_data >> guid; - if (Player *pChar = ObjectAccessor::FindPlayer(guid)) + if (Player* pChar = ObjectAccessor::FindPlayer(guid)) SendNameQueryOpcode(pChar); else SendNameQueryOpcodeFromDB(guid); @@ -153,7 +153,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data) uint64 guid; recv_data >> guid; - CreatureTemplate const *ci = sObjectMgr->GetCreatureTemplate(entry); + CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(entry); if (ci) { @@ -164,7 +164,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data) int loc_idx = GetSessionDbLocaleIndex(); if (loc_idx >= 0) { - if (CreatureLocale const *cl = sObjectMgr->GetCreatureLocale(entry)) + if (CreatureLocale const* cl = sObjectMgr->GetCreatureLocale(entry)) { ObjectMgr::GetLocaleString(cl->Name, loc_idx, Name); ObjectMgr::GetLocaleString(cl->SubName, loc_idx, SubName); @@ -216,7 +216,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data) uint64 guid; recv_data >> guid; - const GameObjectTemplate *info = sObjectMgr->GetGameObjectTemplate(entry); + const GameObjectTemplate* info = sObjectMgr->GetGameObjectTemplate(entry); if (info) { std::string Name; @@ -230,7 +230,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data) int loc_idx = GetSessionDbLocaleIndex(); if (loc_idx >= 0) { - if (GameObjectLocale const *gl = sObjectMgr->GetGameObjectLocale(entry)) + if (GameObjectLocale const* gl = sObjectMgr->GetGameObjectLocale(entry)) { ObjectMgr::GetLocaleString(gl->Name, loc_idx, Name); ObjectMgr::GetLocaleString(gl->CastBarCaption, loc_idx, CastBarCaption); @@ -268,7 +268,7 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/) { sLog->outDetail("WORLD: Received MSG_CORPSE_QUERY"); - Corpse *corpse = GetPlayer()->GetCorpse(); + Corpse* corpse = GetPlayer()->GetCorpse(); if (!corpse) { @@ -359,7 +359,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data) int loc_idx = GetSessionDbLocaleIndex(); if (loc_idx >= 0) { - if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textID)) + if (NpcTextLocale const* nl = sObjectMgr->GetNpcTextLocale(textID)) { for (int i = 0; i < MAX_LOCALES; ++i) { @@ -426,7 +426,7 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data) int loc_idx = GetSessionDbLocaleIndex(); if (loc_idx >= 0) - if (PageTextLocale const *pl = sObjectMgr->GetPageTextLocale(pageID)) + if (PageTextLocale const* pl = sObjectMgr->GetPageTextLocale(pageID)) ObjectMgr::GetLocaleString(pl->Text, loc_idx, Text); data << Text; @@ -479,7 +479,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data) if (questOk) { - QuestPOIVector const *POI = sObjectMgr->GetQuestPOIVector(questId); + QuestPOIVector const* POI = sObjectMgr->GetQuestPOIVector(questId); if (POI) { diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp index 47ccd013f75..97f65865508 100755 --- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp @@ -86,7 +86,7 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data) sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid)); - Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); + Creature* pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); if (!pCreature) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", @@ -146,7 +146,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data) if (_player->GetDivider() != 0) { - Player *pPlayer = ObjectAccessor::FindPlayer(_player->GetDivider()); + Player* pPlayer = ObjectAccessor::FindPlayer(_player->GetDivider()); if (pPlayer) { pPlayer->SendPushToPartyResponse(_player, QUEST_PARTY_MSG_ACCEPT_QUEST); @@ -162,7 +162,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data) { if (Group* pGroup = _player->GetGroup()) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pPlayer = itr->getSource(); @@ -279,7 +279,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket & recv_data) recv_data >> quest; sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_QUERY quest = %u", quest); - Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest); + Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest); if (pQuest) { _player->PlayerTalkClass->SendQuestQueryResponse(pQuest); @@ -392,7 +392,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data) if (_player->GetQuestStatus(quest) != QUEST_STATUS_COMPLETE) return; - if (Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest)) + if (Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest)) _player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true); } @@ -500,7 +500,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data) if (!_player->CanInteractWithQuestGiver(pObject)) return; - Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest); + Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest); if (pQuest) { if (!_player->CanSeeStartQuest(pQuest) && _player->GetQuestStatus(quest)==QUEST_STATUS_NONE) @@ -544,13 +544,13 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket) sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId); - if (Quest const *pQuest = sObjectMgr->GetQuestTemplate(questId)) + if (Quest const* pQuest = sObjectMgr->GetQuestTemplate(questId)) { if (Group* pGroup = _player->GetGroup()) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player *pPlayer = itr->getSource(); + Player* pPlayer = itr->getSource(); if (!pPlayer || pPlayer == _player) // skip self continue; @@ -604,7 +604,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket) if (_player->GetDivider() != 0) { - Player *pPlayer = ObjectAccessor::FindPlayer(_player->GetDivider()); + Player* pPlayer = ObjectAccessor::FindPlayer(_player->GetDivider()); if (pPlayer) { WorldPacket data(MSG_QUEST_PUSH_RESULT, (8+1)); @@ -616,7 +616,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket) } } -uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32 defstatus) +uint32 WorldSession::getDialogStatus(Player* pPlayer, Object* questgiver, uint32 defstatus) { uint32 result = defstatus; @@ -647,7 +647,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32 { uint32 result2 = 0; uint32 quest_id = i->second; - Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest_id); + Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest_id); if (!pQuest) continue; ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK, pQuest->GetQuestId()); @@ -674,7 +674,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32 { uint32 result2 = 0; uint32 quest_id = i->second; - Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest_id); + Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest_id); if (!pQuest) continue; @@ -730,7 +730,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket if (IS_CRE_OR_VEH_OR_PET_GUID(*itr)) { // need also pet quests case support - Creature *questgiver = ObjectAccessor::GetCreatureOrPetOrVehicle(*GetPlayer(), *itr); + Creature* questgiver = ObjectAccessor::GetCreatureOrPetOrVehicle(*GetPlayer(), *itr); if (!questgiver || questgiver->IsHostileTo(_player)) continue; if (!questgiver->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER)) @@ -745,7 +745,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket } else if (IS_GAMEOBJECT_GUID(*itr)) { - GameObject *questgiver = GetPlayer()->GetMap()->GetGameObject(*itr); + GameObject* questgiver = GetPlayer()->GetMap()->GetGameObject(*itr); if (!questgiver) continue; if (questgiver->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER) diff --git a/src/server/game/Server/Protocol/Handlers/ReferAFriendHandler.cpp b/src/server/game/Server/Protocol/Handlers/ReferAFriendHandler.cpp index 678e7a96d07..58d425ddf98 100644 --- a/src/server/game/Server/Protocol/Handlers/ReferAFriendHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ReferAFriendHandler.cpp @@ -28,7 +28,7 @@ void WorldSession::HandleGrantLevel(WorldPacket& recv_data) uint64 guid; recv_data.readPackGUID(guid); - Player *target = ObjectAccessor::GetObjectInWorld(guid, _player); + Player* target = ObjectAccessor::GetObjectInWorld(guid, _player); // check cheating uint8 levels = _player->GetGrantableLevels(); @@ -70,7 +70,7 @@ void WorldSession::HandleAcceptGrantLevel(WorldPacket& recv_data) uint64 guid; recv_data.readPackGUID(guid); - Player *other = ObjectAccessor::GetObjectInWorld(guid, _player); + Player* other = ObjectAccessor::GetObjectInWorld(guid, _player); if (!(other && other->GetSession())) return; diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp index 6400bee0f06..269576a5696 100755 --- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp @@ -86,7 +86,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket) return; } - Item *pItem = pUser->GetUseableItemByPos(bagIndex, slot); + Item* pItem = pUser->GetUseableItemByPos(bagIndex, slot); if (!pItem) { pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); @@ -101,7 +101,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket) sLog->outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, castCount: %u, spellId: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, castCount, spellId, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size()); - ItemTemplate const *proto = pItem->GetTemplate(); + ItemTemplate const* proto = pItem->GetTemplate(); if (!proto) { pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, pItem, NULL); @@ -140,7 +140,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket) { for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) { - if (SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(proto->Spells[i].SpellId)) + if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(proto->Spells[i].SpellId)) { if (!spellInfo->CanBeUsedInCombat()) { @@ -213,14 +213,14 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) sLog->outDetail("bagIndex: %u, slot: %u", bagIndex, slot); - Item *pItem = pUser->GetItemByPos(bagIndex, slot); + Item* pItem = pUser->GetItemByPos(bagIndex, slot); if (!pItem) { pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); return; } - ItemTemplate const *proto = pItem->GetTemplate(); + ItemTemplate const* proto = pItem->GetTemplate(); if (!proto) { pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, pItem, NULL); @@ -240,7 +240,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) uint32 lockId = proto->LockID; if (lockId) { - LockEntry const *lockInfo = sLockStore.LookupEntry(lockId); + LockEntry const* lockInfo = sLockStore.LookupEntry(lockId); if (!lockInfo) { @@ -262,7 +262,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) QueryResult result = CharacterDatabase.PQuery("SELECT entry, flags FROM character_gifts WHERE item_guid = '%u'", pItem->GetGUIDLow()); if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); uint32 flags = fields[1].GetUInt32(); @@ -295,7 +295,7 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket & recv_data) if (_player->m_mover != _player) return; - if (GameObject *obj = GetPlayer()->GetMap()->GetGameObject(guid)) + if (GameObject* obj = GetPlayer()->GetMap()->GetGameObject(guid)) obj->Use(_player); } @@ -338,7 +338,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) return; } - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { @@ -392,7 +392,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) // auto-selection buff level base at target level (in spellInfo) if (targets.GetUnitTarget()) { - SpellInfo const *actualSpellInfo = spellInfo->GetAuraRankForLevel(targets.GetUnitTarget()->getLevel()); + SpellInfo const* actualSpellInfo = spellInfo->GetAuraRankForLevel(targets.GetUnitTarget()->getLevel()); // if rank not found then function return NULL but in explicit cast case original spell can be casted and later failed with appropriate error message if (actualSpellInfo) @@ -420,7 +420,7 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket) uint32 spellId; recvPacket >> spellId; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) return; @@ -455,7 +455,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket) recvPacket >> guid; recvPacket >> spellId; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { sLog->outError("WORLD: unknown PET spell id %u", spellId); @@ -542,7 +542,7 @@ void WorldSession::HandleSelfResOpcode(WorldPacket & /*recv_data*/) if (_player->GetUInt32Value(PLAYER_SELF_RES_SPELL)) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL)); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL)); if (spellInfo) _player->CastSpell(_player, spellInfo, false, 0); @@ -627,7 +627,7 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPacket & recv_data) data << uint32(0); else if (*itr == EQUIPMENT_SLOT_BACK && player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK)) data << uint32(0); - else if (Item const *item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, *itr)) + else if (Item const* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, *itr)) data << uint32(item->GetTemplate()->DisplayInfoID); else data << uint32(0); diff --git a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp index c6a693515b3..08b2d181cd4 100755 --- a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp @@ -173,7 +173,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data) recv_data >> guid >> node_count; - Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER); + Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER); if (!npc) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid))); @@ -284,7 +284,7 @@ void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recv_data) recv_data >> guid >> nodes[0] >> nodes[1]; sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI from %d to %d" , nodes[0], nodes[1]); - Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER); + Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER); if (!npc) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid))); diff --git a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp index 2e0e9f49f2b..b8289bfada3 100755 --- a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp @@ -214,7 +214,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[]) //============================================================== -static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item **myItems, Item **hisItems) +static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item* *myItems, Item* *hisItems) { myTrade->SetInAcceptProcess(true); hisTrade->SetInAcceptProcess(true); @@ -245,7 +245,7 @@ static void clearAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade) hisTrade->SetInAcceptProcess(false); } -static void clearAcceptTradeMode(Item **myItems, Item **hisItems) +static void clearAcceptTradeMode(Item* *myItems, Item* *hisItems) { // clear 'in-trade' flag for (uint8 i = 0; i < TRADE_SLOT_TRADED_COUNT; ++i) @@ -269,8 +269,8 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/) if (!his_trade) return; - Item *myItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL }; - Item *hisItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL }; + Item* myItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL }; + Item* hisItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL }; bool myCanCompleteTrade = true, hisCanCompleteTrade = true; // set before checks for propertly undo at problems (it already set in to client) diff --git a/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp b/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp index c6215d8e3b1..59940111fbe 100644 --- a/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/VehicleHandler.cpp @@ -94,9 +94,9 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data) if (!accessory) GetPlayer()->ChangeSeat(-1, seatId > 0); // prev/next - else if (Unit *vehUnit = Unit::GetUnit(*GetPlayer(), accessory)) + else if (Unit* vehUnit = Unit::GetUnit(*GetPlayer(), accessory)) { - if (Vehicle *vehicle = vehUnit->GetVehicleKit()) + if (Vehicle* vehicle = vehUnit->GetVehicleKit()) if (vehicle->HasEmptySeat(seatId)) vehUnit->HandleSpellClick(GetPlayer(), seatId); } @@ -112,8 +112,8 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data) if (vehicle_base->GetGUID() == guid) GetPlayer()->ChangeSeat(seatId); - else if (Unit *vehUnit = Unit::GetUnit(*GetPlayer(), guid)) - if (Vehicle *vehicle = vehUnit->GetVehicleKit()) + else if (Unit* vehUnit = Unit::GetUnit(*GetPlayer(), guid)) + if (Vehicle* vehicle = vehUnit->GetVehicleKit()) if (vehicle->HasEmptySeat(seatId)) vehUnit->HandleSpellClick(GetPlayer(), seatId); break; @@ -157,7 +157,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data) if (IS_PLAYER_GUID(guid)) { - Player *plr = ObjectAccessor::FindPlayer(guid); + Player* plr = ObjectAccessor::FindPlayer(guid); if (!plr) { sLog->outError("Player %u tried to eject player %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); @@ -180,7 +180,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data) else if (IS_CREATURE_GUID(guid)) { - Unit *unit = ObjectAccessor::GetUnit(*_player, guid); + Unit* unit = ObjectAccessor::GetUnit(*_player, guid); if (!unit) // creatures can be ejected too from player mounts { sLog->outError("Player %u tried to eject creature guid %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid)); diff --git a/src/server/game/Server/Protocol/WorldLog.cpp b/src/server/game/Server/Protocol/WorldLog.cpp index 5c7026797ed..54986b2b158 100755 --- a/src/server/game/Server/Protocol/WorldLog.cpp +++ b/src/server/game/Server/Protocol/WorldLog.cpp @@ -57,7 +57,7 @@ void WorldLog::Initialize() m_dbWorld = sConfig->GetBoolDefault("LogDB.World", false); // can be VERY heavy if enabled } -void WorldLog::outTimestampLog(char const *fmt, ...) +void WorldLog::outTimestampLog(char const* fmt, ...) { if (LogWorld()) { @@ -85,7 +85,7 @@ void WorldLog::outTimestampLog(char const *fmt, ...) } } -void WorldLog::outLog(char const *fmt, ...) +void WorldLog::outLog(char const* fmt, ...) { if (LogWorld()) { diff --git a/src/server/game/Server/Protocol/WorldLog.h b/src/server/game/Server/Protocol/WorldLog.h index c5ff188c522..46d12ec1aff 100755 --- a/src/server/game/Server/Protocol/WorldLog.h +++ b/src/server/game/Server/Protocol/WorldLog.h @@ -46,11 +46,11 @@ class WorldLog /// Is the world logger active? bool LogWorld(void) const { return (i_file != NULL); } /// %Log to the file - void outLog(char const *fmt, ...); - void outTimestampLog(char const *fmt, ...); + void outLog(char const* fmt, ...); + void outTimestampLog(char const* fmt, ...); private: - FILE *i_file; + FILE* i_file; bool m_dbWorld; }; diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 9ef989865bb..f5fa153bfd9 100755 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -55,7 +55,7 @@ bool MapSessionFilter::Process(WorldPacket* packet) if (opHandle.packetProcessing == PROCESS_THREADUNSAFE) return false; - Player *plr = m_pSession->GetPlayer(); + Player* plr = m_pSession->GetPlayer(); if (!plr) return false; @@ -77,7 +77,7 @@ bool WorldSessionFilter::Process(WorldPacket* packet) return true; //no player attached? -> our client! ^^ - Player *plr = m_pSession->GetPlayer(); + Player* plr = m_pSession->GetPlayer(); if (!plr) return true; @@ -86,7 +86,7 @@ bool WorldSessionFilter::Process(WorldPacket* packet) } /// WorldSession constructor -WorldSession::WorldSession(uint32 id, WorldSocket *sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter): +WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter): m_muteTime(mute_time), m_timeOutTime(0), _player(NULL), m_Socket(sock), _security(sec), _accountId(id), m_expansion(expansion), _logoutTime(0), m_inQueue(false), m_playerLoading(false), m_playerLogout(false), @@ -137,13 +137,13 @@ void WorldSession::SizeError(WorldPacket const &packet, uint32 size) const } /// Get the player name -char const *WorldSession::GetPlayerName() const +char const* WorldSession::GetPlayerName() const { return GetPlayer() ? GetPlayer()->GetName() : "<none>"; } /// Send a packet to the client -void WorldSession::SendPacket(WorldPacket const *packet) +void WorldSession::SendPacket(WorldPacket const* packet) { if (!m_Socket) return; @@ -187,7 +187,7 @@ void WorldSession::SendPacket(WorldPacket const *packet) } /// Add an incoming packet to the queue -void WorldSession::QueuePacket(WorldPacket *new_packet) +void WorldSession::QueuePacket(WorldPacket* new_packet) { _recvQueue.add(new_packet); } @@ -377,10 +377,10 @@ void WorldSession::LogoutPlayer(bool Save) _player->RemoveAllAurasOnDeath(); // build set of player who attack _player or who have pet attacking of _player - std::set<Player *> aset; + std::set<Player*> aset; for (Unit::AttackerSet::const_iterator itr = _player->getAttackers().begin(); itr != _player->getAttackers().end(); ++itr) { - Unit *owner = (*itr)->GetOwner(); // including player controlled case + Unit* owner = (*itr)->GetOwner(); // including player controlled case if (owner && owner->GetTypeId() == TYPEID_PLAYER) aset.insert(owner->ToPlayer()); else if ((*itr)->GetTypeId() == TYPEID_PLAYER) @@ -393,13 +393,13 @@ void WorldSession::LogoutPlayer(bool Save) _player->RepopAtGraveyard(); // give honor to all attackers from set like group case - for (std::set<Player *>::const_iterator itr = aset.begin(); itr != aset.end(); ++itr) + for (std::set<Player*>::const_iterator itr = aset.begin(); itr != aset.end(); ++itr) (*itr)->RewardHonor(_player, aset.size()); // give bg rewards and update counters like kill by first from attackers // this can't be called for all attackers. if (!aset.empty()) - if (Battleground *bg = _player->GetBattleground()) + if (Battleground* bg = _player->GetBattleground()) bg->HandleKillPlayer(_player, *aset.begin()); } else if (_player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION)) @@ -417,7 +417,7 @@ void WorldSession::LogoutPlayer(bool Save) } //drop a flag if player is carrying it - if (Battleground *bg = _player->GetBattleground()) + if (Battleground* bg = _player->GetBattleground()) bg->EventPlayerLoggedOut(_player); ///- Teleport to home if the player is in an invalid instance @@ -441,7 +441,7 @@ void WorldSession::LogoutPlayer(bool Save) HandleMoveWorldportAckOpcode(); ///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members - if (Guild *pGuild = sGuildMgr->GetGuildById(_player->GetGuildId())) + if (Guild* pGuild = sGuildMgr->GetGuildById(_player->GetGuildId())) pGuild->HandleMemberLogout(this); ///- Remove pet @@ -493,7 +493,7 @@ void WorldSession::LogoutPlayer(bool Save) // calls to GetMap in this case may cause crashes _player->CleanupsBeforeDelete(); sLog->outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName() , _player->GetGUIDLow()); - Map *_map = _player->GetMap(); + Map* _map = _player->GetMap(); _map->Remove(_player, true); SetPlayer(NULL); // deleted in Remove call @@ -539,7 +539,7 @@ void WorldSession::SendNotification(const char *format, ...) void WorldSession::SendNotification(uint32 string_id, ...) { - char const *format = GetTrinityString(string_id); + char const* format = GetTrinityString(string_id); if (format) { va_list ap; @@ -616,7 +616,7 @@ void WorldSession::LoadAccountData(PreparedQueryResult result, uint32 mask) do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 type = fields[0].GetUInt8(); if (type >= NUM_ACCOUNT_DATA_TYPES) { @@ -717,7 +717,7 @@ void WorldSession::SaveTutorialsData(SQLTransaction &trans) m_TutorialsChanged = false; } -void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi) +void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi) { data >> mi->flags; data >> mi->flags2; @@ -787,7 +787,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi) mi->flags &= ~(MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_BACKWARD); } -void WorldSession::WriteMovementInfo(WorldPacket *data, MovementInfo *mi) +void WorldSession::WriteMovementInfo(WorldPacket* data, MovementInfo* mi) { data->appendPackGUID(mi->guid); @@ -964,7 +964,7 @@ void WorldSession::SendAddonsInfo() SendPacket(&data); } -void WorldSession::SetPlayer(Player *plr) +void WorldSession::SetPlayer(Player* plr) { _player = plr; diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 62954132fbb..8e489b7ea50 100755 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -142,23 +142,23 @@ enum CharterTypes class PacketFilter { public: - explicit PacketFilter(WorldSession * pSession) : m_pSession(pSession) {} + explicit PacketFilter(WorldSession* pSession) : m_pSession(pSession) {} virtual ~PacketFilter() {} - virtual bool Process(WorldPacket * /*packet*/) { return true; } + virtual bool Process(WorldPacket* /*packet*/) { return true; } virtual bool ProcessLogout() const { return true; } protected: - WorldSession * const m_pSession; + WorldSession* const m_pSession; }; //process only thread-safe packets in Map::Update() class MapSessionFilter : public PacketFilter { public: - explicit MapSessionFilter(WorldSession * pSession) : PacketFilter(pSession) {} + explicit MapSessionFilter(WorldSession* pSession) : PacketFilter(pSession) {} ~MapSessionFilter() {} - virtual bool Process(WorldPacket * packet); + virtual bool Process(WorldPacket* packet); //in Map::Update() we do not process player logout! virtual bool ProcessLogout() const { return false; } }; @@ -168,7 +168,7 @@ public: class WorldSessionFilter : public PacketFilter { public: - explicit WorldSessionFilter(WorldSession * pSession) : PacketFilter(pSession) {} + explicit WorldSessionFilter(WorldSession* pSession) : PacketFilter(pSession) {} ~WorldSessionFilter() {} virtual bool Process(WorldPacket* packet); @@ -214,7 +214,7 @@ class CharacterCreateInfo class WorldSession { public: - WorldSession(uint32 id, WorldSocket *sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter); + WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter); ~WorldSession(); bool PlayerLoading() const { return m_playerLoading; } @@ -226,8 +226,8 @@ class WorldSession void ReadAddonsInfo(WorldPacket &data); void SendAddonsInfo(); - void ReadMovementInfo(WorldPacket &data, MovementInfo *mi); - void WriteMovementInfo(WorldPacket *data, MovementInfo *mi); + void ReadMovementInfo(WorldPacket &data, MovementInfo* mi); + void WriteMovementInfo(WorldPacket* data, MovementInfo* mi); void SendPacket(WorldPacket const* packet); void SendNotification(const char *format, ...) ATTR_PRINTF(2, 3); @@ -247,7 +247,7 @@ class WorldSession char const* GetPlayerName() const; void SetSecurity(AccountTypes security) { _security = security; } std::string const& GetRemoteAddress() { return m_Address; } - void SetPlayer(Player *plr); + void SetPlayer(Player* plr); uint8 Expansion() const { return m_expansion; } /// Session in auth.queue currently @@ -311,7 +311,7 @@ class WorldSession bool CheckStableMaster(uint64 guid); // Account Data - AccountData *GetAccountData(AccountDataType type) { return &m_accountData[type]; } + AccountData* GetAccountData(AccountDataType type) { return &m_accountData[type]; } void SetAccountData(AccountDataType type, time_t tm, std::string data); void SendAccountDataTimes(uint32 mask); void LoadGlobalAccountData(); @@ -335,7 +335,7 @@ class WorldSession void SendAuctionHello(uint64 guid, Creature* unit); void SendAuctionCommandResult(uint32 auctionId, uint32 Action, uint32 ErrorCode, uint32 bidError = 0); void SendAuctionBidderNotification(uint32 location, uint32 auctionId, uint64 bidder, uint32 bidSum, uint32 diff, uint32 item_template); - void SendAuctionOwnerNotification(AuctionEntry * auction); + void SendAuctionOwnerNotification(AuctionEntry* auction); //Item Enchantment void SendEnchantmentLog(uint64 Target, uint64 Caster, uint32 ItemID, uint32 SpellID); @@ -353,7 +353,7 @@ class WorldSession void SendNotInArenaTeamPacket(uint8 type); void SendPetitionShowList(uint64 guid); - void BuildPartyMemberStatsChangedPacket(Player* player, WorldPacket *data); + void BuildPartyMemberStatsChangedPacket(Player* player, WorldPacket* data); void DoLootRelease(uint64 lguid); @@ -367,7 +367,7 @@ class WorldSession uint32 GetLatency() const { return m_latency; } void SetLatency(uint32 latency) { m_latency = latency; } - uint32 getDialogStatus(Player *pPlayer, Object* questgiver, uint32 defstatus); + uint32 getDialogStatus(Player* pPlayer, Object* questgiver, uint32 defstatus); time_t m_timeOutTime; void UpdateTimeOutTime(uint32 diff) @@ -635,7 +635,7 @@ class WorldSession void HandleQueryNextMailTime(WorldPacket & recv_data); void HandleCancelChanneling(WorldPacket & recv_data); - void SendItemPageInfo(ItemTemplate *itemProto); + void SendItemPageInfo(ItemTemplate* itemProto); void HandleSplitItemOpcode(WorldPacket& recvPacket); void HandleSwapInvItemOpcode(WorldPacket& recvPacket); void HandleDestroyItemOpcode(WorldPacket& recvPacket); @@ -737,7 +737,7 @@ class WorldSession //Pet void HandlePetAction(WorldPacket & recv_data); void HandlePetStopAttack(WorldPacket& recv_data); - void HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2); + void HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2); void HandlePetNameQuery(WorldPacket & recv_data); void HandlePetSetAction(WorldPacket & recv_data); void HandlePetAbandon(WorldPacket & recv_data); @@ -800,12 +800,12 @@ class WorldSession void SendLfgUpdatePlayer(const LfgUpdateData& updateData); void SendLfgUpdateParty(const LfgUpdateData& updateData); void SendLfgRoleChosen(uint64 guid, uint8 roles); - void SendLfgRoleCheckUpdate(const LfgRoleCheck *pRoleCheck); + void SendLfgRoleCheckUpdate(const LfgRoleCheck* pRoleCheck); void SendLfgUpdateSearch(bool update); void SendLfgJoinResult(const LfgJoinResultData& joinData); void SendLfgQueueStatus(uint32 dungeon, int32 waitTime, int32 avgWaitTime, int32 waitTimeTanks, int32 waitTimeHealer, int32 waitTimeDps, uint32 queuedTime, uint8 tanks, uint8 healers, uint8 dps); - void SendLfgPlayerReward(uint32 rdungeonEntry, uint32 sdungeonEntry, uint8 done, const LfgReward *reward, const Quest *qRew); - void SendLfgBootPlayer(const LfgPlayerBoot *pBoot); + void SendLfgPlayerReward(uint32 rdungeonEntry, uint32 sdungeonEntry, uint8 done, const LfgReward* reward, const Quest *qRew); + void SendLfgBootPlayer(const LfgPlayerBoot* pBoot); void SendLfgUpdateProposal(uint32 proposalId, const LfgProposal *pProp); void SendLfgDisabled(); void SendLfgOfferContinue(uint32 dungeonEntry); @@ -931,8 +931,8 @@ class WorldSession std::set<uint32> _allowedCharsToLogin; uint32 m_GUIDLow; // set loggined or recently logout player (while m_playerRecentlyLogout set) - Player *_player; - WorldSocket *m_Socket; + Player* _player; + WorldSocket* m_Socket; std::string m_Address; AccountTypes _security; diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 2f58d476ce2..c5daa540632 100755 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -385,7 +385,7 @@ int WorldSocket::handle_output_queue (GuardType& g) if (msg_queue()->is_empty()) return cancel_wakeup_output(g); - ACE_Message_Block *mblk; + ACE_Message_Block* mblk; if (msg_queue()->dequeue_head(mblk, (ACE_Time_Value*)&ACE_Time_Value::zero) == -1) { @@ -495,7 +495,7 @@ int WorldSocket::handle_input_header (void) if ((header.size < 4) || (header.size > 10240) || (header.cmd > 10240)) { - Player *_player = m_Session ? m_Session->GetPlayer() : NULL; + Player* _player = m_Session ? m_Session->GetPlayer() : NULL; sLog->outError ("WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d , cmd: %d)", m_Session ? m_Session->GetAccountId() : 0, _player ? _player->GetGUIDLow() : 0, diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h index 7a121cbe3df..d10b0a11301 100755 --- a/src/server/game/Server/WorldSocket.h +++ b/src/server/game/Server/WorldSocket.h @@ -195,7 +195,7 @@ class WorldSocket : public WorldHandler LockType m_OutBufferLock; /// Buffer used for writing output. - ACE_Message_Block *m_OutBuffer; + ACE_Message_Block* m_OutBuffer; /// Size of the m_OutBuffer. size_t m_OutBufferSize; diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp index 884d0710037..1899d75b4cf 100755 --- a/src/server/game/Skills/SkillDiscovery.cpp +++ b/src/server/game/Skills/SkillDiscovery.cpp @@ -67,7 +67,7 @@ void LoadSkillDiscoveryTable() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 spellId = fields[0].GetUInt32(); int32 reqSkillOrSpell = fields[1].GetInt32(); diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp index 207fae93fe6..600655c4a60 100755 --- a/src/server/game/Skills/SkillExtraItems.cpp +++ b/src/server/game/Skills/SkillExtraItems.cpp @@ -69,7 +69,7 @@ void LoadSkillExtraItemTable() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 spellId = fields[0].GetUInt32(); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index faabbcc50ce..f8ace0d8e8b 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -390,7 +390,7 @@ AuraEffect::~AuraEffect() delete m_spellmod; } -void AuraEffect::GetTargetList(std::list<Unit *> & targetList) const +void AuraEffect::GetTargetList(std::list<Unit*> & targetList) const { Aura::ApplicationMap const & targetMap = GetBase()->GetApplicationMap(); // remove all targets which were not added to new list - they no longer deserve area aura @@ -1278,7 +1278,7 @@ bool AuraEffect::IsAffectedOnSpell(SpellInfo const* spell) const return false; } -void AuraEffect::SendTickImmune(Unit* target, Unit *caster) const +void AuraEffect::SendTickImmune(Unit* target, Unit* caster) const { if (caster) caster->SendSpellDamageImmune(target, m_spellInfo->Id); @@ -5664,7 +5664,7 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const // Mirror Image if (GetId() == 55342) // Set name of summons to name of caster - target->CastSpell((Unit *)NULL, m_spellInfo->Effects[m_effIndex].TriggerSpell, true); + target->CastSpell((Unit* )NULL, m_spellInfo->Effects[m_effIndex].TriggerSpell, true); break; } case SPELLFAMILY_WARLOCK: diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index bdaeefa71c2..c34391471d7 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -30,15 +30,15 @@ typedef void(AuraEffect::*pAuraEffectHandler)(AuraApplication const* aurApp, uin class AuraEffect { friend void Aura::_InitEffects(uint8 effMask, Unit* caster, int32 *baseAmount); - friend Aura * Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID); + friend Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID); friend Aura::~Aura(); private: ~AuraEffect(); - explicit AuraEffect(Aura * base, uint8 effIndex, int32 *baseAmount, Unit* caster); + explicit AuraEffect(Aura* base, uint8 effIndex, int32 *baseAmount, Unit* caster); public: Unit* GetCaster() const { return GetBase()->GetCaster(); } uint64 GetCasterGUID() const { return GetBase()->GetCasterGUID(); } - Aura * GetBase() const { return m_base; } + Aura* GetBase() const { return m_base; } void GetTargetList(std::list<Unit*> & targetList) const; void GetApplicationList(std::list<AuraApplication*> & applicationList) const; SpellModifier* GetSpellModifier() const { return m_spellmod; } @@ -79,9 +79,9 @@ class AuraEffect bool IsPeriodic() const { return m_isPeriodic; } void SetPeriodic(bool isPeriodic) { m_isPeriodic = isPeriodic; } - bool IsAffectedOnSpell(SpellInfo const *spell) const; + bool IsAffectedOnSpell(SpellInfo const* spell) const; - void SendTickImmune(Unit* target, Unit *caster) const; + void SendTickImmune(Unit* target, Unit* caster) const; void PeriodicTick(AuraApplication * aurApp, Unit* caster) const; void HandleProc(AuraApplication* aurApp, ProcEventInfo& eventInfo); @@ -91,7 +91,7 @@ class AuraEffect // add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras void HandleShapeshiftBoosts(Unit* target, bool apply) const; private: - Aura * const m_base; + Aura* const m_base; SpellInfo const* const m_spellInfo; uint8 const m_effIndex; @@ -100,7 +100,7 @@ class AuraEffect int32 m_amount; bool m_canBeRecalculated; - SpellModifier *m_spellmod; + SpellModifier* m_spellmod; bool m_isPeriodic; int32 m_periodicTimer; @@ -307,7 +307,7 @@ namespace Trinity { public: AbsorbAuraOrderPred() { } - bool operator() (AuraEffect * aurEffA, AuraEffect * aurEffB) const + bool operator() (AuraEffect* aurEffA, AuraEffect* aurEffB) const { SpellInfo const* spellProtoA = aurEffA->GetSpellInfo(); SpellInfo const* spellProtoB = aurEffB->GetSpellInfo(); diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index a5cf014e3d3..8bb46ed6144 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -36,7 +36,7 @@ #include "SpellScript.h" #include "Vehicle.h" -AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura * aura, uint8 effMask): +AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura* aura, uint8 effMask): m_target(target), m_base(aura), m_slot(MAX_AURAS), m_flags(AFLAG_NONE), m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(false) { @@ -151,7 +151,7 @@ void AuraApplication::_InitFlags(Unit* caster, uint8 effMask) void AuraApplication::_HandleEffect(uint8 effIndex, bool apply) { - AuraEffect * aurEff = GetBase()->GetEffect(effIndex); + AuraEffect* aurEff = GetBase()->GetEffect(effIndex); ASSERT(aurEff); ASSERT(HasEffect(effIndex) == (!apply)); ASSERT((1<<effIndex) & m_effectsToApply); @@ -330,7 +330,7 @@ Aura* Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owne return aura; } -Aura::Aura(SpellInfo const* spellproto, WorldObject * owner, Unit* caster, Item* castItem, uint64 casterGUID) : +Aura::Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* castItem, uint64 casterGUID) : m_spellInfo(spellproto), m_casterGuid(casterGUID ? casterGUID : caster->GetGUID()), m_castItemGuid(castItem ? castItem->GetGUID() : 0), m_applyTime(time(NULL)), m_owner(owner), m_timeCla(0), m_updateTargetMapInterval(0), @@ -364,7 +364,7 @@ Aura::~Aura() // unload scripts while(!m_loadedScripts.empty()) { - std::list<AuraScript *>::iterator itr = m_loadedScripts.begin(); + std::list<AuraScript*>::iterator itr = m_loadedScripts.begin(); (*itr)->_Unload(); delete (*itr); m_loadedScripts.erase(itr); @@ -469,7 +469,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) // fill up to date target list // target, effMask - std::map<Unit *, uint8> targets; + std::map<Unit* , uint8> targets; FillTargetMap(targets, caster); @@ -478,7 +478,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) // mark all auras as ready to remove for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end();++appIter) { - std::map<Unit *, uint8>::iterator existing = targets.find(appIter->second->GetTarget()); + std::map<Unit* , uint8>::iterator existing = targets.find(appIter->second->GetTarget()); // not found in current area - remove the aura if (existing == targets.end()) targetsToRemove.push_back(appIter->second->GetTarget()); @@ -495,7 +495,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) } // register auras for units - for (std::map<Unit *, uint8>::iterator itr = targets.begin(); itr!= targets.end();) + for (std::map<Unit* , uint8>::iterator itr = targets.begin(); itr!= targets.end();) { // aura mustn't be already applied on target if (AuraApplication * aurApp = GetApplicationOfTarget(itr->first->GetGUID())) @@ -572,7 +572,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) return; // apply aura effects for units - for (std::map<Unit *, uint8>::iterator itr = targets.begin(); itr!= targets.end();++itr) + for (std::map<Unit* , uint8>::iterator itr = targets.begin(); itr!= targets.end();++itr) { if (AuraApplication * aurApp = GetApplicationOfTarget(itr->first->GetGUID())) { @@ -605,7 +605,7 @@ void Aura::_ApplyEffectForTargets(uint8 effIndex) } } } -void Aura::UpdateOwner(uint32 diff, WorldObject * owner) +void Aura::UpdateOwner(uint32 diff, WorldObject* owner) { ASSERT(owner == m_owner); @@ -853,7 +853,7 @@ bool Aura::ModStackAmount(int32 num, AuraRemoveMode removeMode) void Aura::RefreshSpellMods() { for (Aura::ApplicationMap::const_iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter) - if (Player * player = appIter->second->GetTarget()->ToPlayer()) + if (Player* player = appIter->second->GetTarget()->ToPlayer()) player->RestoreAllSpellMods(0, this); } @@ -1256,7 +1256,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b if (GetCasterGUID() == target->GetGUID()) break; - AuraEffect * aurEff = NULL; + AuraEffect* aurEff = NULL; // Ebon Plaguebringer / Crypt Fever Unit::AuraEffectList const& TalentAuras = caster->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); for (Unit::AuraEffectList::const_iterator itr = TalentAuras.begin(); itr != TalentAuras.end(); ++itr) @@ -1490,7 +1490,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b Player* player = caster->ToPlayer(); // Glyph of Guardian Spirit - if (AuraEffect * aurEff = player->GetAuraEffect(63231, 0)) + if (AuraEffect* aurEff = player->GetAuraEffect(63231, 0)) { if (!player->HasSpellCooldown(47788)) break; @@ -1638,9 +1638,9 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b case SPELLFAMILY_DEATHKNIGHT: if (GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_PRESENCE) { - AuraEffect *bloodPresenceAura=0; // healing by damage done - AuraEffect *frostPresenceAura=0; // increased health - AuraEffect *unholyPresenceAura=0; // increased movement speed, faster rune recovery + AuraEffect* bloodPresenceAura=0; // healing by damage done + AuraEffect* frostPresenceAura=0; // increased health + AuraEffect* unholyPresenceAura=0; // increased movement speed, faster rune recovery // Improved Presences Unit::AuraEffectList const& vDummyAuras = target->GetAuraEffectsByType(SPELL_AURA_DUMMY); @@ -1958,7 +1958,7 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI if (eventInfo.GetDamageInfo()) { WeaponAttackType attType = eventInfo.GetDamageInfo()->GetAttackType(); - Item *item = NULL; + Item* item = NULL; if (attType == BASE_ATTACK) item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND); else if (attType == OFF_ATTACK) @@ -1973,7 +1973,7 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI else if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_ARMOR) { // Check if player is wearing shield - Item *item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + Item* item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_ARMOR || !((1<<item->GetTemplate()->SubClass) & GetSpellInfo()->EquippedItemSubClassMask)) return false; } @@ -1987,7 +1987,7 @@ float Aura::CalcProcChance(SpellProcEntry const& procEntry, ProcEventInfo& event float chance = procEntry.chance; // calculate chances depending on unit with caster's data // so talents modifying chances and judgements will have properly calculated proc chance - if (Unit * caster = GetCaster()) + if (Unit* caster = GetCaster()) { // calculate ppm chance if present and we're using weapon if (eventInfo.GetDamageInfo() && procEntry.ratePerMinute != 0) @@ -2028,11 +2028,11 @@ void Aura::LoadScripts() { sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts"); sScriptMgr->CreateAuraScripts(m_spellInfo->Id, m_loadedScripts); - for (std::list<AuraScript *>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) + for (std::list<AuraScript*>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) { if (!(*itr)->_Load(this)) { - std::list<AuraScript *>::iterator bitr = itr; + std::list<AuraScript*>::iterator bitr = itr; ++itr; m_loadedScripts.erase(bitr); continue; @@ -2059,7 +2059,7 @@ bool Aura::CallScriptCheckAreaTargetHandlers(Unit* target) bool Aura::CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode) { bool preventDefault = false; - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_APPLY, aurApp); std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->OnEffectApply.end(), effItr = (*scritr)->OnEffectApply.begin(); @@ -2078,7 +2078,7 @@ bool Aura::CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplicati bool Aura::CallScriptEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode) { bool preventDefault = false; - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_REMOVE, aurApp); std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->OnEffectRemove.end(), effItr = (*scritr)->OnEffectRemove.begin(); @@ -2096,7 +2096,7 @@ bool Aura::CallScriptEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplicat void Aura::CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_APPLY, aurApp); std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->AfterEffectApply.end(), effItr = (*scritr)->AfterEffectApply.begin(); @@ -2111,7 +2111,7 @@ void Aura::CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraAppl void Aura::CallScriptAfterEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_REMOVE, aurApp); std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->AfterEffectRemove.end(), effItr = (*scritr)->AfterEffectRemove.begin(); @@ -2127,7 +2127,7 @@ void Aura::CallScriptAfterEffectRemoveHandlers(AuraEffect const* aurEff, AuraApp bool Aura::CallScriptEffectPeriodicHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp) { bool preventDefault = false; - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_PERIODIC, aurApp); std::list<AuraScript::EffectPeriodicHandler>::iterator effEndItr = (*scritr)->OnEffectPeriodic.end(), effItr = (*scritr)->OnEffectPeriodic.begin(); @@ -2143,9 +2143,9 @@ bool Aura::CallScriptEffectPeriodicHandlers(AuraEffect const* aurEff, AuraApplic return preventDefault; } -void Aura::CallScriptEffectUpdatePeriodicHandlers(AuraEffect * aurEff) +void Aura::CallScriptEffectUpdatePeriodicHandlers(AuraEffect* aurEff) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_UPDATE_PERIODIC); std::list<AuraScript::EffectUpdatePeriodicHandler>::iterator effEndItr = (*scritr)->OnEffectUpdatePeriodic.end(), effItr = (*scritr)->OnEffectUpdatePeriodic.begin(); @@ -2160,7 +2160,7 @@ void Aura::CallScriptEffectUpdatePeriodicHandlers(AuraEffect * aurEff) void Aura::CallScriptEffectCalcAmountHandlers(AuraEffect const* aurEff, int32 & amount, bool & canBeRecalculated) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_CALC_AMOUNT); std::list<AuraScript::EffectCalcAmountHandler>::iterator effEndItr = (*scritr)->DoEffectCalcAmount.end(), effItr = (*scritr)->DoEffectCalcAmount.begin(); @@ -2175,7 +2175,7 @@ void Aura::CallScriptEffectCalcAmountHandlers(AuraEffect const* aurEff, int32 & void Aura::CallScriptEffectCalcPeriodicHandlers(AuraEffect const* aurEff, bool & isPeriodic, int32 & amplitude) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_CALC_PERIODIC); std::list<AuraScript::EffectCalcPeriodicHandler>::iterator effEndItr = (*scritr)->DoEffectCalcPeriodic.end(), effItr = (*scritr)->DoEffectCalcPeriodic.begin(); @@ -2188,9 +2188,9 @@ void Aura::CallScriptEffectCalcPeriodicHandlers(AuraEffect const* aurEff, bool & } } -void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellModifier *& spellMod) +void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellModifier* & spellMod) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_CALC_SPELLMOD); std::list<AuraScript::EffectCalcSpellModHandler>::iterator effEndItr = (*scritr)->DoEffectCalcSpellMod.end(), effItr = (*scritr)->DoEffectCalcSpellMod.begin(); @@ -2203,9 +2203,9 @@ void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellM } } -void Aura::CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/) +void Aura::CallScriptEffectAbsorbHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_ABSORB, aurApp); std::list<AuraScript::EffectAbsorbHandler>::iterator effEndItr = (*scritr)->OnEffectAbsorb.end(), effItr = (*scritr)->OnEffectAbsorb.begin(); @@ -2218,9 +2218,9 @@ void Aura::CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication c } } -void Aura::CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount) +void Aura::CallScriptEffectAfterAbsorbHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB, aurApp); std::list<AuraScript::EffectAbsorbHandler>::iterator effEndItr = (*scritr)->AfterEffectAbsorb.end(), effItr = (*scritr)->AfterEffectAbsorb.begin(); @@ -2233,9 +2233,9 @@ void Aura::CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplicat } } -void Aura::CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/) +void Aura::CallScriptEffectManaShieldHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_MANASHIELD, aurApp); std::list<AuraScript::EffectManaShieldHandler>::iterator effEndItr = (*scritr)->OnEffectManaShield.end(), effItr = (*scritr)->OnEffectManaShield.begin(); @@ -2248,9 +2248,9 @@ void Aura::CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplicati } } -void Aura::CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount) +void Aura::CallScriptEffectAfterManaShieldHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount) { - for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD, aurApp); std::list<AuraScript::EffectManaShieldHandler>::iterator effEndItr = (*scritr)->AfterEffectManaShield.end(), effItr = (*scritr)->AfterEffectManaShield.begin(); @@ -2263,7 +2263,7 @@ void Aura::CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraAppl } } -UnitAura::UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID) +UnitAura::UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID) : Aura(spellproto, owner, caster, castItem, casterGUID) { m_AuraDRGroup = DIMINISHING_NONE; @@ -2297,7 +2297,7 @@ void UnitAura::Remove(AuraRemoveMode removeMode) GetUnitOwner()->RemoveOwnedAura(this, removeMode); } -void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster) +void UnitAura::FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster) { for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS ; ++effIndex) { @@ -2355,7 +2355,7 @@ void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster) for (UnitList::iterator itr = targetList.begin(); itr!= targetList.end();++itr) { - std::map<Unit *, uint8>::iterator existing = targets.find(*itr); + std::map<Unit* , uint8>::iterator existing = targets.find(*itr); if (existing != targets.end()) existing->second |= 1<<effIndex; else @@ -2364,7 +2364,7 @@ void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster) } } -DynObjAura::DynObjAura(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID) +DynObjAura::DynObjAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID) : Aura(spellproto, owner, caster, castItem, casterGUID) { LoadScripts(); @@ -2382,7 +2382,7 @@ void DynObjAura::Remove(AuraRemoveMode removeMode) _Remove(removeMode); } -void DynObjAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* /*caster*/) +void DynObjAura::FillTargetMap(std::map<Unit* , uint8> & targets, Unit* /*caster*/) { Unit* dynObjOwnerCaster = GetDynobjOwner()->GetCaster(); float radius = GetDynobjOwner()->GetRadius(); @@ -2408,7 +2408,7 @@ void DynObjAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* /*caster for (UnitList::iterator itr = targetList.begin(); itr!= targetList.end();++itr) { - std::map<Unit *, uint8>::iterator existing = targets.find(*itr); + std::map<Unit* , uint8>::iterator existing = targets.find(*itr); if (existing != targets.end()) existing->second |= 1<<effIndex; else diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index 1c22a31e791..6c641ef7d9b 100755 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -42,19 +42,19 @@ class AuraApplication { friend void Unit::_ApplyAura(AuraApplication * aurApp, uint8 effMask); friend void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMode); - friend void Unit::_ApplyAuraEffect(Aura * aura, uint8 effIndex); + friend void Unit::_ApplyAuraEffect(Aura* aura, uint8 effIndex); friend void Unit::RemoveAura(AuraApplication * aurApp, AuraRemoveMode mode); - friend AuraApplication * Unit::_CreateAuraApplication(Aura * aura, uint8 effMask); + friend AuraApplication * Unit::_CreateAuraApplication(Aura* aura, uint8 effMask); private: Unit* const m_target; - Aura * const m_base; + Aura* const m_base; uint8 m_slot; // Aura slot on unit uint8 m_flags; // Aura info flag uint8 m_effectsToApply; // Used only at spell hit to determine which effect should be applied AuraRemoveMode m_removeMode:8; // Store info for know remove aura reason bool m_needClientUpdate:1; - explicit AuraApplication(Unit* target, Unit* caster, Aura * base, uint8 effMask); + explicit AuraApplication(Unit* target, Unit* caster, Aura* base, uint8 effMask); void _Remove(); private: void _InitFlags(Unit* caster, uint8 effMask); @@ -62,7 +62,7 @@ class AuraApplication public: Unit* GetTarget() const { return m_target; } - Aura * GetBase() const { return m_base; } + Aura* GetBase() const { return m_base; } uint8 GetSlot() const { return m_slot; } uint8 GetFlags() const { return m_flags; } @@ -83,15 +83,15 @@ class AuraApplication class Aura { - friend Aura * Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); + friend Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8 effMask, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); public: typedef std::map<uint64, AuraApplication *> ApplicationMap; static uint8 BuildEffectMaskForOwner(SpellInfo const* spellProto, uint8 avalibleEffectMask, WorldObject* owner); static Aura* TryRefreshStackOrCreate(SpellInfo const* spellproto, uint8 tryEffMask, WorldObject* owner, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0, bool* refresh = NULL); - static Aura* TryCreate(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0); + static Aura* TryCreate(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0); static Aura* Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32* baseAmount, Item* castItem, uint64 casterGUID); - explicit Aura(SpellInfo const* spellproto, WorldObject * owner, Unit* caster, Item* castItem, uint64 casterGUID); + explicit Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* castItem, uint64 casterGUID); void _InitEffects(uint8 effMask, Unit* caster, int32 *baseAmount); virtual ~Aura(); @@ -101,9 +101,9 @@ class Aura uint64 GetCastItemGUID() const { return m_castItemGuid; } uint64 GetCasterGUID() const { return m_casterGuid; } Unit* GetCaster() const; - WorldObject * GetOwner() const { return m_owner; } + WorldObject* GetOwner() const { return m_owner; } Unit* GetUnitOwner() const { ASSERT(GetType() == UNIT_AURA_TYPE); return (Unit*)m_owner; } - DynamicObject * GetDynobjOwner() const { ASSERT(GetType() == DYNOBJ_AURA_TYPE); return (DynamicObject*)m_owner; } + DynamicObject* GetDynobjOwner() const { ASSERT(GetType() == DYNOBJ_AURA_TYPE); return (DynamicObject*)m_owner; } AuraObjectType GetType() const; @@ -112,14 +112,14 @@ class Aura void _Remove(AuraRemoveMode removeMode); virtual void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT) = 0; - virtual void FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster) = 0; + virtual void FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster) = 0; void UpdateTargetMap(Unit* caster, bool apply = true); void _RegisterForTargets() {Unit* caster = GetCaster(); UpdateTargetMap(caster, false);} void ApplyForTargets() {Unit* caster = GetCaster(); UpdateTargetMap(caster, true);} void _ApplyEffectForTargets(uint8 effIndex); - void UpdateOwner(uint32 diff, WorldObject * owner); + void UpdateOwner(uint32 diff, WorldObject* owner); void Update(uint32 diff, Unit* caster); time_t GetApplyTime() const { return m_applyTime; } @@ -167,7 +167,7 @@ class Aura // helpers for aura effects bool HasEffect(uint8 effIndex) const { return bool(GetEffect(effIndex)); } bool HasEffectType(AuraType type) const; - AuraEffect * GetEffect(uint8 effIndex) const { ASSERT (effIndex < MAX_SPELL_EFFECTS); return m_effects[effIndex]; } + AuraEffect* GetEffect(uint8 effIndex) const { ASSERT (effIndex < MAX_SPELL_EFFECTS); return m_effects[effIndex]; } uint8 GetEffectMask() const { uint8 effMask = 0; for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) if (m_effects[i]) effMask |= 1<<i; return effMask; } void RecalculateAmountOfEffects(); void HandleAllEffects(AuraApplication * aurApp, uint8 mode, bool apply); @@ -203,15 +203,15 @@ class Aura void CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode); void CallScriptAfterEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode); bool CallScriptEffectPeriodicHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp); - void CallScriptEffectUpdatePeriodicHandlers(AuraEffect * aurEff); + void CallScriptEffectUpdatePeriodicHandlers(AuraEffect* aurEff); void CallScriptEffectCalcAmountHandlers(AuraEffect const* aurEff, int32 & amount, bool & canBeRecalculated); void CallScriptEffectCalcPeriodicHandlers(AuraEffect const* aurEff, bool & isPeriodic, int32 & amplitude); - void CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellModifier *& spellMod); - void CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & defaultPrevented); - void CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount); - void CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & defaultPrevented); - void CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount); - std::list<AuraScript *> m_loadedScripts; + void CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellModifier* & spellMod); + void CallScriptEffectAbsorbHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & defaultPrevented); + void CallScriptEffectAfterAbsorbHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount); + void CallScriptEffectManaShieldHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & defaultPrevented); + void CallScriptEffectAfterManaShieldHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount); + std::list<AuraScript*> m_loadedScripts; private: void _DeleteRemovedApplications(); protected: @@ -219,7 +219,7 @@ class Aura uint64 const m_casterGuid; uint64 const m_castItemGuid; // it is NOT safe to keep a pointer to the item because it may get deleted time_t const m_applyTime; - WorldObject * const m_owner; // + WorldObject* const m_owner; // int32 m_maxDuration; // Max aura duration int32 m_duration; // Current time @@ -230,7 +230,7 @@ class Aura uint8 m_procCharges; // Aura charges (0 for infinite) uint8 m_stackAmount; // Aura stack amount - AuraEffect * m_effects[3]; + AuraEffect* m_effects[3]; ApplicationMap m_applications; bool m_isRemoved:1; @@ -243,16 +243,16 @@ class Aura class UnitAura : public Aura { - friend Aura * Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); + friend Aura* Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); protected: - explicit UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); + explicit UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); public: void _ApplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp); void _UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * aurApp); void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); - void FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster); + void FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster); // Allow Apply Aura Handler to modify and access m_AuraDRGroup void SetDiminishGroup(DiminishingGroup group) { m_AuraDRGroup = group; } @@ -264,12 +264,12 @@ class UnitAura : public Aura class DynObjAura : public Aura { - friend Aura * Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); + friend Aura* Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); protected: - explicit DynObjAura(SpellInfo const* spellproto, uint8 effMask, WorldObject * owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); + explicit DynObjAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID); public: void Remove(AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); - void FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster); + void FillTargetMap(std::map<Unit* , uint8> & targets, Unit* caster); }; #endif diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 9f38ab18a31..7be3e1f2fa0 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -419,7 +419,7 @@ void SpellCastTargets::Update(Unit* caster) // update positions by transport move if (HasSrc() && m_srcTransGUID) { - if (WorldObject * transport = ObjectAccessor::GetWorldObject(*caster, m_srcTransGUID)) + if (WorldObject* transport = ObjectAccessor::GetWorldObject(*caster, m_srcTransGUID)) { m_srcPos.Relocate(transport); m_srcPos.RelocateOffset(m_srcTransOffset); @@ -428,7 +428,7 @@ void SpellCastTargets::Update(Unit* caster) if (HasDst() && m_dstTransGUID) { - if (WorldObject * transport = ObjectAccessor::GetWorldObject(*caster, m_dstTransGUID)) + if (WorldObject* transport = ObjectAccessor::GetWorldObject(*caster, m_dstTransGUID)) { m_dstPos.Relocate(transport); m_dstPos.RelocateOffset(m_dstTransOffset); @@ -467,7 +467,7 @@ SpellValue::SpellValue(SpellInfo const* proto) AuraStackAmount = 1; } -Spell::Spell(Unit* caster, SpellInfo const *info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID, bool skipCheck) : +Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID, bool skipCheck) : m_spellInfo(sSpellMgr->GetSpellForDifficultyFromSpell(info, caster)), m_caster((info->AttributesEx6 & SPELL_ATTR6_CAST_BY_CHARMER && caster->GetCharmerOrOwner()) ? caster->GetCharmerOrOwner() : caster) , m_spellValue(new SpellValue(m_spellInfo)) @@ -572,7 +572,7 @@ Spell::~Spell() // unload scripts while(!m_loadedScripts.empty()) { - std::list<SpellScript *>::iterator itr = m_loadedScripts.begin(); + std::list<SpellScript*>::iterator itr = m_loadedScripts.begin(); (*itr)->_Unload(); delete (*itr); m_loadedScripts.erase(itr); @@ -1140,7 +1140,7 @@ void Spell::AddItemTarget(Item* pitem, uint32 effIndex) m_UniqueItemInfo.push_back(target); } -void Spell::DoAllEffectOnTarget(TargetInfo *target) +void Spell::DoAllEffectOnTarget(TargetInfo* target) { if (!target || target->processed) return; @@ -1182,7 +1182,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) return; // No missinfo in that case // Get original caster (if exist) and calculate damage/healing from him data - Unit *caster = m_originalCaster ? m_originalCaster : m_caster; + Unit* caster = m_originalCaster ? m_originalCaster : m_caster; // Skip if m_originalCaster not avaiable if (!caster) @@ -1406,7 +1406,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) } } -SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool scaleAura) +SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool scaleAura) { if (!unit || !effectMask) return SPELL_MISS_EVADE; @@ -1575,7 +1575,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool return SPELL_MISS_NONE; } -void Spell::DoTriggersOnSpellHit(Unit *unit, uint8 effMask) +void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask) { // Apply additional spell effects to target // TODO: move this code to scripts @@ -1618,12 +1618,12 @@ void Spell::DoTriggersOnSpellHit(Unit *unit, uint8 effMask) // set duration of current aura to the triggered spell if (i->first->GetDuration() == -1) { - if (Aura * triggeredAur = unit->GetAura(i->first->Id, m_caster->GetGUID())) + if (Aura* triggeredAur = unit->GetAura(i->first->Id, m_caster->GetGUID())) { // get duration from aura-only once if (!_duration) { - Aura * aur = unit->GetAura(m_spellInfo->Id, m_caster->GetGUID()); + Aura* aur = unit->GetAura(m_spellInfo->Id, m_caster->GetGUID()); _duration = aur ? aur->GetDuration() : -1; } triggeredAur->SetDuration(_duration); @@ -1643,7 +1643,7 @@ void Spell::DoTriggersOnSpellHit(Unit *unit, uint8 effMask) unit->CastSpell(unit, *i, true, 0, 0, m_caster->GetGUID()); } -void Spell::DoAllEffectOnTarget(GOTargetInfo *target) +void Spell::DoAllEffectOnTarget(GOTargetInfo* target) { if (target->processed) // Check target return; @@ -1674,7 +1674,7 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo *target) CallScriptAfterHitHandlers(); } -void Spell::DoAllEffectOnTarget(ItemTargetInfo *target) +void Spell::DoAllEffectOnTarget(ItemTargetInfo* target) { uint32 effectMask = target->effectMask; if (!target->item || !effectMask) @@ -1718,7 +1718,7 @@ bool Spell::UpdateChanneledTargetList() { if (ihit->missCondition == SPELL_MISS_NONE && (channelTargetEffectMask & ihit->effectMask)) { - Unit *unit = m_caster->GetGUID() == ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID); + Unit* unit = m_caster->GetGUID() == ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID); if (!unit) continue; @@ -1779,7 +1779,7 @@ struct ChainHealingOrder : public std::binary_function<const Unit*, const Unit*, void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uint32 num, SpellTargets TargetType) { - Unit *cur = m_targets.GetUnitTarget(); + Unit* cur = m_targets.GetUnitTarget(); if (!cur) return; @@ -1948,7 +1948,7 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, Spe case SPELL_TARGET_TYPE_GAMEOBJECT: if ((*i_spellST)->mConditionValue2) { - if (GameObject *go = m_caster->FindNearestGameObject((*i_spellST)->mConditionValue2, range)) + if (GameObject* go = m_caster->FindNearestGameObject((*i_spellST)->mConditionValue2, range)) { // remember found target and range, next attempt will find more near target with another entry goScriptTarget = go; @@ -1972,7 +1972,7 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, Spe return m_targets.GetUnitTarget(); case SPELL_TARGET_TYPE_DEAD: default: - if (Creature *cre = m_caster->FindNearestCreature((*i_spellST)->mConditionValue2, range, (*i_spellST)->mConditionValue1 != SPELL_TARGET_TYPE_DEAD)) + if (Creature* cre = m_caster->FindNearestCreature((*i_spellST)->mConditionValue2, range, (*i_spellST)->mConditionValue1 != SPELL_TARGET_TYPE_DEAD)) { creatureScriptTarget = cre; goScriptTarget = NULL; @@ -2010,7 +2010,7 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, Spe void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur) { SpellNotifyPushType pushType = PUSH_NONE; - Player *modOwner = NULL; + Player* modOwner = NULL; if (m_originalCaster) modOwner = m_originalCaster->GetSpellModOwner(); @@ -2052,7 +2052,7 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur) pushType = PUSH_CASTER_CENTER; break; case TARGET_UNIT_VEHICLE: - if (Unit *vehicle = m_caster->GetVehicleBase()) + if (Unit* vehicle = m_caster->GetVehicleBase()) AddUnitTarget(vehicle, i); break; case TARGET_UNIT_PASSENGER_0: @@ -2064,7 +2064,7 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur) case TARGET_UNIT_PASSENGER_6: case TARGET_UNIT_PASSENGER_7: if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsVehicle()) - if (Unit *unit = m_caster->GetVehicleKit()->GetPassenger(cur.GetTarget() - TARGET_UNIT_PASSENGER_0)) + if (Unit* unit = m_caster->GetVehicleKit()->GetPassenger(cur.GetTarget() - TARGET_UNIT_PASSENGER_0)) AddUnitTarget(unit, i); break; default: @@ -2085,14 +2085,14 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur) switch (cur.GetTarget()) { case TARGET_UNIT_TARGET_ENEMY: - if (Unit *magnet = m_caster->SelectMagnetTarget(target, m_spellInfo)) + if (Unit* magnet = m_caster->SelectMagnetTarget(target, m_spellInfo)) if (magnet != target) m_targets.SetUnitTarget(magnet); pushType = PUSH_CHAIN; break; case TARGET_UNIT_TARGET_ANY: if (!m_spellInfo->IsPositive()) - if (Unit *magnet = m_caster->SelectMagnetTarget(target, m_spellInfo)) + if (Unit* magnet = m_caster->SelectMagnetTarget(target, m_spellInfo)) if (magnet != target) m_targets.SetUnitTarget(magnet); pushType = PUSH_CHAIN; @@ -2123,7 +2123,7 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur) case TARGET_TYPE_UNIT_NEARBY: { - WorldObject *target = NULL; + WorldObject* target = NULL; float range; switch (cur.GetTarget()) @@ -2349,7 +2349,7 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur) float range = m_spellInfo->GetMaxRange(m_spellInfo->IsPositive()); if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this); - if (WorldObject *target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY, SpellEffIndex(i))) + if (WorldObject* target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY, SpellEffIndex(i))) m_targets.SetDst(*target); break; } @@ -2666,7 +2666,7 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur) Group* pGroup = targetPlayer ? targetPlayer->GetGroup() : NULL; if (pGroup) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* Target = itr->getSource(); @@ -3608,7 +3608,7 @@ void Spell::finish(bool ok) // Unsummon summon as possessed creatures on spell cancel if (m_spellInfo->IsChanneled() && m_caster->GetTypeId() == TYPEID_PLAYER) { - if (Unit *charm = m_caster->GetCharm()) + if (Unit* charm = m_caster->GetCharm()) if (charm->GetTypeId() == TYPEID_UNIT && charm->ToCreature()->HasUnitTypeMask(UNIT_MASK_PUPPET) && charm->GetUInt32Value(UNIT_CREATED_BY_SPELL) == m_spellInfo->Id) @@ -3625,7 +3625,7 @@ void Spell::finish(bool ok) { // Unsummon statue uint32 spell = m_caster->GetUInt32Value(UNIT_CREATED_BY_SPELL); - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell); if (spellInfo && spellInfo->SpellIconID == 2056) { sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Statue %d is unsummoned in spell %d finish", m_caster->GetGUIDLow(), m_spellInfo->Id); @@ -3911,14 +3911,14 @@ void Spell::SendSpellGo() m_caster->SendMessageToSet(&data, true); } -void Spell::WriteAmmoToPacket(WorldPacket * data) +void Spell::WriteAmmoToPacket(WorldPacket* data) { uint32 ammoInventoryType = 0; uint32 ammoDisplayID = 0; if (m_caster->GetTypeId() == TYPEID_PLAYER) { - Item *pItem = m_caster->ToPlayer()->GetWeaponForAttack(RANGED_ATTACK); + Item* pItem = m_caster->ToPlayer()->GetWeaponForAttack(RANGED_ATTACK); if (pItem) { ammoInventoryType = pItem->GetTemplate()->InventoryType; @@ -3929,7 +3929,7 @@ void Spell::WriteAmmoToPacket(WorldPacket * data) uint32 ammoID = m_caster->ToPlayer()->GetUInt32Value(PLAYER_AMMO_ID); if (ammoID) { - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(ammoID); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(ammoID); if (pProto) { ammoDisplayID = pProto->DisplayInfoID; @@ -3983,7 +3983,7 @@ void Spell::WriteAmmoToPacket(WorldPacket * data) *data << uint32(ammoInventoryType); } -void Spell::WriteSpellGoTargets(WorldPacket * data) +void Spell::WriteSpellGoTargets(WorldPacket* data) { // This function also fill data for channeled spells: // m_needAliveTargetMask req for stop channelig if one target die @@ -4097,7 +4097,7 @@ void Spell::ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit* victim, uint3 *m_effectExecuteData[effIndex] << uint32(damage); } -void Spell::ExecuteLogEffectOpenLock(uint8 effIndex, Object * obj) +void Spell::ExecuteLogEffectOpenLock(uint8 effIndex, Object* obj) { InitEffectExecuteData(effIndex); m_effectExecuteData[effIndex]->append(obj->GetPackGUID()); @@ -4115,13 +4115,13 @@ void Spell::ExecuteLogEffectDestroyItem(uint8 effIndex, uint32 entry) *m_effectExecuteData[effIndex] << uint32(entry); } -void Spell::ExecuteLogEffectSummonObject(uint8 effIndex, WorldObject * obj) +void Spell::ExecuteLogEffectSummonObject(uint8 effIndex, WorldObject* obj) { InitEffectExecuteData(effIndex); m_effectExecuteData[effIndex]->append(obj->GetPackGUID()); } -void Spell::ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject * obj) +void Spell::ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject* obj) { InitEffectExecuteData(effIndex); m_effectExecuteData[effIndex]->append(obj->GetPackGUID()); @@ -4215,7 +4215,7 @@ void Spell::TakeCastItem() if (_triggeredCastFlags & TRIGGERED_IGNORE_CAST_ITEM) return; - ItemTemplate const *proto = m_CastItem->GetTemplate(); + ItemTemplate const* proto = m_CastItem->GetTemplate(); if (!proto) { @@ -4287,7 +4287,7 @@ void Spell::TakePower() if (ihit->missCondition != SPELL_MISS_NONE) { //lower spell cost on fail (by talent aura) - if (Player *modOwner = m_caster->ToPlayer()->GetSpellModOwner()) + if (Player* modOwner = m_caster->ToPlayer()->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_SPELL_COST_REFUND_ON_FAIL, m_powerCost); } break; @@ -4330,7 +4330,7 @@ void Spell::TakeAmmo() { if (m_attackType == RANGED_ATTACK && m_caster->GetTypeId() == TYPEID_PLAYER) { - Item *pItem = m_caster->ToPlayer()->GetWeaponForAttack(RANGED_ATTACK); + Item* pItem = m_caster->ToPlayer()->GetWeaponForAttack(RANGED_ATTACK); // wands don't have ammo if (!pItem || pItem->IsBroken() || pItem->GetTemplate()->SubClass == ITEM_SUBCLASS_WEAPON_WAND) @@ -4363,12 +4363,12 @@ SpellCastResult Spell::CheckRuneCost(uint32 runeCostID) if (m_caster->GetTypeId() != TYPEID_PLAYER) return SPELL_CAST_OK; - Player *plr = (Player*)m_caster; + Player* plr = (Player*)m_caster; if (plr->getClass() != CLASS_DEATH_KNIGHT) return SPELL_CAST_OK; - SpellRuneCostEntry const *src = sSpellRuneCostStore.LookupEntry(runeCostID); + SpellRuneCostEntry const* src = sSpellRuneCostStore.LookupEntry(runeCostID); if (!src) return SPELL_CAST_OK; @@ -4409,11 +4409,11 @@ void Spell::TakeRunePower(bool didHit) if (m_caster->GetTypeId() != TYPEID_PLAYER || m_caster->getClass() != CLASS_DEATH_KNIGHT) return; - SpellRuneCostEntry const *runeCostData = sSpellRuneCostStore.LookupEntry(m_spellInfo->RuneCostID); + SpellRuneCostEntry const* runeCostData = sSpellRuneCostStore.LookupEntry(m_spellInfo->RuneCostID); if (!runeCostData || (runeCostData->NoRuneCost() && runeCostData->NoRunicPowerGain())) return; - Player *player = m_caster->ToPlayer(); + Player* player = m_caster->ToPlayer(); m_runesState = player->GetRunesState(); // store previous state int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death @@ -4568,7 +4568,7 @@ void Spell::HandleThreatSpells() sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell %u, added an additional %f threat for %s %u target(s)", m_spellInfo->Id, threat, m_spellInfo->_IsPositiveSpell() ? "assisting" : "harming", uint32(m_UniqueTargetInfo.size())); } -void Spell::HandleEffects(Unit *pUnitTarget, Item *pItemTarget, GameObject *pGOTarget, uint32 i) +void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOTarget, uint32 i) { //effect has been handled, skip it if (m_effectMask & (1<<i)) @@ -4901,7 +4901,7 @@ SpellCastResult Spell::CheckCast(bool strict) } else if (m_spellInfo->Id == 19938) // Awaken Peon { - Unit *unit = m_targets.GetUnitTarget(); + Unit* unit = m_targets.GetUnitTarget(); if (!unit || !unit->HasAura(17743)) return SPELL_FAILED_BAD_TARGETS; } @@ -4935,7 +4935,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (!pet) return SPELL_FAILED_NO_PET; - SpellInfo const *learn_spellproto = sSpellMgr->GetSpellInfo(m_spellInfo->Effects[i].TriggerSpell); + SpellInfo const* learn_spellproto = sSpellMgr->GetSpellInfo(m_spellInfo->Effects[i].TriggerSpell); if (!learn_spellproto) return SPELL_FAILED_NOT_KNOWN; @@ -4954,7 +4954,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (!pet) return SPELL_FAILED_NO_PET; - SpellInfo const *learn_spellproto = sSpellMgr->GetSpellInfo(m_spellInfo->Effects[i].TriggerSpell); + SpellInfo const* learn_spellproto = sSpellMgr->GetSpellInfo(m_spellInfo->Effects[i].TriggerSpell); if (!learn_spellproto) return SPELL_FAILED_NOT_KNOWN; @@ -4967,7 +4967,7 @@ SpellCastResult Spell::CheckCast(bool strict) case SPELL_EFFECT_APPLY_GLYPH: { uint32 glyphId = m_spellInfo->Effects[i].MiscValue; - if (GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyphId)) + if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyphId)) if (m_caster->HasAura(gp->SpellId)) return SPELL_FAILED_UNIQUE_GLYPH; break; @@ -5058,7 +5058,7 @@ SpellCastResult Spell::CheckCast(bool strict) || (m_spellInfo->Effects[i].TargetA.GetTarget() == TARGET_GAMEOBJECT_TARGET && !m_targets.GetGOTarget())) return SPELL_FAILED_BAD_TARGETS; - Item *pTempItem = NULL; + Item* pTempItem = NULL; if (m_targets.GetTargetMask() & TARGET_FLAG_TRADE_ITEM) { if (TradeData* pTrade = m_caster->ToPlayer()->GetTradeData()) @@ -5113,7 +5113,7 @@ SpellCastResult Spell::CheckCast(bool strict) } case SPELL_EFFECT_SUMMON_DEAD_PET: { - Creature *pet = m_caster->GetGuardianPet(); + Creature* pet = m_caster->GetGuardianPet(); if (!pet) return SPELL_FAILED_NO_PET; @@ -5125,7 +5125,7 @@ SpellCastResult Spell::CheckCast(bool strict) // This is generic summon effect case SPELL_EFFECT_SUMMON: { - SummonPropertiesEntry const *SummonProperties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[i].MiscValueB); + SummonPropertiesEntry const* SummonProperties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[i].MiscValueB); if (!SummonProperties) break; switch (SummonProperties->Category) @@ -5225,7 +5225,7 @@ SpellCastResult Spell::CheckCast(bool strict) { //Do not allow to cast it before BG starts. if (m_caster->GetTypeId() == TYPEID_PLAYER) - if (Battleground const *bg = m_caster->ToPlayer()->GetBattleground()) + if (Battleground const* bg = m_caster->ToPlayer()->GetBattleground()) if (bg->GetStatus() != STATUS_IN_PROGRESS) return SPELL_FAILED_TRY_AGAIN; break; @@ -5329,7 +5329,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (m_caster->GetTypeId() != TYPEID_PLAYER) return SPELL_FAILED_NO_PET; - Pet *pet = m_caster->ToPlayer()->GetPet(); + Pet* pet = m_caster->ToPlayer()->GetPet(); if (!pet) return SPELL_FAILED_NO_PET; @@ -5379,7 +5379,7 @@ SpellCastResult Spell::CheckCast(bool strict) // Ignore map check if spell have AreaId. AreaId already checked and this prevent special mount spells bool allowMount = !m_caster->GetMap()->IsDungeon() || m_caster->GetMap()->IsBattlegroundOrArena(); - InstanceTemplate const *it = sObjectMgr->GetInstanceTemplate(m_caster->GetMapId()); + InstanceTemplate const* it = sObjectMgr->GetInstanceTemplate(m_caster->GetMapId()); if (it) allowMount = it->AllowMount; if (m_caster->GetTypeId() == TYPEID_PLAYER && !allowMount && !m_spellInfo->AreaGroupId) @@ -5471,7 +5471,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target) return SPELL_FAILED_SPELL_IN_PROGRESS; // dead owner (pets still alive when owners ressed?) - if (Unit *owner = m_caster->GetCharmerOrOwner()) + if (Unit* owner = m_caster->GetCharmerOrOwner()) if (!owner->isAlive()) return SPELL_FAILED_CASTER_DEAD; @@ -5641,7 +5641,7 @@ bool Spell::CanAutoCast(Unit* target) } else { - if (AuraEffect * aureff = target->GetAuraEffect(m_spellInfo->Id, j)) + if (AuraEffect* aureff = target->GetAuraEffect(m_spellInfo->Id, j)) if (aureff->GetBase()->GetStackAmount() >= m_spellInfo->StackAmount) return false; } @@ -5779,7 +5779,7 @@ SpellCastResult Spell::CheckItems() if (!p_caster->HasItemCount(itemid, 1)) return SPELL_FAILED_ITEM_NOT_READY; - ItemTemplate const *proto = m_CastItem->GetTemplate(); + ItemTemplate const* proto = m_CastItem->GetTemplate(); if (!proto) return SPELL_FAILED_ITEM_NOT_READY; @@ -5904,7 +5904,7 @@ SpellCastResult Spell::CheckItems() // if CastItem is also spell reagent if (m_CastItem && m_CastItem->GetEntry() == itemid) { - ItemTemplate const *proto = m_CastItem->GetTemplate(); + ItemTemplate const* proto = m_CastItem->GetTemplate(); if (!proto) return SPELL_FAILED_ITEM_NOT_READY; for (int s=0; s < MAX_ITEM_PROTO_SPELLS; ++s) @@ -5973,7 +5973,7 @@ SpellCastResult Spell::CheckItems() InventoryResult msg = p_caster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->Effects[i].ItemType, 1); if (msg != EQUIP_ERR_OK) { - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(m_spellInfo->Effects[i].ItemType); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(m_spellInfo->Effects[i].ItemType); // TODO: Needs review if (pProto && !(pProto->ItemLimitCategory)) { @@ -6024,7 +6024,7 @@ SpellCastResult Spell::CheckItems() bool isItemUsable = false; for (uint8 e = 0; e < MAX_ITEM_PROTO_SPELLS; ++e) { - ItemTemplate const *proto = targetItem->GetTemplate(); + ItemTemplate const* proto = targetItem->GetTemplate(); if (proto->Spells[e].SpellId && ( proto->Spells[e].SpellTrigger == ITEM_SPELLTRIGGER_ON_USE || proto->Spells[e].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE)) @@ -6034,7 +6034,7 @@ SpellCastResult Spell::CheckItems() } } - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(m_spellInfo->Effects[i].MiscValue); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(m_spellInfo->Effects[i].MiscValue); // do not allow adding usable enchantments to items that have use effect already if (pEnchant && isItemUsable) for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s) @@ -6053,14 +6053,14 @@ SpellCastResult Spell::CheckItems() } case SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY: { - Item *item = m_targets.GetItemTarget(); + Item* item = m_targets.GetItemTarget(); if (!item) return SPELL_FAILED_ITEM_NOT_FOUND; // Not allow enchant in trade slot for some enchant type if (item->GetOwner() != m_caster) { uint32 enchant_id = m_spellInfo->Effects[i].MiscValue; - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) return SPELL_FAILED_ERROR; if (pEnchant->slot & ENCHANTMENT_CAN_SOULBOUND) @@ -6151,7 +6151,7 @@ SpellCastResult Spell::CheckItems() if (m_caster->GetTypeId() != TYPEID_PLAYER) return SPELL_FAILED_TARGET_NOT_PLAYER; if (m_attackType != RANGED_ATTACK) break; - Item *pItem = m_caster->ToPlayer()->GetWeaponForAttack(m_attackType); + Item* pItem = m_caster->ToPlayer()->GetWeaponForAttack(m_attackType); if (!pItem || pItem->IsBroken()) return SPELL_FAILED_EQUIPPED_ITEM; @@ -6177,7 +6177,7 @@ SpellCastResult Spell::CheckItems() return SPELL_FAILED_NO_AMMO; } - ItemTemplate const *ammoProto = sObjectMgr->GetItemTemplate(ammo); + ItemTemplate const* ammoProto = sObjectMgr->GetItemTemplate(ammo); if (!ammoProto) return SPELL_FAILED_NO_AMMO; @@ -6216,7 +6216,7 @@ SpellCastResult Spell::CheckItems() case SPELL_EFFECT_CREATE_MANA_GEM: { uint32 item_id = m_spellInfo->Effects[i].ItemType; - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item_id); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item_id); if (!pProto) return SPELL_FAILED_ITEM_AT_MAX_CHARGES; @@ -6416,7 +6416,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const if (!m_targets.GetCorpseTargetGUID()) return false; - Corpse *corpse = ObjectAccessor::GetCorpse(*m_caster, m_targets.GetCorpseTargetGUID()); + Corpse* corpse = ObjectAccessor::GetCorpse(*m_caster, m_targets.GetCorpseTargetGUID()); if (!corpse) return false; @@ -6431,7 +6431,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const break; default: // normal case // Get GO cast coordinates if original caster -> GO - WorldObject *caster = NULL; + WorldObject* caster = NULL; if (IS_GAMEOBJECT_GUID(m_originalCasterGUID)) caster = m_caster->GetMap()->GetGameObject(m_originalCasterGUID); if (!caster) @@ -6676,7 +6676,7 @@ void Spell::CalculateDamageDoneForAllTargets() } } -int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float * multiplier) +int32 Spell::CalculateDamageDone(Unit* unit, const uint32 effectMask, float * multiplier) { int32 damageDone = 0; unitTarget = unit; @@ -6739,7 +6739,7 @@ SpellCastResult Spell::CanOpenLock(uint32 effIndex, uint32 lockId, SkillType& sk return SPELL_CAST_OK; // Get LockInfo - LockEntry const *lockInfo = sLockStore.LookupEntry(lockId); + LockEntry const* lockInfo = sLockStore.LookupEntry(lockId); if (!lockInfo) return SPELL_FAILED_BAD_TARGETS; @@ -7001,11 +7001,11 @@ void Spell::LoadScripts() { sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::LoadScripts"); sScriptMgr->CreateSpellScripts(m_spellInfo->Id, m_loadedScripts); - for (std::list<SpellScript *>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) + for (std::list<SpellScript*>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) { if (!(*itr)->_Load(this)) { - std::list<SpellScript *>::iterator bitr = itr; + std::list<SpellScript*>::iterator bitr = itr; ++itr; m_loadedScripts.erase(bitr); continue; @@ -7017,14 +7017,14 @@ void Spell::LoadScripts() void Spell::PrepareScriptHitHandlers() { - for (std::list<SpellScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) (*scritr)->_InitHit(); } SpellCastResult Spell::CallScriptCheckCastHandlers() { SpellCastResult retVal = SPELL_CAST_OK; - for (std::list<SpellScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_CHECK_CAST); std::list<SpellScript::CheckCastHandler>::iterator hookItrEnd = (*scritr)->OnCheckCast.end(), hookItr = (*scritr)->OnCheckCast.begin(); @@ -7044,7 +7044,7 @@ bool Spell::CallScriptEffectHandlers(SpellEffIndex effIndex) { // execute script effect handler hooks and check if effects was prevented bool preventDefault = false; - for (std::list<SpellScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_EFFECT); std::list<SpellScript::EffectHandler>::iterator effEndItr = (*scritr)->OnEffect.end(), effItr = (*scritr)->OnEffect.begin(); @@ -7063,7 +7063,7 @@ bool Spell::CallScriptEffectHandlers(SpellEffIndex effIndex) void Spell::CallScriptBeforeHitHandlers() { - for (std::list<SpellScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_BEFORE_HIT); std::list<SpellScript::HitHandler>::iterator hookItrEnd = (*scritr)->BeforeHit.end(), hookItr = (*scritr)->BeforeHit.begin(); @@ -7076,7 +7076,7 @@ void Spell::CallScriptBeforeHitHandlers() void Spell::CallScriptOnHitHandlers() { - for (std::list<SpellScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_HIT); std::list<SpellScript::HitHandler>::iterator hookItrEnd = (*scritr)->OnHit.end(), hookItr = (*scritr)->OnHit.begin(); @@ -7089,7 +7089,7 @@ void Spell::CallScriptOnHitHandlers() void Spell::CallScriptAfterHitHandlers() { - for (std::list<SpellScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_AFTER_HIT); std::list<SpellScript::HitHandler>::iterator hookItrEnd = (*scritr)->AfterHit.end(), hookItr = (*scritr)->AfterHit.begin(); @@ -7102,7 +7102,7 @@ void Spell::CallScriptAfterHitHandlers() void Spell::CallScriptAfterUnitTargetSelectHandlers(std::list<Unit*>& unitTargets, SpellEffIndex effIndex) { - for (std::list<SpellScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) + for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr) { (*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_UNIT_TARGET_SELECT); std::list<SpellScript::UnitTargetHandler>::iterator hookItrEnd = (*scritr)->OnUnitTargetSelect.end(), hookItr = (*scritr)->OnUnitTargetSelect.begin(); @@ -7166,9 +7166,9 @@ void Spell::PrepareTriggersExecutedOnHit() { if (!(*i)->IsAffectedOnSpell(m_spellInfo)) continue; - SpellInfo const *auraSpellInfo = (*i)->GetSpellInfo(); + SpellInfo const* auraSpellInfo = (*i)->GetSpellInfo(); uint32 auraSpellIdx = (*i)->GetEffIndex(); - if (SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(auraSpellInfo->Effects[auraSpellIdx].TriggerSpell)) + if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(auraSpellInfo->Effects[auraSpellIdx].TriggerSpell)) { // calculate the chance using spell base amount, because aura amount is not updated on combo-points change // this possibly needs fixing diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index a318599076a..b54061bc87d 100755 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -355,7 +355,7 @@ class Spell typedef std::set<Aura*> UsedSpellMods; - Spell(Unit* caster, SpellInfo const *info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID = 0, bool skipCheck = false); + Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID = 0, bool skipCheck = false); ~Spell(); void prepare(SpellCastTargets const* targets, AuraEffect const* triggeredByAura = NULL); @@ -395,8 +395,8 @@ class Spell void setState(uint32 state) { m_spellState = state; } void DoCreateItem(uint32 i, uint32 itemtype); - void WriteSpellGoTargets(WorldPacket * data); - void WriteAmmoToPacket(WorldPacket * data); + void WriteSpellGoTargets(WorldPacket* data); + void WriteAmmoToPacket(WorldPacket* data); void InitExplicitTargets(SpellCastTargets const& targets); void SelectSpellTargets(); @@ -420,18 +420,18 @@ class Spell void ExecuteLogEffectExtraAttacks(uint8 effIndex, Unit* victim, uint32 attCount); void ExecuteLogEffectInterruptCast(uint8 effIndex, Unit* victim, uint32 spellId); void ExecuteLogEffectDurabilityDamage(uint8 effIndex, Unit* victim, uint32 itemslot, uint32 damage); - void ExecuteLogEffectOpenLock(uint8 effIndex, Object * obj); + void ExecuteLogEffectOpenLock(uint8 effIndex, Object* obj); void ExecuteLogEffectCreateItem(uint8 effIndex, uint32 entry); void ExecuteLogEffectDestroyItem(uint8 effIndex, uint32 entry); - void ExecuteLogEffectSummonObject(uint8 effIndex, WorldObject * obj); - void ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject * obj); + void ExecuteLogEffectSummonObject(uint8 effIndex, WorldObject* obj); + void ExecuteLogEffectUnsummonObject(uint8 effIndex, WorldObject* obj); void ExecuteLogEffectResurrect(uint8 effIndex, Unit* target); void SendInterrupted(uint8 result); void SendChannelUpdate(uint32 time); void SendChannelStart(uint32 duration); void SendResurrectRequest(Player* target); - void HandleEffects(Unit *pUnitTarget, Item *pItemTarget, GameObject *pGOTarget, uint32 i); + void HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOTarget, uint32 i); void HandleThreatSpells(); SpellInfo const* const m_spellInfo; @@ -531,7 +531,7 @@ class Spell GameObject* gameObjTarget; int32 damage; // used in effects handlers - Aura * m_spellAura; + Aura* m_spellAura; // this is set in Spell Hit, but used in Apply Aura handler DiminishingLevels m_diminishLevel; @@ -592,11 +592,11 @@ class Spell void AddGOTarget(GameObject* target, uint32 effIndex); void AddGOTarget(uint64 goGUID, uint32 effIndex); void AddItemTarget(Item* target, uint32 effIndex); - void DoAllEffectOnTarget(TargetInfo *target); - SpellMissInfo DoSpellHitOnUnit(Unit *unit, uint32 effectMask, bool scaleAura); - void DoTriggersOnSpellHit(Unit *unit, uint8 effMask); - void DoAllEffectOnTarget(GOTargetInfo *target); - void DoAllEffectOnTarget(ItemTargetInfo *target); + void DoAllEffectOnTarget(TargetInfo* target); + SpellMissInfo DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleAura); + void DoTriggersOnSpellHit(Unit* unit, uint8 effMask); + void DoAllEffectOnTarget(GOTargetInfo* target); + void DoAllEffectOnTarget(ItemTargetInfo* target); bool UpdateChanneledTargetList(); void SearchAreaTarget(std::list<Unit*> &unitList, float radius, SpellNotifyPushType type, SpellTargets TargetType, uint32 entry = 0); void SearchGOAreaTarget(std::list<GameObject*> &gobjectList, float radius, SpellNotifyPushType type, SpellTargets TargetType, uint32 entry = 0); @@ -604,7 +604,7 @@ class Spell WorldObject* SearchNearbyTarget(float range, SpellTargets TargetType, SpellEffIndex effIndex); bool IsValidDeadOrAliveTarget(Unit const* target) const; void CalculateDamageDoneForAllTargets(); - int32 CalculateDamageDone(Unit *unit, const uint32 effectMask, float *multiplier); + int32 CalculateDamageDone(Unit* unit, const uint32 effectMask, float *multiplier); void SpellDamageSchoolDmg(SpellEffIndex effIndex); void SpellDamageWeaponDmg(SpellEffIndex effIndex); void SpellDamageHeal(SpellEffIndex effIndex); @@ -626,7 +626,7 @@ class Spell void CallScriptOnHitHandlers(); void CallScriptAfterHitHandlers(); void CallScriptAfterUnitTargetSelectHandlers(std::list<Unit*>& unitTargets, SpellEffIndex effIndex); - std::list<SpellScript *> m_loadedScripts; + std::list<SpellScript*> m_loadedScripts; bool CanExecuteTriggersOnHit(uint8 effMask) const; void PrepareTriggersExecutedOnHit(); @@ -635,7 +635,7 @@ class Spell // effect helpers void GetSummonPosition(uint32 i, Position &pos, float radius = 0.0f, uint32 count = 0); - void SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *properties); + void SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* properties); void CalculateJumpSpeeds(uint8 i, float dist, float & speedxy, float & speedz); SpellCastResult CanOpenLock(uint32 effIndex, uint32 lockid, SkillType& skillid, int32& reqSkillValue, int32& skillValue); @@ -676,11 +676,11 @@ namespace Trinity SpellTargets i_TargetType; const Unit* const i_source; uint32 i_entry; - const Position * const i_pos; + const Position* const i_pos; SpellInfo const* i_spellProto; - SpellNotifierCreatureAndPlayer(Unit *source, std::list<Unit*> &data, float radius, SpellNotifyPushType type, - SpellTargets TargetType = SPELL_TARGETS_ENEMY, const Position *pos = NULL, uint32 entry = 0, SpellInfo const* spellProto = NULL) + SpellNotifierCreatureAndPlayer(Unit* source, std::list<Unit*> &data, float radius, SpellNotifyPushType type, + SpellTargets TargetType = SPELL_TARGETS_ENEMY, const Position* pos = NULL, uint32 entry = 0, SpellInfo const* spellProto = NULL) : i_data(&data), i_push_type(type), i_radius(radius), i_TargetType(TargetType), i_source(source), i_entry(entry), i_pos(pos), i_spellProto(spellProto) { diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index bbdf8931bff..9d3f5c2694a 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -676,7 +676,7 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex) if (m_caster->GetTypeId() == TYPEID_PLAYER) { // Add Ammo and Weapon damage plus RAP * 0.1 - Item *item = m_caster->ToPlayer()->GetWeaponForAttack(RANGED_ATTACK); + Item* item = m_caster->ToPlayer()->GetWeaponForAttack(RANGED_ATTACK); if (item) { float dmg_min = item->GetTemplate()->Damage->DamageMin; @@ -962,7 +962,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) damage = 12000; // maybe wrong value damage /= count; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(42784); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(42784); // now deal the damage for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) @@ -1169,7 +1169,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) } case 53808: // Pygmy Oil { - Aura *pAura = m_caster->GetAura(53806); + Aura* pAura = m_caster->GetAura(53806); if (pAura) pAura->RefreshDuration(); else @@ -1247,7 +1247,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) int32 newRage = std::max<int32>(0, m_caster->GetPower(POWER_RAGE) - rageUsed); // Sudden Death rage save - if (AuraEffect * aurEff = m_caster->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_GENERIC, 1989, EFFECT_0)) + if (AuraEffect* aurEff = m_caster->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_GENERIC, 1989, EFFECT_0)) { int32 ragesave = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue() * 10; newRage = std::max(newRage, ragesave); @@ -1256,7 +1256,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) m_caster->SetPower(POWER_RAGE, uint32(newRage)); // Glyph of Execution bonus - if (AuraEffect * aurEff = m_caster->GetAuraEffect(58367, EFFECT_0)) + if (AuraEffect* aurEff = m_caster->GetAuraEffect(58367, EFFECT_0)) rageUsed += aurEff->GetAmount() * 10; bp = damage + int32(rageUsed * m_spellInfo->Effects[effIndex].DamageMultiplier + m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.2f); @@ -1400,7 +1400,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) return; // Restorative Totems if (Unit* owner = m_caster->GetOwner()) - if (AuraEffect *dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 338, 1)) + if (AuraEffect* dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 338, 1)) AddPctN(damage, dummy->GetAmount()); m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID); @@ -1504,7 +1504,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) //spells triggered by dummy effect should not miss if (spell_id) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); if (!spellInfo) { @@ -1544,7 +1544,7 @@ void Spell::EffectTriggerSpellWithValue(SpellEffIndex effIndex) uint32 triggered_spell_id = m_spellInfo->Effects[effIndex].TriggerSpell; // normal case - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); if (!spellInfo) { @@ -1562,7 +1562,7 @@ void Spell::EffectTriggerSpellWithValue(SpellEffIndex effIndex) void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex) { uint32 triggered_spell_id = m_spellInfo->Effects[effIndex].TriggerSpell; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); if (!spellInfo) { @@ -1583,7 +1583,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex) uint32 triggered_spell_id = m_spellInfo->Effects[effIndex].TriggerSpell; // normal case - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); if (!spellInfo) { @@ -1620,7 +1620,7 @@ void Spell::EffectForceCastWithValue(SpellEffIndex effIndex) uint32 triggered_spell_id = m_spellInfo->Effects[effIndex].TriggerSpell; // normal case - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); if (!spellInfo) { @@ -1764,7 +1764,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) } // normal case - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); if (!spellInfo) { sLog->outError("EffectTriggerSpell of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id); @@ -1789,7 +1789,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) uint32 triggered_spell_id = m_spellInfo->Effects[effIndex].TriggerSpell; // normal case - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id); if (!spellInfo) { @@ -2099,7 +2099,7 @@ void Spell::EffectPowerDrain(SpellEffIndex effIndex) { gainMultiplier = m_spellInfo->Effects[effIndex].CalcValueMultiplier(m_originalCaster, this); - int32 gain = int32(newDamage * gainMultiplier); + int32 gain = int32(newDamage* gainMultiplier); m_caster->EnergizeBySpell(m_caster, m_spellInfo->Id, gain, powerType); } @@ -2158,7 +2158,7 @@ void Spell::EffectPowerBurn(SpellEffIndex effIndex) // add log data before multiplication (need power amount, not damage) ExecuteLogEffectTakeTargetPower(effIndex, unitTarget, powerType, newDamage, 0.0f); - newDamage = int32(newDamage * dmgMultiplier); + newDamage = int32(newDamage* dmgMultiplier); m_damage += newDamage; } @@ -2198,7 +2198,7 @@ void Spell::SpellDamageHeal(SpellEffIndex /*effIndex*/) { Unit::AuraEffectList const& RejorRegr = unitTarget->GetAuraEffectsByType(SPELL_AURA_PERIODIC_HEAL); // find most short by duration - AuraEffect *targetAura = NULL; + AuraEffect* targetAura = NULL; for (Unit::AuraEffectList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i) { if ((*i)->GetSpellInfo()->SpellFamilyName == SPELLFAMILY_DRUID @@ -2260,7 +2260,7 @@ void Spell::SpellDamageHeal(SpellEffIndex /*effIndex*/) else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN && m_spellInfo->SpellFamilyFlags[0] & 0x100) { addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL); - if (AuraEffect * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_SHAMAN, 0, 0, 0x10, m_originalCasterGUID)) + if (AuraEffect* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_SHAMAN, 0, 0, 0x10, m_originalCasterGUID)) { addhealth = int32(addhealth * 1.25f); // consume aura @@ -2339,7 +2339,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype) Player* player = (Player*)unitTarget; uint32 newitemid = itemtype; - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(newitemid); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(newitemid); if (!pProto) { player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); @@ -2606,7 +2606,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex) sSpellMgr->GetSetOfSpellsInSpellGroup(SPELL_GROUP_ELIXIR_BATTLE, avalibleElixirs); for (std::set<uint32>::iterator itr = avalibleElixirs.begin(); itr != avalibleElixirs.end() ;) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(*itr); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(*itr); if (spellInfo->SpellLevel < m_spellInfo->SpellLevel || spellInfo->SpellLevel > unitTarget->getLevel()) avalibleElixirs.erase(itr++); else if (sSpellMgr->IsSpellMemberOfSpellGroup(*itr, SPELL_GROUP_ELIXIR_SHATTRATH)) @@ -2740,7 +2740,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex) { //CanUseBattlegroundObject() already called in CheckCast() // in battleground check - if (Battleground *bg = player->GetBattleground()) + if (Battleground* bg = player->GetBattleground()) { bg->EventPlayerClickedOnFlag(player, gameObjTarget); return; @@ -2750,7 +2750,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex) { //CanUseBattlegroundObject() already called in CheckCast() // in battleground check - if (Battleground *bg = player->GetBattleground()) + if (Battleground* bg = player->GetBattleground()) { if (bg->GetTypeID(true) == BATTLEGROUND_EY) bg->EventPlayerClickedOnFlag(player, gameObjTarget); @@ -2840,7 +2840,7 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex) uint16 pos = m_CastItem->GetPos(); - Item *pNewItem = Item::CreateItem(newitemid, 1, player); + Item* pNewItem = Item::CreateItem(newitemid, 1, player); if (!pNewItem) return; @@ -2943,7 +2943,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) if (!entry) return; - SummonPropertiesEntry const *properties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[effIndex].MiscValueB); + SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[effIndex].MiscValueB); if (!properties) { sLog->outError("EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB); @@ -2960,7 +2960,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) Position pos; GetSummonPosition(effIndex, pos); - TempSummon *summon = NULL; + TempSummon* summon = NULL; switch (properties->Category) { @@ -3108,7 +3108,7 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex) } typedef std::list< std::pair<uint32, uint64> > DispelList; -typedef std::list< std::pair<Aura *, uint8> > DispelChargesList; +typedef std::list< std::pair<Aura* , uint8> > DispelChargesList; void Spell::EffectDispel(SpellEffIndex effIndex) { if (!unitTarget) @@ -3127,7 +3127,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex) Unit::AuraMap const& auras = unitTarget->GetOwnedAuras(); for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) { - Aura * aura = itr->second; + Aura* aura = itr->second; AuraApplication * aurApp = aura->GetApplicationOfTarget(unitTarget->GetGUID()); if (!aurApp) continue; @@ -3433,7 +3433,7 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex) if (!enchant_id) return; - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) return; @@ -3475,7 +3475,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex) if (!enchant_id) return; - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) return; @@ -3558,7 +3558,7 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) return; } - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); if (!spellInfo) { sLog->outError("Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id); @@ -3592,7 +3592,7 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) return; } - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) { sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id); @@ -3717,7 +3717,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex) if (!owner) { - SummonPropertiesEntry const *properties = sSummonPropertiesStore.LookupEntry(67); + SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(67); if (properties) SummonGuardian(effIndex, petentry, properties); return; @@ -3795,7 +3795,7 @@ void Spell::EffectLearnPetSpell(SpellEffIndex effIndex) if (!pet->isAlive()) return; - SpellInfo const *learn_spellproto = sSpellMgr->GetSpellInfo(m_spellInfo->Effects[effIndex].TriggerSpell); + SpellInfo const* learn_spellproto = sSpellMgr->GetSpellInfo(m_spellInfo->Effects[effIndex].TriggerSpell); if (!learn_spellproto) return; @@ -3900,7 +3900,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex) if (needCast) m_caster->CastSpell(unitTarget, 58567, true); - if (Aura * aur = unitTarget->GetAura(58567, m_caster->GetGUID())) + if (Aura* aur = unitTarget->GetAura(58567, m_caster->GetGUID())) { // 58388 - Glyph of Devastate dummy aura. if (int32 num = (needCast ? 0 : 1) + (m_caster->HasAura(58388) ? 1 : 0)) @@ -3968,7 +3968,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex) { // Skyshatter Harness item set bonus // Stormstrike - if (AuraEffect * aurEff = m_caster->IsScriptOverriden(m_spellInfo, 5634)) + if (AuraEffect* aurEff = m_caster->IsScriptOverriden(m_spellInfo, 5634)) m_caster->CastSpell(m_caster, 38430, true, NULL, aurEff); break; } @@ -4113,7 +4113,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex) weaponDamage += fixed_bonus; break; case SPELL_EFFECT_WEAPON_PERCENT_DAMAGE: - weaponDamage = int32(weaponDamage * weaponDamagePercentMod); + weaponDamage = int32(weaponDamage* weaponDamagePercentMod); default: break; // not weapon damage effect, just skip } @@ -4123,7 +4123,7 @@ void Spell::SpellDamageWeaponDmg(SpellEffIndex effIndex) weaponDamage += spell_bonus; if (totalDamagePercentMod != 1.0f) - weaponDamage = int32(weaponDamage * totalDamagePercentMod); + weaponDamage = int32(weaponDamage* totalDamagePercentMod); // prevent negative damage uint32 eff_damage(std::max(weaponDamage, 0)); @@ -4215,7 +4215,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex) else m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE); - Map *map = target->GetMap(); + Map* map = target->GetMap(); if (!pGameObj->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id, map, m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY)) @@ -4510,7 +4510,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) float x, y, z; unitTarget->GetPosition(x, y, z); uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z); - AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag); + AreaTableEntry const* pArea = sAreaStore.LookupEntry(areaFlag); if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; @@ -4555,7 +4555,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) float x, y, z; unitTarget->GetPosition(x, y, z); uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z); - AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag); + AreaTableEntry const* pArea = sAreaStore.LookupEntry(areaFlag); if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; @@ -4588,7 +4588,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) uint8 bag = 19; uint8 slot = 0; - Item *item = NULL; + Item* item = NULL; while (bag) // 256 = 0 due to var type { @@ -4871,7 +4871,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) float x, y, z; unitTarget->GetPosition(x, y, z); uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z); - AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag); + AreaTableEntry const* pArea = sAreaStore.LookupEntry(areaFlag); if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; @@ -4917,7 +4917,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) float x, y, z; unitTarget->GetPosition(x, y, z); uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z); - AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag); + AreaTableEntry const* pArea = sAreaStore.LookupEntry(areaFlag); if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; @@ -4980,7 +4980,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) float x, y, z; unitTarget->GetPosition(x, y, z); uint32 areaFlag = unitTarget->GetBaseMap()->GetAreaFlag(x, y, z); - AreaTableEntry const *pArea = sAreaStore.LookupEntry(areaFlag); + AreaTableEntry const* pArea = sAreaStore.LookupEntry(areaFlag); if (!pArea || (canFly && (pArea->flags & AREA_FLAG_NO_FLY_ZONE))) canFly = false; @@ -5097,7 +5097,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) } // proc a spellcast - if (Aura * chargesAura = m_caster->GetAura(59907)) + if (Aura* chargesAura = m_caster->GetAura(59907)) { m_caster->CastSpell(unitTarget, spell_heal, true, NULL, NULL, m_caster->ToTempSummon()->GetSummonerGUID()); if (chargesAura->ModCharges(-1)) @@ -5132,7 +5132,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) } } // Glyph of Stoneclaw Totem - if (AuraEffect *aur=unitTarget->GetAuraEffect(63298, 0)) + if (AuraEffect* aur=unitTarget->GetAuraEffect(63298, 0)) { basepoints0 *= aur->GetAmount(); m_caster->CastCustomSpell(unitTarget, 55277, &basepoints0, NULL, NULL, true); @@ -5182,7 +5182,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) Player* plr = unitTarget->ToPlayer(); static uint32 const itemId[] = {45061, 45176, 45177, 45178, 45179, 0}; // player can only have one of these items - for (uint32 const *itr = &itemId[0]; *itr; ++itr) + for (uint32 const* itr = &itemId[0]; *itr; ++itr) if (plr->HasItemCount(*itr, 1, true)) return; DoCreateItem(effIndex, itemId[urand(0, 4)]); @@ -5215,10 +5215,10 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) Unit::AuraApplicationMap & sealAuras = m_caster->GetAppliedAuras(); for (Unit::AuraApplicationMap::iterator iter = sealAuras.begin(); iter != sealAuras.end();) { - Aura * aura = iter->second->GetBase(); + Aura* aura = iter->second->GetBase(); if (aura->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_SEAL) { - if (AuraEffect * aureff = aura->GetEffect(2)) + if (AuraEffect* aureff = aura->GetEffect(2)) if (aureff->GetAuraType() == SPELL_AURA_DUMMY) { if (sSpellMgr->GetSpellInfo(aureff->GetAmount())) @@ -5436,14 +5436,14 @@ void Spell::EffectDuel(SpellEffIndex effIndex) target->GetSession()->SendPacket(&data); // create duel-info - DuelInfo *duel = new DuelInfo; + DuelInfo* duel = new DuelInfo; duel->initiator = caster; duel->opponent = target; duel->startTime = 0; duel->startTimer = 0; caster->duel = duel; - DuelInfo *duel2 = new DuelInfo; + DuelInfo* duel2 = new DuelInfo; duel2->initiator = caster; duel2->opponent = caster; duel2->startTime = 0; @@ -5477,7 +5477,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/) // pTarget->TeleportTo(pTarget->m_homebindMapId, pTarget->m_homebindX, pTarget->m_homebindY, pTarget->m_homebindZ, pTarget->GetOrientation(), (unitTarget == m_caster ? TELE_TO_SPELL : 0)); // Stuck spell trigger Hearthstone cooldown - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(8690); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(8690); if (!spellInfo) return; Spell spell(pTarget, spellInfo, TRIGGERED_FULL_MASK); @@ -5545,9 +5545,9 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex) // apply new one if (uint32 glyph = m_spellInfo->Effects[effIndex].MiscValue) { - if (GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyph)) + if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) { - if (GlyphSlotEntry const *gs = sGlyphSlotStore.LookupEntry(player->GetGlyphSlot(m_glyphIndex))) + if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(player->GetGlyphSlot(m_glyphIndex))) { if (gp->TypeFlags != gs->TypeFlags) { @@ -5559,7 +5559,7 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex) // remove old glyph if (uint32 oldglyph = player->GetGlyph(m_glyphIndex)) { - if (GlyphPropertiesEntry const *old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph)) + if (GlyphPropertiesEntry const* old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph)) { player->RemoveAurasDueToSpell(old_gp->SpellId); player->SetGlyph(m_glyphIndex, 0); @@ -5598,7 +5598,7 @@ void Spell::EffectEnchantHeldItem(SpellEffIndex effIndex) if (!duration) duration = 10; //10 seconds for enchants which don't have listed duration - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); + SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) return; @@ -5733,7 +5733,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex) else m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE); - Map *map = m_caster->GetMap(); + Map* map = m_caster->GetMap(); if (!pGameObj->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), go_id, map, m_caster->GetPhaseMask(), x, y, z, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY)) { @@ -6143,7 +6143,7 @@ void Spell::EffectDispelMechanic(SpellEffIndex effIndex) Unit::AuraMap const& auras = unitTarget->GetOwnedAuras(); for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) { - Aura * aura = itr->second; + Aura* aura = itr->second; if (!aura->GetApplicationOfTarget(unitTarget->GetGUID())) continue; if (roll_chance_i(aura->CalcDispelChance(unitTarget, !unitTarget->IsFriendlyTo(m_caster)))) @@ -6302,7 +6302,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) m_caster->GetClosePoint(fx, fy, fz, DEFAULT_WORLD_OBJECT_SIZE, dis); } - Map *cMap = m_caster->GetMap(); + Map* cMap = m_caster->GetMap(); if (goinfo->type == GAMEOBJECT_TYPE_FISHINGNODE || goinfo->type == GAMEOBJECT_TYPE_FISHINGHOLE) { LiquidData liqData; @@ -6506,7 +6506,7 @@ void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex) Unit::AuraMap const& auras = unitTarget->GetOwnedAuras(); for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr) { - Aura * aura = itr->second; + Aura* aura = itr->second; AuraApplication * aurApp = aura->GetApplicationOfTarget(unitTarget->GetGUID()); if (!aurApp) continue; @@ -6758,7 +6758,7 @@ void Spell::EffectGameObjectSetDestructionState(SpellEffIndex effIndex) gameObjTarget->SetDestructibleState(GameObjectDestructibleState(m_spellInfo->Effects[effIndex].MiscValue), player, true); } -void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *properties) +void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* properties) { Unit* caster = m_originalCaster; if (!caster) @@ -6772,7 +6772,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const * // level of pet summoned using engineering item based at engineering skill level if (m_CastItem && caster->GetTypeId() == TYPEID_PLAYER) - if (ItemTemplate const *proto = m_CastItem->GetTemplate()) + if (ItemTemplate const* proto = m_CastItem->GetTemplate()) if (proto->RequiredSkill == SKILL_ENGINERING) if (uint16 skill202 = caster->ToPlayer()->GetSkillValue(SKILL_ENGINERING)) level = skill202/5; @@ -6787,7 +6787,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const * amount = 1; break; case 49028: // Dancing Rune Weapon - if (AuraEffect *aurEff = m_originalCaster->GetAuraEffect(63330, 0)) // glyph of Dancing Rune Weapon + if (AuraEffect* aurEff = m_originalCaster->GetAuraEffect(63330, 0)) // glyph of Dancing Rune Weapon duration += aurEff->GetAmount(); break; } @@ -6795,14 +6795,14 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const * modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration); //TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; - Map *map = caster->GetMap(); + Map* map = caster->GetMap(); for (uint32 count = 0; count < amount; ++count) { Position pos; GetSummonPosition(i, pos, radius, count); - TempSummon *summon = map->SummonCreature(entry, pos, properties, duration, caster, m_spellInfo->Id); + TempSummon* summon = map->SummonCreature(entry, pos, properties, duration, caster, m_spellInfo->Id); if (!summon) return; if (summon->HasUnitTypeMask(UNIT_MASK_GUARDIAN)) @@ -6967,7 +6967,7 @@ void Spell::EffectCastButtons(SpellEffIndex effIndex) if (!spell_id) continue; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(spell_id); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); if (!spellInfo) continue; @@ -6998,7 +6998,7 @@ void Spell::EffectRechargeManaGem(SpellEffIndex /*effIndex*/) uint32 item_id = m_spellInfo->Effects[EFFECT_0].ItemType; - ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item_id); + ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item_id); if (!pProto) { player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index ea9146ae5f1..f78622ce26d 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -586,7 +586,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const if (caster->m_movedPlayer) if (uint8 comboPoints = caster->m_movedPlayer->GetComboPoints()) if (float comboDamage = PointsPerComboPoint) - value += comboDamage * comboPoints; + value += comboDamage* comboPoints; value = caster->ApplyEffectModifiers(_spellInfo, _effIndex, value); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index c50aa7cc14f..374e3427282 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -33,7 +33,7 @@ bool IsPrimaryProfessionSkill(uint32 skill) { - SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(skill); + SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill); if (!pSkill) return false; @@ -351,7 +351,7 @@ SpellMgr::~SpellMgr() } /// Some checks for spells, to prevent adding deprecated/broken spells for trainers, spell book, etc -bool SpellMgr::IsSpellValid(SpellInfo const *spellInfo, Player *pl, bool msg) +bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* pl, bool msg) { // not exist if (!spellInfo) @@ -473,7 +473,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con if (!difficultyId) return spellId; //return source spell, it has only REGULAR_DIFFICULTY - SpellDifficultyEntry const *difficultyEntry = sSpellDifficultyStore.LookupEntry(difficultyId); + SpellDifficultyEntry const* difficultyEntry = sSpellDifficultyStore.LookupEntry(difficultyId); if (!difficultyEntry) { sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId); @@ -1158,7 +1158,7 @@ void SpellMgr::LoadSpellRanks() // fill one chain while (currentSpell == lastSpell && !finished) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); currentSpell = fields[0].GetUInt32(); if (lastSpell == -1) @@ -1260,7 +1260,7 @@ void SpellMgr::LoadSpellRequired() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 spell_id = fields[0].GetUInt32(); uint32 spell_req = fields[1].GetUInt32(); @@ -1355,7 +1355,7 @@ void SpellMgr::LoadSpellLearnSpells() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 spell_id = fields[0].GetUInt32(); @@ -1459,7 +1459,7 @@ void SpellMgr::LoadSpellTargetPositions() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 Spell_ID = fields[0].GetUInt32(); @@ -1583,7 +1583,7 @@ void SpellMgr::LoadSpellGroups() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 group_id = fields[0].GetUInt32(); if (group_id <= SPELL_GROUP_DB_RANGE_MIN && group_id >= SPELL_GROUP_CORE_RANGE_MAX) @@ -1664,7 +1664,7 @@ void SpellMgr::LoadSpellGroupStackRules() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 group_id = fields[0].GetUInt32(); uint8 stack_rule = fields[1].GetUInt32(); @@ -1711,7 +1711,7 @@ void SpellMgr::LoadSpellProcEvents() uint32 customProc = 0; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -1915,7 +1915,7 @@ void SpellMgr::LoadSpellBonusess() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); SpellInfo const* spell = GetSpellInfo(entry); @@ -1957,7 +1957,7 @@ void SpellMgr::LoadSpellThreats() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 entry = fields[0].GetUInt32(); @@ -2021,7 +2021,7 @@ void SpellMgr::LoadSpellPetAuras() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 spell = fields[0].GetUInt32(); uint8 eff = fields[1].GetUInt8(); @@ -2126,7 +2126,7 @@ void SpellMgr::LoadSpellEnchantProcData() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 enchantId = fields[0].GetUInt32(); @@ -2171,7 +2171,7 @@ void SpellMgr::LoadSpellLinked() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); int32 trigger = fields[0].GetInt32(); int32 effect = fields[1].GetInt32(); @@ -2416,7 +2416,7 @@ void SpellMgr::LoadSpellAreas() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 spell = fields[0].GetUInt32(); SpellArea spellArea; diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index c9f88092028..8a742cbd118 100755 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -364,13 +364,13 @@ class AuraScript : public _SpellScript #define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \ typedef bool(CLASSNAME::*AuraCheckAreaTargetFnType)(Unit* target); \ - typedef void(CLASSNAME::*AuraEffectApplicationModeFnType)(AuraEffect const *, AuraEffectHandleModes); \ - typedef void(CLASSNAME::*AuraEffectPeriodicFnType)(AuraEffect const *); \ - typedef void(CLASSNAME::*AuraEffectUpdatePeriodicFnType)(AuraEffect *); \ - typedef void(CLASSNAME::*AuraEffectCalcAmountFnType)(AuraEffect const *, int32 &, bool &); \ - typedef void(CLASSNAME::*AuraEffectCalcPeriodicFnType)(AuraEffect const *, bool &, int32 &); \ - typedef void(CLASSNAME::*AuraEffectCalcSpellModFnType)(AuraEffect const *, SpellModifier *&); \ - typedef void(CLASSNAME::*AuraEffectAbsorbFnType)(AuraEffect *, DamageInfo &, uint32 &); \ + typedef void(CLASSNAME::*AuraEffectApplicationModeFnType)(AuraEffect const* , AuraEffectHandleModes); \ + typedef void(CLASSNAME::*AuraEffectPeriodicFnType)(AuraEffect const* ); \ + typedef void(CLASSNAME::*AuraEffectUpdatePeriodicFnType)(AuraEffect* ); \ + typedef void(CLASSNAME::*AuraEffectCalcAmountFnType)(AuraEffect const* , int32 &, bool &); \ + typedef void(CLASSNAME::*AuraEffectCalcPeriodicFnType)(AuraEffect const* , bool &, int32 &); \ + typedef void(CLASSNAME::*AuraEffectCalcSpellModFnType)(AuraEffect const* , SpellModifier* &); \ + typedef void(CLASSNAME::*AuraEffectAbsorbFnType)(AuraEffect* , DamageInfo &, uint32 &); \ AURASCRIPT_FUNCTION_TYPE_DEFINES(AuraScript) @@ -393,7 +393,7 @@ class AuraScript : public _SpellScript { public: EffectPeriodicHandler(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); - void Call(AuraScript * auraScript, AuraEffect const* _aurEff); + void Call(AuraScript* auraScript, AuraEffect const* _aurEff); private: AuraEffectPeriodicFnType pEffectHandlerScript; }; @@ -401,7 +401,7 @@ class AuraScript : public _SpellScript { public: EffectUpdatePeriodicHandler(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); - void Call(AuraScript * auraScript, AuraEffect * aurEff); + void Call(AuraScript* auraScript, AuraEffect* aurEff); private: AuraEffectUpdatePeriodicFnType pEffectHandlerScript; }; @@ -409,7 +409,7 @@ class AuraScript : public _SpellScript { public: EffectCalcAmountHandler(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); - void Call(AuraScript * auraScript, AuraEffect const* aurEff, int32 & amount, bool & canBeRecalculated); + void Call(AuraScript* auraScript, AuraEffect const* aurEff, int32 & amount, bool & canBeRecalculated); private: AuraEffectCalcAmountFnType pEffectHandlerScript; }; @@ -417,7 +417,7 @@ class AuraScript : public _SpellScript { public: EffectCalcPeriodicHandler(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); - void Call(AuraScript * auraScript, AuraEffect const* aurEff, bool & isPeriodic, int32 & periodicTimer); + void Call(AuraScript* auraScript, AuraEffect const* aurEff, bool & isPeriodic, int32 & periodicTimer); private: AuraEffectCalcPeriodicFnType pEffectHandlerScript; }; @@ -425,7 +425,7 @@ class AuraScript : public _SpellScript { public: EffectCalcSpellModHandler(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName); - void Call(AuraScript * auraScript, AuraEffect const* aurEff, SpellModifier *& spellMod); + void Call(AuraScript* auraScript, AuraEffect const* aurEff, SpellModifier* & spellMod); private: AuraEffectCalcSpellModFnType pEffectHandlerScript; }; @@ -433,7 +433,7 @@ class AuraScript : public _SpellScript { public: EffectApplyHandler(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode); - void Call(AuraScript * auraScript, AuraEffect const* _aurEff, AuraEffectHandleModes _mode); + void Call(AuraScript* auraScript, AuraEffect const* _aurEff, AuraEffectHandleModes _mode); private: AuraEffectApplicationModeFnType pEffectHandlerScript; AuraEffectHandleModes mode; @@ -442,7 +442,7 @@ class AuraScript : public _SpellScript { public: EffectAbsorbHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex); - void Call(AuraScript * auraScript, AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount); + void Call(AuraScript* auraScript, AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount); private: AuraEffectAbsorbFnType pEffectHandlerScript; }; @@ -450,7 +450,7 @@ class AuraScript : public _SpellScript { public: EffectManaShieldHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex); - void Call(AuraScript * auraScript, AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount); + void Call(AuraScript* auraScript, AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount); private: AuraEffectAbsorbFnType pEffectHandlerScript; }; @@ -472,12 +472,12 @@ class AuraScript : public _SpellScript AuraScript() : _SpellScript(), m_aura(NULL), m_auraApplication(NULL), m_defaultActionPrevented(false) {} bool _Validate(SpellInfo const* entry); - bool _Load(Aura * aura); + bool _Load(Aura* aura); void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const* aurApp = NULL); void _FinishScriptCall(); bool _IsDefaultActionPrevented(); private: - Aura * m_aura; + Aura* m_aura; AuraApplication const* m_auraApplication; bool m_defaultActionPrevented; @@ -595,16 +595,16 @@ class AuraScript : public _SpellScript // returns unit which casted the aura or NULL if not avalible (caster logged out for example) Unit* GetCaster() const; // returns object on which aura was casted, target for non-area auras, area aura source for area auras - WorldObject * GetOwner() const; + WorldObject* GetOwner() const; // returns owner if it's unit or unit derived object, NULL otherwise (only for persistent area auras NULL is returned) Unit* GetUnitOwner() const; // returns owner if it's dynobj, NULL otherwise - DynamicObject * GetDynobjOwner() const; + DynamicObject* GetDynobjOwner() const; // removes aura with remove mode (see AuraRemoveMode enum) void Remove(uint32 removeMode = 0); // returns aura object of script - Aura * GetAura() const; + Aura* GetAura() const; // returns type of the aura, may be dynobj owned aura or unit owned aura AuraObjectType GetType() const; @@ -644,7 +644,7 @@ class AuraScript : public _SpellScript // check if aura has effect of given effindex bool HasEffect(uint8 effIndex) const; // returns aura effect of given effect index or NULL - AuraEffect * GetEffect(uint8 effIndex) const; + AuraEffect* GetEffect(uint8 effIndex) const; // check if aura has effect of given aura type bool HasEffectType(AuraType type) const; diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index c7df22561fd..f901c0acac8 100755 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -256,7 +256,7 @@ void CreatureTextMgr::SendChatString(WorldObject* source, char const* text, Chat SendChatPacket(&data, source, msgtype, whisperGuid, range, team, gmOnly);//send our packet } -void CreatureTextMgr::BuildMonsterChat(WorldPacket *data, WorldObject* source, ChatMsg msgType, char const* text, Language language, uint64 whisperGuid) const +void CreatureTextMgr::BuildMonsterChat(WorldPacket* data, WorldObject* source, ChatMsg msgType, char const* text, Language language, uint64 whisperGuid) const { if (!source) return; diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index 5d0f13433a8..5d4e6357079 100755 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -72,8 +72,8 @@ class CreatureTextMgr private: CreatureTextRepeatIds GetRepeatGroup(Creature* source, uint8 textGroup); void SetRepeatId(Creature* source, uint8 textGroup, uint8 id); - void BuildMonsterChat(WorldPacket *data, WorldObject* source, ChatMsg msgType, char const* text, Language language, uint64 whisperGuid) const; - void SendChatPacket(WorldPacket *data, WorldObject* source, ChatMsg msgType, uint64 whisperGuid, TextRange range, Team team, bool gmOnly) const; + void BuildMonsterChat(WorldPacket* data, WorldObject* source, ChatMsg msgType, char const* text, Language language, uint64 whisperGuid) const; + void SendChatPacket(WorldPacket* data, WorldObject* source, ChatMsg msgType, uint64 whisperGuid, TextRange range, Team team, bool gmOnly) const; CreatureTextMap mTextMap; CreatureTextRepeatMap mTextRepeatMap; diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index f690b5401b4..24955737b46 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -80,7 +80,7 @@ void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table std::ostringstream ss; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 id = fields[0].GetUInt32(); @@ -138,7 +138,7 @@ void CharacterDatabaseCleaner::CleanCharacterSpell() bool CharacterDatabaseCleaner::TalentCheck(uint32 talent_id) { - TalentEntry const *talentInfo = sTalentStore.LookupEntry(talent_id); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(talent_id); if (!talentInfo) return false; diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index 37da6512d21..fff06661e10 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -199,7 +199,7 @@ std::string CreateDumpString(char const* tableName, QueryResult result) if (!tableName || !result) return ""; std::ostringstream ss; ss << "INSERT INTO "<< _TABLE_SIM_ << tableName << _TABLE_SIM_ << " VALUES ("; - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); for (uint32 i = 0; i < result->GetFieldCount(); ++i) { if (i == 0) ss << '\''; @@ -352,7 +352,7 @@ bool PlayerDumpWriter::GetDump(uint32 guid, std::string &dump) DumpReturn PlayerDumpWriter::WriteDump(const std::string& file, uint32 guid) { - FILE *fout = fopen(file.c_str(), "w"); + FILE* fout = fopen(file.c_str(), "w"); if (!fout) return DUMP_FILE_OPEN_ERROR; @@ -386,7 +386,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s if (charcount >= 10) return DUMP_TOO_MANY_CHARS; - FILE *fin = fopen(file.c_str(), "r"); + FILE* fin = fopen(file.c_str(), "r"); if (!fin) return DUMP_FILE_OPEN_ERROR; diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp index 2c1b7e5fc54..17f0c89d725 100755 --- a/src/server/game/Weather/WeatherMgr.cpp +++ b/src/server/game/Weather/WeatherMgr.cpp @@ -91,7 +91,7 @@ void WeatherMgr::LoadWeatherData() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 zone_id = fields[0].GetUInt32(); diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 0cd481d3844..b46fccc12ce 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1829,7 +1829,7 @@ void World::LoadAutobroadcasts() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); std::string message = fields[0].GetString(); m_Autobroadcasts.push_back(message); @@ -2515,7 +2515,7 @@ void World::UpdateSessions(uint32 diff) ++next; ///- and remove not active sessions from the list - WorldSession * pSession = itr->second; + WorldSession* pSession = itr->second; WorldSessionFilter updater(pSession); if (!pSession->Update(diff, updater)) // As interval = 0 @@ -2596,7 +2596,7 @@ void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount) { if (resultCharCount) { - Field *fields = resultCharCount->Fetch(); + Field* fields = resultCharCount->Fetch(); uint32 accountId = fields[0].GetUInt32(); uint32 charCount = fields[1].GetUInt32(); @@ -2627,7 +2627,7 @@ void World::InitDailyQuestResetTime() QueryResult result = CharacterDatabase.Query("SELECT MAX(time) FROM character_queststatus_daily"); if (result) { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); mostRecentQuestTime = time_t(fields[0].GetUInt32()); } else @@ -2799,7 +2799,7 @@ void World::LoadWorldStates() do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); m_worldstates[fields[0].GetUInt32()] = fields[1].GetUInt32(); ++count; } diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index b045ce60347..75a3f674b19 100755 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -521,7 +521,7 @@ class World ~World(); WorldSession* FindSession(uint32 id) const; - void AddSession(WorldSession *s); + void AddSession(WorldSession* s); void SendAutoBroadcast(); bool RemoveSession(uint32 id); /// Get the number of current active sessions diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index e1e5b4b8188..6db414555da 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -206,7 +206,7 @@ public: ///- Cycle through accounts do { - Field *fieldsDB = resultDB->Fetch(); + Field* fieldsDB = resultDB->Fetch(); std::string name = fieldsDB[0].GetString(); uint32 account = fieldsDB[1].GetUInt32(); @@ -220,7 +220,7 @@ public: "WHERE a.id = '%u'", account); if (resultLogin) { - Field *fieldsLogin = resultLogin->Fetch(); + Field* fieldsLogin = resultLogin->Fetch(); handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE, fieldsLogin[0].GetCString(), name.c_str(), fieldsLogin[1].GetCString(), fieldsDB[2].GetUInt16(), fieldsDB[3].GetUInt16(), fieldsLogin[3].GetUInt32(), diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 55b85a888d2..1848e22121c 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -548,13 +548,13 @@ public: if (list_queue) { - std::vector<Item *> &updateQueue = player->GetItemUpdateQueue(); + std::vector<Item*> &updateQueue = player->GetItemUpdateQueue(); for (size_t i = 0; i < updateQueue.size(); ++i) { Item* item = updateQueue[i]; if (!item) continue; - Bag *container = item->GetContainer(); + Bag* container = item->GetContainer(); uint8 bag_slot = container ? container->GetSlot() : uint8(INVENTORY_SLOT_BAG_0); std::string st; @@ -575,7 +575,7 @@ public: if (check_all) { bool error = false; - std::vector<Item *> &updateQueue = player->GetItemUpdateQueue(); + std::vector<Item*> &updateQueue = player->GetItemUpdateQueue(); for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i) { if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END) @@ -596,7 +596,7 @@ public: error = true; continue; } - if (Bag *container = item->GetContainer()) + if (Bag* container = item->GetContainer()) { handler->PSendSysMessage("The item with slot %d and guid %d has a container (slot: %d, guid: %d) but shouldn't!", item->GetSlot(), item->GetGUIDLow(), container->GetSlot(), container->GetGUIDLow()); error = true; continue; @@ -648,7 +648,7 @@ public: error = true; continue; } - Bag *container = item2->GetContainer(); + Bag* container = item2->GetContainer(); if (!container) { handler->PSendSysMessage("The item in bag %d at slot %d with guid %d has no container!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow()); @@ -860,19 +860,19 @@ public: uint32 id = (uint32)atoi(i); - CreatureTemplate const *ci = sObjectMgr->GetCreatureTemplate(entry); + CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(entry); if (!ci) return false; - VehicleEntry const *ve = sVehicleStore.LookupEntry(id); + VehicleEntry const* ve = sVehicleStore.LookupEntry(id); if (!ve) return false; Creature* v = new Creature; - Map *map = handler->GetSession()->GetPlayer()->GetMap(); + Map* map = handler->GetSession()->GetPlayer()->GetMap(); if (!v->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_VEHICLE), map, handler->GetSession()->GetPlayer()->GetPhaseMask(), entry, id, handler->GetSession()->GetPlayer()->GetTeam(), x, y, z, o)) { diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index c8cf0819fd4..9a7146c641c 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -163,7 +163,7 @@ public: ///- Cycle through them. Display username and GM level do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); const char* name = fields[0].GetCString(); uint8 security = fields[1].GetUInt8(); uint8 max = ((16 - strlen(name)) / 2); @@ -234,7 +234,7 @@ public: handler->GetSession()->SendNotification(LANG_GM_ON); handler->GetSession()->GetPlayer()->UpdateTriggerVisibility(); #ifdef _DEBUG_VMAPS - VMAP::IVMapManager *vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); + VMAP::IVMapManager* vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); vMapManager->processCommand("stoplog"); #endif return true; @@ -246,7 +246,7 @@ public: handler->GetSession()->SendNotification(LANG_GM_OFF); handler->GetSession()->GetPlayer()->UpdateTriggerVisibility(); #ifdef _DEBUG_VMAPS - VMAP::IVMapManager *vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); + VMAP::IVMapManager* vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); vMapManager->processCommand("startlog"); #endif return true; diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index f077d6ec9c0..9ffd366544e 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -132,7 +132,7 @@ public: if (result->GetRowCount() > 1) handler->SendSysMessage(LANG_COMMAND_GOCREATMULTIPLE); - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); float x = fields[0].GetFloat(); float y = fields[1].GetFloat(); float z = fields[2].GetFloat(); @@ -255,7 +255,7 @@ public: else _player->SaveRecallPosition(); - Map const *map = sMapMgr->CreateBaseMap(mapid); + Map const* map = sMapMgr->CreateBaseMap(mapid); float z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y)); _player->TeleportTo(mapid, x, y, z, _player->GetOrientation()); @@ -443,7 +443,7 @@ public: // update to parent zone if exist (client map show only zones without parents) AreaTableEntry const* zoneEntry = areaEntry->zone ? GetAreaEntryByAreaID(areaEntry->zone) : areaEntry; - Map const *map = sMapMgr->CreateBaseMap(zoneEntry->mapid); + Map const* map = sMapMgr->CreateBaseMap(zoneEntry->mapid); if (map->Instanceable()) { @@ -527,7 +527,7 @@ public: handler->SetSentErrorMessage(true); return false; } - Map const *map = sMapMgr->CreateBaseMap(mapid); + Map const* map = sMapMgr->CreateBaseMap(mapid); z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y)); } diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index c51ab45acea..f8e636fb961 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -121,7 +121,7 @@ public: char* spawntimeSecs = strtok(NULL, " "); - const GameObjectTemplate *gInfo = sObjectMgr->GetGameObjectTemplate(id); + const GameObjectTemplate* gInfo = sObjectMgr->GetGameObjectTemplate(id); if (!gInfo) { @@ -144,7 +144,7 @@ public: float y = float(chr->GetPositionY()); float z = float(chr->GetPositionZ()); float o = float(chr->GetOrientation()); - Map *map = chr->GetMap(); + Map* map = chr->GetMap(); GameObject* pGameObj = new GameObject; uint32 db_lowGUID = sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT); @@ -283,7 +283,7 @@ public: do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); lowguid = fields[0].GetUInt32(); id = fields[1].GetUInt32(); x = fields[2].GetFloat(); @@ -548,7 +548,7 @@ public: { do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); uint32 entry = fields[1].GetUInt32(); float x = fields[2].GetFloat(); @@ -582,7 +582,7 @@ public: if (!*args) { - if (WorldObject * obj = handler->getSelectedObject()) + if (WorldObject* obj = handler->getSelectedObject()) entry = obj->GetEntry(); else entry = atoi((char*)args); diff --git a/src/server/scripts/Commands/cs_gps.cpp b/src/server/scripts/Commands/cs_gps.cpp index e8812cf41c7..57b11630a85 100644 --- a/src/server/scripts/Commands/cs_gps.cpp +++ b/src/server/scripts/Commands/cs_gps.cpp @@ -45,7 +45,7 @@ public: static bool HandleGPSCommand(ChatHandler* handler, const char *args) { - WorldObject *obj = NULL; + WorldObject* obj = NULL; if (*args) { uint64 guid = handler->extractGuidFromLink((char*)args); @@ -85,7 +85,7 @@ public: Map2ZoneCoordinates(zone_x, zone_y, zone_id); - Map const *map = obj->GetMap(); + Map const* map = obj->GetMap(); float ground_z = map->GetHeight(obj->GetPositionX(), obj->GetPositionY(), MAX_HEIGHT); float floor_z = map->GetHeight(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ()); diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 3638414ced7..9eb315b0b6a 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -151,11 +151,11 @@ public: for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i) { - SkillLineAbilityEntry const *entry = sSkillLineAbilityStore.LookupEntry(i); + SkillLineAbilityEntry const* entry = sSkillLineAbilityStore.LookupEntry(i); if (!entry) continue; - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(entry->spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->spellId); if (!spellInfo) continue; @@ -194,11 +194,11 @@ public: for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { - TalentEntry const *talentInfo = sTalentStore.LookupEntry(i); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(i); if (!talentInfo) continue; - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) continue; @@ -246,7 +246,7 @@ public: return false; } - CreatureTemplate const *ci = pet->GetCreatureInfo(); + CreatureTemplate const* ci = pet->GetCreatureInfo(); if (!ci) { handler->SendSysMessage(LANG_WRONG_PET_TYPE); @@ -254,7 +254,7 @@ public: return false; } - CreatureFamilyEntry const *pet_family = sCreatureFamilyStore.LookupEntry(ci->family); + CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family); if (!pet_family) { handler->SendSysMessage(LANG_WRONG_PET_TYPE); @@ -271,11 +271,11 @@ public: for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { - TalentEntry const *talentInfo = sTalentStore.LookupEntry(i); + TalentEntry const* talentInfo = sTalentStore.LookupEntry(i); if (!talentInfo) continue; - TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); + TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); if (!talentTabInfo) continue; @@ -340,7 +340,7 @@ public: for (uint32 i = 0; i < sSkillLineStore.GetNumRows(); ++i) { - SkillLineEntry const *skillInfo = sSkillLineStore.LookupEntry(i); + SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(i); if (!skillInfo) continue; @@ -380,10 +380,10 @@ public: std::string name; - SkillLineEntry const *targetSkillInfo = NULL; + SkillLineEntry const* targetSkillInfo = NULL; for (uint32 i = 1; i < sSkillLineStore.GetNumRows(); ++i) { - SkillLineEntry const *skillInfo = sSkillLineStore.LookupEntry(i); + SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(i); if (!skillInfo) continue; @@ -437,7 +437,7 @@ public: for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) { - SkillLineAbilityEntry const *skillLine = sSkillLineAbilityStore.LookupEntry(j); + SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(j); if (!skillLine) continue; diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index c2371243150..1951b6cd361 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -441,12 +441,12 @@ public: else if (target->ToCreature()->isPet()) { Unit* owner = target->GetOwner(); - if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet *)target)->IsPermanentPetFor(owner->ToPlayer())) + if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet* )target)->IsPermanentPetFor(owner->ToPlayer())) { // check online security if (handler->HasLowerSecurity(owner->ToPlayer(), 0)) return false; - ((Pet *)target)->SetFreeTalentPoints(tp); + ((Pet* )target)->SetFreeTalentPoints(tp); owner->ToPlayer()->SendTalentsInfoData(true); return true; } @@ -1211,7 +1211,7 @@ public: } } - FactionEntry const *factionEntry = sFactionStore.LookupEntry(factionId); + FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId); if (!factionEntry) { diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 9431bba41d6..b91f85ec1b6 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -124,7 +124,7 @@ public: float y = chr->GetPositionY(); float z = chr->GetPositionZ(); float o = chr->GetOrientation(); - Map *map = chr->GetMap(); + Map* map = chr->GetMap(); if (chr->GetTransport()) { @@ -453,7 +453,7 @@ public: // faction is set in creature_template - not inside creature // update in memory - if (CreatureTemplate const *cinfo = creature->GetCreatureInfo()) + if (CreatureTemplate const* cinfo = creature->GetCreatureInfo()) { const_cast<CreatureTemplate*>(cinfo)->faction_A = factionId; const_cast<CreatureTemplate*>(cinfo)->faction_H = factionId; @@ -1182,7 +1182,7 @@ public: return false; Player* chr = handler->GetSession()->GetPlayer(); - FormationInfo *group_member; + FormationInfo* group_member; group_member = new FormationInfo; group_member->follow_angle = (creature->GetAngle(chr) - chr->GetOrientation()) * 180 / M_PI; diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 381860e5f53..5e08a1b0611 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -222,7 +222,7 @@ public: uint32 repValue = pQuest->GetRepObjectiveValue(); uint32 curRep = player->GetReputationMgr().GetReputation(repFaction); if (curRep < repValue) - if (FactionEntry const *factionEntry = sFactionStore.LookupEntry(repFaction)) + if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(repFaction)) player->GetReputationMgr().SetReputation(factionEntry, repValue); } @@ -232,7 +232,7 @@ public: uint32 repValue2 = pQuest->GetRepObjectiveValue2(); uint32 curRep = player->GetReputationMgr().GetReputation(repFaction); if (curRep < repValue2) - if (FactionEntry const *factionEntry = sFactionStore.LookupEntry(repFaction)) + if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(repFaction)) player->GetReputationMgr().SetReputation(factionEntry, repValue2); } diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index b8b39b18206..4e7a2794f58 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -420,7 +420,7 @@ public: sLog->outString("Reloading creature template entry %u", entry); - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[0] = fields[0].GetUInt32(); const_cast<CreatureTemplate*>(cInfo)->DifficultyEntry[1] = fields[1].GetUInt32(); diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index 2bc777afe85..17c076f903c 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -218,7 +218,7 @@ public: std::string nameLink = handler->GetNameLink(player); - Group *grp = player->GetGroup(); + Group* grp = player->GetGroup(); if (!grp) { handler->PSendSysMessage(LANG_NOT_IN_GROUP, nameLink.c_str()); @@ -226,7 +226,7 @@ public: return false; } - for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pl = itr->getSource(); diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index 184e24c1488..34ea264fd9e 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -115,7 +115,7 @@ public: point = (*result)[0].GetUInt32(); Player* player = handler->GetSession()->GetPlayer(); - //Map *map = player->GetMap(); + //Map* map = player->GetMap(); WorldDatabase.PExecute("INSERT INTO waypoint_data (id, point, position_x, position_y, position_z) VALUES ('%u', '%u', '%f', '%f', '%f')", pathid, point+1, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); @@ -293,7 +293,7 @@ public: return true; } - Field *fields; + Field* fields; do { @@ -519,7 +519,7 @@ public: do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); pathid = fields[0].GetUInt32(); point = fields[1].GetUInt32(); } @@ -566,7 +566,7 @@ public: handler->PSendSysMessage("|cff00ff00DEBUG: wp move, PathID: |r|cff00ffff%u|r", pathid); Player* chr = handler->GetSession()->GetPlayer(); - Map *map = chr->GetMap(); + Map* map = chr->GetMap(); { // wpCreature Creature* wpCreature = NULL; @@ -694,7 +694,7 @@ public: handler->SendSysMessage("|cff00ffffDEBUG: wp show info:|r"); do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); pathid = fields[0].GetUInt32(); uint32 point = fields[1].GetUInt32(); uint32 delay = fields[2].GetUInt32(); @@ -734,7 +734,7 @@ public: bool hasError = false; do { - Field *fields = result2->Fetch(); + Field* fields = result2->Fetch(); uint32 wpguid = fields[0].GetUInt32(); Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpguid, VISUAL_WAYPOINT, HIGHGUID_UNIT)); @@ -764,7 +764,7 @@ public: do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 point = fields[0].GetUInt32(); float x = fields[1].GetFloat(); float y = fields[2].GetFloat(); @@ -773,7 +773,7 @@ public: uint32 id = VISUAL_WAYPOINT; Player* chr = handler->GetSession()->GetPlayer(); - Map *map = chr->GetMap(); + Map* map = chr->GetMap(); float o = chr->GetOrientation(); Creature* wpCreature = new Creature; @@ -817,7 +817,7 @@ public: return false; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); float x = fields[0].GetFloat(); float y = fields[1].GetFloat(); float z = fields[2].GetFloat(); @@ -825,7 +825,7 @@ public: Player* chr = handler->GetSession()->GetPlayer(); float o = chr->GetOrientation(); - Map *map = chr->GetMap(); + Map* map = chr->GetMap(); Creature* creature = new Creature; if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o)) @@ -865,7 +865,7 @@ public: handler->SetSentErrorMessage(true); return false; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); float x = fields[0].GetFloat(); float y = fields[1].GetFloat(); float z = fields[2].GetFloat(); @@ -873,7 +873,7 @@ public: Player* chr = handler->GetSession()->GetPlayer(); float o = chr->GetOrientation(); - Map *map = chr->GetMap(); + Map* map = chr->GetMap(); Creature* creature = new Creature; if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o)) @@ -908,7 +908,7 @@ public: bool hasError = false; do { - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); uint32 guid = fields[0].GetUInt32(); Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(guid, VISUAL_WAYPOINT, HIGHGUID_UNIT)); if (!creature) diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp index aef3e1b3502..f1884b7c0e9 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp @@ -84,7 +84,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_water_elementalAI(creature); } @@ -194,7 +194,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_balindaAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index 7e4e6f15384..e7a7b1a01ba 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -128,7 +128,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_drektharAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index 783be5bf7a3..40d1ca2fe68 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -118,7 +118,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_galvangarAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp index c5b600c8807..973e7ca5f64 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp @@ -118,7 +118,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_vanndarAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp index 6efe5f01f37..d9d8627403a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp @@ -106,7 +106,7 @@ class at_ring_of_law : public AreaTriggerScript public: at_ring_of_law() : AreaTriggerScript("at_ring_of_law") { } - bool OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) { if (InstanceScript* pInstance = player->GetInstanceScript()) { @@ -761,7 +761,7 @@ public: return marshal_windsorAI; } - bool OnQuestAccept(Player* player, Creature* creature, Quest const *quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { if (quest->GetQuestId() == 4322) {PlayerStart = player; diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index 896d27bd768..058e295b646 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -38,7 +38,7 @@ public: bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) { - InstanceScript *pInstance = player->GetInstanceScript(); + InstanceScript* pInstance = player->GetInstanceScript(); if (!pInstance) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 2cc56f9f502..92c2d417cda 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -98,7 +98,7 @@ public: void UpdateAI(const uint32 diff); - void SpellHit(Unit* /*source*/, const SpellInfo *spell) + void SpellHit(Unit* /*source*/, const SpellInfo* spell) { if (spell->Mechanic == MECHANIC_DISARM) DoScriptText(SAY_DISARMED, me); @@ -277,9 +277,9 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff) if (ChargeTimer <= diff) { Unit* target = NULL; - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - std::vector<Unit* > target_list; - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + std::vector<Unit*> target_list; + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); if (target && !target->IsWithinDist(me, ATTACK_DISTANCE, false)) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index 14cfd95fae4..04981669681 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -81,7 +81,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint64 AddGUID[4]; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index a9dd97fef28..d25d3518b9e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -149,7 +149,7 @@ public: CAST_CRE(pMalchezaar)->AI()->KilledUnit(who); } - void SpellHit(Unit* /*who*/, const SpellInfo *spell) + void SpellHit(Unit* /*who*/, const SpellInfo* spell) { if (spell->Id == SPELL_INFERNAL_RELAY) { @@ -188,7 +188,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 EnfeebleTimer; uint32 EnfeebleResetTimer; uint32 ShadowNovaTimer; @@ -297,7 +297,7 @@ public: SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); //damage - const CreatureTemplate *cinfo = me->GetCreatureInfo(); + const CreatureTemplate* cinfo = me->GetCreatureInfo(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, cinfo->mindmg); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, cinfo->maxdmg); me->UpdateDamagePhysical(BASE_ATTACK); @@ -305,18 +305,18 @@ public: void EnfeebleHealthEffect() { - const SpellInfo *info = sSpellMgr->GetSpellInfo(SPELL_ENFEEBLE_EFFECT); + const SpellInfo* info = sSpellMgr->GetSpellInfo(SPELL_ENFEEBLE_EFFECT); if (!info) return; - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - std::vector<Unit* > targets; + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + std::vector<Unit*> targets; if (t_list.empty()) return; //begin + 1, so we don't target the one with the highest threat - std::list<HostileReference *>::const_iterator itr = t_list.begin(); + std::list<HostileReference*>::const_iterator itr = t_list.begin(); std::advance(itr, 1); for (; itr != t_list.end(); ++itr) //store the threat list in a different container if (Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid())) @@ -328,7 +328,7 @@ public: targets.erase(targets.begin()+rand()%targets.size()); uint32 i = 0; - for (std::vector<Unit* >::const_iterator iter = targets.begin(); iter != targets.end(); ++iter, ++i) + for (std::vector<Unit*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter, ++i) if (Unit* target = *iter) { enfeeble_targets[i] = target->GetGUID(); @@ -420,7 +420,7 @@ public: SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE, EQUIP_NO_CHANGE); //damage - const CreatureTemplate *cinfo = me->GetCreatureInfo(); + const CreatureTemplate* cinfo = me->GetCreatureInfo(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, 2*cinfo->mindmg); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, 2*cinfo->maxdmg); me->UpdateDamagePhysical(BASE_ATTACK); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index c8a38164126..51085504f99 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -187,13 +187,13 @@ public: void FlameWreathEffect() { std::vector<Unit*> targets; - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); if (t_list.empty()) return; //store the threat list in a different container - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); //only on alive players diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index a80ee5575ae..fb7feb5f267 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -265,7 +265,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint64 PortalGUID[2]; uint8 PortalsCount; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 3d497e3811a..a6239394784 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -340,7 +340,7 @@ public: me->DespawnOrUnsummon(); } - void SpellHit(Unit* /*caster*/, const SpellInfo *Spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) { if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand()%10))) { @@ -745,7 +745,7 @@ public: }; /**************************************/ -/**** Opera Red Riding Hood Event ****/ +/**** Opera Red Riding Hood Event* ***/ /************************************/ /**** Yells for the Wolf ****/ @@ -761,7 +761,7 @@ public: #define GOSSIP_GRANDMA "What phat lewtz you have grandmother?" -/**** The Wolf's Entry ****/ +/**** The Wolf's Entry* ***/ #define CREATURE_BIG_BAD_WOLF 17521 class npc_grandmother : public CreatureScript @@ -920,7 +920,7 @@ public: }; /**********************************************/ -/******** Opera Romeo and Juliet Event *******/ +/******** Opera Romeo and Juliet Event* ******/ /********************************************/ /**** Speech *****/ @@ -1080,7 +1080,7 @@ public: me->DespawnOrUnsummon(); } - void SpellHit(Unit* /*caster*/, const SpellInfo *Spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) { if (Spell->Id == SPELL_DRINK_POISON) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 0123e51146b..e22bdb1e9ef 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -479,7 +479,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint64 ArcanagosGUID; diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp index d082140e34c..871cef96316 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp @@ -48,7 +48,7 @@ public: CreatureAI* GetAI(Creature* creature) const { - SimpleAI *ai = new SimpleAI(creature); + SimpleAI* ai = new SimpleAI(creature); ai->Spell[0].Enabled = true; ai->Spell[0].Spell_Id = SPELL_CONE_OF_FIRE; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 7faa8df44bf..d2982900be1 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -106,7 +106,7 @@ public: { me->SetReactState(REACT_PASSIVE); if (!me->GetEquipmentId()) - if (const CreatureTemplate *info = sObjectMgr->GetCreatureTemplate(28406)) + if (const CreatureTemplate* info = sObjectMgr->GetCreatureTemplate(28406)) if (info->equipmentId) const_cast<CreatureTemplate*>(me->GetCreatureInfo())->equipmentId = info->equipmentId; } @@ -625,7 +625,7 @@ public: { npc_salanar_the_horsemanAI(Creature* c) : ScriptedAI(c) {} - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (spell->Id == DELIVER_STOLEN_HORSE) { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index af534444468..532ede1d3c6 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -71,7 +71,7 @@ public: me->RestoreFaction(); } - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->isAlive() && !uiSpeech_counter) { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 8bcdce608cf..d308db1459a 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -234,7 +234,7 @@ struct Location float x, y, z, o; }; -void UpdateWorldState(Map *map, uint32 id, uint32 state) +void UpdateWorldState(Map* map, uint32 id, uint32 state) { Map::PlayerList const& players = map->GetPlayers(); @@ -1311,7 +1311,7 @@ public: // pGo->SetPhaseMask(0, true); { - Map *map = me->GetMap(); // search players with in 50 yards for quest credit + Map* map = me->GetMap(); // search players with in 50 yards for quest credit Map::PlayerList const &PlayerList = map->GetPlayers(); if (!PlayerList.isEmpty()) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 5262ed6620c..e99f2c2a387 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -176,7 +176,7 @@ public: DoCast(me, spell); } - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_WISP_FLIGHT_PORT && Creaturetype == 4) me->SetDisplayId(2027); @@ -364,7 +364,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint64 headGUID; uint64 PlayerGUID; @@ -774,7 +774,7 @@ public: void EnterCombat(Unit* /*who*/){} - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_SPROUTING) { diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp index 1de9a507d2f..16e7ecfd4bc 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp @@ -60,7 +60,7 @@ public: void JustDied(Unit* /*killer*/) { - InstanceScript *pInstance = me->GetInstanceScript(); + InstanceScript* pInstance = me->GetInstanceScript(); if (pInstance) { pInstance->SetData(DATA_LADYILLUCIABAROV_DEATH, 0); diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index fbea2f35219..1b4ae929e17 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -67,7 +67,7 @@ public: void JustDied(Unit* /*killer*/) { - InstanceScript *pInstance = me->GetInstanceScript(); + InstanceScript* pInstance = me->GetInstanceScript(); if (pInstance) { pInstance->SetData(DATA_INSTRUCTORMALICIA_DEATH, 0); diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp index 794758b6bd7..3b6d3557265 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp @@ -56,7 +56,7 @@ public: void JustDied(Unit* /*killer*/) { - InstanceScript *pInstance = me->GetInstanceScript(); + InstanceScript* pInstance = me->GetInstanceScript(); if (pInstance) { pInstance->SetData(DATA_LORDALEXEIBAROV_DEATH, 0); diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp index d23eee99bb9..f3743230fc8 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp @@ -60,7 +60,7 @@ public: void JustDied(Unit* /*killer*/) { - InstanceScript *pInstance = me->GetInstanceScript(); + InstanceScript* pInstance = me->GetInstanceScript(); if (pInstance) { pInstance->SetData(DATA_LOREKEEPERPOLKELT_DEATH, 0); diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp index e69fa65a00e..cedcd626261 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp @@ -62,7 +62,7 @@ public: void JustDied(Unit* /*killer*/) { - InstanceScript *pInstance = me->GetInstanceScript(); + InstanceScript* pInstance = me->GetInstanceScript(); if (pInstance) { pInstance->SetData(DATA_THERAVENIAN_DEATH, 0); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 3640d5be4a4..25ff8c9d9ec 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -96,7 +96,7 @@ public: uiNpcEntry = c->GetEntry(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 uiNpcEntry; void WaypointReached(uint32 uiPoint) diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index fac45e5ffaa..af71960763d 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -59,7 +59,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 HolyLight_Timer; uint32 DivineShield_Timer; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index 249463cd090..82c83948c27 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -53,9 +53,9 @@ public: if (pInstance->GetData(TYPE_BARON_RUN) != NOT_STARTED) return false; - if (Group *pGroup = player->GetGroup()) + if (Group* pGroup = player->GetGroup()) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupie = itr->getSource(); if (!pGroupie) @@ -148,7 +148,7 @@ public: void EnterCombat(Unit* /*who*/) {} - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (caster->GetTypeId() == TYPEID_PLAYER) { @@ -224,7 +224,7 @@ public: void EnterCombat(Unit* /*who*/) {} - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (!Tagged && spell->Id == SPELL_EGAN_BLASTER) Tagged = true; diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp index 18d8bd26106..86ed6690751 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp @@ -39,7 +39,7 @@ class at_malfurion_stormrage : public AreaTriggerScript public: at_malfurion_stormrage() : AreaTriggerScript("at_malfurion_stormrage") { } - bool OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) { if (player->GetInstanceScript() && !player->FindNearestCreature(15362, 15)) player->SummonCreature(15362, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index e25211f454a..638bbb2f0d9 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -102,7 +102,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; bool SisterDeath; bool Enraged; @@ -361,7 +361,7 @@ public: IntroStepCounter = 10; } - InstanceScript *pInstance; + InstanceScript* pInstance; bool SisterDeath; bool Enraged; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index b156caa911f..584ce3856a4 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -120,7 +120,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; PhaseFelmyst phase; EventMap events; @@ -192,7 +192,7 @@ public: pInstance->SetData(DATA_FELMYST_EVENT, DONE); } - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { // workaround for linked aura /*if (spell->Id == SPELL_VAPOR_FORCE) diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index febf43f1614..fb6e44eaf36 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -124,7 +124,7 @@ public: me->setActive(true); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 ArcaneBuffetTimer; uint32 FrostBreathTimer; @@ -445,7 +445,7 @@ public: struct boss_kalecAI : public ScriptedAI { - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 RevitalizeTimer; uint32 HeroicStrikeTimer; @@ -582,7 +582,7 @@ public: KalecgosGUID = 0; } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 CorruptionStrikeTimer; uint32 AgonyCurseTimer; diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index 089c9e9973d..06b04e0ca6a 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -112,7 +112,7 @@ class boss_archaedas : public CreatureScript me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); } - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { // Being woken up from the altar, start the awaken sequence if (spell == sSpellMgr->GetSpellInfo(SPELL_ARCHAEDAS_AWAKEN)) @@ -267,7 +267,7 @@ class mob_archaedas_minions : public CreatureScript bAmIAwake = true; } - void SpellHit (Unit* /*caster*/, const SpellInfo *spell) { + void SpellHit (Unit* /*caster*/, const SpellInfo* spell) { // time to wake up, start animation if (spell == sSpellMgr->GetSpellInfo(SPELL_ARCHAEDAS_AWAKEN)) { diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 3701383b0ae..542e11d15da 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -76,7 +76,7 @@ class boss_akilzon : public CreatureScript { pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint64 BirdGUIDs[8]; uint64 TargetGUID; @@ -194,7 +194,7 @@ class boss_akilzon : public CreatureScript cell.data.Part.reserved = ALL_DISTRICT; cell.SetNoCreate(); - std::list<Unit* > tempUnitMap; + std::list<Unit*> tempUnitMap; { Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(me, me, 999); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index 0a3cdbebdfa..9933529e59a 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -88,7 +88,7 @@ class boss_halazzi : public CreatureScript pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 FrenzyTimer; uint32 SaberlashTimer; @@ -142,7 +142,7 @@ class boss_halazzi : public CreatureScript damage = 0; } - void SpellHit(Unit*, const SpellInfo *spell) + void SpellHit(Unit*, const SpellInfo* spell) { if (spell->Id == SPELL_TRANSFORM_SPLIT2) EnterPhase(PHASE_HUMAN); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 1a4082855a9..f19652f912d 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -219,7 +219,7 @@ class boss_hexlord_malacrass : public CreatureScript AddGUID[i] = 0; } - InstanceScript *pInstance; + InstanceScript* pInstance; uint64 AddGUID[4]; uint32 AddEntry[4]; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 4962ac285ca..9638936a3d1 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -118,7 +118,7 @@ class boss_janalai : public CreatureScript pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 FireBreathTimer; uint32 BombTimer; @@ -454,7 +454,7 @@ class mob_janalai_firebomb : public CreatureScript void Reset() {} - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_FIRE_BOMB_THROW) DoCast(me, SPELL_FIRE_BOMB_DUMMY, true); @@ -491,7 +491,7 @@ class mob_janalai_hatcher : public CreatureScript pInstance =c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 waypoint; uint32 HatchNum; @@ -624,7 +624,7 @@ class mob_janalai_hatchling : public CreatureScript pInstance =c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 BuffetTimer; void Reset() diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 812e1e79b4f..ff4fe3f8a06 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -108,7 +108,7 @@ class boss_nalorakk : public CreatureScript pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 BrutalSwipe_Timer; uint32 Mangle_Timer; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index fe6780f6768..12811742f26 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -54,7 +54,7 @@ class npc_forest_frog : public CreatureScript pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() {} @@ -91,7 +91,7 @@ class npc_forest_frog : public CreatureScript } } - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->GetTypeId() == TYPEID_PLAYER && me->GetEntry() == ENTRY_FOREST_FROG) { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index 5345801f801..15c72992766 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -237,7 +237,7 @@ class boss_arlokk : public CreatureScript me->SetDisplayId(MODEL_ID_PANTHER); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - const CreatureTemplate *cinfo = me->GetCreatureInfo(); + const CreatureTemplate* cinfo = me->GetCreatureInfo(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35))); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35))); me->UpdateDamagePhysical(BASE_ATTACK); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp index 9a7a21fb46c..1c8a1eef388 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp @@ -60,7 +60,7 @@ class boss_hakkar : public CreatureScript m_pInstance = c->GetInstanceScript(); } - InstanceScript *m_pInstance; + InstanceScript* m_pInstance; uint32 BloodSiphon_Timer; uint32 CorruptedBlood_Timer; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index a1421f7cfba..7c339a342af 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -59,7 +59,7 @@ class boss_jeklik : public CreatureScript m_pInstance = c->GetInstanceScript(); } - InstanceScript *m_pInstance; + InstanceScript* m_pInstance; uint32 Charge_Timer; uint32 SonicBurst_Timer; @@ -241,7 +241,7 @@ class mob_batrider : public CreatureScript m_pInstance = c->GetInstanceScript(); } - InstanceScript *m_pInstance; + InstanceScript* m_pInstance; uint32 Bomb_Timer; uint32 Check_Timer; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp index 51db392d3a6..b8eaefbd0f8 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp @@ -194,7 +194,7 @@ class mob_healing_ward : public CreatureScript uint32 Heal_Timer; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp index 75fa999825d..7f7a85b881f 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp @@ -72,7 +72,7 @@ class boss_mandokir : public CreatureScript float targetY; float targetZ; - InstanceScript *m_pInstance; + InstanceScript* m_pInstance; bool endWatch; bool someWatched; @@ -300,7 +300,7 @@ class mob_ohgan : public CreatureScript } uint32 SunderArmor_Timer; - InstanceScript *m_pInstance; + InstanceScript* m_pInstance; void Reset() { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp index ca34747f8a3..793a404736a 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp @@ -56,7 +56,7 @@ class boss_marli : public CreatureScript m_pInstance = c->GetInstanceScript(); } - InstanceScript *m_pInstance; + InstanceScript* m_pInstance; uint32 SpawnStartSpiders_Timer; uint32 PoisonVolley_Timer; @@ -156,7 +156,7 @@ class boss_marli : public CreatureScript { DoScriptText(SAY_TRANSFORM, me); DoCast(me, SPELL_SPIDER_FORM); - const CreatureTemplate *cinfo = me->GetCreatureInfo(); + const CreatureTemplate* cinfo = me->GetCreatureInfo(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35))); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35))); me->UpdateDamagePhysical(BASE_ATTACK); @@ -196,7 +196,7 @@ class boss_marli : public CreatureScript if (TransformBack_Timer <= diff) { me->SetDisplayId(15220); - const CreatureTemplate *cinfo = me->GetCreatureInfo(); + const CreatureTemplate* cinfo = me->GetCreatureInfo(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 1))); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 1))); me->UpdateDamagePhysical(BASE_ATTACK); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index 472c5922460..9dc2512e8c5 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -81,7 +81,7 @@ class boss_thekal : public CreatureScript uint32 Check_Timer; uint32 Resurrect_Timer; - InstanceScript *m_pInstance; + InstanceScript* m_pInstance; bool Enraged; bool PhaseTwo; bool WasDead; @@ -201,7 +201,7 @@ class boss_thekal : public CreatureScript me->SetStandState(UNIT_STAND_STATE_STAND); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetFullHealth(); - const CreatureTemplate *cinfo = me->GetCreatureInfo(); + const CreatureTemplate* cinfo = me->GetCreatureInfo(); me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 40))); me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 40))); me->UpdateDamagePhysical(BASE_ATTACK); @@ -290,7 +290,7 @@ class mob_zealot_lorkhan : public CreatureScript bool FakeDeath; - InstanceScript *m_pInstance; + InstanceScript* m_pInstance; void Reset() { @@ -451,7 +451,7 @@ class mob_zealot_zath : public CreatureScript bool FakeDeath; - InstanceScript *m_pInstance; + InstanceScript* m_pInstance; void Reset() { diff --git a/src/server/scripts/EasternKingdoms/alterac_mountains.cpp b/src/server/scripts/EasternKingdoms/alterac_mountains.cpp index 86ecfce5684..36daf41ec78 100644 --- a/src/server/scripts/EasternKingdoms/alterac_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/alterac_mountains.cpp @@ -30,5 +30,5 @@ EndContentData */ /*void AddSC_alterac_mountains() { - Script *newscript; + Script* newscript; }*/ diff --git a/src/server/scripts/EasternKingdoms/duskwood.cpp b/src/server/scripts/EasternKingdoms/duskwood.cpp index 6c6086b8c74..145e560c946 100644 --- a/src/server/scripts/EasternKingdoms/duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/duskwood.cpp @@ -34,7 +34,7 @@ class at_twilight_grove : public AreaTriggerScript public: at_twilight_grove() : AreaTriggerScript("at_twilight_grove") { } - bool OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) { if (player->HasQuestForItem(21149)) { diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp index b9c54806c51..6960fed819e 100644 --- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp @@ -346,7 +346,7 @@ class npc_second_trial_controller : public CreatureScript public: npc_second_trial_controller() : CreatureScript("npc_second_trial_controller") { } - bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const *quest) + bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest) { // One Player exclusive quest, wait for user go activation if (quest->GetQuestId() == QUEST_SECOND_TRIAL) diff --git a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp index 0e8021ed2e2..7e376b65020 100644 --- a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp @@ -43,7 +43,7 @@ class npc_corporal_keeshan : public CreatureScript public: npc_corporal_keeshan() : CreatureScript("npc_corporal_keeshan") { } - bool OnQuestAccept(Player* player, Creature* creature, Quest const *pQuest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* pQuest) { if (pQuest->GetQuestId() == QUEST_MISSING_IN_ACTION) { diff --git a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp index a46b0ca7b38..c4e105d3bee 100644 --- a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp +++ b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp @@ -85,7 +85,7 @@ public: } } - void SpellHit(Unit* Hitter, const SpellInfo *Spellkind) + void SpellHit(Unit* Hitter, const SpellInfo* Spellkind) { if ((Spellkind->Id == SPELL_SHIMMERING_VESSEL) && !spellHit && (Hitter->GetTypeId() == TYPEID_PLAYER) && (CAST_PLR(Hitter)->IsActiveQuest(QUEST_REDEEMING_THE_DEAD))) diff --git a/src/server/scripts/EasternKingdoms/stormwind_city.cpp b/src/server/scripts/EasternKingdoms/stormwind_city.cpp index 5095d702f2e..88f76d47c53 100644 --- a/src/server/scripts/EasternKingdoms/stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/stormwind_city.cpp @@ -510,7 +510,7 @@ public: Unit* summoner = me->ToTempSummon()->GetSummoner(); if (summoner && summoner->GetTypeId() == TYPEID_UNIT && summoner->IsAIEnabled) { - npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI *ai = + npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI* ai = CAST_AI(npc_lord_gregor_lescovar::npc_lord_gregor_lescovarAI, summoner->GetAI()); if (ai) { @@ -696,7 +696,7 @@ class npc_tyrion : public CreatureScript public: npc_tyrion() : CreatureScript("npc_tyrion") { } - bool OnQuestAccept(Player* player, Creature* creature, Quest const *pQuest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* pQuest) { if (pQuest->GetQuestId() == QUEST_THE_ATTACK) { diff --git a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp index 00f8274bf31..4e4a077636b 100644 --- a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp +++ b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp @@ -59,7 +59,7 @@ public: me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); } - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (caster->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp index dc04f77a488..71359a07afa 100644 --- a/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp +++ b/src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp @@ -44,7 +44,7 @@ public: npc_galen_goodward() : CreatureScript("npc_galen_goodward") { } - bool OnQuestAccept(Player* player, Creature* creature, Quest const *quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { if (quest->GetQuestId() == QUEST_GALENS_ESCAPE) { diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp index 72c5d8ace5b..2a2becb906f 100644 --- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp @@ -293,7 +293,7 @@ class npc_anchorite_truuen : public CreatureScript public: npc_anchorite_truuen() : CreatureScript("npc_anchorite_truuen") { } - bool OnQuestAccept(Player* player, Creature* creature, Quest const *quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { npc_escortAI* pEscortAI = CAST_AI(npc_anchorite_truuen::npc_anchorite_truuenAI, creature->AI()); diff --git a/src/server/scripts/Examples/example_commandscript.cpp b/src/server/scripts/Examples/example_commandscript.cpp index 78e0ddc7272..8513fbf8cf2 100644 --- a/src/server/scripts/Examples/example_commandscript.cpp +++ b/src/server/scripts/Examples/example_commandscript.cpp @@ -29,7 +29,7 @@ EndScriptData */ // **** This script is designed as an example for others to build on **** // **** Please modify whatever you'd like to as this script is only for developement **** -// **** Script Info **** +// **** Script Info* *** // This script's primary purpose is to show just how much you can really do with commandscripts class example_commandscript : public CommandScript diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp index 221a5f2f4f7..d1ac2045e61 100644 --- a/src/server/scripts/Examples/example_creature.cpp +++ b/src/server/scripts/Examples/example_creature.cpp @@ -28,12 +28,12 @@ EndScriptData */ // **** This script is designed as an example for others to build on **** // **** Please modify whatever you'd like to as this script is only for developement **** -// **** Script Info **** +// **** Script Info* *** // This script is written in a way that it can be used for both friendly and hostile monsters // Its primary purpose is to show just how much you can really do with scripts // I recommend trying it out on both an agressive NPC and on friendly npc -// **** Quick Info **** +// **** Quick Info* *** // Functions with Handled Function marked above them are functions that are called automatically by the core // Functions that are marked Custom Function are functions I've created to simplify code diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp index 303a307d2b9..adafc78f33f 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp @@ -53,7 +53,7 @@ public: bool OnGossipHello(Player* /*player*/, GameObject* pGo) { - InstanceScript *pInstance = pGo->GetInstanceScript(); + InstanceScript* pInstance = pGo->GetInstanceScript(); if (pInstance) { diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp index 5b88ddf63a1..455ea4c4796 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp @@ -44,7 +44,7 @@ public: uint32 uiPoisonCloudTimer; bool bIsEnraged; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp index b8fe114f9df..0a137b7eac0 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp @@ -42,7 +42,7 @@ public: uint32 uiNetTimer; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp index 9476380deb6..09a9b52353b 100644 --- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp +++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp @@ -52,7 +52,7 @@ public: uint32 uiMindBlastTimer; uint32 uiSleepTimer; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp index 337c4cbb1f9..670ccabd322 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp @@ -172,8 +172,8 @@ public: //cast dummy, useful for bos addons me->CastCustomSpell(me, SPELL_MARK, NULL, NULL, NULL, false, NULL, NULL, me->GetGUID()); - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); if (target && target->GetTypeId() == TYPEID_PLAYER && target->getPowerType() == POWER_MANA) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp index 666470617c7..4c89fcfe5b4 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp @@ -60,7 +60,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 SandBreath_Timer; uint32 TimeStop_Timer; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp index 092ee779d75..1566058aef0 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp @@ -60,7 +60,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 ArcaneBlast_Timer; uint32 TimeLapse_Timer; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp index d284a115f0c..b9a3c954771 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp @@ -59,7 +59,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Haste_Timer; uint32 SpellReflection_Timer; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp index 2b2151daf02..e1ea473998d 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp @@ -73,7 +73,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 SpellCorrupt_Timer; uint32 Check_Timer; @@ -266,7 +266,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 TimeRiftWave_Timer; uint8 mRiftWaveCount; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp index 31397ec7ad2..fca0545292a 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp @@ -57,7 +57,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Holy_Light_Timer; uint32 Cleanse_Timer; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp index a965fb74517..b20882958d9 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp @@ -59,7 +59,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 SandBreath_Timer; uint32 ImpendingDeath_Timer; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp index ec39737b39f..485c52d0423 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp @@ -289,7 +289,7 @@ public: me->setActive(true); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint64 TarethaGUID; @@ -629,7 +629,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; void WaypointReached(uint32 i) { diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp index a5efb416b76..c057430bd18 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp @@ -54,7 +54,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Cleave_Timer; uint32 ToxicVolley_Timer; @@ -151,7 +151,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Charge_Timer; uint32 KnockBack_Timer; @@ -244,7 +244,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Heal_Timer; uint32 Fear_Timer; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp index 4fc02c70728..b0033aa582a 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp @@ -238,7 +238,7 @@ public: { if (Player* target = CAST_PLR(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))) { - if (Group *pGrp = target->GetGroup()) + if (Group* pGrp = target->GetGroup()) for (uint8 ico = 0; ico < TARGETICONCOUNT; ++ico) { //if (grp->m_targetIcons[ico] == me->GetGUID()) -- private member :( diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index e5b6d79f912..6354d52cb6a 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -66,7 +66,7 @@ struct boss_twinemperorsAI : public ScriptedAI pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Heal_Timer; uint32 Teleport_Timer; @@ -147,7 +147,7 @@ struct boss_twinemperorsAI : public ScriptedAI { // TODO: we should activate the other boss location so he can start attackning even if nobody // is near I dont know how to do that - ScriptedAI *otherAI = CAST_AI(ScriptedAI, pOtherBoss->AI()); + ScriptedAI* otherAI = CAST_AI(ScriptedAI, pOtherBoss->AI()); if (!pOtherBoss->isInCombat()) { DoPlaySoundToSet(me, IAmVeklor() ? SOUND_VL_AGGRO : SOUND_VN_AGGRO); @@ -157,7 +157,7 @@ struct boss_twinemperorsAI : public ScriptedAI } } - void SpellHit(Unit* caster, const SpellInfo *entry) + void SpellHit(Unit* caster, const SpellInfo* entry) { if (caster == me) return; @@ -221,7 +221,7 @@ struct boss_twinemperorsAI : public ScriptedAI float other_z = pOtherBoss->GetPositionZ(); float other_o = pOtherBoss->GetOrientation(); - Map *thismap = me->GetMap(); + Map* thismap = me->GetMap(); thismap->CreatureRelocation(pOtherBoss, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); thismap->CreatureRelocation(me, other_x, other_y, other_z, other_o); diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp index 650463a02df..13b4acbca3e 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp @@ -118,7 +118,7 @@ public: void GiveBuddyMyList(Creature* c) { - aqsentinelAI *cai = CAST_AI(aqsentinelAI, (c)->AI()); + aqsentinelAI* cai = CAST_AI(aqsentinelAI, (c)->AI()); for (int i=0; i<3; ++i) if (NearbyGUID[i] && NearbyGUID[i] != c->GetGUID()) cai->AddBuddyToList(NearbyGUID[i]); diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index 23ce945daaf..7cc1b71a97f 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -88,7 +88,7 @@ public: bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) { player->PlayerTalkClass->ClearMenus(); - InstanceScript *pInstance = creature->GetInstanceScript(); + InstanceScript* pInstance = creature->GetInstanceScript(); if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { player->CLOSE_GOSSIP_MENU(); @@ -109,7 +109,7 @@ public: bool OnGossipHello(Player* player, Creature* creature) { - InstanceScript *pInstance = creature->GetInstanceScript(); + InstanceScript* pInstance = creature->GetInstanceScript(); if (pInstance) { @@ -149,7 +149,7 @@ public: uint32 eventTimer; uint32 currentEvent; uint32 eventProgress; - InstanceScript *pInstance; + InstanceScript* pInstance; void WaypointReached(uint32 i) { @@ -315,7 +315,7 @@ public: eventTimer = 3000; if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX))) { - AchievementEntry const *AchievWC = GetAchievementStore()->LookupEntry(ACHIEVEMENT_WAILING_CAVERNS); + AchievementEntry const* AchievWC = GetAchievementStore()->LookupEntry(ACHIEVEMENT_WAILING_CAVERNS); if (AchievWC) { Map* pMap = me->GetMap(); diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index 98c93ec3c34..e6a4bca2f91 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -443,7 +443,7 @@ class at_zumrah : public AreaTriggerScript public: at_zumrah() : AreaTriggerScript("at_zumrah") { } - bool OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) { Creature* pZumrah = player->FindNearestCreature(ZUMRAH_ID, 30.0f); diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp index d49a776fa4d..ef6a6dd1f90 100644 --- a/src/server/scripts/Kalimdor/azshara.cpp +++ b/src/server/scripts/Kalimdor/azshara.cpp @@ -63,7 +63,7 @@ public: void EnterCombat(Unit* /*who*/) { } - void SpellHit(Unit* Hitter, const SpellInfo *Spellkind) + void SpellHit(Unit* Hitter, const SpellInfo* Spellkind) { if (!spellhit && Hitter->GetTypeId() == TYPEID_PLAYER && diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp index 3e8bcbef02e..e043f9e05b4 100644 --- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp @@ -111,7 +111,7 @@ public: } } - void SpellHit(Unit* Caster, const SpellInfo *Spell) + void SpellHit(Unit* Caster, const SpellInfo* Spell) { if (Spell->SpellFamilyFlags[2] & 0x080000000) { diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp index 6998eb2f8e7..e92faa5cde7 100644 --- a/src/server/scripts/Kalimdor/durotar.cpp +++ b/src/server/scripts/Kalimdor/durotar.cpp @@ -68,7 +68,7 @@ public: work = true; } - void SpellHit(Unit* caster, const SpellInfo * spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (spell->Id == SPELL_AWAKEN_PEON && caster->GetTypeId() == TYPEID_PLAYER && CAST_PLR(caster)->GetQuestStatus(QUEST_LAZY_PEONS) == QUEST_STATUS_INCOMPLETE) diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp index a0f30c53a4d..1de4f115f36 100644 --- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp @@ -273,7 +273,7 @@ public: return true; } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_theramore_guardAI(creature); } @@ -588,7 +588,7 @@ public: return new npc_stinkyAI(creature); } - bool OnQuestAccept(Player* player, Creature* creature, Quest const *quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { if (quest->GetQuestId() == QUEST_STINKYS_ESCAPE_H || QUEST_STINKYS_ESCAPE_A) { diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp index db294ddbc1b..a714f8716ae 100644 --- a/src/server/scripts/Kalimdor/moonglade.cpp +++ b/src/server/scripts/Kalimdor/moonglade.cpp @@ -559,7 +559,7 @@ class npc_clintar_dreamwalker : public CreatureScript public: npc_clintar_dreamwalker() : CreatureScript("npc_clintar_dreamwalker") { } - bool OnQuestAccept(Player* player, Creature* creature, Quest const *quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { if (quest->GetQuestId() == 10965) { diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp index d57bb932479..000717e1c56 100644 --- a/src/server/scripts/Kalimdor/silithus.cpp +++ b/src/server/scripts/Kalimdor/silithus.cpp @@ -1003,7 +1003,7 @@ public: if (!player) return; - if (Group *EventGroup = player->GetGroup()) + if (Group* EventGroup = player->GetGroup()) { Player* GroupMember; diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp index e03a71f55a1..0c4b73b8658 100644 --- a/src/server/scripts/Kalimdor/tanaris.cpp +++ b/src/server/scripts/Kalimdor/tanaris.cpp @@ -279,7 +279,7 @@ class npc_steward_of_time : public CreatureScript public: npc_steward_of_time() : CreatureScript("npc_steward_of_time") { } - bool OnQuestAccept(Player* player, Creature* /*creature*/, Quest const *quest) + bool OnQuestAccept(Player* player, Creature* /*creature*/, Quest const* quest) { if (quest->GetQuestId() == 10279) //Quest: To The Master's Lair player->CastSpell(player, 34891, true); //(Flight through Caverns) diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp index 4fb76c9c610..21b0a5c6ee1 100644 --- a/src/server/scripts/Kalimdor/the_barrens.cpp +++ b/src/server/scripts/Kalimdor/the_barrens.cpp @@ -265,7 +265,7 @@ public: me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); } - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_FLARE || spell->Id == SPELL_FOLLY) { diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 77b1d7366e5..71f810a6020 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -96,7 +96,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; bool bChanneling; bool bGuardianSummoned; @@ -346,7 +346,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_anub_arakAI(creature); } diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index f4fe681bcb9..afb04ace085 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -188,7 +188,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_hadronoxAI(creature); } diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp index 3b67d12d4b3..42d03f05e51 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp @@ -199,7 +199,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_krik_thirAI(creature); } @@ -221,7 +221,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_skittering_infectorAI(creature); } @@ -272,7 +272,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_anub_ar_skirmisherAI(creature); } @@ -318,7 +318,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_anub_ar_shadowcasterAI(creature); } @@ -363,7 +363,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_anub_ar_warriorAI(creature); } @@ -414,7 +414,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_watcher_gashraAI(creature); } @@ -468,7 +468,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_watcher_narjilAI(creature); } @@ -524,7 +524,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_watcher_silthikAI(creature); } diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index 997b11fb084..7d35814a8a0 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -203,7 +203,7 @@ public: } }; - InstanceScript* GetInstanceScript(InstanceMap *map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const { return new instance_azjol_nerub_InstanceScript(map); } diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp index c9278bffead..03279579098 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp @@ -154,7 +154,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_amanitarAI(creature); } @@ -215,7 +215,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_amanitar_mushroomsAI(creature); } diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp index 1513bebead7..a2371fa0121 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp @@ -290,7 +290,7 @@ public: void UpdateAI(const uint32 /*diff*/) {} }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_nadox_eggsAI(creature); } diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp index 51e2f833d3a..ea8771ab635 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp @@ -72,7 +72,7 @@ public: pInstance = creature->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 uiMindFlayTimer; uint32 uiShadowBoltVolleyTimer; @@ -101,7 +101,7 @@ public: } } - void SpellHitTarget(Unit* target, const SpellInfo *spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) { if (spell->Id == SPELL_INSANITY) { @@ -314,7 +314,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_volazjAI(creature); } diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp index 1522d679fd0..7500abf3307 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp @@ -342,7 +342,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_jedoga_shadowseekerAI(creature); } @@ -508,7 +508,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_jedoga_initiandAI(creature); } @@ -591,7 +591,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_jedogas_aufseher_triggerAI(creature); } diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp index e3f6bbbfdd0..347283a891b 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp @@ -211,9 +211,9 @@ public: { //Count alive players Unit* target = NULL; - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - std::vector<Unit* > target_list; - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + std::vector<Unit*> target_list; + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); // exclude pets & totems @@ -325,7 +325,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_taldaramAI(creature); } @@ -375,7 +375,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_taldaram_flamesphereAI(creature); } @@ -388,7 +388,7 @@ public: bool OnGossipHello(Player* /*player*/, GameObject* pGO) { - InstanceScript *pInstance = pGO->GetInstanceScript(); + InstanceScript* pInstance = pGO->GetInstanceScript(); Creature* pPrinceTaldaram = Unit::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_PRINCE_TALDARAM) : 0); if (pPrinceTaldaram && pPrinceTaldaram->isAlive()) diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp index 7472efcdc42..352ac2d09e5 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp @@ -296,7 +296,7 @@ public: } }; - InstanceScript* GetInstanceScript(InstanceMap *map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const { return new instance_ahnkahet_InstanceScript(map); } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp index a272e47d771..d29a05b3b5d 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp @@ -1330,7 +1330,7 @@ public: } Creature* pDebuffTarget = NULL; - Map *map = me->GetMap(); + Map* map = me->GetMap(); if (map->IsDungeon()) { Map::PlayerList const &PlayerList = map->GetPlayers(); @@ -1429,7 +1429,7 @@ public: if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); - Map *map = me->GetMap(); + Map* map = me->GetMap(); if (map->IsDungeon()) { Map::PlayerList const &PlayerList = map->GetPlayers(); diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp index f605942e34f..139e74ab67e 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp @@ -88,7 +88,7 @@ class spell_eadric_radiance : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_eadric_radiance_SpellScript(); } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index c0abd53e007..cf7b6868946 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -64,7 +64,7 @@ public: { boss_toc_champion_controllerAI(Creature* creature) : ScriptedAI(creature), Summons(me) { - m_pInstance = (InstanceScript *) creature->GetInstanceScript(); + m_pInstance = (InstanceScript* ) creature->GetInstanceScript(); } InstanceScript* m_pInstance; @@ -253,7 +253,7 @@ struct boss_faction_championsAI : public ScriptedAI { boss_faction_championsAI(Creature* creature, uint32 aitype) : ScriptedAI(creature) { - m_pInstance = (InstanceScript *) creature->GetInstanceScript(); + m_pInstance = (InstanceScript* ) creature->GetInstanceScript(); mAIType = aitype; } @@ -369,8 +369,8 @@ struct boss_faction_championsAI : public ScriptedAI Creature* SelectRandomFriendlyMissingBuff(uint32 spell) { - std::list<Creature* > lst = DoFindFriendlyMissingBuff(40.0f, spell); - std::list<Creature* >::const_iterator itr = lst.begin(); + std::list<Creature*> lst = DoFindFriendlyMissingBuff(40.0f, spell); + std::list<Creature*>::const_iterator itr = lst.begin(); if (lst.empty()) return NULL; advance(itr, rand()%lst.size()); diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp index c960cd1671c..7d741cc3226 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -367,7 +367,7 @@ public: me->SetInCombatWithZone(); } - /*void SpellHitTarget(Unit* target, const SpellInfo *pSpell) + /*void SpellHitTarget(Unit* target, const SpellInfo* pSpell) { if (pSpell->Id == SPELL_FEL_STREAK) DoCastAOE(SPELL_FEL_INFERNO); //66517 diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index 6d1c2b5d991..6f6e4c5b8f4 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -743,7 +743,7 @@ class spell_powering_up : public SpellScriptLoader uint32 spellId; - bool Validate(SpellEntry const * /*spellEntry*/) + bool Validate(SpellEntry const* /*spellEntry*/) { spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_SURGE_OF_SPEED, GetCaster()); if (!sSpellMgr->GetSpellInfo(spellId)) @@ -789,7 +789,7 @@ class spell_valkyr_essences : public SpellScriptLoader return true; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & /*dmgInfo*/, uint32 & /*absorbAmount*/) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & /*dmgInfo*/, uint32 & /*absorbAmount*/) { if (urand(0, 99) < 5) GetTarget()->CastSpell(GetTarget(), spellId, true); @@ -801,7 +801,7 @@ class spell_valkyr_essences : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_valkyr_essences_AuraScript(); } @@ -847,7 +847,7 @@ class spell_power_of_the_twins : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_power_of_the_twins_AuraScript(); } diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp index 3779ed42329..eda54abc7a5 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp @@ -241,7 +241,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_novosAI(creature); } @@ -267,7 +267,7 @@ public: uint32 uiFlashOfDarknessTimer; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { @@ -304,7 +304,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_crystal_handlerAI(creature); } @@ -322,7 +322,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; void MovementInform(uint32 type, uint32 id) { @@ -337,7 +337,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_novos_minionAI(creature); } diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp index 6024fba7f68..976633c2ade 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp @@ -151,7 +151,7 @@ public: DoScriptText(RAND(SAY_FLESH_1, SAY_FLESH_2), me); me->SetDisplayId(MODEL_FLESH); - std::list<Unit* > playerList; + std::list<Unit*> playerList; SelectTargetList(playerList, 5, SELECT_TARGET_TOPAGGRO, 0, true); for (std::list<Unit*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) { @@ -206,7 +206,7 @@ public: uiRainOfFireTimer = urand(14*IN_MILLISECONDS, 18*IN_MILLISECONDS); uiShadowVolleyTimer = urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS); - std::list<Unit* > playerList; + std::list<Unit*> playerList; SelectTargetList(playerList, 5, SELECT_TARGET_TOPAGGRO, 0, true); for (std::list<Unit*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) { @@ -244,7 +244,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_tharon_jaAI(creature); } diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp index d7bcb04a7f6..aa7d1434080 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp @@ -189,7 +189,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_trollgoreAI(creature); } diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp index 22f129c8418..6c4920f7744 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp @@ -232,7 +232,7 @@ public: } }; - InstanceScript* GetInstanceScript(InstanceMap *map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const { return new instance_drak_tharon_InstanceScript(map); } diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp index c34528530bd..289371907ee 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp @@ -181,7 +181,7 @@ class boss_bronjahm : public CreatureScript } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_bronjahmAI(creature); } @@ -225,7 +225,7 @@ class mob_corrupted_soul_fragment : public CreatureScript InstanceScript* instance; }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_corrupted_soul_fragmentAI(creature); } diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp index 4d784b1f555..51b240976c9 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp @@ -171,7 +171,7 @@ class boss_devourer_of_souls : public CreatureScript { if (player->GetAura(SPELL_MIRRORED_SOUL)) { - int32 mirrorDamage = (uiDamage * 45)/100; + int32 mirrorDamage = (uiDamage* 45)/100; me->CastCustomSpell(player, 69034, &mirrorDamage, 0, 0, true); } else @@ -234,7 +234,7 @@ class boss_devourer_of_souls : public CreatureScript } } - void SpellHitTarget(Unit* /*target*/, const SpellInfo *spell) + void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) { if (spell->Id == H_SPELL_PHANTOM_BLAST) threeFaced = false; @@ -360,7 +360,7 @@ class boss_devourer_of_souls : public CreatureScript uint64 mirroredSoulTarget; }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_devourer_of_soulsAI(creature); } diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp index ef5023c5a3e..e337050a5a2 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp @@ -267,7 +267,7 @@ public: return true; } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_sylvanas_fosAI(creature); } @@ -404,7 +404,7 @@ public: return true; } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_jaina_fosAI(creature); } @@ -459,7 +459,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_spiteful_apparitionAI(creature); } @@ -519,7 +519,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_spectral_wardenAI(creature); } @@ -576,7 +576,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_soulguard_watchmanAI(creature); } @@ -635,7 +635,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_soulguard_reaperAI(creature); } @@ -698,7 +698,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_soulguard_bonecasterAI(creature); } @@ -771,7 +771,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_soulguard_animatorAI(creature); } @@ -843,7 +843,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_soulguard_adeptAI(creature); } @@ -896,7 +896,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_soul_horrorAI(creature); } diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp index 578fa2d1ec5..0425a34d8dc 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp @@ -147,7 +147,7 @@ class instance_forge_of_souls : public InstanceMapScript uint32 teamInInstance; }; - InstanceScript* GetInstanceScript(InstanceMap *map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const { return new instance_forge_of_souls_InstanceScript(map); } diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp index ec294afb79e..4c74488b6a6 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp @@ -169,7 +169,7 @@ class boss_garfrost : public CreatureScript { if (spell->Id == SPELL_PERMAFROST_HELPER) { - if (Aura *aura = target->GetAura(SPELL_PERMAFROST_HELPER)) + if (Aura* aura = target->GetAura(SPELL_PERMAFROST_HELPER)) _permafrostStack = std::max<uint32>(_permafrostStack, aura->GetStackAmount()); } else if (spell->Id == SPELL_FORGE_BLADE) diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp index fffd2a48ce4..87015dfc0cb 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp @@ -578,7 +578,7 @@ class spell_ick_explosive_barrage : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_ick_explosive_barrage_AuraScript(); } diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index f9ba820d54d..945239cc594 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -521,7 +521,7 @@ public: bool OnGossipHello(Player* /*player*/, GameObject* pGO) { - InstanceScript *pInstance = pGO->GetInstanceScript(); + InstanceScript* pInstance = pGO->GetInstanceScript(); uint64 uiStatue = 0; pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index 56613d59e99..1ab99b3dd46 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -322,7 +322,7 @@ class boss_lady_deathwhisper : public CreatureScript { if (Group* group = owner->GetGroup()) { - for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) if (Player* member = itr->getSource()) member->KilledMonsterCredit(NPC_DARNAVAN_CREDIT, 0); } @@ -862,7 +862,7 @@ class npc_darnavan : public CreatureScript { if (Group* group = owner->GetGroup()) { - for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) if (Player* member = itr->getSource()) member->FailQuest(QUEST_DEPROGRAMMING); } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp index b2184615bb3..6bb0675b7fc 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp @@ -59,11 +59,11 @@ public: events.ScheduleEvent(EVENT_BERSERK, 12*60000); } - void SpellHitTarget(Unit* target, const SpellInfo *spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) { if (spell->Id == uint32(SPELL_SLIME_SPRAY)) { - if (TempSummon *slime = me->SummonCreature(MOB_FALLOUT_SLIME, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0)) + if (TempSummon* slime = me->SummonCreature(MOB_FALLOUT_SLIME, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0)) DoZoneInCombat(slime); } } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 09f3bd49279..33122567bad 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -658,7 +658,7 @@ class at_kelthuzad_center : public AreaTriggerScript public: at_kelthuzad_center() : AreaTriggerScript("at_kelthuzad_center") { } - bool OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) { if (player->isGameMaster()) return false; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index a6d36e7eaa2..c39072ae2d1 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -132,7 +132,7 @@ public: CheckPlayersFrostResist(); } - void SpellHitTarget(Unit* target, const SpellInfo *spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) { if (spell->Id == SPELL_ICEBOLT) { @@ -153,7 +153,7 @@ public: CheckPlayersFrostResist(); if (CanTheHundredClub) { - AchievementEntry const *AchievTheHundredClub = GetAchievementStore()->LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB); + AchievementEntry const* AchievTheHundredClub = GetAchievementStore()->LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB); if (AchievTheHundredClub) { if (pMap && pMap->IsDungeon()) diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index cf653284e6a..7d355b2f71a 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -210,7 +210,7 @@ public: bool OnGossipHello(Player* /*player*/, GameObject* pGO) { - InstanceScript *pInstance = pGO->GetInstanceScript(); + InstanceScript* pInstance = pGO->GetInstanceScript(); Creature* pKeristrasza = Unit::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_KERISTRASZA) : 0); if (pKeristrasza && pKeristrasza->isAlive()) diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp index a4676dee852..30fd0695a9f 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp @@ -31,14 +31,14 @@ class instance_nexus : public InstanceMapScript public: instance_nexus() : InstanceMapScript("instance_nexus", 576) { } - InstanceScript *GetInstanceScript(InstanceMap *pMap) const + InstanceScript* GetInstanceScript(InstanceMap* pMap) const { return new instance_nexus_InstanceMapScript(pMap); } struct instance_nexus_InstanceMapScript : public InstanceScript { - instance_nexus_InstanceMapScript(Map *pMap) : InstanceScript(pMap) {} + instance_nexus_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {} uint32 m_auiEncounter[NUMBER_OF_ENCOUNTERS]; diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index 343ca29ddca..f3384b7ec15 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -327,7 +327,7 @@ class spell_varos_energize_core_area_enemy : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_varos_energize_core_area_enemySpellScript(); } @@ -374,7 +374,7 @@ class spell_varos_energize_core_area_entry : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_varos_energize_core_area_entrySpellScript(); } diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp index 07cd031e66b..d15d9ee6900 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp @@ -156,7 +156,7 @@ public: if (IsHeroic() && GolemsShattered < 5) { - AchievementEntry const *AchievShatterResistant = GetAchievementStore()->LookupEntry(ACHIEVEMENT_SHATTER_RESISTANT); + AchievementEntry const* AchievShatterResistant = GetAchievementStore()->LookupEntry(ACHIEVEMENT_SHATTER_RESISTANT); if (AchievShatterResistant) { Map* pMap = me->GetMap(); diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp index 9a0e912eab0..990493ea3f7 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp @@ -881,7 +881,7 @@ class npc_colossus : public CreatureScript instance = creature->GetInstanceScript(); } - InstanceScript *instance; + InstanceScript* instance; void JustDied(Unit* /*Who*/) { diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp index 57a4a1f02eb..639ff4e07d3 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp @@ -166,7 +166,7 @@ public: if (IsHeroic() && !ShatterFrostTomb) { - AchievementEntry const *AchievOnTheRocks = GetAchievementStore()->LookupEntry(ACHIEVEMENT_ON_THE_ROCKS); + AchievementEntry const* AchievOnTheRocks = GetAchievementStore()->LookupEntry(ACHIEVEMENT_ON_THE_ROCKS); if (AchievOnTheRocks) { Map* pMap = me->GetMap(); @@ -272,7 +272,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Respawn_Time; uint64 Target_Guid; uint32 Decrepify_Timer; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index 9727ce3cbec..c93b9c7bda6 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -107,7 +107,7 @@ public: uint8 AddCount; bool DoneAdds[4]; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { @@ -306,7 +306,7 @@ public: uint32 uiCrazedTimer; uint32 uiTerrifyingRoarTimer; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { @@ -419,7 +419,7 @@ public: uint32 uiEnrage1Timer; uint32 uiEnrage2Timer; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { @@ -535,7 +535,7 @@ public: uint32 uiGoreTimer; uint32 uiGrievousWoundTimer; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { @@ -655,7 +655,7 @@ public: uint32 uiAcidSplatterTimer; uint32 uiPoisonBreathTimer; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { @@ -757,7 +757,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 SummonTimer; Phase currentPhase; @@ -836,7 +836,7 @@ public: bool OnGossipHello(Player* /*player*/, GameObject* pGO) { - InstanceScript *pInstance = pGO->GetInstanceScript(); + InstanceScript* pInstance = pGO->GetInstanceScript(); Creature* pPalehoof = Unit::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); if (pPalehoof && pPalehoof->isAlive()) diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index c970d27cb23..325dd67443f 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -276,7 +276,7 @@ public: Summons.Despawn(summoned); } - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_HARPOON_DAMAGE) { diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index 2228b4ef528..e021936fcc4 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -150,7 +150,7 @@ public: uint64 m_uiActivedCreatureGUID; uint64 m_uiOrbGUID; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index d7e57c813ea..819681e1ef2 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -261,7 +261,7 @@ public: case GOSSIP_ACTION_INFO_DEF+1: player->CLOSE_GOSSIP_MENU(); CAST_AI(npc_sinclari_vh::npc_sinclariAI, (creature->AI()))->uiPhase = 1; - if (InstanceScript *pInstance = creature->GetInstanceScript()) + if (InstanceScript* pInstance = creature->GetInstanceScript()) pInstance->SetData(DATA_MAIN_EVENT_PHASE, SPECIAL); break; case GOSSIP_ACTION_INFO_DEF+2: @@ -563,7 +563,7 @@ public: SummonList listOfMobs; - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index ce81c9daecc..02e6e8fc45b 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -73,7 +73,7 @@ public: casterGuid = 0; } - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (Phase) return; @@ -153,7 +153,7 @@ public: }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_sinkhole_kill_creditAI(creature); } @@ -193,7 +193,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_khunok_the_behemothAI(creature); } @@ -375,7 +375,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new mob_nerubar_victimAI(creature); } @@ -410,7 +410,7 @@ public: }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_scourge_prisonerAI(creature); } @@ -483,7 +483,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_jennyAI (creature); } @@ -527,7 +527,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_fezzix_geartwistAI(creature); } @@ -596,7 +596,7 @@ public: if (GameObject* go_caribou = me->GetMap()->GetGameObject(go_caribouGUID)) go_caribou->SetLootState(GO_JUST_DEACTIVATED); - if (TempSummon *summon = me->ToTempSummon()) + if (TempSummon* summon = me->ToTempSummon()) if (summon->isSummon()) if (Unit* pTemp = summon->GetSummoner()) if (pTemp->GetTypeId() == TYPEID_PLAYER) @@ -672,7 +672,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_nesingwary_trapperAI(creature); } @@ -789,12 +789,12 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_lurgglbrAI(creature); } - bool OnQuestAccept(Player* player, Creature* creature, Quest const *pQuest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* pQuest) { if (pQuest->GetQuestId() == QUEST_ESCAPE_WINTERFIN_CAVERNS) { @@ -866,7 +866,7 @@ public: AttackStart(who); } - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (spell->Id == SPELL_DRAKE_HARPOON && caster->GetTypeId() == TYPEID_PLAYER) { @@ -923,7 +923,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_nexus_drake_hatchlingAI(creature); } @@ -1269,7 +1269,7 @@ public: return true; } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_thassarianAI(creature); } @@ -1304,7 +1304,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_image_lich_kingAI(creature); } @@ -1336,7 +1336,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_general_arlosAI(creature); } @@ -1454,7 +1454,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_counselor_talbotAI(creature); } @@ -1579,7 +1579,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_leryssaAI(creature); } @@ -1656,7 +1656,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_beryl_sorcererAI(creature); } @@ -1791,7 +1791,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_imprisoned_beryl_sorcererAI(creature); } @@ -1887,7 +1887,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_mootoo_the_youngerAI(creature); } @@ -1972,7 +1972,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_bonker_togglevoltAI(creature); } @@ -2088,7 +2088,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_trapped_mammoth_calfAI(creature); } @@ -2130,7 +2130,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_magmoth_crusherAI(creature); } @@ -2180,7 +2180,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_seaforium_depth_chargeAI(creature); } @@ -2232,7 +2232,7 @@ public: }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_valiance_keep_cannoneerAI(creature); } @@ -2337,7 +2337,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_warmage_coldarraAI(creature); } diff --git a/src/server/scripts/Northrend/crystalsong_forest.cpp b/src/server/scripts/Northrend/crystalsong_forest.cpp index a35e4781971..22b72586e37 100644 --- a/src/server/scripts/Northrend/crystalsong_forest.cpp +++ b/src/server/scripts/Northrend/crystalsong_forest.cpp @@ -98,7 +98,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_warmage_violetstandAI(creature); } diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp index 4854261aeae..be9e9308f4f 100644 --- a/src/server/scripts/Northrend/dalaran.cpp +++ b/src/server/scripts/Northrend/dalaran.cpp @@ -108,7 +108,7 @@ public: void UpdateAI(const uint32 /*diff*/){} }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_mageguard_dalaranAI(creature); } diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp index 877b649e630..d7b90fc4a44 100644 --- a/src/server/scripts/Northrend/grizzly_hills.cpp +++ b/src/server/scripts/Northrend/grizzly_hills.cpp @@ -325,7 +325,7 @@ public: return true; } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_emilyAI(creature); } @@ -376,7 +376,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_mrfloppyAI(creature); } @@ -440,7 +440,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_outhouse_bunnyAI(creature); } @@ -484,7 +484,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_tallhorn_stagAI(creature); } @@ -550,7 +550,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_amberpine_woodsmanAI(creature); } @@ -594,7 +594,7 @@ public: me->DespawnOrUnsummon(DespawnTimer); } - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (spell->Id == SPELL_RENEW_SKIRMISHER && caster->GetTypeId() == TYPEID_PLAYER && caster->ToPlayer()->GetQuestStatus(12288) == QUEST_STATUS_INCOMPLETE) @@ -620,7 +620,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_wounded_skirmisherAI(creature); } @@ -643,7 +643,7 @@ class npc_lightning_sentry : public CreatureScript public: npc_lightning_sentry() : CreatureScript("npc_lightning_sentry") { } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_lightning_sentryAI(creature); } @@ -710,7 +710,7 @@ class npc_venture_co_straggler : public CreatureScript public: npc_venture_co_straggler() : CreatureScript("npc_venture_co_straggler") { } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_venture_co_stragglerAI(creature); } @@ -784,7 +784,7 @@ public: DoMeleeAttackIfReady(); } - void SpellHit(Unit* pCaster, const SpellInfo *pSpell) + void SpellHit(Unit* pCaster, const SpellInfo* pSpell) { if (pCaster && pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SMOKE_BOMB) { diff --git a/src/server/scripts/Northrend/howling_fjord.cpp b/src/server/scripts/Northrend/howling_fjord.cpp index 33884dc0cb6..1fceeb0303d 100644 --- a/src/server/scripts/Northrend/howling_fjord.cpp +++ b/src/server/scripts/Northrend/howling_fjord.cpp @@ -147,7 +147,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_Apothecary_HanesAI(creature); } @@ -196,7 +196,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_plaguehound_trackerAI(creature); } @@ -421,7 +421,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_daegarnAI(creature); } diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp index dc55c2f6ad3..9ca2a2a5349 100644 --- a/src/server/scripts/Northrend/icecrown.cpp +++ b/src/server/scripts/Northrend/icecrown.cpp @@ -269,7 +269,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_argent_valiantAI(creature); } @@ -328,7 +328,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_alorah_and_grimminAI(creature); } @@ -375,7 +375,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_guardian_pavilionAI(creature); } @@ -420,7 +420,7 @@ public: } }; - CreatureAI *GetAI(Creature *creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_vereth_the_cunningAI(creature); } diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index ebdaded0ba0..dc0b3c0e032 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -161,7 +161,7 @@ public: return false; } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_injured_rainspeaker_oracleAI(creature); } @@ -323,7 +323,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_bushwhackerAI(creature); } @@ -428,7 +428,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_engineer_heliceAI(creature); } @@ -587,7 +587,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_jungle_punch_targetAI(creature); } @@ -624,7 +624,7 @@ class npc_adventurous_dwarf : public CreatureScript public: npc_adventurous_dwarf() : CreatureScript("npc_adventurous_dwarf") { } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { DoScriptText(SAY_DWARF_OUCH, creature); return NULL; diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 081f8fb1479..fdd9c626ac1 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -47,7 +47,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_agnetta_tyrsdottarAI(creature); } @@ -223,7 +223,7 @@ public: }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_goblin_prisonerAI(creature); } @@ -320,7 +320,7 @@ public: return true; } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_victorious_challengerAI(creature); } @@ -446,7 +446,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_injured_goblinAI(creature); } @@ -466,7 +466,7 @@ public: return true; } - bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const *quest) + bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest) { if (quest->GetQuestId() == QUEST_BITTER_DEPARTURE) DoScriptText(SAY_QUEST_ACCEPT, creature); @@ -678,7 +678,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_brunnhildar_prisonerAI(creature); } diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index 16567be9636..6667a7751e1 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -102,7 +102,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_drakuru_shacklesAI(creature); } @@ -184,7 +184,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_captured_rageclawAI(creature); } @@ -554,7 +554,7 @@ public: return false; } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_gurgthockAI(creature); } @@ -696,7 +696,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_orinoko_tuskbreakerAI(creature); } @@ -794,7 +794,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_korrak_bloodragerAI(creature); } @@ -836,8 +836,8 @@ public: if (me->getVictim()->GetPositionZ() >= 286.276f) { - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { if (Unit* pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) { @@ -886,7 +886,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_yggdrasAI(creature); } @@ -958,8 +958,8 @@ public: { if (victim->GetPositionZ() >= 286.276f) { - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { if (Unit* pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) { @@ -1019,7 +1019,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_stinkbeardAI(creature); } @@ -1103,8 +1103,8 @@ public: if (me->getVictim()->GetPositionZ() >= 286.276f) { - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { if (Unit* pUnit = Unit::GetUnit(*me, (*itr)->getUnitGuid())) { @@ -1164,7 +1164,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_elemental_lordAI(creature); } @@ -1229,7 +1229,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_fiend_elementalAI(creature); } @@ -1263,7 +1263,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_released_offspring_harkoaAI(creature); } @@ -1351,7 +1351,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_crusade_recruitAI(creature); } diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp index 1cc10ed475d..2cfedc14b14 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp @@ -28,7 +28,7 @@ #include "GossipDef.h" #include "ScriptPCH.h" -OPvPCapturePointEP_EWT::OPvPCapturePointEP_EWT(OutdoorPvP *pvp) +OPvPCapturePointEP_EWT::OPvPCapturePointEP_EWT(OutdoorPvP* pvp) : OPvPCapturePoint(pvp), m_TowerState(EP_TS_N), m_UnitsSummonedSide(0) { SetCapturePointData(EPCapturePoints[EP_EWT].entry, EPCapturePoints[EP_EWT].map, EPCapturePoints[EP_EWT].x, EPCapturePoints[EP_EWT].y, EPCapturePoints[EP_EWT].z, EPCapturePoints[EP_EWT].o, EPCapturePoints[EP_EWT].rot0, EPCapturePoints[EP_EWT].rot1, EPCapturePoints[EP_EWT].rot2, EPCapturePoints[EP_EWT].rot3); @@ -166,7 +166,7 @@ void OPvPCapturePointEP_EWT::SummonSupportUnitAtNorthpassTower(uint32 team) } // NPT -OPvPCapturePointEP_NPT::OPvPCapturePointEP_NPT(OutdoorPvP *pvp) +OPvPCapturePointEP_NPT::OPvPCapturePointEP_NPT(OutdoorPvP* pvp) : OPvPCapturePoint(pvp), m_TowerState(EP_TS_N), m_SummonedGOSide(0) { SetCapturePointData(EPCapturePoints[EP_NPT].entry, EPCapturePoints[EP_NPT].map, EPCapturePoints[EP_NPT].x, EPCapturePoints[EP_NPT].y, EPCapturePoints[EP_NPT].z, EPCapturePoints[EP_NPT].o, EPCapturePoints[EP_NPT].rot0, EPCapturePoints[EP_NPT].rot1, EPCapturePoints[EP_NPT].rot2, EPCapturePoints[EP_NPT].rot3); @@ -309,7 +309,7 @@ void OPvPCapturePointEP_NPT::SummonGO(uint32 team) } // CGT -OPvPCapturePointEP_CGT::OPvPCapturePointEP_CGT(OutdoorPvP *pvp) +OPvPCapturePointEP_CGT::OPvPCapturePointEP_CGT(OutdoorPvP* pvp) : OPvPCapturePoint(pvp), m_TowerState(EP_TS_N), m_GraveyardSide(0) { SetCapturePointData(EPCapturePoints[EP_CGT].entry, EPCapturePoints[EP_CGT].map, EPCapturePoints[EP_CGT].x, EPCapturePoints[EP_CGT].y, EPCapturePoints[EP_CGT].z, EPCapturePoints[EP_CGT].o, EPCapturePoints[EP_CGT].rot0, EPCapturePoints[EP_CGT].rot1, EPCapturePoints[EP_CGT].rot2, EPCapturePoints[EP_CGT].rot3); @@ -438,7 +438,7 @@ void OPvPCapturePointEP_CGT::LinkGraveYard(uint32 team) } // PWT -OPvPCapturePointEP_PWT::OPvPCapturePointEP_PWT(OutdoorPvP *pvp) +OPvPCapturePointEP_PWT::OPvPCapturePointEP_PWT(OutdoorPvP* pvp) : OPvPCapturePoint(pvp), m_FlightMasterSpawned(0), m_TowerState(EP_TS_N) { SetCapturePointData(EPCapturePoints[EP_PWT].entry, EPCapturePoints[EP_PWT].map, EPCapturePoints[EP_PWT].x, EPCapturePoints[EP_PWT].y, EPCapturePoints[EP_PWT].z, EPCapturePoints[EP_PWT].o, EPCapturePoints[EP_PWT].rot0, EPCapturePoints[EP_PWT].rot1, EPCapturePoints[EP_PWT].rot2, EPCapturePoints[EP_PWT].rot3); diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h index 042d2b70f58..01da001a990 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.h @@ -186,7 +186,7 @@ class OPvPCapturePointEP_EWT : public OPvPCapturePoint { public: - OPvPCapturePointEP_EWT(OutdoorPvP * pvp); + OPvPCapturePointEP_EWT(OutdoorPvP* pvp); void ChangeState(); @@ -215,7 +215,7 @@ class OPvPCapturePointEP_NPT : public OPvPCapturePoint { public: - OPvPCapturePointEP_NPT(OutdoorPvP * pvp); + OPvPCapturePointEP_NPT(OutdoorPvP* pvp); void ChangeState(); @@ -244,7 +244,7 @@ class OPvPCapturePointEP_CGT : public OPvPCapturePoint { public: - OPvPCapturePointEP_CGT(OutdoorPvP * pvp); + OPvPCapturePointEP_CGT(OutdoorPvP* pvp); void ChangeState(); @@ -273,7 +273,7 @@ class OPvPCapturePointEP_PWT : public OPvPCapturePoint { public: - OPvPCapturePointEP_PWT(OutdoorPvP * pvp); + OPvPCapturePointEP_PWT(OutdoorPvP* pvp); void ChangeState(); diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp index 3c7c473e663..343027a02c8 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp @@ -33,7 +33,7 @@ const uint32 HP_LANG_CAPTURE_A[HP_TOWER_NUM] = {LANG_OPVP_HP_CAPTURE_BROKENHILL_ const uint32 HP_LANG_CAPTURE_H[HP_TOWER_NUM] = {LANG_OPVP_HP_CAPTURE_BROKENHILL_H, LANG_OPVP_HP_CAPTURE_OVERLOOK_H, LANG_OPVP_HP_CAPTURE_STADIUM_H}; -OPvPCapturePointHP::OPvPCapturePointHP(OutdoorPvP *pvp, OutdoorPvPHPTowerType type) +OPvPCapturePointHP::OPvPCapturePointHP(OutdoorPvP* pvp, OutdoorPvPHPTowerType type) : OPvPCapturePoint(pvp), m_TowerType(type) { SetCapturePointData(HPCapturePoints[type].entry, diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h index 1d19652d5b1..9f494b748be 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h @@ -89,7 +89,7 @@ class OPvPCapturePointHP : public OPvPCapturePoint { public: - OPvPCapturePointHP(OutdoorPvP * pvp, OutdoorPvPHPTowerType type); + OPvPCapturePointHP(OutdoorPvP* pvp, OutdoorPvPHPTowerType type); void ChangeState(); diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp index dacd63e93a6..17a5e9940be 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp @@ -63,7 +63,7 @@ uint32 OPvPCapturePointNA::GetAliveGuardsCount() case NA_NPC_GUARD_13: case NA_NPC_GUARD_14: case NA_NPC_GUARD_15: - if (Creature const * const cr = HashMapHolder<Creature>::Find(itr->second)) + if (Creature const* const cr = HashMapHolder<Creature>::Find(itr->second)) if (cr->isAlive()) ++cnt; break; @@ -198,7 +198,7 @@ void OPvPCapturePointNA::HandlePlayerLeave(Player* player) OPvPCapturePoint::HandlePlayerLeave(player); } -OPvPCapturePointNA::OPvPCapturePointNA(OutdoorPvP *pvp) : +OPvPCapturePointNA::OPvPCapturePointNA(OutdoorPvP* pvp) : OPvPCapturePoint(pvp), m_capturable(true), m_GuardsAlive(0), m_ControllingFaction(0), m_WyvernStateNorth(0), m_WyvernStateSouth(0), m_WyvernStateEast(0), m_WyvernStateWest(0), m_HalaaState(HALAA_N), m_RespawnTimer(NA_RESPAWN_TIME), m_GuardCheckTimer(NA_GUARD_CHECK_TIME) diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h index 8d706ecdd23..3a322bbaba0 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h @@ -254,7 +254,7 @@ class OPvPCapturePointNA : public OPvPCapturePoint { public: - OPvPCapturePointNA(OutdoorPvP * pvp); + OPvPCapturePointNA(OutdoorPvP* pvp); bool Update(uint32 diff); diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index 73c94a0d593..88a820f4492 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -156,7 +156,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId) { // he dropped it further, summon mound GameObject* go = new GameObject; - Map * map = player->GetMap(); + Map* map = player->GetMap(); if (!map) { delete go; @@ -186,7 +186,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId) { // he dropped it further, summon mound GameObject* go = new GameObject; - Map * map = player->GetMap(); + Map* map = player->GetMap(); if (!map) { delete go; diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp index 63214ecebef..6b9c0500fc4 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp @@ -30,7 +30,7 @@ OutdoorPvPTF::OutdoorPvPTF() m_TypeId = OUTDOOR_PVP_TF; } -OPvPCapturePointTF::OPvPCapturePointTF(OutdoorPvP *pvp, OutdoorPvPTF_TowerType type) +OPvPCapturePointTF::OPvPCapturePointTF(OutdoorPvP* pvp, OutdoorPvPTF_TowerType type) : OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(TF_TOWERSTATE_N) { SetCapturePointData(TFCapturePoints[type].entry, TFCapturePoints[type].map, TFCapturePoints[type].x, TFCapturePoints[type].y, TFCapturePoints[type].z, TFCapturePoints[type].o, TFCapturePoints[type].rot0, TFCapturePoints[type].rot1, TFCapturePoints[type].rot2, TFCapturePoints[type].rot3); diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h index cf85c41c4dd..642f45090a9 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h @@ -125,7 +125,7 @@ class OPvPCapturePointTF : public OPvPCapturePoint { public: - OPvPCapturePointTF(OutdoorPvP * pvp, OutdoorPvPTF_TowerType type); + OPvPCapturePointTF(OutdoorPvP* pvp, OutdoorPvPTF_TowerType type); bool Update(uint32 diff); diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp index f631e39e119..2866a341903 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp @@ -26,7 +26,7 @@ #include "World.h" #include "ScriptPCH.h" -OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon(OutdoorPvP *pvp, ZM_BeaconType type) +OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon(OutdoorPvP* pvp, ZM_BeaconType type) : OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(ZM_TOWERSTATE_N) { SetCapturePointData(ZMCapturePoints[type].entry, ZMCapturePoints[type].map, ZMCapturePoints[type].x, ZMCapturePoints[type].y, ZMCapturePoints[type].z, ZMCapturePoints[type].o, ZMCapturePoints[type].rot0, ZMCapturePoints[type].rot1, ZMCapturePoints[type].rot2, ZMCapturePoints[type].rot3); @@ -250,7 +250,7 @@ int32 OPvPCapturePointZM_GraveYard::HandleOpenGo(Player* player, uint64 guid) return retval; } -OPvPCapturePointZM_GraveYard::OPvPCapturePointZM_GraveYard(OutdoorPvP *pvp) +OPvPCapturePointZM_GraveYard::OPvPCapturePointZM_GraveYard(OutdoorPvP* pvp) : OPvPCapturePoint(pvp) { m_BothControllingFaction = 0; diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h index e703090990c..048ba04dc57 100755 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h @@ -170,7 +170,7 @@ class OPvPCapturePointZM_Beacon : public OPvPCapturePoint { public: - OPvPCapturePointZM_Beacon(OutdoorPvP * pvp, ZM_BeaconType type); + OPvPCapturePointZM_Beacon(OutdoorPvP* pvp, ZM_BeaconType type); void ChangeState(); @@ -201,7 +201,7 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint { public: - OPvPCapturePointZM_GraveYard(OutdoorPvP * pvp); + OPvPCapturePointZM_GraveYard(OutdoorPvP* pvp); bool Update(uint32 diff); diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp index d22dbd4b172..46e765f1ef4 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp @@ -71,7 +71,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; bool InciteChaos; uint32 InciteChaos_Timer; @@ -133,8 +133,8 @@ public: { DoCast(me, SPELL_INCITE_CHAOS); - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); if (target && target->GetTypeId() == TYPEID_PLAYER) diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp index 8f014956d77..dffa245d0ba 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp @@ -153,7 +153,7 @@ public: Intro = false; } - InstanceScript *pInstance; + InstanceScript* pInstance; bool Intro, HelpYell; bool sumportals; diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index cec706eda08..bd6539335c8 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -79,8 +79,8 @@ public: void SonicBoomEffect() { - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); if (target && target->GetTypeId() == TYPEID_PLAYER) @@ -98,7 +98,7 @@ public: void EnterCombat(Unit* /*who*/) { } // Sonic Boom instant damage (needs core fix instead of this) - void SpellHitTarget(Unit* target, const SpellInfo *spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) { if (target && target->isAlive() && spell && spell->Id == uint32(SPELL_SONIC_BOOM_EFFECT)) me->DealDamage(target, (target->GetHealth()*90)/100, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NATURE, spell); diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp index b1f17c38737..66ef35f7400 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp @@ -142,13 +142,13 @@ public: void CastBloodboil() { // Get the Threat List - std::list<HostileReference *> m_threatlist = me->getThreatManager().getThreatList(); + std::list<HostileReference*> m_threatlist = me->getThreatManager().getThreatList(); if (m_threatlist.empty()) // He doesn't have anyone in his threatlist, useless to continue return; - std::list<Unit* > targets; - std::list<HostileReference *>::const_iterator itr = m_threatlist.begin(); + std::list<Unit*> targets; + std::list<HostileReference*>::const_iterator itr = m_threatlist.begin(); for (; itr!= m_threatlist.end(); ++itr) //store the threat list in a different container { Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); @@ -163,10 +163,10 @@ public: targets.resize(5); //Aura each player in the targets list with Bloodboil. Aura code copied+pasted from Aura command in Level3.cpp - /*SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(SPELL_BLOODBOIL); + /*SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_BLOODBOIL); if (spellInfo) { - for (std::list<Unit* >::const_iterator itr = targets.begin(); itr != targets.end(); ++itr) + for (std::list<Unit*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr) { Unit* target = *itr; if (!target) return; @@ -176,7 +176,7 @@ public: if (eff >= TOTAL_SPELL_EFFECTS) continue; - Aura *Aur = new Aura(spellInfo, i, target, target, target); + Aura* Aur = new Aura(spellInfo, i, target, target, target); target->AddAura(Aur); } } diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 7b6a9e97687..308a6de4f0c 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -454,7 +454,7 @@ public: }; -/************************************** Illidan's AI ***************************************/ +/************************************** Illidan's AI* **************************************/ class boss_illidan_stormrage : public CreatureScript { public: @@ -585,7 +585,7 @@ public: done_by->AddThreat(me, -(3*(float)damage)/4); // do not let maiev tank him } - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_GLAIVE_RETURNS) // Re-equip our warblades! { @@ -1138,9 +1138,9 @@ public: }; -/********************************** End of Illidan AI ******************************************/ +/********************************** End of Illidan AI* *****************************************/ -/******* Functions and vars for Akama's AI ******/ +/******* Functions and vars for Akama's AI* *****/ class boss_maiev_shadowsong : public CreatureScript { public: @@ -2163,7 +2163,7 @@ public: { blade_of_azzinothAI(Creature* c) : NullCreatureAI(c) {} - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE) me->SetDisplayId(21431);//appear when hit by Illidan's glaive diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index 8b057949b2e..813deacf7a2 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -536,7 +536,7 @@ public: } } - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (me->GetCurrentSpell(CURRENT_GENERIC_SPELL)) for (uint8 i = 0; i < 3; ++i) diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 6f5dfba9a9c..080d26b7c49 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -106,7 +106,7 @@ public: DoScriptText(SAY_DEATH, me); } - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { if (spell->Id == SPELL_HURL_SPINE && me->HasAura(SPELL_TIDAL_SHIELD)) { diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index f4785d847a2..7d698559197 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -896,7 +896,7 @@ public: return sSpellMgr->GetSpellInfo(SPELL_REFLECTIVE_SHIELD_T); } - void Trigger(AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Trigger(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* target = GetTarget(); if (dmgInfo.GetAttacker() == target) @@ -911,7 +911,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_boss_lady_malande_shield_AuraScript(); } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 9cd7dfc9af8..b7c824f974d 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -153,7 +153,7 @@ public: c->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on Creature create (no need do intro if wiped) } - InstanceScript *pInstance; + InstanceScript* pInstance; uint64 ShieldGeneratorChannel[4]; @@ -451,8 +451,8 @@ public: { bool InMeleeRange = false; Unit* target; - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); //if in melee range @@ -592,7 +592,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 move; uint32 phase; float x, y, z; @@ -694,7 +694,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 PoisonBolt_Timer; uint32 Despawn_Timer; @@ -770,7 +770,7 @@ public: EnterEvadeMode(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 movement_timer; uint32 ToxicSpore_Timer; @@ -927,7 +927,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Check_Timer; bool Casted; void Reset() @@ -976,7 +976,7 @@ public: bool OnUse(Player* player, Item* /*_Item*/, SpellCastTargets const& targets) { - InstanceScript *pInstance = player->GetInstanceScript(); + InstanceScript* pInstance = player->GetInstanceScript(); if (!pInstance) { diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index d058f73cb04..5721f19044d 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -180,7 +180,7 @@ public: SpellBinderGUID[i] = 0; } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Whirlwind_Timer; uint32 ChaosBlast_Timer; @@ -507,16 +507,16 @@ public: //Summon Inner Demon if (InnerDemons_Timer <= diff) { - std::list<HostileReference *>& ThreatList = me->getThreatManager().getThreatList(); - std::vector<Unit* > TargetList; - for (std::list<HostileReference *>::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr) + std::list<HostileReference*>& ThreatList = me->getThreatManager().getThreatList(); + std::vector<Unit*> TargetList; + for (std::list<HostileReference*>::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr) { Unit* tempTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid()); if (tempTarget && tempTarget->GetTypeId() == TYPEID_PLAYER && tempTarget->GetGUID() != me->getVictim()->GetGUID() && TargetList.size()<5) TargetList.push_back(tempTarget); } - //SpellInfo *spell = GET_SPELL(SPELL_INSIDIOUS_WHISPER); - for (std::vector<Unit* >::const_iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr) + //SpellInfo* spell = GET_SPELL(SPELL_INSIDIOUS_WHISPER); + for (std::vector<Unit*>::const_iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr) { if ((*itr) && (*itr)->isAlive()) { @@ -680,7 +680,7 @@ public: AddedBanish = false; } - InstanceScript *pInstance; + InstanceScript* pInstance; uint64 leotherasGUID; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index b2abb397dfe..72415ce2b3a 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -96,7 +96,7 @@ public: InstanceScript* pInstance; - Map::PlayerList const *PlayerList; + Map::PlayerList const* PlayerList; uint32 TidalWave_Timer; uint32 WateryGrave_Timer; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp index 4d5b3ecc86a..5ae358ba046 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp @@ -63,7 +63,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 LightningCloud_Timer; uint32 LungBurst_Timer; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp index 49c5df03ed8..602c9b33a24 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp @@ -65,7 +65,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Shrink_Timer; uint32 Saw_Blade_Timer; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp index 83ae22222de..f9a477e58c5 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp @@ -59,7 +59,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; void Reset() { @@ -117,7 +117,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 Reflection_Timer; uint32 Impale_Timer; @@ -148,7 +148,7 @@ public: DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); } - void SpellHit(Unit* /*caster*/, const SpellInfo *spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) { //hack :( if (spell->Id == SPELL_WARLORDS_RAGE_PROC) diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp index 6479cdd3d6d..789d33a7a1b 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp @@ -71,7 +71,7 @@ public: pInstance = c->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 m_uiGrowth_Timer; uint32 m_uiCaveIn_Timer; diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp index 03133b81e17..38c087889eb 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp @@ -438,7 +438,7 @@ class boss_kiggler_the_crazed : public CreatureScript public: boss_kiggler_the_crazed() : CreatureScript("boss_kiggler_the_crazed") { } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_kiggler_the_crazedAI (creature); } @@ -560,7 +560,7 @@ class boss_blindeye_the_seer : public CreatureScript public: boss_blindeye_the_seer() : CreatureScript("boss_blindeye_the_seer") { } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_blindeye_the_seerAI (creature); } @@ -670,7 +670,7 @@ class boss_krosh_firehand : public CreatureScript public: boss_krosh_firehand() : CreatureScript("boss_krosh_firehand") { } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new boss_krosh_firehandAI (creature); } @@ -766,9 +766,9 @@ public: if (BlastWave_Timer <= diff) { Unit* target = NULL; - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - std::vector<Unit* > target_list; - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + std::vector<Unit*> target_list; + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); //15 yard radius minimum diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index 7558a10d7bf..23b2ed5ca2b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -249,7 +249,7 @@ class boss_kelidan_the_breaker : public CreatureScript if (SpellInfo const* nova = sSpellMgr->GetSpellInfo(SPELL_BURNING_NOVA)) { - if (Aura * aura = Aura::TryRefreshStackOrCreate(nova, MAX_EFFECT_MASK, me, me)) + if (Aura* aura = Aura::TryRefreshStackOrCreate(nova, MAX_EFFECT_MASK, me, me)) aura->ApplyForTargets(); } diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index aad3eb1a544..6661bf2ee15 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -95,7 +95,7 @@ class boss_nazan : public CreatureScript uint32 Turn_Timer; bool flight; uint64 VazrudenGUID; - SpellInfo *liquid_fire; + SpellInfo* liquid_fire; void Reset() { diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 5166a276ac3..cbcde257a1d 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -124,7 +124,7 @@ class mob_abyssal : public CreatureScript FireBlast_Timer = 6000; } - void SpellHit(Unit*, const SpellInfo *spell) + void SpellHit(Unit*, const SpellInfo* spell) { if (trigger == 2 && spell->Id == SPELL_BLAZE_TARGET) { diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 87df08d9bf5..37404b348db 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -86,7 +86,7 @@ class boss_alar : public CreatureScript DefaultMoveSpeedRate = creature->GetSpeedRate(MOVE_RUN); } - InstanceScript *pInstance; + InstanceScript* pInstance; WaitEventType WaitEvent; uint32 WaitTimer; @@ -190,7 +190,7 @@ class boss_alar : public CreatureScript } } - void SpellHit(Unit*, const SpellInfo *spell) + void SpellHit(Unit*, const SpellInfo* spell) { if (spell->Id == SPELL_DIVE_BOMB_VISUAL) { @@ -474,7 +474,7 @@ class mob_ember_of_alar : public CreatureScript creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); } - InstanceScript *pInstance; + InstanceScript* pInstance; bool toDie; void Reset() diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index 8aba632365a..7b7c8c5e478 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -91,7 +91,7 @@ class boss_high_astromancer_solarian : public CreatureScript defaultsize = creature->GetFloatValue(OBJECT_FIELD_SCALE_X); } - InstanceScript *pInstance; + InstanceScript* pInstance; SummonList Summons; uint8 Phase; @@ -422,7 +422,7 @@ class mob_solarium_priest : public CreatureScript pInstance = creature->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 healTimer; uint32 holysmiteTimer; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp index d4f9803b800..add35e75dad 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp @@ -119,9 +119,9 @@ class boss_void_reaver : public CreatureScript if (ArcaneOrb_Timer <= diff) { Unit* target = NULL; - std::list<HostileReference *> t_list = me->getThreatManager().getThreatList(); - std::vector<Unit* > target_list; - for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + std::list<HostileReference*> t_list = me->getThreatManager().getThreatList(); + std::vector<Unit*> target_list; + for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { target = Unit::GetUnit(*me, (*itr)->getUnitGuid()); if (!target) diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index 707a4ae5946..5ad4eeb26a5 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -66,7 +66,7 @@ class boss_nethermancer_sepethrea : public CreatureScript pInstance = creature->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 frost_attack_Timer; uint32 arcane_blast_Timer; @@ -188,7 +188,7 @@ class mob_ragin_flames : public CreatureScript pInstance = creature->GetInstanceScript(); } - InstanceScript *pInstance; + InstanceScript* pInstance; uint32 inferno_Timer; uint32 flame_timer; diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp index dee6da11c3d..f3310035f8d 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp @@ -73,7 +73,7 @@ class boss_harbinger_skyriss : public CreatureScript Intro = false; } - InstanceScript *pInstance; + InstanceScript* pInstance; bool Intro; bool IsImage33; diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp index 79d111bfaf8..8ea12b48a07 100644 --- a/src/server/scripts/Outland/blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/blades_edge_mountains.cpp @@ -157,7 +157,7 @@ public: } } - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index 21265a1b7f2..ad30ab32e92 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -64,7 +64,7 @@ public: void EnterCombat(Unit* /*who*/) {} - void SpellHit(Unit* Hitter, const SpellInfo *Spellkind) + void SpellHit(Unit* Hitter, const SpellInfo* Spellkind) { if (Spellkind->Id == 32001 && !Spawn) { @@ -838,7 +838,7 @@ public: ScriptedAI::UpdateAI(diff); } - void SpellHit(Unit* caster, const SpellInfo *spell) + void SpellHit(Unit* caster, const SpellInfo* spell) { if (caster->GetTypeId() == TYPEID_PLAYER) { @@ -925,7 +925,7 @@ class npc_corki : public CreatureScript public: npc_corki() : CreatureScript("npc_corki") { } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_corkiAI(creature); } diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index 3620f09e7c8..aacfb31965e 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -100,7 +100,7 @@ public: void EnterCombat(Unit* /*who*/) {} - /*void SpellHit(Unit* caster, const SpellInfo *spell) + /*void SpellHit(Unit* caster, const SpellInfo* spell) { //we have no way of telling the Creature was hit by spell -> got aura applied after 10-12 seconds //then no way for the mobs to actually stop the shutdown as intended. @@ -640,7 +640,7 @@ class at_commander_dawnforge : public AreaTriggerScript public: at_commander_dawnforge() : AreaTriggerScript("at_commander_dawnforge") { } - bool OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) { //if player lost aura or not have at all, we should not try start event. if (!player->HasAura(SPELL_SUNFURY_DISGUISE)) @@ -681,7 +681,7 @@ class npc_professor_dabiri : public CreatureScript public: npc_professor_dabiri() : CreatureScript("npc_professor_dabiri") { } - bool OnQuestAccept(Player* player, Creature* creature, Quest const *quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { if (quest->GetQuestId() == QUEST_DIMENSIUS) DoScriptText(WHISPER_DABIRI, creature, player); @@ -782,7 +782,7 @@ public: PlayerGUID = who->GetGUID(); } - void SpellHit(Unit* /*caster*/, const SpellInfo * /*spell*/) + void SpellHit(Unit* /*caster*/, const SpellInfo* /*spell*/) { DoCast(me, SPELL_DE_MATERIALIZE); } @@ -958,7 +958,7 @@ class npc_maxx_a_million_escort : public CreatureScript public: npc_maxx_a_million_escort() : CreatureScript("npc_maxx_a_million_escort") { } - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new npc_maxx_a_million_escortAI(creature); } diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index a99b2946409..1666cfa78e2 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -1379,7 +1379,7 @@ public: if (!player) return; - if (Group *EventGroup = player->GetGroup()) + if (Group* EventGroup = player->GetGroup()) { Player* GroupMember; diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp index 538821efe61..785f476b9ab 100644 --- a/src/server/scripts/Outland/terokkar_forest.cpp +++ b/src/server/scripts/Outland/terokkar_forest.cpp @@ -97,7 +97,7 @@ public: { if (Group* pGroup = CAST_PLR(done_by)->GetGroup()) { - for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) { Player* pGroupie = itr->getSource(); if (pGroupie && diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index f5817ba0d9d..98faef9e00a 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -65,7 +65,7 @@ class spell_dk_anti_magic_shell_raid : public SpellScriptLoader amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { absorbAmount = CalculatePctN(dmgInfo.GetDamage(), absorbPct); } @@ -77,7 +77,7 @@ class spell_dk_anti_magic_shell_raid : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dk_anti_magic_shell_raid_AuraScript(); } @@ -112,12 +112,12 @@ class spell_dk_anti_magic_shell_self : public SpellScriptLoader amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { absorbAmount = std::min(CalculatePctN(dmgInfo.GetDamage(), absorbPct), GetTarget()->CountPctFromMaxHealth(hpPct)); } - void Trigger(AuraEffect * aurEff, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount) + void Trigger(AuraEffect* aurEff, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount) { Unit* target = GetTarget(); // damage absorbed by Anti-Magic Shell energizes the DK with additional runic power. @@ -134,7 +134,7 @@ class spell_dk_anti_magic_shell_self : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dk_anti_magic_shell_self_AuraScript(); } @@ -172,7 +172,7 @@ class spell_dk_anti_magic_zone : public SpellScriptLoader amount += int32(2 * caster->ToPlayer()->GetTotalAttackPowerValue(BASE_ATTACK)); } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { absorbAmount = CalculatePctN(dmgInfo.GetDamage(), absorbPct); } @@ -184,7 +184,7 @@ class spell_dk_anti_magic_zone : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dk_anti_magic_zone_AuraScript(); } @@ -427,7 +427,7 @@ class spell_dk_spell_deflection : public SpellScriptLoader amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { // You have a chance equal to your Parry chance if ((dmgInfo.GetDamageType() == SPELL_DIRECT_DAMAGE) && roll_chance_f(GetTarget()->GetUnitParryChance())) @@ -441,7 +441,7 @@ class spell_dk_spell_deflection : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dk_spell_deflection_AuraScript(); } @@ -503,7 +503,7 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader { PrepareAuraScript(spell_dk_will_of_the_necropolis_AuraScript); - bool Validate(SpellInfo const *spellEntry) + bool Validate(SpellInfo const* spellEntry) { // can't use other spell than will of the necropolis due to spell_ranks dependency if (sSpellMgr->GetFirstSpellInChain(DK_SPELL_WILL_OF_THE_NECROPOLIS_AURA_R1) != sSpellMgr->GetFirstSpellInChain(spellEntry->Id)) @@ -530,7 +530,7 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { // min pct of hp is stored in effect 0 of talent spell uint32 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id); @@ -551,7 +551,7 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dk_will_of_the_necropolis_AuraScript(); } @@ -599,7 +599,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dk_improved_blood_presence_AuraScript(); } @@ -648,7 +648,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dk_improved_unholy_presence_AuraScript(); } diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 8dc4b3063a5..7a247b28bad 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -108,7 +108,7 @@ class spell_dru_moonkin_form_passive : public SpellScriptLoader amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { // reduces all damage taken while Stunned in Moonkin Form if (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_STUNNED) && GetTarget()->HasAuraWithMechanic(1<<MECHANIC_STUN)) @@ -122,7 +122,7 @@ class spell_dru_moonkin_form_passive : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dru_moonkin_form_passive_AuraScript(); } @@ -152,7 +152,7 @@ class spell_dru_primal_tenacity : public SpellScriptLoader amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { // reduces all damage taken while Stunned in Cat Form if (GetTarget()->GetShapeshiftForm() == FORM_CAT && GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_STUNNED) && GetTarget()->HasAuraWithMechanic(1<<MECHANIC_STUN)) @@ -166,7 +166,7 @@ class spell_dru_primal_tenacity : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dru_primal_tenacity_AuraScript(); } @@ -196,7 +196,7 @@ class spell_dru_savage_defense : public SpellScriptLoader amount = -1; } - void Absorb(AuraEffect * aurEff, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount) + void Absorb(AuraEffect* aurEff, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount) { absorbAmount = uint32(CalculatePctN(GetTarget()->GetTotalAttackPowerValue(BASE_ATTACK), absorbPct)); aurEff->SetAmount(0); @@ -209,7 +209,7 @@ class spell_dru_savage_defense : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_dru_savage_defense_AuraScript(); } @@ -290,7 +290,7 @@ class spell_dru_starfall_aoe : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_dru_starfall_aoe_SpellScript(); } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 3d6b4fba8bc..dfdf03c421e 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -734,7 +734,7 @@ class spell_gen_gunship_portal : public SpellScriptLoader if (caster->GetTypeId() != TYPEID_PLAYER) return; - if (Battleground *bg = caster->ToPlayer()->GetBattleground()) + if (Battleground* bg = caster->ToPlayer()->GetBattleground()) if (bg->GetTypeID(true) == BATTLEGROUND_IC) bg->DoAction(1, caster->GetGUID()); } diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 3613b97ec5c..d0e62b9b758 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -87,7 +87,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_hun_aspect_of_the_beast_AuraScript(); } @@ -328,7 +328,7 @@ public: const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap(); for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(itr->first); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); ///! If spellId in cooldown map isn't valid, the above will return a null pointer. if (spellInfo && @@ -433,7 +433,7 @@ public: } } - void HandleUpdatePeriodic(AuraEffect * aurEff) + void HandleUpdatePeriodic(AuraEffect* aurEff) { Unit* target = GetUnitOwner(); if (Player* playerTarget = target->ToPlayer()) @@ -453,7 +453,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_hun_sniper_training_AuraScript(); } diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index d271bf36887..eb889993030 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -65,7 +65,7 @@ class spell_mage_blast_wave : public SpellScriptLoader } }; - SpellScript * GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_mage_blast_wave_SpellScript(); } @@ -90,7 +90,7 @@ class spell_mage_cold_snap : public SpellScriptLoader const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap(); for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(itr->first); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); if (spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && (spellInfo->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) && @@ -203,7 +203,7 @@ class spell_mage_summon_water_elemental : public SpellScriptLoader } }; - SpellScript * GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_mage_summon_water_elemental_SpellScript(); } @@ -231,10 +231,10 @@ public: && sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_R1); } - void Absorb(AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* target = GetTarget(); - if (AuraEffect * talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_FROST_WARDING_R1, EFFECT_0)) + if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_FROST_WARDING_R1, EFFECT_0)) { int32 chance = talentAurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); @@ -253,7 +253,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_mage_frost_warding_trigger_AuraScript(); } @@ -274,11 +274,11 @@ public: && sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_R1); } - void Trigger(AuraEffect * aurEff, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount) + void Trigger(AuraEffect* aurEff, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount) { Unit* target = GetTarget(); - if (AuraEffect * talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_INCANTERS_ABSORBTION_R1, EFFECT_0)) + if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_INCANTERS_ABSORBTION_R1, EFFECT_0)) { int32 bp = CalculatePctN(absorbAmount, talentAurEff->GetAmount()); target->CastCustomSpell(target, SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff); @@ -302,7 +302,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_mage_incanters_absorbtion_absorb_AuraScript(); } @@ -324,7 +324,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_mage_incanters_absorbtion_manashield_AuraScript(); } diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 9269dade108..87c1b96a3ef 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -69,7 +69,7 @@ public: amount = -1; } - void Absorb(AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* victim = GetTarget(); int32 remainingHealth = victim->GetHealth() - dmgInfo.GetDamage(); @@ -109,7 +109,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_pal_ardent_defender_AuraScript(); } @@ -161,7 +161,7 @@ public: } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_pal_blessing_of_faith_SpellScript(); } @@ -204,7 +204,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_pal_blessing_of_sanctuary_AuraScript(); } @@ -253,7 +253,7 @@ public: class spell_pal_holy_shock_SpellScript : public SpellScript { PrepareSpellScript(spell_pal_holy_shock_SpellScript) - bool Validate(SpellInfo const *spellEntry) + bool Validate(SpellInfo const* spellEntry) { if (!sSpellMgr->GetSpellInfo(PALADIN_SPELL_HOLY_SHOCK_R1)) return false; @@ -293,7 +293,7 @@ public: } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_pal_holy_shock_SpellScript(); } @@ -321,7 +321,7 @@ public: } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_pal_judgement_of_command_SpellScript(); } diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 77048d6ea29..0e22404764b 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -64,7 +64,7 @@ class spell_pri_guardian_spirit : public SpellScriptLoader amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* target = GetTarget(); if (dmgInfo.GetDamage() < target->GetHealth()) @@ -84,7 +84,7 @@ class spell_pri_guardian_spirit : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_pri_guardian_spirit_AuraScript(); } @@ -114,7 +114,7 @@ class spell_pri_mana_burn : public SpellScriptLoader } }; - SpellScript * GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_pri_mana_burn_SpellScript; } @@ -140,7 +140,7 @@ class spell_pri_mind_sear : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_pri_mind_sear_SpellScript(); } @@ -170,7 +170,7 @@ class spell_pri_pain_and_suffering_proc : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_pri_pain_and_suffering_proc_SpellScript; } @@ -225,7 +225,7 @@ class spell_pri_penance : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_pri_penance_SpellScript; } @@ -246,7 +246,7 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader return sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED) && sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_R1); } - void Trigger(AuraEffect * aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Trigger(AuraEffect* aurEff, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* target = GetTarget(); if (dmgInfo.GetAttacker() == target) @@ -254,7 +254,7 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader Unit* caster = GetCaster(); if (!caster) return; - if (AuraEffect * talentAurEff = target->GetAuraEffectOfRankedSpell(PRIEST_SPELL_REFLECTIVE_SHIELD_R1, EFFECT_0)) + if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(PRIEST_SPELL_REFLECTIVE_SHIELD_R1, EFFECT_0)) { int32 bp = CalculatePctN(absorbAmount, talentAurEff->GetAmount()); target->CastCustomSpell(dmgInfo.GetAttacker(), PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff); @@ -267,7 +267,7 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_pri_reflective_shield_trigger_AuraScript(); } diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index a9ffe2e0f47..8f90bca5e79 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -470,7 +470,7 @@ public: } }; - SpellScript * GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_q11730_ultrasonic_screwdriver_SpellScript(); } diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index f1add24fc73..079ee5ded32 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -65,7 +65,7 @@ public: amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { Unit* target = GetTarget(); if (dmgInfo.GetDamage() < target->GetHealth()) @@ -95,7 +95,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_rog_cheat_death_AuraScript(); } @@ -125,7 +125,7 @@ public: amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { // reduces all damage taken while stun or fear if (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_FLEEING) || (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_STUNNED) && GetTarget()->HasAuraWithMechanic(1<<MECHANIC_STUN))) @@ -139,7 +139,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_rog_nerves_of_steel_AuraScript(); } @@ -170,7 +170,7 @@ class spell_rog_preparation : public SpellScriptLoader const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap(); for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) { - SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(itr->first); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE) { @@ -202,7 +202,7 @@ class spell_rog_preparation : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_rog_preparation_SpellScript(); } @@ -246,7 +246,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_rog_prey_on_the_weak_AuraScript(); } @@ -284,7 +284,7 @@ class spell_rog_shiv : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_rog_shiv_SpellScript(); } diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 7ffec9f7051..cd46e0eab1c 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -60,7 +60,7 @@ public: amount = -1; } - void Absorb(AuraEffect * /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) + void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { // reduces all damage taken while stun, fear or silence if (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_FLEEING | UNIT_FLAG_SILENCED) || (GetTarget()->GetUInt32Value(UNIT_FIELD_FLAGS) & (UNIT_FLAG_STUNNED) && GetTarget()->HasAuraWithMechanic(1<<MECHANIC_STUN))) @@ -74,7 +74,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_sha_astral_shift_AuraScript(); } @@ -167,7 +167,7 @@ public: int32 effValue = GetEffectValue(); // Glyph of Mana Tide if (Unit* owner = caster->GetOwner()) - if (AuraEffect *dummy = owner->GetAuraEffect(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE, 0)) + if (AuraEffect* dummy = owner->GetAuraEffect(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE, 0)) effValue += dummy->GetAmount(); // Regenerate 6% of Total Mana Every 3 secs int32 effBasePoints0 = int32(CalculatePctN(unitTarget->GetMaxPower(POWER_MANA), effValue)); @@ -222,7 +222,7 @@ public: } }; - AuraScript *GetAuraScript() const + AuraScript* GetAuraScript() const { return new spell_sha_earthbind_totem_AuraScript(); } diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index da6fde2c8f0..7f712dfc8a2 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -224,7 +224,7 @@ class spell_warl_seed_of_corruption : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_warl_seed_of_corruption_SpellScript(); } diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 9f484f4966d..395673b28a2 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -57,7 +57,7 @@ class spell_warr_last_stand : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_warr_last_stand_SpellScript(); } @@ -83,7 +83,7 @@ class spell_warr_improved_spell_reflection : public SpellScriptLoader } }; - SpellScript *GetSpellScript() const + SpellScript* GetSpellScript() const { return new spell_warr_improved_spell_reflection_SpellScript(); } diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index af966e3e22e..2dbbd949526 100755 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -34,7 +34,7 @@ class achievement_storm_glory : public AchievementCriteriaScript if (source->GetBattlegroundTypeId() != BATTLEGROUND_EY) return false; - Battleground *pEotS = source->GetBattleground(); + Battleground* pEotS = source->GetBattleground(); if (!pEotS) return false; diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index d99501f6aaa..0bda63b4177 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -936,7 +936,7 @@ public: if (!caster || caster->GetTypeId() != TYPEID_PLAYER) return true; - if (!player->IsInSameRaidWith(static_cast<Player* >(caster))) + if (!player->IsInSameRaidWith(static_cast<Player*>(caster))) return true; // Repeating this at every use is ugly and inefficient. But as long as we don't have proper diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp index 6c71f3c2167..a40405d3021 100644 --- a/src/server/scripts/World/guards.cpp +++ b/src/server/scripts/World/guards.cpp @@ -83,7 +83,7 @@ public: if (buffTimer <= diff) { //Find a spell that targets friendly and applies an aura (these are generally buffs) - SpellInfo const *info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + SpellInfo const* info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); if (info && !globalCooldown) { @@ -111,7 +111,7 @@ public: if (me->IsWithinMeleeRange(me->getVictim())) { bool healing = false; - SpellInfo const *info = NULL; + SpellInfo const* info = NULL; //Select a healing spell if less than 30% hp if (me->HealthBelowPct(30)) @@ -147,7 +147,7 @@ public: if (!me->IsNonMeleeSpellCasted(false)) { bool healing = false; - SpellInfo const *info = NULL; + SpellInfo const* info = NULL; //Select a healing spell if less than 30% hp ONLY 33% of the time if (me->HealthBelowPct(30) && 33 > urand(0, 99)) @@ -228,7 +228,7 @@ public: uint32 buffTimer; }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new guard_genericAI(creature); } @@ -301,7 +301,7 @@ public: bool canTeleport; }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new guard_shattrath_scryerAI(creature); } @@ -365,7 +365,7 @@ public: bool canTeleport; }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new guard_shattrath_aldorAI(creature); } diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp index 5cb707bb2a4..92909f3885a 100644 --- a/src/server/scripts/World/mob_generic_creature.cpp +++ b/src/server/scripts/World/mob_generic_creature.cpp @@ -66,7 +66,7 @@ public: if (BuffTimer <= diff) { //Find a spell that targets friendly and applies an aura (these are generally buffs) - SpellInfo const *info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + SpellInfo const* info = SelectSpell(me, 0, 0, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); if (info && !GlobalCooldown) { @@ -94,7 +94,7 @@ public: if (me->isAttackReady() && !me->IsNonMeleeSpellCasted(false)) { bool Healing = false; - SpellInfo const *info = NULL; + SpellInfo const* info = NULL; //Select a healing spell if less than 30% hp if (HealthBelowPct(30)) @@ -125,7 +125,7 @@ public: if (!me->IsNonMeleeSpellCasted(false)) { bool Healing = false; - SpellInfo const *info = NULL; + SpellInfo const* info = NULL; //Select a healing spell if less than 30% hp ONLY 33% of the time if (HealthBelowPct(30) && rand() % 3 == 0) @@ -161,7 +161,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new generic_creatureAI(creature); } @@ -182,7 +182,7 @@ public: } uint32 timer, interval; - const SpellInfo * spell; + const SpellInfo* spell; void UpdateAI(const uint32 diff) { @@ -197,7 +197,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new trigger_periodicAI(creature); } @@ -218,7 +218,7 @@ public: } }; - CreatureAI *GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const { return new trigger_deathAI(creature); } diff --git a/src/server/shared/Configuration/Config.cpp b/src/server/shared/Configuration/Config.cpp index 3114d363919..9c3a906cd2b 100755 --- a/src/server/shared/Configuration/Config.cpp +++ b/src/server/shared/Configuration/Config.cpp @@ -19,7 +19,7 @@ #include "Config.h" #include <ace/Configuration_Import_Export.h> -static bool GetValueHelper(ACE_Configuration_Heap *mConf, const char *name, ACE_TString &result) +static bool GetValueHelper(ACE_Configuration_Heap* mConf, const char *name, ACE_TString &result) { if (!mConf) return false; diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h index 33c0080a06e..fa42bdcfc6c 100755 --- a/src/server/shared/Configuration/Config.h +++ b/src/server/shared/Configuration/Config.h @@ -46,7 +46,7 @@ class Config private: std::string mFilename; - ACE_Configuration_Heap *mConf; + ACE_Configuration_Heap* mConf; }; #define sConfig ACE_Singleton<Config, ACE_Null_Mutex>::instance() diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp index 9367c227f74..146f4e992b7 100755 --- a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp +++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp @@ -31,7 +31,7 @@ AuthCrypt::~AuthCrypt() } -void AuthCrypt::Init(BigNumber *K) +void AuthCrypt::Init(BigNumber* K) { uint8 ServerEncryptionKey[SEED_KEY_SIZE] = { 0xCC, 0x98, 0xAE, 0x04, 0xE8, 0x97, 0xEA, 0xCA, 0x12, 0xDD, 0xC0, 0x93, 0x42, 0x91, 0x53, 0x57 }; HmacHash serverEncryptHmac(SEED_KEY_SIZE, (uint8*)ServerEncryptionKey); diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.h b/src/server/shared/Cryptography/Authentication/AuthCrypt.h index 1a8a7d3b205..0304ef6b69e 100755 --- a/src/server/shared/Cryptography/Authentication/AuthCrypt.h +++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.h @@ -30,7 +30,7 @@ class AuthCrypt AuthCrypt(); ~AuthCrypt(); - void Init(BigNumber *K); + void Init(BigNumber* K); void DecryptRecv(uint8 *, size_t); void EncryptSend(uint8 *, size_t); diff --git a/src/server/shared/Cryptography/HMACSHA1.cpp b/src/server/shared/Cryptography/HMACSHA1.cpp index aeaf211dd97..5bb837b1544 100755 --- a/src/server/shared/Cryptography/HMACSHA1.cpp +++ b/src/server/shared/Cryptography/HMACSHA1.cpp @@ -30,7 +30,7 @@ HmacHash::~HmacHash() HMAC_CTX_cleanup(&m_ctx); } -void HmacHash::UpdateBigNumber(BigNumber *bn) +void HmacHash::UpdateBigNumber(BigNumber* bn) { UpdateData(bn->AsByteArray(), bn->GetNumBytes()); } @@ -52,7 +52,7 @@ void HmacHash::Finalize() ASSERT(length == SHA_DIGEST_LENGTH) } -uint8 *HmacHash::ComputeHash(BigNumber *bn) +uint8 *HmacHash::ComputeHash(BigNumber* bn) { HMAC_Update(&m_ctx, bn->AsByteArray(), bn->GetNumBytes()); Finalize(); diff --git a/src/server/shared/Cryptography/HMACSHA1.h b/src/server/shared/Cryptography/HMACSHA1.h index 5f348c6a42b..180ac6f4262 100755 --- a/src/server/shared/Cryptography/HMACSHA1.h +++ b/src/server/shared/Cryptography/HMACSHA1.h @@ -32,11 +32,11 @@ class HmacHash public: HmacHash(uint32 len, uint8 *seed); ~HmacHash(); - void UpdateBigNumber(BigNumber *bn); + void UpdateBigNumber(BigNumber* bn); void UpdateData(const uint8 *data, int length); void UpdateData(const std::string &str); void Finalize(); - uint8 *ComputeHash(BigNumber *bn); + uint8 *ComputeHash(BigNumber* bn); uint8 *GetDigest() { return (uint8*)m_digest; } int GetLength() const { return SHA_DIGEST_LENGTH; } private: diff --git a/src/server/shared/Cryptography/SHA1.cpp b/src/server/shared/Cryptography/SHA1.cpp index 99b62425210..6f2c985ddfb 100755 --- a/src/server/shared/Cryptography/SHA1.cpp +++ b/src/server/shared/Cryptography/SHA1.cpp @@ -40,17 +40,17 @@ void SHA1Hash::UpdateData(const std::string &str) UpdateData((uint8 const*)str.c_str(), str.length()); } -void SHA1Hash::UpdateBigNumbers(BigNumber *bn0, ...) +void SHA1Hash::UpdateBigNumbers(BigNumber* bn0, ...) { va_list v; - BigNumber *bn; + BigNumber* bn; va_start(v, bn0); bn = bn0; while (bn) { UpdateData(bn->AsByteArray(), bn->GetNumBytes()); - bn = va_arg(v, BigNumber *); + bn = va_arg(v, BigNumber* ); } va_end(v); } diff --git a/src/server/shared/Cryptography/SHA1.h b/src/server/shared/Cryptography/SHA1.h index e239088b154..27e2d3290d0 100755 --- a/src/server/shared/Cryptography/SHA1.h +++ b/src/server/shared/Cryptography/SHA1.h @@ -31,8 +31,8 @@ class SHA1Hash SHA1Hash(); ~SHA1Hash(); - void UpdateFinalizeBigNumbers(BigNumber *bn0, ...); - void UpdateBigNumbers(BigNumber *bn0, ...); + void UpdateFinalizeBigNumbers(BigNumber* bn0, ...); + void UpdateBigNumbers(BigNumber* bn0, ...); void UpdateData(const uint8 *dta, int len); void UpdateData(const std::string &str); diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h index bae253f4114..fbf31bb092e 100755 --- a/src/server/shared/DataStores/DBCStore.h +++ b/src/server/shared/DataStores/DBCStore.h @@ -94,7 +94,7 @@ class DBCStorage uint32 sqlRecordCount = 0; uint32 sqlHighestIndex = 0; - Field *fields = NULL; + Field* fields = NULL; QueryResult result = QueryResult(NULL); // Load data from sql if (sql) diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp index f8908e0c62d..b948a92fc5f 100755 --- a/src/server/shared/Database/QueryHolder.cpp +++ b/src/server/shared/Database/QueryHolder.cpp @@ -172,7 +172,7 @@ bool SQLQueryHolderTask::Execute() { case SQL_ELEMENT_RAW: { - char const *sql = data->element.query; + char const* sql = data->element.query; if (sql) m_holder->SetResult(i, m_conn->Query(sql)); break; diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h index 399779fb66f..6dc01076b59 100755 --- a/src/server/shared/Database/QueryResult.h +++ b/src/server/shared/Database/QueryResult.h @@ -40,7 +40,7 @@ class ResultSet uint64 GetRowCount() const { return m_rowCount; } uint32 GetFieldCount() const { return m_fieldCount; } - Field *Fetch() const { return m_currentRow; } + Field* Fetch() const { return m_currentRow; } const Field & operator [] (uint32 index) const { ASSERT(index < m_fieldCount); @@ -48,7 +48,7 @@ class ResultSet } protected: - Field *m_currentRow; + Field* m_currentRow; uint64 m_rowCount; uint32 m_fieldCount; diff --git a/src/server/shared/Dynamic/LinkedReference/Reference.h b/src/server/shared/Dynamic/LinkedReference/Reference.h index 87c17ce7738..707f4e7cfa8 100755 --- a/src/server/shared/Dynamic/LinkedReference/Reference.h +++ b/src/server/shared/Dynamic/LinkedReference/Reference.h @@ -72,14 +72,14 @@ template <class TO, class FROM> class Reference : public LinkedListElement } Reference<TO, FROM> * next() { return((Reference<TO, FROM> *) LinkedListElement::next()); } - Reference<TO, FROM> const* next() const { return((Reference<TO, FROM> const *) LinkedListElement::next()); } + Reference<TO, FROM> const* next() const { return((Reference<TO, FROM> const* ) LinkedListElement::next()); } Reference<TO, FROM> * prev() { return((Reference<TO, FROM> *) LinkedListElement::prev()); } - Reference<TO, FROM> const* prev() const { return((Reference<TO, FROM> const *) LinkedListElement::prev()); } + Reference<TO, FROM> const* prev() const { return((Reference<TO, FROM> const* ) LinkedListElement::prev()); } Reference<TO, FROM> * nocheck_next() { return((Reference<TO, FROM> *) LinkedListElement::nocheck_next()); } - Reference<TO, FROM> const* nocheck_next() const { return((Reference<TO, FROM> const *) LinkedListElement::nocheck_next()); } + Reference<TO, FROM> const* nocheck_next() const { return((Reference<TO, FROM> const* ) LinkedListElement::nocheck_next()); } Reference<TO, FROM> * nocheck_prev() { return((Reference<TO, FROM> *) LinkedListElement::nocheck_prev()); } - Reference<TO, FROM> const* nocheck_prev() const { return((Reference<TO, FROM> const *) LinkedListElement::nocheck_prev()); } + Reference<TO, FROM> const* nocheck_prev() const { return((Reference<TO, FROM> const* ) LinkedListElement::nocheck_prev()); } TO* operator ->() const { return iRefTo; } TO* getTarget() const { return iRefTo; } diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index a42e89e0b3e..d7222c8564f 100755 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -965,7 +965,7 @@ void Log::outChar(const char * str, ...) void Log::outCharDump(const char * str, uint32 account_id, uint32 guid, const char * name) { - FILE *file = NULL; + FILE* file = NULL; if (m_charLog_Dump_Separate) { char fileName[29]; // Max length: name(12) + guid(11) + _.log (5) + \0 diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 34bfea019ab..8ad5af56d1a 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -147,14 +147,14 @@ class ByteBuffer ByteBuffer &operator<<(const std::string &value) { - append((uint8 const *)value.c_str(), value.length()); + append((uint8 const* )value.c_str(), value.length()); append((uint8)0); return *this; } ByteBuffer &operator<<(const char *str) { - append((uint8 const *)str, str ? strlen(str) : 0); + append((uint8 const* )str, str ? strlen(str) : 0); append((uint8)0); return *this; } diff --git a/src/server/shared/Threading/Threading.cpp b/src/server/shared/Threading/Threading.cpp index 85914994cb1..9b72d0f1499 100755 --- a/src/server/shared/Threading/Threading.cpp +++ b/src/server/shared/Threading/Threading.cpp @@ -179,7 +179,7 @@ void Thread::resume() ACE_THR_FUNC_RETURN Thread::ThreadTask(void * param) { - Runnable * _task = (Runnable*)param; + Runnable* _task = (Runnable*)param; _task->run(); // task execution complete, free referecne added at diff --git a/src/server/shared/Threading/Threading.h b/src/server/shared/Threading/Threading.h index 085659a42ac..0d327d5abaa 100755 --- a/src/server/shared/Threading/Threading.h +++ b/src/server/shared/Threading/Threading.h @@ -95,7 +95,7 @@ namespace ACE_Based ACE_thread_t m_iThreadId; ACE_hthread_t m_hThreadHandle; - Runnable * m_task; + Runnable* m_task; typedef ACE_TSS<Thread> ThreadStorage; //global object - container for Thread class representation of every thread diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index 6a78897bbe0..7d3a6f7ed58 100755 --- a/src/server/shared/Utilities/Util.cpp +++ b/src/server/shared/Utilities/Util.cpp @@ -236,7 +236,7 @@ bool IsIPAddress(char const* ipaddress) /// create PID file uint32 CreatePIDFile(const std::string& filename) { - FILE * pid_file = fopen (filename.c_str(), "w" ); + FILE* pid_file = fopen (filename.c_str(), "w" ); if (pid_file == NULL) return 0; @@ -474,7 +474,7 @@ bool Utf8FitTo(const std::string& str, std::wstring search) return true; } -void utf8printf(FILE *out, const char *str, ...) +void utf8printf(FILE* out, const char *str, ...) { va_list ap; va_start(ap, str); @@ -482,7 +482,7 @@ void utf8printf(FILE *out, const char *str, ...) va_end(ap); } -void vutf8printf(FILE *out, const char *str, va_list* ap) +void vutf8printf(FILE* out, const char *str, va_list* ap) { #if PLATFORM == PLATFORM_WINDOWS char temp_buf[32*1024]; diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index 902b6019f0f..9e17c5417fc 100755 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -368,8 +368,8 @@ std::wstring GetMainPartOfName(std::wstring wname, uint32 declension); bool utf8ToConsole(const std::string& utf8str, std::string& conStr); bool consoleToUtf8(const std::string& conStr, std::string& utf8str); bool Utf8FitTo(const std::string& str, std::wstring search); -void utf8printf(FILE *out, const char *str, ...); -void vutf8printf(FILE *out, const char *str, va_list* ap); +void utf8printf(FILE* out, const char *str, ...); +void vutf8printf(FILE* out, const char *str, va_list* ap); bool IsIPAddress(char const* ipaddress); uint32 CreatePIDFile(const std::string& filename); diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index f5e55ecccb9..3fd47c42dc3 100755 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -43,7 +43,7 @@ char * command_finder(const char* text, int state) { static int idx, len; const char* ret; - ChatCommand *cmd = ChatHandler::getCommandTable(); + ChatCommand* cmd = ChatHandler::getCommandTable(); if (!state) { diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp index c44ac1c9266..cb3cd1289f7 100755 --- a/src/server/worldserver/Master.cpp +++ b/src/server/worldserver/Master.cpp @@ -247,7 +247,7 @@ int Master::Run() if (sConfig->GetBoolDefault("SOAP.Enabled", false)) { - TCSoapRunnable *runnable = new TCSoapRunnable(); + TCSoapRunnable* runnable = new TCSoapRunnable(); runnable->setListenArguments(sConfig->GetStringDefault("SOAP.IP", "127.0.0.1"), sConfig->GetIntDefault("SOAP.Port", 7878)); soap_thread = new ACE_Based::Thread(runnable); } @@ -255,7 +255,7 @@ int Master::Run() ///- Start up freeze catcher thread if (uint32 freeze_delay = sConfig->GetIntDefault("MaxCoreStuckTime", 0)) { - FreezeDetectorRunnable *fdr = new FreezeDetectorRunnable(); + FreezeDetectorRunnable* fdr = new FreezeDetectorRunnable(); fdr->SetDelayTime(freeze_delay*1000); ACE_Based::Thread freeze_thread(fdr); freeze_thread.setPriority(ACE_Based::Highest); diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp index 994fccbd7ad..500869973d3 100755 --- a/src/server/worldserver/RemoteAccess/RASocket.cpp +++ b/src/server/worldserver/RemoteAccess/RASocket.cpp @@ -187,7 +187,7 @@ int RASocket::check_access_level(const std::string& user) return -1; } - Field *fields = result->Fetch(); + Field* fields = result->Fetch(); if (fields[1].GetUInt32() < iMinLevel) { diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp index a7a4048c34b..67c54e7e011 100755 --- a/src/server/worldserver/TCSoap/TCSoap.cpp +++ b/src/server/worldserver/TCSoap/TCSoap.cpp @@ -46,7 +46,7 @@ void TCSoapRunnable::run() sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF); struct soap* thread_soap = soap_copy(&soap);// make a safe copy - ACE_Message_Block *mb = new ACE_Message_Block(sizeof(struct soap*)); + ACE_Message_Block* mb = new ACE_Message_Block(sizeof(struct soap*)); ACE_OS::memcpy(mb->wr_ptr(), &thread_soap, sizeof(struct soap*)); process_message(mb); } @@ -54,7 +54,7 @@ void TCSoapRunnable::run() soap_done(&soap); } -void TCSoapRunnable::process_message(ACE_Message_Block *mb) +void TCSoapRunnable::process_message(ACE_Message_Block* mb) { ACE_TRACE (ACE_TEXT ("SOAPWorkingThread::process_message")); diff --git a/src/server/worldserver/TCSoap/TCSoap.h b/src/server/worldserver/TCSoap/TCSoap.h index 863d7597ef8..37ed841086d 100755 --- a/src/server/worldserver/TCSoap/TCSoap.h +++ b/src/server/worldserver/TCSoap/TCSoap.h @@ -41,7 +41,7 @@ class TCSoapRunnable: public ACE_Based::Runnable m_port = port; } private: - void process_message(ACE_Message_Block *mb); + void process_message(ACE_Message_Block* mb); std::string m_host; uint16 m_port; |