From f00f93036626e0a5c7f2a8d5f4b335ce6e660389 Mon Sep 17 00:00:00 2001 From: collett Date: Tue, 7 Mar 2023 05:12:18 +0900 Subject: [PATCH] Sapphire 5.58 now with actions. --- src/common/Common.h | 69 +- src/common/Network/PacketDef/Ipcs.h | 2 +- src/scripts/action/brd/ActionHeavyShot97.cpp | 33 + src/scripts/action/common/ActionSprint3.cpp | 27 - .../action/drg/ActionBloodOfTheDragon3553.cpp | 27 + .../action/drg/ActionChaosThrust88.cpp | 36 + .../action/drg/ActionCoerthanTorment16477.cpp | 34 + .../action/drg/ActionFangAndClaw3554.cpp | 57 + src/scripts/action/drg/ActionFullThrust84.cpp | 35 + .../action/drg/ActionGeirskogul3555.cpp | 42 + .../action/drg/ActionHighJump16478.cpp | 35 + .../action/drg/ActionMirageDive7399.cpp | 45 + .../action/drg/ActionRaidenThrust16479.cpp | 40 + .../action/drg/ActionSonicThrust7397.cpp | 34 + .../action/drg/ActionWheelingThrust3556.cpp | 57 + .../action/drk/ActionTheBlackestNight7393.cpp | 39 + .../action/gnb/ActionBloodfest16164.cpp | 32 + .../action/gnb/ActionBrutalShell16139.cpp | 44 + .../action/gnb/ActionGnashingFang16146.cpp | 41 + .../action/gnb/ActionSavageClaw16147.cpp | 41 + .../action/gnb/ActionWickedTalon16150.cpp | 41 + src/scripts/action/role/ActionProvoke7533.cpp | 29 + src/scripts/action/sam/ActionEnpi7486.cpp | 59 + src/scripts/action/sam/ActionFuga7483.cpp | 32 + src/scripts/action/sam/ActionGekko7481.cpp | 43 + src/scripts/action/sam/ActionHagakure7495.cpp | 33 + src/scripts/action/sam/ActionHakaze7477.cpp | 32 + .../action/sam/ActionIkishoten16482.cpp | 26 + src/scripts/action/sam/ActionJinpu7478.cpp | 32 + src/scripts/action/sam/ActionKasha7482.cpp | 43 + src/scripts/action/sam/ActionMangetsu7484.cpp | 43 + src/scripts/action/sam/ActionOka7485.cpp | 43 + src/scripts/action/sam/ActionShifu7479.cpp | 32 + src/scripts/action/sam/ActionYukikaze7480.cpp | 43 + src/scripts/action/sch/ActionAdloquium185.cpp | 81 + .../action/war/ActionChaoticCyclone16463.cpp | 36 + src/scripts/action/war/ActionInfuriate52.cpp | 36 + .../action/war/ActionInnerChaos16465.cpp | 36 + .../action/whm/ActionBenediction140.cpp | 28 + src/scripts/action/whm/ActionCure120.cpp | 33 + src/scripts/action/whm/ActionCureII135.cpp | 42 + src/world/Action/Action.cpp | 759 ++- src/world/Action/Action.h | 31 +- src/world/Action/ActionLut.cpp | 412 +- src/world/Action/ActionLut.h | 95 +- src/world/Action/ActionLutData.cpp | 5063 ++++++++++++----- src/world/Action/EffectBuilder.cpp | 88 +- src/world/Action/EffectBuilder.h | 29 +- src/world/Action/EffectResult.cpp | 104 +- src/world/Action/EffectResult.h | 18 +- src/world/Action/EventAction.cpp | 4 +- src/world/Action/EventAction.h | 2 +- src/world/Action/ItemAction.cpp | 2 +- src/world/Action/ItemAction.h | 2 +- src/world/Actor/BNpc.cpp | 32 +- src/world/Actor/Chara.cpp | 195 +- src/world/Actor/Chara.h | 16 +- src/world/Actor/Player.cpp | 491 +- src/world/Actor/Player.h | 44 +- src/world/Manager/ActionMgr.cpp | 10 + src/world/Manager/HousingMgr.cpp | 2 + src/world/Math/CalcStats.cpp | 425 +- src/world/Math/CalcStats.h | 50 +- .../Network/Handlers/ClientTriggerHandler.cpp | 2 +- .../Network/Handlers/GMCommandHandlers.cpp | 7 - src/world/Network/Handlers/PacketHandlers.cpp | 12 +- src/world/Script/NativeScriptApi.cpp | 12 + src/world/Script/NativeScriptApi.h | 10 + src/world/Script/ScriptMgr.cpp | 36 + src/world/Script/ScriptMgr.h | 6 + src/world/StatusEffect/StatusEffect.cpp | 287 +- src/world/StatusEffect/StatusEffect.h | 31 +- 72 files changed, 7853 insertions(+), 2017 deletions(-) create mode 100644 src/scripts/action/brd/ActionHeavyShot97.cpp delete mode 100644 src/scripts/action/common/ActionSprint3.cpp create mode 100644 src/scripts/action/drg/ActionBloodOfTheDragon3553.cpp create mode 100644 src/scripts/action/drg/ActionChaosThrust88.cpp create mode 100644 src/scripts/action/drg/ActionCoerthanTorment16477.cpp create mode 100644 src/scripts/action/drg/ActionFangAndClaw3554.cpp create mode 100644 src/scripts/action/drg/ActionFullThrust84.cpp create mode 100644 src/scripts/action/drg/ActionGeirskogul3555.cpp create mode 100644 src/scripts/action/drg/ActionHighJump16478.cpp create mode 100644 src/scripts/action/drg/ActionMirageDive7399.cpp create mode 100644 src/scripts/action/drg/ActionRaidenThrust16479.cpp create mode 100644 src/scripts/action/drg/ActionSonicThrust7397.cpp create mode 100644 src/scripts/action/drg/ActionWheelingThrust3556.cpp create mode 100644 src/scripts/action/drk/ActionTheBlackestNight7393.cpp create mode 100644 src/scripts/action/gnb/ActionBloodfest16164.cpp create mode 100644 src/scripts/action/gnb/ActionBrutalShell16139.cpp create mode 100644 src/scripts/action/gnb/ActionGnashingFang16146.cpp create mode 100644 src/scripts/action/gnb/ActionSavageClaw16147.cpp create mode 100644 src/scripts/action/gnb/ActionWickedTalon16150.cpp create mode 100644 src/scripts/action/role/ActionProvoke7533.cpp create mode 100644 src/scripts/action/sam/ActionEnpi7486.cpp create mode 100644 src/scripts/action/sam/ActionFuga7483.cpp create mode 100644 src/scripts/action/sam/ActionGekko7481.cpp create mode 100644 src/scripts/action/sam/ActionHagakure7495.cpp create mode 100644 src/scripts/action/sam/ActionHakaze7477.cpp create mode 100644 src/scripts/action/sam/ActionIkishoten16482.cpp create mode 100644 src/scripts/action/sam/ActionJinpu7478.cpp create mode 100644 src/scripts/action/sam/ActionKasha7482.cpp create mode 100644 src/scripts/action/sam/ActionMangetsu7484.cpp create mode 100644 src/scripts/action/sam/ActionOka7485.cpp create mode 100644 src/scripts/action/sam/ActionShifu7479.cpp create mode 100644 src/scripts/action/sam/ActionYukikaze7480.cpp create mode 100644 src/scripts/action/sch/ActionAdloquium185.cpp create mode 100644 src/scripts/action/war/ActionChaoticCyclone16463.cpp create mode 100644 src/scripts/action/war/ActionInfuriate52.cpp create mode 100644 src/scripts/action/war/ActionInnerChaos16465.cpp create mode 100644 src/scripts/action/whm/ActionBenediction140.cpp create mode 100644 src/scripts/action/whm/ActionCure120.cpp create mode 100644 src/scripts/action/whm/ActionCureII135.cpp diff --git a/src/common/Common.h b/src/common/Common.h index c9928c06..a53c18d7 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -1103,6 +1103,73 @@ namespace Sapphire::Common Gatherer }; + enum class StatusEffectType : uint32_t + { + Invalid = 0, + DamageMultiplier = 1, + DamageReceiveMultiplier = 2, + Hot = 3, + Dot = 4, + HealReceiveMultiplier = 5, + HealCastMultiplier = 6, + CritDHRateBonus = 7, + DamageReceiveTrigger = 8, + DamageDealtTrigger = 9, + Shield = 10, + MPRestore = 11, + Haste = 12, + InstantCast = 13, + BlockParryRateBonus = 14, + MPRestorePerGCD = 15, + AlwaysCombo = 16, + PotencyMultiplier = 17, + }; + + enum class ActionTypeFilter : int32_t + { + Unknown = 0, + Physical = 1, + Magical = 2, + Slashing = 4, + Piercing = 8, + Blunt = 16, + All = 255 + }; + + enum class CritDHBonusFilter : int32_t + { + None = 0, + Damage = 1, + Heal = 2, + All = 255, + }; + + enum class StatusEffectTriggerResult : int32_t + { + None = 0, + ReflectDamage = 1, + AbsorbHP = 2, + }; + + enum ActionBonusEffect : uint8_t + { + NoBonus = 0, + CritBonus = 1, + DHBonus = 2, + GainMPPercentage = 4, + GainJobResource = 8, + SelfHeal = 16, + DamageFallOff = 32, + GainJobTimer = 64, + }; + + enum ActionBonusEffectRequirement : uint8_t + { + NoRequirement = 0, + RequireCorrectCombo = 1, + RequireCorrectPositional = 2, + }; + enum class AstCardType : uint8_t { None = 0, @@ -1224,7 +1291,7 @@ namespace Sapphire::Common { uint8_t ammo; uint8_t unused; - uint16_t maxTimerDuration; + uint16_t maxTimerDuration; // what is this? uint8_t ammoComboStep; } gnb; struct diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index 0db60930..46f3a77e 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -271,7 +271,7 @@ namespace Sapphire::Network::Packets ////////////////////////////////////////////////// - DuelChallenge = 0x0277, // 4.2; this is responsible for opening the ui + DuelChallenge = 0xF277, // 4.2; this is responsible for opening the ui PerformNote = 0x0127, // updated 5.58 hotfix PrepareZoning = 0x02AB, // updated 5.58 hotfix diff --git a/src/scripts/action/brd/ActionHeavyShot97.cpp b/src/scripts/action/brd/ActionHeavyShot97.cpp new file mode 100644 index 00000000..2854ad41 --- /dev/null +++ b/src/scripts/action/brd/ActionHeavyShot97.cpp @@ -0,0 +1,33 @@ +#include