Skip to content

Commit

Permalink
Fixed dialogs parsing
Browse files Browse the repository at this point in the history
# Conflicts:
#	Source/Common/Dialogs.cpp
#	Source/Common/Dialogs.h
  • Loading branch information
cvet committed Jan 23, 2025
1 parent 18f7226 commit 849544f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Source/Common/Dialogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ auto DialogManager::LoadDemandResult(istringstream& input, bool is_demand) -> Di
NON_CONST_METHOD_HINT();

uint8 who = DR_WHO_PLAYER;
char oper = '=';
uint8 oper = '=';
int values_count = 0;
string svalue;
int ivalue = 0;
Expand Down Expand Up @@ -517,12 +517,12 @@ auto DialogManager::GetWho(uint8 who) const -> uint8
return DR_WHO_PLAYER;
}
if (who == 'N' || who == 'n') {
return DR_WHO_PLAYER;
return DR_WHO_NPC;
}
return DR_WHO_NONE;
}

auto DialogManager::CheckOper(char oper) const -> bool
auto DialogManager::CheckOper(uint8 oper) const -> bool
{
STACK_TRACE_ENTRY();

Expand Down
4 changes: 2 additions & 2 deletions Source/Common/Dialogs.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct DialogAnswerReq
hstring ParamHash {};
hstring AnswerScriptFuncName {};
bool NoRecheck {};
char Op {};
uint8 Op {};
uint8 ValuesCount {};
int Value {};
int ValueExt[5] {};
Expand Down Expand Up @@ -146,7 +146,7 @@ class DialogManager final
private:
[[nodiscard]] auto GetDrType(string_view str) const -> uint8;
[[nodiscard]] auto GetWho(uint8 who) const -> uint8;
[[nodiscard]] auto CheckOper(char oper) const -> bool;
[[nodiscard]] auto CheckOper(uint8 oper) const -> bool;

auto ParseDialog(string_view pack_name, string_view data) -> DialogPack*;
auto LoadDemandResult(istringstream& input, bool is_demand) -> DialogAnswerReq;
Expand Down

0 comments on commit 849544f

Please sign in to comment.