Skip to content

Commit

Permalink
fixes old radiant quests being incorrectly displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
r-neal-kelly committed May 27, 2021
1 parent 6fca1ac commit a79f44b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 65 deletions.
Binary file modified SKSE/Plugins/doticu_hide_your_quests.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/Plugins/doticu_hide_your_quests/src/consts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ namespace doticu_skylib { namespace doticu_hide_your_quests { namespace Const {

namespace doticu_skylib { namespace doticu_hide_your_quests { namespace Const { namespace Version {

const Version_t<u16> Self() { return Version_t<u16>(1, 0, 0); }
const Version_t<u16> Self() { return Version_t<u16>(1, 0, 1); }

}}}}
14 changes: 3 additions & 11 deletions Source/Plugins/doticu_hide_your_quests/src/mcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,18 +240,10 @@ namespace doticu_skylib { namespace doticu_hide_your_quests {
} else if (Has_Hidden_Objective(it->objective())) {
it->state = Quest_Objective_State_e::DORMANT;
} else {
//temp
// if the instance id does not match the current, and if its misc, we may need to fail or dormant it.
// the game may not be updating state correctly for radiant quests, or it's using this cache to maintain that state, which is silly
//
if (it->objective->quest->quest_type == Quest_Type_e::MISC) {
if (it->instance_id == it->objective->quest->current_instance_id) {
it->state = it->objective->state;
} else {
it->state = Quest_Objective_State_e::DORMANT;
}
} else {
if (it->instance_id == it->objective->quest->current_instance_id) {
it->state = it->objective->state;
} else {
it->state = Quest_Objective_State_e::DORMANT;
}
}
} else {
Expand Down
53 changes: 0 additions & 53 deletions Source/Plugins/doticu_hide_your_quests/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
#include "mcm.h"
#include "plugin.h"

//temp
#include "doticu_skylib/player.h"
#include "doticu_skylib/player_objective.h"
#include "doticu_skylib/quest.h"
#include "doticu_skylib/quest_objective.h"
//

namespace doticu_skylib { namespace doticu_hide_your_quests {

Plugin_t::Plugin_t() :
Expand Down Expand Up @@ -102,29 +95,6 @@ namespace doticu_skylib { namespace doticu_hide_your_quests {

void Plugin_t::On_After_Load_Game(Bool_t did_load_successfully)
{
//temp
{
class Iterator_t :
public Iterator_i<some<Player_Objective_t*>>
{
public:
virtual Iterator_e operator ()(some<Player_Objective_t*> it) override
{
if (it->objective &&
it->objective->quest &&
it->objective->quest->form_id == 0x000CA439 ||
it->objective->quest->form_id == 0x000A34DE) {
it->Log();
}
return Iterator_e::CONTINUE;
}
} iterator;

_MESSAGE("before");
Player_t::Self()->Iterate_Player_Objectives(iterator);
}
//

if (did_load_successfully) {
if (Is_Active()) {
if (Is_Installed()) {
Expand Down Expand Up @@ -156,29 +126,6 @@ namespace doticu_skylib { namespace doticu_hide_your_quests {
}
}
}

//temp
{
class Iterator_t :
public Iterator_i<some<Player_Objective_t*>>
{
public:
virtual Iterator_e operator ()(some<Player_Objective_t*> it) override
{
if (it->objective &&
it->objective->quest &&
it->objective->quest->form_id == 0x000CA439 ||
it->objective->quest->form_id == 0x000A34DE) {
it->Log();
}
return Iterator_e::CONTINUE;
}
} iterator;

_MESSAGE("after");
Player_t::Self()->Iterate_Player_Objectives(iterator);
}
//
}

void Plugin_t::On_Before_Delete_Game(some<const char*> file_path, u32 file_path_length)
Expand Down

0 comments on commit a79f44b

Please sign in to comment.