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/>.
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
<std::string
> RespawnPoints
;
93 //-----------------------------------------------------------------------------
94 // Persistent data for CStatsScanFameContainerEntry
95 //-----------------------------------------------------------------------------
97 class CStatsScanFameContainerEntry
100 DECLARE_PERSISTENCE_METHODS
104 std::string 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 CStatsScanGameEvent
182 //-----------------------------------------------------------------------------
184 class CStatsScanGameEvent
187 DECLARE_PERSISTENCE_METHODS
189 CStatsScanGameEvent()
195 std::string _EventFaction
;
199 //-----------------------------------------------------------------------------
200 // Persistent data for CStatsScanPact
201 //-----------------------------------------------------------------------------
206 DECLARE_PERSISTENCE_METHODS
219 //-----------------------------------------------------------------------------
220 // Persistent data for CStatsScanPetAnimal
221 //-----------------------------------------------------------------------------
223 class CStatsScanPetAnimal
226 DECLARE_PERSISTENCE_METHODS
228 NLMISC::CSheetId TicketPetSheetId
;
229 NLMISC::CSheetId PetSheetId
;
231 NLMISC::CEntityId OwnerId
;
232 TAIAlias StableAlias
;
243 CStatsScanPetAnimal()
260 //-----------------------------------------------------------------------------
261 // Persistent data for CStatsScanPhysCharacs
262 //-----------------------------------------------------------------------------
264 class CStatsScanPhysCharacs
267 DECLARE_PERSISTENCE_METHODS
269 std::map
<std::string
,sint32
> _PhysicalCharacteristics
;
273 //-----------------------------------------------------------------------------
274 // Persistent data for CStatsScanPhysScoresEntry
275 //-----------------------------------------------------------------------------
277 class CStatsScanPhysScoresEntry
280 DECLARE_PERSISTENCE_METHODS
282 CStatsScanPhysScoresEntry()
287 BaseRegenerateRepos
=0.0f
;
288 BaseRegenerateAction
=0.0f
;
289 CurrentRegenerate
=0.0f
;
295 float BaseRegenerateRepos
;
296 float BaseRegenerateAction
;
297 float CurrentRegenerate
;
301 //-----------------------------------------------------------------------------
302 // Persistent data for CStatsScanPhysScores
303 //-----------------------------------------------------------------------------
305 class CStatsScanPhysScores
308 DECLARE_PERSISTENCE_METHODS
310 CStatsScanPhysScores()
314 CurrentWalkSpeed
=0.0f
;
315 CurrentRunSpeed
=0.0f
;
320 float CurrentWalkSpeed
;
321 float CurrentRunSpeed
;
322 std::map
<std::string
,CStatsScanPhysScoresEntry
> PhysicalScores
;
326 //-----------------------------------------------------------------------------
327 // Persistent data for CStatsScanSkillsEntry
328 //-----------------------------------------------------------------------------
330 class CStatsScanSkillsEntry
333 DECLARE_PERSISTENCE_METHODS
335 CStatsScanSkillsEntry()
346 sint32 MaxLvlReached
;
352 //-----------------------------------------------------------------------------
353 // Persistent data for CStatsScanSkills
354 //-----------------------------------------------------------------------------
356 class CStatsScanSkills
359 DECLARE_PERSISTENCE_METHODS
361 std::map
<std::string
,CStatsScanSkillsEntry
> Skills
;
365 //-----------------------------------------------------------------------------
366 // Persistent data for CStatsScanItemCraftParameters
367 //-----------------------------------------------------------------------------
369 class CStatsScanItemCraftParameters
372 DECLARE_PERSISTENCE_METHODS
374 CStatsScanItemCraftParameters()
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
;
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
;
434 std::string Protection
;
438 //-----------------------------------------------------------------------------
439 // Persistent data for CStatsScanItem
440 //-----------------------------------------------------------------------------
445 DECLARE_PERSISTENCE_METHODS
449 _ClientInventoryPosition
=0;
461 NLMISC::CSheetId _SheetId
;
462 sint16 _ClientInventoryPosition
;
465 NLMISC::CEntityId _CreatorId
;
467 std::string _PhraseId
;
474 CStatsScanItemCraftParameters _CraftParameters
;
475 std::vector
<NLMISC::CSheetId
> _Enchantment
;
476 std::vector
<CStatsScanItem
> Child
;
480 //-----------------------------------------------------------------------------
481 // Persistent data for CStatsScanInventory
482 //-----------------------------------------------------------------------------
484 class CStatsScanInventory
487 DECLARE_PERSISTENCE_METHODS
489 std::vector
<CStatsScanItem
> _Item
;
493 //-----------------------------------------------------------------------------
494 // Persistent data for CStatsScanPlayerRoom
495 //-----------------------------------------------------------------------------
497 class CStatsScanPlayerRoom
500 DECLARE_PERSISTENCE_METHODS
503 CStatsScanItem Inventory
;
507 CStatsScanPlayerRoom()
516 //-----------------------------------------------------------------------------
517 // Persistent data for CStatsScanEntityPosition
518 //-----------------------------------------------------------------------------
520 class CStatsScanEntityPosition
523 DECLARE_PERSISTENCE_METHODS
530 CStatsScanEntityPosition()
540 //-----------------------------------------------------------------------------
541 // Persistent data for CStatsScanEntityBase
542 //-----------------------------------------------------------------------------
544 class CStatsScanEntityBase
547 DECLARE_PERSISTENCE_METHODS
549 CStatsScanEntityPosition _EntityPosition
;
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;
593 MeleeAttackModifierOnEnemy
=0;
594 MeleeAttackModifierOnSelf
=0;
595 MagicCastingModifierOnSelf
=0;
596 MagicCastingModifierOnEnemy
=0;
597 RangeAttackModifierOnEnemy
=0;
598 RangeAttackModifierOnSelf
=0;
599 AttackModifierOnSelf
=0;
600 ChanceToFailStrategy
=0;
603 ChanceToFailHarvest
=0;
604 ChanceToFailTracking
=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
629 DECLARE_PERSISTENCE_METHODS
638 uint8 _TrousersColor
;
644 uint8 _CreationPointsRepartition
;
645 uint32 _ForbidAuraUseEndDate
;
648 /* Visual Properties */
652 uint8 GabaritTorsoWidth
;
653 uint8 GabaritArmsWidth
;
654 uint8 GabaritLegsWidth
;
655 uint8 GabaritBreastSize
;
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
;