From 33d83fa1e4bbfc17dbff99361cf5d29e92b1f866 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 2 Jun 2019 00:34:07 +1000 Subject: [PATCH 01/10] move the actionlut data to its own isolated cpp file --- ...ionLut.cpp.tmpl => ActionLutData.cpp.tmpl} | 0 src/world/Action/ActionLut.cpp | 1125 +---------------- src/world/Action/ActionLut.h | 2 + src/world/Action/ActionLutData.cpp | 1120 ++++++++++++++++ 4 files changed, 1133 insertions(+), 1114 deletions(-) rename src/tools/action_parse/{ActionLut.cpp.tmpl => ActionLutData.cpp.tmpl} (100%) create mode 100644 src/world/Action/ActionLutData.cpp diff --git a/src/tools/action_parse/ActionLut.cpp.tmpl b/src/tools/action_parse/ActionLutData.cpp.tmpl similarity index 100% rename from src/tools/action_parse/ActionLut.cpp.tmpl rename to src/tools/action_parse/ActionLutData.cpp.tmpl diff --git a/src/world/Action/ActionLut.cpp b/src/world/Action/ActionLut.cpp index 1e9c1f97..9c33bb96 100644 --- a/src/world/Action/ActionLut.cpp +++ b/src/world/Action/ActionLut.cpp @@ -2,1119 +2,16 @@ using namespace Sapphire::World::Action; -ActionLut::Lut ActionLut::m_actionLut = +bool ActionLut::validEntryExists( uint16_t actionId ) { - // attack - { 7, { 0, 0, 0, 0, 0 } }, - // Shot - { 8, { 0, 0, 0, 0, 0 } }, - // Fast Blade - { 9, { 160, 0, 0, 0, 0 } }, - // Savage Blade - { 11, { 100, 0, 0, 0, 0 } }, - // Flash - { 14, { 0, 0, 0, 0, 0 } }, - // Riot Blade - { 15, { 100, 0, 0, 0, 0 } }, - // Shield Bash - { 16, { 110, 0, 0, 0, 0 } }, - // Sentinel - { 17, { 0, 0, 0, 0, 0 } }, - // Tempered Will - { 19, { 0, 0, 0, 0, 0 } }, - // Fight or Flight - { 20, { 0, 0, 0, 0, 0 } }, - // Rage of Halone - { 21, { 100, 0, 0, 0, 0 } }, - // Bulwark - { 22, { 0, 0, 0, 0, 0 } }, - // Circle of Scorn - { 23, { 100, 0, 0, 0, 0 } }, - // Shield Lob - { 24, { 120, 0, 0, 0, 0 } }, - // Shield Swipe - { 25, { 100, 0, 0, 0, 0 } }, - // Sword Oath - { 26, { 75, 0, 0, 0, 0 } }, - // Cover - { 27, { 0, 0, 0, 0, 0 } }, - // Shield Oath - { 28, { 0, 0, 0, 0, 0 } }, - // Spirits Within - { 29, { 300, 0, 0, 0, 0 } }, - // Hallowed Ground - { 30, { 0, 0, 0, 0, 0 } }, - // Heavy Swing - { 31, { 160, 0, 0, 0, 0 } }, - // Skull Sunder - { 35, { 100, 0, 0, 0, 0 } }, - // Maim - { 37, { 100, 0, 0, 0, 0 } }, - // Berserk - { 38, { 0, 0, 0, 0, 0 } }, - // Thrill of Battle - { 40, { 0, 0, 0, 0, 0 } }, - // Overpower - { 41, { 130, 0, 0, 0, 0 } }, - // Storm's Path - { 42, { 100, 0, 0, 0, 0 } }, - // Holmgang - { 43, { 0, 0, 0, 0, 0 } }, - // Vengeance - { 44, { 55, 0, 0, 0, 0 } }, - // Storm's Eye - { 45, { 100, 0, 0, 0, 0 } }, - // Tomahawk - { 46, { 140, 0, 0, 0, 0 } }, - // Butcher's Block - { 47, { 100, 0, 0, 0, 0 } }, - // Defiance - { 48, { 0, 0, 0, 0, 0 } }, - // Inner Beast - { 49, { 350, 0, 0, 0, 0 } }, - // Unchained - { 50, { 0, 0, 0, 0, 0 } }, - // Steel Cyclone - { 51, { 200, 0, 0, 0, 0 } }, - // Infuriate - { 52, { 0, 0, 0, 0, 0 } }, - // Bootshine - { 53, { 140, 0, 0, 0, 0 } }, - // True Strike - { 54, { 160, 0, 0, 180, 0 } }, - // Snap Punch - { 56, { 150, 170, 0, 0, 0 } }, - // Internal Release - { 59, { 0, 0, 0, 0, 0 } }, - // Fists of Earth - { 60, { 0, 0, 0, 0, 0 } }, - // Twin Snakes - { 61, { 110, 130, 0, 0, 0 } }, - // Arm of the Destroyer - { 62, { 50, 0, 0, 0, 0 } }, - // Fists of Fire - { 63, { 0, 0, 0, 0, 0 } }, - // Steel Peak - { 64, { 150, 0, 0, 0, 0 } }, - // Mantra - { 65, { 0, 0, 0, 0, 0 } }, - // Demolish - { 66, { 50, 0, 0, 70, 0 } }, - // Howling Fist - { 67, { 210, 0, 0, 0, 0 } }, - // Perfect Balance - { 69, { 0, 0, 0, 0, 0 } }, - // Rockbreaker - { 70, { 130, 0, 0, 0, 0 } }, - // Shoulder Tackle - { 71, { 100, 0, 0, 0, 0 } }, - // One Ilm Punch - { 72, { 120, 0, 0, 0, 0 } }, - // Fists of Wind - { 73, { 0, 0, 0, 0, 0 } }, - // Dragon Kick - { 74, { 120, 140, 0, 0, 0 } }, - // True Thrust - { 75, { 160, 0, 0, 0, 0 } }, - // Vorpal Thrust - { 78, { 100, 0, 0, 0, 0 } }, - // Heavy Thrust - { 79, { 150, 190, 0, 0, 0 } }, - // Impulse Drive - { 81, { 200, 0, 0, 0, 0 } }, - // Life Surge - { 83, { 0, 0, 0, 0, 0 } }, - // Full Thrust - { 84, { 100, 0, 0, 0, 0 } }, - // Blood for Blood - { 85, { 0, 0, 0, 0, 0 } }, - // Doom Spike - { 86, { 140, 0, 0, 0, 0 } }, - // Disembowel - { 87, { 100, 0, 0, 0, 0 } }, - // Chaos Thrust - { 88, { 100, 0, 0, 140, 0 } }, - // Piercing Talon - { 90, { 120, 0, 0, 0, 0 } }, - // Jump - { 92, { 260, 0, 0, 0, 0 } }, - // Elusive Jump - { 94, { 0, 0, 0, 0, 0 } }, - // Spineshatter Dive - { 95, { 210, 0, 0, 0, 0 } }, - // Dragonfire Dive - { 96, { 320, 0, 0, 0, 0 } }, - // Heavy Shot - { 97, { 150, 0, 0, 0, 0 } }, - // Straight Shot - { 98, { 140, 0, 0, 0, 0 } }, - // Venomous Bite - { 100, { 100, 0, 0, 0, 0 } }, - // Raging Strikes - { 101, { 0, 0, 0, 0, 0 } }, - // Misery's End - { 103, { 190, 0, 0, 0, 0 } }, - // Quick Nock - { 106, { 110, 0, 0, 0, 0 } }, - // Barrage - { 107, { 0, 0, 0, 0, 0 } }, - // Bloodletter - { 110, { 130, 0, 0, 0, 0 } }, - // Repelling Shot - { 112, { 0, 0, 0, 0, 0 } }, - // Windbite - { 113, { 60, 0, 0, 0, 0 } }, - // Mage's Ballad - { 114, { 100, 0, 0, 0, 0 } }, - // Foe Requiem - { 115, { 0, 0, 0, 0, 0 } }, - // Army's Paeon - { 116, { 100, 0, 0, 0, 0 } }, - // Rain of Death - { 117, { 100, 0, 0, 0, 0 } }, - // Battle Voice - { 118, { 0, 0, 0, 0, 0 } }, - // Stone - { 119, { 140, 0, 0, 0, 0 } }, - // Cure - { 120, { 0, 0, 0, 0, 450 } }, - // Aero - { 121, { 50, 0, 0, 0, 0 } }, - // Medica - { 124, { 0, 0, 0, 0, 300 } }, - // Raise - { 125, { 0, 0, 0, 0, 0 } }, - // Stone II - { 127, { 200, 0, 0, 0, 0 } }, - // Repose - { 128, { 0, 0, 0, 0, 0 } }, - // Cure III - { 131, { 0, 0, 0, 0, 550 } }, - // Aero II - { 132, { 50, 0, 0, 0, 0 } }, - // Medica II - { 133, { 0, 0, 0, 0, 200 } }, - // Fluid Aura - { 134, { 0, 0, 0, 0, 0 } }, - // Cure II - { 135, { 0, 0, 0, 0, 700 } }, - // Presence of Mind - { 136, { 0, 0, 0, 0, 0 } }, - // Regen - { 137, { 0, 0, 0, 0, 150 } }, - // Holy - { 139, { 200, 0, 0, 0, 0 } }, - // Benediction - { 140, { 0, 0, 0, 0, 0 } }, - // Fire - { 141, { 180, 0, 0, 0, 0 } }, - // Blizzard - { 142, { 180, 0, 0, 0, 0 } }, - // Thunder - { 144, { 30, 0, 0, 0, 0 } }, - // Sleep - { 145, { 0, 0, 0, 0, 0 } }, - // Blizzard II - { 146, { 50, 0, 0, 0, 0 } }, - // Fire II - { 147, { 80, 0, 0, 0, 0 } }, - // Transpose - { 149, { 0, 0, 0, 0, 0 } }, - // Fire III - { 152, { 240, 0, 0, 0, 0 } }, - // Thunder III - { 153, { 70, 0, 0, 0, 0 } }, - // Blizzard III - { 154, { 240, 0, 0, 0, 0 } }, - // Aetherial Manipulation - { 155, { 0, 0, 0, 0, 0 } }, - // Scathe - { 156, { 100, 0, 0, 0, 0 } }, - // Manaward - { 157, { 0, 0, 0, 0, 0 } }, - // Convert - { 158, { 0, 0, 0, 0, 0 } }, - // Freeze - { 159, { 100, 0, 0, 0, 0 } }, - // Flare - { 162, { 260, 0, 0, 0, 0 } }, - // Ruin - { 163, { 100, 0, 0, 0, 0 } }, - // Bio - { 164, { 0, 0, 0, 0, 0 } }, - // Summon - { 165, { 0, 0, 0, 0, 0 } }, - // Aetherflow - { 166, { 0, 0, 0, 0, 0 } }, - // Energy Drain - { 167, { 150, 0, 0, 0, 0 } }, - // Miasma - { 168, { 20, 0, 0, 0, 0 } }, - // Summon II - { 170, { 0, 0, 0, 0, 0 } }, - // Sustain - { 171, { 0, 0, 0, 0, 0 } }, - // Ruin II - { 172, { 100, 0, 0, 0, 0 } }, - // Resurrection - { 173, { 0, 0, 0, 0, 0 } }, - // Bane - { 174, { 0, 0, 0, 0, 0 } }, - // Rouse - { 176, { 0, 0, 0, 0, 0 } }, - // Miasma II - { 177, { 100, 0, 0, 0, 0 } }, - // Bio II - { 178, { 0, 0, 0, 0, 0 } }, - // Shadow Flare - { 179, { 50, 0, 0, 0, 0 } }, - // Summon III - { 180, { 0, 0, 0, 0, 0 } }, - // Fester - { 181, { 150, 0, 0, 0, 0 } }, - // Tri-bind - { 182, { 30, 0, 0, 0, 0 } }, - // Enkindle - { 184, { 0, 0, 0, 0, 0 } }, - // Adloquium - { 185, { 0, 0, 0, 0, 300 } }, - // Succor - { 186, { 0, 0, 0, 0, 150 } }, - // Sacred Soil - { 188, { 0, 0, 0, 0, 0 } }, - // Lustrate - { 189, { 0, 0, 0, 0, 600 } }, - // Physick - { 190, { 0, 0, 0, 0, 400 } }, - // Shield Wall - { 197, { 0, 0, 0, 0, 0 } }, - // Stronghold - { 198, { 0, 0, 0, 0, 0 } }, - // Last Bastion - { 199, { 0, 0, 0, 0, 0 } }, - // Braver - { 200, { 2400, 0, 0, 0, 0 } }, - // Bladedance - { 201, { 5250, 0, 0, 0, 0 } }, - // Final Heaven - { 202, { 9000, 0, 0, 0, 0 } }, - // Skyshard - { 203, { 1650, 0, 0, 0, 0 } }, - // Starstorm - { 204, { 3600, 0, 0, 0, 0 } }, - // Meteor - { 205, { 6150, 0, 0, 0, 0 } }, - // Healing Wind - { 206, { 0, 0, 0, 0, 0 } }, - // Breath of the Earth - { 207, { 0, 0, 0, 0, 0 } }, - // Pulse of Life - { 208, { 0, 0, 0, 0, 0 } }, - // Magitek Cannon - { 1128, { 0, 0, 0, 0, 0 } }, - // Photon Stream - { 1129, { 0, 0, 0, 0, 0 } }, - // attack - { 1533, { 0, 0, 0, 0, 0 } }, - // Spinning Edge - { 2240, { 150, 0, 0, 0, 0 } }, - // Shade Shift - { 2241, { 0, 0, 0, 0, 0 } }, - // Gust Slash - { 2242, { 100, 0, 0, 0, 0 } }, - // Hide - { 2245, { 0, 0, 0, 0, 0 } }, - // Assassinate - { 2246, { 200, 0, 0, 0, 0 } }, - // Throwing Dagger - { 2247, { 120, 0, 0, 0, 0 } }, - // Mug - { 2248, { 140, 0, 0, 0, 0 } }, - // Hide - { 2253, { 0, 0, 0, 0, 0 } }, - // Death Blossom - { 2254, { 110, 0, 0, 0, 0 } }, - // Aeolian Edge - { 2255, { 100, 0, 0, 160, 0 } }, - // Jugulate - { 2256, { 80, 0, 0, 0, 0 } }, - // Shadow Fang - { 2257, { 100, 0, 0, 0, 0 } }, - // Trick Attack - { 2258, { 240, 0, 0, 400, 0 } }, - // Ten - { 2259, { 0, 0, 0, 0, 0 } }, - // Ninjutsu - { 2260, { 0, 0, 0, 0, 0 } }, - // Chi - { 2261, { 0, 0, 0, 0, 0 } }, - // Shukuchi - { 2262, { 0, 0, 0, 0, 0 } }, - // Jin - { 2263, { 0, 0, 0, 0, 0 } }, - // Kassatsu - { 2264, { 0, 0, 0, 0, 0 } }, - // Fuma Shuriken - { 2265, { 240, 0, 0, 0, 0 } }, - // Katon - { 2266, { 250, 0, 0, 0, 0 } }, - // Raiton - { 2267, { 360, 0, 0, 0, 0 } }, - // Hyoton - { 2268, { 140, 0, 0, 0, 0 } }, - // Huton - { 2269, { 0, 0, 0, 0, 0 } }, - // Doton - { 2270, { 45, 0, 0, 0, 0 } }, - // Suiton - { 2271, { 180, 0, 0, 0, 0 } }, - // Rabbit Medium - { 2272, { 0, 0, 0, 0, 0 } }, - // Rook Autoturret - { 2864, { 80, 0, 0, 0, 0 } }, - // Bishop Autoturret - { 2865, { 60, 0, 0, 0, 0 } }, - // Split Shot - { 2866, { 160, 0, 0, 0, 0 } }, - // Reload - { 2867, { 0, 0, 0, 0, 0 } }, - // Slug Shot - { 2868, { 100, 0, 0, 0, 0 } }, - // Spread Shot - { 2870, { 80, 0, 0, 0, 0 } }, - // Hot Shot - { 2872, { 120, 0, 0, 0, 0 } }, - // Clean Shot - { 2873, { 100, 0, 0, 0, 0 } }, - // Gauss Round - { 2874, { 210, 0, 0, 0, 0 } }, - // Heartbreak - { 2875, { 240, 0, 0, 0, 0 } }, - // Reassemble - { 2876, { 0, 0, 0, 0, 0 } }, - // Wildfire - { 2878, { 0, 0, 0, 0, 0 } }, - // Quick Reload - { 2879, { 0, 0, 0, 0, 0 } }, - // Gauss Barrel - { 2880, { 0, 0, 0, 0, 0 } }, - // Rapid Fire - { 2881, { 0, 0, 0, 0, 0 } }, - // Hypercharge - { 2885, { 0, 0, 0, 0, 0 } }, - // Dismantle - { 2887, { 0, 0, 0, 0, 0 } }, - // Blank - { 2888, { 0, 0, 0, 0, 0 } }, - // Ricochet - { 2890, { 320, 0, 0, 0, 0 } }, - // Raiton - { 3203, { 0, 0, 0, 0, 0 } }, - // Raiton - { 3204, { 0, 0, 0, 0, 0 } }, - // Kanashibari - { 3207, { 0, 0, 0, 0, 0 } }, - // Turret Retrieval - { 3487, { 0, 0, 0, 0, 0 } }, - // Goring Blade - { 3538, { 100, 0, 0, 0, 0 } }, - // Royal Authority - { 3539, { 100, 0, 0, 0, 0 } }, - // Divine Veil - { 3540, { 0, 0, 0, 0, 0 } }, - // Clemency - { 3541, { 0, 0, 0, 0, 1200 } }, - // Sheltron - { 3542, { 0, 0, 0, 0, 0 } }, - // Tornado Kick - { 3543, { 330, 0, 0, 0, 0 } }, - // Purification - { 3544, { 0, 0, 0, 0, 0 } }, - // Elixir Field - { 3545, { 220, 0, 0, 0, 0 } }, - // Meditation - { 3546, { 0, 0, 0, 0, 0 } }, - // the Forbidden Chakra - { 3547, { 250, 0, 0, 0, 0 } }, - // Deliverance - { 3548, { 0, 0, 0, 0, 0 } }, - // Fell Cleave - { 3549, { 520, 0, 0, 0, 0 } }, - // Decimate - { 3550, { 280, 0, 0, 0, 0 } }, - // Raw Intuition - { 3551, { 0, 0, 0, 0, 0 } }, - // Equilibrium - { 3552, { 0, 0, 0, 0, 1200 } }, - // Blood of the Dragon - { 3553, { 0, 0, 0, 0, 0 } }, - // Fang and Claw - { 3554, { 260, 300, 0, 0, 0 } }, - // Geirskogul - { 3555, { 230, 0, 0, 0, 0 } }, - // Wheeling Thrust - { 3556, { 260, 0, 0, 300, 0 } }, - // Battle Litany - { 3557, { 0, 0, 0, 0, 0 } }, - // Empyreal Arrow - { 3558, { 230, 0, 0, 0, 0 } }, - // the Wanderer's Minuet - { 3559, { 100, 0, 0, 0, 0 } }, - // Iron Jaws - { 3560, { 100, 0, 0, 0, 0 } }, - // the Warden's Paean - { 3561, { 0, 0, 0, 0, 0 } }, - // Sidewinder - { 3562, { 100, 0, 0, 0, 0 } }, - // Armor Crush - { 3563, { 100, 160, 0, 0, 0 } }, - // Shadewalker - { 3564, { 0, 0, 0, 0, 0 } }, - // Smoke Screen - { 3565, { 0, 0, 0, 0, 0 } }, - // Dream Within a Dream - { 3566, { 150, 0, 0, 0, 0 } }, - // Duality - { 3567, { 0, 0, 0, 0, 0 } }, - // Stone III - { 3568, { 210, 0, 0, 0, 0 } }, - // Asylum - { 3569, { 0, 0, 0, 0, 100 } }, - // Tetragrammaton - { 3570, { 0, 0, 0, 0, 700 } }, - // Assize - { 3571, { 400, 0, 0, 0, 400 } }, - // Aero III - { 3572, { 50, 0, 0, 0, 0 } }, - // Ley Lines - { 3573, { 0, 0, 0, 0, 0 } }, - // Sharpcast - { 3574, { 0, 0, 0, 0, 0 } }, - // Enochian - { 3575, { 0, 0, 0, 0, 0 } }, - // Blizzard IV - { 3576, { 260, 0, 0, 0, 0 } }, - // Fire IV - { 3577, { 300, 0, 0, 0, 0 } }, - // Painflare - { 3578, { 180, 0, 0, 0, 0 } }, - // Ruin III - { 3579, { 120, 0, 0, 0, 0 } }, - // Tri-disaster - { 3580, { 0, 0, 0, 0, 0 } }, - // Dreadwyrm Trance - { 3581, { 0, 0, 0, 0, 0 } }, - // Deathflare - { 3582, { 400, 0, 0, 0, 0 } }, - // Indomitability - { 3583, { 0, 0, 0, 0, 500 } }, - // Broil - { 3584, { 190, 0, 0, 0, 0 } }, - // Deployment Tactics - { 3585, { 0, 0, 0, 0, 0 } }, - // Emergency Tactics - { 3586, { 0, 0, 0, 0, 0 } }, - // Dissipation - { 3587, { 0, 0, 0, 0, 0 } }, - // Draw - { 3590, { 0, 0, 0, 0, 0 } }, - // Royal Road - { 3591, { 0, 0, 0, 0, 0 } }, - // Spread - { 3592, { 0, 0, 0, 0, 0 } }, - // Redraw - { 3593, { 0, 0, 0, 0, 0 } }, - // Benefic - { 3594, { 0, 0, 0, 0, 400 } }, - // Aspected Benefic - { 3595, { 0, 0, 0, 0, 200 } }, - // Malefic - { 3596, { 150, 0, 0, 0, 0 } }, - // Malefic II - { 3598, { 180, 0, 0, 0, 0 } }, - // Combust - { 3599, { 0, 0, 0, 0, 0 } }, - // Helios - { 3600, { 0, 0, 0, 0, 300 } }, - // Aspected Helios - { 3601, { 0, 0, 0, 0, 200 } }, - // Ascend - { 3603, { 0, 0, 0, 0, 0 } }, - // Diurnal Sect - { 3604, { 0, 0, 0, 0, 0 } }, - // Nocturnal Sect - { 3605, { 0, 0, 0, 0, 0 } }, - // Lightspeed - { 3606, { 0, 0, 0, 0, 0 } }, - // Combust II - { 3608, { 0, 0, 0, 0, 0 } }, - // Benefic II - { 3610, { 0, 0, 0, 0, 650 } }, - // Time Dilation - { 3611, { 0, 0, 0, 0, 0 } }, - // Synastry - { 3612, { 0, 0, 0, 0, 0 } }, - // Collective Unconscious - { 3613, { 0, 0, 0, 0, 150 } }, - // Essential Dignity - { 3614, { 0, 0, 0, 0, 400 } }, - // Gravity - { 3615, { 200, 0, 0, 0, 0 } }, - // Celestial Opposition - { 3616, { 0, 0, 0, 0, 0 } }, - // Hard Slash - { 3617, { 150, 0, 0, 0, 0 } }, - // Spinning Slash - { 3619, { 100, 0, 0, 0, 0 } }, - // Unleash - { 3621, { 50, 0, 0, 0, 0 } }, - // Syphon Strike - { 3623, { 100, 0, 0, 0, 0 } }, - // Unmend - { 3624, { 150, 0, 0, 0, 0 } }, - // Blood Weapon - { 3625, { 0, 0, 0, 0, 0 } }, - // Power Slash - { 3627, { 100, 0, 0, 0, 0 } }, - // Darkside - { 3628, { 0, 0, 0, 0, 0 } }, - // Grit - { 3629, { 0, 0, 0, 0, 0 } }, - // Blood Price - { 3631, { 0, 0, 0, 0, 0 } }, - // Souleater - { 3632, { 100, 0, 0, 0, 0 } }, - // Dark Passenger - { 3633, { 140, 0, 0, 0, 0 } }, - // Dark Mind - { 3634, { 0, 0, 0, 0, 0 } }, - // Dark Arts - { 3635, { 0, 0, 0, 0, 0 } }, - // Shadow Wall - { 3636, { 0, 0, 0, 0, 0 } }, - // Living Dead - { 3638, { 0, 0, 0, 0, 0 } }, - // Salted Earth - { 3639, { 75, 0, 0, 0, 0 } }, - // Plunge - { 3640, { 200, 0, 0, 0, 0 } }, - // Abyssal Drain - { 3641, { 120, 0, 0, 0, 0 } }, - // Sole Survivor - { 3642, { 0, 0, 0, 0, 0 } }, - // Carve and Spit - { 3643, { 100, 0, 0, 0, 0 } }, - // Big Shot - { 4238, { 0, 0, 0, 0, 0 } }, - // Desperado - { 4239, { 0, 0, 0, 0, 0 } }, - // Land Waker - { 4240, { 0, 0, 0, 0, 0 } }, - // Dark Force - { 4241, { 0, 0, 0, 0, 0 } }, - // Dragonsong Dive - { 4242, { 0, 0, 0, 0, 0 } }, - // Chimatsuri - { 4243, { 0, 0, 0, 0, 0 } }, - // Sagittarius Arrow - { 4244, { 0, 0, 0, 0, 0 } }, - // Satellite Beam - { 4245, { 0, 0, 0, 0, 0 } }, - // Teraflare - { 4246, { 0, 0, 0, 0, 0 } }, - // Angel Feathers - { 4247, { 0, 0, 0, 0, 0 } }, - // Astral Stasis - { 4248, { 0, 0, 0, 0, 0 } }, - // Form Shift - { 4262, { 0, 0, 0, 0, 0 } }, - // Cannonfire - { 4271, { 0, 0, 0, 0, 0 } }, - // the Balance - { 4401, { 0, 0, 0, 0, 0 } }, - // the Bole - { 4402, { 0, 0, 0, 0, 0 } }, - // the Arrow - { 4403, { 0, 0, 0, 0, 0 } }, - // the Spear - { 4404, { 0, 0, 0, 0, 0 } }, - // the Ewer - { 4405, { 0, 0, 0, 0, 0 } }, - // the Spire - { 4406, { 0, 0, 0, 0, 0 } }, - // the Balance - { 4407, { 0, 0, 0, 0, 0 } }, - // the Bole - { 4408, { 0, 0, 0, 0, 0 } }, - // the Arrow - { 4409, { 0, 0, 0, 0, 0 } }, - // the Spear - { 4410, { 0, 0, 0, 0, 0 } }, - // the Ewer - { 4411, { 0, 0, 0, 0, 0 } }, - // the Spire - { 4412, { 0, 0, 0, 0, 0 } }, - // the Balance - { 4413, { 0, 0, 0, 0, 0 } }, - // the Bole - { 4414, { 0, 0, 0, 0, 0 } }, - // the Arrow - { 4415, { 0, 0, 0, 0, 0 } }, - // the Spear - { 4416, { 0, 0, 0, 0, 0 } }, - // the Ewer - { 4417, { 0, 0, 0, 0, 0 } }, - // the Spire - { 4418, { 0, 0, 0, 0, 0 } }, - // the Balance - { 4419, { 0, 0, 0, 0, 0 } }, - // the Bole - { 4420, { 0, 0, 0, 0, 0 } }, - // the Arrow - { 4421, { 0, 0, 0, 0, 0 } }, - // the Spear - { 4422, { 0, 0, 0, 0, 0 } }, - // the Ewer - { 4423, { 0, 0, 0, 0, 0 } }, - // the Spire - { 4424, { 0, 0, 0, 0, 0 } }, - // Empty Road - { 4645, { 0, 0, 0, 0, 0 } }, - // Undraw Spread - { 4646, { 0, 0, 0, 0, 0 } }, - // Raiton - { 4977, { 0, 0, 0, 0, 0 } }, - // Raiton - { 5069, { 0, 0, 0, 0, 0 } }, - // attack - { 5199, { 0, 0, 0, 0, 0 } }, - // attack - { 5846, { 0, 0, 0, 0, 0 } }, - // Stickyloom - { 5874, { 0, 0, 0, 0, 0 } }, - // Void Fire II - { 6274, { 0, 0, 0, 0, 0 } }, - // Total Eclipse - { 7381, { 110, 0, 0, 0, 0 } }, - // Intervention - { 7382, { 0, 0, 0, 0, 0 } }, - // Requiescat - { 7383, { 350, 0, 0, 0, 0 } }, - // Holy Spirit - { 7384, { 380, 0, 0, 0, 0 } }, - // Passage of Arms - { 7385, { 0, 0, 0, 0, 0 } }, - // Onslaught - { 7386, { 100, 0, 0, 0, 0 } }, - // Upheaval - { 7387, { 300, 0, 0, 0, 0 } }, - // Shake It Off - { 7388, { 0, 0, 0, 0, 0 } }, - // Inner Release - { 7389, { 0, 0, 0, 0, 0 } }, - // Delirium - { 7390, { 0, 0, 0, 0, 0 } }, - // Quietus - { 7391, { 160, 0, 0, 0, 0 } }, - // Bloodspiller - { 7392, { 400, 0, 0, 0, 0 } }, - // The Blackest Night - { 7393, { 0, 0, 0, 0, 0 } }, - // Riddle of Earth - { 7394, { 0, 0, 0, 0, 0 } }, - // Riddle of Fire - { 7395, { 0, 0, 0, 0, 0 } }, - // Brotherhood - { 7396, { 0, 0, 0, 0, 0 } }, - // Sonic Thrust - { 7397, { 100, 0, 0, 0, 0 } }, - // Dragon Sight - { 7398, { 0, 0, 0, 0, 0 } }, - // Mirage Dive - { 7399, { 210, 0, 0, 0, 0 } }, - // Nastrond - { 7400, { 330, 0, 0, 0, 0 } }, - // Hellfrog Medium - { 7401, { 400, 0, 0, 0, 0 } }, - // Bhavacakra - { 7402, { 600, 0, 0, 0, 0 } }, - // Ten Chi Jin - { 7403, { 0, 0, 0, 0, 0 } }, - // Pitch Perfect - { 7404, { 100, 0, 0, 0, 0 } }, - // Troubadour - { 7405, { 0, 0, 0, 0, 0 } }, - // Caustic Bite - { 7406, { 120, 0, 0, 0, 0 } }, - // Stormbite - { 7407, { 120, 0, 0, 0, 0 } }, - // Nature's Minne - { 7408, { 0, 0, 0, 0, 0 } }, - // Refulgent Arrow - { 7409, { 300, 0, 0, 0, 0 } }, - // Cooldown - { 7410, { 150, 0, 0, 0, 0 } }, - // Heated Split Shot - { 7411, { 190, 0, 0, 0, 0 } }, - // Heated Slug Shot - { 7412, { 100, 0, 0, 0, 0 } }, - // Heated Clean Shot - { 7413, { 100, 0, 0, 0, 0 } }, - // Barrel Stabilizer - { 7414, { 0, 0, 0, 0, 0 } }, - // Rook Overdrive - { 7415, { 0, 0, 0, 0, 0 } }, - // Flamethrower - { 7418, { 0, 0, 0, 0, 0 } }, - // Between the Lines - { 7419, { 0, 0, 0, 0, 0 } }, - // Thunder IV - { 7420, { 50, 0, 0, 0, 0 } }, - // Triplecast - { 7421, { 0, 0, 0, 0, 0 } }, - // Foul - { 7422, { 650, 0, 0, 0, 0 } }, - // Aetherpact - { 7423, { 0, 0, 0, 0, 0 } }, - // Bio III - { 7424, { 0, 0, 0, 0, 0 } }, - // Miasma III - { 7425, { 50, 0, 0, 0, 0 } }, - // Ruin IV - { 7426, { 200, 0, 0, 0, 0 } }, - // Summon Bahamut - { 7427, { 0, 0, 0, 0, 0 } }, - // Enkindle Bahamut - { 7429, { 0, 0, 0, 0, 0 } }, - // Thin Air - { 7430, { 0, 0, 0, 0, 0 } }, - // Stone IV - { 7431, { 250, 0, 0, 0, 0 } }, - // Divine Benison - { 7432, { 0, 0, 0, 0, 0 } }, - // Plenary Indulgence - { 7433, { 0, 0, 0, 0, 0 } }, - // Excogitation - { 7434, { 0, 0, 0, 0, 800 } }, - // Broil II - { 7435, { 230, 0, 0, 0, 0 } }, - // Chain Stratagem - { 7436, { 0, 0, 0, 0, 0 } }, - // Aetherpact - { 7437, { 0, 0, 0, 0, 0 } }, - // Earthly Star - { 7439, { 150, 0, 0, 0, 540 } }, - // Malefic III - { 7442, { 220, 0, 0, 0, 0 } }, - // Minor Arcana - { 7443, { 0, 0, 0, 0, 0 } }, - // Lord of Crowns - { 7444, { 300, 0, 0, 0, 0 } }, - // Lady of Crowns - { 7445, { 0, 0, 0, 0, 500 } }, - // Thunder II - { 7447, { 30, 0, 0, 0, 0 } }, - // Sleeve Draw - { 7448, { 0, 0, 0, 0, 0 } }, - // Hakaze - { 7477, { 150, 0, 0, 0, 0 } }, - // Jinpu - { 7478, { 100, 0, 0, 0, 0 } }, - // Shifu - { 7479, { 100, 0, 0, 0, 0 } }, - // Yukikaze - { 7480, { 100, 0, 0, 0, 0 } }, - // Gekko - { 7481, { 100, 0, 0, 0, 0 } }, - // Kasha - { 7482, { 100, 0, 0, 0, 0 } }, - // Fuga - { 7483, { 100, 0, 0, 0, 0 } }, - // Mangetsu - { 7484, { 100, 0, 0, 0, 0 } }, - // Oka - { 7485, { 100, 0, 0, 0, 0 } }, - // Enpi - { 7486, { 100, 0, 0, 0, 0 } }, - // Midare Setsugekka - { 7487, { 720, 0, 0, 0, 0 } }, - // Tenka Goken - { 7488, { 360, 0, 0, 0, 0 } }, - // Higanbana - { 7489, { 240, 0, 0, 0, 0 } }, - // Hissatsu: Shinten - { 7490, { 300, 0, 0, 0, 0 } }, - // Hissatsu: Kyuten - { 7491, { 150, 0, 0, 0, 0 } }, - // Hissatsu: Gyoten - { 7492, { 100, 0, 0, 0, 0 } }, - // Hissatsu: Yaten - { 7493, { 100, 0, 0, 0, 0 } }, - // Hissatsu: Kaiten - { 7494, { 0, 0, 0, 0, 0 } }, - // Hagakure - { 7495, { 0, 0, 0, 0, 0 } }, - // Hissatsu: Guren - { 7496, { 800, 0, 0, 0, 0 } }, - // Meditate - { 7497, { 0, 0, 0, 0, 0 } }, - // Third Eye - { 7498, { 0, 0, 0, 0, 0 } }, - // Meikyo Shisui - { 7499, { 0, 0, 0, 0, 0 } }, - // Ageha - { 7500, { 250, 0, 0, 0, 0 } }, - // Hissatsu: Seigan - { 7501, { 200, 0, 0, 0, 0 } }, - // Merciful Eyes - { 7502, { 0, 0, 0, 0, 200 } }, - // Jolt - { 7503, { 180, 0, 0, 0, 0 } }, - // Riposte - { 7504, { 130, 0, 0, 0, 0 } }, - // Verthunder - { 7505, { 310, 0, 0, 0, 0 } }, - // Corps-a-corps - { 7506, { 130, 0, 0, 0, 0 } }, - // Veraero - { 7507, { 310, 0, 0, 0, 0 } }, - // Tether - { 7508, { 0, 0, 0, 0, 0 } }, - // Scatter - { 7509, { 100, 0, 0, 0, 0 } }, - // Verfire - { 7510, { 270, 0, 0, 0, 0 } }, - // Verstone - { 7511, { 270, 0, 0, 0, 0 } }, - // Zwerchhau - { 7512, { 100, 0, 0, 0, 0 } }, - // Moulinet - { 7513, { 60, 0, 0, 0, 0 } }, - // Vercure - { 7514, { 0, 0, 0, 0, 350 } }, - // Displacement - { 7515, { 130, 0, 0, 0, 0 } }, - // Redoublement - { 7516, { 100, 0, 0, 0, 0 } }, - // Fleche - { 7517, { 420, 0, 0, 0, 0 } }, - // Acceleration - { 7518, { 0, 0, 0, 0, 0 } }, - // Contre Sixte - { 7519, { 350, 0, 0, 0, 0 } }, - // Embolden - { 7520, { 0, 0, 0, 0, 0 } }, - // Manafication - { 7521, { 0, 0, 0, 0, 0 } }, - // Impact - { 7522, { 270, 0, 0, 0, 0 } }, - // Verraise - { 7523, { 0, 0, 0, 0, 0 } }, - // Jolt II - { 7524, { 240, 0, 0, 0, 0 } }, - // Verflare - { 7525, { 600, 0, 0, 0, 0 } }, - // Verholy - { 7526, { 600, 0, 0, 0, 0 } }, - // Enchanted Riposte - { 7527, { 210, 0, 0, 0, 0 } }, - // Enchanted Zwerchhau - { 7528, { 100, 0, 0, 0, 0 } }, - // Enchanted Redoublement - { 7529, { 100, 0, 0, 0, 0 } }, - // Enchanted Moulinet - { 7530, { 200, 0, 0, 0, 0 } }, - // Magitek Cannon - { 7619, { 0, 0, 0, 0, 0 } }, - // Photon Stream - { 7620, { 0, 0, 0, 0, 0 } }, - // Diffractive Magitek Cannon - { 7621, { 0, 0, 0, 0, 0 } }, - // High-powered Magitek Cannon - { 7622, { 0, 0, 0, 0, 0 } }, - // Doom of the Living - { 7861, { 0, 0, 0, 0, 0 } }, - // Vermillion Scourge - { 7862, { 0, 0, 0, 0, 0 } }, - // Earth Tackle - { 7864, { 100, 0, 0, 0, 0 } }, - // Wind Tackle - { 7865, { 65, 0, 0, 0, 0 } }, - // Fire Tackle - { 7866, { 130, 0, 0, 0, 0 } }, - // Iaijutsu - { 7867, { 0, 0, 0, 0, 0 } }, - // Riddle of Wind - { 7868, { 65, 0, 0, 0, 0 } }, - // Dissolve Union - { 7869, { 0, 0, 0, 0, 0 } }, - // Stellar Detonation - { 8324, { 150, 0, 0, 0, 540 } }, - // Broken Ridge - { 8395, { 0, 0, 0, 0, 0 } }, - // Magitek Pulse - { 8624, { 0, 0, 0, 0, 0 } }, - // Magitek Thunder - { 8625, { 0, 0, 0, 0, 0 } }, - // attack - { 8687, { 0, 0, 0, 0, 0 } }, - // Katon - { 9012, { 0, 0, 0, 0, 0 } }, - // Remove Barrel - { 9015, { 0, 0, 0, 0, 0 } }, - // Tenka Goken - { 9143, { 0, 0, 0, 0, 0 } }, - // Thunderous Force - { 9294, { 0, 0, 0, 0, 0 } }, - // Raiton - { 9301, { 0, 0, 0, 0, 0 } }, - // Raiton - { 9302, { 0, 0, 0, 0, 0 } }, - // Bishop Overdrive - { 9372, { 0, 0, 0, 0, 0 } }, - // Undraw - { 9629, { 0, 0, 0, 0, 0 } }, - // Self-detonate - { 9775, { 0, 0, 0, 0, 0 } }, - // Shatterstone - { 9823, { 0, 0, 0, 0, 0 } }, - // attack - { 9996, { 0, 0, 0, 0, 0 } }, - // Ungarmax - { 10001, { 0, 0, 0, 0, 0 } }, - // Starstorm - { 10894, { 0, 0, 0, 0, 0 } }, - // attack - { 10946, { 0, 0, 0, 0, 0 } }, - // attack - { 10947, { 0, 0, 0, 0, 0 } }, - // Ruin III - { 11191, { 200, 0, 0, 0, 0 } }, - // Physick - { 11192, { 0, 0, 0, 0, 400 } }, - // Starstorm - { 11193, { 3600, 0, 0, 0, 0 } }, - // Snort - { 11383, { 0, 0, 0, 0, 0 } }, - // 4-tonze Weight - { 11384, { 110, 0, 0, 0, 0 } }, - // Water Cannon - { 11385, { 120, 0, 0, 0, 0 } }, - // Song of Torment - { 11386, { 50, 0, 0, 0, 0 } }, - // High Voltage - { 11387, { 90, 0, 0, 0, 0 } }, - // Bad Breath - { 11388, { 0, 0, 0, 0, 0 } }, - // Flying Frenzy - { 11389, { 80, 0, 0, 0, 0 } }, - // Aqua Breath - { 11390, { 90, 0, 0, 0, 0 } }, - // Plaincracker - { 11391, { 130, 0, 0, 0, 0 } }, - // Acorn Bomb - { 11392, { 0, 0, 0, 0, 0 } }, - // Bristle - { 11393, { 0, 0, 0, 0, 0 } }, - // Mind Blast - { 11394, { 100, 0, 0, 0, 0 } }, - // Blood Drain - { 11395, { 20, 0, 0, 0, 0 } }, - // Bomb Toss - { 11396, { 110, 0, 0, 0, 0 } }, - // 1000 Needles - { 11397, { 0, 0, 0, 0, 0 } }, - // Drill Cannons - { 11398, { 120, 0, 0, 0, 0 } }, - // the Look - { 11399, { 130, 0, 0, 0, 0 } }, - // Sharpened Knife - { 11400, { 120, 0, 0, 0, 0 } }, - // Loom - { 11401, { 0, 0, 0, 0, 0 } }, - // Flame Thrower - { 11402, { 130, 0, 0, 0, 0 } }, - // Faze - { 11403, { 0, 0, 0, 0, 0 } }, - // Glower - { 11404, { 130, 0, 0, 0, 0 } }, - // Missile - { 11405, { 0, 0, 0, 0, 0 } }, - // White Wind - { 11406, { 0, 0, 0, 0, 0 } }, - // Final Sting - { 11407, { 1500, 0, 0, 0, 0 } }, - // Self-destruct - { 11408, { 900, 0, 0, 0, 0 } }, - // Transfusion - { 11409, { 0, 0, 0, 0, 0 } }, - // Toad Oil - { 11410, { 0, 0, 0, 0, 0 } }, - // Off-guard - { 11411, { 0, 0, 0, 0, 0 } }, - // Sticky Tongue - { 11412, { 0, 0, 0, 0, 0 } }, - // Tail Screw - { 11413, { 0, 0, 0, 0, 0 } }, - // Level 5 Petrify - { 11414, { 0, 0, 0, 0, 0 } }, - // Moon Flute - { 11415, { 0, 0, 0, 0, 0 } }, - // Doom - { 11416, { 0, 0, 0, 0, 0 } }, - // Mighty Guard - { 11417, { 0, 0, 0, 0, 0 } }, - // Ice Spikes - { 11418, { 0, 0, 0, 0, 0 } }, - // the Ram's Voice - { 11419, { 130, 0, 0, 0, 0 } }, - // the Dragon's Voice - { 11420, { 110, 0, 0, 0, 0 } }, - // Peculiar Light - { 11421, { 0, 0, 0, 0, 0 } }, - // Ink Jet - { 11422, { 120, 0, 0, 0, 0 } }, - // Flying Sardine - { 11423, { 10, 0, 0, 0, 0 } }, - // Diamondback - { 11424, { 0, 0, 0, 0, 0 } }, - // Fire Angon - { 11425, { 100, 0, 0, 0, 0 } }, - // Feather Rain - { 11426, { 180, 0, 0, 0, 0 } }, - // Eruption - { 11427, { 220, 0, 0, 0, 0 } }, - // Mountain Buster - { 11428, { 310, 0, 0, 0, 0 } }, - // Shock Strike - { 11429, { 310, 0, 0, 0, 0 } }, - // Glass Dance - { 11430, { 290, 0, 0, 0, 0 } }, - // Veil of the Whorl - { 11431, { 0, 0, 0, 0, 0 } }, - // Tri-shackle - { 11482, { 30, 0, 0, 0, 0 } }, - // attack - { 11784, { 0, 0, 0, 0, 0 } }, - // Stone of the Seventh Dawn - { 13423, { 140, 0, 0, 0, 0 } }, - // Aero of the Seventh Dawn - { 13424, { 50, 0, 0, 0, 0 } }, - // Cure of the Seventh Dawn - { 13425, { 0, 0, 0, 0, 700 } }, - // Aetherwell - { 13426, { 0, 0, 0, 0, 0 } }, - // Thunderous Force - { 14587, { 0, 0, 0, 0, 0 } }, - // Kyokufu - { 14840, { 180, 0, 0, 0, 0 } }, - // Ajisai - { 14841, { 100, 0, 0, 0, 0 } }, - // Hissatsu: Gyoten - { 14842, { 100, 0, 0, 0, 0 } }, - // 冥界恐叫打 - { 14843, { 0, 0, 0, 0, 0 } }, - // Second Wind - { 15375, { 0, 0, 0, 0, 500 } }, + auto it = m_actionLut.find( actionId ); -}; \ No newline at end of file + if( it == m_actionLut.end() ) + return false; + + const auto& entry = it->second; + + // if all of the fields are 0, it's not 'valid' due to parse error or no useful data in the tooltip + return entry.potency != 0 || entry.comboPotency != 0 || entry.flankPotency != 0 || entry.frontPotency != 0 || + entry.rearPotency != 0 || entry.curePotency != 0; +} \ No newline at end of file diff --git a/src/world/Action/ActionLut.h b/src/world/Action/ActionLut.h index df2e5332..36949eb5 100644 --- a/src/world/Action/ActionLut.h +++ b/src/world/Action/ActionLut.h @@ -21,6 +21,8 @@ namespace Sapphire::World::Action public: using Lut = std::unordered_map< uint16_t, ActionEntry >; + static bool validEntryExists( uint16_t actionId ); + static Lut m_actionLut; }; } diff --git a/src/world/Action/ActionLutData.cpp b/src/world/Action/ActionLutData.cpp new file mode 100644 index 00000000..1e9c1f97 --- /dev/null +++ b/src/world/Action/ActionLutData.cpp @@ -0,0 +1,1120 @@ +#include "ActionLut.h" + +using namespace Sapphire::World::Action; + +ActionLut::Lut ActionLut::m_actionLut = +{ + // attack + { 7, { 0, 0, 0, 0, 0 } }, + // Shot + { 8, { 0, 0, 0, 0, 0 } }, + // Fast Blade + { 9, { 160, 0, 0, 0, 0 } }, + // Savage Blade + { 11, { 100, 0, 0, 0, 0 } }, + // Flash + { 14, { 0, 0, 0, 0, 0 } }, + // Riot Blade + { 15, { 100, 0, 0, 0, 0 } }, + // Shield Bash + { 16, { 110, 0, 0, 0, 0 } }, + // Sentinel + { 17, { 0, 0, 0, 0, 0 } }, + // Tempered Will + { 19, { 0, 0, 0, 0, 0 } }, + // Fight or Flight + { 20, { 0, 0, 0, 0, 0 } }, + // Rage of Halone + { 21, { 100, 0, 0, 0, 0 } }, + // Bulwark + { 22, { 0, 0, 0, 0, 0 } }, + // Circle of Scorn + { 23, { 100, 0, 0, 0, 0 } }, + // Shield Lob + { 24, { 120, 0, 0, 0, 0 } }, + // Shield Swipe + { 25, { 100, 0, 0, 0, 0 } }, + // Sword Oath + { 26, { 75, 0, 0, 0, 0 } }, + // Cover + { 27, { 0, 0, 0, 0, 0 } }, + // Shield Oath + { 28, { 0, 0, 0, 0, 0 } }, + // Spirits Within + { 29, { 300, 0, 0, 0, 0 } }, + // Hallowed Ground + { 30, { 0, 0, 0, 0, 0 } }, + // Heavy Swing + { 31, { 160, 0, 0, 0, 0 } }, + // Skull Sunder + { 35, { 100, 0, 0, 0, 0 } }, + // Maim + { 37, { 100, 0, 0, 0, 0 } }, + // Berserk + { 38, { 0, 0, 0, 0, 0 } }, + // Thrill of Battle + { 40, { 0, 0, 0, 0, 0 } }, + // Overpower + { 41, { 130, 0, 0, 0, 0 } }, + // Storm's Path + { 42, { 100, 0, 0, 0, 0 } }, + // Holmgang + { 43, { 0, 0, 0, 0, 0 } }, + // Vengeance + { 44, { 55, 0, 0, 0, 0 } }, + // Storm's Eye + { 45, { 100, 0, 0, 0, 0 } }, + // Tomahawk + { 46, { 140, 0, 0, 0, 0 } }, + // Butcher's Block + { 47, { 100, 0, 0, 0, 0 } }, + // Defiance + { 48, { 0, 0, 0, 0, 0 } }, + // Inner Beast + { 49, { 350, 0, 0, 0, 0 } }, + // Unchained + { 50, { 0, 0, 0, 0, 0 } }, + // Steel Cyclone + { 51, { 200, 0, 0, 0, 0 } }, + // Infuriate + { 52, { 0, 0, 0, 0, 0 } }, + // Bootshine + { 53, { 140, 0, 0, 0, 0 } }, + // True Strike + { 54, { 160, 0, 0, 180, 0 } }, + // Snap Punch + { 56, { 150, 170, 0, 0, 0 } }, + // Internal Release + { 59, { 0, 0, 0, 0, 0 } }, + // Fists of Earth + { 60, { 0, 0, 0, 0, 0 } }, + // Twin Snakes + { 61, { 110, 130, 0, 0, 0 } }, + // Arm of the Destroyer + { 62, { 50, 0, 0, 0, 0 } }, + // Fists of Fire + { 63, { 0, 0, 0, 0, 0 } }, + // Steel Peak + { 64, { 150, 0, 0, 0, 0 } }, + // Mantra + { 65, { 0, 0, 0, 0, 0 } }, + // Demolish + { 66, { 50, 0, 0, 70, 0 } }, + // Howling Fist + { 67, { 210, 0, 0, 0, 0 } }, + // Perfect Balance + { 69, { 0, 0, 0, 0, 0 } }, + // Rockbreaker + { 70, { 130, 0, 0, 0, 0 } }, + // Shoulder Tackle + { 71, { 100, 0, 0, 0, 0 } }, + // One Ilm Punch + { 72, { 120, 0, 0, 0, 0 } }, + // Fists of Wind + { 73, { 0, 0, 0, 0, 0 } }, + // Dragon Kick + { 74, { 120, 140, 0, 0, 0 } }, + // True Thrust + { 75, { 160, 0, 0, 0, 0 } }, + // Vorpal Thrust + { 78, { 100, 0, 0, 0, 0 } }, + // Heavy Thrust + { 79, { 150, 190, 0, 0, 0 } }, + // Impulse Drive + { 81, { 200, 0, 0, 0, 0 } }, + // Life Surge + { 83, { 0, 0, 0, 0, 0 } }, + // Full Thrust + { 84, { 100, 0, 0, 0, 0 } }, + // Blood for Blood + { 85, { 0, 0, 0, 0, 0 } }, + // Doom Spike + { 86, { 140, 0, 0, 0, 0 } }, + // Disembowel + { 87, { 100, 0, 0, 0, 0 } }, + // Chaos Thrust + { 88, { 100, 0, 0, 140, 0 } }, + // Piercing Talon + { 90, { 120, 0, 0, 0, 0 } }, + // Jump + { 92, { 260, 0, 0, 0, 0 } }, + // Elusive Jump + { 94, { 0, 0, 0, 0, 0 } }, + // Spineshatter Dive + { 95, { 210, 0, 0, 0, 0 } }, + // Dragonfire Dive + { 96, { 320, 0, 0, 0, 0 } }, + // Heavy Shot + { 97, { 150, 0, 0, 0, 0 } }, + // Straight Shot + { 98, { 140, 0, 0, 0, 0 } }, + // Venomous Bite + { 100, { 100, 0, 0, 0, 0 } }, + // Raging Strikes + { 101, { 0, 0, 0, 0, 0 } }, + // Misery's End + { 103, { 190, 0, 0, 0, 0 } }, + // Quick Nock + { 106, { 110, 0, 0, 0, 0 } }, + // Barrage + { 107, { 0, 0, 0, 0, 0 } }, + // Bloodletter + { 110, { 130, 0, 0, 0, 0 } }, + // Repelling Shot + { 112, { 0, 0, 0, 0, 0 } }, + // Windbite + { 113, { 60, 0, 0, 0, 0 } }, + // Mage's Ballad + { 114, { 100, 0, 0, 0, 0 } }, + // Foe Requiem + { 115, { 0, 0, 0, 0, 0 } }, + // Army's Paeon + { 116, { 100, 0, 0, 0, 0 } }, + // Rain of Death + { 117, { 100, 0, 0, 0, 0 } }, + // Battle Voice + { 118, { 0, 0, 0, 0, 0 } }, + // Stone + { 119, { 140, 0, 0, 0, 0 } }, + // Cure + { 120, { 0, 0, 0, 0, 450 } }, + // Aero + { 121, { 50, 0, 0, 0, 0 } }, + // Medica + { 124, { 0, 0, 0, 0, 300 } }, + // Raise + { 125, { 0, 0, 0, 0, 0 } }, + // Stone II + { 127, { 200, 0, 0, 0, 0 } }, + // Repose + { 128, { 0, 0, 0, 0, 0 } }, + // Cure III + { 131, { 0, 0, 0, 0, 550 } }, + // Aero II + { 132, { 50, 0, 0, 0, 0 } }, + // Medica II + { 133, { 0, 0, 0, 0, 200 } }, + // Fluid Aura + { 134, { 0, 0, 0, 0, 0 } }, + // Cure II + { 135, { 0, 0, 0, 0, 700 } }, + // Presence of Mind + { 136, { 0, 0, 0, 0, 0 } }, + // Regen + { 137, { 0, 0, 0, 0, 150 } }, + // Holy + { 139, { 200, 0, 0, 0, 0 } }, + // Benediction + { 140, { 0, 0, 0, 0, 0 } }, + // Fire + { 141, { 180, 0, 0, 0, 0 } }, + // Blizzard + { 142, { 180, 0, 0, 0, 0 } }, + // Thunder + { 144, { 30, 0, 0, 0, 0 } }, + // Sleep + { 145, { 0, 0, 0, 0, 0 } }, + // Blizzard II + { 146, { 50, 0, 0, 0, 0 } }, + // Fire II + { 147, { 80, 0, 0, 0, 0 } }, + // Transpose + { 149, { 0, 0, 0, 0, 0 } }, + // Fire III + { 152, { 240, 0, 0, 0, 0 } }, + // Thunder III + { 153, { 70, 0, 0, 0, 0 } }, + // Blizzard III + { 154, { 240, 0, 0, 0, 0 } }, + // Aetherial Manipulation + { 155, { 0, 0, 0, 0, 0 } }, + // Scathe + { 156, { 100, 0, 0, 0, 0 } }, + // Manaward + { 157, { 0, 0, 0, 0, 0 } }, + // Convert + { 158, { 0, 0, 0, 0, 0 } }, + // Freeze + { 159, { 100, 0, 0, 0, 0 } }, + // Flare + { 162, { 260, 0, 0, 0, 0 } }, + // Ruin + { 163, { 100, 0, 0, 0, 0 } }, + // Bio + { 164, { 0, 0, 0, 0, 0 } }, + // Summon + { 165, { 0, 0, 0, 0, 0 } }, + // Aetherflow + { 166, { 0, 0, 0, 0, 0 } }, + // Energy Drain + { 167, { 150, 0, 0, 0, 0 } }, + // Miasma + { 168, { 20, 0, 0, 0, 0 } }, + // Summon II + { 170, { 0, 0, 0, 0, 0 } }, + // Sustain + { 171, { 0, 0, 0, 0, 0 } }, + // Ruin II + { 172, { 100, 0, 0, 0, 0 } }, + // Resurrection + { 173, { 0, 0, 0, 0, 0 } }, + // Bane + { 174, { 0, 0, 0, 0, 0 } }, + // Rouse + { 176, { 0, 0, 0, 0, 0 } }, + // Miasma II + { 177, { 100, 0, 0, 0, 0 } }, + // Bio II + { 178, { 0, 0, 0, 0, 0 } }, + // Shadow Flare + { 179, { 50, 0, 0, 0, 0 } }, + // Summon III + { 180, { 0, 0, 0, 0, 0 } }, + // Fester + { 181, { 150, 0, 0, 0, 0 } }, + // Tri-bind + { 182, { 30, 0, 0, 0, 0 } }, + // Enkindle + { 184, { 0, 0, 0, 0, 0 } }, + // Adloquium + { 185, { 0, 0, 0, 0, 300 } }, + // Succor + { 186, { 0, 0, 0, 0, 150 } }, + // Sacred Soil + { 188, { 0, 0, 0, 0, 0 } }, + // Lustrate + { 189, { 0, 0, 0, 0, 600 } }, + // Physick + { 190, { 0, 0, 0, 0, 400 } }, + // Shield Wall + { 197, { 0, 0, 0, 0, 0 } }, + // Stronghold + { 198, { 0, 0, 0, 0, 0 } }, + // Last Bastion + { 199, { 0, 0, 0, 0, 0 } }, + // Braver + { 200, { 2400, 0, 0, 0, 0 } }, + // Bladedance + { 201, { 5250, 0, 0, 0, 0 } }, + // Final Heaven + { 202, { 9000, 0, 0, 0, 0 } }, + // Skyshard + { 203, { 1650, 0, 0, 0, 0 } }, + // Starstorm + { 204, { 3600, 0, 0, 0, 0 } }, + // Meteor + { 205, { 6150, 0, 0, 0, 0 } }, + // Healing Wind + { 206, { 0, 0, 0, 0, 0 } }, + // Breath of the Earth + { 207, { 0, 0, 0, 0, 0 } }, + // Pulse of Life + { 208, { 0, 0, 0, 0, 0 } }, + // Magitek Cannon + { 1128, { 0, 0, 0, 0, 0 } }, + // Photon Stream + { 1129, { 0, 0, 0, 0, 0 } }, + // attack + { 1533, { 0, 0, 0, 0, 0 } }, + // Spinning Edge + { 2240, { 150, 0, 0, 0, 0 } }, + // Shade Shift + { 2241, { 0, 0, 0, 0, 0 } }, + // Gust Slash + { 2242, { 100, 0, 0, 0, 0 } }, + // Hide + { 2245, { 0, 0, 0, 0, 0 } }, + // Assassinate + { 2246, { 200, 0, 0, 0, 0 } }, + // Throwing Dagger + { 2247, { 120, 0, 0, 0, 0 } }, + // Mug + { 2248, { 140, 0, 0, 0, 0 } }, + // Hide + { 2253, { 0, 0, 0, 0, 0 } }, + // Death Blossom + { 2254, { 110, 0, 0, 0, 0 } }, + // Aeolian Edge + { 2255, { 100, 0, 0, 160, 0 } }, + // Jugulate + { 2256, { 80, 0, 0, 0, 0 } }, + // Shadow Fang + { 2257, { 100, 0, 0, 0, 0 } }, + // Trick Attack + { 2258, { 240, 0, 0, 400, 0 } }, + // Ten + { 2259, { 0, 0, 0, 0, 0 } }, + // Ninjutsu + { 2260, { 0, 0, 0, 0, 0 } }, + // Chi + { 2261, { 0, 0, 0, 0, 0 } }, + // Shukuchi + { 2262, { 0, 0, 0, 0, 0 } }, + // Jin + { 2263, { 0, 0, 0, 0, 0 } }, + // Kassatsu + { 2264, { 0, 0, 0, 0, 0 } }, + // Fuma Shuriken + { 2265, { 240, 0, 0, 0, 0 } }, + // Katon + { 2266, { 250, 0, 0, 0, 0 } }, + // Raiton + { 2267, { 360, 0, 0, 0, 0 } }, + // Hyoton + { 2268, { 140, 0, 0, 0, 0 } }, + // Huton + { 2269, { 0, 0, 0, 0, 0 } }, + // Doton + { 2270, { 45, 0, 0, 0, 0 } }, + // Suiton + { 2271, { 180, 0, 0, 0, 0 } }, + // Rabbit Medium + { 2272, { 0, 0, 0, 0, 0 } }, + // Rook Autoturret + { 2864, { 80, 0, 0, 0, 0 } }, + // Bishop Autoturret + { 2865, { 60, 0, 0, 0, 0 } }, + // Split Shot + { 2866, { 160, 0, 0, 0, 0 } }, + // Reload + { 2867, { 0, 0, 0, 0, 0 } }, + // Slug Shot + { 2868, { 100, 0, 0, 0, 0 } }, + // Spread Shot + { 2870, { 80, 0, 0, 0, 0 } }, + // Hot Shot + { 2872, { 120, 0, 0, 0, 0 } }, + // Clean Shot + { 2873, { 100, 0, 0, 0, 0 } }, + // Gauss Round + { 2874, { 210, 0, 0, 0, 0 } }, + // Heartbreak + { 2875, { 240, 0, 0, 0, 0 } }, + // Reassemble + { 2876, { 0, 0, 0, 0, 0 } }, + // Wildfire + { 2878, { 0, 0, 0, 0, 0 } }, + // Quick Reload + { 2879, { 0, 0, 0, 0, 0 } }, + // Gauss Barrel + { 2880, { 0, 0, 0, 0, 0 } }, + // Rapid Fire + { 2881, { 0, 0, 0, 0, 0 } }, + // Hypercharge + { 2885, { 0, 0, 0, 0, 0 } }, + // Dismantle + { 2887, { 0, 0, 0, 0, 0 } }, + // Blank + { 2888, { 0, 0, 0, 0, 0 } }, + // Ricochet + { 2890, { 320, 0, 0, 0, 0 } }, + // Raiton + { 3203, { 0, 0, 0, 0, 0 } }, + // Raiton + { 3204, { 0, 0, 0, 0, 0 } }, + // Kanashibari + { 3207, { 0, 0, 0, 0, 0 } }, + // Turret Retrieval + { 3487, { 0, 0, 0, 0, 0 } }, + // Goring Blade + { 3538, { 100, 0, 0, 0, 0 } }, + // Royal Authority + { 3539, { 100, 0, 0, 0, 0 } }, + // Divine Veil + { 3540, { 0, 0, 0, 0, 0 } }, + // Clemency + { 3541, { 0, 0, 0, 0, 1200 } }, + // Sheltron + { 3542, { 0, 0, 0, 0, 0 } }, + // Tornado Kick + { 3543, { 330, 0, 0, 0, 0 } }, + // Purification + { 3544, { 0, 0, 0, 0, 0 } }, + // Elixir Field + { 3545, { 220, 0, 0, 0, 0 } }, + // Meditation + { 3546, { 0, 0, 0, 0, 0 } }, + // the Forbidden Chakra + { 3547, { 250, 0, 0, 0, 0 } }, + // Deliverance + { 3548, { 0, 0, 0, 0, 0 } }, + // Fell Cleave + { 3549, { 520, 0, 0, 0, 0 } }, + // Decimate + { 3550, { 280, 0, 0, 0, 0 } }, + // Raw Intuition + { 3551, { 0, 0, 0, 0, 0 } }, + // Equilibrium + { 3552, { 0, 0, 0, 0, 1200 } }, + // Blood of the Dragon + { 3553, { 0, 0, 0, 0, 0 } }, + // Fang and Claw + { 3554, { 260, 300, 0, 0, 0 } }, + // Geirskogul + { 3555, { 230, 0, 0, 0, 0 } }, + // Wheeling Thrust + { 3556, { 260, 0, 0, 300, 0 } }, + // Battle Litany + { 3557, { 0, 0, 0, 0, 0 } }, + // Empyreal Arrow + { 3558, { 230, 0, 0, 0, 0 } }, + // the Wanderer's Minuet + { 3559, { 100, 0, 0, 0, 0 } }, + // Iron Jaws + { 3560, { 100, 0, 0, 0, 0 } }, + // the Warden's Paean + { 3561, { 0, 0, 0, 0, 0 } }, + // Sidewinder + { 3562, { 100, 0, 0, 0, 0 } }, + // Armor Crush + { 3563, { 100, 160, 0, 0, 0 } }, + // Shadewalker + { 3564, { 0, 0, 0, 0, 0 } }, + // Smoke Screen + { 3565, { 0, 0, 0, 0, 0 } }, + // Dream Within a Dream + { 3566, { 150, 0, 0, 0, 0 } }, + // Duality + { 3567, { 0, 0, 0, 0, 0 } }, + // Stone III + { 3568, { 210, 0, 0, 0, 0 } }, + // Asylum + { 3569, { 0, 0, 0, 0, 100 } }, + // Tetragrammaton + { 3570, { 0, 0, 0, 0, 700 } }, + // Assize + { 3571, { 400, 0, 0, 0, 400 } }, + // Aero III + { 3572, { 50, 0, 0, 0, 0 } }, + // Ley Lines + { 3573, { 0, 0, 0, 0, 0 } }, + // Sharpcast + { 3574, { 0, 0, 0, 0, 0 } }, + // Enochian + { 3575, { 0, 0, 0, 0, 0 } }, + // Blizzard IV + { 3576, { 260, 0, 0, 0, 0 } }, + // Fire IV + { 3577, { 300, 0, 0, 0, 0 } }, + // Painflare + { 3578, { 180, 0, 0, 0, 0 } }, + // Ruin III + { 3579, { 120, 0, 0, 0, 0 } }, + // Tri-disaster + { 3580, { 0, 0, 0, 0, 0 } }, + // Dreadwyrm Trance + { 3581, { 0, 0, 0, 0, 0 } }, + // Deathflare + { 3582, { 400, 0, 0, 0, 0 } }, + // Indomitability + { 3583, { 0, 0, 0, 0, 500 } }, + // Broil + { 3584, { 190, 0, 0, 0, 0 } }, + // Deployment Tactics + { 3585, { 0, 0, 0, 0, 0 } }, + // Emergency Tactics + { 3586, { 0, 0, 0, 0, 0 } }, + // Dissipation + { 3587, { 0, 0, 0, 0, 0 } }, + // Draw + { 3590, { 0, 0, 0, 0, 0 } }, + // Royal Road + { 3591, { 0, 0, 0, 0, 0 } }, + // Spread + { 3592, { 0, 0, 0, 0, 0 } }, + // Redraw + { 3593, { 0, 0, 0, 0, 0 } }, + // Benefic + { 3594, { 0, 0, 0, 0, 400 } }, + // Aspected Benefic + { 3595, { 0, 0, 0, 0, 200 } }, + // Malefic + { 3596, { 150, 0, 0, 0, 0 } }, + // Malefic II + { 3598, { 180, 0, 0, 0, 0 } }, + // Combust + { 3599, { 0, 0, 0, 0, 0 } }, + // Helios + { 3600, { 0, 0, 0, 0, 300 } }, + // Aspected Helios + { 3601, { 0, 0, 0, 0, 200 } }, + // Ascend + { 3603, { 0, 0, 0, 0, 0 } }, + // Diurnal Sect + { 3604, { 0, 0, 0, 0, 0 } }, + // Nocturnal Sect + { 3605, { 0, 0, 0, 0, 0 } }, + // Lightspeed + { 3606, { 0, 0, 0, 0, 0 } }, + // Combust II + { 3608, { 0, 0, 0, 0, 0 } }, + // Benefic II + { 3610, { 0, 0, 0, 0, 650 } }, + // Time Dilation + { 3611, { 0, 0, 0, 0, 0 } }, + // Synastry + { 3612, { 0, 0, 0, 0, 0 } }, + // Collective Unconscious + { 3613, { 0, 0, 0, 0, 150 } }, + // Essential Dignity + { 3614, { 0, 0, 0, 0, 400 } }, + // Gravity + { 3615, { 200, 0, 0, 0, 0 } }, + // Celestial Opposition + { 3616, { 0, 0, 0, 0, 0 } }, + // Hard Slash + { 3617, { 150, 0, 0, 0, 0 } }, + // Spinning Slash + { 3619, { 100, 0, 0, 0, 0 } }, + // Unleash + { 3621, { 50, 0, 0, 0, 0 } }, + // Syphon Strike + { 3623, { 100, 0, 0, 0, 0 } }, + // Unmend + { 3624, { 150, 0, 0, 0, 0 } }, + // Blood Weapon + { 3625, { 0, 0, 0, 0, 0 } }, + // Power Slash + { 3627, { 100, 0, 0, 0, 0 } }, + // Darkside + { 3628, { 0, 0, 0, 0, 0 } }, + // Grit + { 3629, { 0, 0, 0, 0, 0 } }, + // Blood Price + { 3631, { 0, 0, 0, 0, 0 } }, + // Souleater + { 3632, { 100, 0, 0, 0, 0 } }, + // Dark Passenger + { 3633, { 140, 0, 0, 0, 0 } }, + // Dark Mind + { 3634, { 0, 0, 0, 0, 0 } }, + // Dark Arts + { 3635, { 0, 0, 0, 0, 0 } }, + // Shadow Wall + { 3636, { 0, 0, 0, 0, 0 } }, + // Living Dead + { 3638, { 0, 0, 0, 0, 0 } }, + // Salted Earth + { 3639, { 75, 0, 0, 0, 0 } }, + // Plunge + { 3640, { 200, 0, 0, 0, 0 } }, + // Abyssal Drain + { 3641, { 120, 0, 0, 0, 0 } }, + // Sole Survivor + { 3642, { 0, 0, 0, 0, 0 } }, + // Carve and Spit + { 3643, { 100, 0, 0, 0, 0 } }, + // Big Shot + { 4238, { 0, 0, 0, 0, 0 } }, + // Desperado + { 4239, { 0, 0, 0, 0, 0 } }, + // Land Waker + { 4240, { 0, 0, 0, 0, 0 } }, + // Dark Force + { 4241, { 0, 0, 0, 0, 0 } }, + // Dragonsong Dive + { 4242, { 0, 0, 0, 0, 0 } }, + // Chimatsuri + { 4243, { 0, 0, 0, 0, 0 } }, + // Sagittarius Arrow + { 4244, { 0, 0, 0, 0, 0 } }, + // Satellite Beam + { 4245, { 0, 0, 0, 0, 0 } }, + // Teraflare + { 4246, { 0, 0, 0, 0, 0 } }, + // Angel Feathers + { 4247, { 0, 0, 0, 0, 0 } }, + // Astral Stasis + { 4248, { 0, 0, 0, 0, 0 } }, + // Form Shift + { 4262, { 0, 0, 0, 0, 0 } }, + // Cannonfire + { 4271, { 0, 0, 0, 0, 0 } }, + // the Balance + { 4401, { 0, 0, 0, 0, 0 } }, + // the Bole + { 4402, { 0, 0, 0, 0, 0 } }, + // the Arrow + { 4403, { 0, 0, 0, 0, 0 } }, + // the Spear + { 4404, { 0, 0, 0, 0, 0 } }, + // the Ewer + { 4405, { 0, 0, 0, 0, 0 } }, + // the Spire + { 4406, { 0, 0, 0, 0, 0 } }, + // the Balance + { 4407, { 0, 0, 0, 0, 0 } }, + // the Bole + { 4408, { 0, 0, 0, 0, 0 } }, + // the Arrow + { 4409, { 0, 0, 0, 0, 0 } }, + // the Spear + { 4410, { 0, 0, 0, 0, 0 } }, + // the Ewer + { 4411, { 0, 0, 0, 0, 0 } }, + // the Spire + { 4412, { 0, 0, 0, 0, 0 } }, + // the Balance + { 4413, { 0, 0, 0, 0, 0 } }, + // the Bole + { 4414, { 0, 0, 0, 0, 0 } }, + // the Arrow + { 4415, { 0, 0, 0, 0, 0 } }, + // the Spear + { 4416, { 0, 0, 0, 0, 0 } }, + // the Ewer + { 4417, { 0, 0, 0, 0, 0 } }, + // the Spire + { 4418, { 0, 0, 0, 0, 0 } }, + // the Balance + { 4419, { 0, 0, 0, 0, 0 } }, + // the Bole + { 4420, { 0, 0, 0, 0, 0 } }, + // the Arrow + { 4421, { 0, 0, 0, 0, 0 } }, + // the Spear + { 4422, { 0, 0, 0, 0, 0 } }, + // the Ewer + { 4423, { 0, 0, 0, 0, 0 } }, + // the Spire + { 4424, { 0, 0, 0, 0, 0 } }, + // Empty Road + { 4645, { 0, 0, 0, 0, 0 } }, + // Undraw Spread + { 4646, { 0, 0, 0, 0, 0 } }, + // Raiton + { 4977, { 0, 0, 0, 0, 0 } }, + // Raiton + { 5069, { 0, 0, 0, 0, 0 } }, + // attack + { 5199, { 0, 0, 0, 0, 0 } }, + // attack + { 5846, { 0, 0, 0, 0, 0 } }, + // Stickyloom + { 5874, { 0, 0, 0, 0, 0 } }, + // Void Fire II + { 6274, { 0, 0, 0, 0, 0 } }, + // Total Eclipse + { 7381, { 110, 0, 0, 0, 0 } }, + // Intervention + { 7382, { 0, 0, 0, 0, 0 } }, + // Requiescat + { 7383, { 350, 0, 0, 0, 0 } }, + // Holy Spirit + { 7384, { 380, 0, 0, 0, 0 } }, + // Passage of Arms + { 7385, { 0, 0, 0, 0, 0 } }, + // Onslaught + { 7386, { 100, 0, 0, 0, 0 } }, + // Upheaval + { 7387, { 300, 0, 0, 0, 0 } }, + // Shake It Off + { 7388, { 0, 0, 0, 0, 0 } }, + // Inner Release + { 7389, { 0, 0, 0, 0, 0 } }, + // Delirium + { 7390, { 0, 0, 0, 0, 0 } }, + // Quietus + { 7391, { 160, 0, 0, 0, 0 } }, + // Bloodspiller + { 7392, { 400, 0, 0, 0, 0 } }, + // The Blackest Night + { 7393, { 0, 0, 0, 0, 0 } }, + // Riddle of Earth + { 7394, { 0, 0, 0, 0, 0 } }, + // Riddle of Fire + { 7395, { 0, 0, 0, 0, 0 } }, + // Brotherhood + { 7396, { 0, 0, 0, 0, 0 } }, + // Sonic Thrust + { 7397, { 100, 0, 0, 0, 0 } }, + // Dragon Sight + { 7398, { 0, 0, 0, 0, 0 } }, + // Mirage Dive + { 7399, { 210, 0, 0, 0, 0 } }, + // Nastrond + { 7400, { 330, 0, 0, 0, 0 } }, + // Hellfrog Medium + { 7401, { 400, 0, 0, 0, 0 } }, + // Bhavacakra + { 7402, { 600, 0, 0, 0, 0 } }, + // Ten Chi Jin + { 7403, { 0, 0, 0, 0, 0 } }, + // Pitch Perfect + { 7404, { 100, 0, 0, 0, 0 } }, + // Troubadour + { 7405, { 0, 0, 0, 0, 0 } }, + // Caustic Bite + { 7406, { 120, 0, 0, 0, 0 } }, + // Stormbite + { 7407, { 120, 0, 0, 0, 0 } }, + // Nature's Minne + { 7408, { 0, 0, 0, 0, 0 } }, + // Refulgent Arrow + { 7409, { 300, 0, 0, 0, 0 } }, + // Cooldown + { 7410, { 150, 0, 0, 0, 0 } }, + // Heated Split Shot + { 7411, { 190, 0, 0, 0, 0 } }, + // Heated Slug Shot + { 7412, { 100, 0, 0, 0, 0 } }, + // Heated Clean Shot + { 7413, { 100, 0, 0, 0, 0 } }, + // Barrel Stabilizer + { 7414, { 0, 0, 0, 0, 0 } }, + // Rook Overdrive + { 7415, { 0, 0, 0, 0, 0 } }, + // Flamethrower + { 7418, { 0, 0, 0, 0, 0 } }, + // Between the Lines + { 7419, { 0, 0, 0, 0, 0 } }, + // Thunder IV + { 7420, { 50, 0, 0, 0, 0 } }, + // Triplecast + { 7421, { 0, 0, 0, 0, 0 } }, + // Foul + { 7422, { 650, 0, 0, 0, 0 } }, + // Aetherpact + { 7423, { 0, 0, 0, 0, 0 } }, + // Bio III + { 7424, { 0, 0, 0, 0, 0 } }, + // Miasma III + { 7425, { 50, 0, 0, 0, 0 } }, + // Ruin IV + { 7426, { 200, 0, 0, 0, 0 } }, + // Summon Bahamut + { 7427, { 0, 0, 0, 0, 0 } }, + // Enkindle Bahamut + { 7429, { 0, 0, 0, 0, 0 } }, + // Thin Air + { 7430, { 0, 0, 0, 0, 0 } }, + // Stone IV + { 7431, { 250, 0, 0, 0, 0 } }, + // Divine Benison + { 7432, { 0, 0, 0, 0, 0 } }, + // Plenary Indulgence + { 7433, { 0, 0, 0, 0, 0 } }, + // Excogitation + { 7434, { 0, 0, 0, 0, 800 } }, + // Broil II + { 7435, { 230, 0, 0, 0, 0 } }, + // Chain Stratagem + { 7436, { 0, 0, 0, 0, 0 } }, + // Aetherpact + { 7437, { 0, 0, 0, 0, 0 } }, + // Earthly Star + { 7439, { 150, 0, 0, 0, 540 } }, + // Malefic III + { 7442, { 220, 0, 0, 0, 0 } }, + // Minor Arcana + { 7443, { 0, 0, 0, 0, 0 } }, + // Lord of Crowns + { 7444, { 300, 0, 0, 0, 0 } }, + // Lady of Crowns + { 7445, { 0, 0, 0, 0, 500 } }, + // Thunder II + { 7447, { 30, 0, 0, 0, 0 } }, + // Sleeve Draw + { 7448, { 0, 0, 0, 0, 0 } }, + // Hakaze + { 7477, { 150, 0, 0, 0, 0 } }, + // Jinpu + { 7478, { 100, 0, 0, 0, 0 } }, + // Shifu + { 7479, { 100, 0, 0, 0, 0 } }, + // Yukikaze + { 7480, { 100, 0, 0, 0, 0 } }, + // Gekko + { 7481, { 100, 0, 0, 0, 0 } }, + // Kasha + { 7482, { 100, 0, 0, 0, 0 } }, + // Fuga + { 7483, { 100, 0, 0, 0, 0 } }, + // Mangetsu + { 7484, { 100, 0, 0, 0, 0 } }, + // Oka + { 7485, { 100, 0, 0, 0, 0 } }, + // Enpi + { 7486, { 100, 0, 0, 0, 0 } }, + // Midare Setsugekka + { 7487, { 720, 0, 0, 0, 0 } }, + // Tenka Goken + { 7488, { 360, 0, 0, 0, 0 } }, + // Higanbana + { 7489, { 240, 0, 0, 0, 0 } }, + // Hissatsu: Shinten + { 7490, { 300, 0, 0, 0, 0 } }, + // Hissatsu: Kyuten + { 7491, { 150, 0, 0, 0, 0 } }, + // Hissatsu: Gyoten + { 7492, { 100, 0, 0, 0, 0 } }, + // Hissatsu: Yaten + { 7493, { 100, 0, 0, 0, 0 } }, + // Hissatsu: Kaiten + { 7494, { 0, 0, 0, 0, 0 } }, + // Hagakure + { 7495, { 0, 0, 0, 0, 0 } }, + // Hissatsu: Guren + { 7496, { 800, 0, 0, 0, 0 } }, + // Meditate + { 7497, { 0, 0, 0, 0, 0 } }, + // Third Eye + { 7498, { 0, 0, 0, 0, 0 } }, + // Meikyo Shisui + { 7499, { 0, 0, 0, 0, 0 } }, + // Ageha + { 7500, { 250, 0, 0, 0, 0 } }, + // Hissatsu: Seigan + { 7501, { 200, 0, 0, 0, 0 } }, + // Merciful Eyes + { 7502, { 0, 0, 0, 0, 200 } }, + // Jolt + { 7503, { 180, 0, 0, 0, 0 } }, + // Riposte + { 7504, { 130, 0, 0, 0, 0 } }, + // Verthunder + { 7505, { 310, 0, 0, 0, 0 } }, + // Corps-a-corps + { 7506, { 130, 0, 0, 0, 0 } }, + // Veraero + { 7507, { 310, 0, 0, 0, 0 } }, + // Tether + { 7508, { 0, 0, 0, 0, 0 } }, + // Scatter + { 7509, { 100, 0, 0, 0, 0 } }, + // Verfire + { 7510, { 270, 0, 0, 0, 0 } }, + // Verstone + { 7511, { 270, 0, 0, 0, 0 } }, + // Zwerchhau + { 7512, { 100, 0, 0, 0, 0 } }, + // Moulinet + { 7513, { 60, 0, 0, 0, 0 } }, + // Vercure + { 7514, { 0, 0, 0, 0, 350 } }, + // Displacement + { 7515, { 130, 0, 0, 0, 0 } }, + // Redoublement + { 7516, { 100, 0, 0, 0, 0 } }, + // Fleche + { 7517, { 420, 0, 0, 0, 0 } }, + // Acceleration + { 7518, { 0, 0, 0, 0, 0 } }, + // Contre Sixte + { 7519, { 350, 0, 0, 0, 0 } }, + // Embolden + { 7520, { 0, 0, 0, 0, 0 } }, + // Manafication + { 7521, { 0, 0, 0, 0, 0 } }, + // Impact + { 7522, { 270, 0, 0, 0, 0 } }, + // Verraise + { 7523, { 0, 0, 0, 0, 0 } }, + // Jolt II + { 7524, { 240, 0, 0, 0, 0 } }, + // Verflare + { 7525, { 600, 0, 0, 0, 0 } }, + // Verholy + { 7526, { 600, 0, 0, 0, 0 } }, + // Enchanted Riposte + { 7527, { 210, 0, 0, 0, 0 } }, + // Enchanted Zwerchhau + { 7528, { 100, 0, 0, 0, 0 } }, + // Enchanted Redoublement + { 7529, { 100, 0, 0, 0, 0 } }, + // Enchanted Moulinet + { 7530, { 200, 0, 0, 0, 0 } }, + // Magitek Cannon + { 7619, { 0, 0, 0, 0, 0 } }, + // Photon Stream + { 7620, { 0, 0, 0, 0, 0 } }, + // Diffractive Magitek Cannon + { 7621, { 0, 0, 0, 0, 0 } }, + // High-powered Magitek Cannon + { 7622, { 0, 0, 0, 0, 0 } }, + // Doom of the Living + { 7861, { 0, 0, 0, 0, 0 } }, + // Vermillion Scourge + { 7862, { 0, 0, 0, 0, 0 } }, + // Earth Tackle + { 7864, { 100, 0, 0, 0, 0 } }, + // Wind Tackle + { 7865, { 65, 0, 0, 0, 0 } }, + // Fire Tackle + { 7866, { 130, 0, 0, 0, 0 } }, + // Iaijutsu + { 7867, { 0, 0, 0, 0, 0 } }, + // Riddle of Wind + { 7868, { 65, 0, 0, 0, 0 } }, + // Dissolve Union + { 7869, { 0, 0, 0, 0, 0 } }, + // Stellar Detonation + { 8324, { 150, 0, 0, 0, 540 } }, + // Broken Ridge + { 8395, { 0, 0, 0, 0, 0 } }, + // Magitek Pulse + { 8624, { 0, 0, 0, 0, 0 } }, + // Magitek Thunder + { 8625, { 0, 0, 0, 0, 0 } }, + // attack + { 8687, { 0, 0, 0, 0, 0 } }, + // Katon + { 9012, { 0, 0, 0, 0, 0 } }, + // Remove Barrel + { 9015, { 0, 0, 0, 0, 0 } }, + // Tenka Goken + { 9143, { 0, 0, 0, 0, 0 } }, + // Thunderous Force + { 9294, { 0, 0, 0, 0, 0 } }, + // Raiton + { 9301, { 0, 0, 0, 0, 0 } }, + // Raiton + { 9302, { 0, 0, 0, 0, 0 } }, + // Bishop Overdrive + { 9372, { 0, 0, 0, 0, 0 } }, + // Undraw + { 9629, { 0, 0, 0, 0, 0 } }, + // Self-detonate + { 9775, { 0, 0, 0, 0, 0 } }, + // Shatterstone + { 9823, { 0, 0, 0, 0, 0 } }, + // attack + { 9996, { 0, 0, 0, 0, 0 } }, + // Ungarmax + { 10001, { 0, 0, 0, 0, 0 } }, + // Starstorm + { 10894, { 0, 0, 0, 0, 0 } }, + // attack + { 10946, { 0, 0, 0, 0, 0 } }, + // attack + { 10947, { 0, 0, 0, 0, 0 } }, + // Ruin III + { 11191, { 200, 0, 0, 0, 0 } }, + // Physick + { 11192, { 0, 0, 0, 0, 400 } }, + // Starstorm + { 11193, { 3600, 0, 0, 0, 0 } }, + // Snort + { 11383, { 0, 0, 0, 0, 0 } }, + // 4-tonze Weight + { 11384, { 110, 0, 0, 0, 0 } }, + // Water Cannon + { 11385, { 120, 0, 0, 0, 0 } }, + // Song of Torment + { 11386, { 50, 0, 0, 0, 0 } }, + // High Voltage + { 11387, { 90, 0, 0, 0, 0 } }, + // Bad Breath + { 11388, { 0, 0, 0, 0, 0 } }, + // Flying Frenzy + { 11389, { 80, 0, 0, 0, 0 } }, + // Aqua Breath + { 11390, { 90, 0, 0, 0, 0 } }, + // Plaincracker + { 11391, { 130, 0, 0, 0, 0 } }, + // Acorn Bomb + { 11392, { 0, 0, 0, 0, 0 } }, + // Bristle + { 11393, { 0, 0, 0, 0, 0 } }, + // Mind Blast + { 11394, { 100, 0, 0, 0, 0 } }, + // Blood Drain + { 11395, { 20, 0, 0, 0, 0 } }, + // Bomb Toss + { 11396, { 110, 0, 0, 0, 0 } }, + // 1000 Needles + { 11397, { 0, 0, 0, 0, 0 } }, + // Drill Cannons + { 11398, { 120, 0, 0, 0, 0 } }, + // the Look + { 11399, { 130, 0, 0, 0, 0 } }, + // Sharpened Knife + { 11400, { 120, 0, 0, 0, 0 } }, + // Loom + { 11401, { 0, 0, 0, 0, 0 } }, + // Flame Thrower + { 11402, { 130, 0, 0, 0, 0 } }, + // Faze + { 11403, { 0, 0, 0, 0, 0 } }, + // Glower + { 11404, { 130, 0, 0, 0, 0 } }, + // Missile + { 11405, { 0, 0, 0, 0, 0 } }, + // White Wind + { 11406, { 0, 0, 0, 0, 0 } }, + // Final Sting + { 11407, { 1500, 0, 0, 0, 0 } }, + // Self-destruct + { 11408, { 900, 0, 0, 0, 0 } }, + // Transfusion + { 11409, { 0, 0, 0, 0, 0 } }, + // Toad Oil + { 11410, { 0, 0, 0, 0, 0 } }, + // Off-guard + { 11411, { 0, 0, 0, 0, 0 } }, + // Sticky Tongue + { 11412, { 0, 0, 0, 0, 0 } }, + // Tail Screw + { 11413, { 0, 0, 0, 0, 0 } }, + // Level 5 Petrify + { 11414, { 0, 0, 0, 0, 0 } }, + // Moon Flute + { 11415, { 0, 0, 0, 0, 0 } }, + // Doom + { 11416, { 0, 0, 0, 0, 0 } }, + // Mighty Guard + { 11417, { 0, 0, 0, 0, 0 } }, + // Ice Spikes + { 11418, { 0, 0, 0, 0, 0 } }, + // the Ram's Voice + { 11419, { 130, 0, 0, 0, 0 } }, + // the Dragon's Voice + { 11420, { 110, 0, 0, 0, 0 } }, + // Peculiar Light + { 11421, { 0, 0, 0, 0, 0 } }, + // Ink Jet + { 11422, { 120, 0, 0, 0, 0 } }, + // Flying Sardine + { 11423, { 10, 0, 0, 0, 0 } }, + // Diamondback + { 11424, { 0, 0, 0, 0, 0 } }, + // Fire Angon + { 11425, { 100, 0, 0, 0, 0 } }, + // Feather Rain + { 11426, { 180, 0, 0, 0, 0 } }, + // Eruption + { 11427, { 220, 0, 0, 0, 0 } }, + // Mountain Buster + { 11428, { 310, 0, 0, 0, 0 } }, + // Shock Strike + { 11429, { 310, 0, 0, 0, 0 } }, + // Glass Dance + { 11430, { 290, 0, 0, 0, 0 } }, + // Veil of the Whorl + { 11431, { 0, 0, 0, 0, 0 } }, + // Tri-shackle + { 11482, { 30, 0, 0, 0, 0 } }, + // attack + { 11784, { 0, 0, 0, 0, 0 } }, + // Stone of the Seventh Dawn + { 13423, { 140, 0, 0, 0, 0 } }, + // Aero of the Seventh Dawn + { 13424, { 50, 0, 0, 0, 0 } }, + // Cure of the Seventh Dawn + { 13425, { 0, 0, 0, 0, 700 } }, + // Aetherwell + { 13426, { 0, 0, 0, 0, 0 } }, + // Thunderous Force + { 14587, { 0, 0, 0, 0, 0 } }, + // Kyokufu + { 14840, { 180, 0, 0, 0, 0 } }, + // Ajisai + { 14841, { 100, 0, 0, 0, 0 } }, + // Hissatsu: Gyoten + { 14842, { 100, 0, 0, 0, 0 } }, + // 冥界恐叫打 + { 14843, { 0, 0, 0, 0, 0 } }, + // Second Wind + { 15375, { 0, 0, 0, 0, 500 } }, + +}; \ No newline at end of file From f892257aa5dd4634fde8bd02cea06e25f7ca3d0f Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 2 Jun 2019 00:34:22 +1000 Subject: [PATCH 02/10] refactor Util -> Common::Util & Action to World::Action --- src/api/main.cpp | 2 +- src/api/server_http.hpp | 6 +- src/common/Database/DbConnection.cpp | 2 +- src/common/Database/DbConnection.h | 4 +- src/common/Database/DbWorker.cpp | 4 +- src/common/Database/DbWorker.h | 4 +- src/common/Database/DbWorkerPool.cpp | 2 +- src/common/Database/DbWorkerPool.h | 2 +- src/common/Database/ZoneDbConnection.cpp | 2 +- src/common/Database/ZoneDbConnection.h | 2 +- src/common/Network/GamePacket.h | 2 +- src/common/Network/PacketContainer.cpp | 2 +- src/common/Util/LockedQueue.h | 2 +- src/common/Util/LockedWaitQueue.h | 2 +- src/common/Util/SpawnIndexAllocator.h | 2 +- src/common/Util/Util.cpp | 22 ++--- src/common/Util/Util.h | 2 +- src/common/Util/UtilMath.cpp | 22 ++--- src/common/Util/UtilMath.h | 2 +- src/lobby/GameConnection.h | 4 +- src/lobby/LobbyPacketContainer.cpp | 2 +- src/lobby/client_http.hpp | 6 +- src/scripts/action/common/ActionReturn6.cpp | 2 +- src/scripts/action/common/ActionSprint3.cpp | 2 +- src/scripts/action/common/ActionTeleport5.cpp | 2 +- .../archer/ActionHeavyShot97.cpp | 2 +- .../playeractions/conjurer/ActionCure120.cpp | 2 +- .../darkknight/ActionAbyssalDrain3641.cpp | 2 +- .../darkknight/ActionHardSlash3617.cpp | 2 +- .../darkknight/ActionPowerSlash3627.cpp | 2 +- .../darkknight/ActionSpinningSlash3619.cpp | 2 +- .../darkknight/ActionSyphonStrike3623.cpp | 2 +- .../darkknight/ActionUnleash3621.cpp | 2 +- .../whitemage/ActionAsylum3569.cpp | 2 +- src/tools/action_parse/main.cpp | 4 +- src/tools/discovery_parser/main.cpp | 6 +- src/tools/event_object_parser/main.cpp | 10 +-- src/tools/exd_common_gen/main.cpp | 2 +- src/tools/mob_parse/main.cpp | 2 +- src/tools/nav_export/main.cpp | 4 +- src/tools/pcb_reader/main.cpp | 4 +- src/world/Action/Action.cpp | 82 ++++++++++--------- src/world/Action/Action.h | 2 +- src/world/Action/EventAction.cpp | 17 ++-- src/world/Action/EventAction.h | 2 +- src/world/Actor/Chara.cpp | 4 +- src/world/Actor/Chara.h | 6 +- src/world/Actor/Player.cpp | 4 +- src/world/Actor/Player.h | 12 +-- src/world/Actor/PlayerEvent.cpp | 10 +-- src/world/ForwardsZone.h | 2 +- src/world/Manager/DebugCommandMgr.cpp | 2 +- src/world/Manager/MarketMgr.cpp | 2 +- src/world/Network/GameConnection.cpp | 2 +- src/world/Network/GameConnection.h | 4 +- src/world/Network/Handlers/PacketHandlers.cpp | 2 +- .../Network/PacketWrappers/MoveActorPacket.h | 8 +- .../Network/PacketWrappers/NpcSpawnPacket.h | 4 +- .../PacketWrappers/PlayerSpawnPacket.h | 4 +- src/world/Script/NativeScriptApi.cpp | 10 +-- src/world/Script/NativeScriptApi.h | 8 +- src/world/Script/ScriptLoader.cpp | 2 +- src/world/Script/ScriptMgr.cpp | 6 +- src/world/Script/ScriptMgr.h | 6 +- src/world/ServerMgr.cpp | 4 +- src/world/Session.cpp | 16 ++-- src/world/Territory/Zone.cpp | 2 +- src/world/Util/ActorFilter.cpp | 2 +- 68 files changed, 200 insertions(+), 181 deletions(-) diff --git a/src/api/main.cpp b/src/api/main.cpp index fd68af4f..3ea413f3 100644 --- a/src/api/main.cpp +++ b/src/api/main.cpp @@ -106,7 +106,7 @@ bool loadSettings( int32_t argc, char* argv[] ) try { - arg = Sapphire::Util::toLowerCopy( std::string( args[ i ] ) ); + arg = Common::Util::toLowerCopy( std::string( args[ i ] ) ); val = std::string( args[ i + 1 ] ); // trim '-' from start of arg diff --git a/src/api/server_http.hpp b/src/api/server_http.hpp index 7c831e69..8a6d2226 100644 --- a/src/api/server_http.hpp +++ b/src/api/server_http.hpp @@ -18,7 +18,7 @@ class case_insensitive_equals { public: bool operator()(const std::string &key1, const std::string &key2) const { - return Sapphire::Util::toLowerCopy( key1 ) == Sapphire::Util::toLowerCopy( key2 ); + return Sapphire::Common::Util::toLowerCopy( key1 ) == Sapphire::Common::Util::toLowerCopy( key2 ); } }; class case_insensitive_hash { @@ -27,7 +27,7 @@ public: { std::size_t seed=0; for( auto &c : key ) - Sapphire::Util::hashCombine< char >( seed, std::tolower( c ) ); + Sapphire::Common::Util::hashCombine< char >( seed, std::tolower( c ) ); return seed; } }; @@ -388,7 +388,7 @@ namespace SimpleWeb { auto range=request->header.equal_range("Connection"); for(auto it=range.first;it!=range.second;it++) { - if( Sapphire::Util::toLowerCopy( it->second ) == "close" ) + if( Sapphire::Common::Util::toLowerCopy( it->second ) == "close" ) return; } if(http_version>1.05) diff --git a/src/common/Database/DbConnection.cpp b/src/common/Database/DbConnection.cpp index 133baa56..f03b7f9e 100644 --- a/src/common/Database/DbConnection.cpp +++ b/src/common/Database/DbConnection.cpp @@ -17,7 +17,7 @@ Sapphire::Db::DbConnection::DbConnection( ConnectionInfo& connInfo ) : } -Sapphire::Db::DbConnection::DbConnection( Sapphire::LockedWaitQueue< std::shared_ptr< Operation > >* queue, +Sapphire::Db::DbConnection::DbConnection( Common::Util::LockedWaitQueue< std::shared_ptr< Operation > >* queue, Sapphire::Db::ConnectionInfo& connInfo ) : m_reconnecting( false ), m_prepareError( false ), diff --git a/src/common/Database/DbConnection.h b/src/common/Database/DbConnection.h index a31a531d..fc84b74f 100644 --- a/src/common/Database/DbConnection.h +++ b/src/common/Database/DbConnection.h @@ -42,7 +42,7 @@ namespace Sapphire::Db DbConnection( ConnectionInfo& connInfo ); // Constructor for asynchronous connections. - DbConnection( Sapphire::LockedWaitQueue< std::shared_ptr< Operation > >* queue, ConnectionInfo& connInfo ); + DbConnection( Common::Util::LockedWaitQueue< std::shared_ptr< Operation > >* queue, ConnectionInfo& connInfo ); virtual ~DbConnection(); @@ -92,7 +92,7 @@ namespace Sapphire::Db bool m_prepareError; private: - LockedWaitQueue< std::shared_ptr< Operation > >* m_queue; + Common::Util::LockedWaitQueue< std::shared_ptr< Operation > >* m_queue; std::shared_ptr< DbWorker > m_worker; std::shared_ptr< Mysql::Connection > m_pConnection; ConnectionInfo& m_connectionInfo; diff --git a/src/common/Database/DbWorker.cpp b/src/common/Database/DbWorker.cpp index 74ee0378..d08f251f 100644 --- a/src/common/Database/DbWorker.cpp +++ b/src/common/Database/DbWorker.cpp @@ -2,7 +2,9 @@ #include "Operation.h" #include "Util/LockedWaitQueue.h" -Sapphire::Db::DbWorker::DbWorker( Sapphire::LockedWaitQueue< std::shared_ptr< Operation > >* newQueue, +using namespace Sapphire::Common; + +Sapphire::Db::DbWorker::DbWorker( Util::LockedWaitQueue< std::shared_ptr< Operation > >* newQueue, DbConnection* pConn ) { m_pConn = pConn; diff --git a/src/common/Database/DbWorker.h b/src/common/Database/DbWorker.h index 13250c19..655ef13f 100644 --- a/src/common/Database/DbWorker.h +++ b/src/common/Database/DbWorker.h @@ -14,12 +14,12 @@ namespace Sapphire::Db class DbWorker { public: - DbWorker( LockedWaitQueue< std::shared_ptr< Operation > >* newQueue, DbConnection* connection ); + DbWorker( Common::Util::LockedWaitQueue< std::shared_ptr< Operation > >* newQueue, DbConnection* connection ); ~DbWorker(); private: - LockedWaitQueue< std::shared_ptr< Operation > >* m_queue; + Common::Util::LockedWaitQueue< std::shared_ptr< Operation > >* m_queue; DbConnection* m_pConn; void workerThread(); diff --git a/src/common/Database/DbWorkerPool.cpp b/src/common/Database/DbWorkerPool.cpp index c9ef3b51..81b9d96d 100644 --- a/src/common/Database/DbWorkerPool.cpp +++ b/src/common/Database/DbWorkerPool.cpp @@ -21,7 +21,7 @@ class PingOperation : public Sapphire::Db::Operation template< class T > Sapphire::Db::DbWorkerPool< T >::DbWorkerPool() : - m_queue( new Sapphire::LockedWaitQueue< std::shared_ptr< Operation > >() ), + m_queue( new Common::Util::LockedWaitQueue< std::shared_ptr< Operation > >() ), m_asyncThreads( 0 ), m_synchThreads( 0 ) { diff --git a/src/common/Database/DbWorkerPool.h b/src/common/Database/DbWorkerPool.h index a29bd3f1..bbc02e46 100644 --- a/src/common/Database/DbWorkerPool.h +++ b/src/common/Database/DbWorkerPool.h @@ -83,7 +83,7 @@ namespace Sapphire::Db const std::string& getDatabaseName() const; - std::unique_ptr< Sapphire::LockedWaitQueue< std::shared_ptr< Operation > > > m_queue; + std::unique_ptr< Common::Util::LockedWaitQueue< std::shared_ptr< Operation > > > m_queue; std::array< std::vector< std::shared_ptr< T > >, IDX_SIZE > m_connections; ConnectionInfo m_connectionInfo; uint8_t m_asyncThreads; diff --git a/src/common/Database/ZoneDbConnection.cpp b/src/common/Database/ZoneDbConnection.cpp index cceea22f..1c4c5a82 100644 --- a/src/common/Database/ZoneDbConnection.cpp +++ b/src/common/Database/ZoneDbConnection.cpp @@ -6,7 +6,7 @@ Sapphire::Db::ZoneDbConnection::ZoneDbConnection( ConnectionInfo& connInfo ) : { } -Sapphire::Db::ZoneDbConnection::ZoneDbConnection( Sapphire::LockedWaitQueue< std::shared_ptr< Operation > >* q, +Sapphire::Db::ZoneDbConnection::ZoneDbConnection( Common::Util::LockedWaitQueue< std::shared_ptr< Operation > >* q, ConnectionInfo& connInfo ) : DbConnection( q, connInfo ) { diff --git a/src/common/Database/ZoneDbConnection.h b/src/common/Database/ZoneDbConnection.h index 93bacc23..8c74bf19 100644 --- a/src/common/Database/ZoneDbConnection.h +++ b/src/common/Database/ZoneDbConnection.h @@ -112,7 +112,7 @@ namespace Sapphire::Db ZoneDbConnection( ConnectionInfo& connInfo ); - ZoneDbConnection( Sapphire::LockedWaitQueue< std::shared_ptr< Operation > >* q, ConnectionInfo& connInfo ); + ZoneDbConnection( Common::Util::LockedWaitQueue< std::shared_ptr< Operation > >* q, ConnectionInfo& connInfo ); ~ZoneDbConnection(); diff --git a/src/common/Network/GamePacket.h b/src/common/Network/GamePacket.h index f62c08ef..c1c06b76 100644 --- a/src/common/Network/GamePacket.h +++ b/src/common/Network/GamePacket.h @@ -257,7 +257,7 @@ namespace Sapphire::Network::Packets // The IPC type itself. m_ipcHdr.type = static_cast< ServerZoneIpcType >( m_data._ServerIpcType ); - m_ipcHdr.timestamp = Util::getTimeSeconds(); + m_ipcHdr.timestamp = Common::Util::getTimeSeconds(); m_segHdr.size = sizeof( T ) + sizeof( FFXIVARR_IPC_HEADER ) + sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); }; diff --git a/src/common/Network/PacketContainer.cpp b/src/common/Network/PacketContainer.cpp index a61c38c0..d89c8df4 100644 --- a/src/common/Network/PacketContainer.cpp +++ b/src/common/Network/PacketContainer.cpp @@ -76,7 +76,7 @@ std::string Sapphire::Network::Packets::PacketContainer::toString() std::string str = "\n"; for( uint32_t i = 0; i < m_ipcHdr.size; i++ ) { - str += Util::intToHexString( static_cast< int32_t >( tmpBuffer[ i ] & 0xFF ) ) + " "; + str += Common::Util::intToHexString( static_cast< int32_t >( tmpBuffer[ i ] & 0xFF ) ) + " "; if( ( i + 1 ) % 16 == 0 ) str += "\n"; diff --git a/src/common/Util/LockedQueue.h b/src/common/Util/LockedQueue.h index 1e73f4ce..57397b59 100644 --- a/src/common/Util/LockedQueue.h +++ b/src/common/Util/LockedQueue.h @@ -7,7 +7,7 @@ #include #include -namespace Sapphire +namespace Sapphire::Common::Util { template< class T > diff --git a/src/common/Util/LockedWaitQueue.h b/src/common/Util/LockedWaitQueue.h index 122cfd1c..1a1ffdc3 100644 --- a/src/common/Util/LockedWaitQueue.h +++ b/src/common/Util/LockedWaitQueue.h @@ -8,7 +8,7 @@ #include #include -namespace Sapphire +namespace Sapphire::Common::Util { template< typename T > diff --git a/src/common/Util/SpawnIndexAllocator.h b/src/common/Util/SpawnIndexAllocator.h index f03951a3..27003e8f 100644 --- a/src/common/Util/SpawnIndexAllocator.h +++ b/src/common/Util/SpawnIndexAllocator.h @@ -5,7 +5,7 @@ #include #include -namespace Sapphire::Util +namespace Sapphire::Common::Util { template< typename T, typename ActorIdType = uint32_t > diff --git a/src/common/Util/Util.cpp b/src/common/Util/Util.cpp index f443ddf8..d653e29c 100644 --- a/src/common/Util/Util.cpp +++ b/src/common/Util/Util.cpp @@ -5,7 +5,9 @@ #include #include -std::string Sapphire::Util::binaryToHexString( uint8_t* pBinData, uint16_t size ) +using namespace Sapphire::Common; + +std::string Util::binaryToHexString( uint8_t* pBinData, uint16_t size ) { std::string outStr; @@ -17,26 +19,26 @@ std::string Sapphire::Util::binaryToHexString( uint8_t* pBinData, uint16_t size return outStr; } -std::string Sapphire::Util::toLowerCopy( const std::string& inStr ) +std::string Util::toLowerCopy( const std::string& inStr ) { std::string out = inStr; std::transform( inStr.begin(), inStr.end(), out.begin(), [](unsigned char c) -> unsigned char { return ::tolower(c); }); return out; } -void Sapphire::Util::eraseAll( std::string& inOutStr, char remove ) +void Util::eraseAll( std::string& inOutStr, char remove ) { inOutStr.erase( std::remove( inOutStr.begin(), inOutStr.end(), remove ), inOutStr.end() ); } -void Sapphire::Util::eraseAllIn( std::string& inOutStr, std::string& remove ) +void Util::eraseAllIn( std::string& inOutStr, std::string& remove ) { for( auto rem : remove ) inOutStr.erase( std::remove( inOutStr.begin(), inOutStr.end(), rem ), inOutStr.end() ); } -std::string Sapphire::Util::intToHexString( uint64_t intValue, uint8_t width ) +std::string Util::intToHexString( uint64_t intValue, uint8_t width ) { std::string hexStr; @@ -51,7 +53,7 @@ std::string Sapphire::Util::intToHexString( uint64_t intValue, uint8_t width ) return hexStr; } -std::string Sapphire::Util::binaryToHexDump( uint8_t* pBinData, uint16_t size ) +std::string Util::binaryToHexDump( uint8_t* pBinData, uint16_t size ) { int bytesPerLine = 16; constexpr char hexChars[] = "0123456789ABCDEF"; @@ -112,25 +114,25 @@ std::string Sapphire::Util::binaryToHexDump( uint8_t* pBinData, uint16_t size ) } -uint64_t Sapphire::Util::getTimeMs() +uint64_t Util::getTimeMs() { std::chrono::milliseconds epoch = std::chrono::duration_cast< std::chrono::milliseconds > ( std::chrono::system_clock::now().time_since_epoch() ); return epoch.count(); } -uint32_t Sapphire::Util::getTimeSeconds() +uint32_t Util::getTimeSeconds() { auto currClock = std::chrono::system_clock::now(); return std::chrono::time_point_cast< std::chrono::seconds >( currClock ).time_since_epoch().count(); } -uint64_t Sapphire::Util::getEorzeanTimeStamp() +uint64_t Util::getEorzeanTimeStamp() { return static_cast< uint64_t >( getTimeSeconds() * 20.571428571428573f ); } -void Sapphire::Util::valueToFlagByteIndexValue( uint32_t inVal, uint8_t& outVal, uint16_t& outIndex ) +void Util::valueToFlagByteIndexValue( uint32_t inVal, uint8_t& outVal, uint16_t& outIndex ) { uint32_t id = inVal; outIndex = id / 8; diff --git a/src/common/Util/Util.h b/src/common/Util/Util.h index 4c4a5a32..e42dd7ee 100644 --- a/src/common/Util/Util.h +++ b/src/common/Util/Util.h @@ -5,7 +5,7 @@ #include #include -namespace Sapphire::Util +namespace Sapphire::Common::Util { std::string binaryToHexString( uint8_t* pBinData, uint16_t size ); diff --git a/src/common/Util/UtilMath.cpp b/src/common/Util/UtilMath.cpp index f2e8cc2c..a1e1a01e 100644 --- a/src/common/Util/UtilMath.cpp +++ b/src/common/Util/UtilMath.cpp @@ -1,7 +1,9 @@ #include #include "UtilMath.h" -float Sapphire::Util::distanceSq( float x, float y, float z, float x1, float y1, float z1 ) +using namespace Sapphire::Common; + +float Util::distanceSq( float x, float y, float z, float x1, float y1, float z1 ) { float deltaX = x - x1; float deltaY = y - y1; @@ -10,29 +12,29 @@ float Sapphire::Util::distanceSq( float x, float y, float z, float x1, float y1, return ( deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ ); } -float Sapphire::Util::distance( float x, float y, float z, float x1, float y1, float z1 ) +float Util::distance( float x, float y, float z, float x1, float y1, float z1 ) { return sqrtf( distanceSq( x, y, z, x1, y1, z1 ) ); } -float Sapphire::Util::distance( const Common::FFXIVARR_POSITION3& pos1, const Common::FFXIVARR_POSITION3& pos2 ) +float Util::distance( const Common::FFXIVARR_POSITION3& pos1, const Common::FFXIVARR_POSITION3& pos2 ) { return sqrtf( distanceSq( pos1.x, pos1.y, pos1.z, pos2.x, pos2.y, pos2.z ) ); } -float Sapphire::Util::distance2DSq( float x, float y, float x1, float y1 ) +float Util::distance2DSq( float x, float y, float x1, float y1 ) { float deltaX = x - x1; float deltaY = y - y1; return ( deltaX * deltaX + deltaY * deltaY ); } -float Sapphire::Util::distance2D( float x, float y, float x1, float y1 ) +float Util::distance2D( float x, float y, float x1, float y1 ) { return sqrtf( distance2DSq( x, y, x1, y1 ) ); } -float Sapphire::Util::calcAngTo( float x, float y, float x1, float y1 ) +float Util::calcAngTo( float x, float y, float x1, float y1 ) { float dx = x - x1; float dy = y - y1; @@ -46,7 +48,7 @@ float Sapphire::Util::calcAngTo( float x, float y, float x1, float y1 ) } } -float Sapphire::Util::calcAngFrom( float x, float y, float x1, float y1 ) +float Util::calcAngFrom( float x, float y, float x1, float y1 ) { float dx = x - x1; float dy = y - y1; @@ -60,17 +62,17 @@ float Sapphire::Util::calcAngFrom( float x, float y, float x1, float y1 ) } } -uint16_t Sapphire::Util::floatToUInt16( float val ) +uint16_t Util::floatToUInt16( float val ) { return static_cast< uint16_t >( 0x8000 + val * 32.767f ); } -uint16_t Sapphire::Util::floatToUInt16Rot( float val ) +uint16_t Util::floatToUInt16Rot( float val ) { return static_cast< uint16_t >( 0x8000 * ( ( val + PI ) ) / PI ); } -uint8_t Sapphire::Util::floatToUInt8Rot( float val ) +uint8_t Util::floatToUInt8Rot( float val ) { return static_cast< uint8_t >( 0x80 * ( ( val + PI ) ) / PI ); } \ No newline at end of file diff --git a/src/common/Util/UtilMath.h b/src/common/Util/UtilMath.h index 5d34ee92..c35ef6be 100644 --- a/src/common/Util/UtilMath.h +++ b/src/common/Util/UtilMath.h @@ -5,7 +5,7 @@ #define PI 3.14159265358979323846f -namespace Sapphire::Util +namespace Sapphire::Common::Util { float distanceSq( float x, float y, float z, float x1, float y1, float z1 ); diff --git a/src/lobby/GameConnection.h b/src/lobby/GameConnection.h index 6bcb7122..42f0a3a2 100644 --- a/src/lobby/GameConnection.h +++ b/src/lobby/GameConnection.h @@ -36,8 +36,8 @@ namespace Sapphire::Network LobbySessionPtr m_pSession; - LockedQueue< Packets::GamePacketPtr > m_inQueue; - LockedQueue< Packets::GamePacketPtr > m_outQueue; + Common::Util::LockedQueue< Packets::GamePacketPtr > m_inQueue; + Common::Util::LockedQueue< Packets::GamePacketPtr > m_outQueue; std::vector< uint8_t > m_packets; public: diff --git a/src/lobby/LobbyPacketContainer.cpp b/src/lobby/LobbyPacketContainer.cpp index 2d217436..c1c7366c 100644 --- a/src/lobby/LobbyPacketContainer.cpp +++ b/src/lobby/LobbyPacketContainer.cpp @@ -48,7 +48,7 @@ uint8_t* Sapphire::Network::Packets::LobbyPacketContainer::getRawData( bool adds if( addstuff ) { m_header.unknown_0 = 0xff41a05252; - m_header.timestamp = Sapphire::Util::getTimeMs(); + m_header.timestamp = Common::Util::getTimeMs(); } memcpy( m_dataBuf, &m_header, sizeof( Sapphire::Network::Packets::FFXIVARR_PACKET_HEADER ) ); return m_dataBuf; diff --git a/src/lobby/client_http.hpp b/src/lobby/client_http.hpp index fc30d950..f22cb8d2 100644 --- a/src/lobby/client_http.hpp +++ b/src/lobby/client_http.hpp @@ -17,16 +17,16 @@ class case_insensitive_equals { public: bool operator()(const std::string &key1, const std::string &key2) const { - return Sapphire::Util::toLowerCopy( key1 ) == Sapphire::Util::toLowerCopy( key2 ); + return Sapphire::Common::Util::toLowerCopy( key1 ) == Sapphire::Common::Util::toLowerCopy( key2 ); } }; class case_insensitive_hash { public: - size_t operator()( const std::string &key ) const + size_t operator()( const std::string &key ) const { std::size_t seed=0; for( auto &c : key ) - Sapphire::Util::hashCombine< char >( seed, std::tolower( c ) ); + Sapphire::Common::Util::hashCombine< char >( seed, std::tolower( c ) ); return seed; } }; diff --git a/src/scripts/action/common/ActionReturn6.cpp b/src/scripts/action/common/ActionReturn6.cpp index 9831c7e3..aedb0a38 100644 --- a/src/scripts/action/common/ActionReturn6.cpp +++ b/src/scripts/action/common/ActionReturn6.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { if( !action.getSourceChara()->isPlayer() ) return; diff --git a/src/scripts/action/common/ActionSprint3.cpp b/src/scripts/action/common/ActionSprint3.cpp index 0067dcac..133cbb2e 100644 --- a/src/scripts/action/common/ActionSprint3.cpp +++ b/src/scripts/action/common/ActionSprint3.cpp @@ -11,7 +11,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { auto sourceChara = action.getSourceChara(); diff --git a/src/scripts/action/common/ActionTeleport5.cpp b/src/scripts/action/common/ActionTeleport5.cpp index e08afda6..1a2fcd77 100644 --- a/src/scripts/action/common/ActionTeleport5.cpp +++ b/src/scripts/action/common/ActionTeleport5.cpp @@ -14,7 +14,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { auto player = action.getSourceChara()->getAsPlayer(); diff --git a/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp b/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp index 882d4549..3c3ef16f 100644 --- a/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp +++ b/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { if( auto player = action.getSourceChara()->getAsPlayer() ) player->sendDebug( "Imagine you just hit an enemy for 150 potency. Incredible, right?" ); diff --git a/src/scripts/action/playeractions/conjurer/ActionCure120.cpp b/src/scripts/action/playeractions/conjurer/ActionCure120.cpp index 9d6bc8a7..66284ecb 100644 --- a/src/scripts/action/playeractions/conjurer/ActionCure120.cpp +++ b/src/scripts/action/playeractions/conjurer/ActionCure120.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { } diff --git a/src/scripts/action/playeractions/darkknight/ActionAbyssalDrain3641.cpp b/src/scripts/action/playeractions/darkknight/ActionAbyssalDrain3641.cpp index 4d302333..3c369d1c 100644 --- a/src/scripts/action/playeractions/darkknight/ActionAbyssalDrain3641.cpp +++ b/src/scripts/action/playeractions/darkknight/ActionAbyssalDrain3641.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { for( auto& chara : action.getHitCharas() ) { diff --git a/src/scripts/action/playeractions/darkknight/ActionHardSlash3617.cpp b/src/scripts/action/playeractions/darkknight/ActionHardSlash3617.cpp index 6d76fdb0..1143c0f7 100644 --- a/src/scripts/action/playeractions/darkknight/ActionHardSlash3617.cpp +++ b/src/scripts/action/playeractions/darkknight/ActionHardSlash3617.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { auto chara = action.getHitChara(); chara->takeDamage( chara->getMaxHp() * 0.34f ); diff --git a/src/scripts/action/playeractions/darkknight/ActionPowerSlash3627.cpp b/src/scripts/action/playeractions/darkknight/ActionPowerSlash3627.cpp index 6775947d..74cd54a0 100644 --- a/src/scripts/action/playeractions/darkknight/ActionPowerSlash3627.cpp +++ b/src/scripts/action/playeractions/darkknight/ActionPowerSlash3627.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { } diff --git a/src/scripts/action/playeractions/darkknight/ActionSpinningSlash3619.cpp b/src/scripts/action/playeractions/darkknight/ActionSpinningSlash3619.cpp index 3eb592df..1074da11 100644 --- a/src/scripts/action/playeractions/darkknight/ActionSpinningSlash3619.cpp +++ b/src/scripts/action/playeractions/darkknight/ActionSpinningSlash3619.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { } diff --git a/src/scripts/action/playeractions/darkknight/ActionSyphonStrike3623.cpp b/src/scripts/action/playeractions/darkknight/ActionSyphonStrike3623.cpp index e765f8d1..a1d18a74 100644 --- a/src/scripts/action/playeractions/darkknight/ActionSyphonStrike3623.cpp +++ b/src/scripts/action/playeractions/darkknight/ActionSyphonStrike3623.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { } diff --git a/src/scripts/action/playeractions/darkknight/ActionUnleash3621.cpp b/src/scripts/action/playeractions/darkknight/ActionUnleash3621.cpp index 2e735af6..5af2e472 100644 --- a/src/scripts/action/playeractions/darkknight/ActionUnleash3621.cpp +++ b/src/scripts/action/playeractions/darkknight/ActionUnleash3621.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { for( auto& chara : action.getHitCharas() ) { diff --git a/src/scripts/action/playeractions/whitemage/ActionAsylum3569.cpp b/src/scripts/action/playeractions/whitemage/ActionAsylum3569.cpp index 1e71dd2e..6ac1c92c 100644 --- a/src/scripts/action/playeractions/whitemage/ActionAsylum3569.cpp +++ b/src/scripts/action/playeractions/whitemage/ActionAsylum3569.cpp @@ -12,7 +12,7 @@ public: { } - void onExecute( Sapphire::Action::Action& action ) override + void onExecute( Sapphire::World::Action::Action& action ) override { } diff --git a/src/tools/action_parse/main.cpp b/src/tools/action_parse/main.cpp index c48194d3..3adce507 100644 --- a/src/tools/action_parse/main.cpp +++ b/src/tools/action_parse/main.cpp @@ -257,14 +257,14 @@ int main() // Logger::info( out ); } - std::ifstream ifs( "ActionLut.cpp.tmpl" ); + std::ifstream ifs( "ActionLutData.cpp.tmpl" ); std::string actionTmpl( ( std::istreambuf_iterator< char >( ifs ) ), std::istreambuf_iterator< char >() ); auto result = std::regex_replace( actionTmpl, std::regex( "%INSERT_GARBAGE%" ), output ); - std::ofstream outH( "ActionLut.cpp" ); + std::ofstream outH( "ActionLutData.cpp" ); outH << result; outH.close(); diff --git a/src/tools/discovery_parser/main.cpp b/src/tools/discovery_parser/main.cpp index 41c833b6..0ded1f58 100644 --- a/src/tools/discovery_parser/main.cpp +++ b/src/tools/discovery_parser/main.cpp @@ -26,6 +26,8 @@ #include #include +using namespace Sapphire; + // garbage to ignore models bool ignoreModels = false; @@ -165,7 +167,7 @@ std::string zoneNameToPath( const std::string& name ) info.name = teriName; zoneInfoMap[ row.first ] = info; - if( !found && ( Sapphire::Util::toLowerCopy( name ) == Sapphire::Util::toLowerCopy( teriName ) ) ) + if( !found && ( Common::Util::toLowerCopy( name ) == Common::Util::toLowerCopy( teriName ) ) ) { found = true; path = teriPath; @@ -177,7 +179,7 @@ std::string zoneNameToPath( const std::string& name ) { for( const auto& entry : zoneInfoMap ) { - if( found = Sapphire::Util::toLowerCopy( name ) == Sapphire::Util::toLowerCopy( entry.second.name ) ) + if( found = Common::Util::toLowerCopy( name ) == Common::Util::toLowerCopy( entry.second.name ) ) { path = entry.second.path; zoneId = entry.second.id; diff --git a/src/tools/event_object_parser/main.cpp b/src/tools/event_object_parser/main.cpp index 16ab9ab6..a4d451a9 100644 --- a/src/tools/event_object_parser/main.cpp +++ b/src/tools/event_object_parser/main.cpp @@ -62,7 +62,7 @@ std::string zoneNameToPath( const std::string& name ) { std::string path; - auto it = g_nameMap.find( Sapphire::Util::toLowerCopy( name ) ); + auto it = g_nameMap.find( Common::Util::toLowerCopy( name ) ); if( it != g_nameMap.end() ) return it->second; @@ -79,7 +79,7 @@ std::string zoneNameToPath( const std::string& name ) if( teriName.empty() ) continue; - if( Sapphire::Util::toLowerCopy( name ) == Sapphire::Util::toLowerCopy( teriName ) ) + if( Common::Util::toLowerCopy( name ) == Common::Util::toLowerCopy( teriName ) ) { path = teriPath; break; @@ -90,7 +90,7 @@ std::string zoneNameToPath( const std::string& name ) { path = std::string( "bg/" ) + path.substr( 0, path.find( "/level/" ) ); Logger::debug( "Found path for {0}: {1}", name, path ); - g_nameMap[ Sapphire::Util::toLowerCopy( name ) ] = path; + g_nameMap[ Common::Util::toLowerCopy( name ) ] = path; } else { @@ -161,7 +161,7 @@ void loadAllInstanceContentEntries() name = name.replace( name.begin() + i, name.begin() + i + 1, { '_' } ); std::string remove = ",★_ '()[]-\xae\x1a\x1\x2\x1f\x1\x3.:"; - Sapphire::Util::eraseAllIn( name, remove ); + Common::Util::eraseAllIn( name, remove ); name[ 0 ] = toupper( name[ 0 ] ); contentList.push_back( { contentId, name, tt->name, type } ); } @@ -332,7 +332,7 @@ int main( int argc, char* argv[] ) { name = eobjNameMap[ id ]; std::string remove = ",★_ '()[]-\xae\x1a\x1\x2\x1f\x1\x3.:"; - Sapphire::Util::eraseAllIn( name, remove ); + Common::Util::eraseAllIn( name, remove ); name[ 0 ] = toupper( name[ 0 ] ); } if( name.empty() ) diff --git a/src/tools/exd_common_gen/main.cpp b/src/tools/exd_common_gen/main.cpp index a6c7fb60..43a27473 100644 --- a/src/tools/exd_common_gen/main.cpp +++ b/src/tools/exd_common_gen/main.cpp @@ -55,7 +55,7 @@ std::string generateEnum( const std::string& exd, int8_t nameIndex, const std::s } std::string remove = ",_-':!(){} \x02\x1f\x01\x03"; - Sapphire::Util::eraseAllIn( value, remove ); + Common::Util::eraseAllIn( value, remove ); value[ 0 ] = std::toupper( value[ 0 ] ); diff --git a/src/tools/mob_parse/main.cpp b/src/tools/mob_parse/main.cpp index 838ee51e..e8598da0 100644 --- a/src/tools/mob_parse/main.cpp +++ b/src/tools/mob_parse/main.cpp @@ -121,7 +121,7 @@ std::string binaryToHexString( uint8_t* pBinData, uint16_t size ) for( uint32_t i = 0; i < size; i++ ) { - outStr += Sapphire::Util::intToHexString( pBinData[ i ] & 0xFF ); + outStr += Common::Util::intToHexString( pBinData[ i ] & 0xFF ); } return outStr; diff --git a/src/tools/nav_export/main.cpp b/src/tools/nav_export/main.cpp index 043410a7..12e1c840 100644 --- a/src/tools/nav_export/main.cpp +++ b/src/tools/nav_export/main.cpp @@ -29,6 +29,8 @@ #include #include +using namespace Sapphire; + // garbage to ignore models bool noObj = false; @@ -121,7 +123,7 @@ std::string zoneNameToPath( const std::string& name ) if( teriName.empty() ) continue; auto teriPath = std::get< std::string >( fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::Path ) ) ); - if( !found && ( Sapphire::Util::toLowerCopy( name ) == Sapphire::Util::toLowerCopy( teriName ) ) ) + if( !found && ( Common::Util::toLowerCopy( name ) == Common::Util::toLowerCopy( teriName ) ) ) { path = teriPath; found = true; diff --git a/src/tools/pcb_reader/main.cpp b/src/tools/pcb_reader/main.cpp index 7c922a12..f4d29d2a 100644 --- a/src/tools/pcb_reader/main.cpp +++ b/src/tools/pcb_reader/main.cpp @@ -29,6 +29,8 @@ #include #include +using namespace Sapphire; + // garbage to ignore models bool noObj = false; @@ -123,7 +125,7 @@ std::string zoneNameToPath( const std::string& name ) if( teriName.empty() ) continue; auto teriPath = std::get< std::string >( fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::Path ) ) ); - if( !found && ( Sapphire::Util::toLowerCopy( name ) == Sapphire::Util::toLowerCopy( teriName ) ) ) + if( !found && ( Common::Util::toLowerCopy( name ) == Common::Util::toLowerCopy( teriName ) ) ) { path = teriPath; found = true; diff --git a/src/world/Action/Action.cpp b/src/world/Action/Action.cpp index 7f04a63f..3c6da8c5 100644 --- a/src/world/Action/Action.cpp +++ b/src/world/Action/Action.cpp @@ -1,4 +1,5 @@ #include "Action.h" +#include "ActionLut.h" #include #include @@ -26,16 +27,18 @@ using namespace Sapphire::Network::Packets; using namespace Sapphire::Network::Packets::Server; using namespace Sapphire::Network::ActorControl; +using namespace Sapphire::World::Action; -Sapphire::Action::Action::Action() = default; -Sapphire::Action::Action::~Action() = default; -Sapphire::Action::Action::Action( Entity::CharaPtr caster, uint32_t actionId, FrameworkPtr fw ) : +Action::Action() = default; +Action::~Action() = default; + +Action::Action( Entity::CharaPtr caster, uint32_t actionId, FrameworkPtr fw ) : Action( std::move( caster ), actionId, nullptr, std::move( fw ) ) { } -Sapphire::Action::Action::Action( Entity::CharaPtr caster, uint32_t actionId, +Action::Action( Entity::CharaPtr caster, uint32_t actionId, Data::ActionPtr actionData, FrameworkPtr fw ) : m_pSource( std::move( caster ) ), m_pFw( std::move( fw ) ), @@ -47,12 +50,12 @@ Sapphire::Action::Action::Action( Entity::CharaPtr caster, uint32_t actionId, { } -uint32_t Sapphire::Action::Action::getId() const +uint32_t Action::getId() const { return m_id; } -bool Sapphire::Action::Action::init() +bool Action::init() { if( !m_actionData ) { @@ -121,62 +124,62 @@ bool Sapphire::Action::Action::init() return true; } -void Sapphire::Action::Action::setPos( Sapphire::Common::FFXIVARR_POSITION3 pos ) +void Action::setPos( Sapphire::Common::FFXIVARR_POSITION3 pos ) { m_pos = pos; } -Sapphire::Common::FFXIVARR_POSITION3 Sapphire::Action::Action::getPos() const +Sapphire::Common::FFXIVARR_POSITION3 Action::getPos() const { return m_pos; } -void Sapphire::Action::Action::setTargetId( uint64_t targetId ) +void Action::setTargetId( uint64_t targetId ) { m_targetId = targetId; } -uint64_t Sapphire::Action::Action::getTargetId() const +uint64_t Action::getTargetId() const { return m_targetId; } -bool Sapphire::Action::Action::hasClientsideTarget() const +bool Action::hasClientsideTarget() const { return m_targetId > 0xFFFFFFFF; } -bool Sapphire::Action::Action::isInterrupted() const +bool Action::isInterrupted() const { return m_interruptType != Common::ActionInterruptType::None; } -void Sapphire::Action::Action::setInterrupted( Common::ActionInterruptType type ) +void Action::setInterrupted( Common::ActionInterruptType type ) { m_interruptType = type; } -uint32_t Sapphire::Action::Action::getCastTime() const +uint32_t Action::getCastTime() const { return m_castTimeMs; } -void Sapphire::Action::Action::setCastTime( uint32_t castTime ) +void Action::setCastTime( uint32_t castTime ) { m_castTimeMs = castTime; } -bool Sapphire::Action::Action::hasCastTime() const +bool Action::hasCastTime() const { return m_castTimeMs > 0; } -Sapphire::Entity::CharaPtr Sapphire::Action::Action::getSourceChara() const +Sapphire::Entity::CharaPtr Action::getSourceChara() const { return m_pSource; } -bool Sapphire::Action::Action::update() +bool Action::update() { // action has not been started yet if( m_startTime == 0 ) @@ -193,7 +196,7 @@ bool Sapphire::Action::Action::update() // todo: check if the target is still in range } - uint64_t tickCount = Util::getTimeMs(); + uint64_t tickCount = Common::Util::getTimeMs(); if( !hasCastTime() || std::difftime( tickCount, m_startTime ) > m_castTimeMs ) { @@ -204,11 +207,11 @@ bool Sapphire::Action::Action::update() return false; } -void Sapphire::Action::Action::start() +void Action::start() { assert( m_pSource ); - m_startTime = Util::getTimeMs(); + m_startTime = Common::Util::getTimeMs(); auto player = m_pSource->getAsPlayer(); @@ -238,6 +241,9 @@ void Sapphire::Action::Action::start() auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >(); if( !pScriptMgr->onStart( *this ) ) { + // check the lut initially and see if we have something usable, otherwise cancel the cast +// Sapphire::World::Action::ActionLut::validEntryExists( getId() ); + // script not implemented interrupt(); @@ -255,7 +261,7 @@ void Sapphire::Action::Action::start() execute(); } -void Sapphire::Action::Action::interrupt() +void Action::interrupt() { assert( m_pSource ); @@ -289,7 +295,7 @@ void Sapphire::Action::Action::interrupt() pScriptMgr->onInterrupt( *this ); } -void Sapphire::Action::Action::execute() +void Action::execute() { assert( m_pSource ); @@ -346,7 +352,7 @@ void Sapphire::Action::Action::execute() } } -bool Sapphire::Action::Action::precheck() +bool Action::precheck() { if( auto player = m_pSource->getAsPlayer() ) { @@ -357,7 +363,7 @@ bool Sapphire::Action::Action::precheck() return true; } -bool Sapphire::Action::Action::playerPrecheck( Entity::Player& player ) +bool Action::playerPrecheck( Entity::Player& player ) { // lol if( !player.isAlive() ) @@ -408,17 +414,17 @@ bool Sapphire::Action::Action::playerPrecheck( Entity::Player& player ) return true; } -uint32_t Sapphire::Action::Action::getAdditionalData() const +uint32_t Action::getAdditionalData() const { return m_additionalData; } -void Sapphire::Action::Action::setAdditionalData( uint32_t data ) +void Action::setAdditionalData( uint32_t data ) { m_additionalData = data; } -bool Sapphire::Action::Action::isComboAction() const +bool Action::isComboAction() const { auto lastActionId = m_pSource->getLastComboActionId(); @@ -430,7 +436,7 @@ bool Sapphire::Action::Action::isComboAction() const return m_actionData->actionCombo == lastActionId; } -bool Sapphire::Action::Action::primaryCostCheck( bool subtractCosts ) +bool Action::primaryCostCheck( bool subtractCosts ) { switch( m_primaryCostType ) { @@ -473,23 +479,23 @@ bool Sapphire::Action::Action::primaryCostCheck( bool subtractCosts ) } } -bool Sapphire::Action::Action::secondaryCostCheck( bool subtractCosts ) +bool Action::secondaryCostCheck( bool subtractCosts ) { // todo: these need to be mapped return true; } -bool Sapphire::Action::Action::hasResources() +bool Action::hasResources() { return primaryCostCheck( false ) && secondaryCostCheck( false ); } -bool Sapphire::Action::Action::consumeResources() +bool Action::consumeResources() { return primaryCostCheck( true ) && secondaryCostCheck( true ); } -bool Sapphire::Action::Action::snapshotAffectedActors( std::vector< Entity::CharaPtr >& actors ) +bool Action::snapshotAffectedActors( std::vector< Entity::CharaPtr >& actors ) { for( const auto& actor : m_pSource->getInRangeActors( true ) ) { @@ -519,12 +525,12 @@ bool Sapphire::Action::Action::snapshotAffectedActors( std::vector< Entity::Char return !actors.empty(); } -void Sapphire::Action::Action::addActorFilter( World::Util::ActorFilterPtr filter ) +void Action::addActorFilter( World::Util::ActorFilterPtr filter ) { m_actorFilters.push_back( std::move( filter ) ); } -void Sapphire::Action::Action::addDefaultActorFilters() +void Action::addDefaultActorFilters() { switch( m_castType ) { @@ -561,7 +567,7 @@ void Sapphire::Action::Action::addDefaultActorFilters() } } -bool Sapphire::Action::Action::preFilterActor( Sapphire::Entity::Actor& actor ) const +bool Action::preFilterActor( Sapphire::Entity::Actor& actor ) const { auto kind = actor.getObjKind(); @@ -574,12 +580,12 @@ bool Sapphire::Action::Action::preFilterActor( Sapphire::Entity::Actor& actor ) return true; } -std::vector< Sapphire::Entity::CharaPtr >& Sapphire::Action::Action::getHitCharas() +std::vector< Sapphire::Entity::CharaPtr >& Action::getHitCharas() { return m_hitActors; } -Sapphire::Entity::CharaPtr Sapphire::Action::Action::getHitChara() +Sapphire::Entity::CharaPtr Action::getHitChara() { if( !m_hitActors.empty() ) { diff --git a/src/world/Action/Action.h b/src/world/Action/Action.h index e1c57d2d..b4b12363 100644 --- a/src/world/Action/Action.h +++ b/src/world/Action/Action.h @@ -11,7 +11,7 @@ namespace Sapphire::Data using ActionPtr = std::shared_ptr< Action >; } -namespace Sapphire::Action +namespace Sapphire::World::Action { class Action diff --git a/src/world/Action/EventAction.cpp b/src/world/Action/EventAction.cpp index 349e9040..18c8d993 100644 --- a/src/world/Action/EventAction.cpp +++ b/src/world/Action/EventAction.cpp @@ -11,15 +11,16 @@ #include "EventAction.h" #include "Framework.h" +using namespace Sapphire::World; using namespace Sapphire::Common; using namespace Sapphire::Network; using namespace Sapphire::Network::Packets; using namespace Sapphire::Network::Packets::Server; using namespace Sapphire::Network::ActorControl; -Sapphire::Action::EventAction::EventAction( Entity::CharaPtr pActor, uint32_t eventId, uint16_t action, - ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional, - FrameworkPtr pFw ) +Action::EventAction::EventAction( Entity::CharaPtr pActor, uint32_t eventId, uint16_t action, + ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional, + FrameworkPtr pFw ) { m_additional = additional; m_eventId = eventId; @@ -33,14 +34,14 @@ Sapphire::Action::EventAction::EventAction( Entity::CharaPtr pActor, uint32_t ev m_interruptType = Common::ActionInterruptType::None; } -Sapphire::Action::EventAction::~EventAction() = default; +Action::EventAction::~EventAction() = default; -void Sapphire::Action::EventAction::start() +void Action::EventAction::start() { if( !m_pSource ) return; - m_startTime = Util::getTimeMs(); + m_startTime = Common::Util::getTimeMs(); auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastStart, 1, m_id, 0x4000004E ); @@ -54,7 +55,7 @@ void Sapphire::Action::EventAction::start() m_pSource->sendToInRangeSet( control ); } -void Sapphire::Action::EventAction::execute() +void Action::EventAction::execute() { if( !m_pSource ) return; @@ -90,7 +91,7 @@ void Sapphire::Action::EventAction::execute() } -void Sapphire::Action::EventAction::interrupt() +void Action::EventAction::interrupt() { if( !m_pSource ) return; diff --git a/src/world/Action/EventAction.h b/src/world/Action/EventAction.h index 37987634..4a9bb50a 100644 --- a/src/world/Action/EventAction.h +++ b/src/world/Action/EventAction.h @@ -6,7 +6,7 @@ #include "ForwardsZone.h" #include "Action.h" -namespace Sapphire::Action +namespace Sapphire::World::Action { class EventAction : public Action diff --git a/src/world/Actor/Chara.cpp b/src/world/Actor/Chara.cpp index d2eac841..3942f112 100644 --- a/src/world/Actor/Chara.cpp +++ b/src/world/Actor/Chara.cpp @@ -391,13 +391,13 @@ void Sapphire::Entity::Chara::sendStatusUpdate() } /*! \return ActionPtr of the currently registered action, or nullptr */ -Sapphire::Action::ActionPtr Sapphire::Entity::Chara::getCurrentAction() const +Sapphire::World::Action::ActionPtr Sapphire::Entity::Chara::getCurrentAction() const { return m_pCurrentAction; } /*! \param ActionPtr of the action to be registered */ -void Sapphire::Entity::Chara::setCurrentAction( Sapphire::Action::ActionPtr pAction ) +void Sapphire::Entity::Chara::setCurrentAction( Sapphire::World::Action::ActionPtr pAction ) { m_pCurrentAction = std::move( pAction ); } diff --git a/src/world/Actor/Chara.h b/src/world/Actor/Chara.h index 5679b2cb..83d14fb6 100644 --- a/src/world/Actor/Chara.h +++ b/src/world/Actor/Chara.h @@ -102,7 +102,7 @@ namespace Sapphire::Entity /*! Id of the currently selected target actor */ uint64_t m_targetId; /*! Ptr to a queued action */ - Action::ActionPtr m_pCurrentAction; + World::Action::ActionPtr m_pCurrentAction; /*! id of the director this chara is assigned to */ uint32_t m_directorId; @@ -265,9 +265,9 @@ namespace Sapphire::Entity virtual void update( uint64_t tickCount ); - Action::ActionPtr getCurrentAction() const; + World::Action::ActionPtr getCurrentAction() const; - void setCurrentAction( Action::ActionPtr pAction ); + void setCurrentAction( World::Action::ActionPtr pAction ); uint32_t getLastComboActionId() const; void setLastComboActionId( uint32_t actionId ); diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 362dfa0e..f4abe67c 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -1621,7 +1621,7 @@ void Sapphire::Entity::Player::setCFPenaltyTimestamp( uint32_t timestamp ) uint32_t Sapphire::Entity::Player::getCFPenaltyMinutes() const { - auto currentTimestamp = Sapphire::Util::getTimeSeconds(); + auto currentTimestamp = Common::Util::getTimeSeconds(); auto endTimestamp = getCFPenaltyTimestamp(); // check if penalty timestamp already passed current time @@ -1634,7 +1634,7 @@ uint32_t Sapphire::Entity::Player::getCFPenaltyMinutes() const void Sapphire::Entity::Player::setCFPenaltyMinutes( uint32_t minutes ) { - auto currentTimestamp = Sapphire::Util::getTimeSeconds(); + auto currentTimestamp = Common::Util::getTimeSeconds(); setCFPenaltyTimestamp( currentTimestamp + minutes * 60 ); } diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index 3fbf9f88..e277738a 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -53,12 +53,12 @@ namespace Sapphire::Entity // EventHandlers ////////////////////////////////////////////////////////////////////////////////////////////////////// /*! start an event action */ - void eventActionStart( uint32_t eventId, uint32_t action, Action::ActionCallback finishCallback, - Action::ActionCallback interruptCallback, uint64_t additional ); + void eventActionStart( uint32_t eventId, uint32_t action, World::Action::ActionCallback finishCallback, + World::Action::ActionCallback interruptCallback, uint64_t additional ); /*! start an event item action */ - void eventItemActionStart( uint32_t eventId, uint32_t action, Action::ActionCallback finishCallback, - Action::ActionCallback interruptCallback, uint64_t additional ); + void eventItemActionStart( uint32_t eventId, uint32_t action, World::Action::ActionCallback finishCallback, + World::Action::ActionCallback interruptCallback, uint64_t additional ); /*! start/register a normal event */ void eventStart( uint64_t actorId, uint32_t eventId, Event::EventHandler::EventType eventParam, uint8_t eventParam1, @@ -1107,8 +1107,8 @@ namespace Sapphire::Entity Common::PlayerTeleportQuery m_teleportQuery; - Util::SpawnIndexAllocator< uint8_t > m_objSpawnIndexAllocator; - Util::SpawnIndexAllocator< uint8_t > m_actorSpawnIndexAllocator; + Common::Util::SpawnIndexAllocator< uint8_t > m_objSpawnIndexAllocator; + Common::Util::SpawnIndexAllocator< uint8_t > m_actorSpawnIndexAllocator; std::array< Common::HuntingLogEntry, 12 > m_huntingLogEntries; diff --git a/src/world/Actor/PlayerEvent.cpp b/src/world/Actor/PlayerEvent.cpp index f264d180..91c9060f 100644 --- a/src/world/Actor/PlayerEvent.cpp +++ b/src/world/Actor/PlayerEvent.cpp @@ -278,11 +278,11 @@ void Sapphire::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlaye void Sapphire::Entity::Player::eventActionStart( uint32_t eventId, uint32_t action, - Action::ActionCallback finishCallback, - Action::ActionCallback interruptCallback, + World::Action::ActionCallback finishCallback, + World::Action::ActionCallback interruptCallback, uint64_t additional ) { - auto pEventAction = Action::make_EventAction( getAsChara(), eventId, action, + auto pEventAction = World::Action::make_EventAction( getAsChara(), eventId, action, finishCallback, interruptCallback, additional, m_pFw ); auto pEvent = getEvent( eventId ); @@ -309,8 +309,8 @@ void Sapphire::Entity::Player::eventActionStart( uint32_t eventId, void Sapphire::Entity::Player::eventItemActionStart( uint32_t eventId, uint32_t action, - Action::ActionCallback finishCallback, - Action::ActionCallback interruptCallback, + World::Action::ActionCallback finishCallback, + World::Action::ActionCallback interruptCallback, uint64_t additional ) { // Action::ActionPtr pEventItemAction = Action::make_EventItemAction( getAsChara(), eventId, action, diff --git a/src/world/ForwardsZone.h b/src/world/ForwardsZone.h index a432cac1..08de6d59 100644 --- a/src/world/ForwardsZone.h +++ b/src/world/ForwardsZone.h @@ -82,7 +82,7 @@ TYPE_FORWARD( Director ); TYPE_FORWARD( EventHandler ); } -namespace Action +namespace World::Action { TYPE_FORWARD( Action ); TYPE_FORWARD( EventAction ); diff --git a/src/world/Manager/DebugCommandMgr.cpp b/src/world/Manager/DebugCommandMgr.cpp index f414c1bd..933b7d94 100644 --- a/src/world/Manager/DebugCommandMgr.cpp +++ b/src/world/Manager/DebugCommandMgr.cpp @@ -683,7 +683,7 @@ void Sapphire::World::Manager::DebugCommandMgr::nudge( char* data, Entity::Playe setActorPosPacket->data().x = player.getPos().x; setActorPosPacket->data().y = player.getPos().y; setActorPosPacket->data().z = player.getPos().z; - setActorPosPacket->data().r16 = Util::floatToUInt16Rot( player.getRot() ); + setActorPosPacket->data().r16 = Common::Util::floatToUInt16Rot( player.getRot() ); player.queuePacket( setActorPosPacket ); } } diff --git a/src/world/Manager/MarketMgr.cpp b/src/world/Manager/MarketMgr.cpp index 9b62e534..1ad81cf9 100644 --- a/src/world/Manager/MarketMgr.cpp +++ b/src/world/Manager/MarketMgr.cpp @@ -83,7 +83,7 @@ void Sapphire::World::Manager::MarketMgr::requestItemListingInfo( Sapphire::Enti listing.itemCatalogId = catalogId; listing.quantity = i + 1; - listing.purchaseTime = Sapphire::Util::getTimeSeconds(); + listing.purchaseTime = Common::Util::getTimeSeconds(); listing.salePrice = 69420420; listing.isHq = 1; listing.onMannequin = 1; diff --git a/src/world/Network/GameConnection.cpp b/src/world/Network/GameConnection.cpp index 799835bb..7109b2ba 100644 --- a/src/world/Network/GameConnection.cpp +++ b/src/world/Network/GameConnection.cpp @@ -424,7 +424,7 @@ void Sapphire::Network::GameConnection::handlePackets( const Sapphire::Network:: auto pe = std::make_shared< FFXIVRawPacket >( 0x07, 0x18, 0, 0 ); *( unsigned int* ) ( &pe->data()[ 0 ] ) = 0xE0037603; - *( unsigned int* ) ( &pe->data()[ 4 ] ) = Sapphire::Util::getTimeSeconds(); + *( unsigned int* ) ( &pe->data()[ 4 ] ) = Common::Util::getTimeSeconds(); sendSinglePacket( pe ); // main connection, assinging it to the session diff --git a/src/world/Network/GameConnection.h b/src/world/Network/GameConnection.h index 61be56c5..56a8fc5d 100644 --- a/src/world/Network/GameConnection.h +++ b/src/world/Network/GameConnection.h @@ -51,8 +51,8 @@ namespace Sapphire::Network World::SessionPtr m_pSession; - LockedQueue< Sapphire::Network::Packets::FFXIVARR_PACKET_RAW > m_inQueue; - LockedQueue< Packets::FFXIVPacketBasePtr > m_outQueue; + Common::Util::LockedQueue< Sapphire::Network::Packets::FFXIVARR_PACKET_RAW > m_inQueue; + Common::Util::LockedQueue< Packets::FFXIVPacketBasePtr > m_outQueue; std::vector< uint8_t > m_packets; public: diff --git a/src/world/Network/Handlers/PacketHandlers.cpp b/src/world/Network/Handlers/PacketHandlers.cpp index afb97b0b..ba97168b 100644 --- a/src/world/Network/Handlers/PacketHandlers.cpp +++ b/src/world/Network/Handlers/PacketHandlers.cpp @@ -393,7 +393,7 @@ void Sapphire::Network::GameConnection::pingHandler( FrameworkPtr pFw, queueOutPacket( std::make_shared< Server::PingPacket >( player, packet.data().timestamp ) ); - player.setLastPing( Sapphire::Util::getTimeSeconds() ); + player.setLastPing( Common::Util::getTimeSeconds() ); } diff --git a/src/world/Network/PacketWrappers/MoveActorPacket.h b/src/world/Network/PacketWrappers/MoveActorPacket.h index 78718b41..9cf724fc 100644 --- a/src/world/Network/PacketWrappers/MoveActorPacket.h +++ b/src/world/Network/PacketWrappers/MoveActorPacket.h @@ -28,15 +28,15 @@ namespace Sapphire::Network::Packets::Server void initialize( Entity::Chara& actor, uint8_t headRotation, uint8_t animationType, uint8_t state, uint16_t animationSpeed, uint8_t unknownRotation ) { - m_data.rotation = Util::floatToUInt8Rot( actor.getRot() ); + m_data.rotation = Common::Util::floatToUInt8Rot( actor.getRot() ); m_data.headRotation = headRotation; m_data.animationType = animationType; m_data.animationState = state; m_data.animationSpeed = animationSpeed; m_data.unknownRotation = unknownRotation; - m_data.posX = Util::floatToUInt16( actor.getPos().x ); - m_data.posY = Util::floatToUInt16( actor.getPos().y ); - m_data.posZ = Util::floatToUInt16( actor.getPos().z ); + m_data.posX = Common::Util::floatToUInt16( actor.getPos().x ); + m_data.posY = Common::Util::floatToUInt16( actor.getPos().y ); + m_data.posZ = Common::Util::floatToUInt16( actor.getPos().z ); }; }; diff --git a/src/world/Network/PacketWrappers/NpcSpawnPacket.h b/src/world/Network/PacketWrappers/NpcSpawnPacket.h index 8f952c77..3cc99f89 100644 --- a/src/world/Network/PacketWrappers/NpcSpawnPacket.h +++ b/src/world/Network/PacketWrappers/NpcSpawnPacket.h @@ -49,7 +49,7 @@ namespace Sapphire::Network::Packets::Server m_data.pos.x = bnpc.getPos().x; m_data.pos.y = bnpc.getPos().y; m_data.pos.z = bnpc.getPos().z; - m_data.rotation = Util::floatToUInt16Rot( bnpc.getRot() ); + m_data.rotation = Common::Util::floatToUInt16Rot( bnpc.getRot() ); m_data.levelId = bnpc.getLevelId(); m_data.enemyType = bnpc.getEnemyType(); @@ -87,7 +87,7 @@ namespace Sapphire::Network::Packets::Server m_data.targetId = static_cast< uint64_t >( bnpc.getTargetId() ); - uint64_t currentTimeMs = Sapphire::Util::getTimeMs(); + uint64_t currentTimeMs = Common::Util::getTimeMs(); for( auto const& effect : bnpc.getStatusEffectMap() ) { diff --git a/src/world/Network/PacketWrappers/PlayerSpawnPacket.h b/src/world/Network/PacketWrappers/PlayerSpawnPacket.h index 14e16754..4f384356 100644 --- a/src/world/Network/PacketWrappers/PlayerSpawnPacket.h +++ b/src/world/Network/PacketWrappers/PlayerSpawnPacket.h @@ -69,7 +69,7 @@ namespace Sapphire::Network::Packets::Server m_data.pos.x = player.getPos().x; m_data.pos.y = player.getPos().y; m_data.pos.z = player.getPos().z; - m_data.rotation = Util::floatToUInt16Rot( player.getRot() ); + m_data.rotation = Common::Util::floatToUInt16Rot( player.getRot() ); m_data.title = player.getTitle(); @@ -133,7 +133,7 @@ namespace Sapphire::Network::Packets::Server //m_data.unknown_60 = 3; //m_data.unknown_61 = 7; - uint64_t currentTimeMs = Sapphire::Util::getTimeMs(); + uint64_t currentTimeMs = Common::Util::getTimeMs(); for( auto const& effect : player.getStatusEffectMap() ) { diff --git a/src/world/Script/NativeScriptApi.cpp b/src/world/Script/NativeScriptApi.cpp index 75d63621..d6dce0f6 100644 --- a/src/world/Script/NativeScriptApi.cpp +++ b/src/world/Script/NativeScriptApi.cpp @@ -83,20 +83,20 @@ namespace Sapphire::ScriptAPI /////////////////////////////////////////////////////////////////// - ActionScript::ActionScript( uint32_t abilityId ) : - ScriptObject( abilityId, typeid( ActionScript ).hash_code() ) + ActionScript::ActionScript( uint32_t actionId ) : + ScriptObject( actionId, typeid( ActionScript ).hash_code() ) { } - void ActionScript::onStart( Sapphire::Action::Action& action ) + void ActionScript::onStart( Sapphire::World::Action::Action& action ) { } - void ActionScript::onExecute( Sapphire::Action::Action& action ) + void ActionScript::onExecute( Sapphire::World::Action::Action& action ) { } - void ActionScript::onInterrupt( Sapphire::Action::Action& action ) + void ActionScript::onInterrupt( Sapphire::World::Action::Action& action ) { } diff --git a/src/world/Script/NativeScriptApi.h b/src/world/Script/NativeScriptApi.h index 4d31b5df..d7b33d00 100644 --- a/src/world/Script/NativeScriptApi.h +++ b/src/world/Script/NativeScriptApi.h @@ -138,13 +138,13 @@ namespace Sapphire::ScriptAPI class ActionScript : public ScriptObject { public: - explicit ActionScript( uint32_t abilityId ); + explicit ActionScript( uint32_t actionId ); - virtual void onStart( Sapphire::Action::Action& action ); + virtual void onStart( Sapphire::World::Action::Action& action ); - virtual void onExecute( Sapphire::Action::Action& action ); + virtual void onExecute( Sapphire::World::Action::Action& action ); - virtual void onInterrupt( Sapphire::Action::Action& action ); + virtual void onInterrupt( Sapphire::World::Action::Action& action ); }; /*! diff --git a/src/world/Script/ScriptLoader.cpp b/src/world/Script/ScriptLoader.cpp index f670c05c..ab72f61f 100644 --- a/src/world/Script/ScriptLoader.cpp +++ b/src/world/Script/ScriptLoader.cpp @@ -154,7 +154,7 @@ bool Sapphire::Scripting::ScriptLoader::isModuleLoaded( std::string name ) for( auto it = m_scriptMap.begin(); it != m_scriptMap.end(); ++it ) { - if( Util::toLowerCopy( it->second->library_name ) == Util::toLowerCopy( name ) ) + if( Common::Util::toLowerCopy( it->second->library_name ) == Common::Util::toLowerCopy( name ) ) return true; } diff --git a/src/world/Script/ScriptMgr.cpp b/src/world/Script/ScriptMgr.cpp index bb2a86e2..4b7bd27c 100644 --- a/src/world/Script/ScriptMgr.cpp +++ b/src/world/Script/ScriptMgr.cpp @@ -329,7 +329,7 @@ bool Sapphire::Scripting::ScriptMgr::onEObjHit( Sapphire::Entity::Player& player return didCallScript; } -bool Sapphire::Scripting::ScriptMgr::onExecute( Action::Action& action ) +bool Sapphire::Scripting::ScriptMgr::onExecute( World::Action::Action& action ) { auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::ActionScript >( action.getId() ); @@ -341,7 +341,7 @@ bool Sapphire::Scripting::ScriptMgr::onExecute( Action::Action& action ) return false; } -bool Sapphire::Scripting::ScriptMgr::onInterrupt( Action::Action& action ) +bool Sapphire::Scripting::ScriptMgr::onInterrupt( World::Action::Action& action ) { auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::ActionScript >( action.getId() ); @@ -353,7 +353,7 @@ bool Sapphire::Scripting::ScriptMgr::onInterrupt( Action::Action& action ) return false; } -bool Sapphire::Scripting::ScriptMgr::onStart( Action::Action& action ) +bool Sapphire::Scripting::ScriptMgr::onStart( World::Action::Action& action ) { auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::ActionScript >( action.getId() ); diff --git a/src/world/Script/ScriptMgr.h b/src/world/Script/ScriptMgr.h index 546ec425..94bc8067 100644 --- a/src/world/Script/ScriptMgr.h +++ b/src/world/Script/ScriptMgr.h @@ -72,11 +72,11 @@ namespace Sapphire::Scripting bool onEObjHit( Entity::Player& player, uint64_t actorId, uint32_t actionId ); - bool onStart( Action::Action& action ); + bool onStart( World::Action::Action& action ); - bool onInterrupt( Action::Action& action ); + bool onInterrupt( World::Action::Action& action ); - bool onExecute( Action::Action& action ); + bool onExecute( World::Action::Action& action ); bool onStatusReceive( Entity::CharaPtr pActor, uint32_t effectId ); diff --git a/src/world/ServerMgr.cpp b/src/world/ServerMgr.cpp index 71cef6a0..1929c765 100644 --- a/src/world/ServerMgr.cpp +++ b/src/world/ServerMgr.cpp @@ -270,8 +270,8 @@ void Sapphire::World::ServerMgr::mainLoop() { std::this_thread::sleep_for( std::chrono::milliseconds( 50 ) ); - auto currTime = Util::getTimeSeconds(); - auto tickCount = Util::getTimeMs(); + auto currTime = Common::Util::getTimeSeconds(); + auto tickCount = Common::Util::getTimeMs(); pTeriMgr->updateTerritoryInstances( tickCount ); diff --git a/src/world/Session.cpp b/src/world/Session.cpp index 6e612421..b1e2c615 100644 --- a/src/world/Session.cpp +++ b/src/world/Session.cpp @@ -14,8 +14,8 @@ namespace fs = std::experimental::filesystem; Sapphire::World::Session::Session( uint32_t sessionId, FrameworkPtr pFw ) : m_sessionId( sessionId ), - m_lastDataTime( Util::getTimeSeconds() ), - m_lastSqlTime( Util::getTimeSeconds() ), + m_lastDataTime( Common::Util::getTimeSeconds() ), + m_lastSqlTime( Common::Util::getTimeSeconds() ), m_isValid( false ), m_pFw( std::move( pFw ) ), m_isReplaying( false ) @@ -102,12 +102,12 @@ bool Sapphire::World::Session::isValid() const void Sapphire::World::Session::updateLastDataTime() { - m_lastDataTime = Util::getTimeSeconds(); + m_lastDataTime = Common::Util::getTimeSeconds(); } void Sapphire::World::Session::updateLastSqlTime() { - m_lastSqlTime = Util::getTimeSeconds(); + m_lastSqlTime = Common::Util::getTimeSeconds(); } void Sapphire::World::Session::startReplay( const std::string& path ) @@ -146,7 +146,7 @@ void Sapphire::World::Session::startReplay( const std::string& path ) for( auto set : loadedSets ) { m_replayCache.push_back( std::tuple< uint64_t, std::string >( - Util::getTimeMs() + ( std::get< 0 >( set ) - startTime ), std::get< 1 >( set ) ) ); + Common::Util::getTimeMs() + ( std::get< 0 >( set ) - startTime ), std::get< 1 >( set ) ) ); Logger::info( "Registering {0} for {1}", std::get< 1 >( set ), std::get< 0 >( set ) - startTime ); } @@ -166,7 +166,7 @@ void Sapphire::World::Session::processReplay() int at = 0; for( const auto& set : m_replayCache ) { - if( std::get< 0 >( set ) <= Util::getTimeMs() ) + if( std::get< 0 >( set ) <= Common::Util::getTimeMs() ) { m_pZoneConnection->injectPacket( std::get< 1 >( set ), *getPlayer().get() ); m_replayCache.erase( m_replayCache.begin() + at ); @@ -201,9 +201,9 @@ void Sapphire::World::Session::update() m_pZoneConnection->processInQueue(); // SESSION LOGIC - m_pPlayer->update( Util::getTimeMs() ); + m_pPlayer->update( Common::Util::getTimeMs() ); - if( Util::getTimeSeconds() - static_cast< uint32_t >( getLastSqlTime() ) > 10 ) + if( Common::Util::getTimeSeconds() - static_cast< uint32_t >( getLastSqlTime() ) > 10 ) { updateLastSqlTime(); m_pPlayer->updateSql(); diff --git a/src/world/Territory/Zone.cpp b/src/world/Territory/Zone.cpp index 339f6399..e0a159c4 100644 --- a/src/world/Territory/Zone.cpp +++ b/src/world/Territory/Zone.cpp @@ -419,7 +419,7 @@ void Sapphire::Zone::updateBNpcs( uint64_t tickCount ) return; m_lastMobUpdate = tickCount; - uint64_t currTime = Sapphire::Util::getTimeSeconds(); + uint64_t currTime = Common::Util::getTimeSeconds(); for( const auto& entry : m_bNpcMap ) { diff --git a/src/world/Util/ActorFilter.cpp b/src/world/Util/ActorFilter.cpp index 4714e1d7..f15b074e 100644 --- a/src/world/Util/ActorFilter.cpp +++ b/src/world/Util/ActorFilter.cpp @@ -13,7 +13,7 @@ Sapphire::World::Util::ActorFilterInRange::ActorFilterInRange( Common::FFXIVARR_ bool Sapphire::World::Util::ActorFilterInRange::conditionApplies( const Entity::Actor& actor ) { - return Sapphire::Util::distance( m_startPos, actor.getPos() ) <= m_range; + return Sapphire::Common::Util::distance( m_startPos, actor.getPos() ) <= m_range; } /////////////////////////////////////////////////////////////////////////////////////////////////////// From 86517c53eac5b3c43618437d0138351a428f8fb1 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 2 Jun 2019 02:30:54 +1000 Subject: [PATCH 03/10] somewhat working action lut stuff --- .../archer/ActionHeavyShot97.cpp | 23 --------- .../playeractions/conjurer/ActionCure120.cpp | 22 -------- .../darkknight/ActionAbyssalDrain3641.cpp | 24 --------- .../darkknight/ActionHardSlash3617.cpp | 23 --------- .../darkknight/ActionPowerSlash3627.cpp | 22 -------- .../darkknight/ActionSpinningSlash3619.cpp | 22 -------- .../darkknight/ActionSyphonStrike3623.cpp | 22 -------- .../darkknight/ActionUnleash3621.cpp | 24 --------- .../whitemage/ActionAsylum3569.cpp | 22 -------- src/world/Action/Action.cpp | 50 +++++++++++-------- src/world/Action/Action.h | 4 +- src/world/Action/ActionLut.cpp | 10 ++++ src/world/Action/ActionLut.h | 1 + src/world/Manager/ActionMgr.cpp | 2 +- 14 files changed, 44 insertions(+), 227 deletions(-) delete mode 100644 src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp delete mode 100644 src/scripts/action/playeractions/conjurer/ActionCure120.cpp delete mode 100644 src/scripts/action/playeractions/darkknight/ActionAbyssalDrain3641.cpp delete mode 100644 src/scripts/action/playeractions/darkknight/ActionHardSlash3617.cpp delete mode 100644 src/scripts/action/playeractions/darkknight/ActionPowerSlash3627.cpp delete mode 100644 src/scripts/action/playeractions/darkknight/ActionSpinningSlash3619.cpp delete mode 100644 src/scripts/action/playeractions/darkknight/ActionSyphonStrike3623.cpp delete mode 100644 src/scripts/action/playeractions/darkknight/ActionUnleash3621.cpp delete mode 100644 src/scripts/action/playeractions/whitemage/ActionAsylum3569.cpp diff --git a/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp b/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp deleted file mode 100644 index 3c3ef16f..00000000 --- a/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include