Skip to content

Commit

Permalink
Added more examples for mission files, HM todo
Browse files Browse the repository at this point in the history
  • Loading branch information
3vcloud committed Nov 6, 2023
1 parent 3edf7a9 commit 25d2264
Showing 1 changed file with 42 additions and 2 deletions.
44 changes: 42 additions & 2 deletions GWToolboxdll/Windows/CompletionWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ namespace {

wchar_t last_player_name[20];

void GetOutpostIcons(GW::Constants::MapID map_id, WorldMapIcon icons_out[4], uint8_t mission_state) {
void GetOutpostIcons(GW::Constants::MapID map_id, WorldMapIcon icons_out[4], uint8_t mission_state, bool is_hard_mode = false) {
icons_out = { 0 };
const auto area_info = GW::Map::GetMapInfo(map_id);
uint32_t icon_idx = 0;
(is_hard_mode); // TODO: Change these icons out for Hard Mode
switch (area_info->continent) {
case GW::Continent::Kryta: {
switch (area_info->type) {
Expand All @@ -121,6 +122,45 @@ namespace {
break;
}
} break;
case GW::Continent::Cantha: {
switch (area_info->type) {
case GW::RegionType::CooperativeMission:
icons_out[icon_idx++] = WorldMapIcon::Cantha_Mission;
if ((mission_state & ToolboxUtils::MissionState::Primary) != 0)
icons_out[icon_idx++] = WorldMapIcon::Cantha_CompletePrimary;
if((mission_state & ToolboxUtils::MissionState::Expert) != 0)
icons_out[icon_idx++] = WorldMapIcon::Cantha_CompleteExpert;
if((mission_state & ToolboxUtils::MissionState::Expert) != 0)
icons_out[icon_idx++] = WorldMapIcon::Cantha_CompleteMaster;
break;
}
} break;
case GW::Continent::Elona: {
switch (area_info->type) {
case GW::RegionType::CooperativeMission:
icons_out[icon_idx++] = WorldMapIcon::Elona_Mission;
if ((mission_state & ToolboxUtils::MissionState::Primary) != 0)
icons_out[icon_idx++] = WorldMapIcon::Elona_CompletePrimary;
if((mission_state & ToolboxUtils::MissionState::Expert) != 0)
icons_out[icon_idx++] = WorldMapIcon::Elona_CompleteExpert;
if((mission_state & ToolboxUtils::MissionState::Expert) != 0)
icons_out[icon_idx++] = WorldMapIcon::Elona_CompleteMaster;
break;
}
} break;
case GW::Continent::RealmOfTorment: {
switch (area_info->type) {
case GW::RegionType::CooperativeMission:
icons_out[icon_idx++] = WorldMapIcon::Elona_Mission;
if ((mission_state & ToolboxUtils::MissionState::Primary) != 0)
icons_out[icon_idx++] = WorldMapIcon::Elona_CompletePrimary;
if((mission_state & ToolboxUtils::MissionState::Expert) != 0)
icons_out[icon_idx++] = WorldMapIcon::Elona_CompleteExpert;
if((mission_state & ToolboxUtils::MissionState::Expert) != 0)
icons_out[icon_idx++] = WorldMapIcon::Elona_CompleteMaster;
break;
}
} break;
}
}

Expand Down Expand Up @@ -727,7 +767,7 @@ void Mission::CheckProgress(const std::wstring& player_name)

mission_state = ToolboxUtils::GetMissionState(outpost, complete_arr, bonus_arr);

GetOutpostIcons(outpost, outpost_icons, mission_state);
GetOutpostIcons(outpost, outpost_icons, mission_state, hard_mode);
}

IDirect3DTexture9* Mission::GetMissionImage()
Expand Down

0 comments on commit 25d2264

Please sign in to comment.