| 24 | #define PROP_FLAGS(cls, name, enum, writeable) AddPropertyFlags<decltype(cls::name), enum>(propertyMap, #name, offsetof(cls, name), writeable) |
| 25 | |
| 26 | void InitPropertyMaps() |
| 27 | { |
| 28 | { |
| 29 | auto & propertyMap = gStatusPropertyMap; |
| 30 | PROP_RO(esv::Status, StatusId); |
| 31 | PROP_RO(esv::Status, CanEnterChance); |
| 32 | PROP_RO(esv::Status, StartTimer); |
| 33 | PROP_RO(esv::Status, LifeTime); |
| 34 | PROP_RO(esv::Status, CurrentLifeTime); |
| 35 | PROP_RO(esv::Status, TurnTimer); |
| 36 | PROP_RO(esv::Status, Strength); |
| 37 | PROP_RO(esv::Status, StatsMultiplier); |
| 38 | PROP_ENUM(esv::Status, DamageSourceType); |
| 39 | PROP_RO(esv::Status, StatusHandle); |
| 40 | PROP_RO(esv::Status, TargetCIHandle); |
| 41 | PROP_RO(esv::Status, StatusSourceHandle); |
| 42 | PROP_RO(esv::Status, SomeHandle); |
| 43 | PROP_FLAGS(esv::Status, Flags0, StatusFlags0, false); |
| 44 | PROP_FLAGS(esv::Status, Flags1, StatusFlags1, false); |
| 45 | PROP_FLAGS(esv::Status, Flags2, StatusFlags2, false); |
| 46 | |
| 47 | propertyMap.Flags["ForceStatus"].Flags |= kPropWrite; |
| 48 | propertyMap.Flags["ForceFailStatus"].Flags |= kPropWrite; |
| 49 | |
| 50 | propertyMap.Properties["LifeTime"].SetFloat = [](void * st, float value) -> bool { |
| 51 | auto status = reinterpret_cast<esv::Status *>(st); |
| 52 | if (value < 0.0f) return false; |
| 53 | status->LifeTime = value; |
| 54 | if (status->CurrentLifeTime > status->LifeTime) { |
| 55 | status->CurrentLifeTime = status->LifeTime; |
| 56 | } |
| 57 | |
| 58 | return true; |
| 59 | }; |
| 60 | |
| 61 | propertyMap.Properties["CurrentLifeTime"].SetFloat = [](void * st, float value) -> bool { |
| 62 | auto status = reinterpret_cast<esv::Status *>(st); |
| 63 | if (value < 0.0f) return false; |
| 64 | status->CurrentLifeTime = value; |
| 65 | if (status->LifeTime < status->CurrentLifeTime) { |
| 66 | status->LifeTime = status->CurrentLifeTime; |
| 67 | } |
| 68 | |
| 69 | return true; |
| 70 | }; |
| 71 | } |
| 72 | |
| 73 | { |
| 74 | auto & propertyMap = gStatusHitPropertyMap; |
| 75 | propertyMap.Parent = &gStatusPropertyMap; |
| 76 | PROP_RO(esv::StatusHit, HitByHandle); |
| 77 | PROP_RO(esv::StatusHit, HitWithHandle); |
| 78 | PROP_RO(esv::StatusHit, WeaponHandle); |
| 79 | PROP(esv::StatusHit, HitReason); |
| 80 | PROP(esv::StatusHit, SkillId); |
| 81 | PROP(esv::StatusHit, Interruption); |
| 82 | PROP(esv::StatusHit, AllowInterruptAction); |
| 83 | PROP(esv::StatusHit, ForceInterrupt); |
no outgoing calls
no test coverage detected