Refactored Map Data access so that other locations in code no longer had write abilities to the map data. Changed permanent exit zone spawning to a temporary. Fix equipment items being duplicated due to sorted inventory not being in sync with actual inventory.
This commit is contained in:
@@ -51,7 +51,7 @@ void State_LevelComplete::OnStateChange(GameState*prevState){
|
||||
}
|
||||
Component<MenuLabel>(MenuType::LEVEL_COMPLETE,"Level EXP Gain Outline")->SetLabel(std::format("+{} Exp",game->GetPlayer()->GetAccumulatedXP()));
|
||||
game->GetPlayer()->AddXP(game->GetPlayer()->GetAccumulatedXP());
|
||||
for(const ItemMapData&data:game->GetCurrentMap().stageLoot){
|
||||
for(const ItemMapData&data:game->GetCurrentMap().GetStageLoot()){
|
||||
uint8_t amountDiff=data.maxAmt-data.minAmt;
|
||||
uint8_t randomAmt=data.maxAmt;
|
||||
if(amountDiff>0){ //This check avoids division by zero.
|
||||
|
||||
Reference in New Issue
Block a user