diff --git a/data/actions/player.json b/data/actions/player.json index e6c9cb3e7..c266e805b 100644 --- a/data/actions/player.json +++ b/data/actions/player.json @@ -398,7 +398,18 @@ "restorePercentage": 0, "nextCombo": [], "statuses": { - "caster": [], + "caster": [ + { + "id": 83, + "duration": 20000, + "modifiers": [ + { + "modifier": "DefensePercent", + "value": 20 + } + ] + } + ], "target": [] } }, @@ -414,7 +425,18 @@ "nextCombo": [], "statuses": { "caster": [], - "target": [] + "target": [ + { + "id": 244, + "duration": 30000, + "modifiers": [ + { + "modifier": "TickDamage", + "value": 20 + } + ] + } + ] } }, "34": { @@ -478,7 +500,18 @@ 45 ], "statuses": { - "caster": [], + "caster": [ + { + "id": 85, + "duration": 24000, + "modifiers": [ + { + "modifier": "DamageDealtPercent", + "value": 20 + } + ] + } + ], "target": [] } }, @@ -493,7 +526,18 @@ "restorePercentage": 0, "nextCombo": [], "statuses": { - "caster": [], + "caster": [ + { + "id": 86, + "duration": 20000, + "modifiers": [ + { + "modifier": "AttackPowerPercent", + "value": 50 + } + ] + } + ], "target": [] } }, @@ -523,7 +567,18 @@ "restorePercentage": 0, "nextCombo": [], "statuses": { - "caster": [], + "caster": [ + { + "id": 87, + "duration": 20000, + "modifiers": [ + { + "modifier": "HPPercent", + "value": 20 + } + ] + } + ], "target": [] } }, @@ -574,7 +629,7 @@ }, "44": { "name": "Vengeance", - "potency": 50, + "potency": 0, "comboPotency": 0, "flankPotency": 0, "frontPotency": 0, @@ -583,7 +638,18 @@ "restorePercentage": 0, "nextCombo": [], "statuses": { - "caster": [], + "caster": [ + { + "id": 89, + "duration": 20000, + "modifiers": [ + { + "modifier": "ReflectPhysical", + "value": 50 + } + ] + } + ], "target": [] } }, @@ -643,7 +709,34 @@ "restorePercentage": 0, "nextCombo": [], "statuses": { - "caster": [], + "caster": [ + { + "id": 91, + "duration": 0, + "modifiers": [ + { + "modifier": "HPPercent", + "value": 25 + }, + { + "modifier": "DamageDealtPercent", + "value": -25 + }, + { + "modifier": "HealingMagicRecoveryPercent", + "value": 20 + }, + { + "modifier": "AccuracyPercent", + "value": 5 + }, + { + "modifier": "EnmityPercent", + "value": 20 + } + ] + } + ], "target": [] } }, @@ -703,7 +796,12 @@ "restorePercentage": 0, "nextCombo": [], "statuses": { - "caster": [], + "caster": [ + { + "id": 97, + "duration": 30000 + } + ], "target": [] } }, @@ -1176,7 +1274,19 @@ "restorePercentage": 0, "nextCombo": [], "statuses": { - "caster": [], + "caster": [ + { + "id": 116, + "duration": 10000, + "flag": 4096, + "modifiers": [ + { + "modifier": "CriticalHitPercent", + "value": 100 + } + ] + } + ], "target": [] } }, @@ -2454,7 +2564,38 @@ "nextCombo": [], "statuses": { "caster": [], - "target": [] + "target": [ + { + "id": 180, + "duration": 24000, + "modifiers": [ + { + "modifier": "TickDamage", + "value": 35 + } + ] + }, + { + "id": 191, + "duration": 24000, + "modifiers": [ + { + "modifier": "HealingRecoveryPercent", + "value": -20 + } + ] + }, + { + "id": 240, + "duration": 24000, + "modifiers": [ + { + "modifier": "HeavyPercent", + "value": 40 + } + ] + } + ] } }, "169": { diff --git a/deps/datReader/Exd/Structs.h b/deps/datReader/Exd/Structs.h index 28ed82a51..1d1de7b05 100644 --- a/deps/datReader/Exd/Structs.h +++ b/deps/datReader/Exd/Structs.h @@ -391,14 +391,14 @@ namespace Excel uint8_t EffectWidth; uint8_t CostType; uint8_t Cond; - uint8_t RecastGroup; uint8_t Element; uint8_t ProcStatus; - uint8_t UseClassJob; + uint8_t ClassJobCategory; + uint8_t RecastGroup; uint8_t Init; uint8_t Omen; - uint8_t Unknown; - int8_t Learn; + uint8_t Learn; + int8_t UseClassJob; int8_t SelectRange; int8_t SelectCorpse; int8_t AttackType; @@ -430,7 +430,7 @@ namespace Excel uint8_t HideCastBar : 1; uint8_t IsTargetLine : 1; - int8_t padding0; + int8_t unknown : 8; }; /* 75653 */ @@ -2054,7 +2054,8 @@ namespace Excel uint8_t NotControl : 1; uint8_t NotAction : 1; uint8_t NotMove : 1; - uint8_t padding0 : 6; + uint8_t padding0 : 5; + uint8_t CanOff : 1; uint8_t SemiTransparent : 1; uint8_t FcAction : 1; int8_t padding1[2]; diff --git a/sql/migrations/20230309164293_AddBorrowAction.sql b/sql/migrations/20230309164293_AddBorrowAction.sql new file mode 100644 index 000000000..1cdc3f22a --- /dev/null +++ b/sql/migrations/20230309164293_AddBorrowAction.sql @@ -0,0 +1 @@ +ALTER TABLE `characlass` ADD `BorrowAction` binary(40) DEFAULT NULL NULL AFTER `Lvl`; \ No newline at end of file diff --git a/src/api/PlayerMinimal.cpp b/src/api/PlayerMinimal.cpp index c761ac043..f383a96d1 100644 --- a/src/api/PlayerMinimal.cpp +++ b/src/api/PlayerMinimal.cpp @@ -256,12 +256,14 @@ void PlayerMinimal::saveAsNew() break; } - // CharacterId, ClassIdx, Exp, Lvl + // CharacterId, ClassIdx, Exp, Lvl, BorrowAction auto stmtClass = g_charaDb.getPreparedStatement( Db::ZoneDbStatements::CHARA_CLASS_INS ); stmtClass->setUInt64( 1, m_characterId ); stmtClass->setInt( 2, g_exdData.getRow< Excel::ClassJob >( m_class )->data().WorkIndex ); stmtClass->setInt( 3, 0 ); stmtClass->setInt( 4, 1 ); + std::vector< uint8_t > borrowActionVec( Common::ARRSIZE_BORROWACTION * 4 ); + stmtClass->setBinary( 5, borrowActionVec ); g_charaDb.directExecute( stmtClass ); auto stmtSearchInfo = g_charaDb.getPreparedStatement( Db::ZoneDbStatements::CHARA_SEARCHINFO_INS ); diff --git a/src/common/Common.h b/src/common/Common.h index 27b2c0658..bceab9c0f 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -37,6 +37,7 @@ namespace Sapphire::Common const uint16_t ARRSIZE_UNLOCKS = 64u; const uint16_t ARRSIZE_ORCHESTRION = 40u; const uint16_t ARRSIZE_MONSTERNOTE = 12u; + const uint16_t ARRSIZE_BORROWACTION = 10u; const uint8_t TOWN_COUNT = 6; @@ -887,22 +888,55 @@ namespace Sapphire::Common Perception = 73, // Unique modifiers - HPPercent = 1000, - MPPercent = 1001, - TPPercent = 1002, - GPPercent = 1003, - CPPercent = 1004, - PhysicalDamagePercent = 1005, - MagicDamagePercent = 1006, - AttackPowerPercent = 1007, - DefensePercent = 1008, - AccuracyPercent = 1009, - EvasionPercent = 1010, - MagicDefensePercent = 1011, - CriticalHitPowerPercent = 1012, - CriticalHitResiliencePercent = 1013, - CriticalHitPercent = 1014, - EnmityPercent = 1015 + TickHeal = 1000, + TickDamage = 1001, + StrengthPercent = 1002, + DexterityPercent = 1003, + VitalityPercent = 1004, + IntelligencePercent = 1005, + MindPercent = 1006, + PietyPercent = 1007, + HPPercent = 1008, + MPPercent = 1009, + TPPercent = 1010, + GPPercent = 1011, + CPPercent = 1012, + PhysicalDamagePercent = 1013, + MagicDamagePercent = 1014, + AttackPowerPercent = 1015, + DefensePercent = 1016, + AccuracyPercent = 1017, + EvasionPercent = 1018, + MagicDefensePercent = 1019, + CriticalHitPowerPercent = 1020, + CriticalHitResiliencePercent = 1021, + CriticalHitPercent = 1022, + EnmityPercent = 1023, + DamageDealtPercent = 1024, + DamageTakenPercent = 1025, + HealingMagicRecoveryPercent = 1026, + SlashingResistancePercent = 1027, + PiercingResistancePercent = 1028, + BluntResistancePercent = 1029, + ProjectileResistancePercent = 1030, + ParryPercent = 1031 + }; + + enum class StatusEffectFlag : uint32_t + { + BuffCategory = 1, + DebuffCategory = 2, + Permanent = 4, + IsGaze = 8, + Transfiguration = 16, + CanDispel = 32, + LockActions = 64, + LockControl = 128, + LockMovement = 256, + Invisibilty = 512, + CanStatusOff = 1024, + FcBuff = 2048, + RemoveOnSuccessfulHit = 4096 }; enum struct ActionAspect : uint8_t @@ -923,6 +957,7 @@ namespace Sapphire::Common MagicPoints = 3, TacticsPoints = 5, TacticsPoints1 = 6, + StatusEffect = 10, Sprint = 18, // WARGauge = 22, // DRKGauge = 25, @@ -1830,8 +1865,8 @@ namespace Sapphire::Common { SingleTarget = 1, CircularAOE = 2, - Type3 = 3, // another single target? no idea how to call it - RectangularAOE = 4, + RectangularAOE = 3, + ConeAOE = 4, CircularAoEPlaced = 7 }; diff --git a/src/common/Database/ZoneDbConnection.cpp b/src/common/Database/ZoneDbConnection.cpp index 10f9f854e..6a0f79a0a 100644 --- a/src/common/Database/ZoneDbConnection.cpp +++ b/src/common/Database/ZoneDbConnection.cpp @@ -161,11 +161,11 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements() prepareStatement( CHARA_SEL_QUEST, "SELECT * FROM charaquest WHERE CharacterId = ?;", CONNECTION_SYNC ); /// CLASS INFO - prepareStatement( CHARA_CLASS_SEL, "SELECT ClassIdx, Exp, Lvl FROM characlass WHERE CharacterId = ?;", + prepareStatement( CHARA_CLASS_SEL, "SELECT ClassIdx, Exp, Lvl, BorrowAction FROM characlass WHERE CharacterId = ?;", CONNECTION_SYNC ); - prepareStatement( CHARA_CLASS_INS, "INSERT INTO characlass ( CharacterId, ClassIdx, Exp, Lvl ) VALUES( ?,?,?,? );", + prepareStatement( CHARA_CLASS_INS, "INSERT INTO characlass ( CharacterId, ClassIdx, Exp, Lvl, BorrowAction ) VALUES( ?,?,?,?,? );", CONNECTION_BOTH ); - prepareStatement( CHARA_CLASS_UP, "UPDATE characlass SET Exp = ?, Lvl = ? WHERE CharacterId = ? AND ClassIdx = ?;", + prepareStatement( CHARA_CLASS_UP, "UPDATE characlass SET Exp = ?, Lvl = ?, BorrowAction = ? WHERE CharacterId = ? AND ClassIdx = ?;", CONNECTION_ASYNC ); prepareStatement( CHARA_CLASS_DEL, "DELETE FROM characlass WHERE CharacterId = ?;", CONNECTION_ASYNC ); diff --git a/src/scripts/action/war/ActionInnerBeast.cpp b/src/scripts/action/war/ActionInnerBeast.cpp new file mode 100644 index 000000000..d4193e4d4 --- /dev/null +++ b/src/scripts/action/war/ActionInnerBeast.cpp @@ -0,0 +1,47 @@ +#include