annotate NPC.h @ 317:e41fe9cf3613

Merge
author Nomad
date Wed, 20 Feb 2013 01:21:59 +0200
parents 0ea5fbd16edb
children 95be2dcecadf
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4 struct NPCTopic
Ritor1
parents:
diff changeset
5 {
Ritor1
parents:
diff changeset
6 const char *pTopic;
Ritor1
parents:
diff changeset
7 const char *pText;
Ritor1
parents:
diff changeset
8 };
Ritor1
parents:
diff changeset
9
Ritor1
parents:
diff changeset
10 extern NPCTopic pNPCTopics[789];
Ritor1
parents:
diff changeset
11
Ritor1
parents:
diff changeset
12
Ritor1
parents:
diff changeset
13 /* 136 */
Ritor1
parents:
diff changeset
14 #pragma pack(push, 1)
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
15 struct NPCData //4Ch
0
Ritor1
parents:
diff changeset
16 {
248
37dcbe8f3cca Dialogue stuff
Nomad
parents: 237
diff changeset
17 inline bool Hired() {return uFlags & 0x80;}
37dcbe8f3cca Dialogue stuff
Nomad
parents: 237
diff changeset
18
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
19 char *pName; //0
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
20 unsigned int uPortraitID; //4
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
21 unsigned int uFlags; //8 // & 0x80 no greeting on dialogue start; looks like hired
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
22 int fame; //c
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
23 int rep; //10
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
24 unsigned int Location2D; //14
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
25 unsigned int uProfession; //18
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
26 int greet; //1c
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
27 int joins; //20
0
Ritor1
parents:
diff changeset
28 int field_24;
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
29 unsigned int evt_A; //28
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
30 unsigned int evt_B; //2c evtb
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
31 unsigned int evt_C; // 30 evtc
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
32 unsigned int evt_D; //34
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
33 unsigned int evt_E; //38
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
34 unsigned int evt_F; //3c
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
35 unsigned int uSex; //40
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
36 int bHasUsedTheAbility; //44
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
37 int news_topic; //48
0
Ritor1
parents:
diff changeset
38 };
Ritor1
parents:
diff changeset
39 #pragma pack(pop)
Ritor1
parents:
diff changeset
40
Ritor1
parents:
diff changeset
41
Ritor1
parents:
diff changeset
42 /* 138 */
Ritor1
parents:
diff changeset
43 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
44 struct NPCProfession
Ritor1
parents:
diff changeset
45 {
Ritor1
parents:
diff changeset
46 unsigned int uHirePrice;
Ritor1
parents:
diff changeset
47 char *pBenefits;
Ritor1
parents:
diff changeset
48 char *pActionText;
Ritor1
parents:
diff changeset
49 char *pJoinText;
Ritor1
parents:
diff changeset
50 char *pDismissText;
Ritor1
parents:
diff changeset
51 };
Ritor1
parents:
diff changeset
52 #pragma pack(pop)
Ritor1
parents:
diff changeset
53
Ritor1
parents:
diff changeset
54
Ritor1
parents:
diff changeset
55 /* 139 */
Ritor1
parents:
diff changeset
56 #pragma pack(push, 1)
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
57 struct NPCProfessionChance
0
Ritor1
parents:
diff changeset
58 {
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
59 unsigned int uTotalprofChance; //summ
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
60 char professionChancePerArea[60]; //prof position
0
Ritor1
parents:
diff changeset
61 };
Ritor1
parents:
diff changeset
62 #pragma pack(pop)
Ritor1
parents:
diff changeset
63
Ritor1
parents:
diff changeset
64 /* 140 */
Ritor1
parents:
diff changeset
65 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
66 struct NPCGreeting
Ritor1
parents:
diff changeset
67 {
Ritor1
parents:
diff changeset
68 char *pGreeting1;
Ritor1
parents:
diff changeset
69 char *pGreeting2;
Ritor1
parents:
diff changeset
70 };
Ritor1
parents:
diff changeset
71 #pragma pack(pop)
Ritor1
parents:
diff changeset
72
Ritor1
parents:
diff changeset
73
Ritor1
parents:
diff changeset
74 /* 137 */
Ritor1
parents:
diff changeset
75 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
76 struct NPCStats
Ritor1
parents:
diff changeset
77 {
Ritor1
parents:
diff changeset
78 inline NPCStats():
Ritor1
parents:
diff changeset
79 pNPCTextTXT_Raw(nullptr), pNPCTopicTXT_Raw(nullptr), pNPCDistTXT_Raw(nullptr)
Ritor1
parents:
diff changeset
80 {
Ritor1
parents:
diff changeset
81 uNumNPCNames[0] = uNumNPCNames[1] = 0;
Ritor1
parents:
diff changeset
82 }
Ritor1
parents:
diff changeset
83
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
84 void InitializeNPCText();
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
85 void InitializeNPCData();
0
Ritor1
parents:
diff changeset
86 void Initialize();
Ritor1
parents:
diff changeset
87 void Release();
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
88 void InitializeAdditionalNPCs(NPCData *pNPCDataBuff, int npc_uid, int uLocation2D, int uMapId);
0
Ritor1
parents:
diff changeset
89 void _476C60();
Ritor1
parents:
diff changeset
90
237
2799737f8a74 more text parsers refactor
Gloval
parents: 188
diff changeset
91
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
92 NPCData pNPCData[501]; //0 - 94BCh count from 1
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
93 NPCData pNewNPCData[501]; //94BCh- 12978h count from 1
0
Ritor1
parents:
diff changeset
94 char *pNPCNames[540][2];
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
95 NPCProfession pProfessions[59]; //count from 1
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
96 NPCData pAdditionalNPC[100];
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
97 char *pCatchPhrases[52]; //15CA4h
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
98 char *pNPCUnicNames[500]; //from first batch
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
99 NPCProfessionChance pProfessionChance[77]; //16544h profession chance in each area
0
Ritor1
parents:
diff changeset
100 int field_17884;
Ritor1
parents:
diff changeset
101 int field_17888;
Ritor1
parents:
diff changeset
102 NPCGreeting pNPCGreetings[205];
Ritor1
parents:
diff changeset
103 unsigned __int16 pGroups[51];
Ritor1
parents:
diff changeset
104 unsigned __int16 pGroups_copy[51];
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
105 unsigned int uNewlNPCBufPos;
0
Ritor1
parents:
diff changeset
106 unsigned int uNumNewNPCs;
Ritor1
parents:
diff changeset
107 int field_17FC8;
Ritor1
parents:
diff changeset
108 unsigned int uNumNPCProfessions;
291
0ea5fbd16edb NPC mostly done
Gloval
parents: 253
diff changeset
109 unsigned int uNumNPCNames[2]; //0 male 1 female
0
Ritor1
parents:
diff changeset
110 char *pNPCDataTXT_Raw;
Ritor1
parents:
diff changeset
111 char *pNPCNamesTXT_Raw;
Ritor1
parents:
diff changeset
112 char *pNPCProfTXT_Raw;
Ritor1
parents:
diff changeset
113 char *pNPCNewsTXT_Raw;
Ritor1
parents:
diff changeset
114 char *pNPCTopicTXT_Raw;
Ritor1
parents:
diff changeset
115 char *pNPCTextTXT_Raw;
Ritor1
parents:
diff changeset
116 char *pNPCDistTXT_Raw;
Ritor1
parents:
diff changeset
117 char *pNPCGreetTXT_Raw;
Ritor1
parents:
diff changeset
118 char *pNCPGroupTXT_Raw;
Ritor1
parents:
diff changeset
119 };
Ritor1
parents:
diff changeset
120 #pragma pack(pop)
Ritor1
parents:
diff changeset
121
253
Gloval
parents: 252
diff changeset
122 bool PartyHasDragon();
251
48f21f569328 Npc related stuff separated
Gloval
parents: 237
diff changeset
123 bool CheckHiredNPCSpeciality(unsigned int uProfession);