Use configured resolution for login/outgame/ingame
[ryzomcore.git] / ryzom / tools / stats_scan / character.h
blob1655711ebeb0161c0dde614d13f4e2388f4a0b27
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 #ifndef CHARACTER_H
19 #define CHARACTER_H
21 //-----------------------------------------------------------------------------
22 // includes
23 //-----------------------------------------------------------------------------
25 #include "nel/misc/sstring.h"
26 #include "game_share/persistent_data.h"
29 //-----------------------------------------------------------------------------
30 // Data types
31 //-----------------------------------------------------------------------------
33 typedef uint32 TAIAlias;
36 //-----------------------------------------------------------------------------
37 // Persistent data for CStatsScanMissionHistory
38 //-----------------------------------------------------------------------------
40 class CStatsScanMissionHistory
42 public:
43 DECLARE_PERSISTENCE_METHODS
45 bool Successfull;
46 NLMISC::TGameCycle LastSuccessDate;
48 CStatsScanMissionHistory()
50 Successfull=false;
51 LastSuccessDate=0;
56 //-----------------------------------------------------------------------------
57 // Persistent data for CStatsScanDeathPenalties
58 //-----------------------------------------------------------------------------
60 class CStatsScanDeathPenalties
62 public:
63 DECLARE_PERSISTENCE_METHODS
65 CStatsScanDeathPenalties()
67 _NbDeath=0;
68 _CurrentDeathXP=0.0;
69 _DeathXPToGain=0.0;
70 _BonusUpdateTime=0;
73 uint8 _NbDeath;
74 double _CurrentDeathXP;
75 double _DeathXPToGain;
76 uint32 _BonusUpdateTime;
80 //-----------------------------------------------------------------------------
81 // Persistent data for CStatsScanRespawnPoints
82 //-----------------------------------------------------------------------------
84 class CStatsScanRespawnPoints
86 public:
87 DECLARE_PERSISTENCE_METHODS
89 std::vector<std::string> RespawnPoints;
93 //-----------------------------------------------------------------------------
94 // Persistent data for CStatsScanFameContainerEntry
95 //-----------------------------------------------------------------------------
97 class CStatsScanFameContainerEntry
99 public:
100 DECLARE_PERSISTENCE_METHODS
102 sint32 Fame;
103 sint32 FameMemory;
104 std::string LastFameChangeTrend;
106 CStatsScanFameContainerEntry()
108 Fame=0;
109 FameMemory=0;
115 //-----------------------------------------------------------------------------
116 // Persistent data for CStatsScanFameContainer
117 //-----------------------------------------------------------------------------
119 class CStatsScanFameContainer
121 public:
122 DECLARE_PERSISTENCE_METHODS
124 std::map<NLMISC::CSheetId,CStatsScanFameContainerEntry> _Fame;
128 //-----------------------------------------------------------------------------
129 // Persistent data for CStatsScanEncyCharThema
130 //-----------------------------------------------------------------------------
132 class CStatsScanEncyCharThema
134 public:
135 DECLARE_PERSISTENCE_METHODS
137 uint8 ThemaState;
138 uint16 RiteTaskStatePacked;
140 CStatsScanEncyCharThema()
142 ThemaState=0;
143 RiteTaskStatePacked=0;
148 //-----------------------------------------------------------------------------
149 // Persistent data for CStatsScanEncyCharAlbum
150 //-----------------------------------------------------------------------------
152 class CStatsScanEncyCharAlbum
154 public:
155 DECLARE_PERSISTENCE_METHODS
157 uint8 AlbumState;
158 std::vector<CStatsScanEncyCharThema> Themas;
160 CStatsScanEncyCharAlbum()
162 AlbumState=0;
167 //-----------------------------------------------------------------------------
168 // Persistent data for CStatsScanCharaterEncyclopedia
169 //-----------------------------------------------------------------------------
171 class CStatsScanCharaterEncyclopedia
173 public:
174 DECLARE_PERSISTENCE_METHODS
176 std::vector<CStatsScanEncyCharAlbum> _EncyCharAlbums;
180 //-----------------------------------------------------------------------------
181 // Persistent data for CStatsScanGameEvent
182 //-----------------------------------------------------------------------------
184 class CStatsScanGameEvent
186 public:
187 DECLARE_PERSISTENCE_METHODS
189 CStatsScanGameEvent()
191 _Date=0;
194 uint32 _Date;
195 std::string _EventFaction;
199 //-----------------------------------------------------------------------------
200 // Persistent data for CStatsScanPact
201 //-----------------------------------------------------------------------------
203 class CStatsScanPact
205 public:
206 DECLARE_PERSISTENCE_METHODS
208 CStatsScanPact()
210 PactNature=0;
211 PactType=0;
214 uint8 PactNature;
215 uint8 PactType;
219 //-----------------------------------------------------------------------------
220 // Persistent data for CStatsScanPetAnimal
221 //-----------------------------------------------------------------------------
223 class CStatsScanPetAnimal
225 public:
226 DECLARE_PERSISTENCE_METHODS
228 NLMISC::CSheetId TicketPetSheetId;
229 NLMISC::CSheetId PetSheetId;
230 uint32 Price;
231 NLMISC::CEntityId OwnerId;
232 TAIAlias StableAlias;
233 sint32 Landscape_X;
234 sint32 Landscape_Y;
235 sint32 Landscape_Z;
236 uint32 DeathTick;
237 uint16 PetStatus;
238 sint16 Slot;
239 bool IsFollowing;
240 bool IsMounted;
241 bool IsTpAllowed;
243 CStatsScanPetAnimal()
245 Price=0;
246 StableAlias=0;
247 Landscape_X=0;
248 Landscape_Y=0;
249 Landscape_Z=0;
250 DeathTick=0;
251 PetStatus=0;
252 Slot=0;
253 IsFollowing=false;
254 IsMounted=false;
255 IsTpAllowed=false;
260 //-----------------------------------------------------------------------------
261 // Persistent data for CStatsScanPhysCharacs
262 //-----------------------------------------------------------------------------
264 class CStatsScanPhysCharacs
266 public:
267 DECLARE_PERSISTENCE_METHODS
269 std::map<std::string,sint32> _PhysicalCharacteristics;
273 //-----------------------------------------------------------------------------
274 // Persistent data for CStatsScanPhysScoresEntry
275 //-----------------------------------------------------------------------------
277 class CStatsScanPhysScoresEntry
279 public:
280 DECLARE_PERSISTENCE_METHODS
282 CStatsScanPhysScoresEntry()
284 Current=0;
285 Base=0;
286 Max=0;
287 BaseRegenerateRepos=0.0f;
288 BaseRegenerateAction=0.0f;
289 CurrentRegenerate=0.0f;
292 sint32 Current;
293 sint32 Base;
294 sint32 Max;
295 float BaseRegenerateRepos;
296 float BaseRegenerateAction;
297 float CurrentRegenerate;
301 //-----------------------------------------------------------------------------
302 // Persistent data for CStatsScanPhysScores
303 //-----------------------------------------------------------------------------
305 class CStatsScanPhysScores
307 public:
308 DECLARE_PERSISTENCE_METHODS
310 CStatsScanPhysScores()
312 BaseWalkSpeed=0.0f;
313 BaseRunSpeed=0.0f;
314 CurrentWalkSpeed=0.0f;
315 CurrentRunSpeed=0.0f;
318 float BaseWalkSpeed;
319 float BaseRunSpeed;
320 float CurrentWalkSpeed;
321 float CurrentRunSpeed;
322 std::map<std::string,CStatsScanPhysScoresEntry> PhysicalScores;
326 //-----------------------------------------------------------------------------
327 // Persistent data for CStatsScanSkillsEntry
328 //-----------------------------------------------------------------------------
330 class CStatsScanSkillsEntry
332 public:
333 DECLARE_PERSISTENCE_METHODS
335 CStatsScanSkillsEntry()
337 Base=0;
338 Current=0;
339 MaxLvlReached=0;
340 Xp=0.0;
341 XpNextLvl=0.0;
344 sint32 Base;
345 sint32 Current;
346 sint32 MaxLvlReached;
347 double Xp;
348 double XpNextLvl;
352 //-----------------------------------------------------------------------------
353 // Persistent data for CStatsScanSkills
354 //-----------------------------------------------------------------------------
356 class CStatsScanSkills
358 public:
359 DECLARE_PERSISTENCE_METHODS
361 std::map<std::string,CStatsScanSkillsEntry> Skills;
365 //-----------------------------------------------------------------------------
366 // Persistent data for CStatsScanItemCraftParameters
367 //-----------------------------------------------------------------------------
369 class CStatsScanItemCraftParameters
371 public:
372 DECLARE_PERSISTENCE_METHODS
374 CStatsScanItemCraftParameters()
376 Durability=0.0f;
377 Weight=0.0f;
378 SapLoad=0.0f;
379 StatEnergy=0.0f;
380 Dmg=0.0f;
381 Speed=0.0f;
382 Range=0.0f;
383 DodgeModifier=0.0f;
384 ParryModifier=0.0f;
385 AdversaryDodgeModifier=0.0f;
386 AdversaryParryModifier=0.0f;
387 ProtectionFactor=0.0f;
388 MaxSlashingProtection=0.0f;
389 MaxBluntProtection=0.0f;
390 MaxPiercingProtection=0.0f;
391 ElementalCastingTimeFactor=0.0f;
392 ElementalPowerFactor=0.0f;
393 OffensiveAfflictionCastingTimeFactor=0.0f;
394 OffensiveAfflictionPowerFactor=0.0f;
395 HealCastingTimeFactor=0.0f;
396 HealPowerFactor=0.0f;
397 DefensiveAfflictionCastingTimeFactor=0.0f;
398 DefensiveAfflictionPowerFactor=0.0f;
399 Color=0;
400 HpBuff=0;
401 SapBuff=0;
402 StaBuff=0;
403 FocusBuff=0;
406 float Durability;
407 float Weight;
408 float SapLoad;
409 float StatEnergy;
410 float Dmg;
411 float Speed;
412 float Range;
413 float DodgeModifier;
414 float ParryModifier;
415 float AdversaryDodgeModifier;
416 float AdversaryParryModifier;
417 float ProtectionFactor;
418 float MaxSlashingProtection;
419 float MaxBluntProtection;
420 float MaxPiercingProtection;
421 float ElementalCastingTimeFactor;
422 float ElementalPowerFactor;
423 float OffensiveAfflictionCastingTimeFactor;
424 float OffensiveAfflictionPowerFactor;
425 float HealCastingTimeFactor;
426 float HealPowerFactor;
427 float DefensiveAfflictionCastingTimeFactor;
428 float DefensiveAfflictionPowerFactor;
429 uint8 Color;
430 sint32 HpBuff;
431 sint32 SapBuff;
432 sint32 StaBuff;
433 sint32 FocusBuff;
434 std::string Protection;
438 //-----------------------------------------------------------------------------
439 // Persistent data for CStatsScanItem
440 //-----------------------------------------------------------------------------
442 class CStatsScanItem
444 public:
445 DECLARE_PERSISTENCE_METHODS
447 CStatsScanItem()
449 _ClientInventoryPosition=0;
450 _HP=0;
451 _Recommended=0;
452 _LocSlot=0;
453 _SlotImage=0;
454 _SlotCount=0;
455 _SapLoad=0;
456 _Dropable=true;
457 _Destroyable=true;
458 StackSize=0;
461 NLMISC::CSheetId _SheetId;
462 sint16 _ClientInventoryPosition;
463 uint32 _HP;
464 uint32 _Recommended;
465 NLMISC::CEntityId _CreatorId;
466 uint8 _LocSlot;
467 std::string _PhraseId;
468 uint16 _SlotImage;
469 sint16 _SlotCount;
470 uint32 _SapLoad;
471 bool _Dropable;
472 bool _Destroyable;
473 uint32 StackSize;
474 CStatsScanItemCraftParameters _CraftParameters;
475 std::vector<NLMISC::CSheetId> _Enchantment;
476 std::vector<CStatsScanItem> Child;
480 //-----------------------------------------------------------------------------
481 // Persistent data for CStatsScanInventory
482 //-----------------------------------------------------------------------------
484 class CStatsScanInventory
486 public:
487 DECLARE_PERSISTENCE_METHODS
489 std::vector<CStatsScanItem> _Item;
493 //-----------------------------------------------------------------------------
494 // Persistent data for CStatsScanPlayerRoom
495 //-----------------------------------------------------------------------------
497 class CStatsScanPlayerRoom
499 public:
500 DECLARE_PERSISTENCE_METHODS
502 TAIAlias Building;
503 CStatsScanItem Inventory;
504 sint32 Bulk;
505 sint32 MaxBulk;
507 CStatsScanPlayerRoom()
509 Building=0;
510 Bulk=0;
511 MaxBulk=0;
516 //-----------------------------------------------------------------------------
517 // Persistent data for CStatsScanEntityPosition
518 //-----------------------------------------------------------------------------
520 class CStatsScanEntityPosition
522 public:
523 DECLARE_PERSISTENCE_METHODS
525 sint32 X;
526 sint32 Y;
527 sint32 Z;
528 float Heading;
530 CStatsScanEntityPosition()
532 X=0;
533 Y=0;
534 Z=0;
535 Heading=0.0f;
540 //-----------------------------------------------------------------------------
541 // Persistent data for CStatsScanEntityBase
542 //-----------------------------------------------------------------------------
544 class CStatsScanEntityBase
546 public:
547 DECLARE_PERSISTENCE_METHODS
549 CStatsScanEntityPosition _EntityPosition;
550 uint32 _SheetId;
551 std::string _Name;
552 std::string _Race;
553 uint8 _Gender;
554 uint8 _Size;
555 bool _DodgeAsDefense;
556 CStatsScanPhysCharacs _PhysCharacs;
557 CStatsScanPhysScores _PhysScores;
558 CStatsScanSkills _Skills;
560 sint32 MeleeAttackModifierOnEnemy;
561 sint32 MeleeAttackModifierOnSelf;
562 sint32 MagicCastingModifierOnSelf;
563 sint32 MagicCastingModifierOnEnemy;
564 sint32 RangeAttackModifierOnEnemy;
565 sint32 RangeAttackModifierOnSelf;
566 sint32 AttackModifierOnSelf;
567 sint32 ChanceToFailStrategy;
568 sint32 ChanceToFailSpell;
569 sint32 ChanceToFailFaber;
570 sint32 ChanceToFailHarvest;
571 sint32 ChanceToFailTracking;
572 sint32 MeleeAttackSlow;
573 sint32 MeleeSlashingDamageArmor;
574 sint32 MeleeBluntDamageArmor;
575 sint32 MeleePiercingDamageArmor;
576 sint32 MeleeDamageModifierFactor;
577 sint32 RangeDamageModifierFactor;
578 sint32 CreatureMeleeTakenDamageFactor;
579 sint32 CreatureRangeTakenDamageFactor;
580 sint32 CombatBrickLatencyMultiplier;
581 sint32 MagicBrickLatencyMultiplier;
582 sint32 ArmorQualityModifier;
583 sint32 WeaponQualityModifier;
584 sint32 ArmorAbsorbtionMultiplier;
586 CStatsScanEntityBase()
588 _DodgeAsDefense=false;
589 _SheetId=0;
590 _Gender=0;
591 _Size=0;
593 MeleeAttackModifierOnEnemy=0;
594 MeleeAttackModifierOnSelf=0;
595 MagicCastingModifierOnSelf=0;
596 MagicCastingModifierOnEnemy=0;
597 RangeAttackModifierOnEnemy=0;
598 RangeAttackModifierOnSelf=0;
599 AttackModifierOnSelf=0;
600 ChanceToFailStrategy=0;
601 ChanceToFailSpell=0;
602 ChanceToFailFaber=0;
603 ChanceToFailHarvest=0;
604 ChanceToFailTracking=0;
605 MeleeAttackSlow=0;
606 MeleeSlashingDamageArmor=0;
607 MeleeBluntDamageArmor=0;
608 MeleePiercingDamageArmor=0;
609 MeleeDamageModifierFactor=0;
610 RangeDamageModifierFactor=0;
611 CreatureMeleeTakenDamageFactor=0;
612 CreatureRangeTakenDamageFactor=0;
613 CombatBrickLatencyMultiplier=0;
614 MagicBrickLatencyMultiplier=0;
615 ArmorQualityModifier=0;
616 WeaponQualityModifier=0;
617 ArmorAbsorbtionMultiplier=0;
622 //-----------------------------------------------------------------------------
623 // Persistent data for CStatsScanCharacter
624 //-----------------------------------------------------------------------------
626 class CStatsScanCharacter
628 public:
629 DECLARE_PERSISTENCE_METHODS
631 uint32 VERSION;
633 uint8 _HairType;
634 uint8 _HairColor;
635 uint8 _HatColor;
636 uint8 _JacketColor;
637 uint8 _ArmsColor;
638 uint8 _TrousersColor;
639 uint8 _FeetColor;
640 uint8 _HandsColor;
641 uint64 _Money;
642 uint32 _GuildId;
643 bool _NewCharacter;
644 uint8 _CreationPointsRepartition;
645 uint32 _ForbidAuraUseEndDate;
646 std::string _Title;
648 /* Visual Properties */
649 uint8 HairType;
650 uint8 HairColor;
651 uint8 GabaritHeight;
652 uint8 GabaritTorsoWidth;
653 uint8 GabaritArmsWidth;
654 uint8 GabaritLegsWidth;
655 uint8 GabaritBreastSize;
656 uint8 MorphTarget1;
657 uint8 MorphTarget2;
658 uint8 MorphTarget3;
659 uint8 MorphTarget4;
660 uint8 MorphTarget5;
661 uint8 MorphTarget6;
662 uint8 MorphTarget7;
663 uint8 MorphTarget8;
664 uint8 EyesColor;
665 uint8 Tattoo;
666 uint8 NameStringId;
668 bool _HairCuteDiscount ;
669 float _NextDeathPenaltyFactor;
671 CStatsScanDeathPenalties _DeathPenalties;
672 CStatsScanPlayerRoom _PlayerRoom;
673 CStatsScanEntityBase EntityBase;
674 CStatsScanRespawnPoints RespawnPoints;
675 CStatsScanFameContainer _Fames;
676 CStatsScanCharaterEncyclopedia _EncycloChar;
677 CStatsScanGameEvent _GameEvent;
679 std::vector<NLMISC::CSheetId> _BoughtPhrases;
680 std::vector<NLMISC::CSheetId> _KnownBricks;
681 std::vector<NLMISC::CEntityId> _FriendsList;
682 std::vector<NLMISC::CEntityId> _IgnoreList;
683 std::vector<NLMISC::CEntityId> _IsFriendOf;
684 std::vector<NLMISC::CEntityId> _IsIgnoredBy;
686 std::vector<CStatsScanPact> _Pact;
688 std::map<TAIAlias,CStatsScanMissionHistory> _MissionHistories;
689 std::map<std::string,double> SkillPoints;
690 std::map<std::string,uint32> SpentSkillPoints;
691 std::map<std::string,sint32> ScorePermanentModifiers;
692 std::map<std::string,uint8> StartingCharacteristicValues;
693 std::map<std::string,CStatsScanInventory> Inventory;
694 std::map<uint32,CStatsScanPetAnimal> _PlayerPets;
698 #endif