diff options
| author | Spp <spp@jorge.gr> | 2011-09-29 12:43:05 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2011-09-29 12:43:05 +0200 |
| commit | b16d2245bbd374805d15cdca585e8b42bf139605 (patch) | |
| tree | b7b63c567112e1999a2566611363cf5e83adb1be /src/server/game/Entities/Player | |
| parent | 8b820baa7324d41df264f48e344d62584bff70f8 (diff) | |
Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces
Note: Only affects files with extension "cpp" and "h" under /src/server
Diffstat (limited to 'src/server/game/Entities/Player')
| -rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 64 | ||||
| -rwxr-xr-x | src/server/game/Entities/Player/Player.h | 2 |
2 files changed, 33 insertions, 33 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9b4b8b8251e..579a704bd83 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -151,7 +151,7 @@ PlayerTaxi::PlayerTaxi() void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level) { // class specific initial known nodes - switch(chrClass) + switch (chrClass) { case CLASS_DEATH_KNIGHT: { @@ -162,7 +162,7 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level } // race specific initial known nodes: capital and taxi hub masks - switch(race) + switch (race) { case RACE_HUMAN: SetTaximaskNode(2); break; // Human case RACE_ORC: SetTaximaskNode(23); break; // Orc @@ -178,7 +178,7 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level } // new continent starting masks (It will be accessible only at new map) - switch(Player::TeamForRace(race)) + switch (Player::TeamForRace(race)) { case ALLIANCE: SetTaximaskNode(100); break; case HORDE: SetTaximaskNode(99); break; @@ -1035,7 +1035,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo) GetReputationMgr().SetReputation(sFactionStore.LookupEntry(1077), 42999); // Factions depending on team, like cities and some more stuff - switch(GetTeam()) + switch (GetTeam()) { case ALLIANCE: GetReputationMgr().SetReputation(sFactionStore.LookupEntry(72), 42999); @@ -1132,7 +1132,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo) // special amount for food/drink if (iProto->Class == ITEM_CLASS_CONSUMABLE && iProto->SubClass == ITEM_SUBCLASS_FOOD) { - switch(iProto->Spells[0].SpellCategory) + switch (iProto->Spells[0].SpellCategory) { case SPELL_CATEGORY_FOOD: // food count = getClass() == CLASS_DEATH_KNIGHT ? 10 : 4; @@ -1220,7 +1220,7 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) } // item can't be added - sLog->outError("STORAGE: Can't equip or store initial item %u for race %u class %u , error msg = %u", titem_id, getRace(), getClass(), msg); + sLog->outError("STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(), getClass(), msg); return false; } @@ -2384,13 +2384,13 @@ void Player::ProcessDelayedOperations() ContinueTaxiFlight(); } } - + if (m_DelayedOperations & DELAYED_BG_GROUP_RESTORE) { if (Group *g = GetGroup()) g->SendUpdateToPlayer(GetGUID()); } - + //we have executed ALL delayed ops, so clear the flag m_DelayedOperations = 0; } @@ -2876,7 +2876,7 @@ void Player::SetGMVisible(bool on) bool Player::IsGroupVisibleFor(Player const* p) const { - switch(sWorld->getIntConfig(CONFIG_GROUP_VISIBILITY)) + switch (sWorld->getIntConfig(CONFIG_GROUP_VISIBILITY)) { default: return IsInSameGroupWith(p); case 1: return IsInSameRaidWith(p); @@ -3627,7 +3627,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen disabled_case = true; } - else switch(itr->second->state) + else switch (itr->second->state) { case PLAYERSPELL_UNCHANGED: // known saved spell return false; @@ -3813,7 +3813,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen // lockpicking/runeforging special case, not have ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL ((pSkill->id == SKILL_LOCKPICKING || pSkill->id == SKILL_RUNEFORGING) && _spell_idx->second->max_value == 0)) { - switch(GetSkillRangeType(pSkill, _spell_idx->second->racemask != 0)) + switch (GetSkillRangeType(pSkill, _spell_idx->second->racemask != 0)) { case SKILL_RANGE_LANGUAGE: SetSkill(pSkill->id, GetSkillStep(pSkill->id), 300, 300); @@ -4992,14 +4992,14 @@ void Player::DeleteOldCharacters(uint32 keepDays) { Field* charFields = resultChars->Fetch(); Player::DeleteFromDB(charFields[0].GetUInt64(), charFields[1].GetUInt32(), true, true); - } while(resultChars->NextRow()); + } while (resultChars->NextRow()); } } void Player::SetMovement(PlayerMovementType pType) { WorldPacket data; - switch(pType) + switch (pType) { case MOVE_ROOT: data.Initialize(SMSG_FORCE_MOVE_ROOT, GetPackGUID().size()+4); break; case MOVE_UNROOT: data.Initialize(SMSG_FORCE_MOVE_UNROOT, GetPackGUID().size()+4); break; @@ -5699,7 +5699,7 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa if (!CanModifyStats()) return; - switch(modGroup) + switch (modGroup) { case CRIT_PERCENTAGE: UpdateCritPercentage(BASE_ATTACK); break; case RANGED_CRIT_PERCENTAGE: UpdateCritPercentage(RANGED_ATTACK); break; @@ -6250,7 +6250,7 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType) uint32 weapon_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_WEAPON); - switch(attType) + switch (attType) { case BASE_ATTACK: { @@ -10166,7 +10166,7 @@ Item* Player::GetShield(bool useable) const uint8 Player::GetAttackBySlot(uint8 slot) { - switch(slot) + switch (slot) { case EQUIPMENT_SLOT_MAINHAND: return BASE_ATTACK; case EQUIPMENT_SLOT_OFFHAND: return OFF_ATTACK; @@ -12149,7 +12149,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update) else if (slot == EQUIPMENT_SLOT_OFFHAND) UpdateExpertise(OFF_ATTACK); - switch(slot) + switch (slot) { case EQUIPMENT_SLOT_MAINHAND: case EQUIPMENT_SLOT_OFFHAND: @@ -12307,7 +12307,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update) else if (slot == EQUIPMENT_SLOT_OFFHAND) UpdateExpertise(OFF_ATTACK); // update armor penetration - passive auras may need it - switch(slot) + switch (slot) { case EQUIPMENT_SLOT_MAINHAND: case EQUIPMENT_SLOT_OFFHAND: @@ -13260,7 +13260,7 @@ void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint data << uint64(pItem2 ? pItem2->GetGUID() : 0); data << uint8(0); // bag type subclass, used with EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM and EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2 - switch(msg) + switch (msg) { case EQUIP_ERR_CANT_EQUIP_LEVEL_I: case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW: @@ -13563,7 +13563,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool uint32 enchant_amount = pEnchant->amount[s]; uint32 enchant_spell_id = pEnchant->spellid[s]; - switch(enchant_display_type) + switch (enchant_display_type) { case ITEM_ENCHANTMENT_TYPE_NONE: break; @@ -13864,7 +13864,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool default: sLog->outError("Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type); break; - } /*switch(enchant_display_type)*/ + } /*switch (enchant_display_type)*/ } /*for*/ } @@ -15284,7 +15284,7 @@ bool Player::SatisfyQuestReputation(Quest const* qInfo, bool msg) SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ); return false; } - + // ReputationObjective2 does not seem to be an objective requirement but a requirement // to be able to accept the quest uint32 fIdObj = qInfo->GetRepObjectiveFaction2(); @@ -15863,7 +15863,7 @@ void Player::KilledPlayerCredit() { uint32 reqkill = qInfo->GetPlayersSlain(); uint16 curkill = q_status.m_playercount; - + if (curkill < reqkill) { q_status.m_playercount = curkill + addkillcount; @@ -17122,7 +17122,7 @@ bool Player::isAllowedToLoot(const Creature* creature) { if (!creature->isDead() || !creature->IsDamageEnoughForLootingAndReward()) return false; - + if (HasPendingBind()) return false; @@ -17136,7 +17136,7 @@ bool Player::isAllowedToLoot(const Creature* creature) else if (thisGroup != creature->GetLootRecipientGroup()) return false; - switch(thisGroup->GetLootMethod()) + switch (thisGroup->GetLootMethod()) { case FREE_FOR_ALL: return true; @@ -19295,7 +19295,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent) if (returnreagent) { - switch(pet->GetEntry()) + switch (pet->GetEntry()) { //warlock pets except imp are removed(?) when logging out case 1860: @@ -20336,7 +20336,7 @@ void Player::InitDisplayIds() } uint8 gender = getGender(); - switch(gender) + switch (gender) { case GENDER_FEMALE: SetDisplayId(info->displayId_f); @@ -20872,7 +20872,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot) // if have <CompareColor> use them as count, else use <value> from Condition uint32 _cmp_gem = Condition->CompareColor[i] ? curcount[Condition->CompareColor[i] - 1]: Condition->Value[i]; - switch(Condition->Comparator[i]) + switch (Condition->Comparator[i]) { case 2: // requires less <color> than (<value> || <comparecolor>) gems activate &= (_cur_gem < _cmp_gem) ? true : false; @@ -21594,7 +21594,7 @@ void Player::SendTransferAborted(uint32 mapid, TransferAbortReason reason, uint8 WorldPacket data(SMSG_TRANSFER_ABORTED, 4+2); data << uint32(mapid); data << uint8(reason); // transfer abort reason - switch(reason) + switch (reason) { case TRANSFER_ABORT_INSUF_EXPAN_LVL: case TRANSFER_ABORT_DIFFICULTY: @@ -22509,7 +22509,7 @@ void Player::UpdateAreaDependentAuras(uint32 newArea) if (newArea == 4273 && GetVehicle() && GetPositionX() > 400) // Ulduar { - switch(GetVehicleBase()->GetEntry()) + switch (GetVehicleBase()->GetEntry()) { case 33062: case 33109: @@ -23310,7 +23310,7 @@ void Player::_LoadSkills(PreparedQueryResult result) } // set fixed skill ranges - switch(GetSkillRangeType(pSkill, false)) + switch (GetSkillRangeType(pSkill, false)) { case SKILL_RANGE_LANGUAGE: // 300..300 value = max = 300; @@ -23513,7 +23513,7 @@ void Player::HandleFall(MovementInfo const& movementInfo) } //Z given by moveinfo, LastZ, FallTime, WaterZ, MapZ, Damage, Safefall reduction - sLog->outStaticDebug("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d" , movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall); + sLog->outStaticDebug("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d", movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall); } } RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LANDING); // No fly zone - Parachute diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 65746043894..59522241d49 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1806,7 +1806,7 @@ class Player : public Unit, public GridObject<Player> bool IsInSameGroupWith(Player const* p) const; bool IsInSameRaidWith(Player const* p) const { return p == this || (GetGroup() != NULL && GetGroup() == p->GetGroup()); } void UninviteFromGroup(); - static void RemoveFromGroup(Group* group, uint64 guid, RemoveMethod method = GROUP_REMOVEMETHOD_DEFAULT, uint64 kicker = 0 , const char* reason = NULL); + static void RemoveFromGroup(Group* group, uint64 guid, RemoveMethod method = GROUP_REMOVEMETHOD_DEFAULT, uint64 kicker = 0, const char* reason = NULL); void RemoveFromGroup(RemoveMethod method = GROUP_REMOVEMETHOD_DEFAULT) { RemoveFromGroup(GetGroup(), GetGUID(), method); } void SendUpdateToOutOfRangeGroupMembers(); |
