diff options
| author | Spp <spp@jorge.gr> | 2013-01-14 09:50:59 +0100 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2013-01-14 09:50:59 +0100 |
| commit | 802657250c20088d7f42ec7c836589a532e66fcc (patch) | |
| tree | e36baf33f56268d81a58be630957499523de08ef /src/server/game | |
| parent | 557fde86e457b8fe337e6916e6573ea8a8ba210c (diff) | |
Core/Misc: Apply codestyle to multiple files
Diffstat (limited to 'src/server/game')
57 files changed, 325 insertions, 326 deletions
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) |
