diff options
Diffstat (limited to 'src')
112 files changed, 521 insertions, 522 deletions
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index 9145c8413ff..8ab4ab8a1a2 100644 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -365,7 +365,7 @@ bool AuthSocket::_HandleLogonChallenge() if (result) { pkt << uint8(WOW_FAIL_BANNED); - sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Banned ip tries to login!",socket().getRemoteAddress().c_str(), socket().getRemotePort()); + sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Banned ip tries to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort()); } else { diff --git a/src/server/collision/DynamicTree.cpp b/src/server/collision/DynamicTree.cpp index 1a2f721a69f..c6754278d17 100644 --- a/src/server/collision/DynamicTree.cpp +++ b/src/server/collision/DynamicTree.cpp @@ -227,7 +227,7 @@ bool DynamicMapTree::getObjectHitPos(const uint32 phasemask, const Vector3& star bool DynamicMapTree::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const { - Vector3 v1(x1,y1,z1), v2(x2,y2,z2); + Vector3 v1(x1, y1, z1), v2(x2, y2, z2); float maxDist = (v2 - v1).magnitude(); @@ -243,8 +243,8 @@ bool DynamicMapTree::isInLineOfSight(float x1, float y1, float z1, float x2, flo float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist, uint32 phasemask) const { - Vector3 v(x,y,z); - Ray r(v, Vector3(0,0,-1)); + Vector3 v(x, y, z); + Ray r(v, Vector3(0, 0, -1)); DynamicTreeIntersectionCallback callback(phasemask); impl.intersectZAllignedRay(r, callback, maxSearchDist); diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp index 380d6b5df21..c087f773630 100644 --- a/src/server/collision/Maps/TileAssembler.cpp +++ b/src/server/collision/Maps/TileAssembler.cpp @@ -380,11 +380,11 @@ namespace VMAP } } - fwrite(&displayId,sizeof(uint32),1,model_list_copy); - fwrite(&name_length,sizeof(uint32),1,model_list_copy); - fwrite(&buff,sizeof(char),name_length,model_list_copy); - fwrite(&bounds.low(),sizeof(Vector3),1,model_list_copy); - fwrite(&bounds.high(),sizeof(Vector3),1,model_list_copy); + fwrite(&displayId, sizeof(uint32), 1, model_list_copy); + fwrite(&name_length, sizeof(uint32), 1, model_list_copy); + fwrite(&buff, sizeof(char), name_length, model_list_copy); + fwrite(&bounds.low(), sizeof(Vector3), 1, model_list_copy); + fwrite(&bounds.high(), sizeof(Vector3), 1, model_list_copy); } fclose(model_list); diff --git a/src/server/collision/Maps/TileAssembler.h b/src/server/collision/Maps/TileAssembler.h index 087c2021b50..a11ce272d62 100644 --- a/src/server/collision/Maps/TileAssembler.h +++ b/src/server/collision/Maps/TileAssembler.h @@ -72,12 +72,12 @@ namespace VMAP uint32 liquidflags; std::vector<MeshTriangle> triangles; std::vector<G3D::Vector3> vertexArray; - class WmoLiquid *liquid; + class WmoLiquid* liquid; GroupModel_Raw() : liquid(0) {} ~GroupModel_Raw(); - bool Read(FILE * f); + bool Read(FILE* f); }; struct WorldModel_Raw diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index 237a5b33621..0ecf02648f9 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -79,7 +79,7 @@ void LoadGameObjectModelList() model_list.insert ( - ModelList::value_type( displayId, GameobjectModelData(std::string(buff,name_length),AABox(v1,v2)) ) + ModelList::value_type( displayId, GameobjectModelData(std::string(buff, name_length), AABox(v1, v2)) ) ); } diff --git a/src/server/collision/RegularGrid.h b/src/server/collision/RegularGrid.h index 5b7d1d74987..f38bf357a19 100644 --- a/src/server/collision/RegularGrid.h +++ b/src/server/collision/RegularGrid.h @@ -104,7 +104,7 @@ public: { ASSERT(x < CELL_NUMBER && y < CELL_NUMBER); if (!nodes[x][y]) - nodes[x][y] = NodeCreatorFunc::makeNode(x,y); + nodes[x][y] = NodeCreatorFunc::makeNode(x, y); return *nodes[x][y]; } diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index 32f71822737..dffdb2361d5 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -469,13 +469,13 @@ void Battlefield::SendWarningToAllInZone(uint32 entry) sCreatureTextMgr->SendChat(stalker, (uint8) entry, 0, CHAT_MSG_BG_SYSTEM_NEUTRAL, LANG_ADDON, TEXT_RANGE_ZONE); } -/*void Battlefield::SendWarningToAllInWar(int32 entry,...) +/*void Battlefield::SendWarningToAllInWar(int32 entry, ...) { const char *format = sObjectMgr->GetTrinityStringForDBCLocale(entry); va_list ap; char str [1024]; va_start(ap, entry); - vsnprintf(str,1024,format, ap); + vsnprintf(str, 1024, format, ap); va_end(ap); std::string msg = (std::string)str; @@ -604,7 +604,7 @@ BfGraveyard* Battlefield::GetGraveyardById(uint32 id) const return NULL; } -WorldSafeLocsEntry const * Battlefield::GetClosestGraveYard(Player* player) +WorldSafeLocsEntry const* Battlefield::GetClosestGraveYard(Player* player) { BfGraveyard* closestGY = NULL; float maxdist = -1; @@ -816,7 +816,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, Position pos, TeamId team) Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, float o, TeamId team) { //Get map object - Map* map = const_cast < Map * >(sMapMgr->CreateBaseMap(m_MapId)); + Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(m_MapId)); if (!map) { sLog->outError(LOG_FILTER_BATTLEFIELD, "Battlefield::SpawnCreature: Can't create creature entry: %u map not found", entry); diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h index 0da776b9624..7a8d856aa8e 100644 --- a/src/server/game/Battlefield/Battlefield.h +++ b/src/server/game/Battlefield/Battlefield.h @@ -277,7 +277,7 @@ class Battlefield : public ZoneScript // Graveyard methods // Find which graveyard the player must be teleported to to be resurrected by spiritguide - WorldSafeLocsEntry const * GetClosestGraveYard(Player* player); + WorldSafeLocsEntry const* GetClosestGraveYard(Player* player); virtual void AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid); void RemovePlayerFromResurrectQueue(uint64 player_guid); diff --git a/src/server/game/Battlefield/BattlefieldMgr.cpp b/src/server/game/Battlefield/BattlefieldMgr.cpp index 5aec0458b19..d30a0b17fd7 100644 --- a/src/server/game/Battlefield/BattlefieldMgr.cpp +++ b/src/server/game/Battlefield/BattlefieldMgr.cpp @@ -51,7 +51,7 @@ void BattlefieldMgr::InitBattlefield() /* For Cataclysm: Tol Barad pBf = new BattlefieldTB; // respawn, init variables - if(!pBf->SetupBattlefield()) + if (!pBf->SetupBattlefield()) { sLog->outDebug(LOG_FILTER_BATTLEFIELD, "Battlefield : Tol Barad init failed."); delete pBf; @@ -68,7 +68,7 @@ void BattlefieldMgr::AddZone(uint32 zoneid, Battlefield *handle) m_BattlefieldMap[zoneid] = handle; } -void BattlefieldMgr::HandlePlayerEnterZone(Player * player, uint32 zoneid) +void BattlefieldMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid) { BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneid); if (itr == m_BattlefieldMap.end()) @@ -81,7 +81,7 @@ void BattlefieldMgr::HandlePlayerEnterZone(Player * player, uint32 zoneid) sLog->outDebug(LOG_FILTER_BATTLEFIELD, "Player %u entered outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId()); } -void BattlefieldMgr::HandlePlayerLeaveZone(Player * player, uint32 zoneid) +void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid) { BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneid); if (itr == m_BattlefieldMap.end()) @@ -129,7 +129,7 @@ void BattlefieldMgr::Update(uint32 diff) } } -ZoneScript *BattlefieldMgr::GetZoneScript(uint32 zoneId) +ZoneScript* BattlefieldMgr::GetZoneScript(uint32 zoneId) { BattlefieldMap::iterator itr = m_BattlefieldMap.find(zoneId); if (itr != m_BattlefieldMap.end()) diff --git a/src/server/game/Battlefield/BattlefieldMgr.h b/src/server/game/Battlefield/BattlefieldMgr.h index 28b2a3c148a..af1cea763df 100644 --- a/src/server/game/Battlefield/BattlefieldMgr.h +++ b/src/server/game/Battlefield/BattlefieldMgr.h @@ -39,11 +39,11 @@ class BattlefieldMgr // create battlefield events void InitBattlefield(); // called when a player enters an battlefield area - void HandlePlayerEnterZone(Player * player, uint32 areaflag); + void HandlePlayerEnterZone(Player* player, uint32 areaflag); // called when player leaves an battlefield area - void HandlePlayerLeaveZone(Player * player, uint32 areaflag); + void HandlePlayerLeaveZone(Player* player, uint32 areaflag); // called when player resurrects - void HandlePlayerResurrects(Player * player, uint32 areaflag); + void HandlePlayerResurrects(Player* player, uint32 areaflag); // return assigned battlefield Battlefield* GetBattlefieldToZoneId(uint32 zoneid); Battlefield* GetBattlefieldByBattleId(uint32 battleid); @@ -54,14 +54,14 @@ class BattlefieldMgr void Update(uint32 diff); - void HandleGossipOption(Player * player, uint64 guid, uint32 gossipid); + void HandleGossipOption(Player* player, uint64 guid, uint32 gossipid); - bool CanTalkTo(Player * player, Creature * creature, GossipMenuItems gso); + bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems gso); - void HandleDropFlag(Player * player, uint32 spellId); + void HandleDropFlag(Player* player, uint32 spellId); typedef std::vector < Battlefield * >BattlefieldSet; - typedef std::map < uint32 /* zoneid */ , Battlefield * >BattlefieldMap; + typedef std::map < uint32 /* zoneid */, Battlefield * >BattlefieldMap; private: // contains all initiated battlefield events // used when initing / cleaning up diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index a36d204a4b7..060aca3e5aa 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -916,7 +916,7 @@ void BattlefieldWG::UpdatedDestroyedTowerCount(TeamId team) } } -void BattlefieldWG::ProcessEvent(WorldObject *obj, uint32 eventId) +void BattlefieldWG::ProcessEvent(WorldObject* obj, uint32 eventId) { if (!obj || !IsWarTime()) return; diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index f313357e323..2f750de7b3a 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -405,7 +405,7 @@ class BattlefieldWG : public Battlefield void PromotePlayer(Player* killer); void UpdateTenacity(); - void ProcessEvent(WorldObject *obj, uint32 eventId); + void ProcessEvent(WorldObject* obj, uint32 eventId); bool FindAndRemoveVehicleFromList(Unit* vehicle); @@ -562,7 +562,7 @@ struct WintergraspObjectPositionData }; // ***************************************************** -// ************ Destructible (Wall,Tower..) ************ +// ************ Destructible (Wall, Tower..) ************ // ***************************************************** struct WintergraspBuildingSpawnData @@ -755,7 +755,7 @@ const WintergraspTeleporterData WGPortalDefenderData[WG_MAX_TELEPORTER] = }; // ********************************************************* -// **********Tower Element(GameObject,Creature)************* +// **********Tower Element(GameObject, Creature)************* // ********************************************************* struct WintergraspTowerData @@ -1055,7 +1055,7 @@ const WGWorkshopData WorkshopsData[WG_MAX_WORKSHOP] = }; // ******************************************************************** -// * Structs using for Building,Graveyard,Workshop * +// * Structs using for Building, Graveyard, Workshop * // ******************************************************************** // Structure for different buildings that can be destroyed during battle struct BfWGGameObjectBuilding diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index e0a3943d70f..e717a10fcd7 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1688,7 +1688,7 @@ void Battleground::SendWarningToAll(int32 entry, ...) if (!entry) return; - char const *format = sObjectMgr->GetTrinityStringForDBCLocale(entry); + char const* format = sObjectMgr->GetTrinityStringForDBCLocale(entry); char str[1024]; va_list ap; diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp index f4dd059846e..763e0132c10 100644 --- a/src/server/game/Calendar/CalendarMgr.cpp +++ b/src/server/game/Calendar/CalendarMgr.cpp @@ -68,7 +68,7 @@ void CalendarMgr::LoadFromDB() if (flags & CALENDAR_FLAG_GUILD_EVENT || flags & CALENDAR_FLAG_WITHOUT_INVITES) guildId = Player::GetGuildIdFromDB(creatorGUID); - CalendarEvent* calendarEvent = new CalendarEvent(eventId, creatorGUID , guildId, type, dungeonId, time_t(eventTime), flags, time_t(timezoneTime), title, description); + CalendarEvent* calendarEvent = new CalendarEvent(eventId, creatorGUID, guildId, type, dungeonId, time_t(eventTime), flags, time_t(timezoneTime), title, description); _events.insert(calendarEvent); _maxEventId = std::max(_maxEventId, eventId); diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index 0e13019c8a2..6d291ca301f 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -272,7 +272,7 @@ HostileReference* ThreatContainer::getReferenceByTarget(Unit* victim) const uint64 const guid = victim->GetGUID(); for (ThreatContainer::StorageType::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i) { - HostileReference *ref = (*i); + HostileReference* ref = (*i); if (ref && ref->getUnitGuid() == guid) return ref; } diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index d476113edc4..5e1a05669ed 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1364,7 +1364,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) if ((cond->SourceGroup > MAX_EFFECT_MASK) || !cond->SourceGroup) { - sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set , ignoring.", cond->SourceEntry, cond->SourceGroup); + sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set, ignoring.", cond->SourceEntry, cond->SourceGroup); return false; } diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index d0784f05c4d..b7d966757c8 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -19,111 +19,110 @@ #ifndef TRINITY_DBCSFRM_H #define TRINITY_DBCSFRM_H -char const Achievementfmt[]="niixssssssssssssssssxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxii"; -const std::string CustomAchievementfmt="pppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaapapaaaaaaaaaaaaaaaaaapp"; +char const Achievementfmt[] = "niixssssssssssssssssxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxii"; +const std::string CustomAchievementfmt = "pppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaapapaaaaaaaaaaaaaaaaaapp"; const std::string CustomAchievementIndex = "ID"; -char const AchievementCriteriafmt[]="niiiiiiiixxxxxxxxxxxxxxxxxiiiix"; -char const AreaTableEntryfmt[]="iiinixxxxxissssssssssssssssxiiiiixxx"; -char const AreaGroupEntryfmt[]="niiiiiii"; -char const AreaPOIEntryfmt[]="niiiiiiiiiiifffixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxix"; -char const AreaTriggerEntryfmt[]="niffffffff"; -char const AuctionHouseEntryfmt[]="niiixxxxxxxxxxxxxxxxx"; -char const BankBagSlotPricesEntryfmt[]="ni"; -char const BarberShopStyleEntryfmt[]="nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiii"; -char const BattlemasterListEntryfmt[]="niiiiiiiiixssssssssssssssssxiixx"; -char const CharStartOutfitEntryfmt[]="xniiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char const CharTitlesEntryfmt[]="nxssssssssssssssssxxxxxxxxxxxxxxxxxxi"; -char const ChatChannelsEntryfmt[]="nixssssssssssssssssxxxxxxxxxxxxxxxxxx"; - // ChatChannelsEntryfmt, index not used (more compact store) -char const ChrClassesEntryfmt[]="nxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii"; -char const ChrRacesEntryfmt[]="nxixiixixxxxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi"; -char const CinematicSequencesEntryfmt[]="nxxxxxxxxx"; -char const CreatureDisplayInfofmt[]="nixxfxxxxxxxxxxx"; -char const CreatureFamilyfmt[]="nfifiiiiixssssssssssssssssxx"; -char const CreatureModelDatafmt[]="nxxxfxxxxxxxxxxffxxxxxxxxxxx"; -char const CreatureSpellDatafmt[]="niiiixxxx"; -char const CreatureTypefmt[]="nxxxxxxxxxxxxxxxxxx"; -char const CurrencyTypesfmt[]="xnxi"; -char const DestructibleModelDatafmt[]="nxxixxxixxxixxxixxx"; -char const DungeonEncounterfmt[]="niixissssssssssssssssxx"; -char const DurabilityCostsfmt[]="niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; -char const DurabilityQualityfmt[]="nf"; -char const EmotesEntryfmt[]="nxxiiix"; -char const EmotesTextEntryfmt[]="nxixxxxxxxxxxxxxxxx"; -char const FactionEntryfmt[]="niiiiiiiiiiiiiiiiiiffixssssssssssssssssxxxxxxxxxxxxxxxxxx"; -char const FactionTemplateEntryfmt[]="niiiiiiiiiiiii"; -char const GameObjectDisplayInfofmt[]="nsxxxxxxxxxxffffffx"; -char const GemPropertiesEntryfmt[]="nixxi"; -char const GlyphPropertiesfmt[]="niii"; -char const GlyphSlotfmt[]="nii"; -char const GtBarberShopCostBasefmt[]="f"; -char const GtCombatRatingsfmt[]="f"; -char const GtChanceToMeleeCritBasefmt[]="f"; -char const GtChanceToMeleeCritfmt[]="f"; -char const GtChanceToSpellCritBasefmt[]="f"; -char const GtChanceToSpellCritfmt[]="f"; -char const GtOCTClassCombatRatingScalarfmt[]="df"; -char const GtOCTRegenHPfmt[]="f"; -//char const GtOCTRegenMPfmt[]="f"; -char const GtRegenHPPerSptfmt[]="f"; -char const GtRegenMPPerSptfmt[]="f"; -char const Holidaysfmt[]="niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiixxsiix"; -char const Itemfmt[]="niiiiiii"; -char const ItemBagFamilyfmt[]="nxxxxxxxxxxxxxxxxx"; -//char const ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx"; -//char const ItemCondExtCostsEntryfmt[]="xiii"; -char const ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiiix"; -char const ItemLimitCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxii"; -char const ItemRandomPropertiesfmt[]="nxiiixxssssssssssssssssx"; -char const ItemRandomSuffixfmt[]="nssssssssssssssssxxiiixxiiixx"; -char const ItemSetEntryfmt[]="dssssssssssssssssxiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii"; -char const LFGDungeonEntryfmt[]="nssssssssssssssssxiiiiiiiiixxixixxxxxxxxxxxxxxxxx"; -char const LiquidTypefmt[]="nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char const LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; -char const MailTemplateEntryfmt[]="nxxxxxxxxxxxxxxxxxssssssssssssssssx"; -char const MapEntryfmt[]="nxixxssssssssssssssssxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixiffxiix"; -char const MapDifficultyEntryfmt[]="diisxxxxxxxxxxxxxxxxiix"; -char const MovieEntryfmt[]="nxx"; -char const OverrideSpellDatafmt[]="niiiiiiiiiix"; -char const QuestSortEntryfmt[]="nxxxxxxxxxxxxxxxxx"; -char const QuestXPfmt[]="niiiiiiiiii"; -char const QuestFactionRewardfmt[]="niiiiiiiiii"; -char const PvPDifficultyfmt[]="diiiii"; -char const RandomPropertiesPointsfmt[]="niiiiiiiiiiiiiii"; -char const ScalingStatDistributionfmt[]="niiiiiiiiiiiiiiiiiiiii"; -char const ScalingStatValuesfmt[]="iniiiiiiiiiiiiiiiiiiiiii"; -char const SkillLinefmt[]="nixssssssssssssssssxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxi"; -char const SkillLineAbilityfmt[]="niiiixxiiiiixx"; -char const SoundEntriesfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char const SpellCastTimefmt[]="nixx"; -char const SpellDifficultyfmt[]="niiii"; -const std::string CustomSpellDifficultyfmt="ppppp"; -const std::string CustomSpellDifficultyIndex="id"; -char const SpellDurationfmt[]="niii"; -char const SpellEntryfmt[]="niiiiiiiiiiiixixiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixxfffxx"; -const std::string CustomSpellEntryfmt="papppppppppppapapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaaaaapppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa"; +char const AchievementCriteriafmt[] = "niiiiiiiixxxxxxxxxxxxxxxxxiiiix"; +char const AreaTableEntryfmt[] = "iiinixxxxxissssssssssssssssxiiiiixxx"; +char const AreaGroupEntryfmt[] = "niiiiiii"; +char const AreaPOIEntryfmt[] = "niiiiiiiiiiifffixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxix"; +char const AreaTriggerEntryfmt[] = "niffffffff"; +char const AuctionHouseEntryfmt[] = "niiixxxxxxxxxxxxxxxxx"; +char const BankBagSlotPricesEntryfmt[] = "ni"; +char const BarberShopStyleEntryfmt[] = "nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiii"; +char const BattlemasterListEntryfmt[] = "niiiiiiiiixssssssssssssssssxiixx"; +char const CharStartOutfitEntryfmt[] = "xniiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char const CharTitlesEntryfmt[] = "nxssssssssssssssssxxxxxxxxxxxxxxxxxxi"; +char const ChatChannelsEntryfmt[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxx"; +char const ChrClassesEntryfmt[] = "nxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii"; +char const ChrRacesEntryfmt[] = "nxixiixixxxxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi"; +char const CinematicSequencesEntryfmt[] = "nxxxxxxxxx"; +char const CreatureDisplayInfofmt[] = "nixxfxxxxxxxxxxx"; +char const CreatureFamilyfmt[] = "nfifiiiiixssssssssssssssssxx"; +char const CreatureModelDatafmt[] = "nxxxfxxxxxxxxxxffxxxxxxxxxxx"; +char const CreatureSpellDatafmt[] = "niiiixxxx"; +char const CreatureTypefmt[] = "nxxxxxxxxxxxxxxxxxx"; +char const CurrencyTypesfmt[] = "xnxi"; +char const DestructibleModelDatafmt[] = "nxxixxxixxxixxxixxx"; +char const DungeonEncounterfmt[] = "niixissssssssssssssssxx"; +char const DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; +char const DurabilityQualityfmt[] = "nf"; +char const EmotesEntryfmt[] = "nxxiiix"; +char const EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx"; +char const FactionEntryfmt[] = "niiiiiiiiiiiiiiiiiiffixssssssssssssssssxxxxxxxxxxxxxxxxxx"; +char const FactionTemplateEntryfmt[] = "niiiiiiiiiiiii"; +char const GameObjectDisplayInfofmt[] = "nsxxxxxxxxxxffffffx"; +char const GemPropertiesEntryfmt[] = "nixxi"; +char const GlyphPropertiesfmt[] = "niii"; +char const GlyphSlotfmt[] = "nii"; +char const GtBarberShopCostBasefmt[] = "f"; +char const GtCombatRatingsfmt[] = "f"; +char const GtChanceToMeleeCritBasefmt[] = "f"; +char const GtChanceToMeleeCritfmt[] = "f"; +char const GtChanceToSpellCritBasefmt[] = "f"; +char const GtChanceToSpellCritfmt[] = "f"; +char const GtOCTClassCombatRatingScalarfmt[] = "df"; +char const GtOCTRegenHPfmt[] = "f"; +//char const GtOCTRegenMPfmt[] = "f"; +char const GtRegenHPPerSptfmt[] = "f"; +char const GtRegenMPPerSptfmt[] = "f"; +char const Holidaysfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiixxsiix"; +char const Itemfmt[] = "niiiiiii"; +char const ItemBagFamilyfmt[] = "nxxxxxxxxxxxxxxxxx"; +//char const ItemDisplayTemplateEntryfmt[] = "nxxxxxxxxxxixxxxxxxxxxx"; +//char const ItemCondExtCostsEntryfmt[] = "xiii"; +char const ItemExtendedCostEntryfmt[] = "niiiiiiiiiiiiiix"; +char const ItemLimitCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxii"; +char const ItemRandomPropertiesfmt[] = "nxiiixxssssssssssssssssx"; +char const ItemRandomSuffixfmt[] = "nssssssssssssssssxxiiixxiiixx"; +char const ItemSetEntryfmt[] = "dssssssssssssssssxiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii"; +char const LFGDungeonEntryfmt[] = "nssssssssssssssssxiiiiiiiiixxixixxxxxxxxxxxxxxxxx"; +char const LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char const LockEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; +char const MailTemplateEntryfmt[] = "nxxxxxxxxxxxxxxxxxssssssssssssssssx"; +char const MapEntryfmt[] = "nxixxssssssssssssssssxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixiffxiix"; +char const MapDifficultyEntryfmt[] = "diisxxxxxxxxxxxxxxxxiix"; +char const MovieEntryfmt[] = "nxx"; +char const OverrideSpellDatafmt[] = "niiiiiiiiiix"; +char const QuestFactionRewardfmt[] = "niiiiiiiiii"; +char const QuestSortEntryfmt[] = "nxxxxxxxxxxxxxxxxx"; +char const QuestXPfmt[] = "niiiiiiiiii"; +char const PvPDifficultyfmt[] = "diiiii"; +char const RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii"; +char const ScalingStatDistributionfmt[] = "niiiiiiiiiiiiiiiiiiiii"; +char const ScalingStatValuesfmt[] = "iniiiiiiiiiiiiiiiiiiiiii"; +char const SkillLinefmt[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxi"; +char const SkillLineAbilityfmt[] = "niiiixxiiiiixx"; +char const SoundEntriesfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char const SpellCastTimefmt[] = "nixx"; +char const SpellDifficultyfmt[] = "niiii"; +const std::string CustomSpellDifficultyfmt = "ppppp"; +const std::string CustomSpellDifficultyIndex = "id"; +char const SpellDurationfmt[] = "niii"; +char const SpellEntryfmt[] = "niiiiiiiiiiiixixiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixxfffxx"; +const std::string CustomSpellEntryfmt = "papppppppppppapapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaaaaapppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa"; const std::string CustomSpellEntryIndex = "Id"; -char const SpellFocusObjectfmt[]="nxxxxxxxxxxxxxxxxx"; -char const SpellItemEnchantmentfmt[]="nxiiiiiixxxiiissssssssssssssssxiiiiiii"; -char const SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX"; -char const SpellRadiusfmt[]="nfff"; -char const SpellRangefmt[]="nffffixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; -char const SpellRuneCostfmt[]="niiii"; -char const SpellShapeshiftfmt[]="nxxxxxxxxxxxxxxxxxxiixiiixxiiiiiiii"; +char const SpellFocusObjectfmt[] = "nxxxxxxxxxxxxxxxxx"; +char const SpellItemEnchantmentfmt[] = "nxiiiiiixxxiiissssssssssssssssxiiiiiii"; +char const SpellItemEnchantmentConditionfmt[] = "nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX"; +char const SpellRadiusfmt[] = "nfff"; +char const SpellRangefmt[] = "nffffixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char const SpellRuneCostfmt[] = "niiii"; +char const SpellShapeshiftfmt[] = "nxxxxxxxxxxxxxxxxxxiixiiixxiiiiiiii"; char const StableSlotPricesfmt[] = "ni"; char const SummonPropertiesfmt[] = "niiiii"; -char const TalentEntryfmt[]="niiiiiiiixxxxixxixxxxxx"; -char const TalentTabEntryfmt[]="nxxxxxxxxxxxxxxxxxxxiiix"; -char const TaxiNodesEntryfmt[]="nifffssssssssssssssssxii"; -char const TaxiPathEntryfmt[]="niii"; -char const TaxiPathNodeEntryfmt[]="diiifffiiii"; -char const TeamContributionPointsfmt[]="df"; -char const TotemCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxii"; -char const VehicleEntryfmt[]="niffffiiiiiiiifffffffffffffffssssfifiixx"; -char const VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxx"; -char const WMOAreaTableEntryfmt[]="niiixxxxxiixxxxxxxxxxxxxxxxx"; -char const WorldMapAreaEntryfmt[]="xinxffffixx"; -char const WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxxxx"; -char const WorldSafeLocsEntryfmt[]="nifffxxxxxxxxxxxxxxxxx"; +char const TalentEntryfmt[] = "niiiiiiiixxxxixxixxxxxx"; +char const TalentTabEntryfmt[] = "nxxxxxxxxxxxxxxxxxxxiiix"; +char const TaxiNodesEntryfmt[] = "nifffssssssssssssssssxii"; +char const TaxiPathEntryfmt[] = "niii"; +char const TaxiPathNodeEntryfmt[] = "diiifffiiii"; +char const TeamContributionPointsfmt[] = "df"; +char const TotemCategoryEntryfmt[] = "nxxxxxxxxxxxxxxxxxii"; +char const VehicleEntryfmt[] = "niffffiiiiiiiifffffffffffffffssssfifiixx"; +char const VehicleSeatEntryfmt[] = "niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxx"; +char const WMOAreaTableEntryfmt[] = "niiixxxxxiixxxxxxxxxxxxxxxxx"; +char const WorldMapAreaEntryfmt[] = "xinxffffixx"; +char const WorldMapOverlayEntryfmt[] = "nxiiiixxxxxxxxxxx"; +char const WorldSafeLocsEntryfmt[] = "nifffxxxxxxxxxxxxxxxxx"; #endif diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 09be64813af..a931d61f740 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -1704,7 +1704,7 @@ uint8 LFGMgr::GetKicksLeft(uint64 guid) return kicks; } -void LFGMgr::RestoreState(uint64 guid, char const *debugMsg) +void LFGMgr::RestoreState(uint64 guid, char const* debugMsg) { if (IS_GROUP_GUID(guid)) { diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 33626467486..74c7ca9e3d3 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -383,8 +383,8 @@ class LFGMgr private: uint8 GetTeam(uint64 guid); - void RestoreState(uint64 guid, char const *debugMsg); - void ClearState(uint64 guid, char const *debugMsg); + void RestoreState(uint64 guid, char const* debugMsg); + void ClearState(uint64 guid, char const* debugMsg); void SetDungeon(uint64 guid, uint32 dungeon); void SetSelectedDungeons(uint64 guid, LfgDungeonSet const& dungeons); void SetLockedDungeons(uint64 guid, LfgLockMap const& lock); diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index 7b1ccbc9015..1049285605e 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -790,7 +790,7 @@ class GameObject : public WorldObject, public GridObject<GameObject> void SetDisplayId(uint32 displayid); uint32 GetDisplayId() const { return GetUInt32Value(GAMEOBJECT_DISPLAYID); } - GameObjectModel * m_model; + GameObjectModel* m_model; protected: bool AIM_Initialize(); uint32 m_spellId; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 14878b078bd..5fee82c5ece 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -2375,7 +2375,7 @@ void Player::ProcessDelayedOperations() if (m_DelayedOperations & DELAYED_BG_GROUP_RESTORE) { - if (Group *g = GetGroup()) + if (Group* g = GetGroup()) g->SendUpdateToPlayer(GetGUID()); } diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index fa82ac6f8c6..52e81d6d0cd 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2563,7 +2563,7 @@ class Player : public Unit, public GridObject<Player> //We allow only one timed quest active at the same time. Below can then be simple value instead of set. typedef std::set<uint32> QuestSet; typedef std::set<uint32> SeasonalQuestSet; - typedef UNORDERED_MAP<uint32,SeasonalQuestSet> SeasonalEventQuestMap; + typedef UNORDERED_MAP<uint32, SeasonalQuestSet> SeasonalEventQuestMap; QuestSet m_timedquests; QuestSet m_weeklyquests; QuestSet m_monthlyquests; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 3381369b743..fe0a1e88885 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -388,7 +388,7 @@ bool Unit::haveOffhandWeapon() const void Unit::MonsterMoveWithSpeed(float x, float y, float z, float speed) { Movement::MoveSplineInit init(*this); - init.MoveTo(x,y,z); + init.MoveTo(x, y, z); init.SetVelocity(speed); init.Launch(); } @@ -6514,8 +6514,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere RemoveAura(57934); if (!redirectTarget) break; - CastSpell(this,59628,true); - CastSpell(redirectTarget,57933,true); + CastSpell(this, 59628, true); + CastSpell(redirectTarget, 57933, true); break; } } @@ -15228,7 +15228,7 @@ void Unit::UpdateAuraForGroup(uint8 slot) } } -float Unit::CalculateDefaultCoefficient(SpellInfo const *spellInfo, DamageEffectType damagetype) const +float Unit::CalculateDefaultCoefficient(SpellInfo const* spellInfo, DamageEffectType damagetype) const { // Damage over Time spells bonus calculation float DotFactor = 1.0f; diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index c714303e8c7..4bcc9c4b823 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -495,7 +495,7 @@ enum UnitState UNIT_STATE_FOLLOW_MOVE = 0x08000000, UNIT_STATE_UNATTACKABLE = (UNIT_STATE_IN_FLIGHT | UNIT_STATE_ONVEHICLE), // for real move using movegen check and stop (except unstoppable flight) - UNIT_STATE_MOVING = UNIT_STATE_ROAMING_MOVE | UNIT_STATE_CONFUSED_MOVE | UNIT_STATE_FLEEING_MOVE | UNIT_STATE_CHASE_MOVE | UNIT_STATE_FOLLOW_MOVE , + UNIT_STATE_MOVING = UNIT_STATE_ROAMING_MOVE | UNIT_STATE_CONFUSED_MOVE | UNIT_STATE_FLEEING_MOVE | UNIT_STATE_CHASE_MOVE | UNIT_STATE_FOLLOW_MOVE, UNIT_STATE_CONTROLLED = (UNIT_STATE_CONFUSED | UNIT_STATE_STUNNED | UNIT_STATE_FLEEING), UNIT_STATE_LOST_CONTROL = (UNIT_STATE_CONTROLLED | UNIT_STATE_JUMPING | UNIT_STATE_CHARGING), UNIT_STATE_SIGHTLESS = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_EVADE), @@ -2020,15 +2020,15 @@ class Unit : public WorldObject int32 SpellBaseDamageBonusDone(SpellSchoolMask schoolMask); int32 SpellBaseDamageBonusTaken(SpellSchoolMask schoolMask); - uint32 SpellDamageBonusDone(Unit* victim, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack = 1); - uint32 SpellDamageBonusTaken(Unit* caster, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack = 1); + uint32 SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack = 1); + uint32 SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack = 1); int32 SpellBaseHealingBonusDone(SpellSchoolMask schoolMask); int32 SpellBaseHealingBonusTaken(SpellSchoolMask schoolMask); - uint32 SpellHealingBonusDone(Unit* victim, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); - uint32 SpellHealingBonusTaken(Unit* caster, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); + uint32 SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); + uint32 SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); - uint32 MeleeDamageBonusDone(Unit *pVictim, uint32 damage, WeaponAttackType attType, SpellInfo const *spellProto = NULL); - uint32 MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage,WeaponAttackType attType, SpellInfo const *spellProto = NULL); + uint32 MeleeDamageBonusDone(Unit* pVictim, uint32 damage, WeaponAttackType attType, SpellInfo const* spellProto = NULL); + uint32 MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackType attType, SpellInfo const* spellProto = NULL); bool isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType = BASE_ATTACK); @@ -2043,7 +2043,7 @@ class Unit : public WorldObject void SetContestedPvP(Player* attackedPlayer = NULL); uint32 GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime) const; - float CalculateDefaultCoefficient(SpellInfo const *spellInfo, DamageEffectType damagetype) const; + float CalculateDefaultCoefficient(SpellInfo const* spellInfo, DamageEffectType damagetype) const; uint32 GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType auraType, uint8 effectIndex = 0) const; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 2ba456b5b3c..619d819bf9b 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -3180,10 +3180,10 @@ void ObjectMgr::LoadPlayerInfo() uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES; for (uint32 r = min_race; r < max_race; ++r) for (uint32 c = min_class; c < max_class; ++c) - if (PlayerInfo * info = _playerInfo[r][c]) + if (PlayerInfo* info = _playerInfo[r][c]) info->spell.push_back(fields[2].GetUInt32()); } - else if (PlayerInfo * info = _playerInfo[current_race][current_class]) + else if (PlayerInfo* info = _playerInfo[current_race][current_class]) info->spell.push_back(fields[2].GetUInt32()); else { diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index d2069a7f5f4..f52b6443872 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -968,7 +968,7 @@ namespace Trinity if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem()) return false; - if (i_funit->_IsValidAttackTarget(u, _spellInfo,i_obj->GetTypeId() == TYPEID_DYNAMICOBJECT ? i_obj : NULL) && i_obj->IsWithinDistInMap(u, i_range)) + if (i_funit->_IsValidAttackTarget(u, _spellInfo, i_obj->GetTypeId() == TYPEID_DYNAMICOBJECT ? i_obj : NULL) && i_obj->IsWithinDistInMap(u, i_range)) return true; return false; diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index fc80a7d7635..376ee011638 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -235,7 +235,7 @@ void Guild::BankEventLogEntry::WritePacket(WorldPacket& data) const data << uint8(m_eventType); data << uint64(MAKE_NEW_GUID(m_playerGuid, 0, HIGHGUID_PLAYER)); - switch(m_eventType) + switch (m_eventType) { case GUILD_BANK_LOG_DEPOSIT_ITEM: case GUILD_BANK_LOG_WITHDRAW_ITEM: diff --git a/src/server/game/Handlers/BattlefieldHandler.cpp b/src/server/game/Handlers/BattlefieldHandler.cpp index 0263b64456f..4a29dee4fb0 100644 --- a/src/server/game/Handlers/BattlefieldHandler.cpp +++ b/src/server/game/Handlers/BattlefieldHandler.cpp @@ -60,7 +60,7 @@ void WorldSession::SendBfInvitePlayerToQueue(uint32 BattleId) //Param2:(ZoneId) the zone where the battle is (4197 for wg) //Param3:(CanQueue) if able to queue //Param4:(Full) on log in is full -void WorldSession::SendBfQueueInviteResponse(uint32 BattleId,uint32 ZoneId, bool CanQueue, bool Full) +void WorldSession::SendBfQueueInviteResponse(uint32 BattleId, uint32 ZoneId, bool CanQueue, bool Full) { WorldPacket data(SMSG_BATTLEFIELD_MGR_QUEUE_REQUEST_RESPONSE, 11); data << uint32(BattleId); diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp index f57a5ce020f..60749932637 100644 --- a/src/server/game/Handlers/GuildHandler.cpp +++ b/src/server/game/Handlers/GuildHandler.cpp @@ -339,7 +339,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket& recvData) sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANKER_ACTIVATE [%s]: Go: [" UI64FMTD "] AllSlots: %u" , GetPlayerInfo().c_str(), guid, sendAllSlots); - Guild * const guild = GetPlayer()->GetGuild(); + Guild* const guild = GetPlayer()->GetGuild(); if (!guild) { Guild::SendCommandResult(this, GUILD_COMMAND_VIEW_TAB, ERR_GUILD_PLAYER_NOT_IN_GUILD); diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 3ee14ed429a..c16a33ad97c 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -1684,7 +1684,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket& recvData) sBattlegroundMgr->SendAreaSpiritHealerQueryOpcode(_player, bg, guid); if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId())) - bf->SendAreaSpiritHealerQueryOpcode(_player,guid); + bf->SendAreaSpiritHealerQueryOpcode(_player, guid); } void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket& recvData) diff --git a/src/server/game/Maps/ZoneScript.h b/src/server/game/Maps/ZoneScript.h index 9cea5fec518..ce7168a4040 100644 --- a/src/server/game/Maps/ZoneScript.h +++ b/src/server/game/Maps/ZoneScript.h @@ -32,11 +32,11 @@ class ZoneScript virtual uint32 GetCreatureEntry(uint32 /*guidlow*/, CreatureData const* data) { return data->id; } virtual uint32 GetGameObjectEntry(uint32 /*guidlow*/, uint32 entry) { return entry; } - virtual void OnCreatureCreate(Creature *) { } - virtual void OnCreatureRemove(Creature *) { } + virtual void OnCreatureCreate(Creature* ) { } + virtual void OnCreatureRemove(Creature* ) { } - virtual void OnGameObjectCreate(GameObject *) { } - virtual void OnGameObjectRemove(GameObject *) { } + virtual void OnGameObjectCreate(GameObject* ) { } + virtual void OnGameObjectRemove(GameObject* ) { } virtual void OnUnitDeath(Unit*) { } diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 05696694033..19dfb9df20f 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -432,7 +432,7 @@ enum SpellAttr4 SPELL_ATTR4_UNK19 = 0x00080000, // 19 proc dalayed, after damage or don't proc on absorb? SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER = 0x00100000, // 20 supersedes message "More powerful spell applied" for self casts. SPELL_ATTR4_UNK21 = 0x00200000, // 21 Pally aura, dk presence, dudu form, warrior stance, shadowform, hunter track - SPELL_ATTR4_UNK22 = 0x00400000, // 22 Seal of Command (42058,57770) and Gymer's Smash 55426 + SPELL_ATTR4_UNK22 = 0x00400000, // 22 Seal of Command (42058, 57770) and Gymer's Smash 55426 SPELL_ATTR4_UNK23 = 0x00800000, // 23 SPELL_ATTR4_UNK24 = 0x01000000, // 24 some shoot spell SPELL_ATTR4_IS_PET_SCALING = 0x02000000, // 25 pet scaling auras @@ -441,7 +441,7 @@ enum SpellAttr4 SPELL_ATTR4_UNK28 = 0x10000000, // 28 Aimed Shot SPELL_ATTR4_UNK29 = 0x20000000, // 29 SPELL_ATTR4_UNK30 = 0x40000000, // 30 - SPELL_ATTR4_UNK31 = 0x80000000 // 31 Polymorph (chicken) 228 and Sonic Boom (38052,38488) + SPELL_ATTR4_UNK31 = 0x80000000 // 31 Polymorph (chicken) 228 and Sonic Boom (38052, 38488) }; enum SpellAttr5 diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index ba648c72e26..277a5721c3d 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -207,11 +207,11 @@ void MotionMaster::MoveTargetedHome() else if (_owner->GetTypeId()==TYPEID_UNIT && ((Creature*)_owner)->GetCharmerOrOwnerGUID()) { sLog->outDebug(LOG_FILTER_GENERAL, "Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow()); - Unit *target = ((Creature*)_owner)->GetCharmerOrOwner(); + Unit* target = ((Creature*)_owner)->GetCharmerOrOwner(); if (target) { sLog->outDebug(LOG_FILTER_GENERAL, "Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow()); - Mutate(new FollowMovementGenerator<Creature>(*target,PET_FOLLOW_DIST,PET_FOLLOW_ANGLE), MOTION_SLOT_ACTIVE); + Mutate(new FollowMovementGenerator<Creature>(*target, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE), MOTION_SLOT_ACTIVE); } } else @@ -248,7 +248,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle) _owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); - Mutate(new ChaseMovementGenerator<Player>(*target,dist,angle), MOTION_SLOT_ACTIVE); + Mutate(new ChaseMovementGenerator<Player>(*target, dist, angle), MOTION_SLOT_ACTIVE); } else { @@ -256,7 +256,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle) _owner->GetEntry(), _owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); - Mutate(new ChaseMovementGenerator<Creature>(*target,dist,angle), MOTION_SLOT_ACTIVE); + Mutate(new ChaseMovementGenerator<Creature>(*target, dist, angle), MOTION_SLOT_ACTIVE); } } @@ -272,7 +272,7 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo sLog->outDebug(LOG_FILTER_GENERAL, "Player (GUID: %u) follow to %s (GUID: %u)", _owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); - Mutate(new FollowMovementGenerator<Player>(*target,dist,angle), slot); + Mutate(new FollowMovementGenerator<Player>(*target, dist, angle), slot); } else { @@ -280,7 +280,7 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo _owner->GetEntry(), _owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); - Mutate(new FollowMovementGenerator<Creature>(*target,dist,angle), slot); + Mutate(new FollowMovementGenerator<Creature>(*target, dist, angle), slot); } } @@ -307,7 +307,7 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos) sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z); Movement::MoveSplineInit init(*_owner); - init.MoveTo(x,y,z); + init.MoveTo(x, y, z); init.SetAnimation(Movement::ToGround); init.Launch(); Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE); @@ -321,7 +321,7 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos) sLog->outDebug(LOG_FILTER_GENERAL, "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z); Movement::MoveSplineInit init(*_owner); - init.MoveTo(x,y,z); + init.MoveTo(x, y, z); init.SetAnimation(Movement::ToFly); init.Launch(); Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE); @@ -336,13 +336,13 @@ void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, floa float x, y, z; float moveTimeHalf = speedZ / Movement::gravity; float dist = 2 * moveTimeHalf * speedXY; - float max_height = -Movement::computeFallElevation(moveTimeHalf,false,-speedZ); + float max_height = -Movement::computeFallElevation(moveTimeHalf, false, -speedZ); _owner->GetNearPoint(_owner, x, y, z, _owner->GetObjectSize(), dist, _owner->GetAngle(srcX, srcY) + M_PI); Movement::MoveSplineInit init(*_owner); - init.MoveTo(x,y,z); - init.SetParabolic(max_height,0); + init.MoveTo(x, y, z); + init.SetParabolic(max_height, 0); init.SetOrientationFixed(true); init.SetVelocity(speedXY); init.Launch(); @@ -368,11 +368,11 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee sLog->outDebug(LOG_FILTER_GENERAL, "Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z); float moveTimeHalf = speedZ / Movement::gravity; - float max_height = -Movement::computeFallElevation(moveTimeHalf,false,-speedZ); + float max_height = -Movement::computeFallElevation(moveTimeHalf, false, -speedZ); Movement::MoveSplineInit init(*_owner); - init.MoveTo(x,y,z); - init.SetParabolic(max_height,0); + init.MoveTo(x, y, z); + init.SetParabolic(max_height, 0); init.SetVelocity(speedXY); init.Launch(); Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED); diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index e89d30c56f4..d9050e2b76a 100755 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -47,7 +47,7 @@ void FleeingMovementGenerator<T>::_setTargetLocation(T &owner) owner.AddUnitState(UNIT_STATE_FLEEING_MOVE); Movement::MoveSplineInit init(owner); - init.MoveTo(x,y,z); + init.MoveTo(x, y, z); init.SetWalk(false); init.Launch(); } @@ -153,9 +153,9 @@ bool FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float Trinity::NormalizeMapCoord(temp_y); if (owner.IsWithinLOS(temp_x, temp_y, z)) { - bool is_water_now = _map->IsInWater(x,y,z); + bool is_water_now = _map->IsInWater(x, y, z); - if (is_water_now && _map->IsInWater(temp_x,temp_y,z)) + if (is_water_now && _map->IsInWater(temp_x, temp_y, z)) { x = temp_x; y = temp_y; @@ -173,8 +173,8 @@ bool FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float if (!(new_z - z) || distance / fabs(new_z - z) > 1.0f) { - float new_z_left = _map->GetHeight(owner.GetPhaseMask(), temp_x + 1.0f* std::cos(angle+static_cast<float>(M_PI/2)),temp_y + 1.0f* std::sin(angle+static_cast<float>(M_PI/2)),z,true); - float new_z_right = _map->GetHeight(owner.GetPhaseMask(), temp_x + 1.0f* std::cos(angle-static_cast<float>(M_PI/2)),temp_y + 1.0f* std::sin(angle-static_cast<float>(M_PI/2)),z,true); + float new_z_left = _map->GetHeight(owner.GetPhaseMask(), temp_x + 1.0f * std::cos(angle+static_cast<float>(M_PI/2)), temp_y + 1.0f * std::sin(angle+static_cast<float>(M_PI/2)), z, true); + float new_z_right = _map->GetHeight(owner.GetPhaseMask(), temp_x + 1.0f * std::cos(angle-static_cast<float>(M_PI/2)), temp_y + 1.0f * std::sin(angle-static_cast<float>(M_PI/2)), z, true); if (fabs(new_z_left - new_z) < 1.2f && fabs(new_z_right - new_z) < 1.2f) { x = temp_x; @@ -186,7 +186,7 @@ bool FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float } } i_to_distance_from_caster = 0.0f; - i_nextCheckTime.Reset(urand(500,1000)); + i_nextCheckTime.Reset(urand(500, 1000)); return false; } @@ -209,7 +209,7 @@ bool FleeingMovementGenerator<T>::_setMoveData(T &owner) { // we are very far or too close, stopping i_to_distance_from_caster = 0.0f; - i_nextCheckTime.Reset(urand(500,1000)); + i_nextCheckTime.Reset(urand(500, 1000)); return false; } else @@ -293,7 +293,7 @@ void FleeingMovementGenerator<T>::DoInitialize(T &owner) _Init(owner); - if (Unit *fright = ObjectAccessor::GetUnit(owner, i_frightGUID)) + if (Unit* fright = ObjectAccessor::GetUnit(owner, i_frightGUID)) { i_caster_x = fright->GetPositionX(); i_caster_y = fright->GetPositionY(); diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp index 358362c9c15..4f0a620c303 100644 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp @@ -40,12 +40,12 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature & owner) Movement::MoveSplineInit init(owner); float x, y, z, o; // at apply we can select more nice return points base at current movegen - //if (owner.GetMotionMaster()->empty() || !owner.GetMotionMaster()->top()->GetResetPosition(owner,x,y,z)) + //if (owner.GetMotionMaster()->empty() || !owner.GetMotionMaster()->top()->GetResetPosition(owner, x, y, z)) //{ owner.GetHomePosition(x, y, z, o); init.SetFacing(o); //} - init.MoveTo(x,y,z); + init.MoveTo(x, y, z); init.SetWalk(false); init.Launch(); diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp index 59c41d841f2..68f62d28899 100644 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp @@ -129,7 +129,7 @@ void EffectMovementGenerator::Finalize(Unit &unit) // Need restore previous movement since we have no proper states system //if (unit.isAlive() && !unit.HasUnitState(UNIT_STATE_CONFUSED|UNIT_STATE_FLEEING)) //{ - // if (Unit * victim = unit.getVictim()) + // if (Unit* victim = unit.getVictim()) // unit.GetMotionMaster()->MoveChase(victim); // else // unit.GetMotionMaster()->Initialize(); diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index f733fa3331c..06521fadb3a 100644 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -165,8 +165,8 @@ bool RandomMovementGenerator<Creature>::GetResetPosition(Creature &creature, flo creature.GetRespawnPosition(x, y, z, NULL, &radius); // use current if in range - if (creature.IsWithinDist2d(x,y,radius)) - creature.GetPosition(x,y,z); + if (creature.IsWithinDist2d(x, y,radius)) + creature.GetPosition(x, y, z); return true; } diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index ebcb830cf61..a1ac4ccb679 100755 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -29,7 +29,7 @@ #include <cmath> template<class T, typename D> -void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner) +void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T &owner) { if (!i_target.isValid() || !i_target->IsInWorld()) return; @@ -41,7 +41,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner) //! Following block of code deleted by MrSmite in issue 4891 //! Code kept for learning and diagnostical purposes // -// if (i_offset && i_target->IsWithinDistInMap(&owner,2*i_offset)) +// if (i_offset && i_target->IsWithinDistInMap(&owner, 2*i_offset)) // { // if (!owner.movespline->Finalized()) // return; @@ -99,7 +99,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner) //We don't update Mob Movement, if the difference between New destination and last destination is < BothObjectSize float bothObjectSize = i_target->GetObjectBoundingRadius() + owner.GetObjectBoundingRadius() + CONTACT_DISTANCE; - if ( i_destinationHolder.HasDestination() && i_destinationHolder.GetDestinationDiff(x,y,z) < bothObjectSize ) + if ( i_destinationHolder.HasDestination() && i_destinationHolder.GetDestinationDiff(x, y,z) < bothObjectSize ) return; */ @@ -109,39 +109,39 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner) i_recalculateTravel = false; Movement::MoveSplineInit init(owner); - init.MoveTo(x,y,z); + init.MoveTo(x, y, z); init.SetWalk(((D*)this)->EnableWalking()); init.Launch(); } template<> -void TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::UpdateFinalDistance(float /*fDistance*/) +void TargetedMovementGeneratorMedium<Player, ChaseMovementGenerator<Player> >::UpdateFinalDistance(float /*fDistance*/) { // nothing to do for Player } template<> -void TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::UpdateFinalDistance(float /*fDistance*/) +void TargetedMovementGeneratorMedium<Player, FollowMovementGenerator<Player> >::UpdateFinalDistance(float /*fDistance*/) { // nothing to do for Player } template<> -void TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::UpdateFinalDistance(float fDistance) +void TargetedMovementGeneratorMedium<Creature, ChaseMovementGenerator<Creature> >::UpdateFinalDistance(float fDistance) { i_offset = fDistance; i_recalculateTravel = true; } template<> -void TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::UpdateFinalDistance(float fDistance) +void TargetedMovementGeneratorMedium<Creature, FollowMovementGenerator<Creature> >::UpdateFinalDistance(float fDistance) { i_offset = fDistance; i_recalculateTravel = true; } template<class T, typename D> -bool TargetedMovementGeneratorMedium<T,D>::DoUpdate(T &owner, uint32 time_diff) +bool TargetedMovementGeneratorMedium<T, D>::DoUpdate(T &owner, uint32 time_diff) { if (!i_target.isValid() || !i_target->IsInWorld()) return false; @@ -176,7 +176,7 @@ bool TargetedMovementGeneratorMedium<T,D>::DoUpdate(T &owner, uint32 time_diff) i_recheckDistance.Reset(50); //More distance let have better performance, less distance let have more sensitive reaction at target move. float allowed_dist = i_target->GetObjectSize() + owner.GetObjectSize() + MELEE_RANGE - 0.5f; - float dist = (owner.movespline->FinalDestination() - G3D::Vector3(i_target->GetPositionX(),i_target->GetPositionY(),i_target->GetPositionZ())).squaredLength(); + float dist = (owner.movespline->FinalDestination() - G3D::Vector3(i_target->GetPositionX(), i_target->GetPositionY(), i_target->GetPositionZ())).squaredLength(); if (dist >= allowed_dist * allowed_dist) _setTargetLocation(owner); } @@ -206,7 +206,7 @@ template<class T> void ChaseMovementGenerator<T>::_reachTarget(T &owner) { if (owner.IsWithinMeleeRange(this->i_target.getTarget())) - owner.Attack(this->i_target.getTarget(),true); + owner.Attack(this->i_target.getTarget(), true); } template<> @@ -275,9 +275,9 @@ void FollowMovementGenerator<Creature>::_updateSpeed(Creature &u) if (!((Creature&)u).isPet() || !i_target.isValid() || i_target->GetGUID() != u.GetOwnerGUID()) return; - u.UpdateSpeed(MOVE_RUN,true); - u.UpdateSpeed(MOVE_WALK,true); - u.UpdateSpeed(MOVE_SWIM,true); + u.UpdateSpeed(MOVE_RUN, true); + u.UpdateSpeed(MOVE_WALK, true); + u.UpdateSpeed(MOVE_SWIM, true); } template<> @@ -323,14 +323,14 @@ void FollowMovementGenerator<Creature>::MovementInform(Creature &unit) } //-----------------------------------------------// -template void TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::_setTargetLocation(Player &); -template void TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::_setTargetLocation(Player &); -template void TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::_setTargetLocation(Creature &); -template void TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::_setTargetLocation(Creature &); -template bool TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::DoUpdate(Player &, uint32); -template bool TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::DoUpdate(Player &, uint32); -template bool TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::DoUpdate(Creature &, uint32); -template bool TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::DoUpdate(Creature &, uint32); +template void TargetedMovementGeneratorMedium<Player, ChaseMovementGenerator<Player> >::_setTargetLocation(Player &); +template void TargetedMovementGeneratorMedium<Player, FollowMovementGenerator<Player> >::_setTargetLocation(Player &); +template void TargetedMovementGeneratorMedium<Creature, ChaseMovementGenerator<Creature> >::_setTargetLocation(Creature &); +template void TargetedMovementGeneratorMedium<Creature, FollowMovementGenerator<Creature> >::_setTargetLocation(Creature &); +template bool TargetedMovementGeneratorMedium<Player, ChaseMovementGenerator<Player> >::DoUpdate(Player &, uint32); +template bool TargetedMovementGeneratorMedium<Player, FollowMovementGenerator<Player> >::DoUpdate(Player &, uint32); +template bool TargetedMovementGeneratorMedium<Creature, ChaseMovementGenerator<Creature> >::DoUpdate(Creature &, uint32); +template bool TargetedMovementGeneratorMedium<Creature, FollowMovementGenerator<Creature> >::DoUpdate(Creature &, uint32); template void ChaseMovementGenerator<Player>::_reachTarget(Player &); template void ChaseMovementGenerator<Creature>::_reachTarget(Creature &); diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp index 1e96cd00fd3..f6b1c07a927 100644 --- a/src/server/game/Movement/Spline/MoveSpline.cpp +++ b/src/server/game/Movement/Spline/MoveSpline.cpp @@ -32,7 +32,7 @@ Location MoveSpline::ComputePosition() const ASSERT(Initialized()); float u = 1.f; - int32 seg_time = spline.length(point_Idx,point_Idx+1); + int32 seg_time = spline.length(point_Idx, point_Idx+1); if (seg_time > 0) u = (time_passed - spline.length(point_Idx)) / (float)seg_time; Location c; @@ -103,7 +103,7 @@ struct FallInitializer float start_elevation; inline int32 operator()(Spline<int32>& s, int32 i) { - return Movement::computeFallTime(start_elevation - s.getPoint(i+1).z,false) * 1000.f; + return Movement::computeFallTime(start_elevation - s.getPoint(i+1).z, false) * 1000.f; } }; @@ -125,7 +125,7 @@ struct CommonInitializer void MoveSpline::init_spline(const MoveSplineInitArgs& args) { - const SplineBase::EvaluationMode modes[2] = {SplineBase::ModeLinear,SplineBase::ModeCatmullrom}; + const SplineBase::EvaluationMode modes[2] = {SplineBase::ModeLinear, SplineBase::ModeCatmullrom}; if (args.flags.cyclic) { uint32 cyclic_point = 0; diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h index 46611e58447..8e51e2678dd 100644 --- a/src/server/game/Movement/Spline/MoveSpline.h +++ b/src/server/game/Movement/Spline/MoveSpline.h @@ -27,7 +27,7 @@ namespace Movement struct Location : public Vector3 { Location() : orientation(0) {} - Location(float x, float y, float z, float o) : Vector3(x,y,z), orientation(o) {} + Location(float x, float y, float z, float o) : Vector3(x, y, z), orientation(o) {} Location(const Vector3& v) : Vector3(v), orientation(0) {} Location(const Vector3& v, float o) : Vector3(v), orientation(o) {} @@ -101,14 +101,14 @@ namespace Movement ASSERT(Initialized()); do handler(_updateState(difftime)); - while(difftime > 0); + while (difftime > 0); } void updateState(int32 difftime) { ASSERT(Initialized()); do _updateState(difftime); - while(difftime > 0); + while (difftime > 0); } Location ComputePosition() const; diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h index f3f436c9d00..ec7eaf7e763 100644 --- a/src/server/game/Movement/Spline/MoveSplineFlag.h +++ b/src/server/game/Movement/Spline/MoveSplineFlag.h @@ -27,7 +27,7 @@ namespace Movement #if defined( __GNUC__ ) #pragma pack(1) #else -#pragma pack(push,1) +#pragma pack(push, 1) #endif class MoveSplineFlag diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp index b327d0d0cd6..32658d8fdc5 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.cpp +++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp @@ -118,7 +118,7 @@ namespace Movement } PacketBuilder::WriteMonsterMove(move_spline, data); - unit.SendMessageToSet(&data,true); + unit.SendMessageToSet(&data, true); } MoveSplineInit::MoveSplineInit(Unit& m) : unit(m) @@ -130,7 +130,7 @@ namespace Movement args.flags.flying = unit.m_movementInfo.HasMovementFlag((MovementFlags)(MOVEMENTFLAG_CAN_FLY|MOVEMENTFLAG_DISABLE_GRAVITY)); } - void MoveSplineInit::SetFacing(const Unit * target) + void MoveSplineInit::SetFacing(const Unit* target) { args.flags.EnableFacingTarget(); args.facing.target = target->GetGUID(); diff --git a/src/server/game/Movement/Spline/MoveSplineInit.h b/src/server/game/Movement/Spline/MoveSplineInit.h index 8ebac4aec06..2188c05f2f3 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.h +++ b/src/server/game/Movement/Spline/MoveSplineInit.h @@ -75,7 +75,7 @@ namespace Movement */ void SetFacing(float angle); void SetFacing(Vector3 const& point); - void SetFacing(const Unit * target); + void SetFacing(const Unit* target); /* Initializes movement by path * @param path - array of points, shouldn't be empty diff --git a/src/server/game/Movement/Spline/MoveSplineInitArgs.h b/src/server/game/Movement/Spline/MoveSplineInitArgs.h index 32045629c9f..4a086094c3f 100644 --- a/src/server/game/Movement/Spline/MoveSplineInitArgs.h +++ b/src/server/game/Movement/Spline/MoveSplineInitArgs.h @@ -31,7 +31,7 @@ namespace Movement union FacingInfo { struct{ - float x,y,z; + float x, y, z; }f; uint64 target; float angle; diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp index d747d6f69a6..7133fc50e9f 100644 --- a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp +++ b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp @@ -141,7 +141,7 @@ namespace Movement void PacketBuilder::WriteCreate(const MoveSpline& move_spline, ByteBuffer& data) { - //WriteClientStatus(mov,data); + //WriteClientStatus(mov, data); //data.append<float>(&mov.m_float_values[SpeedWalk], SpeedMaxCount); //if (mov.SplineEnabled()) { diff --git a/src/server/game/Movement/Spline/MovementUtil.cpp b/src/server/game/Movement/Spline/MovementUtil.cpp index b69d4b39e19..99413384dd8 100644 --- a/src/server/game/Movement/Spline/MovementUtil.cpp +++ b/src/server/game/Movement/Spline/MovementUtil.cpp @@ -103,39 +103,39 @@ namespace Movement char const* g_MovementFlag_names[] = { - STR(Forward ),// 0x00000001, - STR(Backward ),// 0x00000002, - STR(Strafe_Left ),// 0x00000004, - STR(Strafe_Right ),// 0x00000008, - STR(Turn_Left ),// 0x00000010, - STR(Turn_Right ),// 0x00000020, - STR(Pitch_Up ),// 0x00000040, - STR(Pitch_Down ),// 0x00000080, - - STR(Walk ),// 0x00000100, // Walking - STR(Ontransport ),// 0x00000200, - STR(Levitation ),// 0x00000400, - STR(Root ),// 0x00000800, - STR(Falling ),// 0x00001000, - STR(Fallingfar ),// 0x00002000, - STR(Pendingstop ),// 0x00004000, - STR(PendingSTRafestop ),// 0x00008000, - STR(Pendingforward ),// 0x00010000, - STR(Pendingbackward ),// 0x00020000, - STR(PendingSTRafeleft ),// 0x00040000, - STR(PendingSTRaferight ),// 0x00080000, - STR(Pendingroot ),// 0x00100000, - STR(Swimming ),// 0x00200000, // Appears With Fly Flag Also - STR(Ascending ),// 0x00400000, // Swim Up Also - STR(Descending ),// 0x00800000, // Swim Down Also - STR(Can_Fly ),// 0x01000000, // Can Fly In 3.3? - STR(Flying ),// 0x02000000, // Actual Flying Mode - STR(Spline_Elevation ),// 0x04000000, // Used For Flight Paths - STR(Spline_Enabled ),// 0x08000000, // Used For Flight Paths - STR(Waterwalking ),// 0x10000000, // Prevent Unit From Falling Through Water - STR(Safe_Fall ),// 0x20000000, // Active Rogue Safe Fall Spell (Passive) - STR(Hover ),// 0x40000000 - STR(Unknown13 ),// 0x80000000 + STR(Forward ), // 0x00000001, + STR(Backward ), // 0x00000002, + STR(Strafe_Left ), // 0x00000004, + STR(Strafe_Right ), // 0x00000008, + STR(Turn_Left ), // 0x00000010, + STR(Turn_Right ), // 0x00000020, + STR(Pitch_Up ), // 0x00000040, + STR(Pitch_Down ), // 0x00000080, + + STR(Walk ), // 0x00000100, // Walking + STR(Ontransport ), // 0x00000200, + STR(Levitation ), // 0x00000400, + STR(Root ), // 0x00000800, + STR(Falling ), // 0x00001000, + STR(Fallingfar ), // 0x00002000, + STR(Pendingstop ), // 0x00004000, + STR(PendingSTRafestop ), // 0x00008000, + STR(Pendingforward ), // 0x00010000, + STR(Pendingbackward ), // 0x00020000, + STR(PendingSTRafeleft ), // 0x00040000, + STR(PendingSTRaferight ), // 0x00080000, + STR(Pendingroot ), // 0x00100000, + STR(Swimming ), // 0x00200000, // Appears With Fly Flag Also + STR(Ascending ), // 0x00400000, // Swim Up Also + STR(Descending ), // 0x00800000, // Swim Down Also + STR(Can_Fly ), // 0x01000000, // Can Fly In 3.3? + STR(Flying ), // 0x02000000, // Actual Flying Mode + STR(Spline_Elevation ), // 0x04000000, // Used For Flight Paths + STR(Spline_Enabled ), // 0x08000000, // Used For Flight Paths + STR(Waterwalking ), // 0x10000000, // Prevent Unit From Falling Through Water + STR(Safe_Fall ), // 0x20000000, // Active Rogue Safe Fall Spell (Passive) + STR(Hover ), // 0x40000000 + STR(Unknown13 ), // 0x80000000 STR(Unk1 ), STR(Unk2 ), STR(Unk3 ), @@ -156,38 +156,38 @@ namespace Movement char const* g_SplineFlag_names[32] = { - STR(AnimBit1 ),// 0x00000001, - STR(AnimBit2 ),// 0x00000002, - STR(AnimBit3 ),// 0x00000004, - STR(AnimBit4 ),// 0x00000008, - STR(AnimBit5 ),// 0x00000010, - STR(AnimBit6 ),// 0x00000020, - STR(AnimBit7 ),// 0x00000040, - STR(AnimBit8 ),// 0x00000080, - STR(Done ),// 0x00000100, - STR(Falling ),// 0x00000200, // Not Compartible With Trajectory Movement - STR(No_Spline ),// 0x00000400, - STR(Trajectory ),// 0x00000800, // Not Compartible With Fall Movement - STR(Walkmode ),// 0x00001000, - STR(Flying ),// 0x00002000, // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation - STR(Knockback ),// 0x00004000, // Model Orientation Fixed - STR(Final_Point ),// 0x00008000, - STR(Final_Target ),// 0x00010000, - STR(Final_Angle ),// 0x00020000, - STR(Catmullrom ),// 0x00040000, // Used Catmullrom Interpolation Mode - STR(Cyclic ),// 0x00080000, // Movement By Cycled Spline - STR(Enter_Cycle ),// 0x00100000, // Everytime Appears With Cyclic Flag In Monster Move Packet - STR(Animation ),// 0x00200000, // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement - STR(Unknown4 ),// 0x00400000, // Disables Movement By Path - STR(Unknown5 ),// 0x00800000, - STR(Unknown6 ),// 0x01000000, - STR(Unknown7 ),// 0x02000000, - STR(Unknown8 ),// 0x04000000, - STR(OrientationInversed ),// 0x08000000, // Appears With Runmode Flag, Nodes ),// 1, Handles Orientation - STR(Unknown10 ),// 0x10000000, - STR(Unknown11 ),// 0x20000000, - STR(Unknown12 ),// 0x40000000, - STR(Unknown13 ),// 0x80000000, + STR(AnimBit1 ), // 0x00000001, + STR(AnimBit2 ), // 0x00000002, + STR(AnimBit3 ), // 0x00000004, + STR(AnimBit4 ), // 0x00000008, + STR(AnimBit5 ), // 0x00000010, + STR(AnimBit6 ), // 0x00000020, + STR(AnimBit7 ), // 0x00000040, + STR(AnimBit8 ), // 0x00000080, + STR(Done ), // 0x00000100, + STR(Falling ), // 0x00000200, // Not Compartible With Trajectory Movement + STR(No_Spline ), // 0x00000400, + STR(Trajectory ), // 0x00000800, // Not Compartible With Fall Movement + STR(Walkmode ), // 0x00001000, + STR(Flying ), // 0x00002000, // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation + STR(Knockback ), // 0x00004000, // Model Orientation Fixed + STR(Final_Point ), // 0x00008000, + STR(Final_Target ), // 0x00010000, + STR(Final_Angle ), // 0x00020000, + STR(Catmullrom ), // 0x00040000, // Used Catmullrom Interpolation Mode + STR(Cyclic ), // 0x00080000, // Movement By Cycled Spline + STR(Enter_Cycle ), // 0x00100000, // Everytime Appears With Cyclic Flag In Monster Move Packet + STR(Animation ), // 0x00200000, // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement + STR(Unknown4 ), // 0x00400000, // Disables Movement By Path + STR(Unknown5 ), // 0x00800000, + STR(Unknown6 ), // 0x01000000, + STR(Unknown7 ), // 0x02000000, + STR(Unknown8 ), // 0x04000000, + STR(OrientationInversed ), // 0x08000000, // Appears With Runmode Flag, Nodes ), // 1, Handles Orientation + STR(Unknown10 ), // 0x10000000, + STR(Unknown11 ), // 0x20000000, + STR(Unknown12 ), // 0x40000000, + STR(Unknown13 ), // 0x80000000, }; template<class Flags, int N> diff --git a/src/server/game/Movement/Spline/Spline.cpp b/src/server/game/Movement/Spline/Spline.cpp index 6970acf5415..887541e2289 100644 --- a/src/server/game/Movement/Spline/Spline.cpp +++ b/src/server/game/Movement/Spline/Spline.cpp @@ -59,7 +59,7 @@ SplineBase::InitMethtod SplineBase::initializers[SplineBase::ModesEnd] = using G3D::Matrix4; static const Matrix4 s_catmullRomCoeffs( - -0.5f, 1.5f,-1.5f, 0.5f, + -0.5f, 1.5f, -1.5f, 0.5f, 1.f, -2.5f, 2.f, -0.5f, -0.5f, 0.f, 0.5f, 0.f, 0.f, 1.f, 0.f, 0.f); @@ -222,7 +222,7 @@ void SplineBase::InitLinear(const Vector3* controls, index_type count, bool cycl points.resize(real_size); - memcpy(&points[0],controls, sizeof(Vector3) * count); + memcpy(&points[0], controls, sizeof(Vector3) * count); // first and last two indexes are space for special 'virtual points' // these points are required for proper C_Evaluate and C_Evaluate_Derivative methtod work @@ -244,7 +244,7 @@ void SplineBase::InitCatmullRom(const Vector3* controls, index_type count, bool int lo_index = 1; int high_index = lo_index + count - 1; - memcpy(&points[lo_index],controls, sizeof(Vector3) * count); + memcpy(&points[lo_index], controls, sizeof(Vector3) * count); // first and last two indexes are space for special 'virtual points' // these points are required for proper C_Evaluate and C_Evaluate_Derivative methtod work @@ -274,7 +274,7 @@ void SplineBase::InitBezier3(const Vector3* controls, index_type count, bool /*c index_type t = c / 3u; points.resize(c); - memcpy(&points[0],controls, sizeof(Vector3) * c); + memcpy(&points[0], controls, sizeof(Vector3) * c); index_lo = 0; index_hi = t-1; diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h index 63e61b84579..2a2f3fa8f43 100644 --- a/src/server/game/Movement/Spline/Spline.h +++ b/src/server/game/Movement/Spline/Spline.h @@ -61,7 +61,7 @@ protected: void EvaluateLinear(index_type, float, Vector3&) const; void EvaluateCatmullRom(index_type, float, Vector3&) const; void EvaluateBezier3(index_type, float, Vector3&) const; - typedef void (SplineBase::*EvaluationMethtod)(index_type,float,Vector3&) const; + typedef void (SplineBase::*EvaluationMethtod)(index_type, float, Vector3&) const; static EvaluationMethtod evaluators[ModesEnd]; void EvaluateDerivativeLinear(index_type, float, Vector3&) const; @@ -91,13 +91,13 @@ public: @param t - percent of segment length, assumes that t in range [0, 1] @param Idx - spline segment index, should be in range [first, last) */ - void evaluate_percent(index_type Idx, float u, Vector3& c) const {(this->*evaluators[m_mode])(Idx,u,c);} + void evaluate_percent(index_type Idx, float u, Vector3& c) const {(this->*evaluators[m_mode])(Idx, u,c);} /** Caclulates derivation in index Idx, and percent of segment length t @param Idx - spline segment index, should be in range [first, last) @param t - percent of spline segment length, assumes that t in range [0, 1] */ - void evaluate_derivative(index_type Idx, float u, Vector3& hermite) const {(this->*derivative_evaluators[m_mode])(Idx,u,hermite);} + void evaluate_derivative(index_type Idx, float u, Vector3& hermite) const {(this->*derivative_evaluators[m_mode])(Idx, u,hermite);} /** Bounds for spline indexes. All indexes should be in range [first, last). */ index_type first() const { return index_lo;} @@ -119,7 +119,7 @@ public: would be no harm to have some custom initializers. */ template<class Init> inline void init_spline(Init& initializer) { - initializer(m_mode,cyclic,points,index_lo,index_hi); + initializer(m_mode, cyclic, points, index_lo, index_hi); } void clear(); @@ -156,20 +156,20 @@ public: /** Calculates the position for given segment Idx, and percent of segment length t @param t = partial_segment_length / whole_segment_length @param Idx - spline segment index, should be in range [first, last). */ - void evaluate_percent(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_percent(Idx,u,c);} + void evaluate_percent(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_percent(Idx, u,c);} /** Caclulates derivation for index Idx, and percent of segment length t @param Idx - spline segment index, should be in range [first, last) @param t - percent of spline segment length, assumes that t in range [0, 1]. */ - void evaluate_derivative(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_derivative(Idx,u,c);} + void evaluate_derivative(index_type Idx, float u, Vector3& c) const { SplineBase::evaluate_derivative(Idx, u,c);} // Assumes that t in range [0, 1] index_type computeIndexInBounds(float t) const; void computeIndex(float t, index_type& out_idx, float& out_u) const; /** Initializes spline. Don't call other methods while spline not initialized. */ - void init_spline(const Vector3 * controls, index_type count, EvaluationMode m) { SplineBase::init_spline(controls,count,m);} - void init_cyclic_spline(const Vector3 * controls, index_type count, EvaluationMode m, index_type cyclic_point) { SplineBase::init_cyclic_spline(controls,count,m,cyclic_point);} + void init_spline(const Vector3 * controls, index_type count, EvaluationMode m) { SplineBase::init_spline(controls, count, m);} + void init_cyclic_spline(const Vector3 * controls, index_type count, EvaluationMode m, index_type cyclic_point) { SplineBase::init_cyclic_spline(controls, count, m,cyclic_point);} /** Initializes lengths with SplineBase::SegLength method. */ void initLengths(); @@ -181,7 +181,7 @@ public: index_type i = index_lo; lengths.resize(index_hi+1); length_type prev_length = 0, new_length = 0; - while(i < index_hi) + while (i < index_hi) { new_length = cacher(*this, i); lengths[++i] = new_length; diff --git a/src/server/game/Movement/Spline/SplineImpl.h b/src/server/game/Movement/Spline/SplineImpl.h index eded2d8c903..98f3f5fe079 100644 --- a/src/server/game/Movement/Spline/SplineImpl.h +++ b/src/server/game/Movement/Spline/SplineImpl.h @@ -81,7 +81,7 @@ template<typename length_type> void Spline<length_type>::initLengths() index_type i = index_lo; length_type length = 0; lengths.resize(index_hi+1); - while(i < index_hi ) + while (i < index_hi) { length += SegLength(i); lengths[++i] = length; diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index bb7dea76461..93bf7edc7d5 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -392,7 +392,7 @@ void OutdoorPvP::SendUpdateWorldState(uint32 field, uint32 value) if (m_sendUpdate) for (int i = 0; i < 2; ++i) for (PlayerSet::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr) - if (Player * const player = ObjectAccessor::FindPlayer(*itr)) + if (Player* const player = ObjectAccessor::FindPlayer(*itr)) player->SendUpdateWorldState(field, value); } @@ -402,7 +402,7 @@ void OPvPCapturePoint::SendUpdateWorldState(uint32 field, uint32 value) { // send to all players present in the area for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr) - if (Player * const player = ObjectAccessor::FindPlayer(*itr)) + if (Player* const player = ObjectAccessor::FindPlayer(*itr)) player->SendUpdateWorldState(field, value); } } @@ -424,7 +424,7 @@ void OPvPCapturePoint::SendObjectiveComplete(uint32 id, uint64 guid) // send to all players present in the area for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr) - if (Player * const player = ObjectAccessor::FindPlayer(*itr)) + if (Player* const player = ObjectAccessor::FindPlayer(*itr)) player->KilledMonsterCredit(id, guid); } @@ -563,7 +563,7 @@ void OutdoorPvP::BroadcastPacket(WorldPacket &data) const // This is faster than sWorld->SendZoneMessage for (uint32 team = 0; team < 2; ++team) for (PlayerSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) - if (Player * const player = ObjectAccessor::FindPlayer(*itr)) + if (Player* const player = ObjectAccessor::FindPlayer(*itr)) player->GetSession()->SendPacket(&data); } @@ -583,13 +583,13 @@ void OutdoorPvP::TeamCastSpell(TeamId team, int32 spellId) if (spellId > 0) { for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) - if (Player * const player = ObjectAccessor::FindPlayer(*itr)) + if (Player* const player = ObjectAccessor::FindPlayer(*itr)) player->CastSpell(player, (uint32)spellId, true); } else { for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) - if (Player * const player = ObjectAccessor::FindPlayer(*itr)) + if (Player* const player = ObjectAccessor::FindPlayer(*itr)) player->RemoveAura((uint32)-spellId); // by stack? } } diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h index 5f1607843fb..1e23f87a52e 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.h +++ b/src/server/game/OutdoorPvP/OutdoorPvP.h @@ -285,7 +285,7 @@ class OutdoorPvP : public ZoneScript void RegisterZone(uint32 zoneid); - bool HasPlayer(Player const * player) const; + bool HasPlayer(Player const* player) const; void TeamCastSpell(TeamId team, int32 spellId); }; diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index 6cd6a72a06a..7cee754bba7 100644 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -476,7 +476,7 @@ void Map::ScriptsProcess() // Source or target must be Creature. if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script)) { - Unit * unit = (Unit*)cSource; + Unit* unit = (Unit*)cSource; if (step.script->MoveTo.TravelTime != 0) { float speed = unit->GetDistance(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ) / ((float)step.script->MoveTo.TravelTime * 0.001f); diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 484a382c988..990963b8c4d 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -815,7 +815,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi) if (mi->HasMovementFlag(MOVEMENTFLAG_SPLINE_ELEVATION)) data >> mi->splineElevation; - //! Anti-cheat checks. Please keep them in seperate if() blocks to maintain a clear overview. + //! Anti-cheat checks. Please keep them in seperate if () blocks to maintain a clear overview. //! Might be subject to latency, so just remove improper flags. #ifdef TRINITY_DEBUG #define REMOVE_VIOLATING_FLAGS(check, maskToRemove) \ diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 12551c93346..3b5c6131c5a 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5077,13 +5077,13 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool switch (GetId()) { case 59628: //Tricks of the trade buff on rogue (6sec duration) - target->SetReducedThreatPercent(0,0); + target->SetReducedThreatPercent(0, 0); break; case 57934: //Tricks of the trade buff on rogue (30sec duration) if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE || !caster->GetMisdirectionTarget()) - target->SetReducedThreatPercent(0,0); + target->SetReducedThreatPercent(0, 0); else - target->SetReducedThreatPercent(0,caster->GetMisdirectionTarget()->GetGUID()); + target->SetReducedThreatPercent(0, caster->GetMisdirectionTarget()->GetGUID()); break; } default: diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index b33546ee988..24a83c7990c 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1350,7 +1350,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b if (removeMode == AURA_REMOVE_BY_ENEMY_SPELL && GetSpellInfo()->SpellFamilyFlags[1] & 0x1) { // Shattered Barrier - if (AuraEffect * dummy = caster->GetDummyAuraEffect(SPELLFAMILY_MAGE, 2945, 0)) + if (AuraEffect* dummy = caster->GetDummyAuraEffect(SPELLFAMILY_MAGE, 2945, 0)) if (roll_chance_i(dummy->GetSpellInfo()->ProcChance)) caster->CastSpell(target, 55080, true, NULL, GetEffect(0)); } diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index af6ed55ed58..9bb3eaa31f1 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1880,7 +1880,7 @@ void Spell::SearchTargets(SEARCHER& searcher, uint32 containerMask, Unit* refere bool searchInWorld = containerMask & (GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER | GRID_MAP_TYPE_MASK_CORPSE); if (searchInGrid || searchInWorld) { - float x,y; + float x, y; x = pos->GetPositionX(); y = pos->GetPositionY(); @@ -1898,7 +1898,7 @@ void Spell::SearchTargets(SEARCHER& searcher, uint32 containerMask, Unit* refere if (searchInGrid) { TypeContainerVisitor<SEARCHER, GridTypeMapContainer > grid_object_notifier(searcher); - cell.Visit(p, grid_object_notifier, map, radius, x , y); + cell.Visit(p, grid_object_notifier, map, radius, x, y); } } } @@ -2591,7 +2591,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA debuff_resist_chance += unit->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, int32(m_spellInfo->Dispel)); if (debuff_resist_chance > 0) - if (irand(0,10000) <= (debuff_resist_chance * 100)) + if (irand(0, 10000) <= (debuff_resist_chance * 100)) { effectMask &= ~(1 << effectNumber); returnVal = SPELL_MISS_RESIST; diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 4e4698eb01b..1dddb08be0b 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3283,7 +3283,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex) } if (m_spellInfo->SpellFamilyFlags[0] & 0x8000000) // Mocking Blow { - if (unitTarget->IsImmunedToSpellEffect(m_spellInfo,EFFECT_1) || unitTarget->GetTypeId() == TYPEID_PLAYER) + if (unitTarget->IsImmunedToSpellEffect(m_spellInfo, EFFECT_1) || unitTarget->GetTypeId() == TYPEID_PLAYER) { m_damage = 0; return; diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index afbf85a0a13..0c298efd83e 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -232,7 +232,7 @@ SpellImplicitTargetInfo::StaticData SpellImplicitTargetInfo::_data[TOTAL_SPELL_ {TARGET_OBJECT_TYPE_GOBJ, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 23 TARGET_GAMEOBJECT_TARGET {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_CHECK_ENEMY, TARGET_DIR_FRONT}, // 24 TARGET_UNIT_CONE_ENEMY_24 {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 25 TARGET_UNIT_TARGET_ANY - {TARGET_OBJECT_TYPE_GOBJ_ITEM, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 26 TARGET_GAMEOBJECT_ITEM_TARGET + {TARGET_OBJECT_TYPE_GOBJ_ITEM, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 26 TARGET_GAMEOBJECT_ITEM_TARGET {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 27 TARGET_UNIT_MASTER {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 28 TARGET_DEST_DYNOBJ_ENEMY {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_ALLY, TARGET_DIR_NONE}, // 29 TARGET_DEST_DYNOBJ_ALLY @@ -267,7 +267,7 @@ SpellImplicitTargetInfo::StaticData SpellImplicitTargetInfo::_data[TOTAL_SPELL_ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_NEARBY, TARGET_CHECK_RAID, TARGET_DIR_NONE}, // 58 TARGET_UNIT_NEARBY_RAID {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_CHECK_ALLY, TARGET_DIR_FRONT}, // 59 TARGET_UNIT_CONE_ALLY {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_CONE, TARGET_CHECK_ENTRY, TARGET_DIR_FRONT}, // 60 TARGET_UNIT_CONE_ENTRY - {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_RAID_CLASS,TARGET_DIR_NONE}, // 61 TARGET_UNIT_TARGET_AREA_RAID_CLASS + {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_AREA, TARGET_CHECK_RAID_CLASS, TARGET_DIR_NONE}, // 61 TARGET_UNIT_TARGET_AREA_RAID_CLASS {TARGET_OBJECT_TYPE_NONE, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 62 TARGET_UNK_62 {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 63 TARGET_DEST_TARGET_ANY {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_FRONT}, // 64 TARGET_DEST_TARGET_FRONT @@ -299,9 +299,9 @@ SpellImplicitTargetInfo::StaticData SpellImplicitTargetInfo::_data[TOTAL_SPELL_ {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 90 TARGET_UNIT_TARGET_MINIPET {TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_DEST, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_RANDOM}, // 91 TARGET_DEST_DEST_RADIUS {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 92 TARGET_UNIT_SUMMONER - {TARGET_OBJECT_TYPE_CORPSE, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 93 TARGET_CORPSE_SRC_AREA_ENEMY + {TARGET_OBJECT_TYPE_CORPSE, TARGET_REFERENCE_TYPE_SRC, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_ENEMY, TARGET_DIR_NONE}, // 93 TARGET_CORPSE_SRC_AREA_ENEMY {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 94 TARGET_UNIT_VEHICLE - {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_PASSENGER, TARGET_DIR_NONE}, // 95 TARGET_UNIT_TARGET_PASSENGER + {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_TARGET, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_PASSENGER, TARGET_DIR_NONE}, // 95 TARGET_UNIT_TARGET_PASSENGER {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 96 TARGET_UNIT_PASSENGER_0 {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 97 TARGET_UNIT_PASSENGER_1 {TARGET_OBJECT_TYPE_UNIT, TARGET_REFERENCE_TYPE_CASTER, TARGET_SELECT_CATEGORY_DEFAULT, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 98 TARGET_UNIT_PASSENGER_2 diff --git a/src/server/game/Warden/Warden.h b/src/server/game/Warden/Warden.h index 7a61f3d5723..b9470b0c8a7 100644 --- a/src/server/game/Warden/Warden.h +++ b/src/server/game/Warden/Warden.h @@ -40,7 +40,7 @@ enum WardenOpcodes WARDEN_SMSG_MODULE_CACHE = 1, WARDEN_SMSG_CHEAT_CHECKS_REQUEST = 2, WARDEN_SMSG_MODULE_INITIALIZE = 3, - WARDEN_SMSG_MEM_CHECKS_REQUEST = 4, // byte len; while(!EOF) { byte unk(1); byte index(++); string module(can be 0); int offset; byte len; byte[] bytes_to_compare[len]; } + WARDEN_SMSG_MEM_CHECKS_REQUEST = 4, // byte len; while (!EOF) { byte unk(1); byte index(++); string module(can be 0); int offset; byte len; byte[] bytes_to_compare[len]; } WARDEN_SMSG_HASH_REQUEST = 5 }; @@ -60,7 +60,7 @@ enum WardenCheckType #if defined(__GNUC__) #pragma pack(1) #else -#pragma pack(push,1) +#pragma pack(push, 1) #endif struct WardenModuleUse diff --git a/src/server/game/Warden/WardenMac.cpp b/src/server/game/Warden/WardenMac.cpp index d1df94d7f07..7c2979e0dc6 100644 --- a/src/server/game/Warden/WardenMac.cpp +++ b/src/server/game/Warden/WardenMac.cpp @@ -38,7 +38,7 @@ WardenMac::~WardenMac() { } -void WardenMac::Init(WorldSession *pClient, BigNumber *K) +void WardenMac::Init(WorldSession* pClient, BigNumber* K) { _session = pClient; // Generate Warden Key diff --git a/src/server/game/Warden/WardenWin.cpp b/src/server/game/Warden/WardenWin.cpp index bff12280d89..4da05eded0c 100644 --- a/src/server/game/Warden/WardenWin.cpp +++ b/src/server/game/Warden/WardenWin.cpp @@ -42,7 +42,7 @@ WardenWin::~WardenWin() { } -void WardenWin::Init(WorldSession* session, BigNumber *k) +void WardenWin::Init(WorldSession* session, BigNumber* k) { _session = session; // Generate Warden Key @@ -368,7 +368,7 @@ void WardenWin::HandleData(ByteBuffer &buff) sLog->outDebug(LOG_FILTER_WARDEN, "Ticks diff %u", ourTicks - newClientTicks); } - WardenCheckResult *rs; + WardenCheckResult* rs; WardenCheck *rd; uint8 type; uint16 checkFailed = 0; diff --git a/src/server/game/Warden/WardenWin.h b/src/server/game/Warden/WardenWin.h index 102a64c6895..1b1cc6746f4 100644 --- a/src/server/game/Warden/WardenWin.h +++ b/src/server/game/Warden/WardenWin.h @@ -28,7 +28,7 @@ #if defined(__GNUC__) #pragma pack(1) #else -#pragma pack(push,1) +#pragma pack(push, 1) #endif struct WardenInitModuleRequest diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index d232920418d..068bca2692f 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -2889,7 +2889,7 @@ void World::ResetMonthlyQuests() void World::ResetEventSeasonalQuests(uint16 event_id) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_SEASONAL); - stmt->setUInt16(0,event_id); + stmt->setUInt16(0, event_id); CharacterDatabase.Execute(stmt); for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr) diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 030bc136333..400e35b705b 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -1120,13 +1120,13 @@ public: if (isInt32) { uint32 value = (uint32)atoi(y); - target->SetUInt32Value(opcode , value); + target->SetUInt32Value(opcode, value); handler->PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), opcode, value); } else { float value = (float)atof(y); - target->SetFloatValue(opcode , value); + target->SetFloatValue(opcode, value); handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), opcode, value); } @@ -1328,7 +1328,7 @@ public: { Player* player = handler->GetSession()->GetPlayer(); - sLog->outInfo(LOG_FILTER_SQL_DEV, "(@PATH, XX, %.3f, %.3f, %.5f, 0,0, 0,100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); + sLog->outInfo(LOG_FILTER_SQL_DEV, "(@PATH, XX, %.3f, %.3f, %.5f, 0, 0, 0, 100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); handler->PSendSysMessage("Waypoint SQL written to SQL Developer log"); return true; diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index a8748bc1adf..e10cf883518 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -80,7 +80,7 @@ public: // check item starting quest (it can work incorrectly if added without item in inventory) ItemTemplateContainer const* itc = sObjectMgr->GetItemTemplateStore(); - ItemTemplateContainer::const_iterator result = find_if(itc->begin(), itc->end(), Finder<uint32, ItemTemplate>(entry, &ItemTemplate::StartQuest)); + ItemTemplateContainer::const_iterator result = find_if (itc->begin(), itc->end(), Finder<uint32, ItemTemplate>(entry, &ItemTemplate::StartQuest)); if (result != itc->end()) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 3a026d23faa..ae4b6197f4c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -603,7 +603,7 @@ public: void netherspite_infernal::netherspite_infernalAI::Cleanup() { - Creature *pMalchezaar = Unit::GetCreature(*me, malchezaar); + Creature* pMalchezaar = Unit::GetCreature(*me, malchezaar); if (pMalchezaar && pMalchezaar->isAlive()) CAST_AI(boss_malchezaar::boss_malchezaarAI, pMalchezaar->AI())->Cleanup(me, point); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp index 32ce484f715..27e057ce6aa 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp @@ -104,7 +104,7 @@ public: { me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_01); DoCast(player, SPELL_REVIVE, true); - Talk(WHISPER_REVIVE,player->GetGUID()); + Talk(WHISPER_REVIVE, player->GetGUID()); } FlyBackTimer = 5000; break; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp index b596ad3f609..5d164fbfafa 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp @@ -117,7 +117,7 @@ class boss_darkmaster_gandling : public CreatureScript case EVENT_SHADOW_PORTAL: if (HealthAbovePct(3)) { - DoCast(SelectTarget(SELECT_TARGET_RANDOM,0, 100, true),SPELL_SHADOW_PORTAL,true); + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_SHADOW_PORTAL, true); events.ScheduleEvent(EVENT_SHADOW_PORTAL, urand(17000, 27000)); } } @@ -172,7 +172,7 @@ class spell_shadow_portal : public SpellScriptLoader { if (attempts++ >= 6) break; - switch (urand(0,5)) + switch (urand(0, 5)) { case ROOM_HALL_OF_SECRETS: if (InstanceScript* instance = GetCaster()->GetInstanceScript()) @@ -223,7 +223,7 @@ class spell_shadow_portal : public SpellScriptLoader } }; -// Script for Shadow Portal spells 17863,17939,17943,17944,17946,17948 +// Script for Shadow Portal spells 17863, 17939, 17943, 17944, 17946, 17948 Position const SummonPos[18] = { // Hall of Secrects @@ -331,7 +331,7 @@ class spell_shadow_portal_rooms : public SpellScriptLoader if (Summoned) { Summoned->GetMotionMaster()->MoveRandom(5); - Summoned->AI()->SetData(0,phase_to_set); + Summoned->AI()->SetData(0, phase_to_set); } } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp index d09a5ae96c9..617dff17220 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp @@ -48,7 +48,7 @@ class boss_illucia_barov : public CreatureScript struct boss_illuciabarovAI : public BossAI { - boss_illuciabarovAI(Creature* creature) : BossAI(creature,DATA_LADYILLUCIABAROV) {} + boss_illuciabarovAI(Creature* creature) : BossAI(creature, DATA_LADYILLUCIABAROV) {} void EnterCombat(Unit* /*who*/) { @@ -78,7 +78,7 @@ class boss_illucia_barov : public CreatureScript events.ScheduleEvent(EVENT_CURSEOFAGONY, 30000); break; case EVENT_SHADOWSHOCK: - DoCast(SelectTarget(SELECT_TARGET_RANDOM,0, 100, true),SPELL_SHADOWSHOCK,true); + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_SHADOWSHOCK, true); events.ScheduleEvent(EVENT_SHADOWSHOCK, 12000); break; case EVENT_SILENCE: diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index 5036158cae2..e2c7287f178 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -91,7 +91,7 @@ class boss_instructor_malicia : public CreatureScript events.ScheduleEvent(EVENT_CALLOFGRAVES, 65000); break; case EVENT_CORRUPTION: - DoCast(SelectTarget(SELECT_TARGET_RANDOM,0, 100, true),SPELL_CORRUPTION,true); + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_CORRUPTION, true); events.ScheduleEvent(EVENT_CORRUPTION, 24000); break; case EVENT_RENEW: diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp index 32c16a1c70c..b0a2d48d053 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp @@ -152,7 +152,7 @@ class boss_kirtonos_the_herald : public CreatureScript switch (_introEvent) { case INTRO_1: - me->GetMotionMaster()->MovePath(KIRTONOS_PATH,false); + me->GetMotionMaster()->MovePath(KIRTONOS_PATH, false); _introEvent = 0; break; case INTRO_2: 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 e8fb4324d00..3a7aee0d6c6 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp @@ -74,7 +74,7 @@ class boss_lord_alexei_barov : public CreatureScript switch (eventId) { case EVENT_IMMOLATE: - DoCast(SelectTarget(SELECT_TARGET_RANDOM,0, 100, true),SPELL_IMMOLATE,true); + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_IMMOLATE, true); events.ScheduleEvent(EVENT_IMMOLATE, 12000); break; case EVENT_VEILOFSHADOW: diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 6e3f024ac1d..c186ada72b7 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -114,7 +114,7 @@ public: if (instance) { - if (Creature *temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS))) + if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS))) { if (temp->isDead()) temp->Respawn(); @@ -145,7 +145,7 @@ public: if (instance) { - Creature *temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS)); + Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS)); if (temp && temp->isAlive() && !temp->getVictim()) temp->AI()->AttackStart(who); } @@ -374,7 +374,7 @@ public: if (instance) { - if (Creature *temp = Unit::GetCreature((*me), instance->GetData64(DATA_SACROLASH))) + if (Creature* temp = Unit::GetCreature((*me), instance->GetData64(DATA_SACROLASH))) { if (temp->isDead()) temp->Respawn(); @@ -406,7 +406,7 @@ public: if (instance) { - Creature *temp = Unit::GetCreature(*me, instance->GetData64(DATA_SACROLASH)); + Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_SACROLASH)); if (temp && temp->isAlive() && !temp->getVictim()) temp->AI()->AttackStart(who); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index d575b7633cb..57699a34e17 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -122,7 +122,7 @@ public: return false; } - Player const * GetPlayerInMap() const + Player const* GetPlayerInMap() const { Map::PlayerList const& players = instance->GetPlayers(); diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index 22c4da74d44..81f64ce6de0 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -102,7 +102,7 @@ class boss_archaedas : public CreatureScript DoCast(minion, SPELL_AWAKEN_VAULT_WALKER, flag); minion->CastSpell(minion, SPELL_ARCHAEDAS_AWAKEN, true); minion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - minion->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE); + minion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); minion->setFaction(14); } } diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index ac26056c6e6..df87eaca5a8 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -205,7 +205,7 @@ class instance_uldaman : public InstanceMapScript continue; archaedas->CastSpell(target, SPELL_AWAKEN_VAULT_WALKER, true); target->CastSpell(target, SPELL_ARCHAEDAS_AWAKEN, true); - target->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE); + target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); target->setFaction(14); return; // only want the first one we find diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 59997ebaa31..44fa0f87177 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -314,7 +314,7 @@ class npc_harrison_jones : public CreatureScript me->SetEntry(NPC_HARRISON_JONES_2); me->SetDisplayId(MODEL_HARRISON_JONES_2); me->SetTarget(0); - me->SetByteValue(UNIT_FIELD_BYTES_1,0,UNIT_STAND_STATE_DEAD); + me->SetByteValue(UNIT_FIELD_BYTES_1, 0,UNIT_STAND_STATE_DEAD); me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); if (instance) instance->SetData(DATA_GONGEVENT, DONE); @@ -330,7 +330,7 @@ class npc_harrison_jones : public CreatureScript switch (_gongEvent) { case GONG_EVENT_1: - me->GetMotionMaster()->MovePath(HARRISON_MOVE_1,false); + me->GetMotionMaster()->MovePath(HARRISON_MOVE_1, false); _gongEvent = GONG_EVENT_2; _gongTimer = 12000; break; @@ -345,14 +345,14 @@ class npc_harrison_jones : public CreatureScript break; case GONG_EVENT_3: if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetData64(GO_STRANGE_GONG))) - gong->RemoveFlag(GAMEOBJECT_FLAGS,GO_FLAG_NOT_SELECTABLE); + gong->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); _gongEvent = GONG_EVENT_4; _gongTimer = 105000; break; case GONG_EVENT_4: me->RemoveAura(SPELL_BANGING_THE_GONG); if (GameObject* gong = me->GetMap()->GetGameObject(instance->GetData64(GO_STRANGE_GONG))) - gong->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_NOT_SELECTABLE); + gong->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); // trigger or gong will need to be scripted to set IN_PROGRESS after enough hits. // This is temp workaround. @@ -362,7 +362,7 @@ class npc_harrison_jones : public CreatureScript if (instance->GetData(DATA_GONGEVENT) == IN_PROGRESS) { // Players are Now Saved to instance at SPECIAL (Player should be notified?) - me->GetMotionMaster()->MovePath(HARRISON_MOVE_2,false); + me->GetMotionMaster()->MovePath(HARRISON_MOVE_2, false); _gongEvent = GONG_EVENT_5; _gongTimer = 5000; } @@ -401,12 +401,12 @@ class npc_harrison_jones : public CreatureScript ptarget->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_SPEAR)); ptarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); ptarget->SetReactState(REACT_PASSIVE); - ptarget->AI()->SetData(0,1); + ptarget->AI()->SetData(0, 1); } else ptarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); ptarget->SetReactState(REACT_PASSIVE); - ptarget->AI()->SetData(0,2); + ptarget->AI()->SetData(0, 2); } } } @@ -421,7 +421,7 @@ class npc_harrison_jones : public CreatureScript DoCast(me, SPELL_STEALTH); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(0)); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); - me->GetMotionMaster()->MovePath(HARRISON_MOVE_3,false); + me->GetMotionMaster()->MovePath(HARRISON_MOVE_3, false); _gongTimer = 1000; _gongEvent = 0; break; diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp index 26f83922f87..9d35b510f6e 100644 --- a/src/server/scripts/Events/childrens_week.cpp +++ b/src/server/scripts/Events/childrens_week.cpp @@ -189,10 +189,10 @@ class npc_winterfin_playmate : public CreatureScript return; } - switch(phase) + switch (phase) { case 1: - orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5,me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ()); + orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ()); orphan->AI()->Talk(TEXT_ORACLE_ORPHAN_1); timer = 3000; break; @@ -290,7 +290,7 @@ class npc_snowfall_glade_playmate : public CreatureScript switch (phase) { case 1: - orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5,me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ()); + orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ()); orphan->AI()->Talk(TEXT_WOLVAR_ORPHAN_1); timer = 5000; break; @@ -810,7 +810,7 @@ class npc_alexstraza_the_lifebinder : public CreatureScript timer = 5000; break; case 8: - if(Creature* krasus = me->FindNearestCreature(NPC_KRASUS, 10.0f)) + if (Creature* krasus = me->FindNearestCreature(NPC_KRASUS, 10.0f)) { orphan->SetFacingToObject(krasus); krasus->AI()->Talk(TEXT_KRASUS_8); @@ -974,7 +974,7 @@ class npc_cw_area_trigger : public CreatureScript if (Creature* samuro = me->FindNearestCreature(25151, 20.0f)) { uint32 emote = 0; - switch(urand(1,5)) + switch (urand(1, 5)) { case 1: emote = EMOTE_ONESHOT_WAVE; diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index 58665224bdd..a612269eff7 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -544,7 +544,7 @@ public: switch (AnimationCount) { case 0: - Talk(ANACHRONOS_SAY_1,Fandral->GetGUID()); + Talk(ANACHRONOS_SAY_1, Fandral->GetGUID()); break; case 1: Fandral->SetTarget(me->GetGUID()); diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp index 8f7ab09260b..b349de8f083 100644 --- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp +++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp @@ -146,7 +146,7 @@ public: Talk(SAY_GIL_FREEBOOTERS, player->GetGUID()); break; case 37: - Talk(SAY_GIL_ALMOST,player->GetGUID()); + Talk(SAY_GIL_ALMOST, player->GetGUID()); break; case 47: Talk(SAY_GIL_SWEET, player->GetGUID()); diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp index 02245c92efd..d484e2a4279 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp @@ -89,11 +89,11 @@ public: { _EnterCombat(); - events.ScheduleEvent(EVENT_ROOT, urand(5,9)*IN_MILLISECONDS); - events.ScheduleEvent(EVENT_BASH, urand(10,14)*IN_MILLISECONDS); - events.ScheduleEvent(EVENT_BOLT, urand(15,20)*IN_MILLISECONDS); - events.ScheduleEvent(EVENT_MINI, urand(12,18)*IN_MILLISECONDS); - events.ScheduleEvent(EVENT_SPAWN, 5 *IN_MILLISECONDS); + events.ScheduleEvent(EVENT_ROOT, urand(5, 9) * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_BASH, urand(10, 14) * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_BOLT, urand(15, 20) * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MINI, urand(12, 18) * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SPAWN, 5 * IN_MILLISECONDS); me->SetInCombatWithZone(); if (instance) @@ -123,7 +123,7 @@ public: { u = 1 - u; trigger->DisappearAndDie(); - me->SummonCreature(u > 0 ? NPC_POISONOUS_MUSHROOM : NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60*IN_MILLISECONDS); + me->SummonCreature(u > 0 ? NPC_POISONOUS_MUSHROOM : NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60 * IN_MILLISECONDS); } } } @@ -145,23 +145,23 @@ public: { case EVENT_SPAWN: SpawnAdds(); - events.ScheduleEvent(EVENT_SPAWN, 20*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SPAWN, 20 * IN_MILLISECONDS); break; case EVENT_MINI: DoCast(SPELL_MINI); - events.ScheduleEvent(EVENT_MINI, urand(25,30)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MINI, urand(25, 30) * IN_MILLISECONDS); break; case EVENT_ROOT: - DoCast(SelectTarget(SELECT_TARGET_RANDOM,0, 100, true),SPELL_ENTANGLING_ROOTS,true); - events.ScheduleEvent(EVENT_ROOT, urand(10,15)*IN_MILLISECONDS); + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_ENTANGLING_ROOTS, true); + events.ScheduleEvent(EVENT_ROOT, urand(10, 15) * IN_MILLISECONDS); break; case EVENT_BASH: DoCastVictim(SPELL_BASH); - events.ScheduleEvent(EVENT_BASH, urand(7,12)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_BASH, urand(7, 12) * IN_MILLISECONDS); break; case EVENT_BOLT: - DoCast(SelectTarget(SELECT_TARGET_RANDOM,0, 100, true),SPELL_VENOM_BOLT_VOLLEY,true); - events.ScheduleEvent(EVENT_BOLT, urand(18,22)*IN_MILLISECONDS); + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_VENOM_BOLT_VOLLEY, true); + events.ScheduleEvent(EVENT_BOLT, urand(18, 22) * IN_MILLISECONDS); break; default: break; @@ -191,7 +191,7 @@ public: void Reset() { events.Reset(); - events.ScheduleEvent(EVENT_AURA, 1*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_AURA, 1 * IN_MILLISECONDS); me->SetDisplayId(me->GetCreatureTemplate()->Modelid2); DoCast(SPELL_PUTRID_MUSHROOM); @@ -231,7 +231,7 @@ public: DoCast(me, SPELL_POISONOUS_MUSHROOM_VISUAL_AREA, true); DoCast(me, SPELL_POISONOUS_MUSHROOM_POISON_CLOUD); } - events.ScheduleEvent(EVENT_AURA, 7*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_AURA, 7 * IN_MILLISECONDS); break; default: break; @@ -250,4 +250,4 @@ void AddSC_boss_amanitar() { new boss_amanitar(); new mob_amanitar_mushrooms(); -}
\ No newline at end of file +} 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 cd583603734..ac668c33874 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp @@ -94,13 +94,13 @@ class boss_elder_nadox : public CreatureScript if (instance) instance->SetData(DATA_ELDER_NADOX_EVENT, IN_PROGRESS); - events.ScheduleEvent(EVENT_PLAGUE, 13*IN_MILLISECONDS); - events.ScheduleEvent(EVENT_SUMMON_SWARMER, 10*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_PLAGUE, 13 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SUMMON_SWARMER, 10 * IN_MILLISECONDS); if (IsHeroic()) { - events.ScheduleEvent(EVENT_RAGE, 12*IN_MILLISECONDS); - events.ScheduleEvent(EVENT_CHECK_ENRAGE, 5*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_RAGE, 12 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_CHECK_ENRAGE, 5 * IN_MILLISECONDS); } } @@ -151,25 +151,25 @@ class boss_elder_nadox : public CreatureScript switch (eventId) { case EVENT_PLAGUE: - DoCast(SelectTarget(SELECT_TARGET_RANDOM,0, 100, true),SPELL_BROOD_PLAGUE,true); - events.ScheduleEvent(EVENT_PLAGUE, 15*IN_MILLISECONDS); + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_BROOD_PLAGUE, true); + events.ScheduleEvent(EVENT_PLAGUE, 15 * IN_MILLISECONDS); break; case EVENT_RAGE: DoCast(H_SPELL_BROOD_RAGE); - events.ScheduleEvent(EVENT_RAGE, urand(10*IN_MILLISECONDS, 50*IN_MILLISECONDS)); + events.ScheduleEvent(EVENT_RAGE, urand(10 * IN_MILLISECONDS, 50 * IN_MILLISECONDS)); break; case EVENT_SUMMON_SWARMER: DoCast(me, SPELL_SUMMON_SWARMERS); if (urand(1, 3) == 3) // 33% chance of dialog Talk(SAY_EGG_SAC); - events.ScheduleEvent(EVENT_SUMMON_SWARMER, 10*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SUMMON_SWARMER, 10 * IN_MILLISECONDS); break; case EVENT_CHECK_ENRAGE: if (me->HasAura(SPELL_ENRAGE)) return; if (me->GetPositionZ() < 24.0f) DoCast(me, SPELL_ENRAGE, true); - events.ScheduleEvent(EVENT_CHECK_ENRAGE, 5*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_CHECK_ENRAGE, 5 * IN_MILLISECONDS); break; default: break; @@ -209,7 +209,7 @@ class mob_ahnkahar_nerubian : public CreatureScript if (me->GetEntry() == NPC_AHNKAHAR_GUARDIAN) DoCast(me, SPELL_GUARDIAN_AURA, true); - events.ScheduleEvent(EVENT_SPRINT, 13*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SPRINT, 13 * IN_MILLISECONDS); } void JustDied(Unit* /*killer*/) @@ -234,7 +234,7 @@ class mob_ahnkahar_nerubian : public CreatureScript { case EVENT_SPRINT: DoCast(me, SPELL_SPRINT); - events.ScheduleEvent(EVENT_SPRINT, 20*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SPRINT, 20 * IN_MILLISECONDS); break; } } 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 ac520968db8..82cff5ff01f 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -182,7 +182,7 @@ class boss_jaraxxus : public CreatureScript events.ScheduleEvent(EVENT_INCINERATE_FLESH, urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS)); return; case EVENT_NETHER_POWER: - me->CastCustomSpell(SPELL_NETHER_POWER, SPELLVALUE_AURA_STACK, RAID_MODE<uint32>(5, 10, 5,10), me, true); + me->CastCustomSpell(SPELL_NETHER_POWER, SPELLVALUE_AURA_STACK, RAID_MODE<uint32>(5, 10, 5, 10), me, true); events.ScheduleEvent(EVENT_NETHER_POWER, 40*IN_MILLISECONDS); return; case EVENT_LEGION_FLAME: diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h index 70fe03c5e0f..f42c985d3e5 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h @@ -136,8 +136,8 @@ const Position AnubarakLoc[]= const Position EndSpawnLoc[]= { {648.9167f, 131.0208f, 141.6161f, 0}, // 0 - Highlord Tirion Fordring - {649.1614f, 142.0399f, 141.3057f ,0}, // 1 - Argent Mage - {644.6250f, 149.2743f, 140.6015f ,0} // 2 - Portal to Dalaran + {649.1614f, 142.0399f, 141.3057f, 0}, // 1 - Argent Mage + {644.6250f, 149.2743f, 140.6015f, 0} // 2 - Portal to Dalaran }; enum euiWorldStates 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 caf38fd2418..b3781f89e06 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 @@ -109,7 +109,7 @@ struct outroPosition { { 0, 0 }, { 0.0f, 0.0f, 0.0f, 0.0f } } }; -Position const CrucibleSummonPos = {5672.294f,2520.686f, 713.4386f, 0.9599311f}; +Position const CrucibleSummonPos = {5672.294f, 2520.686f, 713.4386f, 0.9599311f}; #define DATA_THREE_FACED 1 diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp index 4acabc3b2b3..1b5f6e5d426 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp @@ -251,7 +251,7 @@ public: if (TempSummon* _me = me->ToTempSummon()) if (Creature* sladran = _me->GetSummoner()->ToCreature()) - sladran->AI()->SetGUID(target->GetGUID() ,DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES); + sladran->AI()->SetGUID(target->GetGUID(), DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES); me->DespawnOrUnsummon(); } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 35f703e0563..1b34e2a93a7 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -603,7 +603,7 @@ public: ThreatContainer::StorageType const &threatList = me->getThreatManager().getThreatList(); for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr) { - Unit * const target = (*itr)->getTarget(); + Unit* const target = (*itr)->getTarget(); if (target->GetTypeId() == TYPEID_PLAYER && target->getPowerType() == POWER_MANA diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 952363c6dcf..1be93dcbaa5 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -167,7 +167,7 @@ enum Texts #define MAX_HOVER_DISK_WAYPOINTS 18 -// Sniffed data (x, y,z) +// Sniffed data (x, y, z) const Position HoverDiskWaypoints[MAX_HOVER_DISK_WAYPOINTS] = { {782.9821f, 1296.652f, 282.1114f, 0.0f}, @@ -192,7 +192,7 @@ const Position HoverDiskWaypoints[MAX_HOVER_DISK_WAYPOINTS] = #define GROUND_Z 268 -// Source: Sniffs (x,y,z) +// Source: Sniffs (x, y, z) #define MALYGOS_MAX_WAYPOINTS 16 const Position MalygosPhaseTwoWaypoints[MALYGOS_MAX_WAYPOINTS] = { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 7934f6fba72..d3c174841ee 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -787,7 +787,7 @@ class instance_ulduar : public InstanceMapScript return 0; } - bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* , Unit const* /* = NULL */, uint32 /* = 0 */) + bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const*, Unit const* /* = NULL */, uint32 /* = 0 */) { switch (criteriaId) { diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index 1fd84b6f6ce..f579fb2b93c 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -124,10 +124,10 @@ public: events.Reset(); events.SetPhase(PHASE_HUMAN); - events.ScheduleEvent(EVENT_CLEAVE, urand(6,12)*IN_MILLISECONDS, 0, PHASE_HUMAN); - events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18,21)*IN_MILLISECONDS, 0, PHASE_HUMAN); - events.ScheduleEvent(EVENT_ENRAGE, urand(7,14)*IN_MILLISECONDS, 0, PHASE_HUMAN); - events.ScheduleEvent(EVENT_SMASH, urand(12,17)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_CLEAVE, urand(6, 12)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18, 21)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_ENRAGE, urand(7, 14)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_SMASH, urand(12, 17)*IN_MILLISECONDS, 0, PHASE_HUMAN); if (instance) instance->SetData(DATA_INGVAR_EVENT, NOT_STARTED); @@ -193,9 +193,9 @@ public: void ScheduleSecondPhase() { events.SetPhase(PHASE_UNDEAD); - events.ScheduleEvent(EVENT_DARK_SMASH, urand(14,18)*IN_MILLISECONDS, 0, PHASE_UNDEAD); - events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD); - events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10,14)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_DARK_SMASH, urand(14, 18)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18, 22)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10, 14)*IN_MILLISECONDS, 0, PHASE_UNDEAD); events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD); } @@ -221,19 +221,19 @@ public: // PHASE ONE case EVENT_CLEAVE: DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, urand(6,12)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_CLEAVE, urand(6, 12)*IN_MILLISECONDS, 0, PHASE_HUMAN); break; case EVENT_STAGGERING_ROAR: DoCast(me, SPELL_STAGGERING_ROAR); - events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18,22)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18, 22)*IN_MILLISECONDS, 0, PHASE_HUMAN); break; case EVENT_ENRAGE: DoCast(me, SPELL_ENRAGE); - events.ScheduleEvent(EVENT_ENRAGE, urand(7,14)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_ENRAGE, urand(7, 14)*IN_MILLISECONDS, 0, PHASE_HUMAN); break; case EVENT_SMASH: DoCastAOE(SPELL_SMASH); - events.ScheduleEvent(EVENT_SMASH, urand(12,16)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_SMASH, urand(12, 16)*IN_MILLISECONDS, 0, PHASE_HUMAN); break; case EVENT_JUST_TRANSFORMED: me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -247,15 +247,15 @@ public: // PHASE TWO case EVENT_DARK_SMASH: DoCastVictim(SPELL_DARK_SMASH); - events.ScheduleEvent(EVENT_DARK_SMASH, urand(12,16)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_DARK_SMASH, urand(12, 16)*IN_MILLISECONDS, 0, PHASE_UNDEAD); break; case EVENT_DREADFUL_ROAR: DoCast(me, SPELL_DREADFUL_ROAR); - events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18,22)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18, 22)*IN_MILLISECONDS, 0, PHASE_UNDEAD); break; case EVENT_WOE_STRIKE: DoCastVictim(SPELL_WOE_STRIKE); - events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10,14)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10, 14)*IN_MILLISECONDS, 0, PHASE_UNDEAD); break; case EVENT_SHADOW_AXE: if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1)) diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp index d709182bf04..6e532a88396 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp @@ -129,8 +129,8 @@ public: instance->SetData(DATA_PRINCEKELESETH_EVENT, NOT_STARTED); events.Reset(); - events.ScheduleEvent(EVENT_SHADOWBOLT, urand(2,3)*IN_MILLISECONDS); - events.ScheduleEvent(EVENT_FROST_TOMB, urand(14,19)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SHADOWBOLT, urand(2, 3)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_FROST_TOMB, urand(14, 19)*IN_MILLISECONDS); events.ScheduleEvent(EVENT_SUMMON_SKELETONS, 6*IN_MILLISECONDS); summons.DespawnAll(); @@ -213,7 +213,7 @@ public: break; case EVENT_SHADOWBOLT: DoCastVictim(SPELL_SHADOWBOLT); - events.ScheduleEvent(EVENT_SHADOWBOLT, urand(2,3)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SHADOWBOLT, urand(2, 3)*IN_MILLISECONDS); break; case EVENT_FROST_TOMB: if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true, -SPELL_FROST_TOMB)) @@ -225,7 +225,7 @@ public: // checked from sniffs - the player casts the spell target->CastSpell(target, SPELL_FROST_TOMB_SUMMON, true); } - events.ScheduleEvent(EVENT_FROST_TOMB, urand(14,19)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_FROST_TOMB, urand(14, 19)*IN_MILLISECONDS); break; } } @@ -261,7 +261,7 @@ public: void Reset() { events.Reset(); - events.ScheduleEvent(EVENT_DECREPIFY, urand(4,6)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_DECREPIFY, urand(4, 6)*IN_MILLISECONDS); } @@ -280,7 +280,7 @@ public: me->SetFlag(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD); events.Reset(); - events.ScheduleEvent(EVENT_RESURRECT, urand(18,22)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_RESURRECT, urand(18, 22)*IN_MILLISECONDS); me->GetMotionMaster()->MovementExpired(false); me->GetMotionMaster()->MoveIdle(); @@ -304,7 +304,7 @@ public: { case EVENT_DECREPIFY: DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_DECREPIFY), SPELL_DECREPIFY); - events.ScheduleEvent(EVENT_DECREPIFY, urand(1,5)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_DECREPIFY, urand(1, 5)*IN_MILLISECONDS); break; case EVENT_RESURRECT: events.ScheduleEvent(EVENT_FULL_HEAL, 1*IN_MILLISECONDS); @@ -325,7 +325,7 @@ public: me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->RemoveFlag(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD); me->GetMotionMaster()->MoveChase(me->getVictim()); - events.ScheduleEvent(EVENT_DECREPIFY, urand(4,6)*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_DECREPIFY, urand(4, 6)*IN_MILLISECONDS); break; } } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index 9468a111db5..dffdadc5b9c 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -101,8 +101,8 @@ enum SvalaPhase static const float spectatorWP[2][3] = { - {296.95f,-312.76f,86.36f}, - {297.69f,-275.81f,86.36f} + {296.95f, -312.76f, 86.36f}, + {297.69f, -275.81f, 86.36f} }; static Position ArthasPos = { 295.81f, -366.16f, 92.57f, 1.58f }; @@ -517,7 +517,7 @@ public: if (motionType == POINT_MOTION_TYPE) { if (pointId == 1) - me->GetMotionMaster()->MovePoint(2,spectatorWP[1][0],spectatorWP[1][1],spectatorWP[1][2]); + me->GetMotionMaster()->MovePoint(2, spectatorWP[1][0], spectatorWP[1][1], spectatorWP[1][2]); else if (pointId == 2) me->DespawnOrUnsummon(1000); } diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 2ec5a3e8164..098fa80a3d3 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -586,7 +586,7 @@ public: struct npc_blessed_bannerAI : public Scripted_NoMovementAI { - npc_blessed_bannerAI(Creature* creature) : Scripted_NoMovementAI(creature) , Summons(me) + npc_blessed_bannerAI(Creature* creature) : Scripted_NoMovementAI(creature), Summons(me) { HalofSpawned = false; PhaseCount = 0; @@ -611,7 +611,7 @@ public: me->setRegeneratingHealth(false); DoCast(SPELL_THREAT_PULSE); me->AI()->Talk(BANNER_SAY); - events.ScheduleEvent(EVENT_SPAWN,3000); + events.ScheduleEvent(EVENT_SPAWN, 3000); } void EnterCombat(Unit* /*who*/) {} @@ -672,167 +672,167 @@ public: guidMason[2] = Mason3->GetGUID(); Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[1]); } - events.ScheduleEvent(EVENT_INTRO_1,15000); + events.ScheduleEvent(EVENT_INTRO_1, 15000); } break; case EVENT_INTRO_1: { - if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + if (Creature* Dalfors = me->GetCreature(*me, guidDalfors)) Dalfors->AI()->Talk(DALFORS_SAY_PRE_1); - events.ScheduleEvent(EVENT_INTRO_2,5000); + events.ScheduleEvent(EVENT_INTRO_2, 5000); } break; case EVENT_INTRO_2: { - if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + if (Creature* Dalfors = me->GetCreature(*me, guidDalfors)) { Dalfors->SetFacingTo(6.215f); Dalfors->AI()->Talk(DALFORS_SAY_PRE_2); } - events.ScheduleEvent(EVENT_INTRO_3,5000); + events.ScheduleEvent(EVENT_INTRO_3, 5000); } break; case EVENT_INTRO_3: { - if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + if (Creature* Dalfors = me->GetCreature(*me, guidDalfors)) { Dalfors->GetMotionMaster()->MovePoint(0, DalforsPos[2]); Dalfors->SetHomePosition(DalforsPos[2]); } - if (Creature* Priest1 = me->GetCreature(*me,guidPriest[0])) + if (Creature* Priest1 = me->GetCreature(*me, guidPriest[0])) { Priest1->SetFacingTo(5.7421f); Priest1->SetHomePosition(Priest1Pos[1]); } - if (Creature* Priest2 = me->GetCreature(*me,guidPriest[1])) + if (Creature* Priest2 = me->GetCreature(*me, guidPriest[1])) { Priest2->SetFacingTo(5.7421f); Priest2->SetHomePosition(Priest2Pos[1]); } - if (Creature* Priest3 = me->GetCreature(*me,guidPriest[2])) + if (Creature* Priest3 = me->GetCreature(*me, guidPriest[2])) { Priest3->SetFacingTo(5.7421f); Priest3->SetHomePosition(Priest3Pos[1]); } - if (Creature* Mason1 = me->GetCreature(*me,guidMason[0])) + if (Creature* Mason1 = me->GetCreature(*me, guidMason[0])) { Mason1->GetMotionMaster()->MovePoint(0, Mason1Pos[2]); Mason1->SetHomePosition(Mason1Pos[2]); } - if (Creature* Mason2 = me->GetCreature(*me,guidMason[1])) + if (Creature* Mason2 = me->GetCreature(*me, guidMason[1])) { Mason2->GetMotionMaster()->MovePoint(0, Mason2Pos[2]); Mason2->SetHomePosition(Mason2Pos[2]); } - if (Creature* Mason3 = me->GetCreature(*me,guidMason[2])) + if (Creature* Mason3 = me->GetCreature(*me, guidMason[2])) { Mason3->GetMotionMaster()->MovePoint(0, Mason3Pos[2]); Mason3->SetHomePosition(Mason3Pos[2]); } - events.ScheduleEvent(EVENT_START_FIGHT,5000); - events.ScheduleEvent(EVENT_MASON_ACTION,15000); + events.ScheduleEvent(EVENT_START_FIGHT, 5000); + events.ScheduleEvent(EVENT_MASON_ACTION, 15000); } break; case EVENT_MASON_ACTION: { - if (Creature* Mason1 = me->GetCreature(*me,guidMason[0])) + if (Creature* Mason1 = me->GetCreature(*me, guidMason[0])) { Mason1->SetFacingTo(2.8972f); - Mason1->AI()->SetData(1,1); // triggers SAI actions on npc + Mason1->AI()->SetData(1, 1); // triggers SAI actions on npc } - if (Creature* Mason2 = me->GetCreature(*me,guidMason[1])) + if (Creature* Mason2 = me->GetCreature(*me, guidMason[1])) { Mason2->SetFacingTo(3.1241f); - Mason2->AI()->SetData(1,1); // triggers SAI actions on npc + Mason2->AI()->SetData(1, 1); // triggers SAI actions on npc } - if (Creature* Mason3 = me->GetCreature(*me,guidMason[2])) + if (Creature* Mason3 = me->GetCreature(*me, guidMason[2])) { Mason3->SetFacingTo(3.6651f); - Mason3->AI()->SetData(1,1); // triggers SAI actions on npc + Mason3->AI()->SetData(1, 1); // triggers SAI actions on npc } } break; case EVENT_START_FIGHT: { - if(Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100)) + if (Creature* LK = GetClosestCreatureWithEntry(me, NPC_LK, 100)) LK->AI()->Talk(LK_TALK_1); - if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + if (Creature* Dalfors = me->GetCreature(*me, guidDalfors)) Dalfors->AI()->Talk(DALFORS_SAY_START); - events.ScheduleEvent(EVENT_WAVE_SPAWN,1000); + events.ScheduleEvent(EVENT_WAVE_SPAWN, 1000); } break; case EVENT_WAVE_SPAWN: { if (PhaseCount == 3) { - if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100)) + if (Creature* LK = GetClosestCreatureWithEntry(me, NPC_LK, 100)) LK->AI()->Talk(LK_TALK_2); } else if (PhaseCount == 6) { - if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100)) + if (Creature* LK = GetClosestCreatureWithEntry(me, NPC_LK, 100)) LK->AI()->Talk(LK_TALK_3); } - if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason3Pos[0])) + if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason3Pos[0])) { tempsum->SetHomePosition(DalforsPos[2]); - tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100)); } - if (urand(0,1) == 0) + if (urand(0, 1) == 0) { - if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason1Pos[0])) + if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER, Mason1Pos[0])) { tempsum->SetHomePosition(DalforsPos[2]); - tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100)); } - if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER,Mason2Pos[0])) + if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER, Mason2Pos[0])) { tempsum->SetHomePosition(DalforsPos[2]); - tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100)); } } else { - if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason1Pos[0])) + if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN, Mason1Pos[0])) { tempsum->SetHomePosition(DalforsPos[2]); - tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100)); } - if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN,Mason2Pos[0])) + if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN, Mason2Pos[0])) { tempsum->SetHomePosition(DalforsPos[2]); - tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100)); } } PhaseCount++; if (PhaseCount < 8) - events.ScheduleEvent(EVENT_WAVE_SPAWN,urand(10000,20000)); + events.ScheduleEvent(EVENT_WAVE_SPAWN, urand(10000, 20000)); else - events.ScheduleEvent(EVENT_HALOF,urand(10000,20000)); + events.ScheduleEvent(EVENT_HALOF, urand(10000, 20000)); } break; case EVENT_HALOF: { - if (Creature* LK = GetClosestCreatureWithEntry(me,NPC_LK,100)) + if (Creature* LK = GetClosestCreatureWithEntry(me, NPC_LK, 100)) LK->AI()->Talk(LK_TALK_4); - if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason1Pos[0])) + if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason1Pos[0])) { tempsum->SetHomePosition(DalforsPos[2]); - tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100)); } - if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE,Mason2Pos[0])) + if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason2Pos[0])) { tempsum->SetHomePosition(DalforsPos[2]); - tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100)); } - if (Creature* tempsum = DoSummon(NPC_HALOF_THE_DEATHBRINGER,DalforsPos[0])) + if (Creature* tempsum = DoSummon(NPC_HALOF_THE_DEATHBRINGER, DalforsPos[0])) { HalofSpawned = true; guidHalof = tempsum->GetGUID(); tempsum->SetHomePosition(DalforsPos[2]); - tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me,NPC_BLESSED_BANNER,100)); + tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100)); } } break; @@ -845,17 +845,17 @@ public: } if (PhaseCount == 8) - if (Creature* Halof = me->GetCreature(*me,guidHalof)) + if (Creature* Halof = me->GetCreature(*me, guidHalof)) if (Halof->isDead()) { - DoCast(me,SPELL_CRUSADERS_SPIRE_VICTORY,true); + DoCast(me, SPELL_CRUSADERS_SPIRE_VICTORY, true); Summons.DespawnEntry(NPC_HIDEOUS_PLAGEBRINGER); Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN); Summons.DespawnEntry(NPC_SCOURGE_DRUDGE); Summons.DespawnEntry(NPC_HALOF_THE_DEATHBRINGER); - if (Creature* Dalfors = me->GetCreature(*me,guidDalfors)) + if (Creature* Dalfors = me->GetCreature(*me, guidDalfors)) Dalfors->AI()->Talk(DALFORS_YELL_FINISHED); - events.ScheduleEvent(EVENT_ENDED,10000); + events.ScheduleEvent(EVENT_ENDED, 10000); } } }; diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index 2aa355084a1..f3afc03e68a 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -540,13 +540,13 @@ public: Player* player = Player::GetPlayer(*me, playerGUID); Creature* orphan = Creature::GetCreature(*me, orphanGUID); - if(!orphan || !player) + if (!orphan || !player) { Reset(); return; } - switch(phase) + switch (phase) { case 1: orphan->GetMotionMaster()->MovePoint(0, me->GetPositionX() + cos(me->GetOrientation()) * 5, me->GetPositionY() + sin(me->GetOrientation()) * 5, me->GetPositionZ()); diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index 85ab1dc1127..dae2ffd36f6 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -423,7 +423,7 @@ public: Unit* player = me->GetVehicleKit()->GetPassenger(0); if (player && player->GetTypeId() == TYPEID_PLAYER) { - // for each prisoner on drake,give credit + // for each prisoner on drake, give credit for (uint8 i = 1; i < 4; ++i) if (Unit* prisoner = me->GetVehicleKit()->GetPassenger(i)) { diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index 8935c77b30e..8c255d49d25 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -271,7 +271,7 @@ class npc_wg_queue : public CreatureScript return true; } - bool OnGossipSelect(Player* player, Creature* /*creature*/ , uint32 /*sender*/ , uint32 /*action*/) + bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/) { player->CLOSE_GOSSIP_MENU(); diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index 11569c30f1e..ec85d675225 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -45,7 +45,7 @@ enum MotherShahraz SPELL_ATTRACTION = 40871, SPELL_SILENCING_SHRIEK = 40823, SPELL_ENRAGE = 23537, - SPELL_SABER_LASH = 40810,//43267 + SPELL_SABER_LASH = 40810, //43267 SPELL_SABER_LASH_IMM = 43690, SPELL_TELEPORT_VISUAL = 40869, SPELL_BERSERK = 45078 diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp index 4eaf7cc2d6c..be51b7922a2 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -375,23 +375,23 @@ class instance_blood_furnace : public InstanceMapScript switch (id) { case DATA_PRISON_CELL5: - HandleGameObject(PrisonCell5GUID,true); + HandleGameObject(PrisonCell5GUID, true); ActivatePrisoners(PrisonersCell5); break; case DATA_PRISON_CELL6: - HandleGameObject(PrisonCell6GUID,true); + HandleGameObject(PrisonCell6GUID, true); ActivatePrisoners(PrisonersCell6); break; case DATA_PRISON_CELL7: - HandleGameObject(PrisonCell7GUID,true); + HandleGameObject(PrisonCell7GUID, true); ActivatePrisoners(PrisonersCell7); break; case DATA_PRISON_CELL8: - HandleGameObject(PrisonCell8GUID,true); + HandleGameObject(PrisonCell8GUID, true); ActivatePrisoners(PrisonersCell8); break; case DATA_DOOR5: - HandleGameObject(Door5GUID,true); + HandleGameObject(Door5GUID, true); if (Creature* broggok = instance->GetCreature(BroggokGUID)) broggok->AI()->DoAction(ACTION_ACTIVATE_BROGGOK); break; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index 9c4b764fd2a..01ca1636c6b 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -518,7 +518,7 @@ class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader return; Unit* target = GetUnitOwner(); - target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(),false); + target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), false); } void Register() 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 0b2370e1b17..9bda618b732 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -65,7 +65,7 @@ class boss_nethermancer_sepethrea : public CreatureScript struct boss_nethermancer_sepethreaAI : public BossAI { - boss_nethermancer_sepethreaAI(Creature* creature) : BossAI(creature,DATA_NETHERMANCER_SEPRETHREA) {} + boss_nethermancer_sepethreaAI(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA) {} void EnterCombat(Unit* who) { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp index e6cb05084ad..146569db284 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp @@ -41,7 +41,7 @@ class instance_mechanar : public InstanceMapScript SetBossNumber(EncounterCount); LoadDoorData(doorData); } - + void OnGameObjectCreate(GameObject* gameObject) { diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp index 0a92b985c95..edb7a2642d5 100644 --- a/src/server/scripts/Outland/zone_nagrand.cpp +++ b/src/server/scripts/Outland/zone_nagrand.cpp @@ -639,7 +639,7 @@ public: if (ChainLightningTimer <= diff) { DoCast(me->getVictim(), SPELL_KUR_CHAIN_LIGHTNING); - ChainLightningTimer = urand(7000,14000); + ChainLightningTimer = urand(7000, 14000); } else ChainLightningTimer -= diff; if (HealthBelowPct(30)) @@ -654,7 +654,7 @@ public: if (FrostShockTimer <= diff) { DoCast(me->getVictim(), SPELL_KUR_FROST_SHOCK); - FrostShockTimer = urand(7500,15000); + FrostShockTimer = urand(7500, 15000); } else FrostShockTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 4a1b0d558ff..b5f4312bae5 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1594,7 +1594,7 @@ class spell_gen_gnomish_transporter : public SpellScriptLoader void HandleDummy(SpellEffIndex /* effIndex */) { Unit* caster = GetCaster(); - caster->CastSpell(caster, roll_chance_i(50) ? SPELL_TRANSPORTER_SUCCESS : SPELL_TRANSPORTER_FAILURE , true); + caster->CastSpell(caster, roll_chance_i(50) ? SPELL_TRANSPORTER_SUCCESS : SPELL_TRANSPORTER_FAILURE, true); } void Register() diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index ccd8f3f81e7..b4e06cb6b48 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1350,7 +1350,7 @@ class spell_item_poultryizer : public SpellScriptLoader void HandleDummy(SpellEffIndex /* effIndex */) { if (GetCastItem() && GetHitUnit()) - GetCaster()->CastSpell(GetHitUnit(), roll_chance_i(80) ? SPELL_POULTRYIZER_SUCCESS : SPELL_POULTRYIZER_BACKFIRE , true, GetCastItem()); + GetCaster()->CastSpell(GetHitUnit(), roll_chance_i(80) ? SPELL_POULTRYIZER_SUCCESS : SPELL_POULTRYIZER_BACKFIRE, true, GetCastItem()); } void Register() @@ -1710,7 +1710,7 @@ class spell_item_teach_language : public SpellScriptLoader Player* caster = GetCaster()->ToPlayer(); if (roll_chance_i(34)) - caster->CastSpell(caster,caster->GetTeam() == ALLIANCE ? SPELL_LEARN_GNOMISH_BINARY : SPELL_LEARN_GOBLIN_BINARY, true); + caster->CastSpell(caster, caster->GetTeam() == ALLIANCE ? SPELL_LEARN_GNOMISH_BINARY : SPELL_LEARN_GOBLIN_BINARY, true); } void Register() @@ -2004,7 +2004,7 @@ public: void HandleDummy(SpellEffIndex /*effIndex*/) { if (GetHitUnit()) - GetCaster()->CastSpell(GetCaster(),SPELL_FORCE_CAST_SUMMON_GNOME_SOUL); + GetCaster()->CastSpell(GetCaster(), SPELL_FORCE_CAST_SUMMON_GNOME_SOUL); } void Register() diff --git a/src/server/scripts/Spells/spell_pet.cpp b/src/server/scripts/Spells/spell_pet.cpp index 5198e555ee1..c4d5562ab39 100644 --- a/src/server/scripts/Spells/spell_pet.cpp +++ b/src/server/scripts/Spells/spell_pet.cpp @@ -1451,7 +1451,7 @@ public: if (pet->GetEntry() == ENTRY_ARMY_OF_THE_DEAD_GHOUL) amount = -90; // Night of the dead - else if ( Aura * aur = owner->GetAuraOfRankedSpell(SPELL_NIGHT_OF_THE_DEAD)) + else if (Aura* aur = owner->GetAuraOfRankedSpell(SPELL_NIGHT_OF_THE_DEAD)) amount = aur->GetSpellInfo()->Effects[EFFECT_2].CalcValue(); } } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index aaac8ee4b83..8a3342cf2de 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -2509,11 +2509,11 @@ public: break; case GOSSIP_ACTION_INFO_DEF + 8: player->CLOSE_GOSSIP_MENU(); - player->AddItem(ITEM_KEY_TO_THE_FOCUSING_IRIS,1); + player->AddItem(ITEM_KEY_TO_THE_FOCUSING_IRIS, 1); break; case GOSSIP_ACTION_INFO_DEF + 9: player->CLOSE_GOSSIP_MENU(); - player->AddItem(ITEM_HC_KEY_TO_THE_FOCUSING_IRIS,1); + player->AddItem(ITEM_HC_KEY_TO_THE_FOCUSING_IRIS, 1); break; } return true; @@ -2828,7 +2828,7 @@ public: { if (!me->FindNearestCreature(NPC_OMEN, 100.0f, false) && me->GetDistance2d(omenSummonPos.GetPositionX(), omenSummonPos.GetPositionY()) <= 100.0f) { - switch (urand(0,9)) + switch (urand(0, 9)) { case 0: case 1: diff --git a/src/server/shared/Cryptography/WardenKeyGeneration.h b/src/server/shared/Cryptography/WardenKeyGeneration.h index 5c04da38dc9..6d5fd563ba3 100644 --- a/src/server/shared/Cryptography/WardenKeyGeneration.h +++ b/src/server/shared/Cryptography/WardenKeyGeneration.h @@ -73,7 +73,7 @@ private: SHA1Hash sh; uint32 taken; - uint8 o0[20],o1[20],o2[20]; + uint8 o0[20], o1[20], o2[20]; }; #endif diff --git a/src/server/shared/Dynamic/HashNamespace.h b/src/server/shared/Dynamic/HashNamespace.h index afb55ae0e00..88fa8c6f00e 100644 --- a/src/server/shared/Dynamic/HashNamespace.h +++ b/src/server/shared/Dynamic/HashNamespace.h @@ -93,7 +93,7 @@ template<> struct hash<std::string> { size_t operator()(const std::string &__x) const { - return hash<char const *>()(__x.c_str()); + return hash<char const*>()(__x.c_str()); } }; diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index 4048f056f46..60320d049ac 100644 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -82,7 +82,7 @@ void Log::CreateAppenderFromConfig(const char* name) if (!name || *name == '\0') return; - // Format=type,level,flags,optional1,optional2 + // Format=type, level, flags, optional1, optional2 // if type = File. optional1 = file and option2 = mode // if type = Console. optional1 = Color std::string options = "Appender."; diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h index 26fcc40c5e0..6d6cfe715e8 100644 --- a/src/server/shared/Logging/Log.h +++ b/src/server/shared/Logging/Log.h @@ -45,12 +45,12 @@ class Log bool ShouldLog(LogFilterType type, LogLevel level) const; bool SetLogLevel(std::string const& name, char const* level, bool isLogger = true); - void outTrace(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); - void outDebug(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); - void outInfo(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); - void outWarn(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); - void outError(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); - void outFatal(LogFilterType f, char const* str, ...) ATTR_PRINTF(3,4); + void outTrace(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4); + void outDebug(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4); + void outInfo(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4); + void outWarn(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4); + void outError(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4); + void outFatal(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4); void EnableDBAppenders(); void outCommand(uint32 account, const char * str, ...) ATTR_PRINTF(3, 4); diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 5553b04f461..22dad8d7dd1 100644 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -52,7 +52,7 @@ class ByteBufferPositionException : public ByteBufferException { ACE_Stack_Trace trace; - sLog->outError(LOG_FILTER_NETWORKIO, "Attempted to %s value with size: "SIZEFMTD" in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD")\n[Stacktrace: %s]" , + sLog->outError(LOG_FILTER_NETWORKIO, "Attempted to %s value with size: "SIZEFMTD" in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD")\n[Stacktrace: %s]", (_add ? "put" : "get"), ValueSize, Pos, Size, trace.c_str()); } diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index 10c2e866a7d..e7218d7ba72 100644 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -39,7 +39,7 @@ template<typename T, class S> struct Finder class Tokenizer { public: - typedef std::vector<char const *> StorageType; + typedef std::vector<char const*> StorageType; typedef StorageType::size_type size_type; |