Core/Misc: Apply codestyle to multiple files (II)

This commit is contained in:
Spp committed 2013-01-14 11:12:58 +01:00
1 parent d75222feca
commit 0d5cb6af75
40 files changed
+194 -194

No files matched your search

@@ -2302,7 +2302,7 @@ bool AchievementMgr<T>::CanUpdateCriteria(AchievementCriteriaEntry const* criter
}
template<class T>
bool AchievementMgr<T>::ConditionsSatisfied(AchievementCriteriaEntry const *criteria, Player* referencePlayer) const
bool AchievementMgr<T>::ConditionsSatisfied(AchievementCriteriaEntry const* criteria, Player* referencePlayer) const
{
for (uint32 i = 0; i < MAX_CRITERIA_REQUIREMENTS; ++i)
{
@@ -2328,7 +2328,7 @@ bool AchievementMgr<T>::ConditionsSatisfied(AchievementCriteriaEntry const *crit
}
template<class T>
bool AchievementMgr<T>::RequirementsSatisfied(AchievementCriteriaEntry const *achievementCriteria, uint64 miscValue1, uint64 miscValue2, uint64 miscValue3, Unit const *unit, Player* referencePlayer) const
bool AchievementMgr<T>::RequirementsSatisfied(AchievementCriteriaEntry const* achievementCriteria, uint64 miscValue1, uint64 miscValue2, uint64 miscValue3, Unit const* unit, Player* referencePlayer) const
{
switch (AchievementCriteriaTypes(achievementCriteria->type))
{
@@ -2685,7 +2685,7 @@ bool AchievementMgr<T>::RequirementsSatisfied(AchievementCriteriaEntry const *ac
}
template<class T>
bool AchievementMgr<T>::AdditionalRequirementsSatisfied(AchievementCriteriaEntry const *criteria, uint64 miscValue1, uint64 /*miscValue2*/, Unit const* unit, Player* referencePlayer) const
bool AchievementMgr<T>::AdditionalRequirementsSatisfied(AchievementCriteriaEntry const* criteria, uint64 miscValue1, uint64 /*miscValue2*/, Unit const* unit, Player* referencePlayer) const
{
for (uint8 i = 0; i < MAX_ADDITIONAL_CRITERIA_CONDITIONS; ++i)
{
@@ -2724,7 +2724,7 @@ bool AchievementMgr<T>::AdditionalRequirementsSatisfied(AchievementCriteriaEntry
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_ITEM_QUALITY_MIN: // 14
{
// miscValue1 is itemid
ItemTemplate const * const item = sObjectMgr->GetItemTemplate(uint32(miscValue1));
ItemTemplate const* const item = sObjectMgr->GetItemTemplate(uint32(miscValue1));
if (!item || item->Quality < reqValue)
return false;
break;
@@ -2732,7 +2732,7 @@ bool AchievementMgr<T>::AdditionalRequirementsSatisfied(AchievementCriteriaEntry
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_ITEM_QUALITY_EQUALS: // 15
{
// miscValue1 is itemid
ItemTemplate const * const item = sObjectMgr->GetItemTemplate(uint32(miscValue1));
ItemTemplate const* const item = sObjectMgr->GetItemTemplate(uint32(miscValue1));
if (!item || item->Quality != reqValue)
return false;
break;
@@ -2783,7 +2783,7 @@ bool AchievementMgr<T>::AdditionalRequirementsSatisfied(AchievementCriteriaEntry
{
if (!unit)
return false;
Creature const * const creature = unit->ToCreature();
Creature const* const creature = unit->ToCreature();
if (!creature || creature->GetCreatureType() != reqValue)
return false;
break;
@@ -264,8 +264,8 @@ class AchievementMgr
bool CanUpdateCriteria(AchievementCriteriaEntry const* criteria, AchievementEntry const* achievement, uint64 miscValue1, uint64 miscValue2, uint64 miscValue3, Unit const* unit, Player* referencePlayer);
void SendPacket(WorldPacket* data) const;
bool ConditionsSatisfied(AchievementCriteriaEntry const *criteria, Player* referencePlayer) const;
bool RequirementsSatisfied(AchievementCriteriaEntry const *criteria, uint64 miscValue1, uint64 miscValue2, uint64 miscValue3, Unit const* unit, Player* referencePlayer) const;
bool ConditionsSatisfied(AchievementCriteriaEntry const* criteria, Player* referencePlayer) const;
bool RequirementsSatisfied(AchievementCriteriaEntry const* criteria, uint64 miscValue1, uint64 miscValue2, uint64 miscValue3, Unit const* unit, Player* referencePlayer) const;
bool AdditionalRequirementsSatisfied(AchievementCriteriaEntry const* criteria, uint64 miscValue1, uint64 miscValue2, Unit const* unit, Player* referencePlayer) const;
T* _owner;
@@ -1246,7 +1246,7 @@ void Battleground::AddPlayer(Player* player)
if (GetStatus() == STATUS_WAIT_JOIN) // not started yet
{
player->CastSpell(player, SPELL_PREPARATION, true); // reduces all mana cost of spells.
int32 countdownMaxForBGType = isArena() ? ARENA_COUNTDOWN_MAX : BATTLEGROUND_COUNTDOWN_MAX;
WorldPacket data(SMSG_START_TIMER, 4+4+4);
data << uint32(0); // unk
@@ -148,7 +148,7 @@ void BattlegroundMgr::Update(uint32 diff)
}
}
void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battleground *bg, Player * player, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype)
void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, Player* player, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype)
{
ObjectGuid playerGuid = player->GetGUID();
ObjectGuid bgGuid;
+1 -1
View File
@@ -167,7 +167,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
return true;
}
inline std::string ItemChatLink::FormatName(uint8 index, ItemLocale const *locale, char* suffixStrings) const
inline std::string ItemChatLink::FormatName(uint8 index, ItemLocale const* locale, char* suffixStrings) const
{
std::stringstream ss;
if (locale == NULL || index >= locale->Name.size())
+3 -3
View File
@@ -32,7 +32,7 @@ typedef std::list<std::string> StoreProblemList1;
uint32 DB2FilesCount = 0;
static bool LoadDB2_assert_print(uint32 fsize,uint32 rsize, const std::string& filename)
static bool LoadDB2_assert_print(uint32 fsize, uint32 rsize, const std::string& filename)
{
sLog->outError(LOG_FILTER_GENERAL, "Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
@@ -62,7 +62,7 @@ inline void LoadDB2(StoreProblemList1& errlist, DB2Storage<T>& storage, const st
if (!storage.Load(db2_filename.c_str()))
{
// sort problematic db2 to (1) non compatible and (2) nonexistent
if (FILE * f = fopen(db2_filename.c_str(), "rb"))
if (FILE* f = fopen(db2_filename.c_str(), "rb"))
{
char buf[100];
snprintf(buf, 100,"(exist, but have %d fields instead " SIZEFMTD ") Wrong client version DBC file?", storage.GetFieldCount(), strlen(storage.GetFormat()));
@@ -96,7 +96,7 @@ void LoadDB2Stores(const std::string& dataPath)
for (std::list<std::string>::iterator i = bad_db2_files.begin(); i != bad_db2_files.end(); ++i)
str += *i + "\n";
sLog->outError(LOG_FILTER_GENERAL, "\nSome required *.db2 files (%u from %d) not found or not compatible:\n%s", (uint32)bad_db2_files.size(), DB2FilesCount,str.c_str());
sLog->outError(LOG_FILTER_GENERAL, "\nSome required *.db2 files (%u from %d) not found or not compatible:\n%s", (uint32)bad_db2_files.size(), DB2FilesCount, str.c_str());
exit(1);
}
+5 -5
View File
@@ -435,11 +435,11 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sItemArmorTotalStore, dbcPath, "ItemArmorTotal.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageAmmoStore, dbcPath, "ItemDamageAmmo.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageOneHandStore, dbcPath, "ItemDamageOneHand.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageOneHandCasterStore,dbcPath, "ItemDamageOneHandCaster.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageOneHandCasterStore, dbcPath, "ItemDamageOneHandCaster.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageRangedStore, dbcPath, "ItemDamageRanged.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageThrownStore, dbcPath, "ItemDamageThrown.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageTwoHandStore, dbcPath, "ItemDamageTwoHand.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageTwoHandCasterStore,dbcPath, "ItemDamageTwoHandCaster.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageTwoHandCasterStore, dbcPath, "ItemDamageTwoHandCaster.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDamageWandStore, dbcPath, "ItemDamageWand.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sItemDisenchantLootStore, dbcPath, "ItemDisenchantLoot.dbc");
@@ -500,7 +500,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellReagentsStore, dbcPath,"SpellReagents.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellScalingStore, dbcPath,"SpellScaling.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellTotemsStore, dbcPath,"SpellTotems.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellTargetRestrictionsStore,dbcPath,"SpellTargetRestrictions.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellTargetRestrictionsStore, dbcPath,"SpellTargetRestrictions.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellPowerStore, dbcPath,"SpellPower.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellLevelsStore, dbcPath,"SpellLevels.dbc");//14545
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellInterruptsStore, dbcPath,"SpellInterrupts.dbc");//14545
@@ -529,7 +529,7 @@ void LoadDBCStores(const std::string& dataPath)
// Must be done when sSkillLineAbilityStore, sSpellStore, sSpellLevelsStore and sCreatureFamilyStore are all loaded
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
{
SkillLineAbilityEntry const *skillLine = sSkillLineAbilityStore.LookupEntry(j);
SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(j);
if (!skillLine)
continue;
@@ -763,7 +763,7 @@ void LoadDBCStores(const std::string& dataPath)
const std::string* GetRandomCharacterName(uint8 race, uint8 gender)
{
uint32 size = sGenNameVectoArraysMap[race].stringVectorArray[gender].size();
uint32 randPos = urand(0,size-1);
uint32 randPos = urand(0, size-1);
return &sGenNameVectoArraysMap[race].stringVectorArray[gender][randPos];
}
+8 -8
View File
@@ -1974,7 +1974,7 @@ bool Player::BuildEnumData(PreparedQueryResult result, ByteBuffer* dataBuffer, B
continue;
}
SpellItemEnchantmentEntry const *enchant = NULL;
SpellItemEnchantmentEntry const* enchant = NULL;
uint32 enchants = GetUInt32ValueFromArray(equipment, visualbase + 1);
for (uint8 enchantSlot = PERM_ENCHANTMENT_SLOT; enchantSlot <= TEMP_ENCHANTMENT_SLOT; ++enchantSlot)
{
@@ -7228,7 +7228,7 @@ void Player::_SaveCurrency(SQLTransaction& trans)
if (!entry) // should never happen
continue;
switch(itr->second.state)
switch (itr->second.state)
{
case PLAYERCURRENCY_NEW:
stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_PLAYER_CURRENCY);
@@ -7469,7 +7469,7 @@ void Player::ModifyCurrency(uint32 id, int32 count, bool printLog/* = true*/, bo
if (currency->Category == CURRENCY_CATEGORY_META_CONQUEST)
{
//original conquest cap is highest of bg/arena conquest cap.
if(weekCap > _ConquestCurrencyTotalWeekCap)
if (weekCap > _ConquestCurrencyTotalWeekCap)
_ConquestCurrencyTotalWeekCap = weekCap;
// count was changed to week limit, now we can modify original points.
ModifyCurrency(CURRENCY_TYPE_CONQUEST_POINTS, count, printLog );
@@ -7477,7 +7477,7 @@ void Player::ModifyCurrency(uint32 id, int32 count, bool printLog/* = true*/, bo
}
// on new case just set init.
if(itr->second.state == PLAYERCURRENCY_NEW)
if (itr->second.state == PLAYERCURRENCY_NEW)
{
SendNewCurrency(id);
return;
@@ -7521,7 +7521,7 @@ uint32 Player::GetCurrencyWeekCap(uint32 id, bool usePrecision) const
return 0;
uint32 cap = _GetCurrencyWeekCap(entry);
if(usePrecision && entry->Flags & CURRENCY_FLAG_HIGH_PRECISION)
if (usePrecision && entry->Flags & CURRENCY_FLAG_HIGH_PRECISION)
cap /= 100;
return cap;
@@ -11497,7 +11497,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
return EQUIP_ERR_NOT_OWNER;
// Currency Tokenizer are not supposed to be swapped out of their hidden bag
if(pItem->IsCurrencyToken())
if (pItem->IsCurrencyToken())
{
sLog->outError(LOG_FILTER_PLAYER, "Possible hacking attempt: Player %s [guid: %u] tried to move token [guid: %u, entry: %u] out of the currency bag!",
GetName().c_str(), GetGUIDLow(), pItem->GetGUIDLow(), pProto->ItemId);
@@ -21326,7 +21326,7 @@ void Player::InitDisplayIds()
}
}
inline bool Player::_StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int32 price, ItemTemplate const *pProto, Creature *pVendor, VendorItem const* crItem, bool bStore)
inline bool Player::_StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int32 price, ItemTemplate const* pProto, Creature* pVendor, VendorItem const* crItem, bool bStore)
{
ItemPosCountVec vDest;
uint16 uiDest = 0;
@@ -23450,7 +23450,7 @@ uint32 Player::GetResurrectionSpellId()
}
// Used in triggers for check "Only to targets that grant experience or honor" req
bool Player::isHonorOrXPTarget(Unit const *victim)
bool Player::isHonorOrXPTarget(Unit const* victim)
{
uint8 v_level = victim->getLevel();
uint8 k_grey = Trinity::XP::GetGrayLevel(getLevel());
+2 -2
View File
@@ -2267,7 +2267,7 @@ class Player : public Unit, public GridObject<Player>
bool IsAtRecruitAFriendDistance(WorldObject const* pOther) const;
void RewardPlayerAndGroupAtKill(Unit* victim, bool isBattleGround);
void RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewardSource);
bool isHonorOrXPTarget(Unit const *victim);
bool isHonorOrXPTarget(Unit const* victim);
bool GetsRecruitAFriendBonus(bool forXP);
uint8 GetGrantableLevels() { return m_grantableLevels; }
@@ -2938,7 +2938,7 @@ class Player : public Unit, public GridObject<Player>
/*
* @name _GetCurrencyTotalCap
* @brief return total cap for selected currency
* @param currency CurrencyTypesEntry witch should get week cap
*/
uint32 _GetCurrencyTotalCap(const CurrencyTypesEntry* currency) const;
+1 -1
View File
@@ -668,7 +668,7 @@ void Player::UpdateManaRegen()
// Apply PCT bonus from SPELL_AURA_MOD_POWER_REGEN_PERCENT aura on spirit base regen
spirit_regen *= GetTotalAuraMultiplierByMiscValue(SPELL_AURA_MOD_POWER_REGEN_PERCENT, POWER_MANA);
// SpiritRegen(SPI,INT,LEVEL) = (0.001 + (SPI x sqrt(INT) x BASE_REGEN[LEVEL])) x 5
// SpiritRegen(SPI, INT, LEVEL) = (0.001 + (SPI x sqrt(INT) x BASE_REGEN[LEVEL])) x 5
if (GetStat(STAT_INTELLECT) > 0.0f)
spirit_regen *= sqrt(GetStat(STAT_INTELLECT));
+8 -8
View File
@@ -4876,7 +4876,7 @@ bool Unit::HandleSpellCritChanceAuraProc(Unit* victim, uint32 /*damage*/, AuraEf
return true;
}
bool Unit::HandleAuraProcOnPowerAmount(Unit* victim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 /*procEx*/, uint32 cooldown)
bool Unit::HandleAuraProcOnPowerAmount(Unit* victim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 /*procEx*/, uint32 cooldown)
{
// Get triggered aura spell info
SpellInfo const* auraSpellInfo = triggeredByAura->GetSpellInfo();
@@ -4944,7 +4944,7 @@ bool Unit::HandleAuraProcOnPowerAmount(Unit* victim, uint32 /*damage*/, AuraEffe
uint32 solarEclipseMarker = 67483;
uint32 lunarEclipseMarker = 67484;
switch(effIndex)
switch (effIndex)
{
case 0:
{
@@ -4955,7 +4955,7 @@ bool Unit::HandleAuraProcOnPowerAmount(Unit* victim, uint32 /*damage*/, AuraEffe
if (HasAura(solarEclipseMarker))
{
RemoveAurasDueToSpell(solarEclipseMarker);
CastSpell(this,lunarEclipseMarker,true);
CastSpell(this, lunarEclipseMarker, true);
}
break;
}
@@ -4968,7 +4968,7 @@ bool Unit::HandleAuraProcOnPowerAmount(Unit* victim, uint32 /*damage*/, AuraEffe
if (HasAura(lunarEclipseMarker))
{
RemoveAurasDueToSpell(lunarEclipseMarker);
CastSpell(this,solarEclipseMarker,true);
CastSpell(this, solarEclipseMarker, true);
}
break;
@@ -16977,7 +16977,7 @@ void Unit::ReadMovementInfo(WorldPacket& data, MovementInfo* mi)
if (GetTransport())
GetTransport()->UpdatePosition(mi);
//! 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) \
@@ -17077,7 +17077,7 @@ void Unit::WriteMovementInfo(WorldPacket& data)
ObjectGuid guid = mover->GetGUID();
ObjectGuid tguid = hasTransportData ? GetTransport()->GetGUID() : 0;
for(uint32 i = 0; i < MSE_COUNT; ++i)
for (uint32 i = 0; i < MSE_COUNT; ++i)
{
MovementStatusElements element = sequence[i];
if (element == MSEEnd)
@@ -17323,10 +17323,10 @@ void Unit::SendTeleportPacket(Position& pos)
// Relocate the player/creature to its old position, so we can broadcast to nearby players correctly
if (GetTypeId() == TYPEID_PLAYER)
Relocate(&pos);
Relocate(&pos);
else
Relocate(&oldPos);
// Broadcast the packet to everyone except self.
SendMessageToSet(&data, false);
}
+1 -1
View File
@@ -2296,7 +2296,7 @@ class Unit : public WorldObject
void DisableSpline();
private:
bool IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const* & spellProcEvent);
bool HandleAuraProcOnPowerAmount(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleAuraProcOnPowerAmount(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
bool HandleSpellCritChanceAuraProc(Unit* victim, uint32 damage, AuraEffect* triggredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
+3 -3
View File
@@ -2088,7 +2088,7 @@ void FillItemDamageFields(float* minDamage, float* maxDamage, float* dps, uint32
*dps = damageInfo->DPS[quality];
float avgDamage = *dps * delay * 0.001f;
*minDamage = (statScalingFactor * -0.5f + 1.0f) * avgDamage;
*maxDamage = floor(float(avgDamage * (statScalingFactor * 0.5f + 1.0f) + 0.5f));
*maxDamage = floor(float(avgDamage* (statScalingFactor * 0.5f + 1.0f) + 0.5f));
}
uint32 FillItemArmor(uint32 itemlevel, uint32 itemClass, uint32 itemSubclass, uint32 quality, uint32 inventoryType)
@@ -8697,7 +8697,7 @@ void ObjectMgr::LoadPhaseDefinitions()
do
{
Field *fields = result->Fetch();
Field* fields = result->Fetch();
PhaseDefinition PhaseDefinition;
@@ -8742,7 +8742,7 @@ void ObjectMgr::LoadSpellPhaseInfo()
uint32 count = 0;
do
{
Field *fields = result->Fetch();
Field* fields = result->Fetch();
SpellPhaseInfo spellPhaseInfo;
spellPhaseInfo.spellId = fields[0].GetUInt32();
+3 -3
View File
@@ -142,7 +142,7 @@ void GuildFinderMgr::RemoveAllMembershipRequestsFromPlayer(uint32 playerId)
for (MembershipRequestStore::iterator itr = _membershipRequests.begin(); itr != _membershipRequests.end(); ++itr)
{
std::vector<MembershipRequest>::iterator itr2 = itr->second.begin();
for(; itr2 != itr->second.end(); ++itr2)
for (; itr2 != itr->second.end(); ++itr2)
if (itr2->GetPlayerGUID() == playerId)
break;
@@ -167,7 +167,7 @@ void GuildFinderMgr::RemoveAllMembershipRequestsFromPlayer(uint32 playerId)
void GuildFinderMgr::RemoveMembershipRequest(uint32 playerId, uint32 guildId)
{
std::vector<MembershipRequest>::iterator itr = _membershipRequests[guildId].begin();
for(; itr != _membershipRequests[guildId].end(); ++itr)
for (; itr != _membershipRequests[guildId].end(); ++itr)
if (itr->GetPlayerGUID() == playerId)
break;
@@ -306,7 +306,7 @@ void GuildFinderMgr::DeleteGuild(uint32 guildId)
// Notify the applicant his submition has been removed
if (Player* player = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(applicant, 0, HIGHGUID_PLAYER)))
SendMembershipRequestListUpdate(*player);
++itr;
}
+1 -1
View File
@@ -45,7 +45,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
uint32 type = 0;
uint32 lang;
switch(recvData.GetOpcode())
switch (recvData.GetOpcode())
{
case CMSG_MESSAGECHAT_SAY:
type = CHAT_MSG_SAY;
+1 -1
View File
@@ -400,7 +400,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket& recvPacket)
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANKER_ACTIVATE [%s]: Go: [" UI64FMTD "] AllSlots: %u"
, GetPlayerInfo().c_str(), guid, sendAllSlots);
GameObject const * const go = GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK);
GameObject const* const go = GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK);
if (!go)
return;
+1 -1
View File
@@ -436,7 +436,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket& recvData)
{
for (MailItemInfoVec::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2)
{
if (Item * const item = player->GetMItem(itr2->item_guid))
if (Item* const item = player->GetMItem(itr2->item_guid))
draft.AddItem(item);
player->RemoveMItem(itr2->item_guid);
}
+1 -1
View File
@@ -330,7 +330,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
case TYPEID_PLAYER:
{
//For AutoSubmition was added plr case there as it almost same exclute AI script cases.
Creature *creatureQGiver = object->ToCreature();
Creature* creatureQGiver = object->ToCreature();
if (!creatureQGiver || !(sScriptMgr->OnQuestReward(_player, creatureQGiver, quest, reward)))
{
// Send next quest
@@ -165,7 +165,7 @@ 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))
if (creature.IsWithinDist2d(x, y, radius))
creature.GetPosition(x, y, z);
return true;
@@ -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;
*/
@@ -2173,7 +2173,7 @@ MovementStatusElements MoveUpdateTeleport[] =
MSEGuidByte4,
MSETimestamp,
MSEGuidByte0,
MSEEnd,
};
@@ -104,39 +104,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(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(Levitation ),// 0x00000200,
STR(Root ),// 0x00000400,
STR(Falling ),// 0x00000800,
STR(Fallingfar ),// 0x00001000,
STR(Pendingstop ),// 0x00002000,
STR(PendingSTRafestop ),// 0x00004000,
STR(Pendingforward ),// 0x00008000,
STR(Pendingbackward ),// 0x00010000,
STR(PendingSTRafeleft ),// 0x00020000,
STR(PendingSTRaferight ),// 0x00040000,
STR(Pendingroot ),// 0x00080000,
STR(Swimming ),// 0x00100000, // Appears With Fly Flag Also
STR(Ascending ),// 0x00200000, // Swim Up Also
STR(Descending ),// 0x00400000, // Swim Down Also
STR(Can_Fly ),// 0x00800000, // Can Fly In 3.3?
STR(Flying ),// 0x01000000, // Actual Flying Mode
STR(Spline_Elevation ),// 0x02000000, // Used For Flight Paths
STR(Waterwalking ),// 0x04000000, // Prevent Unit From Falling Through Water
STR(Safe_Fall ),// 0x08000000, // Active Rogue Safe Fall Spell (Passive)
STR(Hover ),// 0x10000000
STR(Local_Dirty ),// 0x20000000
STR(None31 ),// 0x40000000
STR(None32 ),// 0x80000000
STR(Walk ), // 0x00000100, // Walking
STR(Levitation ), // 0x00000200,
STR(Root ), // 0x00000400,
STR(Falling ), // 0x00000800,
STR(Fallingfar ), // 0x00001000,
STR(Pendingstop ), // 0x00002000,
STR(PendingSTRafestop ), // 0x00004000,
STR(Pendingforward ), // 0x00008000,
STR(Pendingbackward ), // 0x00010000,
STR(PendingSTRafeleft ), // 0x00020000,
STR(PendingSTRaferight ), // 0x00040000,
STR(Pendingroot ), // 0x00080000,
STR(Swimming ), // 0x00100000, // Appears With Fly Flag Also
STR(Ascending ), // 0x00200000, // Swim Up Also
STR(Descending ), // 0x00400000, // Swim Down Also
STR(Can_Fly ), // 0x00800000, // Can Fly In 3.3?
STR(Flying ), // 0x01000000, // Actual Flying Mode
STR(Spline_Elevation ), // 0x02000000, // Used For Flight Paths
STR(Waterwalking ), // 0x04000000, // Prevent Unit From Falling Through Water
STR(Safe_Fall ), // 0x08000000, // Active Rogue Safe Fall Spell (Passive)
STR(Hover ), // 0x10000000
STR(Local_Dirty ), // 0x20000000
STR(None31 ), // 0x40000000
STR(None32 ), // 0x80000000
STR(Unk1 ),
STR(Unk2 ),
STR(Unk3 ),
@@ -157,38 +157,38 @@ namespace Movement
char const* g_SplineFlag_names[32] =
{
STR(AnimBit1 ),// 0x00000001,
STR(AnimBit2 ),// 0x00000002,
STR(AnimBit3 ),// 0x00000004,
STR(Unknown0 ),// 0x00000008,
STR(FallingSlow ),// 0x00000010,
STR(Done ),// 0x00000020,
STR(Falling ),// 0x00000040, // Not Compartible With Trajectory Movement
STR(No_Spline ),// 0x00000080,
STR(Unknown2 ),// 0x00000100,
STR(Flying ),// 0x00000200, // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation
STR(OrientationFixed ),// 0x00000400, // Model Orientation Fixed
STR(Catmullrom ),// 0x00000800, // Used Catmullrom Interpolation Mode
STR(Cyclic ),// 0x00001000, // Movement By Cycled Spline
STR(Enter_Cycle ),// 0x00002000, // Everytime Appears With Cyclic Flag In Monster Move Packet
STR(Frozen ),// 0x00004000,
STR(TransportEnter ),// 0x00008000
STR(TransportExit ),// 0x00010000
STR(Unknown3 ),// 0x00020000,
STR(Unknown4 ),// 0x00040000,
STR(OrientationInversed),// 0x00080000, // Appears With Runmode Flag, Nodes ),// 1, Handles Orientation
STR(SmoothGroundPath ),// 0x00100000,
STR(Walkmode ),// 0x00200000,
STR(UncompressedPath ),// 0x00400000,
STR(Unknown6 ),// 0x00800000,
STR(Animation ),// 0x01000000, // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement
STR(Parabolic ),// 0x02000000, // Not Compartible With Fall Movement
STR(Final_Point ),// 0x04000000,
STR(Final_Target ),// 0x08000000,
STR(Final_Angle ),// 0x10000000,
STR(Unknown7 ),// 0x20000000,
STR(Unknown8 ),// 0x40000000,
STR(Unknown9 ),// 0x80000000,
STR(AnimBit1 ), // 0x00000001,
STR(AnimBit2 ), // 0x00000002,
STR(AnimBit3 ), // 0x00000004,
STR(Unknown0 ), // 0x00000008,
STR(FallingSlow ), // 0x00000010,
STR(Done ), // 0x00000020,
STR(Falling ), // 0x00000040, // Not Compartible With Trajectory Movement
STR(No_Spline ), // 0x00000080,
STR(Unknown2 ), // 0x00000100,
STR(Flying ), // 0x00000200, // Smooth Movement(Catmullrom Interpolation Mode), Flying Animation
STR(OrientationFixed ), // 0x00000400, // Model Orientation Fixed
STR(Catmullrom ), // 0x00000800, // Used Catmullrom Interpolation Mode
STR(Cyclic ), // 0x00001000, // Movement By Cycled Spline
STR(Enter_Cycle ), // 0x00002000, // Everytime Appears With Cyclic Flag In Monster Move Packet
STR(Frozen ), // 0x00004000,
STR(TransportEnter ), // 0x00008000
STR(TransportExit ), // 0x00010000
STR(Unknown3 ), // 0x00020000,
STR(Unknown4 ), // 0x00040000,
STR(OrientationInversed), // 0x00080000, // Appears With Runmode Flag, Nodes ), // 1, Handles Orientation
STR(SmoothGroundPath ), // 0x00100000,
STR(Walkmode ), // 0x00200000,
STR(UncompressedPath ), // 0x00400000,
STR(Unknown6 ), // 0x00800000,
STR(Animation ), // 0x01000000, // Animationid (0...3), Uint32 Time, Not Compartible With Trajectory And Fall Movement
STR(Parabolic ), // 0x02000000, // Not Compartible With Fall Movement
STR(Final_Point ), // 0x04000000,
STR(Final_Target ), // 0x08000000,
STR(Final_Angle ), // 0x10000000,
STR(Unknown7 ), // 0x20000000,
STR(Unknown8 ), // 0x40000000,
STR(Unknown9 ), // 0x80000000,
};
template<class Flags, int N>
+5 -5
View File
@@ -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;}
@@ -156,12 +156,12 @@ 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;
@@ -169,7 +169,7 @@ public:
/** 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_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();
+1 -1
View File
@@ -871,7 +871,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
if (expansion > world_expansion)
expansion = world_expansion;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: (s,v) check s: %s v: %s",
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: (s, v) check s: %s v: %s",
fields[5].GetCString(),
fields[4].GetCString());
+2 -2
View File
@@ -1734,7 +1734,7 @@ void Spell::SelectImplicitTrajTargets()
m_targets.ModDst(trajDst);
}
if (Vehicle * veh = m_caster->GetVehicleKit())
if (Vehicle* veh = m_caster->GetVehicleKit())
veh->SetLastShootPos(*m_targets.GetDstPos());
}
@@ -4981,7 +4981,7 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_ONLY_BATTLEGROUNDS;
// do not allow spells to be cast in arenas or rated battlegrounds
if (Player * player = m_caster->ToPlayer())
if (Player* player = m_caster->ToPlayer())
if (player->InArena()/* || player->InRatedBattleGround() NYI*/)
{
SpellCastResult castResult = CheckArenaAndRatedBattlegroundCastRules();
+1 -1
View File
@@ -1352,7 +1352,7 @@ public:
{
Unit* unit = handler->getSelectedUnit();
Player* player = handler->GetSession()->GetPlayer();
if(unit && unit->GetTypeId() == TYPEID_PLAYER)
if (unit && unit->GetTypeId() == TYPEID_PLAYER)
player = unit->ToPlayer();
player->GetPhaseMgr().SendDebugReportToPlayer(handler->GetSession()->GetPlayer());
@@ -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);
@@ -22,7 +22,7 @@
enum Yells
{
// Jin'do the Godbreaker
// Jin'do the Godbreaker
SAY_INTRO = 0,
SAY_AGGRO = 1,
EMOTE_SHADOWS_OF_HAKKAR = 2, // ID - 97172 Shadows of Hakkar
@@ -150,7 +150,7 @@ public:
{
// Set to combat automatically, Brann's event won't repeat
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
events.SetPhase(PHASE_COMBAT);
events.SetPhase(PHASE_COMBAT);
ScheduleCombatEvents();
me->SetHomePosition(AnraphetActivatePos);
}
@@ -167,7 +167,7 @@ public:
{
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
Talk(ANRAPHET_SAY_DEATH);
if (Creature* brann = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_BRANN_0_GUID)))
brann->AI()->DoAction(ACTION_ANRAPHET_DIED);
@@ -209,12 +209,12 @@ public:
{
if ((events.GetPhaseMask() & PHASE_MASK_COMBAT) && (!UpdateVictim() || !CheckInRoom()))
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
@@ -313,7 +313,7 @@ class npc_alpha_beam : public CreatureScript
private:
InstanceScript* _instance;
};
CreatureAI* GetAI(Creature* creature) const
{
return GetHallsOfOriginationAI<npc_alpha_beamAI>(creature);
@@ -538,7 +538,7 @@ public:
Unit* caster = GetCaster();
float angle = float(rand_norm()) * static_cast<float>(2 * M_PI);
uint32 dist = caster->GetObjectSize() + GetSpellInfo()->Effects[effIndex].CalcRadius(GetCaster()) * (float)rand_norm();
float x = caster->GetPositionX() + dist * std::cos(angle);
float y = caster->GetPositionY() + dist * std::sin(angle);
float z = caster->GetMap()->GetHeight(x, y, caster->GetPositionZ());
@@ -45,14 +45,14 @@ enum Spells
SPELL_RAGING_SMASH = 83650,
SPELL_FLAME_BOLT = 77370,
SPELL_EARTH_SPIKE_WARN = 94974,
SPELL_PTAH_EXPLOSION = 75519,
SPELL_SANDSTORM = 75491,
SPELL_SUMMON_QUICKSAND = 75550, // Spell not in DBC, no SMSG_SPELL_START/GO for it
SPELL_BEETLE_BURROW = 75463,
SPELL_SUMMON_JEWELED_SCARAB = 75462,
SPELL_SUMMON_DUSTBONE_HORROR = 75521,
};
@@ -150,19 +150,19 @@ public:
{
events.SetPhase(PHASE_DISPERSE);
_hasDispersed = true;
me->AttackStop();
DoCast(me, SPELL_SANDSTORM);
SendWeather(WEATHER_STATE_LIGHT_SANDSTORM, 1.0f);
events.ScheduleEvent(EVENT_PTAH_EXPLODE, 6000, 0, PHASE_DISPERSE);
events.ScheduleEvent(EVENT_QUICKSAND, 10000, 0, PHASE_DISPERSE);
std::list<Creature*> stalkers;
GetCreatureListWithEntryInGrid(stalkers, me, NPC_BEETLE_STALKER, 100.0f);
std::list<Creature*> beetlers = stalkers;
Trinity::Containers::RandomResizeList(beetlers, 9); // Holds the summoners of Jeweled Scarab
for (std::list<Creature*>::iterator itr = beetlers.begin(); itr != beetlers.end(); ++itr)
{
stalkers.remove((*itr)); // Remove it to prevent a single trigger from spawning multiple npcs.
@@ -172,7 +172,7 @@ public:
}
Trinity::Containers::RandomResizeList(stalkers, 2); // Holds the summoners of Dustbone Horror
for (std::list<Creature*>::iterator itr = stalkers.begin(); itr != stalkers.end(); ++itr)
(*itr)->CastSpell((*itr), SPELL_SUMMON_DUSTBONE_HORROR);
}
@@ -194,7 +194,7 @@ public:
}
}
}
void EnterCombat(Unit* /*who*/)
{
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me, 1);
@@ -221,12 +221,12 @@ public:
{
if (!UpdateVictim() || !CheckInRoom())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
@@ -256,11 +256,11 @@ public:
break;
}
}
if (events.GetPhaseMask() & PHASE_MASK_NORMAL) // Do not melee in the disperse phase
DoMeleeAttackIfReady();
}
protected:
bool _hasDispersed;
uint8 _summonDeaths;
@@ -53,7 +53,7 @@ enum Spells
SPELL_SHIELD_VISUAL_RIGHT = 83698,
SPELL_BEAM_OF_LIGHT_RIGHT = 76573,
SPELL_SHIELD_VISUAL_LEFT = 83697,
SPELL_BEAM_OF_LIGHT_LEFT = 74930,
@@ -196,12 +196,12 @@ public:
{
if (!UpdateVictim() || !CheckInRoom() || me->GetCurrentSpell(CURRENT_CHANNELED_SPELL) || _phase == PHASE_SHIELDED)
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
@@ -225,22 +225,22 @@ public:
Unit* target = me->FindNearestCreature(NPC_SEARING_LIGHT, 100.0f);
if (!target)
break;
std::list<Creature*> stalkers;
GetCreatureListWithEntryInGrid(stalkers, me, NPC_CAVE_IN_STALKER, 100.0f);
stalkers.remove_if(Trinity::HeightDifferenceCheck(ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ANHUUR_DOOR)), 5.0f, true));
if (stalkers.empty())
break;
stalkers.sort(Trinity::ObjectDistanceOrderPred(target));
// Get the closest statue face (any of its eyes)
Creature* eye1 = stalkers.front();
stalkers.remove(eye1); // Remove the eye.
stalkers.sort(Trinity::ObjectDistanceOrderPred(eye1)); // Find the second eye.
Creature* eye2 = stalkers.front();
eye1->CastSpell(eye1, SPELL_SEARING_LIGHT, true);
eye2->CastSpell(eye2, SPELL_SEARING_LIGHT, true);
break;
@@ -267,11 +267,11 @@ class spell_anhuur_shield_of_light : public SpellScriptLoader
{
public:
spell_anhuur_shield_of_light() : SpellScriptLoader("spell_anhuur_shield_of_light") { }
class spell_anhuur_shield_of_light_SpellScript : public SpellScript
{
PrepareSpellScript(spell_anhuur_shield_of_light_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
if (InstanceMap* instance = GetCaster()->GetMap()->ToInstanceMap())
@@ -288,13 +288,13 @@ class spell_anhuur_shield_of_light : public SpellScriptLoader
}
}
}
void Register()
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_anhuur_shield_of_light_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENTRY);
}
};
SpellScript* GetSpellScript() const
{
return new spell_anhuur_shield_of_light_SpellScript();
@@ -305,11 +305,11 @@ class spell_anhuur_disable_beacon_beams : public SpellScriptLoader
{
public:
spell_anhuur_disable_beacon_beams() : SpellScriptLoader("spell_anhuur_disable_beacon_beams") { }
class spell_anhuur_disable_beacon_beams_SpellScript : public SpellScript
{
PrepareSpellScript(spell_anhuur_disable_beacon_beams_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
GetHitUnit()->RemoveAurasDueToSpell(GetEffectValue());
@@ -329,7 +329,7 @@ class spell_anhuur_disable_beacon_beams : public SpellScriptLoader
OnEffectHit += SpellEffectFn(spell_anhuur_disable_beacon_beams_SpellScript::Notify, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
{
return new spell_anhuur_disable_beacon_beams_SpellScript();
@@ -37,7 +37,7 @@ enum Data
DATA_AMMUNAE,
DATA_SETESH,
DATA_RAJH,
// Temple Guardian Anhuur
DATA_ANHUUR_GUID,
DATA_ANHUUR_LEFT_BEACON,
@@ -56,7 +56,7 @@ enum Creatures
BOSS_TEMPLE_GUARDIAN_ANHUUR = 39425,
NPC_CAVE_IN_STALKER = 40183,
NPC_SEARING_LIGHT = 40283,
BOSS_EARTHRAGER_PTAH = 39428,
NPC_BEETLE_STALKER = 40459, // Summons both Jeweled Scarab and Dustbone Horror
NPC_JEWELED_SCARAB = 40458,
@@ -27,7 +27,7 @@
#include "WorldPacket.h"
#include "WorldSession.h"
DoorData const doorData[] =
DoorData const doorData[] =
{
{GO_ANHUURS_DOOR, DATA_TEMPLE_GUARDIAN_ANHUUR, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{GO_ANHUURS_BRIDGE, DATA_TEMPLE_GUARDIAN_ANHUUR, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
@@ -51,7 +51,7 @@ class instance_halls_of_origination : public InstanceMapScript
struct instance_halls_of_origination_InstanceMapScript : public InstanceScript
{
instance_halls_of_origination_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
instance_halls_of_origination_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
{
SetBossNumber(EncounterCount);
LoadDoorData(doorData);
@@ -66,7 +66,7 @@ class instance_halls_of_origination : public InstanceMapScript
SunMirrorGUID = 0;
_deadElementals = 0;
}
void OnGameObjectCreate(GameObject* go)
{
switch (go->GetEntry())
@@ -150,7 +150,7 @@ class instance_halls_of_origination : public InstanceMapScript
default:
break;
}
return 0;
}
@@ -173,7 +173,7 @@ class instance_halls_of_origination : public InstanceMapScript
case DATA_ANRAPHET_GUID:
return AnraphetGUID;
}
return 0;
}
@@ -269,7 +269,7 @@ class instance_halls_of_origination : public InstanceMapScript
uint64 SunMirrorGUID;
uint32 _deadElementals;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
{
return new instance_halls_of_origination_InstanceMapScript(map);
@@ -176,7 +176,7 @@ class boss_elder_nadox : public CreatureScript
}
}
if (me->HealthBelowPct(100 - AmountHealthModifier * 25))
if (me->HealthBelowPct(100 - AmountHealthModifier* 25))
{
Talk(EMOTE_HATCHES, me->GetGUID());
DoCast(me, SPELL_SUMMON_SWARM_GUARD);
@@ -298,7 +298,7 @@ public:
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(GuardianCheck());
targets.remove_if (GuardianCheck());
}
void Register()
@@ -358,7 +358,7 @@ class boss_halion : public CreatureScript
if (Creature* twilightHalion = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TWILIGHT_HALION)))
if (twilightHalion->isAlive())
twilightHalion->Kill(twilightHalion);
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_HALION_CONTROLLER)))
if (controller->isAlive())
controller->Kill(controller);
@@ -554,7 +554,7 @@ class spell_paralyze_pinnacle : public SpellScriptLoader
void FilterTargets(std::list<WorldObject*>& unitList)
{
unitList.remove_if(RitualTargetCheck(GetCaster()));
unitList.remove_if (RitualTargetCheck(GetCaster()));
}
void Register()
+8 -8
View File
@@ -196,7 +196,7 @@ public:
if (caster->GetPrimaryTalentTree(caster->GetActiveSpec()) != TALENT_TREE_DRUID_BALANCE)
return;
switch(GetSpellInfo()->Id)
switch (GetSpellInfo()->Id)
{
case SPELL_DRUID_WRATH:
{
@@ -205,10 +205,10 @@ public:
if ((!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER))
|| caster->GetPower(POWER_ECLIPSE) == 0)
{
caster->CastCustomSpell(caster,SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE,&energizeAmount,0,0,true);
caster->CastCustomSpell(caster, SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE, &energizeAmount, 0, 0, true);
// If the energize was due to 0 power, cast the eclipse marker aura
if (!caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER))
caster->CastSpell(caster,SPELL_DRUID_LUNAR_ECLIPSE_MARKER,true);
caster->CastSpell(caster, SPELL_DRUID_LUNAR_ECLIPSE_MARKER, true);
}
// The energizing effect brought us out of the solar eclipse, remove the aura
if (caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) <= 0)
@@ -222,10 +222,10 @@ public:
if ((!caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER))
|| caster->GetPower(POWER_ECLIPSE) == 0)
{
caster->CastCustomSpell(caster,SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE,&energizeAmount,0,0,true);
caster->CastCustomSpell(caster, SPELL_DRUID_ECLIPSE_GENERAL_ENERGIZE, &energizeAmount, 0, 0, true);
// If the energize was due to 0 power, cast the eclipse marker aura
if (!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER))
caster->CastSpell(caster,SPELL_DRUID_SOLAR_ECLIPSE_MARKER,true);
caster->CastSpell(caster, SPELL_DRUID_SOLAR_ECLIPSE_MARKER, true);
}
// The energizing effect brought us out of the lunar eclipse, remove the aura
if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0)
@@ -239,16 +239,16 @@ public:
|| caster->GetPower(POWER_ECLIPSE) == 0)
{
energizeAmount = GetSpellInfo()->Effects[effIndex].BasePoints; // 15
caster->CastCustomSpell(caster,SPELL_DRUID_STARSURGE_ENERGIZE,&energizeAmount,0,0,true);
caster->CastCustomSpell(caster, SPELL_DRUID_STARSURGE_ENERGIZE, &energizeAmount, 0, 0, true);
// If the energize was due to 0 power, cast the eclipse marker aura
if (!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER))
caster->CastSpell(caster,SPELL_DRUID_SOLAR_ECLIPSE_MARKER,true);
caster->CastSpell(caster, SPELL_DRUID_SOLAR_ECLIPSE_MARKER, true);
}
else if (!caster->HasAura(SPELL_DRUID_SOLAR_ECLIPSE_MARKER) && caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE_MARKER))
{
energizeAmount = -GetSpellInfo()->Effects[effIndex].BasePoints; // -15
caster->CastCustomSpell(caster,SPELL_DRUID_STARSURGE_ENERGIZE,&energizeAmount,0,0,true);
caster->CastCustomSpell(caster, SPELL_DRUID_STARSURGE_ENERGIZE, &energizeAmount, 0, 0, true);
}
// The energizing effect brought us out of the lunar eclipse, remove the aura
if (caster->HasAura(SPELL_DRUID_LUNAR_ECLIPSE) && caster->GetPower(POWER_ECLIPSE) >= 0)
+4 -4
View File
@@ -465,7 +465,7 @@ class spell_mage_conjure_refreshment : public SpellScriptLoader
class spell_mage_blizzard : public SpellScriptLoader
{
public:
spell_mage_blizzard() : SpellScriptLoader("spell_mage_blizzard") { }
spell_mage_blizzard() : SpellScriptLoader("spell_mage_blizzard") { }
class spell_mage_blizzard_SpellScript : public SpellScript
{
@@ -498,7 +498,7 @@ class spell_mage_blizzard : public SpellScriptLoader
}
};
SpellScript *GetSpellScript() const
SpellScript* GetSpellScript() const
{
return new spell_mage_blizzard_SpellScript();
}
@@ -509,7 +509,7 @@ class spell_mage_blizzard : public SpellScriptLoader
class spell_mage_frostbolt : public SpellScriptLoader
{
public:
spell_mage_frostbolt() : SpellScriptLoader("spell_mage_frostbolt") { }
spell_mage_frostbolt() : SpellScriptLoader("spell_mage_frostbolt") { }
class spell_mage_frostbolt_SpellScript : public SpellScript
{
@@ -534,7 +534,7 @@ class spell_mage_frostbolt : public SpellScriptLoader
}
};
SpellScript *GetSpellScript() const
SpellScript* GetSpellScript() const
{
return new spell_mage_frostbolt_SpellScript();
}
@@ -37,7 +37,7 @@ bool DB2FileLoader::Load(const char *filename, const char *fmt)
data=NULL;
}
FILE * f = fopen(filename, "rb");
FILE* f = fopen(filename, "rb");
if (!f)
return false;
@@ -193,7 +193,7 @@ uint32 DB2FileLoader::GetFormatRecordSize(const char * format, int32* index_pos)
int32 i = -1;
for (uint32 x=0; format[x]; ++x)
{
switch(format[x])
switch (format[x])
{
case FT_FLOAT:
case FT_INT:
@@ -279,7 +279,7 @@ char* DB2FileLoader::AutoProduceData(const char* format, uint32& records, char**
for (uint32 x = 0; x < fieldCount; x++)
{
switch(format[x])
switch (format[x])
{
case FT_FLOAT:
*((float*)(&dataTable[offset])) = getRecord(y).getFloat(x);
@@ -332,8 +332,8 @@ char* DB2FileLoader::AutoProduceStringsArrayHolders(const char* format, char* da
{
uint32 stringFieldNum = 0;
for(uint32 x = 0; x < fieldCount; x++)
switch(format[x])
for (uint32 x = 0; x < fieldCount; x++)
switch (format[x])
{
case FT_FLOAT:
case FT_IND:
@@ -378,7 +378,7 @@ char* DB2FileLoader::AutoProduceStrings(const char* format, char* dataTable)
for (uint32 y =0; y < recordCount; y++)
{
for (uint32 x = 0; x < fieldCount; x++)
switch(format[x])
switch (format[x])
{
case FT_FLOAT:
case FT_IND:
+1 -1
View File
@@ -54,7 +54,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[Stack trace: %s]" ,
sLog->outError(LOG_FILTER_NETWORKIO, "Attempted to %s value with size: " SIZEFMTD " in ByteBuffer (pos: " SIZEFMTD " size: "SIZEFMTD")\n[Stack trace: %s]",
(_add ? "put" : "get"), ValueSize, Pos, Size, trace.c_str());
}