mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-28 22:45:55 +00:00
feat(Core/Config): Infinite ammo config setting (#22969)
Co-authored-by: sogladev <sogladev@gmail.com>
This commit is contained in:
@@ -5422,15 +5422,16 @@ void Spell::TakeAmmo()
|
||||
// decrease durability for non-stackable throw weapon
|
||||
m_caster->ToPlayer()->DurabilityPointLossForEquipSlot(EQUIPMENT_SLOT_RANGED);
|
||||
}
|
||||
else
|
||||
else if (!sWorld->getBoolConfig(CONFIG_ENABLE_INFINITEAMMO))
|
||||
{
|
||||
// decrease items amount for stackable throw weapon
|
||||
uint32 count = 1;
|
||||
m_caster->ToPlayer()->DestroyItemCount(pItem, count, true);
|
||||
}
|
||||
}
|
||||
else if (uint32 ammo = m_caster->ToPlayer()->GetUInt32Value(PLAYER_AMMO_ID))
|
||||
m_caster->ToPlayer()->DestroyItemCount(ammo, 1, true);
|
||||
else if (!sWorld->getBoolConfig(CONFIG_ENABLE_INFINITEAMMO))
|
||||
if (uint32 ammo = m_caster->ToPlayer()->GetUInt32Value(PLAYER_AMMO_ID))
|
||||
m_caster->ToPlayer()->DestroyItemCount(ammo, 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user