diff --git a/src/game/AuctionHouseBot/AuctionHouseBot.cpp b/src/game/AuctionHouseBot/AuctionHouseBot.cpp index 8e893efb..4214748b 100644 --- a/src/game/AuctionHouseBot/AuctionHouseBot.cpp +++ b/src/game/AuctionHouseBot/AuctionHouseBot.cpp @@ -374,7 +374,7 @@ class AuctionBotSeller : public AuctionBotAgent * @param stackcnt The stackcnt. * @param itemQuality The item quality. */ - void SetPricesOfItem(ItemPrototype const* itemProto, AHB_Seller_Config& config, uint32& buyp, uint32& bidp, uint32 stackcnt, ItemQualities itemQuality); + void SetPricesOfItem(AHB_Seller_Config& config, uint32& buyp, uint32& bidp, uint32 stackcnt, ItemQualities itemQuality); /** * Loads the items quantity. * @@ -1600,7 +1600,7 @@ bool AuctionBotSeller::getRandomArray(AHB_Seller_Config& config, RandomArray& ra } // Set items price. All important value are passed by address. -void AuctionBotSeller::SetPricesOfItem(ItemPrototype const* /*itemProto*/, AHB_Seller_Config& config, uint32& buyp, uint32& bidp, uint32 stackcnt, ItemQualities itemQuality) +void AuctionBotSeller::SetPricesOfItem(AHB_Seller_Config& config, uint32& buyp, uint32& bidp, uint32 stackcnt, ItemQualities itemQuality) { double temp_buyp = buyp * stackcnt * (itemQuality < MAX_AUCTION_QUALITY ? config.GetPriceRatioPerQuality(AuctionQuality(itemQuality)) : 1) ; @@ -1739,7 +1739,7 @@ void AuctionBotSeller::addNewAuctions(AHB_Seller_Config& config) else { buyoutPrice = prototype->SellPrice * item->GetCount(); } // Price of items are set here - SetPricesOfItem(prototype, config, buyoutPrice, bidPrice, stackCount, ItemQualities(prototype->Quality)); + SetPricesOfItem(config, buyoutPrice, bidPrice, stackCount, ItemQualities(prototype->Quality)); auctionHouse->AddAuction(ahEntry, item, urand(config.GetMinTime(), config.GetMaxTime()) * HOUR, bidPrice, buyoutPrice); } diff --git a/src/game/ChatCommands/Level3.cpp b/src/game/ChatCommands/Level3.cpp index b3b98ff0..1c18a74f 100644 --- a/src/game/ChatCommands/Level3.cpp +++ b/src/game/ChatCommands/Level3.cpp @@ -3429,7 +3429,7 @@ bool ChatHandler::HandleDamageCommand(char* args) { player->DealDamage(target, damage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); if (target != player) - { player->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, 1, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_NORMAL, 0); } + { player->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, SPELL_SCHOOL_MASK_NORMAL, damage, 0, 0, VICTIMSTATE_NORMAL, 0); } return true; } @@ -3460,7 +3460,7 @@ bool ChatHandler::HandleDamageCommand(char* args) player->DealDamageMods(target, damage, &absorb); player->DealDamage(target, damage, NULL, DIRECT_DAMAGE, schoolmask, NULL, false); - player->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, 1, schoolmask, damage, absorb, resist, VICTIMSTATE_NORMAL, 0); + player->SendAttackStateUpdate(HITINFO_NORMALSWING2, target, schoolmask, damage, absorb, resist, VICTIMSTATE_NORMAL, 0); return true; } diff --git a/src/game/Object/Bag.cpp b/src/game/Object/Bag.cpp index cf962599..55e660d6 100644 --- a/src/game/Object/Bag.cpp +++ b/src/game/Object/Bag.cpp @@ -135,7 +135,7 @@ uint32 Bag::GetFreeSlots() const return slots; } -void Bag::RemoveItem(uint8 slot, bool /*update*/) +void Bag::RemoveItem(uint8 slot) { MANGOS_ASSERT(slot < MAX_BAG_SIZE); @@ -146,7 +146,7 @@ void Bag::RemoveItem(uint8 slot, bool /*update*/) SetGuidValue(CONTAINER_FIELD_SLOT_1 + (slot * 2), ObjectGuid()); } -void Bag::StoreItem(uint8 slot, Item* pItem, bool /*update*/) +void Bag::StoreItem(uint8 slot, Item* pItem) { MANGOS_ASSERT(slot < MAX_BAG_SIZE); diff --git a/src/game/Object/Bag.h b/src/game/Object/Bag.h index f3bd6eea..ac0c88c6 100644 --- a/src/game/Object/Bag.h +++ b/src/game/Object/Bag.h @@ -45,8 +45,8 @@ class Bag : public Item bool Create(uint32 guidlow, uint32 itemid, Player const* owner) override; void Clear(); - void StoreItem(uint8 slot, Item* pItem, bool update); - void RemoveItem(uint8 slot, bool update); + void StoreItem(uint8 slot, Item* pItem); + void RemoveItem(uint8 slot); Item* GetItemByPos(uint8 slot) const; Item* GetItemByEntry(uint32 item) const; diff --git a/src/game/Object/Creature.cpp b/src/game/Object/Creature.cpp index b946b5f2..dcccc9ca 100644 --- a/src/game/Object/Creature.cpp +++ b/src/game/Object/Creature.cpp @@ -396,7 +396,7 @@ bool Creature::UpdateEntry(uint32 Entry, Team team, const CreatureData* data /*= SetSheath(SHEATH_STATE_MELEE); SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_AURAS); - SelectLevel(GetCreatureInfo(), preserveHPAndPower ? GetHealthPercent() : 100.0f, 100.0f); + SelectLevel(GetCreatureInfo(), preserveHPAndPower ? GetHealthPercent() : 100.0f); if (team == HORDE) { setFaction(GetCreatureInfo()->FactionHorde); } @@ -1185,7 +1185,7 @@ void Creature::SaveToDB(uint32 mapid) WorldDatabase.CommitTransaction(); } -void Creature::SelectLevel(const CreatureInfo* cinfo, float percentHealth, float /*percentMana*/) +void Creature::SelectLevel(const CreatureInfo* cinfo, float percentHealth /*= 100.0f*/) { uint32 rank = IsPet() ? 0 : cinfo->Rank; // TODO :: IsPet probably not needed here diff --git a/src/game/Object/Creature.h b/src/game/Object/Creature.h index 2f6fee37..3a1a83a6 100644 --- a/src/game/Object/Creature.h +++ b/src/game/Object/Creature.h @@ -506,7 +506,7 @@ class Creature : public Unit bool Create(uint32 guidlow, CreatureCreatePos& cPos, CreatureInfo const* cinfo, Team team = TEAM_NONE, const CreatureData* data = NULL, GameEventCreatureData const* eventData = NULL); bool LoadCreatureAddon(bool reload); - void SelectLevel(const CreatureInfo* cinfo, float percentHealth = 100.0f, float percentMana = 100.0f); + void SelectLevel(const CreatureInfo* cinfo, float percentHealth = 100.0f); void LoadEquipment(uint32 equip_entry, bool force = false); bool HasStaticDBSpawnData() const; // listed in `creature` table and have fixed in DB guid diff --git a/src/game/Object/Player.cpp b/src/game/Object/Player.cpp index 9d490c7b..381b204c 100644 --- a/src/game/Object/Player.cpp +++ b/src/game/Object/Player.cpp @@ -9738,7 +9738,7 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool } else if (Bag* pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0, bag)) { - pBag->StoreItem(slot, pItem, update); + pBag->StoreItem(slot, pItem); if (IsInWorld() && update) { pItem->AddToWorld(); @@ -10018,7 +10018,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update) { Bag* pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0, bag); if (pBag) - { pBag->RemoveItem(slot, update); } + pBag->RemoveItem(slot); } pItem->SetGuidValue(ITEM_FIELD_CONTAINED, ObjectGuid()); // pItem->SetGuidValue(ITEM_FIELD_OWNER, ObjectGuid()); not clear owner at remove (it will be set at store). This used in mail and auction code @@ -10124,7 +10124,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update) m_items[slot] = NULL; } else if (Bag* pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0, bag)) - { pBag->RemoveItem(slot, update); } + pBag->RemoveItem(slot); if (IsInWorld() && update) { @@ -10719,8 +10719,8 @@ void Player::SwapItem(uint16 src, uint16 dst) if (!bagItem) { continue; } - fullBag->RemoveItem(i, true); - emptyBag->StoreItem(count, bagItem, true); + fullBag->RemoveItem(i); + emptyBag->StoreItem(count, bagItem); bagItem->SetState(ITEM_CHANGED, this); ++count; @@ -12267,7 +12267,7 @@ void Player::RewardQuest(Quest const* pQuest, uint32 reward, Object* questGiver, { q_status.uState = QUEST_CHANGED; } if (announce) - { SendQuestReward(pQuest, xp, questGiver); } + SendQuestReward(pQuest, xp); bool handled = false; @@ -13275,7 +13275,7 @@ void Player::SendQuestCompleteEvent(uint32 quest_id) } } -void Player::SendQuestReward(Quest const* pQuest, uint32 XP, Object* /*questGiver*/) +void Player::SendQuestReward(Quest const* pQuest, uint32 XP) { uint32 questid = pQuest->GetQuestId(); DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid); diff --git a/src/game/Object/Player.h b/src/game/Object/Player.h index f09fdfe3..c2850acf 100644 --- a/src/game/Object/Player.h +++ b/src/game/Object/Player.h @@ -1363,7 +1363,7 @@ class Player : public Unit bool CanShareQuest(uint32 quest_id) const; void SendQuestCompleteEvent(uint32 quest_id); - void SendQuestReward(Quest const* pQuest, uint32 XP, Object* questGiver); + void SendQuestReward(Quest const* pQuest, uint32 XP); void SendQuestFailed(uint32 quest_id); void SendQuestTimerFailed(uint32 quest_id); void SendCanTakeQuestResponse(uint32 msg) const; diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp index aa028cdc..54cba164 100644 --- a/src/game/Object/Unit.cpp +++ b/src/game/Object/Unit.cpp @@ -3782,7 +3782,7 @@ void Unit::RemoveAura(uint32 spellId, SpellEffectIndex effindex, Aura* except) { ++iter; } } } -void Unit::RemoveAurasByCasterSpell(uint32 spellId, ObjectGuid casterGuid, AuraRemoveMode /*mode*/ /*=AURA_REMOVE_BY_DEFAULT*/) +void Unit::RemoveAurasByCasterSpell(uint32 spellId, ObjectGuid casterGuid) { SpellAuraHolderBounds spair = GetSpellAuraHolderBounds(spellId); for (SpellAuraHolderMap::iterator iter = spair.first; iter != spair.second;) @@ -4539,7 +4539,7 @@ void Unit::SendAttackStateUpdate(CalcDamageInfo* damageInfo) SendMessageToSet(&data, true); /**/ } -void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 /*SwingType*/, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount) +void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount) { CalcDamageInfo dmgInfo; dmgInfo.HitInfo = HitInfo; @@ -8638,7 +8638,7 @@ void Unit::SetConfused(bool apply, ObjectGuid casterGuid, uint32 spellID) { ((Player*)this)->SetClientControl(this, !apply); } } -void Unit::SetFeignDeath(bool apply, ObjectGuid casterGuid, uint32 /*spellID*/) +void Unit::SetFeignDeath(bool apply, ObjectGuid casterGuid /*= ObjectGuid()*/) { if (apply) { diff --git a/src/game/Object/Unit.h b/src/game/Object/Unit.h index b00ef47f..18090b00 100644 --- a/src/game/Object/Unit.h +++ b/src/game/Object/Unit.h @@ -2745,7 +2745,6 @@ class Unit : public WorldObject * that are needed instead of giving them through \ref CalcDamageInfo * @param HitInfo hit information as in the \ref CalcDamageInfo::HitInfo * @param target the target of the attack - * @param SwingType the swingtype, need to know what this is * @param damageSchoolMask the damageschoolmask as the one from: * \ref CalcDamageInfo::damageSchoolMask * @param Damage the damage that was done @@ -2755,7 +2754,7 @@ class Unit : public WorldObject * @param BlockedAmount how much of the damage that was blocked * \todo What's the swingtype for? */ - void SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount); + void SendAttackStateUpdate(uint32 HitInfo, Unit* target, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount); /** * Used to send a update to the combat log for all \ref Player/\ref Unit s in the vicinity. * @param log Info about who/what did damage to who and how etc, data needed for the packet @@ -3249,7 +3248,7 @@ class Unit : public WorldObject * @param casterGuid \ref ObjectGuid of the caster * @param mode reason for removal */ - void RemoveAurasByCasterSpell(uint32 spellId, ObjectGuid casterGuid, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT); + void RemoveAurasByCasterSpell(uint32 spellId, ObjectGuid casterGuid); /** * Removes all \ref Aura s caused by a certain spell because it was canceled. * @param spellId id of the \ref Spell causing the \ref Aura s you would like to remove @@ -3619,7 +3618,7 @@ class Unit : public WorldObject void SetFeared(bool apply, ObjectGuid casterGuid = ObjectGuid(), uint32 spellID = 0, uint32 time = 0); void SetConfused(bool apply, ObjectGuid casterGuid = ObjectGuid(), uint32 spellID = 0); - void SetFeignDeath(bool apply, ObjectGuid casterGuid = ObjectGuid(), uint32 spellID = 0); + void SetFeignDeath(bool apply, ObjectGuid casterGuid = ObjectGuid()); void AddComboPointHolder(uint32 lowguid) { m_ComboPointHolders.insert(lowguid); } void RemoveComboPointHolder(uint32 lowguid) { m_ComboPointHolders.erase(lowguid); } diff --git a/src/game/WorldHandlers/SpellAuras.cpp b/src/game/WorldHandlers/SpellAuras.cpp index 0af7ed9f..1685c6a5 100644 --- a/src/game/WorldHandlers/SpellAuras.cpp +++ b/src/game/WorldHandlers/SpellAuras.cpp @@ -2335,7 +2335,7 @@ void Aura::HandleFeignDeath(bool apply, bool Real) if (!Real) { return; } - GetTarget()->SetFeignDeath(apply, GetCasterGuid(), GetId()); + GetTarget()->SetFeignDeath(apply, GetCasterGuid()); } void Aura::HandleAuraModDisarm(bool apply, bool Real) diff --git a/src/shared/Utilities/Timer.h b/src/shared/Utilities/Timer.h index dc82eb38..6a18dab8 100644 --- a/src/shared/Utilities/Timer.h +++ b/src/shared/Utilities/Timer.h @@ -101,7 +101,7 @@ class WorldTimer * @param savetime * @return uint32 */ - static uint32 getMSTime_internal(bool savetime = false); + static uint32 getMSTime_internal(); static uint32 m_iTime; /**< TODO */ static uint32 m_iPrevTime; /**< TODO */ diff --git a/src/shared/Utilities/Util.cpp b/src/shared/Utilities/Util.cpp index c23d44b4..96fc444c 100644 --- a/src/shared/Utilities/Util.cpp +++ b/src/shared/Utilities/Util.cpp @@ -47,7 +47,7 @@ uint32 WorldTimer::tick() m_iPrevTime = m_iTime; // get the new one and don't forget to persist current system time in m_SystemTickTime - m_iTime = WorldTimer::getMSTime_internal(true); + m_iTime = WorldTimer::getMSTime_internal(); // return tick diff return getMSTimeDiff(m_iPrevTime, m_iTime); @@ -58,7 +58,7 @@ uint32 WorldTimer::getMSTime() return getMSTime_internal(); } -uint32 WorldTimer::getMSTime_internal(bool /*savetime*/ /*= false*/) +uint32 WorldTimer::getMSTime_internal() { // get current time const ACE_Time_Value currTime = ACE_OS::gettimeofday();