Fix bug with reapplying Advance Shield not properly re-enabling the shield drop timer causing the shield to last permanently on the player character. Add test case to cover this edge case. Release Build 11094.
Assert::AreEqual(int(player->GetMaxHealth()*0.2f),int(player->GetShield()),L"The Advance Shield enchant provides a 20% health player shield.");
game->SetElapsedTime(9.f);
game->OnUserUpdate(9.f);
Assert::AreEqual(0U,player->GetShield(),L"The Advance Shield enchant shield lasts 9 seconds. It should have worn off after that time.");//Double check that reapplication still works for applying shields, since it's possible the timer already existing in the array could be bugged.... Cover this edge case!
}
TEST_METHOD(BattleShoutNoEnchantCheck){
testKey->bHeld=true;//Force the key to be held down for testing purposes.
elseERR(std::format("WARNING! Monster {} containing a mounted animation offset has {} for reading in a vector, when vectors are supposed to only have two values! Please check the \"Mounted Animation Offset\" configuration value for {}",MonsterName,DATA["Monsters"][MonsterName]["Mounted Animation Offset"].GetValueCount(),MonsterName));
AddTimer(shieldType,Timer{std::format("Shield Type {}",int(shieldType)),shieldTimer,[&shieldData,this](){shieldData.second=0U;}});
}elseERR(std::format("WARNING! The shield type {} does not have a corresponding entry! All shields when generated should have made one! THIS SHOULD NOT BE HAPPENING!",int(shieldType)));