Browse Source

Add OptionEntry Test Bard

pull/3594/head
obligaron 4 years ago committed by Anders Jenbo
parent
commit
43841477bc
  1. 2
      Source/DiabloUI/selhero.cpp
  2. 2
      Source/items.cpp
  3. 4
      Source/options.cpp
  4. 2
      Source/options.h

2
Source/DiabloUI/selhero.cpp

@ -139,7 +139,7 @@ void SelheroListSelect(int value)
if (gbIsHellfire) {
vecSelHeroDlgItems.push_back(std::make_unique<UiListItem>(_("Monk"), static_cast<int>(HeroClass::Monk)));
}
if (gbBard || sgOptions.Gameplay.bTestBard) {
if (gbBard || *sgOptions.Gameplay.testBard) {
vecSelHeroDlgItems.push_back(std::make_unique<UiListItem>(_("Bard"), static_cast<int>(HeroClass::Bard)));
}
if (gbBarbarian || sgOptions.Gameplay.bTestBarbarian) {

2
Source/items.cpp

@ -2538,7 +2538,7 @@ bool IsItemAvailable(int i)
|| (
// Bard items are technically Hellfire-exclusive
// but are just normal items with adjusted stats.
sgOptions.Gameplay.bTestBard && IsAnyOf(i, IDI_BARDSWORD, IDI_BARDDAGGER));
*sgOptions.Gameplay.testBard && IsAnyOf(i, IDI_BARDSWORD, IDI_BARDDAGGER));
}
BYTE GetOutlineColor(const Item &item, bool checkReq)

4
Source/options.cpp

@ -275,7 +275,6 @@ void LoadOptions()
sgOptions.Graphics.bShowFPS = (GetIniInt("Graphics", "Show FPS", 0) != 0);
sgOptions.Gameplay.nTickRate = GetIniInt("Game", "Speed", 20);
sgOptions.Gameplay.bTestBard = GetIniBool("Game", "Test Bard", false);
sgOptions.Gameplay.bTestBarbarian = GetIniBool("Game", "Test Barbarian", false);
sgOptions.Gameplay.bExperienceBar = GetIniBool("Game", "Experience Bar", AUTO_PICKUP_DEFAULT(false));
sgOptions.Gameplay.bEnemyHealthBar = GetIniBool("Game", "Enemy Health Bar", false);
@ -425,7 +424,6 @@ void SaveOptions()
SetIniValue("Graphics", "Show FPS", sgOptions.Graphics.bShowFPS);
SetIniValue("Game", "Speed", sgOptions.Gameplay.nTickRate);
SetIniValue("Game", "Test Bard", sgOptions.Gameplay.bTestBard);
SetIniValue("Game", "Test Barbarian", sgOptions.Gameplay.bTestBarbarian);
SetIniValue("Game", "Experience Bar", sgOptions.Gameplay.bExperienceBar);
SetIniValue("Game", "Enemy Health Bar", sgOptions.Gameplay.bEnemyHealthBar);
@ -635,6 +633,7 @@ GameplayOptions::GameplayOptions()
, theoQuest("Theo Quest", OptionEntryFlags::CantChangeInGame | OptionEntryFlags::OnlyHellfire, N_("Theo Quest"), N_("Enable Little Girl quest."), false)
, cowQuest("Cow Quest", OptionEntryFlags::CantChangeInGame | OptionEntryFlags::OnlyHellfire, N_("Cow Quest"), N_("Enable Jersey's quest. Lester the farmer is replaced by the Complete Nut."), false)
, friendlyFire("Friendly Fire", OptionEntryFlags::CantChangeInMultiPlayer, N_("Friendly Fire"), N_("Allow arrow/spell damage between players in multiplayer even when the friendly mode is on."), true)
, testBard("Test Bard", OptionEntryFlags::CantChangeInGame, N_("Test Bard"), N_("Force the Bard character type to appear in the hero selection menu."), false)
{
grabInput.SetValueChangedCallback(OptionGrabInputChanged);
}
@ -646,6 +645,7 @@ std::vector<OptionEntryBase *> GameplayOptions::GetEntries()
&theoQuest,
&cowQuest,
&friendlyFire,
&testBard,
};
}

2
Source/options.h

@ -282,7 +282,7 @@ struct GameplayOptions : OptionCategoryBase {
/** @brief Will players still damage other players in non-PvP mode. */
OptionEntryBoolean friendlyFire;
/** @brief Enable the bard hero class. */
bool bTestBard;
OptionEntryBoolean testBard;
/** @brief Enable the babarian hero class. */
bool bTestBarbarian;
/** @brief Show the current level progress. */

Loading…
Cancel
Save