1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
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.
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 STAT_CHARACTER_H
19 #define STAT_CHARACTER_H
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
25 #include "nel/misc/sstring.h"
26 #include "game_share/persistent_data.h"
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 typedef uint32 TAIAlias
;
36 //-----------------------------------------------------------------------------
37 // Persistent data for CStatsScanMissionHistory
38 //-----------------------------------------------------------------------------
40 class CStatsScanMissionHistory
43 DECLARE_PERSISTENCE_METHODS
46 NLMISC::TGameCycle LastSuccessDate
;
48 CStatsScanMissionHistory()
56 //-----------------------------------------------------------------------------
57 // Persistent data for CStatsScanDeathPenalties
58 //-----------------------------------------------------------------------------
60 class CStatsScanDeathPenalties
63 DECLARE_PERSISTENCE_METHODS
65 CStatsScanDeathPenalties()
74 double _CurrentDeathXP
;
75 double _DeathXPToGain
;
76 uint32 _BonusUpdateTime
;
80 //-----------------------------------------------------------------------------
81 // Persistent data for CStatsScanRespawnPoints
82 //-----------------------------------------------------------------------------
84 class CStatsScanRespawnPoints
87 DECLARE_PERSISTENCE_METHODS
89 std::vector
<NLMISC::CSString
> RespawnPoints
;
93 //-----------------------------------------------------------------------------
94 // Persistent data for CStatsScanFameContainerEntry
95 //-----------------------------------------------------------------------------
97 class CStatsScanFameContainerEntry
100 DECLARE_PERSISTENCE_METHODS
104 NLMISC::CSString LastFameChangeTrend
;
106 CStatsScanFameContainerEntry()
115 //-----------------------------------------------------------------------------
116 // Persistent data for CStatsScanFameContainer
117 //-----------------------------------------------------------------------------
119 class CStatsScanFameContainer
122 DECLARE_PERSISTENCE_METHODS
124 std::map
<NLMISC::CSheetId
,CStatsScanFameContainerEntry
> _Fame
;
128 //-----------------------------------------------------------------------------
129 // Persistent data for CStatsScanEncyCharThema
130 //-----------------------------------------------------------------------------
132 class CStatsScanEncyCharThema
135 DECLARE_PERSISTENCE_METHODS
138 uint16 RiteTaskStatePacked
;
140 CStatsScanEncyCharThema()
143 RiteTaskStatePacked
=0;
148 //-----------------------------------------------------------------------------
149 // Persistent data for CStatsScanEncyCharAlbum
150 //-----------------------------------------------------------------------------
152 class CStatsScanEncyCharAlbum
155 DECLARE_PERSISTENCE_METHODS
158 std::vector
<CStatsScanEncyCharThema
> Themas
;
160 CStatsScanEncyCharAlbum()
167 //-----------------------------------------------------------------------------
168 // Persistent data for CStatsScanCharaterEncyclopedia
169 //-----------------------------------------------------------------------------
171 class CStatsScanCharaterEncyclopedia
174 DECLARE_PERSISTENCE_METHODS
176 std::vector
<CStatsScanEncyCharAlbum
> _EncyCharAlbums
;
180 //-----------------------------------------------------------------------------
181 // Persistent data for CStatsScanCharacterLogTime
182 //-----------------------------------------------------------------------------
184 class CStatsScanCharacterLogTime
187 DECLARE_PERSISTENCE_METHODS
194 //-----------------------------------------------------------------------------
195 // Persistent data for CStatsScanGameEvent
196 //-----------------------------------------------------------------------------
198 class CStatsScanGameEvent
202 DECLARE_PERSISTENCE_METHODS
204 CStatsScanGameEvent()
210 NLMISC::CSString _EventFaction
;
214 //-----------------------------------------------------------------------------
215 // Persistent data for CStatsScanPosition
216 //-----------------------------------------------------------------------------
218 class CStatsScanPosition
221 DECLARE_PERSISTENCE_METHODS
238 //-----------------------------------------------------------------------------
239 // Persistent data for CStatsScanPositionStackEntry
240 //-----------------------------------------------------------------------------
242 class CStatsScanPositionStackEntry
245 DECLARE_PERSISTENCE_METHODS
247 CStatsScanPositionStackEntry()
253 CStatsScanPosition PosState
;
257 //-----------------------------------------------------------------------------
258 // Persistent data for CStatsScanPositionStack
259 //-----------------------------------------------------------------------------
261 class CStatsScanPositionStack
264 DECLARE_PERSISTENCE_METHODS
266 std::vector
<CStatsScanPositionStackEntry
> _Vec
;
270 //-----------------------------------------------------------------------------
271 // Persistent data for CStatsScanPact
272 //-----------------------------------------------------------------------------
277 DECLARE_PERSISTENCE_METHODS
290 //-----------------------------------------------------------------------------
291 // Persistent data for CStatsScanPetAnimal
292 //-----------------------------------------------------------------------------
294 class CStatsScanPetAnimal
297 DECLARE_PERSISTENCE_METHODS
299 NLMISC::CSheetId TicketPetSheetId
;
300 NLMISC::CSheetId PetSheetId
;
302 NLMISC::CEntityId OwnerId
;
303 TAIAlias StableAlias
;
314 CStatsScanPetAnimal()
331 //-----------------------------------------------------------------------------
332 // Persistent data for CStatsScanPhysCharacs
333 //-----------------------------------------------------------------------------
335 class CStatsScanPhysCharacs
338 DECLARE_PERSISTENCE_METHODS
340 std::map
<NLMISC::CSString
,sint32
> _PhysicalCharacteristics
;
344 //-----------------------------------------------------------------------------
345 // Persistent data for CStatsScanPhysScoresEntry
346 //-----------------------------------------------------------------------------
348 class CStatsScanPhysScoresEntry
351 DECLARE_PERSISTENCE_METHODS
353 CStatsScanPhysScoresEntry()
358 BaseRegenerateRepos
=0.0f
;
359 BaseRegenerateAction
=0.0f
;
360 CurrentRegenerate
=0.0f
;
366 float BaseRegenerateRepos
;
367 float BaseRegenerateAction
;
368 float CurrentRegenerate
;
372 //-----------------------------------------------------------------------------
373 // Persistent data for CStatsScanPhysScores
374 //-----------------------------------------------------------------------------
376 class CStatsScanPhysScores
379 DECLARE_PERSISTENCE_METHODS
381 CStatsScanPhysScores()
385 CurrentWalkSpeed
=0.0f
;
386 CurrentRunSpeed
=0.0f
;
391 float CurrentWalkSpeed
;
392 float CurrentRunSpeed
;
393 std::map
<NLMISC::CSString
,CStatsScanPhysScoresEntry
> PhysicalScores
;
397 //-----------------------------------------------------------------------------
398 // Persistent data for CStatsScanSkillsEntry
399 //-----------------------------------------------------------------------------
401 class CStatsScanSkillsEntry
404 DECLARE_PERSISTENCE_METHODS
406 CStatsScanSkillsEntry()
417 sint32 MaxLvlReached
;
423 //-----------------------------------------------------------------------------
424 // Persistent data for CStatsScanSkills
425 //-----------------------------------------------------------------------------
427 class CStatsScanSkills
430 DECLARE_PERSISTENCE_METHODS
432 std::map
<NLMISC::CSString
,CStatsScanSkillsEntry
> Skills
;
436 //-----------------------------------------------------------------------------
437 // Persistent data for CStatsScanItemCraftParameters
438 //-----------------------------------------------------------------------------
440 class CStatsScanItemCraftParameters
443 DECLARE_PERSISTENCE_METHODS
445 CStatsScanItemCraftParameters()
456 AdversaryDodgeModifier
=0.0f
;
457 AdversaryParryModifier
=0.0f
;
458 ProtectionFactor
=0.0f
;
459 MaxSlashingProtection
=0.0f
;
460 MaxBluntProtection
=0.0f
;
461 MaxPiercingProtection
=0.0f
;
462 ElementalCastingTimeFactor
=0.0f
;
463 ElementalPowerFactor
=0.0f
;
464 OffensiveAfflictionCastingTimeFactor
=0.0f
;
465 OffensiveAfflictionPowerFactor
=0.0f
;
466 HealCastingTimeFactor
=0.0f
;
467 HealPowerFactor
=0.0f
;
468 DefensiveAfflictionCastingTimeFactor
=0.0f
;
469 DefensiveAfflictionPowerFactor
=0.0f
;
486 float AdversaryDodgeModifier
;
487 float AdversaryParryModifier
;
488 float ProtectionFactor
;
489 float MaxSlashingProtection
;
490 float MaxBluntProtection
;
491 float MaxPiercingProtection
;
492 float ElementalCastingTimeFactor
;
493 float ElementalPowerFactor
;
494 float OffensiveAfflictionCastingTimeFactor
;
495 float OffensiveAfflictionPowerFactor
;
496 float HealCastingTimeFactor
;
497 float HealPowerFactor
;
498 float DefensiveAfflictionCastingTimeFactor
;
499 float DefensiveAfflictionPowerFactor
;
505 NLMISC::CSString Protection
;
509 //-----------------------------------------------------------------------------
510 // Persistent data for CStatsScanItem
511 //-----------------------------------------------------------------------------
516 DECLARE_PERSISTENCE_METHODS
520 _ClientInventoryPosition
=0;
532 NLMISC::CSheetId _SheetId
;
533 sint16 _ClientInventoryPosition
;
536 NLMISC::CEntityId _CreatorId
;
538 NLMISC::CSString _PhraseId
;
545 CStatsScanItemCraftParameters _CraftParameters
;
546 std::vector
<NLMISC::CSheetId
> _Enchantment
;
547 std::vector
<CStatsScanItem
> Child
;
551 //-----------------------------------------------------------------------------
552 // Persistent data for CStatsScanInventory
553 //-----------------------------------------------------------------------------
555 class CStatsScanInventory
558 DECLARE_PERSISTENCE_METHODS
560 std::vector
<CStatsScanItem
> _Item
;
564 //-----------------------------------------------------------------------------
565 // Persistent data for CStatsScanPlayerRoom
566 //-----------------------------------------------------------------------------
568 class CStatsScanPlayerRoom
571 DECLARE_PERSISTENCE_METHODS
574 CStatsScanItem Inventory
;
578 CStatsScanPlayerRoom()
587 //-----------------------------------------------------------------------------
588 // Persistent data for CStatsScanEntityPosition
589 //-----------------------------------------------------------------------------
591 class CStatsScanEntityPosition
594 DECLARE_PERSISTENCE_METHODS
601 CStatsScanEntityPosition()
611 //-----------------------------------------------------------------------------
612 // Persistent data for CStatsScanEntityBase
613 //-----------------------------------------------------------------------------
615 class CStatsScanEntityBase
618 DECLARE_PERSISTENCE_METHODS
620 CStatsScanEntityPosition _EntityPosition
;
622 NLMISC::CSString _Name
;
623 NLMISC::CSString _Race
;
626 bool _DodgeAsDefense
;
627 CStatsScanPhysCharacs _PhysCharacs
;
628 CStatsScanPhysScores _PhysScores
;
629 CStatsScanSkills _Skills
;
631 sint32 MeleeAttackModifierOnEnemy
;
632 sint32 MeleeAttackModifierOnSelf
;
633 sint32 MagicCastingModifierOnSelf
;
634 sint32 MagicCastingModifierOnEnemy
;
635 sint32 RangeAttackModifierOnEnemy
;
636 sint32 RangeAttackModifierOnSelf
;
637 sint32 AttackModifierOnSelf
;
638 sint32 ChanceToFailStrategy
;
639 sint32 ChanceToFailSpell
;
640 sint32 ChanceToFailFaber
;
641 sint32 ChanceToFailHarvest
;
642 sint32 ChanceToFailTracking
;
643 sint32 MeleeAttackSlow
;
644 sint32 MeleeSlashingDamageArmor
;
645 sint32 MeleeBluntDamageArmor
;
646 sint32 MeleePiercingDamageArmor
;
647 sint32 MeleeDamageModifierFactor
;
648 sint32 RangeDamageModifierFactor
;
649 sint32 CreatureMeleeTakenDamageFactor
;
650 sint32 CreatureRangeTakenDamageFactor
;
651 sint32 CombatBrickLatencyMultiplier
;
652 sint32 MagicBrickLatencyMultiplier
;
653 sint32 ArmorQualityModifier
;
654 sint32 WeaponQualityModifier
;
655 sint32 ArmorAbsorbtionMultiplier
;
657 CStatsScanEntityBase()
659 _DodgeAsDefense
=false;
664 MeleeAttackModifierOnEnemy
=0;
665 MeleeAttackModifierOnSelf
=0;
666 MagicCastingModifierOnSelf
=0;
667 MagicCastingModifierOnEnemy
=0;
668 RangeAttackModifierOnEnemy
=0;
669 RangeAttackModifierOnSelf
=0;
670 AttackModifierOnSelf
=0;
671 ChanceToFailStrategy
=0;
674 ChanceToFailHarvest
=0;
675 ChanceToFailTracking
=0;
677 MeleeSlashingDamageArmor
=0;
678 MeleeBluntDamageArmor
=0;
679 MeleePiercingDamageArmor
=0;
680 MeleeDamageModifierFactor
=0;
681 RangeDamageModifierFactor
=0;
682 CreatureMeleeTakenDamageFactor
=0;
683 CreatureRangeTakenDamageFactor
=0;
684 CombatBrickLatencyMultiplier
=0;
685 MagicBrickLatencyMultiplier
=0;
686 ArmorQualityModifier
=0;
687 WeaponQualityModifier
=0;
688 ArmorAbsorbtionMultiplier
=0;
693 //-----------------------------------------------------------------------------
694 // Persistent data for CStatsScanCharacter
695 //-----------------------------------------------------------------------------
697 class CStatsScanCharacter
700 DECLARE_PERSISTENCE_METHODS
702 CStatsScanCharacter()
704 VERSION
= (uint32
) 0;
706 _HairType
= (uint8
) 0;
707 _HairColor
= (uint8
) 0;
708 _HatColor
= (uint8
) 0;
709 _JacketColor
= (uint8
) 0;
710 _ArmsColor
= (uint8
) 0;
711 _TrousersColor
= (uint8
) 0;
712 _FeetColor
= (uint8
) 0;
713 _HandsColor
= (uint8
) 0;
715 _GuildId
= (uint32
) 0;
716 _NewCharacter
= false;
717 _CreationPointsRepartition
= (uint8
) 0;
718 _ForbidAuraUseEndDate
= (uint32
) 0;
720 HairType
= (uint8
) 0;
721 HairColor
= (uint8
) 0;
722 GabaritHeight
= (uint8
) 0;
723 GabaritTorsoWidth
= (uint8
) 0;
724 GabaritArmsWidth
= (uint8
) 0;
725 GabaritLegsWidth
= (uint8
) 0;
726 GabaritBreastSize
= (uint8
) 0;
727 MorphTarget1
= (uint8
) 0;
728 MorphTarget2
= (uint8
) 0;
729 MorphTarget3
= (uint8
) 0;
730 MorphTarget4
= (uint8
) 0;
731 MorphTarget5
= (uint8
) 0;
732 MorphTarget6
= (uint8
) 0;
733 MorphTarget7
= (uint8
) 0;
734 MorphTarget8
= (uint8
) 0;
735 EyesColor
= (uint8
) 0;
737 NameStringId
= (uint8
) 0;
739 _FirstConnectedTime
= 0;
740 _LastConnectedTime
= 0;
743 _HairCuteDiscount
= false;
744 _NextDeathPenaltyFactor
= 0.0f
;
755 uint8 _TrousersColor
;
761 uint8 _CreationPointsRepartition
;
762 uint32 _ForbidAuraUseEndDate
;
763 NLMISC::CSString _Title
;
764 NLMISC::CSString DeclaredCult
;
765 NLMISC::CSString DeclaredCiv
;
772 uint8 GabaritTorsoWidth
;
773 uint8 GabaritArmsWidth
;
774 uint8 GabaritLegsWidth
;
775 uint8 GabaritBreastSize
;
788 // login & log out timers
789 uint32 _FirstConnectedTime
;
790 uint32 _LastConnectedTime
;
792 std::list
<CStatsScanCharacterLogTime
> _LastLogStats
;
794 bool _HairCuteDiscount
;
795 float _NextDeathPenaltyFactor
;
797 CStatsScanDeathPenalties _DeathPenalties
;
798 CStatsScanPlayerRoom _PlayerRoom
;
799 CStatsScanEntityBase EntityBase
;
800 CStatsScanRespawnPoints RespawnPoints
;
801 CStatsScanFameContainer _Fames
;
802 CStatsScanCharaterEncyclopedia _EncycloChar
;
803 CStatsScanGameEvent _GameEvent
;
804 CStatsScanPositionStack NormalPositions
;
806 std::vector
<NLMISC::CSheetId
> _BoughtPhrases
;
807 std::vector
<NLMISC::CSheetId
> _KnownBricks
;
808 std::vector
<NLMISC::CEntityId
> _FriendsList
;
809 std::vector
<NLMISC::CEntityId
> _IgnoreList
;
810 std::vector
<NLMISC::CEntityId
> _IsFriendOf
;
811 std::vector
<NLMISC::CEntityId
> _IsIgnoredBy
;
813 std::vector
<CStatsScanPact
> _Pact
;
815 std::map
<TAIAlias
,CStatsScanMissionHistory
> _MissionHistories
;
816 std::map
<NLMISC::CSString
,double> SkillPoints
;
817 std::map
<NLMISC::CSString
,uint32
> SpentSkillPoints
;
818 std::map
<NLMISC::CSString
,sint32
> ScorePermanentModifiers
;
819 std::map
<NLMISC::CSString
,uint8
> StartingCharacteristicValues
;
820 std::map
<NLMISC::CSString
,uint32
> FactionPoints
;
821 std::map
<NLMISC::CSString
,CStatsScanInventory
> Inventory
;
822 std::map
<uint32
,CStatsScanPetAnimal
> _PlayerPets
;