[Core] Remove unused function parameters (c2647)

This commit is contained in:
stfx 2015-03-26 13:14:45 +00:00 committed by Antz
parent 271b031265
commit d6fc18dc37
13 changed files with 30 additions and 31 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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)
{

View File

@ -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); }

View File

@ -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)

View File

@ -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 */

View File

@ -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();