OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Macros | Functions | Variables
NPCTopics.cpp File Reference
#include "NPCTopics.h"
#include <utility>
#include <string>
#include <vector>
#include "Engine/ArenaEnumFunctions.h"
#include "Engine/AssetsManager.h"
#include "Engine/Engine.h"
#include "Engine/Graphics/Sprites.h"
#include "Engine/Graphics/Outdoor.h"
#include "Engine/Graphics/Indoor.h"
#include "Engine/Graphics/Viewport.h"
#include "Engine/Graphics/Renderer/Renderer.h"
#include "Engine/Objects/Decoration.h"
#include "Engine/Localization.h"
#include "Engine/Objects/Actor.h"
#include "Engine/Objects/NPC.h"
#include "Engine/Objects/CharacterEnumFunctions.h"
#include "Engine/Objects/MonsterEnumFunctions.h"
#include "Engine/Party.h"
#include "Engine/Tables/ItemTable.h"
#include "Engine/Events/Processor.h"
#include "Engine/Random/Random.h"
#include "GUI/GUIWindow.h"
#include "GUI/GUIMessageQueue.h"
#include "GUI/UI/UIHouses.h"
#include "GUI/UI/UIStatusBar.h"
#include "Media/Audio/AudioPlayer.h"
#include "Utility/String/Ascii.h"

Macros

#define ADD_NPC_SCRIPTED_DIALOGUE(EVENT_ID, MSG_PARAM)
 

Functions

DialogueId arenaMainDialogue ()
 
void prepareArenaFight (ArenaLevel level)
 
void oracleDialogue ()
 Oracle's 'I lost it!' dialog option. More...
 
const std::string & joinGuildOptionString ()
 
std::string masteryTeacherOptionString ()
 
std::string npcDialogueOptionString (DialogueId topic, NPCData *npcData)
 
std::vector< DialogueIdprepareScriptedNPCDialogueTopics (NPCData *npcData)
 
DialogueId handleScriptedNPCTopicSelection (DialogueId topic, NPCData *npcData)
 
std::vector< DialogueIdlistNPCDialogueOptions (DialogueId topic)
 
void selectSpecialNPCTopicSelection (DialogueId topic, NPCData *npcData)
 

Variables

int membershipOrTrainingApproved
 
int topicEventId
 
DialogueId guildMembershipNPCTopicId
 
int gold_transaction_amount
 
static constexpr std::array< Vec2f, 20 > pMonsterArenaPlacements
 
static constexpr IndexedArray< int, GUILD_FIRST, GUILD_LASTpriceForMembership
 
static constexpr IndexedArray< int, CHARACTER_SKILL_FIRST, CHARACTER_SKILL_LASTexpertSkillMasteryCost
 
static constexpr IndexedArray< int, CHARACTER_SKILL_FIRST, CHARACTER_SKILL_LASTmasterSkillMasteryCost
 
static constexpr IndexedArray< int, CHARACTER_SKILL_FIRST, CHARACTER_SKILL_LASTgrandmasterSkillMasteryCost
 
static constexpr std::array< std::pair< QuestBit, ItemId >, 27 > _4F0882_evt_VAR_PlayerItemInHands_vals
 

Macro Definition Documentation

◆ ADD_NPC_SCRIPTED_DIALOGUE

#define ADD_NPC_SCRIPTED_DIALOGUE (   EVENT_ID,
  MSG_PARAM 
)
Value:
if (EVENT_ID) { \
if (optionList.size() < 4) { \
int res = npcDialogueEventProcessor(EVENT_ID); \
if (res == 1 || res == 2) { \
optionList.push_back(MSG_PARAM); \
} \
} \
}
bool npcDialogueEventProcessor(int eventId, int startStep)
Definition: Processor.cpp:177

Function Documentation

◆ arenaMainDialogue()

DialogueId arenaMainDialogue ( )

◆ handleScriptedNPCTopicSelection()

DialogueId handleScriptedNPCTopicSelection ( DialogueId  topic,
NPCData npcData 
)

◆ joinGuildOptionString()

const std::string & joinGuildOptionString ( )
Original binary offset:
0x4B29F2

◆ listNPCDialogueOptions()

std::vector< DialogueId > listNPCDialogueOptions ( DialogueId  topic)

◆ masteryTeacherOptionString()

std::string masteryTeacherOptionString ( )
Original binary offset:
0x4B254D

◆ npcDialogueOptionString()

std::string npcDialogueOptionString ( DialogueId  topic,
NPCData npcData 
)

◆ oracleDialogue()

void oracleDialogue ( )

Oracle's 'I lost it!' dialog option.

Original binary offset:
0x004B1ECE.

◆ prepareArenaFight()

void prepareArenaFight ( ArenaLevel  level)
Original binary offset:
0x4BC109

◆ prepareScriptedNPCDialogueTopics()

std::vector< DialogueId > prepareScriptedNPCDialogueTopics ( NPCData npcData)

◆ selectSpecialNPCTopicSelection()

void selectSpecialNPCTopicSelection ( DialogueId  topic,
NPCData npcData 
)

Variable Documentation

◆ _4F0882_evt_VAR_PlayerItemInHands_vals

constexpr std::array<std::pair<QuestBit, ItemId>, 27> _4F0882_evt_VAR_PlayerItemInHands_vals
staticconstexpr
Initial value:
= {{
}}
@ ITEM_QUEST_LICH_JAR_EMPTY
@ ITEM_SPELLBOOK_DIVINE_INTERVENTION
@ ITEM_MESSAGE_MAP_TO_EVENMORN_ISLAND
@ ITEM_QUEST_ALTAR_PIECE_2
@ ITEM_SPECIAL_THE_PERFECT_BOW
@ ITEM_QUEST_DRAGON_EGG
@ ITEM_QUEST_GOLEM_LEFT_ARM
@ ITEM_QUEST_HEART_OF_THE_WOOD
@ ITEM_SPECIAL_LADY_CARMINES_DAGGER
@ ITEM_MESSAGE_CIPHER
@ ITEM_QUEST_VASE
@ ITEM_QUEST_WETSUIT
@ ITEM_MESSAGE_SCROLL_OF_WAVES
@ ITEM_QUEST_OSCILLATION_OVERTHRUSTER
@ ITEM_QUEST_ALTAR_PIECE_1
@ ITEM_QUEST_GOLEM_LEFT_LEG
@ ITEM_QUEST_GOLEM_RIGHT_LEG
@ ITEM_QUEST_ABBEY_NORMAL_GOLEM_HEAD
@ ITEM_QUEST_ELIXIR
@ ITEM_QUEST_GOLEM_HEAD
@ ITEM_QUEST_CASE_OF_SOUL_JARS
@ ITEM_QUEST_GOLEM_CHEST
@ ITEM_QUEST_ZOKARR_IVS_SKULL
@ ITEM_QUEST_WORN_BELT
@ ITEM_QUEST_LICH_JAR_FULL
@ ITEM_QUEST_GOLEM_RIGHT_ARM
@ ITEM_QUEST_CONTROL_CUBE

◆ expertSkillMasteryCost

constexpr IndexedArray<int, CHARACTER_SKILL_FIRST, CHARACTER_SKILL_LAST> expertSkillMasteryCost
staticconstexpr

◆ gold_transaction_amount

int gold_transaction_amount

◆ grandmasterSkillMasteryCost

constexpr IndexedArray<int, CHARACTER_SKILL_FIRST, CHARACTER_SKILL_LAST> grandmasterSkillMasteryCost
staticconstexpr

◆ guildMembershipNPCTopicId

DialogueId guildMembershipNPCTopicId

◆ masterSkillMasteryCost

constexpr IndexedArray<int, CHARACTER_SKILL_FIRST, CHARACTER_SKILL_LAST> masterSkillMasteryCost
staticconstexpr

◆ membershipOrTrainingApproved

int membershipOrTrainingApproved

◆ pMonsterArenaPlacements

constexpr std::array<Vec2f, 20> pMonsterArenaPlacements
staticconstexpr
Initial value:
= {{
Vec2f(1524, 8332), Vec2f(2186, 8844),
Vec2f(3219, 9339), Vec2f(4500, 9339),
Vec2f(5323, 9004), Vec2f(0x177D, 0x2098),
Vec2f(0x50B, 0x1E15), Vec2f(0x18FF, 0x1E15),
Vec2f(0x50B, 0xD69), Vec2f(0x18FF, 0x1B15),
Vec2f(0x50B, 0x1021), Vec2f(0x18FF, 0x1848),
Vec2f(0x50B, 0x12D7), Vec2f(0x18FF, 0x15A3),
Vec2f(0x50B, 0x14DB), Vec2f(0x18FF, 0x12D7),
Vec2f(0x50B, 0x1848), Vec2f(0x18FF, 0x1021),
Vec2f(0x50B, 0x1B15), Vec2f(0x18FF, 0xD69),
}}
Vec2< float > Vec2f
Definition: Vec.h:69

◆ priceForMembership

constexpr IndexedArray<int, GUILD_FIRST, GUILD_LAST> priceForMembership
staticconstexpr
Initial value:
= {{
{GUILD_OF_SELF, 100},
{GUILD_OF_AIR, 50},
{GUILD_OF_LIGHT, 1000},
{GUILD_OF_DARK, 1000}
}}
@ GUILD_OF_SPIRIT
@ GUILD_OF_LIGHT
@ GUILD_OF_SELF
@ GUILD_OF_MIND
@ GUILD_OF_WATER
@ GUILD_OF_BODY
@ GUILD_OF_ELEMENTS
@ GUILD_OF_FIRE
@ GUILD_OF_AIR
@ GUILD_OF_EARTH
@ GUILD_OF_DARK

◆ topicEventId

int topicEventId