Use configured resolution for login/outgame/ingame
[ryzomcore.git] / ryzom / tools / stats_scan / character.cpp
blob56ab134b2338eb0a242704365ae7bd676f4cc61f
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 //-----------------------------------------------------------------------------
19 // includes
20 //-----------------------------------------------------------------------------
22 #include "character.h"
25 //-----------------------------------------------------------------------------
26 // namespaces
27 //-----------------------------------------------------------------------------
29 using namespace std;
30 using namespace NLMISC;
33 #define PERSISTENT_TOKEN_FAMILY RyzomTokenFamily
36 //-----------------------------------------------------------------------------
37 // Globals
38 //-----------------------------------------------------------------------------
40 // If the following macro is defined then the macros such as PERSISTENT_CLASS, PERSISTENT_DATA, PERSISTENT_PRE_STORE, etc
41 // are undefined after inclusion of perstent_data_template.h
42 #define PERSISTENT_MACROS_AUTO_UNDEF
45 //-----------------------------------------------------------------------------
46 // Persistent data for CStatsScanMissionHistory
47 //-----------------------------------------------------------------------------
49 #define PERSISTENT_CLASS CStatsScanMissionHistory
51 #define PERSISTENT_DATA\
52 PROP(bool, Successfull)\
53 PROP(TGameCycle, LastSuccessDate)\
55 #include "game_share/persistent_data_template.h"
58 //-----------------------------------------------------------------------------
59 // Persistent data for CStatsScanDeathPenalties
60 //-----------------------------------------------------------------------------
62 #define PERSISTENT_CLASS CStatsScanDeathPenalties
64 #define PERSISTENT_DATA\
65 PROP(uint8,_NbDeath)\
66 PROP(double,_CurrentDeathXP)\
67 PROP(double,_DeathXPToGain)\
68 PROP(uint32,_BonusUpdateTime)\
70 #include "game_share/persistent_data_template.h"
73 //-----------------------------------------------------------------------------
74 // Persistent data for CStatsScanRespawnPoints
75 //-----------------------------------------------------------------------------
77 #define PERSISTENT_CLASS CStatsScanRespawnPoints
79 #define PERSISTENT_DATA\
80 PROP_VECT(string,RespawnPoints)\
83 #include "game_share/persistent_data_template.h"
86 //-----------------------------------------------------------------------------
87 // Persistent data for CStatsScanFameContainerEntry
88 //-----------------------------------------------------------------------------
90 #define PERSISTENT_CLASS CStatsScanFameContainerEntry
92 #define PERSISTENT_DATA\
93 PROP(sint32,Fame)\
94 PROP(sint32,FameMemory)\
95 PROP(string,LastFameChangeTrend)\
97 #include "game_share/persistent_data_template.h"
100 //-----------------------------------------------------------------------------
101 // Persistent data for CStatsScanFameContainer
102 //-----------------------------------------------------------------------------
104 #define PERSISTENT_CLASS CStatsScanFameContainer
106 #define PERSISTENT_DATA\
107 STRUCT_MAP(CSheetId,CStatsScanFameContainerEntry,_Fame)\
109 #include "game_share/persistent_data_template.h"
112 //-----------------------------------------------------------------------------
113 // Persistent data for CStatsScanEncyCharThema
114 //-----------------------------------------------------------------------------
116 #define PERSISTENT_CLASS CStatsScanEncyCharThema
118 #define PERSISTENT_DATA\
119 PROP(uint8,ThemaState)\
120 PROP(uint16,RiteTaskStatePacked)\
122 #include "game_share/persistent_data_template.h"
125 //-----------------------------------------------------------------------------
126 // Persistent data for CStatsScanEncyCharAlbum
127 //-----------------------------------------------------------------------------
129 #define PERSISTENT_CLASS CStatsScanEncyCharAlbum
131 #define PERSISTENT_DATA\
132 PROP(uint8,AlbumState)\
133 STRUCT_VECT(Themas)\
135 #include "game_share/persistent_data_template.h"
138 //-----------------------------------------------------------------------------
139 // Persistent data for CStatsScanCharaterEncyclopedia
140 //-----------------------------------------------------------------------------
142 #define PERSISTENT_CLASS CStatsScanCharaterEncyclopedia
144 #define PERSISTENT_DATA\
145 STRUCT_VECT(_EncyCharAlbums)\
147 #include "game_share/persistent_data_template.h"
150 //-----------------------------------------------------------------------------
151 // Persistent data for CStatsScanGameEvent
152 //-----------------------------------------------------------------------------
154 #define PERSISTENT_CLASS CStatsScanGameEvent
156 #define PERSISTENT_DATA\
157 PROP(uint32,_Date)\
158 PROP(string,_EventFaction)\
160 #include "game_share/persistent_data_template.h"
163 //-----------------------------------------------------------------------------
164 // Persistent data for CStatsScanPact
165 //-----------------------------------------------------------------------------
167 #define PERSISTENT_CLASS CStatsScanPact
169 #define PERSISTENT_DATA\
170 PROP(uint8,PactNature)\
171 PROP(uint8,PactType)\
173 #include "game_share/persistent_data_template.h"
176 //-----------------------------------------------------------------------------
177 // Persistent data for CStatsScanPetAnimal
178 //-----------------------------------------------------------------------------
180 #define PERSISTENT_CLASS CStatsScanPetAnimal
182 #define PERSISTENT_DATA\
183 PROP(CSheetId,TicketPetSheetId)\
184 PROP(CSheetId,PetSheetId)\
185 PROP(uint32,Price)\
186 PROP(CEntityId,OwnerId)\
187 PROP(TAIAlias,StableAlias)\
188 PROP(sint32,Landscape_X)\
189 PROP(sint32,Landscape_Y)\
190 PROP(sint32,Landscape_Z)\
191 PROP(uint32,DeathTick)\
192 PROP(uint16,PetStatus)\
193 PROP(sint16,Slot)\
194 PROP(bool,IsFollowing)\
195 PROP(bool,IsMounted)\
196 PROP(bool,IsTpAllowed)\
198 #include "game_share/persistent_data_template.h"
201 //-----------------------------------------------------------------------------
202 // Persistent data for CStatsScanPhysCharacs
203 //-----------------------------------------------------------------------------
205 #define PERSISTENT_CLASS CStatsScanPhysCharacs
207 #define PERSISTENT_DATA\
208 PROP_MAP(string,sint32,_PhysicalCharacteristics)\
210 #include "game_share/persistent_data_template.h"
213 //-----------------------------------------------------------------------------
214 // Persistent data for CStatsScanPhysScoresEntry
215 //-----------------------------------------------------------------------------
217 #define PERSISTENT_CLASS CStatsScanPhysScoresEntry
219 #define PERSISTENT_DATA\
220 PROP(sint32,Current)\
221 PROP(sint32,Base)\
222 PROP(sint32,Max)\
223 PROP(float,BaseRegenerateRepos)\
224 PROP(float,BaseRegenerateAction)\
225 PROP(float,CurrentRegenerate)\
227 #include "game_share/persistent_data_template.h"
230 //-----------------------------------------------------------------------------
231 // Persistent data for CStatsScanPhysScores
232 //-----------------------------------------------------------------------------
234 #define PERSISTENT_CLASS CStatsScanPhysScores
236 #define PERSISTENT_DATA\
237 PROP(float,BaseWalkSpeed)\
238 PROP(float,BaseRunSpeed)\
239 PROP(float,CurrentWalkSpeed)\
240 PROP(float,CurrentRunSpeed)\
241 STRUCT_MAP(string,CStatsScanPhysScoresEntry,PhysicalScores)\
243 #include "game_share/persistent_data_template.h"
246 //-----------------------------------------------------------------------------
247 // Persistent data for CStatsScanSkillsEntry
248 //-----------------------------------------------------------------------------
250 #define PERSISTENT_CLASS CStatsScanSkillsEntry
252 #define PERSISTENT_DATA\
253 PROP(sint32,Base)\
254 PROP(sint32,Current)\
255 PROP(sint32,MaxLvlReached)\
256 PROP(double,Xp)\
257 PROP(double,XpNextLvl)\
259 #include "game_share/persistent_data_template.h"
262 //-----------------------------------------------------------------------------
263 // Persistent data for CStatsScanSkills
264 //-----------------------------------------------------------------------------
266 #define PERSISTENT_CLASS CStatsScanSkills
268 #define PERSISTENT_DATA\
269 STRUCT_MAP(string,CStatsScanSkillsEntry,Skills)\
271 #include "game_share/persistent_data_template.h"
274 //-----------------------------------------------------------------------------
275 // Persistent data for CStatsScanItemCraftParameters
276 //-----------------------------------------------------------------------------
278 #define PERSISTENT_CLASS CStatsScanItemCraftParameters
280 #define PERSISTENT_DATA\
281 PROP(float,Durability)\
282 PROP(float,Weight)\
283 PROP(float,SapLoad)\
284 PROP(float,StatEnergy)\
285 PROP(float,Dmg)\
286 PROP(float,Speed)\
287 PROP(float,Range)\
288 PROP(float,DodgeModifier)\
289 PROP(float,ParryModifier)\
290 PROP(float,AdversaryDodgeModifier)\
291 PROP(float,AdversaryParryModifier)\
292 PROP(float,ProtectionFactor)\
293 PROP(float,MaxSlashingProtection)\
294 PROP(float,MaxBluntProtection)\
295 PROP(float,MaxPiercingProtection)\
296 PROP(float,ElementalCastingTimeFactor)\
297 PROP(float,ElementalPowerFactor)\
298 PROP(float,OffensiveAfflictionCastingTimeFactor)\
299 PROP(float,OffensiveAfflictionPowerFactor)\
300 PROP(float,HealCastingTimeFactor)\
301 PROP(float,HealPowerFactor)\
302 PROP(float,DefensiveAfflictionCastingTimeFactor)\
303 PROP(float,DefensiveAfflictionPowerFactor)\
304 PROP(uint8,Color)\
305 PROP(sint32,HpBuff)\
306 PROP(sint32,SapBuff)\
307 PROP(sint32,StaBuff)\
308 PROP(sint32,FocusBuff)\
309 PROP(string,Protection)\
311 #include "game_share/persistent_data_template.h"
314 //-----------------------------------------------------------------------------
315 // Persistent data for CStatsScanItem
316 //-----------------------------------------------------------------------------
318 #define PERSISTENT_CLASS CStatsScanItem
320 #define PERSISTENT_DATA\
321 PROP(CSheetId,_SheetId)\
322 PROP(sint16,_ClientInventoryPosition)\
323 PROP(uint32,_HP)\
324 PROP(uint32,_Recommended)\
325 PROP(CEntityId,_CreatorId)\
326 PROP(uint8,_LocSlot)\
327 PROP(string,_PhraseId)\
328 PROP(uint16,_SlotImage)\
329 PROP(sint16,_SlotCount)\
330 PROP(uint32,_SapLoad)\
331 PROP(bool,_Dropable)\
332 PROP(bool,_Destroyable)\
333 PROP(uint32,StackSize)\
334 STRUCT(_CraftParameters)\
335 PROP_VECT(CSheetId,_Enchantment)\
336 STRUCT_VECT(Child)\
338 #include "game_share/persistent_data_template.h"
341 //-----------------------------------------------------------------------------
342 // Persistent data for CStatsScanInventory
343 //-----------------------------------------------------------------------------
345 #define PERSISTENT_CLASS CStatsScanInventory
347 #define PERSISTENT_DATA\
348 STRUCT_VECT(_Item)\
351 #include "game_share/persistent_data_template.h"
354 //-----------------------------------------------------------------------------
355 // Persistent data for CStatsScanPlayerRoom
356 //-----------------------------------------------------------------------------
358 #define PERSISTENT_CLASS CStatsScanPlayerRoom
360 #define PERSISTENT_DATA\
361 PROP(TAIAlias,Building)\
362 STRUCT(Inventory)\
363 PROP(sint32,Bulk)\
364 PROP(sint32,MaxBulk)\
366 #include "game_share/persistent_data_template.h"
369 //-----------------------------------------------------------------------------
370 // Persistent data for CStatsScanEntityPosition
371 //-----------------------------------------------------------------------------
373 #define PERSISTENT_CLASS CStatsScanEntityPosition
375 #define PERSISTENT_DATA\
376 PROP(sint32,X)\
377 PROP(sint32,Y)\
378 PROP(sint32,Z)\
379 PROP(float,Heading)\
381 #include "game_share/persistent_data_template.h"
384 //-----------------------------------------------------------------------------
385 // Persistent data for CStatsScanEntityBase
386 //-----------------------------------------------------------------------------
388 #define PERSISTENT_CLASS CStatsScanEntityBase
390 #define PERSISTENT_DATA\
391 STRUCT(_EntityPosition)\
392 PROP(uint32,_SheetId)\
393 PROP(string,_Name)\
394 PROP(string,_Race)\
395 PROP(uint8,_Gender)\
396 PROP(uint8,_Size)\
397 PROP(bool,_DodgeAsDefense)\
398 STRUCT(_PhysCharacs)\
399 STRUCT(_PhysScores)\
400 STRUCT(_Skills)\
402 PROP(sint32,MeleeAttackModifierOnEnemy)\
403 PROP(sint32,MeleeAttackModifierOnSelf)\
404 PROP(sint32,MagicCastingModifierOnSelf)\
405 PROP(sint32,MagicCastingModifierOnEnemy)\
406 PROP(sint32,RangeAttackModifierOnEnemy)\
407 PROP(sint32,RangeAttackModifierOnSelf)\
408 PROP(sint32,AttackModifierOnSelf)\
409 PROP(sint32,ChanceToFailStrategy)\
410 PROP(sint32,ChanceToFailSpell)\
411 PROP(sint32,ChanceToFailFaber)\
412 PROP(sint32,ChanceToFailHarvest)\
413 PROP(sint32,ChanceToFailTracking)\
414 PROP(sint32,MeleeAttackSlow)\
415 PROP(sint32,MeleeSlashingDamageArmor)\
416 PROP(sint32,MeleeBluntDamageArmor)\
417 PROP(sint32,MeleePiercingDamageArmor)\
418 PROP(sint32,MeleeDamageModifierFactor)\
419 PROP(sint32,RangeDamageModifierFactor)\
420 PROP(sint32,CreatureMeleeTakenDamageFactor)\
421 PROP(sint32,CreatureRangeTakenDamageFactor)\
422 PROP(sint32,CombatBrickLatencyMultiplier)\
423 PROP(sint32,MagicBrickLatencyMultiplier)\
424 PROP(sint32,ArmorQualityModifier)\
425 PROP(sint32,WeaponQualityModifier)\
426 PROP(sint32,ArmorAbsorbtionMultiplier)\
428 #include "game_share/persistent_data_template.h"
431 //-----------------------------------------------------------------------------
432 // Persistent data for CCharacter
433 //-----------------------------------------------------------------------------
435 #define PERSISTENT_CLASS CStatsScanCharacter
437 #define PERSISTENT_DATA\
438 PROP(uint32,VERSION)\
440 PROP(uint8, _HairType)\
441 PROP(uint8, _HairColor)\
442 PROP(uint8, _HatColor)\
443 PROP(uint8, _JacketColor)\
444 PROP(uint8, _ArmsColor)\
445 PROP(uint8, _TrousersColor)\
446 PROP(uint8, _FeetColor)\
447 PROP(uint8, _HandsColor)\
448 PROP(uint64,_Money)\
449 PROP(uint32,_GuildId)\
450 PROP(bool, _NewCharacter)\
451 PROP(uint8, _CreationPointsRepartition)\
452 PROP(uint32,_ForbidAuraUseEndDate)\
453 PROP(string,_Title)\
455 /* Visual Properties */\
456 PROP(uint8,HairType)\
457 PROP(uint8,HairColor)\
458 PROP(uint8,GabaritHeight)\
459 PROP(uint8,GabaritTorsoWidth)\
460 PROP(uint8,GabaritArmsWidth)\
461 PROP(uint8,GabaritLegsWidth)\
462 PROP(uint8,GabaritBreastSize)\
463 PROP(uint8,MorphTarget1)\
464 PROP(uint8,MorphTarget2)\
465 PROP(uint8,MorphTarget3)\
466 PROP(uint8,MorphTarget4)\
467 PROP(uint8,MorphTarget5)\
468 PROP(uint8,MorphTarget6)\
469 PROP(uint8,MorphTarget7)\
470 PROP(uint8,MorphTarget8)\
471 PROP(uint8,EyesColor)\
472 PROP(uint8,Tattoo)\
473 PROP(uint8,NameStringId)\
475 PROP(bool, _HairCuteDiscount )\
476 PROP(float,_NextDeathPenaltyFactor)\
478 STRUCT(_DeathPenalties)\
479 STRUCT(_PlayerRoom)\
480 STRUCT(EntityBase)\
481 STRUCT(RespawnPoints)\
482 STRUCT(_Fames)\
483 STRUCT(_EncycloChar)\
484 STRUCT(_GameEvent)\
486 PROP_VECT(CSheetId,_BoughtPhrases)\
487 PROP_VECT(CSheetId,_KnownBricks)\
488 PROP_VECT(CEntityId,_FriendsList)\
489 PROP_VECT(CEntityId,_IgnoreList)\
490 PROP_VECT(CEntityId,_IsFriendOf)\
491 PROP_VECT(CEntityId,_IsIgnoredBy)\
493 STRUCT_VECT(_Pact)\
495 PROP_MAP(string,double,SkillPoints)\
496 PROP_MAP(string,uint32,SpentSkillPoints)\
497 PROP_MAP(string,sint32,ScorePermanentModifiers)\
498 PROP_MAP(string,uint8,StartingCharacteristicValues)\
500 STRUCT_MAP(TAIAlias,CStatsScanMissionHistory,_MissionHistories)\
501 STRUCT_MAP(uint32,CStatsScanPetAnimal,_PlayerPets)\
502 STRUCT_MAP(string,CStatsScanInventory,Inventory)\
505 #include "game_share/persistent_data_template.h"