ManaPlus
Functions
TmwAthena::QuestRecv Namespace Reference

Functions

void processSetQuestVar (Net::MessageIn &msg)
 
void processPlayerQuests (Net::MessageIn &msg)
 

Function Documentation

◆ processPlayerQuests()

void TmwAthena::QuestRecv::processPlayerQuests ( Net::MessageIn msg)

Definition at line 52 of file questrecv.cpp.

53 {
54  const int count = (msg.readInt16("len") - 4) / 6;
55  for (int f = 0; f < count; f ++)
56  {
57  const int var = msg.readInt16("variable");
58  const int val = msg.readInt32("value");
59  if (questsWindow != nullptr)
60  questsWindow->updateQuest(var, val, 0, 0, 0);
61  if (skillDialog != nullptr)
62  skillDialog->updateQuest(var, val, 0, 0, 0);
63  }
64  if (questsWindow != nullptr)
65  questsWindow->rebuild(false);
66 }
void updateQuest(const int var, const int val1, const int val2, const int val3, const int time1)
void rebuild(const bool playSound)
void updateQuest(const int var, const int val1, const int val2, const int val3, const int time1)
bool msg(InputEvent &event)
Definition: chat.cpp:39
QuestsWindow * questsWindow
SkillDialog * skillDialog
Definition: skilldialog.cpp:66

References Actions::msg(), questsWindow, QuestsWindow::rebuild(), skillDialog, QuestsWindow::updateQuest(), and SkillDialog::updateQuest().

◆ processSetQuestVar()

void TmwAthena::QuestRecv::processSetQuestVar ( Net::MessageIn msg)

Definition at line 36 of file questrecv.cpp.

37 {
38  const int var = msg.readInt16("variable");
39  const int val = msg.readInt32("value");
40  if (questsWindow != nullptr)
41  {
42  questsWindow->updateQuest(var, val, 0, 0, 0);
43  questsWindow->rebuild(true);
44  }
45  if (skillDialog != nullptr)
46  {
47  skillDialog->updateQuest(var, val, 0, 0, 0);
49  }
50 }
void playUpdateEffect(const int id) const
const unsigned int SKILL_VAR_MIN_ID
Definition: skill.h:26

References Actions::msg(), SkillDialog::playUpdateEffect(), questsWindow, QuestsWindow::rebuild(), SKILL_VAR_MIN_ID, skillDialog, QuestsWindow::updateQuest(), and SkillDialog::updateQuest().