diff --git a/CodeStyle.xml b/CodeStyle.xml new file mode 100644 index 00000000..bea3faf4 --- /dev/null +++ b/CodeStyle.xml @@ -0,0 +1,103 @@ + + \ No newline at end of file diff --git a/src/common/Common.h b/src/common/Common.h index 6551338c..4241bd78 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -14,694 +14,726 @@ namespace Core { namespace Common { - // 99 is the last spawn id that seems to spawn any actor - const uint8_t MAX_DISPLAYED_ACTORS = 99; - const uint8_t MAX_DISPLAYED_EOBJS = 40; - - const int32_t INVALID_GAME_OBJECT_ID = 0xE0000000; - - struct FFXIVARR_POSITION3 - { - float x; - float y; - float z; - }; - - enum InventoryOperation : uint8_t - { - Discard = 0x07, - Move = 0x08, - Swap = 0x09, - Merge = 0x0C, - Split = 0x0A - }; - - enum ClientLanguage : uint8_t - { - Japanese = 1, - English = 2, - German = 4, - French = 8 - }; - - enum ObjKind : uint8_t - { - None = 0x00, - Player = 0x01, - BattleNpc = 0x02, - EventNpc = 0x03, - Treasure = 0x04, - Aetheryte = 0x05, - GatheringPoint = 0x06, - EventObj = 0x07, - MountType = 0x08, - Companion = 0x09, // this probably actually means minion - Retainer = 0x0A, - Area = 0x0B, - Housing = 0x0C, - Cutscene = 0x0D, - CardStand = 0x0E, - }; - - enum Stance : uint8_t - { - Passive = 0, - Active = 1, - }; - - enum class DisplayFlags : uint16_t - { - ActiveStance = 0x001, - Invisible = 0x020, - HideHead = 0x040, - HideWeapon = 0x080, - Faded = 0x100, - Visor = 0x800, - }; - - enum struct ActorStatus : uint8_t - { - Idle = 0x01, - Dead = 0x02, - Sitting = 0x03, - Mounted = 0x04, - Crafting = 0x05, - Gathering = 0x06, - Melding = 0x07, - SMachine = 0x08, - Carry = 0x09, - EmoteMode = 0x0B - }; - - enum GearSetSlot : uint8_t - { - MainHand = 0, - OffHand = 1, - Head = 2, - Body = 3, - Hands = 4, - Waist = 5, - Legs = 6, - Feet = 7, - Neck = 8, - Ear = 9, - Wrist = 10, - Ring1 = 11, - Ring2 = 12, - SoulCrystal = 13, - }; - - enum EquipSlotCategory : uint8_t - { - Unequippable = 0, - - // main slots - - CharaMainHand = 1, - CharaOffHand = 2, - CharaHead = 3, - CharaBody = 4, - CharaHands = 5, - CharaWaist = 6, - CharaLegs = 7, - CharaFeet = 8, - CharaEars = 9, - CharaNeck = 10, - CharaWrist = 11, - CharaRing = 12, - CharaSoulCrystal = 17, - - // specials - - /*! Cannot equip gear to offhand slot */ - MainTwoHandedWeapon = 13, - /*! Can be equipped in either main or offhand slot */ - MainOrOffHand = 14, // unused - /*! Cannot equip gear to head */ - BodyDisallowHead = 15, - /*! Cannot equip gear to hands, legs and feet slots */ - BodyDisallowHandsLegsFeet = 16, - /*! Cannot equip gear to feet slot */ - LegsDisallowFeet = 18, - /*! Cannot equp gear to head, hands, legs, feet slots */ - BodyDisallowAll = 19, - /*! Cannot equip gear to hands slot */ - BodyDisallowHands = 20, - /*! Cannot equip gear to legs & feet slots */ - BodyDisallowLegsFeet = 21, - }; - - enum InventoryType : uint16_t - { - Bag0 = 0, - Bag1 = 1, - Bag2 = 2, - Bag3 = 3, - - GearSet0 = 1000, - GearSet1 = 1001, - - Currency = 2000, - Crystal = 2001, - //UNKNOWN_0 = 2003, - KeyItem = 2004, - HandIn = 2005, - DamagedGear = 2007, - //UNKNOWN_1 = 2008, - - ArmoryOff = 3200, - ArmoryHead = 3201, - ArmoryBody = 3202, - ArmoryHand = 3203, - ArmoryWaist = 3204, - ArmoryLegs = 3205, - ArmoryFeet = 3206, - ArmoryNeck = 3207, - ArmoryEar = 3208, - ArmoryWrist = 3209, - ArmoryRing = 3300, - - ArmorySoulCrystal = 3400, - ArmoryMain = 3500, - - RetainerBag0 = 10000, - RetainerBag1 = 10001, - RetainerBag2 = 10002, - RetainerBag3 = 10003, - RetainerBag4 = 10004, - RetainerBag5 = 10005, - RetainerBag6 = 10006, - RetainerEquippedGear = 11000, - RetainerGil = 12000, - RetainerCrystal = 12001, - RetainerMarket = 12002, - - FreeCompanyBag0 = 20000, - FreeCompanyBag1 = 20001, - FreeCompanyBag2 = 20002, - FreeCompanyGil = 22000, - FreeCompanyCrystal = 22001 - }; - - enum ContainerType : uint16_t - { - Unknown = 0, - Bag = 1, - GearSet = 2, - CurrencyCrystal = 3, - Armory = 4 - }; - - - enum CurrencyType : uint8_t - { - Gil = 0x01, - StormSeal = 0x02, - SerpentSeal = 0x03, - FlameSeal = 0x04, - TomestonePhilo = 0x05, - TomestoneMytho = 0x06, - WolfMark = 0x07, - TomestoneSold = 0x08, - AlliedSeal = 0x09, - TomestonePoet = 0x0A, - Mgp = 0x0B, - TomestoneLaw = 0x0C, - TomestoneEso = 0x0D, - TomestoneLore = 0x0E - }; - - enum CrystalType : uint8_t - { - FireShard = 0x01, - IceShard = 0x02, - WindShard = 0x03, - EarthShard = 0x04, - LightningShard = 0x05, - WaterShard = 0x06, - - FireCrystal = 0x07, - IceCrystal = 0x08, - WindCrystal = 0x09, - EarthCrystal = 0x0A, - LightningCrystal = 0x0B, - WaterCrystal = 0x0C, - - FireCluster = 0x0D, - IceCluster = 0x0E, - WindCluster = 0x0F, - EarthCluster = 0x10, - LightningCluster = 0x11, - WaterCluster = 0x12 - }; - - enum struct ZoneingType : uint8_t - { - None = 1, - Teleport = 2, - Return = 3, - ReturnDead = 4, - FadeIn = 5, - }; - - enum struct ResurrectType : uint8_t - { - None = 0, - RaiseSpell = 5, - Return = 8 - }; - - enum Gender : uint8_t - { - Male = 0, - Female = 1, - }; - - - - enum struct GCRank : uint8_t - { - None = 0, - PrivateThirdClass = 1, - PrivateSecondClass = 2, - PrivateFirstClass = 3, - Corporal = 4, - SergeantThirdClass = 5, - SergeantSecondClass = 6, - SergeantFirstClass = 7, - ChiefSergeant = 8, - SecondLieutenant = 9, - FirstLieutenant = 10, - Captain = 11, - SecondCommander = 12, - FirstCommander = 13, - HighCommander = 14, - RearMarshal = 15, - ViceMarshal = 16, - Marshal = 17, - GrandMarshal = 18, - Champion = 19, - }; - - /** - * Structural representation of the packet sent by the server - * Send the entire StatusEffect list - */ - struct StatusEffect - { - uint16_t effect_id; - uint16_t unknown1; - float duration; - uint32_t sourceActorId; - }; - - enum CharaLook : uint8_t - { - Race = 0x00, - Gender = 0x01, - Tribe = 0x04, - Height = 0x03, - ModelType = 0x02, // Au Ra: changes horns/tails, everything else: seems to drastically change appearance (flip between two sets, odd/even numbers). sometimes retains hairstyle and other features - FaceType = 0x05, - HairStyle = 0x06, - HasHighlights = 0x07, // negative to enable, positive to disable - SkinColor = 0x08, - EyeColor = 0x09, // color of character's right eye - HairColor = 0x0A, // main color - HairColor2 = 0x0B, // highlights color - FaceFeatures = 0x0C, // seems to be a toggle, (-odd and +even for large face covering), opposite for small - FaceFeaturesColor = 0x0D, - Eyebrows = 0x0E, - EyeColor2 = 0x0F, // color of character's left eye - EyeShape = 0x10, - NoseShape = 0x11, - JawShape = 0x12, - LipStyle = 0x13, // lip colour depth and shape (negative values around -120 darker/more noticeable, positive no colour) - LipColor = 0x14, - RaceFeatureSize = 0x15, - RaceFeatureType = 0x16, // negative or out of range tail shapes for race result in no tail (e.g. Au Ra has max of 4 tail shapes), incorrect value can crash client - BustSize = 0x17, // char creator allows up to max of 100, i set to 127 cause who wouldnt but no visible difference - Facepaint = 0x18, - FacepaintColor = 0x19, - - }; - - enum MoveType : uint8_t - { - Running = 0x00, - Walking = 0x02, - Strafing = 0x04, - Jumping = 0x10, - BackWalk = 0x06, - }; - - enum MoveState : uint8_t - { - No = 0x00, - Land = 0x02, - Fall = 0x04, - }; - - struct QuestActive - { - QuestActive() - { - c.questId = 0; - c.sequence = 0; - c.flags = 0; - c.UI8A = 0; - c.UI8B = 0; - c.UI8C = 0; - c.UI8D = 0; - c.UI8E = 0; - c.UI8F = 0; - c.padding = 0; - } - - - union - { - struct - { - uint16_t questId; - uint8_t sequence; - uint8_t flags; - uint8_t padding; - uint8_t BitFlag48; - uint8_t BitFlag40; - uint8_t BitFlag32; - uint8_t BitFlag24; - uint8_t BitFlag16; - uint8_t BitFlag8; - uint8_t padding1; - } a; - - struct - { - uint16_t questId; - uint8_t sequence; - uint8_t flags; - uint8_t padding; - uint8_t UI8AL : 4; - uint8_t UI8AH : 4; - uint8_t UI8BL : 4; - uint8_t UI8BH : 4; - uint8_t UI8CL : 4; - uint8_t UI8CH : 4; - uint8_t UI8DL : 4; - uint8_t UI8DH : 4; - uint8_t UI8EL : 4; - uint8_t UI8EH : 4; - uint8_t UI8FL : 4; - uint8_t UI8FH : 4; - uint8_t padding1; - } b; - - struct - { - uint16_t questId; - uint8_t sequence; - uint8_t flags; - uint8_t padding; - uint8_t UI8A; - uint8_t UI8B; - uint8_t UI8C; - uint8_t UI8D; - uint8_t UI8E; - uint8_t UI8F; - uint8_t padding1; - } c; - - //struct - //{ - // uint16_t questId; - // uint8_t sequence; - // uint8_t flags; - // uint8_t padding; - // uint16_t UI16A; - // uint16_t UI16B; - // uint16_t UI16C; - // uint8_t padding1; - //} d; - - //struct - //{ - // uint8_t padding; - // uint32_t UI32A; - // uint16_t padding2; - //} e; - }; - - - }; - - enum struct ActionAspect : uint8_t - { - None = 0, // Doesn't imply unaspected - Fire = 1, - Ice = 2, - Wind = 3, - Stone = 4, - Lightning = 5, - Water = 6, - Unaspected = 7 // Doesn't imply magical unaspected damage - could be unaspected physical - }; - - enum class ActionType : int8_t - { - WeaponOverride = -1, // Needs more investigation (takes the damage type of the equipped weapon)? - Unknown_0 = 0, - Slashing = 1, - Piercing = 2, - Blunt = 3, - Unknown_4 = 4, - Magical = 5, - Darkness = 6, - Unknown_7 = 7, - LimitBreak = 8, - }; - - enum ActionEffectType : uint8_t - { - Nothing = 0, - Miss = 1, - FullResist = 2, - Damage = 3, - Heal = 4, - BlockedDamage = 5, - ParriedDamage = 6, - Invulnerable = 7, - NoEffectText = 8, - Unknown_0 = 9, - MpLoss = 10, - MpGain = 11, - TpLoss = 12, - TpGain = 13, - GpGain = 14, - Knockback = 33, - Mount = 38 - }; - - enum class ActionHitSeverityType : uint8_t - { - NormalDamage = 0, - CritHeal = 0, - CritDamage = 1, - NormalHeal = 1, - DirectHitDamage = 2, - CritDirectHitDamage = 3 - }; - - enum ActionEffectDisplayType : uint8_t - { - HideActionName = 0, - ShowActionName = 1, - ShowItemName = 2, - }; - - enum class ActionCollisionType : uint8_t - { - None, - SingleTarget, - Circle, - Cone, - Box, - Unknown, - Unknown2, - PersistentArea, // for when you set aoe like asylum - Unknown3 - }; - - enum HandleActionType : uint8_t - { - Event, - Spell, - Teleport - }; - - enum HandleSkillType : uint8_t - { - StdDamage, - StdHeal, - StdDot, - }; - - enum InvincibilityType : uint8_t - { - InvincibilityNone, - InvincibilityRefill, - InvincibilityStayAlive, - }; - - enum PlayerStateFlag : uint8_t - { - HideUILockChar = 0, // as the name suggests, hides the ui and logs the char... - InCombat = 1, // in Combat, locks gearchange/return/teleport - Casting = 2, - InNpcEvent = 7, // when talking to an npc, locks ui giving "occupied" message - - InNpcEvent1 = 10, // Sent together with InNpcEvent, when waiting for input? just a guess... - - BetweenAreas = 24, - BoundByDuty = 28, - WatchingCutscene = 50, // this is actually just a dummy, this id is different - - - }; - - enum struct FateStatus : uint8_t - { - Active = 2, - Inactive = 4, - Preparing = 7, - Completed = 8, - }; - - enum struct ChatType : uint16_t - { - LogKindError, - ServerDebug, - ServerUrgent, - ServerNotice, - Unused4, - Unused5, - Unused6, - Unused7, - Unused8, - Unused9, - Say, - Shout, - Tell, - TellReceive, - Party, - Alliance, - LS1, - LS2, - LS3, - LS4, - LS5, - LS6, - LS7, - LS8, - FreeCompany, - Unused25, - Unused26, - NoviceNetwork, - CustomEmote, - StandardEmote, - Yell, - Unknown31, - PartyUnk2, - Unused33, - Unused34, - Unused35, - Unused36, - Unused37, - Unused38, - Unused39, - Unused40, - BattleDamage, - BattleFailed, - BattleActions, - BattleItems, - BattleHealing, - BattleBeneficial, - BattleDetrimental, - BattleUnk48, - BattleUnk49, - Unused50, - Unused51, - Unused52, - Unused53, - Unused54, - Unused55, - Echo, - SystemMessage, - SystemErrorMessage, - BattleSystem, - GatheringSystem, - NPCMessage, - LootMessage, - Unused63, - CharProgress, - Loot, - Crafting, - Gathering, - NPCAnnouncement, - FCAnnouncement, - FCLogin, - RetainerSale, - PartySearch, - PCSign, - DiceRoll, - NoviceNetworkNotice, - Unknown76, - Unused77, - Unused78, - Unused79, - GMTell, - GMSay, - GMShout, - GMYell, - GMParty, - GMFreeCompany, - GMLS1, - GMLS2, - GMLS3, - GMLS4, - GMLS5, - GMLS6, - GMLS7, - GMLS8, - GMNoviceNetwork, - Unused95, - Unused96, - Unused97, - Unused98, - Unused99, - Unused100 - }; - - enum EquipDisplayFlags : uint8_t - { - HideNothing = 0x0, - HideHead = 0x1, - HideWeapon = 0x2, - HideLegacyMark = 0x4, - - StoreNewItemsInArmouryChest = 0x10, - StoreCraftedItemsInInventory = 0x20, - - Visor = 0x40, - }; - - enum SkillType : uint8_t - { - Normal = 0x1, - MountSkill = 0xD, - }; - - typedef std::vector< PlayerStateFlag > PlayerStateFlagList; +// 99 is the last spawn id that seems to spawn any actor +const uint8_t MAX_DISPLAYED_ACTORS = 99; +const uint8_t MAX_DISPLAYED_EOBJS = 40; + +const int32_t INVALID_GAME_OBJECT_ID = 0xE0000000; + +struct FFXIVARR_POSITION3 +{ + float x; + float y; + float z; +}; + +enum InventoryOperation : + uint8_t +{ + Discard = 0x07, + Move = 0x08, + Swap = 0x09, + Merge = 0x0C, + Split = 0x0A +}; + +enum ClientLanguage : + uint8_t +{ + Japanese = 1, + English = 2, + German = 4, + French = 8 +}; + +enum ObjKind : + uint8_t +{ + None = 0x00, + Player = 0x01, + BattleNpc = 0x02, + EventNpc = 0x03, + Treasure = 0x04, + Aetheryte = 0x05, + GatheringPoint = 0x06, + EventObj = 0x07, + MountType = 0x08, + Companion = 0x09, // this probably actually means minion + Retainer = 0x0A, + Area = 0x0B, + Housing = 0x0C, + Cutscene = 0x0D, + CardStand = 0x0E, +}; + +enum Stance : + uint8_t +{ + Passive = 0, + Active = 1, +}; + +enum class DisplayFlags : + uint16_t +{ + ActiveStance = 0x001, + Invisible = 0x020, + HideHead = 0x040, + HideWeapon = 0x080, + Faded = 0x100, + Visor = 0x800, +}; + +enum struct ActorStatus : + uint8_t +{ + Idle = 0x01, + Dead = 0x02, + Sitting = 0x03, + Mounted = 0x04, + Crafting = 0x05, + Gathering = 0x06, + Melding = 0x07, + SMachine = 0x08, + Carry = 0x09, + EmoteMode = 0x0B +}; + +enum GearSetSlot : + uint8_t +{ + MainHand = 0, + OffHand = 1, + Head = 2, + Body = 3, + Hands = 4, + Waist = 5, + Legs = 6, + Feet = 7, + Neck = 8, + Ear = 9, + Wrist = 10, + Ring1 = 11, + Ring2 = 12, + SoulCrystal = 13, +}; + +enum EquipSlotCategory : + uint8_t +{ + Unequippable = 0, + + // main slots + + CharaMainHand = 1, + CharaOffHand = 2, + CharaHead = 3, + CharaBody = 4, + CharaHands = 5, + CharaWaist = 6, + CharaLegs = 7, + CharaFeet = 8, + CharaEars = 9, + CharaNeck = 10, + CharaWrist = 11, + CharaRing = 12, + CharaSoulCrystal = 17, + + // specials + + /*! Cannot equip gear to offhand slot */ + MainTwoHandedWeapon = 13, + /*! Can be equipped in either main or offhand slot */ + MainOrOffHand = 14, // unused + /*! Cannot equip gear to head */ + BodyDisallowHead = 15, + /*! Cannot equip gear to hands, legs and feet slots */ + BodyDisallowHandsLegsFeet = 16, + /*! Cannot equip gear to feet slot */ + LegsDisallowFeet = 18, + /*! Cannot equp gear to head, hands, legs, feet slots */ + BodyDisallowAll = 19, + /*! Cannot equip gear to hands slot */ + BodyDisallowHands = 20, + /*! Cannot equip gear to legs & feet slots */ + BodyDisallowLegsFeet = 21, +}; + +enum InventoryType : + uint16_t +{ + Bag0 = 0, + Bag1 = 1, + Bag2 = 2, + Bag3 = 3, + + GearSet0 = 1000, + GearSet1 = 1001, + + Currency = 2000, + Crystal = 2001, + //UNKNOWN_0 = 2003, + KeyItem = 2004, + HandIn = 2005, + DamagedGear = 2007, + //UNKNOWN_1 = 2008, + + ArmoryOff = 3200, + ArmoryHead = 3201, + ArmoryBody = 3202, + ArmoryHand = 3203, + ArmoryWaist = 3204, + ArmoryLegs = 3205, + ArmoryFeet = 3206, + ArmoryNeck = 3207, + ArmoryEar = 3208, + ArmoryWrist = 3209, + ArmoryRing = 3300, + + ArmorySoulCrystal = 3400, + ArmoryMain = 3500, + + RetainerBag0 = 10000, + RetainerBag1 = 10001, + RetainerBag2 = 10002, + RetainerBag3 = 10003, + RetainerBag4 = 10004, + RetainerBag5 = 10005, + RetainerBag6 = 10006, + RetainerEquippedGear = 11000, + RetainerGil = 12000, + RetainerCrystal = 12001, + RetainerMarket = 12002, + + FreeCompanyBag0 = 20000, + FreeCompanyBag1 = 20001, + FreeCompanyBag2 = 20002, + FreeCompanyGil = 22000, + FreeCompanyCrystal = 22001 +}; + +enum ContainerType : + uint16_t +{ + Unknown = 0, + Bag = 1, + GearSet = 2, + CurrencyCrystal = 3, + Armory = 4 +}; + + +enum CurrencyType : + uint8_t +{ + Gil = 0x01, + StormSeal = 0x02, + SerpentSeal = 0x03, + FlameSeal = 0x04, + TomestonePhilo = 0x05, + TomestoneMytho = 0x06, + WolfMark = 0x07, + TomestoneSold = 0x08, + AlliedSeal = 0x09, + TomestonePoet = 0x0A, + Mgp = 0x0B, + TomestoneLaw = 0x0C, + TomestoneEso = 0x0D, + TomestoneLore = 0x0E +}; + +enum CrystalType : + uint8_t +{ + FireShard = 0x01, + IceShard = 0x02, + WindShard = 0x03, + EarthShard = 0x04, + LightningShard = 0x05, + WaterShard = 0x06, + + FireCrystal = 0x07, + IceCrystal = 0x08, + WindCrystal = 0x09, + EarthCrystal = 0x0A, + LightningCrystal = 0x0B, + WaterCrystal = 0x0C, + + FireCluster = 0x0D, + IceCluster = 0x0E, + WindCluster = 0x0F, + EarthCluster = 0x10, + LightningCluster = 0x11, + WaterCluster = 0x12 +}; + +enum struct ZoneingType : + uint8_t +{ + None = 1, + Teleport = 2, + Return = 3, + ReturnDead = 4, + FadeIn = 5, +}; + +enum struct ResurrectType : + uint8_t +{ + None = 0, + RaiseSpell = 5, + Return = 8 +}; + +enum Gender : + uint8_t +{ + Male = 0, + Female = 1, +}; + + +enum struct GCRank : + uint8_t +{ + None = 0, + PrivateThirdClass = 1, + PrivateSecondClass = 2, + PrivateFirstClass = 3, + Corporal = 4, + SergeantThirdClass = 5, + SergeantSecondClass = 6, + SergeantFirstClass = 7, + ChiefSergeant = 8, + SecondLieutenant = 9, + FirstLieutenant = 10, + Captain = 11, + SecondCommander = 12, + FirstCommander = 13, + HighCommander = 14, + RearMarshal = 15, + ViceMarshal = 16, + Marshal = 17, + GrandMarshal = 18, + Champion = 19, +}; + +/** +* Structural representation of the packet sent by the server +* Send the entire StatusEffect list +*/ +struct StatusEffect +{ + uint16_t effect_id; + uint16_t unknown1; + float duration; + uint32_t sourceActorId; +}; + +enum CharaLook : + uint8_t +{ + Race = 0x00, + Gender = 0x01, + Tribe = 0x04, + Height = 0x03, + ModelType = 0x02, // Au Ra: changes horns/tails, everything else: seems to drastically change appearance (flip between two sets, odd/even numbers). sometimes retains hairstyle and other features + FaceType = 0x05, + HairStyle = 0x06, + HasHighlights = 0x07, // negative to enable, positive to disable + SkinColor = 0x08, + EyeColor = 0x09, // color of character's right eye + HairColor = 0x0A, // main color + HairColor2 = 0x0B, // highlights color + FaceFeatures = 0x0C, // seems to be a toggle, (-odd and +even for large face covering), opposite for small + FaceFeaturesColor = 0x0D, + Eyebrows = 0x0E, + EyeColor2 = 0x0F, // color of character's left eye + EyeShape = 0x10, + NoseShape = 0x11, + JawShape = 0x12, + LipStyle = 0x13, // lip colour depth and shape (negative values around -120 darker/more noticeable, positive no colour) + LipColor = 0x14, + RaceFeatureSize = 0x15, + RaceFeatureType = 0x16, // negative or out of range tail shapes for race result in no tail (e.g. Au Ra has max of 4 tail shapes), incorrect value can crash client + BustSize = 0x17, // char creator allows up to max of 100, i set to 127 cause who wouldnt but no visible difference + Facepaint = 0x18, + FacepaintColor = 0x19, + +}; + +enum MoveType : + uint8_t +{ + Running = 0x00, + Walking = 0x02, + Strafing = 0x04, + Jumping = 0x10, + BackWalk = 0x06, +}; + +enum MoveState : + uint8_t +{ + No = 0x00, + Land = 0x02, + Fall = 0x04, +}; + +struct QuestActive +{ + QuestActive() + { + c.questId = 0; + c.sequence = 0; + c.flags = 0; + c.UI8A = 0; + c.UI8B = 0; + c.UI8C = 0; + c.UI8D = 0; + c.UI8E = 0; + c.UI8F = 0; + c.padding = 0; + } + + + union + { + struct + { + uint16_t questId; + uint8_t sequence; + uint8_t flags; + uint8_t padding; + uint8_t BitFlag48; + uint8_t BitFlag40; + uint8_t BitFlag32; + uint8_t BitFlag24; + uint8_t BitFlag16; + uint8_t BitFlag8; + uint8_t padding1; + } a; + + struct + { + uint16_t questId; + uint8_t sequence; + uint8_t flags; + uint8_t padding; + uint8_t UI8AL : 4; + uint8_t UI8AH : 4; + uint8_t UI8BL : 4; + uint8_t UI8BH : 4; + uint8_t UI8CL : 4; + uint8_t UI8CH : 4; + uint8_t UI8DL : 4; + uint8_t UI8DH : 4; + uint8_t UI8EL : 4; + uint8_t UI8EH : 4; + uint8_t UI8FL : 4; + uint8_t UI8FH : 4; + uint8_t padding1; + } b; + + struct + { + uint16_t questId; + uint8_t sequence; + uint8_t flags; + uint8_t padding; + uint8_t UI8A; + uint8_t UI8B; + uint8_t UI8C; + uint8_t UI8D; + uint8_t UI8E; + uint8_t UI8F; + uint8_t padding1; + } c; + + //struct + //{ + // uint16_t questId; + // uint8_t sequence; + // uint8_t flags; + // uint8_t padding; + // uint16_t UI16A; + // uint16_t UI16B; + // uint16_t UI16C; + // uint8_t padding1; + //} d; + + //struct + //{ + // uint8_t padding; + // uint32_t UI32A; + // uint16_t padding2; + //} e; + }; + + +}; + +enum struct ActionAspect : + uint8_t +{ + None = 0, // Doesn't imply unaspected + Fire = 1, + Ice = 2, + Wind = 3, + Stone = 4, + Lightning = 5, + Water = 6, + Unaspected = 7 // Doesn't imply magical unaspected damage - could be unaspected physical +}; + +enum class ActionType : + int8_t +{ + WeaponOverride = -1, // Needs more investigation (takes the damage type of the equipped weapon)? + Unknown_0 = 0, + Slashing = 1, + Piercing = 2, + Blunt = 3, + Unknown_4 = 4, + Magical = 5, + Darkness = 6, + Unknown_7 = 7, + LimitBreak = 8, +}; + +enum ActionEffectType : + uint8_t +{ + Nothing = 0, + Miss = 1, + FullResist = 2, + Damage = 3, + Heal = 4, + BlockedDamage = 5, + ParriedDamage = 6, + Invulnerable = 7, + NoEffectText = 8, + Unknown_0 = 9, + MpLoss = 10, + MpGain = 11, + TpLoss = 12, + TpGain = 13, + GpGain = 14, + Knockback = 33, + Mount = 38 +}; + +enum class ActionHitSeverityType : + uint8_t +{ + NormalDamage = 0, + CritHeal = 0, + CritDamage = 1, + NormalHeal = 1, + DirectHitDamage = 2, + CritDirectHitDamage = 3 +}; + +enum ActionEffectDisplayType : + uint8_t +{ + HideActionName = 0, + ShowActionName = 1, + ShowItemName = 2, +}; + +enum class ActionCollisionType : + uint8_t +{ + None, + SingleTarget, + Circle, + Cone, + Box, + Unknown, + Unknown2, + PersistentArea, // for when you set aoe like asylum + Unknown3 +}; + +enum HandleActionType : + uint8_t +{ + Event, + Spell, + Teleport +}; + +enum HandleSkillType : + uint8_t +{ + StdDamage, + StdHeal, + StdDot, +}; + +enum InvincibilityType : + uint8_t +{ + InvincibilityNone, + InvincibilityRefill, + InvincibilityStayAlive, +}; + +enum PlayerStateFlag : + uint8_t +{ + HideUILockChar = 0, // as the name suggests, hides the ui and logs the char... + InCombat = 1, // in Combat, locks gearchange/return/teleport + Casting = 2, + InNpcEvent = 7, // when talking to an npc, locks ui giving "occupied" message + + InNpcEvent1 = 10, // Sent together with InNpcEvent, when waiting for input? just a guess... + + BetweenAreas = 24, + BoundByDuty = 28, + WatchingCutscene = 50, // this is actually just a dummy, this id is different + + +}; + +enum struct FateStatus : + uint8_t +{ + Active = 2, + Inactive = 4, + Preparing = 7, + Completed = 8, +}; + +enum struct ChatType : + uint16_t +{ + LogKindError, + ServerDebug, + ServerUrgent, + ServerNotice, + Unused4, + Unused5, + Unused6, + Unused7, + Unused8, + Unused9, + Say, + Shout, + Tell, + TellReceive, + Party, + Alliance, + LS1, + LS2, + LS3, + LS4, + LS5, + LS6, + LS7, + LS8, + FreeCompany, + Unused25, + Unused26, + NoviceNetwork, + CustomEmote, + StandardEmote, + Yell, + Unknown31, + PartyUnk2, + Unused33, + Unused34, + Unused35, + Unused36, + Unused37, + Unused38, + Unused39, + Unused40, + BattleDamage, + BattleFailed, + BattleActions, + BattleItems, + BattleHealing, + BattleBeneficial, + BattleDetrimental, + BattleUnk48, + BattleUnk49, + Unused50, + Unused51, + Unused52, + Unused53, + Unused54, + Unused55, + Echo, + SystemMessage, + SystemErrorMessage, + BattleSystem, + GatheringSystem, + NPCMessage, + LootMessage, + Unused63, + CharProgress, + Loot, + Crafting, + Gathering, + NPCAnnouncement, + FCAnnouncement, + FCLogin, + RetainerSale, + PartySearch, + PCSign, + DiceRoll, + NoviceNetworkNotice, + Unknown76, + Unused77, + Unused78, + Unused79, + GMTell, + GMSay, + GMShout, + GMYell, + GMParty, + GMFreeCompany, + GMLS1, + GMLS2, + GMLS3, + GMLS4, + GMLS5, + GMLS6, + GMLS7, + GMLS8, + GMNoviceNetwork, + Unused95, + Unused96, + Unused97, + Unused98, + Unused99, + Unused100 +}; + +enum EquipDisplayFlags : + uint8_t +{ + HideNothing = 0x0, + HideHead = 0x1, + HideWeapon = 0x2, + HideLegacyMark = 0x4, + + StoreNewItemsInArmouryChest = 0x10, + StoreCraftedItemsInInventory = 0x20, + + Visor = 0x40, +}; + +enum SkillType : + uint8_t +{ + Normal = 0x1, + MountSkill = 0xD, +}; + +typedef std::vector< PlayerStateFlag > PlayerStateFlagList; } /* Common */ } /* Core */ diff --git a/src/common/CommonGen.cpp b/src/common/CommonGen.cpp index 7ea09791..668f8cee 100644 --- a/src/common/CommonGen.cpp +++ b/src/common/CommonGen.cpp @@ -5,37 +5,164 @@ namespace Core { namespace Common { - bool operator==( const ActionCategory& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const ActionCategory& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const BeastReputationRank& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const BeastReputationRank& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const BeastTribe& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const BeastTribe& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const ClassJob& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const ClassJob& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const ContentType& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const ContentType& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const EmoteCategory& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const EmoteCategory& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const ExVersion& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const ExVersion& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const GrandCompany& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const GrandCompany& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const GuardianDeity& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const GuardianDeity& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const ItemUICategory& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const ItemUICategory& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const ItemSearchCategory& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const ItemSearchCategory& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const OnlineStatus& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const OnlineStatus& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const Race& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const Race& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const Tribe& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const Tribe& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const Town& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const Town& t ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const Weather& t, const uint8_t& g ) { return static_cast< uint8_t >( t ) == g; } - bool operator==( const uint8_t& g, const Weather& t ) { return static_cast< uint8_t >( t ) == g; } +bool operator==( const ActionCategory& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const ActionCategory& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const BeastReputationRank& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const BeastReputationRank& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const BeastTribe& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const BeastTribe& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const ClassJob& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const ClassJob& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const ContentType& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const ContentType& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const EmoteCategory& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const EmoteCategory& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const ExVersion& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const ExVersion& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const GrandCompany& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const GrandCompany& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const GuardianDeity& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const GuardianDeity& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const ItemUICategory& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const ItemUICategory& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const ItemSearchCategory& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const ItemSearchCategory& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const OnlineStatus& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const OnlineStatus& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const Race& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const Race& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const Tribe& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const Tribe& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const Town& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const Town& t ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const Weather& t, const uint8_t& g ) +{ + return static_cast< uint8_t >( t ) == g; +} + +bool operator==( const uint8_t& g, const Weather& t ) +{ + return static_cast< uint8_t >( t ) == g; +} } } \ No newline at end of file diff --git a/src/common/CommonGen.h b/src/common/CommonGen.h index 5e9bf149..dc99925d 100644 --- a/src/common/CommonGen.h +++ b/src/common/CommonGen.h @@ -9,552 +9,568 @@ namespace Core { namespace Common { - /////////////////////////////////////////////////////////// - //ActionCategory.exd - enum class ActionCategory : uint8_t - { - Autoattack = 1, - Spell = 2, - Weaponskill = 3, - Ability = 4, - Item = 5, - DoLAbility = 6, - DoHAbility = 7, - Event = 8, - LimitBreak = 9, - System = 10, - Artillery = 11, - Mount = 12, - Glamour = 13, - ItemManipulation = 14, - AdrenalineRush = 15, - }; +/////////////////////////////////////////////////////////// +//ActionCategory.exd +enum class ActionCategory : + uint8_t +{ + Autoattack = 1, + Spell = 2, + Weaponskill = 3, + Ability = 4, + Item = 5, + DoLAbility = 6, + DoHAbility = 7, + Event = 8, + LimitBreak = 9, + System = 10, + Artillery = 11, + Mount = 12, + Glamour = 13, + ItemManipulation = 14, + AdrenalineRush = 15, +}; - /////////////////////////////////////////////////////////// - //BeastReputationRank.exd - enum class BeastReputationRank : uint8_t - { - None = 0, - Neutral = 1, - Recognized = 2, - Friendly = 3, - Trusted = 4, - Respected = 5, - Honored = 6, - Sworn = 7, - Allied = 8, - }; +/////////////////////////////////////////////////////////// +//BeastReputationRank.exd +enum class BeastReputationRank : + uint8_t +{ + None = 0, + Neutral = 1, + Recognized = 2, + Friendly = 3, + Trusted = 4, + Respected = 5, + Honored = 6, + Sworn = 7, + Allied = 8, +}; - /////////////////////////////////////////////////////////// - //BeastTribe.exd - enum class BeastTribe : uint8_t - { - }; +/////////////////////////////////////////////////////////// +//BeastTribe.exd +enum class BeastTribe : + uint8_t +{ +}; - /////////////////////////////////////////////////////////// - //ClassJob.exd - enum class ClassJob : uint8_t - { - Adventurer = 0, - Gladiator = 1, - Pugilist = 2, - Marauder = 3, - Lancer = 4, - Archer = 5, - Conjurer = 6, - Thaumaturge = 7, - Carpenter = 8, - Blacksmith = 9, - Armorer = 10, - Goldsmith = 11, - Leatherworker = 12, - Weaver = 13, - Alchemist = 14, - Culinarian = 15, - Miner = 16, - Botanist = 17, - Fisher = 18, - Paladin = 19, - Monk = 20, - Warrior = 21, - Dragoon = 22, - Bard = 23, - Whitemage = 24, - Blackmage = 25, - Arcanist = 26, - Summoner = 27, - Scholar = 28, - Rogue = 29, - Ninja = 30, - Machinist = 31, - Darkknight = 32, - Astrologian = 33, - Samurai = 34, - Redmage = 35, - }; +/////////////////////////////////////////////////////////// +//ClassJob.exd +enum class ClassJob : + uint8_t +{ + Adventurer = 0, + Gladiator = 1, + Pugilist = 2, + Marauder = 3, + Lancer = 4, + Archer = 5, + Conjurer = 6, + Thaumaturge = 7, + Carpenter = 8, + Blacksmith = 9, + Armorer = 10, + Goldsmith = 11, + Leatherworker = 12, + Weaver = 13, + Alchemist = 14, + Culinarian = 15, + Miner = 16, + Botanist = 17, + Fisher = 18, + Paladin = 19, + Monk = 20, + Warrior = 21, + Dragoon = 22, + Bard = 23, + Whitemage = 24, + Blackmage = 25, + Arcanist = 26, + Summoner = 27, + Scholar = 28, + Rogue = 29, + Ninja = 30, + Machinist = 31, + Darkknight = 32, + Astrologian = 33, + Samurai = 34, + Redmage = 35, +}; - /////////////////////////////////////////////////////////// - //ContentType.exd - enum class ContentType : uint8_t - { - DutyRoulette = 1, - Dungeons = 2, - Guildhests = 3, - Trials = 4, - Raids = 5, - PvP = 6, - QuestBattles = 7, - FATEs = 8, - TreasureHunt = 9, - Levequests = 10, - GrandCompany = 11, - Companions = 12, - BeastTribeQuests = 13, - OverallCompletion = 14, - PlayerCommendation = 15, - DisciplesoftheLand = 16, - DisciplesoftheHand = 17, - RetainerVentures = 18, - GoldSaucer = 19, - DeepDungeons = 21, - WondrousTails = 24, - CustomDeliveries = 25, - }; +/////////////////////////////////////////////////////////// +//ContentType.exd +enum class ContentType : + uint8_t +{ + DutyRoulette = 1, + Dungeons = 2, + Guildhests = 3, + Trials = 4, + Raids = 5, + PvP = 6, + QuestBattles = 7, + FATEs = 8, + TreasureHunt = 9, + Levequests = 10, + GrandCompany = 11, + Companions = 12, + BeastTribeQuests = 13, + OverallCompletion = 14, + PlayerCommendation = 15, + DisciplesoftheLand = 16, + DisciplesoftheHand = 17, + RetainerVentures = 18, + GoldSaucer = 19, + DeepDungeons = 21, + WondrousTails = 24, + CustomDeliveries = 25, +}; - /////////////////////////////////////////////////////////// - //EmoteCategory.exd - enum class EmoteCategory : uint8_t - { - General = 1, - Persistent = 2, - Expressions = 3, - }; +/////////////////////////////////////////////////////////// +//EmoteCategory.exd +enum class EmoteCategory : + uint8_t +{ + General = 1, + Persistent = 2, + Expressions = 3, +}; - /////////////////////////////////////////////////////////// - //ExVersion.exd - enum class ExVersion : uint8_t - { - ARealmReborn = 0, - Heavensward = 1, - Stormblood = 2, - }; +/////////////////////////////////////////////////////////// +//ExVersion.exd +enum class ExVersion : + uint8_t +{ + ARealmReborn = 0, + Heavensward = 1, + Stormblood = 2, +}; - /////////////////////////////////////////////////////////// - //GrandCompany.exd - enum class GrandCompany : uint8_t - { - None = 0, - Maelstrom = 1, - OrderoftheTwinAdder = 2, - ImmortalFlames = 3, - }; +/////////////////////////////////////////////////////////// +//GrandCompany.exd +enum class GrandCompany : + uint8_t +{ + None = 0, + Maelstrom = 1, + OrderoftheTwinAdder = 2, + ImmortalFlames = 3, +}; - /////////////////////////////////////////////////////////// - //GuardianDeity.exd - enum class GuardianDeity : uint8_t - { - HalonetheFury = 1, - MenphinatheLover = 2, - ThaliaktheScholar = 3, - NymeiatheSpinner = 4, - LlymlaentheNavigator = 5, - OschontheWanderer = 6, - ByregottheBuilder = 7, - RhalgrtheDestroyer = 8, - AzeymatheWarden = 9, - NaldthaltheTraders = 10, - NophicatheMatron = 11, - AlthyktheKeeper = 12, - }; +/////////////////////////////////////////////////////////// +//GuardianDeity.exd +enum class GuardianDeity : + uint8_t +{ + HalonetheFury = 1, + MenphinatheLover = 2, + ThaliaktheScholar = 3, + NymeiatheSpinner = 4, + LlymlaentheNavigator = 5, + OschontheWanderer = 6, + ByregottheBuilder = 7, + RhalgrtheDestroyer = 8, + AzeymatheWarden = 9, + NaldthaltheTraders = 10, + NophicatheMatron = 11, + AlthyktheKeeper = 12, +}; - /////////////////////////////////////////////////////////// - //ItemUICategory.exd - enum class ItemUICategory : uint8_t - { - PugilistsArm = 1, - GladiatorsArm = 2, - MaraudersArm = 3, - ArchersArm = 4, - LancersArm = 5, - OnehandedThaumaturgesArm = 6, - TwohandedThaumaturgesArm = 7, - OnehandedConjurersArm = 8, - TwohandedConjurersArm = 9, - ArcanistsGrimoire = 10, - Shield = 11, - CarpentersPrimaryTool = 12, - CarpentersSecondaryTool = 13, - BlacksmithsPrimaryTool = 14, - BlacksmithsSecondaryTool = 15, - ArmorersPrimaryTool = 16, - ArmorersSecondaryTool = 17, - GoldsmithsPrimaryTool = 18, - GoldsmithsSecondaryTool = 19, - LeatherworkersPrimaryTool = 20, - LeatherworkersSecondaryTool = 21, - WeaversPrimaryTool = 22, - WeaversSecondaryTool = 23, - AlchemistsPrimaryTool = 24, - AlchemistsSecondaryTool = 25, - CulinariansPrimaryTool = 26, - CulinariansSecondaryTool = 27, - MinersPrimaryTool = 28, - MinersSecondaryTool = 29, - BotanistsPrimaryTool = 30, - BotanistsSecondaryTool = 31, - FishersPrimaryTool = 32, - FishingTackle = 33, - Head = 34, - Body = 35, - Legs = 36, - Hands = 37, - Feet = 38, - Waist = 39, - Necklace = 40, - Earrings = 41, - Bracelets = 42, - Ring = 43, - Medicine = 44, - Ingredient = 45, - Meal = 46, - Seafood = 47, - Stone = 48, - Metal = 49, - Lumber = 50, - Cloth = 51, - Leather = 52, - Bone = 53, - Reagent = 54, - Dye = 55, - Part = 56, - Furnishing = 57, - Materia = 58, - Crystal = 59, - Catalyst = 60, - Miscellany = 61, - SoulCrystal = 62, - Other = 63, - ConstructionPermit = 64, - Roof = 65, - ExteriorWall = 66, - Window = 67, - Door = 68, - RoofDecoration = 69, - ExteriorWallDecoration = 70, - Placard = 71, - Fence = 72, - InteriorWall = 73, - Flooring = 74, - CeilingLight = 75, - OutdoorFurnishing = 76, - Table = 77, - Tabletop = 78, - Wallmounted = 79, - Rug = 80, - Minion = 81, - Gardening = 82, - Demimateria = 83, - RoguesArm = 84, - SeasonalMiscellany = 85, - TripleTriadCard = 86, - DarkKnightsArm = 87, - MachinistsArm = 88, - AstrologiansArm = 89, - AirshipHull = 90, - AirshipRigging = 91, - AirshipAftcastle = 92, - AirshipForecastle = 93, - OrchestrionRoll = 94, - Painting = 95, - SamuraisArm = 96, - RedMagesArm = 97, - ScholarsArm = 98, - FishersSecondaryTool = 99, - Currency = 100, - }; +/////////////////////////////////////////////////////////// +//ItemUICategory.exd +enum class ItemUICategory : + uint8_t +{ + PugilistsArm = 1, + GladiatorsArm = 2, + MaraudersArm = 3, + ArchersArm = 4, + LancersArm = 5, + OnehandedThaumaturgesArm = 6, + TwohandedThaumaturgesArm = 7, + OnehandedConjurersArm = 8, + TwohandedConjurersArm = 9, + ArcanistsGrimoire = 10, + Shield = 11, + CarpentersPrimaryTool = 12, + CarpentersSecondaryTool = 13, + BlacksmithsPrimaryTool = 14, + BlacksmithsSecondaryTool = 15, + ArmorersPrimaryTool = 16, + ArmorersSecondaryTool = 17, + GoldsmithsPrimaryTool = 18, + GoldsmithsSecondaryTool = 19, + LeatherworkersPrimaryTool = 20, + LeatherworkersSecondaryTool = 21, + WeaversPrimaryTool = 22, + WeaversSecondaryTool = 23, + AlchemistsPrimaryTool = 24, + AlchemistsSecondaryTool = 25, + CulinariansPrimaryTool = 26, + CulinariansSecondaryTool = 27, + MinersPrimaryTool = 28, + MinersSecondaryTool = 29, + BotanistsPrimaryTool = 30, + BotanistsSecondaryTool = 31, + FishersPrimaryTool = 32, + FishingTackle = 33, + Head = 34, + Body = 35, + Legs = 36, + Hands = 37, + Feet = 38, + Waist = 39, + Necklace = 40, + Earrings = 41, + Bracelets = 42, + Ring = 43, + Medicine = 44, + Ingredient = 45, + Meal = 46, + Seafood = 47, + Stone = 48, + Metal = 49, + Lumber = 50, + Cloth = 51, + Leather = 52, + Bone = 53, + Reagent = 54, + Dye = 55, + Part = 56, + Furnishing = 57, + Materia = 58, + Crystal = 59, + Catalyst = 60, + Miscellany = 61, + SoulCrystal = 62, + Other = 63, + ConstructionPermit = 64, + Roof = 65, + ExteriorWall = 66, + Window = 67, + Door = 68, + RoofDecoration = 69, + ExteriorWallDecoration = 70, + Placard = 71, + Fence = 72, + InteriorWall = 73, + Flooring = 74, + CeilingLight = 75, + OutdoorFurnishing = 76, + Table = 77, + Tabletop = 78, + Wallmounted = 79, + Rug = 80, + Minion = 81, + Gardening = 82, + Demimateria = 83, + RoguesArm = 84, + SeasonalMiscellany = 85, + TripleTriadCard = 86, + DarkKnightsArm = 87, + MachinistsArm = 88, + AstrologiansArm = 89, + AirshipHull = 90, + AirshipRigging = 91, + AirshipAftcastle = 92, + AirshipForecastle = 93, + OrchestrionRoll = 94, + Painting = 95, + SamuraisArm = 96, + RedMagesArm = 97, + ScholarsArm = 98, + FishersSecondaryTool = 99, + Currency = 100, +}; - /////////////////////////////////////////////////////////// - //ItemSearchCategory.exd - enum class ItemSearchCategory : uint8_t - { - PrimaryArms = 1, - PrimaryTools = 2, - PrimaryTools1 = 3, - Armor = 4, - Accessories = 5, - Medicines = 6, - Materials = 7, - Other = 8, - PugilistsArms = 9, - GladiatorsArms = 10, - MaraudersArms = 11, - ArchersArms = 12, - LancersArms = 13, - ThaumaturgesArms = 14, - ConjurersArms = 15, - ArcanistsArms = 16, - Shields = 17, - ThrowingWeapons = 18, - CarpentersTools = 19, - BlacksmithsTools = 20, - ArmorersTools = 21, - GoldsmithsTools = 22, - LeatherworkersTools = 23, - WeaversTools = 24, - AlchemistsTools = 25, - CulinariansTools = 26, - MinersTools = 27, - BotanistsTools = 28, - FishersTools = 29, - FishingTackle = 30, - Head = 31, - Undershirts = 32, - Body = 33, - Undergarments = 34, - Legs = 35, - Hands = 36, - Feet = 37, - Waist = 38, - Necklaces = 39, - Earrings = 40, - Bracelets = 41, - Rings = 42, - Medicine = 43, - Ingredients = 44, - Meals = 45, - Seafood = 46, - Stone = 47, - Metal = 48, - Lumber = 49, - Cloth = 50, - Leather = 51, - Bone = 52, - Reagents = 53, - Dyes = 54, - WeaponParts = 55, - Furnishings = 56, - Materia = 57, - Crystals = 58, - Catalysts = 59, - Miscellany = 60, - SoulCrystals = 61, - Arrows = 62, - QuestItems = 63, - Other1 = 64, - ExteriorFixtures = 65, - InteriorFixtures = 66, - OutdoorFurnishings = 67, - ChairsandBeds = 68, - Tables = 69, - Tabletop = 70, - Wallmounted = 71, - Rugs = 72, - RoguesArms = 73, - SeasonalMiscellany = 74, - Minions = 75, - DarkKnightsArms = 76, - MachinistsArms = 77, - AstrologiansArms = 78, - AirshipComponents = 79, - OrchestrionComponents = 80, - GardeningItems = 81, - Paintings = 82, - SamuraisArms = 83, - RedMagesArms = 84, - ScholarsArms = 85, - }; +/////////////////////////////////////////////////////////// +//ItemSearchCategory.exd +enum class ItemSearchCategory : + uint8_t +{ + PrimaryArms = 1, + PrimaryTools = 2, + PrimaryTools1 = 3, + Armor = 4, + Accessories = 5, + Medicines = 6, + Materials = 7, + Other = 8, + PugilistsArms = 9, + GladiatorsArms = 10, + MaraudersArms = 11, + ArchersArms = 12, + LancersArms = 13, + ThaumaturgesArms = 14, + ConjurersArms = 15, + ArcanistsArms = 16, + Shields = 17, + ThrowingWeapons = 18, + CarpentersTools = 19, + BlacksmithsTools = 20, + ArmorersTools = 21, + GoldsmithsTools = 22, + LeatherworkersTools = 23, + WeaversTools = 24, + AlchemistsTools = 25, + CulinariansTools = 26, + MinersTools = 27, + BotanistsTools = 28, + FishersTools = 29, + FishingTackle = 30, + Head = 31, + Undershirts = 32, + Body = 33, + Undergarments = 34, + Legs = 35, + Hands = 36, + Feet = 37, + Waist = 38, + Necklaces = 39, + Earrings = 40, + Bracelets = 41, + Rings = 42, + Medicine = 43, + Ingredients = 44, + Meals = 45, + Seafood = 46, + Stone = 47, + Metal = 48, + Lumber = 49, + Cloth = 50, + Leather = 51, + Bone = 52, + Reagents = 53, + Dyes = 54, + WeaponParts = 55, + Furnishings = 56, + Materia = 57, + Crystals = 58, + Catalysts = 59, + Miscellany = 60, + SoulCrystals = 61, + Arrows = 62, + QuestItems = 63, + Other1 = 64, + ExteriorFixtures = 65, + InteriorFixtures = 66, + OutdoorFurnishings = 67, + ChairsandBeds = 68, + Tables = 69, + Tabletop = 70, + Wallmounted = 71, + Rugs = 72, + RoguesArms = 73, + SeasonalMiscellany = 74, + Minions = 75, + DarkKnightsArms = 76, + MachinistsArms = 77, + AstrologiansArms = 78, + AirshipComponents = 79, + OrchestrionComponents = 80, + GardeningItems = 81, + Paintings = 82, + SamuraisArms = 83, + RedMagesArms = 84, + ScholarsArms = 85, +}; - /////////////////////////////////////////////////////////// - //OnlineStatus.exd - enum class OnlineStatus : uint8_t - { - Producer = 1, - GameMaster = 2, - GameMaster1 = 3, - GameMaster2 = 4, - Disconnected = 5, - WaitingforFriendListApproval = 6, - WaitingforLinkshellApproval = 7, - WaitingforFreeCompanyApproval = 8, - NotFound = 9, - Offline = 10, - Mentor = 11, - Busy = 12, - PvP = 13, - PlayingTripleTriad = 14, - ViewingCutscene = 15, - UsingaChocoboPorter = 16, - AwayfromKeyboard = 17, - CameraMode = 18, - LookingforRepairs = 19, - LookingtoRepair = 20, - LookingtoMeldMateria = 21, - Roleplaying = 22, - LookingforParty = 23, - SwordforHire = 24, - WaitingforDutyFinder = 25, - RecruitingPartyMembers = 26, - Mentor1 = 27, - PvEMentor = 28, - TradeMentor = 29, - PvPMentor = 30, - Returner = 31, - NewAdventurer = 32, - AllianceLeader = 33, - AlliancePartyLeader = 34, - AlliancePartyMember = 35, - PartyLeader = 36, - PartyMember = 37, - PartyLeaderCrossworld = 38, - PartyMemberCrossworld = 39, - AnotherWorld = 40, - SharingDuty = 41, - SimilarDuty = 42, - InDuty = 43, - TrialAdventurer = 44, - FreeCompany = 45, - GrandCompany = 46, - Online = 47, - }; +/////////////////////////////////////////////////////////// +//OnlineStatus.exd +enum class OnlineStatus : + uint8_t +{ + Producer = 1, + GameMaster = 2, + GameMaster1 = 3, + GameMaster2 = 4, + Disconnected = 5, + WaitingforFriendListApproval = 6, + WaitingforLinkshellApproval = 7, + WaitingforFreeCompanyApproval = 8, + NotFound = 9, + Offline = 10, + Mentor = 11, + Busy = 12, + PvP = 13, + PlayingTripleTriad = 14, + ViewingCutscene = 15, + UsingaChocoboPorter = 16, + AwayfromKeyboard = 17, + CameraMode = 18, + LookingforRepairs = 19, + LookingtoRepair = 20, + LookingtoMeldMateria = 21, + Roleplaying = 22, + LookingforParty = 23, + SwordforHire = 24, + WaitingforDutyFinder = 25, + RecruitingPartyMembers = 26, + Mentor1 = 27, + PvEMentor = 28, + TradeMentor = 29, + PvPMentor = 30, + Returner = 31, + NewAdventurer = 32, + AllianceLeader = 33, + AlliancePartyLeader = 34, + AlliancePartyMember = 35, + PartyLeader = 36, + PartyMember = 37, + PartyLeaderCrossworld = 38, + PartyMemberCrossworld = 39, + AnotherWorld = 40, + SharingDuty = 41, + SimilarDuty = 42, + InDuty = 43, + TrialAdventurer = 44, + FreeCompany = 45, + GrandCompany = 46, + Online = 47, +}; - /////////////////////////////////////////////////////////// - //Race.exd - enum class Race : uint8_t - { - Hyur = 1, - Elezen = 2, - Lalafell = 3, - Miqote = 4, - Roegadyn = 5, - AuRa = 6, - }; +/////////////////////////////////////////////////////////// +//Race.exd +enum class Race : + uint8_t +{ + Hyur = 1, + Elezen = 2, + Lalafell = 3, + Miqote = 4, + Roegadyn = 5, + AuRa = 6, +}; - /////////////////////////////////////////////////////////// - //Tribe.exd - enum class Tribe : uint8_t - { - Midlander = 1, - Highlander = 2, - Wildwood = 3, - Duskwight = 4, - Plainsfolk = 5, - Dunesfolk = 6, - SeekeroftheSun = 7, - KeeperoftheMoon = 8, - SeaWolf = 9, - Hellsguard = 10, - Raen = 11, - Xaela = 12, - }; +/////////////////////////////////////////////////////////// +//Tribe.exd +enum class Tribe : + uint8_t +{ + Midlander = 1, + Highlander = 2, + Wildwood = 3, + Duskwight = 4, + Plainsfolk = 5, + Dunesfolk = 6, + SeekeroftheSun = 7, + KeeperoftheMoon = 8, + SeaWolf = 9, + Hellsguard = 10, + Raen = 11, + Xaela = 12, +}; - /////////////////////////////////////////////////////////// - //Town.exd - enum class Town : uint8_t - { - Nowheresville = 0, - LimsaLominsa = 1, - Gridania = 2, - Uldah = 3, - Ishgard = 4, - Kugane = 7, - }; +/////////////////////////////////////////////////////////// +//Town.exd +enum class Town : + uint8_t +{ + Nowheresville = 0, + LimsaLominsa = 1, + Gridania = 2, + Uldah = 3, + Ishgard = 4, + Kugane = 7, +}; - /////////////////////////////////////////////////////////// - //Weather.exd - enum class Weather : uint8_t - { - None = 0, - ClearSkies = 1, - FairSkies = 2, - Clouds = 3, - Fog = 4, - Wind = 5, - Gales = 6, - Rain = 7, - Showers = 8, - Thunder = 9, - Thunderstorms = 10, - DustStorms = 11, - Sandstorms = 12, - HotSpells = 13, - HeatWaves = 14, - Snow = 15, - Blizzards = 16, - Gloom = 17, - Auroras = 18, - Darkness = 19, - Tension = 20, - Clouds1 = 21, - StormClouds = 22, - RoughSeas = 23, - RoughSeas1 = 24, - Louring = 25, - HeatWaves1 = 26, - Gloom1 = 27, - Gales1 = 28, - Eruptions = 29, - FairSkies1 = 30, - FairSkies2 = 31, - FairSkies3 = 32, - FairSkies4 = 33, - FairSkies5 = 34, - Irradiance = 35, - CoreRadiation = 36, - CoreRadiation1 = 37, - CoreRadiation2 = 38, - CoreRadiation3 = 39, - ShelfClouds = 40, - ShelfClouds1 = 41, - ShelfClouds2 = 42, - ShelfClouds3 = 43, - Oppression = 44, - Oppression1 = 45, - Oppression2 = 46, - Oppression3 = 47, - Oppression4 = 48, - UmbralWind = 49, - UmbralStatic = 50, - Smoke = 51, - FairSkies6 = 52, - RoyalLevin = 53, - Hyperelectricity = 54, - RoyalLevin1 = 55, - Oppression5 = 56, - Thunder1 = 57, - Thunder2 = 58, - CutScene = 59, - Multiplicity = 60, - Multiplicity1 = 61, - Rain1 = 62, - FairSkies7 = 63, - Rain2 = 64, - FairSkies8 = 65, - Dragonstorm = 66, - Dragonstorm1 = 67, - Subterrain = 68, - Concordance = 69, - Concordance1 = 70, - BeyondTime = 71, - BeyondTime1 = 72, - BeyondTime2 = 73, - DemonicInfinity = 74, - DemonicInfinity1 = 75, - DemonicInfinity2 = 76, - DimensionalDisruption = 77, - DimensionalDisruption1 = 78, - DimensionalDisruption2 = 79, - Revelstorm = 80, - Revelstorm1 = 81, - EternalBliss = 82, - EternalBliss1 = 83, - Wyrmstorm = 84, - Wyrmstorm1 = 85, - Revelstorm2 = 86, - Quicklevin = 87, - Thunder3 = 88, - DimensionalDisruption3 = 89, - FairSkies9 = 90, - }; +/////////////////////////////////////////////////////////// +//Weather.exd +enum class Weather : + uint8_t +{ + None = 0, + ClearSkies = 1, + FairSkies = 2, + Clouds = 3, + Fog = 4, + Wind = 5, + Gales = 6, + Rain = 7, + Showers = 8, + Thunder = 9, + Thunderstorms = 10, + DustStorms = 11, + Sandstorms = 12, + HotSpells = 13, + HeatWaves = 14, + Snow = 15, + Blizzards = 16, + Gloom = 17, + Auroras = 18, + Darkness = 19, + Tension = 20, + Clouds1 = 21, + StormClouds = 22, + RoughSeas = 23, + RoughSeas1 = 24, + Louring = 25, + HeatWaves1 = 26, + Gloom1 = 27, + Gales1 = 28, + Eruptions = 29, + FairSkies1 = 30, + FairSkies2 = 31, + FairSkies3 = 32, + FairSkies4 = 33, + FairSkies5 = 34, + Irradiance = 35, + CoreRadiation = 36, + CoreRadiation1 = 37, + CoreRadiation2 = 38, + CoreRadiation3 = 39, + ShelfClouds = 40, + ShelfClouds1 = 41, + ShelfClouds2 = 42, + ShelfClouds3 = 43, + Oppression = 44, + Oppression1 = 45, + Oppression2 = 46, + Oppression3 = 47, + Oppression4 = 48, + UmbralWind = 49, + UmbralStatic = 50, + Smoke = 51, + FairSkies6 = 52, + RoyalLevin = 53, + Hyperelectricity = 54, + RoyalLevin1 = 55, + Oppression5 = 56, + Thunder1 = 57, + Thunder2 = 58, + CutScene = 59, + Multiplicity = 60, + Multiplicity1 = 61, + Rain1 = 62, + FairSkies7 = 63, + Rain2 = 64, + FairSkies8 = 65, + Dragonstorm = 66, + Dragonstorm1 = 67, + Subterrain = 68, + Concordance = 69, + Concordance1 = 70, + BeyondTime = 71, + BeyondTime1 = 72, + BeyondTime2 = 73, + DemonicInfinity = 74, + DemonicInfinity1 = 75, + DemonicInfinity2 = 76, + DimensionalDisruption = 77, + DimensionalDisruption1 = 78, + DimensionalDisruption2 = 79, + Revelstorm = 80, + Revelstorm1 = 81, + EternalBliss = 82, + EternalBliss1 = 83, + Wyrmstorm = 84, + Wyrmstorm1 = 85, + Revelstorm2 = 86, + Quicklevin = 87, + Thunder3 = 88, + DimensionalDisruption3 = 89, + FairSkies9 = 90, +}; } } #endif diff --git a/src/common/Config/ConfigMgr.cpp b/src/common/Config/ConfigMgr.cpp index b19253ea..2c921a9c 100644 --- a/src/common/Config/ConfigMgr.cpp +++ b/src/common/Config/ConfigMgr.cpp @@ -10,57 +10,57 @@ */ bool Core::ConfigMgr::loadConfig( const std::string& configName ) { - std::stringstream configStream; + std::stringstream configStream; - // get global config - auto configDir = boost::filesystem::path( m_configFolderRoot ); + // get global config + auto configDir = boost::filesystem::path( m_configFolderRoot ); - if( !boost::filesystem::exists( configDir ) ) - { + if( !boost::filesystem::exists( configDir ) ) + { + return false; + } + + auto globalConfig = boost::filesystem::path( configDir / m_globalConfigFile ); + if( !boost::filesystem::exists( globalConfig ) ) + { + if( !copyDefaultConfig( globalConfig.filename().string() ) ) return false; - } + } - auto globalConfig = boost::filesystem::path( configDir / m_globalConfigFile ); - if( !boost::filesystem::exists( globalConfig ) ) - { - if( !copyDefaultConfig( globalConfig.filename().string() ) ) - return false; - } + std::ifstream globalConfigFile( globalConfig.c_str() ); + configStream << globalConfigFile.rdbuf(); - std::ifstream globalConfigFile( globalConfig.c_str() ); - configStream << globalConfigFile.rdbuf(); + // add some newlines just in case there's no newline at the end of the global file + configStream << "\n\n"; - // add some newlines just in case there's no newline at the end of the global file - configStream << "\n\n"; + // get local config + auto localConfig = boost::filesystem::path( configDir / configName ); + if( !boost::filesystem::exists( localConfig ) ) + { + if( !copyDefaultConfig( localConfig.filename().string() ) ) + return false; + } + std::ifstream configFile( localConfig.c_str() ); + configStream << configFile.rdbuf(); - // get local config - auto localConfig = boost::filesystem::path( configDir / configName ); - if( !boost::filesystem::exists( localConfig ) ) - { - if( !copyDefaultConfig( localConfig.filename().string() ) ) - return false; - } - std::ifstream configFile( localConfig.c_str() ); - configStream << configFile.rdbuf(); + // parse the tree and we're fuckin done + boost::property_tree::read_ini( configStream, m_propTree ); - // parse the tree and we're fuckin done - boost::property_tree::read_ini( configStream, m_propTree ); - - return true; + return true; } bool Core::ConfigMgr::copyDefaultConfig( const std::string& configName ) { - boost::filesystem::path configPath( m_configFolderRoot ); - configPath /= configName; + boost::filesystem::path configPath( m_configFolderRoot ); + configPath /= configName; - if( !boost::filesystem::exists( configPath.string() + m_configDefaultSuffix ) ) - { - // no default file :( - return false; - } + if( !boost::filesystem::exists( configPath.string() + m_configDefaultSuffix ) ) + { + // no default file :( + return false; + } - boost::filesystem::copy_file( configPath.string() + m_configDefaultSuffix, configPath ); + boost::filesystem::copy_file( configPath.string() + m_configDefaultSuffix, configPath ); - return true; + return true; } \ No newline at end of file diff --git a/src/common/Config/ConfigMgr.h b/src/common/Config/ConfigMgr.h index 5a9fab9c..82de18bf 100644 --- a/src/common/Config/ConfigMgr.h +++ b/src/common/Config/ConfigMgr.h @@ -3,43 +3,43 @@ #include -namespace Core +namespace Core { +class ConfigMgr { - class ConfigMgr - { - public: - ConfigMgr() = default; - ~ConfigMgr() = default; +public: + ConfigMgr() = default; - bool loadConfig( const std::string& configName ); + ~ConfigMgr() = default; - template< class T > - T getValue( const std::string& name, T defaultValue = T() ) - { - try - { - return m_propTree.get< T >( name ); - } - catch( ... ) - { - return defaultValue; - } - } + bool loadConfig( const std::string& configName ); - template< class T > - void setValue( const std::string& name, T defaultValue = T() ) - { - m_propTree.put( name, defaultValue ); - } + template< class T > + T getValue( const std::string& name, T defaultValue = T() ) + { + try + { + return m_propTree.get< T >( name ); + } + catch( ... ) + { + return defaultValue; + } + } - private: - bool copyDefaultConfig( const std::string& configName ); + template< class T > + void setValue( const std::string& name, T defaultValue = T() ) + { + m_propTree.put( name, defaultValue ); + } - boost::property_tree::ptree m_propTree; - const std::string m_globalConfigFile = "global.ini"; - const std::string m_configFolderRoot = "./config/"; - const std::string m_configDefaultSuffix = ".default"; - }; +private: + bool copyDefaultConfig( const std::string& configName ); + + boost::property_tree::ptree m_propTree; + const std::string m_globalConfigFile = "global.ini"; + const std::string m_configFolderRoot = "./config/"; + const std::string m_configDefaultSuffix = ".default"; +}; } #endif //SAPPHIRE_CONFIGMGR_H diff --git a/src/common/Crypt/base64.cpp b/src/common/Crypt/base64.cpp index 8037dec4..4f0cb9ba 100644 --- a/src/common/Crypt/base64.cpp +++ b/src/common/Crypt/base64.cpp @@ -1,7 +1,7 @@ /* base64.cpp and base64.h - Copyright (C) 2004-2008 René Nyffenegger + Copyright (C) 2004-2008 Ren� Nyffenegger This source code is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages @@ -21,7 +21,7 @@ 3. This notice may not be removed or altered from any source distribution. - René Nyffenegger rene.nyffenegger@adp-gmbh.ch + Ren� Nyffenegger rene.nyffenegger@adp-gmbh.ch */ @@ -29,95 +29,105 @@ #include static const std::string base64_chars = -"ABCDEFGHIJKLMNOPQRSTUVWXYZ" -"abcdefghijklmnopqrstuvwxyz" -"0123456789+/"; + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; -static inline bool is_base64( uint8_t c ) { - return ( isalnum( c ) || ( c == '+' ) || ( c == '/' ) ); +static inline bool is_base64( uint8_t c ) +{ + return ( isalnum( c ) || ( c == '+' ) || ( c == '/' ) ); } -std::string Core::Util::base64_encode( uint8_t const* bytes_to_encode, uint32_t in_len ) { - std::string ret; - int32_t i = 0; - int32_t j = 0; - uint8_t char_array_3[3]; - uint8_t char_array_4[4]; +std::string Core::Util::base64_encode( uint8_t const* bytes_to_encode, uint32_t in_len ) +{ + std::string ret; + int32_t i = 0; + int32_t j = 0; + uint8_t char_array_3[3]; + uint8_t char_array_4[4]; - while( in_len-- ) { - char_array_3[i++] = *( bytes_to_encode++ ); - if( i == 3 ) { - char_array_4[0] = ( char_array_3[0] & 0xfc ) >> 2; - char_array_4[1] = ( ( char_array_3[0] & 0x03 ) << 4 ) + ( ( char_array_3[1] & 0xf0 ) >> 4 ); - char_array_4[2] = ( ( char_array_3[1] & 0x0f ) << 2 ) + ( ( char_array_3[2] & 0xc0 ) >> 6 ); - char_array_4[3] = char_array_3[2] & 0x3f; + while( in_len-- ) + { + char_array_3[ i++ ] = *( bytes_to_encode++ ); + if( i == 3 ) + { + char_array_4[ 0 ] = ( char_array_3[ 0 ] & 0xfc ) >> 2; + char_array_4[ 1 ] = ( ( char_array_3[ 0 ] & 0x03 ) << 4 ) + ( ( char_array_3[ 1 ] & 0xf0 ) >> 4 ); + char_array_4[ 2 ] = ( ( char_array_3[ 1 ] & 0x0f ) << 2 ) + ( ( char_array_3[ 2 ] & 0xc0 ) >> 6 ); + char_array_4[ 3 ] = char_array_3[ 2 ] & 0x3f; - for( i = 0; ( i < 4 ); i++ ) - ret += base64_chars[char_array_4[i]]; - i = 0; - } - } + for( i = 0; ( i < 4 ); i++ ) + ret += base64_chars[ char_array_4[ i ] ]; + i = 0; + } + } - if( i ) - { - for( j = i; j < 3; j++ ) - char_array_3[j] = '\0'; + if( i ) + { + for( j = i; j < 3; j++ ) + char_array_3[ j ] = '\0'; - char_array_4[0] = ( char_array_3[0] & 0xfc ) >> 2; - char_array_4[1] = ( ( char_array_3[0] & 0x03 ) << 4 ) + ( ( char_array_3[1] & 0xf0 ) >> 4 ); - char_array_4[2] = ( ( char_array_3[1] & 0x0f ) << 2 ) + ( ( char_array_3[2] & 0xc0 ) >> 6 ); - char_array_4[3] = char_array_3[2] & 0x3f; + char_array_4[ 0 ] = ( char_array_3[ 0 ] & 0xfc ) >> 2; + char_array_4[ 1 ] = ( ( char_array_3[ 0 ] & 0x03 ) << 4 ) + ( ( char_array_3[ 1 ] & 0xf0 ) >> 4 ); + char_array_4[ 2 ] = ( ( char_array_3[ 1 ] & 0x0f ) << 2 ) + ( ( char_array_3[ 2 ] & 0xc0 ) >> 6 ); + char_array_4[ 3 ] = char_array_3[ 2 ] & 0x3f; - for( j = 0; ( j < i + 1 ); j++ ) - ret += base64_chars[char_array_4[j]]; + for( j = 0; ( j < i + 1 ); j++ ) + ret += base64_chars[ char_array_4[ j ] ]; - while( ( i++ < 3 ) ) - ret += '='; + while( ( i++ < 3 ) ) + ret += '='; - } + } - return ret; + return ret; } -std::string Core::Util::base64_decode( std::string const& encoded_string ) { - int32_t in_len = encoded_string.size(); - int32_t i = 0; - int32_t j = 0; - int32_t in_ = 0; - uint8_t char_array_4[4], char_array_3[3]; - std::string ret; +std::string Core::Util::base64_decode( std::string const& encoded_string ) +{ + int32_t in_len = encoded_string.size(); + int32_t i = 0; + int32_t j = 0; + int32_t in_ = 0; + uint8_t char_array_4[4], char_array_3[3]; + std::string ret; - while( in_len-- && ( encoded_string[in_] != '=' ) && is_base64( encoded_string[in_] ) ) { - char_array_4[i++] = encoded_string[in_]; in_++; - if( i == 4 ) { - for( i = 0; i < 4; i++ ) - char_array_4[i] = static_cast< uint8_t >( base64_chars.find( char_array_4[i] ) ); + while( in_len-- && ( encoded_string[ in_ ] != '=' ) && is_base64( encoded_string[ in_ ] ) ) + { + char_array_4[ i++ ] = encoded_string[ in_ ]; + in_++; + if( i == 4 ) + { + for( i = 0; i < 4; i++ ) + char_array_4[ i ] = static_cast< uint8_t >( base64_chars.find( char_array_4[ i ] ) ); - char_array_3[0] = ( char_array_4[0] << 2 ) + ( ( char_array_4[1] & 0x30 ) >> 4 ); - char_array_3[1] = ( ( char_array_4[1] & 0xf ) << 4 ) + ( ( char_array_4[2] & 0x3c ) >> 2 ); - char_array_3[2] = ( ( char_array_4[2] & 0x3 ) << 6 ) + char_array_4[3]; + char_array_3[ 0 ] = ( char_array_4[ 0 ] << 2 ) + ( ( char_array_4[ 1 ] & 0x30 ) >> 4 ); + char_array_3[ 1 ] = ( ( char_array_4[ 1 ] & 0xf ) << 4 ) + ( ( char_array_4[ 2 ] & 0x3c ) >> 2 ); + char_array_3[ 2 ] = ( ( char_array_4[ 2 ] & 0x3 ) << 6 ) + char_array_4[ 3 ]; - for( i = 0; ( i < 3 ); i++ ) - ret += char_array_3[i]; - i = 0; - } - } + for( i = 0; ( i < 3 ); i++ ) + ret += char_array_3[ i ]; + i = 0; + } + } - if( i ) { - for( j = i; j < 4; j++ ) - char_array_4[j] = 0; + if( i ) + { + for( j = i; j < 4; j++ ) + char_array_4[ j ] = 0; - for( j = 0; j < 4; j++ ) - char_array_4[j] = static_cast< uint8_t >( base64_chars.find( char_array_4[j] ) ); + for( j = 0; j < 4; j++ ) + char_array_4[ j ] = static_cast< uint8_t >( base64_chars.find( char_array_4[ j ] ) ); - char_array_3[0] = ( char_array_4[0] << 2 ) + ( ( char_array_4[1] & 0x30 ) >> 4 ); - char_array_3[1] = ( ( char_array_4[1] & 0xf ) << 4 ) + ( ( char_array_4[2] & 0x3c ) >> 2 ); - char_array_3[2] = ( ( char_array_4[2] & 0x3 ) << 6 ) + char_array_4[3]; + char_array_3[ 0 ] = ( char_array_4[ 0 ] << 2 ) + ( ( char_array_4[ 1 ] & 0x30 ) >> 4 ); + char_array_3[ 1 ] = ( ( char_array_4[ 1 ] & 0xf ) << 4 ) + ( ( char_array_4[ 2 ] & 0x3c ) >> 2 ); + char_array_3[ 2 ] = ( ( char_array_4[ 2 ] & 0x3 ) << 6 ) + char_array_4[ 3 ]; - for( j = 0; ( j < i - 1 ); j++ ) ret += char_array_3[j]; - } + for( j = 0; ( j < i - 1 ); j++ ) + ret += char_array_3[ j ]; + } - return ret; + return ret; } diff --git a/src/common/Crypt/base64.h b/src/common/Crypt/base64.h index 3840b8af..77ba23bb 100644 --- a/src/common/Crypt/base64.h +++ b/src/common/Crypt/base64.h @@ -1,11 +1,10 @@ #include -namespace Core -{ - namespace Util - { - std::string base64_encode( uint8_t const*, uint32_t len ); - std::string base64_decode( std::string const& s ); - } +namespace Core { +namespace Util { +std::string base64_encode( uint8_t const*, uint32_t len ); + +std::string base64_decode( std::string const& s ); +} } diff --git a/src/common/Crypt/blowfish.cpp b/src/common/Crypt/blowfish.cpp index 5b830e5b..f489a675 100644 --- a/src/common/Crypt/blowfish.cpp +++ b/src/common/Crypt/blowfish.cpp @@ -6,89 +6,105 @@ #include #include "blowfish.h" -#include "blowfish.h2" // holds the random digit tables +#include "blowfish.h2" // holds the random digit tables -#define S(x,i) (SBoxes[i][x.w.byte##i]) -#define bf_F(x) (((S(x,0) + S(x,1)) ^ S(x,2)) + S(x,3)) -#define ROUND(a,b,n) (a.dword ^= bf_F(b) ^ PArray[n]) +#define S( x, i ) (SBoxes[i][x.w.byte##i]) +#define bf_F( x ) (((S(x,0) + S(x,1)) ^ S(x,2)) + S(x,3)) +#define ROUND( a, b, n ) (a.dword ^= bf_F(b) ^ PArray[n]) -BlowFish::BlowFish () +BlowFish::BlowFish() { - PArray = new DWORD [18] ; - SBoxes = new DWORD [4][256] ; + PArray = new DWORD[18]; + SBoxes = new DWORD[4][256]; } -BlowFish::~BlowFish () +BlowFish::~BlowFish() { - delete PArray ; - delete [] SBoxes ; + delete PArray; + delete[] SBoxes; } - // the low level (private) encryption function -void BlowFish::Blowfish_encipher (DWORD *xl, DWORD *xr) +// the low level (private) encryption function +void BlowFish::Blowfish_encipher( DWORD* xl, DWORD* xr ) { - union aword Xl, Xr ; + union aword Xl, Xr; - Xl.dword = *xl ; - Xr.dword = *xr ; + Xl.dword = *xl; + Xr.dword = *xr; - Xl.dword ^= PArray [0]; - ROUND (Xr, Xl, 1) ; ROUND (Xl, Xr, 2) ; - ROUND (Xr, Xl, 3) ; ROUND (Xl, Xr, 4) ; - ROUND (Xr, Xl, 5) ; ROUND (Xl, Xr, 6) ; - ROUND (Xr, Xl, 7) ; ROUND (Xl, Xr, 8) ; - ROUND (Xr, Xl, 9) ; ROUND (Xl, Xr, 10) ; - ROUND (Xr, Xl, 11) ; ROUND (Xl, Xr, 12) ; - ROUND (Xr, Xl, 13) ; ROUND (Xl, Xr, 14) ; - ROUND (Xr, Xl, 15) ; ROUND (Xl, Xr, 16) ; - Xr.dword ^= PArray [17] ; + Xl.dword ^= PArray[ 0 ]; + ROUND ( Xr, Xl, 1 ); + ROUND ( Xl, Xr, 2 ); + ROUND ( Xr, Xl, 3 ); + ROUND ( Xl, Xr, 4 ); + ROUND ( Xr, Xl, 5 ); + ROUND ( Xl, Xr, 6 ); + ROUND ( Xr, Xl, 7 ); + ROUND ( Xl, Xr, 8 ); + ROUND ( Xr, Xl, 9 ); + ROUND ( Xl, Xr, 10 ); + ROUND ( Xr, Xl, 11 ); + ROUND ( Xl, Xr, 12 ); + ROUND ( Xr, Xl, 13 ); + ROUND ( Xl, Xr, 14 ); + ROUND ( Xr, Xl, 15 ); + ROUND ( Xl, Xr, 16 ); + Xr.dword ^= PArray[ 17 ]; - *xr = Xl.dword ; - *xl = Xr.dword ; + *xr = Xl.dword; + *xl = Xr.dword; } - // the low level (private) decryption function -void BlowFish::Blowfish_decipher (DWORD *xl, DWORD *xr) +// the low level (private) decryption function +void BlowFish::Blowfish_decipher( DWORD* xl, DWORD* xr ) { - union aword Xl ; - union aword Xr ; + union aword Xl; + union aword Xr; - Xl.dword = *xl ; - Xr.dword = *xr ; + Xl.dword = *xl; + Xr.dword = *xr; - Xl.dword ^= PArray [17] ; - ROUND (Xr, Xl, 16) ; ROUND (Xl, Xr, 15) ; - ROUND (Xr, Xl, 14) ; ROUND (Xl, Xr, 13) ; - ROUND (Xr, Xl, 12) ; ROUND (Xl, Xr, 11) ; - ROUND (Xr, Xl, 10) ; ROUND (Xl, Xr, 9) ; - ROUND (Xr, Xl, 8) ; ROUND (Xl, Xr, 7) ; - ROUND (Xr, Xl, 6) ; ROUND (Xl, Xr, 5) ; - ROUND (Xr, Xl, 4) ; ROUND (Xl, Xr, 3) ; - ROUND (Xr, Xl, 2) ; ROUND (Xl, Xr, 1) ; - Xr.dword ^= PArray[0]; + Xl.dword ^= PArray[ 17 ]; + ROUND ( Xr, Xl, 16 ); + ROUND ( Xl, Xr, 15 ); + ROUND ( Xr, Xl, 14 ); + ROUND ( Xl, Xr, 13 ); + ROUND ( Xr, Xl, 12 ); + ROUND ( Xl, Xr, 11 ); + ROUND ( Xr, Xl, 10 ); + ROUND ( Xl, Xr, 9 ); + ROUND ( Xr, Xl, 8 ); + ROUND ( Xl, Xr, 7 ); + ROUND ( Xr, Xl, 6 ); + ROUND ( Xl, Xr, 5 ); + ROUND ( Xr, Xl, 4 ); + ROUND ( Xl, Xr, 3 ); + ROUND ( Xr, Xl, 2 ); + ROUND ( Xl, Xr, 1 ); + Xr.dword ^= PArray[ 0 ]; - *xl = Xr.dword; - *xr = Xl.dword; + *xl = Xr.dword; + *xr = Xl.dword; } - // constructs the enctryption sieve -void BlowFish::initialize (BYTE key[], int32_t keybytes) +// constructs the enctryption sieve +void BlowFish::initialize( BYTE key[], int32_t keybytes ) { - int i, j ; - DWORD datal, datar ; + int i, j; + DWORD datal, datar; - // first fill arrays from data tables - for (i = 0 ; i < 18 ; i++) - PArray [i] = bf_P [i] ; + // first fill arrays from data tables + for( i = 0; i < 18; i++ ) + PArray[ i ] = bf_P[ i ]; - for (i = 0 ; i < 4 ; i++) - { - for (j = 0 ; j < 256 ; j++) - SBoxes [i][j] = bf_S [i][j] ; - } + for( i = 0; i < 4; i++ ) + { + for( j = 0; j < 256; j++ ) + SBoxes[ i ][ j ] = bf_S[ i ][ j ]; + } int32_t v12; // eax@6 int32_t v13; // ecx@6 @@ -104,156 +120,156 @@ void BlowFish::initialize (BYTE key[], int32_t keybytes) int32_t v10 = keybytes; - uintptr_t v9 = (uintptr_t)key; + uintptr_t v9 = ( uintptr_t ) key; int32_t v8 = 0; int32_t v11 = 0; - do { - v13 = (char)(*(BYTE *)(v8 + v9)); + do + { + v13 = ( char ) ( *( BYTE* ) ( v8 + v9 ) ); v12 = v8 + 1; - if ( v12 >= v10 ) + if( v12 >= v10 ) v12 = 0; - v16 = (char)*(BYTE *)(v12 + v9); + v16 = ( char ) *( BYTE* ) ( v12 + v9 ); v14 = v12 + 1; - v15 = (v13 << 8) | v16; - if ( v14 >= v10 ) + v15 = ( v13 << 8 ) | v16; + if( v14 >= v10 ) v14 = 0; - v19 = (char)*(BYTE *)(v14 + v9); + v19 = ( char ) *( BYTE* ) ( v14 + v9 ); v17 = v14 + 1; - v18 = (v15 << 8) | v19; - if ( v17 >= v10 ) + v18 = ( v15 << 8 ) | v19; + if( v17 >= v10 ) v17 = 0; - v21 = (char)*(BYTE *)(v17 + v9); + v21 = ( char ) *( BYTE* ) ( v17 + v9 ); v8 = v17 + 1; - v20 = (v18 << 8) | v21; - if ( v8 >= v10 ) + v20 = ( v18 << 8 ) | v21; + if( v8 >= v10 ) v8 = 0; - *((DWORD *)PArray + v11++) ^= v20; - } while ( v11 < 18 ); + *( ( DWORD* ) PArray + v11++ ) ^= v20; + } while( v11 < 18 ); + datal = 0; + datar = 0; - datal = 0 ; - datar = 0 ; + for( i = 0; i < NPASS + 2; i += 2 ) + { + Blowfish_encipher( &datal, &datar ); + PArray[ i ] = datal; + PArray[ i + 1 ] = datar; + } - for (i = 0 ; i < NPASS + 2 ; i += 2) - { - Blowfish_encipher (&datal, &datar) ; - PArray [i] = datal ; - PArray [i + 1] = datar ; - } - - for (i = 0 ; i < 4 ; ++i) - { - for (j = 0 ; j < 256 ; j += 2) - { - Blowfish_encipher (&datal, &datar) ; - SBoxes [i][j] = datal ; - SBoxes [i][j + 1] = datar ; - } - } + for( i = 0; i < 4; ++i ) + { + for( j = 0; j < 256; j += 2 ) + { + Blowfish_encipher( &datal, &datar ); + SBoxes[ i ][ j ] = datal; + SBoxes[ i ][ j + 1 ] = datar; + } + } } - // get output length, which must be even MOD 8 -DWORD BlowFish::GetOutputLength (DWORD lInputLong) +// get output length, which must be even MOD 8 +DWORD BlowFish::GetOutputLength( DWORD lInputLong ) { - DWORD lVal ; + DWORD lVal; - lVal = lInputLong % 8 ; // find out if uneven number of bytes at the end - if (lVal != 0) - return lInputLong + 8 - lVal ; - else - return lInputLong ; + lVal = lInputLong % 8; // find out if uneven number of bytes at the end + if( lVal != 0 ) + return lInputLong + 8 - lVal; + else + return lInputLong; } - // Encode pIntput into pOutput. Input length in lSize. Returned value - // is length of output which will be even MOD 8 bytes. Input buffer and - // output buffer can be the same, but be sure buffer length is even MOD 8. -DWORD BlowFish::Encode (BYTE * pInput, BYTE * pOutput, DWORD lSize) +// Encode pIntput into pOutput. Input length in lSize. Returned value +// is length of output which will be even MOD 8 bytes. Input buffer and +// output buffer can be the same, but be sure buffer length is even MOD 8. +DWORD BlowFish::Encode( BYTE* pInput, BYTE* pOutput, DWORD lSize ) { - DWORD lCount, lOutSize, lGoodBytes ; - BYTE *pi, *po ; - int i, j ; - int SameDest = (pInput == pOutput ? 1 : 0) ; + DWORD lCount, lOutSize, lGoodBytes; + BYTE* pi, * po; + int i, j; + int SameDest = ( pInput == pOutput ? 1 : 0 ); - lOutSize = GetOutputLength (lSize) ; - for (lCount = 0 ; lCount < lOutSize ; lCount += 8) - { - if (SameDest) // if encoded data is being written into input buffer - { - if (lCount < lSize - 7) // if not dealing with uneven bytes at end - { - Blowfish_encipher ((DWORD *) pInput, - (DWORD *) (pInput + 4)) ; - } - else // pad end of data with null bytes to complete encryption - { - po = pInput + lSize ; // point at byte past the end of actual data - j = (int) (lOutSize - lSize) ; // number of bytes to set to null - for (i = 0 ; i < j ; i++) - *po++ = 0 ; - Blowfish_encipher ((DWORD *) pInput, - (DWORD *) (pInput + 4)) ; - } - pInput += 8 ; - } - else // output buffer not equal to input buffer, so must copy - { // input to output buffer prior to encrypting - if (lCount < lSize - 7) // if not dealing with uneven bytes at end - { - pi = pInput ; - po = pOutput ; - for (i = 0 ; i < 8 ; i++) + lOutSize = GetOutputLength( lSize ); + for( lCount = 0; lCount < lOutSize; lCount += 8 ) + { + if( SameDest ) // if encoded data is being written into input buffer + { + if( lCount < lSize - 7 ) // if not dealing with uneven bytes at end + { + Blowfish_encipher( ( DWORD* ) pInput, + ( DWORD* ) ( pInput + 4 ) ); + } + else // pad end of data with null bytes to complete encryption + { + po = pInput + lSize; // point at byte past the end of actual data + j = ( int ) ( lOutSize - lSize ); // number of bytes to set to null + for( i = 0; i < j; i++ ) + *po++ = 0; + Blowfish_encipher( ( DWORD* ) pInput, + ( DWORD* ) ( pInput + 4 ) ); + } + pInput += 8; + } + else // output buffer not equal to input buffer, so must copy + { // input to output buffer prior to encrypting + if( lCount < lSize - 7 ) // if not dealing with uneven bytes at end + { + pi = pInput; + po = pOutput; + for( i = 0; i < 8; i++ ) // copy bytes to output - *po++ = *pi++ ; - Blowfish_encipher ((DWORD *) pOutput, // now encrypt them - (DWORD *) (pOutput + 4)) ; - } - else // pad end of data with null bytes to complete encryption - { - lGoodBytes = lSize - lCount ; // number of remaining data bytes - po = pOutput ; - for (i = 0 ; i < (int) lGoodBytes ; i++) - *po++ = *pInput++ ; - for (j = i ; j < 8 ; j++) - *po++ = 0 ; - Blowfish_encipher ((DWORD *) pOutput, - (DWORD *) (pOutput + 4)) ; - } - pInput += 8 ; - pOutput += 8 ; - } - } - return lOutSize ; - } - - // Decode pIntput into pOutput. Input length in lSize. Input buffer and - // output buffer can be the same, but be sure buffer length is even MOD 8. -void BlowFish::Decode (BYTE * pInput, BYTE * pOutput, DWORD lSize) -{ - DWORD lCount ; - BYTE *pi, *po ; - int i ; - int SameDest = (pInput == pOutput ? 1 : 0) ; - - for (lCount = 0 ; lCount < lSize ; lCount += 8) - { - if (SameDest) // if encoded data is being written into input buffer - { - Blowfish_decipher ((DWORD *) pInput, - (DWORD *) (pInput + 4)) ; - pInput += 8 ; - } - else // output buffer not equal to input buffer - { // so copy input to output before decoding - pi = pInput ; - po = pOutput ; - for (i = 0 ; i < 8 ; i++) - *po++ = *pi++ ; - Blowfish_decipher ((DWORD *) pOutput, - (DWORD *) (pOutput + 4)) ; - pInput += 8 ; - pOutput += 8 ; - } - } + *po++ = *pi++; + Blowfish_encipher( ( DWORD* ) pOutput, // now encrypt them + ( DWORD* ) ( pOutput + 4 ) ); + } + else // pad end of data with null bytes to complete encryption + { + lGoodBytes = lSize - lCount; // number of remaining data bytes + po = pOutput; + for( i = 0; i < ( int ) lGoodBytes; i++ ) + *po++ = *pInput++; + for( j = i; j < 8; j++ ) + *po++ = 0; + Blowfish_encipher( ( DWORD* ) pOutput, + ( DWORD* ) ( pOutput + 4 ) ); + } + pInput += 8; + pOutput += 8; + } + } + return lOutSize; +} + +// Decode pIntput into pOutput. Input length in lSize. Input buffer and +// output buffer can be the same, but be sure buffer length is even MOD 8. +void BlowFish::Decode( BYTE* pInput, BYTE* pOutput, DWORD lSize ) +{ + DWORD lCount; + BYTE* pi, * po; + int i; + int SameDest = ( pInput == pOutput ? 1 : 0 ); + + for( lCount = 0; lCount < lSize; lCount += 8 ) + { + if( SameDest ) // if encoded data is being written into input buffer + { + Blowfish_decipher( ( DWORD* ) pInput, + ( DWORD* ) ( pInput + 4 ) ); + pInput += 8; + } + else // output buffer not equal to input buffer + { // so copy input to output before decoding + pi = pInput; + po = pOutput; + for( i = 0; i < 8; i++ ) + *po++ = *pi++; + Blowfish_decipher( ( DWORD* ) pOutput, + ( DWORD* ) ( pOutput + 4 ) ); + pInput += 8; + pOutput += 8; + } + } } diff --git a/src/common/Crypt/blowfish.h b/src/common/Crypt/blowfish.h index 81562b33..3623a1ee 100644 --- a/src/common/Crypt/blowfish.h +++ b/src/common/Crypt/blowfish.h @@ -6,70 +6,79 @@ // Revised code--3/20/94 // Converted to C++ class 5/96, Jim Conger -#define MAXKEYBYTES 56 // 448 bits max -#define NPASS 16 // SBox passes +#define MAXKEYBYTES 56 // 448 bits max +#define NPASS 16 // SBox passes -#define DWORD uint32_t -#define WORD unsigned short -#define BYTE uint8_t +#define DWORD uint32_t +#define WORD unsigned short +#define BYTE uint8_t class BlowFish { private: - DWORD * PArray ; - DWORD (* SBoxes)[256]; - void Blowfish_encipher (DWORD *xl, DWORD *xr) ; - void Blowfish_decipher (DWORD *xl, DWORD *xr) ; + DWORD* PArray; + DWORD (* SBoxes)[256]; + + void Blowfish_encipher( DWORD* xl, DWORD* xr ); + + void Blowfish_decipher( DWORD* xl, DWORD* xr ); public: - BlowFish () ; - ~BlowFish () ; - void initialize (BYTE key[], int32_t keybytes) ; - DWORD GetOutputLength (DWORD lInputLong) ; - DWORD Encode (BYTE * pInput, BYTE * pOutput, DWORD lSize) ; - void Decode (BYTE * pInput, BYTE * pOutput, DWORD lSize) ; + BlowFish(); -} ; + ~BlowFish(); + + void initialize( BYTE key[], int32_t keybytes ); + + DWORD GetOutputLength( DWORD lInputLong ); + + DWORD Encode( BYTE* pInput, BYTE* pOutput, DWORD lSize ); + + void Decode( BYTE* pInput, BYTE* pOutput, DWORD lSize ); + +}; // choose a byte order for your hardware -#define ORDER_DCBA // chosing Intel in this case +#define ORDER_DCBA // chosing Intel in this case -#ifdef ORDER_DCBA // DCBA - little endian - intel - union aword { - DWORD dword; - BYTE byte [4]; - struct { - uint32_t byte3:8; - uint32_t byte2:8; - uint32_t byte1:8; - uint32_t byte0:8; - } w; - }; +#ifdef ORDER_DCBA // DCBA - little endian - intel +union aword +{ + DWORD dword; + BYTE byte[4]; + struct + { + uint32_t byte3:8; + uint32_t byte2:8; + uint32_t byte1:8; + uint32_t byte0:8; + } w; +}; #endif -#ifdef ORDER_ABCD // ABCD - big endian - motorola - union aword { - DWORD dword; - BYTE byte [4]; - struct { - uint32_t byte0:8; - uint32_t byte1:8; - uint32_t byte2:8; - uint32_t byte3:8; - } w; - }; +#ifdef ORDER_ABCD // ABCD - big endian - motorola +union aword { + DWORD dword; + BYTE byte [4]; + struct { + uint32_t byte0:8; + uint32_t byte1:8; + uint32_t byte2:8; + uint32_t byte3:8; + } w; +}; #endif -#ifdef ORDER_BADC // BADC - vax - union aword { - DWORD dword; - BYTE byte [4]; - struct { - uint32_t byte1:8; - uint32_t byte0:8; - uint32_t byte3:8; - uint32_t byte2:8; - } w; +#ifdef ORDER_BADC // BADC - vax +union aword { + DWORD dword; + BYTE byte [4]; + struct { + uint32_t byte1:8; + uint32_t byte0:8; + uint32_t byte3:8; + uint32_t byte2:8; + } w; }; #endif #endif \ No newline at end of file diff --git a/src/common/Crypt/md5.cpp b/src/common/Crypt/md5.cpp index 6f9a4152..64770119 100644 --- a/src/common/Crypt/md5.cpp +++ b/src/common/Crypt/md5.cpp @@ -21,236 +21,237 @@ #include #include "md5.h" -#define GET_UINT32(n,b,i) \ +#define GET_UINT32( n, b, i ) \ { \ - (n) = ( (uint32_t) (b)[(i) ] ) \ - | ( (uint32_t) (b)[(i) + 1] << 8 ) \ - | ( (uint32_t) (b)[(i) + 2] << 16 ) \ - | ( (uint32_t) (b)[(i) + 3] << 24 ); \ + (n) = ( (uint32_t) (b)[(i) ] ) \ + | ( (uint32_t) (b)[(i) + 1] << 8 ) \ + | ( (uint32_t) (b)[(i) + 2] << 16 ) \ + | ( (uint32_t) (b)[(i) + 3] << 24 ); \ } -#define PUT_UINT32(n,b,i) \ +#define PUT_UINT32( n, b, i ) \ { \ - (b)[(i) ] = (uint8_t) ( (n) ); \ - (b)[(i) + 1] = (uint8_t) ( (n) >> 8 ); \ - (b)[(i) + 2] = (uint8_t) ( (n) >> 16 ); \ - (b)[(i) + 3] = (uint8_t) ( (n) >> 24 ); \ + (b)[(i) ] = (uint8_t) ( (n) ); \ + (b)[(i) + 1] = (uint8_t) ( (n) >> 8 ); \ + (b)[(i) + 2] = (uint8_t) ( (n) >> 16 ); \ + (b)[(i) + 3] = (uint8_t) ( (n) >> 24 ); \ } -void Core::Util::md5_starts( md5_context *ctx ) +void Core::Util::md5_starts( md5_context* ctx ) { - ctx->total[0] = 0; - ctx->total[1] = 0; + ctx->total[ 0 ] = 0; + ctx->total[ 1 ] = 0; - ctx->state[0] = 0x67452301; - ctx->state[1] = 0xEFCDAB89; - ctx->state[2] = 0x98BADCFE; - ctx->state[3] = 0x10325476; + ctx->state[ 0 ] = 0x67452301; + ctx->state[ 1 ] = 0xEFCDAB89; + ctx->state[ 2 ] = 0x98BADCFE; + ctx->state[ 3 ] = 0x10325476; } -void md5_process( Core::Util::md5_context *ctx, uint8_t data[64] ) +void md5_process( Core::Util::md5_context* ctx, uint8_t data[64] ) { - uint32_t X[16], A, B, C, D; + uint32_t X[16], A, B, C, D; - GET_UINT32( X[0], data, 0 ); - GET_UINT32( X[1], data, 4 ); - GET_UINT32( X[2], data, 8 ); - GET_UINT32( X[3], data, 12 ); - GET_UINT32( X[4], data, 16 ); - GET_UINT32( X[5], data, 20 ); - GET_UINT32( X[6], data, 24 ); - GET_UINT32( X[7], data, 28 ); - GET_UINT32( X[8], data, 32 ); - GET_UINT32( X[9], data, 36 ); - GET_UINT32( X[10], data, 40 ); - GET_UINT32( X[11], data, 44 ); - GET_UINT32( X[12], data, 48 ); - GET_UINT32( X[13], data, 52 ); - GET_UINT32( X[14], data, 56 ); - GET_UINT32( X[15], data, 60 ); + GET_UINT32( X[ 0 ], data, 0 ); + GET_UINT32( X[ 1 ], data, 4 ); + GET_UINT32( X[ 2 ], data, 8 ); + GET_UINT32( X[ 3 ], data, 12 ); + GET_UINT32( X[ 4 ], data, 16 ); + GET_UINT32( X[ 5 ], data, 20 ); + GET_UINT32( X[ 6 ], data, 24 ); + GET_UINT32( X[ 7 ], data, 28 ); + GET_UINT32( X[ 8 ], data, 32 ); + GET_UINT32( X[ 9 ], data, 36 ); + GET_UINT32( X[ 10 ], data, 40 ); + GET_UINT32( X[ 11 ], data, 44 ); + GET_UINT32( X[ 12 ], data, 48 ); + GET_UINT32( X[ 13 ], data, 52 ); + GET_UINT32( X[ 14 ], data, 56 ); + GET_UINT32( X[ 15 ], data, 60 ); -#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) +#define S( x, n ) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) -#define P(a,b,c,d,k,s,t) \ - { \ - a += F(b,c,d) + X[k] + t; a = S(a,s) + b; \ - } +#define P( a, b, c, d, k, s, t ) \ + { \ + a += F(b,c,d) + X[k] + t; a = S(a,s) + b; \ + } - A = ctx->state[0]; - B = ctx->state[1]; - C = ctx->state[2]; - D = ctx->state[3]; + A = ctx->state[ 0 ]; + B = ctx->state[ 1 ]; + C = ctx->state[ 2 ]; + D = ctx->state[ 3 ]; -#define F(x,y,z) (z ^ (x & (y ^ z))) +#define F( x, y, z ) (z ^ (x & (y ^ z))) - P( A, B, C, D, 0, 7, 0xD76AA478 ); - P( D, A, B, C, 1, 12, 0xE8C7B756 ); - P( C, D, A, B, 2, 17, 0x242070DB ); - P( B, C, D, A, 3, 22, 0xC1BDCEEE ); - P( A, B, C, D, 4, 7, 0xF57C0FAF ); - P( D, A, B, C, 5, 12, 0x4787C62A ); - P( C, D, A, B, 6, 17, 0xA8304613 ); - P( B, C, D, A, 7, 22, 0xFD469501 ); - P( A, B, C, D, 8, 7, 0x698098D8 ); - P( D, A, B, C, 9, 12, 0x8B44F7AF ); - P( C, D, A, B, 10, 17, 0xFFFF5BB1 ); - P( B, C, D, A, 11, 22, 0x895CD7BE ); - P( A, B, C, D, 12, 7, 0x6B901122 ); - P( D, A, B, C, 13, 12, 0xFD987193 ); - P( C, D, A, B, 14, 17, 0xA679438E ); - P( B, C, D, A, 15, 22, 0x49B40821 ); + P( A, B, C, D, 0, 7, 0xD76AA478 ); + P( D, A, B, C, 1, 12, 0xE8C7B756 ); + P( C, D, A, B, 2, 17, 0x242070DB ); + P( B, C, D, A, 3, 22, 0xC1BDCEEE ); + P( A, B, C, D, 4, 7, 0xF57C0FAF ); + P( D, A, B, C, 5, 12, 0x4787C62A ); + P( C, D, A, B, 6, 17, 0xA8304613 ); + P( B, C, D, A, 7, 22, 0xFD469501 ); + P( A, B, C, D, 8, 7, 0x698098D8 ); + P( D, A, B, C, 9, 12, 0x8B44F7AF ); + P( C, D, A, B, 10, 17, 0xFFFF5BB1 ); + P( B, C, D, A, 11, 22, 0x895CD7BE ); + P( A, B, C, D, 12, 7, 0x6B901122 ); + P( D, A, B, C, 13, 12, 0xFD987193 ); + P( C, D, A, B, 14, 17, 0xA679438E ); + P( B, C, D, A, 15, 22, 0x49B40821 ); #undef F -#define F(x,y,z) (y ^ (z & (x ^ y))) +#define F( x, y, z ) (y ^ (z & (x ^ y))) - P( A, B, C, D, 1, 5, 0xF61E2562 ); - P( D, A, B, C, 6, 9, 0xC040B340 ); - P( C, D, A, B, 11, 14, 0x265E5A51 ); - P( B, C, D, A, 0, 20, 0xE9B6C7AA ); - P( A, B, C, D, 5, 5, 0xD62F105D ); - P( D, A, B, C, 10, 9, 0x02441453 ); - P( C, D, A, B, 15, 14, 0xD8A1E681 ); - P( B, C, D, A, 4, 20, 0xE7D3FBC8 ); - P( A, B, C, D, 9, 5, 0x21E1CDE6 ); - P( D, A, B, C, 14, 9, 0xC33707D6 ); - P( C, D, A, B, 3, 14, 0xF4D50D87 ); - P( B, C, D, A, 8, 20, 0x455A14ED ); - P( A, B, C, D, 13, 5, 0xA9E3E905 ); - P( D, A, B, C, 2, 9, 0xFCEFA3F8 ); - P( C, D, A, B, 7, 14, 0x676F02D9 ); - P( B, C, D, A, 12, 20, 0x8D2A4C8A ); + P( A, B, C, D, 1, 5, 0xF61E2562 ); + P( D, A, B, C, 6, 9, 0xC040B340 ); + P( C, D, A, B, 11, 14, 0x265E5A51 ); + P( B, C, D, A, 0, 20, 0xE9B6C7AA ); + P( A, B, C, D, 5, 5, 0xD62F105D ); + P( D, A, B, C, 10, 9, 0x02441453 ); + P( C, D, A, B, 15, 14, 0xD8A1E681 ); + P( B, C, D, A, 4, 20, 0xE7D3FBC8 ); + P( A, B, C, D, 9, 5, 0x21E1CDE6 ); + P( D, A, B, C, 14, 9, 0xC33707D6 ); + P( C, D, A, B, 3, 14, 0xF4D50D87 ); + P( B, C, D, A, 8, 20, 0x455A14ED ); + P( A, B, C, D, 13, 5, 0xA9E3E905 ); + P( D, A, B, C, 2, 9, 0xFCEFA3F8 ); + P( C, D, A, B, 7, 14, 0x676F02D9 ); + P( B, C, D, A, 12, 20, 0x8D2A4C8A ); #undef F -#define F(x,y,z) (x ^ y ^ z) +#define F( x, y, z ) (x ^ y ^ z) - P( A, B, C, D, 5, 4, 0xFFFA3942 ); - P( D, A, B, C, 8, 11, 0x8771F681 ); - P( C, D, A, B, 11, 16, 0x6D9D6122 ); - P( B, C, D, A, 14, 23, 0xFDE5380C ); - P( A, B, C, D, 1, 4, 0xA4BEEA44 ); - P( D, A, B, C, 4, 11, 0x4BDECFA9 ); - P( C, D, A, B, 7, 16, 0xF6BB4B60 ); - P( B, C, D, A, 10, 23, 0xBEBFBC70 ); - P( A, B, C, D, 13, 4, 0x289B7EC6 ); - P( D, A, B, C, 0, 11, 0xEAA127FA ); - P( C, D, A, B, 3, 16, 0xD4EF3085 ); - P( B, C, D, A, 6, 23, 0x04881D05 ); - P( A, B, C, D, 9, 4, 0xD9D4D039 ); - P( D, A, B, C, 12, 11, 0xE6DB99E5 ); - P( C, D, A, B, 15, 16, 0x1FA27CF8 ); - P( B, C, D, A, 2, 23, 0xC4AC5665 ); + P( A, B, C, D, 5, 4, 0xFFFA3942 ); + P( D, A, B, C, 8, 11, 0x8771F681 ); + P( C, D, A, B, 11, 16, 0x6D9D6122 ); + P( B, C, D, A, 14, 23, 0xFDE5380C ); + P( A, B, C, D, 1, 4, 0xA4BEEA44 ); + P( D, A, B, C, 4, 11, 0x4BDECFA9 ); + P( C, D, A, B, 7, 16, 0xF6BB4B60 ); + P( B, C, D, A, 10, 23, 0xBEBFBC70 ); + P( A, B, C, D, 13, 4, 0x289B7EC6 ); + P( D, A, B, C, 0, 11, 0xEAA127FA ); + P( C, D, A, B, 3, 16, 0xD4EF3085 ); + P( B, C, D, A, 6, 23, 0x04881D05 ); + P( A, B, C, D, 9, 4, 0xD9D4D039 ); + P( D, A, B, C, 12, 11, 0xE6DB99E5 ); + P( C, D, A, B, 15, 16, 0x1FA27CF8 ); + P( B, C, D, A, 2, 23, 0xC4AC5665 ); #undef F -#define F(x,y,z) (y ^ (x | ~z)) +#define F( x, y, z ) (y ^ (x | ~z)) - P( A, B, C, D, 0, 6, 0xF4292244 ); - P( D, A, B, C, 7, 10, 0x432AFF97 ); - P( C, D, A, B, 14, 15, 0xAB9423A7 ); - P( B, C, D, A, 5, 21, 0xFC93A039 ); - P( A, B, C, D, 12, 6, 0x655B59C3 ); - P( D, A, B, C, 3, 10, 0x8F0CCC92 ); - P( C, D, A, B, 10, 15, 0xFFEFF47D ); - P( B, C, D, A, 1, 21, 0x85845DD1 ); - P( A, B, C, D, 8, 6, 0x6FA87E4F ); - P( D, A, B, C, 15, 10, 0xFE2CE6E0 ); - P( C, D, A, B, 6, 15, 0xA3014314 ); - P( B, C, D, A, 13, 21, 0x4E0811A1 ); - P( A, B, C, D, 4, 6, 0xF7537E82 ); - P( D, A, B, C, 11, 10, 0xBD3AF235 ); - P( C, D, A, B, 2, 15, 0x2AD7D2BB ); - P( B, C, D, A, 9, 21, 0xEB86D391 ); + P( A, B, C, D, 0, 6, 0xF4292244 ); + P( D, A, B, C, 7, 10, 0x432AFF97 ); + P( C, D, A, B, 14, 15, 0xAB9423A7 ); + P( B, C, D, A, 5, 21, 0xFC93A039 ); + P( A, B, C, D, 12, 6, 0x655B59C3 ); + P( D, A, B, C, 3, 10, 0x8F0CCC92 ); + P( C, D, A, B, 10, 15, 0xFFEFF47D ); + P( B, C, D, A, 1, 21, 0x85845DD1 ); + P( A, B, C, D, 8, 6, 0x6FA87E4F ); + P( D, A, B, C, 15, 10, 0xFE2CE6E0 ); + P( C, D, A, B, 6, 15, 0xA3014314 ); + P( B, C, D, A, 13, 21, 0x4E0811A1 ); + P( A, B, C, D, 4, 6, 0xF7537E82 ); + P( D, A, B, C, 11, 10, 0xBD3AF235 ); + P( C, D, A, B, 2, 15, 0x2AD7D2BB ); + P( B, C, D, A, 9, 21, 0xEB86D391 ); #undef F - ctx->state[0] += A; - ctx->state[1] += B; - ctx->state[2] += C; - ctx->state[3] += D; + ctx->state[ 0 ] += A; + ctx->state[ 1 ] += B; + ctx->state[ 2 ] += C; + ctx->state[ 3 ] += D; } -void Core::Util::md5_update( md5_context *ctx, uint8_t *input, uint32_t length ) +void Core::Util::md5_update( md5_context* ctx, uint8_t* input, uint32_t length ) { - uint32_t left, fill; + uint32_t left, fill; - if( !length ) return; + if( !length ) + return; - left = ctx->total[0] & 0x3F; - fill = 64 - left; + left = ctx->total[ 0 ] & 0x3F; + fill = 64 - left; - ctx->total[0] += length; - ctx->total[0] &= 0xFFFFFFFF; + ctx->total[ 0 ] += length; + ctx->total[ 0 ] &= 0xFFFFFFFF; - if( ctx->total[0] < length ) - ctx->total[1]++; + if( ctx->total[ 0 ] < length ) + ctx->total[ 1 ]++; - if( left && length >= fill ) - { - memcpy( ( void * )( ctx->buffer + left ), - ( void * )input, fill ); - md5_process( ctx, ctx->buffer ); - length -= fill; - input += fill; - left = 0; - } + if( left && length >= fill ) + { + memcpy( ( void* ) ( ctx->buffer + left ), + ( void* ) input, fill ); + md5_process( ctx, ctx->buffer ); + length -= fill; + input += fill; + left = 0; + } - while( length >= 64 ) - { - md5_process( ctx, input ); - length -= 64; - input += 64; - } + while( length >= 64 ) + { + md5_process( ctx, input ); + length -= 64; + input += 64; + } - if( length ) - { - memcpy( ( void * )( ctx->buffer + left ), - ( void * )input, length ); - } + if( length ) + { + memcpy( ( void* ) ( ctx->buffer + left ), + ( void* ) input, length ); + } } static uint8_t md5_padding[64] = + { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + +void Core::Util::md5_finish( md5_context* ctx, uint8_t digest[16] ) { - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; + uint32_t last, padn; + uint32_t high, low; + uint8_t msglen[8]; -void Core::Util::md5_finish( md5_context *ctx, uint8_t digest[16] ) -{ - uint32_t last, padn; - uint32_t high, low; - uint8_t msglen[8]; + high = ( ctx->total[ 0 ] >> 29 ) + | ( ctx->total[ 1 ] << 3 ); + low = ( ctx->total[ 0 ] << 3 ); - high = ( ctx->total[0] >> 29 ) - | ( ctx->total[1] << 3 ); - low = ( ctx->total[0] << 3 ); + PUT_UINT32( low, msglen, 0 ); + PUT_UINT32( high, msglen, 4 ); - PUT_UINT32( low, msglen, 0 ); - PUT_UINT32( high, msglen, 4 ); + last = ctx->total[ 0 ] & 0x3F; + padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); - last = ctx->total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); + md5_update( ctx, md5_padding, padn ); + md5_update( ctx, msglen, 8 ); - md5_update( ctx, md5_padding, padn ); - md5_update( ctx, msglen, 8 ); - - PUT_UINT32( ctx->state[0], digest, 0 ); - PUT_UINT32( ctx->state[1], digest, 4 ); - PUT_UINT32( ctx->state[2], digest, 8 ); - PUT_UINT32( ctx->state[3], digest, 12 ); + PUT_UINT32( ctx->state[ 0 ], digest, 0 ); + PUT_UINT32( ctx->state[ 1 ], digest, 4 ); + PUT_UINT32( ctx->state[ 2 ], digest, 8 ); + PUT_UINT32( ctx->state[ 3 ], digest, 12 ); } /* * those are the standard RFC 1321 test vectors */ -void Core::Util::md5( uint8_t *text, uint8_t *hash, int32_t size ) +void Core::Util::md5( uint8_t* text, uint8_t* hash, int32_t size ) { - md5_context ctx; - md5_starts( &ctx ); - md5_update( &ctx, ( uint8_t * )text, size ); - md5_finish( &ctx, hash ); + md5_context ctx; + md5_starts( &ctx ); + md5_update( &ctx, ( uint8_t* ) text, size ); + md5_finish( &ctx, hash ); } \ No newline at end of file diff --git a/src/common/Crypt/md5.h b/src/common/Crypt/md5.h index eada75ed..fc604b34 100644 --- a/src/common/Crypt/md5.h +++ b/src/common/Crypt/md5.h @@ -1,48 +1,50 @@ #ifndef _MD52_H #define _MD52_H + #include -namespace Core +namespace Core { +namespace Util { +using md5_context = struct { - namespace Util - { - using md5_context = struct - { - uint32_t total[2]; - uint32_t state[4]; - uint8_t buffer[64]; - }; + uint32_t total[2]; + uint32_t state[4]; + uint8_t buffer[64]; +}; - void md5( uint8_t *text, uint8_t *hash, int32_t size ); - void md5_starts( md5_context *ctx ); - void md5_update( md5_context *ctx, uint8_t *input, uint32_t length ); - void md5_finish( md5_context *ctx, uint8_t digest[16] ); +void md5( uint8_t* text, uint8_t* hash, int32_t size ); - static const char *msg[] = - { - "", - "a", - "abc", - "message digest", - "abcdefghijklmnopqrstuvwxyz", - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", - "12345678901234567890123456789012345678901234567890123456789012" \ +void md5_starts( md5_context* ctx ); + +void md5_update( md5_context* ctx, uint8_t* input, uint32_t length ); + +void md5_finish( md5_context* ctx, uint8_t digest[16] ); + +static const char* msg[] = + { + "", + "a", + "abc", + "message digest", + "abcdefghijklmnopqrstuvwxyz", + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + "12345678901234567890123456789012345678901234567890123456789012" \ "345678901234567890" - }; + }; - static const char *val[] = - { - "d41d8cd98f00b204e9800998ecf8427e", - "0cc175b9c0f1b6a831c399e269772661", - "900150983cd24fb0d6963f7d28e17f72", - "f96b697d7cb7938d525a2f31aaf161d0", - "c3fcd3d76192e4007dfb496cca67e13b", - "d174ab98d277d9f5a5611c2c9f419d9f", - "57edf4a22be3c955ac49da2e2107b67a" - }; +static const char* val[] = + { + "d41d8cd98f00b204e9800998ecf8427e", + "0cc175b9c0f1b6a831c399e269772661", + "900150983cd24fb0d6963f7d28e17f72", + "f96b697d7cb7938d525a2f31aaf161d0", + "c3fcd3d76192e4007dfb496cca67e13b", + "d174ab98d277d9f5a5611c2c9f419d9f", + "57edf4a22be3c955ac49da2e2107b67a" + }; - } +} } diff --git a/src/common/Database/CharaDbConnection.cpp b/src/common/Database/CharaDbConnection.cpp index d3dd29a2..c8076af1 100644 --- a/src/common/Database/CharaDbConnection.cpp +++ b/src/common/Database/CharaDbConnection.cpp @@ -1,12 +1,14 @@ #include "CharaDbConnection.h" #include -Core::Db::CharaDbConnection::CharaDbConnection( ConnectionInfo& connInfo ) : DbConnection( connInfo ) +Core::Db::CharaDbConnection::CharaDbConnection( ConnectionInfo& connInfo ) : + DbConnection( connInfo ) { } Core::Db::CharaDbConnection::CharaDbConnection( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* q, - ConnectionInfo& connInfo) : DbConnection( q, connInfo ) + ConnectionInfo& connInfo ) : + DbConnection( q, connInfo ) { } @@ -16,126 +18,162 @@ Core::Db::CharaDbConnection::~CharaDbConnection() void Core::Db::CharaDbConnection::doPrepareStatements() { - if( !m_reconnecting ) - m_stmts.resize( MAX_STATEMENTS ); + if( !m_reconnecting ) + m_stmts.resize( MAX_STATEMENTS ); - /// CHARA - prepareStatement( CHARA_SEL, "SELECT ContentId, Name, Hp, Mp, Tp, Gp, Mode, Mount, InvincibleGM, Voice, " - "Customize, ModelMainWeapon, ModelSubWeapon, ModelSystemWeapon, " - "ModelEquip, EmoteModeType, FirstLoginTime, Language, IsNewGame, " - "IsNewAdventurer, TerritoryType, TerritoryId, PosX, PosY, PosZ, PosR, " - "OTerritoryType, OTerritoryId, OPosX, OPosY, OPosZ, OPosR, GuardianDeity, " - "BirthDay, BirthMonth, Class, Status, TotalPlayTime, FirstClass, HomePoint, " - "FavoritePoint, RestPoint, StartTown, ActiveTitle, TitleList, Achievement, " - "Aetheryte, HowTo, Minions, Mounts, Orchestrion, EquippedMannequin, ConfigFlags, " - "QuestCompleteFlags, OpeningSequence, QuestTracking, GrandCompany, " - "GrandCompanyRank, Discovery, GMRank, EquipDisplayFlags, Unlocks, CFPenaltyUntil, " - "Pose " + /// CHARA + prepareStatement( CHARA_SEL, "SELECT ContentId, Name, Hp, Mp, Tp, Gp, Mode, Mount, InvincibleGM, Voice, " + "Customize, ModelMainWeapon, ModelSubWeapon, ModelSystemWeapon, " + "ModelEquip, EmoteModeType, FirstLoginTime, Language, IsNewGame, " + "IsNewAdventurer, TerritoryType, TerritoryId, PosX, PosY, PosZ, PosR, " + "OTerritoryType, OTerritoryId, OPosX, OPosY, OPosZ, OPosR, GuardianDeity, " + "BirthDay, BirthMonth, Class, Status, TotalPlayTime, FirstClass, HomePoint, " + "FavoritePoint, RestPoint, StartTown, ActiveTitle, TitleList, Achievement, " + "Aetheryte, HowTo, Minions, Mounts, Orchestrion, EquippedMannequin, ConfigFlags, " + "QuestCompleteFlags, OpeningSequence, QuestTracking, GrandCompany, " + "GrandCompanyRank, Discovery, GMRank, EquipDisplayFlags, Unlocks, CFPenaltyUntil, " + "Pose " + "FROM charainfo WHERE CharacterId = ?;", CONNECTION_SYNC ); + + + prepareStatement( CHARA_UP, + "UPDATE charainfo SET " + "Hp = ?, Mp = ?, Tp = ?, Gp = ?, Mode = ?, Mount = ?, InvincibleGM = ?, Voice = ?, " + "Customize = ?, ModelMainWeapon = ?, ModelSubWeapon = ?, ModelSystemWeapon = ?, " + "ModelEquip = ?, EmoteModeType = ?, Language = ?, IsNewGame = ?, IsNewAdventurer = ?, " + "TerritoryType = ?, TerritoryId = ?, PosX = ?, PosY = ?, PosZ = ?, PosR = ?, " + "OTerritoryType = ?, OTerritoryId = ?, OPosX = ?, OPosY = ?, OPosZ = ?, OPosR = ?, " + "Class = ?, Status = ?, TotalPlayTime = ?, HomePoint = ?, FavoritePoint = ?, RestPoint = ?, " + "ActiveTitle = ?, TitleList = ?, Achievement = ?, Aetheryte = ?, HowTo = ?, Minions = ?, Mounts = ?, Orchestrion = ?, " + "EquippedMannequin = ?, ConfigFlags = ?, QuestCompleteFlags = ?, OpeningSequence = ?, " + "QuestTracking = ?, GrandCompany = ?, GrandCompanyRank = ?, Discovery = ?, GMRank = ?, EquipDisplayFlags = ?, Unlocks = ?, " + "CFPenaltyUntil = ?, Pose = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + + + prepareStatement( CHARA_SEL_MINIMAL, "SELECT Name, Customize, ModelEquip, TerritoryId, GuardianDeity, " + "Class, ContentId, BirthDay, BirthMonth " "FROM charainfo WHERE CharacterId = ?;", CONNECTION_SYNC ); + prepareStatement( CHARA_INS, "INSERT INTO charainfo (AccountId, CharacterId, ContentId, Name, Hp, Mp, " + "Customize, Voice, IsNewGame, TerritoryId, PosX, PosY, PosZ, PosR, ModelEquip, " + "IsNewAdventurer, GuardianDeity, Birthday, BirthMonth, Class, Status, FirstClass, " + "HomePoint, StartTown, Discovery, HowTo, QuestCompleteFlags, Unlocks, QuestTracking, " + "Aetheryte, GMRank, Mounts, Orchestrion, UPDATE_DATE ) " + "VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,NOW() );", + CONNECTION_SYNC ); - prepareStatement( CHARA_UP, - "UPDATE charainfo SET " - "Hp = ?, Mp = ?, Tp = ?, Gp = ?, Mode = ?, Mount = ?, InvincibleGM = ?, Voice = ?, " - "Customize = ?, ModelMainWeapon = ?, ModelSubWeapon = ?, ModelSystemWeapon = ?, " - "ModelEquip = ?, EmoteModeType = ?, Language = ?, IsNewGame = ?, IsNewAdventurer = ?, " - "TerritoryType = ?, TerritoryId = ?, PosX = ?, PosY = ?, PosZ = ?, PosR = ?, " - "OTerritoryType = ?, OTerritoryId = ?, OPosX = ?, OPosY = ?, OPosZ = ?, OPosR = ?, " - "Class = ?, Status = ?, TotalPlayTime = ?, HomePoint = ?, FavoritePoint = ?, RestPoint = ?, " - "ActiveTitle = ?, TitleList = ?, Achievement = ?, Aetheryte = ?, HowTo = ?, Minions = ?, Mounts = ?, Orchestrion = ?, " - "EquippedMannequin = ?, ConfigFlags = ?, QuestCompleteFlags = ?, OpeningSequence = ?, " - "QuestTracking = ?, GrandCompany = ?, GrandCompanyRank = ?, Discovery = ?, GMRank = ?, EquipDisplayFlags = ?, Unlocks = ?, " - "CFPenaltyUntil = ?, Pose = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_NAME, "UPDATE charainfo SET Name = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_HPMP, "UPDATE charainfo SET Hp = ?, Mp = ?, Tp = ?, Gp = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_MODE, "UPDATE charainfo SET Mode = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_MOUNT, "UPDATE charainfo SET Mount = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_INVINCIBLE, "UPDATE charainfo SET InvincibleGM = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_CUSTOMIZE, "UPDATE charainfo SET Customize = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_MODELMAINWEAP, "UPDATE charainfo SET ModelMainWeapon = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_MODELSUBWEAP, "UPDATE charainfo SET ModelSubWeapon = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_MODELSYSWEAP, "UPDATE charainfo SET ModelSystemWeapon = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_MODELEQUIP, "UPDATE charainfo SET ModelEquip = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_EMOTEMODETYPE, "UPDATE charainfo SET EmoteModeType = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_FIRSTLOGINTIME, "UPDATE charainfo SET FirstLoginTime = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_LANGUAGE, "UPDATE charainfo SET Language = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_ISNEWGAME, "UPDATE charainfo SET IsNewGame = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_ISNEWADV, "UPDATE charainfo SET IsNewAdventurer = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_TERRITORY, + "UPDATE charainfo SET TerritoryType = ?, TerritoryId = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_POS, + "UPDATE charainfo SET OPosX = ?, OPosY = ?, OPosZ = ?, OPosR = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_CLASS, "UPDATE charainfo SET Class = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_STATUS, "UPDATE charainfo SET Status = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_TOTALPLAYTIME, "UPDATE charainfo SET TotalPlayTime = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_HOMEPOINT, "UPDATE charainfo SET Homepoint = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_FAVOPOINT, "UPDATE charainfo SET FavoritePoint = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_TITLE, "UPDATE charainfo SET ActiveTitle = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_TITLELIST, "UPDATE charainfo SET TitleList = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_ACHIEVEMENTS, "UPDATE charainfo SET Achievement = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_AETHERYTE, "UPDATE charainfo SET Aetheryte = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_HOWTO, "UPDATE charainfo SET HowTo = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_MINIONS, "UPDATE charainfo SET Minions = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_MOUNTS, "UPDATE charainfo SET Mounts = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_GEARSET, "UPDATE charainfo SET EquippedMannequin = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_CONFIGFLAGS, "UPDATE charainfo SET ConfigFlags = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_QUESTCOMPLETE, "UPDATE charainfo SET QuestCompleteFlags = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_OPENINGSEQ, "UPDATE charainfo SET OpeningSequence = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_QUESTTRACKING, "UPDATE charainfo SET QuestTracking = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_GRANDCOMPANY, "UPDATE charainfo SET GrandCompany = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_GRANDCOMPANYRANKS, "UPDATE charainfo SET GrandCompanyRank = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_DISCOVERY, "UPDATE charainfo SET Discovery = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_GMRANK, "UPDATE charainfo SET GMRank = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_EQUIPDISPLAYFLAGS, "UPDATE charainfo SET EquipDisplayFlags = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_UNLOCKS, "UPDATE charainfo SET Unlocks = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_UP_CFPENATLY, "UPDATE charainfo SET CFPenaltyUntil = ? WHERE CharacterId = ?;", + CONNECTION_ASYNC ); + /// SEARCH INFO + prepareStatement( CHARA_SEARCHINFO_INS, + "INSERT INTO charainfosearch (CharacterId, UPDATE_DATE ) VALUES ( ?, NOW() );", CONNECTION_BOTH ); + prepareStatement( CHARA_SEARCHINFO_UP_SELECTCLASS, + "UPDATE charainfosearch SET SelectClassId = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_SEARCHINFO_UP_SELECTREGION, + "UPDATE charainfosearch SET SelectRegion = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_SEARCHINFO_UP_SEARCHCOMMENT, + "UPDATE charainfosearch SET SearchComment = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_SEARCHINFO_SEL, "SELECT * FROM charainfosearch WHERE CharacterId = ?;", CONNECTION_SYNC ); - prepareStatement( CHARA_SEL_MINIMAL, "SELECT Name, Customize, ModelEquip, TerritoryId, GuardianDeity, " - "Class, ContentId, BirthDay, BirthMonth " - "FROM charainfo WHERE CharacterId = ?;", CONNECTION_SYNC ); + /// QUEST INFO + prepareStatement( CHARA_QUEST_INS, + "INSERT INTO charaquestnew ( CharacterId, SlotId, QuestId, Sequence, Flags, Variables_0, " + "Variables_1, Variables_2, Variables_3, Variables_4, " + "Variables_5, Variables_6 ) VALUES( ?,?,?,?,?,?,?,?,?,?,?,? );", CONNECTION_ASYNC ); - prepareStatement( CHARA_INS, "INSERT INTO charainfo (AccountId, CharacterId, ContentId, Name, Hp, Mp, " - "Customize, Voice, IsNewGame, TerritoryId, PosX, PosY, PosZ, PosR, ModelEquip, " - "IsNewAdventurer, GuardianDeity, Birthday, BirthMonth, Class, Status, FirstClass, " - "HomePoint, StartTown, Discovery, HowTo, QuestCompleteFlags, Unlocks, QuestTracking, " - "Aetheryte, GMRank, Mounts, Orchestrion, UPDATE_DATE ) " - "VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,NOW() );", - CONNECTION_SYNC ); + prepareStatement( CHARA_QUEST_UP, "UPDATE charaquestnew SET Sequence = ?, Flags = ?, Variables_0 = ?, " + "Variables_1 = ?, Variables_2 = ?, Variables_3 = ?, " + "Variables_4 = ?, Variables_5 = ?, Variables_6 = ? " + "WHERE CharacterId = ? AND QuestId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_NAME, "UPDATE charainfo SET Name = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_HPMP, "UPDATE charainfo SET Hp = ?, Mp = ?, Tp = ?, Gp = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_MODE, "UPDATE charainfo SET Mode = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_MOUNT, "UPDATE charainfo SET Mount = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_INVINCIBLE, "UPDATE charainfo SET InvincibleGM = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_CUSTOMIZE, "UPDATE charainfo SET Customize = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_MODELMAINWEAP, "UPDATE charainfo SET ModelMainWeapon = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_MODELSUBWEAP, "UPDATE charainfo SET ModelSubWeapon = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_MODELSYSWEAP, "UPDATE charainfo SET ModelSystemWeapon = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_MODELEQUIP, "UPDATE charainfo SET ModelEquip = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_EMOTEMODETYPE, "UPDATE charainfo SET EmoteModeType = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_FIRSTLOGINTIME, "UPDATE charainfo SET FirstLoginTime = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_LANGUAGE, "UPDATE charainfo SET Language = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_ISNEWGAME, "UPDATE charainfo SET IsNewGame = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_ISNEWADV, "UPDATE charainfo SET IsNewAdventurer = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_TERRITORY, "UPDATE charainfo SET TerritoryType = ?, TerritoryId = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_POS, "UPDATE charainfo SET OPosX = ?, OPosY = ?, OPosZ = ?, OPosR = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_CLASS, "UPDATE charainfo SET Class = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_STATUS, "UPDATE charainfo SET Status = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_TOTALPLAYTIME, "UPDATE charainfo SET TotalPlayTime = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_HOMEPOINT, "UPDATE charainfo SET Homepoint = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_FAVOPOINT, "UPDATE charainfo SET FavoritePoint = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_TITLE, "UPDATE charainfo SET ActiveTitle = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_TITLELIST, "UPDATE charainfo SET TitleList = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_ACHIEVEMENTS, "UPDATE charainfo SET Achievement = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_AETHERYTE, "UPDATE charainfo SET Aetheryte = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_HOWTO, "UPDATE charainfo SET HowTo = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_MINIONS, "UPDATE charainfo SET Minions = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_MOUNTS, "UPDATE charainfo SET Mounts = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_GEARSET, "UPDATE charainfo SET EquippedMannequin = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_CONFIGFLAGS, "UPDATE charainfo SET ConfigFlags = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_QUESTCOMPLETE, "UPDATE charainfo SET QuestCompleteFlags = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_OPENINGSEQ, "UPDATE charainfo SET OpeningSequence = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_QUESTTRACKING, "UPDATE charainfo SET QuestTracking = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_GRANDCOMPANY, "UPDATE charainfo SET GrandCompany = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_GRANDCOMPANYRANKS, "UPDATE charainfo SET GrandCompanyRank = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_DISCOVERY, "UPDATE charainfo SET Discovery = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_GMRANK, "UPDATE charainfo SET GMRank = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_EQUIPDISPLAYFLAGS, "UPDATE charainfo SET EquipDisplayFlags = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_UNLOCKS, "UPDATE charainfo SET Unlocks = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_UP_CFPENATLY, "UPDATE charainfo SET CFPenaltyUntil = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); + prepareStatement( CHARA_QUEST_DEL, "DELETE FROM charaquestnew WHERE CharacterId = ? AND QuestId = ?;", + CONNECTION_ASYNC ); - /// SEARCH INFO - prepareStatement( CHARA_SEARCHINFO_INS, "INSERT INTO charainfosearch (CharacterId, UPDATE_DATE ) VALUES ( ?, NOW() );", CONNECTION_BOTH ); - prepareStatement( CHARA_SEARCHINFO_UP_SELECTCLASS, "UPDATE charainfosearch SET SelectClassId = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_SEARCHINFO_UP_SELECTREGION, "UPDATE charainfosearch SET SelectRegion = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_SEARCHINFO_UP_SEARCHCOMMENT, "UPDATE charainfosearch SET SearchComment = ? WHERE CharacterId = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_SEARCHINFO_SEL, "SELECT * FROM charainfosearch WHERE CharacterId = ?;", CONNECTION_SYNC ); + prepareStatement( CHARA_QUEST_SEL, "SELECT * FROM charaquestnew WHERE CharacterId = ?;", CONNECTION_SYNC ); - /// QUEST INFO - prepareStatement( CHARA_QUEST_INS, "INSERT INTO charaquestnew ( CharacterId, SlotId, QuestId, Sequence, Flags, Variables_0, " - "Variables_1, Variables_2, Variables_3, Variables_4, " - "Variables_5, Variables_6 ) VALUES( ?,?,?,?,?,?,?,?,?,?,?,? );", CONNECTION_ASYNC ); - - prepareStatement( CHARA_QUEST_UP, "UPDATE charaquestnew SET Sequence = ?, Flags = ?, Variables_0 = ?, " - "Variables_1 = ?, Variables_2 = ?, Variables_3 = ?, " - "Variables_4 = ?, Variables_5 = ?, Variables_6 = ? " - "WHERE CharacterId = ? AND QuestId = ?;", CONNECTION_ASYNC ); - - prepareStatement( CHARA_QUEST_DEL, "DELETE FROM charaquestnew WHERE CharacterId = ? AND QuestId = ?;", CONNECTION_ASYNC ); - - prepareStatement( CHARA_QUEST_SEL, "SELECT * FROM charaquestnew WHERE CharacterId = ?;", CONNECTION_SYNC ); - - /// CLASS INFO - prepareStatement( CHARA_CLASS_SEL, "SELECT ClassIdx, Exp, Lvl FROM characlass WHERE CharacterId = ?;", CONNECTION_SYNC ); - prepareStatement( CHARA_CLASS_INS, "INSERT INTO characlass ( CharacterId, ClassIdx, Exp, Lvl ) VALUES( ?,?,?,? );", CONNECTION_BOTH ); - prepareStatement( CHARA_CLASS_UP, "UPDATE characlass SET Exp = ?, Lvl = ? WHERE CharacterId = ? AND ClassIdx = ?;", CONNECTION_ASYNC ); - prepareStatement( CHARA_CLASS_DEL, "DELETE FROM characlass WHERE CharacterId = ?;", CONNECTION_ASYNC ); - - /// INVENTORY INFO - prepareStatement( CHARA_ITEMINV_INS, "INSERT INTO charaiteminventory ( CharacterId, storageId, UPDATE_DATE ) VALUES ( ?, ?, NOW() );", CONNECTION_BOTH ); - - /// ITEM GLOBAL - prepareStatement( CHARA_ITEMGLOBAL_INS, "INSERT INTO charaglobalitem ( CharacterId, ItemId, catalogId, UPDATE_DATE ) VALUES ( ?, ?, ?, NOW() );", CONNECTION_BOTH ); + /// CLASS INFO + prepareStatement( CHARA_CLASS_SEL, "SELECT ClassIdx, Exp, Lvl FROM characlass WHERE CharacterId = ?;", + CONNECTION_SYNC ); + prepareStatement( CHARA_CLASS_INS, "INSERT INTO characlass ( CharacterId, ClassIdx, Exp, Lvl ) VALUES( ?,?,?,? );", + CONNECTION_BOTH ); + prepareStatement( CHARA_CLASS_UP, "UPDATE characlass SET Exp = ?, Lvl = ? WHERE CharacterId = ? AND ClassIdx = ?;", + CONNECTION_ASYNC ); + prepareStatement( CHARA_CLASS_DEL, "DELETE FROM characlass WHERE CharacterId = ?;", CONNECTION_ASYNC ); + /// INVENTORY INFO + prepareStatement( CHARA_ITEMINV_INS, + "INSERT INTO charaiteminventory ( CharacterId, storageId, UPDATE_DATE ) VALUES ( ?, ?, NOW() );", + CONNECTION_BOTH ); + /// ITEM GLOBAL + prepareStatement( CHARA_ITEMGLOBAL_INS, + "INSERT INTO charaglobalitem ( CharacterId, ItemId, catalogId, UPDATE_DATE ) VALUES ( ?, ?, ?, NOW() );", + CONNECTION_BOTH ); } diff --git a/src/common/Database/CharaDbConnection.h b/src/common/Database/CharaDbConnection.h index e747a0c2..d595158d 100644 --- a/src/common/Database/CharaDbConnection.h +++ b/src/common/Database/CharaDbConnection.h @@ -3,93 +3,94 @@ #include "DbConnection.h" -namespace Core -{ -namespace Db -{ +namespace Core { +namespace Db { class DbConnectionInfo; -enum CharaDbStatements : uint32_t +enum CharaDbStatements : + uint32_t { - CHARA_SEL, - CHARA_SEL_MINIMAL, - CHARA_SEARCHINFO_SEL, - CHARA_QUEST_SEL, - CHARA_INS, - CHARA_UP, - CHARA_UP_NAME, - CHARA_UP_HPMP, - CHARA_UP_MODE, - CHARA_UP_MOUNT, - CHARA_UP_INVINCIBLE, - CHARA_UP_CUSTOMIZE, - CHARA_UP_MODELMAINWEAP, - CHARA_UP_MODELSUBWEAP, - CHARA_UP_MODELSYSWEAP, - CHARA_UP_MODELEQUIP, - CHARA_UP_EMOTEMODETYPE, - CHARA_UP_FIRSTLOGINTIME, - CHARA_UP_LANGUAGE, - CHARA_UP_ISNEWGAME, - CHARA_UP_ISNEWADV, - CHARA_UP_TERRITORY, - CHARA_UP_POS, - CHARA_UP_CLASS, - CHARA_UP_STATUS, - CHARA_UP_TOTALPLAYTIME, - CHARA_UP_HOMEPOINT, - CHARA_UP_FAVOPOINT, - CHARA_UP_TITLE, - CHARA_UP_TITLELIST, - CHARA_UP_ACHIEVEMENTS, - CHARA_UP_AETHERYTE, - CHARA_UP_HOWTO, - CHARA_UP_MINIONS, - CHARA_UP_MOUNTS, - CHARA_UP_GEARSET, - CHARA_UP_CONFIGFLAGS, - CHARA_UP_QUESTCOMPLETE, - CHARA_UP_OPENINGSEQ, - CHARA_UP_QUESTTRACKING, - CHARA_UP_GRANDCOMPANY, - CHARA_UP_GRANDCOMPANYRANKS, - CHARA_UP_DISCOVERY, - CHARA_UP_GMRANK, - CHARA_UP_EQUIPDISPLAYFLAGS, - CHARA_UP_UNLOCKS, - CHARA_UP_CFPENATLY, - CHARA_SEARCHINFO_INS, - CHARA_SEARCHINFO_UP_SELECTCLASS, - CHARA_SEARCHINFO_UP_SELECTREGION, - CHARA_SEARCHINFO_UP_SEARCHCOMMENT, + CHARA_SEL, + CHARA_SEL_MINIMAL, + CHARA_SEARCHINFO_SEL, + CHARA_QUEST_SEL, + CHARA_INS, + CHARA_UP, + CHARA_UP_NAME, + CHARA_UP_HPMP, + CHARA_UP_MODE, + CHARA_UP_MOUNT, + CHARA_UP_INVINCIBLE, + CHARA_UP_CUSTOMIZE, + CHARA_UP_MODELMAINWEAP, + CHARA_UP_MODELSUBWEAP, + CHARA_UP_MODELSYSWEAP, + CHARA_UP_MODELEQUIP, + CHARA_UP_EMOTEMODETYPE, + CHARA_UP_FIRSTLOGINTIME, + CHARA_UP_LANGUAGE, + CHARA_UP_ISNEWGAME, + CHARA_UP_ISNEWADV, + CHARA_UP_TERRITORY, + CHARA_UP_POS, + CHARA_UP_CLASS, + CHARA_UP_STATUS, + CHARA_UP_TOTALPLAYTIME, + CHARA_UP_HOMEPOINT, + CHARA_UP_FAVOPOINT, + CHARA_UP_TITLE, + CHARA_UP_TITLELIST, + CHARA_UP_ACHIEVEMENTS, + CHARA_UP_AETHERYTE, + CHARA_UP_HOWTO, + CHARA_UP_MINIONS, + CHARA_UP_MOUNTS, + CHARA_UP_GEARSET, + CHARA_UP_CONFIGFLAGS, + CHARA_UP_QUESTCOMPLETE, + CHARA_UP_OPENINGSEQ, + CHARA_UP_QUESTTRACKING, + CHARA_UP_GRANDCOMPANY, + CHARA_UP_GRANDCOMPANYRANKS, + CHARA_UP_DISCOVERY, + CHARA_UP_GMRANK, + CHARA_UP_EQUIPDISPLAYFLAGS, + CHARA_UP_UNLOCKS, + CHARA_UP_CFPENATLY, + CHARA_SEARCHINFO_INS, + CHARA_SEARCHINFO_UP_SELECTCLASS, + CHARA_SEARCHINFO_UP_SELECTREGION, + CHARA_SEARCHINFO_UP_SEARCHCOMMENT, - CHARA_QUEST_INS, - CHARA_QUEST_UP, - CHARA_QUEST_DEL, + CHARA_QUEST_INS, + CHARA_QUEST_UP, + CHARA_QUEST_DEL, - CHARA_CLASS_SEL, - CHARA_CLASS_INS, - CHARA_CLASS_UP, - CHARA_CLASS_DEL, + CHARA_CLASS_SEL, + CHARA_CLASS_INS, + CHARA_CLASS_UP, + CHARA_CLASS_DEL, - CHARA_ITEMINV_INS, + CHARA_ITEMINV_INS, - CHARA_ITEMGLOBAL_INS, + CHARA_ITEMGLOBAL_INS, - MAX_STATEMENTS + MAX_STATEMENTS }; -class CharaDbConnection : public DbConnection +class CharaDbConnection : + public DbConnection { public: - using Statements = CharaDbStatements; + using Statements = CharaDbStatements; - CharaDbConnection( ConnectionInfo& connInfo ); - CharaDbConnection( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* q, ConnectionInfo &connInfo ); + CharaDbConnection( ConnectionInfo& connInfo ); - ~CharaDbConnection(); + CharaDbConnection( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* q, ConnectionInfo& connInfo ); - void doPrepareStatements() override; + ~CharaDbConnection(); + + void doPrepareStatements() override; }; diff --git a/src/common/Database/DbConnection.cpp b/src/common/Database/DbConnection.cpp index 366fc954..3eb7a4d5 100644 --- a/src/common/Database/DbConnection.cpp +++ b/src/common/Database/DbConnection.cpp @@ -9,241 +9,242 @@ extern Core::Framework g_fw; -Core::Db::DbConnection::DbConnection( ConnectionInfo &connInfo ) : - m_reconnecting( false ), - m_prepareError( false ), - m_queue( nullptr ), - m_pConnection( nullptr ), - m_connectionInfo( connInfo ), - m_connectionFlags( CONNECTION_SYNC ) +Core::Db::DbConnection::DbConnection( ConnectionInfo& connInfo ) : + m_reconnecting( false ), + m_prepareError( false ), + m_queue( nullptr ), + m_pConnection( nullptr ), + m_connectionInfo( connInfo ), + m_connectionFlags( CONNECTION_SYNC ) { } Core::Db::DbConnection::DbConnection( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* queue, Core::Db::ConnectionInfo& connInfo ) : - m_reconnecting( false ), - m_prepareError( false ), - m_queue( queue ), - m_pConnection( nullptr ), - m_connectionInfo( connInfo ), - m_connectionFlags( CONNECTION_ASYNC ) + m_reconnecting( false ), + m_prepareError( false ), + m_queue( queue ), + m_pConnection( nullptr ), + m_connectionInfo( connInfo ), + m_connectionFlags( CONNECTION_ASYNC ) { - m_worker = boost::make_shared< DbWorker >( m_queue, this ); + m_worker = boost::make_shared< DbWorker >( m_queue, this ); } Core::Db::DbConnection::~DbConnection() { - close(); + close(); } void Core::Db::DbConnection::close() { - m_worker.reset(); - m_stmts.clear(); + m_worker.reset(); + m_stmts.clear(); - if( m_pConnection ) - { - m_pConnection->close(); - m_pConnection.reset(); - } + if( m_pConnection ) + { + m_pConnection->close(); + m_pConnection.reset(); + } } uint32_t Core::Db::DbConnection::open() { - boost::shared_ptr< Mysql::MySqlBase > base( new Mysql::MySqlBase() ); - Mysql::optionMap options; - options[ MYSQL_OPT_RECONNECT ] = "1"; - options[ MYSQL_SET_CHARSET_NAME ] = "utf8"; + boost::shared_ptr< Mysql::MySqlBase > base( new Mysql::MySqlBase() ); + Mysql::optionMap options; + options[ MYSQL_OPT_RECONNECT ] = "1"; + options[ MYSQL_SET_CHARSET_NAME ] = "utf8"; - try - { - m_pConnection = base->connect( m_connectionInfo.host, m_connectionInfo.user, m_connectionInfo.password, - options, m_connectionInfo.port ); + try + { + m_pConnection = base->connect( m_connectionInfo.host, m_connectionInfo.user, m_connectionInfo.password, + options, m_connectionInfo.port ); - m_pConnection->setSchema( m_connectionInfo.database ); - } - catch( std::runtime_error& e ) - { - g_fw.get< Logger >()->error( e.what() ); - return 1; - } + m_pConnection->setSchema( m_connectionInfo.database ); + } + catch( std::runtime_error& e ) + { + g_fw.get< Logger >()->error( e.what() ); + return 1; + } - return 0; + return 0; } uint32_t Core::Db::DbConnection::getLastError() { - return m_pConnection->getErrorNo(); + return m_pConnection->getErrorNo(); } bool Core::Db::DbConnection::ping() { - return m_pConnection->ping(); + return m_pConnection->ping(); } bool Core::Db::DbConnection::lockIfReady() { - return m_mutex.try_lock(); + return m_mutex.try_lock(); } void Core::Db::DbConnection::unlock() { - m_mutex.unlock(); + m_mutex.unlock(); } void Core::Db::DbConnection::beginTransaction() { - m_pConnection->beginTransaction(); + m_pConnection->beginTransaction(); } void Core::Db::DbConnection::rollbackTransaction() { - m_pConnection->rollbackTransaction(); + m_pConnection->rollbackTransaction(); } void Core::Db::DbConnection::commitTransaction() { - m_pConnection->commitTransaction(); + m_pConnection->commitTransaction(); } bool Core::Db::DbConnection::execute( const std::string& sql ) { - try - { - auto stmt = m_pConnection->createStatement(); - bool result = stmt->execute( sql ); - return result; - } - catch( std::runtime_error& e ) - { - g_fw.get< Logger >()->error( e.what() ); - return false; - } + try + { + auto stmt = m_pConnection->createStatement(); + bool result = stmt->execute( sql ); + return result; + } + catch( std::runtime_error& e ) + { + g_fw.get< Logger >()->error( e.what() ); + return false; + } } boost::shared_ptr< Mysql::ResultSet > Core::Db::DbConnection::query( const std::string& sql ) { - try - { - auto stmt = m_pConnection->createStatement(); - auto result = stmt->executeQuery( sql ); - return result; - } - catch( std::runtime_error& e ) - { - g_fw.get< Logger >()->error( e.what() ); - return nullptr; - } + try + { + auto stmt = m_pConnection->createStatement(); + auto result = stmt->executeQuery( sql ); + return result; + } + catch( std::runtime_error& e ) + { + g_fw.get< Logger >()->error( e.what() ); + return nullptr; + } } -boost::shared_ptr< Mysql::ResultSet > Core::Db::DbConnection::query( boost::shared_ptr< Core::Db::PreparedStatement > stmt ) +boost::shared_ptr< Mysql::ResultSet > +Core::Db::DbConnection::query( boost::shared_ptr< Core::Db::PreparedStatement > stmt ) { - boost::shared_ptr< Mysql::ResultSet > res( nullptr ); - if( !stmt ) + boost::shared_ptr< Mysql::ResultSet > res( nullptr ); + if( !stmt ) + return nullptr; + + if( !ping() ) + { + // naivly reconnect and hope for the best + open(); + lockIfReady(); + if( !prepareStatements() ) return nullptr; + } - if( !ping() ) - { - // naivly reconnect and hope for the best - open(); - lockIfReady(); - if( !prepareStatements() ) - return nullptr; - } + uint32_t index = stmt->getIndex(); - uint32_t index = stmt->getIndex(); + auto pStmt = getPreparedStatement( index ); - auto pStmt = getPreparedStatement( index ); + if( !pStmt ) + return nullptr; - if( !pStmt ) - return nullptr; + stmt->setMysqlPS( pStmt ); + try + { + stmt->bindParameters(); + return pStmt->executeQuery(); + } + catch( std::runtime_error& e ) + { + g_fw.get< Logger >()->error( e.what() ); + return nullptr; + } - stmt->setMysqlPS( pStmt ); - try - { - stmt->bindParameters(); - return pStmt->executeQuery(); - } - catch( std::runtime_error& e ) - { - g_fw.get< Logger >()->error( e.what() ); - return nullptr; - } - } bool Core::Db::DbConnection::execute( boost::shared_ptr< Core::Db::PreparedStatement > stmt ) { - if( !stmt ) - return false; + if( !stmt ) + return false; - uint32_t index = stmt->getIndex(); + uint32_t index = stmt->getIndex(); - auto pStmt = getPreparedStatement( index ); + auto pStmt = getPreparedStatement( index ); - if( !pStmt ) - return false; + if( !pStmt ) + return false; - stmt->setMysqlPS( pStmt ); - try - { - stmt->bindParameters(); - return pStmt->execute(); - } - catch( std::runtime_error& e ) - { - g_fw.get< Logger >()->error( e.what() ); - return false; - } + stmt->setMysqlPS( pStmt ); + try + { + stmt->bindParameters(); + return pStmt->execute(); + } + catch( std::runtime_error& e ) + { + g_fw.get< Logger >()->error( e.what() ); + return false; + } } boost::shared_ptr< Mysql::PreparedStatement > Core::Db::DbConnection::getPreparedStatement( uint32_t index ) { - assert( index < m_stmts.size() ); - auto ret = m_stmts[index]; - if( !ret ) - nullptr; + assert( index < m_stmts.size() ); + auto ret = m_stmts[ index ]; + if( !ret ) + nullptr; - return ret; + return ret; } -void Core::Db::DbConnection::prepareStatement( uint32_t index, const std::string &sql, Core::Db::ConnectionFlags flags ) +void Core::Db::DbConnection::prepareStatement( uint32_t index, const std::string& sql, Core::Db::ConnectionFlags flags ) { - m_queries.insert( PreparedStatementMap::value_type( index, std::make_pair( sql, flags ) ) ); + m_queries.insert( PreparedStatementMap::value_type( index, std::make_pair( sql, flags ) ) ); - // Check if specified query should be prepared on this connection - // i.e. don't prepare async statements on synchronous connections - // to save memory that will not be used. - if( !( m_connectionFlags & flags ) ) - { - m_stmts[index].reset(); - return; - } + // Check if specified query should be prepared on this connection + // i.e. don't prepare async statements on synchronous connections + // to save memory that will not be used. + if( !( m_connectionFlags & flags ) ) + { + m_stmts[ index ].reset(); + return; + } - boost::shared_ptr< Mysql::PreparedStatement > pStmt( nullptr ); + boost::shared_ptr< Mysql::PreparedStatement > pStmt( nullptr ); - try - { - pStmt = m_pConnection->prepareStatement( sql ); - } - catch( std::runtime_error& e ) - { - g_fw.get< Logger >()->error( e.what() ); - m_prepareError = true; - } + try + { + pStmt = m_pConnection->prepareStatement( sql ); + } + catch( std::runtime_error& e ) + { + g_fw.get< Logger >()->error( e.what() ); + m_prepareError = true; + } - m_stmts[index] = boost::shared_ptr< Mysql::PreparedStatement >( pStmt ); + m_stmts[ index ] = boost::shared_ptr< Mysql::PreparedStatement >( pStmt ); } bool Core::Db::DbConnection::prepareStatements() { - doPrepareStatements(); - return !m_prepareError; + doPrepareStatements(); + return !m_prepareError; } diff --git a/src/common/Database/DbConnection.h b/src/common/Database/DbConnection.h index d0fb81d5..fda87691 100644 --- a/src/common/Database/DbConnection.h +++ b/src/common/Database/DbConnection.h @@ -10,98 +10,117 @@ #include #include -namespace Mysql -{ - class Connection; - class ResultSet; - class PreparedResultSet; - class PreparedStatement; +namespace Mysql { +class Connection; + +class ResultSet; + +class PreparedResultSet; + +class PreparedStatement; } -namespace Core +namespace Core { +namespace Db { +class DatabaseWorker; + +class PreparedStatement; + +class Operation; + +class DbWorker; + +using PreparedStmtScopedPtr = boost::scoped_ptr< PreparedStatement >; + +enum ConnectionFlags { -namespace Db + CONNECTION_ASYNC = 0x1, + CONNECTION_SYNC = 0x2, + CONNECTION_BOTH = CONNECTION_ASYNC | CONNECTION_SYNC +}; + +struct ConnectionInfo { - class DatabaseWorker; - class PreparedStatement; - class Operation; - class DbWorker; + std::string user; + std::string password; + std::string database; + std::string host; + uint16_t port; + uint8_t syncThreads; + uint8_t asyncThreads; +}; - using PreparedStmtScopedPtr = boost::scoped_ptr< PreparedStatement >; +using PreparedStatementMap = std::map< uint32_t, std::pair< std::string, ConnectionFlags > >; - enum ConnectionFlags - { - CONNECTION_ASYNC = 0x1, - CONNECTION_SYNC = 0x2, - CONNECTION_BOTH = CONNECTION_ASYNC | CONNECTION_SYNC - }; +class DbConnection : + public boost::enable_shared_from_this< DbConnection > +{ +public: + // Constructor for synchronous connections. + DbConnection( ConnectionInfo& connInfo ); - struct ConnectionInfo - { - std::string user; - std::string password; - std::string database; - std::string host; - uint16_t port; - uint8_t syncThreads; - uint8_t asyncThreads; - }; + // Constructor for asynchronous connections. + DbConnection( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* queue, ConnectionInfo& connInfo ); - using PreparedStatementMap = std::map< uint32_t, std::pair< std::string, ConnectionFlags > >; + virtual ~DbConnection(); - class DbConnection : public boost::enable_shared_from_this< DbConnection > - { - public: - // Constructor for synchronous connections. - DbConnection( ConnectionInfo& connInfo ); - // Constructor for asynchronous connections. - DbConnection( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* queue, ConnectionInfo& connInfo ); - virtual ~DbConnection(); + virtual uint32_t open(); - virtual uint32_t open(); - void close(); + void close(); - bool prepareStatements(); + bool prepareStatements(); - bool execute( const std::string& sql ); - bool execute( boost::shared_ptr< PreparedStatement > stmt ); - boost::shared_ptr< Mysql::ResultSet > query( const std::string& sql ); - boost::shared_ptr< Mysql::ResultSet > query( boost::shared_ptr< PreparedStatement > stmt ); + bool execute( const std::string& sql ); - void beginTransaction(); - void rollbackTransaction(); - void commitTransaction(); - - bool ping(); + bool execute( boost::shared_ptr< PreparedStatement > stmt ); - uint32_t getLastError(); - bool lockIfReady(); + boost::shared_ptr< Mysql::ResultSet > query( const std::string& sql ); - void unlock(); + boost::shared_ptr< Mysql::ResultSet > query( boost::shared_ptr< PreparedStatement > stmt ); - boost::shared_ptr< Mysql::Connection > getConnection() { return m_pConnection; } - boost::shared_ptr< Mysql::PreparedStatement > getPreparedStatement( uint32_t index ); - void prepareStatement( uint32_t index, const std::string& sql, ConnectionFlags flags ); + void beginTransaction(); - virtual void doPrepareStatements() = 0; + void rollbackTransaction(); - protected: - std::vector< boost::shared_ptr< Mysql::PreparedStatement > > m_stmts; - PreparedStatementMap m_queries; - bool m_reconnecting; - bool m_prepareError; + void commitTransaction(); - private: - LockedWaitQueue< boost::shared_ptr< Operation > >* m_queue; - boost::shared_ptr< DbWorker > m_worker; - boost::shared_ptr< Mysql::Connection > m_pConnection; - ConnectionInfo& m_connectionInfo; - ConnectionFlags m_connectionFlags; - std::mutex m_mutex; + bool ping(); - DbConnection( DbConnection const& right ) = delete; - DbConnection& operator=( DbConnection const& right ) = delete; - }; + uint32_t getLastError(); + + bool lockIfReady(); + + void unlock(); + + boost::shared_ptr< Mysql::Connection > getConnection() + { + return m_pConnection; + } + + boost::shared_ptr< Mysql::PreparedStatement > getPreparedStatement( uint32_t index ); + + void prepareStatement( uint32_t index, const std::string& sql, ConnectionFlags flags ); + + virtual void doPrepareStatements() = 0; + +protected: + std::vector< boost::shared_ptr< Mysql::PreparedStatement > > m_stmts; + PreparedStatementMap m_queries; + bool m_reconnecting; + bool m_prepareError; + +private: + LockedWaitQueue< boost::shared_ptr< Operation > >* m_queue; + boost::shared_ptr< DbWorker > m_worker; + boost::shared_ptr< Mysql::Connection > m_pConnection; + ConnectionInfo& m_connectionInfo; + ConnectionFlags m_connectionFlags; + std::mutex m_mutex; + + DbConnection( DbConnection const& right ) = delete; + + DbConnection& operator=( DbConnection const& right ) = delete; +}; } } diff --git a/src/common/Database/DbLoader.cpp b/src/common/Database/DbLoader.cpp index 56cd4be2..748c3c11 100644 --- a/src/common/Database/DbLoader.cpp +++ b/src/common/Database/DbLoader.cpp @@ -11,102 +11,104 @@ Core::Db::DbLoader::DbLoader() { } -template +template< class T > Core::Db::DbLoader& Core::Db::DbLoader::addDb( Core::Db::DbWorkerPool< T >& pool, const ConnectionInfo& info ) { - m_open.push([this, info, &pool]() -> bool - { - + m_open.push( [ this, info, &pool ]()->bool + { + auto pLog = g_fw.get< Logger >(); const uint8_t asyncThreads = info.asyncThreads; const uint8_t synchThreads = info.syncThreads; if( asyncThreads < 1 || asyncThreads > 32 ) { - pLog->error( "database: invalid number of worker threads specified. Please pick a value between 1 and 32." ); - return false; + pLog->error( + "database: invalid number of worker threads specified. Please pick a value between 1 and 32." ); + return false; } pool.setConnectionInfo( info, asyncThreads, synchThreads ); if( uint32_t error = pool.open() ) { - // Database does not exist - if( error == ER_BAD_DB_ERROR ) - { - return false; - } + // Database does not exist + if( error == ER_BAD_DB_ERROR ) + { + return false; + } - if( error ) - { - pLog->error( "DatabasePool failed to open." ); - return false; - } + if( error ) + { + pLog->error( "DatabasePool failed to open." ); + return false; + } } - m_close.push( [&pool] { pool.close(); } ); + m_close.push( [ &pool ] + { pool.close(); } ); return true; - }); + } ); - m_prepare.push([this, info, &pool]() -> bool - { + m_prepare.push( [ this, info, &pool ]()->bool + { if( !pool.prepareStatements() ) { - auto pLog = g_fw.get< Logger >(); - pLog->error( "Could not prepare statements of the database, see log for details." ); - return false; + auto pLog = g_fw.get< Logger >(); + pLog->error( "Could not prepare statements of the database, see log for details." ); + return false; } return true; - }); + } ); - return *this; + return *this; } bool Core::Db::DbLoader::initDbs() { - if( !openDatabases() ) - return false; + if( !openDatabases() ) + return false; - if( !prepareStatements() ) - return false; + if( !prepareStatements() ) + return false; - return true; + return true; } bool Core::Db::DbLoader::openDatabases() { - return process( m_open ); + return process( m_open ); } bool Core::Db::DbLoader::prepareStatements() { - return process( m_prepare ); + return process( m_prepare ); } bool Core::Db::DbLoader::process( std::queue< Predicate >& queue ) { - while( !queue.empty() ) - { - if( !queue.front()() ) + while( !queue.empty() ) + { + if( !queue.front()() ) + { + // Close all open databases which have a registered close operation + while( !m_close.empty() ) { - // Close all open databases which have a registered close operation - while( !m_close.empty() ) - { - m_close.top()(); - m_close.pop(); - } - - return false; + m_close.top()(); + m_close.pop(); } - queue.pop(); - } - return true; + return false; + } + + queue.pop(); + } + return true; } template Core::Db::DbLoader& - Core::Db::DbLoader::addDb< Core::Db::CharaDbConnection >( Core::Db::DbWorkerPool< Core::Db::CharaDbConnection >&, - const ConnectionInfo& ); +Core::Db::DbLoader::addDb< Core::Db::CharaDbConnection >( Core::Db::DbWorkerPool< Core::Db::CharaDbConnection >&, + const ConnectionInfo& ); diff --git a/src/common/Database/DbLoader.h b/src/common/Database/DbLoader.h index acbb6944..46070de5 100644 --- a/src/common/Database/DbLoader.h +++ b/src/common/Database/DbLoader.h @@ -8,44 +8,43 @@ #include #include "DbConnection.h" -namespace Core +namespace Core { +namespace Db { + +template< class T > +class DbWorkerPool; + +class DbLoader { - namespace Db - { +public: + DbLoader(); - template< class T > - class DbWorkerPool; + template< class T > + DbLoader& addDb( DbWorkerPool< T >& pool, const ConnectionInfo& info ); - class DbLoader - { - public: - DbLoader(); + bool initDbs(); - template< class T > - DbLoader& addDb( DbWorkerPool< T >& pool, const ConnectionInfo& info ); + enum DbTypeFlags + { + DATABASE_NONE = 0, + DATABASE_CHARACTER = 1, + DATABASE_MASK_ALL = DATABASE_CHARACTER + }; - bool initDbs(); +private: + bool openDatabases(); - enum DbTypeFlags - { - DATABASE_NONE = 0, - DATABASE_CHARACTER = 1, - DATABASE_MASK_ALL = DATABASE_CHARACTER - }; + bool prepareStatements(); - private: - bool openDatabases(); - bool prepareStatements(); + using Predicate = std::function< bool() >; + using Closer = std::function< void() >; - using Predicate = std::function< bool() >; - using Closer = std::function< void() >; + bool process( std::queue< Predicate >& queue ); - bool process( std::queue< Predicate >& queue ); - - std::queue< Predicate > m_open; - std::queue< Predicate > m_prepare; - std::stack< Closer > m_close; - }; + std::queue< Predicate > m_open; + std::queue< Predicate > m_prepare; + std::stack< Closer > m_close; +}; } } diff --git a/src/common/Database/DbWorker.cpp b/src/common/Database/DbWorker.cpp index 1888419e..b184b82f 100644 --- a/src/common/Database/DbWorker.cpp +++ b/src/common/Database/DbWorker.cpp @@ -4,34 +4,34 @@ Core::Db::DbWorker::DbWorker( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* newQueue, DbConnection* pConn ) { - m_pConn = pConn; - m_queue = newQueue; - m_cancelationToken = false; - m_workerThread = std::thread( &DbWorker::workerThread, this ); + m_pConn = pConn; + m_queue = newQueue; + m_cancelationToken = false; + m_workerThread = std::thread( &DbWorker::workerThread, this ); } Core::Db::DbWorker::~DbWorker() { - m_cancelationToken = true; - m_queue->cancel(); - m_workerThread.join(); + m_cancelationToken = true; + m_queue->cancel(); + m_workerThread.join(); } void Core::Db::DbWorker::workerThread() { - if( !m_queue ) + if( !m_queue ) + return; + + while( true ) + { + boost::shared_ptr< Operation > operation = nullptr; + + m_queue->waitAndPop( operation ); + + if( m_cancelationToken || !operation ) return; - while( true ) - { - boost::shared_ptr< Operation > operation = nullptr; - - m_queue->waitAndPop( operation ); - - if( m_cancelationToken || !operation ) - return; - - operation->setConnection( m_pConn ); - operation->call(); - } + operation->setConnection( m_pConn ); + operation->call(); + } } diff --git a/src/common/Database/DbWorker.h b/src/common/Database/DbWorker.h index 8782f6a0..49f0dd56 100644 --- a/src/common/Database/DbWorker.h +++ b/src/common/Database/DbWorker.h @@ -6,34 +6,35 @@ #include "Util/LockedWaitQueue.h" #include -namespace Core +namespace Core { +namespace Db { +class DbConnection; + +class Operation; + +class DbWorker { -namespace Db -{ - class DbConnection; - class Operation; +public: + DbWorker( LockedWaitQueue< boost::shared_ptr< Operation > >* newQueue, DbConnection* connection ); - class DbWorker - { - public: - DbWorker( LockedWaitQueue< boost::shared_ptr< Operation > >* newQueue, DbConnection* connection ); - ~DbWorker(); + ~DbWorker(); - private: - LockedWaitQueue< boost::shared_ptr< Operation > >* m_queue; - DbConnection* m_pConn; +private: + LockedWaitQueue< boost::shared_ptr< Operation > >* m_queue; + DbConnection* m_pConn; - void workerThread(); - std::thread m_workerThread; + void workerThread(); - std::atomic< bool > m_cancelationToken; + std::thread m_workerThread; - DbWorker( DbWorker const& right ) = delete; - DbWorker& operator=( DbWorker const& right ) = delete; - }; + std::atomic< bool > m_cancelationToken; + + DbWorker( DbWorker const& right ) = delete; + + DbWorker& operator=( DbWorker const& right ) = delete; +}; } } - #endif //SAPPHIRE_DBWORKER_H diff --git a/src/common/Database/DbWorkerPool.cpp b/src/common/Database/DbWorkerPool.cpp index 785b857d..fe10180d 100644 --- a/src/common/Database/DbWorkerPool.cpp +++ b/src/common/Database/DbWorkerPool.cpp @@ -12,249 +12,255 @@ extern Core::Framework g_fw; -class PingOperation : public Core::Db::Operation +class PingOperation : + public Core::Db::Operation { - bool execute() override - { - m_pConn->ping(); - return true; - } + bool execute() override + { + m_pConn->ping(); + return true; + } }; template< class T > -Core::Db::DbWorkerPool::DbWorkerPool() - : m_queue( new Core::LockedWaitQueue< boost::shared_ptr< Operation > >() ), - m_asyncThreads( 0 ), - m_synchThreads( 0 ) +Core::Db::DbWorkerPool< T >::DbWorkerPool() + : + m_queue( new Core::LockedWaitQueue< boost::shared_ptr< Operation > >() ), + m_asyncThreads( 0 ), + m_synchThreads( 0 ) { } template< class T > Core::Db::DbWorkerPool< T >::~DbWorkerPool() { - m_queue->cancel(); + m_queue->cancel(); } template< class T > void Core::Db::DbWorkerPool< T >::setConnectionInfo( const ConnectionInfo& info, uint8_t asyncThreads, - uint8_t synchThreads) + uint8_t synchThreads ) { - m_connectionInfo = info; - m_asyncThreads = asyncThreads; - m_synchThreads = synchThreads; + m_connectionInfo = info; + m_asyncThreads = asyncThreads; + m_synchThreads = synchThreads; } template< class T > uint32_t Core::Db::DbWorkerPool< T >::open() { - auto pLog = g_fw.get< Logger >(); - pLog->info( "[DbPool] Opening DatabasePool " + getDatabaseName() + - " Asynchronous connections: " + std::to_string( m_asyncThreads ) + - " Synchronous connections: " + std::to_string( m_synchThreads ) ); + auto pLog = g_fw.get< Logger >(); + pLog->info( "[DbPool] Opening DatabasePool " + getDatabaseName() + + " Asynchronous connections: " + std::to_string( m_asyncThreads ) + + " Synchronous connections: " + std::to_string( m_synchThreads ) ); - uint32_t error = openConnections( IDX_ASYNC, m_asyncThreads ); + uint32_t error = openConnections( IDX_ASYNC, m_asyncThreads ); - if( error ) - return error; + if( error ) + return error; - error = openConnections( IDX_SYNCH, m_synchThreads ); + error = openConnections( IDX_SYNCH, m_synchThreads ); - if( !error ) - { - pLog->info( "[DbPool] DatabasePool " + getDatabaseName() + " opened successfully. " + - std::to_string( ( m_connections[IDX_SYNCH].size() + m_connections[IDX_ASYNC].size() ) ) + - " total connections running." ); - } + if( !error ) + { + pLog->info( "[DbPool] DatabasePool " + getDatabaseName() + " opened successfully. " + + std::to_string( ( m_connections[ IDX_SYNCH ].size() + m_connections[ IDX_ASYNC ].size() ) ) + + " total connections running." ); + } - return error; + return error; } template< class T > void Core::Db::DbWorkerPool< T >::close() { - auto pLog = g_fw.get< Logger >(); - pLog->info("[DbPool] Closing down DatabasePool " + getDatabaseName() ); - m_connections[IDX_ASYNC].clear(); - m_connections[IDX_SYNCH].clear(); - pLog->info("[DbPool] All connections on DatabasePool " + getDatabaseName() + "closed." ); + auto pLog = g_fw.get< Logger >(); + pLog->info( "[DbPool] Closing down DatabasePool " + getDatabaseName() ); + m_connections[ IDX_ASYNC ].clear(); + m_connections[ IDX_SYNCH ].clear(); + pLog->info( "[DbPool] All connections on DatabasePool " + getDatabaseName() + "closed." ); } template< class T > -bool Core::Db::DbWorkerPool::prepareStatements() +bool Core::Db::DbWorkerPool< T >::prepareStatements() { - for( auto& connections : m_connections ) - for( auto& connection : connections ) + for( auto& connections : m_connections ) + for( auto& connection : connections ) + { + connection->lockIfReady(); + if( !connection->prepareStatements() ) { - connection->lockIfReady(); - if( !connection->prepareStatements() ) - { - connection->unlock(); - close(); - return false; - } - else - connection->unlock(); + connection->unlock(); + close(); + return false; } + else + connection->unlock(); + } - return true; + return true; } template< class T > -boost::shared_ptr< Mysql::ResultSet > Core::Db::DbWorkerPool< T >::query( const std::string& sql, boost::shared_ptr< T > connection ) +boost::shared_ptr< Mysql::ResultSet > +Core::Db::DbWorkerPool< T >::query( const std::string& sql, boost::shared_ptr< T > connection ) { - if( !connection ) - connection = getFreeConnection(); + if( !connection ) + connection = getFreeConnection(); - boost::shared_ptr< Mysql::ResultSet > result = connection->query( sql ); - connection->unlock(); + boost::shared_ptr< Mysql::ResultSet > result = connection->query( sql ); + connection->unlock(); - return result; + return result; } template< class T > -boost::shared_ptr< Mysql::PreparedResultSet > Core::Db::DbWorkerPool< T >::query( boost::shared_ptr< PreparedStatement > stmt ) +boost::shared_ptr< Mysql::PreparedResultSet > +Core::Db::DbWorkerPool< T >::query( boost::shared_ptr< PreparedStatement > stmt ) { - auto connection = getFreeConnection(); - auto ret = boost::static_pointer_cast< Mysql::PreparedResultSet >( connection->query( stmt ) ); - connection->unlock(); + auto connection = getFreeConnection(); + auto ret = boost::static_pointer_cast< Mysql::PreparedResultSet >( connection->query( stmt ) ); + connection->unlock(); - return ret; + return ret; } template< class T > -boost::shared_ptr< Core::Db::PreparedStatement > Core::Db::DbWorkerPool< T >::getPreparedStatement( PreparedStatementIndex index ) +boost::shared_ptr< Core::Db::PreparedStatement > +Core::Db::DbWorkerPool< T >::getPreparedStatement( PreparedStatementIndex index ) { - return boost::make_shared< PreparedStatement >( index ); + return boost::make_shared< PreparedStatement >( index ); } template< class T > void Core::Db::DbWorkerPool< T >::escapeString( std::string& str ) { - if( str.empty() ) - return; + if( str.empty() ) + return; - char* buf = new char[str.size() * 2 + 1]; - escapeString( buf, str.c_str(), str.size() ); - str = buf; - delete[] buf; + char* buf = new char[str.size() * 2 + 1]; + escapeString( buf, str.c_str(), str.size() ); + str = buf; + delete[] buf; } template< class T > void Core::Db::DbWorkerPool< T >::keepAlive() { - for( auto& connection : m_connections[IDX_SYNCH] ) - { - if( connection->lockIfReady() ) - { - connection->ping(); - connection->unlock(); - } - } + for( auto& connection : m_connections[ IDX_SYNCH ] ) + { + if( connection->lockIfReady() ) + { + connection->ping(); + connection->unlock(); + } + } - const auto count = m_connections[IDX_ASYNC].size(); - for( uint8_t i = 0; i < count; ++i ) - enqueue( boost::make_shared< PingOperation >() ); + const auto count = m_connections[ IDX_ASYNC ].size(); + for( uint8_t i = 0; i < count; ++i ) + enqueue( boost::make_shared< PingOperation >() ); } template< class T > uint32_t Core::Db::DbWorkerPool< T >::openConnections( InternalIndex type, uint8_t numConnections ) { - for( uint8_t i = 0; i < numConnections; ++i ) - { - // Create the connection - auto connection = [&] { - switch (type) - { - case IDX_ASYNC: - return boost::make_shared< T >( m_queue.get(), m_connectionInfo ); - case IDX_SYNCH: - return boost::make_shared< T >( m_connectionInfo ); - default: - return boost::shared_ptr< T >( nullptr ); - } - }(); - - if( uint32_t error = connection->open() ) + for( uint8_t i = 0; i < numConnections; ++i ) + { + // Create the connection + auto connection = [ & ] + { + switch( type ) { - // Failed to open a connection or invalid version, abort and cleanup - m_connections[type].clear(); - return error; + case IDX_ASYNC: + return boost::make_shared< T >( m_queue.get(), m_connectionInfo ); + case IDX_SYNCH: + return boost::make_shared< T >( m_connectionInfo ); + default: + return boost::shared_ptr< T >( nullptr ); } - m_connections[type].push_back( connection ); - } + }(); - return 0; + if( uint32_t error = connection->open() ) + { + // Failed to open a connection or invalid version, abort and cleanup + m_connections[ type ].clear(); + return error; + } + m_connections[ type ].push_back( connection ); + } + + return 0; } template< class T > -unsigned long Core::Db::DbWorkerPool< T >::escapeString( char *to, const char *from, unsigned long length ) +unsigned long Core::Db::DbWorkerPool< T >::escapeString( char* to, const char* from, unsigned long length ) { - if( !to || !from || !length ) - return 0; + if( !to || !from || !length ) + return 0; - return mysql_real_escape_string( - m_connections[IDX_SYNCH].front()->getConnection()->getRawCon(), to, from, length ); + return mysql_real_escape_string( + m_connections[ IDX_SYNCH ].front()->getConnection()->getRawCon(), to, from, length ); } template< class T > void Core::Db::DbWorkerPool< T >::enqueue( boost::shared_ptr< Operation > op ) { - m_queue->push( op ); + m_queue->push( op ); } template< class T > boost::shared_ptr< T > Core::Db::DbWorkerPool< T >::getFreeConnection() { - uint8_t i = 0; - const auto numCons = m_connections[IDX_SYNCH].size(); - boost::shared_ptr< T > connection = nullptr; + uint8_t i = 0; + const auto numCons = m_connections[ IDX_SYNCH ].size(); + boost::shared_ptr< T > connection = nullptr; - while( true ) - { - connection = m_connections[IDX_SYNCH][i++ % numCons]; + while( true ) + { + connection = m_connections[ IDX_SYNCH ][ i++ % numCons ]; - if( connection->lockIfReady() ) - break; - } + if( connection->lockIfReady() ) + break; + } - return connection; + return connection; } template< class T > const std::string& Core::Db::DbWorkerPool< T >::getDatabaseName() const { - return m_connectionInfo.database; + return m_connectionInfo.database; } template< class T > void Core::Db::DbWorkerPool< T >::execute( const std::string& sql ) { - auto task = boost::make_shared< StatementTask >( sql ); - enqueue( task ); + auto task = boost::make_shared< StatementTask >( sql ); + enqueue( task ); } template< class T > void Core::Db::DbWorkerPool< T >::execute( boost::shared_ptr< PreparedStatement > stmt ) { - auto task = boost::make_shared< PreparedStatementTask >( stmt ); - enqueue( task ); + auto task = boost::make_shared< PreparedStatementTask >( stmt ); + enqueue( task ); } template< class T > void Core::Db::DbWorkerPool< T >::directExecute( const std::string& sql ) { - auto connection = getFreeConnection(); - connection->execute( sql ); - connection->unlock(); + auto connection = getFreeConnection(); + connection->execute( sql ); + connection->unlock(); } template< class T > void Core::Db::DbWorkerPool< T >::directExecute( boost::shared_ptr< PreparedStatement > stmt ) { - auto connection = getFreeConnection(); - connection->execute( stmt ); - connection->unlock(); + auto connection = getFreeConnection(); + connection->execute( stmt ); + connection->unlock(); } /* @@ -277,4 +283,5 @@ void DatabaseWorkerPool::ExecuteOrAppend(SQLTransaction& trans, PreparedState } */ -template class Core::Db::DbWorkerPool< Core::Db::CharaDbConnection >; +template +class Core::Db::DbWorkerPool< Core::Db::CharaDbConnection >; diff --git a/src/common/Database/DbWorkerPool.h b/src/common/Database/DbWorkerPool.h index b5722a53..9833cadb 100644 --- a/src/common/Database/DbWorkerPool.h +++ b/src/common/Database/DbWorkerPool.h @@ -7,80 +7,87 @@ #include #include "Util/LockedWaitQueue.h" #include "DbConnection.h" -namespace Core -{ -namespace Db -{ + +namespace Core { +namespace Db { template< typename T > class LockedWaitQueue; + class Operation; + class PreparedStatement; + struct ConnectionInfo; template< class T > class DbWorkerPool { private: - enum InternalIndex - { - IDX_ASYNC, - IDX_SYNCH, - IDX_SIZE - }; + enum InternalIndex + { + IDX_ASYNC, + IDX_SYNCH, + IDX_SIZE + }; public: - DbWorkerPool(); + DbWorkerPool(); - ~DbWorkerPool(); + ~DbWorkerPool(); - void setConnectionInfo( const ConnectionInfo& info, uint8_t asyncThreads, uint8_t synchThreads); + void setConnectionInfo( const ConnectionInfo& info, uint8_t asyncThreads, uint8_t synchThreads ); - uint32_t open(); + uint32_t open(); - void close(); + void close(); - bool prepareStatements(); + bool prepareStatements(); - inline ConnectionInfo getConnectionInfo() const - { - return m_connectionInfo; - } + inline ConnectionInfo getConnectionInfo() const + { + return m_connectionInfo; + } - // Async execution - void execute( const std::string& sql ); - void execute( boost::shared_ptr< PreparedStatement > stmt ); + // Async execution + void execute( const std::string& sql ); - // Sync execution - void directExecute( const std::string& sql ); - void directExecute( boost::shared_ptr< PreparedStatement > stmt ); - boost::shared_ptr< Mysql::ResultSet > query( const std::string& sql, boost::shared_ptr< T > connection = nullptr ); - boost::shared_ptr< Mysql::PreparedResultSet > query( boost::shared_ptr< PreparedStatement > stmt ); + void execute( boost::shared_ptr< PreparedStatement > stmt ); - using PreparedStatementIndex = typename T::Statements; + // Sync execution + void directExecute( const std::string& sql ); - boost::shared_ptr< PreparedStatement > getPreparedStatement( PreparedStatementIndex index ); + void directExecute( boost::shared_ptr< PreparedStatement > stmt ); - void escapeString( std::string& str ); + boost::shared_ptr< Mysql::ResultSet > + query( const std::string& sql, boost::shared_ptr< T > connection = nullptr ); - void keepAlive(); + boost::shared_ptr< Mysql::PreparedResultSet > query( boost::shared_ptr< PreparedStatement > stmt ); + + using PreparedStatementIndex = typename T::Statements; + + boost::shared_ptr< PreparedStatement > getPreparedStatement( PreparedStatementIndex index ); + + void escapeString( std::string& str ); + + void keepAlive(); private: - uint32_t openConnections( InternalIndex type, uint8_t numConnections ); + uint32_t openConnections( InternalIndex type, uint8_t numConnections ); - unsigned long escapeString( char *to, const char *from, unsigned long length ); + unsigned long escapeString( char* to, const char* from, unsigned long length ); - void enqueue( boost::shared_ptr< Operation > op ); + void enqueue( boost::shared_ptr< Operation > op ); - boost::shared_ptr< T > getFreeConnection(); + boost::shared_ptr< T > getFreeConnection(); - const std::string& getDatabaseName() const; + const std::string& getDatabaseName() const; - std::unique_ptr< Core::LockedWaitQueue< boost::shared_ptr< Operation > > > m_queue; - std::array< std::vector< boost::shared_ptr< T > >, IDX_SIZE > m_connections; - ConnectionInfo m_connectionInfo; - uint8_t m_asyncThreads; - uint8_t m_synchThreads; + std::unique_ptr< Core::LockedWaitQueue< boost::shared_ptr< Operation > > > m_queue; + std::array< std::vector< boost::shared_ptr< T > >, IDX_SIZE > m_connections; + ConnectionInfo m_connectionInfo; + uint8_t m_asyncThreads; + uint8_t m_synchThreads; }; } diff --git a/src/common/Database/Operation.h b/src/common/Database/Operation.h index fff52e73..f79ebf06 100644 --- a/src/common/Database/Operation.h +++ b/src/common/Database/Operation.h @@ -1,38 +1,48 @@ #ifndef SAPPHIRE_OPERATION_H #define SAPPHIRE_OPERATION_H -namespace Mysql -{ - class Connection; +namespace Mysql { +class Connection; } -namespace Core +namespace Core { +namespace Db { +class DbConnection; + +class PreparedStatement; + +class Operation { -namespace Db -{ - class DbConnection; - class PreparedStatement; +public: + Operation() : + m_pConn( nullptr ) + { + } - class Operation - { - public: - Operation() : m_pConn( nullptr ) { } - virtual ~Operation() { } + virtual ~Operation() + { + } - virtual int call() - { - execute(); - return 0; - } - virtual bool execute() = 0; - virtual void setConnection( DbConnection* pCon ) { m_pConn = pCon; } + virtual int call() + { + execute(); + return 0; + } - DbConnection* m_pConn; + virtual bool execute() = 0; - private: - Operation( Operation const& right ) = delete; - Operation& operator=( Operation const& right ) = delete; - }; + virtual void setConnection( DbConnection* pCon ) + { + m_pConn = pCon; + } + + DbConnection* m_pConn; + +private: + Operation( Operation const& right ) = delete; + + Operation& operator=( Operation const& right ) = delete; +}; } diff --git a/src/common/Database/PreparedStatement.cpp b/src/common/Database/PreparedStatement.cpp index 84b9960c..dadfb16a 100644 --- a/src/common/Database/PreparedStatement.cpp +++ b/src/common/Database/PreparedStatement.cpp @@ -7,146 +7,150 @@ #include Core::Db::PreparedStatement::PreparedStatement( uint32_t index ) : - m_stmt( nullptr ), - m_index( index ) { } + m_stmt( nullptr ), + m_index( index ) +{ +} -Core::Db::PreparedStatement::~PreparedStatement() { } +Core::Db::PreparedStatement::~PreparedStatement() +{ +} void Core::Db::PreparedStatement::bindParameters() { - assert( m_stmt ); + assert( m_stmt ); - uint8_t i = 1; - for( ; i < m_statementData.size(); i++ ) - { - switch( m_statementData[i].type) + uint8_t i = 1; + for( ; i < m_statementData.size(); i++ ) + { + switch( m_statementData[ i ].type ) + { + case TYPE_BOOL: + m_stmt->setBoolean( i, m_statementData[ i ].data.boolean ); + break; + case TYPE_UI: + m_stmt->setUInt( i, m_statementData[ i ].data.ui32 ); + break; + case TYPE_I: + m_stmt->setInt( i, m_statementData[ i ].data.i32 ); + break; + case TYPE_UI64: + m_stmt->setUInt64( i, m_statementData[ i ].data.ui64 ); + break; + case TYPE_I64: + m_stmt->setInt64( i, m_statementData[ i ].data.i64 ); + break; + case TYPE_DOUBLE: + m_stmt->setDouble( i, m_statementData[ i ].data.d ); + break; + case TYPE_STRING: + m_stmt->setString( i, std::string( reinterpret_cast< char* >( m_statementData[ i ].binary.data() ) ) ); + break; + case TYPE_BINARY: { - case TYPE_BOOL: - m_stmt->setBoolean( i, m_statementData[i].data.boolean ); - break; - case TYPE_UI: - m_stmt->setUInt( i, m_statementData[i].data.ui32 ); - break; - case TYPE_I: - m_stmt->setInt( i, m_statementData[i].data.i32 ); - break; - case TYPE_UI64: - m_stmt->setUInt64( i, m_statementData[i].data.ui64 ); - break; - case TYPE_I64: - m_stmt->setInt64( i, m_statementData[i].data.i64 ); - break; - case TYPE_DOUBLE: - m_stmt->setDouble( i, m_statementData[i].data.d ); - break; - case TYPE_STRING: - m_stmt->setString( i, std::string( reinterpret_cast< char* >( m_statementData[i].binary.data() ) ) ); - break; - case TYPE_BINARY: - { - std::stringstream *is = new std::stringstream; - - for( auto entry : m_statementData[i].binary ) - is->rdbuf()->sputc( static_cast< char > ( entry ) ); + std::stringstream* is = new std::stringstream; - m_stmt->setBlob( i, is ); - } - break; - case TYPE_NULL: - m_stmt->setNull( i, 0 ); - break; + for( auto entry : m_statementData[ i ].binary ) + is->rdbuf()->sputc( static_cast< char > ( entry ) ); + + m_stmt->setBlob( i, is ); } - } + break; + case TYPE_NULL: + m_stmt->setNull( i, 0 ); + break; + } + } } //- Bind to buffer void Core::Db::PreparedStatement::setBool( uint8_t index, const bool value ) { - if( index >= m_statementData.size() ) - m_statementData.resize( index + 1 ); + if( index >= m_statementData.size() ) + m_statementData.resize( index + 1 ); - m_statementData[index].data.boolean = value; - m_statementData[index].type = TYPE_BOOL; + m_statementData[ index ].data.boolean = value; + m_statementData[ index ].type = TYPE_BOOL; } void Core::Db::PreparedStatement::setUInt( uint8_t index, uint32_t value ) { - if( index >= m_statementData.size() ) - m_statementData.resize(index+1); + if( index >= m_statementData.size() ) + m_statementData.resize( index + 1 ); - m_statementData[index].data.ui32 = value; - m_statementData[index].type = TYPE_UI; + m_statementData[ index ].data.ui32 = value; + m_statementData[ index ].type = TYPE_UI; } void Core::Db::PreparedStatement::setUInt64( uint8_t index, uint64_t value ) { - if( index >= m_statementData.size() ) - m_statementData.resize( index + 1 ); + if( index >= m_statementData.size() ) + m_statementData.resize( index + 1 ); - m_statementData[index].data.ui64 = value; - m_statementData[index].type = TYPE_UI64; + m_statementData[ index ].data.ui64 = value; + m_statementData[ index ].type = TYPE_UI64; } void Core::Db::PreparedStatement::setInt( uint8_t index, int32_t value ) { - if( index >= m_statementData.size() ) - m_statementData.resize( index + 1 ); + if( index >= m_statementData.size() ) + m_statementData.resize( index + 1 ); - m_statementData[index].data.i32 = value; - m_statementData[index].type = TYPE_I; + m_statementData[ index ].data.i32 = value; + m_statementData[ index ].type = TYPE_I; } void Core::Db::PreparedStatement::setInt64( uint8_t index, int64_t value ) { - if( index >= m_statementData.size() ) - m_statementData.resize( index + 1); + if( index >= m_statementData.size() ) + m_statementData.resize( index + 1 ); - m_statementData[index].data.i64 = value; - m_statementData[index].type = TYPE_I64; + m_statementData[ index ].data.i64 = value; + m_statementData[ index ].type = TYPE_I64; } void Core::Db::PreparedStatement::setDouble( uint8_t index, double value ) { - if( index >= m_statementData.size() ) - m_statementData.resize( index + 1 ); + if( index >= m_statementData.size() ) + m_statementData.resize( index + 1 ); - m_statementData[index].data.d = value; - m_statementData[index].type = TYPE_DOUBLE; + m_statementData[ index ].data.d = value; + m_statementData[ index ].type = TYPE_DOUBLE; } void Core::Db::PreparedStatement::setString( uint8_t index, const std::string& value ) { - if( index >= m_statementData.size() ) - m_statementData.resize( index + 1 ); + if( index >= m_statementData.size() ) + m_statementData.resize( index + 1 ); - m_statementData[index].binary.resize( value.length() + 1 ); - memcpy( m_statementData[index].binary.data(), value.c_str(), value.length() + 1 ); - m_statementData[index].type = TYPE_STRING; + m_statementData[ index ].binary.resize( value.length() + 1 ); + memcpy( m_statementData[ index ].binary.data(), value.c_str(), value.length() + 1 ); + m_statementData[ index ].type = TYPE_STRING; } void Core::Db::PreparedStatement::setBinary( uint8_t index, const std::vector< uint8_t >& value ) { - if( index >= m_statementData.size() ) - m_statementData.resize( index + 1 ); + if( index >= m_statementData.size() ) + m_statementData.resize( index + 1 ); - m_statementData[index].binary = value; - m_statementData[index].type = TYPE_BINARY; + m_statementData[ index ].binary = value; + m_statementData[ index ].type = TYPE_BINARY; } void Core::Db::PreparedStatement::setNull( uint8_t index ) { - if( index >= m_statementData.size() ) - m_statementData.resize( index + 1 ); + if( index >= m_statementData.size() ) + m_statementData.resize( index + 1 ); - m_statementData[index].type = TYPE_NULL; + m_statementData[ index ].type = TYPE_NULL; } uint32_t Core::Db::PreparedStatement::getIndex() const { - return m_index; + return m_index; } -void Core::Db::PreparedStatement::setMysqlPS( boost::shared_ptr< Mysql::PreparedStatement> pStmt ) +void Core::Db::PreparedStatement::setMysqlPS( boost::shared_ptr< Mysql::PreparedStatement > pStmt ) { - m_stmt = pStmt; + m_stmt = pStmt; } diff --git a/src/common/Database/PreparedStatement.h b/src/common/Database/PreparedStatement.h index fbf04de2..351d3f81 100644 --- a/src/common/Database/PreparedStatement.h +++ b/src/common/Database/PreparedStatement.h @@ -1,84 +1,92 @@ #ifndef SAPPHIRE_PREPAREDSTATEMENT_H #define SAPPHIRE_PREPAREDSTATEMENT_H + #include #include #include #include #include "Operation.h" -namespace Mysql -{ - class PreparedStatement; +namespace Mysql { +class PreparedStatement; } -namespace Core +namespace Core { +namespace Db { +union PreparedStatementDataUnion { -namespace Db + bool boolean; + uint32_t ui32; + int32_t i32; + uint64_t ui64; + int64_t i64; + double d; +}; + +enum PreparedStatementValueType { - union PreparedStatementDataUnion - { - bool boolean; - uint32_t ui32; - int32_t i32; - uint64_t ui64; - int64_t i64; - double d; - }; + TYPE_BOOL, + TYPE_UI, + TYPE_UI64, + TYPE_I, + TYPE_I64, + TYPE_DOUBLE, + TYPE_STRING, + TYPE_BINARY, + TYPE_NULL +}; - enum PreparedStatementValueType - { - TYPE_BOOL, - TYPE_UI, - TYPE_UI64, - TYPE_I, - TYPE_I64, - TYPE_DOUBLE, - TYPE_STRING, - TYPE_BINARY, - TYPE_NULL - }; +struct PreparedStatementData +{ + PreparedStatementDataUnion data; + PreparedStatementValueType type; + std::vector< uint8_t > binary; +}; - struct PreparedStatementData - { - PreparedStatementDataUnion data; - PreparedStatementValueType type; - std::vector< uint8_t > binary; - }; +class PreparedStatement +{ +public: + explicit PreparedStatement( uint32_t index ); - class PreparedStatement - { - public: - explicit PreparedStatement( uint32_t index ); - ~PreparedStatement(); + ~PreparedStatement(); - void setBool( uint8_t index, bool value ); - void setUInt( uint8_t index, uint32_t value ); - void setUInt64( uint8_t index, uint64_t value ); - void setInt( uint8_t index, int32_t value ); - void setInt64( uint8_t index, int64_t value ); - void setDouble( uint8_t index, double value ); - void setString( uint8_t index, const std::string& value ); - void setBinary( uint8_t index, const std::vector< uint8_t >& value ); - void setNull( uint8_t index ); + void setBool( uint8_t index, bool value ); - uint32_t getIndex() const; - void setMysqlPS( boost::shared_ptr< Mysql::PreparedStatement > pStmt ); + void setUInt( uint8_t index, uint32_t value ); - void bindParameters(); + void setUInt64( uint8_t index, uint64_t value ); - protected: - boost::shared_ptr< Mysql::PreparedStatement > m_stmt; - uint32_t m_index; - std::vector< PreparedStatementData > m_statementData; + void setInt( uint8_t index, int32_t value ); - PreparedStatement( PreparedStatement const& right ) = delete; - PreparedStatement& operator=( PreparedStatement const& right ) = delete; - }; + void setInt64( uint8_t index, int64_t value ); + + void setDouble( uint8_t index, double value ); + + void setString( uint8_t index, const std::string& value ); + + void setBinary( uint8_t index, const std::vector< uint8_t >& value ); + + void setNull( uint8_t index ); + + uint32_t getIndex() const; + + void setMysqlPS( boost::shared_ptr< Mysql::PreparedStatement > pStmt ); + + void bindParameters(); + +protected: + boost::shared_ptr< Mysql::PreparedStatement > m_stmt; + uint32_t m_index; + std::vector< PreparedStatementData > m_statementData; + + PreparedStatement( PreparedStatement const& right ) = delete; + + PreparedStatement& operator=( PreparedStatement const& right ) = delete; +}; } } - #endif //SAPPHIRE_PREPAREDSTATEMENT_H diff --git a/src/common/Database/StatementTask.cpp b/src/common/Database/StatementTask.cpp index 9422f164..25753d17 100644 --- a/src/common/Database/StatementTask.cpp +++ b/src/common/Database/StatementTask.cpp @@ -4,68 +4,68 @@ #include "DbConnection.h" #include "PreparedStatement.h" -Core::Db::StatementTask::StatementTask( const std::string &sql, bool async ) +Core::Db::StatementTask::StatementTask( const std::string& sql, bool async ) { - m_sql = sql; - m_hasResult = async; // If the operation is async, then there's a result - //if (async) - // m_result = new QueryResultPromise(); + m_sql = sql; + m_hasResult = async; // If the operation is async, then there's a result + //if (async) + // m_result = new QueryResultPromise(); } Core::Db::StatementTask::~StatementTask() { - //if( m_hasResult && m_result != nullptr) - // delete m_result; + //if( m_hasResult && m_result != nullptr) + // delete m_result; } bool Core::Db::StatementTask::execute() { - if( m_hasResult ) - { - /*ResultSet* result = m_conn->Query(m_sql); - if (!result || !result->GetRowCount() || !result->NextRow()) - { - delete result; - m_result->set_value(QueryResult(NULL)); - return false; - } + if( m_hasResult ) + { + /*ResultSet* result = m_conn->Query(m_sql); + if (!result || !result->GetRowCount() || !result->NextRow()) + { + delete result; + m_result->set_value(QueryResult(NULL)); + return false; + } - m_result->set_value(QueryResult(result)); - return true;*/ - } + m_result->set_value(QueryResult(result)); + return true;*/ + } - return m_pConn->execute( m_sql ); + return m_pConn->execute( m_sql ); } - -Core::Db::PreparedStatementTask::PreparedStatementTask( boost::shared_ptr< Core::Db::PreparedStatement > stmt, bool async ) : - m_stmt(stmt) - //, m_result(nullptr) +Core::Db::PreparedStatementTask::PreparedStatementTask( boost::shared_ptr< Core::Db::PreparedStatement > stmt, + bool async ) : + m_stmt( stmt ) +//, m_result(nullptr) { - m_hasResult = async; // If the operation is async, then there's a result + m_hasResult = async; // If the operation is async, then there's a result } Core::Db::PreparedStatementTask::~PreparedStatementTask() { - //if (m_has_result && m_result != nullptr) - // delete m_result; + //if (m_has_result && m_result != nullptr) + // delete m_result; } bool Core::Db::PreparedStatementTask::execute() { - //if (m_has_result) - //{ - // PreparedResultSet* result = m_conn->Query(m_stmt); - // if (!result || !result->GetRowCount()) - // { - // delete result; - // m_result->set_value(PreparedQueryResult(NULL)); - // return false; - // } - // m_result->set_value(PreparedQueryResult(result)); - // return true; - //} + //if (m_has_result) + //{ + // PreparedResultSet* result = m_conn->Query(m_stmt); + // if (!result || !result->GetRowCount()) + // { + // delete result; + // m_result->set_value(PreparedQueryResult(NULL)); + // return false; + // } + // m_result->set_value(PreparedQueryResult(result)); + // return true; + //} - return m_pConn->execute( m_stmt ); + return m_pConn->execute( m_stmt ); } diff --git a/src/common/Database/StatementTask.h b/src/common/Database/StatementTask.h index 377c7bc6..ff30d2e3 100644 --- a/src/common/Database/StatementTask.h +++ b/src/common/Database/StatementTask.h @@ -5,47 +5,48 @@ #include #include "Operation.h" -namespace Core +namespace Core { +namespace Db { +class PreparedStatement; + +class StatementTask : + public Operation { -namespace Db -{ - class PreparedStatement; +public: - class StatementTask : public Operation - { - public: + StatementTask( const std::string& sql, bool async = false ); - StatementTask( const std::string& sql, bool async = false ); + ~StatementTask(); - ~StatementTask(); + bool execute() override; - bool execute() override; + // QueryResultFuture getFuture() const + // { + // return m_result->get_future(); + // } - // QueryResultFuture getFuture() const - // { - // return m_result->get_future(); - // } - - private: - std::string m_sql; - bool m_hasResult; +private: + std::string m_sql; + bool m_hasResult; // QueryResultPromise *m_result; - }; +}; - class PreparedStatementTask : public Operation - { - public: - PreparedStatementTask( boost::shared_ptr< PreparedStatement > stmt, bool async = false); - ~PreparedStatementTask(); +class PreparedStatementTask : + public Operation +{ +public: + PreparedStatementTask( boost::shared_ptr< PreparedStatement > stmt, bool async = false ); - bool execute() override; - //PreparedQueryResultFuture getFuture() { return m_result->get_future(); } + ~PreparedStatementTask(); - protected: - boost::shared_ptr< PreparedStatement > m_stmt; - bool m_hasResult; - //PreparedQueryResultPromise* m_result; - }; + bool execute() override; + //PreparedQueryResultFuture getFuture() { return m_result->get_future(); } + +protected: + boost::shared_ptr< PreparedStatement > m_stmt; + bool m_hasResult; + //PreparedQueryResultPromise* m_result; +}; } } diff --git a/src/common/Exd/ExdData.cpp b/src/common/Exd/ExdData.cpp index 4a455f94..b81ea48e 100644 --- a/src/common/Exd/ExdData.cpp +++ b/src/common/Exd/ExdData.cpp @@ -27,699 +27,700 @@ Core::Data::ExdData::~ExdData( void ) xiv::exd::Exd Core::Data::ExdData::setupDatAccess( const std::string& name, xiv::exd::Language lang ) { - auto& cat = m_exd_data->get_category( name ); - return static_cast< xiv::exd::Exd >( cat.get_data_ln( lang ) ); + auto& cat = m_exd_data->get_category( name ); + return static_cast< xiv::exd::Exd >( cat.get_data_ln( lang ) ); }; bool Core::Data::ExdData::init( const std::string& path ) { - try - { - m_data = boost::make_shared< xiv::dat::GameData >( path ); - m_exd_data = boost::make_shared< xiv::exd::ExdData >( *m_data ); + try + { + m_data = boost::make_shared< xiv::dat::GameData >( path ); + m_exd_data = boost::make_shared< xiv::exd::ExdData >( *m_data ); - m_questDat = setupDatAccess( "Quest", xiv::exd::Language::en ); - m_openingDat = setupDatAccess( "Opening", xiv::exd::Language::none ); - m_customTalkDat = setupDatAccess( "CustomTalk", xiv::exd::Language::en ); - m_aetheryteDat = setupDatAccess( "Aetheryte", xiv::exd::Language::en ); - m_levelDat = setupDatAccess( "Level", xiv::exd::Language::none ); - m_placeNameDat = setupDatAccess( "PlaceName", xiv::exd::Language::en ); - m_itemsDat = setupDatAccess( "Item", xiv::exd::Language::en ); - m_classJobCatDat = setupDatAccess( "ClassJobCategory", xiv::exd::Language::en ); - m_raceDat = setupDatAccess( "Race", xiv::exd::Language::en ); - m_eventItemDat = setupDatAccess( "EventItem", xiv::exd::Language::en ); - } - catch( std::runtime_error ) - { - return false; - } + m_questDat = setupDatAccess( "Quest", xiv::exd::Language::en ); + m_openingDat = setupDatAccess( "Opening", xiv::exd::Language::none ); + m_customTalkDat = setupDatAccess( "CustomTalk", xiv::exd::Language::en ); + m_aetheryteDat = setupDatAccess( "Aetheryte", xiv::exd::Language::en ); + m_levelDat = setupDatAccess( "Level", xiv::exd::Language::none ); + m_placeNameDat = setupDatAccess( "PlaceName", xiv::exd::Language::en ); + m_itemsDat = setupDatAccess( "Item", xiv::exd::Language::en ); + m_classJobCatDat = setupDatAccess( "ClassJobCategory", xiv::exd::Language::en ); + m_raceDat = setupDatAccess( "Race", xiv::exd::Language::en ); + m_eventItemDat = setupDatAccess( "EventItem", xiv::exd::Language::en ); + } + catch( std::runtime_error ) + { + return false; + } - return true; + return true; } bool Core::Data::ExdData::loadZoneInfo() { - auto territoryTypeData = setupDatAccess( "TerritoryType", xiv::exd::Language::none ); - auto placeNameData = setupDatAccess( "PlaceName", xiv::exd::Language::en ); - auto mapData = setupDatAccess( "Map", xiv::exd::Language::none ); - auto weatherRate = setupDatAccess( "WeatherRate", xiv::exd::Language::none ); + auto territoryTypeData = setupDatAccess( "TerritoryType", xiv::exd::Language::none ); + auto placeNameData = setupDatAccess( "PlaceName", xiv::exd::Language::en ); + auto mapData = setupDatAccess( "Map", xiv::exd::Language::none ); + auto weatherRate = setupDatAccess( "WeatherRate", xiv::exd::Language::none ); - auto territoryTypeDataRows = territoryTypeData.get_rows(); + auto territoryTypeDataRows = territoryTypeData.get_rows(); - for( auto row : territoryTypeDataRows ) - { - auto& fields = row.second; - uint32_t id = row.first; + for( auto row : territoryTypeDataRows ) + { + auto& fields = row.second; + uint32_t id = row.first; - uint16_t place_id = getField< uint16_t >( fields, 5 ); - uint16_t map_id = getField< uint16_t >( fields, 6 ); - std::string zoneStr = getField< std::string >( fields, 0 ); + uint16_t place_id = getField< uint16_t >( fields, 5 ); + uint16_t map_id = getField< uint16_t >( fields, 6 ); + std::string zoneStr = getField< std::string >( fields, 0 ); - if( zoneStr.empty() ) - continue; + if( zoneStr.empty() ) + continue; - auto placeNameDataFields = placeNameData.get_row( place_id ); - std::string zone_str = getField< std::string >( placeNameDataFields, 0 ); + auto placeNameDataFields = placeNameData.get_row( place_id ); + std::string zone_str = getField< std::string >( placeNameDataFields, 0 ); - auto mapDataFields = mapData.get_row( map_id ); - int16_t map_index = getField< int16_t >( mapDataFields, 12 ); - bool is_two_bytes = getField< bool >( mapDataFields, 15 ); + auto mapDataFields = mapData.get_row( map_id ); + int16_t map_index = getField< int16_t >( mapDataFields, 12 ); + bool is_two_bytes = getField< bool >( mapDataFields, 15 ); - uint8_t weather_rate = getField< uint8_t >( fields, 12 ) > 75 ? 0 : getField< uint8_t >( fields, 12 ); - auto weatherRateFields = weatherRate.get_row( weather_rate ); + uint8_t weather_rate = getField< uint8_t >( fields, 12 ) > 75 ? 0 : getField< uint8_t >( fields, 12 ); + auto weatherRateFields = weatherRate.get_row( weather_rate ); - int32_t aetheryte_index = getField< int32_t >( fields, 23 ); - uint8_t zoneType = getField< uint8_t >( fields, 9 ); + int32_t aetheryte_index = getField< int32_t >( fields, 23 ); + uint8_t zoneType = getField< uint8_t >( fields, 9 ); - ZoneInfo info{ 0 }; - info.id = id; - info.zone_name = zoneStr; - info.zone_str = zone_str; - info.layout_id = id; - info.discovery_index = map_index; - info.is_two_byte = is_two_bytes; - info.map_id = map_id; - info.weather_rate = weather_rate; // TODO: deal with weather groups - info.aetheryte_index = aetheryte_index; - info.zone_type = zoneType; + ZoneInfo info{ 0 }; + info.id = id; + info.zone_name = zoneStr; + info.zone_str = zone_str; + info.layout_id = id; + info.discovery_index = map_index; + info.is_two_byte = is_two_bytes; + info.map_id = map_id; + info.weather_rate = weather_rate; // TODO: deal with weather groups + info.aetheryte_index = aetheryte_index; + info.zone_type = zoneType; - uint8_t sumPc = 0; - for( size_t i = 0; i < 16; ) - { - int32_t weatherId = getField< int32_t >( weatherRateFields, i ); + uint8_t sumPc = 0; + for( size_t i = 0; i < 16; ) + { + int32_t weatherId = getField< int32_t >( weatherRateFields, i ); - if( weatherId == 0 ) - break; + if( weatherId == 0 ) + break; - sumPc += getField< uint8_t >( weatherRateFields, i + 1 ); - info.weather_rate_map[sumPc] = weatherId; + sumPc += getField< uint8_t >( weatherRateFields, i + 1 ); + info.weather_rate_map[ sumPc ] = weatherId; - i += 2; - } + i += 2; + } - m_zoneInfoMap[id] = info; + m_zoneInfoMap[ id ] = info; - } + } - return true; + return true; } bool Core::Data::ExdData::loadStatusEffectInfo() { - auto StatusDat = setupDatAccess( "Status", xiv::exd::Language::en ); - auto rows1 = StatusDat.get_rows(); + auto StatusDat = setupDatAccess( "Status", xiv::exd::Language::en ); + auto rows1 = StatusDat.get_rows(); - for( auto row : rows1 ) - { - auto& fields = row.second; - uint32_t id = row.first; + for( auto row : rows1 ) + { + auto& fields = row.second; + uint32_t id = row.first; - StatusEffectInfo info { 0 }; - info.id = id; - info.name = getField< std::string >( fields, 0 ); - info.lock_movement = getField< bool >( fields, 7 ); // 7 - info.lock_actions = getField< bool >( fields, 9 ); // 9 - info.lock_control = getField< bool >( fields, 10 ); // 10 - info.transfiguration = getField< bool >( fields, 11 ); // 11 - info.can_dispel = getField< bool >( fields, 13 ); // 13 - info.is_permanent = getField< bool >( fields, 15 ); // 15 - info.inflicted_by_actor = getField< bool >( fields, 17 ); // 17 - info.is_fc_buff = getField< bool >( fields, 21 ); // 21 - info.invisibility = getField< bool >( fields, 22 ); // 22 + StatusEffectInfo info{ 0 }; + info.id = id; + info.name = getField< std::string >( fields, 0 ); + info.lock_movement = getField< bool >( fields, 7 ); // 7 + info.lock_actions = getField< bool >( fields, 9 ); // 9 + info.lock_control = getField< bool >( fields, 10 ); // 10 + info.transfiguration = getField< bool >( fields, 11 ); // 11 + info.can_dispel = getField< bool >( fields, 13 ); // 13 + info.is_permanent = getField< bool >( fields, 15 ); // 15 + info.inflicted_by_actor = getField< bool >( fields, 17 ); // 17 + info.is_fc_buff = getField< bool >( fields, 21 ); // 21 + info.invisibility = getField< bool >( fields, 22 ); // 22 - m_statusEffectInfoMap[id] = info; - } + m_statusEffectInfoMap[ id ] = info; + } - return true; + return true; } bool Core::Data::ExdData::loadAetheryteInfo() { - auto AetheryteDat = setupDatAccess( "Aetheryte", xiv::exd::Language::en ); - auto rows = AetheryteDat.get_rows(); + auto AetheryteDat = setupDatAccess( "Aetheryte", xiv::exd::Language::en ); + auto rows = AetheryteDat.get_rows(); - for( auto row : rows ) - { - auto& fields = row.second; - auto info = boost::make_shared< AetheryteInfo >(); - info->id = row.first; - info->target_zone = getField< uint16_t >( fields, 10 ); + for( auto row : rows ) + { + auto& fields = row.second; + auto info = boost::make_shared< AetheryteInfo >(); + info->id = row.first; + info->target_zone = getField< uint16_t >( fields, 10 ); - info->isAetheryte = getField< bool >( fields, 15 ); + info->isAetheryte = getField< bool >( fields, 15 ); - uint16_t placename = getField< uint16_t >( fields, 8 ); - auto placeNameInfo = getPlaceNameInfo( placename ); + uint16_t placename = getField< uint16_t >( fields, 8 ); + auto placeNameInfo = getPlaceNameInfo( placename ); - if( placeNameInfo ) - { - info->placename = placeNameInfo->placename; - } + if( placeNameInfo ) + { + info->placename = placeNameInfo->placename; + } - uint16_t placename_aethernet = getField< uint16_t >( fields, 9 ); + uint16_t placename_aethernet = getField< uint16_t >( fields, 9 ); - auto placename_aethernetInfo = getPlaceNameInfo( placename_aethernet ); + auto placename_aethernetInfo = getPlaceNameInfo( placename_aethernet ); - if( placename_aethernetInfo ) - { - info->placename_aethernet = placename_aethernetInfo->placename; - } + if( placename_aethernetInfo ) + { + info->placename_aethernet = placename_aethernetInfo->placename; + } - info->levelId = getField< uint32_t >( fields, 11 ); + info->levelId = getField< uint32_t >( fields, 11 ); - info->map_coord_x = getField< int16_t >( fields, 20 ); - info->map_coord_y = getField< int16_t >( fields, 21 ); - m_aetheryteInfoMap.emplace( std::make_pair( info->id, info ) ); - } - return true; + info->map_coord_x = getField< int16_t >( fields, 20 ); + info->map_coord_y = getField< int16_t >( fields, 21 ); + m_aetheryteInfoMap.emplace( std::make_pair( info->id, info ) ); + } + return true; } bool Core::Data::ExdData::loadClassJobInfo() { - auto ClassJobDat = setupDatAccess( "ClassJob", xiv::exd::Language::en ); - auto rows = ClassJobDat.get_rows(); + auto ClassJobDat = setupDatAccess( "ClassJob", xiv::exd::Language::en ); + auto rows = ClassJobDat.get_rows(); - for( auto row : rows ) - { - auto& fields = row.second; - ClassJobInfo info { 0 }; + for( auto row : rows ) + { + auto& fields = row.second; + ClassJobInfo info{ 0 }; - uint32_t id = row.first; + uint32_t id = row.first; - if( id == 0 ) - continue; + if( id == 0 ) + continue; - std::string name = getField< std::string >( fields, 0 ); - std::string short_name = getField< std::string >( fields, 1 ); - int8_t exp_idx = getField< int8_t >( fields, 4 ); + std::string name = getField< std::string >( fields, 0 ); + std::string short_name = getField< std::string >( fields, 1 ); + int8_t exp_idx = getField< int8_t >( fields, 4 ); - - info.id = id; - info.name = name; - info.name_short = short_name; - info.exp_idx = exp_idx; - info.start_weapon_id = getField< int32_t >( fields, 28 ); - info.mod_hp = getField< uint16_t >( fields, 9 ); - info.mod_mpcpgp = getField< uint16_t >( fields, 10 ); - info.mod_str = getField< uint16_t >( fields, 11 ); - info.mod_vit = getField< uint16_t >( fields, 12 ); - info.mod_dex = getField< uint16_t >( fields, 13 ); - info.mod_int = getField< uint16_t >( fields, 14 ); - info.mod_mnd = getField< uint16_t >( fields, 15 ); - info.mod_pie = getField< uint16_t >( fields, 16 ); - m_classJobInfoMap[id] = info; - } + info.id = id; + info.name = name; + info.name_short = short_name; + info.exp_idx = exp_idx; + info.start_weapon_id = getField< int32_t >( fields, 28 ); + info.mod_hp = getField< uint16_t >( fields, 9 ); + info.mod_mpcpgp = getField< uint16_t >( fields, 10 ); + info.mod_str = getField< uint16_t >( fields, 11 ); + info.mod_vit = getField< uint16_t >( fields, 12 ); + info.mod_dex = getField< uint16_t >( fields, 13 ); + info.mod_int = getField< uint16_t >( fields, 14 ); + info.mod_mnd = getField< uint16_t >( fields, 15 ); + info.mod_pie = getField< uint16_t >( fields, 16 ); - return true; + m_classJobInfoMap[ id ] = info; + } + + return true; } bool Core::Data::ExdData::loadParamGrowInfo() { - auto ParamGrowDat = setupDatAccess( "ParamGrow", xiv::exd::Language::none ); - auto rows = ParamGrowDat.get_rows(); + auto ParamGrowDat = setupDatAccess( "ParamGrow", xiv::exd::Language::none ); + auto rows = ParamGrowDat.get_rows(); - for( auto row : rows ) - { - auto& fields = row.second; + for( auto row : rows ) + { + auto& fields = row.second; - ParamGrowthInfo info { 0 }; - uint32_t id = row.first; - info.level = id; - info.needed_exp = getField< int32_t >( fields, 0 ); - info.mp_mod = getField< uint16_t >( fields, 3 ); // 3 - info.mp_const = getField< int32_t >( fields, 4 ); // 4 - info.base_secondary = getField< int32_t >( fields, 5 );// 5 - info.quest_exp_mod = getField< uint8_t >( fields, 7 ); // 7 - info.hp_mod = getField< uint16_t >(fields, 8); // 8 + ParamGrowthInfo info{ 0 }; + uint32_t id = row.first; + info.level = id; + info.needed_exp = getField< int32_t >( fields, 0 ); + info.mp_mod = getField< uint16_t >( fields, 3 ); // 3 + info.mp_const = getField< int32_t >( fields, 4 ); // 4 + info.base_secondary = getField< int32_t >( fields, 5 );// 5 + info.quest_exp_mod = getField< uint8_t >( fields, 7 ); // 7 + info.hp_mod = getField< uint16_t >( fields, 8 ); // 8 - m_paramGrowthInfoMap[id] = info; - } + m_paramGrowthInfoMap[ id ] = info; + } - return true; + return true; } bool Core::Data::ExdData::loadTribeInfo() { - auto tribeDat = setupDatAccess( "Tribe", xiv::exd::Language::en ); - auto rows = tribeDat.get_rows(); + auto tribeDat = setupDatAccess( "Tribe", xiv::exd::Language::en ); + auto rows = tribeDat.get_rows(); - for( auto row : rows ) - { - auto& fields = row.second; + for( auto row : rows ) + { + auto& fields = row.second; - TribeInfo info { 0 }; - uint32_t id = row.first; - info.id = id; - info.name = getField< std::string >( fields, 0 ); - info.mod_str = getField< int8_t >( fields, 4 ); - info.mod_vit = getField< int8_t >( fields, 5 ); - info.mod_dex = getField< int8_t >( fields, 6 ); - info.mod_int = getField< int8_t >( fields, 7 ); - info.mod_mnd = getField< int8_t >( fields, 8 ); - info.mod_pie = getField< int8_t >( fields, 9 ); + TribeInfo info{ 0 }; + uint32_t id = row.first; + info.id = id; + info.name = getField< std::string >( fields, 0 ); + info.mod_str = getField< int8_t >( fields, 4 ); + info.mod_vit = getField< int8_t >( fields, 5 ); + info.mod_dex = getField< int8_t >( fields, 6 ); + info.mod_int = getField< int8_t >( fields, 7 ); + info.mod_mnd = getField< int8_t >( fields, 8 ); + info.mod_pie = getField< int8_t >( fields, 9 ); - m_tribeInfoMap[id] = info; - } + m_tribeInfoMap[ id ] = info; + } - return true; + return true; } bool Core::Data::ExdData::loadEventActionInfo() { - auto EventActionDat = setupDatAccess( "EventAction", xiv::exd::Language::en ); - auto rows = EventActionDat.get_rows(); + auto EventActionDat = setupDatAccess( "EventAction", xiv::exd::Language::en ); + auto rows = EventActionDat.get_rows(); - for( auto row : rows ) - { - auto& fields = row.second; + for( auto row : rows ) + { + auto& fields = row.second; - EventActionInfo info { 0 }; + EventActionInfo info{ 0 }; - uint32_t id = row.first; + uint32_t id = row.first; - if( id == 0 ) - { - continue; - } + if( id == 0 ) + { + continue; + } - std::string name = getField< std::string >( fields, 0 ); - uint8_t time = getField< uint8_t >( fields, 2 ); + std::string name = getField< std::string >( fields, 0 ); + uint8_t time = getField< uint8_t >( fields, 2 ); - info.id = id; - info.name = name; - info.castTime = time * 1000; + info.id = id; + info.name = name; + info.castTime = time * 1000; - m_EventActionInfoMap[id] = info; + m_EventActionInfoMap[ id ] = info; - } + } - return true; + return true; } bool Core::Data::ExdData::loadActionInfo() { - auto ActionDat = setupDatAccess( "Action", xiv::exd::Language::en ); - auto rows = ActionDat.get_rows(); + auto ActionDat = setupDatAccess( "Action", xiv::exd::Language::en ); + auto rows = ActionDat.get_rows(); - for( auto row : rows ) - { - auto& fields = row.second; - auto info = boost::make_shared< ActionInfo >(); + for( auto row : rows ) + { + auto& fields = row.second; + auto info = boost::make_shared< ActionInfo >(); - uint32_t id = row.first; - if( id == 0 ) - { - continue; - } + uint32_t id = row.first; + if( id == 0 ) + { + continue; + } - std::string name = getField< std::string >( fields, 0 ); // 0 - uint8_t category = getField< uint8_t >( fields, 3 ); // 3 + std::string name = getField< std::string >( fields, 0 ); // 0 + uint8_t category = getField< uint8_t >( fields, 3 ); // 3 - int8_t class_job = getField< int8_t >( fields, 10 ); // 10 - uint8_t unlock_level = getField< uint8_t >( fields, 11 ); // 11 - int8_t range = getField< int8_t >( fields, 14 ); // 13 - bool can_target_self = getField< bool >( fields, 15 ); // 14 - bool can_target_party = getField< bool>( fields, 16 ); // 15 - bool can_target_friendly = getField< bool >( fields, 17 ); // 16 - bool can_target_enemy = getField< bool >( fields, 18 ); // 17 + int8_t class_job = getField< int8_t >( fields, 10 ); // 10 + uint8_t unlock_level = getField< uint8_t >( fields, 11 ); // 11 + int8_t range = getField< int8_t >( fields, 14 ); // 13 + bool can_target_self = getField< bool >( fields, 15 ); // 14 + bool can_target_party = getField< bool >( fields, 16 ); // 15 + bool can_target_friendly = getField< bool >( fields, 17 ); // 16 + bool can_target_enemy = getField< bool >( fields, 18 ); // 17 - bool is_ground_aoe = getField< bool >( fields, 21 ); // 20 - // Column 23: Seems to be related to raising skills (Raise, Resurrection, Reanimate) - bool can_target_ko = getField< bool >( fields, 25 ); // 24 + bool is_ground_aoe = getField< bool >( fields, 21 ); // 20 + // Column 23: Seems to be related to raising skills (Raise, Resurrection, Reanimate) + bool can_target_ko = getField< bool >( fields, 25 ); // 24 - uint8_t aoe_type = getField< uint8_t >( fields, 27 ); // 26 - uint8_t aoe_range = getField< uint8_t >( fields, 28 ); // 27 - uint8_t aoe_width = getField< uint8_t >( fields, 29 ); // 28 + uint8_t aoe_type = getField< uint8_t >( fields, 27 ); // 26 + uint8_t aoe_range = getField< uint8_t >( fields, 28 ); // 27 + uint8_t aoe_width = getField< uint8_t >( fields, 29 ); // 28 - uint8_t points_type = getField< uint8_t >( fields, 31 ); // 30 - uint16_t points_cost = getField< uint16_t >( fields, 32 ); // 31 + uint8_t points_type = getField< uint8_t >( fields, 31 ); // 30 + uint16_t points_cost = getField< uint16_t >( fields, 32 ); // 31 - bool is_instant = getField< bool >( fields, 36 ); // 35 - uint16_t cast_time = getField< uint16_t >( fields, 37 ); // 36 - uint16_t recast_time = getField< uint16_t >( fields, 38 ); // 37 + bool is_instant = getField< bool >( fields, 36 ); // 35 + uint16_t cast_time = getField< uint16_t >( fields, 37 ); // 36 + uint16_t recast_time = getField< uint16_t >( fields, 38 ); // 37 - int8_t model = getField< int8_t >( fields, 40 ); // 39 - uint8_t aspect = getField< uint8_t >( fields, 41 ); // 40 + int8_t model = getField< int8_t >( fields, 40 ); // 39 + uint8_t aspect = getField< uint8_t >( fields, 41 ); // 40 - uint16_t toggle_status_id = getField< uint16_t >( fields, 43 ); // 42 - bool affects_position = getField< bool >( fields, 48 ); // 47 + uint16_t toggle_status_id = getField< uint16_t >( fields, 43 ); // 42 + bool affects_position = getField< bool >( fields, 48 ); // 47 - bool no_effect_in_battle = getField< bool >( fields, 61 ); // 60 + bool no_effect_in_battle = getField< bool >( fields, 61 ); // 60 - info->id = id; - info->name = name; - info->category = category; + info->id = id; + info->name = name; + info->category = category; - info->class_job = class_job; - info->unlock_level = unlock_level; - info->range = range; - info->can_target_self = can_target_self; - info->can_target_party = can_target_party; - info->can_target_friendly = can_target_friendly; - info->can_target_enemy = can_target_enemy; + info->class_job = class_job; + info->unlock_level = unlock_level; + info->range = range; + info->can_target_self = can_target_self; + info->can_target_party = can_target_party; + info->can_target_friendly = can_target_friendly; + info->can_target_enemy = can_target_enemy; - info->can_target_ko = can_target_ko; + info->can_target_ko = can_target_ko; - info->is_ground_aoe = is_ground_aoe; + info->is_ground_aoe = is_ground_aoe; - info->aoe_type = aoe_type; - info->aoe_range = aoe_range; - info->aoe_width = aoe_width; + info->aoe_type = aoe_type; + info->aoe_range = aoe_range; + info->aoe_width = aoe_width; - info->points_type = points_type; - info->points_cost = points_cost; + info->points_type = points_type; + info->points_cost = points_cost; - info->is_instant = is_instant; - info->cast_time = cast_time * 100; - info->recast_time = recast_time * 100; + info->is_instant = is_instant; + info->cast_time = cast_time * 100; + info->recast_time = recast_time * 100; - info->model = model; - info->aspect = aspect; + info->model = model; + info->aspect = aspect; - info->toggle_status_id = toggle_status_id; - info->affects_position = affects_position; + info->toggle_status_id = toggle_status_id; + info->affects_position = affects_position; - info->no_effect_in_battle = no_effect_in_battle; + info->no_effect_in_battle = no_effect_in_battle; - // If action type is SingleTarget with an AoE radius set, or if action type isn't SingleTarget - info->is_aoe = ( info->aoe_type == 1 && info->aoe_width != 0 ) || ( info->aoe_type != 1 ); + // If action type is SingleTarget with an AoE radius set, or if action type isn't SingleTarget + info->is_aoe = ( info->aoe_type == 1 && info->aoe_width != 0 ) || ( info->aoe_type != 1 ); - m_actionInfoMap.emplace( std::make_pair( info->id, info ) ); + m_actionInfoMap.emplace( std::make_pair( info->id, info ) ); - } + } - return true; + return true; } boost::shared_ptr< Core::Data::PlaceNameInfo > - Core::Data::ExdData::getPlaceNameInfo( uint32_t placeNameId ) +Core::Data::ExdData::getPlaceNameInfo( uint32_t placeNameId ) { - try - { - auto row = m_placeNameDat.get_row( placeNameId ); - auto info = boost::make_shared< PlaceNameInfo >(); - info->id = placeNameId; - info->placename = getField< std::string >( row, 0 ); - return info; - } - catch( ... ) - { - return nullptr; - } + try + { + auto row = m_placeNameDat.get_row( placeNameId ); + auto info = boost::make_shared< PlaceNameInfo >(); + info->id = placeNameId; + info->placename = getField< std::string >( row, 0 ); + return info; + } + catch( ... ) + { + return nullptr; + } - return nullptr; + return nullptr; } boost::shared_ptr< Core::Data::ItemInfo > - Core::Data::ExdData::getItemInfo( uint32_t catalogId ) +Core::Data::ExdData::getItemInfo( uint32_t catalogId ) { - try - { - auto row = m_itemsDat.get_row( catalogId ); - auto info = boost::make_shared< ItemInfo >(); - info->id = catalogId; - info->name = getField< std::string >( row, 0 ); - info->item_level = getField< uint16_t >( row, 11 ); - info->required_level = getField< uint8_t >( row, 12 ); - info->ui_category = getField< uint8_t >( row, 17 ); - info->stack_size = getField< uint32_t >( row, 19 ); - info->is_hqable = getField< bool >( row, 20 ); - info->model_primary = getField< uint64_t >( row, 45 ); - info->model_secondary = getField< uint64_t >( row, 46 ); - info->physical_damage = getField< uint16_t >( row, 49 ); - info->magical_damage = getField< uint16_t >( row, 50 ); - info->delayMs = getField< uint16_t >( row, 51 ); - info->is_unique = getField< int16_t >( row, 64 ) != 0 ? true : false; - info->is_untradeable = getField< uint8_t >( row, 65 ) != 0 ? true : false; + try + { + auto row = m_itemsDat.get_row( catalogId ); + auto info = boost::make_shared< ItemInfo >(); + info->id = catalogId; + info->name = getField< std::string >( row, 0 ); + info->item_level = getField< uint16_t >( row, 11 ); + info->required_level = getField< uint8_t >( row, 12 ); + info->ui_category = getField< uint8_t >( row, 17 ); + info->stack_size = getField< uint32_t >( row, 19 ); + info->is_hqable = getField< bool >( row, 20 ); + info->model_primary = getField< uint64_t >( row, 45 ); + info->model_secondary = getField< uint64_t >( row, 46 ); + info->physical_damage = getField< uint16_t >( row, 49 ); + info->magical_damage = getField< uint16_t >( row, 50 ); + info->delayMs = getField< uint16_t >( row, 51 ); + info->is_unique = getField< int16_t >( row, 64 ) != 0 ? true : false; + info->is_untradeable = getField< uint8_t >( row, 65 ) != 0 ? true : false; - return info; - } - catch( ... ) - { - return nullptr; - } + return info; + } + catch( ... ) + { + return nullptr; + } - return nullptr; + return nullptr; } boost::shared_ptr< Core::Data::AetheryteInfo > - Core::Data::ExdData::getAetheryteInfo( uint32_t aetheryteId ) +Core::Data::ExdData::getAetheryteInfo( uint32_t aetheryteId ) { - try - { - return m_aetheryteInfoMap[aetheryteId]; - } - catch( ... ) - { - return nullptr; - } + try + { + return m_aetheryteInfoMap[ aetheryteId ]; + } + catch( ... ) + { + return nullptr; + } - return nullptr; + return nullptr; } boost::shared_ptr< Core::Data::ActionInfo > Core::Data::ExdData::getActionInfo( uint32_t actionId ) { - try - { - return m_actionInfoMap[actionId]; - } - catch ( ... ) - { - return nullptr; - } + try + { + return m_actionInfoMap[ actionId ]; + } + catch( ... ) + { + return nullptr; + } - return nullptr; + return nullptr; } boost::shared_ptr< Core::Data::CustomTalkInfo > - Core::Data::ExdData::getCustomTalkInfo( uint32_t customTalkId ) +Core::Data::ExdData::getCustomTalkInfo( uint32_t customTalkId ) { - try - { - auto row = m_customTalkDat.get_row( customTalkId ); - auto info = boost::make_shared< CustomTalkInfo >(); - info->id = customTalkId; - info->name_intern = getField< std::string >( row, 2 ); + try + { + auto row = m_customTalkDat.get_row( customTalkId ); + auto info = boost::make_shared< CustomTalkInfo >(); + info->id = customTalkId; + info->name_intern = getField< std::string >( row, 2 ); - return info; - } - catch( ... ) - { - return nullptr; - } + return info; + } + catch( ... ) + { + return nullptr; + } - return nullptr; + return nullptr; } boost::shared_ptr< Core::Data::QuestInfo > - Core::Data::ExdData::getQuestInfo( uint32_t questId ) +Core::Data::ExdData::getQuestInfo( uint32_t questId ) { - try - { - auto row = m_questDat.get_row( questId ); - auto info = boost::make_shared< QuestInfo >(); - info->id = questId; - info->name = getField< std::string >( row, 0 ); - info->name_intern = getField< std::string >( row, 1 ); + try + { + auto row = m_questDat.get_row( questId ); + auto info = boost::make_shared< QuestInfo >(); + info->id = questId; + info->name = getField< std::string >( row, 0 ); + info->name_intern = getField< std::string >( row, 1 ); - info->quest_level = getField< uint16_t >( row, 4 ); + info->quest_level = getField< uint16_t >( row, 4 ); - info->enpc_resident_start = getField< uint32_t >( row, 40 ); - info->enpc_resident_end = getField< uint32_t >( row, 42 ); + info->enpc_resident_start = getField< uint32_t >( row, 40 ); + info->enpc_resident_end = getField< uint32_t >( row, 42 ); - info->reward_exp_factor = getField< uint16_t >( row, 1439 ); - info->reward_gil = getField< uint32_t >( row, 1440 ); - info->reward_gc_seals = getField< uint16_t >( row, 1442 ); + info->reward_exp_factor = getField< uint16_t >( row, 1439 ); + info->reward_gil = getField< uint32_t >( row, 1440 ); + info->reward_gc_seals = getField< uint16_t >( row, 1442 ); - info->reward_item_type = getField< uint8_t >( row, 1449 ); + info->reward_item_type = getField< uint8_t >( row, 1449 ); - for( uint32_t i = 0; i < 6; i++ ) + for( uint32_t i = 0; i < 6; i++ ) + { + uint32_t entry = getField< uint32_t >( row, i + 1450 ); + if( entry > 0 ) + info->reward_item.push_back( entry ); + + uint8_t entry1 = getField< uint8_t >( row, i + 1457 ); + if( entry1 > 0 ) + info->reward_item_count.push_back( entry1 ); + + uint8_t entry2 = getField< uint8_t >( row, i + 1464 ); + if( entry2 > 0 ) + info->reward_item_stain.push_back( entry2 ); + + } + + for( uint32_t i = 0; i < 5; i++ ) + { + uint32_t entry = getField< uint32_t >( row, i + 1471 ); + if( entry > 0 ) + info->reward_item_optional.push_back( entry ); + + uint8_t entry1 = getField< uint8_t >( row, i + 1476 ); + if( entry1 > 0 ) + info->reward_item_optional_count.push_back( entry1 ); + + uint8_t entry2 = getField< uint8_t >( row, i + 1486 ); + if( entry2 > 0 ) + info->reward_item_optional_stain.push_back( entry2 ); + } + + info->reward_emote = getField< uint8_t >( row, 1491 ); + info->reward_action = getField< uint16_t >( row, 1492 ); + info->reward_action_general1 = getField< uint8_t >( row, 1493 ); + info->reward_action_general2 = getField< uint8_t >( row, 1494 ); + info->reward_other = getField< uint8_t >( row, 1496 ); + + info->instanced_content_unlock = getField< uint32_t >( row, 1499 ); + + info->reward_tome_type = getField< uint8_t >( row, 1501 ); + info->reward_tome_count = getField< uint8_t >( row, 1502 ); + + info->reward_reputation = getField< uint8_t >( row, 1503 ); + + for( uint32_t i = 0; i < 50; i++ ) + { + std::string entry = getField< std::string >( row, i + 49 ); + if( entry.size() > 0 ) { - uint32_t entry = getField< uint32_t >( row, i + 1450 ); - if( entry > 0 ) - info->reward_item.push_back( entry ); - - uint8_t entry1 = getField< uint8_t >( row, i + 1457 ); - if( entry1 > 0 ) - info->reward_item_count.push_back( entry1 ); - - uint8_t entry2 = getField< uint8_t >( row, i + 1464 ); - if( entry2 > 0 ) - info->reward_item_stain.push_back( entry2 ); - + info->script_entity.push_back( entry ); + uint32_t entry1 = getField< uint32_t >( row, i + 99 ); + info->script_value.push_back( entry1 ); } + } - for( uint32_t i = 0; i < 5; i++ ) - { - uint32_t entry = getField< uint32_t >( row, i + 1471 ); - if( entry > 0 ) - info->reward_item_optional.push_back( entry ); + return info; + } + catch( ... ) + { + return nullptr; + } - uint8_t entry1 = getField< uint8_t >( row, i + 1476 ); - if( entry1 > 0 ) - info->reward_item_optional_count.push_back( entry1 ); - - uint8_t entry2 = getField< uint8_t >( row, i + 1486 ); - if( entry2 > 0 ) - info->reward_item_optional_stain.push_back( entry2 ); - } - - info->reward_emote = getField< uint8_t >( row, 1491 ); - info->reward_action = getField< uint16_t >( row, 1492 ); - info->reward_action_general1 = getField< uint8_t >( row, 1493 ); - info->reward_action_general2 = getField< uint8_t >( row, 1494 ); - info->reward_other = getField< uint8_t >( row, 1496 ); - - info->instanced_content_unlock = getField< uint32_t >( row, 1499 ); - - info->reward_tome_type = getField< uint8_t >( row, 1501 ); - info->reward_tome_count = getField< uint8_t >( row, 1502 ); - - info->reward_reputation = getField< uint8_t >( row, 1503 ); - - for( uint32_t i = 0; i < 50; i++ ) - { - std::string entry = getField< std::string >( row, i + 49 ); - if( entry.size() > 0 ) - { - info->script_entity.push_back( entry ); - uint32_t entry1 = getField< uint32_t >( row, i + 99 ); - info->script_value.push_back( entry1 ); - } - } - - return info; - } - catch( ... ) - { - return nullptr; - } - - return nullptr; + return nullptr; } boost::shared_ptr< Core::Data::EventItemInfo > - Core::Data::ExdData::getEventItemInfo( uint32_t eventItemId ) +Core::Data::ExdData::getEventItemInfo( uint32_t eventItemId ) { - try - { - auto row = m_eventItemDat.get_row( eventItemId ); - auto info = boost::make_shared< EventItemInfo >(); - info->id = eventItemId; - info->name = getField< std::string >( row, 0 ); - info->eventId = getField< uint32_t >( row, 14 ); - info->castTime = getField< uint8_t >( row, 15 ) * 1000; - return info; - } - catch( ... ) - { - return nullptr; - } + try + { + auto row = m_eventItemDat.get_row( eventItemId ); + auto info = boost::make_shared< EventItemInfo >(); + info->id = eventItemId; + info->name = getField< std::string >( row, 0 ); + info->eventId = getField< uint32_t >( row, 14 ); + info->castTime = getField< uint8_t >( row, 15 ) * 1000; + return info; + } + catch( ... ) + { + return nullptr; + } - return nullptr; + return nullptr; } boost::shared_ptr< Core::Data::LevelInfo > - Core::Data::ExdData::getLevelInfo( uint32_t levelId ) +Core::Data::ExdData::getLevelInfo( uint32_t levelId ) { - try - { - auto row = m_levelDat.get_row( levelId ); - auto info = boost::make_shared< LevelInfo >(); - info->id = levelId; - info->x = getField< float >( row, 0 ); - info->y = getField< float >( row, 1 ); - info->z = getField< float >( row, 2 ); - info->r = getField< float >( row, 3 ); - info->actor_id = getField< uint32_t >( row, 6 ); - info->zone_id = getField< uint16_t >( row, 9 ); - return info; - } - catch( ... ) - { - return nullptr; - } + try + { + auto row = m_levelDat.get_row( levelId ); + auto info = boost::make_shared< LevelInfo >(); + info->id = levelId; + info->x = getField< float >( row, 0 ); + info->y = getField< float >( row, 1 ); + info->z = getField< float >( row, 2 ); + info->r = getField< float >( row, 3 ); + info->actor_id = getField< uint32_t >( row, 6 ); + info->zone_id = getField< uint16_t >( row, 9 ); + return info; + } + catch( ... ) + { + return nullptr; + } - return nullptr; + return nullptr; } -const std::vector > Core::Data::ExdData::getAetheryteInfoForZone( uint16_t zoneId ) +const std::vector< boost::shared_ptr< Core::Data::AetheryteInfo > > +Core::Data::ExdData::getAetheryteInfoForZone( uint16_t zoneId ) { - std::vector< boost::shared_ptr< AetheryteInfo > > aetheryteList; + std::vector< boost::shared_ptr< AetheryteInfo > > aetheryteList; - for( auto& aetheryteInfo : m_aetheryteInfoMap ) - { - if( aetheryteInfo.second->target_zone == zoneId ) - { - aetheryteList.push_back( aetheryteInfo.second ); - } - } - return aetheryteList; + for( auto& aetheryteInfo : m_aetheryteInfoMap ) + { + if( aetheryteInfo.second->target_zone == zoneId ) + { + aetheryteList.push_back( aetheryteInfo.second ); + } + } + return aetheryteList; } boost::shared_ptr< Core::Data::OpeningInfo > - Core::Data::ExdData::getOpeningInfo( uint32_t openingId ) +Core::Data::ExdData::getOpeningInfo( uint32_t openingId ) { - try - { - auto row = m_openingDat.get_row( openingId ); - auto info = boost::make_shared< OpeningInfo >(); - info->id = openingId; - info->name = getField< std::string >( row, 0 ); + try + { + auto row = m_openingDat.get_row( openingId ); + auto info = boost::make_shared< OpeningInfo >(); + info->id = openingId; + info->name = getField< std::string >( row, 0 ); - return info; - } - catch( ... ) - { - return nullptr; - } + return info; + } + catch( ... ) + { + return nullptr; + } - return nullptr; + return nullptr; } boost::shared_ptr< Core::Data::RaceInfo > - Core::Data::ExdData::getRaceInfo( uint32_t raceId ) +Core::Data::ExdData::getRaceInfo( uint32_t raceId ) { - try - { + try + { - auto row = m_raceDat.get_row( raceId ); - auto info = boost::make_shared< RaceInfo >(); - info->id = raceId; - info->name = getField< std::string >( row, 0 ); - info->male_body = getField< int32_t >( row, 2 ); - info->male_hands = getField< int32_t >( row, 3 ); - info->male_legs = getField< int32_t >( row, 4 ); - info->male_feet = getField< int32_t >( row, 5 ); - info->female_body = getField< int32_t >( row, 6 ); - info->female_hands = getField< int32_t >( row, 7 ); - info->female_legs = getField< int32_t >( row, 8 ); - info->female_feet = getField< int32_t >( row, 9 ); + auto row = m_raceDat.get_row( raceId ); + auto info = boost::make_shared< RaceInfo >(); + info->id = raceId; + info->name = getField< std::string >( row, 0 ); + info->male_body = getField< int32_t >( row, 2 ); + info->male_hands = getField< int32_t >( row, 3 ); + info->male_legs = getField< int32_t >( row, 4 ); + info->male_feet = getField< int32_t >( row, 5 ); + info->female_body = getField< int32_t >( row, 6 ); + info->female_hands = getField< int32_t >( row, 7 ); + info->female_legs = getField< int32_t >( row, 8 ); + info->female_feet = getField< int32_t >( row, 9 ); - return info; - } - catch( ... ) - { - return nullptr; - } + return info; + } + catch( ... ) + { + return nullptr; + } - return nullptr; + return nullptr; } diff --git a/src/common/Exd/ExdData.h b/src/common/Exd/ExdData.h index d17bffb8..ebc0d5c2 100644 --- a/src/common/Exd/ExdData.h +++ b/src/common/Exd/ExdData.h @@ -22,334 +22,350 @@ case DataType::uint64: 9 namespace Core { - namespace Data { +namespace Data { - struct ZoneInfo - { - uint16_t id; - std::string zone_str; - std::string zone_name; - uint32_t layout_id; - uint16_t map_id; - int16_t discovery_index; - bool is_two_byte; - uint16_t weather_rate; - std::map< uint8_t, int32_t> weather_rate_map; +struct ZoneInfo +{ + uint16_t id; + std::string zone_str; + std::string zone_name; + uint32_t layout_id; + uint16_t map_id; + int16_t discovery_index; + bool is_two_byte; + uint16_t weather_rate; + std::map< uint8_t, int32_t > weather_rate_map; - int32_t aetheryte_index; - uint8_t zone_type; - }; + int32_t aetheryte_index; + uint8_t zone_type; +}; - struct ClassJobInfo - { - uint8_t id; - std::string name; - std::string name_short; - uint8_t exp_idx; - uint32_t start_weapon_id; - uint16_t mod_hp; - uint16_t mod_mpcpgp; - uint16_t mod_str; - uint16_t mod_vit; - uint16_t mod_dex; - uint16_t mod_int; - uint16_t mod_mnd; - uint16_t mod_pie; - }; +struct ClassJobInfo +{ + uint8_t id; + std::string name; + std::string name_short; + uint8_t exp_idx; + uint32_t start_weapon_id; + uint16_t mod_hp; + uint16_t mod_mpcpgp; + uint16_t mod_str; + uint16_t mod_vit; + uint16_t mod_dex; + uint16_t mod_int; + uint16_t mod_mnd; + uint16_t mod_pie; +}; - struct QuestInfo - { - uint32_t id; - std::string name; - std::string name_intern; - uint16_t quest_level; - uint32_t enpc_resident_start; - uint32_t enpc_resident_end; - uint16_t reward_exp_factor; - uint32_t reward_gil; - uint16_t reward_gc_seals; - uint8_t reward_item_type; +struct QuestInfo +{ + uint32_t id; + std::string name; + std::string name_intern; + uint16_t quest_level; + uint32_t enpc_resident_start; + uint32_t enpc_resident_end; + uint16_t reward_exp_factor; + uint32_t reward_gil; + uint16_t reward_gc_seals; + uint8_t reward_item_type; - std::vector< uint32_t > reward_item; - std::vector< uint8_t > reward_item_count; - std::vector< uint8_t > reward_item_stain; + std::vector< uint32_t > reward_item; + std::vector< uint8_t > reward_item_count; + std::vector< uint8_t > reward_item_stain; - std::vector< uint32_t > reward_item_optional; - std::vector< uint8_t > reward_item_optional_count; - std::vector< uint8_t > reward_item_optional_stain; + std::vector< uint32_t > reward_item_optional; + std::vector< uint8_t > reward_item_optional_count; + std::vector< uint8_t > reward_item_optional_stain; - uint8_t reward_emote; - uint16_t reward_action; - uint8_t reward_action_general1; - uint8_t reward_action_general2; + uint8_t reward_emote; + uint16_t reward_action; + uint8_t reward_action_general1; + uint8_t reward_action_general2; - uint8_t reward_other; + uint8_t reward_other; - uint32_t instanced_content_unlock; + uint32_t instanced_content_unlock; - uint8_t reward_tome_type; - uint8_t reward_tome_count; + uint8_t reward_tome_type; + uint8_t reward_tome_count; - uint8_t reward_reputation; + uint8_t reward_reputation; + std::vector< std::string > script_entity; + std::vector< uint32_t > script_value; +}; - std::vector< std::string > script_entity; - std::vector< uint32_t > script_value; - }; +struct EventActionInfo +{ + uint32_t id; + std::string name; + uint32_t castTime; +}; - struct EventActionInfo - { - uint32_t id; - std::string name; - uint32_t castTime; - }; +struct OpeningInfo +{ + uint32_t id; + std::string name; +}; - struct OpeningInfo - { - uint32_t id; - std::string name; - }; +struct ParamGrowthInfo +{ + uint32_t level; + uint32_t needed_exp; + int16_t hp_mod; + int32_t mp_const; + int16_t mp_mod; + int32_t base_secondary; + uint16_t quest_exp_mod; +}; - struct ParamGrowthInfo - { - uint32_t level; - uint32_t needed_exp; - int16_t hp_mod; - int32_t mp_const; - int16_t mp_mod; - int32_t base_secondary; - uint16_t quest_exp_mod; - }; +struct CustomTalkInfo +{ + uint32_t id; + std::string name_intern; +}; - struct CustomTalkInfo - { - uint32_t id; - std::string name_intern; - }; +struct PlaceNameInfo +{ + uint32_t id; + std::string placename; +}; - struct PlaceNameInfo - { - uint32_t id; - std::string placename; - }; +struct AetheryteInfo +{ + uint32_t id; + std::string placename; + std::string placename_aethernet; + int32_t target_zone; + int32_t levelId; + bool isAetheryte; - struct AetheryteInfo - { - uint32_t id; - std::string placename; - std::string placename_aethernet; - int32_t target_zone; - int32_t levelId; - bool isAetheryte; + int16_t map_coord_x; + int16_t map_coord_y; +}; - int16_t map_coord_x; - int16_t map_coord_y; - }; +struct RaceInfo +{ + uint32_t id; + std::string name; + uint32_t male_body; + uint32_t male_hands; + uint32_t male_legs; + uint32_t male_feet; + uint32_t female_body; + uint32_t female_hands; + uint32_t female_legs; + uint32_t female_feet; - struct RaceInfo - { - uint32_t id; - std::string name; - uint32_t male_body; - uint32_t male_hands; - uint32_t male_legs; - uint32_t male_feet; - uint32_t female_body; - uint32_t female_hands; - uint32_t female_legs; - uint32_t female_feet; + int8_t mod_str; + int8_t mod_dex; + int8_t mod_vit; + int8_t mod_int; + int8_t mod_mnd; + int8_t mod_pie; +}; - int8_t mod_str; - int8_t mod_dex; - int8_t mod_vit; - int8_t mod_int; - int8_t mod_mnd; - int8_t mod_pie; - }; +struct TribeInfo +{ + uint32_t id; + std::string name; - struct TribeInfo - { - uint32_t id; - std::string name; + int8_t mod_str; + int8_t mod_dex; + int8_t mod_vit; + int8_t mod_int; + int8_t mod_mnd; + int8_t mod_pie; +}; - int8_t mod_str; - int8_t mod_dex; - int8_t mod_vit; - int8_t mod_int; - int8_t mod_mnd; - int8_t mod_pie; - }; +struct LevelInfo +{ + uint32_t id; + float x; + float y; + float z; + float r; + uint32_t actor_id; + uint32_t zone_id; +}; - struct LevelInfo - { - uint32_t id; - float x; - float y; - float z; - float r; - uint32_t actor_id; - uint32_t zone_id; - }; +struct ClassJobCategoryInfo +{ + uint32_t id; + // should they add new jobs, this needs to be changed + bool can_equip[0x33]; +}; - struct ClassJobCategoryInfo - { - uint32_t id; - // should they add new jobs, this needs to be changed - bool can_equip[0x33]; - }; +struct ItemInfo +{ + uint32_t id; + std::string name; //0 + uint16_t item_level; //11 + uint8_t required_level; //12 + uint16_t unknown_category; //15 + uint16_t ui_category; //17 + uint32_t stack_size; //19 + bool is_hqable; //20 + uint64_t model_primary; //28 + uint64_t model_secondary; //29 + uint16_t physical_damage; //49 + uint16_t magical_damage; //50 + uint16_t delayMs; //51 + uint32_t class_job_requirement; //58 + bool is_unique; //72 + bool is_untradeable; //73 + uint32_t class_job_index; //86 +}; - struct ItemInfo - { - uint32_t id; - std::string name; //0 - uint16_t item_level; //11 - uint8_t required_level; //12 - uint16_t unknown_category; //15 - uint16_t ui_category; //17 - uint32_t stack_size; //19 - bool is_hqable; //20 - uint64_t model_primary; //28 - uint64_t model_secondary; //29 - uint16_t physical_damage; //49 - uint16_t magical_damage; //50 - uint16_t delayMs; //51 - uint32_t class_job_requirement; //58 - bool is_unique; //72 - bool is_untradeable; //73 - uint32_t class_job_index; //86 - }; +struct ActionInfo +{ + uint32_t id; + std::string name; // 0 + uint16_t category; // 3 - struct ActionInfo - { - uint32_t id; - std::string name; // 0 - uint16_t category; // 3 + int8_t class_job; // 10 + uint8_t unlock_level; // 11 + int8_t range; // 13 + bool can_target_self; // 14 + bool can_target_party; // 15 + bool can_target_friendly; // 16 + bool can_target_enemy; // 17 - int8_t class_job; // 10 - uint8_t unlock_level; // 11 - int8_t range; // 13 - bool can_target_self; // 14 - bool can_target_party; // 15 - bool can_target_friendly; // 16 - bool can_target_enemy; // 17 + bool is_ground_aoe; // 20 - bool is_ground_aoe; // 20 + bool can_target_ko; // 24 - bool can_target_ko; // 24 + uint8_t aoe_type; // 26 + uint8_t aoe_range; // 27 + uint8_t aoe_width; // 28 - uint8_t aoe_type; // 26 - uint8_t aoe_range; // 27 - uint8_t aoe_width; // 28 + uint8_t points_type; // 30 + uint16_t points_cost; // 31 - uint8_t points_type; // 30 - uint16_t points_cost; // 31 + bool is_instant; // 35 + uint32_t cast_time; // 36 + uint32_t recast_time; // 37 - bool is_instant; // 35 - uint32_t cast_time; // 36 - uint32_t recast_time; // 37 + int8_t model; // 39 + uint8_t aspect; // 40 - int8_t model; // 39 - uint8_t aspect; // 40 - - uint16_t toggle_status_id; // 42 + uint16_t toggle_status_id; // 42 - bool affects_position; // 47 + bool affects_position; // 47 - bool no_effect_in_battle; // 60 + bool no_effect_in_battle; // 60 - bool is_aoe; // Internal only + bool is_aoe; // Internal only - }; +}; - struct EventItemInfo - { - uint32_t id; - std::string name; //0 - uint32_t eventId; - uint32_t castTime; - }; +struct EventItemInfo +{ + uint32_t id; + std::string name; //0 + uint32_t eventId; + uint32_t castTime; +}; - struct StatusEffectInfo - { - uint32_t id; - std::string name; // 0 - bool lock_movement; // 7 - bool lock_actions; // 9 - bool lock_control; // 10 - bool transfiguration; // 11 - bool can_dispel; // 13 - bool is_permanent; // 15 - bool inflicted_by_actor; // 17 - bool is_fc_buff; // 21 - bool invisibility; // 22 - }; +struct StatusEffectInfo +{ + uint32_t id; + std::string name; // 0 + bool lock_movement; // 7 + bool lock_actions; // 9 + bool lock_control; // 10 + bool transfiguration; // 11 + bool can_dispel; // 13 + bool is_permanent; // 15 + bool inflicted_by_actor; // 17 + bool is_fc_buff; // 21 + bool invisibility; // 22 +}; - class ExdData - { - public: - ExdData(); - ~ExdData(void); +class ExdData +{ +public: + ExdData(); - bool init( const std::string& path ); + ~ExdData( void ); - xiv::exd::Exd setupDatAccess( const std::string& name, xiv::exd::Language lang ); + bool init( const std::string& path ); - template< class T > - T getField( std::vector< xiv::exd::Field >& fields, uint32_t index ) - { - return *boost::get< T >( &fields.at( index ) ); - } + xiv::exd::Exd setupDatAccess( const std::string& name, xiv::exd::Language lang ); - boost::shared_ptr m_data; - boost::shared_ptr m_exd_data; + template< class T > + T getField( std::vector< xiv::exd::Field >& fields, uint32_t index ) + { + return *boost::get< T >( &fields.at( index ) ); + } - xiv::exd::Exd m_questDat; - xiv::exd::Exd m_openingDat; - xiv::exd::Exd m_customTalkDat; - xiv::exd::Exd m_aetheryteDat; - xiv::exd::Exd m_levelDat; - xiv::exd::Exd m_placeNameDat; - xiv::exd::Exd m_itemsDat; - xiv::exd::Exd m_classJobCatDat; - xiv::exd::Exd m_raceDat; - xiv::exd::Exd m_eventItemDat; + boost::shared_ptr< xiv::dat::GameData > m_data; + boost::shared_ptr< xiv::exd::ExdData > m_exd_data; - std::map m_zoneInfoMap; - std::map m_classJobInfoMap; - std::map m_paramGrowthInfoMap; - std::map m_EventActionInfoMap; - std::map > m_actionInfoMap; - std::map m_statusEffectInfoMap; - std::map > m_aetheryteInfoMap; - std::map m_tribeInfoMap; + xiv::exd::Exd m_questDat; + xiv::exd::Exd m_openingDat; + xiv::exd::Exd m_customTalkDat; + xiv::exd::Exd m_aetheryteDat; + xiv::exd::Exd m_levelDat; + xiv::exd::Exd m_placeNameDat; + xiv::exd::Exd m_itemsDat; + xiv::exd::Exd m_classJobCatDat; + xiv::exd::Exd m_raceDat; + xiv::exd::Exd m_eventItemDat; - bool loadZoneInfo(); - bool loadClassJobInfo(); - bool loadParamGrowInfo(); - bool loadEventActionInfo(); - bool loadActionInfo(); - bool loadStatusEffectInfo(); - bool loadAetheryteInfo(); - bool loadTribeInfo(); + std::map< uint32_t, ZoneInfo > m_zoneInfoMap; + std::map< uint8_t, ClassJobInfo > m_classJobInfoMap; + std::map< uint32_t, ParamGrowthInfo > m_paramGrowthInfoMap; + std::map< uint16_t, EventActionInfo > m_EventActionInfoMap; + std::map< uint16_t, boost::shared_ptr< ActionInfo > > m_actionInfoMap; + std::map< uint16_t, StatusEffectInfo > m_statusEffectInfoMap; + std::map< uint32_t, boost::shared_ptr< AetheryteInfo > > m_aetheryteInfoMap; + std::map< uint32_t, TribeInfo > m_tribeInfoMap; - boost::shared_ptr< QuestInfo > getQuestInfo( uint32_t questId ); - boost::shared_ptr< OpeningInfo > getOpeningInfo( uint32_t openingId ); - boost::shared_ptr< CustomTalkInfo > getCustomTalkInfo( uint32_t customTalkId ); - boost::shared_ptr< AetheryteInfo > getAetheryteInfo( uint32_t aetheryteId ); - boost::shared_ptr< ActionInfo > getActionInfo( uint32_t actionId ); - boost::shared_ptr< PlaceNameInfo > getPlaceNameInfo( uint32_t placeNameId ); - boost::shared_ptr< ItemInfo > getItemInfo( uint32_t catalogId ); - boost::shared_ptr< RaceInfo > getRaceInfo( uint32_t raceId ); - boost::shared_ptr< EventItemInfo > getEventItemInfo( uint32_t eventItemId ); - boost::shared_ptr< LevelInfo > getLevelInfo( uint32_t levelId ); + bool loadZoneInfo(); - const std::vector< boost::shared_ptr< AetheryteInfo > > getAetheryteInfoForZone( uint16_t zoneId ); + bool loadClassJobInfo(); - }; + bool loadParamGrowInfo(); - } + bool loadEventActionInfo(); + + bool loadActionInfo(); + + bool loadStatusEffectInfo(); + + bool loadAetheryteInfo(); + + bool loadTribeInfo(); + + boost::shared_ptr< QuestInfo > getQuestInfo( uint32_t questId ); + + boost::shared_ptr< OpeningInfo > getOpeningInfo( uint32_t openingId ); + + boost::shared_ptr< CustomTalkInfo > getCustomTalkInfo( uint32_t customTalkId ); + + boost::shared_ptr< AetheryteInfo > getAetheryteInfo( uint32_t aetheryteId ); + + boost::shared_ptr< ActionInfo > getActionInfo( uint32_t actionId ); + + boost::shared_ptr< PlaceNameInfo > getPlaceNameInfo( uint32_t placeNameId ); + + boost::shared_ptr< ItemInfo > getItemInfo( uint32_t catalogId ); + + boost::shared_ptr< RaceInfo > getRaceInfo( uint32_t raceId ); + + boost::shared_ptr< EventItemInfo > getEventItemInfo( uint32_t eventItemId ); + + boost::shared_ptr< LevelInfo > getLevelInfo( uint32_t levelId ); + + const std::vector< boost::shared_ptr< AetheryteInfo > > getAetheryteInfoForZone( uint16_t zoneId ); + +}; + +} } #endif diff --git a/src/common/Exd/ExdDataGenerated.cpp b/src/common/Exd/ExdDataGenerated.cpp index 9d364919..32559bbb 100644 --- a/src/common/Exd/ExdDataGenerated.cpp +++ b/src/common/Exd/ExdDataGenerated.cpp @@ -4,4407 +4,4417 @@ #include - Core::Data::Achievement::Achievement( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AchievementDat.get_row( row_id ); - achievementCategory = exdData->getField< uint8_t >( row, 0 ); - name = exdData->getField< std::string >( row, 1 ); - description = exdData->getField< std::string >( row, 2 ); - points = exdData->getField< uint8_t >( row, 3 ); - title = exdData->getField< uint16_t >( row, 4 ); - item = exdData->getField< uint32_t >( row, 5 ); - icon = exdData->getField< uint16_t >( row, 6 ); - type = exdData->getField< uint8_t >( row, 8 ); - data.push_back( exdData->getField< int32_t >( row, 9 ) ); - data.push_back( exdData->getField< int32_t >( row, 10 ) ); - data.push_back( exdData->getField< int32_t >( row, 11 ) ); - data.push_back( exdData->getField< int32_t >( row, 12 ) ); - data.push_back( exdData->getField< int32_t >( row, 13 ) ); - data.push_back( exdData->getField< int32_t >( row, 14 ) ); - data.push_back( exdData->getField< int32_t >( row, 15 ) ); - data.push_back( exdData->getField< int32_t >( row, 16 ) ); - data.push_back( exdData->getField< int32_t >( row, 17 ) ); - order = exdData->getField< uint16_t >( row, 18 ); + auto row = exdData->m_AchievementDat.get_row( row_id ); + achievementCategory = exdData->getField< uint8_t >( row, 0 ); + name = exdData->getField< std::string >( row, 1 ); + description = exdData->getField< std::string >( row, 2 ); + points = exdData->getField< uint8_t >( row, 3 ); + title = exdData->getField< uint16_t >( row, 4 ); + item = exdData->getField< uint32_t >( row, 5 ); + icon = exdData->getField< uint16_t >( row, 6 ); + type = exdData->getField< uint8_t >( row, 8 ); + data.push_back( exdData->getField< int32_t >( row, 9 ) ); + data.push_back( exdData->getField< int32_t >( row, 10 ) ); + data.push_back( exdData->getField< int32_t >( row, 11 ) ); + data.push_back( exdData->getField< int32_t >( row, 12 ) ); + data.push_back( exdData->getField< int32_t >( row, 13 ) ); + data.push_back( exdData->getField< int32_t >( row, 14 ) ); + data.push_back( exdData->getField< int32_t >( row, 15 ) ); + data.push_back( exdData->getField< int32_t >( row, 16 ) ); + data.push_back( exdData->getField< int32_t >( row, 17 ) ); + order = exdData->getField< uint16_t >( row, 18 ); } Core::Data::AchievementCategory::AchievementCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AchievementCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - achievementKind = exdData->getField< uint8_t >( row, 1 ); + auto row = exdData->m_AchievementCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + achievementKind = exdData->getField< uint8_t >( row, 1 ); } Core::Data::AchievementKind::AchievementKind( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AchievementKindDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_AchievementKindDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Action::Action( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - icon = exdData->getField< uint16_t >( row, 2 ); - actionCategory = exdData->getField< uint8_t >( row, 3 ); - animationStart = exdData->getField< uint8_t >( row, 5 ); - vFX = exdData->getField< uint8_t >( row, 6 ); - animationEnd = exdData->getField< int16_t >( row, 7 ); - actionTimelineHit = exdData->getField< uint16_t >( row, 8 ); - classJob = exdData->getField< int8_t >( row, 10 ); - classJobLevel = exdData->getField< uint8_t >( row, 12 ); - isRoleAction = exdData->getField< bool >( row, 13 ); - range = exdData->getField< int8_t >( row, 14 ); - canTargetSelf = exdData->getField< bool >( row, 15 ); - canTargetParty = exdData->getField< bool >( row, 16 ); - canTargetFriendly = exdData->getField< bool >( row, 17 ); - canTargetHostile = exdData->getField< bool >( row, 18 ); - targetArea = exdData->getField< bool >( row, 21 ); - canTargetDead = exdData->getField< bool >( row, 25 ); - castType = exdData->getField< uint8_t >( row, 27 ); - effectRange = exdData->getField< uint8_t >( row, 28 ); - xAxisModifier = exdData->getField< uint8_t >( row, 29 ); - costType = exdData->getField< uint8_t >( row, 31 ); - cost = exdData->getField< uint16_t >( row, 32 ); - actionCombo = exdData->getField< uint16_t >( row, 35 ); - preservesCombo = exdData->getField< bool >( row, 36 ); - cast100ms = exdData->getField< uint16_t >( row, 37 ); - recast100ms = exdData->getField< uint16_t >( row, 38 ); - cooldownGroup = exdData->getField< uint8_t >( row, 39 ); - attackType = exdData->getField< int8_t >( row, 40 ); - aspect = exdData->getField< uint8_t >( row, 41 ); - actionProcStatus = exdData->getField< uint8_t >( row, 42 ); - statusGainSelf = exdData->getField< uint16_t >( row, 43 ); - actionData = exdData->getField< uint32_t >( row, 44 ); - classJobCategory = exdData->getField< uint8_t >( row, 45 ); - affectsPosition = exdData->getField< bool >( row, 48 ); - omen = exdData->getField< uint8_t >( row, 49 ); - isPvP = exdData->getField< bool >( row, 50 ); + auto row = exdData->m_ActionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + icon = exdData->getField< uint16_t >( row, 2 ); + actionCategory = exdData->getField< uint8_t >( row, 3 ); + animationStart = exdData->getField< uint8_t >( row, 5 ); + vFX = exdData->getField< uint8_t >( row, 6 ); + animationEnd = exdData->getField< int16_t >( row, 7 ); + actionTimelineHit = exdData->getField< uint16_t >( row, 8 ); + classJob = exdData->getField< int8_t >( row, 10 ); + classJobLevel = exdData->getField< uint8_t >( row, 12 ); + isRoleAction = exdData->getField< bool >( row, 13 ); + range = exdData->getField< int8_t >( row, 14 ); + canTargetSelf = exdData->getField< bool >( row, 15 ); + canTargetParty = exdData->getField< bool >( row, 16 ); + canTargetFriendly = exdData->getField< bool >( row, 17 ); + canTargetHostile = exdData->getField< bool >( row, 18 ); + targetArea = exdData->getField< bool >( row, 21 ); + canTargetDead = exdData->getField< bool >( row, 25 ); + castType = exdData->getField< uint8_t >( row, 27 ); + effectRange = exdData->getField< uint8_t >( row, 28 ); + xAxisModifier = exdData->getField< uint8_t >( row, 29 ); + costType = exdData->getField< uint8_t >( row, 31 ); + cost = exdData->getField< uint16_t >( row, 32 ); + actionCombo = exdData->getField< uint16_t >( row, 35 ); + preservesCombo = exdData->getField< bool >( row, 36 ); + cast100ms = exdData->getField< uint16_t >( row, 37 ); + recast100ms = exdData->getField< uint16_t >( row, 38 ); + cooldownGroup = exdData->getField< uint8_t >( row, 39 ); + attackType = exdData->getField< int8_t >( row, 40 ); + aspect = exdData->getField< uint8_t >( row, 41 ); + actionProcStatus = exdData->getField< uint8_t >( row, 42 ); + statusGainSelf = exdData->getField< uint16_t >( row, 43 ); + actionData = exdData->getField< uint32_t >( row, 44 ); + classJobCategory = exdData->getField< uint8_t >( row, 45 ); + affectsPosition = exdData->getField< bool >( row, 48 ); + omen = exdData->getField< uint8_t >( row, 49 ); + isPvP = exdData->getField< bool >( row, 50 ); } Core::Data::ActionCastTimeline::ActionCastTimeline( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionCastTimelineDat.get_row( row_id ); - name = exdData->getField< uint16_t >( row, 0 ); - vFX = exdData->getField< uint16_t >( row, 1 ); + auto row = exdData->m_ActionCastTimelineDat.get_row( row_id ); + name = exdData->getField< uint16_t >( row, 0 ); + vFX = exdData->getField< uint16_t >( row, 1 ); } Core::Data::ActionCastVFX::ActionCastVFX( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionCastVFXDat.get_row( row_id ); - vFX = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_ActionCastVFXDat.get_row( row_id ); + vFX = exdData->getField< uint16_t >( row, 0 ); } Core::Data::ActionCategory::ActionCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_ActionCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::ActionComboRoute::ActionComboRoute( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionComboRouteDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - action.push_back( exdData->getField< uint16_t >( row, 2 ) ); - action.push_back( exdData->getField< uint16_t >( row, 3 ) ); - action.push_back( exdData->getField< uint16_t >( row, 4 ) ); - action.push_back( exdData->getField< uint16_t >( row, 5 ) ); + auto row = exdData->m_ActionComboRouteDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + action.push_back( exdData->getField< uint16_t >( row, 2 ) ); + action.push_back( exdData->getField< uint16_t >( row, 3 ) ); + action.push_back( exdData->getField< uint16_t >( row, 4 ) ); + action.push_back( exdData->getField< uint16_t >( row, 5 ) ); } Core::Data::ActionIndirection::ActionIndirection( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionIndirectionDat.get_row( row_id ); - name = exdData->getField< int32_t >( row, 0 ); + auto row = exdData->m_ActionIndirectionDat.get_row( row_id ); + name = exdData->getField< int32_t >( row, 0 ); } Core::Data::ActionParam::ActionParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionParamDat.get_row( row_id ); - name = exdData->getField< int16_t >( row, 0 ); + auto row = exdData->m_ActionParamDat.get_row( row_id ); + name = exdData->getField< int16_t >( row, 0 ); } Core::Data::ActionProcStatus::ActionProcStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionProcStatusDat.get_row( row_id ); - status = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_ActionProcStatusDat.get_row( row_id ); + status = exdData->getField< uint16_t >( row, 0 ); } Core::Data::ActionTimeline::ActionTimeline( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionTimelineDat.get_row( row_id ); - key = exdData->getField< std::string >( row, 6 ); + auto row = exdData->m_ActionTimelineDat.get_row( row_id ); + key = exdData->getField< std::string >( row, 6 ); } Core::Data::ActionTimelineReplace::ActionTimelineReplace( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionTimelineReplaceDat.get_row( row_id ); - old = exdData->getField< uint16_t >( row, 0 ); - new1 = exdData->getField< uint16_t >( row, 1 ); + auto row = exdData->m_ActionTimelineReplaceDat.get_row( row_id ); + old = exdData->getField< uint16_t >( row, 0 ); + new1 = exdData->getField< uint16_t >( row, 1 ); } Core::Data::ActionTransient::ActionTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ActionTransientDat.get_row( row_id ); - description = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_ActionTransientDat.get_row( row_id ); + description = exdData->getField< std::string >( row, 0 ); } Core::Data::Addon::Addon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AddonDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_AddonDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); } Core::Data::Adventure::Adventure( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AdventureDat.get_row( row_id ); - level = exdData->getField< int32_t >( row, 0 ); - emote = exdData->getField< uint8_t >( row, 3 ); - minTime = exdData->getField< uint16_t >( row, 4 ); - maxTime = exdData->getField< uint16_t >( row, 5 ); - placeName = exdData->getField< int32_t >( row, 6 ); - iconList = exdData->getField< int32_t >( row, 7 ); - iconDiscovered = exdData->getField< int32_t >( row, 8 ); - name = exdData->getField< std::string >( row, 9 ); - impression = exdData->getField< std::string >( row, 10 ); - description = exdData->getField< std::string >( row, 11 ); - iconUndiscovered = exdData->getField< int32_t >( row, 12 ); - isInitial = exdData->getField< bool >( row, 13 ); + auto row = exdData->m_AdventureDat.get_row( row_id ); + level = exdData->getField< int32_t >( row, 0 ); + emote = exdData->getField< uint8_t >( row, 3 ); + minTime = exdData->getField< uint16_t >( row, 4 ); + maxTime = exdData->getField< uint16_t >( row, 5 ); + placeName = exdData->getField< int32_t >( row, 6 ); + iconList = exdData->getField< int32_t >( row, 7 ); + iconDiscovered = exdData->getField< int32_t >( row, 8 ); + name = exdData->getField< std::string >( row, 9 ); + impression = exdData->getField< std::string >( row, 10 ); + description = exdData->getField< std::string >( row, 11 ); + iconUndiscovered = exdData->getField< int32_t >( row, 12 ); + isInitial = exdData->getField< bool >( row, 13 ); } Core::Data::AdventureExPhase::AdventureExPhase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AdventureExPhaseDat.get_row( row_id ); - quest = exdData->getField< uint32_t >( row, 0 ); - adventureBegin = exdData->getField< uint32_t >( row, 1 ); - adventureEnd = exdData->getField< uint32_t >( row, 2 ); + auto row = exdData->m_AdventureExPhaseDat.get_row( row_id ); + quest = exdData->getField< uint32_t >( row, 0 ); + adventureBegin = exdData->getField< uint32_t >( row, 1 ); + adventureEnd = exdData->getField< uint32_t >( row, 2 ); } Core::Data::AetherCurrent::AetherCurrent( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AetherCurrentDat.get_row( row_id ); - quest = exdData->getField< uint32_t >( row, 0 ); + auto row = exdData->m_AetherCurrentDat.get_row( row_id ); + quest = exdData->getField< uint32_t >( row, 0 ); } Core::Data::AetherCurrentCompFlgSet::AetherCurrentCompFlgSet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AetherCurrentCompFlgSetDat.get_row( row_id ); - territory = exdData->getField< int32_t >( row, 0 ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 2 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 3 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 4 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 5 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 6 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 7 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 8 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 9 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 10 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 11 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 12 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 13 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 14 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 15 ) ); - aetherCurrent.push_back( exdData->getField< int32_t >( row, 16 ) ); + auto row = exdData->m_AetherCurrentCompFlgSetDat.get_row( row_id ); + territory = exdData->getField< int32_t >( row, 0 ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 2 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 3 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 4 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 5 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 6 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 7 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 8 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 9 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 10 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 11 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 12 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 13 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 14 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 15 ) ); + aetherCurrent.push_back( exdData->getField< int32_t >( row, 16 ) ); } Core::Data::AetherialWheel::AetherialWheel( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AetherialWheelDat.get_row( row_id ); - itemUnprimed = exdData->getField< int32_t >( row, 0 ); - itemPrimed = exdData->getField< int32_t >( row, 1 ); - grade = exdData->getField< uint8_t >( row, 2 ); - hoursRequired = exdData->getField< uint8_t >( row, 3 ); + auto row = exdData->m_AetherialWheelDat.get_row( row_id ); + itemUnprimed = exdData->getField< int32_t >( row, 0 ); + itemPrimed = exdData->getField< int32_t >( row, 1 ); + grade = exdData->getField< uint8_t >( row, 2 ); + hoursRequired = exdData->getField< uint8_t >( row, 3 ); } Core::Data::Aetheryte::Aetheryte( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AetheryteDat.get_row( row_id ); - placeName = exdData->getField< uint16_t >( row, 8 ); - aethernetName = exdData->getField< uint16_t >( row, 9 ); - territory = exdData->getField< uint16_t >( row, 10 ); - level.push_back( exdData->getField< uint32_t >( row, 11 ) ); - level.push_back( exdData->getField< uint32_t >( row, 12 ) ); - level.push_back( exdData->getField< uint32_t >( row, 13 ) ); - level.push_back( exdData->getField< uint32_t >( row, 14 ) ); - isAetheryte = exdData->getField< bool >( row, 15 ); - aethernetGroup = exdData->getField< uint8_t >( row, 16 ); - map = exdData->getField< uint16_t >( row, 19 ); - aetherstreamX = exdData->getField< int16_t >( row, 20 ); - aetherstreamY = exdData->getField< int16_t >( row, 21 ); + auto row = exdData->m_AetheryteDat.get_row( row_id ); + placeName = exdData->getField< uint16_t >( row, 8 ); + aethernetName = exdData->getField< uint16_t >( row, 9 ); + territory = exdData->getField< uint16_t >( row, 10 ); + level.push_back( exdData->getField< uint32_t >( row, 11 ) ); + level.push_back( exdData->getField< uint32_t >( row, 12 ) ); + level.push_back( exdData->getField< uint32_t >( row, 13 ) ); + level.push_back( exdData->getField< uint32_t >( row, 14 ) ); + isAetheryte = exdData->getField< bool >( row, 15 ); + aethernetGroup = exdData->getField< uint8_t >( row, 16 ); + map = exdData->getField< uint16_t >( row, 19 ); + aetherstreamX = exdData->getField< int16_t >( row, 20 ); + aetherstreamY = exdData->getField< int16_t >( row, 21 ); } Core::Data::AirshipExplorationLevel::AirshipExplorationLevel( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AirshipExplorationLevelDat.get_row( row_id ); - expToNext = exdData->getField< uint32_t >( row, 1 ); + auto row = exdData->m_AirshipExplorationLevelDat.get_row( row_id ); + expToNext = exdData->getField< uint32_t >( row, 1 ); } Core::Data::AirshipExplorationLog::AirshipExplorationLog( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AirshipExplorationLogDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_AirshipExplorationLogDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); } -Core::Data::AirshipExplorationParamType::AirshipExplorationParamType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::AirshipExplorationParamType::AirshipExplorationParamType( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AirshipExplorationParamTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_AirshipExplorationParamTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::AirshipExplorationPart::AirshipExplorationPart( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AirshipExplorationPartDat.get_row( row_id ); - rank = exdData->getField< uint8_t >( row, 1 ); - components = exdData->getField< uint8_t >( row, 2 ); - surveillance = exdData->getField< int16_t >( row, 3 ); - retrieval = exdData->getField< int16_t >( row, 4 ); - speed = exdData->getField< int16_t >( row, 5 ); - range = exdData->getField< int16_t >( row, 6 ); - favor = exdData->getField< int16_t >( row, 7 ); - repairMaterials = exdData->getField< uint8_t >( row, 9 ); + auto row = exdData->m_AirshipExplorationPartDat.get_row( row_id ); + rank = exdData->getField< uint8_t >( row, 1 ); + components = exdData->getField< uint8_t >( row, 2 ); + surveillance = exdData->getField< int16_t >( row, 3 ); + retrieval = exdData->getField< int16_t >( row, 4 ); + speed = exdData->getField< int16_t >( row, 5 ); + range = exdData->getField< int16_t >( row, 6 ); + favor = exdData->getField< int16_t >( row, 7 ); + repairMaterials = exdData->getField< uint8_t >( row, 9 ); } Core::Data::AirshipExplorationPoint::AirshipExplorationPoint( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AirshipExplorationPointDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - nameShort = exdData->getField< std::string >( row, 1 ); - requiredLevel = exdData->getField< uint8_t >( row, 5 ); - requiredFuel = exdData->getField< uint16_t >( row, 6 ); - durationmin = exdData->getField< uint16_t >( row, 7 ); - requiredSurveillance = exdData->getField< uint8_t >( row, 10 ); - expReward = exdData->getField< uint32_t >( row, 13 ); + auto row = exdData->m_AirshipExplorationPointDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + nameShort = exdData->getField< std::string >( row, 1 ); + requiredLevel = exdData->getField< uint8_t >( row, 5 ); + requiredFuel = exdData->getField< uint16_t >( row, 6 ); + durationmin = exdData->getField< uint16_t >( row, 7 ); + requiredSurveillance = exdData->getField< uint8_t >( row, 10 ); + expReward = exdData->getField< uint32_t >( row, 13 ); } Core::Data::AnimaWeapon5::AnimaWeapon5( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeapon5Dat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - secondaryStatTotal = exdData->getField< uint8_t >( row, 2 ); - parameter.push_back( exdData->getField< uint8_t >( row, 3 ) ); - parameter.push_back( exdData->getField< uint8_t >( row, 4 ) ); - parameter.push_back( exdData->getField< uint8_t >( row, 5 ) ); - parameter.push_back( exdData->getField< uint8_t >( row, 6 ) ); - parameter.push_back( exdData->getField< uint8_t >( row, 7 ) ); + auto row = exdData->m_AnimaWeapon5Dat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + secondaryStatTotal = exdData->getField< uint8_t >( row, 2 ); + parameter.push_back( exdData->getField< uint8_t >( row, 3 ) ); + parameter.push_back( exdData->getField< uint8_t >( row, 4 ) ); + parameter.push_back( exdData->getField< uint8_t >( row, 5 ) ); + parameter.push_back( exdData->getField< uint8_t >( row, 6 ) ); + parameter.push_back( exdData->getField< uint8_t >( row, 7 ) ); } Core::Data::AnimaWeapon5Param::AnimaWeapon5Param( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeapon5ParamDat.get_row( row_id ); - baseParam = exdData->getField< uint8_t >( row, 0 ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_AnimaWeapon5ParamDat.get_row( row_id ); + baseParam = exdData->getField< uint8_t >( row, 0 ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::AnimaWeapon5PatternGroup::AnimaWeapon5PatternGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeapon5PatternGroupDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_AnimaWeapon5PatternGroupDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::AnimaWeapon5SpiritTalk::AnimaWeapon5SpiritTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeapon5SpiritTalkDat.get_row( row_id ); - dialogue = exdData->getField< int32_t >( row, 0 ); + auto row = exdData->m_AnimaWeapon5SpiritTalkDat.get_row( row_id ); + dialogue = exdData->getField< int32_t >( row, 0 ); } -Core::Data::AnimaWeapon5SpiritTalkParam::AnimaWeapon5SpiritTalkParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::AnimaWeapon5SpiritTalkParam::AnimaWeapon5SpiritTalkParam( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeapon5SpiritTalkParamDat.get_row( row_id ); - prologue = exdData->getField< std::string >( row, 0 ); - epilogue = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_AnimaWeapon5SpiritTalkParamDat.get_row( row_id ); + prologue = exdData->getField< std::string >( row, 0 ); + epilogue = exdData->getField< std::string >( row, 1 ); } Core::Data::AnimaWeapon5TradeItem::AnimaWeapon5TradeItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeapon5TradeItemDat.get_row( row_id ); - crystalSand = exdData->getField< uint32_t >( row, 1 ); - qty = exdData->getField< uint8_t >( row, 2 ); - category = exdData->getField< uint8_t >( row, 27 ); + auto row = exdData->m_AnimaWeapon5TradeItemDat.get_row( row_id ); + crystalSand = exdData->getField< uint32_t >( row, 1 ); + qty = exdData->getField< uint8_t >( row, 2 ); + category = exdData->getField< uint8_t >( row, 27 ); } Core::Data::AnimaWeaponFUITalk::AnimaWeaponFUITalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeaponFUITalkDat.get_row( row_id ); - dialogue = exdData->getField< int32_t >( row, 0 ); + auto row = exdData->m_AnimaWeaponFUITalkDat.get_row( row_id ); + dialogue = exdData->getField< int32_t >( row, 0 ); } Core::Data::AnimaWeaponFUITalkParam::AnimaWeaponFUITalkParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeaponFUITalkParamDat.get_row( row_id ); - prologue = exdData->getField< std::string >( row, 0 ); - epilogue = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_AnimaWeaponFUITalkParamDat.get_row( row_id ); + prologue = exdData->getField< std::string >( row, 0 ); + epilogue = exdData->getField< std::string >( row, 1 ); } Core::Data::AnimaWeaponIcon::AnimaWeaponIcon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeaponIconDat.get_row( row_id ); - hyperconductive = exdData->getField< int32_t >( row, 0 ); - reborn = exdData->getField< int32_t >( row, 1 ); - sharpened = exdData->getField< int32_t >( row, 2 ); - zodiac = exdData->getField< int32_t >( row, 3 ); - zodiacLux = exdData->getField< int32_t >( row, 4 ); + auto row = exdData->m_AnimaWeaponIconDat.get_row( row_id ); + hyperconductive = exdData->getField< int32_t >( row, 0 ); + reborn = exdData->getField< int32_t >( row, 1 ); + sharpened = exdData->getField< int32_t >( row, 2 ); + zodiac = exdData->getField< int32_t >( row, 3 ); + zodiacLux = exdData->getField< int32_t >( row, 4 ); } Core::Data::AnimaWeaponItem::AnimaWeaponItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AnimaWeaponItemDat.get_row( row_id ); - item.push_back( exdData->getField< uint32_t >( row, 0 ) ); - item.push_back( exdData->getField< uint32_t >( row, 1 ) ); - item.push_back( exdData->getField< uint32_t >( row, 2 ) ); - item.push_back( exdData->getField< uint32_t >( row, 3 ) ); - item.push_back( exdData->getField< uint32_t >( row, 4 ) ); - item.push_back( exdData->getField< uint32_t >( row, 5 ) ); - item.push_back( exdData->getField< uint32_t >( row, 6 ) ); - item.push_back( exdData->getField< uint32_t >( row, 7 ) ); - item.push_back( exdData->getField< uint32_t >( row, 8 ) ); - item.push_back( exdData->getField< uint32_t >( row, 9 ) ); - item.push_back( exdData->getField< uint32_t >( row, 10 ) ); - item.push_back( exdData->getField< uint32_t >( row, 11 ) ); - item.push_back( exdData->getField< uint32_t >( row, 12 ) ); - item.push_back( exdData->getField< uint32_t >( row, 13 ) ); + auto row = exdData->m_AnimaWeaponItemDat.get_row( row_id ); + item.push_back( exdData->getField< uint32_t >( row, 0 ) ); + item.push_back( exdData->getField< uint32_t >( row, 1 ) ); + item.push_back( exdData->getField< uint32_t >( row, 2 ) ); + item.push_back( exdData->getField< uint32_t >( row, 3 ) ); + item.push_back( exdData->getField< uint32_t >( row, 4 ) ); + item.push_back( exdData->getField< uint32_t >( row, 5 ) ); + item.push_back( exdData->getField< uint32_t >( row, 6 ) ); + item.push_back( exdData->getField< uint32_t >( row, 7 ) ); + item.push_back( exdData->getField< uint32_t >( row, 8 ) ); + item.push_back( exdData->getField< uint32_t >( row, 9 ) ); + item.push_back( exdData->getField< uint32_t >( row, 10 ) ); + item.push_back( exdData->getField< uint32_t >( row, 11 ) ); + item.push_back( exdData->getField< uint32_t >( row, 12 ) ); + item.push_back( exdData->getField< uint32_t >( row, 13 ) ); } Core::Data::AquariumFish::AquariumFish( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AquariumFishDat.get_row( row_id ); - aquariumWater = exdData->getField< uint8_t >( row, 0 ); - size = exdData->getField< uint8_t >( row, 1 ); - item = exdData->getField< uint32_t >( row, 2 ); + auto row = exdData->m_AquariumFishDat.get_row( row_id ); + aquariumWater = exdData->getField< uint8_t >( row, 0 ); + size = exdData->getField< uint8_t >( row, 1 ); + item = exdData->getField< uint32_t >( row, 2 ); } Core::Data::AquariumWater::AquariumWater( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AquariumWaterDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_AquariumWaterDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::AttackType::AttackType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_AttackTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_AttackTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Balloon::Balloon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BalloonDat.get_row( row_id ); - dialogue = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_BalloonDat.get_row( row_id ); + dialogue = exdData->getField< std::string >( row, 1 ); } Core::Data::BaseParam::BaseParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BaseParamDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 1 ); - description = exdData->getField< std::string >( row, 2 ); - oneHWpn = exdData->getField< uint8_t >( row, 4 ); - oH = exdData->getField< uint8_t >( row, 5 ); - head = exdData->getField< uint8_t >( row, 6 ); - chest = exdData->getField< uint8_t >( row, 7 ); - hands = exdData->getField< uint8_t >( row, 8 ); - waist = exdData->getField< uint8_t >( row, 9 ); - legs = exdData->getField< uint8_t >( row, 10 ); - feet = exdData->getField< uint8_t >( row, 11 ); - earring = exdData->getField< uint8_t >( row, 12 ); - necklace = exdData->getField< uint8_t >( row, 13 ); - bracelet = exdData->getField< uint8_t >( row, 14 ); - ring = exdData->getField< uint8_t >( row, 15 ); - twoHWpn = exdData->getField< uint8_t >( row, 16 ); - chestHead = exdData->getField< uint8_t >( row, 18 ); - chestHeadLegsFeet = exdData->getField< uint8_t >( row, 19 ); - legsFeet = exdData->getField< uint8_t >( row, 21 ); - headChestHandsLegsFeet = exdData->getField< uint8_t >( row, 22 ); - chestLegsGloves = exdData->getField< uint8_t >( row, 23 ); - chestLegsFeet = exdData->getField< uint8_t >( row, 24 ); + auto row = exdData->m_BaseParamDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 1 ); + description = exdData->getField< std::string >( row, 2 ); + oneHWpn = exdData->getField< uint8_t >( row, 4 ); + oH = exdData->getField< uint8_t >( row, 5 ); + head = exdData->getField< uint8_t >( row, 6 ); + chest = exdData->getField< uint8_t >( row, 7 ); + hands = exdData->getField< uint8_t >( row, 8 ); + waist = exdData->getField< uint8_t >( row, 9 ); + legs = exdData->getField< uint8_t >( row, 10 ); + feet = exdData->getField< uint8_t >( row, 11 ); + earring = exdData->getField< uint8_t >( row, 12 ); + necklace = exdData->getField< uint8_t >( row, 13 ); + bracelet = exdData->getField< uint8_t >( row, 14 ); + ring = exdData->getField< uint8_t >( row, 15 ); + twoHWpn = exdData->getField< uint8_t >( row, 16 ); + chestHead = exdData->getField< uint8_t >( row, 18 ); + chestHeadLegsFeet = exdData->getField< uint8_t >( row, 19 ); + legsFeet = exdData->getField< uint8_t >( row, 21 ); + headChestHandsLegsFeet = exdData->getField< uint8_t >( row, 22 ); + chestLegsGloves = exdData->getField< uint8_t >( row, 23 ); + chestLegsFeet = exdData->getField< uint8_t >( row, 24 ); } Core::Data::BattleLeve::BattleLeve( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BattleLeveDat.get_row( row_id ); - enemyLevel.push_back( exdData->getField< uint16_t >( row, 16 ) ); - enemyLevel.push_back( exdData->getField< uint16_t >( row, 17 ) ); - enemyLevel.push_back( exdData->getField< uint16_t >( row, 18 ) ); - enemyLevel.push_back( exdData->getField< uint16_t >( row, 19 ) ); - enemyLevel.push_back( exdData->getField< uint16_t >( row, 20 ) ); - enemyLevel.push_back( exdData->getField< uint16_t >( row, 21 ) ); - enemyLevel.push_back( exdData->getField< uint16_t >( row, 22 ) ); - enemyLevel.push_back( exdData->getField< uint16_t >( row, 23 ) ); - bNpcName.push_back( exdData->getField< uint32_t >( row, 24 ) ); - bNpcName.push_back( exdData->getField< uint32_t >( row, 25 ) ); - bNpcName.push_back( exdData->getField< uint32_t >( row, 26 ) ); - bNpcName.push_back( exdData->getField< uint32_t >( row, 27 ) ); - bNpcName.push_back( exdData->getField< uint32_t >( row, 28 ) ); - bNpcName.push_back( exdData->getField< uint32_t >( row, 29 ) ); - bNpcName.push_back( exdData->getField< uint32_t >( row, 30 ) ); - bNpcName.push_back( exdData->getField< uint32_t >( row, 31 ) ); - itemsInvolved.push_back( exdData->getField< int32_t >( row, 32 ) ); - itemsInvolved.push_back( exdData->getField< int32_t >( row, 33 ) ); - itemsInvolved.push_back( exdData->getField< int32_t >( row, 34 ) ); - itemsInvolved.push_back( exdData->getField< int32_t >( row, 35 ) ); - itemsInvolved.push_back( exdData->getField< int32_t >( row, 36 ) ); - itemsInvolved.push_back( exdData->getField< int32_t >( row, 37 ) ); - itemsInvolved.push_back( exdData->getField< int32_t >( row, 38 ) ); - itemsInvolved.push_back( exdData->getField< int32_t >( row, 39 ) ); - itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 40 ) ); - itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 41 ) ); - itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 42 ) ); - itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 43 ) ); - itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 44 ) ); - itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 45 ) ); - itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 46 ) ); - itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 47 ) ); - itemDropRate.push_back( exdData->getField< uint8_t >( row, 48 ) ); - itemDropRate.push_back( exdData->getField< uint8_t >( row, 49 ) ); - itemDropRate.push_back( exdData->getField< uint8_t >( row, 50 ) ); - itemDropRate.push_back( exdData->getField< uint8_t >( row, 51 ) ); - itemDropRate.push_back( exdData->getField< uint8_t >( row, 52 ) ); - itemDropRate.push_back( exdData->getField< uint8_t >( row, 53 ) ); - itemDropRate.push_back( exdData->getField< uint8_t >( row, 54 ) ); - itemDropRate.push_back( exdData->getField< uint8_t >( row, 55 ) ); + auto row = exdData->m_BattleLeveDat.get_row( row_id ); + enemyLevel.push_back( exdData->getField< uint16_t >( row, 16 ) ); + enemyLevel.push_back( exdData->getField< uint16_t >( row, 17 ) ); + enemyLevel.push_back( exdData->getField< uint16_t >( row, 18 ) ); + enemyLevel.push_back( exdData->getField< uint16_t >( row, 19 ) ); + enemyLevel.push_back( exdData->getField< uint16_t >( row, 20 ) ); + enemyLevel.push_back( exdData->getField< uint16_t >( row, 21 ) ); + enemyLevel.push_back( exdData->getField< uint16_t >( row, 22 ) ); + enemyLevel.push_back( exdData->getField< uint16_t >( row, 23 ) ); + bNpcName.push_back( exdData->getField< uint32_t >( row, 24 ) ); + bNpcName.push_back( exdData->getField< uint32_t >( row, 25 ) ); + bNpcName.push_back( exdData->getField< uint32_t >( row, 26 ) ); + bNpcName.push_back( exdData->getField< uint32_t >( row, 27 ) ); + bNpcName.push_back( exdData->getField< uint32_t >( row, 28 ) ); + bNpcName.push_back( exdData->getField< uint32_t >( row, 29 ) ); + bNpcName.push_back( exdData->getField< uint32_t >( row, 30 ) ); + bNpcName.push_back( exdData->getField< uint32_t >( row, 31 ) ); + itemsInvolved.push_back( exdData->getField< int32_t >( row, 32 ) ); + itemsInvolved.push_back( exdData->getField< int32_t >( row, 33 ) ); + itemsInvolved.push_back( exdData->getField< int32_t >( row, 34 ) ); + itemsInvolved.push_back( exdData->getField< int32_t >( row, 35 ) ); + itemsInvolved.push_back( exdData->getField< int32_t >( row, 36 ) ); + itemsInvolved.push_back( exdData->getField< int32_t >( row, 37 ) ); + itemsInvolved.push_back( exdData->getField< int32_t >( row, 38 ) ); + itemsInvolved.push_back( exdData->getField< int32_t >( row, 39 ) ); + itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 40 ) ); + itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 41 ) ); + itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 42 ) ); + itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 43 ) ); + itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 44 ) ); + itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 45 ) ); + itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 46 ) ); + itemsInvolvedQty.push_back( exdData->getField< uint8_t >( row, 47 ) ); + itemDropRate.push_back( exdData->getField< uint8_t >( row, 48 ) ); + itemDropRate.push_back( exdData->getField< uint8_t >( row, 49 ) ); + itemDropRate.push_back( exdData->getField< uint8_t >( row, 50 ) ); + itemDropRate.push_back( exdData->getField< uint8_t >( row, 51 ) ); + itemDropRate.push_back( exdData->getField< uint8_t >( row, 52 ) ); + itemDropRate.push_back( exdData->getField< uint8_t >( row, 53 ) ); + itemDropRate.push_back( exdData->getField< uint8_t >( row, 54 ) ); + itemDropRate.push_back( exdData->getField< uint8_t >( row, 55 ) ); } Core::Data::BeastRankBonus::BeastRankBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BeastRankBonusDat.get_row( row_id ); - item = exdData->getField< uint32_t >( row, 8 ); - itemQuantity.push_back( exdData->getField< uint8_t >( row, 9 ) ); - itemQuantity.push_back( exdData->getField< uint8_t >( row, 10 ) ); - itemQuantity.push_back( exdData->getField< uint8_t >( row, 11 ) ); - itemQuantity.push_back( exdData->getField< uint8_t >( row, 12 ) ); - itemQuantity.push_back( exdData->getField< uint8_t >( row, 13 ) ); - itemQuantity.push_back( exdData->getField< uint8_t >( row, 14 ) ); - itemQuantity.push_back( exdData->getField< uint8_t >( row, 15 ) ); - itemQuantity.push_back( exdData->getField< uint8_t >( row, 16 ) ); + auto row = exdData->m_BeastRankBonusDat.get_row( row_id ); + item = exdData->getField< uint32_t >( row, 8 ); + itemQuantity.push_back( exdData->getField< uint8_t >( row, 9 ) ); + itemQuantity.push_back( exdData->getField< uint8_t >( row, 10 ) ); + itemQuantity.push_back( exdData->getField< uint8_t >( row, 11 ) ); + itemQuantity.push_back( exdData->getField< uint8_t >( row, 12 ) ); + itemQuantity.push_back( exdData->getField< uint8_t >( row, 13 ) ); + itemQuantity.push_back( exdData->getField< uint8_t >( row, 14 ) ); + itemQuantity.push_back( exdData->getField< uint8_t >( row, 15 ) ); + itemQuantity.push_back( exdData->getField< uint8_t >( row, 16 ) ); } Core::Data::BeastReputationRank::BeastReputationRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BeastReputationRankDat.get_row( row_id ); - requiredReputation = exdData->getField< uint16_t >( row, 0 ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_BeastReputationRankDat.get_row( row_id ); + requiredReputation = exdData->getField< uint16_t >( row, 0 ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::BeastTribe::BeastTribe( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BeastTribeDat.get_row( row_id ); - minLevel = exdData->getField< uint8_t >( row, 0 ); - maxLevel = exdData->getField< uint8_t >( row, 1 ); - beastRankBonus = exdData->getField< uint8_t >( row, 2 ); - iconReputation = exdData->getField< uint32_t >( row, 3 ); - icon = exdData->getField< uint32_t >( row, 4 ); - maxRank = exdData->getField< uint8_t >( row, 5 ); - alliedBeastTribeQuest = exdData->getField< uint32_t >( row, 6 ); - expansion = exdData->getField< uint8_t >( row, 7 ); - currencyItem = exdData->getField< uint32_t >( row, 8 ); - displayOrder = exdData->getField< uint8_t >( row, 9 ); - name = exdData->getField< std::string >( row, 10 ); - nameRelation = exdData->getField< std::string >( row, 18 ); + auto row = exdData->m_BeastTribeDat.get_row( row_id ); + minLevel = exdData->getField< uint8_t >( row, 0 ); + maxLevel = exdData->getField< uint8_t >( row, 1 ); + beastRankBonus = exdData->getField< uint8_t >( row, 2 ); + iconReputation = exdData->getField< uint32_t >( row, 3 ); + icon = exdData->getField< uint32_t >( row, 4 ); + maxRank = exdData->getField< uint8_t >( row, 5 ); + alliedBeastTribeQuest = exdData->getField< uint32_t >( row, 6 ); + expansion = exdData->getField< uint8_t >( row, 7 ); + currencyItem = exdData->getField< uint32_t >( row, 8 ); + displayOrder = exdData->getField< uint8_t >( row, 9 ); + name = exdData->getField< std::string >( row, 10 ); + nameRelation = exdData->getField< std::string >( row, 18 ); } Core::Data::Behavior::Behavior( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BehaviorDat.get_row( row_id ); - balloon = exdData->getField< uint16_t >( row, 6 ); + auto row = exdData->m_BehaviorDat.get_row( row_id ); + balloon = exdData->getField< uint16_t >( row, 6 ); } Core::Data::BGM::BGM( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BGMDat.get_row( row_id ); - file = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_BGMDat.get_row( row_id ); + file = exdData->getField< std::string >( row, 0 ); } Core::Data::BNpcAnnounceIcon::BNpcAnnounceIcon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BNpcAnnounceIconDat.get_row( row_id ); - icon = exdData->getField< uint32_t >( row, 0 ); + auto row = exdData->m_BNpcAnnounceIconDat.get_row( row_id ); + icon = exdData->getField< uint32_t >( row, 0 ); } Core::Data::BNpcBase::BNpcBase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BNpcBaseDat.get_row( row_id ); - scale = exdData->getField< float >( row, 4 ); - modelChara = exdData->getField< uint16_t >( row, 5 ); - bNpcCustomize = exdData->getField< uint16_t >( row, 6 ); - npcEquip = exdData->getField< uint16_t >( row, 7 ); - arrayEventHandler = exdData->getField< int32_t >( row, 11 ); + auto row = exdData->m_BNpcBaseDat.get_row( row_id ); + scale = exdData->getField< float >( row, 4 ); + modelChara = exdData->getField< uint16_t >( row, 5 ); + bNpcCustomize = exdData->getField< uint16_t >( row, 6 ); + npcEquip = exdData->getField< uint16_t >( row, 7 ); + arrayEventHandler = exdData->getField< int32_t >( row, 11 ); } Core::Data::BNpcCustomize::BNpcCustomize( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BNpcCustomizeDat.get_row( row_id ); - race = exdData->getField< uint8_t >( row, 0 ); - gender = exdData->getField< uint8_t >( row, 1 ); - bodyType = exdData->getField< uint8_t >( row, 2 ); - height = exdData->getField< uint8_t >( row, 3 ); - tribe = exdData->getField< uint8_t >( row, 4 ); - face = exdData->getField< uint8_t >( row, 5 ); - hairStyle = exdData->getField< uint8_t >( row, 6 ); - hairHighlight = exdData->getField< uint8_t >( row, 7 ); - skinColor = exdData->getField< uint8_t >( row, 8 ); - eyeHeterochromia = exdData->getField< uint8_t >( row, 9 ); - hairColor = exdData->getField< uint8_t >( row, 10 ); - hairHighlightColor = exdData->getField< uint8_t >( row, 11 ); - facialFeature = exdData->getField< uint8_t >( row, 12 ); - facialFeatureColor = exdData->getField< uint8_t >( row, 13 ); - eyebrows = exdData->getField< uint8_t >( row, 14 ); - eyeColor = exdData->getField< uint8_t >( row, 15 ); - eyeShape = exdData->getField< uint8_t >( row, 16 ); - nose = exdData->getField< uint8_t >( row, 17 ); - jaw = exdData->getField< uint8_t >( row, 18 ); - mouth = exdData->getField< uint8_t >( row, 19 ); - lipColor = exdData->getField< uint8_t >( row, 20 ); - bustOrTone1 = exdData->getField< uint8_t >( row, 21 ); - extraFeature1 = exdData->getField< uint8_t >( row, 22 ); - extraFeature2OrBust = exdData->getField< uint8_t >( row, 23 ); - facePaint = exdData->getField< uint8_t >( row, 24 ); - facePaintColor = exdData->getField< uint8_t >( row, 25 ); + auto row = exdData->m_BNpcCustomizeDat.get_row( row_id ); + race = exdData->getField< uint8_t >( row, 0 ); + gender = exdData->getField< uint8_t >( row, 1 ); + bodyType = exdData->getField< uint8_t >( row, 2 ); + height = exdData->getField< uint8_t >( row, 3 ); + tribe = exdData->getField< uint8_t >( row, 4 ); + face = exdData->getField< uint8_t >( row, 5 ); + hairStyle = exdData->getField< uint8_t >( row, 6 ); + hairHighlight = exdData->getField< uint8_t >( row, 7 ); + skinColor = exdData->getField< uint8_t >( row, 8 ); + eyeHeterochromia = exdData->getField< uint8_t >( row, 9 ); + hairColor = exdData->getField< uint8_t >( row, 10 ); + hairHighlightColor = exdData->getField< uint8_t >( row, 11 ); + facialFeature = exdData->getField< uint8_t >( row, 12 ); + facialFeatureColor = exdData->getField< uint8_t >( row, 13 ); + eyebrows = exdData->getField< uint8_t >( row, 14 ); + eyeColor = exdData->getField< uint8_t >( row, 15 ); + eyeShape = exdData->getField< uint8_t >( row, 16 ); + nose = exdData->getField< uint8_t >( row, 17 ); + jaw = exdData->getField< uint8_t >( row, 18 ); + mouth = exdData->getField< uint8_t >( row, 19 ); + lipColor = exdData->getField< uint8_t >( row, 20 ); + bustOrTone1 = exdData->getField< uint8_t >( row, 21 ); + extraFeature1 = exdData->getField< uint8_t >( row, 22 ); + extraFeature2OrBust = exdData->getField< uint8_t >( row, 23 ); + facePaint = exdData->getField< uint8_t >( row, 24 ); + facePaintColor = exdData->getField< uint8_t >( row, 25 ); } Core::Data::BNpcName::BNpcName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BNpcNameDat.get_row( row_id ); - singular = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); + auto row = exdData->m_BNpcNameDat.get_row( row_id ); + singular = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); } Core::Data::Buddy::Buddy( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BuddyDat.get_row( row_id ); - questRequirement2 = exdData->getField< int32_t >( row, 1 ); - questRequirement1 = exdData->getField< int32_t >( row, 2 ); - soundEffect4 = exdData->getField< std::string >( row, 4 ); - soundEffect3 = exdData->getField< std::string >( row, 5 ); - soundEffect2 = exdData->getField< std::string >( row, 6 ); - soundEffect1 = exdData->getField< std::string >( row, 7 ); + auto row = exdData->m_BuddyDat.get_row( row_id ); + questRequirement2 = exdData->getField< int32_t >( row, 1 ); + questRequirement1 = exdData->getField< int32_t >( row, 2 ); + soundEffect4 = exdData->getField< std::string >( row, 4 ); + soundEffect3 = exdData->getField< std::string >( row, 5 ); + soundEffect2 = exdData->getField< std::string >( row, 6 ); + soundEffect1 = exdData->getField< std::string >( row, 7 ); } Core::Data::BuddyAction::BuddyAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BuddyActionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - icon = exdData->getField< int32_t >( row, 2 ); - iconStatus = exdData->getField< int32_t >( row, 3 ); + auto row = exdData->m_BuddyActionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + icon = exdData->getField< int32_t >( row, 2 ); + iconStatus = exdData->getField< int32_t >( row, 3 ); } Core::Data::BuddyEquip::BuddyEquip( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BuddyEquipDat.get_row( row_id ); - singular = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - name = exdData->getField< std::string >( row, 8 ); - modelTop = exdData->getField< int32_t >( row, 9 ); - modelBody = exdData->getField< int32_t >( row, 10 ); - modelLegs = exdData->getField< int32_t >( row, 11 ); - grandCompany = exdData->getField< uint8_t >( row, 12 ); - iconHead = exdData->getField< uint16_t >( row, 13 ); - iconBody = exdData->getField< uint16_t >( row, 14 ); - iconLegs = exdData->getField< uint16_t >( row, 15 ); + auto row = exdData->m_BuddyEquipDat.get_row( row_id ); + singular = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + name = exdData->getField< std::string >( row, 8 ); + modelTop = exdData->getField< int32_t >( row, 9 ); + modelBody = exdData->getField< int32_t >( row, 10 ); + modelLegs = exdData->getField< int32_t >( row, 11 ); + grandCompany = exdData->getField< uint8_t >( row, 12 ); + iconHead = exdData->getField< uint16_t >( row, 13 ); + iconBody = exdData->getField< uint16_t >( row, 14 ); + iconLegs = exdData->getField< uint16_t >( row, 15 ); } Core::Data::BuddyItem::BuddyItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BuddyItemDat.get_row( row_id ); - name = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_BuddyItemDat.get_row( row_id ); + name = exdData->getField< uint16_t >( row, 0 ); } Core::Data::BuddyRank::BuddyRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BuddyRankDat.get_row( row_id ); - expRequired = exdData->getField< uint32_t >( row, 0 ); + auto row = exdData->m_BuddyRankDat.get_row( row_id ); + expRequired = exdData->getField< uint32_t >( row, 0 ); } Core::Data::BuddySkill::BuddySkill( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_BuddySkillDat.get_row( row_id ); - buddyLevel = exdData->getField< uint8_t >( row, 0 ); - isActive = exdData->getField< bool >( row, 1 ); - defender = exdData->getField< uint16_t >( row, 2 ); - attacker = exdData->getField< uint16_t >( row, 3 ); - healer = exdData->getField< uint16_t >( row, 4 ); + auto row = exdData->m_BuddySkillDat.get_row( row_id ); + buddyLevel = exdData->getField< uint8_t >( row, 0 ); + isActive = exdData->getField< bool >( row, 1 ); + defender = exdData->getField< uint16_t >( row, 2 ); + attacker = exdData->getField< uint16_t >( row, 3 ); + healer = exdData->getField< uint16_t >( row, 4 ); } Core::Data::Cabinet::Cabinet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CabinetDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - order = exdData->getField< uint16_t >( row, 1 ); - category = exdData->getField< uint8_t >( row, 2 ); + auto row = exdData->m_CabinetDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + order = exdData->getField< uint16_t >( row, 1 ); + category = exdData->getField< uint8_t >( row, 2 ); } Core::Data::CabinetCategory::CabinetCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CabinetCategoryDat.get_row( row_id ); - menuOrder = exdData->getField< uint8_t >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); - category = exdData->getField< int32_t >( row, 2 ); + auto row = exdData->m_CabinetCategoryDat.get_row( row_id ); + menuOrder = exdData->getField< uint8_t >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); + category = exdData->getField< int32_t >( row, 2 ); } Core::Data::Calendar::Calendar( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CalendarDat.get_row( row_id ); - month.push_back( exdData->getField< uint8_t >( row, 0 ) ); - month.push_back( exdData->getField< uint8_t >( row, 1 ) ); - month.push_back( exdData->getField< uint8_t >( row, 2 ) ); - month.push_back( exdData->getField< uint8_t >( row, 3 ) ); - month.push_back( exdData->getField< uint8_t >( row, 4 ) ); - month.push_back( exdData->getField< uint8_t >( row, 5 ) ); - month.push_back( exdData->getField< uint8_t >( row, 6 ) ); - month.push_back( exdData->getField< uint8_t >( row, 7 ) ); - month.push_back( exdData->getField< uint8_t >( row, 8 ) ); - month.push_back( exdData->getField< uint8_t >( row, 9 ) ); - month.push_back( exdData->getField< uint8_t >( row, 10 ) ); - month.push_back( exdData->getField< uint8_t >( row, 11 ) ); - month.push_back( exdData->getField< uint8_t >( row, 12 ) ); - month.push_back( exdData->getField< uint8_t >( row, 13 ) ); - month.push_back( exdData->getField< uint8_t >( row, 14 ) ); - month.push_back( exdData->getField< uint8_t >( row, 15 ) ); - month.push_back( exdData->getField< uint8_t >( row, 16 ) ); - month.push_back( exdData->getField< uint8_t >( row, 17 ) ); - month.push_back( exdData->getField< uint8_t >( row, 18 ) ); - month.push_back( exdData->getField< uint8_t >( row, 19 ) ); - month.push_back( exdData->getField< uint8_t >( row, 20 ) ); - month.push_back( exdData->getField< uint8_t >( row, 21 ) ); - month.push_back( exdData->getField< uint8_t >( row, 22 ) ); - month.push_back( exdData->getField< uint8_t >( row, 23 ) ); - month.push_back( exdData->getField< uint8_t >( row, 24 ) ); - month.push_back( exdData->getField< uint8_t >( row, 25 ) ); - month.push_back( exdData->getField< uint8_t >( row, 26 ) ); - month.push_back( exdData->getField< uint8_t >( row, 27 ) ); - month.push_back( exdData->getField< uint8_t >( row, 28 ) ); - month.push_back( exdData->getField< uint8_t >( row, 29 ) ); - month.push_back( exdData->getField< uint8_t >( row, 30 ) ); - month.push_back( exdData->getField< uint8_t >( row, 31 ) ); - day.push_back( exdData->getField< uint8_t >( row, 32 ) ); - day.push_back( exdData->getField< uint8_t >( row, 33 ) ); - day.push_back( exdData->getField< uint8_t >( row, 34 ) ); - day.push_back( exdData->getField< uint8_t >( row, 35 ) ); - day.push_back( exdData->getField< uint8_t >( row, 36 ) ); - day.push_back( exdData->getField< uint8_t >( row, 37 ) ); - day.push_back( exdData->getField< uint8_t >( row, 38 ) ); - day.push_back( exdData->getField< uint8_t >( row, 39 ) ); - day.push_back( exdData->getField< uint8_t >( row, 40 ) ); - day.push_back( exdData->getField< uint8_t >( row, 41 ) ); - day.push_back( exdData->getField< uint8_t >( row, 42 ) ); - day.push_back( exdData->getField< uint8_t >( row, 43 ) ); - day.push_back( exdData->getField< uint8_t >( row, 44 ) ); - day.push_back( exdData->getField< uint8_t >( row, 45 ) ); - day.push_back( exdData->getField< uint8_t >( row, 46 ) ); - day.push_back( exdData->getField< uint8_t >( row, 47 ) ); - day.push_back( exdData->getField< uint8_t >( row, 48 ) ); - day.push_back( exdData->getField< uint8_t >( row, 49 ) ); - day.push_back( exdData->getField< uint8_t >( row, 50 ) ); - day.push_back( exdData->getField< uint8_t >( row, 51 ) ); - day.push_back( exdData->getField< uint8_t >( row, 52 ) ); - day.push_back( exdData->getField< uint8_t >( row, 53 ) ); - day.push_back( exdData->getField< uint8_t >( row, 54 ) ); - day.push_back( exdData->getField< uint8_t >( row, 55 ) ); - day.push_back( exdData->getField< uint8_t >( row, 56 ) ); - day.push_back( exdData->getField< uint8_t >( row, 57 ) ); - day.push_back( exdData->getField< uint8_t >( row, 58 ) ); - day.push_back( exdData->getField< uint8_t >( row, 59 ) ); - day.push_back( exdData->getField< uint8_t >( row, 60 ) ); - day.push_back( exdData->getField< uint8_t >( row, 61 ) ); - day.push_back( exdData->getField< uint8_t >( row, 62 ) ); - day.push_back( exdData->getField< uint8_t >( row, 63 ) ); + auto row = exdData->m_CalendarDat.get_row( row_id ); + month.push_back( exdData->getField< uint8_t >( row, 0 ) ); + month.push_back( exdData->getField< uint8_t >( row, 1 ) ); + month.push_back( exdData->getField< uint8_t >( row, 2 ) ); + month.push_back( exdData->getField< uint8_t >( row, 3 ) ); + month.push_back( exdData->getField< uint8_t >( row, 4 ) ); + month.push_back( exdData->getField< uint8_t >( row, 5 ) ); + month.push_back( exdData->getField< uint8_t >( row, 6 ) ); + month.push_back( exdData->getField< uint8_t >( row, 7 ) ); + month.push_back( exdData->getField< uint8_t >( row, 8 ) ); + month.push_back( exdData->getField< uint8_t >( row, 9 ) ); + month.push_back( exdData->getField< uint8_t >( row, 10 ) ); + month.push_back( exdData->getField< uint8_t >( row, 11 ) ); + month.push_back( exdData->getField< uint8_t >( row, 12 ) ); + month.push_back( exdData->getField< uint8_t >( row, 13 ) ); + month.push_back( exdData->getField< uint8_t >( row, 14 ) ); + month.push_back( exdData->getField< uint8_t >( row, 15 ) ); + month.push_back( exdData->getField< uint8_t >( row, 16 ) ); + month.push_back( exdData->getField< uint8_t >( row, 17 ) ); + month.push_back( exdData->getField< uint8_t >( row, 18 ) ); + month.push_back( exdData->getField< uint8_t >( row, 19 ) ); + month.push_back( exdData->getField< uint8_t >( row, 20 ) ); + month.push_back( exdData->getField< uint8_t >( row, 21 ) ); + month.push_back( exdData->getField< uint8_t >( row, 22 ) ); + month.push_back( exdData->getField< uint8_t >( row, 23 ) ); + month.push_back( exdData->getField< uint8_t >( row, 24 ) ); + month.push_back( exdData->getField< uint8_t >( row, 25 ) ); + month.push_back( exdData->getField< uint8_t >( row, 26 ) ); + month.push_back( exdData->getField< uint8_t >( row, 27 ) ); + month.push_back( exdData->getField< uint8_t >( row, 28 ) ); + month.push_back( exdData->getField< uint8_t >( row, 29 ) ); + month.push_back( exdData->getField< uint8_t >( row, 30 ) ); + month.push_back( exdData->getField< uint8_t >( row, 31 ) ); + day.push_back( exdData->getField< uint8_t >( row, 32 ) ); + day.push_back( exdData->getField< uint8_t >( row, 33 ) ); + day.push_back( exdData->getField< uint8_t >( row, 34 ) ); + day.push_back( exdData->getField< uint8_t >( row, 35 ) ); + day.push_back( exdData->getField< uint8_t >( row, 36 ) ); + day.push_back( exdData->getField< uint8_t >( row, 37 ) ); + day.push_back( exdData->getField< uint8_t >( row, 38 ) ); + day.push_back( exdData->getField< uint8_t >( row, 39 ) ); + day.push_back( exdData->getField< uint8_t >( row, 40 ) ); + day.push_back( exdData->getField< uint8_t >( row, 41 ) ); + day.push_back( exdData->getField< uint8_t >( row, 42 ) ); + day.push_back( exdData->getField< uint8_t >( row, 43 ) ); + day.push_back( exdData->getField< uint8_t >( row, 44 ) ); + day.push_back( exdData->getField< uint8_t >( row, 45 ) ); + day.push_back( exdData->getField< uint8_t >( row, 46 ) ); + day.push_back( exdData->getField< uint8_t >( row, 47 ) ); + day.push_back( exdData->getField< uint8_t >( row, 48 ) ); + day.push_back( exdData->getField< uint8_t >( row, 49 ) ); + day.push_back( exdData->getField< uint8_t >( row, 50 ) ); + day.push_back( exdData->getField< uint8_t >( row, 51 ) ); + day.push_back( exdData->getField< uint8_t >( row, 52 ) ); + day.push_back( exdData->getField< uint8_t >( row, 53 ) ); + day.push_back( exdData->getField< uint8_t >( row, 54 ) ); + day.push_back( exdData->getField< uint8_t >( row, 55 ) ); + day.push_back( exdData->getField< uint8_t >( row, 56 ) ); + day.push_back( exdData->getField< uint8_t >( row, 57 ) ); + day.push_back( exdData->getField< uint8_t >( row, 58 ) ); + day.push_back( exdData->getField< uint8_t >( row, 59 ) ); + day.push_back( exdData->getField< uint8_t >( row, 60 ) ); + day.push_back( exdData->getField< uint8_t >( row, 61 ) ); + day.push_back( exdData->getField< uint8_t >( row, 62 ) ); + day.push_back( exdData->getField< uint8_t >( row, 63 ) ); } Core::Data::CharaMakeCustomize::CharaMakeCustomize( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CharaMakeCustomizeDat.get_row( row_id ); - icon = exdData->getField< uint32_t >( row, 1 ); - data = exdData->getField< uint16_t >( row, 2 ); - isPurchasable = exdData->getField< bool >( row, 3 ); + auto row = exdData->m_CharaMakeCustomizeDat.get_row( row_id ); + icon = exdData->getField< uint32_t >( row, 1 ); + data = exdData->getField< uint16_t >( row, 2 ); + isPurchasable = exdData->getField< bool >( row, 3 ); } Core::Data::CharaMakeType::CharaMakeType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CharaMakeTypeDat.get_row( row_id ); - race = exdData->getField< int32_t >( row, 0 ); - tribe = exdData->getField< int32_t >( row, 1 ); - gender = exdData->getField< int8_t >( row, 2 ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3291 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3292 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3293 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3294 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3295 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3296 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3297 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3298 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3299 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3300 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3301 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3302 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3303 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3304 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3305 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3306 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3307 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3308 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3309 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3310 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3311 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3312 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3313 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3314 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3315 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3316 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3317 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3318 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3319 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3320 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3321 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3322 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3323 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3324 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3325 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3326 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3327 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3328 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3329 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3330 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3331 ) ); - facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3332 ) ); + auto row = exdData->m_CharaMakeTypeDat.get_row( row_id ); + race = exdData->getField< int32_t >( row, 0 ); + tribe = exdData->getField< int32_t >( row, 1 ); + gender = exdData->getField< int8_t >( row, 2 ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3291 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3292 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3293 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3294 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3295 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3296 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3297 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3298 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3299 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3300 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3301 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3302 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3303 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3304 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3305 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3306 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3307 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3308 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3309 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3310 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3311 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3312 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3313 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3314 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3315 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3316 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3317 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3318 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3319 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3320 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3321 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3322 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3323 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3324 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3325 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3326 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3327 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3328 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3329 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3330 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3331 ) ); + facialFeatureIcon.push_back( exdData->getField< int32_t >( row, 3332 ) ); } Core::Data::ChocoboRace::ChocoboRace( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ChocoboRaceDat.get_row( row_id ); - chocoboRaceRank = exdData->getField< uint8_t >( row, 0 ); - chocoboRaceTerritory = exdData->getField< uint8_t >( row, 1 ); + auto row = exdData->m_ChocoboRaceDat.get_row( row_id ); + chocoboRaceRank = exdData->getField< uint8_t >( row, 0 ); + chocoboRaceTerritory = exdData->getField< uint8_t >( row, 1 ); } Core::Data::ChocoboRaceAbility::ChocoboRaceAbility( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ChocoboRaceAbilityDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - icon = exdData->getField< uint32_t >( row, 2 ); - chocoboRaceAbilityType = exdData->getField< int8_t >( row, 3 ); - value = exdData->getField< uint8_t >( row, 4 ); + auto row = exdData->m_ChocoboRaceAbilityDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + icon = exdData->getField< uint32_t >( row, 2 ); + chocoboRaceAbilityType = exdData->getField< int8_t >( row, 3 ); + value = exdData->getField< uint8_t >( row, 4 ); } Core::Data::ChocoboRaceAbilityType::ChocoboRaceAbilityType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ChocoboRaceAbilityTypeDat.get_row( row_id ); - isActive = exdData->getField< bool >( row, 0 ); + auto row = exdData->m_ChocoboRaceAbilityTypeDat.get_row( row_id ); + isActive = exdData->getField< bool >( row, 0 ); } Core::Data::ChocoboRaceItem::ChocoboRaceItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ChocoboRaceItemDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - icon = exdData->getField< uint32_t >( row, 2 ); + auto row = exdData->m_ChocoboRaceItemDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + icon = exdData->getField< uint32_t >( row, 2 ); } Core::Data::ChocoboRaceRank::ChocoboRaceRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ChocoboRaceRankDat.get_row( row_id ); - ratingMin = exdData->getField< uint16_t >( row, 0 ); - ratingMax = exdData->getField< uint16_t >( row, 1 ); - name = exdData->getField< uint16_t >( row, 2 ); - fee = exdData->getField< uint16_t >( row, 3 ); - icon = exdData->getField< int32_t >( row, 4 ); + auto row = exdData->m_ChocoboRaceRankDat.get_row( row_id ); + ratingMin = exdData->getField< uint16_t >( row, 0 ); + ratingMax = exdData->getField< uint16_t >( row, 1 ); + name = exdData->getField< uint16_t >( row, 2 ); + fee = exdData->getField< uint16_t >( row, 3 ); + icon = exdData->getField< int32_t >( row, 4 ); } Core::Data::ChocoboRaceStatus::ChocoboRaceStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ChocoboRaceStatusDat.get_row( row_id ); - status = exdData->getField< int32_t >( row, 0 ); + auto row = exdData->m_ChocoboRaceStatusDat.get_row( row_id ); + status = exdData->getField< int32_t >( row, 0 ); } Core::Data::ChocoboRaceTerritory::ChocoboRaceTerritory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ChocoboRaceTerritoryDat.get_row( row_id ); - name = exdData->getField< uint16_t >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_ChocoboRaceTerritoryDat.get_row( row_id ); + name = exdData->getField< uint16_t >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); } Core::Data::ChocoboTaxi::ChocoboTaxi( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ChocoboTaxiDat.get_row( row_id ); - location = exdData->getField< uint32_t >( row, 0 ); + auto row = exdData->m_ChocoboTaxiDat.get_row( row_id ); + location = exdData->getField< uint32_t >( row, 0 ); } Core::Data::ChocoboTaxiStand::ChocoboTaxiStand( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ChocoboTaxiStandDat.get_row( row_id ); - placeName = exdData->getField< std::string >( row, 8 ); + auto row = exdData->m_ChocoboTaxiStandDat.get_row( row_id ); + placeName = exdData->getField< std::string >( row, 8 ); } Core::Data::ClassJob::ClassJob( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ClassJobDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - abbreviation = exdData->getField< std::string >( row, 1 ); - classJobCategory = exdData->getField< uint8_t >( row, 3 ); - expArrayIndex = exdData->getField< int8_t >( row, 4 ); - modifierHitPoints = exdData->getField< uint16_t >( row, 9 ); - modifierManaPoints = exdData->getField< uint16_t >( row, 10 ); - modifierStrength = exdData->getField< uint16_t >( row, 11 ); - modifierVitality = exdData->getField< uint16_t >( row, 12 ); - modifierDexterity = exdData->getField< uint16_t >( row, 13 ); - modifierIntelligence = exdData->getField< uint16_t >( row, 14 ); - modifierMind = exdData->getField< uint16_t >( row, 15 ); - modifierPiety = exdData->getField< uint16_t >( row, 16 ); - classJobParent = exdData->getField< uint8_t >( row, 26 ); - nameEnglish = exdData->getField< std::string >( row, 27 ); - itemStartingWeapon = exdData->getField< int32_t >( row, 28 ); - limitBreak1 = exdData->getField< uint16_t >( row, 33 ); - limitBreak2 = exdData->getField< uint16_t >( row, 34 ); - limitBreak3 = exdData->getField< uint16_t >( row, 35 ); - itemSoulCrystal = exdData->getField< uint32_t >( row, 37 ); - unlockQuest = exdData->getField< uint32_t >( row, 38 ); - relicQuest = exdData->getField< uint32_t >( row, 39 ); - prerequisite = exdData->getField< uint32_t >( row, 40 ); - startingLevel = exdData->getField< uint8_t >( row, 41 ); + auto row = exdData->m_ClassJobDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + abbreviation = exdData->getField< std::string >( row, 1 ); + classJobCategory = exdData->getField< uint8_t >( row, 3 ); + expArrayIndex = exdData->getField< int8_t >( row, 4 ); + modifierHitPoints = exdData->getField< uint16_t >( row, 9 ); + modifierManaPoints = exdData->getField< uint16_t >( row, 10 ); + modifierStrength = exdData->getField< uint16_t >( row, 11 ); + modifierVitality = exdData->getField< uint16_t >( row, 12 ); + modifierDexterity = exdData->getField< uint16_t >( row, 13 ); + modifierIntelligence = exdData->getField< uint16_t >( row, 14 ); + modifierMind = exdData->getField< uint16_t >( row, 15 ); + modifierPiety = exdData->getField< uint16_t >( row, 16 ); + classJobParent = exdData->getField< uint8_t >( row, 26 ); + nameEnglish = exdData->getField< std::string >( row, 27 ); + itemStartingWeapon = exdData->getField< int32_t >( row, 28 ); + limitBreak1 = exdData->getField< uint16_t >( row, 33 ); + limitBreak2 = exdData->getField< uint16_t >( row, 34 ); + limitBreak3 = exdData->getField< uint16_t >( row, 35 ); + itemSoulCrystal = exdData->getField< uint32_t >( row, 37 ); + unlockQuest = exdData->getField< uint32_t >( row, 38 ); + relicQuest = exdData->getField< uint32_t >( row, 39 ); + prerequisite = exdData->getField< uint32_t >( row, 40 ); + startingLevel = exdData->getField< uint8_t >( row, 41 ); } Core::Data::ClassJobCategory::ClassJobCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ClassJobCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - aDV = exdData->getField< bool >( row, 1 ); - gLA = exdData->getField< bool >( row, 2 ); - pGL = exdData->getField< bool >( row, 3 ); - mRD = exdData->getField< bool >( row, 4 ); - lNC = exdData->getField< bool >( row, 5 ); - aRC = exdData->getField< bool >( row, 6 ); - cNJ = exdData->getField< bool >( row, 7 ); - tHM = exdData->getField< bool >( row, 8 ); - cRP = exdData->getField< bool >( row, 9 ); - bSM = exdData->getField< bool >( row, 10 ); - aRM = exdData->getField< bool >( row, 11 ); - gSM = exdData->getField< bool >( row, 12 ); - lTW = exdData->getField< bool >( row, 13 ); - wVR = exdData->getField< bool >( row, 14 ); - aLC = exdData->getField< bool >( row, 15 ); - cUL = exdData->getField< bool >( row, 16 ); - mIN = exdData->getField< bool >( row, 17 ); - bTN = exdData->getField< bool >( row, 18 ); - fSH = exdData->getField< bool >( row, 19 ); - pLD = exdData->getField< bool >( row, 20 ); - mNK = exdData->getField< bool >( row, 21 ); - wAR = exdData->getField< bool >( row, 22 ); - dRG = exdData->getField< bool >( row, 23 ); - bRD = exdData->getField< bool >( row, 24 ); - wHM = exdData->getField< bool >( row, 25 ); - bLM = exdData->getField< bool >( row, 26 ); - aCN = exdData->getField< bool >( row, 27 ); - sMN = exdData->getField< bool >( row, 28 ); - sCH = exdData->getField< bool >( row, 29 ); - rOG = exdData->getField< bool >( row, 30 ); - nIN = exdData->getField< bool >( row, 31 ); - mCH = exdData->getField< bool >( row, 32 ); - dRK = exdData->getField< bool >( row, 33 ); - aST = exdData->getField< bool >( row, 34 ); - sAM = exdData->getField< bool >( row, 35 ); - rDM = exdData->getField< bool >( row, 36 ); + auto row = exdData->m_ClassJobCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + aDV = exdData->getField< bool >( row, 1 ); + gLA = exdData->getField< bool >( row, 2 ); + pGL = exdData->getField< bool >( row, 3 ); + mRD = exdData->getField< bool >( row, 4 ); + lNC = exdData->getField< bool >( row, 5 ); + aRC = exdData->getField< bool >( row, 6 ); + cNJ = exdData->getField< bool >( row, 7 ); + tHM = exdData->getField< bool >( row, 8 ); + cRP = exdData->getField< bool >( row, 9 ); + bSM = exdData->getField< bool >( row, 10 ); + aRM = exdData->getField< bool >( row, 11 ); + gSM = exdData->getField< bool >( row, 12 ); + lTW = exdData->getField< bool >( row, 13 ); + wVR = exdData->getField< bool >( row, 14 ); + aLC = exdData->getField< bool >( row, 15 ); + cUL = exdData->getField< bool >( row, 16 ); + mIN = exdData->getField< bool >( row, 17 ); + bTN = exdData->getField< bool >( row, 18 ); + fSH = exdData->getField< bool >( row, 19 ); + pLD = exdData->getField< bool >( row, 20 ); + mNK = exdData->getField< bool >( row, 21 ); + wAR = exdData->getField< bool >( row, 22 ); + dRG = exdData->getField< bool >( row, 23 ); + bRD = exdData->getField< bool >( row, 24 ); + wHM = exdData->getField< bool >( row, 25 ); + bLM = exdData->getField< bool >( row, 26 ); + aCN = exdData->getField< bool >( row, 27 ); + sMN = exdData->getField< bool >( row, 28 ); + sCH = exdData->getField< bool >( row, 29 ); + rOG = exdData->getField< bool >( row, 30 ); + nIN = exdData->getField< bool >( row, 31 ); + mCH = exdData->getField< bool >( row, 32 ); + dRK = exdData->getField< bool >( row, 33 ); + aST = exdData->getField< bool >( row, 34 ); + sAM = exdData->getField< bool >( row, 35 ); + rDM = exdData->getField< bool >( row, 36 ); } Core::Data::Companion::Companion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanionDat.get_row( row_id ); - singular = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - behavior = exdData->getField< uint8_t >( row, 14 ); - icon = exdData->getField< uint16_t >( row, 26 ); - cost = exdData->getField< uint8_t >( row, 30 ); - hP = exdData->getField< uint16_t >( row, 31 ); - skillAngle = exdData->getField< uint16_t >( row, 33 ); - skillCost = exdData->getField< uint8_t >( row, 34 ); - minionRace = exdData->getField< uint8_t >( row, 37 ); + auto row = exdData->m_CompanionDat.get_row( row_id ); + singular = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + behavior = exdData->getField< uint8_t >( row, 14 ); + icon = exdData->getField< uint16_t >( row, 26 ); + cost = exdData->getField< uint8_t >( row, 30 ); + hP = exdData->getField< uint16_t >( row, 31 ); + skillAngle = exdData->getField< uint16_t >( row, 33 ); + skillCost = exdData->getField< uint8_t >( row, 34 ); + minionRace = exdData->getField< uint8_t >( row, 37 ); } Core::Data::CompanionMove::CompanionMove( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanionMoveDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_CompanionMoveDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::CompanionTransient::CompanionTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanionTransientDat.get_row( row_id ); - description = exdData->getField< std::string >( row, 0 ); - descriptionEnhanced = exdData->getField< std::string >( row, 1 ); - tooltip = exdData->getField< std::string >( row, 2 ); - specialActionName = exdData->getField< std::string >( row, 3 ); - specialActionDescription = exdData->getField< std::string >( row, 4 ); - attack = exdData->getField< uint8_t >( row, 5 ); - defense = exdData->getField< uint8_t >( row, 6 ); - speed = exdData->getField< uint8_t >( row, 7 ); - hasAreaAttack = exdData->getField< bool >( row, 8 ); - strengthGate = exdData->getField< bool >( row, 9 ); - strengthEye = exdData->getField< bool >( row, 10 ); - strengthShield = exdData->getField< bool >( row, 11 ); - strengthArcana = exdData->getField< bool >( row, 12 ); - minionSkillType = exdData->getField< uint8_t >( row, 13 ); + auto row = exdData->m_CompanionTransientDat.get_row( row_id ); + description = exdData->getField< std::string >( row, 0 ); + descriptionEnhanced = exdData->getField< std::string >( row, 1 ); + tooltip = exdData->getField< std::string >( row, 2 ); + specialActionName = exdData->getField< std::string >( row, 3 ); + specialActionDescription = exdData->getField< std::string >( row, 4 ); + attack = exdData->getField< uint8_t >( row, 5 ); + defense = exdData->getField< uint8_t >( row, 6 ); + speed = exdData->getField< uint8_t >( row, 7 ); + hasAreaAttack = exdData->getField< bool >( row, 8 ); + strengthGate = exdData->getField< bool >( row, 9 ); + strengthEye = exdData->getField< bool >( row, 10 ); + strengthShield = exdData->getField< bool >( row, 11 ); + strengthArcana = exdData->getField< bool >( row, 12 ); + minionSkillType = exdData->getField< uint8_t >( row, 13 ); } Core::Data::CompanyAction::CompanyAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanyActionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - icon = exdData->getField< int32_t >( row, 2 ); - fCRank = exdData->getField< uint8_t >( row, 3 ); - cost = exdData->getField< uint32_t >( row, 4 ); - order = exdData->getField< uint8_t >( row, 5 ); - purchasable = exdData->getField< bool >( row, 6 ); + auto row = exdData->m_CompanyActionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + icon = exdData->getField< int32_t >( row, 2 ); + fCRank = exdData->getField< uint8_t >( row, 3 ); + cost = exdData->getField< uint32_t >( row, 4 ); + order = exdData->getField< uint8_t >( row, 5 ); + purchasable = exdData->getField< bool >( row, 6 ); } Core::Data::CompanyCraftDraft::CompanyCraftDraft( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanyCraftDraftDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - companyCraftDraftCategory = exdData->getField< uint8_t >( row, 1 ); - order = exdData->getField< uint32_t >( row, 8 ); + auto row = exdData->m_CompanyCraftDraftDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + companyCraftDraftCategory = exdData->getField< uint8_t >( row, 1 ); + order = exdData->getField< uint32_t >( row, 8 ); } -Core::Data::CompanyCraftDraftCategory::CompanyCraftDraftCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::CompanyCraftDraftCategory::CompanyCraftDraftCategory( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanyCraftDraftCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_CompanyCraftDraftCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } -Core::Data::CompanyCraftManufactoryState::CompanyCraftManufactoryState( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::CompanyCraftManufactoryState::CompanyCraftManufactoryState( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanyCraftManufactoryStateDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_CompanyCraftManufactoryStateDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::CompanyCraftPart::CompanyCraftPart( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanyCraftPartDat.get_row( row_id ); - companyCraftType = exdData->getField< uint8_t >( row, 1 ); - companyCraftProcess.push_back( exdData->getField< uint16_t >( row, 2 ) ); - companyCraftProcess.push_back( exdData->getField< uint16_t >( row, 3 ) ); - companyCraftProcess.push_back( exdData->getField< uint16_t >( row, 4 ) ); + auto row = exdData->m_CompanyCraftPartDat.get_row( row_id ); + companyCraftType = exdData->getField< uint8_t >( row, 1 ); + companyCraftProcess.push_back( exdData->getField< uint16_t >( row, 2 ) ); + companyCraftProcess.push_back( exdData->getField< uint16_t >( row, 3 ) ); + companyCraftProcess.push_back( exdData->getField< uint16_t >( row, 4 ) ); } Core::Data::CompanyCraftProcess::CompanyCraftProcess( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanyCraftProcessDat.get_row( row_id ); + auto row = exdData->m_CompanyCraftProcessDat.get_row( row_id ); } Core::Data::CompanyCraftSequence::CompanyCraftSequence( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanyCraftSequenceDat.get_row( row_id ); - resultItem = exdData->getField< int32_t >( row, 0 ); - companyCraftDraftCategory = exdData->getField< int32_t >( row, 2 ); - companyCraftType = exdData->getField< int32_t >( row, 3 ); - companyCraftDraft = exdData->getField< int32_t >( row, 4 ); - companyCraftPart.push_back( exdData->getField< uint16_t >( row, 5 ) ); - companyCraftPart.push_back( exdData->getField< uint16_t >( row, 6 ) ); - companyCraftPart.push_back( exdData->getField< uint16_t >( row, 7 ) ); - companyCraftPart.push_back( exdData->getField< uint16_t >( row, 8 ) ); - companyCraftPart.push_back( exdData->getField< uint16_t >( row, 9 ) ); - companyCraftPart.push_back( exdData->getField< uint16_t >( row, 10 ) ); - companyCraftPart.push_back( exdData->getField< uint16_t >( row, 11 ) ); - companyCraftPart.push_back( exdData->getField< uint16_t >( row, 12 ) ); + auto row = exdData->m_CompanyCraftSequenceDat.get_row( row_id ); + resultItem = exdData->getField< int32_t >( row, 0 ); + companyCraftDraftCategory = exdData->getField< int32_t >( row, 2 ); + companyCraftType = exdData->getField< int32_t >( row, 3 ); + companyCraftDraft = exdData->getField< int32_t >( row, 4 ); + companyCraftPart.push_back( exdData->getField< uint16_t >( row, 5 ) ); + companyCraftPart.push_back( exdData->getField< uint16_t >( row, 6 ) ); + companyCraftPart.push_back( exdData->getField< uint16_t >( row, 7 ) ); + companyCraftPart.push_back( exdData->getField< uint16_t >( row, 8 ) ); + companyCraftPart.push_back( exdData->getField< uint16_t >( row, 9 ) ); + companyCraftPart.push_back( exdData->getField< uint16_t >( row, 10 ) ); + companyCraftPart.push_back( exdData->getField< uint16_t >( row, 11 ) ); + companyCraftPart.push_back( exdData->getField< uint16_t >( row, 12 ) ); } Core::Data::CompanyCraftSupplyItem::CompanyCraftSupplyItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanyCraftSupplyItemDat.get_row( row_id ); - item = exdData->getField< uint32_t >( row, 0 ); + auto row = exdData->m_CompanyCraftSupplyItemDat.get_row( row_id ); + item = exdData->getField< uint32_t >( row, 0 ); } Core::Data::CompanyCraftType::CompanyCraftType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompanyCraftTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_CompanyCraftTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::CompleteJournal::CompleteJournal( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompleteJournalDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 5 ); - cutscene.push_back( exdData->getField< int32_t >( row, 6 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 7 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 8 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 9 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 10 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 11 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 12 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 13 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 14 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 15 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 16 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 17 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 18 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 19 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 20 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 21 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 22 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 23 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 24 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 25 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 26 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 27 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 28 ) ); - cutscene.push_back( exdData->getField< int32_t >( row, 29 ) ); + auto row = exdData->m_CompleteJournalDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 5 ); + cutscene.push_back( exdData->getField< int32_t >( row, 6 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 7 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 8 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 9 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 10 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 11 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 12 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 13 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 14 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 15 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 16 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 17 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 18 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 19 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 20 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 21 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 22 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 23 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 24 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 25 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 26 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 27 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 28 ) ); + cutscene.push_back( exdData->getField< int32_t >( row, 29 ) ); } Core::Data::CompleteJournalCategory::CompleteJournalCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CompleteJournalCategoryDat.get_row( row_id ); - firstQuest = exdData->getField< uint32_t >( row, 0 ); - lastQuest = exdData->getField< uint32_t >( row, 1 ); + auto row = exdData->m_CompleteJournalCategoryDat.get_row( row_id ); + firstQuest = exdData->getField< uint32_t >( row, 0 ); + lastQuest = exdData->getField< uint32_t >( row, 1 ); } Core::Data::ContentExAction::ContentExAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentExActionDat.get_row( row_id ); - name = exdData->getField< uint32_t >( row, 0 ); - charges = exdData->getField< uint8_t >( row, 2 ); + auto row = exdData->m_ContentExActionDat.get_row( row_id ); + name = exdData->getField< uint32_t >( row, 0 ); + charges = exdData->getField< uint8_t >( row, 2 ); } Core::Data::ContentFinderCondition::ContentFinderCondition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentFinderConditionDat.get_row( row_id ); - instanceContent = exdData->getField< uint16_t >( row, 3 ); - contentMemberType = exdData->getField< uint8_t >( row, 9 ); - classJobLevelRequired = exdData->getField< uint8_t >( row, 15 ); - classJobLevelSync = exdData->getField< uint8_t >( row, 16 ); - itemLevelRequired = exdData->getField< uint16_t >( row, 17 ); - itemLevelSync = exdData->getField< uint16_t >( row, 18 ); - contentIndicator = exdData->getField< uint8_t >( row, 24 ); - contentType = exdData->getField< uint8_t >( row, 33 ); - icon = exdData->getField< uint32_t >( row, 37 ); + auto row = exdData->m_ContentFinderConditionDat.get_row( row_id ); + instanceContent = exdData->getField< uint16_t >( row, 3 ); + contentMemberType = exdData->getField< uint8_t >( row, 9 ); + classJobLevelRequired = exdData->getField< uint8_t >( row, 15 ); + classJobLevelSync = exdData->getField< uint8_t >( row, 16 ); + itemLevelRequired = exdData->getField< uint16_t >( row, 17 ); + itemLevelSync = exdData->getField< uint16_t >( row, 18 ); + contentIndicator = exdData->getField< uint8_t >( row, 24 ); + contentType = exdData->getField< uint8_t >( row, 33 ); + icon = exdData->getField< uint32_t >( row, 37 ); } -Core::Data::ContentFinderConditionTransient::ContentFinderConditionTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::ContentFinderConditionTransient::ContentFinderConditionTransient( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentFinderConditionTransientDat.get_row( row_id ); - description = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_ContentFinderConditionTransientDat.get_row( row_id ); + description = exdData->getField< std::string >( row, 0 ); } Core::Data::ContentMemberType::ContentMemberType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentMemberTypeDat.get_row( row_id ); - tanksPerParty = exdData->getField< uint8_t >( row, 9 ); - healersPerParty = exdData->getField< uint8_t >( row, 10 ); - meleesPerParty = exdData->getField< uint8_t >( row, 11 ); - rangedPerParty = exdData->getField< uint8_t >( row, 12 ); + auto row = exdData->m_ContentMemberTypeDat.get_row( row_id ); + tanksPerParty = exdData->getField< uint8_t >( row, 9 ); + healersPerParty = exdData->getField< uint8_t >( row, 10 ); + meleesPerParty = exdData->getField< uint8_t >( row, 11 ); + rangedPerParty = exdData->getField< uint8_t >( row, 12 ); } Core::Data::ContentNpcTalk::ContentNpcTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentNpcTalkDat.get_row( row_id ); - contentTalk.push_back( exdData->getField< uint32_t >( row, 1 ) ); - contentTalk.push_back( exdData->getField< uint32_t >( row, 2 ) ); - contentTalk.push_back( exdData->getField< uint32_t >( row, 3 ) ); - contentTalk.push_back( exdData->getField< uint32_t >( row, 4 ) ); - contentTalk.push_back( exdData->getField< uint32_t >( row, 5 ) ); - contentTalk.push_back( exdData->getField< uint32_t >( row, 6 ) ); - contentTalk.push_back( exdData->getField< uint32_t >( row, 7 ) ); - contentTalk.push_back( exdData->getField< uint32_t >( row, 8 ) ); + auto row = exdData->m_ContentNpcTalkDat.get_row( row_id ); + contentTalk.push_back( exdData->getField< uint32_t >( row, 1 ) ); + contentTalk.push_back( exdData->getField< uint32_t >( row, 2 ) ); + contentTalk.push_back( exdData->getField< uint32_t >( row, 3 ) ); + contentTalk.push_back( exdData->getField< uint32_t >( row, 4 ) ); + contentTalk.push_back( exdData->getField< uint32_t >( row, 5 ) ); + contentTalk.push_back( exdData->getField< uint32_t >( row, 6 ) ); + contentTalk.push_back( exdData->getField< uint32_t >( row, 7 ) ); + contentTalk.push_back( exdData->getField< uint32_t >( row, 8 ) ); } Core::Data::ContentRoulette::ContentRoulette( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentRouletteDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 2 ); - dutyType = exdData->getField< std::string >( row, 3 ); - isInDutyFinder = exdData->getField< bool >( row, 6 ); - itemLevelRequired = exdData->getField< uint16_t >( row, 11 ); - icon = exdData->getField< uint32_t >( row, 13 ); - rewardTomeA = exdData->getField< uint16_t >( row, 15 ); - rewardTomeB = exdData->getField< uint16_t >( row, 16 ); - rewardTomeC = exdData->getField< uint16_t >( row, 17 ); - sortKey = exdData->getField< uint8_t >( row, 20 ); - contentMemberType = exdData->getField< uint8_t >( row, 22 ); - requireAllDuties = exdData->getField< bool >( row, 32 ); + auto row = exdData->m_ContentRouletteDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 2 ); + dutyType = exdData->getField< std::string >( row, 3 ); + isInDutyFinder = exdData->getField< bool >( row, 6 ); + itemLevelRequired = exdData->getField< uint16_t >( row, 11 ); + icon = exdData->getField< uint32_t >( row, 13 ); + rewardTomeA = exdData->getField< uint16_t >( row, 15 ); + rewardTomeB = exdData->getField< uint16_t >( row, 16 ); + rewardTomeC = exdData->getField< uint16_t >( row, 17 ); + sortKey = exdData->getField< uint8_t >( row, 20 ); + contentMemberType = exdData->getField< uint8_t >( row, 22 ); + requireAllDuties = exdData->getField< bool >( row, 32 ); } Core::Data::ContentsNote::ContentsNote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentsNoteDat.get_row( row_id ); - contentType = exdData->getField< uint8_t >( row, 0 ); - requiredAmount = exdData->getField< int32_t >( row, 2 ); + auto row = exdData->m_ContentsNoteDat.get_row( row_id ); + contentType = exdData->getField< uint8_t >( row, 0 ); + requiredAmount = exdData->getField< int32_t >( row, 2 ); } Core::Data::ContentsNoteCategory::ContentsNoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentsNoteCategoryDat.get_row( row_id ); - type = exdData->getField< uint8_t >( row, 1 ); + auto row = exdData->m_ContentsNoteCategoryDat.get_row( row_id ); + type = exdData->getField< uint8_t >( row, 1 ); } Core::Data::ContentTalk::ContentTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentTalkDat.get_row( row_id ); - contentTalkParam = exdData->getField< uint8_t >( row, 0 ); - text = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_ContentTalkDat.get_row( row_id ); + contentTalkParam = exdData->getField< uint8_t >( row, 0 ); + text = exdData->getField< std::string >( row, 1 ); } Core::Data::ContentTalkParam::ContentTalkParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentTalkParamDat.get_row( row_id ); - param = exdData->getField< bool >( row, 0 ); - testAction = exdData->getField< uint32_t >( row, 2 ); + auto row = exdData->m_ContentTalkParamDat.get_row( row_id ); + param = exdData->getField< bool >( row, 0 ); + testAction = exdData->getField< uint32_t >( row, 2 ); } Core::Data::ContentType::ContentType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ContentTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - icon = exdData->getField< uint32_t >( row, 1 ); - iconDutyFinder = exdData->getField< uint32_t >( row, 2 ); + auto row = exdData->m_ContentTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + icon = exdData->getField< uint32_t >( row, 1 ); + iconDutyFinder = exdData->getField< uint32_t >( row, 2 ); } Core::Data::CraftAction::CraftAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CraftActionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - animationStart = exdData->getField< uint16_t >( row, 2 ); - animationEnd = exdData->getField< uint16_t >( row, 3 ); - icon = exdData->getField< uint16_t >( row, 4 ); - classJob = exdData->getField< int8_t >( row, 5 ); - classJobCategory = exdData->getField< uint8_t >( row, 6 ); - classJobLevel = exdData->getField< uint8_t >( row, 7 ); - questRequirement = exdData->getField< uint32_t >( row, 8 ); - specialist = exdData->getField< bool >( row, 9 ); - cost = exdData->getField< uint8_t >( row, 11 ); - cRP = exdData->getField< int32_t >( row, 12 ); - bSM = exdData->getField< int32_t >( row, 13 ); - aRM = exdData->getField< int32_t >( row, 14 ); - gSM = exdData->getField< int32_t >( row, 15 ); - lTW = exdData->getField< int32_t >( row, 16 ); - wVR = exdData->getField< int32_t >( row, 17 ); - aLC = exdData->getField< int32_t >( row, 18 ); - cUL = exdData->getField< int32_t >( row, 19 ); + auto row = exdData->m_CraftActionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + animationStart = exdData->getField< uint16_t >( row, 2 ); + animationEnd = exdData->getField< uint16_t >( row, 3 ); + icon = exdData->getField< uint16_t >( row, 4 ); + classJob = exdData->getField< int8_t >( row, 5 ); + classJobCategory = exdData->getField< uint8_t >( row, 6 ); + classJobLevel = exdData->getField< uint8_t >( row, 7 ); + questRequirement = exdData->getField< uint32_t >( row, 8 ); + specialist = exdData->getField< bool >( row, 9 ); + cost = exdData->getField< uint8_t >( row, 11 ); + cRP = exdData->getField< int32_t >( row, 12 ); + bSM = exdData->getField< int32_t >( row, 13 ); + aRM = exdData->getField< int32_t >( row, 14 ); + gSM = exdData->getField< int32_t >( row, 15 ); + lTW = exdData->getField< int32_t >( row, 16 ); + wVR = exdData->getField< int32_t >( row, 17 ); + aLC = exdData->getField< int32_t >( row, 18 ); + cUL = exdData->getField< int32_t >( row, 19 ); } Core::Data::CraftLeve::CraftLeve( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CraftLeveDat.get_row( row_id ); - leve = exdData->getField< int32_t >( row, 0 ); - repeats = exdData->getField< uint8_t >( row, 2 ); + auto row = exdData->m_CraftLeveDat.get_row( row_id ); + leve = exdData->getField< int32_t >( row, 0 ); + repeats = exdData->getField< uint8_t >( row, 2 ); } Core::Data::CraftType::CraftType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CraftTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 2 ); + auto row = exdData->m_CraftTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 2 ); } Core::Data::Currency::Currency( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CurrencyDat.get_row( row_id ); - item = exdData->getField< uint32_t >( row, 0 ); - limit = exdData->getField< uint32_t >( row, 3 ); + auto row = exdData->m_CurrencyDat.get_row( row_id ); + item = exdData->getField< uint32_t >( row, 0 ); + limit = exdData->getField< uint32_t >( row, 3 ); } Core::Data::CustomTalk::CustomTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CustomTalkDat.get_row( row_id ); - iconActor = exdData->getField< uint32_t >( row, 0 ); - iconMap = exdData->getField< uint32_t >( row, 1 ); - name = exdData->getField< std::string >( row, 2 ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 3 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 4 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 5 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 6 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 7 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 8 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 9 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 10 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 11 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 12 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 13 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 14 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 15 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 16 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 17 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 18 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 19 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 20 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 21 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 22 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 23 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 24 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 25 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 26 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 27 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 28 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 29 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 30 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 31 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 32 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 33 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 34 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 35 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 36 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 37 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 38 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 39 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 40 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 41 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 42 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 43 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 44 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 45 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 46 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 47 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 48 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 49 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 50 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 51 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 52 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 53 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 54 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 55 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 56 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 57 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 58 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 59 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 60 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 61 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 62 ) ); - text = exdData->getField< bool >( row, 66 ); + auto row = exdData->m_CustomTalkDat.get_row( row_id ); + iconActor = exdData->getField< uint32_t >( row, 0 ); + iconMap = exdData->getField< uint32_t >( row, 1 ); + name = exdData->getField< std::string >( row, 2 ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 3 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 4 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 5 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 6 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 7 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 8 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 9 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 10 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 11 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 12 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 13 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 14 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 15 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 16 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 17 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 18 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 19 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 20 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 21 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 22 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 23 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 24 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 25 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 26 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 27 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 28 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 29 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 30 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 31 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 32 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 33 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 34 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 35 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 36 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 37 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 38 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 39 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 40 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 41 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 42 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 43 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 44 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 45 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 46 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 47 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 48 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 49 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 50 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 51 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 52 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 53 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 54 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 55 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 56 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 57 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 58 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 59 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 60 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 61 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 62 ) ); + text = exdData->getField< bool >( row, 66 ); } Core::Data::Cutscene::Cutscene( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CutsceneDat.get_row( row_id ); - path = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_CutsceneDat.get_row( row_id ); + path = exdData->getField< std::string >( row, 0 ); } Core::Data::CutScreenImage::CutScreenImage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_CutScreenImageDat.get_row( row_id ); - image = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_CutScreenImageDat.get_row( row_id ); + image = exdData->getField< int32_t >( row, 1 ); } Core::Data::DailySupplyItem::DailySupplyItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DailySupplyItemDat.get_row( row_id ); + auto row = exdData->m_DailySupplyItemDat.get_row( row_id ); } Core::Data::DeepDungeonBan::DeepDungeonBan( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DeepDungeonBanDat.get_row( row_id ); - screenImage = exdData->getField< uint16_t >( row, 0 ); - logMessage = exdData->getField< uint16_t >( row, 1 ); - name = exdData->getField< uint16_t >( row, 2 ); + auto row = exdData->m_DeepDungeonBanDat.get_row( row_id ); + screenImage = exdData->getField< uint16_t >( row, 0 ); + logMessage = exdData->getField< uint16_t >( row, 1 ); + name = exdData->getField< uint16_t >( row, 2 ); } Core::Data::DeepDungeonDanger::DeepDungeonDanger( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DeepDungeonDangerDat.get_row( row_id ); - screenImage = exdData->getField< uint16_t >( row, 0 ); - logMessage = exdData->getField< uint16_t >( row, 1 ); - name = exdData->getField< uint16_t >( row, 2 ); + auto row = exdData->m_DeepDungeonDangerDat.get_row( row_id ); + screenImage = exdData->getField< uint16_t >( row, 0 ); + logMessage = exdData->getField< uint16_t >( row, 1 ); + name = exdData->getField< uint16_t >( row, 2 ); } Core::Data::DeepDungeonEquipment::DeepDungeonEquipment( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DeepDungeonEquipmentDat.get_row( row_id ); - icon = exdData->getField< uint32_t >( row, 0 ); - singular = exdData->getField< std::string >( row, 1 ); - plural = exdData->getField< std::string >( row, 3 ); - name = exdData->getField< std::string >( row, 9 ); - description = exdData->getField< std::string >( row, 10 ); + auto row = exdData->m_DeepDungeonEquipmentDat.get_row( row_id ); + icon = exdData->getField< uint32_t >( row, 0 ); + singular = exdData->getField< std::string >( row, 1 ); + plural = exdData->getField< std::string >( row, 3 ); + name = exdData->getField< std::string >( row, 9 ); + description = exdData->getField< std::string >( row, 10 ); } Core::Data::DeepDungeonFloorEffectUI::DeepDungeonFloorEffectUI( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DeepDungeonFloorEffectUIDat.get_row( row_id ); - icon = exdData->getField< uint32_t >( row, 0 ); - name = exdData->getField< std::string >( row, 1 ); - description = exdData->getField< std::string >( row, 2 ); + auto row = exdData->m_DeepDungeonFloorEffectUIDat.get_row( row_id ); + icon = exdData->getField< uint32_t >( row, 0 ); + name = exdData->getField< std::string >( row, 1 ); + description = exdData->getField< std::string >( row, 2 ); } Core::Data::DeepDungeonItem::DeepDungeonItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DeepDungeonItemDat.get_row( row_id ); - icon = exdData->getField< uint32_t >( row, 0 ); - singular = exdData->getField< std::string >( row, 1 ); - plural = exdData->getField< std::string >( row, 3 ); - name = exdData->getField< std::string >( row, 9 ); - tooltip = exdData->getField< std::string >( row, 10 ); - action = exdData->getField< uint32_t >( row, 11 ); + auto row = exdData->m_DeepDungeonItemDat.get_row( row_id ); + icon = exdData->getField< uint32_t >( row, 0 ); + singular = exdData->getField< std::string >( row, 1 ); + plural = exdData->getField< std::string >( row, 3 ); + name = exdData->getField< std::string >( row, 9 ); + tooltip = exdData->getField< std::string >( row, 10 ); + action = exdData->getField< uint32_t >( row, 11 ); } Core::Data::DeepDungeonStatus::DeepDungeonStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DeepDungeonStatusDat.get_row( row_id ); - screenImage = exdData->getField< uint16_t >( row, 0 ); - logMessage = exdData->getField< uint16_t >( row, 1 ); - name = exdData->getField< uint16_t >( row, 2 ); + auto row = exdData->m_DeepDungeonStatusDat.get_row( row_id ); + screenImage = exdData->getField< uint16_t >( row, 0 ); + logMessage = exdData->getField< uint16_t >( row, 1 ); + name = exdData->getField< uint16_t >( row, 2 ); } Core::Data::DefaultTalk::DefaultTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DefaultTalkDat.get_row( row_id ); - actionTimelinePose.push_back( exdData->getField< uint16_t >( row, 5 ) ); - actionTimelinePose.push_back( exdData->getField< uint16_t >( row, 6 ) ); - actionTimelinePose.push_back( exdData->getField< uint16_t >( row, 7 ) ); - text.push_back( exdData->getField< std::string >( row, 20 ) ); - text.push_back( exdData->getField< std::string >( row, 21 ) ); - text.push_back( exdData->getField< std::string >( row, 22 ) ); + auto row = exdData->m_DefaultTalkDat.get_row( row_id ); + actionTimelinePose.push_back( exdData->getField< uint16_t >( row, 5 ) ); + actionTimelinePose.push_back( exdData->getField< uint16_t >( row, 6 ) ); + actionTimelinePose.push_back( exdData->getField< uint16_t >( row, 7 ) ); + text.push_back( exdData->getField< std::string >( row, 20 ) ); + text.push_back( exdData->getField< std::string >( row, 21 ) ); + text.push_back( exdData->getField< std::string >( row, 22 ) ); } Core::Data::DeliveryQuest::DeliveryQuest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DeliveryQuestDat.get_row( row_id ); - quest = exdData->getField< int32_t >( row, 0 ); + auto row = exdData->m_DeliveryQuestDat.get_row( row_id ); + quest = exdData->getField< int32_t >( row, 0 ); } Core::Data::DisposalShop::DisposalShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DisposalShopDat.get_row( row_id ); - shopName = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_DisposalShopDat.get_row( row_id ); + shopName = exdData->getField< std::string >( row, 0 ); } Core::Data::DisposalShopFilterType::DisposalShopFilterType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DisposalShopFilterTypeDat.get_row( row_id ); - category = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_DisposalShopFilterTypeDat.get_row( row_id ); + category = exdData->getField< std::string >( row, 0 ); } Core::Data::DisposalShopItem::DisposalShopItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DisposalShopItemDat.get_row( row_id ); - itemDisposed = exdData->getField< int32_t >( row, 0 ); - itemReceived = exdData->getField< int32_t >( row, 2 ); - quantityReceived = exdData->getField< uint32_t >( row, 4 ); + auto row = exdData->m_DisposalShopItemDat.get_row( row_id ); + itemDisposed = exdData->getField< int32_t >( row, 0 ); + itemReceived = exdData->getField< int32_t >( row, 2 ); + quantityReceived = exdData->getField< uint32_t >( row, 4 ); } Core::Data::DpsChallenge::DpsChallenge( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DpsChallengeDat.get_row( row_id ); - playerLevel = exdData->getField< uint16_t >( row, 0 ); - placeName = exdData->getField< uint16_t >( row, 1 ); - icon = exdData->getField< uint32_t >( row, 2 ); - order = exdData->getField< uint16_t >( row, 3 ); - name = exdData->getField< std::string >( row, 4 ); - description = exdData->getField< std::string >( row, 5 ); + auto row = exdData->m_DpsChallengeDat.get_row( row_id ); + playerLevel = exdData->getField< uint16_t >( row, 0 ); + placeName = exdData->getField< uint16_t >( row, 1 ); + icon = exdData->getField< uint32_t >( row, 2 ); + order = exdData->getField< uint16_t >( row, 3 ); + name = exdData->getField< std::string >( row, 4 ); + description = exdData->getField< std::string >( row, 5 ); } Core::Data::DpsChallengeOfficer::DpsChallengeOfficer( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DpsChallengeOfficerDat.get_row( row_id ); - unlockQuest = exdData->getField< uint32_t >( row, 0 ); - challengeName.push_back( exdData->getField< uint16_t >( row, 1 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 2 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 3 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 4 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 5 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 6 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 7 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 8 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 9 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 10 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 11 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 12 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 13 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 14 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 15 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 16 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 17 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 18 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 19 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 20 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 21 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 22 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 23 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 24 ) ); - challengeName.push_back( exdData->getField< uint16_t >( row, 25 ) ); + auto row = exdData->m_DpsChallengeOfficerDat.get_row( row_id ); + unlockQuest = exdData->getField< uint32_t >( row, 0 ); + challengeName.push_back( exdData->getField< uint16_t >( row, 1 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 2 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 3 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 4 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 5 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 6 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 7 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 8 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 9 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 10 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 11 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 12 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 13 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 14 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 15 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 16 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 17 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 18 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 19 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 20 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 21 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 22 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 23 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 24 ) ); + challengeName.push_back( exdData->getField< uint16_t >( row, 25 ) ); } Core::Data::DpsChallengeTransient::DpsChallengeTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_DpsChallengeTransientDat.get_row( row_id ); - instanceContent = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_DpsChallengeTransientDat.get_row( row_id ); + instanceContent = exdData->getField< uint16_t >( row, 0 ); } Core::Data::Emote::Emote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EmoteDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - emoteCategory = exdData->getField< uint8_t >( row, 11 ); - emoteMode = exdData->getField< uint8_t >( row, 12 ); - hasCancelEmote = exdData->getField< bool >( row, 15 ); - drawsWeapon = exdData->getField< bool >( row, 16 ); - textCommand = exdData->getField< int32_t >( row, 18 ); - icon = exdData->getField< uint16_t >( row, 19 ); - logMessageTargeted = exdData->getField< uint16_t >( row, 20 ); - logMessageUntargeted = exdData->getField< uint16_t >( row, 21 ); + auto row = exdData->m_EmoteDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + emoteCategory = exdData->getField< uint8_t >( row, 11 ); + emoteMode = exdData->getField< uint8_t >( row, 12 ); + hasCancelEmote = exdData->getField< bool >( row, 15 ); + drawsWeapon = exdData->getField< bool >( row, 16 ); + textCommand = exdData->getField< int32_t >( row, 18 ); + icon = exdData->getField< uint16_t >( row, 19 ); + logMessageTargeted = exdData->getField< uint16_t >( row, 20 ); + logMessageUntargeted = exdData->getField< uint16_t >( row, 21 ); } Core::Data::EmoteMode::EmoteMode( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EmoteDat.get_row( row_id ); + auto row = exdData->m_EmoteDat.get_row( row_id ); } Core::Data::EmoteCategory::EmoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EmoteCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_EmoteCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::ENpcBase::ENpcBase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ENpcBaseDat.get_row( row_id ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 2 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 3 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 4 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 5 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 6 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 7 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 8 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 9 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 10 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 11 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 12 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 13 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 14 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 15 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 16 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 17 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 18 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 19 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 20 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 21 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 22 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 23 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 24 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 25 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 26 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 27 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 28 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 29 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 30 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 31 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 32 ) ); - eNpcData.push_back( exdData->getField< uint32_t >( row, 33 ) ); - race = exdData->getField< uint8_t >( row, 36 ); - gender = exdData->getField< uint8_t >( row, 37 ); - bodyType = exdData->getField< uint8_t >( row, 38 ); - height = exdData->getField< uint8_t >( row, 39 ); - tribe = exdData->getField< uint8_t >( row, 40 ); - face = exdData->getField< uint8_t >( row, 41 ); - hairStyle = exdData->getField< uint8_t >( row, 42 ); - hairHighlight = exdData->getField< uint8_t >( row, 43 ); - skinColor = exdData->getField< uint8_t >( row, 44 ); - eyeHeterochromia = exdData->getField< uint8_t >( row, 45 ); - hairColor = exdData->getField< uint8_t >( row, 46 ); - hairHighlightColor = exdData->getField< uint8_t >( row, 47 ); - facialFeature = exdData->getField< uint8_t >( row, 48 ); - facialFeatureColor = exdData->getField< uint8_t >( row, 49 ); - eyebrows = exdData->getField< uint8_t >( row, 50 ); - eyeColor = exdData->getField< uint8_t >( row, 51 ); - eyeShape = exdData->getField< uint8_t >( row, 52 ); - nose = exdData->getField< uint8_t >( row, 53 ); - jaw = exdData->getField< uint8_t >( row, 54 ); - mouth = exdData->getField< uint8_t >( row, 55 ); - lipColor = exdData->getField< uint8_t >( row, 56 ); - bustOrTone1 = exdData->getField< uint8_t >( row, 57 ); - extraFeature1 = exdData->getField< uint8_t >( row, 58 ); - extraFeature2OrBust = exdData->getField< uint8_t >( row, 59 ); - facePaint = exdData->getField< uint8_t >( row, 60 ); - facePaintColor = exdData->getField< uint8_t >( row, 61 ); - npcEquip = exdData->getField< uint16_t >( row, 63 ); - behavior = exdData->getField< uint16_t >( row, 64 ); - modelMainHand = exdData->getField< uint64_t >( row, 65 ); - dyeMainHand = exdData->getField< uint8_t >( row, 66 ); - modelOffHand = exdData->getField< uint64_t >( row, 67 ); - dyeOffHand = exdData->getField< uint8_t >( row, 68 ); - modelHead = exdData->getField< uint32_t >( row, 69 ); - dyeHead = exdData->getField< uint8_t >( row, 70 ); - visor = exdData->getField< bool >( row, 71 ); - modelBody = exdData->getField< uint32_t >( row, 72 ); - dyeBody = exdData->getField< uint8_t >( row, 73 ); - modelHands = exdData->getField< uint32_t >( row, 74 ); - dyeHands = exdData->getField< uint8_t >( row, 75 ); - modelLegs = exdData->getField< uint32_t >( row, 76 ); - dyeLegs = exdData->getField< uint8_t >( row, 77 ); - modelFeet = exdData->getField< uint32_t >( row, 78 ); - dyeFeet = exdData->getField< uint8_t >( row, 79 ); - modelEars = exdData->getField< uint32_t >( row, 80 ); - dyeEars = exdData->getField< uint8_t >( row, 81 ); - modelNeck = exdData->getField< uint32_t >( row, 82 ); - dyeNeck = exdData->getField< uint8_t >( row, 83 ); - modelWrists = exdData->getField< uint32_t >( row, 84 ); - dyeWrists = exdData->getField< uint8_t >( row, 85 ); - modelLeftRing = exdData->getField< uint32_t >( row, 86 ); - dyeLeftRing = exdData->getField< uint8_t >( row, 87 ); - modelRightRing = exdData->getField< uint32_t >( row, 88 ); - dyeRightRing = exdData->getField< uint8_t >( row, 89 ); - balloon = exdData->getField< uint16_t >( row, 91 ); + auto row = exdData->m_ENpcBaseDat.get_row( row_id ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 2 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 3 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 4 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 5 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 6 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 7 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 8 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 9 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 10 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 11 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 12 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 13 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 14 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 15 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 16 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 17 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 18 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 19 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 20 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 21 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 22 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 23 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 24 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 25 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 26 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 27 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 28 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 29 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 30 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 31 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 32 ) ); + eNpcData.push_back( exdData->getField< uint32_t >( row, 33 ) ); + race = exdData->getField< uint8_t >( row, 36 ); + gender = exdData->getField< uint8_t >( row, 37 ); + bodyType = exdData->getField< uint8_t >( row, 38 ); + height = exdData->getField< uint8_t >( row, 39 ); + tribe = exdData->getField< uint8_t >( row, 40 ); + face = exdData->getField< uint8_t >( row, 41 ); + hairStyle = exdData->getField< uint8_t >( row, 42 ); + hairHighlight = exdData->getField< uint8_t >( row, 43 ); + skinColor = exdData->getField< uint8_t >( row, 44 ); + eyeHeterochromia = exdData->getField< uint8_t >( row, 45 ); + hairColor = exdData->getField< uint8_t >( row, 46 ); + hairHighlightColor = exdData->getField< uint8_t >( row, 47 ); + facialFeature = exdData->getField< uint8_t >( row, 48 ); + facialFeatureColor = exdData->getField< uint8_t >( row, 49 ); + eyebrows = exdData->getField< uint8_t >( row, 50 ); + eyeColor = exdData->getField< uint8_t >( row, 51 ); + eyeShape = exdData->getField< uint8_t >( row, 52 ); + nose = exdData->getField< uint8_t >( row, 53 ); + jaw = exdData->getField< uint8_t >( row, 54 ); + mouth = exdData->getField< uint8_t >( row, 55 ); + lipColor = exdData->getField< uint8_t >( row, 56 ); + bustOrTone1 = exdData->getField< uint8_t >( row, 57 ); + extraFeature1 = exdData->getField< uint8_t >( row, 58 ); + extraFeature2OrBust = exdData->getField< uint8_t >( row, 59 ); + facePaint = exdData->getField< uint8_t >( row, 60 ); + facePaintColor = exdData->getField< uint8_t >( row, 61 ); + npcEquip = exdData->getField< uint16_t >( row, 63 ); + behavior = exdData->getField< uint16_t >( row, 64 ); + modelMainHand = exdData->getField< uint64_t >( row, 65 ); + dyeMainHand = exdData->getField< uint8_t >( row, 66 ); + modelOffHand = exdData->getField< uint64_t >( row, 67 ); + dyeOffHand = exdData->getField< uint8_t >( row, 68 ); + modelHead = exdData->getField< uint32_t >( row, 69 ); + dyeHead = exdData->getField< uint8_t >( row, 70 ); + visor = exdData->getField< bool >( row, 71 ); + modelBody = exdData->getField< uint32_t >( row, 72 ); + dyeBody = exdData->getField< uint8_t >( row, 73 ); + modelHands = exdData->getField< uint32_t >( row, 74 ); + dyeHands = exdData->getField< uint8_t >( row, 75 ); + modelLegs = exdData->getField< uint32_t >( row, 76 ); + dyeLegs = exdData->getField< uint8_t >( row, 77 ); + modelFeet = exdData->getField< uint32_t >( row, 78 ); + dyeFeet = exdData->getField< uint8_t >( row, 79 ); + modelEars = exdData->getField< uint32_t >( row, 80 ); + dyeEars = exdData->getField< uint8_t >( row, 81 ); + modelNeck = exdData->getField< uint32_t >( row, 82 ); + dyeNeck = exdData->getField< uint8_t >( row, 83 ); + modelWrists = exdData->getField< uint32_t >( row, 84 ); + dyeWrists = exdData->getField< uint8_t >( row, 85 ); + modelLeftRing = exdData->getField< uint32_t >( row, 86 ); + dyeLeftRing = exdData->getField< uint8_t >( row, 87 ); + modelRightRing = exdData->getField< uint32_t >( row, 88 ); + dyeRightRing = exdData->getField< uint8_t >( row, 89 ); + balloon = exdData->getField< uint16_t >( row, 91 ); } Core::Data::ENpcResident::ENpcResident( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ENpcResidentDat.get_row( row_id ); - singular = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - title = exdData->getField< std::string >( row, 8 ); - map = exdData->getField< uint8_t >( row, 9 ); + auto row = exdData->m_ENpcResidentDat.get_row( row_id ); + singular = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + title = exdData->getField< std::string >( row, 8 ); + map = exdData->getField< uint8_t >( row, 9 ); } Core::Data::EObj::EObj( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EObjDat.get_row( row_id ); - data = exdData->getField< uint32_t >( row, 9 ); + auto row = exdData->m_EObjDat.get_row( row_id ); + data = exdData->getField< uint32_t >( row, 9 ); } Core::Data::EObjName::EObjName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EObjNameDat.get_row( row_id ); - singular = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_EObjNameDat.get_row( row_id ); + singular = exdData->getField< std::string >( row, 0 ); } Core::Data::EquipRaceCategory::EquipRaceCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EquipRaceCategoryDat.get_row( row_id ); - hyur = exdData->getField< bool >( row, 0 ); - elezen = exdData->getField< bool >( row, 1 ); - lalafell = exdData->getField< bool >( row, 2 ); - miqote = exdData->getField< bool >( row, 3 ); - roegadyn = exdData->getField< bool >( row, 4 ); - auRa = exdData->getField< bool >( row, 5 ); - male = exdData->getField< bool >( row, 6 ); - female = exdData->getField< bool >( row, 7 ); + auto row = exdData->m_EquipRaceCategoryDat.get_row( row_id ); + hyur = exdData->getField< bool >( row, 0 ); + elezen = exdData->getField< bool >( row, 1 ); + lalafell = exdData->getField< bool >( row, 2 ); + miqote = exdData->getField< bool >( row, 3 ); + roegadyn = exdData->getField< bool >( row, 4 ); + auRa = exdData->getField< bool >( row, 5 ); + male = exdData->getField< bool >( row, 6 ); + female = exdData->getField< bool >( row, 7 ); } Core::Data::EquipSlotCategory::EquipSlotCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EquipSlotCategoryDat.get_row( row_id ); - mainHand = exdData->getField< int8_t >( row, 0 ); - offHand = exdData->getField< int8_t >( row, 1 ); - head = exdData->getField< int8_t >( row, 2 ); - body = exdData->getField< int8_t >( row, 3 ); - gloves = exdData->getField< int8_t >( row, 4 ); - waist = exdData->getField< int8_t >( row, 5 ); - legs = exdData->getField< int8_t >( row, 6 ); - feet = exdData->getField< int8_t >( row, 7 ); - ears = exdData->getField< int8_t >( row, 8 ); - neck = exdData->getField< int8_t >( row, 9 ); - wrists = exdData->getField< int8_t >( row, 10 ); - fingerL = exdData->getField< int8_t >( row, 11 ); - fingerR = exdData->getField< int8_t >( row, 12 ); - soulCrystal = exdData->getField< int8_t >( row, 13 ); + auto row = exdData->m_EquipSlotCategoryDat.get_row( row_id ); + mainHand = exdData->getField< int8_t >( row, 0 ); + offHand = exdData->getField< int8_t >( row, 1 ); + head = exdData->getField< int8_t >( row, 2 ); + body = exdData->getField< int8_t >( row, 3 ); + gloves = exdData->getField< int8_t >( row, 4 ); + waist = exdData->getField< int8_t >( row, 5 ); + legs = exdData->getField< int8_t >( row, 6 ); + feet = exdData->getField< int8_t >( row, 7 ); + ears = exdData->getField< int8_t >( row, 8 ); + neck = exdData->getField< int8_t >( row, 9 ); + wrists = exdData->getField< int8_t >( row, 10 ); + fingerL = exdData->getField< int8_t >( row, 11 ); + fingerR = exdData->getField< int8_t >( row, 12 ); + soulCrystal = exdData->getField< int8_t >( row, 13 ); } Core::Data::EurekaAethernet::EurekaAethernet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EurekaAethernetDat.get_row( row_id ); - location = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_EurekaAethernetDat.get_row( row_id ); + location = exdData->getField< uint16_t >( row, 0 ); } Core::Data::EurekaGrowData::EurekaGrowData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EurekaGrowDataDat.get_row( row_id ); - baseResistance = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_EurekaGrowDataDat.get_row( row_id ); + baseResistance = exdData->getField< uint16_t >( row, 0 ); } -Core::Data::EurekaSphereElementAdjust::EurekaSphereElementAdjust( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::EurekaSphereElementAdjust::EurekaSphereElementAdjust( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EurekaSphereElementAdjustDat.get_row( row_id ); - powerModifier = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_EurekaSphereElementAdjustDat.get_row( row_id ); + powerModifier = exdData->getField< uint16_t >( row, 0 ); } Core::Data::EventAction::EventAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EventActionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - icon = exdData->getField< uint16_t >( row, 1 ); - castTime = exdData->getField< uint8_t >( row, 2 ); + auto row = exdData->m_EventActionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + icon = exdData->getField< uint16_t >( row, 1 ); + castTime = exdData->getField< uint8_t >( row, 2 ); } Core::Data::EventIconPriority::EventIconPriority( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EventIconPriorityDat.get_row( row_id ); - icon.push_back( exdData->getField< uint32_t >( row, 0 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 1 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 2 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 3 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 4 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 5 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 6 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 7 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 8 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 9 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 10 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 11 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 12 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 13 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 14 ) ); - icon.push_back( exdData->getField< uint32_t >( row, 15 ) ); + auto row = exdData->m_EventIconPriorityDat.get_row( row_id ); + icon.push_back( exdData->getField< uint32_t >( row, 0 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 1 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 2 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 3 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 4 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 5 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 6 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 7 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 8 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 9 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 10 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 11 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 12 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 13 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 14 ) ); + icon.push_back( exdData->getField< uint32_t >( row, 15 ) ); } Core::Data::EventIconType::EventIconType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EventIconTypeDat.get_row( row_id ); - npcIconAvailable = exdData->getField< uint32_t >( row, 0 ); - mapIconAvailable = exdData->getField< uint32_t >( row, 1 ); - npcIconInvalid = exdData->getField< uint32_t >( row, 2 ); - mapIconInvalid = exdData->getField< uint32_t >( row, 3 ); - iconRange = exdData->getField< uint8_t >( row, 4 ); + auto row = exdData->m_EventIconTypeDat.get_row( row_id ); + npcIconAvailable = exdData->getField< uint32_t >( row, 0 ); + mapIconAvailable = exdData->getField< uint32_t >( row, 1 ); + npcIconInvalid = exdData->getField< uint32_t >( row, 2 ); + mapIconInvalid = exdData->getField< uint32_t >( row, 3 ); + iconRange = exdData->getField< uint8_t >( row, 4 ); } Core::Data::EventItem::EventItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EventItemDat.get_row( row_id ); - singular = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - rarity = exdData->getField< int8_t >( row, 5 ); - name = exdData->getField< std::string >( row, 9 ); - icon = exdData->getField< uint16_t >( row, 10 ); - stackSize = exdData->getField< uint8_t >( row, 12 ); - quest = exdData->getField< uint32_t >( row, 14 ); - castTime = exdData->getField< uint8_t >( row, 15 ); + auto row = exdData->m_EventItemDat.get_row( row_id ); + singular = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + rarity = exdData->getField< int8_t >( row, 5 ); + name = exdData->getField< std::string >( row, 9 ); + icon = exdData->getField< uint16_t >( row, 10 ); + stackSize = exdData->getField< uint8_t >( row, 12 ); + quest = exdData->getField< uint32_t >( row, 14 ); + castTime = exdData->getField< uint8_t >( row, 15 ); } Core::Data::EventItemHelp::EventItemHelp( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_EventItemHelpDat.get_row( row_id ); - description = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_EventItemHelpDat.get_row( row_id ); + description = exdData->getField< std::string >( row, 0 ); } Core::Data::ExVersion::ExVersion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ExVersionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_ExVersionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Fate::Fate( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FateDat.get_row( row_id ); - eurekaFate = exdData->getField< uint8_t >( row, 0 ); - location = exdData->getField< uint32_t >( row, 2 ); - classJobLevel = exdData->getField< uint8_t >( row, 3 ); - classJobLevelMax = exdData->getField< uint8_t >( row, 4 ); - eventItem = exdData->getField< uint32_t >( row, 5 ); - iconObjective = exdData->getField< uint32_t >( row, 10 ); - iconMap = exdData->getField< uint32_t >( row, 11 ); - music = exdData->getField< int32_t >( row, 13 ); - name = exdData->getField< std::string >( row, 27 ); - description = exdData->getField< std::string >( row, 28 ); - objective = exdData->getField< std::string >( row, 29 ); - statusText.push_back( exdData->getField< std::string >( row, 30 ) ); - statusText.push_back( exdData->getField< std::string >( row, 31 ) ); - statusText.push_back( exdData->getField< std::string >( row, 32 ) ); - arrayIndex = exdData->getField< uint32_t >( row, 33 ); + auto row = exdData->m_FateDat.get_row( row_id ); + eurekaFate = exdData->getField< uint8_t >( row, 0 ); + location = exdData->getField< uint32_t >( row, 2 ); + classJobLevel = exdData->getField< uint8_t >( row, 3 ); + classJobLevelMax = exdData->getField< uint8_t >( row, 4 ); + eventItem = exdData->getField< uint32_t >( row, 5 ); + iconObjective = exdData->getField< uint32_t >( row, 10 ); + iconMap = exdData->getField< uint32_t >( row, 11 ); + music = exdData->getField< int32_t >( row, 13 ); + name = exdData->getField< std::string >( row, 27 ); + description = exdData->getField< std::string >( row, 28 ); + objective = exdData->getField< std::string >( row, 29 ); + statusText.push_back( exdData->getField< std::string >( row, 30 ) ); + statusText.push_back( exdData->getField< std::string >( row, 31 ) ); + statusText.push_back( exdData->getField< std::string >( row, 32 ) ); + arrayIndex = exdData->getField< uint32_t >( row, 33 ); } Core::Data::FCActivity::FCActivity( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FCActivityDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); - fCActivityCategory = exdData->getField< uint8_t >( row, 4 ); + auto row = exdData->m_FCActivityDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); + fCActivityCategory = exdData->getField< uint8_t >( row, 4 ); } Core::Data::FCActivityCategory::FCActivityCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FCActivityCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_FCActivityCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::FCAuthority::FCAuthority( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FCAuthorityDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - fCAuthorityCategory = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_FCAuthorityDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + fCAuthorityCategory = exdData->getField< int32_t >( row, 1 ); } Core::Data::FCAuthorityCategory::FCAuthorityCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FCAuthorityCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_FCAuthorityCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::FCChestName::FCChestName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FCChestNameDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_FCChestNameDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::FccShop::FccShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FccShopDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_FccShopDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::FCHierarchy::FCHierarchy( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FCHierarchyDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_FCHierarchyDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::FCProfile::FCProfile( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FCProfileDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_FCProfileDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::FCReputation::FCReputation( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FCReputationDat.get_row( row_id ); - pointsToNext = exdData->getField< uint32_t >( row, 0 ); - requiredPoints = exdData->getField< uint32_t >( row, 1 ); - name = exdData->getField< std::string >( row, 4 ); + auto row = exdData->m_FCReputationDat.get_row( row_id ); + pointsToNext = exdData->getField< uint32_t >( row, 0 ); + requiredPoints = exdData->getField< uint32_t >( row, 1 ); + name = exdData->getField< std::string >( row, 4 ); } Core::Data::FCRights::FCRights( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FCRightsDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - icon = exdData->getField< uint16_t >( row, 2 ); - fCRank = exdData->getField< uint8_t >( row, 3 ); + auto row = exdData->m_FCRightsDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + icon = exdData->getField< uint16_t >( row, 2 ); + fCRank = exdData->getField< uint8_t >( row, 3 ); } Core::Data::FieldMarker::FieldMarker( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FieldMarkerDat.get_row( row_id ); - vFX = exdData->getField< int32_t >( row, 0 ); - icon = exdData->getField< uint16_t >( row, 1 ); + auto row = exdData->m_FieldMarkerDat.get_row( row_id ); + vFX = exdData->getField< int32_t >( row, 0 ); + icon = exdData->getField< uint16_t >( row, 1 ); } Core::Data::FishingSpot::FishingSpot( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FishingSpotDat.get_row( row_id ); - gatheringLevel = exdData->getField< uint8_t >( row, 0 ); - bigFishOnReach = exdData->getField< std::string >( row, 1 ); - bigFishOnEnd = exdData->getField< std::string >( row, 2 ); - fishingSpotCategory = exdData->getField< uint8_t >( row, 3 ); - territoryType = exdData->getField< uint16_t >( row, 5 ); - x = exdData->getField< int16_t >( row, 6 ); - z = exdData->getField< int16_t >( row, 7 ); - radius = exdData->getField< uint16_t >( row, 8 ); - item.push_back( exdData->getField< int32_t >( row, 10 ) ); - item.push_back( exdData->getField< int32_t >( row, 11 ) ); - item.push_back( exdData->getField< int32_t >( row, 12 ) ); - item.push_back( exdData->getField< int32_t >( row, 13 ) ); - item.push_back( exdData->getField< int32_t >( row, 14 ) ); - item.push_back( exdData->getField< int32_t >( row, 15 ) ); - item.push_back( exdData->getField< int32_t >( row, 16 ) ); - item.push_back( exdData->getField< int32_t >( row, 17 ) ); - item.push_back( exdData->getField< int32_t >( row, 18 ) ); - item.push_back( exdData->getField< int32_t >( row, 19 ) ); - placeName = exdData->getField< uint16_t >( row, 20 ); + auto row = exdData->m_FishingSpotDat.get_row( row_id ); + gatheringLevel = exdData->getField< uint8_t >( row, 0 ); + bigFishOnReach = exdData->getField< std::string >( row, 1 ); + bigFishOnEnd = exdData->getField< std::string >( row, 2 ); + fishingSpotCategory = exdData->getField< uint8_t >( row, 3 ); + territoryType = exdData->getField< uint16_t >( row, 5 ); + x = exdData->getField< int16_t >( row, 6 ); + z = exdData->getField< int16_t >( row, 7 ); + radius = exdData->getField< uint16_t >( row, 8 ); + item.push_back( exdData->getField< int32_t >( row, 10 ) ); + item.push_back( exdData->getField< int32_t >( row, 11 ) ); + item.push_back( exdData->getField< int32_t >( row, 12 ) ); + item.push_back( exdData->getField< int32_t >( row, 13 ) ); + item.push_back( exdData->getField< int32_t >( row, 14 ) ); + item.push_back( exdData->getField< int32_t >( row, 15 ) ); + item.push_back( exdData->getField< int32_t >( row, 16 ) ); + item.push_back( exdData->getField< int32_t >( row, 17 ) ); + item.push_back( exdData->getField< int32_t >( row, 18 ) ); + item.push_back( exdData->getField< int32_t >( row, 19 ) ); + placeName = exdData->getField< uint16_t >( row, 20 ); } Core::Data::FishParameter::FishParameter( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_FishParameterDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); - item = exdData->getField< int32_t >( row, 1 ); - gatheringItemLevel = exdData->getField< uint16_t >( row, 2 ); - territoryType = exdData->getField< int32_t >( row, 4 ); - isFish = exdData->getField< bool >( row, 5 ); - gatheringSubCategory = exdData->getField< uint16_t >( row, 6 ); + auto row = exdData->m_FishParameterDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); + item = exdData->getField< int32_t >( row, 1 ); + gatheringItemLevel = exdData->getField< uint16_t >( row, 2 ); + territoryType = exdData->getField< int32_t >( row, 4 ); + isFish = exdData->getField< bool >( row, 5 ); + gatheringSubCategory = exdData->getField< uint16_t >( row, 6 ); } Core::Data::GardeningSeed::GardeningSeed( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GardeningSeedDat.get_row( row_id ); - item = exdData->getField< uint32_t >( row, 0 ); - icon = exdData->getField< uint32_t >( row, 2 ); + auto row = exdData->m_GardeningSeedDat.get_row( row_id ); + item = exdData->getField< uint32_t >( row, 0 ); + icon = exdData->getField< uint32_t >( row, 2 ); } Core::Data::GatheringCondition::GatheringCondition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringConditionDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_GatheringConditionDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); } Core::Data::GatheringExp::GatheringExp( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringExpDat.get_row( row_id ); - exp = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_GatheringExpDat.get_row( row_id ); + exp = exdData->getField< uint16_t >( row, 0 ); } Core::Data::GatheringItem::GatheringItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringItemDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - gatheringItemLevel = exdData->getField< uint16_t >( row, 1 ); - isHidden = exdData->getField< bool >( row, 2 ); + auto row = exdData->m_GatheringItemDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + gatheringItemLevel = exdData->getField< uint16_t >( row, 1 ); + isHidden = exdData->getField< bool >( row, 2 ); } -Core::Data::GatheringItemLevelConvertTable::GatheringItemLevelConvertTable( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::GatheringItemLevelConvertTable::GatheringItemLevelConvertTable( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringItemLevelConvertTableDat.get_row( row_id ); - gatheringItemLevel = exdData->getField< uint8_t >( row, 0 ); - stars = exdData->getField< uint8_t >( row, 1 ); + auto row = exdData->m_GatheringItemLevelConvertTableDat.get_row( row_id ); + gatheringItemLevel = exdData->getField< uint8_t >( row, 0 ); + stars = exdData->getField< uint8_t >( row, 1 ); } Core::Data::GatheringItemPoint::GatheringItemPoint( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringItemPointDat.get_row( row_id ); - gatheringPoint = exdData->getField< uint32_t >( row, 0 ); + auto row = exdData->m_GatheringItemPointDat.get_row( row_id ); + gatheringPoint = exdData->getField< uint32_t >( row, 0 ); } Core::Data::GatheringNotebookList::GatheringNotebookList( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringNotebookListDat.get_row( row_id ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 1 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 2 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 3 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 4 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 5 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 6 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 7 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 8 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 9 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 10 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 11 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 12 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 13 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 14 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 15 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 16 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 17 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 18 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 19 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 20 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 21 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 22 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 23 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 24 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 25 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 26 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 27 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 28 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 29 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 30 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 31 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 32 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 33 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 34 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 35 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 36 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 37 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 38 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 39 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 40 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 41 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 42 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 43 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 44 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 45 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 46 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 47 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 48 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 49 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 50 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 51 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 52 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 53 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 54 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 55 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 56 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 57 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 58 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 59 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 60 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 61 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 62 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 63 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 64 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 65 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 66 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 67 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 68 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 69 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 70 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 71 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 72 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 73 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 74 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 75 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 76 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 77 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 78 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 79 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 80 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 81 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 82 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 83 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 84 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 85 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 86 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 87 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 88 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 89 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 90 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 91 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 92 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 93 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 94 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 95 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 96 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 97 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 98 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 99 ) ); - gatheringItem.push_back( exdData->getField< int32_t >( row, 100 ) ); + auto row = exdData->m_GatheringNotebookListDat.get_row( row_id ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 1 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 2 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 3 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 4 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 5 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 6 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 7 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 8 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 9 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 10 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 11 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 12 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 13 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 14 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 15 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 16 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 17 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 18 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 19 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 20 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 21 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 22 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 23 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 24 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 25 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 26 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 27 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 28 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 29 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 30 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 31 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 32 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 33 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 34 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 35 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 36 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 37 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 38 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 39 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 40 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 41 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 42 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 43 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 44 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 45 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 46 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 47 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 48 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 49 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 50 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 51 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 52 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 53 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 54 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 55 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 56 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 57 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 58 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 59 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 60 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 61 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 62 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 63 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 64 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 65 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 66 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 67 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 68 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 69 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 70 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 71 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 72 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 73 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 74 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 75 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 76 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 77 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 78 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 79 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 80 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 81 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 82 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 83 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 84 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 85 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 86 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 87 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 88 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 89 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 90 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 91 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 92 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 93 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 94 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 95 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 96 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 97 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 98 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 99 ) ); + gatheringItem.push_back( exdData->getField< int32_t >( row, 100 ) ); } Core::Data::GatheringPoint::GatheringPoint( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringPointDat.get_row( row_id ); - gatheringPointBase = exdData->getField< int32_t >( row, 1 ); - gatheringPointBonus.push_back( exdData->getField< uint16_t >( row, 3 ) ); - gatheringPointBonus.push_back( exdData->getField< uint16_t >( row, 4 ) ); - territoryType = exdData->getField< uint16_t >( row, 5 ); - placeName = exdData->getField< uint16_t >( row, 6 ); - gatheringSubCategory = exdData->getField< uint16_t >( row, 7 ); + auto row = exdData->m_GatheringPointDat.get_row( row_id ); + gatheringPointBase = exdData->getField< int32_t >( row, 1 ); + gatheringPointBonus.push_back( exdData->getField< uint16_t >( row, 3 ) ); + gatheringPointBonus.push_back( exdData->getField< uint16_t >( row, 4 ) ); + territoryType = exdData->getField< uint16_t >( row, 5 ); + placeName = exdData->getField< uint16_t >( row, 6 ); + gatheringSubCategory = exdData->getField< uint16_t >( row, 7 ); } Core::Data::GatheringPointBase::GatheringPointBase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringPointBaseDat.get_row( row_id ); - gatheringType = exdData->getField< int32_t >( row, 0 ); - gatheringLevel = exdData->getField< uint8_t >( row, 1 ); - item.push_back( exdData->getField< int32_t >( row, 2 ) ); - item.push_back( exdData->getField< int32_t >( row, 3 ) ); - item.push_back( exdData->getField< int32_t >( row, 4 ) ); - item.push_back( exdData->getField< int32_t >( row, 5 ) ); - item.push_back( exdData->getField< int32_t >( row, 6 ) ); - item.push_back( exdData->getField< int32_t >( row, 7 ) ); - item.push_back( exdData->getField< int32_t >( row, 8 ) ); - item.push_back( exdData->getField< int32_t >( row, 9 ) ); - isLimited = exdData->getField< bool >( row, 10 ); + auto row = exdData->m_GatheringPointBaseDat.get_row( row_id ); + gatheringType = exdData->getField< int32_t >( row, 0 ); + gatheringLevel = exdData->getField< uint8_t >( row, 1 ); + item.push_back( exdData->getField< int32_t >( row, 2 ) ); + item.push_back( exdData->getField< int32_t >( row, 3 ) ); + item.push_back( exdData->getField< int32_t >( row, 4 ) ); + item.push_back( exdData->getField< int32_t >( row, 5 ) ); + item.push_back( exdData->getField< int32_t >( row, 6 ) ); + item.push_back( exdData->getField< int32_t >( row, 7 ) ); + item.push_back( exdData->getField< int32_t >( row, 8 ) ); + item.push_back( exdData->getField< int32_t >( row, 9 ) ); + isLimited = exdData->getField< bool >( row, 10 ); } Core::Data::GatheringPointBonus::GatheringPointBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringPointBonusDat.get_row( row_id ); - condition = exdData->getField< uint8_t >( row, 0 ); - conditionValue = exdData->getField< uint16_t >( row, 1 ); - bonusType = exdData->getField< uint8_t >( row, 3 ); - bonusValue = exdData->getField< uint16_t >( row, 4 ); + auto row = exdData->m_GatheringPointBonusDat.get_row( row_id ); + condition = exdData->getField< uint8_t >( row, 0 ); + conditionValue = exdData->getField< uint16_t >( row, 1 ); + bonusType = exdData->getField< uint8_t >( row, 3 ); + bonusValue = exdData->getField< uint16_t >( row, 4 ); } Core::Data::GatheringPointBonusType::GatheringPointBonusType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringPointBonusTypeDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_GatheringPointBonusTypeDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); } Core::Data::GatheringPointName::GatheringPointName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringPointNameDat.get_row( row_id ); - singular = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); + auto row = exdData->m_GatheringPointNameDat.get_row( row_id ); + singular = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); } Core::Data::GatheringSubCategory::GatheringSubCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringSubCategoryDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 4 ); - folkloreBook = exdData->getField< std::string >( row, 5 ); + auto row = exdData->m_GatheringSubCategoryDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 4 ); + folkloreBook = exdData->getField< std::string >( row, 5 ); } Core::Data::GatheringType::GatheringType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GatheringTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - iconMain = exdData->getField< int32_t >( row, 1 ); - iconOff = exdData->getField< int32_t >( row, 2 ); + auto row = exdData->m_GatheringTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + iconMain = exdData->getField< int32_t >( row, 1 ); + iconOff = exdData->getField< int32_t >( row, 2 ); } Core::Data::GcArmyExpedition::GcArmyExpedition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GcArmyExpeditionDat.get_row( row_id ); - requiredFlag = exdData->getField< uint8_t >( row, 0 ); - unlockFlag = exdData->getField< uint8_t >( row, 1 ); - requiredLevel = exdData->getField< uint8_t >( row, 2 ); - requiredSeals = exdData->getField< uint16_t >( row, 3 ); - rewardExperience = exdData->getField< uint32_t >( row, 4 ); - percentBase = exdData->getField< uint8_t >( row, 5 ); - gcArmyExpeditionType = exdData->getField< uint8_t >( row, 7 ); - name = exdData->getField< std::string >( row, 8 ); - description = exdData->getField< std::string >( row, 9 ); + auto row = exdData->m_GcArmyExpeditionDat.get_row( row_id ); + requiredFlag = exdData->getField< uint8_t >( row, 0 ); + unlockFlag = exdData->getField< uint8_t >( row, 1 ); + requiredLevel = exdData->getField< uint8_t >( row, 2 ); + requiredSeals = exdData->getField< uint16_t >( row, 3 ); + rewardExperience = exdData->getField< uint32_t >( row, 4 ); + percentBase = exdData->getField< uint8_t >( row, 5 ); + gcArmyExpeditionType = exdData->getField< uint8_t >( row, 7 ); + name = exdData->getField< std::string >( row, 8 ); + description = exdData->getField< std::string >( row, 9 ); } -Core::Data::GcArmyExpeditionMemberBonus::GcArmyExpeditionMemberBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::GcArmyExpeditionMemberBonus::GcArmyExpeditionMemberBonus( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GcArmyExpeditionMemberBonusDat.get_row( row_id ); - race = exdData->getField< uint8_t >( row, 0 ); - classJob = exdData->getField< uint8_t >( row, 1 ); + auto row = exdData->m_GcArmyExpeditionMemberBonusDat.get_row( row_id ); + race = exdData->getField< uint8_t >( row, 0 ); + classJob = exdData->getField< uint8_t >( row, 1 ); } Core::Data::GcArmyExpeditionType::GcArmyExpeditionType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GcArmyExpeditionTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_GcArmyExpeditionTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::GcArmyMemberGrow::GcArmyMemberGrow( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GcArmyMemberGrowDat.get_row( row_id ); - classJob = exdData->getField< uint8_t >( row, 0 ); - classBook = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_GcArmyMemberGrowDat.get_row( row_id ); + classJob = exdData->getField< uint8_t >( row, 0 ); + classBook = exdData->getField< int32_t >( row, 1 ); } Core::Data::GcArmyTraining::GcArmyTraining( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GcArmyTrainingDat.get_row( row_id ); - physicalBonus = exdData->getField< int8_t >( row, 0 ); - mentalBonus = exdData->getField< int8_t >( row, 1 ); - tacticalBonus = exdData->getField< int8_t >( row, 2 ); - experience = exdData->getField< uint32_t >( row, 3 ); - name = exdData->getField< std::string >( row, 4 ); - description = exdData->getField< std::string >( row, 5 ); + auto row = exdData->m_GcArmyTrainingDat.get_row( row_id ); + physicalBonus = exdData->getField< int8_t >( row, 0 ); + mentalBonus = exdData->getField< int8_t >( row, 1 ); + tacticalBonus = exdData->getField< int8_t >( row, 2 ); + experience = exdData->getField< uint32_t >( row, 3 ); + name = exdData->getField< std::string >( row, 4 ); + description = exdData->getField< std::string >( row, 5 ); } Core::Data::GCRankGridaniaFemaleText::GCRankGridaniaFemaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCRankGridaniaFemaleTextDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - nameRank = exdData->getField< std::string >( row, 8 ); + auto row = exdData->m_GCRankGridaniaFemaleTextDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + nameRank = exdData->getField< std::string >( row, 8 ); } Core::Data::GCRankGridaniaMaleText::GCRankGridaniaMaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCRankGridaniaMaleTextDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - nameRank = exdData->getField< std::string >( row, 8 ); + auto row = exdData->m_GCRankGridaniaMaleTextDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + nameRank = exdData->getField< std::string >( row, 8 ); } Core::Data::GCRankLimsaFemaleText::GCRankLimsaFemaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCRankLimsaFemaleTextDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - nameRank = exdData->getField< std::string >( row, 8 ); + auto row = exdData->m_GCRankLimsaFemaleTextDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + nameRank = exdData->getField< std::string >( row, 8 ); } Core::Data::GCRankLimsaMaleText::GCRankLimsaMaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCRankLimsaMaleTextDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - nameRank = exdData->getField< std::string >( row, 8 ); + auto row = exdData->m_GCRankLimsaMaleTextDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + nameRank = exdData->getField< std::string >( row, 8 ); } Core::Data::GCRankUldahFemaleText::GCRankUldahFemaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCRankUldahFemaleTextDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - nameRank = exdData->getField< std::string >( row, 8 ); + auto row = exdData->m_GCRankUldahFemaleTextDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + nameRank = exdData->getField< std::string >( row, 8 ); } Core::Data::GCRankUldahMaleText::GCRankUldahMaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCRankUldahMaleTextDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - nameRank = exdData->getField< std::string >( row, 8 ); + auto row = exdData->m_GCRankUldahMaleTextDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + nameRank = exdData->getField< std::string >( row, 8 ); } Core::Data::GCScripShopCategory::GCScripShopCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCScripShopCategoryDat.get_row( row_id ); - grandCompany = exdData->getField< int8_t >( row, 0 ); - tier = exdData->getField< int8_t >( row, 1 ); - subCategory = exdData->getField< int8_t >( row, 2 ); + auto row = exdData->m_GCScripShopCategoryDat.get_row( row_id ); + grandCompany = exdData->getField< int8_t >( row, 0 ); + tier = exdData->getField< int8_t >( row, 1 ); + subCategory = exdData->getField< int8_t >( row, 2 ); } Core::Data::GCScripShopItem::GCScripShopItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCScripShopItemDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - requiredGrandCompanyRank = exdData->getField< int32_t >( row, 1 ); - costGCSeals = exdData->getField< uint32_t >( row, 2 ); - sortKey = exdData->getField< uint8_t >( row, 3 ); + auto row = exdData->m_GCScripShopItemDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + requiredGrandCompanyRank = exdData->getField< int32_t >( row, 1 ); + costGCSeals = exdData->getField< uint32_t >( row, 2 ); + sortKey = exdData->getField< uint8_t >( row, 3 ); } Core::Data::GCShop::GCShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCShopDat.get_row( row_id ); - grandCompany = exdData->getField< int8_t >( row, 0 ); + auto row = exdData->m_GCShopDat.get_row( row_id ); + grandCompany = exdData->getField< int8_t >( row, 0 ); } Core::Data::GCShopItemCategory::GCShopItemCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCShopItemCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_GCShopItemCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::GCSupplyDuty::GCSupplyDuty( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCSupplyDutyDat.get_row( row_id ); + auto row = exdData->m_GCSupplyDutyDat.get_row( row_id ); } Core::Data::GCSupplyDutyReward::GCSupplyDutyReward( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GCSupplyDutyRewardDat.get_row( row_id ); - experienceSupply = exdData->getField< uint32_t >( row, 0 ); - experienceProvisioning = exdData->getField< uint32_t >( row, 1 ); - sealsExpertDelivery = exdData->getField< uint32_t >( row, 2 ); - sealsSupply = exdData->getField< uint32_t >( row, 3 ); - sealsProvisioning = exdData->getField< uint32_t >( row, 4 ); + auto row = exdData->m_GCSupplyDutyRewardDat.get_row( row_id ); + experienceSupply = exdData->getField< uint32_t >( row, 0 ); + experienceProvisioning = exdData->getField< uint32_t >( row, 1 ); + sealsExpertDelivery = exdData->getField< uint32_t >( row, 2 ); + sealsSupply = exdData->getField< uint32_t >( row, 3 ); + sealsProvisioning = exdData->getField< uint32_t >( row, 4 ); } Core::Data::GeneralAction::GeneralAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GeneralActionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - action = exdData->getField< uint16_t >( row, 3 ); - icon = exdData->getField< int32_t >( row, 7 ); + auto row = exdData->m_GeneralActionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + action = exdData->getField< uint16_t >( row, 3 ); + icon = exdData->getField< int32_t >( row, 7 ); } Core::Data::GilShop::GilShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GilShopDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_GilShopDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::GilShopItem::GilShopItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GilShopItemDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - rowRequired.push_back( exdData->getField< int32_t >( row, 3 ) ); - rowRequired.push_back( exdData->getField< int32_t >( row, 4 ) ); - rowRequired.push_back( exdData->getField< int32_t >( row, 5 ) ); - stateRequired = exdData->getField< uint16_t >( row, 7 ); - patch = exdData->getField< uint16_t >( row, 8 ); + auto row = exdData->m_GilShopItemDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + rowRequired.push_back( exdData->getField< int32_t >( row, 3 ) ); + rowRequired.push_back( exdData->getField< int32_t >( row, 4 ) ); + rowRequired.push_back( exdData->getField< int32_t >( row, 5 ) ); + stateRequired = exdData->getField< uint16_t >( row, 7 ); + patch = exdData->getField< uint16_t >( row, 8 ); } Core::Data::GoldSaucerTextData::GoldSaucerTextData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GoldSaucerTextDataDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_GoldSaucerTextDataDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); } Core::Data::GrandCompany::GrandCompany( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GrandCompanyDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_GrandCompanyDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::GrandCompanyRank::GrandCompanyRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GrandCompanyRankDat.get_row( row_id ); - tier = exdData->getField< uint8_t >( row, 0 ); - order = exdData->getField< uint8_t >( row, 1 ); - maxSeals = exdData->getField< uint32_t >( row, 2 ); - requiredSeals = exdData->getField< uint32_t >( row, 3 ); - iconMaelstrom = exdData->getField< int32_t >( row, 4 ); - iconSerpents = exdData->getField< int32_t >( row, 5 ); - iconFlames = exdData->getField< int32_t >( row, 6 ); - questMaelstrom = exdData->getField< int32_t >( row, 7 ); - questSerpents = exdData->getField< int32_t >( row, 8 ); - questFlames = exdData->getField< int32_t >( row, 9 ); + auto row = exdData->m_GrandCompanyRankDat.get_row( row_id ); + tier = exdData->getField< uint8_t >( row, 0 ); + order = exdData->getField< uint8_t >( row, 1 ); + maxSeals = exdData->getField< uint32_t >( row, 2 ); + requiredSeals = exdData->getField< uint32_t >( row, 3 ); + iconMaelstrom = exdData->getField< int32_t >( row, 4 ); + iconSerpents = exdData->getField< int32_t >( row, 5 ); + iconFlames = exdData->getField< int32_t >( row, 6 ); + questMaelstrom = exdData->getField< int32_t >( row, 7 ); + questSerpents = exdData->getField< int32_t >( row, 8 ); + questFlames = exdData->getField< int32_t >( row, 9 ); } Core::Data::GuardianDeity::GuardianDeity( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GuardianDeityDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - icon = exdData->getField< uint16_t >( row, 2 ); + auto row = exdData->m_GuardianDeityDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + icon = exdData->getField< uint16_t >( row, 2 ); } Core::Data::GuildleveAssignment::GuildleveAssignment( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GuildleveAssignmentDat.get_row( row_id ); - quest.push_back( exdData->getField< uint32_t >( row, 2 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 3 ) ); + auto row = exdData->m_GuildleveAssignmentDat.get_row( row_id ); + quest.push_back( exdData->getField< uint32_t >( row, 2 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 3 ) ); } Core::Data::GuildOrderGuide::GuildOrderGuide( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GuildOrderGuideDat.get_row( row_id ); + auto row = exdData->m_GuildOrderGuideDat.get_row( row_id ); } Core::Data::GuildOrderOfficer::GuildOrderOfficer( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_GuildOrderOfficerDat.get_row( row_id ); + auto row = exdData->m_GuildOrderOfficerDat.get_row( row_id ); } Core::Data::HouseRetainerPose::HouseRetainerPose( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_HouseRetainerPoseDat.get_row( row_id ); - actionTimeline = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_HouseRetainerPoseDat.get_row( row_id ); + actionTimeline = exdData->getField< uint16_t >( row, 0 ); } Core::Data::HousingFurniture::HousingFurniture( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_HousingFurnitureDat.get_row( row_id ); - modelKey = exdData->getField< uint16_t >( row, 0 ); - housingItemCategory = exdData->getField< uint8_t >( row, 1 ); - usageType = exdData->getField< uint8_t >( row, 2 ); - usageParameter = exdData->getField< uint32_t >( row, 3 ); - housingLayoutLimit = exdData->getField< uint8_t >( row, 4 ); - event = exdData->getField< uint32_t >( row, 6 ); - item = exdData->getField< uint32_t >( row, 7 ); - destroyOnRemoval = exdData->getField< bool >( row, 8 ); + auto row = exdData->m_HousingFurnitureDat.get_row( row_id ); + modelKey = exdData->getField< uint16_t >( row, 0 ); + housingItemCategory = exdData->getField< uint8_t >( row, 1 ); + usageType = exdData->getField< uint8_t >( row, 2 ); + usageParameter = exdData->getField< uint32_t >( row, 3 ); + housingLayoutLimit = exdData->getField< uint8_t >( row, 4 ); + event = exdData->getField< uint32_t >( row, 6 ); + item = exdData->getField< uint32_t >( row, 7 ); + destroyOnRemoval = exdData->getField< bool >( row, 8 ); } Core::Data::HousingYardObject::HousingYardObject( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_HousingYardObjectDat.get_row( row_id ); - modelKey = exdData->getField< uint8_t >( row, 0 ); - housingItemCategory = exdData->getField< uint8_t >( row, 1 ); - usageType = exdData->getField< uint8_t >( row, 2 ); - usageParameter = exdData->getField< uint32_t >( row, 3 ); - housingLayoutLimit = exdData->getField< uint8_t >( row, 4 ); - event = exdData->getField< uint32_t >( row, 5 ); - item = exdData->getField< uint32_t >( row, 6 ); - destroyOnRemoval = exdData->getField< bool >( row, 7 ); + auto row = exdData->m_HousingYardObjectDat.get_row( row_id ); + modelKey = exdData->getField< uint8_t >( row, 0 ); + housingItemCategory = exdData->getField< uint8_t >( row, 1 ); + usageType = exdData->getField< uint8_t >( row, 2 ); + usageParameter = exdData->getField< uint32_t >( row, 3 ); + housingLayoutLimit = exdData->getField< uint8_t >( row, 4 ); + event = exdData->getField< uint32_t >( row, 5 ); + item = exdData->getField< uint32_t >( row, 6 ); + destroyOnRemoval = exdData->getField< bool >( row, 7 ); } Core::Data::InstanceContent::InstanceContent( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_InstanceContentDat.get_row( row_id ); - instanceContentType = exdData->getField< uint8_t >( row, 0 ); - weekRestriction = exdData->getField< uint8_t >( row, 1 ); - timeLimitmin = exdData->getField< uint16_t >( row, 2 ); - name = exdData->getField< std::string >( row, 3 ); - bGM = exdData->getField< uint16_t >( row, 5 ); - territoryType = exdData->getField< uint32_t >( row, 9 ); - instanceContentTextDataBossStart = exdData->getField< uint32_t >( row, 13 ); - instanceContentTextDataBossEnd = exdData->getField< uint32_t >( row, 14 ); - bNpcBaseBoss = exdData->getField< uint32_t >( row, 15 ); - instanceContentTextDataObjectiveStart = exdData->getField< uint32_t >( row, 16 ); - instanceContentTextDataObjectiveEnd = exdData->getField< uint32_t >( row, 17 ); - sortKey = exdData->getField< uint16_t >( row, 18 ); - newPlayerBonusA = exdData->getField< uint16_t >( row, 21 ); - newPlayerBonusB = exdData->getField< uint16_t >( row, 22 ); - finalBossCurrencyA = exdData->getField< uint16_t >( row, 24 ); - finalBossCurrencyB = exdData->getField< uint16_t >( row, 25 ); - finalBossCurrencyC = exdData->getField< uint16_t >( row, 26 ); - instanceContentBuff = exdData->getField< int32_t >( row, 52 ); - partyCondition = exdData->getField< uint8_t >( row, 56 ); + auto row = exdData->m_InstanceContentDat.get_row( row_id ); + instanceContentType = exdData->getField< uint8_t >( row, 0 ); + weekRestriction = exdData->getField< uint8_t >( row, 1 ); + timeLimitmin = exdData->getField< uint16_t >( row, 2 ); + name = exdData->getField< std::string >( row, 3 ); + bGM = exdData->getField< uint16_t >( row, 5 ); + territoryType = exdData->getField< uint32_t >( row, 9 ); + instanceContentTextDataBossStart = exdData->getField< uint32_t >( row, 13 ); + instanceContentTextDataBossEnd = exdData->getField< uint32_t >( row, 14 ); + bNpcBaseBoss = exdData->getField< uint32_t >( row, 15 ); + instanceContentTextDataObjectiveStart = exdData->getField< uint32_t >( row, 16 ); + instanceContentTextDataObjectiveEnd = exdData->getField< uint32_t >( row, 17 ); + sortKey = exdData->getField< uint16_t >( row, 18 ); + newPlayerBonusA = exdData->getField< uint16_t >( row, 21 ); + newPlayerBonusB = exdData->getField< uint16_t >( row, 22 ); + finalBossCurrencyA = exdData->getField< uint16_t >( row, 24 ); + finalBossCurrencyB = exdData->getField< uint16_t >( row, 25 ); + finalBossCurrencyC = exdData->getField< uint16_t >( row, 26 ); + instanceContentBuff = exdData->getField< int32_t >( row, 52 ); + partyCondition = exdData->getField< uint8_t >( row, 56 ); } Core::Data::InstanceContentBuff::InstanceContentBuff( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_InstanceContentBuffDat.get_row( row_id ); - echoStart = exdData->getField< uint16_t >( row, 0 ); - echoDeath = exdData->getField< uint16_t >( row, 1 ); + auto row = exdData->m_InstanceContentBuffDat.get_row( row_id ); + echoStart = exdData->getField< uint16_t >( row, 0 ); + echoDeath = exdData->getField< uint16_t >( row, 1 ); } Core::Data::InstanceContentTextData::InstanceContentTextData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_InstanceContentTextDataDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_InstanceContentTextDataDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); } Core::Data::Item::Item( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ItemDat.get_row( row_id ); - singular = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - startsWithVowel = exdData->getField< int8_t >( row, 4 ); - description = exdData->getField< std::string >( row, 8 ); - name = exdData->getField< std::string >( row, 9 ); - icon = exdData->getField< uint16_t >( row, 10 ); - levelItem = exdData->getField< uint16_t >( row, 11 ); - rarity = exdData->getField< uint8_t >( row, 12 ); - filterGroup = exdData->getField< uint8_t >( row, 13 ); - stain = exdData->getField< uint32_t >( row, 14 ); - itemUICategory = exdData->getField< uint8_t >( row, 15 ); - itemSearchCategory = exdData->getField< uint8_t >( row, 16 ); - equipSlotCategory = exdData->getField< uint8_t >( row, 17 ); - stackSize = exdData->getField< uint32_t >( row, 19 ); - isUnique = exdData->getField< bool >( row, 20 ); - isUntradable = exdData->getField< bool >( row, 21 ); - isIndisposable = exdData->getField< bool >( row, 22 ); - isEquippable = exdData->getField< bool >( row, 23 ); - priceMid = exdData->getField< uint32_t >( row, 24 ); - priceLow = exdData->getField< uint32_t >( row, 25 ); - canBeHq = exdData->getField< bool >( row, 26 ); - isDyeable = exdData->getField< bool >( row, 27 ); - isCrestWorthy = exdData->getField< bool >( row, 28 ); - itemAction = exdData->getField< uint16_t >( row, 29 ); - cooldowns = exdData->getField< uint16_t >( row, 31 ); - classJobRepair = exdData->getField< uint8_t >( row, 32 ); - itemRepair = exdData->getField< int32_t >( row, 33 ); - itemGlamour = exdData->getField< int32_t >( row, 34 ); - salvage = exdData->getField< uint16_t >( row, 35 ); - isCollectable = exdData->getField< bool >( row, 36 ); - aetherialReduce = exdData->getField< uint16_t >( row, 37 ); - levelEquip = exdData->getField< uint8_t >( row, 38 ); - equipRestriction = exdData->getField< uint8_t >( row, 40 ); - classJobCategory = exdData->getField< uint8_t >( row, 41 ); - grandCompany = exdData->getField< uint8_t >( row, 42 ); - itemSeries = exdData->getField< uint8_t >( row, 43 ); - baseParamModifier = exdData->getField< uint8_t >( row, 44 ); - modelMain = exdData->getField< uint64_t >( row, 45 ); - modelSub = exdData->getField< uint64_t >( row, 46 ); - classJobUse = exdData->getField< uint8_t >( row, 47 ); - damagePhys = exdData->getField< uint16_t >( row, 49 ); - damageMag = exdData->getField< uint16_t >( row, 50 ); - delayms = exdData->getField< uint16_t >( row, 51 ); - blockRate = exdData->getField< uint16_t >( row, 53 ); - block = exdData->getField< uint16_t >( row, 54 ); - defensePhys = exdData->getField< uint16_t >( row, 55 ); - defenseMag = exdData->getField< uint16_t >( row, 56 ); - itemSpecialBonus = exdData->getField< uint8_t >( row, 69 ); - itemSpecialBonusParam = exdData->getField< uint8_t >( row, 70 ); - materializeType = exdData->getField< uint8_t >( row, 83 ); - materiaSlotCount = exdData->getField< uint8_t >( row, 84 ); - isAdvancedMeldingPermitted = exdData->getField< bool >( row, 85 ); - isPvP = exdData->getField< bool >( row, 86 ); + auto row = exdData->m_ItemDat.get_row( row_id ); + singular = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + startsWithVowel = exdData->getField< int8_t >( row, 4 ); + description = exdData->getField< std::string >( row, 8 ); + name = exdData->getField< std::string >( row, 9 ); + icon = exdData->getField< uint16_t >( row, 10 ); + levelItem = exdData->getField< uint16_t >( row, 11 ); + rarity = exdData->getField< uint8_t >( row, 12 ); + filterGroup = exdData->getField< uint8_t >( row, 13 ); + stain = exdData->getField< uint32_t >( row, 14 ); + itemUICategory = exdData->getField< uint8_t >( row, 15 ); + itemSearchCategory = exdData->getField< uint8_t >( row, 16 ); + equipSlotCategory = exdData->getField< uint8_t >( row, 17 ); + stackSize = exdData->getField< uint32_t >( row, 19 ); + isUnique = exdData->getField< bool >( row, 20 ); + isUntradable = exdData->getField< bool >( row, 21 ); + isIndisposable = exdData->getField< bool >( row, 22 ); + isEquippable = exdData->getField< bool >( row, 23 ); + priceMid = exdData->getField< uint32_t >( row, 24 ); + priceLow = exdData->getField< uint32_t >( row, 25 ); + canBeHq = exdData->getField< bool >( row, 26 ); + isDyeable = exdData->getField< bool >( row, 27 ); + isCrestWorthy = exdData->getField< bool >( row, 28 ); + itemAction = exdData->getField< uint16_t >( row, 29 ); + cooldowns = exdData->getField< uint16_t >( row, 31 ); + classJobRepair = exdData->getField< uint8_t >( row, 32 ); + itemRepair = exdData->getField< int32_t >( row, 33 ); + itemGlamour = exdData->getField< int32_t >( row, 34 ); + salvage = exdData->getField< uint16_t >( row, 35 ); + isCollectable = exdData->getField< bool >( row, 36 ); + aetherialReduce = exdData->getField< uint16_t >( row, 37 ); + levelEquip = exdData->getField< uint8_t >( row, 38 ); + equipRestriction = exdData->getField< uint8_t >( row, 40 ); + classJobCategory = exdData->getField< uint8_t >( row, 41 ); + grandCompany = exdData->getField< uint8_t >( row, 42 ); + itemSeries = exdData->getField< uint8_t >( row, 43 ); + baseParamModifier = exdData->getField< uint8_t >( row, 44 ); + modelMain = exdData->getField< uint64_t >( row, 45 ); + modelSub = exdData->getField< uint64_t >( row, 46 ); + classJobUse = exdData->getField< uint8_t >( row, 47 ); + damagePhys = exdData->getField< uint16_t >( row, 49 ); + damageMag = exdData->getField< uint16_t >( row, 50 ); + delayms = exdData->getField< uint16_t >( row, 51 ); + blockRate = exdData->getField< uint16_t >( row, 53 ); + block = exdData->getField< uint16_t >( row, 54 ); + defensePhys = exdData->getField< uint16_t >( row, 55 ); + defenseMag = exdData->getField< uint16_t >( row, 56 ); + itemSpecialBonus = exdData->getField< uint8_t >( row, 69 ); + itemSpecialBonusParam = exdData->getField< uint8_t >( row, 70 ); + materializeType = exdData->getField< uint8_t >( row, 83 ); + materiaSlotCount = exdData->getField< uint8_t >( row, 84 ); + isAdvancedMeldingPermitted = exdData->getField< bool >( row, 85 ); + isPvP = exdData->getField< bool >( row, 86 ); } Core::Data::ItemAction::ItemAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ItemActionDat.get_row( row_id ); - type = exdData->getField< uint16_t >( row, 4 ); - data.push_back( exdData->getField< uint16_t >( row, 5 ) ); - data.push_back( exdData->getField< uint16_t >( row, 6 ) ); - data.push_back( exdData->getField< uint16_t >( row, 7 ) ); - data.push_back( exdData->getField< uint16_t >( row, 8 ) ); - data.push_back( exdData->getField< uint16_t >( row, 9 ) ); - data.push_back( exdData->getField< uint16_t >( row, 10 ) ); - data.push_back( exdData->getField< uint16_t >( row, 11 ) ); - data.push_back( exdData->getField< uint16_t >( row, 12 ) ); - data.push_back( exdData->getField< uint16_t >( row, 13 ) ); - dataHQ.push_back( exdData->getField< uint16_t >( row, 14 ) ); - dataHQ.push_back( exdData->getField< uint16_t >( row, 15 ) ); - dataHQ.push_back( exdData->getField< uint16_t >( row, 16 ) ); - dataHQ.push_back( exdData->getField< uint16_t >( row, 17 ) ); - dataHQ.push_back( exdData->getField< uint16_t >( row, 18 ) ); - dataHQ.push_back( exdData->getField< uint16_t >( row, 19 ) ); - dataHQ.push_back( exdData->getField< uint16_t >( row, 20 ) ); - dataHQ.push_back( exdData->getField< uint16_t >( row, 21 ) ); - dataHQ.push_back( exdData->getField< uint16_t >( row, 22 ) ); + auto row = exdData->m_ItemActionDat.get_row( row_id ); + type = exdData->getField< uint16_t >( row, 4 ); + data.push_back( exdData->getField< uint16_t >( row, 5 ) ); + data.push_back( exdData->getField< uint16_t >( row, 6 ) ); + data.push_back( exdData->getField< uint16_t >( row, 7 ) ); + data.push_back( exdData->getField< uint16_t >( row, 8 ) ); + data.push_back( exdData->getField< uint16_t >( row, 9 ) ); + data.push_back( exdData->getField< uint16_t >( row, 10 ) ); + data.push_back( exdData->getField< uint16_t >( row, 11 ) ); + data.push_back( exdData->getField< uint16_t >( row, 12 ) ); + data.push_back( exdData->getField< uint16_t >( row, 13 ) ); + dataHQ.push_back( exdData->getField< uint16_t >( row, 14 ) ); + dataHQ.push_back( exdData->getField< uint16_t >( row, 15 ) ); + dataHQ.push_back( exdData->getField< uint16_t >( row, 16 ) ); + dataHQ.push_back( exdData->getField< uint16_t >( row, 17 ) ); + dataHQ.push_back( exdData->getField< uint16_t >( row, 18 ) ); + dataHQ.push_back( exdData->getField< uint16_t >( row, 19 ) ); + dataHQ.push_back( exdData->getField< uint16_t >( row, 20 ) ); + dataHQ.push_back( exdData->getField< uint16_t >( row, 21 ) ); + dataHQ.push_back( exdData->getField< uint16_t >( row, 22 ) ); } Core::Data::ItemFood::ItemFood( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ItemFoodDat.get_row( row_id ); + auto row = exdData->m_ItemFoodDat.get_row( row_id ); } Core::Data::ItemSearchCategory::ItemSearchCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ItemSearchCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); - category = exdData->getField< uint8_t >( row, 2 ); - order = exdData->getField< uint8_t >( row, 3 ); - classJob = exdData->getField< int8_t >( row, 4 ); + auto row = exdData->m_ItemSearchCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); + category = exdData->getField< uint8_t >( row, 2 ); + order = exdData->getField< uint8_t >( row, 3 ); + classJob = exdData->getField< int8_t >( row, 4 ); } Core::Data::ItemSeries::ItemSeries( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ItemSeriesDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_ItemSeriesDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::ItemSpecialBonus::ItemSpecialBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ItemSpecialBonusDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_ItemSpecialBonusDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::ItemUICategory::ItemUICategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ItemUICategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); - orderMinor = exdData->getField< uint8_t >( row, 2 ); - orderMajor = exdData->getField< uint8_t >( row, 3 ); + auto row = exdData->m_ItemUICategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); + orderMinor = exdData->getField< uint8_t >( row, 2 ); + orderMajor = exdData->getField< uint8_t >( row, 3 ); } Core::Data::JournalCategory::JournalCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_JournalCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - journalSection = exdData->getField< uint8_t >( row, 3 ); + auto row = exdData->m_JournalCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + journalSection = exdData->getField< uint8_t >( row, 3 ); } Core::Data::JournalGenre::JournalGenre( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_JournalGenreDat.get_row( row_id ); - icon = exdData->getField< int32_t >( row, 0 ); - journalCategory = exdData->getField< uint8_t >( row, 1 ); - name = exdData->getField< std::string >( row, 2 ); + auto row = exdData->m_JournalGenreDat.get_row( row_id ); + icon = exdData->getField< int32_t >( row, 0 ); + journalCategory = exdData->getField< uint8_t >( row, 1 ); + name = exdData->getField< std::string >( row, 2 ); } Core::Data::JournalSection::JournalSection( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_JournalSectionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_JournalSectionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Leve::Leve( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LeveDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - leveClient = exdData->getField< int32_t >( row, 2 ); - leveAssignmentType = exdData->getField< int32_t >( row, 3 ); - classJobLevel = exdData->getField< uint16_t >( row, 5 ); - allowanceCost = exdData->getField< uint8_t >( row, 7 ); - placeNameStart = exdData->getField< int32_t >( row, 9 ); - placeNameIssued = exdData->getField< int32_t >( row, 10 ); - classJobCategory = exdData->getField< uint8_t >( row, 12 ); - journalGenre = exdData->getField< int32_t >( row, 13 ); - placeNameStartZone = exdData->getField< int32_t >( row, 15 ); - iconCityState = exdData->getField< int32_t >( row, 16 ); - dataId = exdData->getField< int32_t >( row, 17 ); - expReward = exdData->getField< uint32_t >( row, 21 ); - gilReward = exdData->getField< uint32_t >( row, 22 ); - leveRewardItem = exdData->getField< uint16_t >( row, 23 ); - leveVfx = exdData->getField< uint8_t >( row, 24 ); - leveVfxFrame = exdData->getField< uint8_t >( row, 25 ); - levelLevemete = exdData->getField< uint32_t >( row, 26 ); - iconIssuer = exdData->getField< int32_t >( row, 27 ); - levelStart = exdData->getField< uint32_t >( row, 29 ); - bGM = exdData->getField< uint16_t >( row, 30 ); + auto row = exdData->m_LeveDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + leveClient = exdData->getField< int32_t >( row, 2 ); + leveAssignmentType = exdData->getField< int32_t >( row, 3 ); + classJobLevel = exdData->getField< uint16_t >( row, 5 ); + allowanceCost = exdData->getField< uint8_t >( row, 7 ); + placeNameStart = exdData->getField< int32_t >( row, 9 ); + placeNameIssued = exdData->getField< int32_t >( row, 10 ); + classJobCategory = exdData->getField< uint8_t >( row, 12 ); + journalGenre = exdData->getField< int32_t >( row, 13 ); + placeNameStartZone = exdData->getField< int32_t >( row, 15 ); + iconCityState = exdData->getField< int32_t >( row, 16 ); + dataId = exdData->getField< int32_t >( row, 17 ); + expReward = exdData->getField< uint32_t >( row, 21 ); + gilReward = exdData->getField< uint32_t >( row, 22 ); + leveRewardItem = exdData->getField< uint16_t >( row, 23 ); + leveVfx = exdData->getField< uint8_t >( row, 24 ); + leveVfxFrame = exdData->getField< uint8_t >( row, 25 ); + levelLevemete = exdData->getField< uint32_t >( row, 26 ); + iconIssuer = exdData->getField< int32_t >( row, 27 ); + levelStart = exdData->getField< uint32_t >( row, 29 ); + bGM = exdData->getField< uint16_t >( row, 30 ); } Core::Data::LeveAssignmentType::LeveAssignmentType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LeveAssignmentTypeDat.get_row( row_id ); - isFaction = exdData->getField< bool >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); - name = exdData->getField< std::string >( row, 2 ); + auto row = exdData->m_LeveAssignmentTypeDat.get_row( row_id ); + isFaction = exdData->getField< bool >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); + name = exdData->getField< std::string >( row, 2 ); } Core::Data::LeveClient::LeveClient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LeveClientDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_LeveClientDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Level::Level( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LevelDat.get_row( row_id ); - x = exdData->getField< float >( row, 0 ); - y = exdData->getField< float >( row, 1 ); - z = exdData->getField< float >( row, 2 ); - yaw = exdData->getField< float >( row, 3 ); - radius = exdData->getField< float >( row, 4 ); - type = exdData->getField< uint8_t >( row, 5 ); - objectKey = exdData->getField< uint32_t >( row, 6 ); - map = exdData->getField< uint16_t >( row, 7 ); - eventId = exdData->getField< uint32_t >( row, 8 ); - territory = exdData->getField< uint16_t >( row, 9 ); + auto row = exdData->m_LevelDat.get_row( row_id ); + x = exdData->getField< float >( row, 0 ); + y = exdData->getField< float >( row, 1 ); + z = exdData->getField< float >( row, 2 ); + yaw = exdData->getField< float >( row, 3 ); + radius = exdData->getField< float >( row, 4 ); + type = exdData->getField< uint8_t >( row, 5 ); + objectKey = exdData->getField< uint32_t >( row, 6 ); + map = exdData->getField< uint16_t >( row, 7 ); + eventId = exdData->getField< uint32_t >( row, 8 ); + territory = exdData->getField< uint16_t >( row, 9 ); } Core::Data::LeveRewardItem::LeveRewardItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LeveRewardItemDat.get_row( row_id ); + auto row = exdData->m_LeveRewardItemDat.get_row( row_id ); } Core::Data::LeveRewardItemGroup::LeveRewardItemGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LeveRewardItemGroupDat.get_row( row_id ); + auto row = exdData->m_LeveRewardItemGroupDat.get_row( row_id ); } Core::Data::LeveVfx::LeveVfx( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LeveVfxDat.get_row( row_id ); - effect = exdData->getField< std::string >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_LeveVfxDat.get_row( row_id ); + effect = exdData->getField< std::string >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); } Core::Data::LogFilter::LogFilter( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LogFilterDat.get_row( row_id ); - logKind = exdData->getField< uint16_t >( row, 1 ); - name = exdData->getField< std::string >( row, 6 ); - example = exdData->getField< std::string >( row, 7 ); + auto row = exdData->m_LogFilterDat.get_row( row_id ); + logKind = exdData->getField< uint16_t >( row, 1 ); + name = exdData->getField< std::string >( row, 6 ); + example = exdData->getField< std::string >( row, 7 ); } Core::Data::LogKind::LogKind( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LogKindDat.get_row( row_id ); - format = exdData->getField< std::string >( row, 1 ); - name = exdData->getField< std::string >( row, 2 ); - example = exdData->getField< std::string >( row, 3 ); - logKindCategoryText = exdData->getField< uint8_t >( row, 4 ); + auto row = exdData->m_LogKindDat.get_row( row_id ); + format = exdData->getField< std::string >( row, 1 ); + name = exdData->getField< std::string >( row, 2 ); + example = exdData->getField< std::string >( row, 3 ); + logKindCategoryText = exdData->getField< uint8_t >( row, 4 ); } Core::Data::LogKindCategoryText::LogKindCategoryText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LogKindCategoryTextDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_LogKindCategoryTextDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); } Core::Data::LogMessage::LogMessage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_LogMessageDat.get_row( row_id ); - logKind = exdData->getField< uint16_t >( row, 0 ); - text = exdData->getField< std::string >( row, 4 ); + auto row = exdData->m_LogMessageDat.get_row( row_id ); + logKind = exdData->getField< uint16_t >( row, 0 ); + text = exdData->getField< std::string >( row, 4 ); } Core::Data::MacroIcon::MacroIcon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MacroIconDat.get_row( row_id ); - icon = exdData->getField< int32_t >( row, 0 ); + auto row = exdData->m_MacroIconDat.get_row( row_id ); + icon = exdData->getField< int32_t >( row, 0 ); } Core::Data::MacroIconRedirectOld::MacroIconRedirectOld( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MacroIconRedirectOldDat.get_row( row_id ); - iconOld = exdData->getField< uint32_t >( row, 0 ); - iconNew = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_MacroIconRedirectOldDat.get_row( row_id ); + iconOld = exdData->getField< uint32_t >( row, 0 ); + iconNew = exdData->getField< int32_t >( row, 1 ); } Core::Data::MainCommand::MainCommand( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MainCommandDat.get_row( row_id ); - icon = exdData->getField< int32_t >( row, 0 ); - mainCommandCategory = exdData->getField< uint8_t >( row, 2 ); - name = exdData->getField< std::string >( row, 4 ); - description = exdData->getField< std::string >( row, 5 ); + auto row = exdData->m_MainCommandDat.get_row( row_id ); + icon = exdData->getField< int32_t >( row, 0 ); + mainCommandCategory = exdData->getField< uint8_t >( row, 2 ); + name = exdData->getField< std::string >( row, 4 ); + description = exdData->getField< std::string >( row, 5 ); } Core::Data::MainCommandCategory::MainCommandCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MainCommandCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_MainCommandCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::Map::Map( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MapDat.get_row( row_id ); - hierarchy = exdData->getField< uint8_t >( row, 3 ); - mapMarkerRange = exdData->getField< uint16_t >( row, 4 ); - id = exdData->getField< std::string >( row, 5 ); - sizeFactor = exdData->getField< uint16_t >( row, 6 ); - offsetX = exdData->getField< int16_t >( row, 7 ); - offsetY = exdData->getField< int16_t >( row, 8 ); - placeNameRegion = exdData->getField< uint16_t >( row, 9 ); - placeName = exdData->getField< uint16_t >( row, 10 ); - placeNameSub = exdData->getField< uint16_t >( row, 11 ); - discoveryIndex = exdData->getField< int16_t >( row, 12 ); - territoryType = exdData->getField< uint16_t >( row, 14 ); - discoveryArrayByte = exdData->getField< bool >( row, 15 ); + auto row = exdData->m_MapDat.get_row( row_id ); + hierarchy = exdData->getField< uint8_t >( row, 3 ); + mapMarkerRange = exdData->getField< uint16_t >( row, 4 ); + id = exdData->getField< std::string >( row, 5 ); + sizeFactor = exdData->getField< uint16_t >( row, 6 ); + offsetX = exdData->getField< int16_t >( row, 7 ); + offsetY = exdData->getField< int16_t >( row, 8 ); + placeNameRegion = exdData->getField< uint16_t >( row, 9 ); + placeName = exdData->getField< uint16_t >( row, 10 ); + placeNameSub = exdData->getField< uint16_t >( row, 11 ); + discoveryIndex = exdData->getField< int16_t >( row, 12 ); + territoryType = exdData->getField< uint16_t >( row, 14 ); + discoveryArrayByte = exdData->getField< bool >( row, 15 ); } Core::Data::MapMarker::MapMarker( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MapMarkerDat.get_row( row_id ); - x = exdData->getField< int16_t >( row, 0 ); - y = exdData->getField< int16_t >( row, 1 ); - icon = exdData->getField< uint16_t >( row, 2 ); - placeNameSubtext = exdData->getField< uint16_t >( row, 3 ); - subtextOrientation = exdData->getField< uint8_t >( row, 4 ); - mapMarkerRegion = exdData->getField< uint8_t >( row, 5 ); - type = exdData->getField< uint8_t >( row, 6 ); - dataType = exdData->getField< uint8_t >( row, 7 ); - dataKey = exdData->getField< uint16_t >( row, 8 ); + auto row = exdData->m_MapMarkerDat.get_row( row_id ); + x = exdData->getField< int16_t >( row, 0 ); + y = exdData->getField< int16_t >( row, 1 ); + icon = exdData->getField< uint16_t >( row, 2 ); + placeNameSubtext = exdData->getField< uint16_t >( row, 3 ); + subtextOrientation = exdData->getField< uint8_t >( row, 4 ); + mapMarkerRegion = exdData->getField< uint8_t >( row, 5 ); + type = exdData->getField< uint8_t >( row, 6 ); + dataType = exdData->getField< uint8_t >( row, 7 ); + dataKey = exdData->getField< uint16_t >( row, 8 ); } Core::Data::MapMarkerRegion::MapMarkerRegion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MapMarkerRegionDat.get_row( row_id ); - x = exdData->getField< int16_t >( row, 0 ); + auto row = exdData->m_MapMarkerRegionDat.get_row( row_id ); + x = exdData->getField< int16_t >( row, 0 ); } Core::Data::MapSymbol::MapSymbol( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MapSymbolDat.get_row( row_id ); - icon = exdData->getField< int32_t >( row, 0 ); - placeName = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_MapSymbolDat.get_row( row_id ); + icon = exdData->getField< int32_t >( row, 0 ); + placeName = exdData->getField< int32_t >( row, 1 ); } Core::Data::Marker::Marker( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MarkerDat.get_row( row_id ); - icon = exdData->getField< int32_t >( row, 0 ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_MarkerDat.get_row( row_id ); + icon = exdData->getField< int32_t >( row, 0 ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::MasterpieceSupplyDuty::MasterpieceSupplyDuty( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MasterpieceSupplyDutyDat.get_row( row_id ); - classJob = exdData->getField< uint8_t >( row, 0 ); - classJobLevel = exdData->getField< uint8_t >( row, 1 ); - rewardCurrency = exdData->getField< uint16_t >( row, 2 ); + auto row = exdData->m_MasterpieceSupplyDutyDat.get_row( row_id ); + classJob = exdData->getField< uint8_t >( row, 0 ); + classJobLevel = exdData->getField< uint8_t >( row, 1 ); + rewardCurrency = exdData->getField< uint16_t >( row, 2 ); } -Core::Data::MasterpieceSupplyMultiplier::MasterpieceSupplyMultiplier( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::MasterpieceSupplyMultiplier::MasterpieceSupplyMultiplier( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MasterpieceSupplyMultiplierDat.get_row( row_id ); - xpMultiplier.push_back( exdData->getField< uint16_t >( row, 0 ) ); - xpMultiplier.push_back( exdData->getField< uint16_t >( row, 1 ) ); - currencyMultiplier.push_back( exdData->getField< uint16_t >( row, 4 ) ); - currencyMultiplier.push_back( exdData->getField< uint16_t >( row, 5 ) ); + auto row = exdData->m_MasterpieceSupplyMultiplierDat.get_row( row_id ); + xpMultiplier.push_back( exdData->getField< uint16_t >( row, 0 ) ); + xpMultiplier.push_back( exdData->getField< uint16_t >( row, 1 ) ); + currencyMultiplier.push_back( exdData->getField< uint16_t >( row, 4 ) ); + currencyMultiplier.push_back( exdData->getField< uint16_t >( row, 5 ) ); } Core::Data::Materia::Materia( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MateriaDat.get_row( row_id ); - item.push_back( exdData->getField< int32_t >( row, 0 ) ); - item.push_back( exdData->getField< int32_t >( row, 1 ) ); - item.push_back( exdData->getField< int32_t >( row, 2 ) ); - item.push_back( exdData->getField< int32_t >( row, 3 ) ); - item.push_back( exdData->getField< int32_t >( row, 4 ) ); - item.push_back( exdData->getField< int32_t >( row, 5 ) ); - item.push_back( exdData->getField< int32_t >( row, 6 ) ); - item.push_back( exdData->getField< int32_t >( row, 7 ) ); - item.push_back( exdData->getField< int32_t >( row, 8 ) ); - item.push_back( exdData->getField< int32_t >( row, 9 ) ); - baseParam = exdData->getField< uint8_t >( row, 10 ); - value.push_back( exdData->getField< uint8_t >( row, 11 ) ); - value.push_back( exdData->getField< uint8_t >( row, 12 ) ); - value.push_back( exdData->getField< uint8_t >( row, 13 ) ); - value.push_back( exdData->getField< uint8_t >( row, 14 ) ); - value.push_back( exdData->getField< uint8_t >( row, 15 ) ); - value.push_back( exdData->getField< uint8_t >( row, 16 ) ); - value.push_back( exdData->getField< uint8_t >( row, 17 ) ); - value.push_back( exdData->getField< uint8_t >( row, 18 ) ); - value.push_back( exdData->getField< uint8_t >( row, 19 ) ); - value.push_back( exdData->getField< uint8_t >( row, 20 ) ); + auto row = exdData->m_MateriaDat.get_row( row_id ); + item.push_back( exdData->getField< int32_t >( row, 0 ) ); + item.push_back( exdData->getField< int32_t >( row, 1 ) ); + item.push_back( exdData->getField< int32_t >( row, 2 ) ); + item.push_back( exdData->getField< int32_t >( row, 3 ) ); + item.push_back( exdData->getField< int32_t >( row, 4 ) ); + item.push_back( exdData->getField< int32_t >( row, 5 ) ); + item.push_back( exdData->getField< int32_t >( row, 6 ) ); + item.push_back( exdData->getField< int32_t >( row, 7 ) ); + item.push_back( exdData->getField< int32_t >( row, 8 ) ); + item.push_back( exdData->getField< int32_t >( row, 9 ) ); + baseParam = exdData->getField< uint8_t >( row, 10 ); + value.push_back( exdData->getField< uint8_t >( row, 11 ) ); + value.push_back( exdData->getField< uint8_t >( row, 12 ) ); + value.push_back( exdData->getField< uint8_t >( row, 13 ) ); + value.push_back( exdData->getField< uint8_t >( row, 14 ) ); + value.push_back( exdData->getField< uint8_t >( row, 15 ) ); + value.push_back( exdData->getField< uint8_t >( row, 16 ) ); + value.push_back( exdData->getField< uint8_t >( row, 17 ) ); + value.push_back( exdData->getField< uint8_t >( row, 18 ) ); + value.push_back( exdData->getField< uint8_t >( row, 19 ) ); + value.push_back( exdData->getField< uint8_t >( row, 20 ) ); } Core::Data::MinionRace::MinionRace( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MinionRaceDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_MinionRaceDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::MinionRules::MinionRules( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MinionRulesDat.get_row( row_id ); - rule = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_MinionRulesDat.get_row( row_id ); + rule = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); } Core::Data::MinionSkillType::MinionSkillType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MinionSkillTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_MinionSkillTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::MobHuntTarget::MobHuntTarget( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MobHuntTargetDat.get_row( row_id ); - name = exdData->getField< uint16_t >( row, 0 ); - fATE = exdData->getField< uint16_t >( row, 1 ); - icon = exdData->getField< uint32_t >( row, 2 ); - territoryType = exdData->getField< uint16_t >( row, 3 ); - placeName = exdData->getField< uint16_t >( row, 4 ); + auto row = exdData->m_MobHuntTargetDat.get_row( row_id ); + name = exdData->getField< uint16_t >( row, 0 ); + fATE = exdData->getField< uint16_t >( row, 1 ); + icon = exdData->getField< uint32_t >( row, 2 ); + territoryType = exdData->getField< uint16_t >( row, 3 ); + placeName = exdData->getField< uint16_t >( row, 4 ); } Core::Data::ModelChara::ModelChara( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ModelCharaDat.get_row( row_id ); - type = exdData->getField< uint8_t >( row, 0 ); - model = exdData->getField< uint16_t >( row, 1 ); - base = exdData->getField< uint8_t >( row, 2 ); - variant = exdData->getField< uint8_t >( row, 3 ); + auto row = exdData->m_ModelCharaDat.get_row( row_id ); + type = exdData->getField< uint8_t >( row, 0 ); + model = exdData->getField< uint16_t >( row, 1 ); + base = exdData->getField< uint8_t >( row, 2 ); + variant = exdData->getField< uint8_t >( row, 3 ); } Core::Data::MonsterNote::MonsterNote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MonsterNoteDat.get_row( row_id ); - monsterNoteTarget.push_back( exdData->getField< uint16_t >( row, 0 ) ); - monsterNoteTarget.push_back( exdData->getField< uint16_t >( row, 1 ) ); - monsterNoteTarget.push_back( exdData->getField< uint16_t >( row, 2 ) ); - monsterNoteTarget.push_back( exdData->getField< uint16_t >( row, 3 ) ); - count.push_back( exdData->getField< uint8_t >( row, 4 ) ); - count.push_back( exdData->getField< uint8_t >( row, 5 ) ); - count.push_back( exdData->getField< uint8_t >( row, 6 ) ); - count.push_back( exdData->getField< uint8_t >( row, 7 ) ); - reward = exdData->getField< uint32_t >( row, 8 ); - name = exdData->getField< std::string >( row, 9 ); + auto row = exdData->m_MonsterNoteDat.get_row( row_id ); + monsterNoteTarget.push_back( exdData->getField< uint16_t >( row, 0 ) ); + monsterNoteTarget.push_back( exdData->getField< uint16_t >( row, 1 ) ); + monsterNoteTarget.push_back( exdData->getField< uint16_t >( row, 2 ) ); + monsterNoteTarget.push_back( exdData->getField< uint16_t >( row, 3 ) ); + count.push_back( exdData->getField< uint8_t >( row, 4 ) ); + count.push_back( exdData->getField< uint8_t >( row, 5 ) ); + count.push_back( exdData->getField< uint8_t >( row, 6 ) ); + count.push_back( exdData->getField< uint8_t >( row, 7 ) ); + reward = exdData->getField< uint32_t >( row, 8 ); + name = exdData->getField< std::string >( row, 9 ); } Core::Data::MonsterNoteTarget::MonsterNoteTarget( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MonsterNoteTargetDat.get_row( row_id ); - bNpcName = exdData->getField< uint16_t >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_MonsterNoteTargetDat.get_row( row_id ); + bNpcName = exdData->getField< uint16_t >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); } Core::Data::Mount::Mount( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MountDat.get_row( row_id ); - singular = exdData->getField< std::string >( row, 0 ); - plural = exdData->getField< std::string >( row, 2 ); - flyingCondition = exdData->getField< uint8_t >( row, 10 ); - isFlying = exdData->getField< uint8_t >( row, 14 ); - rideBGM = exdData->getField< uint16_t >( row, 17 ); - order = exdData->getField< int16_t >( row, 29 ); - icon = exdData->getField< uint16_t >( row, 30 ); + auto row = exdData->m_MountDat.get_row( row_id ); + singular = exdData->getField< std::string >( row, 0 ); + plural = exdData->getField< std::string >( row, 2 ); + flyingCondition = exdData->getField< uint8_t >( row, 10 ); + isFlying = exdData->getField< uint8_t >( row, 14 ); + rideBGM = exdData->getField< uint16_t >( row, 17 ); + order = exdData->getField< int16_t >( row, 29 ); + icon = exdData->getField< uint16_t >( row, 30 ); } Core::Data::MountAction::MountAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MountActionDat.get_row( row_id ); - action.push_back( exdData->getField< uint16_t >( row, 0 ) ); - action.push_back( exdData->getField< uint16_t >( row, 1 ) ); - action.push_back( exdData->getField< uint16_t >( row, 2 ) ); - action.push_back( exdData->getField< uint16_t >( row, 3 ) ); - action.push_back( exdData->getField< uint16_t >( row, 4 ) ); - action.push_back( exdData->getField< uint16_t >( row, 5 ) ); + auto row = exdData->m_MountActionDat.get_row( row_id ); + action.push_back( exdData->getField< uint16_t >( row, 0 ) ); + action.push_back( exdData->getField< uint16_t >( row, 1 ) ); + action.push_back( exdData->getField< uint16_t >( row, 2 ) ); + action.push_back( exdData->getField< uint16_t >( row, 3 ) ); + action.push_back( exdData->getField< uint16_t >( row, 4 ) ); + action.push_back( exdData->getField< uint16_t >( row, 5 ) ); } Core::Data::MoveTimeline::MoveTimeline( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MoveTimelineDat.get_row( row_id ); - idle = exdData->getField< uint16_t >( row, 0 ); - moveForward = exdData->getField< uint16_t >( row, 1 ); - moveBack = exdData->getField< uint16_t >( row, 2 ); - moveLeft = exdData->getField< uint16_t >( row, 3 ); - moveRight = exdData->getField< uint16_t >( row, 4 ); - moveUp = exdData->getField< uint16_t >( row, 5 ); - moveDown = exdData->getField< uint16_t >( row, 6 ); - moveTurnLeft = exdData->getField< uint16_t >( row, 7 ); - moveTurnRight = exdData->getField< uint16_t >( row, 8 ); - extra = exdData->getField< uint16_t >( row, 9 ); + auto row = exdData->m_MoveTimelineDat.get_row( row_id ); + idle = exdData->getField< uint16_t >( row, 0 ); + moveForward = exdData->getField< uint16_t >( row, 1 ); + moveBack = exdData->getField< uint16_t >( row, 2 ); + moveLeft = exdData->getField< uint16_t >( row, 3 ); + moveRight = exdData->getField< uint16_t >( row, 4 ); + moveUp = exdData->getField< uint16_t >( row, 5 ); + moveDown = exdData->getField< uint16_t >( row, 6 ); + moveTurnLeft = exdData->getField< uint16_t >( row, 7 ); + moveTurnRight = exdData->getField< uint16_t >( row, 8 ); + extra = exdData->getField< uint16_t >( row, 9 ); } Core::Data::MoveVfx::MoveVfx( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_MoveVfxDat.get_row( row_id ); - zero = exdData->getField< uint16_t >( row, 0 ); - one = exdData->getField< uint16_t >( row, 1 ); + auto row = exdData->m_MoveVfxDat.get_row( row_id ); + zero = exdData->getField< uint16_t >( row, 0 ); + one = exdData->getField< uint16_t >( row, 1 ); } Core::Data::NpcEquip::NpcEquip( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_NpcEquipDat.get_row( row_id ); - modelMainHand = exdData->getField< uint64_t >( row, 0 ); - dyeMainHand = exdData->getField< uint8_t >( row, 1 ); - modelOffHand = exdData->getField< uint64_t >( row, 2 ); - dyeOffHand = exdData->getField< uint8_t >( row, 3 ); - modelHead = exdData->getField< uint32_t >( row, 4 ); - dyeHead = exdData->getField< uint8_t >( row, 5 ); - visor = exdData->getField< bool >( row, 6 ); - modelBody = exdData->getField< uint32_t >( row, 7 ); - dyeBody = exdData->getField< uint8_t >( row, 8 ); - modelHands = exdData->getField< uint32_t >( row, 9 ); - dyeHands = exdData->getField< uint8_t >( row, 10 ); - modelLegs = exdData->getField< uint32_t >( row, 11 ); - dyeLegs = exdData->getField< uint8_t >( row, 12 ); - modelFeet = exdData->getField< uint32_t >( row, 13 ); - dyeFeet = exdData->getField< uint8_t >( row, 14 ); - modelEars = exdData->getField< uint32_t >( row, 15 ); - dyeEars = exdData->getField< uint8_t >( row, 16 ); - modelNeck = exdData->getField< uint32_t >( row, 17 ); - dyeNeck = exdData->getField< uint8_t >( row, 18 ); - modelWrists = exdData->getField< uint32_t >( row, 19 ); - dyeWrists = exdData->getField< uint8_t >( row, 20 ); - modelLeftRing = exdData->getField< uint32_t >( row, 21 ); - dyeLeftRing = exdData->getField< uint8_t >( row, 22 ); - modelRightRing = exdData->getField< uint32_t >( row, 23 ); - dyeRightRing = exdData->getField< uint8_t >( row, 24 ); + auto row = exdData->m_NpcEquipDat.get_row( row_id ); + modelMainHand = exdData->getField< uint64_t >( row, 0 ); + dyeMainHand = exdData->getField< uint8_t >( row, 1 ); + modelOffHand = exdData->getField< uint64_t >( row, 2 ); + dyeOffHand = exdData->getField< uint8_t >( row, 3 ); + modelHead = exdData->getField< uint32_t >( row, 4 ); + dyeHead = exdData->getField< uint8_t >( row, 5 ); + visor = exdData->getField< bool >( row, 6 ); + modelBody = exdData->getField< uint32_t >( row, 7 ); + dyeBody = exdData->getField< uint8_t >( row, 8 ); + modelHands = exdData->getField< uint32_t >( row, 9 ); + dyeHands = exdData->getField< uint8_t >( row, 10 ); + modelLegs = exdData->getField< uint32_t >( row, 11 ); + dyeLegs = exdData->getField< uint8_t >( row, 12 ); + modelFeet = exdData->getField< uint32_t >( row, 13 ); + dyeFeet = exdData->getField< uint8_t >( row, 14 ); + modelEars = exdData->getField< uint32_t >( row, 15 ); + dyeEars = exdData->getField< uint8_t >( row, 16 ); + modelNeck = exdData->getField< uint32_t >( row, 17 ); + dyeNeck = exdData->getField< uint8_t >( row, 18 ); + modelWrists = exdData->getField< uint32_t >( row, 19 ); + dyeWrists = exdData->getField< uint8_t >( row, 20 ); + modelLeftRing = exdData->getField< uint32_t >( row, 21 ); + dyeLeftRing = exdData->getField< uint8_t >( row, 22 ); + modelRightRing = exdData->getField< uint32_t >( row, 23 ); + dyeRightRing = exdData->getField< uint8_t >( row, 24 ); } Core::Data::Omen::Omen( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_OmenDat.get_row( row_id ); - fileName = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_OmenDat.get_row( row_id ); + fileName = exdData->getField< std::string >( row, 0 ); } Core::Data::OnlineStatus::OnlineStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_OnlineStatusDat.get_row( row_id ); - priority = exdData->getField< uint8_t >( row, 2 ); - name = exdData->getField< std::string >( row, 3 ); - icon = exdData->getField< uint32_t >( row, 4 ); + auto row = exdData->m_OnlineStatusDat.get_row( row_id ); + priority = exdData->getField< uint8_t >( row, 2 ); + name = exdData->getField< std::string >( row, 3 ); + icon = exdData->getField< uint32_t >( row, 4 ); } Core::Data::Opening::Opening( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_OpeningDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_OpeningDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Orchestrion::Orchestrion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_OrchestrionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_OrchestrionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); } Core::Data::OrchestrionCategory::OrchestrionCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_OrchestrionCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_OrchestrionCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::OrchestrionPath::OrchestrionPath( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_OrchestrionPathDat.get_row( row_id ); - file = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_OrchestrionPathDat.get_row( row_id ); + file = exdData->getField< std::string >( row, 0 ); } Core::Data::OrchestrionUiparam::OrchestrionUiparam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_OrchestrionUiparamDat.get_row( row_id ); - orchestrionCategory = exdData->getField< uint8_t >( row, 0 ); - order = exdData->getField< uint16_t >( row, 1 ); + auto row = exdData->m_OrchestrionUiparamDat.get_row( row_id ); + orchestrionCategory = exdData->getField< uint8_t >( row, 0 ); + order = exdData->getField< uint16_t >( row, 1 ); } Core::Data::ParamGrow::ParamGrow( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ParamGrowDat.get_row( row_id ); - expToNext = exdData->getField< int32_t >( row, 0 ); - additionalActions = exdData->getField< uint8_t >( row, 1 ); - mpModifier = exdData->getField< int32_t >( row, 4 ); - baseSpeed = exdData->getField< int32_t >( row, 5 ); - levelModifier = exdData->getField< int32_t >( row, 6 ); - questExpModifier = exdData->getField< uint8_t >( row, 7 ); - hpModifier = exdData->getField< uint16_t >( row, 8 ); - huntingLogExpReward = exdData->getField< int32_t >( row, 9 ); + auto row = exdData->m_ParamGrowDat.get_row( row_id ); + expToNext = exdData->getField< int32_t >( row, 0 ); + additionalActions = exdData->getField< uint8_t >( row, 1 ); + mpModifier = exdData->getField< int32_t >( row, 4 ); + baseSpeed = exdData->getField< int32_t >( row, 5 ); + levelModifier = exdData->getField< int32_t >( row, 6 ); + questExpModifier = exdData->getField< uint8_t >( row, 7 ); + hpModifier = exdData->getField< uint16_t >( row, 8 ); + huntingLogExpReward = exdData->getField< int32_t >( row, 9 ); } Core::Data::Perform::Perform( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_PerformDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - modelKey = exdData->getField< uint64_t >( row, 2 ); - animationStart = exdData->getField< uint16_t >( row, 3 ); - animationEnd = exdData->getField< uint16_t >( row, 4 ); - animationIdle = exdData->getField< uint16_t >( row, 5 ); - animationPlay01 = exdData->getField< uint16_t >( row, 6 ); - animationPlay02 = exdData->getField< uint16_t >( row, 7 ); - stopAnimation = exdData->getField< int32_t >( row, 8 ); - instrument = exdData->getField< std::string >( row, 9 ); - transient = exdData->getField< uint8_t >( row, 11 ); + auto row = exdData->m_PerformDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + modelKey = exdData->getField< uint64_t >( row, 2 ); + animationStart = exdData->getField< uint16_t >( row, 3 ); + animationEnd = exdData->getField< uint16_t >( row, 4 ); + animationIdle = exdData->getField< uint16_t >( row, 5 ); + animationPlay01 = exdData->getField< uint16_t >( row, 6 ); + animationPlay02 = exdData->getField< uint16_t >( row, 7 ); + stopAnimation = exdData->getField< int32_t >( row, 8 ); + instrument = exdData->getField< std::string >( row, 9 ); + transient = exdData->getField< uint8_t >( row, 11 ); } Core::Data::PerformTransient::PerformTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_PerformTransientDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_PerformTransientDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 0 ); } Core::Data::Pet::Pet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_PetDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_PetDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::PetAction::PetAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_PetActionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - action = exdData->getField< uint16_t >( row, 3 ); - pet = exdData->getField< uint8_t >( row, 4 ); + auto row = exdData->m_PetActionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + action = exdData->getField< uint16_t >( row, 3 ); + pet = exdData->getField< uint8_t >( row, 4 ); } Core::Data::Picture::Picture( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_PictureDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - image = exdData->getField< int32_t >( row, 1 ); - signature = exdData->getField< int32_t >( row, 2 ); + auto row = exdData->m_PictureDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + image = exdData->getField< int32_t >( row, 1 ); + signature = exdData->getField< int32_t >( row, 2 ); } Core::Data::PlaceName::PlaceName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_PlaceNameDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - nameNoArticle = exdData->getField< std::string >( row, 2 ); + auto row = exdData->m_PlaceNameDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + nameNoArticle = exdData->getField< std::string >( row, 2 ); } Core::Data::PublicContent::PublicContent( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_PublicContentDat.get_row( row_id ); - timeLimit = exdData->getField< uint16_t >( row, 1 ); - mapIcon = exdData->getField< uint32_t >( row, 2 ); - name = exdData->getField< std::string >( row, 3 ); - territoryType = exdData->getField< uint16_t >( row, 7 ); + auto row = exdData->m_PublicContentDat.get_row( row_id ); + timeLimit = exdData->getField< uint16_t >( row, 1 ); + mapIcon = exdData->getField< uint32_t >( row, 2 ); + name = exdData->getField< std::string >( row, 3 ); + territoryType = exdData->getField< uint16_t >( row, 7 ); } Core::Data::PvPActionSort::PvPActionSort( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_PvPActionSortDat.get_row( row_id ); - name = exdData->getField< uint8_t >( row, 0 ); - action = exdData->getField< uint16_t >( row, 1 ); + auto row = exdData->m_PvPActionSortDat.get_row( row_id ); + name = exdData->getField< uint8_t >( row, 0 ); + action = exdData->getField< uint16_t >( row, 1 ); } Core::Data::Quest::Quest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_QuestDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - id = exdData->getField< std::string >( row, 1 ); - expansion = exdData->getField< uint8_t >( row, 2 ); - classJobCategory0 = exdData->getField< uint8_t >( row, 3 ); - classJobLevel0 = exdData->getField< uint16_t >( row, 4 ); - questLevelOffset = exdData->getField< uint8_t >( row, 5 ); - classJobCategory1 = exdData->getField< uint8_t >( row, 7 ); - classJobLevel1 = exdData->getField< uint16_t >( row, 8 ); - previousQuestJoin = exdData->getField< uint8_t >( row, 9 ); - previousQuest0 = exdData->getField< uint32_t >( row, 10 ); - previousQuest1 = exdData->getField< uint32_t >( row, 12 ); - previousQuest2 = exdData->getField< uint32_t >( row, 13 ); - questLockJoin = exdData->getField< uint8_t >( row, 14 ); - questLock.push_back( exdData->getField< uint32_t >( row, 15 ) ); - questLock.push_back( exdData->getField< uint32_t >( row, 16 ) ); - classJobUnlock = exdData->getField< uint8_t >( row, 20 ); - grandCompany = exdData->getField< uint8_t >( row, 21 ); - grandCompanyRank = exdData->getField< uint8_t >( row, 22 ); - instanceContentJoin = exdData->getField< uint8_t >( row, 23 ); - instanceContent.push_back( exdData->getField< uint32_t >( row, 24 ) ); - instanceContent.push_back( exdData->getField< uint32_t >( row, 25 ) ); - instanceContent.push_back( exdData->getField< uint32_t >( row, 26 ) ); - bellStart = exdData->getField< uint16_t >( row, 30 ); - bellEnd = exdData->getField< uint16_t >( row, 31 ); - beastTribe = exdData->getField< uint8_t >( row, 32 ); - beastReputationRank = exdData->getField< uint8_t >( row, 33 ); - mountRequired = exdData->getField< int32_t >( row, 37 ); - isHouseRequired = exdData->getField< bool >( row, 38 ); - eNpcResidentStart = exdData->getField< uint32_t >( row, 40 ); - eNpcResidentEnd = exdData->getField< uint32_t >( row, 42 ); - isRepeatable = exdData->getField< bool >( row, 43 ); - repeatIntervalType = exdData->getField< uint8_t >( row, 44 ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 50 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 51 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 52 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 53 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 54 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 55 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 56 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 57 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 58 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 59 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 60 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 61 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 62 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 63 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 64 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 65 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 66 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 67 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 68 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 69 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 70 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 71 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 72 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 73 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 74 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 75 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 76 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 77 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 78 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 79 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 80 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 81 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 82 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 83 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 84 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 85 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 86 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 87 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 88 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 89 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 90 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 91 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 92 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 93 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 94 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 95 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 96 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 97 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 98 ) ); - scriptInstruction.push_back( exdData->getField< std::string >( row, 99 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 100 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 101 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 102 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 103 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 104 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 105 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 106 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 107 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 108 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 109 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 110 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 111 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 112 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 113 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 114 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 115 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 116 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 117 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 118 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 119 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 120 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 121 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 122 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 123 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 124 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 125 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 126 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 127 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 128 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 129 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 130 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 131 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 132 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 133 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 134 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 135 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 136 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 137 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 138 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 139 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 140 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 141 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 142 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 143 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 144 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 145 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 146 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 147 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 148 ) ); - scriptArg.push_back( exdData->getField< uint32_t >( row, 149 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1222 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1223 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1224 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1225 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1226 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1227 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1228 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1229 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1230 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1231 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1232 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1233 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1234 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1235 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1236 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1237 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1238 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1239 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1240 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1241 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1242 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1243 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1244 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1245 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1246 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1247 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1248 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1249 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1250 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1251 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1252 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1253 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1254 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1255 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1256 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1257 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1258 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1259 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1260 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1261 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1262 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1263 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1264 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1265 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1266 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1267 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1268 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1269 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1270 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1271 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1272 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1273 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1274 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1275 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1276 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1277 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1278 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1279 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1280 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1281 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1282 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1283 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1284 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1285 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1286 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1287 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1288 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1289 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1290 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1291 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1292 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1293 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1294 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1295 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1296 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1297 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1298 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1299 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1300 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1301 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1302 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1303 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1304 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1305 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1306 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1307 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1308 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1309 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1310 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1311 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1312 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1313 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1314 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1315 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1316 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1317 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1318 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1319 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1320 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1321 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1322 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1323 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1324 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1325 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1326 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1327 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1328 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1329 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1330 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1331 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1332 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1333 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1334 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1335 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1336 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1337 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1338 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1339 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1340 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1341 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1342 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1343 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1344 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1345 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1346 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1347 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1348 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1349 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1350 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1351 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1352 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1353 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1354 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1355 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1356 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1357 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1358 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1359 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1360 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1361 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1362 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1363 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1364 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1365 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1366 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1367 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1368 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1369 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1370 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1371 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1372 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1373 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1374 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1375 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1376 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1377 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1378 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1379 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1380 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1381 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1382 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1383 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1384 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1385 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1386 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1387 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1388 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1389 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1390 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1391 ) ); - level.push_back( exdData->getField< uint32_t >( row, 1392 ) ); - classJobRequired = exdData->getField< uint8_t >( row, 1438 ); - expFactor = exdData->getField< uint16_t >( row, 1440 ); - gilReward = exdData->getField< uint32_t >( row, 1441 ); - gCSeals = exdData->getField< uint16_t >( row, 1443 ); - itemCatalyst.push_back( exdData->getField< uint8_t >( row, 1444 ) ); - itemCatalyst.push_back( exdData->getField< uint8_t >( row, 1445 ) ); - itemCatalyst.push_back( exdData->getField< uint8_t >( row, 1446 ) ); - itemCountCatalyst.push_back( exdData->getField< uint8_t >( row, 1447 ) ); - itemCountCatalyst.push_back( exdData->getField< uint8_t >( row, 1448 ) ); - itemCountCatalyst.push_back( exdData->getField< uint8_t >( row, 1449 ) ); - itemRewardType = exdData->getField< uint8_t >( row, 1450 ); - itemReward0.push_back( exdData->getField< uint32_t >( row, 1451 ) ); - itemReward0.push_back( exdData->getField< uint32_t >( row, 1452 ) ); - itemReward0.push_back( exdData->getField< uint32_t >( row, 1453 ) ); - itemReward0.push_back( exdData->getField< uint32_t >( row, 1454 ) ); - itemReward0.push_back( exdData->getField< uint32_t >( row, 1455 ) ); - itemReward0.push_back( exdData->getField< uint32_t >( row, 1456 ) ); - itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1458 ) ); - itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1459 ) ); - itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1460 ) ); - itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1461 ) ); - itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1462 ) ); - itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1463 ) ); - stainReward0.push_back( exdData->getField< uint8_t >( row, 1465 ) ); - stainReward0.push_back( exdData->getField< uint8_t >( row, 1466 ) ); - stainReward0.push_back( exdData->getField< uint8_t >( row, 1467 ) ); - stainReward0.push_back( exdData->getField< uint8_t >( row, 1468 ) ); - stainReward0.push_back( exdData->getField< uint8_t >( row, 1469 ) ); - stainReward0.push_back( exdData->getField< uint8_t >( row, 1470 ) ); - itemReward1.push_back( exdData->getField< uint32_t >( row, 1472 ) ); - itemReward1.push_back( exdData->getField< uint32_t >( row, 1473 ) ); - itemReward1.push_back( exdData->getField< uint32_t >( row, 1474 ) ); - itemReward1.push_back( exdData->getField< uint32_t >( row, 1475 ) ); - itemReward1.push_back( exdData->getField< uint32_t >( row, 1476 ) ); - itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1477 ) ); - itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1478 ) ); - itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1479 ) ); - itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1480 ) ); - itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1481 ) ); - isHQReward1.push_back( exdData->getField< bool >( row, 1482 ) ); - isHQReward1.push_back( exdData->getField< bool >( row, 1483 ) ); - isHQReward1.push_back( exdData->getField< bool >( row, 1484 ) ); - isHQReward1.push_back( exdData->getField< bool >( row, 1485 ) ); - isHQReward1.push_back( exdData->getField< bool >( row, 1486 ) ); - stainReward1.push_back( exdData->getField< uint8_t >( row, 1487 ) ); - stainReward1.push_back( exdData->getField< uint8_t >( row, 1488 ) ); - stainReward1.push_back( exdData->getField< uint8_t >( row, 1489 ) ); - stainReward1.push_back( exdData->getField< uint8_t >( row, 1490 ) ); - stainReward1.push_back( exdData->getField< uint8_t >( row, 1491 ) ); - emoteReward = exdData->getField< uint8_t >( row, 1492 ); - actionReward = exdData->getField< uint16_t >( row, 1493 ); - generalActionReward.push_back( exdData->getField< uint8_t >( row, 1494 ) ); - generalActionReward.push_back( exdData->getField< uint8_t >( row, 1495 ) ); - otherReward = exdData->getField< uint8_t >( row, 1497 ); - instanceContentUnlock = exdData->getField< uint32_t >( row, 1500 ); - tomestoneReward = exdData->getField< uint8_t >( row, 1502 ); - tomestoneCountReward = exdData->getField< uint8_t >( row, 1503 ); - reputationReward = exdData->getField< uint8_t >( row, 1504 ); - placeName = exdData->getField< uint16_t >( row, 1505 ); - journalGenre = exdData->getField< uint8_t >( row, 1506 ); - icon = exdData->getField< uint32_t >( row, 1508 ); - iconSpecial = exdData->getField< uint32_t >( row, 1509 ); - eventIconType = exdData->getField< uint8_t >( row, 1512 ); - sortKey = exdData->getField< uint16_t >( row, 1514 ); + auto row = exdData->m_QuestDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + id = exdData->getField< std::string >( row, 1 ); + expansion = exdData->getField< uint8_t >( row, 2 ); + classJobCategory0 = exdData->getField< uint8_t >( row, 3 ); + classJobLevel0 = exdData->getField< uint16_t >( row, 4 ); + questLevelOffset = exdData->getField< uint8_t >( row, 5 ); + classJobCategory1 = exdData->getField< uint8_t >( row, 7 ); + classJobLevel1 = exdData->getField< uint16_t >( row, 8 ); + previousQuestJoin = exdData->getField< uint8_t >( row, 9 ); + previousQuest0 = exdData->getField< uint32_t >( row, 10 ); + previousQuest1 = exdData->getField< uint32_t >( row, 12 ); + previousQuest2 = exdData->getField< uint32_t >( row, 13 ); + questLockJoin = exdData->getField< uint8_t >( row, 14 ); + questLock.push_back( exdData->getField< uint32_t >( row, 15 ) ); + questLock.push_back( exdData->getField< uint32_t >( row, 16 ) ); + classJobUnlock = exdData->getField< uint8_t >( row, 20 ); + grandCompany = exdData->getField< uint8_t >( row, 21 ); + grandCompanyRank = exdData->getField< uint8_t >( row, 22 ); + instanceContentJoin = exdData->getField< uint8_t >( row, 23 ); + instanceContent.push_back( exdData->getField< uint32_t >( row, 24 ) ); + instanceContent.push_back( exdData->getField< uint32_t >( row, 25 ) ); + instanceContent.push_back( exdData->getField< uint32_t >( row, 26 ) ); + bellStart = exdData->getField< uint16_t >( row, 30 ); + bellEnd = exdData->getField< uint16_t >( row, 31 ); + beastTribe = exdData->getField< uint8_t >( row, 32 ); + beastReputationRank = exdData->getField< uint8_t >( row, 33 ); + mountRequired = exdData->getField< int32_t >( row, 37 ); + isHouseRequired = exdData->getField< bool >( row, 38 ); + eNpcResidentStart = exdData->getField< uint32_t >( row, 40 ); + eNpcResidentEnd = exdData->getField< uint32_t >( row, 42 ); + isRepeatable = exdData->getField< bool >( row, 43 ); + repeatIntervalType = exdData->getField< uint8_t >( row, 44 ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 50 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 51 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 52 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 53 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 54 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 55 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 56 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 57 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 58 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 59 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 60 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 61 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 62 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 63 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 64 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 65 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 66 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 67 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 68 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 69 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 70 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 71 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 72 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 73 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 74 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 75 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 76 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 77 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 78 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 79 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 80 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 81 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 82 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 83 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 84 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 85 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 86 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 87 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 88 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 89 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 90 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 91 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 92 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 93 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 94 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 95 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 96 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 97 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 98 ) ); + scriptInstruction.push_back( exdData->getField< std::string >( row, 99 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 100 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 101 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 102 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 103 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 104 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 105 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 106 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 107 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 108 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 109 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 110 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 111 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 112 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 113 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 114 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 115 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 116 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 117 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 118 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 119 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 120 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 121 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 122 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 123 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 124 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 125 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 126 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 127 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 128 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 129 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 130 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 131 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 132 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 133 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 134 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 135 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 136 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 137 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 138 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 139 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 140 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 141 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 142 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 143 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 144 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 145 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 146 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 147 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 148 ) ); + scriptArg.push_back( exdData->getField< uint32_t >( row, 149 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1222 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1223 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1224 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1225 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1226 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1227 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1228 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1229 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1230 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1231 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1232 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1233 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1234 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1235 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1236 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1237 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1238 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1239 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1240 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1241 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1242 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1243 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1244 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1245 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1246 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1247 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1248 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1249 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1250 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1251 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1252 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1253 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1254 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1255 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1256 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1257 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1258 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1259 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1260 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1261 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1262 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1263 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1264 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1265 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1266 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1267 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1268 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1269 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1270 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1271 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1272 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1273 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1274 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1275 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1276 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1277 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1278 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1279 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1280 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1281 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1282 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1283 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1284 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1285 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1286 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1287 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1288 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1289 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1290 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1291 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1292 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1293 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1294 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1295 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1296 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1297 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1298 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1299 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1300 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1301 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1302 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1303 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1304 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1305 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1306 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1307 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1308 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1309 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1310 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1311 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1312 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1313 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1314 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1315 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1316 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1317 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1318 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1319 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1320 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1321 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1322 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1323 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1324 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1325 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1326 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1327 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1328 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1329 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1330 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1331 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1332 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1333 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1334 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1335 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1336 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1337 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1338 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1339 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1340 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1341 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1342 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1343 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1344 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1345 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1346 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1347 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1348 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1349 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1350 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1351 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1352 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1353 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1354 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1355 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1356 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1357 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1358 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1359 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1360 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1361 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1362 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1363 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1364 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1365 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1366 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1367 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1368 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1369 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1370 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1371 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1372 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1373 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1374 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1375 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1376 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1377 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1378 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1379 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1380 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1381 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1382 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1383 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1384 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1385 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1386 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1387 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1388 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1389 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1390 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1391 ) ); + level.push_back( exdData->getField< uint32_t >( row, 1392 ) ); + classJobRequired = exdData->getField< uint8_t >( row, 1438 ); + expFactor = exdData->getField< uint16_t >( row, 1440 ); + gilReward = exdData->getField< uint32_t >( row, 1441 ); + gCSeals = exdData->getField< uint16_t >( row, 1443 ); + itemCatalyst.push_back( exdData->getField< uint8_t >( row, 1444 ) ); + itemCatalyst.push_back( exdData->getField< uint8_t >( row, 1445 ) ); + itemCatalyst.push_back( exdData->getField< uint8_t >( row, 1446 ) ); + itemCountCatalyst.push_back( exdData->getField< uint8_t >( row, 1447 ) ); + itemCountCatalyst.push_back( exdData->getField< uint8_t >( row, 1448 ) ); + itemCountCatalyst.push_back( exdData->getField< uint8_t >( row, 1449 ) ); + itemRewardType = exdData->getField< uint8_t >( row, 1450 ); + itemReward0.push_back( exdData->getField< uint32_t >( row, 1451 ) ); + itemReward0.push_back( exdData->getField< uint32_t >( row, 1452 ) ); + itemReward0.push_back( exdData->getField< uint32_t >( row, 1453 ) ); + itemReward0.push_back( exdData->getField< uint32_t >( row, 1454 ) ); + itemReward0.push_back( exdData->getField< uint32_t >( row, 1455 ) ); + itemReward0.push_back( exdData->getField< uint32_t >( row, 1456 ) ); + itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1458 ) ); + itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1459 ) ); + itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1460 ) ); + itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1461 ) ); + itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1462 ) ); + itemCountReward0.push_back( exdData->getField< uint8_t >( row, 1463 ) ); + stainReward0.push_back( exdData->getField< uint8_t >( row, 1465 ) ); + stainReward0.push_back( exdData->getField< uint8_t >( row, 1466 ) ); + stainReward0.push_back( exdData->getField< uint8_t >( row, 1467 ) ); + stainReward0.push_back( exdData->getField< uint8_t >( row, 1468 ) ); + stainReward0.push_back( exdData->getField< uint8_t >( row, 1469 ) ); + stainReward0.push_back( exdData->getField< uint8_t >( row, 1470 ) ); + itemReward1.push_back( exdData->getField< uint32_t >( row, 1472 ) ); + itemReward1.push_back( exdData->getField< uint32_t >( row, 1473 ) ); + itemReward1.push_back( exdData->getField< uint32_t >( row, 1474 ) ); + itemReward1.push_back( exdData->getField< uint32_t >( row, 1475 ) ); + itemReward1.push_back( exdData->getField< uint32_t >( row, 1476 ) ); + itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1477 ) ); + itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1478 ) ); + itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1479 ) ); + itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1480 ) ); + itemCountReward1.push_back( exdData->getField< uint8_t >( row, 1481 ) ); + isHQReward1.push_back( exdData->getField< bool >( row, 1482 ) ); + isHQReward1.push_back( exdData->getField< bool >( row, 1483 ) ); + isHQReward1.push_back( exdData->getField< bool >( row, 1484 ) ); + isHQReward1.push_back( exdData->getField< bool >( row, 1485 ) ); + isHQReward1.push_back( exdData->getField< bool >( row, 1486 ) ); + stainReward1.push_back( exdData->getField< uint8_t >( row, 1487 ) ); + stainReward1.push_back( exdData->getField< uint8_t >( row, 1488 ) ); + stainReward1.push_back( exdData->getField< uint8_t >( row, 1489 ) ); + stainReward1.push_back( exdData->getField< uint8_t >( row, 1490 ) ); + stainReward1.push_back( exdData->getField< uint8_t >( row, 1491 ) ); + emoteReward = exdData->getField< uint8_t >( row, 1492 ); + actionReward = exdData->getField< uint16_t >( row, 1493 ); + generalActionReward.push_back( exdData->getField< uint8_t >( row, 1494 ) ); + generalActionReward.push_back( exdData->getField< uint8_t >( row, 1495 ) ); + otherReward = exdData->getField< uint8_t >( row, 1497 ); + instanceContentUnlock = exdData->getField< uint32_t >( row, 1500 ); + tomestoneReward = exdData->getField< uint8_t >( row, 1502 ); + tomestoneCountReward = exdData->getField< uint8_t >( row, 1503 ); + reputationReward = exdData->getField< uint8_t >( row, 1504 ); + placeName = exdData->getField< uint16_t >( row, 1505 ); + journalGenre = exdData->getField< uint8_t >( row, 1506 ); + icon = exdData->getField< uint32_t >( row, 1508 ); + iconSpecial = exdData->getField< uint32_t >( row, 1509 ); + eventIconType = exdData->getField< uint8_t >( row, 1512 ); + sortKey = exdData->getField< uint16_t >( row, 1514 ); } Core::Data::QuestClassJobReward::QuestClassJobReward( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_QuestClassJobRewardDat.get_row( row_id ); - classJobCategory = exdData->getField< uint8_t >( row, 0 ); - rewardItem.push_back( exdData->getField< uint32_t >( row, 1 ) ); - rewardItem.push_back( exdData->getField< uint32_t >( row, 2 ) ); - rewardItem.push_back( exdData->getField< uint32_t >( row, 3 ) ); - rewardItem.push_back( exdData->getField< uint32_t >( row, 4 ) ); - rewardAmount.push_back( exdData->getField< uint8_t >( row, 5 ) ); - rewardAmount.push_back( exdData->getField< uint8_t >( row, 6 ) ); - rewardAmount.push_back( exdData->getField< uint8_t >( row, 7 ) ); - rewardAmount.push_back( exdData->getField< uint8_t >( row, 8 ) ); - requiredItem.push_back( exdData->getField< uint32_t >( row, 9 ) ); - requiredItem.push_back( exdData->getField< uint32_t >( row, 10 ) ); - requiredItem.push_back( exdData->getField< uint32_t >( row, 11 ) ); - requiredItem.push_back( exdData->getField< uint32_t >( row, 12 ) ); - requiredAmount.push_back( exdData->getField< uint8_t >( row, 13 ) ); - requiredAmount.push_back( exdData->getField< uint8_t >( row, 14 ) ); - requiredAmount.push_back( exdData->getField< uint8_t >( row, 15 ) ); - requiredAmount.push_back( exdData->getField< uint8_t >( row, 16 ) ); + auto row = exdData->m_QuestClassJobRewardDat.get_row( row_id ); + classJobCategory = exdData->getField< uint8_t >( row, 0 ); + rewardItem.push_back( exdData->getField< uint32_t >( row, 1 ) ); + rewardItem.push_back( exdData->getField< uint32_t >( row, 2 ) ); + rewardItem.push_back( exdData->getField< uint32_t >( row, 3 ) ); + rewardItem.push_back( exdData->getField< uint32_t >( row, 4 ) ); + rewardAmount.push_back( exdData->getField< uint8_t >( row, 5 ) ); + rewardAmount.push_back( exdData->getField< uint8_t >( row, 6 ) ); + rewardAmount.push_back( exdData->getField< uint8_t >( row, 7 ) ); + rewardAmount.push_back( exdData->getField< uint8_t >( row, 8 ) ); + requiredItem.push_back( exdData->getField< uint32_t >( row, 9 ) ); + requiredItem.push_back( exdData->getField< uint32_t >( row, 10 ) ); + requiredItem.push_back( exdData->getField< uint32_t >( row, 11 ) ); + requiredItem.push_back( exdData->getField< uint32_t >( row, 12 ) ); + requiredAmount.push_back( exdData->getField< uint8_t >( row, 13 ) ); + requiredAmount.push_back( exdData->getField< uint8_t >( row, 14 ) ); + requiredAmount.push_back( exdData->getField< uint8_t >( row, 15 ) ); + requiredAmount.push_back( exdData->getField< uint8_t >( row, 16 ) ); } Core::Data::QuestRepeatFlag::QuestRepeatFlag( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_QuestRepeatFlagDat.get_row( row_id ); - quest = exdData->getField< uint32_t >( row, 0 ); + auto row = exdData->m_QuestRepeatFlagDat.get_row( row_id ); + quest = exdData->getField< uint32_t >( row, 0 ); } Core::Data::QuestRewardOther::QuestRewardOther( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_QuestRewardOtherDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_QuestRewardOtherDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::QuickChat::QuickChat( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_QuickChatDat.get_row( row_id ); - nameAction = exdData->getField< std::string >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); - addon = exdData->getField< int32_t >( row, 2 ); - quickChatTransient = exdData->getField< int8_t >( row, 3 ); + auto row = exdData->m_QuickChatDat.get_row( row_id ); + nameAction = exdData->getField< std::string >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); + addon = exdData->getField< int32_t >( row, 2 ); + quickChatTransient = exdData->getField< int8_t >( row, 3 ); } Core::Data::QuickChatTransient::QuickChatTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_QuickChatTransientDat.get_row( row_id ); - textOutput = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_QuickChatTransientDat.get_row( row_id ); + textOutput = exdData->getField< std::string >( row, 0 ); } Core::Data::Race::Race( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RaceDat.get_row( row_id ); - masculine = exdData->getField< std::string >( row, 0 ); - feminine = exdData->getField< std::string >( row, 1 ); - rSEMBody = exdData->getField< int32_t >( row, 2 ); - rSEMHands = exdData->getField< int32_t >( row, 3 ); - rSEMLegs = exdData->getField< int32_t >( row, 4 ); - rSEMFeet = exdData->getField< int32_t >( row, 5 ); - rSEFBody = exdData->getField< int32_t >( row, 6 ); - rSEFHands = exdData->getField< int32_t >( row, 7 ); - rSEFLegs = exdData->getField< int32_t >( row, 8 ); - rSEFFeet = exdData->getField< int32_t >( row, 9 ); + auto row = exdData->m_RaceDat.get_row( row_id ); + masculine = exdData->getField< std::string >( row, 0 ); + feminine = exdData->getField< std::string >( row, 1 ); + rSEMBody = exdData->getField< int32_t >( row, 2 ); + rSEMHands = exdData->getField< int32_t >( row, 3 ); + rSEMLegs = exdData->getField< int32_t >( row, 4 ); + rSEMFeet = exdData->getField< int32_t >( row, 5 ); + rSEFBody = exdData->getField< int32_t >( row, 6 ); + rSEFHands = exdData->getField< int32_t >( row, 7 ); + rSEFLegs = exdData->getField< int32_t >( row, 8 ); + rSEFFeet = exdData->getField< int32_t >( row, 9 ); } Core::Data::RacingChocoboItem::RacingChocoboItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RacingChocoboItemDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - category = exdData->getField< uint8_t >( row, 1 ); - param.push_back( exdData->getField< uint8_t >( row, 2 ) ); - param.push_back( exdData->getField< uint8_t >( row, 3 ) ); + auto row = exdData->m_RacingChocoboItemDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + category = exdData->getField< uint8_t >( row, 1 ); + param.push_back( exdData->getField< uint8_t >( row, 2 ) ); + param.push_back( exdData->getField< uint8_t >( row, 3 ) ); } Core::Data::RacingChocoboName::RacingChocoboName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RacingChocoboNameDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_RacingChocoboNameDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } -Core::Data::RacingChocoboNameCategory::RacingChocoboNameCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::RacingChocoboNameCategory::RacingChocoboNameCategory( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RacingChocoboNameCategoryDat.get_row( row_id ); - sortKey = exdData->getField< uint8_t >( row, 0 ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_RacingChocoboNameCategoryDat.get_row( row_id ); + sortKey = exdData->getField< uint8_t >( row, 0 ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::RacingChocoboNameInfo::RacingChocoboNameInfo( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RacingChocoboNameInfoDat.get_row( row_id ); - racingChocoboNameCategory = exdData->getField< uint8_t >( row, 0 ); + auto row = exdData->m_RacingChocoboNameInfoDat.get_row( row_id ); + racingChocoboNameCategory = exdData->getField< uint8_t >( row, 0 ); } Core::Data::RacingChocoboParam::RacingChocoboParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RacingChocoboParamDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_RacingChocoboParamDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Recipe::Recipe( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RecipeDat.get_row( row_id ); - craftType = exdData->getField< int32_t >( row, 1 ); - recipeLevelTable = exdData->getField< uint16_t >( row, 2 ); - itemResult = exdData->getField< int32_t >( row, 3 ); - amountResult = exdData->getField< uint8_t >( row, 4 ); - recipeElement = exdData->getField< uint8_t >( row, 25 ); - isSecondary = exdData->getField< bool >( row, 27 ); - difficultyFactor = exdData->getField< uint16_t >( row, 28 ); - qualityFactor = exdData->getField< uint16_t >( row, 29 ); - durabilityFactor = exdData->getField< uint16_t >( row, 30 ); - requiredCraftsmanship = exdData->getField< uint16_t >( row, 32 ); - requiredControl = exdData->getField< uint16_t >( row, 33 ); - quickSynthCraftsmanship = exdData->getField< uint16_t >( row, 34 ); - quickSynthControl = exdData->getField< uint16_t >( row, 35 ); - secretRecipeBook = exdData->getField< uint16_t >( row, 36 ); - canQuickSynth = exdData->getField< bool >( row, 37 ); - canHq = exdData->getField< bool >( row, 38 ); - expRewarded = exdData->getField< bool >( row, 39 ); - statusRequired = exdData->getField< int32_t >( row, 40 ); - itemRequired = exdData->getField< int32_t >( row, 41 ); - isSpecializationRequired = exdData->getField< bool >( row, 42 ); + auto row = exdData->m_RecipeDat.get_row( row_id ); + craftType = exdData->getField< int32_t >( row, 1 ); + recipeLevelTable = exdData->getField< uint16_t >( row, 2 ); + itemResult = exdData->getField< int32_t >( row, 3 ); + amountResult = exdData->getField< uint8_t >( row, 4 ); + recipeElement = exdData->getField< uint8_t >( row, 25 ); + isSecondary = exdData->getField< bool >( row, 27 ); + difficultyFactor = exdData->getField< uint16_t >( row, 28 ); + qualityFactor = exdData->getField< uint16_t >( row, 29 ); + durabilityFactor = exdData->getField< uint16_t >( row, 30 ); + requiredCraftsmanship = exdData->getField< uint16_t >( row, 32 ); + requiredControl = exdData->getField< uint16_t >( row, 33 ); + quickSynthCraftsmanship = exdData->getField< uint16_t >( row, 34 ); + quickSynthControl = exdData->getField< uint16_t >( row, 35 ); + secretRecipeBook = exdData->getField< uint16_t >( row, 36 ); + canQuickSynth = exdData->getField< bool >( row, 37 ); + canHq = exdData->getField< bool >( row, 38 ); + expRewarded = exdData->getField< bool >( row, 39 ); + statusRequired = exdData->getField< int32_t >( row, 40 ); + itemRequired = exdData->getField< int32_t >( row, 41 ); + isSpecializationRequired = exdData->getField< bool >( row, 42 ); } Core::Data::RecipeElement::RecipeElement( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RecipeElementDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_RecipeElementDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::RecipeLevelTable::RecipeLevelTable( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RecipeLevelTableDat.get_row( row_id ); - classJobLevel = exdData->getField< uint8_t >( row, 0 ); - stars = exdData->getField< uint8_t >( row, 1 ); - difficulty = exdData->getField< uint16_t >( row, 3 ); - quality = exdData->getField< int16_t >( row, 4 ); - durability = exdData->getField< uint16_t >( row, 5 ); + auto row = exdData->m_RecipeLevelTableDat.get_row( row_id ); + classJobLevel = exdData->getField< uint8_t >( row, 0 ); + stars = exdData->getField< uint8_t >( row, 1 ); + difficulty = exdData->getField< uint16_t >( row, 3 ); + quality = exdData->getField< int16_t >( row, 4 ); + durability = exdData->getField< uint16_t >( row, 5 ); } Core::Data::RecipeNotebookList::RecipeNotebookList( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RecipeNotebookListDat.get_row( row_id ); - recipe.push_back( exdData->getField< int32_t >( row, 1 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 2 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 3 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 4 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 5 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 6 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 7 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 8 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 9 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 10 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 11 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 12 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 13 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 14 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 15 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 16 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 17 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 18 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 19 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 20 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 21 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 22 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 23 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 24 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 25 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 26 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 27 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 28 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 29 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 30 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 31 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 32 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 33 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 34 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 35 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 36 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 37 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 38 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 39 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 40 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 41 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 42 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 43 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 44 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 45 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 46 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 47 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 48 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 49 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 50 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 51 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 52 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 53 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 54 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 55 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 56 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 57 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 58 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 59 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 60 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 61 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 62 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 63 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 64 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 65 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 66 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 67 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 68 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 69 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 70 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 71 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 72 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 73 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 74 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 75 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 76 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 77 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 78 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 79 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 80 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 81 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 82 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 83 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 84 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 85 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 86 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 87 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 88 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 89 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 90 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 91 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 92 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 93 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 94 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 95 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 96 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 97 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 98 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 99 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 100 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 101 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 102 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 103 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 104 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 105 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 106 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 107 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 108 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 109 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 110 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 111 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 112 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 113 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 114 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 115 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 116 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 117 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 118 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 119 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 120 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 121 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 122 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 123 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 124 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 125 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 126 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 127 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 128 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 129 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 130 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 131 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 132 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 133 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 134 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 135 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 136 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 137 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 138 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 139 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 140 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 141 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 142 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 143 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 144 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 145 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 146 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 147 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 148 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 149 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 150 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 151 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 152 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 153 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 154 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 155 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 156 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 157 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 158 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 159 ) ); - recipe.push_back( exdData->getField< int32_t >( row, 160 ) ); + auto row = exdData->m_RecipeNotebookListDat.get_row( row_id ); + recipe.push_back( exdData->getField< int32_t >( row, 1 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 2 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 3 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 4 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 5 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 6 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 7 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 8 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 9 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 10 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 11 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 12 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 13 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 14 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 15 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 16 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 17 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 18 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 19 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 20 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 21 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 22 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 23 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 24 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 25 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 26 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 27 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 28 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 29 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 30 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 31 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 32 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 33 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 34 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 35 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 36 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 37 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 38 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 39 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 40 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 41 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 42 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 43 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 44 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 45 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 46 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 47 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 48 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 49 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 50 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 51 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 52 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 53 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 54 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 55 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 56 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 57 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 58 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 59 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 60 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 61 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 62 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 63 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 64 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 65 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 66 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 67 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 68 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 69 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 70 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 71 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 72 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 73 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 74 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 75 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 76 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 77 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 78 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 79 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 80 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 81 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 82 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 83 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 84 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 85 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 86 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 87 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 88 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 89 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 90 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 91 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 92 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 93 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 94 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 95 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 96 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 97 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 98 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 99 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 100 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 101 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 102 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 103 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 104 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 105 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 106 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 107 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 108 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 109 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 110 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 111 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 112 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 113 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 114 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 115 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 116 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 117 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 118 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 119 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 120 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 121 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 122 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 123 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 124 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 125 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 126 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 127 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 128 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 129 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 130 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 131 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 132 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 133 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 134 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 135 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 136 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 137 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 138 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 139 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 140 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 141 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 142 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 143 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 144 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 145 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 146 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 147 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 148 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 149 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 150 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 151 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 152 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 153 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 154 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 155 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 156 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 157 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 158 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 159 ) ); + recipe.push_back( exdData->getField< int32_t >( row, 160 ) ); } Core::Data::RecommendContents::RecommendContents( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RecommendContentsDat.get_row( row_id ); - level = exdData->getField< int32_t >( row, 0 ); + auto row = exdData->m_RecommendContentsDat.get_row( row_id ); + level = exdData->getField< int32_t >( row, 0 ); } Core::Data::Relic::Relic( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RelicDat.get_row( row_id ); - itemAtma = exdData->getField< uint32_t >( row, 0 ); - itemAnimus = exdData->getField< uint32_t >( row, 1 ); - icon = exdData->getField< int32_t >( row, 2 ); + auto row = exdData->m_RelicDat.get_row( row_id ); + itemAtma = exdData->getField< uint32_t >( row, 0 ); + itemAnimus = exdData->getField< uint32_t >( row, 1 ); + icon = exdData->getField< int32_t >( row, 2 ); } Core::Data::Relic3::Relic3( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_Relic3Dat.get_row( row_id ); - itemAnimus = exdData->getField< uint32_t >( row, 0 ); - itemScroll = exdData->getField< uint32_t >( row, 1 ); - materiaLimit = exdData->getField< uint8_t >( row, 2 ); - itemNovus = exdData->getField< uint32_t >( row, 3 ); - icon = exdData->getField< int32_t >( row, 4 ); + auto row = exdData->m_Relic3Dat.get_row( row_id ); + itemAnimus = exdData->getField< uint32_t >( row, 0 ); + itemScroll = exdData->getField< uint32_t >( row, 1 ); + materiaLimit = exdData->getField< uint8_t >( row, 2 ); + itemNovus = exdData->getField< uint32_t >( row, 3 ); + icon = exdData->getField< int32_t >( row, 4 ); } Core::Data::RelicItem::RelicItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RelicItemDat.get_row( row_id ); - gladiatorItem = exdData->getField< uint32_t >( row, 1 ); - pugilistItem = exdData->getField< uint32_t >( row, 2 ); - marauderItem = exdData->getField< uint32_t >( row, 3 ); - lancerItem = exdData->getField< uint32_t >( row, 4 ); - archerItem = exdData->getField< uint32_t >( row, 5 ); - conjurerItem = exdData->getField< uint32_t >( row, 6 ); - thaumaturgeItem = exdData->getField< uint32_t >( row, 7 ); - arcanistSMNItem = exdData->getField< uint32_t >( row, 8 ); - arcanistSCHItem = exdData->getField< uint32_t >( row, 9 ); - shieldItem = exdData->getField< uint32_t >( row, 10 ); - rogueItem = exdData->getField< uint32_t >( row, 11 ); + auto row = exdData->m_RelicItemDat.get_row( row_id ); + gladiatorItem = exdData->getField< uint32_t >( row, 1 ); + pugilistItem = exdData->getField< uint32_t >( row, 2 ); + marauderItem = exdData->getField< uint32_t >( row, 3 ); + lancerItem = exdData->getField< uint32_t >( row, 4 ); + archerItem = exdData->getField< uint32_t >( row, 5 ); + conjurerItem = exdData->getField< uint32_t >( row, 6 ); + thaumaturgeItem = exdData->getField< uint32_t >( row, 7 ); + arcanistSMNItem = exdData->getField< uint32_t >( row, 8 ); + arcanistSCHItem = exdData->getField< uint32_t >( row, 9 ); + shieldItem = exdData->getField< uint32_t >( row, 10 ); + rogueItem = exdData->getField< uint32_t >( row, 11 ); } Core::Data::RelicNote::RelicNote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RelicNoteDat.get_row( row_id ); - eventItem = exdData->getField< uint32_t >( row, 0 ); - monsterNoteTargetNM.push_back( exdData->getField< uint16_t >( row, 21 ) ); - monsterNoteTargetNM.push_back( exdData->getField< uint16_t >( row, 22 ) ); - monsterNoteTargetNM.push_back( exdData->getField< uint16_t >( row, 23 ) ); - leve.push_back( exdData->getField< uint16_t >( row, 31 ) ); - leve.push_back( exdData->getField< uint16_t >( row, 32 ) ); - leve.push_back( exdData->getField< uint16_t >( row, 33 ) ); + auto row = exdData->m_RelicNoteDat.get_row( row_id ); + eventItem = exdData->getField< uint32_t >( row, 0 ); + monsterNoteTargetNM.push_back( exdData->getField< uint16_t >( row, 21 ) ); + monsterNoteTargetNM.push_back( exdData->getField< uint16_t >( row, 22 ) ); + monsterNoteTargetNM.push_back( exdData->getField< uint16_t >( row, 23 ) ); + leve.push_back( exdData->getField< uint16_t >( row, 31 ) ); + leve.push_back( exdData->getField< uint16_t >( row, 32 ) ); + leve.push_back( exdData->getField< uint16_t >( row, 33 ) ); } Core::Data::RelicNoteCategory::RelicNoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RelicNoteCategoryDat.get_row( row_id ); - text = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_RelicNoteCategoryDat.get_row( row_id ); + text = exdData->getField< std::string >( row, 1 ); } Core::Data::RetainerTask::RetainerTask( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RetainerTaskDat.get_row( row_id ); - isRandom = exdData->getField< bool >( row, 0 ); - classJobCategory = exdData->getField< uint8_t >( row, 1 ); - retainerLevel = exdData->getField< uint8_t >( row, 2 ); - retainerTaskParameter = exdData->getField< uint16_t >( row, 4 ); - ventureCost = exdData->getField< uint16_t >( row, 5 ); - maxTimemin = exdData->getField< uint16_t >( row, 6 ); - experience = exdData->getField< int32_t >( row, 7 ); - requiredItemLevel = exdData->getField< uint16_t >( row, 8 ); - requiredGathering = exdData->getField< uint16_t >( row, 11 ); - task = exdData->getField< uint16_t >( row, 13 ); + auto row = exdData->m_RetainerTaskDat.get_row( row_id ); + isRandom = exdData->getField< bool >( row, 0 ); + classJobCategory = exdData->getField< uint8_t >( row, 1 ); + retainerLevel = exdData->getField< uint8_t >( row, 2 ); + retainerTaskParameter = exdData->getField< uint16_t >( row, 4 ); + ventureCost = exdData->getField< uint16_t >( row, 5 ); + maxTimemin = exdData->getField< uint16_t >( row, 6 ); + experience = exdData->getField< int32_t >( row, 7 ); + requiredItemLevel = exdData->getField< uint16_t >( row, 8 ); + requiredGathering = exdData->getField< uint16_t >( row, 11 ); + task = exdData->getField< uint16_t >( row, 13 ); } Core::Data::RetainerTaskLvRange::RetainerTaskLvRange( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RetainerTaskLvRangeDat.get_row( row_id ); - min = exdData->getField< uint8_t >( row, 0 ); - max = exdData->getField< uint8_t >( row, 1 ); + auto row = exdData->m_RetainerTaskLvRangeDat.get_row( row_id ); + min = exdData->getField< uint8_t >( row, 0 ); + max = exdData->getField< uint8_t >( row, 1 ); } Core::Data::RetainerTaskNormal::RetainerTaskNormal( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RetainerTaskNormalDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - quantity0 = exdData->getField< uint8_t >( row, 1 ); - quantity1 = exdData->getField< uint8_t >( row, 2 ); - quantity2 = exdData->getField< uint8_t >( row, 3 ); - gatheringLog = exdData->getField< int16_t >( row, 4 ); - fishingLog = exdData->getField< int16_t >( row, 5 ); + auto row = exdData->m_RetainerTaskNormalDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + quantity0 = exdData->getField< uint8_t >( row, 1 ); + quantity1 = exdData->getField< uint8_t >( row, 2 ); + quantity2 = exdData->getField< uint8_t >( row, 3 ); + gatheringLog = exdData->getField< int16_t >( row, 4 ); + fishingLog = exdData->getField< int16_t >( row, 5 ); } Core::Data::RetainerTaskParameter::RetainerTaskParameter( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RetainerTaskParameterDat.get_row( row_id ); - itemLevelDoW.push_back( exdData->getField< int16_t >( row, 0 ) ); - itemLevelDoW.push_back( exdData->getField< int16_t >( row, 1 ) ); - gatheringDoL.push_back( exdData->getField< int16_t >( row, 2 ) ); - gatheringDoL.push_back( exdData->getField< int16_t >( row, 3 ) ); - gatheringFSH.push_back( exdData->getField< int16_t >( row, 4 ) ); - gatheringFSH.push_back( exdData->getField< int16_t >( row, 5 ) ); + auto row = exdData->m_RetainerTaskParameterDat.get_row( row_id ); + itemLevelDoW.push_back( exdData->getField< int16_t >( row, 0 ) ); + itemLevelDoW.push_back( exdData->getField< int16_t >( row, 1 ) ); + gatheringDoL.push_back( exdData->getField< int16_t >( row, 2 ) ); + gatheringDoL.push_back( exdData->getField< int16_t >( row, 3 ) ); + gatheringFSH.push_back( exdData->getField< int16_t >( row, 4 ) ); + gatheringFSH.push_back( exdData->getField< int16_t >( row, 5 ) ); } Core::Data::RetainerTaskRandom::RetainerTaskRandom( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_RetainerTaskRandomDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - requirement = exdData->getField< int16_t >( row, 1 ); + auto row = exdData->m_RetainerTaskRandomDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + requirement = exdData->getField< int16_t >( row, 1 ); } Core::Data::Salvage::Salvage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SalvageDat.get_row( row_id ); - optimalSkill = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_SalvageDat.get_row( row_id ); + optimalSkill = exdData->getField< uint16_t >( row, 0 ); } Core::Data::SatisfactionNpc::SatisfactionNpc( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SatisfactionNpcDat.get_row( row_id ); - npc = exdData->getField< int32_t >( row, 0 ); - questRequired = exdData->getField< int32_t >( row, 1 ); - deliveriesPerWeek = exdData->getField< uint8_t >( row, 3 ); - supplyIndex.push_back( exdData->getField< int32_t >( row, 4 ) ); - supplyIndex.push_back( exdData->getField< int32_t >( row, 5 ) ); - supplyIndex.push_back( exdData->getField< int32_t >( row, 6 ) ); - supplyIndex.push_back( exdData->getField< int32_t >( row, 7 ) ); - supplyIndex.push_back( exdData->getField< int32_t >( row, 8 ) ); - supplyIndex.push_back( exdData->getField< int32_t >( row, 9 ) ); - satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 10 ) ); - satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 11 ) ); - satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 12 ) ); - satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 13 ) ); - satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 14 ) ); - satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 15 ) ); - icon = exdData->getField< int32_t >( row, 70 ); + auto row = exdData->m_SatisfactionNpcDat.get_row( row_id ); + npc = exdData->getField< int32_t >( row, 0 ); + questRequired = exdData->getField< int32_t >( row, 1 ); + deliveriesPerWeek = exdData->getField< uint8_t >( row, 3 ); + supplyIndex.push_back( exdData->getField< int32_t >( row, 4 ) ); + supplyIndex.push_back( exdData->getField< int32_t >( row, 5 ) ); + supplyIndex.push_back( exdData->getField< int32_t >( row, 6 ) ); + supplyIndex.push_back( exdData->getField< int32_t >( row, 7 ) ); + supplyIndex.push_back( exdData->getField< int32_t >( row, 8 ) ); + supplyIndex.push_back( exdData->getField< int32_t >( row, 9 ) ); + satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 10 ) ); + satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 11 ) ); + satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 12 ) ); + satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 13 ) ); + satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 14 ) ); + satisfactionRequired.push_back( exdData->getField< uint16_t >( row, 15 ) ); + icon = exdData->getField< int32_t >( row, 70 ); } Core::Data::SatisfactionSupply::SatisfactionSupply( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SatisfactionSupplyDat.get_row( row_id ); - slot = exdData->getField< uint8_t >( row, 0 ); - probability = exdData->getField< uint8_t >( row, 1 ); - item = exdData->getField< int32_t >( row, 2 ); - collectabilityLow = exdData->getField< uint16_t >( row, 3 ); - collectabilityMid = exdData->getField< uint16_t >( row, 4 ); - collectabilityHigh = exdData->getField< uint16_t >( row, 5 ); - reward = exdData->getField< uint16_t >( row, 6 ); + auto row = exdData->m_SatisfactionSupplyDat.get_row( row_id ); + slot = exdData->getField< uint8_t >( row, 0 ); + probability = exdData->getField< uint8_t >( row, 1 ); + item = exdData->getField< int32_t >( row, 2 ); + collectabilityLow = exdData->getField< uint16_t >( row, 3 ); + collectabilityMid = exdData->getField< uint16_t >( row, 4 ); + collectabilityHigh = exdData->getField< uint16_t >( row, 5 ); + reward = exdData->getField< uint16_t >( row, 6 ); } Core::Data::SatisfactionSupplyReward::SatisfactionSupplyReward( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SatisfactionSupplyRewardDat.get_row( row_id ); - satisfactionLow = exdData->getField< uint16_t >( row, 10 ); - satisfactionMid = exdData->getField< uint16_t >( row, 11 ); - satisfactionHigh = exdData->getField< uint16_t >( row, 12 ); - gilLow = exdData->getField< uint16_t >( row, 13 ); - gilMid = exdData->getField< uint16_t >( row, 14 ); - gilHigh = exdData->getField< uint16_t >( row, 15 ); + auto row = exdData->m_SatisfactionSupplyRewardDat.get_row( row_id ); + satisfactionLow = exdData->getField< uint16_t >( row, 10 ); + satisfactionMid = exdData->getField< uint16_t >( row, 11 ); + satisfactionHigh = exdData->getField< uint16_t >( row, 12 ); + gilLow = exdData->getField< uint16_t >( row, 13 ); + gilMid = exdData->getField< uint16_t >( row, 14 ); + gilHigh = exdData->getField< uint16_t >( row, 15 ); } Core::Data::ScenarioTree::ScenarioTree( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ScenarioTreeDat.get_row( row_id ); - type = exdData->getField< uint8_t >( row, 0 ); - image = exdData->getField< uint16_t >( row, 1 ); + auto row = exdData->m_ScenarioTreeDat.get_row( row_id ); + type = exdData->getField< uint8_t >( row, 0 ); + image = exdData->getField< uint16_t >( row, 1 ); } Core::Data::ScenarioTreeTips::ScenarioTreeTips( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ScenarioTreeTipsDat.get_row( row_id ); - tips1 = exdData->getField< uint32_t >( row, 1 ); - tips2 = exdData->getField< uint32_t >( row, 3 ); + auto row = exdData->m_ScenarioTreeTipsDat.get_row( row_id ); + tips1 = exdData->getField< uint32_t >( row, 1 ); + tips2 = exdData->getField< uint32_t >( row, 3 ); } -Core::Data::ScenarioTreeTipsClassQuest::ScenarioTreeTipsClassQuest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) +Core::Data::ScenarioTreeTipsClassQuest::ScenarioTreeTipsClassQuest( uint32_t row_id, + Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ScenarioTreeTipsClassQuestDat.get_row( row_id ); - quest = exdData->getField< uint32_t >( row, 0 ); - requiredLevel = exdData->getField< uint16_t >( row, 1 ); - requiredExpansion = exdData->getField< uint8_t >( row, 2 ); - requiredQuest = exdData->getField< uint32_t >( row, 3 ); + auto row = exdData->m_ScenarioTreeTipsClassQuestDat.get_row( row_id ); + quest = exdData->getField< uint32_t >( row, 0 ); + requiredLevel = exdData->getField< uint16_t >( row, 1 ); + requiredExpansion = exdData->getField< uint8_t >( row, 2 ); + requiredQuest = exdData->getField< uint32_t >( row, 3 ); } Core::Data::ScenarioTreeTipsQuest::ScenarioTreeTipsQuest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ScenarioTreeTipsQuestDat.get_row( row_id ); - level = exdData->getField< uint32_t >( row, 0 ); + auto row = exdData->m_ScenarioTreeTipsQuestDat.get_row( row_id ); + level = exdData->getField< uint32_t >( row, 0 ); } Core::Data::ScenarioType::ScenarioType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ScenarioTypeDat.get_row( row_id ); - type = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_ScenarioTypeDat.get_row( row_id ); + type = exdData->getField< std::string >( row, 0 ); } Core::Data::ScreenImage::ScreenImage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ScreenImageDat.get_row( row_id ); - image = exdData->getField< uint32_t >( row, 0 ); + auto row = exdData->m_ScreenImageDat.get_row( row_id ); + image = exdData->getField< uint32_t >( row, 0 ); } Core::Data::SecretRecipeBook::SecretRecipeBook( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SecretRecipeBookDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - name = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_SecretRecipeBookDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + name = exdData->getField< std::string >( row, 1 ); } Core::Data::SkyIsland2Mission::SkyIsland2Mission( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SkyIsland2MissionDat.get_row( row_id ); - item1 = exdData->getField< uint32_t >( row, 0 ); - item2 = exdData->getField< uint32_t >( row, 1 ); - objective1 = exdData->getField< uint16_t >( row, 4 ); - requiredAmount1 = exdData->getField< uint8_t >( row, 6 ); - objective2 = exdData->getField< uint16_t >( row, 9 ); - requiredAmount2 = exdData->getField< uint8_t >( row, 11 ); - objective3 = exdData->getField< uint16_t >( row, 14 ); - image = exdData->getField< uint32_t >( row, 20 ); + auto row = exdData->m_SkyIsland2MissionDat.get_row( row_id ); + item1 = exdData->getField< uint32_t >( row, 0 ); + item2 = exdData->getField< uint32_t >( row, 1 ); + objective1 = exdData->getField< uint16_t >( row, 4 ); + requiredAmount1 = exdData->getField< uint8_t >( row, 6 ); + objective2 = exdData->getField< uint16_t >( row, 9 ); + requiredAmount2 = exdData->getField< uint8_t >( row, 11 ); + objective3 = exdData->getField< uint16_t >( row, 14 ); + image = exdData->getField< uint32_t >( row, 20 ); } Core::Data::SkyIsland2MissionDetail::SkyIsland2MissionDetail( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SkyIsland2MissionDetailDat.get_row( row_id ); - type = exdData->getField< uint8_t >( row, 0 ); - range = exdData->getField< uint8_t >( row, 2 ); - eObj = exdData->getField< uint32_t >( row, 4 ); - objective = exdData->getField< std::string >( row, 7 ); + auto row = exdData->m_SkyIsland2MissionDetailDat.get_row( row_id ); + type = exdData->getField< uint8_t >( row, 0 ); + range = exdData->getField< uint8_t >( row, 2 ); + eObj = exdData->getField< uint32_t >( row, 4 ); + objective = exdData->getField< std::string >( row, 7 ); } Core::Data::SkyIsland2MissionType::SkyIsland2MissionType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SkyIsland2MissionTypeDat.get_row( row_id ); - type = exdData->getField< bool >( row, 0 ); + auto row = exdData->m_SkyIsland2MissionTypeDat.get_row( row_id ); + type = exdData->getField< bool >( row, 0 ); } Core::Data::SkyIsland2RangeType::SkyIsland2RangeType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SkyIsland2RangeTypeDat.get_row( row_id ); - type = exdData->getField< uint8_t >( row, 0 ); + auto row = exdData->m_SkyIsland2RangeTypeDat.get_row( row_id ); + type = exdData->getField< uint8_t >( row, 0 ); } Core::Data::SpearfishingItem::SpearfishingItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SpearfishingItemDat.get_row( row_id ); - description = exdData->getField< std::string >( row, 0 ); - item = exdData->getField< int32_t >( row, 1 ); - gatheringItemLevel = exdData->getField< uint16_t >( row, 2 ); - territoryType = exdData->getField< uint16_t >( row, 4 ); - isVisible = exdData->getField< bool >( row, 5 ); + auto row = exdData->m_SpearfishingItemDat.get_row( row_id ); + description = exdData->getField< std::string >( row, 0 ); + item = exdData->getField< int32_t >( row, 1 ); + gatheringItemLevel = exdData->getField< uint16_t >( row, 2 ); + territoryType = exdData->getField< uint16_t >( row, 4 ); + isVisible = exdData->getField< bool >( row, 5 ); } Core::Data::SpearfishingNotebook::SpearfishingNotebook( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SpearfishingNotebookDat.get_row( row_id ); - gatheringLevel = exdData->getField< uint8_t >( row, 0 ); - territoryType = exdData->getField< int32_t >( row, 2 ); - x = exdData->getField< int16_t >( row, 3 ); - y = exdData->getField< int16_t >( row, 4 ); - radius = exdData->getField< uint16_t >( row, 5 ); - placeName = exdData->getField< uint16_t >( row, 7 ); - gatheringPointBase = exdData->getField< uint16_t >( row, 9 ); + auto row = exdData->m_SpearfishingNotebookDat.get_row( row_id ); + gatheringLevel = exdData->getField< uint8_t >( row, 0 ); + territoryType = exdData->getField< int32_t >( row, 2 ); + x = exdData->getField< int16_t >( row, 3 ); + y = exdData->getField< int16_t >( row, 4 ); + radius = exdData->getField< uint16_t >( row, 5 ); + placeName = exdData->getField< uint16_t >( row, 7 ); + gatheringPointBase = exdData->getField< uint16_t >( row, 9 ); } Core::Data::SpecialShop::SpecialShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SpecialShopDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - questItem.push_back( exdData->getField< int32_t >( row, 1201 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1202 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1203 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1204 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1205 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1206 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1207 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1208 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1209 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1210 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1211 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1212 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1213 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1214 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1215 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1216 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1217 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1218 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1219 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1220 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1221 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1222 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1223 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1224 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1225 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1226 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1227 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1228 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1229 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1230 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1231 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1232 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1233 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1234 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1235 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1236 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1237 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1238 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1239 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1240 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1241 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1242 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1243 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1244 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1245 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1246 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1247 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1248 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1249 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1250 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1251 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1252 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1253 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1254 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1255 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1256 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1257 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1258 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1259 ) ); - questItem.push_back( exdData->getField< int32_t >( row, 1260 ) ); - questShop = exdData->getField< int32_t >( row, 1863 ); + auto row = exdData->m_SpecialShopDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + questItem.push_back( exdData->getField< int32_t >( row, 1201 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1202 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1203 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1204 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1205 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1206 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1207 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1208 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1209 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1210 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1211 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1212 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1213 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1214 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1215 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1216 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1217 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1218 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1219 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1220 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1221 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1222 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1223 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1224 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1225 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1226 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1227 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1228 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1229 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1230 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1231 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1232 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1233 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1234 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1235 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1236 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1237 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1238 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1239 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1240 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1241 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1242 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1243 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1244 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1245 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1246 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1247 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1248 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1249 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1250 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1251 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1252 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1253 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1254 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1255 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1256 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1257 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1258 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1259 ) ); + questItem.push_back( exdData->getField< int32_t >( row, 1260 ) ); + questShop = exdData->getField< int32_t >( row, 1863 ); } Core::Data::SpecialShopItemCategory::SpecialShopItemCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SpecialShopItemCategoryDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_SpecialShopItemCategoryDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Stain::Stain( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_StainDat.get_row( row_id ); - color = exdData->getField< uint32_t >( row, 0 ); - shade = exdData->getField< uint8_t >( row, 1 ); - name = exdData->getField< std::string >( row, 2 ); + auto row = exdData->m_StainDat.get_row( row_id ); + color = exdData->getField< uint32_t >( row, 0 ); + shade = exdData->getField< uint8_t >( row, 1 ); + name = exdData->getField< std::string >( row, 2 ); } Core::Data::StainTransient::StainTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_StainTransientDat.get_row( row_id ); - item1 = exdData->getField< uint32_t >( row, 0 ); - item2 = exdData->getField< uint32_t >( row, 1 ); + auto row = exdData->m_StainTransientDat.get_row( row_id ); + item1 = exdData->getField< uint32_t >( row, 0 ); + item2 = exdData->getField< uint32_t >( row, 1 ); } Core::Data::Status::Status( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_StatusDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - description = exdData->getField< std::string >( row, 1 ); - icon = exdData->getField< uint16_t >( row, 2 ); - maxStacks = exdData->getField< uint8_t >( row, 3 ); - category = exdData->getField< uint8_t >( row, 4 ); - hitEffect = exdData->getField< uint8_t >( row, 5 ); - vFX = exdData->getField< uint8_t >( row, 6 ); - lockMovement = exdData->getField< bool >( row, 7 ); - lockActions = exdData->getField< bool >( row, 9 ); - lockControl = exdData->getField< bool >( row, 10 ); - transfiguration = exdData->getField< bool >( row, 11 ); - canDispel = exdData->getField< bool >( row, 13 ); - inflictedByActor = exdData->getField< bool >( row, 14 ); - isPermanent = exdData->getField< bool >( row, 15 ); - isFcBuff = exdData->getField< bool >( row, 21 ); - invisibility = exdData->getField< bool >( row, 22 ); + auto row = exdData->m_StatusDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + description = exdData->getField< std::string >( row, 1 ); + icon = exdData->getField< uint16_t >( row, 2 ); + maxStacks = exdData->getField< uint8_t >( row, 3 ); + category = exdData->getField< uint8_t >( row, 4 ); + hitEffect = exdData->getField< uint8_t >( row, 5 ); + vFX = exdData->getField< uint8_t >( row, 6 ); + lockMovement = exdData->getField< bool >( row, 7 ); + lockActions = exdData->getField< bool >( row, 9 ); + lockControl = exdData->getField< bool >( row, 10 ); + transfiguration = exdData->getField< bool >( row, 11 ); + canDispel = exdData->getField< bool >( row, 13 ); + inflictedByActor = exdData->getField< bool >( row, 14 ); + isPermanent = exdData->getField< bool >( row, 15 ); + isFcBuff = exdData->getField< bool >( row, 21 ); + invisibility = exdData->getField< bool >( row, 22 ); } Core::Data::StatusHitEffect::StatusHitEffect( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_StatusHitEffectDat.get_row( row_id ); - location = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_StatusHitEffectDat.get_row( row_id ); + location = exdData->getField< uint16_t >( row, 0 ); } Core::Data::StatusLoopVFX::StatusLoopVFX( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_StatusLoopVFXDat.get_row( row_id ); - location = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_StatusLoopVFXDat.get_row( row_id ); + location = exdData->getField< uint16_t >( row, 0 ); } Core::Data::Story::Story( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_StoryDat.get_row( row_id ); + auto row = exdData->m_StoryDat.get_row( row_id ); } Core::Data::SubmarineExploration::SubmarineExploration( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SubmarineExplorationDat.get_row( row_id ); - destination = exdData->getField< std::string >( row, 0 ); - location = exdData->getField< std::string >( row, 1 ); - rankReq = exdData->getField< uint8_t >( row, 5 ); - ceruleumTankReq = exdData->getField< uint8_t >( row, 6 ); - durationmin = exdData->getField< uint16_t >( row, 7 ); - distanceForSurvey = exdData->getField< uint8_t >( row, 8 ); - expReward = exdData->getField< uint32_t >( row, 9 ); + auto row = exdData->m_SubmarineExplorationDat.get_row( row_id ); + destination = exdData->getField< std::string >( row, 0 ); + location = exdData->getField< std::string >( row, 1 ); + rankReq = exdData->getField< uint8_t >( row, 5 ); + ceruleumTankReq = exdData->getField< uint8_t >( row, 6 ); + durationmin = exdData->getField< uint16_t >( row, 7 ); + distanceForSurvey = exdData->getField< uint8_t >( row, 8 ); + expReward = exdData->getField< uint32_t >( row, 9 ); } Core::Data::SubmarinePart::SubmarinePart( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SubmarinePartDat.get_row( row_id ); - slot = exdData->getField< uint8_t >( row, 0 ); - rank = exdData->getField< uint8_t >( row, 1 ); - components = exdData->getField< uint8_t >( row, 2 ); - surveillance = exdData->getField< int16_t >( row, 3 ); - retrieval = exdData->getField< int16_t >( row, 4 ); - speed = exdData->getField< int16_t >( row, 5 ); - range = exdData->getField< int16_t >( row, 6 ); - favor = exdData->getField< int16_t >( row, 7 ); - repairMaterials = exdData->getField< uint8_t >( row, 9 ); + auto row = exdData->m_SubmarinePartDat.get_row( row_id ); + slot = exdData->getField< uint8_t >( row, 0 ); + rank = exdData->getField< uint8_t >( row, 1 ); + components = exdData->getField< uint8_t >( row, 2 ); + surveillance = exdData->getField< int16_t >( row, 3 ); + retrieval = exdData->getField< int16_t >( row, 4 ); + speed = exdData->getField< int16_t >( row, 5 ); + range = exdData->getField< int16_t >( row, 6 ); + favor = exdData->getField< int16_t >( row, 7 ); + repairMaterials = exdData->getField< uint8_t >( row, 9 ); } Core::Data::SubmarineRank::SubmarineRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SubmarineRankDat.get_row( row_id ); - rank = exdData->getField< uint16_t >( row, 0 ); - expToNext = exdData->getField< uint32_t >( row, 1 ); + auto row = exdData->m_SubmarineRankDat.get_row( row_id ); + rank = exdData->getField< uint16_t >( row, 0 ); + expToNext = exdData->getField< uint32_t >( row, 1 ); } Core::Data::SwitchTalk::SwitchTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_SwitchTalkDat.get_row( row_id ); - quest.push_back( exdData->getField< uint32_t >( row, 2 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 3 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 4 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 5 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 6 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 7 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 8 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 9 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 10 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 11 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 12 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 13 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 14 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 15 ) ); - quest.push_back( exdData->getField< uint32_t >( row, 16 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 17 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 18 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 19 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 20 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 21 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 22 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 23 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 24 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 25 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 26 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 27 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 28 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 29 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 30 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 31 ) ); - defaultTalk.push_back( exdData->getField< uint32_t >( row, 32 ) ); + auto row = exdData->m_SwitchTalkDat.get_row( row_id ); + quest.push_back( exdData->getField< uint32_t >( row, 2 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 3 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 4 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 5 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 6 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 7 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 8 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 9 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 10 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 11 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 12 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 13 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 14 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 15 ) ); + quest.push_back( exdData->getField< uint32_t >( row, 16 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 17 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 18 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 19 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 20 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 21 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 22 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 23 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 24 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 25 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 26 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 27 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 28 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 29 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 30 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 31 ) ); + defaultTalk.push_back( exdData->getField< uint32_t >( row, 32 ) ); } Core::Data::TerritoryType::TerritoryType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TerritoryTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - bg = exdData->getField< std::string >( row, 1 ); - placeNameRegion = exdData->getField< uint16_t >( row, 3 ); - placeNameZone = exdData->getField< uint16_t >( row, 4 ); - placeName = exdData->getField< uint16_t >( row, 5 ); - map = exdData->getField< uint16_t >( row, 6 ); - territoryIntendedUse = exdData->getField< uint8_t >( row, 9 ); - weatherRate = exdData->getField< uint8_t >( row, 12 ); - arrayEventHandler = exdData->getField< uint32_t >( row, 22 ); - aetheryte = exdData->getField< int32_t >( row, 24 ); + auto row = exdData->m_TerritoryTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + bg = exdData->getField< std::string >( row, 1 ); + placeNameRegion = exdData->getField< uint16_t >( row, 3 ); + placeNameZone = exdData->getField< uint16_t >( row, 4 ); + placeName = exdData->getField< uint16_t >( row, 5 ); + map = exdData->getField< uint16_t >( row, 6 ); + territoryIntendedUse = exdData->getField< uint8_t >( row, 9 ); + weatherRate = exdData->getField< uint8_t >( row, 12 ); + arrayEventHandler = exdData->getField< uint32_t >( row, 22 ); + aetheryte = exdData->getField< int32_t >( row, 24 ); } Core::Data::TextCommand::TextCommand( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TextCommandDat.get_row( row_id ); - command = exdData->getField< std::string >( row, 5 ); - shortCommand = exdData->getField< std::string >( row, 6 ); - description = exdData->getField< std::string >( row, 7 ); - alias = exdData->getField< std::string >( row, 8 ); - shortAlias = exdData->getField< std::string >( row, 9 ); + auto row = exdData->m_TextCommandDat.get_row( row_id ); + command = exdData->getField< std::string >( row, 5 ); + shortCommand = exdData->getField< std::string >( row, 6 ); + description = exdData->getField< std::string >( row, 7 ); + alias = exdData->getField< std::string >( row, 8 ); + shortAlias = exdData->getField< std::string >( row, 9 ); } Core::Data::Title::Title( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TitleDat.get_row( row_id ); - masculine = exdData->getField< std::string >( row, 0 ); - feminine = exdData->getField< std::string >( row, 1 ); - isPrefix = exdData->getField< bool >( row, 2 ); + auto row = exdData->m_TitleDat.get_row( row_id ); + masculine = exdData->getField< std::string >( row, 0 ); + feminine = exdData->getField< std::string >( row, 1 ); + isPrefix = exdData->getField< bool >( row, 2 ); } Core::Data::Tomestones::Tomestones( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TomestonesDat.get_row( row_id ); - weeklyLimit = exdData->getField< uint16_t >( row, 0 ); + auto row = exdData->m_TomestonesDat.get_row( row_id ); + weeklyLimit = exdData->getField< uint16_t >( row, 0 ); } Core::Data::TomestonesItem::TomestonesItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TomestonesItemDat.get_row( row_id ); - item = exdData->getField< int32_t >( row, 0 ); - tomestones = exdData->getField< int32_t >( row, 2 ); + auto row = exdData->m_TomestonesItemDat.get_row( row_id ); + item = exdData->getField< int32_t >( row, 0 ); + tomestones = exdData->getField< int32_t >( row, 2 ); } Core::Data::TopicSelect::TopicSelect( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TopicSelectDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_TopicSelectDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Town::Town( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TownDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_TownDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); } Core::Data::Trait::Trait( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TraitDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - icon = exdData->getField< int32_t >( row, 1 ); - classJob = exdData->getField< uint8_t >( row, 2 ); - level = exdData->getField< uint8_t >( row, 3 ); - value = exdData->getField< int16_t >( row, 5 ); - classJobCategory = exdData->getField< uint8_t >( row, 6 ); + auto row = exdData->m_TraitDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + icon = exdData->getField< int32_t >( row, 1 ); + classJob = exdData->getField< uint8_t >( row, 2 ); + level = exdData->getField< uint8_t >( row, 3 ); + value = exdData->getField< int16_t >( row, 5 ); + classJobCategory = exdData->getField< uint8_t >( row, 6 ); } Core::Data::TraitRecast::TraitRecast( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TraitRecastDat.get_row( row_id ); - trait = exdData->getField< uint16_t >( row, 0 ); - action = exdData->getField< uint16_t >( row, 1 ); - timeds = exdData->getField< uint16_t >( row, 2 ); + auto row = exdData->m_TraitRecastDat.get_row( row_id ); + trait = exdData->getField< uint16_t >( row, 0 ); + action = exdData->getField< uint16_t >( row, 1 ); + timeds = exdData->getField< uint16_t >( row, 2 ); } Core::Data::TraitTransient::TraitTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TraitTransientDat.get_row( row_id ); - description = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_TraitTransientDat.get_row( row_id ); + description = exdData->getField< std::string >( row, 0 ); } Core::Data::Transformation::Transformation( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TransformationDat.get_row( row_id ); - model = exdData->getField< int16_t >( row, 1 ); - bNpcCustomize = exdData->getField< int32_t >( row, 2 ); - bNpcEquip = exdData->getField< int32_t >( row, 3 ); - action.push_back( exdData->getField< uint16_t >( row, 4 ) ); - action.push_back( exdData->getField< uint16_t >( row, 5 ) ); - action.push_back( exdData->getField< uint16_t >( row, 6 ) ); - action.push_back( exdData->getField< uint16_t >( row, 7 ) ); - action.push_back( exdData->getField< uint16_t >( row, 8 ) ); - action.push_back( exdData->getField< uint16_t >( row, 9 ) ); - speed = exdData->getField< float >( row, 12 ); - scale = exdData->getField< float >( row, 13 ); - isPvP = exdData->getField< bool >( row, 14 ); - isEvent = exdData->getField< bool >( row, 15 ); - playerCamera = exdData->getField< bool >( row, 16 ); + auto row = exdData->m_TransformationDat.get_row( row_id ); + model = exdData->getField< int16_t >( row, 1 ); + bNpcCustomize = exdData->getField< int32_t >( row, 2 ); + bNpcEquip = exdData->getField< int32_t >( row, 3 ); + action.push_back( exdData->getField< uint16_t >( row, 4 ) ); + action.push_back( exdData->getField< uint16_t >( row, 5 ) ); + action.push_back( exdData->getField< uint16_t >( row, 6 ) ); + action.push_back( exdData->getField< uint16_t >( row, 7 ) ); + action.push_back( exdData->getField< uint16_t >( row, 8 ) ); + action.push_back( exdData->getField< uint16_t >( row, 9 ) ); + speed = exdData->getField< float >( row, 12 ); + scale = exdData->getField< float >( row, 13 ); + isPvP = exdData->getField< bool >( row, 14 ); + isEvent = exdData->getField< bool >( row, 15 ); + playerCamera = exdData->getField< bool >( row, 16 ); } Core::Data::Treasure::Treasure( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TreasureDat.get_row( row_id ); - item = exdData->getField< uint32_t >( row, 8 ); + auto row = exdData->m_TreasureDat.get_row( row_id ); + item = exdData->getField< uint32_t >( row, 8 ); } Core::Data::TreasureHuntRank::TreasureHuntRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TreasureHuntRankDat.get_row( row_id ); - icon = exdData->getField< uint32_t >( row, 1 ); - itemName = exdData->getField< int32_t >( row, 2 ); - keyItemName = exdData->getField< int32_t >( row, 3 ); - instanceMap = exdData->getField< int32_t >( row, 4 ); - maxPartySize = exdData->getField< uint8_t >( row, 5 ); - minPartySize = exdData->getField< uint8_t >( row, 6 ); + auto row = exdData->m_TreasureHuntRankDat.get_row( row_id ); + icon = exdData->getField< uint32_t >( row, 1 ); + itemName = exdData->getField< int32_t >( row, 2 ); + keyItemName = exdData->getField< int32_t >( row, 3 ); + instanceMap = exdData->getField< int32_t >( row, 4 ); + maxPartySize = exdData->getField< uint8_t >( row, 5 ); + minPartySize = exdData->getField< uint8_t >( row, 6 ); } Core::Data::Tribe::Tribe( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TribeDat.get_row( row_id ); - masculine = exdData->getField< std::string >( row, 0 ); - feminine = exdData->getField< std::string >( row, 1 ); - sTR = exdData->getField< int8_t >( row, 4 ); - dEX = exdData->getField< int8_t >( row, 5 ); - vIT = exdData->getField< int8_t >( row, 6 ); - iNT = exdData->getField< int8_t >( row, 7 ); - mND = exdData->getField< int8_t >( row, 8 ); - pIE = exdData->getField< int8_t >( row, 9 ); + auto row = exdData->m_TribeDat.get_row( row_id ); + masculine = exdData->getField< std::string >( row, 0 ); + feminine = exdData->getField< std::string >( row, 1 ); + sTR = exdData->getField< int8_t >( row, 4 ); + dEX = exdData->getField< int8_t >( row, 5 ); + vIT = exdData->getField< int8_t >( row, 6 ); + iNT = exdData->getField< int8_t >( row, 7 ); + mND = exdData->getField< int8_t >( row, 8 ); + pIE = exdData->getField< int8_t >( row, 9 ); } Core::Data::TripleTriad::TripleTriad( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TripleTriadDat.get_row( row_id ); - tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 0 ) ); - tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 1 ) ); - tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 2 ) ); - tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 3 ) ); - tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 4 ) ); - tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 5 ) ); - tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 6 ) ); - tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 7 ) ); - tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 8 ) ); - tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 9 ) ); - tripleTriadRule.push_back( exdData->getField< uint8_t >( row, 10 ) ); - tripleTriadRule.push_back( exdData->getField< uint8_t >( row, 11 ) ); - usesRegionalRules = exdData->getField< bool >( row, 12 ); - fee = exdData->getField< uint16_t >( row, 13 ); - previousQuestJoin = exdData->getField< uint8_t >( row, 14 ); - previousQuest.push_back( exdData->getField< uint32_t >( row, 15 ) ); - previousQuest.push_back( exdData->getField< uint32_t >( row, 16 ) ); - previousQuest.push_back( exdData->getField< uint32_t >( row, 17 ) ); - startTime = exdData->getField< uint16_t >( row, 18 ); - endTime = exdData->getField< uint16_t >( row, 19 ); - defaultTalkChallenge = exdData->getField< uint32_t >( row, 20 ); - defaultTalkUnavailable = exdData->getField< uint32_t >( row, 21 ); - defaultTalkNPCWin = exdData->getField< uint32_t >( row, 22 ); - defaultTalkDraw = exdData->getField< uint32_t >( row, 23 ); - defaultTalkPCWin = exdData->getField< uint32_t >( row, 24 ); - itemPossibleReward.push_back( exdData->getField< uint32_t >( row, 26 ) ); - itemPossibleReward.push_back( exdData->getField< uint32_t >( row, 27 ) ); - itemPossibleReward.push_back( exdData->getField< uint32_t >( row, 28 ) ); - itemPossibleReward.push_back( exdData->getField< uint32_t >( row, 29 ) ); + auto row = exdData->m_TripleTriadDat.get_row( row_id ); + tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 0 ) ); + tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 1 ) ); + tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 2 ) ); + tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 3 ) ); + tripleTriadCardFixed.push_back( exdData->getField< uint16_t >( row, 4 ) ); + tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 5 ) ); + tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 6 ) ); + tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 7 ) ); + tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 8 ) ); + tripleTriadCardVariable.push_back( exdData->getField< uint16_t >( row, 9 ) ); + tripleTriadRule.push_back( exdData->getField< uint8_t >( row, 10 ) ); + tripleTriadRule.push_back( exdData->getField< uint8_t >( row, 11 ) ); + usesRegionalRules = exdData->getField< bool >( row, 12 ); + fee = exdData->getField< uint16_t >( row, 13 ); + previousQuestJoin = exdData->getField< uint8_t >( row, 14 ); + previousQuest.push_back( exdData->getField< uint32_t >( row, 15 ) ); + previousQuest.push_back( exdData->getField< uint32_t >( row, 16 ) ); + previousQuest.push_back( exdData->getField< uint32_t >( row, 17 ) ); + startTime = exdData->getField< uint16_t >( row, 18 ); + endTime = exdData->getField< uint16_t >( row, 19 ); + defaultTalkChallenge = exdData->getField< uint32_t >( row, 20 ); + defaultTalkUnavailable = exdData->getField< uint32_t >( row, 21 ); + defaultTalkNPCWin = exdData->getField< uint32_t >( row, 22 ); + defaultTalkDraw = exdData->getField< uint32_t >( row, 23 ); + defaultTalkPCWin = exdData->getField< uint32_t >( row, 24 ); + itemPossibleReward.push_back( exdData->getField< uint32_t >( row, 26 ) ); + itemPossibleReward.push_back( exdData->getField< uint32_t >( row, 27 ) ); + itemPossibleReward.push_back( exdData->getField< uint32_t >( row, 28 ) ); + itemPossibleReward.push_back( exdData->getField< uint32_t >( row, 29 ) ); } Core::Data::TripleTriadCard::TripleTriadCard( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TripleTriadCardDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); - startsWithVowel = exdData->getField< int8_t >( row, 4 ); - description = exdData->getField< std::string >( row, 8 ); + auto row = exdData->m_TripleTriadCardDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); + startsWithVowel = exdData->getField< int8_t >( row, 4 ); + description = exdData->getField< std::string >( row, 8 ); } Core::Data::TripleTriadCardRarity::TripleTriadCardRarity( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TripleTriadCardRarityDat.get_row( row_id ); - stars = exdData->getField< uint8_t >( row, 0 ); + auto row = exdData->m_TripleTriadCardRarityDat.get_row( row_id ); + stars = exdData->getField< uint8_t >( row, 0 ); } Core::Data::TripleTriadCardResident::TripleTriadCardResident( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TripleTriadCardResidentDat.get_row( row_id ); - top = exdData->getField< uint8_t >( row, 1 ); - bottom = exdData->getField< uint8_t >( row, 2 ); - left = exdData->getField< uint8_t >( row, 3 ); - right = exdData->getField< uint8_t >( row, 4 ); - tripleTriadCardRarity = exdData->getField< uint8_t >( row, 5 ); - tripleTriadCardType = exdData->getField< uint8_t >( row, 6 ); - saleValue = exdData->getField< uint16_t >( row, 7 ); - sortKey = exdData->getField< uint8_t >( row, 8 ); + auto row = exdData->m_TripleTriadCardResidentDat.get_row( row_id ); + top = exdData->getField< uint8_t >( row, 1 ); + bottom = exdData->getField< uint8_t >( row, 2 ); + left = exdData->getField< uint8_t >( row, 3 ); + right = exdData->getField< uint8_t >( row, 4 ); + tripleTriadCardRarity = exdData->getField< uint8_t >( row, 5 ); + tripleTriadCardType = exdData->getField< uint8_t >( row, 6 ); + saleValue = exdData->getField< uint16_t >( row, 7 ); + sortKey = exdData->getField< uint8_t >( row, 8 ); } Core::Data::TripleTriadCardType::TripleTriadCardType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TripleTriadCardTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_TripleTriadCardTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::TripleTriadCompetition::TripleTriadCompetition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TripleTriadCompetitionDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_TripleTriadCompetitionDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::TripleTriadRule::TripleTriadRule( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TripleTriadRuleDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_TripleTriadRuleDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::Tutorial::Tutorial( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TutorialDat.get_row( row_id ); - exp = exdData->getField< uint32_t >( row, 4 ); - gil = exdData->getField< uint32_t >( row, 5 ); - rewardTank = exdData->getField< uint32_t >( row, 6 ); - rewardMelee = exdData->getField< uint32_t >( row, 7 ); - rewardRanged = exdData->getField< uint32_t >( row, 8 ); - objective = exdData->getField< uint32_t >( row, 9 ); + auto row = exdData->m_TutorialDat.get_row( row_id ); + exp = exdData->getField< uint32_t >( row, 4 ); + gil = exdData->getField< uint32_t >( row, 5 ); + rewardTank = exdData->getField< uint32_t >( row, 6 ); + rewardMelee = exdData->getField< uint32_t >( row, 7 ); + rewardRanged = exdData->getField< uint32_t >( row, 8 ); + objective = exdData->getField< uint32_t >( row, 9 ); } Core::Data::TutorialDPS::TutorialDPS( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TutorialDPSDat.get_row( row_id ); - objective = exdData->getField< uint8_t >( row, 0 ); + auto row = exdData->m_TutorialDPSDat.get_row( row_id ); + objective = exdData->getField< uint8_t >( row, 0 ); } Core::Data::TutorialHealer::TutorialHealer( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TutorialHealerDat.get_row( row_id ); - objective = exdData->getField< uint8_t >( row, 0 ); + auto row = exdData->m_TutorialHealerDat.get_row( row_id ); + objective = exdData->getField< uint8_t >( row, 0 ); } Core::Data::TutorialTank::TutorialTank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_TutorialTankDat.get_row( row_id ); - objective = exdData->getField< uint8_t >( row, 0 ); + auto row = exdData->m_TutorialTankDat.get_row( row_id ); + objective = exdData->getField< uint8_t >( row, 0 ); } Core::Data::VaseFlower::VaseFlower( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_VaseFlowerDat.get_row( row_id ); - item = exdData->getField< uint32_t >( row, 3 ); + auto row = exdData->m_VaseFlowerDat.get_row( row_id ); + item = exdData->getField< uint32_t >( row, 3 ); } Core::Data::VFX::VFX( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_VFXDat.get_row( row_id ); - location = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_VFXDat.get_row( row_id ); + location = exdData->getField< std::string >( row, 0 ); } Core::Data::Warp::Warp( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WarpDat.get_row( row_id ); - level = exdData->getField< uint32_t >( row, 0 ); - placeName = exdData->getField< uint16_t >( row, 1 ); - defaultTalk1 = exdData->getField< uint32_t >( row, 2 ); - defaultTalk2 = exdData->getField< uint32_t >( row, 3 ); - defaultTalk3 = exdData->getField< uint32_t >( row, 4 ); - warpCondition = exdData->getField< uint16_t >( row, 5 ); - warpLogic = exdData->getField< uint16_t >( row, 6 ); + auto row = exdData->m_WarpDat.get_row( row_id ); + level = exdData->getField< uint32_t >( row, 0 ); + placeName = exdData->getField< uint16_t >( row, 1 ); + defaultTalk1 = exdData->getField< uint32_t >( row, 2 ); + defaultTalk2 = exdData->getField< uint32_t >( row, 3 ); + defaultTalk3 = exdData->getField< uint32_t >( row, 4 ); + warpCondition = exdData->getField< uint16_t >( row, 5 ); + warpLogic = exdData->getField< uint16_t >( row, 6 ); } Core::Data::WarpCondition::WarpCondition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WarpConditionDat.get_row( row_id ); - requiredQuest1 = exdData->getField< uint32_t >( row, 2 ); - requiredQuest2 = exdData->getField< uint32_t >( row, 3 ); - dRequiredQuest3 = exdData->getField< uint32_t >( row, 4 ); - requiredQuest4 = exdData->getField< uint32_t >( row, 5 ); + auto row = exdData->m_WarpConditionDat.get_row( row_id ); + requiredQuest1 = exdData->getField< uint32_t >( row, 2 ); + requiredQuest2 = exdData->getField< uint32_t >( row, 3 ); + dRequiredQuest3 = exdData->getField< uint32_t >( row, 4 ); + requiredQuest4 = exdData->getField< uint32_t >( row, 5 ); } Core::Data::Weather::Weather( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WeatherDat.get_row( row_id ); - icon = exdData->getField< int32_t >( row, 0 ); - name = exdData->getField< std::string >( row, 1 ); - description = exdData->getField< std::string >( row, 2 ); + auto row = exdData->m_WeatherDat.get_row( row_id ); + icon = exdData->getField< int32_t >( row, 0 ); + name = exdData->getField< std::string >( row, 1 ); + description = exdData->getField< std::string >( row, 2 ); } Core::Data::WeatherGroup::WeatherGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WeatherGroupDat.get_row( row_id ); - weatherRate = exdData->getField< int32_t >( row, 1 ); + auto row = exdData->m_WeatherGroupDat.get_row( row_id ); + weatherRate = exdData->getField< int32_t >( row, 1 ); } Core::Data::WeatherRate::WeatherRate( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WeatherRateDat.get_row( row_id ); + auto row = exdData->m_WeatherRateDat.get_row( row_id ); } Core::Data::WeddingBGM::WeddingBGM( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WeddingBGMDat.get_row( row_id ); - song = exdData->getField< uint16_t >( row, 0 ); - songName = exdData->getField< std::string >( row, 1 ); + auto row = exdData->m_WeddingBGMDat.get_row( row_id ); + song = exdData->getField< uint16_t >( row, 0 ); + songName = exdData->getField< std::string >( row, 1 ); } Core::Data::WeeklyBingoOrderData::WeeklyBingoOrderData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WeeklyBingoOrderDataDat.get_row( row_id ); - data = exdData->getField< uint32_t >( row, 1 ); - text = exdData->getField< uint8_t >( row, 3 ); - icon = exdData->getField< uint32_t >( row, 4 ); + auto row = exdData->m_WeeklyBingoOrderDataDat.get_row( row_id ); + data = exdData->getField< uint32_t >( row, 1 ); + text = exdData->getField< uint8_t >( row, 3 ); + icon = exdData->getField< uint32_t >( row, 4 ); } Core::Data::WeeklyBingoRewardData::WeeklyBingoRewardData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WeeklyBingoRewardDataDat.get_row( row_id ); - rewardItem2 = exdData->getField< uint32_t >( row, 10 ); - rewardHQ2 = exdData->getField< bool >( row, 11 ); - rewardQuantity2 = exdData->getField< uint16_t >( row, 12 ); + auto row = exdData->m_WeeklyBingoRewardDataDat.get_row( row_id ); + rewardItem2 = exdData->getField< uint32_t >( row, 10 ); + rewardHQ2 = exdData->getField< bool >( row, 11 ); + rewardQuantity2 = exdData->getField< uint16_t >( row, 12 ); } Core::Data::WeeklyBingoText::WeeklyBingoText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WeeklyBingoTextDat.get_row( row_id ); - description = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_WeeklyBingoTextDat.get_row( row_id ); + description = exdData->getField< std::string >( row, 0 ); } Core::Data::World::World( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WorldDat.get_row( row_id ); - dataCenter = exdData->getField< uint8_t >( row, 1 ); + auto row = exdData->m_WorldDat.get_row( row_id ); + dataCenter = exdData->getField< uint8_t >( row, 1 ); } Core::Data::WorldDCGroupType::WorldDCGroupType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_WorldDCGroupTypeDat.get_row( row_id ); - name = exdData->getField< std::string >( row, 0 ); + auto row = exdData->m_WorldDCGroupTypeDat.get_row( row_id ); + name = exdData->getField< std::string >( row, 0 ); } Core::Data::YKW::YKW( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_YKWDat.get_row( row_id ); - item = exdData->getField< uint32_t >( row, 1 ); - location.push_back( exdData->getField< uint16_t >( row, 2 ) ); - location.push_back( exdData->getField< uint16_t >( row, 3 ) ); - location.push_back( exdData->getField< uint16_t >( row, 4 ) ); + auto row = exdData->m_YKWDat.get_row( row_id ); + item = exdData->getField< uint32_t >( row, 1 ); + location.push_back( exdData->getField< uint16_t >( row, 2 ) ); + location.push_back( exdData->getField< uint16_t >( row, 3 ) ); + location.push_back( exdData->getField< uint16_t >( row, 4 ) ); } Core::Data::ZoneSharedGroup::ZoneSharedGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ) { - auto row = exdData->m_ZoneSharedGroupDat.get_row( row_id ); - quest1 = exdData->getField< uint32_t >( row, 2 ); - quest2 = exdData->getField< uint32_t >( row, 6 ); - quest3 = exdData->getField< uint32_t >( row, 10 ); - quest4 = exdData->getField< uint32_t >( row, 14 ); - quest5 = exdData->getField< uint32_t >( row, 18 ); - quest6 = exdData->getField< uint32_t >( row, 22 ); + auto row = exdData->m_ZoneSharedGroupDat.get_row( row_id ); + quest1 = exdData->getField< uint32_t >( row, 2 ); + quest2 = exdData->getField< uint32_t >( row, 6 ); + quest3 = exdData->getField< uint32_t >( row, 10 ); + quest4 = exdData->getField< uint32_t >( row, 14 ); + quest5 = exdData->getField< uint32_t >( row, 18 ); + quest6 = exdData->getField< uint32_t >( row, 22 ); } @@ -4418,393 +4428,393 @@ Core::Data::ExdDataGenerated::~ExdDataGenerated() xiv::exd::Exd Core::Data::ExdDataGenerated::setupDatAccess( const std::string& name, xiv::exd::Language lang ) { - auto& cat = m_exd_data->get_category( name ); - return static_cast< xiv::exd::Exd >( cat.get_data_ln( lang ) ); + auto& cat = m_exd_data->get_category( name ); + return static_cast< xiv::exd::Exd >( cat.get_data_ln( lang ) ); }; void Core::Data::ExdDataGenerated::loadIdList( xiv::exd::Exd& data, std::set< uint32_t >& outIdList ) { - auto pDataRows = data.get_rows(); + auto pDataRows = data.get_rows(); - for( auto row : pDataRows ) - { - uint32_t id = row.first; - outIdList.insert( id ); - } + for( auto row : pDataRows ) + { + uint32_t id = row.first; + outIdList.insert( id ); + } } bool Core::Data::ExdDataGenerated::init( const std::string& path ) { - try - { - m_data = boost::make_shared< xiv::dat::GameData >( path ); - m_exd_data = boost::make_shared< xiv::exd::ExdData >( *m_data ); + try + { + m_data = boost::make_shared< xiv::dat::GameData >( path ); + m_exd_data = boost::make_shared< xiv::exd::ExdData >( *m_data ); - m_AchievementDat = setupDatAccess( "Achievement", xiv::exd::Language::en ); - m_AchievementCategoryDat = setupDatAccess( "AchievementCategory", xiv::exd::Language::en ); - m_AchievementKindDat = setupDatAccess( "AchievementKind", xiv::exd::Language::en ); - m_ActionDat = setupDatAccess( "Action", xiv::exd::Language::en ); - m_ActionCastTimelineDat = setupDatAccess( "ActionCastTimeline", xiv::exd::Language::none ); - m_ActionCastVFXDat = setupDatAccess( "ActionCastVFX", xiv::exd::Language::none ); - m_ActionCategoryDat = setupDatAccess( "ActionCategory", xiv::exd::Language::en ); - m_ActionComboRouteDat = setupDatAccess( "ActionComboRoute", xiv::exd::Language::en ); - m_ActionIndirectionDat = setupDatAccess( "ActionIndirection", xiv::exd::Language::none ); - m_ActionParamDat = setupDatAccess( "ActionParam", xiv::exd::Language::none ); - m_ActionProcStatusDat = setupDatAccess( "ActionProcStatus", xiv::exd::Language::none ); - m_ActionTimelineDat = setupDatAccess( "ActionTimeline", xiv::exd::Language::none ); - m_ActionTimelineReplaceDat = setupDatAccess( "ActionTimelineReplace", xiv::exd::Language::none ); - m_ActionTransientDat = setupDatAccess( "ActionTransient", xiv::exd::Language::en ); - m_AddonDat = setupDatAccess( "Addon", xiv::exd::Language::en ); - m_AdventureDat = setupDatAccess( "Adventure", xiv::exd::Language::en ); - m_AdventureExPhaseDat = setupDatAccess( "AdventureExPhase", xiv::exd::Language::none ); - m_AetherCurrentDat = setupDatAccess( "AetherCurrent", xiv::exd::Language::none ); - m_AetherCurrentCompFlgSetDat = setupDatAccess( "AetherCurrentCompFlgSet", xiv::exd::Language::none ); - m_AetherialWheelDat = setupDatAccess( "AetherialWheel", xiv::exd::Language::none ); - m_AetheryteDat = setupDatAccess( "Aetheryte", xiv::exd::Language::en ); - m_AirshipExplorationLevelDat = setupDatAccess( "AirshipExplorationLevel", xiv::exd::Language::none ); - m_AirshipExplorationLogDat = setupDatAccess( "AirshipExplorationLog", xiv::exd::Language::en ); - m_AirshipExplorationParamTypeDat = setupDatAccess( "AirshipExplorationParamType", xiv::exd::Language::en ); - m_AirshipExplorationPartDat = setupDatAccess( "AirshipExplorationPart", xiv::exd::Language::none ); - m_AirshipExplorationPointDat = setupDatAccess( "AirshipExplorationPoint", xiv::exd::Language::en ); - m_AnimaWeapon5Dat = setupDatAccess( "AnimaWeapon5", xiv::exd::Language::none ); - m_AnimaWeapon5ParamDat = setupDatAccess( "AnimaWeapon5Param", xiv::exd::Language::en ); - m_AnimaWeapon5PatternGroupDat = setupDatAccess( "AnimaWeapon5PatternGroup", xiv::exd::Language::en ); - m_AnimaWeapon5SpiritTalkDat = setupDatAccess( "AnimaWeapon5SpiritTalk", xiv::exd::Language::none ); - m_AnimaWeapon5SpiritTalkParamDat = setupDatAccess( "AnimaWeapon5SpiritTalkParam", xiv::exd::Language::en ); - m_AnimaWeapon5TradeItemDat = setupDatAccess( "AnimaWeapon5TradeItem", xiv::exd::Language::none ); - m_AnimaWeaponFUITalkDat = setupDatAccess( "AnimaWeaponFUITalk", xiv::exd::Language::none ); - m_AnimaWeaponFUITalkParamDat = setupDatAccess( "AnimaWeaponFUITalkParam", xiv::exd::Language::en ); - m_AnimaWeaponIconDat = setupDatAccess( "AnimaWeaponIcon", xiv::exd::Language::none ); - m_AnimaWeaponItemDat = setupDatAccess( "AnimaWeaponItem", xiv::exd::Language::none ); - m_AquariumFishDat = setupDatAccess( "AquariumFish", xiv::exd::Language::none ); - m_AquariumWaterDat = setupDatAccess( "AquariumWater", xiv::exd::Language::en ); - m_AttackTypeDat = setupDatAccess( "AttackType", xiv::exd::Language::en ); - m_BalloonDat = setupDatAccess( "Balloon", xiv::exd::Language::en ); - m_BaseParamDat = setupDatAccess( "BaseParam", xiv::exd::Language::en ); - m_BattleLeveDat = setupDatAccess( "BattleLeve", xiv::exd::Language::none ); - m_BeastRankBonusDat = setupDatAccess( "BeastRankBonus", xiv::exd::Language::none ); - m_BeastReputationRankDat = setupDatAccess( "BeastReputationRank", xiv::exd::Language::en ); - m_BeastTribeDat = setupDatAccess( "BeastTribe", xiv::exd::Language::en ); - m_BehaviorDat = setupDatAccess( "Behavior", xiv::exd::Language::none ); - m_BGMDat = setupDatAccess( "BGM", xiv::exd::Language::none ); - m_BNpcAnnounceIconDat = setupDatAccess( "BNpcAnnounceIcon", xiv::exd::Language::none ); - m_BNpcBaseDat = setupDatAccess( "BNpcBase", xiv::exd::Language::none ); - m_BNpcCustomizeDat = setupDatAccess( "BNpcCustomize", xiv::exd::Language::none ); - m_BNpcNameDat = setupDatAccess( "BNpcName", xiv::exd::Language::en ); - m_BuddyDat = setupDatAccess( "Buddy", xiv::exd::Language::none ); - m_BuddyActionDat = setupDatAccess( "BuddyAction", xiv::exd::Language::en ); - m_BuddyEquipDat = setupDatAccess( "BuddyEquip", xiv::exd::Language::en ); - m_BuddyItemDat = setupDatAccess( "BuddyItem", xiv::exd::Language::none ); - m_BuddyRankDat = setupDatAccess( "BuddyRank", xiv::exd::Language::none ); - m_BuddySkillDat = setupDatAccess( "BuddySkill", xiv::exd::Language::none ); - m_CabinetDat = setupDatAccess( "Cabinet", xiv::exd::Language::none ); - m_CabinetCategoryDat = setupDatAccess( "CabinetCategory", xiv::exd::Language::none ); - m_CalendarDat = setupDatAccess( "Calendar", xiv::exd::Language::none ); - m_CharaMakeCustomizeDat = setupDatAccess( "CharaMakeCustomize", xiv::exd::Language::none ); - m_CharaMakeTypeDat = setupDatAccess( "CharaMakeType", xiv::exd::Language::en ); - m_ChocoboRaceDat = setupDatAccess( "ChocoboRace", xiv::exd::Language::none ); - m_ChocoboRaceAbilityDat = setupDatAccess( "ChocoboRaceAbility", xiv::exd::Language::en ); - m_ChocoboRaceAbilityTypeDat = setupDatAccess( "ChocoboRaceAbilityType", xiv::exd::Language::none ); - m_ChocoboRaceItemDat = setupDatAccess( "ChocoboRaceItem", xiv::exd::Language::en ); - m_ChocoboRaceRankDat = setupDatAccess( "ChocoboRaceRank", xiv::exd::Language::none ); - m_ChocoboRaceStatusDat = setupDatAccess( "ChocoboRaceStatus", xiv::exd::Language::none ); - m_ChocoboRaceTerritoryDat = setupDatAccess( "ChocoboRaceTerritory", xiv::exd::Language::none ); - m_ChocoboTaxiDat = setupDatAccess( "ChocoboTaxi", xiv::exd::Language::none ); - m_ChocoboTaxiStandDat = setupDatAccess( "ChocoboTaxiStand", xiv::exd::Language::en ); - m_ClassJobDat = setupDatAccess( "ClassJob", xiv::exd::Language::en ); - m_ClassJobCategoryDat = setupDatAccess( "ClassJobCategory", xiv::exd::Language::en ); - m_CompanionDat = setupDatAccess( "Companion", xiv::exd::Language::en ); - m_CompanionMoveDat = setupDatAccess( "CompanionMove", xiv::exd::Language::en ); - m_CompanionTransientDat = setupDatAccess( "CompanionTransient", xiv::exd::Language::en ); - m_CompanyActionDat = setupDatAccess( "CompanyAction", xiv::exd::Language::en ); - m_CompanyCraftDraftDat = setupDatAccess( "CompanyCraftDraft", xiv::exd::Language::en ); - m_CompanyCraftDraftCategoryDat = setupDatAccess( "CompanyCraftDraftCategory", xiv::exd::Language::en ); - m_CompanyCraftManufactoryStateDat = setupDatAccess( "CompanyCraftManufactoryState", xiv::exd::Language::en ); - m_CompanyCraftPartDat = setupDatAccess( "CompanyCraftPart", xiv::exd::Language::none ); - m_CompanyCraftProcessDat = setupDatAccess( "CompanyCraftProcess", xiv::exd::Language::none ); - m_CompanyCraftSequenceDat = setupDatAccess( "CompanyCraftSequence", xiv::exd::Language::none ); - m_CompanyCraftSupplyItemDat = setupDatAccess( "CompanyCraftSupplyItem", xiv::exd::Language::none ); - m_CompanyCraftTypeDat = setupDatAccess( "CompanyCraftType", xiv::exd::Language::en ); - m_CompleteJournalDat = setupDatAccess( "CompleteJournal", xiv::exd::Language::en ); - m_CompleteJournalCategoryDat = setupDatAccess( "CompleteJournalCategory", xiv::exd::Language::none ); - m_ContentExActionDat = setupDatAccess( "ContentExAction", xiv::exd::Language::none ); - m_ContentFinderConditionDat = setupDatAccess( "ContentFinderCondition", xiv::exd::Language::en ); - m_ContentFinderConditionTransientDat = setupDatAccess( "ContentFinderConditionTransient", xiv::exd::Language::en ); - m_ContentMemberTypeDat = setupDatAccess( "ContentMemberType", xiv::exd::Language::none ); - m_ContentNpcTalkDat = setupDatAccess( "ContentNpcTalk", xiv::exd::Language::none ); - m_ContentRouletteDat = setupDatAccess( "ContentRoulette", xiv::exd::Language::en ); - m_ContentsNoteDat = setupDatAccess( "ContentsNote", xiv::exd::Language::en ); - m_ContentsNoteCategoryDat = setupDatAccess( "ContentsNoteCategory", xiv::exd::Language::none ); - m_ContentTalkDat = setupDatAccess( "ContentTalk", xiv::exd::Language::en ); - m_ContentTalkParamDat = setupDatAccess( "ContentTalkParam", xiv::exd::Language::none ); - m_ContentTypeDat = setupDatAccess( "ContentType", xiv::exd::Language::en ); - m_CraftActionDat = setupDatAccess( "CraftAction", xiv::exd::Language::en ); - m_CraftLeveDat = setupDatAccess( "CraftLeve", xiv::exd::Language::none ); - m_CraftTypeDat = setupDatAccess( "CraftType", xiv::exd::Language::en ); - m_CurrencyDat = setupDatAccess( "Currency", xiv::exd::Language::none ); - m_CustomTalkDat = setupDatAccess( "CustomTalk", xiv::exd::Language::en ); - m_CutsceneDat = setupDatAccess( "Cutscene", xiv::exd::Language::none ); - m_CutScreenImageDat = setupDatAccess( "CutScreenImage", xiv::exd::Language::none ); - m_DailySupplyItemDat = setupDatAccess( "DailySupplyItem", xiv::exd::Language::none ); - m_DeepDungeonBanDat = setupDatAccess( "DeepDungeonBan", xiv::exd::Language::none ); - m_DeepDungeonDangerDat = setupDatAccess( "DeepDungeonDanger", xiv::exd::Language::none ); - m_DeepDungeonEquipmentDat = setupDatAccess( "DeepDungeonEquipment", xiv::exd::Language::en ); - m_DeepDungeonFloorEffectUIDat = setupDatAccess( "DeepDungeonFloorEffectUI", xiv::exd::Language::en ); - m_DeepDungeonItemDat = setupDatAccess( "DeepDungeonItem", xiv::exd::Language::en ); - m_DeepDungeonStatusDat = setupDatAccess( "DeepDungeonStatus", xiv::exd::Language::none ); - m_DefaultTalkDat = setupDatAccess( "DefaultTalk", xiv::exd::Language::en ); - m_DeliveryQuestDat = setupDatAccess( "DeliveryQuest", xiv::exd::Language::none ); - m_DisposalShopDat = setupDatAccess( "DisposalShop", xiv::exd::Language::en ); - m_DisposalShopFilterTypeDat = setupDatAccess( "DisposalShopFilterType", xiv::exd::Language::en ); - m_DisposalShopItemDat = setupDatAccess( "DisposalShopItem", xiv::exd::Language::none ); - m_DpsChallengeDat = setupDatAccess( "DpsChallenge", xiv::exd::Language::en ); - m_DpsChallengeOfficerDat = setupDatAccess( "DpsChallengeOfficer", xiv::exd::Language::none ); - m_DpsChallengeTransientDat = setupDatAccess( "DpsChallengeTransient", xiv::exd::Language::none ); - m_EmoteDat = setupDatAccess( "Emote", xiv::exd::Language::en ); - m_EmoteCategoryDat = setupDatAccess( "EmoteCategory", xiv::exd::Language::en ); - m_EmoteModeDat = setupDatAccess( "EmoteMode", xiv::exd::Language::none ); - m_ENpcBaseDat = setupDatAccess( "ENpcBase", xiv::exd::Language::none ); - m_ENpcResidentDat = setupDatAccess( "ENpcResident", xiv::exd::Language::en ); - m_EObjDat = setupDatAccess( "EObj", xiv::exd::Language::none ); - m_EObjNameDat = setupDatAccess( "EObjName", xiv::exd::Language::en ); - m_EquipRaceCategoryDat = setupDatAccess( "EquipRaceCategory", xiv::exd::Language::none ); - m_EquipSlotCategoryDat = setupDatAccess( "EquipSlotCategory", xiv::exd::Language::none ); - m_EurekaAethernetDat = setupDatAccess( "EurekaAethernet", xiv::exd::Language::none ); - m_EurekaGrowDataDat = setupDatAccess( "EurekaGrowData", xiv::exd::Language::none ); - m_EurekaSphereElementAdjustDat = setupDatAccess( "EurekaSphereElementAdjust", xiv::exd::Language::none ); - m_EventActionDat = setupDatAccess( "EventAction", xiv::exd::Language::en ); - m_EventIconPriorityDat = setupDatAccess( "EventIconPriority", xiv::exd::Language::none ); - m_EventIconTypeDat = setupDatAccess( "EventIconType", xiv::exd::Language::none ); - m_EventItemDat = setupDatAccess( "EventItem", xiv::exd::Language::en ); - m_EventItemHelpDat = setupDatAccess( "EventItemHelp", xiv::exd::Language::en ); - m_ExVersionDat = setupDatAccess( "ExVersion", xiv::exd::Language::en ); - m_FateDat = setupDatAccess( "Fate", xiv::exd::Language::en ); - m_FCActivityDat = setupDatAccess( "FCActivity", xiv::exd::Language::en ); - m_FCActivityCategoryDat = setupDatAccess( "FCActivityCategory", xiv::exd::Language::en ); - m_FCAuthorityDat = setupDatAccess( "FCAuthority", xiv::exd::Language::en ); - m_FCAuthorityCategoryDat = setupDatAccess( "FCAuthorityCategory", xiv::exd::Language::en ); - m_FCChestNameDat = setupDatAccess( "FCChestName", xiv::exd::Language::en ); - m_FccShopDat = setupDatAccess( "FccShop", xiv::exd::Language::en ); - m_FCHierarchyDat = setupDatAccess( "FCHierarchy", xiv::exd::Language::en ); - m_FCProfileDat = setupDatAccess( "FCProfile", xiv::exd::Language::en ); - m_FCReputationDat = setupDatAccess( "FCReputation", xiv::exd::Language::en ); - m_FCRightsDat = setupDatAccess( "FCRights", xiv::exd::Language::en ); - m_FieldMarkerDat = setupDatAccess( "FieldMarker", xiv::exd::Language::en ); - m_FishingSpotDat = setupDatAccess( "FishingSpot", xiv::exd::Language::en ); - m_FishParameterDat = setupDatAccess( "FishParameter", xiv::exd::Language::en ); - m_GardeningSeedDat = setupDatAccess( "GardeningSeed", xiv::exd::Language::none ); - m_GatheringConditionDat = setupDatAccess( "GatheringCondition", xiv::exd::Language::en ); - m_GatheringExpDat = setupDatAccess( "GatheringExp", xiv::exd::Language::none ); - m_GatheringItemDat = setupDatAccess( "GatheringItem", xiv::exd::Language::none ); - m_GatheringItemLevelConvertTableDat = setupDatAccess( "GatheringItemLevelConvertTable", xiv::exd::Language::none ); - m_GatheringItemPointDat = setupDatAccess( "GatheringItemPoint", xiv::exd::Language::none ); - m_GatheringNotebookListDat = setupDatAccess( "GatheringNotebookList", xiv::exd::Language::none ); - m_GatheringPointDat = setupDatAccess( "GatheringPoint", xiv::exd::Language::none ); - m_GatheringPointBaseDat = setupDatAccess( "GatheringPointBase", xiv::exd::Language::none ); - m_GatheringPointBonusDat = setupDatAccess( "GatheringPointBonus", xiv::exd::Language::none ); - m_GatheringPointBonusTypeDat = setupDatAccess( "GatheringPointBonusType", xiv::exd::Language::en ); - m_GatheringPointNameDat = setupDatAccess( "GatheringPointName", xiv::exd::Language::en ); - m_GatheringSubCategoryDat = setupDatAccess( "GatheringSubCategory", xiv::exd::Language::en ); - m_GatheringTypeDat = setupDatAccess( "GatheringType", xiv::exd::Language::en ); - m_GcArmyExpeditionDat = setupDatAccess( "GcArmyExpedition", xiv::exd::Language::en ); - m_GcArmyExpeditionMemberBonusDat = setupDatAccess( "GcArmyExpeditionMemberBonus", xiv::exd::Language::none ); - m_GcArmyExpeditionTypeDat = setupDatAccess( "GcArmyExpeditionType", xiv::exd::Language::en ); - m_GcArmyMemberGrowDat = setupDatAccess( "GcArmyMemberGrow", xiv::exd::Language::none ); - m_GcArmyTrainingDat = setupDatAccess( "GcArmyTraining", xiv::exd::Language::en ); - m_GCRankGridaniaFemaleTextDat = setupDatAccess( "GCRankGridaniaFemaleText", xiv::exd::Language::en ); - m_GCRankGridaniaMaleTextDat = setupDatAccess( "GCRankGridaniaMaleText", xiv::exd::Language::en ); - m_GCRankLimsaFemaleTextDat = setupDatAccess( "GCRankLimsaFemaleText", xiv::exd::Language::en ); - m_GCRankLimsaMaleTextDat = setupDatAccess( "GCRankLimsaMaleText", xiv::exd::Language::en ); - m_GCRankUldahFemaleTextDat = setupDatAccess( "GCRankUldahFemaleText", xiv::exd::Language::en ); - m_GCRankUldahMaleTextDat = setupDatAccess( "GCRankUldahMaleText", xiv::exd::Language::en ); - m_GCScripShopCategoryDat = setupDatAccess( "GCScripShopCategory", xiv::exd::Language::none ); - m_GCScripShopItemDat = setupDatAccess( "GCScripShopItem", xiv::exd::Language::none ); - m_GCShopDat = setupDatAccess( "GCShop", xiv::exd::Language::none ); - m_GCShopItemCategoryDat = setupDatAccess( "GCShopItemCategory", xiv::exd::Language::en ); - m_GCSupplyDutyDat = setupDatAccess( "GCSupplyDuty", xiv::exd::Language::none ); - m_GCSupplyDutyRewardDat = setupDatAccess( "GCSupplyDutyReward", xiv::exd::Language::none ); - m_GeneralActionDat = setupDatAccess( "GeneralAction", xiv::exd::Language::en ); - m_GilShopDat = setupDatAccess( "GilShop", xiv::exd::Language::en ); - m_GilShopItemDat = setupDatAccess( "GilShopItem", xiv::exd::Language::none ); - m_GoldSaucerTextDataDat = setupDatAccess( "GoldSaucerTextData", xiv::exd::Language::en ); - m_GrandCompanyDat = setupDatAccess( "GrandCompany", xiv::exd::Language::en ); - m_GrandCompanyRankDat = setupDatAccess( "GrandCompanyRank", xiv::exd::Language::none ); - m_GuardianDeityDat = setupDatAccess( "GuardianDeity", xiv::exd::Language::en ); - m_GuildleveAssignmentDat = setupDatAccess( "GuildleveAssignment", xiv::exd::Language::none ); - m_GuildOrderGuideDat = setupDatAccess( "GuildOrderGuide", xiv::exd::Language::none ); - m_GuildOrderOfficerDat = setupDatAccess( "GuildOrderOfficer", xiv::exd::Language::none ); - m_HouseRetainerPoseDat = setupDatAccess( "HouseRetainerPose", xiv::exd::Language::none ); - m_HousingFurnitureDat = setupDatAccess( "HousingFurniture", xiv::exd::Language::none ); - m_HousingYardObjectDat = setupDatAccess( "HousingYardObject", xiv::exd::Language::none ); - m_InstanceContentDat = setupDatAccess( "InstanceContent", xiv::exd::Language::en ); - m_InstanceContentBuffDat = setupDatAccess( "InstanceContentBuff", xiv::exd::Language::none ); - m_InstanceContentTextDataDat = setupDatAccess( "InstanceContentTextData", xiv::exd::Language::en ); - m_ItemDat = setupDatAccess( "Item", xiv::exd::Language::en ); - m_ItemActionDat = setupDatAccess( "ItemAction", xiv::exd::Language::none ); - m_ItemFoodDat = setupDatAccess( "ItemFood", xiv::exd::Language::none ); - m_ItemSearchCategoryDat = setupDatAccess( "ItemSearchCategory", xiv::exd::Language::en ); - m_ItemSeriesDat = setupDatAccess( "ItemSeries", xiv::exd::Language::en ); - m_ItemSpecialBonusDat = setupDatAccess( "ItemSpecialBonus", xiv::exd::Language::en ); - m_ItemUICategoryDat = setupDatAccess( "ItemUICategory", xiv::exd::Language::en ); - m_JournalCategoryDat = setupDatAccess( "JournalCategory", xiv::exd::Language::en ); - m_JournalGenreDat = setupDatAccess( "JournalGenre", xiv::exd::Language::en ); - m_JournalSectionDat = setupDatAccess( "JournalSection", xiv::exd::Language::en ); - m_LeveDat = setupDatAccess( "Leve", xiv::exd::Language::en ); - m_LeveAssignmentTypeDat = setupDatAccess( "LeveAssignmentType", xiv::exd::Language::en ); - m_LeveClientDat = setupDatAccess( "LeveClient", xiv::exd::Language::en ); - m_LevelDat = setupDatAccess( "Level", xiv::exd::Language::none ); - m_LeveRewardItemDat = setupDatAccess( "LeveRewardItem", xiv::exd::Language::none ); - m_LeveRewardItemGroupDat = setupDatAccess( "LeveRewardItemGroup", xiv::exd::Language::none ); - m_LeveVfxDat = setupDatAccess( "LeveVfx", xiv::exd::Language::none ); - m_LogFilterDat = setupDatAccess( "LogFilter", xiv::exd::Language::en ); - m_LogKindDat = setupDatAccess( "LogKind", xiv::exd::Language::en ); - m_LogKindCategoryTextDat = setupDatAccess( "LogKindCategoryText", xiv::exd::Language::en ); - m_LogMessageDat = setupDatAccess( "LogMessage", xiv::exd::Language::en ); - m_MacroIconDat = setupDatAccess( "MacroIcon", xiv::exd::Language::none ); - m_MacroIconRedirectOldDat = setupDatAccess( "MacroIconRedirectOld", xiv::exd::Language::none ); - m_MainCommandDat = setupDatAccess( "MainCommand", xiv::exd::Language::en ); - m_MainCommandCategoryDat = setupDatAccess( "MainCommandCategory", xiv::exd::Language::en ); - m_MapDat = setupDatAccess( "Map", xiv::exd::Language::none ); - m_MapMarkerDat = setupDatAccess( "MapMarker", xiv::exd::Language::none ); - m_MapMarkerRegionDat = setupDatAccess( "MapMarkerRegion", xiv::exd::Language::none ); - m_MapSymbolDat = setupDatAccess( "MapSymbol", xiv::exd::Language::none ); - m_MarkerDat = setupDatAccess( "Marker", xiv::exd::Language::en ); - m_MasterpieceSupplyDutyDat = setupDatAccess( "MasterpieceSupplyDuty", xiv::exd::Language::none ); - m_MasterpieceSupplyMultiplierDat = setupDatAccess( "MasterpieceSupplyMultiplier", xiv::exd::Language::none ); - m_MateriaDat = setupDatAccess( "Materia", xiv::exd::Language::none ); - m_MinionRaceDat = setupDatAccess( "MinionRace", xiv::exd::Language::en ); - m_MinionRulesDat = setupDatAccess( "MinionRules", xiv::exd::Language::en ); - m_MinionSkillTypeDat = setupDatAccess( "MinionSkillType", xiv::exd::Language::en ); - m_MobHuntTargetDat = setupDatAccess( "MobHuntTarget", xiv::exd::Language::none ); - m_ModelCharaDat = setupDatAccess( "ModelChara", xiv::exd::Language::none ); - m_MonsterNoteDat = setupDatAccess( "MonsterNote", xiv::exd::Language::en ); - m_MonsterNoteTargetDat = setupDatAccess( "MonsterNoteTarget", xiv::exd::Language::none ); - m_MountDat = setupDatAccess( "Mount", xiv::exd::Language::en ); - m_MountActionDat = setupDatAccess( "MountAction", xiv::exd::Language::none ); - m_MoveTimelineDat = setupDatAccess( "MoveTimeline", xiv::exd::Language::none ); - m_MoveVfxDat = setupDatAccess( "MoveVfx", xiv::exd::Language::none ); - m_NpcEquipDat = setupDatAccess( "NpcEquip", xiv::exd::Language::none ); - m_OmenDat = setupDatAccess( "Omen", xiv::exd::Language::none ); - m_OnlineStatusDat = setupDatAccess( "OnlineStatus", xiv::exd::Language::en ); - m_OpeningDat = setupDatAccess( "Opening", xiv::exd::Language::none ); - m_OrchestrionDat = setupDatAccess( "Orchestrion", xiv::exd::Language::en ); - m_OrchestrionCategoryDat = setupDatAccess( "OrchestrionCategory", xiv::exd::Language::en ); - m_OrchestrionPathDat = setupDatAccess( "OrchestrionPath", xiv::exd::Language::none ); - m_OrchestrionUiparamDat = setupDatAccess( "OrchestrionUiparam", xiv::exd::Language::none ); - m_ParamGrowDat = setupDatAccess( "ParamGrow", xiv::exd::Language::none ); - m_PerformDat = setupDatAccess( "Perform", xiv::exd::Language::en ); - m_PerformTransientDat = setupDatAccess( "PerformTransient", xiv::exd::Language::en ); - m_PetDat = setupDatAccess( "Pet", xiv::exd::Language::en ); - m_PetActionDat = setupDatAccess( "PetAction", xiv::exd::Language::en ); - m_PictureDat = setupDatAccess( "Picture", xiv::exd::Language::none ); - m_PlaceNameDat = setupDatAccess( "PlaceName", xiv::exd::Language::en ); - m_PublicContentDat = setupDatAccess( "PublicContent", xiv::exd::Language::en ); - m_PvPActionSortDat = setupDatAccess( "PvPActionSort", xiv::exd::Language::none ); - m_QuestDat = setupDatAccess( "Quest", xiv::exd::Language::en ); - m_QuestClassJobRewardDat = setupDatAccess( "QuestClassJobReward", xiv::exd::Language::none ); - m_QuestRepeatFlagDat = setupDatAccess( "QuestRepeatFlag", xiv::exd::Language::none ); - m_QuestRewardOtherDat = setupDatAccess( "QuestRewardOther", xiv::exd::Language::en ); - m_QuickChatDat = setupDatAccess( "QuickChat", xiv::exd::Language::en ); - m_QuickChatTransientDat = setupDatAccess( "QuickChatTransient", xiv::exd::Language::en ); - m_RaceDat = setupDatAccess( "Race", xiv::exd::Language::en ); - m_RacingChocoboItemDat = setupDatAccess( "RacingChocoboItem", xiv::exd::Language::none ); - m_RacingChocoboNameDat = setupDatAccess( "RacingChocoboName", xiv::exd::Language::en ); - m_RacingChocoboNameCategoryDat = setupDatAccess( "RacingChocoboNameCategory", xiv::exd::Language::en ); - m_RacingChocoboNameInfoDat = setupDatAccess( "RacingChocoboNameInfo", xiv::exd::Language::none ); - m_RacingChocoboParamDat = setupDatAccess( "RacingChocoboParam", xiv::exd::Language::en ); - m_RecipeDat = setupDatAccess( "Recipe", xiv::exd::Language::none ); - m_RecipeElementDat = setupDatAccess( "RecipeElement", xiv::exd::Language::en ); - m_RecipeLevelTableDat = setupDatAccess( "RecipeLevelTable", xiv::exd::Language::none ); - m_RecipeNotebookListDat = setupDatAccess( "RecipeNotebookList", xiv::exd::Language::none ); - m_RecommendContentsDat = setupDatAccess( "RecommendContents", xiv::exd::Language::none ); - m_RelicDat = setupDatAccess( "Relic", xiv::exd::Language::none ); - m_Relic3Dat = setupDatAccess( "Relic3", xiv::exd::Language::none ); - m_RelicItemDat = setupDatAccess( "RelicItem", xiv::exd::Language::none ); - m_RelicNoteDat = setupDatAccess( "RelicNote", xiv::exd::Language::none ); - m_RelicNoteCategoryDat = setupDatAccess( "RelicNoteCategory", xiv::exd::Language::en ); - m_RetainerTaskDat = setupDatAccess( "RetainerTask", xiv::exd::Language::none ); - m_RetainerTaskLvRangeDat = setupDatAccess( "RetainerTaskLvRange", xiv::exd::Language::none ); - m_RetainerTaskNormalDat = setupDatAccess( "RetainerTaskNormal", xiv::exd::Language::none ); - m_RetainerTaskParameterDat = setupDatAccess( "RetainerTaskParameter", xiv::exd::Language::none ); - m_RetainerTaskRandomDat = setupDatAccess( "RetainerTaskRandom", xiv::exd::Language::en ); - m_SalvageDat = setupDatAccess( "Salvage", xiv::exd::Language::none ); - m_SatisfactionNpcDat = setupDatAccess( "SatisfactionNpc", xiv::exd::Language::none ); - m_SatisfactionSupplyDat = setupDatAccess( "SatisfactionSupply", xiv::exd::Language::none ); - m_SatisfactionSupplyRewardDat = setupDatAccess( "SatisfactionSupplyReward", xiv::exd::Language::none ); - m_ScenarioTreeDat = setupDatAccess( "ScenarioTree", xiv::exd::Language::none ); - m_ScenarioTreeTipsDat = setupDatAccess( "ScenarioTreeTips", xiv::exd::Language::none ); - m_ScenarioTreeTipsClassQuestDat = setupDatAccess( "ScenarioTreeTipsClassQuest", xiv::exd::Language::none ); - m_ScenarioTreeTipsQuestDat = setupDatAccess( "ScenarioTreeTipsQuest", xiv::exd::Language::none ); - m_ScenarioTypeDat = setupDatAccess( "ScenarioType", xiv::exd::Language::en ); - m_ScreenImageDat = setupDatAccess( "ScreenImage", xiv::exd::Language::none ); - m_SecretRecipeBookDat = setupDatAccess( "SecretRecipeBook", xiv::exd::Language::en ); - m_SkyIsland2MissionDat = setupDatAccess( "SkyIsland2Mission", xiv::exd::Language::en ); - m_SkyIsland2MissionDetailDat = setupDatAccess( "SkyIsland2MissionDetail", xiv::exd::Language::en ); - m_SkyIsland2MissionTypeDat = setupDatAccess( "SkyIsland2MissionType", xiv::exd::Language::none ); - m_SkyIsland2RangeTypeDat = setupDatAccess( "SkyIsland2RangeType", xiv::exd::Language::none ); - m_SpearfishingItemDat = setupDatAccess( "SpearfishingItem", xiv::exd::Language::en ); - m_SpearfishingNotebookDat = setupDatAccess( "SpearfishingNotebook", xiv::exd::Language::none ); - m_SpecialShopDat = setupDatAccess( "SpecialShop", xiv::exd::Language::en ); - m_SpecialShopItemCategoryDat = setupDatAccess( "SpecialShopItemCategory", xiv::exd::Language::en ); - m_StainDat = setupDatAccess( "Stain", xiv::exd::Language::en ); - m_StainTransientDat = setupDatAccess( "StainTransient", xiv::exd::Language::none ); - m_StatusDat = setupDatAccess( "Status", xiv::exd::Language::en ); - m_StatusHitEffectDat = setupDatAccess( "StatusHitEffect", xiv::exd::Language::none ); - m_StatusLoopVFXDat = setupDatAccess( "StatusLoopVFX", xiv::exd::Language::none ); - m_StoryDat = setupDatAccess( "Story", xiv::exd::Language::none ); - m_SubmarineExplorationDat = setupDatAccess( "SubmarineExploration", xiv::exd::Language::en ); - m_SubmarinePartDat = setupDatAccess( "SubmarinePart", xiv::exd::Language::none ); - m_SubmarineRankDat = setupDatAccess( "SubmarineRank", xiv::exd::Language::none ); - m_SwitchTalkDat = setupDatAccess( "SwitchTalk", xiv::exd::Language::none ); - m_TerritoryTypeDat = setupDatAccess( "TerritoryType", xiv::exd::Language::none ); - m_TextCommandDat = setupDatAccess( "TextCommand", xiv::exd::Language::en ); - m_TitleDat = setupDatAccess( "Title", xiv::exd::Language::en ); - m_TomestonesDat = setupDatAccess( "Tomestones", xiv::exd::Language::none ); - m_TomestonesItemDat = setupDatAccess( "TomestonesItem", xiv::exd::Language::none ); - m_TopicSelectDat = setupDatAccess( "TopicSelect", xiv::exd::Language::en ); - m_TownDat = setupDatAccess( "Town", xiv::exd::Language::en ); - m_TraitDat = setupDatAccess( "Trait", xiv::exd::Language::en ); - m_TraitRecastDat = setupDatAccess( "TraitRecast", xiv::exd::Language::none ); - m_TraitTransientDat = setupDatAccess( "TraitTransient", xiv::exd::Language::en ); - m_TransformationDat = setupDatAccess( "Transformation", xiv::exd::Language::none ); - m_TreasureDat = setupDatAccess( "Treasure", xiv::exd::Language::en ); - m_TreasureHuntRankDat = setupDatAccess( "TreasureHuntRank", xiv::exd::Language::none ); - m_TribeDat = setupDatAccess( "Tribe", xiv::exd::Language::en ); - m_TripleTriadDat = setupDatAccess( "TripleTriad", xiv::exd::Language::none ); - m_TripleTriadCardDat = setupDatAccess( "TripleTriadCard", xiv::exd::Language::en ); - m_TripleTriadCardRarityDat = setupDatAccess( "TripleTriadCardRarity", xiv::exd::Language::none ); - m_TripleTriadCardResidentDat = setupDatAccess( "TripleTriadCardResident", xiv::exd::Language::none ); - m_TripleTriadCardTypeDat = setupDatAccess( "TripleTriadCardType", xiv::exd::Language::en ); - m_TripleTriadCompetitionDat = setupDatAccess( "TripleTriadCompetition", xiv::exd::Language::en ); - m_TripleTriadRuleDat = setupDatAccess( "TripleTriadRule", xiv::exd::Language::en ); - m_TutorialDat = setupDatAccess( "Tutorial", xiv::exd::Language::none ); - m_TutorialDPSDat = setupDatAccess( "TutorialDPS", xiv::exd::Language::none ); - m_TutorialHealerDat = setupDatAccess( "TutorialHealer", xiv::exd::Language::none ); - m_TutorialTankDat = setupDatAccess( "TutorialTank", xiv::exd::Language::none ); - m_VaseFlowerDat = setupDatAccess( "VaseFlower", xiv::exd::Language::none ); - m_VFXDat = setupDatAccess( "VFX", xiv::exd::Language::none ); - m_WarpDat = setupDatAccess( "Warp", xiv::exd::Language::en ); - m_WarpConditionDat = setupDatAccess( "WarpCondition", xiv::exd::Language::none ); - m_WeatherDat = setupDatAccess( "Weather", xiv::exd::Language::en ); - m_WeatherGroupDat = setupDatAccess( "WeatherGroup", xiv::exd::Language::none ); - m_WeatherRateDat = setupDatAccess( "WeatherRate", xiv::exd::Language::none ); - m_WeddingBGMDat = setupDatAccess( "WeddingBGM", xiv::exd::Language::en ); - m_WeeklyBingoOrderDataDat = setupDatAccess( "WeeklyBingoOrderData", xiv::exd::Language::none ); - m_WeeklyBingoRewardDataDat = setupDatAccess( "WeeklyBingoRewardData", xiv::exd::Language::none ); - m_WeeklyBingoTextDat = setupDatAccess( "WeeklyBingoText", xiv::exd::Language::en ); - m_WorldDat = setupDatAccess( "World", xiv::exd::Language::none ); - m_WorldDCGroupTypeDat = setupDatAccess( "WorldDCGroupType", xiv::exd::Language::none ); - m_YKWDat = setupDatAccess( "YKW", xiv::exd::Language::en ); - m_ZoneSharedGroupDat = setupDatAccess( "ZoneSharedGroup", xiv::exd::Language::none ); + m_AchievementDat = setupDatAccess( "Achievement", xiv::exd::Language::en ); + m_AchievementCategoryDat = setupDatAccess( "AchievementCategory", xiv::exd::Language::en ); + m_AchievementKindDat = setupDatAccess( "AchievementKind", xiv::exd::Language::en ); + m_ActionDat = setupDatAccess( "Action", xiv::exd::Language::en ); + m_ActionCastTimelineDat = setupDatAccess( "ActionCastTimeline", xiv::exd::Language::none ); + m_ActionCastVFXDat = setupDatAccess( "ActionCastVFX", xiv::exd::Language::none ); + m_ActionCategoryDat = setupDatAccess( "ActionCategory", xiv::exd::Language::en ); + m_ActionComboRouteDat = setupDatAccess( "ActionComboRoute", xiv::exd::Language::en ); + m_ActionIndirectionDat = setupDatAccess( "ActionIndirection", xiv::exd::Language::none ); + m_ActionParamDat = setupDatAccess( "ActionParam", xiv::exd::Language::none ); + m_ActionProcStatusDat = setupDatAccess( "ActionProcStatus", xiv::exd::Language::none ); + m_ActionTimelineDat = setupDatAccess( "ActionTimeline", xiv::exd::Language::none ); + m_ActionTimelineReplaceDat = setupDatAccess( "ActionTimelineReplace", xiv::exd::Language::none ); + m_ActionTransientDat = setupDatAccess( "ActionTransient", xiv::exd::Language::en ); + m_AddonDat = setupDatAccess( "Addon", xiv::exd::Language::en ); + m_AdventureDat = setupDatAccess( "Adventure", xiv::exd::Language::en ); + m_AdventureExPhaseDat = setupDatAccess( "AdventureExPhase", xiv::exd::Language::none ); + m_AetherCurrentDat = setupDatAccess( "AetherCurrent", xiv::exd::Language::none ); + m_AetherCurrentCompFlgSetDat = setupDatAccess( "AetherCurrentCompFlgSet", xiv::exd::Language::none ); + m_AetherialWheelDat = setupDatAccess( "AetherialWheel", xiv::exd::Language::none ); + m_AetheryteDat = setupDatAccess( "Aetheryte", xiv::exd::Language::en ); + m_AirshipExplorationLevelDat = setupDatAccess( "AirshipExplorationLevel", xiv::exd::Language::none ); + m_AirshipExplorationLogDat = setupDatAccess( "AirshipExplorationLog", xiv::exd::Language::en ); + m_AirshipExplorationParamTypeDat = setupDatAccess( "AirshipExplorationParamType", xiv::exd::Language::en ); + m_AirshipExplorationPartDat = setupDatAccess( "AirshipExplorationPart", xiv::exd::Language::none ); + m_AirshipExplorationPointDat = setupDatAccess( "AirshipExplorationPoint", xiv::exd::Language::en ); + m_AnimaWeapon5Dat = setupDatAccess( "AnimaWeapon5", xiv::exd::Language::none ); + m_AnimaWeapon5ParamDat = setupDatAccess( "AnimaWeapon5Param", xiv::exd::Language::en ); + m_AnimaWeapon5PatternGroupDat = setupDatAccess( "AnimaWeapon5PatternGroup", xiv::exd::Language::en ); + m_AnimaWeapon5SpiritTalkDat = setupDatAccess( "AnimaWeapon5SpiritTalk", xiv::exd::Language::none ); + m_AnimaWeapon5SpiritTalkParamDat = setupDatAccess( "AnimaWeapon5SpiritTalkParam", xiv::exd::Language::en ); + m_AnimaWeapon5TradeItemDat = setupDatAccess( "AnimaWeapon5TradeItem", xiv::exd::Language::none ); + m_AnimaWeaponFUITalkDat = setupDatAccess( "AnimaWeaponFUITalk", xiv::exd::Language::none ); + m_AnimaWeaponFUITalkParamDat = setupDatAccess( "AnimaWeaponFUITalkParam", xiv::exd::Language::en ); + m_AnimaWeaponIconDat = setupDatAccess( "AnimaWeaponIcon", xiv::exd::Language::none ); + m_AnimaWeaponItemDat = setupDatAccess( "AnimaWeaponItem", xiv::exd::Language::none ); + m_AquariumFishDat = setupDatAccess( "AquariumFish", xiv::exd::Language::none ); + m_AquariumWaterDat = setupDatAccess( "AquariumWater", xiv::exd::Language::en ); + m_AttackTypeDat = setupDatAccess( "AttackType", xiv::exd::Language::en ); + m_BalloonDat = setupDatAccess( "Balloon", xiv::exd::Language::en ); + m_BaseParamDat = setupDatAccess( "BaseParam", xiv::exd::Language::en ); + m_BattleLeveDat = setupDatAccess( "BattleLeve", xiv::exd::Language::none ); + m_BeastRankBonusDat = setupDatAccess( "BeastRankBonus", xiv::exd::Language::none ); + m_BeastReputationRankDat = setupDatAccess( "BeastReputationRank", xiv::exd::Language::en ); + m_BeastTribeDat = setupDatAccess( "BeastTribe", xiv::exd::Language::en ); + m_BehaviorDat = setupDatAccess( "Behavior", xiv::exd::Language::none ); + m_BGMDat = setupDatAccess( "BGM", xiv::exd::Language::none ); + m_BNpcAnnounceIconDat = setupDatAccess( "BNpcAnnounceIcon", xiv::exd::Language::none ); + m_BNpcBaseDat = setupDatAccess( "BNpcBase", xiv::exd::Language::none ); + m_BNpcCustomizeDat = setupDatAccess( "BNpcCustomize", xiv::exd::Language::none ); + m_BNpcNameDat = setupDatAccess( "BNpcName", xiv::exd::Language::en ); + m_BuddyDat = setupDatAccess( "Buddy", xiv::exd::Language::none ); + m_BuddyActionDat = setupDatAccess( "BuddyAction", xiv::exd::Language::en ); + m_BuddyEquipDat = setupDatAccess( "BuddyEquip", xiv::exd::Language::en ); + m_BuddyItemDat = setupDatAccess( "BuddyItem", xiv::exd::Language::none ); + m_BuddyRankDat = setupDatAccess( "BuddyRank", xiv::exd::Language::none ); + m_BuddySkillDat = setupDatAccess( "BuddySkill", xiv::exd::Language::none ); + m_CabinetDat = setupDatAccess( "Cabinet", xiv::exd::Language::none ); + m_CabinetCategoryDat = setupDatAccess( "CabinetCategory", xiv::exd::Language::none ); + m_CalendarDat = setupDatAccess( "Calendar", xiv::exd::Language::none ); + m_CharaMakeCustomizeDat = setupDatAccess( "CharaMakeCustomize", xiv::exd::Language::none ); + m_CharaMakeTypeDat = setupDatAccess( "CharaMakeType", xiv::exd::Language::en ); + m_ChocoboRaceDat = setupDatAccess( "ChocoboRace", xiv::exd::Language::none ); + m_ChocoboRaceAbilityDat = setupDatAccess( "ChocoboRaceAbility", xiv::exd::Language::en ); + m_ChocoboRaceAbilityTypeDat = setupDatAccess( "ChocoboRaceAbilityType", xiv::exd::Language::none ); + m_ChocoboRaceItemDat = setupDatAccess( "ChocoboRaceItem", xiv::exd::Language::en ); + m_ChocoboRaceRankDat = setupDatAccess( "ChocoboRaceRank", xiv::exd::Language::none ); + m_ChocoboRaceStatusDat = setupDatAccess( "ChocoboRaceStatus", xiv::exd::Language::none ); + m_ChocoboRaceTerritoryDat = setupDatAccess( "ChocoboRaceTerritory", xiv::exd::Language::none ); + m_ChocoboTaxiDat = setupDatAccess( "ChocoboTaxi", xiv::exd::Language::none ); + m_ChocoboTaxiStandDat = setupDatAccess( "ChocoboTaxiStand", xiv::exd::Language::en ); + m_ClassJobDat = setupDatAccess( "ClassJob", xiv::exd::Language::en ); + m_ClassJobCategoryDat = setupDatAccess( "ClassJobCategory", xiv::exd::Language::en ); + m_CompanionDat = setupDatAccess( "Companion", xiv::exd::Language::en ); + m_CompanionMoveDat = setupDatAccess( "CompanionMove", xiv::exd::Language::en ); + m_CompanionTransientDat = setupDatAccess( "CompanionTransient", xiv::exd::Language::en ); + m_CompanyActionDat = setupDatAccess( "CompanyAction", xiv::exd::Language::en ); + m_CompanyCraftDraftDat = setupDatAccess( "CompanyCraftDraft", xiv::exd::Language::en ); + m_CompanyCraftDraftCategoryDat = setupDatAccess( "CompanyCraftDraftCategory", xiv::exd::Language::en ); + m_CompanyCraftManufactoryStateDat = setupDatAccess( "CompanyCraftManufactoryState", xiv::exd::Language::en ); + m_CompanyCraftPartDat = setupDatAccess( "CompanyCraftPart", xiv::exd::Language::none ); + m_CompanyCraftProcessDat = setupDatAccess( "CompanyCraftProcess", xiv::exd::Language::none ); + m_CompanyCraftSequenceDat = setupDatAccess( "CompanyCraftSequence", xiv::exd::Language::none ); + m_CompanyCraftSupplyItemDat = setupDatAccess( "CompanyCraftSupplyItem", xiv::exd::Language::none ); + m_CompanyCraftTypeDat = setupDatAccess( "CompanyCraftType", xiv::exd::Language::en ); + m_CompleteJournalDat = setupDatAccess( "CompleteJournal", xiv::exd::Language::en ); + m_CompleteJournalCategoryDat = setupDatAccess( "CompleteJournalCategory", xiv::exd::Language::none ); + m_ContentExActionDat = setupDatAccess( "ContentExAction", xiv::exd::Language::none ); + m_ContentFinderConditionDat = setupDatAccess( "ContentFinderCondition", xiv::exd::Language::en ); + m_ContentFinderConditionTransientDat = setupDatAccess( "ContentFinderConditionTransient", xiv::exd::Language::en ); + m_ContentMemberTypeDat = setupDatAccess( "ContentMemberType", xiv::exd::Language::none ); + m_ContentNpcTalkDat = setupDatAccess( "ContentNpcTalk", xiv::exd::Language::none ); + m_ContentRouletteDat = setupDatAccess( "ContentRoulette", xiv::exd::Language::en ); + m_ContentsNoteDat = setupDatAccess( "ContentsNote", xiv::exd::Language::en ); + m_ContentsNoteCategoryDat = setupDatAccess( "ContentsNoteCategory", xiv::exd::Language::none ); + m_ContentTalkDat = setupDatAccess( "ContentTalk", xiv::exd::Language::en ); + m_ContentTalkParamDat = setupDatAccess( "ContentTalkParam", xiv::exd::Language::none ); + m_ContentTypeDat = setupDatAccess( "ContentType", xiv::exd::Language::en ); + m_CraftActionDat = setupDatAccess( "CraftAction", xiv::exd::Language::en ); + m_CraftLeveDat = setupDatAccess( "CraftLeve", xiv::exd::Language::none ); + m_CraftTypeDat = setupDatAccess( "CraftType", xiv::exd::Language::en ); + m_CurrencyDat = setupDatAccess( "Currency", xiv::exd::Language::none ); + m_CustomTalkDat = setupDatAccess( "CustomTalk", xiv::exd::Language::en ); + m_CutsceneDat = setupDatAccess( "Cutscene", xiv::exd::Language::none ); + m_CutScreenImageDat = setupDatAccess( "CutScreenImage", xiv::exd::Language::none ); + m_DailySupplyItemDat = setupDatAccess( "DailySupplyItem", xiv::exd::Language::none ); + m_DeepDungeonBanDat = setupDatAccess( "DeepDungeonBan", xiv::exd::Language::none ); + m_DeepDungeonDangerDat = setupDatAccess( "DeepDungeonDanger", xiv::exd::Language::none ); + m_DeepDungeonEquipmentDat = setupDatAccess( "DeepDungeonEquipment", xiv::exd::Language::en ); + m_DeepDungeonFloorEffectUIDat = setupDatAccess( "DeepDungeonFloorEffectUI", xiv::exd::Language::en ); + m_DeepDungeonItemDat = setupDatAccess( "DeepDungeonItem", xiv::exd::Language::en ); + m_DeepDungeonStatusDat = setupDatAccess( "DeepDungeonStatus", xiv::exd::Language::none ); + m_DefaultTalkDat = setupDatAccess( "DefaultTalk", xiv::exd::Language::en ); + m_DeliveryQuestDat = setupDatAccess( "DeliveryQuest", xiv::exd::Language::none ); + m_DisposalShopDat = setupDatAccess( "DisposalShop", xiv::exd::Language::en ); + m_DisposalShopFilterTypeDat = setupDatAccess( "DisposalShopFilterType", xiv::exd::Language::en ); + m_DisposalShopItemDat = setupDatAccess( "DisposalShopItem", xiv::exd::Language::none ); + m_DpsChallengeDat = setupDatAccess( "DpsChallenge", xiv::exd::Language::en ); + m_DpsChallengeOfficerDat = setupDatAccess( "DpsChallengeOfficer", xiv::exd::Language::none ); + m_DpsChallengeTransientDat = setupDatAccess( "DpsChallengeTransient", xiv::exd::Language::none ); + m_EmoteDat = setupDatAccess( "Emote", xiv::exd::Language::en ); + m_EmoteCategoryDat = setupDatAccess( "EmoteCategory", xiv::exd::Language::en ); + m_EmoteModeDat = setupDatAccess( "EmoteMode", xiv::exd::Language::none ); + m_ENpcBaseDat = setupDatAccess( "ENpcBase", xiv::exd::Language::none ); + m_ENpcResidentDat = setupDatAccess( "ENpcResident", xiv::exd::Language::en ); + m_EObjDat = setupDatAccess( "EObj", xiv::exd::Language::none ); + m_EObjNameDat = setupDatAccess( "EObjName", xiv::exd::Language::en ); + m_EquipRaceCategoryDat = setupDatAccess( "EquipRaceCategory", xiv::exd::Language::none ); + m_EquipSlotCategoryDat = setupDatAccess( "EquipSlotCategory", xiv::exd::Language::none ); + m_EurekaAethernetDat = setupDatAccess( "EurekaAethernet", xiv::exd::Language::none ); + m_EurekaGrowDataDat = setupDatAccess( "EurekaGrowData", xiv::exd::Language::none ); + m_EurekaSphereElementAdjustDat = setupDatAccess( "EurekaSphereElementAdjust", xiv::exd::Language::none ); + m_EventActionDat = setupDatAccess( "EventAction", xiv::exd::Language::en ); + m_EventIconPriorityDat = setupDatAccess( "EventIconPriority", xiv::exd::Language::none ); + m_EventIconTypeDat = setupDatAccess( "EventIconType", xiv::exd::Language::none ); + m_EventItemDat = setupDatAccess( "EventItem", xiv::exd::Language::en ); + m_EventItemHelpDat = setupDatAccess( "EventItemHelp", xiv::exd::Language::en ); + m_ExVersionDat = setupDatAccess( "ExVersion", xiv::exd::Language::en ); + m_FateDat = setupDatAccess( "Fate", xiv::exd::Language::en ); + m_FCActivityDat = setupDatAccess( "FCActivity", xiv::exd::Language::en ); + m_FCActivityCategoryDat = setupDatAccess( "FCActivityCategory", xiv::exd::Language::en ); + m_FCAuthorityDat = setupDatAccess( "FCAuthority", xiv::exd::Language::en ); + m_FCAuthorityCategoryDat = setupDatAccess( "FCAuthorityCategory", xiv::exd::Language::en ); + m_FCChestNameDat = setupDatAccess( "FCChestName", xiv::exd::Language::en ); + m_FccShopDat = setupDatAccess( "FccShop", xiv::exd::Language::en ); + m_FCHierarchyDat = setupDatAccess( "FCHierarchy", xiv::exd::Language::en ); + m_FCProfileDat = setupDatAccess( "FCProfile", xiv::exd::Language::en ); + m_FCReputationDat = setupDatAccess( "FCReputation", xiv::exd::Language::en ); + m_FCRightsDat = setupDatAccess( "FCRights", xiv::exd::Language::en ); + m_FieldMarkerDat = setupDatAccess( "FieldMarker", xiv::exd::Language::en ); + m_FishingSpotDat = setupDatAccess( "FishingSpot", xiv::exd::Language::en ); + m_FishParameterDat = setupDatAccess( "FishParameter", xiv::exd::Language::en ); + m_GardeningSeedDat = setupDatAccess( "GardeningSeed", xiv::exd::Language::none ); + m_GatheringConditionDat = setupDatAccess( "GatheringCondition", xiv::exd::Language::en ); + m_GatheringExpDat = setupDatAccess( "GatheringExp", xiv::exd::Language::none ); + m_GatheringItemDat = setupDatAccess( "GatheringItem", xiv::exd::Language::none ); + m_GatheringItemLevelConvertTableDat = setupDatAccess( "GatheringItemLevelConvertTable", xiv::exd::Language::none ); + m_GatheringItemPointDat = setupDatAccess( "GatheringItemPoint", xiv::exd::Language::none ); + m_GatheringNotebookListDat = setupDatAccess( "GatheringNotebookList", xiv::exd::Language::none ); + m_GatheringPointDat = setupDatAccess( "GatheringPoint", xiv::exd::Language::none ); + m_GatheringPointBaseDat = setupDatAccess( "GatheringPointBase", xiv::exd::Language::none ); + m_GatheringPointBonusDat = setupDatAccess( "GatheringPointBonus", xiv::exd::Language::none ); + m_GatheringPointBonusTypeDat = setupDatAccess( "GatheringPointBonusType", xiv::exd::Language::en ); + m_GatheringPointNameDat = setupDatAccess( "GatheringPointName", xiv::exd::Language::en ); + m_GatheringSubCategoryDat = setupDatAccess( "GatheringSubCategory", xiv::exd::Language::en ); + m_GatheringTypeDat = setupDatAccess( "GatheringType", xiv::exd::Language::en ); + m_GcArmyExpeditionDat = setupDatAccess( "GcArmyExpedition", xiv::exd::Language::en ); + m_GcArmyExpeditionMemberBonusDat = setupDatAccess( "GcArmyExpeditionMemberBonus", xiv::exd::Language::none ); + m_GcArmyExpeditionTypeDat = setupDatAccess( "GcArmyExpeditionType", xiv::exd::Language::en ); + m_GcArmyMemberGrowDat = setupDatAccess( "GcArmyMemberGrow", xiv::exd::Language::none ); + m_GcArmyTrainingDat = setupDatAccess( "GcArmyTraining", xiv::exd::Language::en ); + m_GCRankGridaniaFemaleTextDat = setupDatAccess( "GCRankGridaniaFemaleText", xiv::exd::Language::en ); + m_GCRankGridaniaMaleTextDat = setupDatAccess( "GCRankGridaniaMaleText", xiv::exd::Language::en ); + m_GCRankLimsaFemaleTextDat = setupDatAccess( "GCRankLimsaFemaleText", xiv::exd::Language::en ); + m_GCRankLimsaMaleTextDat = setupDatAccess( "GCRankLimsaMaleText", xiv::exd::Language::en ); + m_GCRankUldahFemaleTextDat = setupDatAccess( "GCRankUldahFemaleText", xiv::exd::Language::en ); + m_GCRankUldahMaleTextDat = setupDatAccess( "GCRankUldahMaleText", xiv::exd::Language::en ); + m_GCScripShopCategoryDat = setupDatAccess( "GCScripShopCategory", xiv::exd::Language::none ); + m_GCScripShopItemDat = setupDatAccess( "GCScripShopItem", xiv::exd::Language::none ); + m_GCShopDat = setupDatAccess( "GCShop", xiv::exd::Language::none ); + m_GCShopItemCategoryDat = setupDatAccess( "GCShopItemCategory", xiv::exd::Language::en ); + m_GCSupplyDutyDat = setupDatAccess( "GCSupplyDuty", xiv::exd::Language::none ); + m_GCSupplyDutyRewardDat = setupDatAccess( "GCSupplyDutyReward", xiv::exd::Language::none ); + m_GeneralActionDat = setupDatAccess( "GeneralAction", xiv::exd::Language::en ); + m_GilShopDat = setupDatAccess( "GilShop", xiv::exd::Language::en ); + m_GilShopItemDat = setupDatAccess( "GilShopItem", xiv::exd::Language::none ); + m_GoldSaucerTextDataDat = setupDatAccess( "GoldSaucerTextData", xiv::exd::Language::en ); + m_GrandCompanyDat = setupDatAccess( "GrandCompany", xiv::exd::Language::en ); + m_GrandCompanyRankDat = setupDatAccess( "GrandCompanyRank", xiv::exd::Language::none ); + m_GuardianDeityDat = setupDatAccess( "GuardianDeity", xiv::exd::Language::en ); + m_GuildleveAssignmentDat = setupDatAccess( "GuildleveAssignment", xiv::exd::Language::none ); + m_GuildOrderGuideDat = setupDatAccess( "GuildOrderGuide", xiv::exd::Language::none ); + m_GuildOrderOfficerDat = setupDatAccess( "GuildOrderOfficer", xiv::exd::Language::none ); + m_HouseRetainerPoseDat = setupDatAccess( "HouseRetainerPose", xiv::exd::Language::none ); + m_HousingFurnitureDat = setupDatAccess( "HousingFurniture", xiv::exd::Language::none ); + m_HousingYardObjectDat = setupDatAccess( "HousingYardObject", xiv::exd::Language::none ); + m_InstanceContentDat = setupDatAccess( "InstanceContent", xiv::exd::Language::en ); + m_InstanceContentBuffDat = setupDatAccess( "InstanceContentBuff", xiv::exd::Language::none ); + m_InstanceContentTextDataDat = setupDatAccess( "InstanceContentTextData", xiv::exd::Language::en ); + m_ItemDat = setupDatAccess( "Item", xiv::exd::Language::en ); + m_ItemActionDat = setupDatAccess( "ItemAction", xiv::exd::Language::none ); + m_ItemFoodDat = setupDatAccess( "ItemFood", xiv::exd::Language::none ); + m_ItemSearchCategoryDat = setupDatAccess( "ItemSearchCategory", xiv::exd::Language::en ); + m_ItemSeriesDat = setupDatAccess( "ItemSeries", xiv::exd::Language::en ); + m_ItemSpecialBonusDat = setupDatAccess( "ItemSpecialBonus", xiv::exd::Language::en ); + m_ItemUICategoryDat = setupDatAccess( "ItemUICategory", xiv::exd::Language::en ); + m_JournalCategoryDat = setupDatAccess( "JournalCategory", xiv::exd::Language::en ); + m_JournalGenreDat = setupDatAccess( "JournalGenre", xiv::exd::Language::en ); + m_JournalSectionDat = setupDatAccess( "JournalSection", xiv::exd::Language::en ); + m_LeveDat = setupDatAccess( "Leve", xiv::exd::Language::en ); + m_LeveAssignmentTypeDat = setupDatAccess( "LeveAssignmentType", xiv::exd::Language::en ); + m_LeveClientDat = setupDatAccess( "LeveClient", xiv::exd::Language::en ); + m_LevelDat = setupDatAccess( "Level", xiv::exd::Language::none ); + m_LeveRewardItemDat = setupDatAccess( "LeveRewardItem", xiv::exd::Language::none ); + m_LeveRewardItemGroupDat = setupDatAccess( "LeveRewardItemGroup", xiv::exd::Language::none ); + m_LeveVfxDat = setupDatAccess( "LeveVfx", xiv::exd::Language::none ); + m_LogFilterDat = setupDatAccess( "LogFilter", xiv::exd::Language::en ); + m_LogKindDat = setupDatAccess( "LogKind", xiv::exd::Language::en ); + m_LogKindCategoryTextDat = setupDatAccess( "LogKindCategoryText", xiv::exd::Language::en ); + m_LogMessageDat = setupDatAccess( "LogMessage", xiv::exd::Language::en ); + m_MacroIconDat = setupDatAccess( "MacroIcon", xiv::exd::Language::none ); + m_MacroIconRedirectOldDat = setupDatAccess( "MacroIconRedirectOld", xiv::exd::Language::none ); + m_MainCommandDat = setupDatAccess( "MainCommand", xiv::exd::Language::en ); + m_MainCommandCategoryDat = setupDatAccess( "MainCommandCategory", xiv::exd::Language::en ); + m_MapDat = setupDatAccess( "Map", xiv::exd::Language::none ); + m_MapMarkerDat = setupDatAccess( "MapMarker", xiv::exd::Language::none ); + m_MapMarkerRegionDat = setupDatAccess( "MapMarkerRegion", xiv::exd::Language::none ); + m_MapSymbolDat = setupDatAccess( "MapSymbol", xiv::exd::Language::none ); + m_MarkerDat = setupDatAccess( "Marker", xiv::exd::Language::en ); + m_MasterpieceSupplyDutyDat = setupDatAccess( "MasterpieceSupplyDuty", xiv::exd::Language::none ); + m_MasterpieceSupplyMultiplierDat = setupDatAccess( "MasterpieceSupplyMultiplier", xiv::exd::Language::none ); + m_MateriaDat = setupDatAccess( "Materia", xiv::exd::Language::none ); + m_MinionRaceDat = setupDatAccess( "MinionRace", xiv::exd::Language::en ); + m_MinionRulesDat = setupDatAccess( "MinionRules", xiv::exd::Language::en ); + m_MinionSkillTypeDat = setupDatAccess( "MinionSkillType", xiv::exd::Language::en ); + m_MobHuntTargetDat = setupDatAccess( "MobHuntTarget", xiv::exd::Language::none ); + m_ModelCharaDat = setupDatAccess( "ModelChara", xiv::exd::Language::none ); + m_MonsterNoteDat = setupDatAccess( "MonsterNote", xiv::exd::Language::en ); + m_MonsterNoteTargetDat = setupDatAccess( "MonsterNoteTarget", xiv::exd::Language::none ); + m_MountDat = setupDatAccess( "Mount", xiv::exd::Language::en ); + m_MountActionDat = setupDatAccess( "MountAction", xiv::exd::Language::none ); + m_MoveTimelineDat = setupDatAccess( "MoveTimeline", xiv::exd::Language::none ); + m_MoveVfxDat = setupDatAccess( "MoveVfx", xiv::exd::Language::none ); + m_NpcEquipDat = setupDatAccess( "NpcEquip", xiv::exd::Language::none ); + m_OmenDat = setupDatAccess( "Omen", xiv::exd::Language::none ); + m_OnlineStatusDat = setupDatAccess( "OnlineStatus", xiv::exd::Language::en ); + m_OpeningDat = setupDatAccess( "Opening", xiv::exd::Language::none ); + m_OrchestrionDat = setupDatAccess( "Orchestrion", xiv::exd::Language::en ); + m_OrchestrionCategoryDat = setupDatAccess( "OrchestrionCategory", xiv::exd::Language::en ); + m_OrchestrionPathDat = setupDatAccess( "OrchestrionPath", xiv::exd::Language::none ); + m_OrchestrionUiparamDat = setupDatAccess( "OrchestrionUiparam", xiv::exd::Language::none ); + m_ParamGrowDat = setupDatAccess( "ParamGrow", xiv::exd::Language::none ); + m_PerformDat = setupDatAccess( "Perform", xiv::exd::Language::en ); + m_PerformTransientDat = setupDatAccess( "PerformTransient", xiv::exd::Language::en ); + m_PetDat = setupDatAccess( "Pet", xiv::exd::Language::en ); + m_PetActionDat = setupDatAccess( "PetAction", xiv::exd::Language::en ); + m_PictureDat = setupDatAccess( "Picture", xiv::exd::Language::none ); + m_PlaceNameDat = setupDatAccess( "PlaceName", xiv::exd::Language::en ); + m_PublicContentDat = setupDatAccess( "PublicContent", xiv::exd::Language::en ); + m_PvPActionSortDat = setupDatAccess( "PvPActionSort", xiv::exd::Language::none ); + m_QuestDat = setupDatAccess( "Quest", xiv::exd::Language::en ); + m_QuestClassJobRewardDat = setupDatAccess( "QuestClassJobReward", xiv::exd::Language::none ); + m_QuestRepeatFlagDat = setupDatAccess( "QuestRepeatFlag", xiv::exd::Language::none ); + m_QuestRewardOtherDat = setupDatAccess( "QuestRewardOther", xiv::exd::Language::en ); + m_QuickChatDat = setupDatAccess( "QuickChat", xiv::exd::Language::en ); + m_QuickChatTransientDat = setupDatAccess( "QuickChatTransient", xiv::exd::Language::en ); + m_RaceDat = setupDatAccess( "Race", xiv::exd::Language::en ); + m_RacingChocoboItemDat = setupDatAccess( "RacingChocoboItem", xiv::exd::Language::none ); + m_RacingChocoboNameDat = setupDatAccess( "RacingChocoboName", xiv::exd::Language::en ); + m_RacingChocoboNameCategoryDat = setupDatAccess( "RacingChocoboNameCategory", xiv::exd::Language::en ); + m_RacingChocoboNameInfoDat = setupDatAccess( "RacingChocoboNameInfo", xiv::exd::Language::none ); + m_RacingChocoboParamDat = setupDatAccess( "RacingChocoboParam", xiv::exd::Language::en ); + m_RecipeDat = setupDatAccess( "Recipe", xiv::exd::Language::none ); + m_RecipeElementDat = setupDatAccess( "RecipeElement", xiv::exd::Language::en ); + m_RecipeLevelTableDat = setupDatAccess( "RecipeLevelTable", xiv::exd::Language::none ); + m_RecipeNotebookListDat = setupDatAccess( "RecipeNotebookList", xiv::exd::Language::none ); + m_RecommendContentsDat = setupDatAccess( "RecommendContents", xiv::exd::Language::none ); + m_RelicDat = setupDatAccess( "Relic", xiv::exd::Language::none ); + m_Relic3Dat = setupDatAccess( "Relic3", xiv::exd::Language::none ); + m_RelicItemDat = setupDatAccess( "RelicItem", xiv::exd::Language::none ); + m_RelicNoteDat = setupDatAccess( "RelicNote", xiv::exd::Language::none ); + m_RelicNoteCategoryDat = setupDatAccess( "RelicNoteCategory", xiv::exd::Language::en ); + m_RetainerTaskDat = setupDatAccess( "RetainerTask", xiv::exd::Language::none ); + m_RetainerTaskLvRangeDat = setupDatAccess( "RetainerTaskLvRange", xiv::exd::Language::none ); + m_RetainerTaskNormalDat = setupDatAccess( "RetainerTaskNormal", xiv::exd::Language::none ); + m_RetainerTaskParameterDat = setupDatAccess( "RetainerTaskParameter", xiv::exd::Language::none ); + m_RetainerTaskRandomDat = setupDatAccess( "RetainerTaskRandom", xiv::exd::Language::en ); + m_SalvageDat = setupDatAccess( "Salvage", xiv::exd::Language::none ); + m_SatisfactionNpcDat = setupDatAccess( "SatisfactionNpc", xiv::exd::Language::none ); + m_SatisfactionSupplyDat = setupDatAccess( "SatisfactionSupply", xiv::exd::Language::none ); + m_SatisfactionSupplyRewardDat = setupDatAccess( "SatisfactionSupplyReward", xiv::exd::Language::none ); + m_ScenarioTreeDat = setupDatAccess( "ScenarioTree", xiv::exd::Language::none ); + m_ScenarioTreeTipsDat = setupDatAccess( "ScenarioTreeTips", xiv::exd::Language::none ); + m_ScenarioTreeTipsClassQuestDat = setupDatAccess( "ScenarioTreeTipsClassQuest", xiv::exd::Language::none ); + m_ScenarioTreeTipsQuestDat = setupDatAccess( "ScenarioTreeTipsQuest", xiv::exd::Language::none ); + m_ScenarioTypeDat = setupDatAccess( "ScenarioType", xiv::exd::Language::en ); + m_ScreenImageDat = setupDatAccess( "ScreenImage", xiv::exd::Language::none ); + m_SecretRecipeBookDat = setupDatAccess( "SecretRecipeBook", xiv::exd::Language::en ); + m_SkyIsland2MissionDat = setupDatAccess( "SkyIsland2Mission", xiv::exd::Language::en ); + m_SkyIsland2MissionDetailDat = setupDatAccess( "SkyIsland2MissionDetail", xiv::exd::Language::en ); + m_SkyIsland2MissionTypeDat = setupDatAccess( "SkyIsland2MissionType", xiv::exd::Language::none ); + m_SkyIsland2RangeTypeDat = setupDatAccess( "SkyIsland2RangeType", xiv::exd::Language::none ); + m_SpearfishingItemDat = setupDatAccess( "SpearfishingItem", xiv::exd::Language::en ); + m_SpearfishingNotebookDat = setupDatAccess( "SpearfishingNotebook", xiv::exd::Language::none ); + m_SpecialShopDat = setupDatAccess( "SpecialShop", xiv::exd::Language::en ); + m_SpecialShopItemCategoryDat = setupDatAccess( "SpecialShopItemCategory", xiv::exd::Language::en ); + m_StainDat = setupDatAccess( "Stain", xiv::exd::Language::en ); + m_StainTransientDat = setupDatAccess( "StainTransient", xiv::exd::Language::none ); + m_StatusDat = setupDatAccess( "Status", xiv::exd::Language::en ); + m_StatusHitEffectDat = setupDatAccess( "StatusHitEffect", xiv::exd::Language::none ); + m_StatusLoopVFXDat = setupDatAccess( "StatusLoopVFX", xiv::exd::Language::none ); + m_StoryDat = setupDatAccess( "Story", xiv::exd::Language::none ); + m_SubmarineExplorationDat = setupDatAccess( "SubmarineExploration", xiv::exd::Language::en ); + m_SubmarinePartDat = setupDatAccess( "SubmarinePart", xiv::exd::Language::none ); + m_SubmarineRankDat = setupDatAccess( "SubmarineRank", xiv::exd::Language::none ); + m_SwitchTalkDat = setupDatAccess( "SwitchTalk", xiv::exd::Language::none ); + m_TerritoryTypeDat = setupDatAccess( "TerritoryType", xiv::exd::Language::none ); + m_TextCommandDat = setupDatAccess( "TextCommand", xiv::exd::Language::en ); + m_TitleDat = setupDatAccess( "Title", xiv::exd::Language::en ); + m_TomestonesDat = setupDatAccess( "Tomestones", xiv::exd::Language::none ); + m_TomestonesItemDat = setupDatAccess( "TomestonesItem", xiv::exd::Language::none ); + m_TopicSelectDat = setupDatAccess( "TopicSelect", xiv::exd::Language::en ); + m_TownDat = setupDatAccess( "Town", xiv::exd::Language::en ); + m_TraitDat = setupDatAccess( "Trait", xiv::exd::Language::en ); + m_TraitRecastDat = setupDatAccess( "TraitRecast", xiv::exd::Language::none ); + m_TraitTransientDat = setupDatAccess( "TraitTransient", xiv::exd::Language::en ); + m_TransformationDat = setupDatAccess( "Transformation", xiv::exd::Language::none ); + m_TreasureDat = setupDatAccess( "Treasure", xiv::exd::Language::en ); + m_TreasureHuntRankDat = setupDatAccess( "TreasureHuntRank", xiv::exd::Language::none ); + m_TribeDat = setupDatAccess( "Tribe", xiv::exd::Language::en ); + m_TripleTriadDat = setupDatAccess( "TripleTriad", xiv::exd::Language::none ); + m_TripleTriadCardDat = setupDatAccess( "TripleTriadCard", xiv::exd::Language::en ); + m_TripleTriadCardRarityDat = setupDatAccess( "TripleTriadCardRarity", xiv::exd::Language::none ); + m_TripleTriadCardResidentDat = setupDatAccess( "TripleTriadCardResident", xiv::exd::Language::none ); + m_TripleTriadCardTypeDat = setupDatAccess( "TripleTriadCardType", xiv::exd::Language::en ); + m_TripleTriadCompetitionDat = setupDatAccess( "TripleTriadCompetition", xiv::exd::Language::en ); + m_TripleTriadRuleDat = setupDatAccess( "TripleTriadRule", xiv::exd::Language::en ); + m_TutorialDat = setupDatAccess( "Tutorial", xiv::exd::Language::none ); + m_TutorialDPSDat = setupDatAccess( "TutorialDPS", xiv::exd::Language::none ); + m_TutorialHealerDat = setupDatAccess( "TutorialHealer", xiv::exd::Language::none ); + m_TutorialTankDat = setupDatAccess( "TutorialTank", xiv::exd::Language::none ); + m_VaseFlowerDat = setupDatAccess( "VaseFlower", xiv::exd::Language::none ); + m_VFXDat = setupDatAccess( "VFX", xiv::exd::Language::none ); + m_WarpDat = setupDatAccess( "Warp", xiv::exd::Language::en ); + m_WarpConditionDat = setupDatAccess( "WarpCondition", xiv::exd::Language::none ); + m_WeatherDat = setupDatAccess( "Weather", xiv::exd::Language::en ); + m_WeatherGroupDat = setupDatAccess( "WeatherGroup", xiv::exd::Language::none ); + m_WeatherRateDat = setupDatAccess( "WeatherRate", xiv::exd::Language::none ); + m_WeddingBGMDat = setupDatAccess( "WeddingBGM", xiv::exd::Language::en ); + m_WeeklyBingoOrderDataDat = setupDatAccess( "WeeklyBingoOrderData", xiv::exd::Language::none ); + m_WeeklyBingoRewardDataDat = setupDatAccess( "WeeklyBingoRewardData", xiv::exd::Language::none ); + m_WeeklyBingoTextDat = setupDatAccess( "WeeklyBingoText", xiv::exd::Language::en ); + m_WorldDat = setupDatAccess( "World", xiv::exd::Language::none ); + m_WorldDCGroupTypeDat = setupDatAccess( "WorldDCGroupType", xiv::exd::Language::none ); + m_YKWDat = setupDatAccess( "YKW", xiv::exd::Language::en ); + m_ZoneSharedGroupDat = setupDatAccess( "ZoneSharedGroup", xiv::exd::Language::none ); - } - catch( std::runtime_error ) - { - return false; - } + } + catch( std::runtime_error ) + { + return false; + } - return true; + return true; } /////////////////////////////////////////////////////////////// diff --git a/src/common/Exd/ExdDataGenerated.h b/src/common/Exd/ExdDataGenerated.h index 62642872..59ba567e 100644 --- a/src/common/Exd/ExdDataGenerated.h +++ b/src/common/Exd/ExdDataGenerated.h @@ -377,6884 +377,7239 @@ struct ZoneSharedGroup; struct Achievement { - uint8_t achievementCategory; - std::string name; - std::string description; - uint8_t points; - uint16_t title; - uint32_t item; - uint16_t icon; - uint8_t type; - std::vector< int32_t > data; - uint16_t order; + uint8_t achievementCategory; + std::string name; + std::string description; + uint8_t points; + uint16_t title; + uint32_t item; + uint16_t icon; + uint8_t type; + std::vector< int32_t > data; + uint16_t order; - Achievement( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Achievement( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AchievementCategory { - std::string name; - uint8_t achievementKind; + std::string name; + uint8_t achievementKind; - AchievementCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AchievementCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AchievementKind { - std::string name; + std::string name; - AchievementKind( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AchievementKind( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Action { - std::string name; - uint16_t icon; - uint8_t actionCategory; - uint8_t animationStart; - uint8_t vFX; - int16_t animationEnd; - uint16_t actionTimelineHit; - int8_t classJob; - uint8_t classJobLevel; - bool isRoleAction; - int8_t range; - bool canTargetSelf; - bool canTargetParty; - bool canTargetFriendly; - bool canTargetHostile; - bool targetArea; - bool canTargetDead; - uint8_t castType; - uint8_t effectRange; - uint8_t xAxisModifier; - uint8_t costType; - uint16_t cost; - uint16_t actionCombo; - bool preservesCombo; - uint16_t cast100ms; - uint16_t recast100ms; - uint8_t cooldownGroup; - int8_t attackType; - uint8_t aspect; - uint8_t actionProcStatus; - uint16_t statusGainSelf; - uint32_t actionData; - uint8_t classJobCategory; - bool affectsPosition; - uint8_t omen; - bool isPvP; + std::string name; + uint16_t icon; + uint8_t actionCategory; + uint8_t animationStart; + uint8_t vFX; + int16_t animationEnd; + uint16_t actionTimelineHit; + int8_t classJob; + uint8_t classJobLevel; + bool isRoleAction; + int8_t range; + bool canTargetSelf; + bool canTargetParty; + bool canTargetFriendly; + bool canTargetHostile; + bool targetArea; + bool canTargetDead; + uint8_t castType; + uint8_t effectRange; + uint8_t xAxisModifier; + uint8_t costType; + uint16_t cost; + uint16_t actionCombo; + bool preservesCombo; + uint16_t cast100ms; + uint16_t recast100ms; + uint8_t cooldownGroup; + int8_t attackType; + uint8_t aspect; + uint8_t actionProcStatus; + uint16_t statusGainSelf; + uint32_t actionData; + uint8_t classJobCategory; + bool affectsPosition; + uint8_t omen; + bool isPvP; - Action( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Action( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionCastTimeline { - uint16_t name; - uint16_t vFX; + uint16_t name; + uint16_t vFX; - ActionCastTimeline( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionCastTimeline( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionCastVFX { - uint16_t vFX; + uint16_t vFX; - ActionCastVFX( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionCastVFX( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionCategory { - std::string name; + std::string name; - ActionCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionComboRoute { - std::string name; - std::vector< uint16_t > action; + std::string name; + std::vector< uint16_t > action; - ActionComboRoute( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionComboRoute( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionIndirection { - int32_t name; + int32_t name; - ActionIndirection( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionIndirection( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionParam { - int16_t name; + int16_t name; - ActionParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionProcStatus { - uint16_t status; + uint16_t status; - ActionProcStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionProcStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionTimeline { - std::string key; + std::string key; - ActionTimeline( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionTimeline( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionTimelineReplace { - uint16_t old; - uint16_t new1; + uint16_t old; + uint16_t new1; - ActionTimelineReplace( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionTimelineReplace( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ActionTransient { - std::string description; + std::string description; - ActionTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ActionTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Addon { - std::string text; + std::string text; - Addon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Addon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Adventure { - int32_t level; - uint8_t emote; - uint16_t minTime; - uint16_t maxTime; - int32_t placeName; - int32_t iconList; - int32_t iconDiscovered; - std::string name; - std::string impression; - std::string description; - int32_t iconUndiscovered; - bool isInitial; + int32_t level; + uint8_t emote; + uint16_t minTime; + uint16_t maxTime; + int32_t placeName; + int32_t iconList; + int32_t iconDiscovered; + std::string name; + std::string impression; + std::string description; + int32_t iconUndiscovered; + bool isInitial; - Adventure( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Adventure( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AdventureExPhase { - uint32_t quest; - uint32_t adventureBegin; - uint32_t adventureEnd; + uint32_t quest; + uint32_t adventureBegin; + uint32_t adventureEnd; - AdventureExPhase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AdventureExPhase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AetherCurrent { - uint32_t quest; + uint32_t quest; - AetherCurrent( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AetherCurrent( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AetherCurrentCompFlgSet { - int32_t territory; - std::vector< int32_t > aetherCurrent; + int32_t territory; + std::vector< int32_t > aetherCurrent; - AetherCurrentCompFlgSet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AetherCurrentCompFlgSet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AetherialWheel { - int32_t itemUnprimed; - int32_t itemPrimed; - uint8_t grade; - uint8_t hoursRequired; + int32_t itemUnprimed; + int32_t itemPrimed; + uint8_t grade; + uint8_t hoursRequired; - AetherialWheel( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AetherialWheel( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Aetheryte { - uint16_t placeName; - uint16_t aethernetName; - uint16_t territory; - std::vector< uint32_t > level; - bool isAetheryte; - uint8_t aethernetGroup; - uint16_t map; - int16_t aetherstreamX; - int16_t aetherstreamY; + uint16_t placeName; + uint16_t aethernetName; + uint16_t territory; + std::vector< uint32_t > level; + bool isAetheryte; + uint8_t aethernetGroup; + uint16_t map; + int16_t aetherstreamX; + int16_t aetherstreamY; - Aetheryte( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Aetheryte( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AirshipExplorationLevel { - uint32_t expToNext; + uint32_t expToNext; - AirshipExplorationLevel( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AirshipExplorationLevel( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AirshipExplorationLog { - std::string text; + std::string text; - AirshipExplorationLog( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AirshipExplorationLog( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AirshipExplorationParamType { - std::string name; + std::string name; - AirshipExplorationParamType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AirshipExplorationParamType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AirshipExplorationPart { - uint8_t rank; - uint8_t components; - int16_t surveillance; - int16_t retrieval; - int16_t speed; - int16_t range; - int16_t favor; - uint8_t repairMaterials; + uint8_t rank; + uint8_t components; + int16_t surveillance; + int16_t retrieval; + int16_t speed; + int16_t range; + int16_t favor; + uint8_t repairMaterials; - AirshipExplorationPart( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AirshipExplorationPart( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AirshipExplorationPoint { - std::string name; - std::string nameShort; - uint8_t requiredLevel; - uint16_t requiredFuel; - uint16_t durationmin; - uint8_t requiredSurveillance; - uint32_t expReward; + std::string name; + std::string nameShort; + uint8_t requiredLevel; + uint16_t requiredFuel; + uint16_t durationmin; + uint8_t requiredSurveillance; + uint32_t expReward; - AirshipExplorationPoint( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AirshipExplorationPoint( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeapon5 { - int32_t item; - uint8_t secondaryStatTotal; - std::vector< uint8_t > parameter; + int32_t item; + uint8_t secondaryStatTotal; + std::vector< uint8_t > parameter; - AnimaWeapon5( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeapon5( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeapon5Param { - uint8_t baseParam; - std::string name; + uint8_t baseParam; + std::string name; - AnimaWeapon5Param( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeapon5Param( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeapon5PatternGroup { - std::string name; + std::string name; - AnimaWeapon5PatternGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeapon5PatternGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeapon5SpiritTalk { - int32_t dialogue; + int32_t dialogue; - AnimaWeapon5SpiritTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeapon5SpiritTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeapon5SpiritTalkParam { - std::string prologue; - std::string epilogue; + std::string prologue; + std::string epilogue; - AnimaWeapon5SpiritTalkParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeapon5SpiritTalkParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeapon5TradeItem { - uint32_t crystalSand; - uint8_t qty; - uint8_t category; + uint32_t crystalSand; + uint8_t qty; + uint8_t category; - AnimaWeapon5TradeItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeapon5TradeItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeaponFUITalk { - int32_t dialogue; + int32_t dialogue; - AnimaWeaponFUITalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeaponFUITalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeaponFUITalkParam { - std::string prologue; - std::string epilogue; + std::string prologue; + std::string epilogue; - AnimaWeaponFUITalkParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeaponFUITalkParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeaponIcon { - int32_t hyperconductive; - int32_t reborn; - int32_t sharpened; - int32_t zodiac; - int32_t zodiacLux; + int32_t hyperconductive; + int32_t reborn; + int32_t sharpened; + int32_t zodiac; + int32_t zodiacLux; - AnimaWeaponIcon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeaponIcon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AnimaWeaponItem { - std::vector< uint32_t > item; + std::vector< uint32_t > item; - AnimaWeaponItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AnimaWeaponItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AquariumFish { - uint8_t aquariumWater; - uint8_t size; - uint32_t item; + uint8_t aquariumWater; + uint8_t size; + uint32_t item; - AquariumFish( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AquariumFish( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AquariumWater { - std::string name; + std::string name; - AquariumWater( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AquariumWater( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct AttackType { - std::string name; + std::string name; - AttackType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + AttackType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Balloon { - std::string dialogue; + std::string dialogue; - Balloon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Balloon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BaseParam { - std::string name; - std::string description; - uint8_t oneHWpn; - uint8_t oH; - uint8_t head; - uint8_t chest; - uint8_t hands; - uint8_t waist; - uint8_t legs; - uint8_t feet; - uint8_t earring; - uint8_t necklace; - uint8_t bracelet; - uint8_t ring; - uint8_t twoHWpn; - uint8_t chestHead; - uint8_t chestHeadLegsFeet; - uint8_t legsFeet; - uint8_t headChestHandsLegsFeet; - uint8_t chestLegsGloves; - uint8_t chestLegsFeet; + std::string name; + std::string description; + uint8_t oneHWpn; + uint8_t oH; + uint8_t head; + uint8_t chest; + uint8_t hands; + uint8_t waist; + uint8_t legs; + uint8_t feet; + uint8_t earring; + uint8_t necklace; + uint8_t bracelet; + uint8_t ring; + uint8_t twoHWpn; + uint8_t chestHead; + uint8_t chestHeadLegsFeet; + uint8_t legsFeet; + uint8_t headChestHandsLegsFeet; + uint8_t chestLegsGloves; + uint8_t chestLegsFeet; - BaseParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BaseParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BattleLeve { - std::vector< uint16_t > enemyLevel; - std::vector< uint32_t > bNpcName; - std::vector< int32_t > itemsInvolved; - std::vector< uint8_t > itemsInvolvedQty; - std::vector< uint8_t > itemDropRate; + std::vector< uint16_t > enemyLevel; + std::vector< uint32_t > bNpcName; + std::vector< int32_t > itemsInvolved; + std::vector< uint8_t > itemsInvolvedQty; + std::vector< uint8_t > itemDropRate; - BattleLeve( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BattleLeve( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BeastRankBonus { - uint32_t item; - std::vector< uint8_t > itemQuantity; + uint32_t item; + std::vector< uint8_t > itemQuantity; - BeastRankBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BeastRankBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BeastReputationRank { - uint16_t requiredReputation; - std::string name; + uint16_t requiredReputation; + std::string name; - BeastReputationRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BeastReputationRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BeastTribe { - uint8_t minLevel; - uint8_t maxLevel; - uint8_t beastRankBonus; - uint32_t iconReputation; - uint32_t icon; - uint8_t maxRank; - uint32_t alliedBeastTribeQuest; - uint8_t expansion; - uint32_t currencyItem; - uint8_t displayOrder; - std::string name; - std::string nameRelation; + uint8_t minLevel; + uint8_t maxLevel; + uint8_t beastRankBonus; + uint32_t iconReputation; + uint32_t icon; + uint8_t maxRank; + uint32_t alliedBeastTribeQuest; + uint8_t expansion; + uint32_t currencyItem; + uint8_t displayOrder; + std::string name; + std::string nameRelation; - BeastTribe( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BeastTribe( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Behavior { - uint16_t balloon; + uint16_t balloon; - Behavior( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Behavior( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BGM { - std::string file; + std::string file; - BGM( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BGM( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BNpcAnnounceIcon { - uint32_t icon; + uint32_t icon; - BNpcAnnounceIcon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BNpcAnnounceIcon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BNpcBase { - float scale; - uint16_t modelChara; - uint16_t bNpcCustomize; - uint16_t npcEquip; - int32_t arrayEventHandler; + float scale; + uint16_t modelChara; + uint16_t bNpcCustomize; + uint16_t npcEquip; + int32_t arrayEventHandler; - BNpcBase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BNpcBase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BNpcCustomize { - uint8_t race; - uint8_t gender; - uint8_t bodyType; - uint8_t height; - uint8_t tribe; - uint8_t face; - uint8_t hairStyle; - uint8_t hairHighlight; - uint8_t skinColor; - uint8_t eyeHeterochromia; - uint8_t hairColor; - uint8_t hairHighlightColor; - uint8_t facialFeature; - uint8_t facialFeatureColor; - uint8_t eyebrows; - uint8_t eyeColor; - uint8_t eyeShape; - uint8_t nose; - uint8_t jaw; - uint8_t mouth; - uint8_t lipColor; - uint8_t bustOrTone1; - uint8_t extraFeature1; - uint8_t extraFeature2OrBust; - uint8_t facePaint; - uint8_t facePaintColor; + uint8_t race; + uint8_t gender; + uint8_t bodyType; + uint8_t height; + uint8_t tribe; + uint8_t face; + uint8_t hairStyle; + uint8_t hairHighlight; + uint8_t skinColor; + uint8_t eyeHeterochromia; + uint8_t hairColor; + uint8_t hairHighlightColor; + uint8_t facialFeature; + uint8_t facialFeatureColor; + uint8_t eyebrows; + uint8_t eyeColor; + uint8_t eyeShape; + uint8_t nose; + uint8_t jaw; + uint8_t mouth; + uint8_t lipColor; + uint8_t bustOrTone1; + uint8_t extraFeature1; + uint8_t extraFeature2OrBust; + uint8_t facePaint; + uint8_t facePaintColor; - BNpcCustomize( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BNpcCustomize( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BNpcName { - std::string singular; - std::string plural; + std::string singular; + std::string plural; - BNpcName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BNpcName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Buddy { - int32_t questRequirement2; - int32_t questRequirement1; - std::string soundEffect4; - std::string soundEffect3; - std::string soundEffect2; - std::string soundEffect1; + int32_t questRequirement2; + int32_t questRequirement1; + std::string soundEffect4; + std::string soundEffect3; + std::string soundEffect2; + std::string soundEffect1; - Buddy( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Buddy( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BuddyAction { - std::string name; - std::string description; - int32_t icon; - int32_t iconStatus; + std::string name; + std::string description; + int32_t icon; + int32_t iconStatus; - BuddyAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BuddyAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BuddyEquip { - std::string singular; - std::string plural; - std::string name; - int32_t modelTop; - int32_t modelBody; - int32_t modelLegs; - uint8_t grandCompany; - uint16_t iconHead; - uint16_t iconBody; - uint16_t iconLegs; + std::string singular; + std::string plural; + std::string name; + int32_t modelTop; + int32_t modelBody; + int32_t modelLegs; + uint8_t grandCompany; + uint16_t iconHead; + uint16_t iconBody; + uint16_t iconLegs; - BuddyEquip( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BuddyEquip( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BuddyItem { - uint16_t name; + uint16_t name; - BuddyItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BuddyItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BuddyRank { - uint32_t expRequired; + uint32_t expRequired; - BuddyRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BuddyRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct BuddySkill { - uint8_t buddyLevel; - bool isActive; - uint16_t defender; - uint16_t attacker; - uint16_t healer; + uint8_t buddyLevel; + bool isActive; + uint16_t defender; + uint16_t attacker; + uint16_t healer; - BuddySkill( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + BuddySkill( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Cabinet { - int32_t item; - uint16_t order; - uint8_t category; + int32_t item; + uint16_t order; + uint8_t category; - Cabinet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Cabinet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CabinetCategory { - uint8_t menuOrder; - int32_t icon; - int32_t category; + uint8_t menuOrder; + int32_t icon; + int32_t category; - CabinetCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CabinetCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Calendar { - std::vector< uint8_t > month; - std::vector< uint8_t > day; + std::vector< uint8_t > month; + std::vector< uint8_t > day; - Calendar( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Calendar( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CharaMakeCustomize { - uint32_t icon; - uint16_t data; - bool isPurchasable; + uint32_t icon; + uint16_t data; + bool isPurchasable; - CharaMakeCustomize( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CharaMakeCustomize( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CharaMakeType { - int32_t race; - int32_t tribe; - int8_t gender; - std::vector< int32_t > facialFeatureIcon; + int32_t race; + int32_t tribe; + int8_t gender; + std::vector< int32_t > facialFeatureIcon; - CharaMakeType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CharaMakeType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ChocoboRace { - uint8_t chocoboRaceRank; - uint8_t chocoboRaceTerritory; + uint8_t chocoboRaceRank; + uint8_t chocoboRaceTerritory; - ChocoboRace( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ChocoboRace( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ChocoboRaceAbility { - std::string name; - std::string description; - uint32_t icon; - int8_t chocoboRaceAbilityType; - uint8_t value; + std::string name; + std::string description; + uint32_t icon; + int8_t chocoboRaceAbilityType; + uint8_t value; - ChocoboRaceAbility( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ChocoboRaceAbility( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ChocoboRaceAbilityType { - bool isActive; + bool isActive; - ChocoboRaceAbilityType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ChocoboRaceAbilityType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ChocoboRaceItem { - std::string name; - std::string description; - uint32_t icon; + std::string name; + std::string description; + uint32_t icon; - ChocoboRaceItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ChocoboRaceItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ChocoboRaceRank { - uint16_t ratingMin; - uint16_t ratingMax; - uint16_t name; - uint16_t fee; - int32_t icon; + uint16_t ratingMin; + uint16_t ratingMax; + uint16_t name; + uint16_t fee; + int32_t icon; - ChocoboRaceRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ChocoboRaceRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ChocoboRaceStatus { - int32_t status; + int32_t status; - ChocoboRaceStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ChocoboRaceStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ChocoboRaceTerritory { - uint16_t name; - int32_t icon; + uint16_t name; + int32_t icon; - ChocoboRaceTerritory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ChocoboRaceTerritory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ChocoboTaxi { - uint32_t location; + uint32_t location; - ChocoboTaxi( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ChocoboTaxi( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ChocoboTaxiStand { - std::string placeName; + std::string placeName; - ChocoboTaxiStand( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ChocoboTaxiStand( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ClassJob { - std::string name; - std::string abbreviation; - uint8_t classJobCategory; - int8_t expArrayIndex; - uint16_t modifierHitPoints; - uint16_t modifierManaPoints; - uint16_t modifierStrength; - uint16_t modifierVitality; - uint16_t modifierDexterity; - uint16_t modifierIntelligence; - uint16_t modifierMind; - uint16_t modifierPiety; - uint8_t classJobParent; - std::string nameEnglish; - int32_t itemStartingWeapon; - uint16_t limitBreak1; - uint16_t limitBreak2; - uint16_t limitBreak3; - uint32_t itemSoulCrystal; - uint32_t unlockQuest; - uint32_t relicQuest; - uint32_t prerequisite; - uint8_t startingLevel; + std::string name; + std::string abbreviation; + uint8_t classJobCategory; + int8_t expArrayIndex; + uint16_t modifierHitPoints; + uint16_t modifierManaPoints; + uint16_t modifierStrength; + uint16_t modifierVitality; + uint16_t modifierDexterity; + uint16_t modifierIntelligence; + uint16_t modifierMind; + uint16_t modifierPiety; + uint8_t classJobParent; + std::string nameEnglish; + int32_t itemStartingWeapon; + uint16_t limitBreak1; + uint16_t limitBreak2; + uint16_t limitBreak3; + uint32_t itemSoulCrystal; + uint32_t unlockQuest; + uint32_t relicQuest; + uint32_t prerequisite; + uint8_t startingLevel; - ClassJob( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ClassJob( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ClassJobCategory { - std::string name; - bool aDV; - bool gLA; - bool pGL; - bool mRD; - bool lNC; - bool aRC; - bool cNJ; - bool tHM; - bool cRP; - bool bSM; - bool aRM; - bool gSM; - bool lTW; - bool wVR; - bool aLC; - bool cUL; - bool mIN; - bool bTN; - bool fSH; - bool pLD; - bool mNK; - bool wAR; - bool dRG; - bool bRD; - bool wHM; - bool bLM; - bool aCN; - bool sMN; - bool sCH; - bool rOG; - bool nIN; - bool mCH; - bool dRK; - bool aST; - bool sAM; - bool rDM; + std::string name; + bool aDV; + bool gLA; + bool pGL; + bool mRD; + bool lNC; + bool aRC; + bool cNJ; + bool tHM; + bool cRP; + bool bSM; + bool aRM; + bool gSM; + bool lTW; + bool wVR; + bool aLC; + bool cUL; + bool mIN; + bool bTN; + bool fSH; + bool pLD; + bool mNK; + bool wAR; + bool dRG; + bool bRD; + bool wHM; + bool bLM; + bool aCN; + bool sMN; + bool sCH; + bool rOG; + bool nIN; + bool mCH; + bool dRK; + bool aST; + bool sAM; + bool rDM; - ClassJobCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ClassJobCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Companion { - std::string singular; - std::string plural; - uint8_t behavior; - uint16_t icon; - uint8_t cost; - uint16_t hP; - uint16_t skillAngle; - uint8_t skillCost; - uint8_t minionRace; + std::string singular; + std::string plural; + uint8_t behavior; + uint16_t icon; + uint8_t cost; + uint16_t hP; + uint16_t skillAngle; + uint8_t skillCost; + uint8_t minionRace; - Companion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Companion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanionMove { - std::string name; + std::string name; - CompanionMove( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanionMove( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanionTransient { - std::string description; - std::string descriptionEnhanced; - std::string tooltip; - std::string specialActionName; - std::string specialActionDescription; - uint8_t attack; - uint8_t defense; - uint8_t speed; - bool hasAreaAttack; - bool strengthGate; - bool strengthEye; - bool strengthShield; - bool strengthArcana; - uint8_t minionSkillType; + std::string description; + std::string descriptionEnhanced; + std::string tooltip; + std::string specialActionName; + std::string specialActionDescription; + uint8_t attack; + uint8_t defense; + uint8_t speed; + bool hasAreaAttack; + bool strengthGate; + bool strengthEye; + bool strengthShield; + bool strengthArcana; + uint8_t minionSkillType; - CompanionTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanionTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanyAction { - std::string name; - std::string description; - int32_t icon; - uint8_t fCRank; - uint32_t cost; - uint8_t order; - bool purchasable; + std::string name; + std::string description; + int32_t icon; + uint8_t fCRank; + uint32_t cost; + uint8_t order; + bool purchasable; - CompanyAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanyAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanyCraftDraft { - std::string name; - uint8_t companyCraftDraftCategory; - uint32_t order; + std::string name; + uint8_t companyCraftDraftCategory; + uint32_t order; - CompanyCraftDraft( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanyCraftDraft( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanyCraftDraftCategory { - std::string name; + std::string name; - CompanyCraftDraftCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanyCraftDraftCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanyCraftManufactoryState { - std::string name; + std::string name; - CompanyCraftManufactoryState( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanyCraftManufactoryState( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanyCraftPart { - uint8_t companyCraftType; - std::vector< uint16_t > companyCraftProcess; + uint8_t companyCraftType; + std::vector< uint16_t > companyCraftProcess; - CompanyCraftPart( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanyCraftPart( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanyCraftProcess { - CompanyCraftProcess( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanyCraftProcess( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanyCraftSequence { - int32_t resultItem; - int32_t companyCraftDraftCategory; - int32_t companyCraftType; - int32_t companyCraftDraft; - std::vector< uint16_t > companyCraftPart; + int32_t resultItem; + int32_t companyCraftDraftCategory; + int32_t companyCraftType; + int32_t companyCraftDraft; + std::vector< uint16_t > companyCraftPart; - CompanyCraftSequence( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanyCraftSequence( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanyCraftSupplyItem { - uint32_t item; + uint32_t item; - CompanyCraftSupplyItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanyCraftSupplyItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompanyCraftType { - std::string name; + std::string name; - CompanyCraftType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompanyCraftType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompleteJournal { - std::string name; - std::vector< int32_t > cutscene; + std::string name; + std::vector< int32_t > cutscene; - CompleteJournal( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompleteJournal( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CompleteJournalCategory { - uint32_t firstQuest; - uint32_t lastQuest; + uint32_t firstQuest; + uint32_t lastQuest; - CompleteJournalCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CompleteJournalCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentExAction { - uint32_t name; - uint8_t charges; + uint32_t name; + uint8_t charges; - ContentExAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentExAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentFinderCondition { - uint16_t instanceContent; - uint8_t contentMemberType; - uint8_t classJobLevelRequired; - uint8_t classJobLevelSync; - uint16_t itemLevelRequired; - uint16_t itemLevelSync; - uint8_t contentIndicator; - uint8_t contentType; - uint32_t icon; + uint16_t instanceContent; + uint8_t contentMemberType; + uint8_t classJobLevelRequired; + uint8_t classJobLevelSync; + uint16_t itemLevelRequired; + uint16_t itemLevelSync; + uint8_t contentIndicator; + uint8_t contentType; + uint32_t icon; - ContentFinderCondition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentFinderCondition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentFinderConditionTransient { - std::string description; + std::string description; - ContentFinderConditionTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentFinderConditionTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentMemberType { - uint8_t tanksPerParty; - uint8_t healersPerParty; - uint8_t meleesPerParty; - uint8_t rangedPerParty; + uint8_t tanksPerParty; + uint8_t healersPerParty; + uint8_t meleesPerParty; + uint8_t rangedPerParty; - ContentMemberType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentMemberType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentNpcTalk { - std::vector< uint32_t > contentTalk; + std::vector< uint32_t > contentTalk; - ContentNpcTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentNpcTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentRoulette { - std::string name; - std::string description; - std::string dutyType; - bool isInDutyFinder; - uint16_t itemLevelRequired; - uint32_t icon; - uint16_t rewardTomeA; - uint16_t rewardTomeB; - uint16_t rewardTomeC; - uint8_t sortKey; - uint8_t contentMemberType; - bool requireAllDuties; + std::string name; + std::string description; + std::string dutyType; + bool isInDutyFinder; + uint16_t itemLevelRequired; + uint32_t icon; + uint16_t rewardTomeA; + uint16_t rewardTomeB; + uint16_t rewardTomeC; + uint8_t sortKey; + uint8_t contentMemberType; + bool requireAllDuties; - ContentRoulette( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentRoulette( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentsNote { - uint8_t contentType; - int32_t requiredAmount; + uint8_t contentType; + int32_t requiredAmount; - ContentsNote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentsNote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentsNoteCategory { - uint8_t type; + uint8_t type; - ContentsNoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentsNoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentTalk { - uint8_t contentTalkParam; - std::string text; + uint8_t contentTalkParam; + std::string text; - ContentTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentTalkParam { - bool param; - uint32_t testAction; + bool param; + uint32_t testAction; - ContentTalkParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentTalkParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ContentType { - std::string name; - uint32_t icon; - uint32_t iconDutyFinder; + std::string name; + uint32_t icon; + uint32_t iconDutyFinder; - ContentType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ContentType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CraftAction { - std::string name; - std::string description; - uint16_t animationStart; - uint16_t animationEnd; - uint16_t icon; - int8_t classJob; - uint8_t classJobCategory; - uint8_t classJobLevel; - uint32_t questRequirement; - bool specialist; - uint8_t cost; - int32_t cRP; - int32_t bSM; - int32_t aRM; - int32_t gSM; - int32_t lTW; - int32_t wVR; - int32_t aLC; - int32_t cUL; + std::string name; + std::string description; + uint16_t animationStart; + uint16_t animationEnd; + uint16_t icon; + int8_t classJob; + uint8_t classJobCategory; + uint8_t classJobLevel; + uint32_t questRequirement; + bool specialist; + uint8_t cost; + int32_t cRP; + int32_t bSM; + int32_t aRM; + int32_t gSM; + int32_t lTW; + int32_t wVR; + int32_t aLC; + int32_t cUL; - CraftAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CraftAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CraftLeve { - int32_t leve; - uint8_t repeats; + int32_t leve; + uint8_t repeats; - CraftLeve( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CraftLeve( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CraftType { - std::string name; + std::string name; - CraftType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CraftType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Currency { - uint32_t item; - uint32_t limit; + uint32_t item; + uint32_t limit; - Currency( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Currency( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CustomTalk { - uint32_t iconActor; - uint32_t iconMap; - std::string name; - std::vector< std::string > scriptInstruction; - std::vector< uint32_t > scriptArg; - bool text; + uint32_t iconActor; + uint32_t iconMap; + std::string name; + std::vector< std::string > scriptInstruction; + std::vector< uint32_t > scriptArg; + bool text; - CustomTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CustomTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Cutscene { - std::string path; + std::string path; - Cutscene( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Cutscene( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct CutScreenImage { - int32_t image; + int32_t image; - CutScreenImage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + CutScreenImage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DailySupplyItem { - DailySupplyItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DailySupplyItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DeepDungeonBan { - uint16_t screenImage; - uint16_t logMessage; - uint16_t name; + uint16_t screenImage; + uint16_t logMessage; + uint16_t name; - DeepDungeonBan( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DeepDungeonBan( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DeepDungeonDanger { - uint16_t screenImage; - uint16_t logMessage; - uint16_t name; + uint16_t screenImage; + uint16_t logMessage; + uint16_t name; - DeepDungeonDanger( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DeepDungeonDanger( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DeepDungeonEquipment { - uint32_t icon; - std::string singular; - std::string plural; - std::string name; - std::string description; + uint32_t icon; + std::string singular; + std::string plural; + std::string name; + std::string description; - DeepDungeonEquipment( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DeepDungeonEquipment( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DeepDungeonFloorEffectUI { - uint32_t icon; - std::string name; - std::string description; + uint32_t icon; + std::string name; + std::string description; - DeepDungeonFloorEffectUI( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DeepDungeonFloorEffectUI( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DeepDungeonItem { - uint32_t icon; - std::string singular; - std::string plural; - std::string name; - std::string tooltip; - uint32_t action; + uint32_t icon; + std::string singular; + std::string plural; + std::string name; + std::string tooltip; + uint32_t action; - DeepDungeonItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DeepDungeonItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DeepDungeonStatus { - uint16_t screenImage; - uint16_t logMessage; - uint16_t name; + uint16_t screenImage; + uint16_t logMessage; + uint16_t name; - DeepDungeonStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DeepDungeonStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DefaultTalk { - std::vector< uint16_t > actionTimelinePose; - std::vector< std::string > text; + std::vector< uint16_t > actionTimelinePose; + std::vector< std::string > text; - DefaultTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DefaultTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DeliveryQuest { - int32_t quest; + int32_t quest; - DeliveryQuest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DeliveryQuest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DisposalShop { - std::string shopName; + std::string shopName; - DisposalShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DisposalShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DisposalShopFilterType { - std::string category; + std::string category; - DisposalShopFilterType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DisposalShopFilterType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DisposalShopItem { - int32_t itemDisposed; - int32_t itemReceived; - uint32_t quantityReceived; + int32_t itemDisposed; + int32_t itemReceived; + uint32_t quantityReceived; - DisposalShopItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DisposalShopItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DpsChallenge { - uint16_t playerLevel; - uint16_t placeName; - uint32_t icon; - uint16_t order; - std::string name; - std::string description; + uint16_t playerLevel; + uint16_t placeName; + uint32_t icon; + uint16_t order; + std::string name; + std::string description; - DpsChallenge( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DpsChallenge( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DpsChallengeOfficer { - uint32_t unlockQuest; - std::vector< uint16_t > challengeName; + uint32_t unlockQuest; + std::vector< uint16_t > challengeName; - DpsChallengeOfficer( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DpsChallengeOfficer( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct DpsChallengeTransient { - uint16_t instanceContent; + uint16_t instanceContent; - DpsChallengeTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + DpsChallengeTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Emote { - std::string name; - uint8_t emoteCategory; - int32_t textCommand; - uint16_t icon; - uint16_t logMessageTargeted; - uint16_t logMessageUntargeted; - uint8_t emoteMode; - bool hasCancelEmote; - bool drawsWeapon; + std::string name; + uint8_t emoteCategory; + int32_t textCommand; + uint16_t icon; + uint16_t logMessageTargeted; + uint16_t logMessageUntargeted; + uint8_t emoteMode; + bool hasCancelEmote; + bool drawsWeapon; - Emote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Emote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EmoteCategory { - std::string name; + std::string name; - EmoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EmoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EmoteMode { - std::string name; - uint8_t emoteCategory; - int32_t textCommand; - uint16_t icon; - uint16_t logMessageTargeted; - uint16_t logMessageUntargeted; + std::string name; + uint8_t emoteCategory; + int32_t textCommand; + uint16_t icon; + uint16_t logMessageTargeted; + uint16_t logMessageUntargeted; - EmoteMode( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EmoteMode( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ENpcBase { - std::vector< uint32_t > eNpcData; - uint8_t race; - uint8_t gender; - uint8_t bodyType; - uint8_t height; - uint8_t tribe; - uint8_t face; - uint8_t hairStyle; - uint8_t hairHighlight; - uint8_t skinColor; - uint8_t eyeHeterochromia; - uint8_t hairColor; - uint8_t hairHighlightColor; - uint8_t facialFeature; - uint8_t facialFeatureColor; - uint8_t eyebrows; - uint8_t eyeColor; - uint8_t eyeShape; - uint8_t nose; - uint8_t jaw; - uint8_t mouth; - uint8_t lipColor; - uint8_t bustOrTone1; - uint8_t extraFeature1; - uint8_t extraFeature2OrBust; - uint8_t facePaint; - uint8_t facePaintColor; - uint16_t npcEquip; - uint16_t behavior; - uint64_t modelMainHand; - uint8_t dyeMainHand; - uint64_t modelOffHand; - uint8_t dyeOffHand; - uint32_t modelHead; - uint8_t dyeHead; - bool visor; - uint32_t modelBody; - uint8_t dyeBody; - uint32_t modelHands; - uint8_t dyeHands; - uint32_t modelLegs; - uint8_t dyeLegs; - uint32_t modelFeet; - uint8_t dyeFeet; - uint32_t modelEars; - uint8_t dyeEars; - uint32_t modelNeck; - uint8_t dyeNeck; - uint32_t modelWrists; - uint8_t dyeWrists; - uint32_t modelLeftRing; - uint8_t dyeLeftRing; - uint32_t modelRightRing; - uint8_t dyeRightRing; - uint16_t balloon; + std::vector< uint32_t > eNpcData; + uint8_t race; + uint8_t gender; + uint8_t bodyType; + uint8_t height; + uint8_t tribe; + uint8_t face; + uint8_t hairStyle; + uint8_t hairHighlight; + uint8_t skinColor; + uint8_t eyeHeterochromia; + uint8_t hairColor; + uint8_t hairHighlightColor; + uint8_t facialFeature; + uint8_t facialFeatureColor; + uint8_t eyebrows; + uint8_t eyeColor; + uint8_t eyeShape; + uint8_t nose; + uint8_t jaw; + uint8_t mouth; + uint8_t lipColor; + uint8_t bustOrTone1; + uint8_t extraFeature1; + uint8_t extraFeature2OrBust; + uint8_t facePaint; + uint8_t facePaintColor; + uint16_t npcEquip; + uint16_t behavior; + uint64_t modelMainHand; + uint8_t dyeMainHand; + uint64_t modelOffHand; + uint8_t dyeOffHand; + uint32_t modelHead; + uint8_t dyeHead; + bool visor; + uint32_t modelBody; + uint8_t dyeBody; + uint32_t modelHands; + uint8_t dyeHands; + uint32_t modelLegs; + uint8_t dyeLegs; + uint32_t modelFeet; + uint8_t dyeFeet; + uint32_t modelEars; + uint8_t dyeEars; + uint32_t modelNeck; + uint8_t dyeNeck; + uint32_t modelWrists; + uint8_t dyeWrists; + uint32_t modelLeftRing; + uint8_t dyeLeftRing; + uint32_t modelRightRing; + uint8_t dyeRightRing; + uint16_t balloon; - ENpcBase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ENpcBase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ENpcResident { - std::string singular; - std::string plural; - std::string title; - uint8_t map; + std::string singular; + std::string plural; + std::string title; + uint8_t map; - ENpcResident( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ENpcResident( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EObj { - uint32_t data; + uint32_t data; - EObj( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EObj( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EObjName { - std::string singular; + std::string singular; - EObjName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EObjName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EquipRaceCategory { - bool hyur; - bool elezen; - bool lalafell; - bool miqote; - bool roegadyn; - bool auRa; - bool male; - bool female; + bool hyur; + bool elezen; + bool lalafell; + bool miqote; + bool roegadyn; + bool auRa; + bool male; + bool female; - EquipRaceCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EquipRaceCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EquipSlotCategory { - int8_t mainHand; - int8_t offHand; - int8_t head; - int8_t body; - int8_t gloves; - int8_t waist; - int8_t legs; - int8_t feet; - int8_t ears; - int8_t neck; - int8_t wrists; - int8_t fingerL; - int8_t fingerR; - int8_t soulCrystal; + int8_t mainHand; + int8_t offHand; + int8_t head; + int8_t body; + int8_t gloves; + int8_t waist; + int8_t legs; + int8_t feet; + int8_t ears; + int8_t neck; + int8_t wrists; + int8_t fingerL; + int8_t fingerR; + int8_t soulCrystal; - EquipSlotCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EquipSlotCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EurekaAethernet { - uint16_t location; + uint16_t location; - EurekaAethernet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EurekaAethernet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EurekaGrowData { - uint16_t baseResistance; + uint16_t baseResistance; - EurekaGrowData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EurekaGrowData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EurekaSphereElementAdjust { - uint16_t powerModifier; + uint16_t powerModifier; - EurekaSphereElementAdjust( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EurekaSphereElementAdjust( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EventAction { - std::string name; - uint16_t icon; - uint8_t castTime; + std::string name; + uint16_t icon; + uint8_t castTime; - EventAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EventAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EventIconPriority { - std::vector< uint32_t > icon; + std::vector< uint32_t > icon; - EventIconPriority( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EventIconPriority( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EventIconType { - uint32_t npcIconAvailable; - uint32_t mapIconAvailable; - uint32_t npcIconInvalid; - uint32_t mapIconInvalid; - uint8_t iconRange; + uint32_t npcIconAvailable; + uint32_t mapIconAvailable; + uint32_t npcIconInvalid; + uint32_t mapIconInvalid; + uint8_t iconRange; - EventIconType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EventIconType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EventItem { - std::string singular; - std::string plural; - int8_t rarity; - std::string name; - uint16_t icon; - uint8_t stackSize; - uint32_t quest; - uint8_t castTime; + std::string singular; + std::string plural; + int8_t rarity; + std::string name; + uint16_t icon; + uint8_t stackSize; + uint32_t quest; + uint8_t castTime; - EventItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EventItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct EventItemHelp { - std::string description; + std::string description; - EventItemHelp( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + EventItemHelp( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ExVersion { - std::string name; + std::string name; - ExVersion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ExVersion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Fate { - uint8_t eurekaFate; - uint32_t location; - uint8_t classJobLevel; - uint8_t classJobLevelMax; - uint32_t eventItem; - uint32_t iconObjective; - uint32_t iconMap; - int32_t music; - std::string name; - std::string description; - std::string objective; - std::vector< std::string > statusText; - uint32_t arrayIndex; + uint8_t eurekaFate; + uint32_t location; + uint8_t classJobLevel; + uint8_t classJobLevelMax; + uint32_t eventItem; + uint32_t iconObjective; + uint32_t iconMap; + int32_t music; + std::string name; + std::string description; + std::string objective; + std::vector< std::string > statusText; + uint32_t arrayIndex; - Fate( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Fate( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FCActivity { - std::string text; - uint8_t fCActivityCategory; + std::string text; + uint8_t fCActivityCategory; - FCActivity( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FCActivity( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FCActivityCategory { - std::string name; + std::string name; - FCActivityCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FCActivityCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FCAuthority { - std::string name; - int32_t fCAuthorityCategory; + std::string name; + int32_t fCAuthorityCategory; - FCAuthority( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FCAuthority( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FCAuthorityCategory { - std::string name; + std::string name; - FCAuthorityCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FCAuthorityCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FCChestName { - std::string name; + std::string name; - FCChestName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FCChestName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FccShop { - std::string name; + std::string name; - FccShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FccShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FCHierarchy { - std::string name; + std::string name; - FCHierarchy( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FCHierarchy( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FCProfile { - std::string name; + std::string name; - FCProfile( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FCProfile( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FCReputation { - uint32_t pointsToNext; - uint32_t requiredPoints; - std::string name; + uint32_t pointsToNext; + uint32_t requiredPoints; + std::string name; - FCReputation( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FCReputation( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FCRights { - std::string name; - std::string description; - uint16_t icon; - uint8_t fCRank; + std::string name; + std::string description; + uint16_t icon; + uint8_t fCRank; - FCRights( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FCRights( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FieldMarker { - int32_t vFX; - uint16_t icon; + int32_t vFX; + uint16_t icon; - FieldMarker( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FieldMarker( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FishingSpot { - uint8_t gatheringLevel; - std::string bigFishOnReach; - std::string bigFishOnEnd; - uint8_t fishingSpotCategory; - uint16_t territoryType; - int16_t x; - int16_t z; - uint16_t radius; - std::vector< int32_t > item; - uint16_t placeName; + uint8_t gatheringLevel; + std::string bigFishOnReach; + std::string bigFishOnEnd; + uint8_t fishingSpotCategory; + uint16_t territoryType; + int16_t x; + int16_t z; + uint16_t radius; + std::vector< int32_t > item; + uint16_t placeName; - FishingSpot( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FishingSpot( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct FishParameter { - std::string text; - int32_t item; - uint16_t gatheringItemLevel; - int32_t territoryType; - bool isFish; - uint16_t gatheringSubCategory; + std::string text; + int32_t item; + uint16_t gatheringItemLevel; + int32_t territoryType; + bool isFish; + uint16_t gatheringSubCategory; - FishParameter( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + FishParameter( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GardeningSeed { - uint32_t item; - uint32_t icon; + uint32_t item; + uint32_t icon; - GardeningSeed( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GardeningSeed( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringCondition { - std::string text; + std::string text; - GatheringCondition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringCondition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringExp { - uint16_t exp; + uint16_t exp; - GatheringExp( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringExp( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringItem { - int32_t item; - uint16_t gatheringItemLevel; - bool isHidden; + int32_t item; + uint16_t gatheringItemLevel; + bool isHidden; - GatheringItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringItemLevelConvertTable { - uint8_t gatheringItemLevel; - uint8_t stars; + uint8_t gatheringItemLevel; + uint8_t stars; - GatheringItemLevelConvertTable( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringItemLevelConvertTable( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringItemPoint { - uint32_t gatheringPoint; + uint32_t gatheringPoint; - GatheringItemPoint( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringItemPoint( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringNotebookList { - std::vector< int32_t > gatheringItem; + std::vector< int32_t > gatheringItem; - GatheringNotebookList( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringNotebookList( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringPoint { - int32_t gatheringPointBase; - std::vector< uint16_t > gatheringPointBonus; - uint16_t territoryType; - uint16_t placeName; - uint16_t gatheringSubCategory; + int32_t gatheringPointBase; + std::vector< uint16_t > gatheringPointBonus; + uint16_t territoryType; + uint16_t placeName; + uint16_t gatheringSubCategory; - GatheringPoint( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringPoint( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringPointBase { - int32_t gatheringType; - uint8_t gatheringLevel; - std::vector< int32_t > item; - bool isLimited; + int32_t gatheringType; + uint8_t gatheringLevel; + std::vector< int32_t > item; + bool isLimited; - GatheringPointBase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringPointBase( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringPointBonus { - uint8_t condition; - uint16_t conditionValue; - uint8_t bonusType; - uint16_t bonusValue; + uint8_t condition; + uint16_t conditionValue; + uint8_t bonusType; + uint16_t bonusValue; - GatheringPointBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringPointBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringPointBonusType { - std::string text; + std::string text; - GatheringPointBonusType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringPointBonusType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringPointName { - std::string singular; - std::string plural; + std::string singular; + std::string plural; - GatheringPointName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringPointName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringSubCategory { - int32_t item; - std::string folkloreBook; + int32_t item; + std::string folkloreBook; - GatheringSubCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringSubCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GatheringType { - std::string name; - int32_t iconMain; - int32_t iconOff; + std::string name; + int32_t iconMain; + int32_t iconOff; - GatheringType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GatheringType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GcArmyExpedition { - uint8_t requiredFlag; - uint8_t unlockFlag; - uint8_t requiredLevel; - uint16_t requiredSeals; - uint32_t rewardExperience; - uint8_t percentBase; - uint8_t gcArmyExpeditionType; - std::string name; - std::string description; + uint8_t requiredFlag; + uint8_t unlockFlag; + uint8_t requiredLevel; + uint16_t requiredSeals; + uint32_t rewardExperience; + uint8_t percentBase; + uint8_t gcArmyExpeditionType; + std::string name; + std::string description; - GcArmyExpedition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GcArmyExpedition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GcArmyExpeditionMemberBonus { - uint8_t race; - uint8_t classJob; + uint8_t race; + uint8_t classJob; - GcArmyExpeditionMemberBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GcArmyExpeditionMemberBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GcArmyExpeditionType { - std::string name; + std::string name; - GcArmyExpeditionType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GcArmyExpeditionType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GcArmyMemberGrow { - uint8_t classJob; - int32_t classBook; + uint8_t classJob; + int32_t classBook; - GcArmyMemberGrow( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GcArmyMemberGrow( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GcArmyTraining { - int8_t physicalBonus; - int8_t mentalBonus; - int8_t tacticalBonus; - uint32_t experience; - std::string name; - std::string description; + int8_t physicalBonus; + int8_t mentalBonus; + int8_t tacticalBonus; + uint32_t experience; + std::string name; + std::string description; - GcArmyTraining( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GcArmyTraining( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCRankGridaniaFemaleText { - std::string name; - std::string plural; - std::string nameRank; + std::string name; + std::string plural; + std::string nameRank; - GCRankGridaniaFemaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCRankGridaniaFemaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCRankGridaniaMaleText { - std::string name; - std::string plural; - std::string nameRank; + std::string name; + std::string plural; + std::string nameRank; - GCRankGridaniaMaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCRankGridaniaMaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCRankLimsaFemaleText { - std::string name; - std::string plural; - std::string nameRank; + std::string name; + std::string plural; + std::string nameRank; - GCRankLimsaFemaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCRankLimsaFemaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCRankLimsaMaleText { - std::string name; - std::string plural; - std::string nameRank; + std::string name; + std::string plural; + std::string nameRank; - GCRankLimsaMaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCRankLimsaMaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCRankUldahFemaleText { - std::string name; - std::string plural; - std::string nameRank; + std::string name; + std::string plural; + std::string nameRank; - GCRankUldahFemaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCRankUldahFemaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCRankUldahMaleText { - std::string name; - std::string plural; - std::string nameRank; + std::string name; + std::string plural; + std::string nameRank; - GCRankUldahMaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCRankUldahMaleText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCScripShopCategory { - int8_t grandCompany; - int8_t tier; - int8_t subCategory; + int8_t grandCompany; + int8_t tier; + int8_t subCategory; - GCScripShopCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCScripShopCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCScripShopItem { - int32_t item; - int32_t requiredGrandCompanyRank; - uint32_t costGCSeals; - uint8_t sortKey; + int32_t item; + int32_t requiredGrandCompanyRank; + uint32_t costGCSeals; + uint8_t sortKey; - GCScripShopItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCScripShopItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCShop { - int8_t grandCompany; + int8_t grandCompany; - GCShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCShopItemCategory { - std::string name; + std::string name; - GCShopItemCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCShopItemCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCSupplyDuty { - GCSupplyDuty( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCSupplyDuty( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GCSupplyDutyReward { - uint32_t experienceSupply; - uint32_t experienceProvisioning; - uint32_t sealsExpertDelivery; - uint32_t sealsSupply; - uint32_t sealsProvisioning; + uint32_t experienceSupply; + uint32_t experienceProvisioning; + uint32_t sealsExpertDelivery; + uint32_t sealsSupply; + uint32_t sealsProvisioning; - GCSupplyDutyReward( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GCSupplyDutyReward( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GeneralAction { - std::string name; - std::string description; - uint16_t action; - int32_t icon; + std::string name; + std::string description; + uint16_t action; + int32_t icon; - GeneralAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GeneralAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GilShop { - std::string name; + std::string name; - GilShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GilShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GilShopItem { - int32_t item; - std::vector< int32_t > rowRequired; - uint16_t stateRequired; - uint16_t patch; + int32_t item; + std::vector< int32_t > rowRequired; + uint16_t stateRequired; + uint16_t patch; - GilShopItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GilShopItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GoldSaucerTextData { - std::string text; + std::string text; - GoldSaucerTextData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GoldSaucerTextData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GrandCompany { - std::string name; + std::string name; - GrandCompany( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GrandCompany( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GrandCompanyRank { - uint8_t tier; - uint8_t order; - uint32_t maxSeals; - uint32_t requiredSeals; - int32_t iconMaelstrom; - int32_t iconSerpents; - int32_t iconFlames; - int32_t questMaelstrom; - int32_t questSerpents; - int32_t questFlames; + uint8_t tier; + uint8_t order; + uint32_t maxSeals; + uint32_t requiredSeals; + int32_t iconMaelstrom; + int32_t iconSerpents; + int32_t iconFlames; + int32_t questMaelstrom; + int32_t questSerpents; + int32_t questFlames; - GrandCompanyRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GrandCompanyRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GuardianDeity { - std::string name; - std::string description; - uint16_t icon; + std::string name; + std::string description; + uint16_t icon; - GuardianDeity( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GuardianDeity( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GuildleveAssignment { - std::vector< uint32_t > quest; + std::vector< uint32_t > quest; - GuildleveAssignment( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GuildleveAssignment( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GuildOrderGuide { - GuildOrderGuide( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GuildOrderGuide( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct GuildOrderOfficer { - GuildOrderOfficer( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + GuildOrderOfficer( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct HouseRetainerPose { - uint16_t actionTimeline; + uint16_t actionTimeline; - HouseRetainerPose( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + HouseRetainerPose( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct HousingFurniture { - uint16_t modelKey; - uint8_t housingItemCategory; - uint8_t usageType; - uint32_t usageParameter; - uint8_t housingLayoutLimit; - uint32_t event; - uint32_t item; - bool destroyOnRemoval; + uint16_t modelKey; + uint8_t housingItemCategory; + uint8_t usageType; + uint32_t usageParameter; + uint8_t housingLayoutLimit; + uint32_t event; + uint32_t item; + bool destroyOnRemoval; - HousingFurniture( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + HousingFurniture( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct HousingYardObject { - uint8_t modelKey; - uint8_t housingItemCategory; - uint8_t usageType; - uint32_t usageParameter; - uint8_t housingLayoutLimit; - uint32_t event; - uint32_t item; - bool destroyOnRemoval; + uint8_t modelKey; + uint8_t housingItemCategory; + uint8_t usageType; + uint32_t usageParameter; + uint8_t housingLayoutLimit; + uint32_t event; + uint32_t item; + bool destroyOnRemoval; - HousingYardObject( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + HousingYardObject( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct InstanceContent { - uint8_t instanceContentType; - uint8_t weekRestriction; - uint16_t timeLimitmin; - std::string name; - uint16_t bGM; - uint32_t territoryType; - uint32_t instanceContentTextDataBossStart; - uint32_t instanceContentTextDataBossEnd; - uint32_t bNpcBaseBoss; - uint32_t instanceContentTextDataObjectiveStart; - uint32_t instanceContentTextDataObjectiveEnd; - uint16_t sortKey; - uint16_t newPlayerBonusA; - uint16_t newPlayerBonusB; - uint16_t finalBossCurrencyA; - uint16_t finalBossCurrencyB; - uint16_t finalBossCurrencyC; - int32_t instanceContentBuff; - uint8_t partyCondition; + uint8_t instanceContentType; + uint8_t weekRestriction; + uint16_t timeLimitmin; + std::string name; + uint16_t bGM; + uint32_t territoryType; + uint32_t instanceContentTextDataBossStart; + uint32_t instanceContentTextDataBossEnd; + uint32_t bNpcBaseBoss; + uint32_t instanceContentTextDataObjectiveStart; + uint32_t instanceContentTextDataObjectiveEnd; + uint16_t sortKey; + uint16_t newPlayerBonusA; + uint16_t newPlayerBonusB; + uint16_t finalBossCurrencyA; + uint16_t finalBossCurrencyB; + uint16_t finalBossCurrencyC; + int32_t instanceContentBuff; + uint8_t partyCondition; - InstanceContent( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + InstanceContent( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct InstanceContentBuff { - uint16_t echoStart; - uint16_t echoDeath; + uint16_t echoStart; + uint16_t echoDeath; - InstanceContentBuff( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + InstanceContentBuff( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct InstanceContentTextData { - std::string text; + std::string text; - InstanceContentTextData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + InstanceContentTextData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Item { - std::string singular; - std::string plural; - int8_t startsWithVowel; - std::string description; - std::string name; - uint16_t icon; - uint16_t levelItem; - uint8_t rarity; - uint8_t filterGroup; - uint32_t stain; - uint8_t itemUICategory; - uint8_t itemSearchCategory; - uint8_t equipSlotCategory; - uint32_t stackSize; - bool isUnique; - bool isUntradable; - bool isIndisposable; - bool isEquippable; - uint32_t priceMid; - uint32_t priceLow; - bool canBeHq; - bool isDyeable; - bool isCrestWorthy; - uint16_t itemAction; - uint16_t cooldowns; - uint8_t classJobRepair; - int32_t itemRepair; - int32_t itemGlamour; - uint16_t salvage; - bool isCollectable; - uint16_t aetherialReduce; - uint8_t levelEquip; - uint8_t equipRestriction; - uint8_t classJobCategory; - uint8_t grandCompany; - uint8_t itemSeries; - uint8_t baseParamModifier; - uint64_t modelMain; - uint64_t modelSub; - uint8_t classJobUse; - uint16_t damagePhys; - uint16_t damageMag; - uint16_t delayms; - uint16_t blockRate; - uint16_t block; - uint16_t defensePhys; - uint16_t defenseMag; - uint8_t itemSpecialBonus; - uint8_t itemSpecialBonusParam; - uint8_t materializeType; - uint8_t materiaSlotCount; - bool isAdvancedMeldingPermitted; - bool isPvP; + std::string singular; + std::string plural; + int8_t startsWithVowel; + std::string description; + std::string name; + uint16_t icon; + uint16_t levelItem; + uint8_t rarity; + uint8_t filterGroup; + uint32_t stain; + uint8_t itemUICategory; + uint8_t itemSearchCategory; + uint8_t equipSlotCategory; + uint32_t stackSize; + bool isUnique; + bool isUntradable; + bool isIndisposable; + bool isEquippable; + uint32_t priceMid; + uint32_t priceLow; + bool canBeHq; + bool isDyeable; + bool isCrestWorthy; + uint16_t itemAction; + uint16_t cooldowns; + uint8_t classJobRepair; + int32_t itemRepair; + int32_t itemGlamour; + uint16_t salvage; + bool isCollectable; + uint16_t aetherialReduce; + uint8_t levelEquip; + uint8_t equipRestriction; + uint8_t classJobCategory; + uint8_t grandCompany; + uint8_t itemSeries; + uint8_t baseParamModifier; + uint64_t modelMain; + uint64_t modelSub; + uint8_t classJobUse; + uint16_t damagePhys; + uint16_t damageMag; + uint16_t delayms; + uint16_t blockRate; + uint16_t block; + uint16_t defensePhys; + uint16_t defenseMag; + uint8_t itemSpecialBonus; + uint8_t itemSpecialBonusParam; + uint8_t materializeType; + uint8_t materiaSlotCount; + bool isAdvancedMeldingPermitted; + bool isPvP; - Item( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Item( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ItemAction { - uint16_t type; - std::vector< uint16_t > data; - std::vector< uint16_t > dataHQ; + uint16_t type; + std::vector< uint16_t > data; + std::vector< uint16_t > dataHQ; - ItemAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ItemAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ItemFood { - ItemFood( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ItemFood( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ItemSearchCategory { - std::string name; - int32_t icon; - uint8_t category; - uint8_t order; - int8_t classJob; + std::string name; + int32_t icon; + uint8_t category; + uint8_t order; + int8_t classJob; - ItemSearchCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ItemSearchCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ItemSeries { - std::string name; + std::string name; - ItemSeries( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ItemSeries( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ItemSpecialBonus { - std::string name; + std::string name; - ItemSpecialBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ItemSpecialBonus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ItemUICategory { - std::string name; - int32_t icon; - uint8_t orderMinor; - uint8_t orderMajor; + std::string name; + int32_t icon; + uint8_t orderMinor; + uint8_t orderMajor; - ItemUICategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ItemUICategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct JournalCategory { - std::string name; - uint8_t journalSection; + std::string name; + uint8_t journalSection; - JournalCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + JournalCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct JournalGenre { - int32_t icon; - uint8_t journalCategory; - std::string name; + int32_t icon; + uint8_t journalCategory; + std::string name; - JournalGenre( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + JournalGenre( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct JournalSection { - std::string name; + std::string name; - JournalSection( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + JournalSection( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Leve { - std::string name; - std::string description; - int32_t leveClient; - int32_t leveAssignmentType; - uint16_t classJobLevel; - uint8_t allowanceCost; - int32_t placeNameStart; - int32_t placeNameIssued; - uint8_t classJobCategory; - int32_t journalGenre; - int32_t placeNameStartZone; - int32_t iconCityState; - int32_t dataId; - uint32_t expReward; - uint32_t gilReward; - uint16_t leveRewardItem; - uint8_t leveVfx; - uint8_t leveVfxFrame; - uint32_t levelLevemete; - int32_t iconIssuer; - uint32_t levelStart; - uint16_t bGM; + std::string name; + std::string description; + int32_t leveClient; + int32_t leveAssignmentType; + uint16_t classJobLevel; + uint8_t allowanceCost; + int32_t placeNameStart; + int32_t placeNameIssued; + uint8_t classJobCategory; + int32_t journalGenre; + int32_t placeNameStartZone; + int32_t iconCityState; + int32_t dataId; + uint32_t expReward; + uint32_t gilReward; + uint16_t leveRewardItem; + uint8_t leveVfx; + uint8_t leveVfxFrame; + uint32_t levelLevemete; + int32_t iconIssuer; + uint32_t levelStart; + uint16_t bGM; - Leve( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Leve( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct LeveAssignmentType { - bool isFaction; - int32_t icon; - std::string name; + bool isFaction; + int32_t icon; + std::string name; - LeveAssignmentType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + LeveAssignmentType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct LeveClient { - std::string name; + std::string name; - LeveClient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + LeveClient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Level { - float x; - float y; - float z; - float yaw; - float radius; - uint8_t type; - uint32_t objectKey; - uint16_t map; - uint32_t eventId; - uint16_t territory; + float x; + float y; + float z; + float yaw; + float radius; + uint8_t type; + uint32_t objectKey; + uint16_t map; + uint32_t eventId; + uint16_t territory; - Level( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Level( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct LeveRewardItem { - LeveRewardItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + LeveRewardItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct LeveRewardItemGroup { - LeveRewardItemGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + LeveRewardItemGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct LeveVfx { - std::string effect; - int32_t icon; + std::string effect; + int32_t icon; - LeveVfx( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + LeveVfx( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct LogFilter { - uint16_t logKind; - std::string name; - std::string example; + uint16_t logKind; + std::string name; + std::string example; - LogFilter( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + LogFilter( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct LogKind { - std::string format; - std::string name; - std::string example; - uint8_t logKindCategoryText; + std::string format; + std::string name; + std::string example; + uint8_t logKindCategoryText; - LogKind( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + LogKind( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct LogKindCategoryText { - std::string text; + std::string text; - LogKindCategoryText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + LogKindCategoryText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct LogMessage { - uint16_t logKind; - std::string text; + uint16_t logKind; + std::string text; - LogMessage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + LogMessage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MacroIcon { - int32_t icon; + int32_t icon; - MacroIcon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MacroIcon( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MacroIconRedirectOld { - uint32_t iconOld; - int32_t iconNew; + uint32_t iconOld; + int32_t iconNew; - MacroIconRedirectOld( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MacroIconRedirectOld( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MainCommand { - int32_t icon; - uint8_t mainCommandCategory; - std::string name; - std::string description; + int32_t icon; + uint8_t mainCommandCategory; + std::string name; + std::string description; - MainCommand( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MainCommand( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MainCommandCategory { - std::string name; + std::string name; - MainCommandCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MainCommandCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Map { - uint8_t hierarchy; - uint16_t mapMarkerRange; - std::string id; - uint16_t sizeFactor; - int16_t offsetX; - int16_t offsetY; - uint16_t placeNameRegion; - uint16_t placeName; - uint16_t placeNameSub; - int16_t discoveryIndex; - uint16_t territoryType; - bool discoveryArrayByte; + uint8_t hierarchy; + uint16_t mapMarkerRange; + std::string id; + uint16_t sizeFactor; + int16_t offsetX; + int16_t offsetY; + uint16_t placeNameRegion; + uint16_t placeName; + uint16_t placeNameSub; + int16_t discoveryIndex; + uint16_t territoryType; + bool discoveryArrayByte; - Map( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Map( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MapMarker { - int16_t x; - int16_t y; - uint16_t icon; - uint16_t placeNameSubtext; - uint8_t subtextOrientation; - uint8_t mapMarkerRegion; - uint8_t type; - uint8_t dataType; - uint16_t dataKey; + int16_t x; + int16_t y; + uint16_t icon; + uint16_t placeNameSubtext; + uint8_t subtextOrientation; + uint8_t mapMarkerRegion; + uint8_t type; + uint8_t dataType; + uint16_t dataKey; - MapMarker( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MapMarker( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MapMarkerRegion { - int16_t x; + int16_t x; - MapMarkerRegion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MapMarkerRegion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MapSymbol { - int32_t icon; - int32_t placeName; + int32_t icon; + int32_t placeName; - MapSymbol( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MapSymbol( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Marker { - int32_t icon; - std::string name; + int32_t icon; + std::string name; - Marker( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Marker( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MasterpieceSupplyDuty { - uint8_t classJob; - uint8_t classJobLevel; - uint16_t rewardCurrency; + uint8_t classJob; + uint8_t classJobLevel; + uint16_t rewardCurrency; - MasterpieceSupplyDuty( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MasterpieceSupplyDuty( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MasterpieceSupplyMultiplier { - std::vector< uint16_t > xpMultiplier; - std::vector< uint16_t > currencyMultiplier; + std::vector< uint16_t > xpMultiplier; + std::vector< uint16_t > currencyMultiplier; - MasterpieceSupplyMultiplier( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MasterpieceSupplyMultiplier( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Materia { - std::vector< int32_t > item; - uint8_t baseParam; - std::vector< uint8_t > value; + std::vector< int32_t > item; + uint8_t baseParam; + std::vector< uint8_t > value; - Materia( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Materia( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MinionRace { - std::string name; + std::string name; - MinionRace( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MinionRace( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MinionRules { - std::string rule; - std::string description; + std::string rule; + std::string description; - MinionRules( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MinionRules( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MinionSkillType { - std::string name; + std::string name; - MinionSkillType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MinionSkillType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MobHuntTarget { - uint16_t name; - uint16_t fATE; - uint32_t icon; - uint16_t territoryType; - uint16_t placeName; + uint16_t name; + uint16_t fATE; + uint32_t icon; + uint16_t territoryType; + uint16_t placeName; - MobHuntTarget( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MobHuntTarget( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ModelChara { - uint8_t type; - uint16_t model; - uint8_t base; - uint8_t variant; + uint8_t type; + uint16_t model; + uint8_t base; + uint8_t variant; - ModelChara( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ModelChara( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MonsterNote { - std::vector< uint16_t > monsterNoteTarget; - std::vector< uint8_t > count; - uint32_t reward; - std::string name; + std::vector< uint16_t > monsterNoteTarget; + std::vector< uint8_t > count; + uint32_t reward; + std::string name; - MonsterNote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MonsterNote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MonsterNoteTarget { - uint16_t bNpcName; - int32_t icon; + uint16_t bNpcName; + int32_t icon; - MonsterNoteTarget( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MonsterNoteTarget( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Mount { - std::string singular; - std::string plural; - uint8_t flyingCondition; - uint8_t isFlying; - uint16_t rideBGM; - int16_t order; - uint16_t icon; + std::string singular; + std::string plural; + uint8_t flyingCondition; + uint8_t isFlying; + uint16_t rideBGM; + int16_t order; + uint16_t icon; - Mount( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Mount( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MountAction { - std::vector< uint16_t > action; + std::vector< uint16_t > action; - MountAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MountAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MoveTimeline { - uint16_t idle; - uint16_t moveForward; - uint16_t moveBack; - uint16_t moveLeft; - uint16_t moveRight; - uint16_t moveUp; - uint16_t moveDown; - uint16_t moveTurnLeft; - uint16_t moveTurnRight; - uint16_t extra; + uint16_t idle; + uint16_t moveForward; + uint16_t moveBack; + uint16_t moveLeft; + uint16_t moveRight; + uint16_t moveUp; + uint16_t moveDown; + uint16_t moveTurnLeft; + uint16_t moveTurnRight; + uint16_t extra; - MoveTimeline( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MoveTimeline( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct MoveVfx { - uint16_t zero; - uint16_t one; + uint16_t zero; + uint16_t one; - MoveVfx( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + MoveVfx( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct NpcEquip { - uint64_t modelMainHand; - uint8_t dyeMainHand; - uint64_t modelOffHand; - uint8_t dyeOffHand; - uint32_t modelHead; - uint8_t dyeHead; - bool visor; - uint32_t modelBody; - uint8_t dyeBody; - uint32_t modelHands; - uint8_t dyeHands; - uint32_t modelLegs; - uint8_t dyeLegs; - uint32_t modelFeet; - uint8_t dyeFeet; - uint32_t modelEars; - uint8_t dyeEars; - uint32_t modelNeck; - uint8_t dyeNeck; - uint32_t modelWrists; - uint8_t dyeWrists; - uint32_t modelLeftRing; - uint8_t dyeLeftRing; - uint32_t modelRightRing; - uint8_t dyeRightRing; + uint64_t modelMainHand; + uint8_t dyeMainHand; + uint64_t modelOffHand; + uint8_t dyeOffHand; + uint32_t modelHead; + uint8_t dyeHead; + bool visor; + uint32_t modelBody; + uint8_t dyeBody; + uint32_t modelHands; + uint8_t dyeHands; + uint32_t modelLegs; + uint8_t dyeLegs; + uint32_t modelFeet; + uint8_t dyeFeet; + uint32_t modelEars; + uint8_t dyeEars; + uint32_t modelNeck; + uint8_t dyeNeck; + uint32_t modelWrists; + uint8_t dyeWrists; + uint32_t modelLeftRing; + uint8_t dyeLeftRing; + uint32_t modelRightRing; + uint8_t dyeRightRing; - NpcEquip( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + NpcEquip( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Omen { - std::string fileName; + std::string fileName; - Omen( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Omen( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct OnlineStatus { - uint8_t priority; - std::string name; - uint32_t icon; + uint8_t priority; + std::string name; + uint32_t icon; - OnlineStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + OnlineStatus( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Opening { - std::string name; + std::string name; - Opening( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Opening( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Orchestrion { - std::string name; - std::string description; + std::string name; + std::string description; - Orchestrion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Orchestrion( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct OrchestrionCategory { - std::string name; + std::string name; - OrchestrionCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + OrchestrionCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct OrchestrionPath { - std::string file; + std::string file; - OrchestrionPath( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + OrchestrionPath( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct OrchestrionUiparam { - uint8_t orchestrionCategory; - uint16_t order; + uint8_t orchestrionCategory; + uint16_t order; - OrchestrionUiparam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + OrchestrionUiparam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ParamGrow { - int32_t expToNext; - uint8_t additionalActions; - int32_t mpModifier; - int32_t baseSpeed; - int32_t levelModifier; - uint8_t questExpModifier; - uint16_t hpModifier; - int32_t huntingLogExpReward; + int32_t expToNext; + uint8_t additionalActions; + int32_t mpModifier; + int32_t baseSpeed; + int32_t levelModifier; + uint8_t questExpModifier; + uint16_t hpModifier; + int32_t huntingLogExpReward; - ParamGrow( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ParamGrow( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Perform { - std::string name; - uint64_t modelKey; - uint16_t animationStart; - uint16_t animationEnd; - uint16_t animationIdle; - uint16_t animationPlay01; - uint16_t animationPlay02; - int32_t stopAnimation; - std::string instrument; - uint8_t transient; + std::string name; + uint64_t modelKey; + uint16_t animationStart; + uint16_t animationEnd; + uint16_t animationIdle; + uint16_t animationPlay01; + uint16_t animationPlay02; + int32_t stopAnimation; + std::string instrument; + uint8_t transient; - Perform( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Perform( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct PerformTransient { - std::string text; + std::string text; - PerformTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + PerformTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Pet { - std::string name; + std::string name; - Pet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Pet( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct PetAction { - std::string name; - std::string description; - uint16_t action; - uint8_t pet; + std::string name; + std::string description; + uint16_t action; + uint8_t pet; - PetAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + PetAction( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Picture { - int32_t item; - int32_t image; - int32_t signature; + int32_t item; + int32_t image; + int32_t signature; - Picture( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Picture( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct PlaceName { - std::string name; - std::string nameNoArticle; + std::string name; + std::string nameNoArticle; - PlaceName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + PlaceName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct PublicContent { - uint16_t timeLimit; - uint32_t mapIcon; - std::string name; - uint16_t territoryType; + uint16_t timeLimit; + uint32_t mapIcon; + std::string name; + uint16_t territoryType; - PublicContent( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + PublicContent( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct PvPActionSort { - uint8_t name; - uint16_t action; + uint8_t name; + uint16_t action; - PvPActionSort( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + PvPActionSort( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Quest { - std::string name; - std::string id; - uint8_t expansion; - uint8_t classJobCategory0; - uint16_t classJobLevel0; - uint8_t questLevelOffset; - uint8_t classJobCategory1; - uint16_t classJobLevel1; - uint8_t previousQuestJoin; - uint32_t previousQuest0; - uint32_t previousQuest1; - uint32_t previousQuest2; - uint8_t questLockJoin; - std::vector< uint32_t > questLock; - uint8_t classJobUnlock; - uint8_t grandCompany; - uint8_t grandCompanyRank; - uint8_t instanceContentJoin; - std::vector< uint32_t > instanceContent; - uint16_t bellStart; - uint16_t bellEnd; - uint8_t beastTribe; - uint8_t beastReputationRank; - int32_t mountRequired; - bool isHouseRequired; - uint32_t eNpcResidentStart; - uint32_t eNpcResidentEnd; - bool isRepeatable; - uint8_t repeatIntervalType; - std::vector< std::string > scriptInstruction; - std::vector< uint32_t > scriptArg; - std::vector< uint32_t > level; - uint8_t classJobRequired; - uint16_t expFactor; - uint32_t gilReward; - uint16_t gCSeals; - std::vector< uint8_t > itemCatalyst; - std::vector< uint8_t > itemCountCatalyst; - uint8_t itemRewardType; - std::vector< uint32_t > itemReward0; - std::vector< uint8_t > itemCountReward0; - std::vector< uint8_t > stainReward0; - std::vector< uint32_t > itemReward1; - std::vector< uint8_t > itemCountReward1; - std::vector< bool > isHQReward1; - std::vector< uint8_t > stainReward1; - uint8_t emoteReward; - uint16_t actionReward; - std::vector< uint8_t > generalActionReward; - uint8_t otherReward; - uint32_t instanceContentUnlock; - uint8_t tomestoneReward; - uint8_t tomestoneCountReward; - uint8_t reputationReward; - uint16_t placeName; - uint8_t journalGenre; - uint32_t icon; - uint32_t iconSpecial; - uint8_t eventIconType; - uint16_t sortKey; + std::string name; + std::string id; + uint8_t expansion; + uint8_t classJobCategory0; + uint16_t classJobLevel0; + uint8_t questLevelOffset; + uint8_t classJobCategory1; + uint16_t classJobLevel1; + uint8_t previousQuestJoin; + uint32_t previousQuest0; + uint32_t previousQuest1; + uint32_t previousQuest2; + uint8_t questLockJoin; + std::vector< uint32_t > questLock; + uint8_t classJobUnlock; + uint8_t grandCompany; + uint8_t grandCompanyRank; + uint8_t instanceContentJoin; + std::vector< uint32_t > instanceContent; + uint16_t bellStart; + uint16_t bellEnd; + uint8_t beastTribe; + uint8_t beastReputationRank; + int32_t mountRequired; + bool isHouseRequired; + uint32_t eNpcResidentStart; + uint32_t eNpcResidentEnd; + bool isRepeatable; + uint8_t repeatIntervalType; + std::vector< std::string > scriptInstruction; + std::vector< uint32_t > scriptArg; + std::vector< uint32_t > level; + uint8_t classJobRequired; + uint16_t expFactor; + uint32_t gilReward; + uint16_t gCSeals; + std::vector< uint8_t > itemCatalyst; + std::vector< uint8_t > itemCountCatalyst; + uint8_t itemRewardType; + std::vector< uint32_t > itemReward0; + std::vector< uint8_t > itemCountReward0; + std::vector< uint8_t > stainReward0; + std::vector< uint32_t > itemReward1; + std::vector< uint8_t > itemCountReward1; + std::vector< bool > isHQReward1; + std::vector< uint8_t > stainReward1; + uint8_t emoteReward; + uint16_t actionReward; + std::vector< uint8_t > generalActionReward; + uint8_t otherReward; + uint32_t instanceContentUnlock; + uint8_t tomestoneReward; + uint8_t tomestoneCountReward; + uint8_t reputationReward; + uint16_t placeName; + uint8_t journalGenre; + uint32_t icon; + uint32_t iconSpecial; + uint8_t eventIconType; + uint16_t sortKey; - Quest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Quest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct QuestClassJobReward { - uint8_t classJobCategory; - std::vector< uint32_t > rewardItem; - std::vector< uint8_t > rewardAmount; - std::vector< uint32_t > requiredItem; - std::vector< uint8_t > requiredAmount; + uint8_t classJobCategory; + std::vector< uint32_t > rewardItem; + std::vector< uint8_t > rewardAmount; + std::vector< uint32_t > requiredItem; + std::vector< uint8_t > requiredAmount; - QuestClassJobReward( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + QuestClassJobReward( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct QuestRepeatFlag { - uint32_t quest; + uint32_t quest; - QuestRepeatFlag( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + QuestRepeatFlag( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct QuestRewardOther { - std::string name; + std::string name; - QuestRewardOther( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + QuestRewardOther( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct QuickChat { - std::string nameAction; - int32_t icon; - int32_t addon; - int8_t quickChatTransient; + std::string nameAction; + int32_t icon; + int32_t addon; + int8_t quickChatTransient; - QuickChat( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + QuickChat( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct QuickChatTransient { - std::string textOutput; + std::string textOutput; - QuickChatTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + QuickChatTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Race { - std::string masculine; - std::string feminine; - int32_t rSEMBody; - int32_t rSEMHands; - int32_t rSEMLegs; - int32_t rSEMFeet; - int32_t rSEFBody; - int32_t rSEFHands; - int32_t rSEFLegs; - int32_t rSEFFeet; + std::string masculine; + std::string feminine; + int32_t rSEMBody; + int32_t rSEMHands; + int32_t rSEMLegs; + int32_t rSEMFeet; + int32_t rSEFBody; + int32_t rSEFHands; + int32_t rSEFLegs; + int32_t rSEFFeet; - Race( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Race( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RacingChocoboItem { - int32_t item; - uint8_t category; - std::vector< uint8_t > param; + int32_t item; + uint8_t category; + std::vector< uint8_t > param; - RacingChocoboItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RacingChocoboItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RacingChocoboName { - std::string name; + std::string name; - RacingChocoboName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RacingChocoboName( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RacingChocoboNameCategory { - uint8_t sortKey; - std::string name; + uint8_t sortKey; + std::string name; - RacingChocoboNameCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RacingChocoboNameCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RacingChocoboNameInfo { - uint8_t racingChocoboNameCategory; + uint8_t racingChocoboNameCategory; - RacingChocoboNameInfo( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RacingChocoboNameInfo( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RacingChocoboParam { - std::string name; + std::string name; - RacingChocoboParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RacingChocoboParam( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Recipe { - int32_t craftType; - uint16_t recipeLevelTable; - int32_t itemResult; - uint8_t amountResult; - uint8_t recipeElement; - bool isSecondary; - uint16_t difficultyFactor; - uint16_t qualityFactor; - uint16_t durabilityFactor; - uint16_t requiredCraftsmanship; - uint16_t requiredControl; - uint16_t quickSynthCraftsmanship; - uint16_t quickSynthControl; - uint16_t secretRecipeBook; - bool canQuickSynth; - bool canHq; - bool expRewarded; - int32_t statusRequired; - int32_t itemRequired; - bool isSpecializationRequired; + int32_t craftType; + uint16_t recipeLevelTable; + int32_t itemResult; + uint8_t amountResult; + uint8_t recipeElement; + bool isSecondary; + uint16_t difficultyFactor; + uint16_t qualityFactor; + uint16_t durabilityFactor; + uint16_t requiredCraftsmanship; + uint16_t requiredControl; + uint16_t quickSynthCraftsmanship; + uint16_t quickSynthControl; + uint16_t secretRecipeBook; + bool canQuickSynth; + bool canHq; + bool expRewarded; + int32_t statusRequired; + int32_t itemRequired; + bool isSpecializationRequired; - Recipe( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Recipe( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RecipeElement { - std::string name; + std::string name; - RecipeElement( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RecipeElement( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RecipeLevelTable { - uint8_t classJobLevel; - uint8_t stars; - uint16_t difficulty; - int16_t quality; - uint16_t durability; + uint8_t classJobLevel; + uint8_t stars; + uint16_t difficulty; + int16_t quality; + uint16_t durability; - RecipeLevelTable( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RecipeLevelTable( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RecipeNotebookList { - std::vector< int32_t > recipe; + std::vector< int32_t > recipe; - RecipeNotebookList( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RecipeNotebookList( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RecommendContents { - int32_t level; + int32_t level; - RecommendContents( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RecommendContents( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Relic { - uint32_t itemAtma; - uint32_t itemAnimus; - int32_t icon; + uint32_t itemAtma; + uint32_t itemAnimus; + int32_t icon; - Relic( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Relic( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Relic3 { - uint32_t itemAnimus; - uint32_t itemScroll; - uint8_t materiaLimit; - uint32_t itemNovus; - int32_t icon; + uint32_t itemAnimus; + uint32_t itemScroll; + uint8_t materiaLimit; + uint32_t itemNovus; + int32_t icon; - Relic3( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Relic3( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RelicItem { - uint32_t gladiatorItem; - uint32_t pugilistItem; - uint32_t marauderItem; - uint32_t lancerItem; - uint32_t archerItem; - uint32_t conjurerItem; - uint32_t thaumaturgeItem; - uint32_t arcanistSMNItem; - uint32_t arcanistSCHItem; - uint32_t shieldItem; - uint32_t rogueItem; + uint32_t gladiatorItem; + uint32_t pugilistItem; + uint32_t marauderItem; + uint32_t lancerItem; + uint32_t archerItem; + uint32_t conjurerItem; + uint32_t thaumaturgeItem; + uint32_t arcanistSMNItem; + uint32_t arcanistSCHItem; + uint32_t shieldItem; + uint32_t rogueItem; - RelicItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RelicItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RelicNote { - uint32_t eventItem; - std::vector< uint16_t > monsterNoteTargetNM; - std::vector< uint16_t > leve; + uint32_t eventItem; + std::vector< uint16_t > monsterNoteTargetNM; + std::vector< uint16_t > leve; - RelicNote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RelicNote( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RelicNoteCategory { - std::string text; + std::string text; - RelicNoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RelicNoteCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RetainerTask { - bool isRandom; - uint8_t classJobCategory; - uint8_t retainerLevel; - uint16_t retainerTaskParameter; - uint16_t ventureCost; - uint16_t maxTimemin; - int32_t experience; - uint16_t requiredItemLevel; - uint16_t requiredGathering; - uint16_t task; + bool isRandom; + uint8_t classJobCategory; + uint8_t retainerLevel; + uint16_t retainerTaskParameter; + uint16_t ventureCost; + uint16_t maxTimemin; + int32_t experience; + uint16_t requiredItemLevel; + uint16_t requiredGathering; + uint16_t task; - RetainerTask( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RetainerTask( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RetainerTaskLvRange { - uint8_t min; - uint8_t max; + uint8_t min; + uint8_t max; - RetainerTaskLvRange( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RetainerTaskLvRange( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RetainerTaskNormal { - int32_t item; - uint8_t quantity0; - uint8_t quantity1; - uint8_t quantity2; - int16_t gatheringLog; - int16_t fishingLog; + int32_t item; + uint8_t quantity0; + uint8_t quantity1; + uint8_t quantity2; + int16_t gatheringLog; + int16_t fishingLog; - RetainerTaskNormal( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RetainerTaskNormal( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RetainerTaskParameter { - std::vector< int16_t > itemLevelDoW; - std::vector< int16_t > gatheringDoL; - std::vector< int16_t > gatheringFSH; + std::vector< int16_t > itemLevelDoW; + std::vector< int16_t > gatheringDoL; + std::vector< int16_t > gatheringFSH; - RetainerTaskParameter( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RetainerTaskParameter( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct RetainerTaskRandom { - std::string name; - int16_t requirement; + std::string name; + int16_t requirement; - RetainerTaskRandom( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + RetainerTaskRandom( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Salvage { - uint16_t optimalSkill; + uint16_t optimalSkill; - Salvage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Salvage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SatisfactionNpc { - int32_t npc; - int32_t questRequired; - uint8_t deliveriesPerWeek; - std::vector< int32_t > supplyIndex; - std::vector< uint16_t > satisfactionRequired; - int32_t icon; + int32_t npc; + int32_t questRequired; + uint8_t deliveriesPerWeek; + std::vector< int32_t > supplyIndex; + std::vector< uint16_t > satisfactionRequired; + int32_t icon; - SatisfactionNpc( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SatisfactionNpc( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SatisfactionSupply { - uint8_t slot; - uint8_t probability; - int32_t item; - uint16_t collectabilityLow; - uint16_t collectabilityMid; - uint16_t collectabilityHigh; - uint16_t reward; + uint8_t slot; + uint8_t probability; + int32_t item; + uint16_t collectabilityLow; + uint16_t collectabilityMid; + uint16_t collectabilityHigh; + uint16_t reward; - SatisfactionSupply( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SatisfactionSupply( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SatisfactionSupplyReward { - uint16_t satisfactionLow; - uint16_t satisfactionMid; - uint16_t satisfactionHigh; - uint16_t gilLow; - uint16_t gilMid; - uint16_t gilHigh; + uint16_t satisfactionLow; + uint16_t satisfactionMid; + uint16_t satisfactionHigh; + uint16_t gilLow; + uint16_t gilMid; + uint16_t gilHigh; - SatisfactionSupplyReward( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SatisfactionSupplyReward( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ScenarioTree { - uint8_t type; - uint16_t image; + uint8_t type; + uint16_t image; - ScenarioTree( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ScenarioTree( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ScenarioTreeTips { - uint32_t tips1; - uint32_t tips2; + uint32_t tips1; + uint32_t tips2; - ScenarioTreeTips( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ScenarioTreeTips( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ScenarioTreeTipsClassQuest { - uint32_t quest; - uint16_t requiredLevel; - uint8_t requiredExpansion; - uint32_t requiredQuest; + uint32_t quest; + uint16_t requiredLevel; + uint8_t requiredExpansion; + uint32_t requiredQuest; - ScenarioTreeTipsClassQuest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ScenarioTreeTipsClassQuest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ScenarioTreeTipsQuest { - uint32_t level; + uint32_t level; - ScenarioTreeTipsQuest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ScenarioTreeTipsQuest( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ScenarioType { - std::string type; + std::string type; - ScenarioType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ScenarioType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ScreenImage { - uint32_t image; + uint32_t image; - ScreenImage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ScreenImage( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SecretRecipeBook { - int32_t item; - std::string name; + int32_t item; + std::string name; - SecretRecipeBook( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SecretRecipeBook( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SkyIsland2Mission { - uint32_t item1; - uint32_t item2; - uint16_t objective1; - uint8_t requiredAmount1; - uint16_t objective2; - uint8_t requiredAmount2; - uint16_t objective3; - uint32_t image; + uint32_t item1; + uint32_t item2; + uint16_t objective1; + uint8_t requiredAmount1; + uint16_t objective2; + uint8_t requiredAmount2; + uint16_t objective3; + uint32_t image; - SkyIsland2Mission( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SkyIsland2Mission( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SkyIsland2MissionDetail { - uint8_t type; - uint8_t range; - uint32_t eObj; - std::string objective; + uint8_t type; + uint8_t range; + uint32_t eObj; + std::string objective; - SkyIsland2MissionDetail( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SkyIsland2MissionDetail( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SkyIsland2MissionType { - bool type; + bool type; - SkyIsland2MissionType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SkyIsland2MissionType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SkyIsland2RangeType { - uint8_t type; + uint8_t type; - SkyIsland2RangeType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SkyIsland2RangeType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SpearfishingItem { - std::string description; - int32_t item; - uint16_t gatheringItemLevel; - uint16_t territoryType; - bool isVisible; + std::string description; + int32_t item; + uint16_t gatheringItemLevel; + uint16_t territoryType; + bool isVisible; - SpearfishingItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SpearfishingItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SpearfishingNotebook { - uint8_t gatheringLevel; - int32_t territoryType; - int16_t x; - int16_t y; - uint16_t radius; - uint16_t placeName; - uint16_t gatheringPointBase; + uint8_t gatheringLevel; + int32_t territoryType; + int16_t x; + int16_t y; + uint16_t radius; + uint16_t placeName; + uint16_t gatheringPointBase; - SpearfishingNotebook( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SpearfishingNotebook( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SpecialShop { - std::string name; - std::vector< int32_t > questItem; - int32_t questShop; + std::string name; + std::vector< int32_t > questItem; + int32_t questShop; - SpecialShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SpecialShop( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SpecialShopItemCategory { - std::string name; + std::string name; - SpecialShopItemCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SpecialShopItemCategory( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Stain { - uint32_t color; - uint8_t shade; - std::string name; + uint32_t color; + uint8_t shade; + std::string name; - Stain( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Stain( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct StainTransient { - uint32_t item1; - uint32_t item2; + uint32_t item1; + uint32_t item2; - StainTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + StainTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Status { - std::string name; - std::string description; - uint16_t icon; - uint8_t maxStacks; - uint8_t category; - uint8_t hitEffect; - uint8_t vFX; - bool lockMovement; - bool lockActions; - bool lockControl; - bool transfiguration; - bool canDispel; - bool inflictedByActor; - bool isPermanent; - bool isFcBuff; - bool invisibility; + std::string name; + std::string description; + uint16_t icon; + uint8_t maxStacks; + uint8_t category; + uint8_t hitEffect; + uint8_t vFX; + bool lockMovement; + bool lockActions; + bool lockControl; + bool transfiguration; + bool canDispel; + bool inflictedByActor; + bool isPermanent; + bool isFcBuff; + bool invisibility; - Status( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Status( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct StatusHitEffect { - uint16_t location; + uint16_t location; - StatusHitEffect( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + StatusHitEffect( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct StatusLoopVFX { - uint16_t location; + uint16_t location; - StatusLoopVFX( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + StatusLoopVFX( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Story { - Story( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Story( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SubmarineExploration { - std::string destination; - std::string location; - uint8_t rankReq; - uint8_t ceruleumTankReq; - uint16_t durationmin; - uint8_t distanceForSurvey; - uint32_t expReward; + std::string destination; + std::string location; + uint8_t rankReq; + uint8_t ceruleumTankReq; + uint16_t durationmin; + uint8_t distanceForSurvey; + uint32_t expReward; - SubmarineExploration( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SubmarineExploration( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SubmarinePart { - uint8_t slot; - uint8_t rank; - uint8_t components; - int16_t surveillance; - int16_t retrieval; - int16_t speed; - int16_t range; - int16_t favor; - uint8_t repairMaterials; + uint8_t slot; + uint8_t rank; + uint8_t components; + int16_t surveillance; + int16_t retrieval; + int16_t speed; + int16_t range; + int16_t favor; + uint8_t repairMaterials; - SubmarinePart( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SubmarinePart( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SubmarineRank { - uint16_t rank; - uint32_t expToNext; + uint16_t rank; + uint32_t expToNext; - SubmarineRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SubmarineRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct SwitchTalk { - std::vector< uint32_t > quest; - std::vector< uint32_t > defaultTalk; + std::vector< uint32_t > quest; + std::vector< uint32_t > defaultTalk; - SwitchTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + SwitchTalk( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TerritoryType { - std::string name; - std::string bg; - uint16_t placeNameRegion; - uint16_t placeNameZone; - uint16_t placeName; - uint16_t map; - uint8_t territoryIntendedUse; - uint8_t weatherRate; - uint32_t arrayEventHandler; - int32_t aetheryte; + std::string name; + std::string bg; + uint16_t placeNameRegion; + uint16_t placeNameZone; + uint16_t placeName; + uint16_t map; + uint8_t territoryIntendedUse; + uint8_t weatherRate; + uint32_t arrayEventHandler; + int32_t aetheryte; - TerritoryType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TerritoryType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TextCommand { - std::string command; - std::string shortCommand; - std::string description; - std::string alias; - std::string shortAlias; + std::string command; + std::string shortCommand; + std::string description; + std::string alias; + std::string shortAlias; - TextCommand( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TextCommand( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Title { - std::string masculine; - std::string feminine; - bool isPrefix; + std::string masculine; + std::string feminine; + bool isPrefix; - Title( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Title( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Tomestones { - uint16_t weeklyLimit; + uint16_t weeklyLimit; - Tomestones( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Tomestones( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TomestonesItem { - int32_t item; - int32_t tomestones; + int32_t item; + int32_t tomestones; - TomestonesItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TomestonesItem( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TopicSelect { - std::string name; + std::string name; - TopicSelect( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TopicSelect( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Town { - std::string name; - int32_t icon; + std::string name; + int32_t icon; - Town( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Town( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Trait { - std::string name; - int32_t icon; - uint8_t classJob; - uint8_t level; - int16_t value; - uint8_t classJobCategory; + std::string name; + int32_t icon; + uint8_t classJob; + uint8_t level; + int16_t value; + uint8_t classJobCategory; - Trait( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Trait( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TraitRecast { - uint16_t trait; - uint16_t action; - uint16_t timeds; + uint16_t trait; + uint16_t action; + uint16_t timeds; - TraitRecast( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TraitRecast( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TraitTransient { - std::string description; + std::string description; - TraitTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TraitTransient( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Transformation { - int16_t model; - int32_t bNpcCustomize; - int32_t bNpcEquip; - std::vector< uint16_t > action; - float speed; - float scale; - bool isPvP; - bool isEvent; - bool playerCamera; + int16_t model; + int32_t bNpcCustomize; + int32_t bNpcEquip; + std::vector< uint16_t > action; + float speed; + float scale; + bool isPvP; + bool isEvent; + bool playerCamera; - Transformation( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Transformation( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Treasure { - uint32_t item; + uint32_t item; - Treasure( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Treasure( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TreasureHuntRank { - uint32_t icon; - int32_t itemName; - int32_t keyItemName; - int32_t instanceMap; - uint8_t maxPartySize; - uint8_t minPartySize; + uint32_t icon; + int32_t itemName; + int32_t keyItemName; + int32_t instanceMap; + uint8_t maxPartySize; + uint8_t minPartySize; - TreasureHuntRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TreasureHuntRank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Tribe { - std::string masculine; - std::string feminine; - int8_t sTR; - int8_t dEX; - int8_t vIT; - int8_t iNT; - int8_t mND; - int8_t pIE; + std::string masculine; + std::string feminine; + int8_t sTR; + int8_t dEX; + int8_t vIT; + int8_t iNT; + int8_t mND; + int8_t pIE; - Tribe( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Tribe( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TripleTriad { - std::vector< uint16_t > tripleTriadCardFixed; - std::vector< uint16_t > tripleTriadCardVariable; - std::vector< uint8_t > tripleTriadRule; - bool usesRegionalRules; - uint16_t fee; - uint8_t previousQuestJoin; - std::vector< uint32_t > previousQuest; - uint16_t startTime; - uint16_t endTime; - uint32_t defaultTalkChallenge; - uint32_t defaultTalkUnavailable; - uint32_t defaultTalkNPCWin; - uint32_t defaultTalkDraw; - uint32_t defaultTalkPCWin; - std::vector< uint32_t > itemPossibleReward; + std::vector< uint16_t > tripleTriadCardFixed; + std::vector< uint16_t > tripleTriadCardVariable; + std::vector< uint8_t > tripleTriadRule; + bool usesRegionalRules; + uint16_t fee; + uint8_t previousQuestJoin; + std::vector< uint32_t > previousQuest; + uint16_t startTime; + uint16_t endTime; + uint32_t defaultTalkChallenge; + uint32_t defaultTalkUnavailable; + uint32_t defaultTalkNPCWin; + uint32_t defaultTalkDraw; + uint32_t defaultTalkPCWin; + std::vector< uint32_t > itemPossibleReward; - TripleTriad( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TripleTriad( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TripleTriadCard { - std::string name; - int8_t startsWithVowel; - std::string description; + std::string name; + int8_t startsWithVowel; + std::string description; - TripleTriadCard( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TripleTriadCard( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TripleTriadCardRarity { - uint8_t stars; + uint8_t stars; - TripleTriadCardRarity( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TripleTriadCardRarity( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TripleTriadCardResident { - uint8_t top; - uint8_t bottom; - uint8_t left; - uint8_t right; - uint8_t tripleTriadCardRarity; - uint8_t tripleTriadCardType; - uint16_t saleValue; - uint8_t sortKey; + uint8_t top; + uint8_t bottom; + uint8_t left; + uint8_t right; + uint8_t tripleTriadCardRarity; + uint8_t tripleTriadCardType; + uint16_t saleValue; + uint8_t sortKey; - TripleTriadCardResident( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TripleTriadCardResident( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TripleTriadCardType { - std::string name; + std::string name; - TripleTriadCardType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TripleTriadCardType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TripleTriadCompetition { - std::string name; + std::string name; - TripleTriadCompetition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TripleTriadCompetition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TripleTriadRule { - std::string name; + std::string name; - TripleTriadRule( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TripleTriadRule( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Tutorial { - uint32_t exp; - uint32_t gil; - uint32_t rewardTank; - uint32_t rewardMelee; - uint32_t rewardRanged; - uint32_t objective; + uint32_t exp; + uint32_t gil; + uint32_t rewardTank; + uint32_t rewardMelee; + uint32_t rewardRanged; + uint32_t objective; - Tutorial( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Tutorial( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TutorialDPS { - uint8_t objective; + uint8_t objective; - TutorialDPS( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TutorialDPS( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TutorialHealer { - uint8_t objective; + uint8_t objective; - TutorialHealer( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TutorialHealer( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct TutorialTank { - uint8_t objective; + uint8_t objective; - TutorialTank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + TutorialTank( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct VaseFlower { - uint32_t item; + uint32_t item; - VaseFlower( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + VaseFlower( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct VFX { - std::string location; + std::string location; - VFX( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + VFX( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Warp { - uint32_t level; - uint16_t placeName; - uint32_t defaultTalk1; - uint32_t defaultTalk2; - uint32_t defaultTalk3; - uint16_t warpCondition; - uint16_t warpLogic; + uint32_t level; + uint16_t placeName; + uint32_t defaultTalk1; + uint32_t defaultTalk2; + uint32_t defaultTalk3; + uint16_t warpCondition; + uint16_t warpLogic; - Warp( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Warp( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct WarpCondition { - uint32_t requiredQuest1; - uint32_t requiredQuest2; - uint32_t dRequiredQuest3; - uint32_t requiredQuest4; + uint32_t requiredQuest1; + uint32_t requiredQuest2; + uint32_t dRequiredQuest3; + uint32_t requiredQuest4; - WarpCondition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + WarpCondition( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct Weather { - int32_t icon; - std::string name; - std::string description; + int32_t icon; + std::string name; + std::string description; - Weather( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + Weather( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct WeatherGroup { - int32_t weatherRate; + int32_t weatherRate; - WeatherGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + WeatherGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct WeatherRate { - WeatherRate( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + WeatherRate( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct WeddingBGM { - uint16_t song; - std::string songName; + uint16_t song; + std::string songName; - WeddingBGM( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + WeddingBGM( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct WeeklyBingoOrderData { - uint32_t data; - uint8_t text; - uint32_t icon; + uint32_t data; + uint8_t text; + uint32_t icon; - WeeklyBingoOrderData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + WeeklyBingoOrderData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct WeeklyBingoRewardData { - uint32_t rewardItem2; - bool rewardHQ2; - uint16_t rewardQuantity2; + uint32_t rewardItem2; + bool rewardHQ2; + uint16_t rewardQuantity2; - WeeklyBingoRewardData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + WeeklyBingoRewardData( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct WeeklyBingoText { - std::string description; + std::string description; - WeeklyBingoText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + WeeklyBingoText( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct World { - uint8_t dataCenter; + uint8_t dataCenter; - World( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + World( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct WorldDCGroupType { - std::string name; + std::string name; - WorldDCGroupType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + WorldDCGroupType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct YKW { - uint32_t item; - std::vector< uint16_t > location; + uint32_t item; + std::vector< uint16_t > location; - YKW( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + YKW( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; struct ZoneSharedGroup { - uint32_t quest1; - uint32_t quest2; - uint32_t quest3; - uint32_t quest4; - uint32_t quest5; - uint32_t quest6; + uint32_t quest1; + uint32_t quest2; + uint32_t quest3; + uint32_t quest4; + uint32_t quest5; + uint32_t quest6; - ZoneSharedGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); + ZoneSharedGroup( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; +class ExdDataGenerated +{ +public: + ExdDataGenerated(); - class ExdDataGenerated + ~ExdDataGenerated(); + + bool init( const std::string& path ); + + xiv::exd::Exd setupDatAccess( const std::string& name, xiv::exd::Language lang ); + + template< class T > + T getField( std::vector< xiv::exd::Field >& fields, uint32_t index ) { - public: - ExdDataGenerated(); - ~ExdDataGenerated(); + return *boost::get< T >( &fields.at( index ) ); + } - bool init( const std::string& path ); + void loadIdList( xiv::exd::Exd& data, std::set< uint32_t >& outIdList ); - xiv::exd::Exd setupDatAccess( const std::string& name, xiv::exd::Language lang ); + boost::shared_ptr< xiv::dat::GameData > m_data; + boost::shared_ptr< xiv::exd::ExdData > m_exd_data; - template< class T > - T getField( std::vector< xiv::exd::Field >& fields, uint32_t index ) - { - return *boost::get< T >( &fields.at( index ) ); - } - - void loadIdList( xiv::exd::Exd& data, std::set< uint32_t >& outIdList ); - - boost::shared_ptr< xiv::dat::GameData > m_data; - boost::shared_ptr< xiv::exd::ExdData > m_exd_data; - - xiv::exd::Exd m_AchievementDat; - xiv::exd::Exd m_AchievementCategoryDat; - xiv::exd::Exd m_AchievementKindDat; - xiv::exd::Exd m_ActionDat; - xiv::exd::Exd m_ActionCastTimelineDat; - xiv::exd::Exd m_ActionCastVFXDat; - xiv::exd::Exd m_ActionCategoryDat; - xiv::exd::Exd m_ActionComboRouteDat; - xiv::exd::Exd m_ActionIndirectionDat; - xiv::exd::Exd m_ActionParamDat; - xiv::exd::Exd m_ActionProcStatusDat; - xiv::exd::Exd m_ActionTimelineDat; - xiv::exd::Exd m_ActionTimelineReplaceDat; - xiv::exd::Exd m_ActionTransientDat; - xiv::exd::Exd m_AddonDat; - xiv::exd::Exd m_AdventureDat; - xiv::exd::Exd m_AdventureExPhaseDat; - xiv::exd::Exd m_AetherCurrentDat; - xiv::exd::Exd m_AetherCurrentCompFlgSetDat; - xiv::exd::Exd m_AetherialWheelDat; - xiv::exd::Exd m_AetheryteDat; - xiv::exd::Exd m_AirshipExplorationLevelDat; - xiv::exd::Exd m_AirshipExplorationLogDat; - xiv::exd::Exd m_AirshipExplorationParamTypeDat; - xiv::exd::Exd m_AirshipExplorationPartDat; - xiv::exd::Exd m_AirshipExplorationPointDat; - xiv::exd::Exd m_AnimaWeapon5Dat; - xiv::exd::Exd m_AnimaWeapon5ParamDat; - xiv::exd::Exd m_AnimaWeapon5PatternGroupDat; - xiv::exd::Exd m_AnimaWeapon5SpiritTalkDat; - xiv::exd::Exd m_AnimaWeapon5SpiritTalkParamDat; - xiv::exd::Exd m_AnimaWeapon5TradeItemDat; - xiv::exd::Exd m_AnimaWeaponFUITalkDat; - xiv::exd::Exd m_AnimaWeaponFUITalkParamDat; - xiv::exd::Exd m_AnimaWeaponIconDat; - xiv::exd::Exd m_AnimaWeaponItemDat; - xiv::exd::Exd m_AquariumFishDat; - xiv::exd::Exd m_AquariumWaterDat; - xiv::exd::Exd m_AttackTypeDat; - xiv::exd::Exd m_BalloonDat; - xiv::exd::Exd m_BaseParamDat; - xiv::exd::Exd m_BattleLeveDat; - xiv::exd::Exd m_BeastRankBonusDat; - xiv::exd::Exd m_BeastReputationRankDat; - xiv::exd::Exd m_BeastTribeDat; - xiv::exd::Exd m_BehaviorDat; - xiv::exd::Exd m_BGMDat; - xiv::exd::Exd m_BNpcAnnounceIconDat; - xiv::exd::Exd m_BNpcBaseDat; - xiv::exd::Exd m_BNpcCustomizeDat; - xiv::exd::Exd m_BNpcNameDat; - xiv::exd::Exd m_BuddyDat; - xiv::exd::Exd m_BuddyActionDat; - xiv::exd::Exd m_BuddyEquipDat; - xiv::exd::Exd m_BuddyItemDat; - xiv::exd::Exd m_BuddyRankDat; - xiv::exd::Exd m_BuddySkillDat; - xiv::exd::Exd m_CabinetDat; - xiv::exd::Exd m_CabinetCategoryDat; - xiv::exd::Exd m_CalendarDat; - xiv::exd::Exd m_CharaMakeCustomizeDat; - xiv::exd::Exd m_CharaMakeTypeDat; - xiv::exd::Exd m_ChocoboRaceDat; - xiv::exd::Exd m_ChocoboRaceAbilityDat; - xiv::exd::Exd m_ChocoboRaceAbilityTypeDat; - xiv::exd::Exd m_ChocoboRaceItemDat; - xiv::exd::Exd m_ChocoboRaceRankDat; - xiv::exd::Exd m_ChocoboRaceStatusDat; - xiv::exd::Exd m_ChocoboRaceTerritoryDat; - xiv::exd::Exd m_ChocoboTaxiDat; - xiv::exd::Exd m_ChocoboTaxiStandDat; - xiv::exd::Exd m_ClassJobDat; - xiv::exd::Exd m_ClassJobCategoryDat; - xiv::exd::Exd m_CompanionDat; - xiv::exd::Exd m_CompanionMoveDat; - xiv::exd::Exd m_CompanionTransientDat; - xiv::exd::Exd m_CompanyActionDat; - xiv::exd::Exd m_CompanyCraftDraftDat; - xiv::exd::Exd m_CompanyCraftDraftCategoryDat; - xiv::exd::Exd m_CompanyCraftManufactoryStateDat; - xiv::exd::Exd m_CompanyCraftPartDat; - xiv::exd::Exd m_CompanyCraftProcessDat; - xiv::exd::Exd m_CompanyCraftSequenceDat; - xiv::exd::Exd m_CompanyCraftSupplyItemDat; - xiv::exd::Exd m_CompanyCraftTypeDat; - xiv::exd::Exd m_CompleteJournalDat; - xiv::exd::Exd m_CompleteJournalCategoryDat; - xiv::exd::Exd m_ContentExActionDat; - xiv::exd::Exd m_ContentFinderConditionDat; - xiv::exd::Exd m_ContentFinderConditionTransientDat; - xiv::exd::Exd m_ContentMemberTypeDat; - xiv::exd::Exd m_ContentNpcTalkDat; - xiv::exd::Exd m_ContentRouletteDat; - xiv::exd::Exd m_ContentsNoteDat; - xiv::exd::Exd m_ContentsNoteCategoryDat; - xiv::exd::Exd m_ContentTalkDat; - xiv::exd::Exd m_ContentTalkParamDat; - xiv::exd::Exd m_ContentTypeDat; - xiv::exd::Exd m_CraftActionDat; - xiv::exd::Exd m_CraftLeveDat; - xiv::exd::Exd m_CraftTypeDat; - xiv::exd::Exd m_CurrencyDat; - xiv::exd::Exd m_CustomTalkDat; - xiv::exd::Exd m_CutsceneDat; - xiv::exd::Exd m_CutScreenImageDat; - xiv::exd::Exd m_DailySupplyItemDat; - xiv::exd::Exd m_DeepDungeonBanDat; - xiv::exd::Exd m_DeepDungeonDangerDat; - xiv::exd::Exd m_DeepDungeonEquipmentDat; - xiv::exd::Exd m_DeepDungeonFloorEffectUIDat; - xiv::exd::Exd m_DeepDungeonItemDat; - xiv::exd::Exd m_DeepDungeonStatusDat; - xiv::exd::Exd m_DefaultTalkDat; - xiv::exd::Exd m_DeliveryQuestDat; - xiv::exd::Exd m_DisposalShopDat; - xiv::exd::Exd m_DisposalShopFilterTypeDat; - xiv::exd::Exd m_DisposalShopItemDat; - xiv::exd::Exd m_DpsChallengeDat; - xiv::exd::Exd m_DpsChallengeOfficerDat; - xiv::exd::Exd m_DpsChallengeTransientDat; - xiv::exd::Exd m_EmoteDat; - xiv::exd::Exd m_EmoteCategoryDat; - xiv::exd::Exd m_EmoteModeDat; - xiv::exd::Exd m_ENpcBaseDat; - xiv::exd::Exd m_ENpcResidentDat; - xiv::exd::Exd m_EObjDat; - xiv::exd::Exd m_EObjNameDat; - xiv::exd::Exd m_EquipRaceCategoryDat; - xiv::exd::Exd m_EquipSlotCategoryDat; - xiv::exd::Exd m_EurekaAethernetDat; - xiv::exd::Exd m_EurekaGrowDataDat; - xiv::exd::Exd m_EurekaSphereElementAdjustDat; - xiv::exd::Exd m_EventActionDat; - xiv::exd::Exd m_EventIconPriorityDat; - xiv::exd::Exd m_EventIconTypeDat; - xiv::exd::Exd m_EventItemDat; - xiv::exd::Exd m_EventItemHelpDat; - xiv::exd::Exd m_ExVersionDat; - xiv::exd::Exd m_FateDat; - xiv::exd::Exd m_FCActivityDat; - xiv::exd::Exd m_FCActivityCategoryDat; - xiv::exd::Exd m_FCAuthorityDat; - xiv::exd::Exd m_FCAuthorityCategoryDat; - xiv::exd::Exd m_FCChestNameDat; - xiv::exd::Exd m_FccShopDat; - xiv::exd::Exd m_FCHierarchyDat; - xiv::exd::Exd m_FCProfileDat; - xiv::exd::Exd m_FCReputationDat; - xiv::exd::Exd m_FCRightsDat; - xiv::exd::Exd m_FieldMarkerDat; - xiv::exd::Exd m_FishingSpotDat; - xiv::exd::Exd m_FishParameterDat; - xiv::exd::Exd m_GardeningSeedDat; - xiv::exd::Exd m_GatheringConditionDat; - xiv::exd::Exd m_GatheringExpDat; - xiv::exd::Exd m_GatheringItemDat; - xiv::exd::Exd m_GatheringItemLevelConvertTableDat; - xiv::exd::Exd m_GatheringItemPointDat; - xiv::exd::Exd m_GatheringNotebookListDat; - xiv::exd::Exd m_GatheringPointDat; - xiv::exd::Exd m_GatheringPointBaseDat; - xiv::exd::Exd m_GatheringPointBonusDat; - xiv::exd::Exd m_GatheringPointBonusTypeDat; - xiv::exd::Exd m_GatheringPointNameDat; - xiv::exd::Exd m_GatheringSubCategoryDat; - xiv::exd::Exd m_GatheringTypeDat; - xiv::exd::Exd m_GcArmyExpeditionDat; - xiv::exd::Exd m_GcArmyExpeditionMemberBonusDat; - xiv::exd::Exd m_GcArmyExpeditionTypeDat; - xiv::exd::Exd m_GcArmyMemberGrowDat; - xiv::exd::Exd m_GcArmyTrainingDat; - xiv::exd::Exd m_GCRankGridaniaFemaleTextDat; - xiv::exd::Exd m_GCRankGridaniaMaleTextDat; - xiv::exd::Exd m_GCRankLimsaFemaleTextDat; - xiv::exd::Exd m_GCRankLimsaMaleTextDat; - xiv::exd::Exd m_GCRankUldahFemaleTextDat; - xiv::exd::Exd m_GCRankUldahMaleTextDat; - xiv::exd::Exd m_GCScripShopCategoryDat; - xiv::exd::Exd m_GCScripShopItemDat; - xiv::exd::Exd m_GCShopDat; - xiv::exd::Exd m_GCShopItemCategoryDat; - xiv::exd::Exd m_GCSupplyDutyDat; - xiv::exd::Exd m_GCSupplyDutyRewardDat; - xiv::exd::Exd m_GeneralActionDat; - xiv::exd::Exd m_GilShopDat; - xiv::exd::Exd m_GilShopItemDat; - xiv::exd::Exd m_GoldSaucerTextDataDat; - xiv::exd::Exd m_GrandCompanyDat; - xiv::exd::Exd m_GrandCompanyRankDat; - xiv::exd::Exd m_GuardianDeityDat; - xiv::exd::Exd m_GuildleveAssignmentDat; - xiv::exd::Exd m_GuildOrderGuideDat; - xiv::exd::Exd m_GuildOrderOfficerDat; - xiv::exd::Exd m_HouseRetainerPoseDat; - xiv::exd::Exd m_HousingFurnitureDat; - xiv::exd::Exd m_HousingYardObjectDat; - xiv::exd::Exd m_InstanceContentDat; - xiv::exd::Exd m_InstanceContentBuffDat; - xiv::exd::Exd m_InstanceContentTextDataDat; - xiv::exd::Exd m_ItemDat; - xiv::exd::Exd m_ItemActionDat; - xiv::exd::Exd m_ItemFoodDat; - xiv::exd::Exd m_ItemSearchCategoryDat; - xiv::exd::Exd m_ItemSeriesDat; - xiv::exd::Exd m_ItemSpecialBonusDat; - xiv::exd::Exd m_ItemUICategoryDat; - xiv::exd::Exd m_JournalCategoryDat; - xiv::exd::Exd m_JournalGenreDat; - xiv::exd::Exd m_JournalSectionDat; - xiv::exd::Exd m_LeveDat; - xiv::exd::Exd m_LeveAssignmentTypeDat; - xiv::exd::Exd m_LeveClientDat; - xiv::exd::Exd m_LevelDat; - xiv::exd::Exd m_LeveRewardItemDat; - xiv::exd::Exd m_LeveRewardItemGroupDat; - xiv::exd::Exd m_LeveVfxDat; - xiv::exd::Exd m_LogFilterDat; - xiv::exd::Exd m_LogKindDat; - xiv::exd::Exd m_LogKindCategoryTextDat; - xiv::exd::Exd m_LogMessageDat; - xiv::exd::Exd m_MacroIconDat; - xiv::exd::Exd m_MacroIconRedirectOldDat; - xiv::exd::Exd m_MainCommandDat; - xiv::exd::Exd m_MainCommandCategoryDat; - xiv::exd::Exd m_MapDat; - xiv::exd::Exd m_MapMarkerDat; - xiv::exd::Exd m_MapMarkerRegionDat; - xiv::exd::Exd m_MapSymbolDat; - xiv::exd::Exd m_MarkerDat; - xiv::exd::Exd m_MasterpieceSupplyDutyDat; - xiv::exd::Exd m_MasterpieceSupplyMultiplierDat; - xiv::exd::Exd m_MateriaDat; - xiv::exd::Exd m_MinionRaceDat; - xiv::exd::Exd m_MinionRulesDat; - xiv::exd::Exd m_MinionSkillTypeDat; - xiv::exd::Exd m_MobHuntTargetDat; - xiv::exd::Exd m_ModelCharaDat; - xiv::exd::Exd m_MonsterNoteDat; - xiv::exd::Exd m_MonsterNoteTargetDat; - xiv::exd::Exd m_MountDat; - xiv::exd::Exd m_MountActionDat; - xiv::exd::Exd m_MoveTimelineDat; - xiv::exd::Exd m_MoveVfxDat; - xiv::exd::Exd m_NpcEquipDat; - xiv::exd::Exd m_OmenDat; - xiv::exd::Exd m_OnlineStatusDat; - xiv::exd::Exd m_OpeningDat; - xiv::exd::Exd m_OrchestrionDat; - xiv::exd::Exd m_OrchestrionCategoryDat; - xiv::exd::Exd m_OrchestrionPathDat; - xiv::exd::Exd m_OrchestrionUiparamDat; - xiv::exd::Exd m_ParamGrowDat; - xiv::exd::Exd m_PerformDat; - xiv::exd::Exd m_PerformTransientDat; - xiv::exd::Exd m_PetDat; - xiv::exd::Exd m_PetActionDat; - xiv::exd::Exd m_PictureDat; - xiv::exd::Exd m_PlaceNameDat; - xiv::exd::Exd m_PublicContentDat; - xiv::exd::Exd m_PvPActionSortDat; - xiv::exd::Exd m_QuestDat; - xiv::exd::Exd m_QuestClassJobRewardDat; - xiv::exd::Exd m_QuestRepeatFlagDat; - xiv::exd::Exd m_QuestRewardOtherDat; - xiv::exd::Exd m_QuickChatDat; - xiv::exd::Exd m_QuickChatTransientDat; - xiv::exd::Exd m_RaceDat; - xiv::exd::Exd m_RacingChocoboItemDat; - xiv::exd::Exd m_RacingChocoboNameDat; - xiv::exd::Exd m_RacingChocoboNameCategoryDat; - xiv::exd::Exd m_RacingChocoboNameInfoDat; - xiv::exd::Exd m_RacingChocoboParamDat; - xiv::exd::Exd m_RecipeDat; - xiv::exd::Exd m_RecipeElementDat; - xiv::exd::Exd m_RecipeLevelTableDat; - xiv::exd::Exd m_RecipeNotebookListDat; - xiv::exd::Exd m_RecommendContentsDat; - xiv::exd::Exd m_RelicDat; - xiv::exd::Exd m_Relic3Dat; - xiv::exd::Exd m_RelicItemDat; - xiv::exd::Exd m_RelicNoteDat; - xiv::exd::Exd m_RelicNoteCategoryDat; - xiv::exd::Exd m_RetainerTaskDat; - xiv::exd::Exd m_RetainerTaskLvRangeDat; - xiv::exd::Exd m_RetainerTaskNormalDat; - xiv::exd::Exd m_RetainerTaskParameterDat; - xiv::exd::Exd m_RetainerTaskRandomDat; - xiv::exd::Exd m_SalvageDat; - xiv::exd::Exd m_SatisfactionNpcDat; - xiv::exd::Exd m_SatisfactionSupplyDat; - xiv::exd::Exd m_SatisfactionSupplyRewardDat; - xiv::exd::Exd m_ScenarioTreeDat; - xiv::exd::Exd m_ScenarioTreeTipsDat; - xiv::exd::Exd m_ScenarioTreeTipsClassQuestDat; - xiv::exd::Exd m_ScenarioTreeTipsQuestDat; - xiv::exd::Exd m_ScenarioTypeDat; - xiv::exd::Exd m_ScreenImageDat; - xiv::exd::Exd m_SecretRecipeBookDat; - xiv::exd::Exd m_SkyIsland2MissionDat; - xiv::exd::Exd m_SkyIsland2MissionDetailDat; - xiv::exd::Exd m_SkyIsland2MissionTypeDat; - xiv::exd::Exd m_SkyIsland2RangeTypeDat; - xiv::exd::Exd m_SpearfishingItemDat; - xiv::exd::Exd m_SpearfishingNotebookDat; - xiv::exd::Exd m_SpecialShopDat; - xiv::exd::Exd m_SpecialShopItemCategoryDat; - xiv::exd::Exd m_StainDat; - xiv::exd::Exd m_StainTransientDat; - xiv::exd::Exd m_StatusDat; - xiv::exd::Exd m_StatusHitEffectDat; - xiv::exd::Exd m_StatusLoopVFXDat; - xiv::exd::Exd m_StoryDat; - xiv::exd::Exd m_SubmarineExplorationDat; - xiv::exd::Exd m_SubmarinePartDat; - xiv::exd::Exd m_SubmarineRankDat; - xiv::exd::Exd m_SwitchTalkDat; - xiv::exd::Exd m_TerritoryTypeDat; - xiv::exd::Exd m_TextCommandDat; - xiv::exd::Exd m_TitleDat; - xiv::exd::Exd m_TomestonesDat; - xiv::exd::Exd m_TomestonesItemDat; - xiv::exd::Exd m_TopicSelectDat; - xiv::exd::Exd m_TownDat; - xiv::exd::Exd m_TraitDat; - xiv::exd::Exd m_TraitRecastDat; - xiv::exd::Exd m_TraitTransientDat; - xiv::exd::Exd m_TransformationDat; - xiv::exd::Exd m_TreasureDat; - xiv::exd::Exd m_TreasureHuntRankDat; - xiv::exd::Exd m_TribeDat; - xiv::exd::Exd m_TripleTriadDat; - xiv::exd::Exd m_TripleTriadCardDat; - xiv::exd::Exd m_TripleTriadCardRarityDat; - xiv::exd::Exd m_TripleTriadCardResidentDat; - xiv::exd::Exd m_TripleTriadCardTypeDat; - xiv::exd::Exd m_TripleTriadCompetitionDat; - xiv::exd::Exd m_TripleTriadRuleDat; - xiv::exd::Exd m_TutorialDat; - xiv::exd::Exd m_TutorialDPSDat; - xiv::exd::Exd m_TutorialHealerDat; - xiv::exd::Exd m_TutorialTankDat; - xiv::exd::Exd m_VaseFlowerDat; - xiv::exd::Exd m_VFXDat; - xiv::exd::Exd m_WarpDat; - xiv::exd::Exd m_WarpConditionDat; - xiv::exd::Exd m_WeatherDat; - xiv::exd::Exd m_WeatherGroupDat; - xiv::exd::Exd m_WeatherRateDat; - xiv::exd::Exd m_WeddingBGMDat; - xiv::exd::Exd m_WeeklyBingoOrderDataDat; - xiv::exd::Exd m_WeeklyBingoRewardDataDat; - xiv::exd::Exd m_WeeklyBingoTextDat; - xiv::exd::Exd m_WorldDat; - xiv::exd::Exd m_WorldDCGroupTypeDat; - xiv::exd::Exd m_YKWDat; - xiv::exd::Exd m_ZoneSharedGroupDat; + xiv::exd::Exd m_AchievementDat; + xiv::exd::Exd m_AchievementCategoryDat; + xiv::exd::Exd m_AchievementKindDat; + xiv::exd::Exd m_ActionDat; + xiv::exd::Exd m_ActionCastTimelineDat; + xiv::exd::Exd m_ActionCastVFXDat; + xiv::exd::Exd m_ActionCategoryDat; + xiv::exd::Exd m_ActionComboRouteDat; + xiv::exd::Exd m_ActionIndirectionDat; + xiv::exd::Exd m_ActionParamDat; + xiv::exd::Exd m_ActionProcStatusDat; + xiv::exd::Exd m_ActionTimelineDat; + xiv::exd::Exd m_ActionTimelineReplaceDat; + xiv::exd::Exd m_ActionTransientDat; + xiv::exd::Exd m_AddonDat; + xiv::exd::Exd m_AdventureDat; + xiv::exd::Exd m_AdventureExPhaseDat; + xiv::exd::Exd m_AetherCurrentDat; + xiv::exd::Exd m_AetherCurrentCompFlgSetDat; + xiv::exd::Exd m_AetherialWheelDat; + xiv::exd::Exd m_AetheryteDat; + xiv::exd::Exd m_AirshipExplorationLevelDat; + xiv::exd::Exd m_AirshipExplorationLogDat; + xiv::exd::Exd m_AirshipExplorationParamTypeDat; + xiv::exd::Exd m_AirshipExplorationPartDat; + xiv::exd::Exd m_AirshipExplorationPointDat; + xiv::exd::Exd m_AnimaWeapon5Dat; + xiv::exd::Exd m_AnimaWeapon5ParamDat; + xiv::exd::Exd m_AnimaWeapon5PatternGroupDat; + xiv::exd::Exd m_AnimaWeapon5SpiritTalkDat; + xiv::exd::Exd m_AnimaWeapon5SpiritTalkParamDat; + xiv::exd::Exd m_AnimaWeapon5TradeItemDat; + xiv::exd::Exd m_AnimaWeaponFUITalkDat; + xiv::exd::Exd m_AnimaWeaponFUITalkParamDat; + xiv::exd::Exd m_AnimaWeaponIconDat; + xiv::exd::Exd m_AnimaWeaponItemDat; + xiv::exd::Exd m_AquariumFishDat; + xiv::exd::Exd m_AquariumWaterDat; + xiv::exd::Exd m_AttackTypeDat; + xiv::exd::Exd m_BalloonDat; + xiv::exd::Exd m_BaseParamDat; + xiv::exd::Exd m_BattleLeveDat; + xiv::exd::Exd m_BeastRankBonusDat; + xiv::exd::Exd m_BeastReputationRankDat; + xiv::exd::Exd m_BeastTribeDat; + xiv::exd::Exd m_BehaviorDat; + xiv::exd::Exd m_BGMDat; + xiv::exd::Exd m_BNpcAnnounceIconDat; + xiv::exd::Exd m_BNpcBaseDat; + xiv::exd::Exd m_BNpcCustomizeDat; + xiv::exd::Exd m_BNpcNameDat; + xiv::exd::Exd m_BuddyDat; + xiv::exd::Exd m_BuddyActionDat; + xiv::exd::Exd m_BuddyEquipDat; + xiv::exd::Exd m_BuddyItemDat; + xiv::exd::Exd m_BuddyRankDat; + xiv::exd::Exd m_BuddySkillDat; + xiv::exd::Exd m_CabinetDat; + xiv::exd::Exd m_CabinetCategoryDat; + xiv::exd::Exd m_CalendarDat; + xiv::exd::Exd m_CharaMakeCustomizeDat; + xiv::exd::Exd m_CharaMakeTypeDat; + xiv::exd::Exd m_ChocoboRaceDat; + xiv::exd::Exd m_ChocoboRaceAbilityDat; + xiv::exd::Exd m_ChocoboRaceAbilityTypeDat; + xiv::exd::Exd m_ChocoboRaceItemDat; + xiv::exd::Exd m_ChocoboRaceRankDat; + xiv::exd::Exd m_ChocoboRaceStatusDat; + xiv::exd::Exd m_ChocoboRaceTerritoryDat; + xiv::exd::Exd m_ChocoboTaxiDat; + xiv::exd::Exd m_ChocoboTaxiStandDat; + xiv::exd::Exd m_ClassJobDat; + xiv::exd::Exd m_ClassJobCategoryDat; + xiv::exd::Exd m_CompanionDat; + xiv::exd::Exd m_CompanionMoveDat; + xiv::exd::Exd m_CompanionTransientDat; + xiv::exd::Exd m_CompanyActionDat; + xiv::exd::Exd m_CompanyCraftDraftDat; + xiv::exd::Exd m_CompanyCraftDraftCategoryDat; + xiv::exd::Exd m_CompanyCraftManufactoryStateDat; + xiv::exd::Exd m_CompanyCraftPartDat; + xiv::exd::Exd m_CompanyCraftProcessDat; + xiv::exd::Exd m_CompanyCraftSequenceDat; + xiv::exd::Exd m_CompanyCraftSupplyItemDat; + xiv::exd::Exd m_CompanyCraftTypeDat; + xiv::exd::Exd m_CompleteJournalDat; + xiv::exd::Exd m_CompleteJournalCategoryDat; + xiv::exd::Exd m_ContentExActionDat; + xiv::exd::Exd m_ContentFinderConditionDat; + xiv::exd::Exd m_ContentFinderConditionTransientDat; + xiv::exd::Exd m_ContentMemberTypeDat; + xiv::exd::Exd m_ContentNpcTalkDat; + xiv::exd::Exd m_ContentRouletteDat; + xiv::exd::Exd m_ContentsNoteDat; + xiv::exd::Exd m_ContentsNoteCategoryDat; + xiv::exd::Exd m_ContentTalkDat; + xiv::exd::Exd m_ContentTalkParamDat; + xiv::exd::Exd m_ContentTypeDat; + xiv::exd::Exd m_CraftActionDat; + xiv::exd::Exd m_CraftLeveDat; + xiv::exd::Exd m_CraftTypeDat; + xiv::exd::Exd m_CurrencyDat; + xiv::exd::Exd m_CustomTalkDat; + xiv::exd::Exd m_CutsceneDat; + xiv::exd::Exd m_CutScreenImageDat; + xiv::exd::Exd m_DailySupplyItemDat; + xiv::exd::Exd m_DeepDungeonBanDat; + xiv::exd::Exd m_DeepDungeonDangerDat; + xiv::exd::Exd m_DeepDungeonEquipmentDat; + xiv::exd::Exd m_DeepDungeonFloorEffectUIDat; + xiv::exd::Exd m_DeepDungeonItemDat; + xiv::exd::Exd m_DeepDungeonStatusDat; + xiv::exd::Exd m_DefaultTalkDat; + xiv::exd::Exd m_DeliveryQuestDat; + xiv::exd::Exd m_DisposalShopDat; + xiv::exd::Exd m_DisposalShopFilterTypeDat; + xiv::exd::Exd m_DisposalShopItemDat; + xiv::exd::Exd m_DpsChallengeDat; + xiv::exd::Exd m_DpsChallengeOfficerDat; + xiv::exd::Exd m_DpsChallengeTransientDat; + xiv::exd::Exd m_EmoteDat; + xiv::exd::Exd m_EmoteCategoryDat; + xiv::exd::Exd m_EmoteModeDat; + xiv::exd::Exd m_ENpcBaseDat; + xiv::exd::Exd m_ENpcResidentDat; + xiv::exd::Exd m_EObjDat; + xiv::exd::Exd m_EObjNameDat; + xiv::exd::Exd m_EquipRaceCategoryDat; + xiv::exd::Exd m_EquipSlotCategoryDat; + xiv::exd::Exd m_EurekaAethernetDat; + xiv::exd::Exd m_EurekaGrowDataDat; + xiv::exd::Exd m_EurekaSphereElementAdjustDat; + xiv::exd::Exd m_EventActionDat; + xiv::exd::Exd m_EventIconPriorityDat; + xiv::exd::Exd m_EventIconTypeDat; + xiv::exd::Exd m_EventItemDat; + xiv::exd::Exd m_EventItemHelpDat; + xiv::exd::Exd m_ExVersionDat; + xiv::exd::Exd m_FateDat; + xiv::exd::Exd m_FCActivityDat; + xiv::exd::Exd m_FCActivityCategoryDat; + xiv::exd::Exd m_FCAuthorityDat; + xiv::exd::Exd m_FCAuthorityCategoryDat; + xiv::exd::Exd m_FCChestNameDat; + xiv::exd::Exd m_FccShopDat; + xiv::exd::Exd m_FCHierarchyDat; + xiv::exd::Exd m_FCProfileDat; + xiv::exd::Exd m_FCReputationDat; + xiv::exd::Exd m_FCRightsDat; + xiv::exd::Exd m_FieldMarkerDat; + xiv::exd::Exd m_FishingSpotDat; + xiv::exd::Exd m_FishParameterDat; + xiv::exd::Exd m_GardeningSeedDat; + xiv::exd::Exd m_GatheringConditionDat; + xiv::exd::Exd m_GatheringExpDat; + xiv::exd::Exd m_GatheringItemDat; + xiv::exd::Exd m_GatheringItemLevelConvertTableDat; + xiv::exd::Exd m_GatheringItemPointDat; + xiv::exd::Exd m_GatheringNotebookListDat; + xiv::exd::Exd m_GatheringPointDat; + xiv::exd::Exd m_GatheringPointBaseDat; + xiv::exd::Exd m_GatheringPointBonusDat; + xiv::exd::Exd m_GatheringPointBonusTypeDat; + xiv::exd::Exd m_GatheringPointNameDat; + xiv::exd::Exd m_GatheringSubCategoryDat; + xiv::exd::Exd m_GatheringTypeDat; + xiv::exd::Exd m_GcArmyExpeditionDat; + xiv::exd::Exd m_GcArmyExpeditionMemberBonusDat; + xiv::exd::Exd m_GcArmyExpeditionTypeDat; + xiv::exd::Exd m_GcArmyMemberGrowDat; + xiv::exd::Exd m_GcArmyTrainingDat; + xiv::exd::Exd m_GCRankGridaniaFemaleTextDat; + xiv::exd::Exd m_GCRankGridaniaMaleTextDat; + xiv::exd::Exd m_GCRankLimsaFemaleTextDat; + xiv::exd::Exd m_GCRankLimsaMaleTextDat; + xiv::exd::Exd m_GCRankUldahFemaleTextDat; + xiv::exd::Exd m_GCRankUldahMaleTextDat; + xiv::exd::Exd m_GCScripShopCategoryDat; + xiv::exd::Exd m_GCScripShopItemDat; + xiv::exd::Exd m_GCShopDat; + xiv::exd::Exd m_GCShopItemCategoryDat; + xiv::exd::Exd m_GCSupplyDutyDat; + xiv::exd::Exd m_GCSupplyDutyRewardDat; + xiv::exd::Exd m_GeneralActionDat; + xiv::exd::Exd m_GilShopDat; + xiv::exd::Exd m_GilShopItemDat; + xiv::exd::Exd m_GoldSaucerTextDataDat; + xiv::exd::Exd m_GrandCompanyDat; + xiv::exd::Exd m_GrandCompanyRankDat; + xiv::exd::Exd m_GuardianDeityDat; + xiv::exd::Exd m_GuildleveAssignmentDat; + xiv::exd::Exd m_GuildOrderGuideDat; + xiv::exd::Exd m_GuildOrderOfficerDat; + xiv::exd::Exd m_HouseRetainerPoseDat; + xiv::exd::Exd m_HousingFurnitureDat; + xiv::exd::Exd m_HousingYardObjectDat; + xiv::exd::Exd m_InstanceContentDat; + xiv::exd::Exd m_InstanceContentBuffDat; + xiv::exd::Exd m_InstanceContentTextDataDat; + xiv::exd::Exd m_ItemDat; + xiv::exd::Exd m_ItemActionDat; + xiv::exd::Exd m_ItemFoodDat; + xiv::exd::Exd m_ItemSearchCategoryDat; + xiv::exd::Exd m_ItemSeriesDat; + xiv::exd::Exd m_ItemSpecialBonusDat; + xiv::exd::Exd m_ItemUICategoryDat; + xiv::exd::Exd m_JournalCategoryDat; + xiv::exd::Exd m_JournalGenreDat; + xiv::exd::Exd m_JournalSectionDat; + xiv::exd::Exd m_LeveDat; + xiv::exd::Exd m_LeveAssignmentTypeDat; + xiv::exd::Exd m_LeveClientDat; + xiv::exd::Exd m_LevelDat; + xiv::exd::Exd m_LeveRewardItemDat; + xiv::exd::Exd m_LeveRewardItemGroupDat; + xiv::exd::Exd m_LeveVfxDat; + xiv::exd::Exd m_LogFilterDat; + xiv::exd::Exd m_LogKindDat; + xiv::exd::Exd m_LogKindCategoryTextDat; + xiv::exd::Exd m_LogMessageDat; + xiv::exd::Exd m_MacroIconDat; + xiv::exd::Exd m_MacroIconRedirectOldDat; + xiv::exd::Exd m_MainCommandDat; + xiv::exd::Exd m_MainCommandCategoryDat; + xiv::exd::Exd m_MapDat; + xiv::exd::Exd m_MapMarkerDat; + xiv::exd::Exd m_MapMarkerRegionDat; + xiv::exd::Exd m_MapSymbolDat; + xiv::exd::Exd m_MarkerDat; + xiv::exd::Exd m_MasterpieceSupplyDutyDat; + xiv::exd::Exd m_MasterpieceSupplyMultiplierDat; + xiv::exd::Exd m_MateriaDat; + xiv::exd::Exd m_MinionRaceDat; + xiv::exd::Exd m_MinionRulesDat; + xiv::exd::Exd m_MinionSkillTypeDat; + xiv::exd::Exd m_MobHuntTargetDat; + xiv::exd::Exd m_ModelCharaDat; + xiv::exd::Exd m_MonsterNoteDat; + xiv::exd::Exd m_MonsterNoteTargetDat; + xiv::exd::Exd m_MountDat; + xiv::exd::Exd m_MountActionDat; + xiv::exd::Exd m_MoveTimelineDat; + xiv::exd::Exd m_MoveVfxDat; + xiv::exd::Exd m_NpcEquipDat; + xiv::exd::Exd m_OmenDat; + xiv::exd::Exd m_OnlineStatusDat; + xiv::exd::Exd m_OpeningDat; + xiv::exd::Exd m_OrchestrionDat; + xiv::exd::Exd m_OrchestrionCategoryDat; + xiv::exd::Exd m_OrchestrionPathDat; + xiv::exd::Exd m_OrchestrionUiparamDat; + xiv::exd::Exd m_ParamGrowDat; + xiv::exd::Exd m_PerformDat; + xiv::exd::Exd m_PerformTransientDat; + xiv::exd::Exd m_PetDat; + xiv::exd::Exd m_PetActionDat; + xiv::exd::Exd m_PictureDat; + xiv::exd::Exd m_PlaceNameDat; + xiv::exd::Exd m_PublicContentDat; + xiv::exd::Exd m_PvPActionSortDat; + xiv::exd::Exd m_QuestDat; + xiv::exd::Exd m_QuestClassJobRewardDat; + xiv::exd::Exd m_QuestRepeatFlagDat; + xiv::exd::Exd m_QuestRewardOtherDat; + xiv::exd::Exd m_QuickChatDat; + xiv::exd::Exd m_QuickChatTransientDat; + xiv::exd::Exd m_RaceDat; + xiv::exd::Exd m_RacingChocoboItemDat; + xiv::exd::Exd m_RacingChocoboNameDat; + xiv::exd::Exd m_RacingChocoboNameCategoryDat; + xiv::exd::Exd m_RacingChocoboNameInfoDat; + xiv::exd::Exd m_RacingChocoboParamDat; + xiv::exd::Exd m_RecipeDat; + xiv::exd::Exd m_RecipeElementDat; + xiv::exd::Exd m_RecipeLevelTableDat; + xiv::exd::Exd m_RecipeNotebookListDat; + xiv::exd::Exd m_RecommendContentsDat; + xiv::exd::Exd m_RelicDat; + xiv::exd::Exd m_Relic3Dat; + xiv::exd::Exd m_RelicItemDat; + xiv::exd::Exd m_RelicNoteDat; + xiv::exd::Exd m_RelicNoteCategoryDat; + xiv::exd::Exd m_RetainerTaskDat; + xiv::exd::Exd m_RetainerTaskLvRangeDat; + xiv::exd::Exd m_RetainerTaskNormalDat; + xiv::exd::Exd m_RetainerTaskParameterDat; + xiv::exd::Exd m_RetainerTaskRandomDat; + xiv::exd::Exd m_SalvageDat; + xiv::exd::Exd m_SatisfactionNpcDat; + xiv::exd::Exd m_SatisfactionSupplyDat; + xiv::exd::Exd m_SatisfactionSupplyRewardDat; + xiv::exd::Exd m_ScenarioTreeDat; + xiv::exd::Exd m_ScenarioTreeTipsDat; + xiv::exd::Exd m_ScenarioTreeTipsClassQuestDat; + xiv::exd::Exd m_ScenarioTreeTipsQuestDat; + xiv::exd::Exd m_ScenarioTypeDat; + xiv::exd::Exd m_ScreenImageDat; + xiv::exd::Exd m_SecretRecipeBookDat; + xiv::exd::Exd m_SkyIsland2MissionDat; + xiv::exd::Exd m_SkyIsland2MissionDetailDat; + xiv::exd::Exd m_SkyIsland2MissionTypeDat; + xiv::exd::Exd m_SkyIsland2RangeTypeDat; + xiv::exd::Exd m_SpearfishingItemDat; + xiv::exd::Exd m_SpearfishingNotebookDat; + xiv::exd::Exd m_SpecialShopDat; + xiv::exd::Exd m_SpecialShopItemCategoryDat; + xiv::exd::Exd m_StainDat; + xiv::exd::Exd m_StainTransientDat; + xiv::exd::Exd m_StatusDat; + xiv::exd::Exd m_StatusHitEffectDat; + xiv::exd::Exd m_StatusLoopVFXDat; + xiv::exd::Exd m_StoryDat; + xiv::exd::Exd m_SubmarineExplorationDat; + xiv::exd::Exd m_SubmarinePartDat; + xiv::exd::Exd m_SubmarineRankDat; + xiv::exd::Exd m_SwitchTalkDat; + xiv::exd::Exd m_TerritoryTypeDat; + xiv::exd::Exd m_TextCommandDat; + xiv::exd::Exd m_TitleDat; + xiv::exd::Exd m_TomestonesDat; + xiv::exd::Exd m_TomestonesItemDat; + xiv::exd::Exd m_TopicSelectDat; + xiv::exd::Exd m_TownDat; + xiv::exd::Exd m_TraitDat; + xiv::exd::Exd m_TraitRecastDat; + xiv::exd::Exd m_TraitTransientDat; + xiv::exd::Exd m_TransformationDat; + xiv::exd::Exd m_TreasureDat; + xiv::exd::Exd m_TreasureHuntRankDat; + xiv::exd::Exd m_TribeDat; + xiv::exd::Exd m_TripleTriadDat; + xiv::exd::Exd m_TripleTriadCardDat; + xiv::exd::Exd m_TripleTriadCardRarityDat; + xiv::exd::Exd m_TripleTriadCardResidentDat; + xiv::exd::Exd m_TripleTriadCardTypeDat; + xiv::exd::Exd m_TripleTriadCompetitionDat; + xiv::exd::Exd m_TripleTriadRuleDat; + xiv::exd::Exd m_TutorialDat; + xiv::exd::Exd m_TutorialDPSDat; + xiv::exd::Exd m_TutorialHealerDat; + xiv::exd::Exd m_TutorialTankDat; + xiv::exd::Exd m_VaseFlowerDat; + xiv::exd::Exd m_VFXDat; + xiv::exd::Exd m_WarpDat; + xiv::exd::Exd m_WarpConditionDat; + xiv::exd::Exd m_WeatherDat; + xiv::exd::Exd m_WeatherGroupDat; + xiv::exd::Exd m_WeatherRateDat; + xiv::exd::Exd m_WeddingBGMDat; + xiv::exd::Exd m_WeeklyBingoOrderDataDat; + xiv::exd::Exd m_WeeklyBingoRewardDataDat; + xiv::exd::Exd m_WeeklyBingoTextDat; + xiv::exd::Exd m_WorldDat; + xiv::exd::Exd m_WorldDCGroupTypeDat; + xiv::exd::Exd m_YKWDat; + xiv::exd::Exd m_ZoneSharedGroupDat; - using AchievementPtr = boost::shared_ptr< Achievement >; - using AchievementCategoryPtr = boost::shared_ptr< AchievementCategory >; - using AchievementKindPtr = boost::shared_ptr< AchievementKind >; - using ActionPtr = boost::shared_ptr< Action >; - using ActionCastTimelinePtr = boost::shared_ptr< ActionCastTimeline >; - using ActionCastVFXPtr = boost::shared_ptr< ActionCastVFX >; - using ActionCategoryPtr = boost::shared_ptr< ActionCategory >; - using ActionComboRoutePtr = boost::shared_ptr< ActionComboRoute >; - using ActionIndirectionPtr = boost::shared_ptr< ActionIndirection >; - using ActionParamPtr = boost::shared_ptr< ActionParam >; - using ActionProcStatusPtr = boost::shared_ptr< ActionProcStatus >; - using ActionTimelinePtr = boost::shared_ptr< ActionTimeline >; - using ActionTimelineReplacePtr = boost::shared_ptr< ActionTimelineReplace >; - using ActionTransientPtr = boost::shared_ptr< ActionTransient >; - using AddonPtr = boost::shared_ptr< Addon >; - using AdventurePtr = boost::shared_ptr< Adventure >; - using AdventureExPhasePtr = boost::shared_ptr< AdventureExPhase >; - using AetherCurrentPtr = boost::shared_ptr< AetherCurrent >; - using AetherCurrentCompFlgSetPtr = boost::shared_ptr< AetherCurrentCompFlgSet >; - using AetherialWheelPtr = boost::shared_ptr< AetherialWheel >; - using AetherytePtr = boost::shared_ptr< Aetheryte >; - using AirshipExplorationLevelPtr = boost::shared_ptr< AirshipExplorationLevel >; - using AirshipExplorationLogPtr = boost::shared_ptr< AirshipExplorationLog >; - using AirshipExplorationParamTypePtr = boost::shared_ptr< AirshipExplorationParamType >; - using AirshipExplorationPartPtr = boost::shared_ptr< AirshipExplorationPart >; - using AirshipExplorationPointPtr = boost::shared_ptr< AirshipExplorationPoint >; - using AnimaWeapon5Ptr = boost::shared_ptr< AnimaWeapon5 >; - using AnimaWeapon5ParamPtr = boost::shared_ptr< AnimaWeapon5Param >; - using AnimaWeapon5PatternGroupPtr = boost::shared_ptr< AnimaWeapon5PatternGroup >; - using AnimaWeapon5SpiritTalkPtr = boost::shared_ptr< AnimaWeapon5SpiritTalk >; - using AnimaWeapon5SpiritTalkParamPtr = boost::shared_ptr< AnimaWeapon5SpiritTalkParam >; - using AnimaWeapon5TradeItemPtr = boost::shared_ptr< AnimaWeapon5TradeItem >; - using AnimaWeaponFUITalkPtr = boost::shared_ptr< AnimaWeaponFUITalk >; - using AnimaWeaponFUITalkParamPtr = boost::shared_ptr< AnimaWeaponFUITalkParam >; - using AnimaWeaponIconPtr = boost::shared_ptr< AnimaWeaponIcon >; - using AnimaWeaponItemPtr = boost::shared_ptr< AnimaWeaponItem >; - using AquariumFishPtr = boost::shared_ptr< AquariumFish >; - using AquariumWaterPtr = boost::shared_ptr< AquariumWater >; - using AttackTypePtr = boost::shared_ptr< AttackType >; - using BalloonPtr = boost::shared_ptr< Balloon >; - using BaseParamPtr = boost::shared_ptr< BaseParam >; - using BattleLevePtr = boost::shared_ptr< BattleLeve >; - using BeastRankBonusPtr = boost::shared_ptr< BeastRankBonus >; - using BeastReputationRankPtr = boost::shared_ptr< BeastReputationRank >; - using BeastTribePtr = boost::shared_ptr< BeastTribe >; - using BehaviorPtr = boost::shared_ptr< Behavior >; - using BGMPtr = boost::shared_ptr< BGM >; - using BNpcAnnounceIconPtr = boost::shared_ptr< BNpcAnnounceIcon >; - using BNpcBasePtr = boost::shared_ptr< BNpcBase >; - using BNpcCustomizePtr = boost::shared_ptr< BNpcCustomize >; - using BNpcNamePtr = boost::shared_ptr< BNpcName >; - using BuddyPtr = boost::shared_ptr< Buddy >; - using BuddyActionPtr = boost::shared_ptr< BuddyAction >; - using BuddyEquipPtr = boost::shared_ptr< BuddyEquip >; - using BuddyItemPtr = boost::shared_ptr< BuddyItem >; - using BuddyRankPtr = boost::shared_ptr< BuddyRank >; - using BuddySkillPtr = boost::shared_ptr< BuddySkill >; - using CabinetPtr = boost::shared_ptr< Cabinet >; - using CabinetCategoryPtr = boost::shared_ptr< CabinetCategory >; - using CalendarPtr = boost::shared_ptr< Calendar >; - using CharaMakeCustomizePtr = boost::shared_ptr< CharaMakeCustomize >; - using CharaMakeTypePtr = boost::shared_ptr< CharaMakeType >; - using ChocoboRacePtr = boost::shared_ptr< ChocoboRace >; - using ChocoboRaceAbilityPtr = boost::shared_ptr< ChocoboRaceAbility >; - using ChocoboRaceAbilityTypePtr = boost::shared_ptr< ChocoboRaceAbilityType >; - using ChocoboRaceItemPtr = boost::shared_ptr< ChocoboRaceItem >; - using ChocoboRaceRankPtr = boost::shared_ptr< ChocoboRaceRank >; - using ChocoboRaceStatusPtr = boost::shared_ptr< ChocoboRaceStatus >; - using ChocoboRaceTerritoryPtr = boost::shared_ptr< ChocoboRaceTerritory >; - using ChocoboTaxiPtr = boost::shared_ptr< ChocoboTaxi >; - using ChocoboTaxiStandPtr = boost::shared_ptr< ChocoboTaxiStand >; - using ClassJobPtr = boost::shared_ptr< ClassJob >; - using ClassJobCategoryPtr = boost::shared_ptr< ClassJobCategory >; - using CompanionPtr = boost::shared_ptr< Companion >; - using CompanionMovePtr = boost::shared_ptr< CompanionMove >; - using CompanionTransientPtr = boost::shared_ptr< CompanionTransient >; - using CompanyActionPtr = boost::shared_ptr< CompanyAction >; - using CompanyCraftDraftPtr = boost::shared_ptr< CompanyCraftDraft >; - using CompanyCraftDraftCategoryPtr = boost::shared_ptr< CompanyCraftDraftCategory >; - using CompanyCraftManufactoryStatePtr = boost::shared_ptr< CompanyCraftManufactoryState >; - using CompanyCraftPartPtr = boost::shared_ptr< CompanyCraftPart >; - using CompanyCraftProcessPtr = boost::shared_ptr< CompanyCraftProcess >; - using CompanyCraftSequencePtr = boost::shared_ptr< CompanyCraftSequence >; - using CompanyCraftSupplyItemPtr = boost::shared_ptr< CompanyCraftSupplyItem >; - using CompanyCraftTypePtr = boost::shared_ptr< CompanyCraftType >; - using CompleteJournalPtr = boost::shared_ptr< CompleteJournal >; - using CompleteJournalCategoryPtr = boost::shared_ptr< CompleteJournalCategory >; - using ContentExActionPtr = boost::shared_ptr< ContentExAction >; - using ContentFinderConditionPtr = boost::shared_ptr< ContentFinderCondition >; - using ContentFinderConditionTransientPtr = boost::shared_ptr< ContentFinderConditionTransient >; - using ContentMemberTypePtr = boost::shared_ptr< ContentMemberType >; - using ContentNpcTalkPtr = boost::shared_ptr< ContentNpcTalk >; - using ContentRoulettePtr = boost::shared_ptr< ContentRoulette >; - using ContentsNotePtr = boost::shared_ptr< ContentsNote >; - using ContentsNoteCategoryPtr = boost::shared_ptr< ContentsNoteCategory >; - using ContentTalkPtr = boost::shared_ptr< ContentTalk >; - using ContentTalkParamPtr = boost::shared_ptr< ContentTalkParam >; - using ContentTypePtr = boost::shared_ptr< ContentType >; - using CraftActionPtr = boost::shared_ptr< CraftAction >; - using CraftLevePtr = boost::shared_ptr< CraftLeve >; - using CraftTypePtr = boost::shared_ptr< CraftType >; - using CurrencyPtr = boost::shared_ptr< Currency >; - using CustomTalkPtr = boost::shared_ptr< CustomTalk >; - using CutscenePtr = boost::shared_ptr< Cutscene >; - using CutScreenImagePtr = boost::shared_ptr< CutScreenImage >; - using DailySupplyItemPtr = boost::shared_ptr< DailySupplyItem >; - using DeepDungeonBanPtr = boost::shared_ptr< DeepDungeonBan >; - using DeepDungeonDangerPtr = boost::shared_ptr< DeepDungeonDanger >; - using DeepDungeonEquipmentPtr = boost::shared_ptr< DeepDungeonEquipment >; - using DeepDungeonFloorEffectUIPtr = boost::shared_ptr< DeepDungeonFloorEffectUI >; - using DeepDungeonItemPtr = boost::shared_ptr< DeepDungeonItem >; - using DeepDungeonStatusPtr = boost::shared_ptr< DeepDungeonStatus >; - using DefaultTalkPtr = boost::shared_ptr< DefaultTalk >; - using DeliveryQuestPtr = boost::shared_ptr< DeliveryQuest >; - using DisposalShopPtr = boost::shared_ptr< DisposalShop >; - using DisposalShopFilterTypePtr = boost::shared_ptr< DisposalShopFilterType >; - using DisposalShopItemPtr = boost::shared_ptr< DisposalShopItem >; - using DpsChallengePtr = boost::shared_ptr< DpsChallenge >; - using DpsChallengeOfficerPtr = boost::shared_ptr< DpsChallengeOfficer >; - using DpsChallengeTransientPtr = boost::shared_ptr< DpsChallengeTransient >; - using EmotePtr = boost::shared_ptr< Emote >; - using EmoteCategoryPtr = boost::shared_ptr< EmoteCategory >; - using ENpcBasePtr = boost::shared_ptr< ENpcBase >; - using ENpcResidentPtr = boost::shared_ptr< ENpcResident >; - using EObjPtr = boost::shared_ptr< EObj >; - using EObjNamePtr = boost::shared_ptr< EObjName >; - using EquipRaceCategoryPtr = boost::shared_ptr< EquipRaceCategory >; - using EquipSlotCategoryPtr = boost::shared_ptr< EquipSlotCategory >; - using EurekaAethernetPtr = boost::shared_ptr< EurekaAethernet >; - using EurekaGrowDataPtr = boost::shared_ptr< EurekaGrowData >; - using EurekaSphereElementAdjustPtr = boost::shared_ptr< EurekaSphereElementAdjust >; - using EventActionPtr = boost::shared_ptr< EventAction >; - using EventIconPriorityPtr = boost::shared_ptr< EventIconPriority >; - using EventIconTypePtr = boost::shared_ptr< EventIconType >; - using EventItemPtr = boost::shared_ptr< EventItem >; - using EventItemHelpPtr = boost::shared_ptr< EventItemHelp >; - using ExVersionPtr = boost::shared_ptr< ExVersion >; - using FatePtr = boost::shared_ptr< Fate >; - using FCActivityPtr = boost::shared_ptr< FCActivity >; - using FCActivityCategoryPtr = boost::shared_ptr< FCActivityCategory >; - using FCAuthorityPtr = boost::shared_ptr< FCAuthority >; - using FCAuthorityCategoryPtr = boost::shared_ptr< FCAuthorityCategory >; - using FCChestNamePtr = boost::shared_ptr< FCChestName >; - using FccShopPtr = boost::shared_ptr< FccShop >; - using FCHierarchyPtr = boost::shared_ptr< FCHierarchy >; - using FCProfilePtr = boost::shared_ptr< FCProfile >; - using FCReputationPtr = boost::shared_ptr< FCReputation >; - using FCRightsPtr = boost::shared_ptr< FCRights >; - using FieldMarkerPtr = boost::shared_ptr< FieldMarker >; - using FishingSpotPtr = boost::shared_ptr< FishingSpot >; - using FishParameterPtr = boost::shared_ptr< FishParameter >; - using GardeningSeedPtr = boost::shared_ptr< GardeningSeed >; - using GatheringConditionPtr = boost::shared_ptr< GatheringCondition >; - using GatheringExpPtr = boost::shared_ptr< GatheringExp >; - using GatheringItemPtr = boost::shared_ptr< GatheringItem >; - using GatheringItemLevelConvertTablePtr = boost::shared_ptr< GatheringItemLevelConvertTable >; - using GatheringItemPointPtr = boost::shared_ptr< GatheringItemPoint >; - using GatheringNotebookListPtr = boost::shared_ptr< GatheringNotebookList >; - using GatheringPointPtr = boost::shared_ptr< GatheringPoint >; - using GatheringPointBasePtr = boost::shared_ptr< GatheringPointBase >; - using GatheringPointBonusPtr = boost::shared_ptr< GatheringPointBonus >; - using GatheringPointBonusTypePtr = boost::shared_ptr< GatheringPointBonusType >; - using GatheringPointNamePtr = boost::shared_ptr< GatheringPointName >; - using GatheringSubCategoryPtr = boost::shared_ptr< GatheringSubCategory >; - using GatheringTypePtr = boost::shared_ptr< GatheringType >; - using GcArmyExpeditionPtr = boost::shared_ptr< GcArmyExpedition >; - using GcArmyExpeditionMemberBonusPtr = boost::shared_ptr< GcArmyExpeditionMemberBonus >; - using GcArmyExpeditionTypePtr = boost::shared_ptr< GcArmyExpeditionType >; - using GcArmyMemberGrowPtr = boost::shared_ptr< GcArmyMemberGrow >; - using GcArmyTrainingPtr = boost::shared_ptr< GcArmyTraining >; - using GCRankGridaniaFemaleTextPtr = boost::shared_ptr< GCRankGridaniaFemaleText >; - using GCRankGridaniaMaleTextPtr = boost::shared_ptr< GCRankGridaniaMaleText >; - using GCRankLimsaFemaleTextPtr = boost::shared_ptr< GCRankLimsaFemaleText >; - using GCRankLimsaMaleTextPtr = boost::shared_ptr< GCRankLimsaMaleText >; - using GCRankUldahFemaleTextPtr = boost::shared_ptr< GCRankUldahFemaleText >; - using GCRankUldahMaleTextPtr = boost::shared_ptr< GCRankUldahMaleText >; - using GCScripShopCategoryPtr = boost::shared_ptr< GCScripShopCategory >; - using GCScripShopItemPtr = boost::shared_ptr< GCScripShopItem >; - using GCShopPtr = boost::shared_ptr< GCShop >; - using GCShopItemCategoryPtr = boost::shared_ptr< GCShopItemCategory >; - using GCSupplyDutyPtr = boost::shared_ptr< GCSupplyDuty >; - using GCSupplyDutyRewardPtr = boost::shared_ptr< GCSupplyDutyReward >; - using GeneralActionPtr = boost::shared_ptr< GeneralAction >; - using GilShopPtr = boost::shared_ptr< GilShop >; - using GilShopItemPtr = boost::shared_ptr< GilShopItem >; - using GoldSaucerTextDataPtr = boost::shared_ptr< GoldSaucerTextData >; - using GrandCompanyPtr = boost::shared_ptr< GrandCompany >; - using GrandCompanyRankPtr = boost::shared_ptr< GrandCompanyRank >; - using GuardianDeityPtr = boost::shared_ptr< GuardianDeity >; - using GuildleveAssignmentPtr = boost::shared_ptr< GuildleveAssignment >; - using GuildOrderGuidePtr = boost::shared_ptr< GuildOrderGuide >; - using GuildOrderOfficerPtr = boost::shared_ptr< GuildOrderOfficer >; - using HouseRetainerPosePtr = boost::shared_ptr< HouseRetainerPose >; - using HousingFurniturePtr = boost::shared_ptr< HousingFurniture >; - using HousingYardObjectPtr = boost::shared_ptr< HousingYardObject >; - using InstanceContentPtr = boost::shared_ptr< InstanceContent >; - using InstanceContentBuffPtr = boost::shared_ptr< InstanceContentBuff >; - using InstanceContentTextDataPtr = boost::shared_ptr< InstanceContentTextData >; - using ItemPtr = boost::shared_ptr< Item >; - using ItemActionPtr = boost::shared_ptr< ItemAction >; - using ItemFoodPtr = boost::shared_ptr< ItemFood >; - using ItemSearchCategoryPtr = boost::shared_ptr< ItemSearchCategory >; - using ItemSeriesPtr = boost::shared_ptr< ItemSeries >; - using ItemSpecialBonusPtr = boost::shared_ptr< ItemSpecialBonus >; - using ItemUICategoryPtr = boost::shared_ptr< ItemUICategory >; - using JournalCategoryPtr = boost::shared_ptr< JournalCategory >; - using JournalGenrePtr = boost::shared_ptr< JournalGenre >; - using JournalSectionPtr = boost::shared_ptr< JournalSection >; - using LevePtr = boost::shared_ptr< Leve >; - using LeveAssignmentTypePtr = boost::shared_ptr< LeveAssignmentType >; - using LeveClientPtr = boost::shared_ptr< LeveClient >; - using LevelPtr = boost::shared_ptr< Level >; - using LeveRewardItemPtr = boost::shared_ptr< LeveRewardItem >; - using LeveRewardItemGroupPtr = boost::shared_ptr< LeveRewardItemGroup >; - using LeveVfxPtr = boost::shared_ptr< LeveVfx >; - using LogFilterPtr = boost::shared_ptr< LogFilter >; - using LogKindPtr = boost::shared_ptr< LogKind >; - using LogKindCategoryTextPtr = boost::shared_ptr< LogKindCategoryText >; - using LogMessagePtr = boost::shared_ptr< LogMessage >; - using MacroIconPtr = boost::shared_ptr< MacroIcon >; - using MacroIconRedirectOldPtr = boost::shared_ptr< MacroIconRedirectOld >; - using MainCommandPtr = boost::shared_ptr< MainCommand >; - using MainCommandCategoryPtr = boost::shared_ptr< MainCommandCategory >; - using MapPtr = boost::shared_ptr< Map >; - using MapMarkerPtr = boost::shared_ptr< MapMarker >; - using MapMarkerRegionPtr = boost::shared_ptr< MapMarkerRegion >; - using MapSymbolPtr = boost::shared_ptr< MapSymbol >; - using MarkerPtr = boost::shared_ptr< Marker >; - using MasterpieceSupplyDutyPtr = boost::shared_ptr< MasterpieceSupplyDuty >; - using MasterpieceSupplyMultiplierPtr = boost::shared_ptr< MasterpieceSupplyMultiplier >; - using MateriaPtr = boost::shared_ptr< Materia >; - using MinionRacePtr = boost::shared_ptr< MinionRace >; - using MinionRulesPtr = boost::shared_ptr< MinionRules >; - using MinionSkillTypePtr = boost::shared_ptr< MinionSkillType >; - using MobHuntTargetPtr = boost::shared_ptr< MobHuntTarget >; - using ModelCharaPtr = boost::shared_ptr< ModelChara >; - using MonsterNotePtr = boost::shared_ptr< MonsterNote >; - using MonsterNoteTargetPtr = boost::shared_ptr< MonsterNoteTarget >; - using MountPtr = boost::shared_ptr< Mount >; - using MountActionPtr = boost::shared_ptr< MountAction >; - using MoveTimelinePtr = boost::shared_ptr< MoveTimeline >; - using MoveVfxPtr = boost::shared_ptr< MoveVfx >; - using NpcEquipPtr = boost::shared_ptr< NpcEquip >; - using OmenPtr = boost::shared_ptr< Omen >; - using OnlineStatusPtr = boost::shared_ptr< OnlineStatus >; - using OpeningPtr = boost::shared_ptr< Opening >; - using OrchestrionPtr = boost::shared_ptr< Orchestrion >; - using OrchestrionCategoryPtr = boost::shared_ptr< OrchestrionCategory >; - using OrchestrionPathPtr = boost::shared_ptr< OrchestrionPath >; - using OrchestrionUiparamPtr = boost::shared_ptr< OrchestrionUiparam >; - using ParamGrowPtr = boost::shared_ptr< ParamGrow >; - using PerformPtr = boost::shared_ptr< Perform >; - using PerformTransientPtr = boost::shared_ptr< PerformTransient >; - using PetPtr = boost::shared_ptr< Pet >; - using PetActionPtr = boost::shared_ptr< PetAction >; - using PicturePtr = boost::shared_ptr< Picture >; - using PlaceNamePtr = boost::shared_ptr< PlaceName >; - using PublicContentPtr = boost::shared_ptr< PublicContent >; - using PvPActionSortPtr = boost::shared_ptr< PvPActionSort >; - using QuestPtr = boost::shared_ptr< Quest >; - using QuestClassJobRewardPtr = boost::shared_ptr< QuestClassJobReward >; - using QuestRepeatFlagPtr = boost::shared_ptr< QuestRepeatFlag >; - using QuestRewardOtherPtr = boost::shared_ptr< QuestRewardOther >; - using QuickChatPtr = boost::shared_ptr< QuickChat >; - using QuickChatTransientPtr = boost::shared_ptr< QuickChatTransient >; - using RacePtr = boost::shared_ptr< Race >; - using RacingChocoboItemPtr = boost::shared_ptr< RacingChocoboItem >; - using RacingChocoboNamePtr = boost::shared_ptr< RacingChocoboName >; - using RacingChocoboNameCategoryPtr = boost::shared_ptr< RacingChocoboNameCategory >; - using RacingChocoboNameInfoPtr = boost::shared_ptr< RacingChocoboNameInfo >; - using RacingChocoboParamPtr = boost::shared_ptr< RacingChocoboParam >; - using RecipePtr = boost::shared_ptr< Recipe >; - using RecipeElementPtr = boost::shared_ptr< RecipeElement >; - using RecipeLevelTablePtr = boost::shared_ptr< RecipeLevelTable >; - using RecipeNotebookListPtr = boost::shared_ptr< RecipeNotebookList >; - using RecommendContentsPtr = boost::shared_ptr< RecommendContents >; - using RelicPtr = boost::shared_ptr< Relic >; - using Relic3Ptr = boost::shared_ptr< Relic3 >; - using RelicItemPtr = boost::shared_ptr< RelicItem >; - using RelicNotePtr = boost::shared_ptr< RelicNote >; - using RelicNoteCategoryPtr = boost::shared_ptr< RelicNoteCategory >; - using RetainerTaskPtr = boost::shared_ptr< RetainerTask >; - using RetainerTaskLvRangePtr = boost::shared_ptr< RetainerTaskLvRange >; - using RetainerTaskNormalPtr = boost::shared_ptr< RetainerTaskNormal >; - using RetainerTaskParameterPtr = boost::shared_ptr< RetainerTaskParameter >; - using RetainerTaskRandomPtr = boost::shared_ptr< RetainerTaskRandom >; - using SalvagePtr = boost::shared_ptr< Salvage >; - using SatisfactionNpcPtr = boost::shared_ptr< SatisfactionNpc >; - using SatisfactionSupplyPtr = boost::shared_ptr< SatisfactionSupply >; - using SatisfactionSupplyRewardPtr = boost::shared_ptr< SatisfactionSupplyReward >; - using ScenarioTreePtr = boost::shared_ptr< ScenarioTree >; - using ScenarioTreeTipsPtr = boost::shared_ptr< ScenarioTreeTips >; - using ScenarioTreeTipsClassQuestPtr = boost::shared_ptr< ScenarioTreeTipsClassQuest >; - using ScenarioTreeTipsQuestPtr = boost::shared_ptr< ScenarioTreeTipsQuest >; - using ScenarioTypePtr = boost::shared_ptr< ScenarioType >; - using ScreenImagePtr = boost::shared_ptr< ScreenImage >; - using SecretRecipeBookPtr = boost::shared_ptr< SecretRecipeBook >; - using SkyIsland2MissionPtr = boost::shared_ptr< SkyIsland2Mission >; - using SkyIsland2MissionDetailPtr = boost::shared_ptr< SkyIsland2MissionDetail >; - using SkyIsland2MissionTypePtr = boost::shared_ptr< SkyIsland2MissionType >; - using SkyIsland2RangeTypePtr = boost::shared_ptr< SkyIsland2RangeType >; - using SpearfishingItemPtr = boost::shared_ptr< SpearfishingItem >; - using SpearfishingNotebookPtr = boost::shared_ptr< SpearfishingNotebook >; - using SpecialShopPtr = boost::shared_ptr< SpecialShop >; - using SpecialShopItemCategoryPtr = boost::shared_ptr< SpecialShopItemCategory >; - using StainPtr = boost::shared_ptr< Stain >; - using StainTransientPtr = boost::shared_ptr< StainTransient >; - using StatusPtr = boost::shared_ptr< Status >; - using StatusHitEffectPtr = boost::shared_ptr< StatusHitEffect >; - using StatusLoopVFXPtr = boost::shared_ptr< StatusLoopVFX >; - using StoryPtr = boost::shared_ptr< Story >; - using SubmarineExplorationPtr = boost::shared_ptr< SubmarineExploration >; - using SubmarinePartPtr = boost::shared_ptr< SubmarinePart >; - using SubmarineRankPtr = boost::shared_ptr< SubmarineRank >; - using SwitchTalkPtr = boost::shared_ptr< SwitchTalk >; - using TerritoryTypePtr = boost::shared_ptr< TerritoryType >; - using TextCommandPtr = boost::shared_ptr< TextCommand >; - using TitlePtr = boost::shared_ptr< Title >; - using TomestonesPtr = boost::shared_ptr< Tomestones >; - using TomestonesItemPtr = boost::shared_ptr< TomestonesItem >; - using TopicSelectPtr = boost::shared_ptr< TopicSelect >; - using TownPtr = boost::shared_ptr< Town >; - using TraitPtr = boost::shared_ptr< Trait >; - using TraitRecastPtr = boost::shared_ptr< TraitRecast >; - using TraitTransientPtr = boost::shared_ptr< TraitTransient >; - using TransformationPtr = boost::shared_ptr< Transformation >; - using TreasurePtr = boost::shared_ptr< Treasure >; - using TreasureHuntRankPtr = boost::shared_ptr< TreasureHuntRank >; - using TribePtr = boost::shared_ptr< Tribe >; - using TripleTriadPtr = boost::shared_ptr< TripleTriad >; - using TripleTriadCardPtr = boost::shared_ptr< TripleTriadCard >; - using TripleTriadCardRarityPtr = boost::shared_ptr< TripleTriadCardRarity >; - using TripleTriadCardResidentPtr = boost::shared_ptr< TripleTriadCardResident >; - using TripleTriadCardTypePtr = boost::shared_ptr< TripleTriadCardType >; - using TripleTriadCompetitionPtr = boost::shared_ptr< TripleTriadCompetition >; - using TripleTriadRulePtr = boost::shared_ptr< TripleTriadRule >; - using TutorialPtr = boost::shared_ptr< Tutorial >; - using TutorialDPSPtr = boost::shared_ptr< TutorialDPS >; - using TutorialHealerPtr = boost::shared_ptr< TutorialHealer >; - using TutorialTankPtr = boost::shared_ptr< TutorialTank >; - using VaseFlowerPtr = boost::shared_ptr< VaseFlower >; - using VFXPtr = boost::shared_ptr< VFX >; - using WarpPtr = boost::shared_ptr< Warp >; - using WarpConditionPtr = boost::shared_ptr< WarpCondition >; - using WeatherPtr = boost::shared_ptr< Weather >; - using WeatherGroupPtr = boost::shared_ptr< WeatherGroup >; - using WeatherRatePtr = boost::shared_ptr< WeatherRate >; - using WeddingBGMPtr = boost::shared_ptr< WeddingBGM >; - using WeeklyBingoOrderDataPtr = boost::shared_ptr< WeeklyBingoOrderData >; - using WeeklyBingoRewardDataPtr = boost::shared_ptr< WeeklyBingoRewardData >; - using WeeklyBingoTextPtr = boost::shared_ptr< WeeklyBingoText >; - using WorldPtr = boost::shared_ptr< World >; - using WorldDCGroupTypePtr = boost::shared_ptr< WorldDCGroupType >; - using YKWPtr = boost::shared_ptr< YKW >; - using ZoneSharedGroupPtr = boost::shared_ptr< ZoneSharedGroup >; + using AchievementPtr = boost::shared_ptr< Achievement >; + using AchievementCategoryPtr = boost::shared_ptr< AchievementCategory >; + using AchievementKindPtr = boost::shared_ptr< AchievementKind >; + using ActionPtr = boost::shared_ptr< Action >; + using ActionCastTimelinePtr = boost::shared_ptr< ActionCastTimeline >; + using ActionCastVFXPtr = boost::shared_ptr< ActionCastVFX >; + using ActionCategoryPtr = boost::shared_ptr< ActionCategory >; + using ActionComboRoutePtr = boost::shared_ptr< ActionComboRoute >; + using ActionIndirectionPtr = boost::shared_ptr< ActionIndirection >; + using ActionParamPtr = boost::shared_ptr< ActionParam >; + using ActionProcStatusPtr = boost::shared_ptr< ActionProcStatus >; + using ActionTimelinePtr = boost::shared_ptr< ActionTimeline >; + using ActionTimelineReplacePtr = boost::shared_ptr< ActionTimelineReplace >; + using ActionTransientPtr = boost::shared_ptr< ActionTransient >; + using AddonPtr = boost::shared_ptr< Addon >; + using AdventurePtr = boost::shared_ptr< Adventure >; + using AdventureExPhasePtr = boost::shared_ptr< AdventureExPhase >; + using AetherCurrentPtr = boost::shared_ptr< AetherCurrent >; + using AetherCurrentCompFlgSetPtr = boost::shared_ptr< AetherCurrentCompFlgSet >; + using AetherialWheelPtr = boost::shared_ptr< AetherialWheel >; + using AetherytePtr = boost::shared_ptr< Aetheryte >; + using AirshipExplorationLevelPtr = boost::shared_ptr< AirshipExplorationLevel >; + using AirshipExplorationLogPtr = boost::shared_ptr< AirshipExplorationLog >; + using AirshipExplorationParamTypePtr = boost::shared_ptr< AirshipExplorationParamType >; + using AirshipExplorationPartPtr = boost::shared_ptr< AirshipExplorationPart >; + using AirshipExplorationPointPtr = boost::shared_ptr< AirshipExplorationPoint >; + using AnimaWeapon5Ptr = boost::shared_ptr< AnimaWeapon5 >; + using AnimaWeapon5ParamPtr = boost::shared_ptr< AnimaWeapon5Param >; + using AnimaWeapon5PatternGroupPtr = boost::shared_ptr< AnimaWeapon5PatternGroup >; + using AnimaWeapon5SpiritTalkPtr = boost::shared_ptr< AnimaWeapon5SpiritTalk >; + using AnimaWeapon5SpiritTalkParamPtr = boost::shared_ptr< AnimaWeapon5SpiritTalkParam >; + using AnimaWeapon5TradeItemPtr = boost::shared_ptr< AnimaWeapon5TradeItem >; + using AnimaWeaponFUITalkPtr = boost::shared_ptr< AnimaWeaponFUITalk >; + using AnimaWeaponFUITalkParamPtr = boost::shared_ptr< AnimaWeaponFUITalkParam >; + using AnimaWeaponIconPtr = boost::shared_ptr< AnimaWeaponIcon >; + using AnimaWeaponItemPtr = boost::shared_ptr< AnimaWeaponItem >; + using AquariumFishPtr = boost::shared_ptr< AquariumFish >; + using AquariumWaterPtr = boost::shared_ptr< AquariumWater >; + using AttackTypePtr = boost::shared_ptr< AttackType >; + using BalloonPtr = boost::shared_ptr< Balloon >; + using BaseParamPtr = boost::shared_ptr< BaseParam >; + using BattleLevePtr = boost::shared_ptr< BattleLeve >; + using BeastRankBonusPtr = boost::shared_ptr< BeastRankBonus >; + using BeastReputationRankPtr = boost::shared_ptr< BeastReputationRank >; + using BeastTribePtr = boost::shared_ptr< BeastTribe >; + using BehaviorPtr = boost::shared_ptr< Behavior >; + using BGMPtr = boost::shared_ptr< BGM >; + using BNpcAnnounceIconPtr = boost::shared_ptr< BNpcAnnounceIcon >; + using BNpcBasePtr = boost::shared_ptr< BNpcBase >; + using BNpcCustomizePtr = boost::shared_ptr< BNpcCustomize >; + using BNpcNamePtr = boost::shared_ptr< BNpcName >; + using BuddyPtr = boost::shared_ptr< Buddy >; + using BuddyActionPtr = boost::shared_ptr< BuddyAction >; + using BuddyEquipPtr = boost::shared_ptr< BuddyEquip >; + using BuddyItemPtr = boost::shared_ptr< BuddyItem >; + using BuddyRankPtr = boost::shared_ptr< BuddyRank >; + using BuddySkillPtr = boost::shared_ptr< BuddySkill >; + using CabinetPtr = boost::shared_ptr< Cabinet >; + using CabinetCategoryPtr = boost::shared_ptr< CabinetCategory >; + using CalendarPtr = boost::shared_ptr< Calendar >; + using CharaMakeCustomizePtr = boost::shared_ptr< CharaMakeCustomize >; + using CharaMakeTypePtr = boost::shared_ptr< CharaMakeType >; + using ChocoboRacePtr = boost::shared_ptr< ChocoboRace >; + using ChocoboRaceAbilityPtr = boost::shared_ptr< ChocoboRaceAbility >; + using ChocoboRaceAbilityTypePtr = boost::shared_ptr< ChocoboRaceAbilityType >; + using ChocoboRaceItemPtr = boost::shared_ptr< ChocoboRaceItem >; + using ChocoboRaceRankPtr = boost::shared_ptr< ChocoboRaceRank >; + using ChocoboRaceStatusPtr = boost::shared_ptr< ChocoboRaceStatus >; + using ChocoboRaceTerritoryPtr = boost::shared_ptr< ChocoboRaceTerritory >; + using ChocoboTaxiPtr = boost::shared_ptr< ChocoboTaxi >; + using ChocoboTaxiStandPtr = boost::shared_ptr< ChocoboTaxiStand >; + using ClassJobPtr = boost::shared_ptr< ClassJob >; + using ClassJobCategoryPtr = boost::shared_ptr< ClassJobCategory >; + using CompanionPtr = boost::shared_ptr< Companion >; + using CompanionMovePtr = boost::shared_ptr< CompanionMove >; + using CompanionTransientPtr = boost::shared_ptr< CompanionTransient >; + using CompanyActionPtr = boost::shared_ptr< CompanyAction >; + using CompanyCraftDraftPtr = boost::shared_ptr< CompanyCraftDraft >; + using CompanyCraftDraftCategoryPtr = boost::shared_ptr< CompanyCraftDraftCategory >; + using CompanyCraftManufactoryStatePtr = boost::shared_ptr< CompanyCraftManufactoryState >; + using CompanyCraftPartPtr = boost::shared_ptr< CompanyCraftPart >; + using CompanyCraftProcessPtr = boost::shared_ptr< CompanyCraftProcess >; + using CompanyCraftSequencePtr = boost::shared_ptr< CompanyCraftSequence >; + using CompanyCraftSupplyItemPtr = boost::shared_ptr< CompanyCraftSupplyItem >; + using CompanyCraftTypePtr = boost::shared_ptr< CompanyCraftType >; + using CompleteJournalPtr = boost::shared_ptr< CompleteJournal >; + using CompleteJournalCategoryPtr = boost::shared_ptr< CompleteJournalCategory >; + using ContentExActionPtr = boost::shared_ptr< ContentExAction >; + using ContentFinderConditionPtr = boost::shared_ptr< ContentFinderCondition >; + using ContentFinderConditionTransientPtr = boost::shared_ptr< ContentFinderConditionTransient >; + using ContentMemberTypePtr = boost::shared_ptr< ContentMemberType >; + using ContentNpcTalkPtr = boost::shared_ptr< ContentNpcTalk >; + using ContentRoulettePtr = boost::shared_ptr< ContentRoulette >; + using ContentsNotePtr = boost::shared_ptr< ContentsNote >; + using ContentsNoteCategoryPtr = boost::shared_ptr< ContentsNoteCategory >; + using ContentTalkPtr = boost::shared_ptr< ContentTalk >; + using ContentTalkParamPtr = boost::shared_ptr< ContentTalkParam >; + using ContentTypePtr = boost::shared_ptr< ContentType >; + using CraftActionPtr = boost::shared_ptr< CraftAction >; + using CraftLevePtr = boost::shared_ptr< CraftLeve >; + using CraftTypePtr = boost::shared_ptr< CraftType >; + using CurrencyPtr = boost::shared_ptr< Currency >; + using CustomTalkPtr = boost::shared_ptr< CustomTalk >; + using CutscenePtr = boost::shared_ptr< Cutscene >; + using CutScreenImagePtr = boost::shared_ptr< CutScreenImage >; + using DailySupplyItemPtr = boost::shared_ptr< DailySupplyItem >; + using DeepDungeonBanPtr = boost::shared_ptr< DeepDungeonBan >; + using DeepDungeonDangerPtr = boost::shared_ptr< DeepDungeonDanger >; + using DeepDungeonEquipmentPtr = boost::shared_ptr< DeepDungeonEquipment >; + using DeepDungeonFloorEffectUIPtr = boost::shared_ptr< DeepDungeonFloorEffectUI >; + using DeepDungeonItemPtr = boost::shared_ptr< DeepDungeonItem >; + using DeepDungeonStatusPtr = boost::shared_ptr< DeepDungeonStatus >; + using DefaultTalkPtr = boost::shared_ptr< DefaultTalk >; + using DeliveryQuestPtr = boost::shared_ptr< DeliveryQuest >; + using DisposalShopPtr = boost::shared_ptr< DisposalShop >; + using DisposalShopFilterTypePtr = boost::shared_ptr< DisposalShopFilterType >; + using DisposalShopItemPtr = boost::shared_ptr< DisposalShopItem >; + using DpsChallengePtr = boost::shared_ptr< DpsChallenge >; + using DpsChallengeOfficerPtr = boost::shared_ptr< DpsChallengeOfficer >; + using DpsChallengeTransientPtr = boost::shared_ptr< DpsChallengeTransient >; + using EmotePtr = boost::shared_ptr< Emote >; + using EmoteCategoryPtr = boost::shared_ptr< EmoteCategory >; + using ENpcBasePtr = boost::shared_ptr< ENpcBase >; + using ENpcResidentPtr = boost::shared_ptr< ENpcResident >; + using EObjPtr = boost::shared_ptr< EObj >; + using EObjNamePtr = boost::shared_ptr< EObjName >; + using EquipRaceCategoryPtr = boost::shared_ptr< EquipRaceCategory >; + using EquipSlotCategoryPtr = boost::shared_ptr< EquipSlotCategory >; + using EurekaAethernetPtr = boost::shared_ptr< EurekaAethernet >; + using EurekaGrowDataPtr = boost::shared_ptr< EurekaGrowData >; + using EurekaSphereElementAdjustPtr = boost::shared_ptr< EurekaSphereElementAdjust >; + using EventActionPtr = boost::shared_ptr< EventAction >; + using EventIconPriorityPtr = boost::shared_ptr< EventIconPriority >; + using EventIconTypePtr = boost::shared_ptr< EventIconType >; + using EventItemPtr = boost::shared_ptr< EventItem >; + using EventItemHelpPtr = boost::shared_ptr< EventItemHelp >; + using ExVersionPtr = boost::shared_ptr< ExVersion >; + using FatePtr = boost::shared_ptr< Fate >; + using FCActivityPtr = boost::shared_ptr< FCActivity >; + using FCActivityCategoryPtr = boost::shared_ptr< FCActivityCategory >; + using FCAuthorityPtr = boost::shared_ptr< FCAuthority >; + using FCAuthorityCategoryPtr = boost::shared_ptr< FCAuthorityCategory >; + using FCChestNamePtr = boost::shared_ptr< FCChestName >; + using FccShopPtr = boost::shared_ptr< FccShop >; + using FCHierarchyPtr = boost::shared_ptr< FCHierarchy >; + using FCProfilePtr = boost::shared_ptr< FCProfile >; + using FCReputationPtr = boost::shared_ptr< FCReputation >; + using FCRightsPtr = boost::shared_ptr< FCRights >; + using FieldMarkerPtr = boost::shared_ptr< FieldMarker >; + using FishingSpotPtr = boost::shared_ptr< FishingSpot >; + using FishParameterPtr = boost::shared_ptr< FishParameter >; + using GardeningSeedPtr = boost::shared_ptr< GardeningSeed >; + using GatheringConditionPtr = boost::shared_ptr< GatheringCondition >; + using GatheringExpPtr = boost::shared_ptr< GatheringExp >; + using GatheringItemPtr = boost::shared_ptr< GatheringItem >; + using GatheringItemLevelConvertTablePtr = boost::shared_ptr< GatheringItemLevelConvertTable >; + using GatheringItemPointPtr = boost::shared_ptr< GatheringItemPoint >; + using GatheringNotebookListPtr = boost::shared_ptr< GatheringNotebookList >; + using GatheringPointPtr = boost::shared_ptr< GatheringPoint >; + using GatheringPointBasePtr = boost::shared_ptr< GatheringPointBase >; + using GatheringPointBonusPtr = boost::shared_ptr< GatheringPointBonus >; + using GatheringPointBonusTypePtr = boost::shared_ptr< GatheringPointBonusType >; + using GatheringPointNamePtr = boost::shared_ptr< GatheringPointName >; + using GatheringSubCategoryPtr = boost::shared_ptr< GatheringSubCategory >; + using GatheringTypePtr = boost::shared_ptr< GatheringType >; + using GcArmyExpeditionPtr = boost::shared_ptr< GcArmyExpedition >; + using GcArmyExpeditionMemberBonusPtr = boost::shared_ptr< GcArmyExpeditionMemberBonus >; + using GcArmyExpeditionTypePtr = boost::shared_ptr< GcArmyExpeditionType >; + using GcArmyMemberGrowPtr = boost::shared_ptr< GcArmyMemberGrow >; + using GcArmyTrainingPtr = boost::shared_ptr< GcArmyTraining >; + using GCRankGridaniaFemaleTextPtr = boost::shared_ptr< GCRankGridaniaFemaleText >; + using GCRankGridaniaMaleTextPtr = boost::shared_ptr< GCRankGridaniaMaleText >; + using GCRankLimsaFemaleTextPtr = boost::shared_ptr< GCRankLimsaFemaleText >; + using GCRankLimsaMaleTextPtr = boost::shared_ptr< GCRankLimsaMaleText >; + using GCRankUldahFemaleTextPtr = boost::shared_ptr< GCRankUldahFemaleText >; + using GCRankUldahMaleTextPtr = boost::shared_ptr< GCRankUldahMaleText >; + using GCScripShopCategoryPtr = boost::shared_ptr< GCScripShopCategory >; + using GCScripShopItemPtr = boost::shared_ptr< GCScripShopItem >; + using GCShopPtr = boost::shared_ptr< GCShop >; + using GCShopItemCategoryPtr = boost::shared_ptr< GCShopItemCategory >; + using GCSupplyDutyPtr = boost::shared_ptr< GCSupplyDuty >; + using GCSupplyDutyRewardPtr = boost::shared_ptr< GCSupplyDutyReward >; + using GeneralActionPtr = boost::shared_ptr< GeneralAction >; + using GilShopPtr = boost::shared_ptr< GilShop >; + using GilShopItemPtr = boost::shared_ptr< GilShopItem >; + using GoldSaucerTextDataPtr = boost::shared_ptr< GoldSaucerTextData >; + using GrandCompanyPtr = boost::shared_ptr< GrandCompany >; + using GrandCompanyRankPtr = boost::shared_ptr< GrandCompanyRank >; + using GuardianDeityPtr = boost::shared_ptr< GuardianDeity >; + using GuildleveAssignmentPtr = boost::shared_ptr< GuildleveAssignment >; + using GuildOrderGuidePtr = boost::shared_ptr< GuildOrderGuide >; + using GuildOrderOfficerPtr = boost::shared_ptr< GuildOrderOfficer >; + using HouseRetainerPosePtr = boost::shared_ptr< HouseRetainerPose >; + using HousingFurniturePtr = boost::shared_ptr< HousingFurniture >; + using HousingYardObjectPtr = boost::shared_ptr< HousingYardObject >; + using InstanceContentPtr = boost::shared_ptr< InstanceContent >; + using InstanceContentBuffPtr = boost::shared_ptr< InstanceContentBuff >; + using InstanceContentTextDataPtr = boost::shared_ptr< InstanceContentTextData >; + using ItemPtr = boost::shared_ptr< Item >; + using ItemActionPtr = boost::shared_ptr< ItemAction >; + using ItemFoodPtr = boost::shared_ptr< ItemFood >; + using ItemSearchCategoryPtr = boost::shared_ptr< ItemSearchCategory >; + using ItemSeriesPtr = boost::shared_ptr< ItemSeries >; + using ItemSpecialBonusPtr = boost::shared_ptr< ItemSpecialBonus >; + using ItemUICategoryPtr = boost::shared_ptr< ItemUICategory >; + using JournalCategoryPtr = boost::shared_ptr< JournalCategory >; + using JournalGenrePtr = boost::shared_ptr< JournalGenre >; + using JournalSectionPtr = boost::shared_ptr< JournalSection >; + using LevePtr = boost::shared_ptr< Leve >; + using LeveAssignmentTypePtr = boost::shared_ptr< LeveAssignmentType >; + using LeveClientPtr = boost::shared_ptr< LeveClient >; + using LevelPtr = boost::shared_ptr< Level >; + using LeveRewardItemPtr = boost::shared_ptr< LeveRewardItem >; + using LeveRewardItemGroupPtr = boost::shared_ptr< LeveRewardItemGroup >; + using LeveVfxPtr = boost::shared_ptr< LeveVfx >; + using LogFilterPtr = boost::shared_ptr< LogFilter >; + using LogKindPtr = boost::shared_ptr< LogKind >; + using LogKindCategoryTextPtr = boost::shared_ptr< LogKindCategoryText >; + using LogMessagePtr = boost::shared_ptr< LogMessage >; + using MacroIconPtr = boost::shared_ptr< MacroIcon >; + using MacroIconRedirectOldPtr = boost::shared_ptr< MacroIconRedirectOld >; + using MainCommandPtr = boost::shared_ptr< MainCommand >; + using MainCommandCategoryPtr = boost::shared_ptr< MainCommandCategory >; + using MapPtr = boost::shared_ptr< Map >; + using MapMarkerPtr = boost::shared_ptr< MapMarker >; + using MapMarkerRegionPtr = boost::shared_ptr< MapMarkerRegion >; + using MapSymbolPtr = boost::shared_ptr< MapSymbol >; + using MarkerPtr = boost::shared_ptr< Marker >; + using MasterpieceSupplyDutyPtr = boost::shared_ptr< MasterpieceSupplyDuty >; + using MasterpieceSupplyMultiplierPtr = boost::shared_ptr< MasterpieceSupplyMultiplier >; + using MateriaPtr = boost::shared_ptr< Materia >; + using MinionRacePtr = boost::shared_ptr< MinionRace >; + using MinionRulesPtr = boost::shared_ptr< MinionRules >; + using MinionSkillTypePtr = boost::shared_ptr< MinionSkillType >; + using MobHuntTargetPtr = boost::shared_ptr< MobHuntTarget >; + using ModelCharaPtr = boost::shared_ptr< ModelChara >; + using MonsterNotePtr = boost::shared_ptr< MonsterNote >; + using MonsterNoteTargetPtr = boost::shared_ptr< MonsterNoteTarget >; + using MountPtr = boost::shared_ptr< Mount >; + using MountActionPtr = boost::shared_ptr< MountAction >; + using MoveTimelinePtr = boost::shared_ptr< MoveTimeline >; + using MoveVfxPtr = boost::shared_ptr< MoveVfx >; + using NpcEquipPtr = boost::shared_ptr< NpcEquip >; + using OmenPtr = boost::shared_ptr< Omen >; + using OnlineStatusPtr = boost::shared_ptr< OnlineStatus >; + using OpeningPtr = boost::shared_ptr< Opening >; + using OrchestrionPtr = boost::shared_ptr< Orchestrion >; + using OrchestrionCategoryPtr = boost::shared_ptr< OrchestrionCategory >; + using OrchestrionPathPtr = boost::shared_ptr< OrchestrionPath >; + using OrchestrionUiparamPtr = boost::shared_ptr< OrchestrionUiparam >; + using ParamGrowPtr = boost::shared_ptr< ParamGrow >; + using PerformPtr = boost::shared_ptr< Perform >; + using PerformTransientPtr = boost::shared_ptr< PerformTransient >; + using PetPtr = boost::shared_ptr< Pet >; + using PetActionPtr = boost::shared_ptr< PetAction >; + using PicturePtr = boost::shared_ptr< Picture >; + using PlaceNamePtr = boost::shared_ptr< PlaceName >; + using PublicContentPtr = boost::shared_ptr< PublicContent >; + using PvPActionSortPtr = boost::shared_ptr< PvPActionSort >; + using QuestPtr = boost::shared_ptr< Quest >; + using QuestClassJobRewardPtr = boost::shared_ptr< QuestClassJobReward >; + using QuestRepeatFlagPtr = boost::shared_ptr< QuestRepeatFlag >; + using QuestRewardOtherPtr = boost::shared_ptr< QuestRewardOther >; + using QuickChatPtr = boost::shared_ptr< QuickChat >; + using QuickChatTransientPtr = boost::shared_ptr< QuickChatTransient >; + using RacePtr = boost::shared_ptr< Race >; + using RacingChocoboItemPtr = boost::shared_ptr< RacingChocoboItem >; + using RacingChocoboNamePtr = boost::shared_ptr< RacingChocoboName >; + using RacingChocoboNameCategoryPtr = boost::shared_ptr< RacingChocoboNameCategory >; + using RacingChocoboNameInfoPtr = boost::shared_ptr< RacingChocoboNameInfo >; + using RacingChocoboParamPtr = boost::shared_ptr< RacingChocoboParam >; + using RecipePtr = boost::shared_ptr< Recipe >; + using RecipeElementPtr = boost::shared_ptr< RecipeElement >; + using RecipeLevelTablePtr = boost::shared_ptr< RecipeLevelTable >; + using RecipeNotebookListPtr = boost::shared_ptr< RecipeNotebookList >; + using RecommendContentsPtr = boost::shared_ptr< RecommendContents >; + using RelicPtr = boost::shared_ptr< Relic >; + using Relic3Ptr = boost::shared_ptr< Relic3 >; + using RelicItemPtr = boost::shared_ptr< RelicItem >; + using RelicNotePtr = boost::shared_ptr< RelicNote >; + using RelicNoteCategoryPtr = boost::shared_ptr< RelicNoteCategory >; + using RetainerTaskPtr = boost::shared_ptr< RetainerTask >; + using RetainerTaskLvRangePtr = boost::shared_ptr< RetainerTaskLvRange >; + using RetainerTaskNormalPtr = boost::shared_ptr< RetainerTaskNormal >; + using RetainerTaskParameterPtr = boost::shared_ptr< RetainerTaskParameter >; + using RetainerTaskRandomPtr = boost::shared_ptr< RetainerTaskRandom >; + using SalvagePtr = boost::shared_ptr< Salvage >; + using SatisfactionNpcPtr = boost::shared_ptr< SatisfactionNpc >; + using SatisfactionSupplyPtr = boost::shared_ptr< SatisfactionSupply >; + using SatisfactionSupplyRewardPtr = boost::shared_ptr< SatisfactionSupplyReward >; + using ScenarioTreePtr = boost::shared_ptr< ScenarioTree >; + using ScenarioTreeTipsPtr = boost::shared_ptr< ScenarioTreeTips >; + using ScenarioTreeTipsClassQuestPtr = boost::shared_ptr< ScenarioTreeTipsClassQuest >; + using ScenarioTreeTipsQuestPtr = boost::shared_ptr< ScenarioTreeTipsQuest >; + using ScenarioTypePtr = boost::shared_ptr< ScenarioType >; + using ScreenImagePtr = boost::shared_ptr< ScreenImage >; + using SecretRecipeBookPtr = boost::shared_ptr< SecretRecipeBook >; + using SkyIsland2MissionPtr = boost::shared_ptr< SkyIsland2Mission >; + using SkyIsland2MissionDetailPtr = boost::shared_ptr< SkyIsland2MissionDetail >; + using SkyIsland2MissionTypePtr = boost::shared_ptr< SkyIsland2MissionType >; + using SkyIsland2RangeTypePtr = boost::shared_ptr< SkyIsland2RangeType >; + using SpearfishingItemPtr = boost::shared_ptr< SpearfishingItem >; + using SpearfishingNotebookPtr = boost::shared_ptr< SpearfishingNotebook >; + using SpecialShopPtr = boost::shared_ptr< SpecialShop >; + using SpecialShopItemCategoryPtr = boost::shared_ptr< SpecialShopItemCategory >; + using StainPtr = boost::shared_ptr< Stain >; + using StainTransientPtr = boost::shared_ptr< StainTransient >; + using StatusPtr = boost::shared_ptr< Status >; + using StatusHitEffectPtr = boost::shared_ptr< StatusHitEffect >; + using StatusLoopVFXPtr = boost::shared_ptr< StatusLoopVFX >; + using StoryPtr = boost::shared_ptr< Story >; + using SubmarineExplorationPtr = boost::shared_ptr< SubmarineExploration >; + using SubmarinePartPtr = boost::shared_ptr< SubmarinePart >; + using SubmarineRankPtr = boost::shared_ptr< SubmarineRank >; + using SwitchTalkPtr = boost::shared_ptr< SwitchTalk >; + using TerritoryTypePtr = boost::shared_ptr< TerritoryType >; + using TextCommandPtr = boost::shared_ptr< TextCommand >; + using TitlePtr = boost::shared_ptr< Title >; + using TomestonesPtr = boost::shared_ptr< Tomestones >; + using TomestonesItemPtr = boost::shared_ptr< TomestonesItem >; + using TopicSelectPtr = boost::shared_ptr< TopicSelect >; + using TownPtr = boost::shared_ptr< Town >; + using TraitPtr = boost::shared_ptr< Trait >; + using TraitRecastPtr = boost::shared_ptr< TraitRecast >; + using TraitTransientPtr = boost::shared_ptr< TraitTransient >; + using TransformationPtr = boost::shared_ptr< Transformation >; + using TreasurePtr = boost::shared_ptr< Treasure >; + using TreasureHuntRankPtr = boost::shared_ptr< TreasureHuntRank >; + using TribePtr = boost::shared_ptr< Tribe >; + using TripleTriadPtr = boost::shared_ptr< TripleTriad >; + using TripleTriadCardPtr = boost::shared_ptr< TripleTriadCard >; + using TripleTriadCardRarityPtr = boost::shared_ptr< TripleTriadCardRarity >; + using TripleTriadCardResidentPtr = boost::shared_ptr< TripleTriadCardResident >; + using TripleTriadCardTypePtr = boost::shared_ptr< TripleTriadCardType >; + using TripleTriadCompetitionPtr = boost::shared_ptr< TripleTriadCompetition >; + using TripleTriadRulePtr = boost::shared_ptr< TripleTriadRule >; + using TutorialPtr = boost::shared_ptr< Tutorial >; + using TutorialDPSPtr = boost::shared_ptr< TutorialDPS >; + using TutorialHealerPtr = boost::shared_ptr< TutorialHealer >; + using TutorialTankPtr = boost::shared_ptr< TutorialTank >; + using VaseFlowerPtr = boost::shared_ptr< VaseFlower >; + using VFXPtr = boost::shared_ptr< VFX >; + using WarpPtr = boost::shared_ptr< Warp >; + using WarpConditionPtr = boost::shared_ptr< WarpCondition >; + using WeatherPtr = boost::shared_ptr< Weather >; + using WeatherGroupPtr = boost::shared_ptr< WeatherGroup >; + using WeatherRatePtr = boost::shared_ptr< WeatherRate >; + using WeddingBGMPtr = boost::shared_ptr< WeddingBGM >; + using WeeklyBingoOrderDataPtr = boost::shared_ptr< WeeklyBingoOrderData >; + using WeeklyBingoRewardDataPtr = boost::shared_ptr< WeeklyBingoRewardData >; + using WeeklyBingoTextPtr = boost::shared_ptr< WeeklyBingoText >; + using WorldPtr = boost::shared_ptr< World >; + using WorldDCGroupTypePtr = boost::shared_ptr< WorldDCGroupType >; + using YKWPtr = boost::shared_ptr< YKW >; + using ZoneSharedGroupPtr = boost::shared_ptr< ZoneSharedGroup >; - template< class T > - boost::shared_ptr< T > get( uint32_t id ) - { - try - { - auto info = boost::make_shared< T >( id, this ); - return info; - } - catch( ... ) - { - return nullptr; - } - return nullptr; - } + template< class T > + boost::shared_ptr< T > get( uint32_t id ) + { + try + { + auto info = boost::make_shared< T >( id, this ); + return info; + } + catch( ... ) + { + return nullptr; + } + return nullptr; + } - std::set< uint32_t > m_AchievementIdList; - std::set< uint32_t > m_AchievementCategoryIdList; - std::set< uint32_t > m_AchievementKindIdList; - std::set< uint32_t > m_ActionIdList; - std::set< uint32_t > m_ActionCastTimelineIdList; - std::set< uint32_t > m_ActionCastVFXIdList; - std::set< uint32_t > m_ActionCategoryIdList; - std::set< uint32_t > m_ActionComboRouteIdList; - std::set< uint32_t > m_ActionIndirectionIdList; - std::set< uint32_t > m_ActionParamIdList; - std::set< uint32_t > m_ActionProcStatusIdList; - std::set< uint32_t > m_ActionTimelineIdList; - std::set< uint32_t > m_ActionTimelineReplaceIdList; - std::set< uint32_t > m_ActionTransientIdList; - std::set< uint32_t > m_AddonIdList; - std::set< uint32_t > m_AdventureIdList; - std::set< uint32_t > m_AdventureExPhaseIdList; - std::set< uint32_t > m_AetherCurrentIdList; - std::set< uint32_t > m_AetherCurrentCompFlgSetIdList; - std::set< uint32_t > m_AetherialWheelIdList; - std::set< uint32_t > m_AetheryteIdList; - std::set< uint32_t > m_AirshipExplorationLevelIdList; - std::set< uint32_t > m_AirshipExplorationLogIdList; - std::set< uint32_t > m_AirshipExplorationParamTypeIdList; - std::set< uint32_t > m_AirshipExplorationPartIdList; - std::set< uint32_t > m_AirshipExplorationPointIdList; - std::set< uint32_t > m_AnimaWeapon5IdList; - std::set< uint32_t > m_AnimaWeapon5ParamIdList; - std::set< uint32_t > m_AnimaWeapon5PatternGroupIdList; - std::set< uint32_t > m_AnimaWeapon5SpiritTalkIdList; - std::set< uint32_t > m_AnimaWeapon5SpiritTalkParamIdList; - std::set< uint32_t > m_AnimaWeapon5TradeItemIdList; - std::set< uint32_t > m_AnimaWeaponFUITalkIdList; - std::set< uint32_t > m_AnimaWeaponFUITalkParamIdList; - std::set< uint32_t > m_AnimaWeaponIconIdList; - std::set< uint32_t > m_AnimaWeaponItemIdList; - std::set< uint32_t > m_AquariumFishIdList; - std::set< uint32_t > m_AquariumWaterIdList; - std::set< uint32_t > m_AttackTypeIdList; - std::set< uint32_t > m_BalloonIdList; - std::set< uint32_t > m_BaseParamIdList; - std::set< uint32_t > m_BattleLeveIdList; - std::set< uint32_t > m_BeastRankBonusIdList; - std::set< uint32_t > m_BeastReputationRankIdList; - std::set< uint32_t > m_BeastTribeIdList; - std::set< uint32_t > m_BehaviorIdList; - std::set< uint32_t > m_BGMIdList; - std::set< uint32_t > m_BNpcAnnounceIconIdList; - std::set< uint32_t > m_BNpcBaseIdList; - std::set< uint32_t > m_BNpcCustomizeIdList; - std::set< uint32_t > m_BNpcNameIdList; - std::set< uint32_t > m_BuddyIdList; - std::set< uint32_t > m_BuddyActionIdList; - std::set< uint32_t > m_BuddyEquipIdList; - std::set< uint32_t > m_BuddyItemIdList; - std::set< uint32_t > m_BuddyRankIdList; - std::set< uint32_t > m_BuddySkillIdList; - std::set< uint32_t > m_CabinetIdList; - std::set< uint32_t > m_CabinetCategoryIdList; - std::set< uint32_t > m_CalendarIdList; - std::set< uint32_t > m_CharaMakeCustomizeIdList; - std::set< uint32_t > m_CharaMakeTypeIdList; - std::set< uint32_t > m_ChocoboRaceIdList; - std::set< uint32_t > m_ChocoboRaceAbilityIdList; - std::set< uint32_t > m_ChocoboRaceAbilityTypeIdList; - std::set< uint32_t > m_ChocoboRaceItemIdList; - std::set< uint32_t > m_ChocoboRaceRankIdList; - std::set< uint32_t > m_ChocoboRaceStatusIdList; - std::set< uint32_t > m_ChocoboRaceTerritoryIdList; - std::set< uint32_t > m_ChocoboTaxiIdList; - std::set< uint32_t > m_ChocoboTaxiStandIdList; - std::set< uint32_t > m_ClassJobIdList; - std::set< uint32_t > m_ClassJobCategoryIdList; - std::set< uint32_t > m_CompanionIdList; - std::set< uint32_t > m_CompanionMoveIdList; - std::set< uint32_t > m_CompanionTransientIdList; - std::set< uint32_t > m_CompanyActionIdList; - std::set< uint32_t > m_CompanyCraftDraftIdList; - std::set< uint32_t > m_CompanyCraftDraftCategoryIdList; - std::set< uint32_t > m_CompanyCraftManufactoryStateIdList; - std::set< uint32_t > m_CompanyCraftPartIdList; - std::set< uint32_t > m_CompanyCraftProcessIdList; - std::set< uint32_t > m_CompanyCraftSequenceIdList; - std::set< uint32_t > m_CompanyCraftSupplyItemIdList; - std::set< uint32_t > m_CompanyCraftTypeIdList; - std::set< uint32_t > m_CompleteJournalIdList; - std::set< uint32_t > m_CompleteJournalCategoryIdList; - std::set< uint32_t > m_ContentExActionIdList; - std::set< uint32_t > m_ContentFinderConditionIdList; - std::set< uint32_t > m_ContentFinderConditionTransientIdList; - std::set< uint32_t > m_ContentMemberTypeIdList; - std::set< uint32_t > m_ContentNpcTalkIdList; - std::set< uint32_t > m_ContentRouletteIdList; - std::set< uint32_t > m_ContentsNoteIdList; - std::set< uint32_t > m_ContentsNoteCategoryIdList; - std::set< uint32_t > m_ContentTalkIdList; - std::set< uint32_t > m_ContentTalkParamIdList; - std::set< uint32_t > m_ContentTypeIdList; - std::set< uint32_t > m_CraftActionIdList; - std::set< uint32_t > m_CraftLeveIdList; - std::set< uint32_t > m_CraftTypeIdList; - std::set< uint32_t > m_CurrencyIdList; - std::set< uint32_t > m_CustomTalkIdList; - std::set< uint32_t > m_CutsceneIdList; - std::set< uint32_t > m_CutScreenImageIdList; - std::set< uint32_t > m_DailySupplyItemIdList; - std::set< uint32_t > m_DeepDungeonBanIdList; - std::set< uint32_t > m_DeepDungeonDangerIdList; - std::set< uint32_t > m_DeepDungeonEquipmentIdList; - std::set< uint32_t > m_DeepDungeonFloorEffectUIIdList; - std::set< uint32_t > m_DeepDungeonItemIdList; - std::set< uint32_t > m_DeepDungeonStatusIdList; - std::set< uint32_t > m_DefaultTalkIdList; - std::set< uint32_t > m_DeliveryQuestIdList; - std::set< uint32_t > m_DisposalShopIdList; - std::set< uint32_t > m_DisposalShopFilterTypeIdList; - std::set< uint32_t > m_DisposalShopItemIdList; - std::set< uint32_t > m_DpsChallengeIdList; - std::set< uint32_t > m_DpsChallengeOfficerIdList; - std::set< uint32_t > m_DpsChallengeTransientIdList; - std::set< uint32_t > m_EmoteIdList; - std::set< uint32_t > m_EmoteModeIdList; - std::set< uint32_t > m_EmoteCategoryIdList; - std::set< uint32_t > m_ENpcBaseIdList; - std::set< uint32_t > m_ENpcResidentIdList; - std::set< uint32_t > m_EObjIdList; - std::set< uint32_t > m_EObjNameIdList; - std::set< uint32_t > m_EquipRaceCategoryIdList; - std::set< uint32_t > m_EquipSlotCategoryIdList; - std::set< uint32_t > m_EurekaAethernetIdList; - std::set< uint32_t > m_EurekaGrowDataIdList; - std::set< uint32_t > m_EurekaSphereElementAdjustIdList; - std::set< uint32_t > m_EventActionIdList; - std::set< uint32_t > m_EventIconPriorityIdList; - std::set< uint32_t > m_EventIconTypeIdList; - std::set< uint32_t > m_EventItemIdList; - std::set< uint32_t > m_EventItemHelpIdList; - std::set< uint32_t > m_ExVersionIdList; - std::set< uint32_t > m_FateIdList; - std::set< uint32_t > m_FCActivityIdList; - std::set< uint32_t > m_FCActivityCategoryIdList; - std::set< uint32_t > m_FCAuthorityIdList; - std::set< uint32_t > m_FCAuthorityCategoryIdList; - std::set< uint32_t > m_FCChestNameIdList; - std::set< uint32_t > m_FccShopIdList; - std::set< uint32_t > m_FCHierarchyIdList; - std::set< uint32_t > m_FCProfileIdList; - std::set< uint32_t > m_FCReputationIdList; - std::set< uint32_t > m_FCRightsIdList; - std::set< uint32_t > m_FieldMarkerIdList; - std::set< uint32_t > m_FishingSpotIdList; - std::set< uint32_t > m_FishParameterIdList; - std::set< uint32_t > m_GardeningSeedIdList; - std::set< uint32_t > m_GatheringConditionIdList; - std::set< uint32_t > m_GatheringExpIdList; - std::set< uint32_t > m_GatheringItemIdList; - std::set< uint32_t > m_GatheringItemLevelConvertTableIdList; - std::set< uint32_t > m_GatheringItemPointIdList; - std::set< uint32_t > m_GatheringNotebookListIdList; - std::set< uint32_t > m_GatheringPointIdList; - std::set< uint32_t > m_GatheringPointBaseIdList; - std::set< uint32_t > m_GatheringPointBonusIdList; - std::set< uint32_t > m_GatheringPointBonusTypeIdList; - std::set< uint32_t > m_GatheringPointNameIdList; - std::set< uint32_t > m_GatheringSubCategoryIdList; - std::set< uint32_t > m_GatheringTypeIdList; - std::set< uint32_t > m_GcArmyExpeditionIdList; - std::set< uint32_t > m_GcArmyExpeditionMemberBonusIdList; - std::set< uint32_t > m_GcArmyExpeditionTypeIdList; - std::set< uint32_t > m_GcArmyMemberGrowIdList; - std::set< uint32_t > m_GcArmyTrainingIdList; - std::set< uint32_t > m_GCRankGridaniaFemaleTextIdList; - std::set< uint32_t > m_GCRankGridaniaMaleTextIdList; - std::set< uint32_t > m_GCRankLimsaFemaleTextIdList; - std::set< uint32_t > m_GCRankLimsaMaleTextIdList; - std::set< uint32_t > m_GCRankUldahFemaleTextIdList; - std::set< uint32_t > m_GCRankUldahMaleTextIdList; - std::set< uint32_t > m_GCScripShopCategoryIdList; - std::set< uint32_t > m_GCScripShopItemIdList; - std::set< uint32_t > m_GCShopIdList; - std::set< uint32_t > m_GCShopItemCategoryIdList; - std::set< uint32_t > m_GCSupplyDutyIdList; - std::set< uint32_t > m_GCSupplyDutyRewardIdList; - std::set< uint32_t > m_GeneralActionIdList; - std::set< uint32_t > m_GilShopIdList; - std::set< uint32_t > m_GilShopItemIdList; - std::set< uint32_t > m_GoldSaucerTextDataIdList; - std::set< uint32_t > m_GrandCompanyIdList; - std::set< uint32_t > m_GrandCompanyRankIdList; - std::set< uint32_t > m_GuardianDeityIdList; - std::set< uint32_t > m_GuildleveAssignmentIdList; - std::set< uint32_t > m_GuildOrderGuideIdList; - std::set< uint32_t > m_GuildOrderOfficerIdList; - std::set< uint32_t > m_HouseRetainerPoseIdList; - std::set< uint32_t > m_HousingFurnitureIdList; - std::set< uint32_t > m_HousingYardObjectIdList; - std::set< uint32_t > m_InstanceContentIdList; - std::set< uint32_t > m_InstanceContentBuffIdList; - std::set< uint32_t > m_InstanceContentTextDataIdList; - std::set< uint32_t > m_ItemIdList; - std::set< uint32_t > m_ItemActionIdList; - std::set< uint32_t > m_ItemFoodIdList; - std::set< uint32_t > m_ItemSearchCategoryIdList; - std::set< uint32_t > m_ItemSeriesIdList; - std::set< uint32_t > m_ItemSpecialBonusIdList; - std::set< uint32_t > m_ItemUICategoryIdList; - std::set< uint32_t > m_JournalCategoryIdList; - std::set< uint32_t > m_JournalGenreIdList; - std::set< uint32_t > m_JournalSectionIdList; - std::set< uint32_t > m_LeveIdList; - std::set< uint32_t > m_LeveAssignmentTypeIdList; - std::set< uint32_t > m_LeveClientIdList; - std::set< uint32_t > m_LevelIdList; - std::set< uint32_t > m_LeveRewardItemIdList; - std::set< uint32_t > m_LeveRewardItemGroupIdList; - std::set< uint32_t > m_LeveVfxIdList; - std::set< uint32_t > m_LogFilterIdList; - std::set< uint32_t > m_LogKindIdList; - std::set< uint32_t > m_LogKindCategoryTextIdList; - std::set< uint32_t > m_LogMessageIdList; - std::set< uint32_t > m_MacroIconIdList; - std::set< uint32_t > m_MacroIconRedirectOldIdList; - std::set< uint32_t > m_MainCommandIdList; - std::set< uint32_t > m_MainCommandCategoryIdList; - std::set< uint32_t > m_MapIdList; - std::set< uint32_t > m_MapMarkerIdList; - std::set< uint32_t > m_MapMarkerRegionIdList; - std::set< uint32_t > m_MapSymbolIdList; - std::set< uint32_t > m_MarkerIdList; - std::set< uint32_t > m_MasterpieceSupplyDutyIdList; - std::set< uint32_t > m_MasterpieceSupplyMultiplierIdList; - std::set< uint32_t > m_MateriaIdList; - std::set< uint32_t > m_MinionRaceIdList; - std::set< uint32_t > m_MinionRulesIdList; - std::set< uint32_t > m_MinionSkillTypeIdList; - std::set< uint32_t > m_MobHuntTargetIdList; - std::set< uint32_t > m_ModelCharaIdList; - std::set< uint32_t > m_MonsterNoteIdList; - std::set< uint32_t > m_MonsterNoteTargetIdList; - std::set< uint32_t > m_MountIdList; - std::set< uint32_t > m_MountActionIdList; - std::set< uint32_t > m_MoveTimelineIdList; - std::set< uint32_t > m_MoveVfxIdList; - std::set< uint32_t > m_NpcEquipIdList; - std::set< uint32_t > m_OmenIdList; - std::set< uint32_t > m_OnlineStatusIdList; - std::set< uint32_t > m_OpeningIdList; - std::set< uint32_t > m_OrchestrionIdList; - std::set< uint32_t > m_OrchestrionCategoryIdList; - std::set< uint32_t > m_OrchestrionPathIdList; - std::set< uint32_t > m_OrchestrionUiparamIdList; - std::set< uint32_t > m_ParamGrowIdList; - std::set< uint32_t > m_PerformIdList; - std::set< uint32_t > m_PerformTransientIdList; - std::set< uint32_t > m_PetIdList; - std::set< uint32_t > m_PetActionIdList; - std::set< uint32_t > m_PictureIdList; - std::set< uint32_t > m_PlaceNameIdList; - std::set< uint32_t > m_PublicContentIdList; - std::set< uint32_t > m_PvPActionSortIdList; - std::set< uint32_t > m_QuestIdList; - std::set< uint32_t > m_QuestClassJobRewardIdList; - std::set< uint32_t > m_QuestRepeatFlagIdList; - std::set< uint32_t > m_QuestRewardOtherIdList; - std::set< uint32_t > m_QuickChatIdList; - std::set< uint32_t > m_QuickChatTransientIdList; - std::set< uint32_t > m_RaceIdList; - std::set< uint32_t > m_RacingChocoboItemIdList; - std::set< uint32_t > m_RacingChocoboNameIdList; - std::set< uint32_t > m_RacingChocoboNameCategoryIdList; - std::set< uint32_t > m_RacingChocoboNameInfoIdList; - std::set< uint32_t > m_RacingChocoboParamIdList; - std::set< uint32_t > m_RecipeIdList; - std::set< uint32_t > m_RecipeElementIdList; - std::set< uint32_t > m_RecipeLevelTableIdList; - std::set< uint32_t > m_RecipeNotebookListIdList; - std::set< uint32_t > m_RecommendContentsIdList; - std::set< uint32_t > m_RelicIdList; - std::set< uint32_t > m_Relic3IdList; - std::set< uint32_t > m_RelicItemIdList; - std::set< uint32_t > m_RelicNoteIdList; - std::set< uint32_t > m_RelicNoteCategoryIdList; - std::set< uint32_t > m_RetainerTaskIdList; - std::set< uint32_t > m_RetainerTaskLvRangeIdList; - std::set< uint32_t > m_RetainerTaskNormalIdList; - std::set< uint32_t > m_RetainerTaskParameterIdList; - std::set< uint32_t > m_RetainerTaskRandomIdList; - std::set< uint32_t > m_SalvageIdList; - std::set< uint32_t > m_SatisfactionNpcIdList; - std::set< uint32_t > m_SatisfactionSupplyIdList; - std::set< uint32_t > m_SatisfactionSupplyRewardIdList; - std::set< uint32_t > m_ScenarioTreeIdList; - std::set< uint32_t > m_ScenarioTreeTipsIdList; - std::set< uint32_t > m_ScenarioTreeTipsClassQuestIdList; - std::set< uint32_t > m_ScenarioTreeTipsQuestIdList; - std::set< uint32_t > m_ScenarioTypeIdList; - std::set< uint32_t > m_ScreenImageIdList; - std::set< uint32_t > m_SecretRecipeBookIdList; - std::set< uint32_t > m_SkyIsland2MissionIdList; - std::set< uint32_t > m_SkyIsland2MissionDetailIdList; - std::set< uint32_t > m_SkyIsland2MissionTypeIdList; - std::set< uint32_t > m_SkyIsland2RangeTypeIdList; - std::set< uint32_t > m_SpearfishingItemIdList; - std::set< uint32_t > m_SpearfishingNotebookIdList; - std::set< uint32_t > m_SpecialShopIdList; - std::set< uint32_t > m_SpecialShopItemCategoryIdList; - std::set< uint32_t > m_StainIdList; - std::set< uint32_t > m_StainTransientIdList; - std::set< uint32_t > m_StatusIdList; - std::set< uint32_t > m_StatusHitEffectIdList; - std::set< uint32_t > m_StatusLoopVFXIdList; - std::set< uint32_t > m_StoryIdList; - std::set< uint32_t > m_SubmarineExplorationIdList; - std::set< uint32_t > m_SubmarinePartIdList; - std::set< uint32_t > m_SubmarineRankIdList; - std::set< uint32_t > m_SwitchTalkIdList; - std::set< uint32_t > m_TerritoryTypeIdList; - std::set< uint32_t > m_TextCommandIdList; - std::set< uint32_t > m_TitleIdList; - std::set< uint32_t > m_TomestonesIdList; - std::set< uint32_t > m_TomestonesItemIdList; - std::set< uint32_t > m_TopicSelectIdList; - std::set< uint32_t > m_TownIdList; - std::set< uint32_t > m_TraitIdList; - std::set< uint32_t > m_TraitRecastIdList; - std::set< uint32_t > m_TraitTransientIdList; - std::set< uint32_t > m_TransformationIdList; - std::set< uint32_t > m_TreasureIdList; - std::set< uint32_t > m_TreasureHuntRankIdList; - std::set< uint32_t > m_TribeIdList; - std::set< uint32_t > m_TripleTriadIdList; - std::set< uint32_t > m_TripleTriadCardIdList; - std::set< uint32_t > m_TripleTriadCardRarityIdList; - std::set< uint32_t > m_TripleTriadCardResidentIdList; - std::set< uint32_t > m_TripleTriadCardTypeIdList; - std::set< uint32_t > m_TripleTriadCompetitionIdList; - std::set< uint32_t > m_TripleTriadRuleIdList; - std::set< uint32_t > m_TutorialIdList; - std::set< uint32_t > m_TutorialDPSIdList; - std::set< uint32_t > m_TutorialHealerIdList; - std::set< uint32_t > m_TutorialTankIdList; - std::set< uint32_t > m_VaseFlowerIdList; - std::set< uint32_t > m_VFXIdList; - std::set< uint32_t > m_WarpIdList; - std::set< uint32_t > m_WarpConditionIdList; - std::set< uint32_t > m_WeatherIdList; - std::set< uint32_t > m_WeatherGroupIdList; - std::set< uint32_t > m_WeatherRateIdList; - std::set< uint32_t > m_WeddingBGMIdList; - std::set< uint32_t > m_WeeklyBingoOrderDataIdList; - std::set< uint32_t > m_WeeklyBingoRewardDataIdList; - std::set< uint32_t > m_WeeklyBingoTextIdList; - std::set< uint32_t > m_WorldIdList; - std::set< uint32_t > m_WorldDCGroupTypeIdList; - std::set< uint32_t > m_YKWIdList; - std::set< uint32_t > m_ZoneSharedGroupIdList; + std::set< uint32_t > m_AchievementIdList; + std::set< uint32_t > m_AchievementCategoryIdList; + std::set< uint32_t > m_AchievementKindIdList; + std::set< uint32_t > m_ActionIdList; + std::set< uint32_t > m_ActionCastTimelineIdList; + std::set< uint32_t > m_ActionCastVFXIdList; + std::set< uint32_t > m_ActionCategoryIdList; + std::set< uint32_t > m_ActionComboRouteIdList; + std::set< uint32_t > m_ActionIndirectionIdList; + std::set< uint32_t > m_ActionParamIdList; + std::set< uint32_t > m_ActionProcStatusIdList; + std::set< uint32_t > m_ActionTimelineIdList; + std::set< uint32_t > m_ActionTimelineReplaceIdList; + std::set< uint32_t > m_ActionTransientIdList; + std::set< uint32_t > m_AddonIdList; + std::set< uint32_t > m_AdventureIdList; + std::set< uint32_t > m_AdventureExPhaseIdList; + std::set< uint32_t > m_AetherCurrentIdList; + std::set< uint32_t > m_AetherCurrentCompFlgSetIdList; + std::set< uint32_t > m_AetherialWheelIdList; + std::set< uint32_t > m_AetheryteIdList; + std::set< uint32_t > m_AirshipExplorationLevelIdList; + std::set< uint32_t > m_AirshipExplorationLogIdList; + std::set< uint32_t > m_AirshipExplorationParamTypeIdList; + std::set< uint32_t > m_AirshipExplorationPartIdList; + std::set< uint32_t > m_AirshipExplorationPointIdList; + std::set< uint32_t > m_AnimaWeapon5IdList; + std::set< uint32_t > m_AnimaWeapon5ParamIdList; + std::set< uint32_t > m_AnimaWeapon5PatternGroupIdList; + std::set< uint32_t > m_AnimaWeapon5SpiritTalkIdList; + std::set< uint32_t > m_AnimaWeapon5SpiritTalkParamIdList; + std::set< uint32_t > m_AnimaWeapon5TradeItemIdList; + std::set< uint32_t > m_AnimaWeaponFUITalkIdList; + std::set< uint32_t > m_AnimaWeaponFUITalkParamIdList; + std::set< uint32_t > m_AnimaWeaponIconIdList; + std::set< uint32_t > m_AnimaWeaponItemIdList; + std::set< uint32_t > m_AquariumFishIdList; + std::set< uint32_t > m_AquariumWaterIdList; + std::set< uint32_t > m_AttackTypeIdList; + std::set< uint32_t > m_BalloonIdList; + std::set< uint32_t > m_BaseParamIdList; + std::set< uint32_t > m_BattleLeveIdList; + std::set< uint32_t > m_BeastRankBonusIdList; + std::set< uint32_t > m_BeastReputationRankIdList; + std::set< uint32_t > m_BeastTribeIdList; + std::set< uint32_t > m_BehaviorIdList; + std::set< uint32_t > m_BGMIdList; + std::set< uint32_t > m_BNpcAnnounceIconIdList; + std::set< uint32_t > m_BNpcBaseIdList; + std::set< uint32_t > m_BNpcCustomizeIdList; + std::set< uint32_t > m_BNpcNameIdList; + std::set< uint32_t > m_BuddyIdList; + std::set< uint32_t > m_BuddyActionIdList; + std::set< uint32_t > m_BuddyEquipIdList; + std::set< uint32_t > m_BuddyItemIdList; + std::set< uint32_t > m_BuddyRankIdList; + std::set< uint32_t > m_BuddySkillIdList; + std::set< uint32_t > m_CabinetIdList; + std::set< uint32_t > m_CabinetCategoryIdList; + std::set< uint32_t > m_CalendarIdList; + std::set< uint32_t > m_CharaMakeCustomizeIdList; + std::set< uint32_t > m_CharaMakeTypeIdList; + std::set< uint32_t > m_ChocoboRaceIdList; + std::set< uint32_t > m_ChocoboRaceAbilityIdList; + std::set< uint32_t > m_ChocoboRaceAbilityTypeIdList; + std::set< uint32_t > m_ChocoboRaceItemIdList; + std::set< uint32_t > m_ChocoboRaceRankIdList; + std::set< uint32_t > m_ChocoboRaceStatusIdList; + std::set< uint32_t > m_ChocoboRaceTerritoryIdList; + std::set< uint32_t > m_ChocoboTaxiIdList; + std::set< uint32_t > m_ChocoboTaxiStandIdList; + std::set< uint32_t > m_ClassJobIdList; + std::set< uint32_t > m_ClassJobCategoryIdList; + std::set< uint32_t > m_CompanionIdList; + std::set< uint32_t > m_CompanionMoveIdList; + std::set< uint32_t > m_CompanionTransientIdList; + std::set< uint32_t > m_CompanyActionIdList; + std::set< uint32_t > m_CompanyCraftDraftIdList; + std::set< uint32_t > m_CompanyCraftDraftCategoryIdList; + std::set< uint32_t > m_CompanyCraftManufactoryStateIdList; + std::set< uint32_t > m_CompanyCraftPartIdList; + std::set< uint32_t > m_CompanyCraftProcessIdList; + std::set< uint32_t > m_CompanyCraftSequenceIdList; + std::set< uint32_t > m_CompanyCraftSupplyItemIdList; + std::set< uint32_t > m_CompanyCraftTypeIdList; + std::set< uint32_t > m_CompleteJournalIdList; + std::set< uint32_t > m_CompleteJournalCategoryIdList; + std::set< uint32_t > m_ContentExActionIdList; + std::set< uint32_t > m_ContentFinderConditionIdList; + std::set< uint32_t > m_ContentFinderConditionTransientIdList; + std::set< uint32_t > m_ContentMemberTypeIdList; + std::set< uint32_t > m_ContentNpcTalkIdList; + std::set< uint32_t > m_ContentRouletteIdList; + std::set< uint32_t > m_ContentsNoteIdList; + std::set< uint32_t > m_ContentsNoteCategoryIdList; + std::set< uint32_t > m_ContentTalkIdList; + std::set< uint32_t > m_ContentTalkParamIdList; + std::set< uint32_t > m_ContentTypeIdList; + std::set< uint32_t > m_CraftActionIdList; + std::set< uint32_t > m_CraftLeveIdList; + std::set< uint32_t > m_CraftTypeIdList; + std::set< uint32_t > m_CurrencyIdList; + std::set< uint32_t > m_CustomTalkIdList; + std::set< uint32_t > m_CutsceneIdList; + std::set< uint32_t > m_CutScreenImageIdList; + std::set< uint32_t > m_DailySupplyItemIdList; + std::set< uint32_t > m_DeepDungeonBanIdList; + std::set< uint32_t > m_DeepDungeonDangerIdList; + std::set< uint32_t > m_DeepDungeonEquipmentIdList; + std::set< uint32_t > m_DeepDungeonFloorEffectUIIdList; + std::set< uint32_t > m_DeepDungeonItemIdList; + std::set< uint32_t > m_DeepDungeonStatusIdList; + std::set< uint32_t > m_DefaultTalkIdList; + std::set< uint32_t > m_DeliveryQuestIdList; + std::set< uint32_t > m_DisposalShopIdList; + std::set< uint32_t > m_DisposalShopFilterTypeIdList; + std::set< uint32_t > m_DisposalShopItemIdList; + std::set< uint32_t > m_DpsChallengeIdList; + std::set< uint32_t > m_DpsChallengeOfficerIdList; + std::set< uint32_t > m_DpsChallengeTransientIdList; + std::set< uint32_t > m_EmoteIdList; + std::set< uint32_t > m_EmoteModeIdList; + std::set< uint32_t > m_EmoteCategoryIdList; + std::set< uint32_t > m_ENpcBaseIdList; + std::set< uint32_t > m_ENpcResidentIdList; + std::set< uint32_t > m_EObjIdList; + std::set< uint32_t > m_EObjNameIdList; + std::set< uint32_t > m_EquipRaceCategoryIdList; + std::set< uint32_t > m_EquipSlotCategoryIdList; + std::set< uint32_t > m_EurekaAethernetIdList; + std::set< uint32_t > m_EurekaGrowDataIdList; + std::set< uint32_t > m_EurekaSphereElementAdjustIdList; + std::set< uint32_t > m_EventActionIdList; + std::set< uint32_t > m_EventIconPriorityIdList; + std::set< uint32_t > m_EventIconTypeIdList; + std::set< uint32_t > m_EventItemIdList; + std::set< uint32_t > m_EventItemHelpIdList; + std::set< uint32_t > m_ExVersionIdList; + std::set< uint32_t > m_FateIdList; + std::set< uint32_t > m_FCActivityIdList; + std::set< uint32_t > m_FCActivityCategoryIdList; + std::set< uint32_t > m_FCAuthorityIdList; + std::set< uint32_t > m_FCAuthorityCategoryIdList; + std::set< uint32_t > m_FCChestNameIdList; + std::set< uint32_t > m_FccShopIdList; + std::set< uint32_t > m_FCHierarchyIdList; + std::set< uint32_t > m_FCProfileIdList; + std::set< uint32_t > m_FCReputationIdList; + std::set< uint32_t > m_FCRightsIdList; + std::set< uint32_t > m_FieldMarkerIdList; + std::set< uint32_t > m_FishingSpotIdList; + std::set< uint32_t > m_FishParameterIdList; + std::set< uint32_t > m_GardeningSeedIdList; + std::set< uint32_t > m_GatheringConditionIdList; + std::set< uint32_t > m_GatheringExpIdList; + std::set< uint32_t > m_GatheringItemIdList; + std::set< uint32_t > m_GatheringItemLevelConvertTableIdList; + std::set< uint32_t > m_GatheringItemPointIdList; + std::set< uint32_t > m_GatheringNotebookListIdList; + std::set< uint32_t > m_GatheringPointIdList; + std::set< uint32_t > m_GatheringPointBaseIdList; + std::set< uint32_t > m_GatheringPointBonusIdList; + std::set< uint32_t > m_GatheringPointBonusTypeIdList; + std::set< uint32_t > m_GatheringPointNameIdList; + std::set< uint32_t > m_GatheringSubCategoryIdList; + std::set< uint32_t > m_GatheringTypeIdList; + std::set< uint32_t > m_GcArmyExpeditionIdList; + std::set< uint32_t > m_GcArmyExpeditionMemberBonusIdList; + std::set< uint32_t > m_GcArmyExpeditionTypeIdList; + std::set< uint32_t > m_GcArmyMemberGrowIdList; + std::set< uint32_t > m_GcArmyTrainingIdList; + std::set< uint32_t > m_GCRankGridaniaFemaleTextIdList; + std::set< uint32_t > m_GCRankGridaniaMaleTextIdList; + std::set< uint32_t > m_GCRankLimsaFemaleTextIdList; + std::set< uint32_t > m_GCRankLimsaMaleTextIdList; + std::set< uint32_t > m_GCRankUldahFemaleTextIdList; + std::set< uint32_t > m_GCRankUldahMaleTextIdList; + std::set< uint32_t > m_GCScripShopCategoryIdList; + std::set< uint32_t > m_GCScripShopItemIdList; + std::set< uint32_t > m_GCShopIdList; + std::set< uint32_t > m_GCShopItemCategoryIdList; + std::set< uint32_t > m_GCSupplyDutyIdList; + std::set< uint32_t > m_GCSupplyDutyRewardIdList; + std::set< uint32_t > m_GeneralActionIdList; + std::set< uint32_t > m_GilShopIdList; + std::set< uint32_t > m_GilShopItemIdList; + std::set< uint32_t > m_GoldSaucerTextDataIdList; + std::set< uint32_t > m_GrandCompanyIdList; + std::set< uint32_t > m_GrandCompanyRankIdList; + std::set< uint32_t > m_GuardianDeityIdList; + std::set< uint32_t > m_GuildleveAssignmentIdList; + std::set< uint32_t > m_GuildOrderGuideIdList; + std::set< uint32_t > m_GuildOrderOfficerIdList; + std::set< uint32_t > m_HouseRetainerPoseIdList; + std::set< uint32_t > m_HousingFurnitureIdList; + std::set< uint32_t > m_HousingYardObjectIdList; + std::set< uint32_t > m_InstanceContentIdList; + std::set< uint32_t > m_InstanceContentBuffIdList; + std::set< uint32_t > m_InstanceContentTextDataIdList; + std::set< uint32_t > m_ItemIdList; + std::set< uint32_t > m_ItemActionIdList; + std::set< uint32_t > m_ItemFoodIdList; + std::set< uint32_t > m_ItemSearchCategoryIdList; + std::set< uint32_t > m_ItemSeriesIdList; + std::set< uint32_t > m_ItemSpecialBonusIdList; + std::set< uint32_t > m_ItemUICategoryIdList; + std::set< uint32_t > m_JournalCategoryIdList; + std::set< uint32_t > m_JournalGenreIdList; + std::set< uint32_t > m_JournalSectionIdList; + std::set< uint32_t > m_LeveIdList; + std::set< uint32_t > m_LeveAssignmentTypeIdList; + std::set< uint32_t > m_LeveClientIdList; + std::set< uint32_t > m_LevelIdList; + std::set< uint32_t > m_LeveRewardItemIdList; + std::set< uint32_t > m_LeveRewardItemGroupIdList; + std::set< uint32_t > m_LeveVfxIdList; + std::set< uint32_t > m_LogFilterIdList; + std::set< uint32_t > m_LogKindIdList; + std::set< uint32_t > m_LogKindCategoryTextIdList; + std::set< uint32_t > m_LogMessageIdList; + std::set< uint32_t > m_MacroIconIdList; + std::set< uint32_t > m_MacroIconRedirectOldIdList; + std::set< uint32_t > m_MainCommandIdList; + std::set< uint32_t > m_MainCommandCategoryIdList; + std::set< uint32_t > m_MapIdList; + std::set< uint32_t > m_MapMarkerIdList; + std::set< uint32_t > m_MapMarkerRegionIdList; + std::set< uint32_t > m_MapSymbolIdList; + std::set< uint32_t > m_MarkerIdList; + std::set< uint32_t > m_MasterpieceSupplyDutyIdList; + std::set< uint32_t > m_MasterpieceSupplyMultiplierIdList; + std::set< uint32_t > m_MateriaIdList; + std::set< uint32_t > m_MinionRaceIdList; + std::set< uint32_t > m_MinionRulesIdList; + std::set< uint32_t > m_MinionSkillTypeIdList; + std::set< uint32_t > m_MobHuntTargetIdList; + std::set< uint32_t > m_ModelCharaIdList; + std::set< uint32_t > m_MonsterNoteIdList; + std::set< uint32_t > m_MonsterNoteTargetIdList; + std::set< uint32_t > m_MountIdList; + std::set< uint32_t > m_MountActionIdList; + std::set< uint32_t > m_MoveTimelineIdList; + std::set< uint32_t > m_MoveVfxIdList; + std::set< uint32_t > m_NpcEquipIdList; + std::set< uint32_t > m_OmenIdList; + std::set< uint32_t > m_OnlineStatusIdList; + std::set< uint32_t > m_OpeningIdList; + std::set< uint32_t > m_OrchestrionIdList; + std::set< uint32_t > m_OrchestrionCategoryIdList; + std::set< uint32_t > m_OrchestrionPathIdList; + std::set< uint32_t > m_OrchestrionUiparamIdList; + std::set< uint32_t > m_ParamGrowIdList; + std::set< uint32_t > m_PerformIdList; + std::set< uint32_t > m_PerformTransientIdList; + std::set< uint32_t > m_PetIdList; + std::set< uint32_t > m_PetActionIdList; + std::set< uint32_t > m_PictureIdList; + std::set< uint32_t > m_PlaceNameIdList; + std::set< uint32_t > m_PublicContentIdList; + std::set< uint32_t > m_PvPActionSortIdList; + std::set< uint32_t > m_QuestIdList; + std::set< uint32_t > m_QuestClassJobRewardIdList; + std::set< uint32_t > m_QuestRepeatFlagIdList; + std::set< uint32_t > m_QuestRewardOtherIdList; + std::set< uint32_t > m_QuickChatIdList; + std::set< uint32_t > m_QuickChatTransientIdList; + std::set< uint32_t > m_RaceIdList; + std::set< uint32_t > m_RacingChocoboItemIdList; + std::set< uint32_t > m_RacingChocoboNameIdList; + std::set< uint32_t > m_RacingChocoboNameCategoryIdList; + std::set< uint32_t > m_RacingChocoboNameInfoIdList; + std::set< uint32_t > m_RacingChocoboParamIdList; + std::set< uint32_t > m_RecipeIdList; + std::set< uint32_t > m_RecipeElementIdList; + std::set< uint32_t > m_RecipeLevelTableIdList; + std::set< uint32_t > m_RecipeNotebookListIdList; + std::set< uint32_t > m_RecommendContentsIdList; + std::set< uint32_t > m_RelicIdList; + std::set< uint32_t > m_Relic3IdList; + std::set< uint32_t > m_RelicItemIdList; + std::set< uint32_t > m_RelicNoteIdList; + std::set< uint32_t > m_RelicNoteCategoryIdList; + std::set< uint32_t > m_RetainerTaskIdList; + std::set< uint32_t > m_RetainerTaskLvRangeIdList; + std::set< uint32_t > m_RetainerTaskNormalIdList; + std::set< uint32_t > m_RetainerTaskParameterIdList; + std::set< uint32_t > m_RetainerTaskRandomIdList; + std::set< uint32_t > m_SalvageIdList; + std::set< uint32_t > m_SatisfactionNpcIdList; + std::set< uint32_t > m_SatisfactionSupplyIdList; + std::set< uint32_t > m_SatisfactionSupplyRewardIdList; + std::set< uint32_t > m_ScenarioTreeIdList; + std::set< uint32_t > m_ScenarioTreeTipsIdList; + std::set< uint32_t > m_ScenarioTreeTipsClassQuestIdList; + std::set< uint32_t > m_ScenarioTreeTipsQuestIdList; + std::set< uint32_t > m_ScenarioTypeIdList; + std::set< uint32_t > m_ScreenImageIdList; + std::set< uint32_t > m_SecretRecipeBookIdList; + std::set< uint32_t > m_SkyIsland2MissionIdList; + std::set< uint32_t > m_SkyIsland2MissionDetailIdList; + std::set< uint32_t > m_SkyIsland2MissionTypeIdList; + std::set< uint32_t > m_SkyIsland2RangeTypeIdList; + std::set< uint32_t > m_SpearfishingItemIdList; + std::set< uint32_t > m_SpearfishingNotebookIdList; + std::set< uint32_t > m_SpecialShopIdList; + std::set< uint32_t > m_SpecialShopItemCategoryIdList; + std::set< uint32_t > m_StainIdList; + std::set< uint32_t > m_StainTransientIdList; + std::set< uint32_t > m_StatusIdList; + std::set< uint32_t > m_StatusHitEffectIdList; + std::set< uint32_t > m_StatusLoopVFXIdList; + std::set< uint32_t > m_StoryIdList; + std::set< uint32_t > m_SubmarineExplorationIdList; + std::set< uint32_t > m_SubmarinePartIdList; + std::set< uint32_t > m_SubmarineRankIdList; + std::set< uint32_t > m_SwitchTalkIdList; + std::set< uint32_t > m_TerritoryTypeIdList; + std::set< uint32_t > m_TextCommandIdList; + std::set< uint32_t > m_TitleIdList; + std::set< uint32_t > m_TomestonesIdList; + std::set< uint32_t > m_TomestonesItemIdList; + std::set< uint32_t > m_TopicSelectIdList; + std::set< uint32_t > m_TownIdList; + std::set< uint32_t > m_TraitIdList; + std::set< uint32_t > m_TraitRecastIdList; + std::set< uint32_t > m_TraitTransientIdList; + std::set< uint32_t > m_TransformationIdList; + std::set< uint32_t > m_TreasureIdList; + std::set< uint32_t > m_TreasureHuntRankIdList; + std::set< uint32_t > m_TribeIdList; + std::set< uint32_t > m_TripleTriadIdList; + std::set< uint32_t > m_TripleTriadCardIdList; + std::set< uint32_t > m_TripleTriadCardRarityIdList; + std::set< uint32_t > m_TripleTriadCardResidentIdList; + std::set< uint32_t > m_TripleTriadCardTypeIdList; + std::set< uint32_t > m_TripleTriadCompetitionIdList; + std::set< uint32_t > m_TripleTriadRuleIdList; + std::set< uint32_t > m_TutorialIdList; + std::set< uint32_t > m_TutorialDPSIdList; + std::set< uint32_t > m_TutorialHealerIdList; + std::set< uint32_t > m_TutorialTankIdList; + std::set< uint32_t > m_VaseFlowerIdList; + std::set< uint32_t > m_VFXIdList; + std::set< uint32_t > m_WarpIdList; + std::set< uint32_t > m_WarpConditionIdList; + std::set< uint32_t > m_WeatherIdList; + std::set< uint32_t > m_WeatherGroupIdList; + std::set< uint32_t > m_WeatherRateIdList; + std::set< uint32_t > m_WeddingBGMIdList; + std::set< uint32_t > m_WeeklyBingoOrderDataIdList; + std::set< uint32_t > m_WeeklyBingoRewardDataIdList; + std::set< uint32_t > m_WeeklyBingoTextIdList; + std::set< uint32_t > m_WorldIdList; + std::set< uint32_t > m_WorldDCGroupTypeIdList; + std::set< uint32_t > m_YKWIdList; + std::set< uint32_t > m_ZoneSharedGroupIdList; -const std::set< uint32_t >& getAchievementIdList() -{ - if( m_AchievementIdList.size() == 0 ) + const std::set< uint32_t >& getAchievementIdList() + { + if( m_AchievementIdList.size() == 0 ) loadIdList( m_AchievementDat, m_AchievementIdList ); - return m_AchievementIdList; -} -const std::set< uint32_t >& getAchievementCategoryIdList() -{ - if( m_AchievementCategoryIdList.size() == 0 ) + return m_AchievementIdList; + } + + const std::set< uint32_t >& getAchievementCategoryIdList() + { + if( m_AchievementCategoryIdList.size() == 0 ) loadIdList( m_AchievementCategoryDat, m_AchievementCategoryIdList ); - return m_AchievementCategoryIdList; -} -const std::set< uint32_t >& getAchievementKindIdList() -{ - if( m_AchievementKindIdList.size() == 0 ) + return m_AchievementCategoryIdList; + } + + const std::set< uint32_t >& getAchievementKindIdList() + { + if( m_AchievementKindIdList.size() == 0 ) loadIdList( m_AchievementKindDat, m_AchievementKindIdList ); - return m_AchievementKindIdList; -} -const std::set< uint32_t >& getActionIdList() -{ - if( m_ActionIdList.size() == 0 ) + return m_AchievementKindIdList; + } + + const std::set< uint32_t >& getActionIdList() + { + if( m_ActionIdList.size() == 0 ) loadIdList( m_ActionDat, m_ActionIdList ); - return m_ActionIdList; -} -const std::set< uint32_t >& getActionCastTimelineIdList() -{ - if( m_ActionCastTimelineIdList.size() == 0 ) + return m_ActionIdList; + } + + const std::set< uint32_t >& getActionCastTimelineIdList() + { + if( m_ActionCastTimelineIdList.size() == 0 ) loadIdList( m_ActionCastTimelineDat, m_ActionCastTimelineIdList ); - return m_ActionCastTimelineIdList; -} -const std::set< uint32_t >& getActionCastVFXIdList() -{ - if( m_ActionCastVFXIdList.size() == 0 ) + return m_ActionCastTimelineIdList; + } + + const std::set< uint32_t >& getActionCastVFXIdList() + { + if( m_ActionCastVFXIdList.size() == 0 ) loadIdList( m_ActionCastVFXDat, m_ActionCastVFXIdList ); - return m_ActionCastVFXIdList; -} -const std::set< uint32_t >& getActionCategoryIdList() -{ - if( m_ActionCategoryIdList.size() == 0 ) + return m_ActionCastVFXIdList; + } + + const std::set< uint32_t >& getActionCategoryIdList() + { + if( m_ActionCategoryIdList.size() == 0 ) loadIdList( m_ActionCategoryDat, m_ActionCategoryIdList ); - return m_ActionCategoryIdList; -} -const std::set< uint32_t >& getActionComboRouteIdList() -{ - if( m_ActionComboRouteIdList.size() == 0 ) + return m_ActionCategoryIdList; + } + + const std::set< uint32_t >& getActionComboRouteIdList() + { + if( m_ActionComboRouteIdList.size() == 0 ) loadIdList( m_ActionComboRouteDat, m_ActionComboRouteIdList ); - return m_ActionComboRouteIdList; -} -const std::set< uint32_t >& getActionIndirectionIdList() -{ - if( m_ActionIndirectionIdList.size() == 0 ) + return m_ActionComboRouteIdList; + } + + const std::set< uint32_t >& getActionIndirectionIdList() + { + if( m_ActionIndirectionIdList.size() == 0 ) loadIdList( m_ActionIndirectionDat, m_ActionIndirectionIdList ); - return m_ActionIndirectionIdList; -} -const std::set< uint32_t >& getActionParamIdList() -{ - if( m_ActionParamIdList.size() == 0 ) + return m_ActionIndirectionIdList; + } + + const std::set< uint32_t >& getActionParamIdList() + { + if( m_ActionParamIdList.size() == 0 ) loadIdList( m_ActionParamDat, m_ActionParamIdList ); - return m_ActionParamIdList; -} -const std::set< uint32_t >& getActionProcStatusIdList() -{ - if( m_ActionProcStatusIdList.size() == 0 ) + return m_ActionParamIdList; + } + + const std::set< uint32_t >& getActionProcStatusIdList() + { + if( m_ActionProcStatusIdList.size() == 0 ) loadIdList( m_ActionProcStatusDat, m_ActionProcStatusIdList ); - return m_ActionProcStatusIdList; -} -const std::set< uint32_t >& getActionTimelineIdList() -{ - if( m_ActionTimelineIdList.size() == 0 ) + return m_ActionProcStatusIdList; + } + + const std::set< uint32_t >& getActionTimelineIdList() + { + if( m_ActionTimelineIdList.size() == 0 ) loadIdList( m_ActionTimelineDat, m_ActionTimelineIdList ); - return m_ActionTimelineIdList; -} -const std::set< uint32_t >& getActionTimelineReplaceIdList() -{ - if( m_ActionTimelineReplaceIdList.size() == 0 ) + return m_ActionTimelineIdList; + } + + const std::set< uint32_t >& getActionTimelineReplaceIdList() + { + if( m_ActionTimelineReplaceIdList.size() == 0 ) loadIdList( m_ActionTimelineReplaceDat, m_ActionTimelineReplaceIdList ); - return m_ActionTimelineReplaceIdList; -} -const std::set< uint32_t >& getActionTransientIdList() -{ - if( m_ActionTransientIdList.size() == 0 ) + return m_ActionTimelineReplaceIdList; + } + + const std::set< uint32_t >& getActionTransientIdList() + { + if( m_ActionTransientIdList.size() == 0 ) loadIdList( m_ActionTransientDat, m_ActionTransientIdList ); - return m_ActionTransientIdList; -} -const std::set< uint32_t >& getAddonIdList() -{ - if( m_AddonIdList.size() == 0 ) + return m_ActionTransientIdList; + } + + const std::set< uint32_t >& getAddonIdList() + { + if( m_AddonIdList.size() == 0 ) loadIdList( m_AddonDat, m_AddonIdList ); - return m_AddonIdList; -} -const std::set< uint32_t >& getAdventureIdList() -{ - if( m_AdventureIdList.size() == 0 ) + return m_AddonIdList; + } + + const std::set< uint32_t >& getAdventureIdList() + { + if( m_AdventureIdList.size() == 0 ) loadIdList( m_AdventureDat, m_AdventureIdList ); - return m_AdventureIdList; -} -const std::set< uint32_t >& getAdventureExPhaseIdList() -{ - if( m_AdventureExPhaseIdList.size() == 0 ) + return m_AdventureIdList; + } + + const std::set< uint32_t >& getAdventureExPhaseIdList() + { + if( m_AdventureExPhaseIdList.size() == 0 ) loadIdList( m_AdventureExPhaseDat, m_AdventureExPhaseIdList ); - return m_AdventureExPhaseIdList; -} -const std::set< uint32_t >& getAetherCurrentIdList() -{ - if( m_AetherCurrentIdList.size() == 0 ) + return m_AdventureExPhaseIdList; + } + + const std::set< uint32_t >& getAetherCurrentIdList() + { + if( m_AetherCurrentIdList.size() == 0 ) loadIdList( m_AetherCurrentDat, m_AetherCurrentIdList ); - return m_AetherCurrentIdList; -} -const std::set< uint32_t >& getAetherCurrentCompFlgSetIdList() -{ - if( m_AetherCurrentCompFlgSetIdList.size() == 0 ) + return m_AetherCurrentIdList; + } + + const std::set< uint32_t >& getAetherCurrentCompFlgSetIdList() + { + if( m_AetherCurrentCompFlgSetIdList.size() == 0 ) loadIdList( m_AetherCurrentCompFlgSetDat, m_AetherCurrentCompFlgSetIdList ); - return m_AetherCurrentCompFlgSetIdList; -} -const std::set< uint32_t >& getAetherialWheelIdList() -{ - if( m_AetherialWheelIdList.size() == 0 ) + return m_AetherCurrentCompFlgSetIdList; + } + + const std::set< uint32_t >& getAetherialWheelIdList() + { + if( m_AetherialWheelIdList.size() == 0 ) loadIdList( m_AetherialWheelDat, m_AetherialWheelIdList ); - return m_AetherialWheelIdList; -} -const std::set< uint32_t >& getAetheryteIdList() -{ - if( m_AetheryteIdList.size() == 0 ) + return m_AetherialWheelIdList; + } + + const std::set< uint32_t >& getAetheryteIdList() + { + if( m_AetheryteIdList.size() == 0 ) loadIdList( m_AetheryteDat, m_AetheryteIdList ); - return m_AetheryteIdList; -} -const std::set< uint32_t >& getAirshipExplorationLevelIdList() -{ - if( m_AirshipExplorationLevelIdList.size() == 0 ) + return m_AetheryteIdList; + } + + const std::set< uint32_t >& getAirshipExplorationLevelIdList() + { + if( m_AirshipExplorationLevelIdList.size() == 0 ) loadIdList( m_AirshipExplorationLevelDat, m_AirshipExplorationLevelIdList ); - return m_AirshipExplorationLevelIdList; -} -const std::set< uint32_t >& getAirshipExplorationLogIdList() -{ - if( m_AirshipExplorationLogIdList.size() == 0 ) + return m_AirshipExplorationLevelIdList; + } + + const std::set< uint32_t >& getAirshipExplorationLogIdList() + { + if( m_AirshipExplorationLogIdList.size() == 0 ) loadIdList( m_AirshipExplorationLogDat, m_AirshipExplorationLogIdList ); - return m_AirshipExplorationLogIdList; -} -const std::set< uint32_t >& getAirshipExplorationParamTypeIdList() -{ - if( m_AirshipExplorationParamTypeIdList.size() == 0 ) + return m_AirshipExplorationLogIdList; + } + + const std::set< uint32_t >& getAirshipExplorationParamTypeIdList() + { + if( m_AirshipExplorationParamTypeIdList.size() == 0 ) loadIdList( m_AirshipExplorationParamTypeDat, m_AirshipExplorationParamTypeIdList ); - return m_AirshipExplorationParamTypeIdList; -} -const std::set< uint32_t >& getAirshipExplorationPartIdList() -{ - if( m_AirshipExplorationPartIdList.size() == 0 ) + return m_AirshipExplorationParamTypeIdList; + } + + const std::set< uint32_t >& getAirshipExplorationPartIdList() + { + if( m_AirshipExplorationPartIdList.size() == 0 ) loadIdList( m_AirshipExplorationPartDat, m_AirshipExplorationPartIdList ); - return m_AirshipExplorationPartIdList; -} -const std::set< uint32_t >& getAirshipExplorationPointIdList() -{ - if( m_AirshipExplorationPointIdList.size() == 0 ) + return m_AirshipExplorationPartIdList; + } + + const std::set< uint32_t >& getAirshipExplorationPointIdList() + { + if( m_AirshipExplorationPointIdList.size() == 0 ) loadIdList( m_AirshipExplorationPointDat, m_AirshipExplorationPointIdList ); - return m_AirshipExplorationPointIdList; -} -const std::set< uint32_t >& getAnimaWeapon5IdList() -{ - if( m_AnimaWeapon5IdList.size() == 0 ) + return m_AirshipExplorationPointIdList; + } + + const std::set< uint32_t >& getAnimaWeapon5IdList() + { + if( m_AnimaWeapon5IdList.size() == 0 ) loadIdList( m_AnimaWeapon5Dat, m_AnimaWeapon5IdList ); - return m_AnimaWeapon5IdList; -} -const std::set< uint32_t >& getAnimaWeapon5ParamIdList() -{ - if( m_AnimaWeapon5ParamIdList.size() == 0 ) + return m_AnimaWeapon5IdList; + } + + const std::set< uint32_t >& getAnimaWeapon5ParamIdList() + { + if( m_AnimaWeapon5ParamIdList.size() == 0 ) loadIdList( m_AnimaWeapon5ParamDat, m_AnimaWeapon5ParamIdList ); - return m_AnimaWeapon5ParamIdList; -} -const std::set< uint32_t >& getAnimaWeapon5PatternGroupIdList() -{ - if( m_AnimaWeapon5PatternGroupIdList.size() == 0 ) + return m_AnimaWeapon5ParamIdList; + } + + const std::set< uint32_t >& getAnimaWeapon5PatternGroupIdList() + { + if( m_AnimaWeapon5PatternGroupIdList.size() == 0 ) loadIdList( m_AnimaWeapon5PatternGroupDat, m_AnimaWeapon5PatternGroupIdList ); - return m_AnimaWeapon5PatternGroupIdList; -} -const std::set< uint32_t >& getAnimaWeapon5SpiritTalkIdList() -{ - if( m_AnimaWeapon5SpiritTalkIdList.size() == 0 ) + return m_AnimaWeapon5PatternGroupIdList; + } + + const std::set< uint32_t >& getAnimaWeapon5SpiritTalkIdList() + { + if( m_AnimaWeapon5SpiritTalkIdList.size() == 0 ) loadIdList( m_AnimaWeapon5SpiritTalkDat, m_AnimaWeapon5SpiritTalkIdList ); - return m_AnimaWeapon5SpiritTalkIdList; -} -const std::set< uint32_t >& getAnimaWeapon5SpiritTalkParamIdList() -{ - if( m_AnimaWeapon5SpiritTalkParamIdList.size() == 0 ) + return m_AnimaWeapon5SpiritTalkIdList; + } + + const std::set< uint32_t >& getAnimaWeapon5SpiritTalkParamIdList() + { + if( m_AnimaWeapon5SpiritTalkParamIdList.size() == 0 ) loadIdList( m_AnimaWeapon5SpiritTalkParamDat, m_AnimaWeapon5SpiritTalkParamIdList ); - return m_AnimaWeapon5SpiritTalkParamIdList; -} -const std::set< uint32_t >& getAnimaWeapon5TradeItemIdList() -{ - if( m_AnimaWeapon5TradeItemIdList.size() == 0 ) + return m_AnimaWeapon5SpiritTalkParamIdList; + } + + const std::set< uint32_t >& getAnimaWeapon5TradeItemIdList() + { + if( m_AnimaWeapon5TradeItemIdList.size() == 0 ) loadIdList( m_AnimaWeapon5TradeItemDat, m_AnimaWeapon5TradeItemIdList ); - return m_AnimaWeapon5TradeItemIdList; -} -const std::set< uint32_t >& getAnimaWeaponFUITalkIdList() -{ - if( m_AnimaWeaponFUITalkIdList.size() == 0 ) + return m_AnimaWeapon5TradeItemIdList; + } + + const std::set< uint32_t >& getAnimaWeaponFUITalkIdList() + { + if( m_AnimaWeaponFUITalkIdList.size() == 0 ) loadIdList( m_AnimaWeaponFUITalkDat, m_AnimaWeaponFUITalkIdList ); - return m_AnimaWeaponFUITalkIdList; -} -const std::set< uint32_t >& getAnimaWeaponFUITalkParamIdList() -{ - if( m_AnimaWeaponFUITalkParamIdList.size() == 0 ) + return m_AnimaWeaponFUITalkIdList; + } + + const std::set< uint32_t >& getAnimaWeaponFUITalkParamIdList() + { + if( m_AnimaWeaponFUITalkParamIdList.size() == 0 ) loadIdList( m_AnimaWeaponFUITalkParamDat, m_AnimaWeaponFUITalkParamIdList ); - return m_AnimaWeaponFUITalkParamIdList; -} -const std::set< uint32_t >& getAnimaWeaponIconIdList() -{ - if( m_AnimaWeaponIconIdList.size() == 0 ) + return m_AnimaWeaponFUITalkParamIdList; + } + + const std::set< uint32_t >& getAnimaWeaponIconIdList() + { + if( m_AnimaWeaponIconIdList.size() == 0 ) loadIdList( m_AnimaWeaponIconDat, m_AnimaWeaponIconIdList ); - return m_AnimaWeaponIconIdList; -} -const std::set< uint32_t >& getAnimaWeaponItemIdList() -{ - if( m_AnimaWeaponItemIdList.size() == 0 ) + return m_AnimaWeaponIconIdList; + } + + const std::set< uint32_t >& getAnimaWeaponItemIdList() + { + if( m_AnimaWeaponItemIdList.size() == 0 ) loadIdList( m_AnimaWeaponItemDat, m_AnimaWeaponItemIdList ); - return m_AnimaWeaponItemIdList; -} -const std::set< uint32_t >& getAquariumFishIdList() -{ - if( m_AquariumFishIdList.size() == 0 ) + return m_AnimaWeaponItemIdList; + } + + const std::set< uint32_t >& getAquariumFishIdList() + { + if( m_AquariumFishIdList.size() == 0 ) loadIdList( m_AquariumFishDat, m_AquariumFishIdList ); - return m_AquariumFishIdList; -} -const std::set< uint32_t >& getAquariumWaterIdList() -{ - if( m_AquariumWaterIdList.size() == 0 ) + return m_AquariumFishIdList; + } + + const std::set< uint32_t >& getAquariumWaterIdList() + { + if( m_AquariumWaterIdList.size() == 0 ) loadIdList( m_AquariumWaterDat, m_AquariumWaterIdList ); - return m_AquariumWaterIdList; -} -const std::set< uint32_t >& getAttackTypeIdList() -{ - if( m_AttackTypeIdList.size() == 0 ) + return m_AquariumWaterIdList; + } + + const std::set< uint32_t >& getAttackTypeIdList() + { + if( m_AttackTypeIdList.size() == 0 ) loadIdList( m_AttackTypeDat, m_AttackTypeIdList ); - return m_AttackTypeIdList; -} -const std::set< uint32_t >& getBalloonIdList() -{ - if( m_BalloonIdList.size() == 0 ) + return m_AttackTypeIdList; + } + + const std::set< uint32_t >& getBalloonIdList() + { + if( m_BalloonIdList.size() == 0 ) loadIdList( m_BalloonDat, m_BalloonIdList ); - return m_BalloonIdList; -} -const std::set< uint32_t >& getBaseParamIdList() -{ - if( m_BaseParamIdList.size() == 0 ) + return m_BalloonIdList; + } + + const std::set< uint32_t >& getBaseParamIdList() + { + if( m_BaseParamIdList.size() == 0 ) loadIdList( m_BaseParamDat, m_BaseParamIdList ); - return m_BaseParamIdList; -} -const std::set< uint32_t >& getBattleLeveIdList() -{ - if( m_BattleLeveIdList.size() == 0 ) + return m_BaseParamIdList; + } + + const std::set< uint32_t >& getBattleLeveIdList() + { + if( m_BattleLeveIdList.size() == 0 ) loadIdList( m_BattleLeveDat, m_BattleLeveIdList ); - return m_BattleLeveIdList; -} -const std::set< uint32_t >& getBeastRankBonusIdList() -{ - if( m_BeastRankBonusIdList.size() == 0 ) + return m_BattleLeveIdList; + } + + const std::set< uint32_t >& getBeastRankBonusIdList() + { + if( m_BeastRankBonusIdList.size() == 0 ) loadIdList( m_BeastRankBonusDat, m_BeastRankBonusIdList ); - return m_BeastRankBonusIdList; -} -const std::set< uint32_t >& getBeastReputationRankIdList() -{ - if( m_BeastReputationRankIdList.size() == 0 ) + return m_BeastRankBonusIdList; + } + + const std::set< uint32_t >& getBeastReputationRankIdList() + { + if( m_BeastReputationRankIdList.size() == 0 ) loadIdList( m_BeastReputationRankDat, m_BeastReputationRankIdList ); - return m_BeastReputationRankIdList; -} -const std::set< uint32_t >& getBeastTribeIdList() -{ - if( m_BeastTribeIdList.size() == 0 ) + return m_BeastReputationRankIdList; + } + + const std::set< uint32_t >& getBeastTribeIdList() + { + if( m_BeastTribeIdList.size() == 0 ) loadIdList( m_BeastTribeDat, m_BeastTribeIdList ); - return m_BeastTribeIdList; -} -const std::set< uint32_t >& getBehaviorIdList() -{ - if( m_BehaviorIdList.size() == 0 ) + return m_BeastTribeIdList; + } + + const std::set< uint32_t >& getBehaviorIdList() + { + if( m_BehaviorIdList.size() == 0 ) loadIdList( m_BehaviorDat, m_BehaviorIdList ); - return m_BehaviorIdList; -} -const std::set< uint32_t >& getBGMIdList() -{ - if( m_BGMIdList.size() == 0 ) + return m_BehaviorIdList; + } + + const std::set< uint32_t >& getBGMIdList() + { + if( m_BGMIdList.size() == 0 ) loadIdList( m_BGMDat, m_BGMIdList ); - return m_BGMIdList; -} -const std::set< uint32_t >& getBNpcAnnounceIconIdList() -{ - if( m_BNpcAnnounceIconIdList.size() == 0 ) + return m_BGMIdList; + } + + const std::set< uint32_t >& getBNpcAnnounceIconIdList() + { + if( m_BNpcAnnounceIconIdList.size() == 0 ) loadIdList( m_BNpcAnnounceIconDat, m_BNpcAnnounceIconIdList ); - return m_BNpcAnnounceIconIdList; -} -const std::set< uint32_t >& getBNpcBaseIdList() -{ - if( m_BNpcBaseIdList.size() == 0 ) + return m_BNpcAnnounceIconIdList; + } + + const std::set< uint32_t >& getBNpcBaseIdList() + { + if( m_BNpcBaseIdList.size() == 0 ) loadIdList( m_BNpcBaseDat, m_BNpcBaseIdList ); - return m_BNpcBaseIdList; -} -const std::set< uint32_t >& getBNpcCustomizeIdList() -{ - if( m_BNpcCustomizeIdList.size() == 0 ) + return m_BNpcBaseIdList; + } + + const std::set< uint32_t >& getBNpcCustomizeIdList() + { + if( m_BNpcCustomizeIdList.size() == 0 ) loadIdList( m_BNpcCustomizeDat, m_BNpcCustomizeIdList ); - return m_BNpcCustomizeIdList; -} -const std::set< uint32_t >& getBNpcNameIdList() -{ - if( m_BNpcNameIdList.size() == 0 ) + return m_BNpcCustomizeIdList; + } + + const std::set< uint32_t >& getBNpcNameIdList() + { + if( m_BNpcNameIdList.size() == 0 ) loadIdList( m_BNpcNameDat, m_BNpcNameIdList ); - return m_BNpcNameIdList; -} -const std::set< uint32_t >& getBuddyIdList() -{ - if( m_BuddyIdList.size() == 0 ) + return m_BNpcNameIdList; + } + + const std::set< uint32_t >& getBuddyIdList() + { + if( m_BuddyIdList.size() == 0 ) loadIdList( m_BuddyDat, m_BuddyIdList ); - return m_BuddyIdList; -} -const std::set< uint32_t >& getBuddyActionIdList() -{ - if( m_BuddyActionIdList.size() == 0 ) + return m_BuddyIdList; + } + + const std::set< uint32_t >& getBuddyActionIdList() + { + if( m_BuddyActionIdList.size() == 0 ) loadIdList( m_BuddyActionDat, m_BuddyActionIdList ); - return m_BuddyActionIdList; -} -const std::set< uint32_t >& getBuddyEquipIdList() -{ - if( m_BuddyEquipIdList.size() == 0 ) + return m_BuddyActionIdList; + } + + const std::set< uint32_t >& getBuddyEquipIdList() + { + if( m_BuddyEquipIdList.size() == 0 ) loadIdList( m_BuddyEquipDat, m_BuddyEquipIdList ); - return m_BuddyEquipIdList; -} -const std::set< uint32_t >& getBuddyItemIdList() -{ - if( m_BuddyItemIdList.size() == 0 ) + return m_BuddyEquipIdList; + } + + const std::set< uint32_t >& getBuddyItemIdList() + { + if( m_BuddyItemIdList.size() == 0 ) loadIdList( m_BuddyItemDat, m_BuddyItemIdList ); - return m_BuddyItemIdList; -} -const std::set< uint32_t >& getBuddyRankIdList() -{ - if( m_BuddyRankIdList.size() == 0 ) + return m_BuddyItemIdList; + } + + const std::set< uint32_t >& getBuddyRankIdList() + { + if( m_BuddyRankIdList.size() == 0 ) loadIdList( m_BuddyRankDat, m_BuddyRankIdList ); - return m_BuddyRankIdList; -} -const std::set< uint32_t >& getBuddySkillIdList() -{ - if( m_BuddySkillIdList.size() == 0 ) + return m_BuddyRankIdList; + } + + const std::set< uint32_t >& getBuddySkillIdList() + { + if( m_BuddySkillIdList.size() == 0 ) loadIdList( m_BuddySkillDat, m_BuddySkillIdList ); - return m_BuddySkillIdList; -} -const std::set< uint32_t >& getCabinetIdList() -{ - if( m_CabinetIdList.size() == 0 ) + return m_BuddySkillIdList; + } + + const std::set< uint32_t >& getCabinetIdList() + { + if( m_CabinetIdList.size() == 0 ) loadIdList( m_CabinetDat, m_CabinetIdList ); - return m_CabinetIdList; -} -const std::set< uint32_t >& getCabinetCategoryIdList() -{ - if( m_CabinetCategoryIdList.size() == 0 ) + return m_CabinetIdList; + } + + const std::set< uint32_t >& getCabinetCategoryIdList() + { + if( m_CabinetCategoryIdList.size() == 0 ) loadIdList( m_CabinetCategoryDat, m_CabinetCategoryIdList ); - return m_CabinetCategoryIdList; -} -const std::set< uint32_t >& getCalendarIdList() -{ - if( m_CalendarIdList.size() == 0 ) + return m_CabinetCategoryIdList; + } + + const std::set< uint32_t >& getCalendarIdList() + { + if( m_CalendarIdList.size() == 0 ) loadIdList( m_CalendarDat, m_CalendarIdList ); - return m_CalendarIdList; -} -const std::set< uint32_t >& getCharaMakeCustomizeIdList() -{ - if( m_CharaMakeCustomizeIdList.size() == 0 ) + return m_CalendarIdList; + } + + const std::set< uint32_t >& getCharaMakeCustomizeIdList() + { + if( m_CharaMakeCustomizeIdList.size() == 0 ) loadIdList( m_CharaMakeCustomizeDat, m_CharaMakeCustomizeIdList ); - return m_CharaMakeCustomizeIdList; -} -const std::set< uint32_t >& getCharaMakeTypeIdList() -{ - if( m_CharaMakeTypeIdList.size() == 0 ) + return m_CharaMakeCustomizeIdList; + } + + const std::set< uint32_t >& getCharaMakeTypeIdList() + { + if( m_CharaMakeTypeIdList.size() == 0 ) loadIdList( m_CharaMakeTypeDat, m_CharaMakeTypeIdList ); - return m_CharaMakeTypeIdList; -} -const std::set< uint32_t >& getChocoboRaceIdList() -{ - if( m_ChocoboRaceIdList.size() == 0 ) + return m_CharaMakeTypeIdList; + } + + const std::set< uint32_t >& getChocoboRaceIdList() + { + if( m_ChocoboRaceIdList.size() == 0 ) loadIdList( m_ChocoboRaceDat, m_ChocoboRaceIdList ); - return m_ChocoboRaceIdList; -} -const std::set< uint32_t >& getChocoboRaceAbilityIdList() -{ - if( m_ChocoboRaceAbilityIdList.size() == 0 ) + return m_ChocoboRaceIdList; + } + + const std::set< uint32_t >& getChocoboRaceAbilityIdList() + { + if( m_ChocoboRaceAbilityIdList.size() == 0 ) loadIdList( m_ChocoboRaceAbilityDat, m_ChocoboRaceAbilityIdList ); - return m_ChocoboRaceAbilityIdList; -} -const std::set< uint32_t >& getChocoboRaceAbilityTypeIdList() -{ - if( m_ChocoboRaceAbilityTypeIdList.size() == 0 ) + return m_ChocoboRaceAbilityIdList; + } + + const std::set< uint32_t >& getChocoboRaceAbilityTypeIdList() + { + if( m_ChocoboRaceAbilityTypeIdList.size() == 0 ) loadIdList( m_ChocoboRaceAbilityTypeDat, m_ChocoboRaceAbilityTypeIdList ); - return m_ChocoboRaceAbilityTypeIdList; -} -const std::set< uint32_t >& getChocoboRaceItemIdList() -{ - if( m_ChocoboRaceItemIdList.size() == 0 ) + return m_ChocoboRaceAbilityTypeIdList; + } + + const std::set< uint32_t >& getChocoboRaceItemIdList() + { + if( m_ChocoboRaceItemIdList.size() == 0 ) loadIdList( m_ChocoboRaceItemDat, m_ChocoboRaceItemIdList ); - return m_ChocoboRaceItemIdList; -} -const std::set< uint32_t >& getChocoboRaceRankIdList() -{ - if( m_ChocoboRaceRankIdList.size() == 0 ) + return m_ChocoboRaceItemIdList; + } + + const std::set< uint32_t >& getChocoboRaceRankIdList() + { + if( m_ChocoboRaceRankIdList.size() == 0 ) loadIdList( m_ChocoboRaceRankDat, m_ChocoboRaceRankIdList ); - return m_ChocoboRaceRankIdList; -} -const std::set< uint32_t >& getChocoboRaceStatusIdList() -{ - if( m_ChocoboRaceStatusIdList.size() == 0 ) + return m_ChocoboRaceRankIdList; + } + + const std::set< uint32_t >& getChocoboRaceStatusIdList() + { + if( m_ChocoboRaceStatusIdList.size() == 0 ) loadIdList( m_ChocoboRaceStatusDat, m_ChocoboRaceStatusIdList ); - return m_ChocoboRaceStatusIdList; -} -const std::set< uint32_t >& getChocoboRaceTerritoryIdList() -{ - if( m_ChocoboRaceTerritoryIdList.size() == 0 ) + return m_ChocoboRaceStatusIdList; + } + + const std::set< uint32_t >& getChocoboRaceTerritoryIdList() + { + if( m_ChocoboRaceTerritoryIdList.size() == 0 ) loadIdList( m_ChocoboRaceTerritoryDat, m_ChocoboRaceTerritoryIdList ); - return m_ChocoboRaceTerritoryIdList; -} -const std::set< uint32_t >& getChocoboTaxiIdList() -{ - if( m_ChocoboTaxiIdList.size() == 0 ) + return m_ChocoboRaceTerritoryIdList; + } + + const std::set< uint32_t >& getChocoboTaxiIdList() + { + if( m_ChocoboTaxiIdList.size() == 0 ) loadIdList( m_ChocoboTaxiDat, m_ChocoboTaxiIdList ); - return m_ChocoboTaxiIdList; -} -const std::set< uint32_t >& getChocoboTaxiStandIdList() -{ - if( m_ChocoboTaxiStandIdList.size() == 0 ) + return m_ChocoboTaxiIdList; + } + + const std::set< uint32_t >& getChocoboTaxiStandIdList() + { + if( m_ChocoboTaxiStandIdList.size() == 0 ) loadIdList( m_ChocoboTaxiStandDat, m_ChocoboTaxiStandIdList ); - return m_ChocoboTaxiStandIdList; -} -const std::set< uint32_t >& getClassJobIdList() -{ - if( m_ClassJobIdList.size() == 0 ) + return m_ChocoboTaxiStandIdList; + } + + const std::set< uint32_t >& getClassJobIdList() + { + if( m_ClassJobIdList.size() == 0 ) loadIdList( m_ClassJobDat, m_ClassJobIdList ); - return m_ClassJobIdList; -} -const std::set< uint32_t >& getClassJobCategoryIdList() -{ - if( m_ClassJobCategoryIdList.size() == 0 ) + return m_ClassJobIdList; + } + + const std::set< uint32_t >& getClassJobCategoryIdList() + { + if( m_ClassJobCategoryIdList.size() == 0 ) loadIdList( m_ClassJobCategoryDat, m_ClassJobCategoryIdList ); - return m_ClassJobCategoryIdList; -} -const std::set< uint32_t >& getCompanionIdList() -{ - if( m_CompanionIdList.size() == 0 ) + return m_ClassJobCategoryIdList; + } + + const std::set< uint32_t >& getCompanionIdList() + { + if( m_CompanionIdList.size() == 0 ) loadIdList( m_CompanionDat, m_CompanionIdList ); - return m_CompanionIdList; -} -const std::set< uint32_t >& getCompanionMoveIdList() -{ - if( m_CompanionMoveIdList.size() == 0 ) + return m_CompanionIdList; + } + + const std::set< uint32_t >& getCompanionMoveIdList() + { + if( m_CompanionMoveIdList.size() == 0 ) loadIdList( m_CompanionMoveDat, m_CompanionMoveIdList ); - return m_CompanionMoveIdList; -} -const std::set< uint32_t >& getCompanionTransientIdList() -{ - if( m_CompanionTransientIdList.size() == 0 ) + return m_CompanionMoveIdList; + } + + const std::set< uint32_t >& getCompanionTransientIdList() + { + if( m_CompanionTransientIdList.size() == 0 ) loadIdList( m_CompanionTransientDat, m_CompanionTransientIdList ); - return m_CompanionTransientIdList; -} -const std::set< uint32_t >& getCompanyActionIdList() -{ - if( m_CompanyActionIdList.size() == 0 ) + return m_CompanionTransientIdList; + } + + const std::set< uint32_t >& getCompanyActionIdList() + { + if( m_CompanyActionIdList.size() == 0 ) loadIdList( m_CompanyActionDat, m_CompanyActionIdList ); - return m_CompanyActionIdList; -} -const std::set< uint32_t >& getCompanyCraftDraftIdList() -{ - if( m_CompanyCraftDraftIdList.size() == 0 ) + return m_CompanyActionIdList; + } + + const std::set< uint32_t >& getCompanyCraftDraftIdList() + { + if( m_CompanyCraftDraftIdList.size() == 0 ) loadIdList( m_CompanyCraftDraftDat, m_CompanyCraftDraftIdList ); - return m_CompanyCraftDraftIdList; -} -const std::set< uint32_t >& getCompanyCraftDraftCategoryIdList() -{ - if( m_CompanyCraftDraftCategoryIdList.size() == 0 ) + return m_CompanyCraftDraftIdList; + } + + const std::set< uint32_t >& getCompanyCraftDraftCategoryIdList() + { + if( m_CompanyCraftDraftCategoryIdList.size() == 0 ) loadIdList( m_CompanyCraftDraftCategoryDat, m_CompanyCraftDraftCategoryIdList ); - return m_CompanyCraftDraftCategoryIdList; -} -const std::set< uint32_t >& getCompanyCraftManufactoryStateIdList() -{ - if( m_CompanyCraftManufactoryStateIdList.size() == 0 ) + return m_CompanyCraftDraftCategoryIdList; + } + + const std::set< uint32_t >& getCompanyCraftManufactoryStateIdList() + { + if( m_CompanyCraftManufactoryStateIdList.size() == 0 ) loadIdList( m_CompanyCraftManufactoryStateDat, m_CompanyCraftManufactoryStateIdList ); - return m_CompanyCraftManufactoryStateIdList; -} -const std::set< uint32_t >& getCompanyCraftPartIdList() -{ - if( m_CompanyCraftPartIdList.size() == 0 ) + return m_CompanyCraftManufactoryStateIdList; + } + + const std::set< uint32_t >& getCompanyCraftPartIdList() + { + if( m_CompanyCraftPartIdList.size() == 0 ) loadIdList( m_CompanyCraftPartDat, m_CompanyCraftPartIdList ); - return m_CompanyCraftPartIdList; -} -const std::set< uint32_t >& getCompanyCraftProcessIdList() -{ - if( m_CompanyCraftProcessIdList.size() == 0 ) + return m_CompanyCraftPartIdList; + } + + const std::set< uint32_t >& getCompanyCraftProcessIdList() + { + if( m_CompanyCraftProcessIdList.size() == 0 ) loadIdList( m_CompanyCraftProcessDat, m_CompanyCraftProcessIdList ); - return m_CompanyCraftProcessIdList; -} -const std::set< uint32_t >& getCompanyCraftSequenceIdList() -{ - if( m_CompanyCraftSequenceIdList.size() == 0 ) + return m_CompanyCraftProcessIdList; + } + + const std::set< uint32_t >& getCompanyCraftSequenceIdList() + { + if( m_CompanyCraftSequenceIdList.size() == 0 ) loadIdList( m_CompanyCraftSequenceDat, m_CompanyCraftSequenceIdList ); - return m_CompanyCraftSequenceIdList; -} -const std::set< uint32_t >& getCompanyCraftSupplyItemIdList() -{ - if( m_CompanyCraftSupplyItemIdList.size() == 0 ) + return m_CompanyCraftSequenceIdList; + } + + const std::set< uint32_t >& getCompanyCraftSupplyItemIdList() + { + if( m_CompanyCraftSupplyItemIdList.size() == 0 ) loadIdList( m_CompanyCraftSupplyItemDat, m_CompanyCraftSupplyItemIdList ); - return m_CompanyCraftSupplyItemIdList; -} -const std::set< uint32_t >& getCompanyCraftTypeIdList() -{ - if( m_CompanyCraftTypeIdList.size() == 0 ) + return m_CompanyCraftSupplyItemIdList; + } + + const std::set< uint32_t >& getCompanyCraftTypeIdList() + { + if( m_CompanyCraftTypeIdList.size() == 0 ) loadIdList( m_CompanyCraftTypeDat, m_CompanyCraftTypeIdList ); - return m_CompanyCraftTypeIdList; -} -const std::set< uint32_t >& getCompleteJournalIdList() -{ - if( m_CompleteJournalIdList.size() == 0 ) + return m_CompanyCraftTypeIdList; + } + + const std::set< uint32_t >& getCompleteJournalIdList() + { + if( m_CompleteJournalIdList.size() == 0 ) loadIdList( m_CompleteJournalDat, m_CompleteJournalIdList ); - return m_CompleteJournalIdList; -} -const std::set< uint32_t >& getCompleteJournalCategoryIdList() -{ - if( m_CompleteJournalCategoryIdList.size() == 0 ) + return m_CompleteJournalIdList; + } + + const std::set< uint32_t >& getCompleteJournalCategoryIdList() + { + if( m_CompleteJournalCategoryIdList.size() == 0 ) loadIdList( m_CompleteJournalCategoryDat, m_CompleteJournalCategoryIdList ); - return m_CompleteJournalCategoryIdList; -} -const std::set< uint32_t >& getContentExActionIdList() -{ - if( m_ContentExActionIdList.size() == 0 ) + return m_CompleteJournalCategoryIdList; + } + + const std::set< uint32_t >& getContentExActionIdList() + { + if( m_ContentExActionIdList.size() == 0 ) loadIdList( m_ContentExActionDat, m_ContentExActionIdList ); - return m_ContentExActionIdList; -} -const std::set< uint32_t >& getContentFinderConditionIdList() -{ - if( m_ContentFinderConditionIdList.size() == 0 ) + return m_ContentExActionIdList; + } + + const std::set< uint32_t >& getContentFinderConditionIdList() + { + if( m_ContentFinderConditionIdList.size() == 0 ) loadIdList( m_ContentFinderConditionDat, m_ContentFinderConditionIdList ); - return m_ContentFinderConditionIdList; -} -const std::set< uint32_t >& getContentFinderConditionTransientIdList() -{ - if( m_ContentFinderConditionTransientIdList.size() == 0 ) + return m_ContentFinderConditionIdList; + } + + const std::set< uint32_t >& getContentFinderConditionTransientIdList() + { + if( m_ContentFinderConditionTransientIdList.size() == 0 ) loadIdList( m_ContentFinderConditionTransientDat, m_ContentFinderConditionTransientIdList ); - return m_ContentFinderConditionTransientIdList; -} -const std::set< uint32_t >& getContentMemberTypeIdList() -{ - if( m_ContentMemberTypeIdList.size() == 0 ) + return m_ContentFinderConditionTransientIdList; + } + + const std::set< uint32_t >& getContentMemberTypeIdList() + { + if( m_ContentMemberTypeIdList.size() == 0 ) loadIdList( m_ContentMemberTypeDat, m_ContentMemberTypeIdList ); - return m_ContentMemberTypeIdList; -} -const std::set< uint32_t >& getContentNpcTalkIdList() -{ - if( m_ContentNpcTalkIdList.size() == 0 ) + return m_ContentMemberTypeIdList; + } + + const std::set< uint32_t >& getContentNpcTalkIdList() + { + if( m_ContentNpcTalkIdList.size() == 0 ) loadIdList( m_ContentNpcTalkDat, m_ContentNpcTalkIdList ); - return m_ContentNpcTalkIdList; -} -const std::set< uint32_t >& getContentRouletteIdList() -{ - if( m_ContentRouletteIdList.size() == 0 ) + return m_ContentNpcTalkIdList; + } + + const std::set< uint32_t >& getContentRouletteIdList() + { + if( m_ContentRouletteIdList.size() == 0 ) loadIdList( m_ContentRouletteDat, m_ContentRouletteIdList ); - return m_ContentRouletteIdList; -} -const std::set< uint32_t >& getContentsNoteIdList() -{ - if( m_ContentsNoteIdList.size() == 0 ) + return m_ContentRouletteIdList; + } + + const std::set< uint32_t >& getContentsNoteIdList() + { + if( m_ContentsNoteIdList.size() == 0 ) loadIdList( m_ContentsNoteDat, m_ContentsNoteIdList ); - return m_ContentsNoteIdList; -} -const std::set< uint32_t >& getContentsNoteCategoryIdList() -{ - if( m_ContentsNoteCategoryIdList.size() == 0 ) + return m_ContentsNoteIdList; + } + + const std::set< uint32_t >& getContentsNoteCategoryIdList() + { + if( m_ContentsNoteCategoryIdList.size() == 0 ) loadIdList( m_ContentsNoteCategoryDat, m_ContentsNoteCategoryIdList ); - return m_ContentsNoteCategoryIdList; -} -const std::set< uint32_t >& getContentTalkIdList() -{ - if( m_ContentTalkIdList.size() == 0 ) + return m_ContentsNoteCategoryIdList; + } + + const std::set< uint32_t >& getContentTalkIdList() + { + if( m_ContentTalkIdList.size() == 0 ) loadIdList( m_ContentTalkDat, m_ContentTalkIdList ); - return m_ContentTalkIdList; -} -const std::set< uint32_t >& getContentTalkParamIdList() -{ - if( m_ContentTalkParamIdList.size() == 0 ) + return m_ContentTalkIdList; + } + + const std::set< uint32_t >& getContentTalkParamIdList() + { + if( m_ContentTalkParamIdList.size() == 0 ) loadIdList( m_ContentTalkParamDat, m_ContentTalkParamIdList ); - return m_ContentTalkParamIdList; -} -const std::set< uint32_t >& getContentTypeIdList() -{ - if( m_ContentTypeIdList.size() == 0 ) + return m_ContentTalkParamIdList; + } + + const std::set< uint32_t >& getContentTypeIdList() + { + if( m_ContentTypeIdList.size() == 0 ) loadIdList( m_ContentTypeDat, m_ContentTypeIdList ); - return m_ContentTypeIdList; -} -const std::set< uint32_t >& getCraftActionIdList() -{ - if( m_CraftActionIdList.size() == 0 ) + return m_ContentTypeIdList; + } + + const std::set< uint32_t >& getCraftActionIdList() + { + if( m_CraftActionIdList.size() == 0 ) loadIdList( m_CraftActionDat, m_CraftActionIdList ); - return m_CraftActionIdList; -} -const std::set< uint32_t >& getCraftLeveIdList() -{ - if( m_CraftLeveIdList.size() == 0 ) + return m_CraftActionIdList; + } + + const std::set< uint32_t >& getCraftLeveIdList() + { + if( m_CraftLeveIdList.size() == 0 ) loadIdList( m_CraftLeveDat, m_CraftLeveIdList ); - return m_CraftLeveIdList; -} -const std::set< uint32_t >& getCraftTypeIdList() -{ - if( m_CraftTypeIdList.size() == 0 ) + return m_CraftLeveIdList; + } + + const std::set< uint32_t >& getCraftTypeIdList() + { + if( m_CraftTypeIdList.size() == 0 ) loadIdList( m_CraftTypeDat, m_CraftTypeIdList ); - return m_CraftTypeIdList; -} -const std::set< uint32_t >& getCurrencyIdList() -{ - if( m_CurrencyIdList.size() == 0 ) + return m_CraftTypeIdList; + } + + const std::set< uint32_t >& getCurrencyIdList() + { + if( m_CurrencyIdList.size() == 0 ) loadIdList( m_CurrencyDat, m_CurrencyIdList ); - return m_CurrencyIdList; -} -const std::set< uint32_t >& getCustomTalkIdList() -{ - if( m_CustomTalkIdList.size() == 0 ) + return m_CurrencyIdList; + } + + const std::set< uint32_t >& getCustomTalkIdList() + { + if( m_CustomTalkIdList.size() == 0 ) loadIdList( m_CustomTalkDat, m_CustomTalkIdList ); - return m_CustomTalkIdList; -} -const std::set< uint32_t >& getCutsceneIdList() -{ - if( m_CutsceneIdList.size() == 0 ) + return m_CustomTalkIdList; + } + + const std::set< uint32_t >& getCutsceneIdList() + { + if( m_CutsceneIdList.size() == 0 ) loadIdList( m_CutsceneDat, m_CutsceneIdList ); - return m_CutsceneIdList; -} -const std::set< uint32_t >& getCutScreenImageIdList() -{ - if( m_CutScreenImageIdList.size() == 0 ) + return m_CutsceneIdList; + } + + const std::set< uint32_t >& getCutScreenImageIdList() + { + if( m_CutScreenImageIdList.size() == 0 ) loadIdList( m_CutScreenImageDat, m_CutScreenImageIdList ); - return m_CutScreenImageIdList; -} -const std::set< uint32_t >& getDailySupplyItemIdList() -{ - if( m_DailySupplyItemIdList.size() == 0 ) + return m_CutScreenImageIdList; + } + + const std::set< uint32_t >& getDailySupplyItemIdList() + { + if( m_DailySupplyItemIdList.size() == 0 ) loadIdList( m_DailySupplyItemDat, m_DailySupplyItemIdList ); - return m_DailySupplyItemIdList; -} -const std::set< uint32_t >& getDeepDungeonBanIdList() -{ - if( m_DeepDungeonBanIdList.size() == 0 ) + return m_DailySupplyItemIdList; + } + + const std::set< uint32_t >& getDeepDungeonBanIdList() + { + if( m_DeepDungeonBanIdList.size() == 0 ) loadIdList( m_DeepDungeonBanDat, m_DeepDungeonBanIdList ); - return m_DeepDungeonBanIdList; -} -const std::set< uint32_t >& getDeepDungeonDangerIdList() -{ - if( m_DeepDungeonDangerIdList.size() == 0 ) + return m_DeepDungeonBanIdList; + } + + const std::set< uint32_t >& getDeepDungeonDangerIdList() + { + if( m_DeepDungeonDangerIdList.size() == 0 ) loadIdList( m_DeepDungeonDangerDat, m_DeepDungeonDangerIdList ); - return m_DeepDungeonDangerIdList; -} -const std::set< uint32_t >& getDeepDungeonEquipmentIdList() -{ - if( m_DeepDungeonEquipmentIdList.size() == 0 ) + return m_DeepDungeonDangerIdList; + } + + const std::set< uint32_t >& getDeepDungeonEquipmentIdList() + { + if( m_DeepDungeonEquipmentIdList.size() == 0 ) loadIdList( m_DeepDungeonEquipmentDat, m_DeepDungeonEquipmentIdList ); - return m_DeepDungeonEquipmentIdList; -} -const std::set< uint32_t >& getDeepDungeonFloorEffectUIIdList() -{ - if( m_DeepDungeonFloorEffectUIIdList.size() == 0 ) + return m_DeepDungeonEquipmentIdList; + } + + const std::set< uint32_t >& getDeepDungeonFloorEffectUIIdList() + { + if( m_DeepDungeonFloorEffectUIIdList.size() == 0 ) loadIdList( m_DeepDungeonFloorEffectUIDat, m_DeepDungeonFloorEffectUIIdList ); - return m_DeepDungeonFloorEffectUIIdList; -} -const std::set< uint32_t >& getDeepDungeonItemIdList() -{ - if( m_DeepDungeonItemIdList.size() == 0 ) + return m_DeepDungeonFloorEffectUIIdList; + } + + const std::set< uint32_t >& getDeepDungeonItemIdList() + { + if( m_DeepDungeonItemIdList.size() == 0 ) loadIdList( m_DeepDungeonItemDat, m_DeepDungeonItemIdList ); - return m_DeepDungeonItemIdList; -} -const std::set< uint32_t >& getDeepDungeonStatusIdList() -{ - if( m_DeepDungeonStatusIdList.size() == 0 ) + return m_DeepDungeonItemIdList; + } + + const std::set< uint32_t >& getDeepDungeonStatusIdList() + { + if( m_DeepDungeonStatusIdList.size() == 0 ) loadIdList( m_DeepDungeonStatusDat, m_DeepDungeonStatusIdList ); - return m_DeepDungeonStatusIdList; -} -const std::set< uint32_t >& getDefaultTalkIdList() -{ - if( m_DefaultTalkIdList.size() == 0 ) + return m_DeepDungeonStatusIdList; + } + + const std::set< uint32_t >& getDefaultTalkIdList() + { + if( m_DefaultTalkIdList.size() == 0 ) loadIdList( m_DefaultTalkDat, m_DefaultTalkIdList ); - return m_DefaultTalkIdList; -} -const std::set< uint32_t >& getDeliveryQuestIdList() -{ - if( m_DeliveryQuestIdList.size() == 0 ) + return m_DefaultTalkIdList; + } + + const std::set< uint32_t >& getDeliveryQuestIdList() + { + if( m_DeliveryQuestIdList.size() == 0 ) loadIdList( m_DeliveryQuestDat, m_DeliveryQuestIdList ); - return m_DeliveryQuestIdList; -} -const std::set< uint32_t >& getDisposalShopIdList() -{ - if( m_DisposalShopIdList.size() == 0 ) + return m_DeliveryQuestIdList; + } + + const std::set< uint32_t >& getDisposalShopIdList() + { + if( m_DisposalShopIdList.size() == 0 ) loadIdList( m_DisposalShopDat, m_DisposalShopIdList ); - return m_DisposalShopIdList; -} -const std::set< uint32_t >& getDisposalShopFilterTypeIdList() -{ - if( m_DisposalShopFilterTypeIdList.size() == 0 ) + return m_DisposalShopIdList; + } + + const std::set< uint32_t >& getDisposalShopFilterTypeIdList() + { + if( m_DisposalShopFilterTypeIdList.size() == 0 ) loadIdList( m_DisposalShopFilterTypeDat, m_DisposalShopFilterTypeIdList ); - return m_DisposalShopFilterTypeIdList; -} -const std::set< uint32_t >& getDisposalShopItemIdList() -{ - if( m_DisposalShopItemIdList.size() == 0 ) + return m_DisposalShopFilterTypeIdList; + } + + const std::set< uint32_t >& getDisposalShopItemIdList() + { + if( m_DisposalShopItemIdList.size() == 0 ) loadIdList( m_DisposalShopItemDat, m_DisposalShopItemIdList ); - return m_DisposalShopItemIdList; -} -const std::set< uint32_t >& getDpsChallengeIdList() -{ - if( m_DpsChallengeIdList.size() == 0 ) + return m_DisposalShopItemIdList; + } + + const std::set< uint32_t >& getDpsChallengeIdList() + { + if( m_DpsChallengeIdList.size() == 0 ) loadIdList( m_DpsChallengeDat, m_DpsChallengeIdList ); - return m_DpsChallengeIdList; -} -const std::set< uint32_t >& getDpsChallengeOfficerIdList() -{ - if( m_DpsChallengeOfficerIdList.size() == 0 ) + return m_DpsChallengeIdList; + } + + const std::set< uint32_t >& getDpsChallengeOfficerIdList() + { + if( m_DpsChallengeOfficerIdList.size() == 0 ) loadIdList( m_DpsChallengeOfficerDat, m_DpsChallengeOfficerIdList ); - return m_DpsChallengeOfficerIdList; -} -const std::set< uint32_t >& getDpsChallengeTransientIdList() -{ - if( m_DpsChallengeTransientIdList.size() == 0 ) + return m_DpsChallengeOfficerIdList; + } + + const std::set< uint32_t >& getDpsChallengeTransientIdList() + { + if( m_DpsChallengeTransientIdList.size() == 0 ) loadIdList( m_DpsChallengeTransientDat, m_DpsChallengeTransientIdList ); - return m_DpsChallengeTransientIdList; -} -const std::set< uint32_t >& getEmoteIdList() -{ - if( m_EmoteIdList.size() == 0 ) + return m_DpsChallengeTransientIdList; + } + + const std::set< uint32_t >& getEmoteIdList() + { + if( m_EmoteIdList.size() == 0 ) loadIdList( m_EmoteDat, m_EmoteIdList ); - return m_EmoteIdList; -} -const std::set< uint32_t >& getEmoteModeIdList() -{ - if( m_EmoteModeIdList.size() == 0 ) - loadIdList( m_EmoteModeDat, m_EmoteModeIdList ); - return m_EmoteModeIdList; -} -const std::set< uint32_t >& getEmoteCategoryIdList() -{ - if( m_EmoteCategoryIdList.size() == 0 ) + return m_EmoteIdList; + } + + const std::set< uint32_t >& getEmoteModeIdList() + { + if( m_EmoteModeIdList.size() == 0 ) + loadIdList( m_EmoteModeDat, m_EmoteModeIdList ); + return m_EmoteModeIdList; + } + + const std::set< uint32_t >& getEmoteCategoryIdList() + { + if( m_EmoteCategoryIdList.size() == 0 ) loadIdList( m_EmoteCategoryDat, m_EmoteCategoryIdList ); - return m_EmoteCategoryIdList; -} -const std::set< uint32_t >& getENpcBaseIdList() -{ - if( m_ENpcBaseIdList.size() == 0 ) + return m_EmoteCategoryIdList; + } + + const std::set< uint32_t >& getENpcBaseIdList() + { + if( m_ENpcBaseIdList.size() == 0 ) loadIdList( m_ENpcBaseDat, m_ENpcBaseIdList ); - return m_ENpcBaseIdList; -} -const std::set< uint32_t >& getENpcResidentIdList() -{ - if( m_ENpcResidentIdList.size() == 0 ) + return m_ENpcBaseIdList; + } + + const std::set< uint32_t >& getENpcResidentIdList() + { + if( m_ENpcResidentIdList.size() == 0 ) loadIdList( m_ENpcResidentDat, m_ENpcResidentIdList ); - return m_ENpcResidentIdList; -} -const std::set< uint32_t >& getEObjIdList() -{ - if( m_EObjIdList.size() == 0 ) + return m_ENpcResidentIdList; + } + + const std::set< uint32_t >& getEObjIdList() + { + if( m_EObjIdList.size() == 0 ) loadIdList( m_EObjDat, m_EObjIdList ); - return m_EObjIdList; -} -const std::set< uint32_t >& getEObjNameIdList() -{ - if( m_EObjNameIdList.size() == 0 ) + return m_EObjIdList; + } + + const std::set< uint32_t >& getEObjNameIdList() + { + if( m_EObjNameIdList.size() == 0 ) loadIdList( m_EObjNameDat, m_EObjNameIdList ); - return m_EObjNameIdList; -} -const std::set< uint32_t >& getEquipRaceCategoryIdList() -{ - if( m_EquipRaceCategoryIdList.size() == 0 ) + return m_EObjNameIdList; + } + + const std::set< uint32_t >& getEquipRaceCategoryIdList() + { + if( m_EquipRaceCategoryIdList.size() == 0 ) loadIdList( m_EquipRaceCategoryDat, m_EquipRaceCategoryIdList ); - return m_EquipRaceCategoryIdList; -} -const std::set< uint32_t >& getEquipSlotCategoryIdList() -{ - if( m_EquipSlotCategoryIdList.size() == 0 ) + return m_EquipRaceCategoryIdList; + } + + const std::set< uint32_t >& getEquipSlotCategoryIdList() + { + if( m_EquipSlotCategoryIdList.size() == 0 ) loadIdList( m_EquipSlotCategoryDat, m_EquipSlotCategoryIdList ); - return m_EquipSlotCategoryIdList; -} -const std::set< uint32_t >& getEurekaAethernetIdList() -{ - if( m_EurekaAethernetIdList.size() == 0 ) + return m_EquipSlotCategoryIdList; + } + + const std::set< uint32_t >& getEurekaAethernetIdList() + { + if( m_EurekaAethernetIdList.size() == 0 ) loadIdList( m_EurekaAethernetDat, m_EurekaAethernetIdList ); - return m_EurekaAethernetIdList; -} -const std::set< uint32_t >& getEurekaGrowDataIdList() -{ - if( m_EurekaGrowDataIdList.size() == 0 ) + return m_EurekaAethernetIdList; + } + + const std::set< uint32_t >& getEurekaGrowDataIdList() + { + if( m_EurekaGrowDataIdList.size() == 0 ) loadIdList( m_EurekaGrowDataDat, m_EurekaGrowDataIdList ); - return m_EurekaGrowDataIdList; -} -const std::set< uint32_t >& getEurekaSphereElementAdjustIdList() -{ - if( m_EurekaSphereElementAdjustIdList.size() == 0 ) + return m_EurekaGrowDataIdList; + } + + const std::set< uint32_t >& getEurekaSphereElementAdjustIdList() + { + if( m_EurekaSphereElementAdjustIdList.size() == 0 ) loadIdList( m_EurekaSphereElementAdjustDat, m_EurekaSphereElementAdjustIdList ); - return m_EurekaSphereElementAdjustIdList; -} -const std::set< uint32_t >& getEventActionIdList() -{ - if( m_EventActionIdList.size() == 0 ) + return m_EurekaSphereElementAdjustIdList; + } + + const std::set< uint32_t >& getEventActionIdList() + { + if( m_EventActionIdList.size() == 0 ) loadIdList( m_EventActionDat, m_EventActionIdList ); - return m_EventActionIdList; -} -const std::set< uint32_t >& getEventIconPriorityIdList() -{ - if( m_EventIconPriorityIdList.size() == 0 ) + return m_EventActionIdList; + } + + const std::set< uint32_t >& getEventIconPriorityIdList() + { + if( m_EventIconPriorityIdList.size() == 0 ) loadIdList( m_EventIconPriorityDat, m_EventIconPriorityIdList ); - return m_EventIconPriorityIdList; -} -const std::set< uint32_t >& getEventIconTypeIdList() -{ - if( m_EventIconTypeIdList.size() == 0 ) + return m_EventIconPriorityIdList; + } + + const std::set< uint32_t >& getEventIconTypeIdList() + { + if( m_EventIconTypeIdList.size() == 0 ) loadIdList( m_EventIconTypeDat, m_EventIconTypeIdList ); - return m_EventIconTypeIdList; -} -const std::set< uint32_t >& getEventItemIdList() -{ - if( m_EventItemIdList.size() == 0 ) + return m_EventIconTypeIdList; + } + + const std::set< uint32_t >& getEventItemIdList() + { + if( m_EventItemIdList.size() == 0 ) loadIdList( m_EventItemDat, m_EventItemIdList ); - return m_EventItemIdList; -} -const std::set< uint32_t >& getEventItemHelpIdList() -{ - if( m_EventItemHelpIdList.size() == 0 ) + return m_EventItemIdList; + } + + const std::set< uint32_t >& getEventItemHelpIdList() + { + if( m_EventItemHelpIdList.size() == 0 ) loadIdList( m_EventItemHelpDat, m_EventItemHelpIdList ); - return m_EventItemHelpIdList; -} -const std::set< uint32_t >& getExVersionIdList() -{ - if( m_ExVersionIdList.size() == 0 ) + return m_EventItemHelpIdList; + } + + const std::set< uint32_t >& getExVersionIdList() + { + if( m_ExVersionIdList.size() == 0 ) loadIdList( m_ExVersionDat, m_ExVersionIdList ); - return m_ExVersionIdList; -} -const std::set< uint32_t >& getFateIdList() -{ - if( m_FateIdList.size() == 0 ) + return m_ExVersionIdList; + } + + const std::set< uint32_t >& getFateIdList() + { + if( m_FateIdList.size() == 0 ) loadIdList( m_FateDat, m_FateIdList ); - return m_FateIdList; -} -const std::set< uint32_t >& getFCActivityIdList() -{ - if( m_FCActivityIdList.size() == 0 ) + return m_FateIdList; + } + + const std::set< uint32_t >& getFCActivityIdList() + { + if( m_FCActivityIdList.size() == 0 ) loadIdList( m_FCActivityDat, m_FCActivityIdList ); - return m_FCActivityIdList; -} -const std::set< uint32_t >& getFCActivityCategoryIdList() -{ - if( m_FCActivityCategoryIdList.size() == 0 ) + return m_FCActivityIdList; + } + + const std::set< uint32_t >& getFCActivityCategoryIdList() + { + if( m_FCActivityCategoryIdList.size() == 0 ) loadIdList( m_FCActivityCategoryDat, m_FCActivityCategoryIdList ); - return m_FCActivityCategoryIdList; -} -const std::set< uint32_t >& getFCAuthorityIdList() -{ - if( m_FCAuthorityIdList.size() == 0 ) + return m_FCActivityCategoryIdList; + } + + const std::set< uint32_t >& getFCAuthorityIdList() + { + if( m_FCAuthorityIdList.size() == 0 ) loadIdList( m_FCAuthorityDat, m_FCAuthorityIdList ); - return m_FCAuthorityIdList; -} -const std::set< uint32_t >& getFCAuthorityCategoryIdList() -{ - if( m_FCAuthorityCategoryIdList.size() == 0 ) + return m_FCAuthorityIdList; + } + + const std::set< uint32_t >& getFCAuthorityCategoryIdList() + { + if( m_FCAuthorityCategoryIdList.size() == 0 ) loadIdList( m_FCAuthorityCategoryDat, m_FCAuthorityCategoryIdList ); - return m_FCAuthorityCategoryIdList; -} -const std::set< uint32_t >& getFCChestNameIdList() -{ - if( m_FCChestNameIdList.size() == 0 ) + return m_FCAuthorityCategoryIdList; + } + + const std::set< uint32_t >& getFCChestNameIdList() + { + if( m_FCChestNameIdList.size() == 0 ) loadIdList( m_FCChestNameDat, m_FCChestNameIdList ); - return m_FCChestNameIdList; -} -const std::set< uint32_t >& getFccShopIdList() -{ - if( m_FccShopIdList.size() == 0 ) + return m_FCChestNameIdList; + } + + const std::set< uint32_t >& getFccShopIdList() + { + if( m_FccShopIdList.size() == 0 ) loadIdList( m_FccShopDat, m_FccShopIdList ); - return m_FccShopIdList; -} -const std::set< uint32_t >& getFCHierarchyIdList() -{ - if( m_FCHierarchyIdList.size() == 0 ) + return m_FccShopIdList; + } + + const std::set< uint32_t >& getFCHierarchyIdList() + { + if( m_FCHierarchyIdList.size() == 0 ) loadIdList( m_FCHierarchyDat, m_FCHierarchyIdList ); - return m_FCHierarchyIdList; -} -const std::set< uint32_t >& getFCProfileIdList() -{ - if( m_FCProfileIdList.size() == 0 ) + return m_FCHierarchyIdList; + } + + const std::set< uint32_t >& getFCProfileIdList() + { + if( m_FCProfileIdList.size() == 0 ) loadIdList( m_FCProfileDat, m_FCProfileIdList ); - return m_FCProfileIdList; -} -const std::set< uint32_t >& getFCReputationIdList() -{ - if( m_FCReputationIdList.size() == 0 ) + return m_FCProfileIdList; + } + + const std::set< uint32_t >& getFCReputationIdList() + { + if( m_FCReputationIdList.size() == 0 ) loadIdList( m_FCReputationDat, m_FCReputationIdList ); - return m_FCReputationIdList; -} -const std::set< uint32_t >& getFCRightsIdList() -{ - if( m_FCRightsIdList.size() == 0 ) + return m_FCReputationIdList; + } + + const std::set< uint32_t >& getFCRightsIdList() + { + if( m_FCRightsIdList.size() == 0 ) loadIdList( m_FCRightsDat, m_FCRightsIdList ); - return m_FCRightsIdList; -} -const std::set< uint32_t >& getFieldMarkerIdList() -{ - if( m_FieldMarkerIdList.size() == 0 ) + return m_FCRightsIdList; + } + + const std::set< uint32_t >& getFieldMarkerIdList() + { + if( m_FieldMarkerIdList.size() == 0 ) loadIdList( m_FieldMarkerDat, m_FieldMarkerIdList ); - return m_FieldMarkerIdList; -} -const std::set< uint32_t >& getFishingSpotIdList() -{ - if( m_FishingSpotIdList.size() == 0 ) + return m_FieldMarkerIdList; + } + + const std::set< uint32_t >& getFishingSpotIdList() + { + if( m_FishingSpotIdList.size() == 0 ) loadIdList( m_FishingSpotDat, m_FishingSpotIdList ); - return m_FishingSpotIdList; -} -const std::set< uint32_t >& getFishParameterIdList() -{ - if( m_FishParameterIdList.size() == 0 ) + return m_FishingSpotIdList; + } + + const std::set< uint32_t >& getFishParameterIdList() + { + if( m_FishParameterIdList.size() == 0 ) loadIdList( m_FishParameterDat, m_FishParameterIdList ); - return m_FishParameterIdList; -} -const std::set< uint32_t >& getGardeningSeedIdList() -{ - if( m_GardeningSeedIdList.size() == 0 ) + return m_FishParameterIdList; + } + + const std::set< uint32_t >& getGardeningSeedIdList() + { + if( m_GardeningSeedIdList.size() == 0 ) loadIdList( m_GardeningSeedDat, m_GardeningSeedIdList ); - return m_GardeningSeedIdList; -} -const std::set< uint32_t >& getGatheringConditionIdList() -{ - if( m_GatheringConditionIdList.size() == 0 ) + return m_GardeningSeedIdList; + } + + const std::set< uint32_t >& getGatheringConditionIdList() + { + if( m_GatheringConditionIdList.size() == 0 ) loadIdList( m_GatheringConditionDat, m_GatheringConditionIdList ); - return m_GatheringConditionIdList; -} -const std::set< uint32_t >& getGatheringExpIdList() -{ - if( m_GatheringExpIdList.size() == 0 ) + return m_GatheringConditionIdList; + } + + const std::set< uint32_t >& getGatheringExpIdList() + { + if( m_GatheringExpIdList.size() == 0 ) loadIdList( m_GatheringExpDat, m_GatheringExpIdList ); - return m_GatheringExpIdList; -} -const std::set< uint32_t >& getGatheringItemIdList() -{ - if( m_GatheringItemIdList.size() == 0 ) + return m_GatheringExpIdList; + } + + const std::set< uint32_t >& getGatheringItemIdList() + { + if( m_GatheringItemIdList.size() == 0 ) loadIdList( m_GatheringItemDat, m_GatheringItemIdList ); - return m_GatheringItemIdList; -} -const std::set< uint32_t >& getGatheringItemLevelConvertTableIdList() -{ - if( m_GatheringItemLevelConvertTableIdList.size() == 0 ) + return m_GatheringItemIdList; + } + + const std::set< uint32_t >& getGatheringItemLevelConvertTableIdList() + { + if( m_GatheringItemLevelConvertTableIdList.size() == 0 ) loadIdList( m_GatheringItemLevelConvertTableDat, m_GatheringItemLevelConvertTableIdList ); - return m_GatheringItemLevelConvertTableIdList; -} -const std::set< uint32_t >& getGatheringItemPointIdList() -{ - if( m_GatheringItemPointIdList.size() == 0 ) + return m_GatheringItemLevelConvertTableIdList; + } + + const std::set< uint32_t >& getGatheringItemPointIdList() + { + if( m_GatheringItemPointIdList.size() == 0 ) loadIdList( m_GatheringItemPointDat, m_GatheringItemPointIdList ); - return m_GatheringItemPointIdList; -} -const std::set< uint32_t >& getGatheringNotebookListIdList() -{ - if( m_GatheringNotebookListIdList.size() == 0 ) + return m_GatheringItemPointIdList; + } + + const std::set< uint32_t >& getGatheringNotebookListIdList() + { + if( m_GatheringNotebookListIdList.size() == 0 ) loadIdList( m_GatheringNotebookListDat, m_GatheringNotebookListIdList ); - return m_GatheringNotebookListIdList; -} -const std::set< uint32_t >& getGatheringPointIdList() -{ - if( m_GatheringPointIdList.size() == 0 ) + return m_GatheringNotebookListIdList; + } + + const std::set< uint32_t >& getGatheringPointIdList() + { + if( m_GatheringPointIdList.size() == 0 ) loadIdList( m_GatheringPointDat, m_GatheringPointIdList ); - return m_GatheringPointIdList; -} -const std::set< uint32_t >& getGatheringPointBaseIdList() -{ - if( m_GatheringPointBaseIdList.size() == 0 ) + return m_GatheringPointIdList; + } + + const std::set< uint32_t >& getGatheringPointBaseIdList() + { + if( m_GatheringPointBaseIdList.size() == 0 ) loadIdList( m_GatheringPointBaseDat, m_GatheringPointBaseIdList ); - return m_GatheringPointBaseIdList; -} -const std::set< uint32_t >& getGatheringPointBonusIdList() -{ - if( m_GatheringPointBonusIdList.size() == 0 ) + return m_GatheringPointBaseIdList; + } + + const std::set< uint32_t >& getGatheringPointBonusIdList() + { + if( m_GatheringPointBonusIdList.size() == 0 ) loadIdList( m_GatheringPointBonusDat, m_GatheringPointBonusIdList ); - return m_GatheringPointBonusIdList; -} -const std::set< uint32_t >& getGatheringPointBonusTypeIdList() -{ - if( m_GatheringPointBonusTypeIdList.size() == 0 ) + return m_GatheringPointBonusIdList; + } + + const std::set< uint32_t >& getGatheringPointBonusTypeIdList() + { + if( m_GatheringPointBonusTypeIdList.size() == 0 ) loadIdList( m_GatheringPointBonusTypeDat, m_GatheringPointBonusTypeIdList ); - return m_GatheringPointBonusTypeIdList; -} -const std::set< uint32_t >& getGatheringPointNameIdList() -{ - if( m_GatheringPointNameIdList.size() == 0 ) + return m_GatheringPointBonusTypeIdList; + } + + const std::set< uint32_t >& getGatheringPointNameIdList() + { + if( m_GatheringPointNameIdList.size() == 0 ) loadIdList( m_GatheringPointNameDat, m_GatheringPointNameIdList ); - return m_GatheringPointNameIdList; -} -const std::set< uint32_t >& getGatheringSubCategoryIdList() -{ - if( m_GatheringSubCategoryIdList.size() == 0 ) + return m_GatheringPointNameIdList; + } + + const std::set< uint32_t >& getGatheringSubCategoryIdList() + { + if( m_GatheringSubCategoryIdList.size() == 0 ) loadIdList( m_GatheringSubCategoryDat, m_GatheringSubCategoryIdList ); - return m_GatheringSubCategoryIdList; -} -const std::set< uint32_t >& getGatheringTypeIdList() -{ - if( m_GatheringTypeIdList.size() == 0 ) + return m_GatheringSubCategoryIdList; + } + + const std::set< uint32_t >& getGatheringTypeIdList() + { + if( m_GatheringTypeIdList.size() == 0 ) loadIdList( m_GatheringTypeDat, m_GatheringTypeIdList ); - return m_GatheringTypeIdList; -} -const std::set< uint32_t >& getGcArmyExpeditionIdList() -{ - if( m_GcArmyExpeditionIdList.size() == 0 ) + return m_GatheringTypeIdList; + } + + const std::set< uint32_t >& getGcArmyExpeditionIdList() + { + if( m_GcArmyExpeditionIdList.size() == 0 ) loadIdList( m_GcArmyExpeditionDat, m_GcArmyExpeditionIdList ); - return m_GcArmyExpeditionIdList; -} -const std::set< uint32_t >& getGcArmyExpeditionMemberBonusIdList() -{ - if( m_GcArmyExpeditionMemberBonusIdList.size() == 0 ) + return m_GcArmyExpeditionIdList; + } + + const std::set< uint32_t >& getGcArmyExpeditionMemberBonusIdList() + { + if( m_GcArmyExpeditionMemberBonusIdList.size() == 0 ) loadIdList( m_GcArmyExpeditionMemberBonusDat, m_GcArmyExpeditionMemberBonusIdList ); - return m_GcArmyExpeditionMemberBonusIdList; -} -const std::set< uint32_t >& getGcArmyExpeditionTypeIdList() -{ - if( m_GcArmyExpeditionTypeIdList.size() == 0 ) + return m_GcArmyExpeditionMemberBonusIdList; + } + + const std::set< uint32_t >& getGcArmyExpeditionTypeIdList() + { + if( m_GcArmyExpeditionTypeIdList.size() == 0 ) loadIdList( m_GcArmyExpeditionTypeDat, m_GcArmyExpeditionTypeIdList ); - return m_GcArmyExpeditionTypeIdList; -} -const std::set< uint32_t >& getGcArmyMemberGrowIdList() -{ - if( m_GcArmyMemberGrowIdList.size() == 0 ) + return m_GcArmyExpeditionTypeIdList; + } + + const std::set< uint32_t >& getGcArmyMemberGrowIdList() + { + if( m_GcArmyMemberGrowIdList.size() == 0 ) loadIdList( m_GcArmyMemberGrowDat, m_GcArmyMemberGrowIdList ); - return m_GcArmyMemberGrowIdList; -} -const std::set< uint32_t >& getGcArmyTrainingIdList() -{ - if( m_GcArmyTrainingIdList.size() == 0 ) + return m_GcArmyMemberGrowIdList; + } + + const std::set< uint32_t >& getGcArmyTrainingIdList() + { + if( m_GcArmyTrainingIdList.size() == 0 ) loadIdList( m_GcArmyTrainingDat, m_GcArmyTrainingIdList ); - return m_GcArmyTrainingIdList; -} -const std::set< uint32_t >& getGCRankGridaniaFemaleTextIdList() -{ - if( m_GCRankGridaniaFemaleTextIdList.size() == 0 ) + return m_GcArmyTrainingIdList; + } + + const std::set< uint32_t >& getGCRankGridaniaFemaleTextIdList() + { + if( m_GCRankGridaniaFemaleTextIdList.size() == 0 ) loadIdList( m_GCRankGridaniaFemaleTextDat, m_GCRankGridaniaFemaleTextIdList ); - return m_GCRankGridaniaFemaleTextIdList; -} -const std::set< uint32_t >& getGCRankGridaniaMaleTextIdList() -{ - if( m_GCRankGridaniaMaleTextIdList.size() == 0 ) + return m_GCRankGridaniaFemaleTextIdList; + } + + const std::set< uint32_t >& getGCRankGridaniaMaleTextIdList() + { + if( m_GCRankGridaniaMaleTextIdList.size() == 0 ) loadIdList( m_GCRankGridaniaMaleTextDat, m_GCRankGridaniaMaleTextIdList ); - return m_GCRankGridaniaMaleTextIdList; -} -const std::set< uint32_t >& getGCRankLimsaFemaleTextIdList() -{ - if( m_GCRankLimsaFemaleTextIdList.size() == 0 ) + return m_GCRankGridaniaMaleTextIdList; + } + + const std::set< uint32_t >& getGCRankLimsaFemaleTextIdList() + { + if( m_GCRankLimsaFemaleTextIdList.size() == 0 ) loadIdList( m_GCRankLimsaFemaleTextDat, m_GCRankLimsaFemaleTextIdList ); - return m_GCRankLimsaFemaleTextIdList; -} -const std::set< uint32_t >& getGCRankLimsaMaleTextIdList() -{ - if( m_GCRankLimsaMaleTextIdList.size() == 0 ) + return m_GCRankLimsaFemaleTextIdList; + } + + const std::set< uint32_t >& getGCRankLimsaMaleTextIdList() + { + if( m_GCRankLimsaMaleTextIdList.size() == 0 ) loadIdList( m_GCRankLimsaMaleTextDat, m_GCRankLimsaMaleTextIdList ); - return m_GCRankLimsaMaleTextIdList; -} -const std::set< uint32_t >& getGCRankUldahFemaleTextIdList() -{ - if( m_GCRankUldahFemaleTextIdList.size() == 0 ) + return m_GCRankLimsaMaleTextIdList; + } + + const std::set< uint32_t >& getGCRankUldahFemaleTextIdList() + { + if( m_GCRankUldahFemaleTextIdList.size() == 0 ) loadIdList( m_GCRankUldahFemaleTextDat, m_GCRankUldahFemaleTextIdList ); - return m_GCRankUldahFemaleTextIdList; -} -const std::set< uint32_t >& getGCRankUldahMaleTextIdList() -{ - if( m_GCRankUldahMaleTextIdList.size() == 0 ) + return m_GCRankUldahFemaleTextIdList; + } + + const std::set< uint32_t >& getGCRankUldahMaleTextIdList() + { + if( m_GCRankUldahMaleTextIdList.size() == 0 ) loadIdList( m_GCRankUldahMaleTextDat, m_GCRankUldahMaleTextIdList ); - return m_GCRankUldahMaleTextIdList; -} -const std::set< uint32_t >& getGCScripShopCategoryIdList() -{ - if( m_GCScripShopCategoryIdList.size() == 0 ) + return m_GCRankUldahMaleTextIdList; + } + + const std::set< uint32_t >& getGCScripShopCategoryIdList() + { + if( m_GCScripShopCategoryIdList.size() == 0 ) loadIdList( m_GCScripShopCategoryDat, m_GCScripShopCategoryIdList ); - return m_GCScripShopCategoryIdList; -} -const std::set< uint32_t >& getGCScripShopItemIdList() -{ - if( m_GCScripShopItemIdList.size() == 0 ) + return m_GCScripShopCategoryIdList; + } + + const std::set< uint32_t >& getGCScripShopItemIdList() + { + if( m_GCScripShopItemIdList.size() == 0 ) loadIdList( m_GCScripShopItemDat, m_GCScripShopItemIdList ); - return m_GCScripShopItemIdList; -} -const std::set< uint32_t >& getGCShopIdList() -{ - if( m_GCShopIdList.size() == 0 ) + return m_GCScripShopItemIdList; + } + + const std::set< uint32_t >& getGCShopIdList() + { + if( m_GCShopIdList.size() == 0 ) loadIdList( m_GCShopDat, m_GCShopIdList ); - return m_GCShopIdList; -} -const std::set< uint32_t >& getGCShopItemCategoryIdList() -{ - if( m_GCShopItemCategoryIdList.size() == 0 ) + return m_GCShopIdList; + } + + const std::set< uint32_t >& getGCShopItemCategoryIdList() + { + if( m_GCShopItemCategoryIdList.size() == 0 ) loadIdList( m_GCShopItemCategoryDat, m_GCShopItemCategoryIdList ); - return m_GCShopItemCategoryIdList; -} -const std::set< uint32_t >& getGCSupplyDutyIdList() -{ - if( m_GCSupplyDutyIdList.size() == 0 ) + return m_GCShopItemCategoryIdList; + } + + const std::set< uint32_t >& getGCSupplyDutyIdList() + { + if( m_GCSupplyDutyIdList.size() == 0 ) loadIdList( m_GCSupplyDutyDat, m_GCSupplyDutyIdList ); - return m_GCSupplyDutyIdList; -} -const std::set< uint32_t >& getGCSupplyDutyRewardIdList() -{ - if( m_GCSupplyDutyRewardIdList.size() == 0 ) + return m_GCSupplyDutyIdList; + } + + const std::set< uint32_t >& getGCSupplyDutyRewardIdList() + { + if( m_GCSupplyDutyRewardIdList.size() == 0 ) loadIdList( m_GCSupplyDutyRewardDat, m_GCSupplyDutyRewardIdList ); - return m_GCSupplyDutyRewardIdList; -} -const std::set< uint32_t >& getGeneralActionIdList() -{ - if( m_GeneralActionIdList.size() == 0 ) + return m_GCSupplyDutyRewardIdList; + } + + const std::set< uint32_t >& getGeneralActionIdList() + { + if( m_GeneralActionIdList.size() == 0 ) loadIdList( m_GeneralActionDat, m_GeneralActionIdList ); - return m_GeneralActionIdList; -} -const std::set< uint32_t >& getGilShopIdList() -{ - if( m_GilShopIdList.size() == 0 ) + return m_GeneralActionIdList; + } + + const std::set< uint32_t >& getGilShopIdList() + { + if( m_GilShopIdList.size() == 0 ) loadIdList( m_GilShopDat, m_GilShopIdList ); - return m_GilShopIdList; -} -const std::set< uint32_t >& getGilShopItemIdList() -{ - if( m_GilShopItemIdList.size() == 0 ) + return m_GilShopIdList; + } + + const std::set< uint32_t >& getGilShopItemIdList() + { + if( m_GilShopItemIdList.size() == 0 ) loadIdList( m_GilShopItemDat, m_GilShopItemIdList ); - return m_GilShopItemIdList; -} -const std::set< uint32_t >& getGoldSaucerTextDataIdList() -{ - if( m_GoldSaucerTextDataIdList.size() == 0 ) + return m_GilShopItemIdList; + } + + const std::set< uint32_t >& getGoldSaucerTextDataIdList() + { + if( m_GoldSaucerTextDataIdList.size() == 0 ) loadIdList( m_GoldSaucerTextDataDat, m_GoldSaucerTextDataIdList ); - return m_GoldSaucerTextDataIdList; -} -const std::set< uint32_t >& getGrandCompanyIdList() -{ - if( m_GrandCompanyIdList.size() == 0 ) + return m_GoldSaucerTextDataIdList; + } + + const std::set< uint32_t >& getGrandCompanyIdList() + { + if( m_GrandCompanyIdList.size() == 0 ) loadIdList( m_GrandCompanyDat, m_GrandCompanyIdList ); - return m_GrandCompanyIdList; -} -const std::set< uint32_t >& getGrandCompanyRankIdList() -{ - if( m_GrandCompanyRankIdList.size() == 0 ) + return m_GrandCompanyIdList; + } + + const std::set< uint32_t >& getGrandCompanyRankIdList() + { + if( m_GrandCompanyRankIdList.size() == 0 ) loadIdList( m_GrandCompanyRankDat, m_GrandCompanyRankIdList ); - return m_GrandCompanyRankIdList; -} -const std::set< uint32_t >& getGuardianDeityIdList() -{ - if( m_GuardianDeityIdList.size() == 0 ) + return m_GrandCompanyRankIdList; + } + + const std::set< uint32_t >& getGuardianDeityIdList() + { + if( m_GuardianDeityIdList.size() == 0 ) loadIdList( m_GuardianDeityDat, m_GuardianDeityIdList ); - return m_GuardianDeityIdList; -} -const std::set< uint32_t >& getGuildleveAssignmentIdList() -{ - if( m_GuildleveAssignmentIdList.size() == 0 ) + return m_GuardianDeityIdList; + } + + const std::set< uint32_t >& getGuildleveAssignmentIdList() + { + if( m_GuildleveAssignmentIdList.size() == 0 ) loadIdList( m_GuildleveAssignmentDat, m_GuildleveAssignmentIdList ); - return m_GuildleveAssignmentIdList; -} -const std::set< uint32_t >& getGuildOrderGuideIdList() -{ - if( m_GuildOrderGuideIdList.size() == 0 ) + return m_GuildleveAssignmentIdList; + } + + const std::set< uint32_t >& getGuildOrderGuideIdList() + { + if( m_GuildOrderGuideIdList.size() == 0 ) loadIdList( m_GuildOrderGuideDat, m_GuildOrderGuideIdList ); - return m_GuildOrderGuideIdList; -} -const std::set< uint32_t >& getGuildOrderOfficerIdList() -{ - if( m_GuildOrderOfficerIdList.size() == 0 ) + return m_GuildOrderGuideIdList; + } + + const std::set< uint32_t >& getGuildOrderOfficerIdList() + { + if( m_GuildOrderOfficerIdList.size() == 0 ) loadIdList( m_GuildOrderOfficerDat, m_GuildOrderOfficerIdList ); - return m_GuildOrderOfficerIdList; -} -const std::set< uint32_t >& getHouseRetainerPoseIdList() -{ - if( m_HouseRetainerPoseIdList.size() == 0 ) + return m_GuildOrderOfficerIdList; + } + + const std::set< uint32_t >& getHouseRetainerPoseIdList() + { + if( m_HouseRetainerPoseIdList.size() == 0 ) loadIdList( m_HouseRetainerPoseDat, m_HouseRetainerPoseIdList ); - return m_HouseRetainerPoseIdList; -} -const std::set< uint32_t >& getHousingFurnitureIdList() -{ - if( m_HousingFurnitureIdList.size() == 0 ) + return m_HouseRetainerPoseIdList; + } + + const std::set< uint32_t >& getHousingFurnitureIdList() + { + if( m_HousingFurnitureIdList.size() == 0 ) loadIdList( m_HousingFurnitureDat, m_HousingFurnitureIdList ); - return m_HousingFurnitureIdList; -} -const std::set< uint32_t >& getHousingYardObjectIdList() -{ - if( m_HousingYardObjectIdList.size() == 0 ) + return m_HousingFurnitureIdList; + } + + const std::set< uint32_t >& getHousingYardObjectIdList() + { + if( m_HousingYardObjectIdList.size() == 0 ) loadIdList( m_HousingYardObjectDat, m_HousingYardObjectIdList ); - return m_HousingYardObjectIdList; -} -const std::set< uint32_t >& getInstanceContentIdList() -{ - if( m_InstanceContentIdList.size() == 0 ) + return m_HousingYardObjectIdList; + } + + const std::set< uint32_t >& getInstanceContentIdList() + { + if( m_InstanceContentIdList.size() == 0 ) loadIdList( m_InstanceContentDat, m_InstanceContentIdList ); - return m_InstanceContentIdList; -} -const std::set< uint32_t >& getInstanceContentBuffIdList() -{ - if( m_InstanceContentBuffIdList.size() == 0 ) + return m_InstanceContentIdList; + } + + const std::set< uint32_t >& getInstanceContentBuffIdList() + { + if( m_InstanceContentBuffIdList.size() == 0 ) loadIdList( m_InstanceContentBuffDat, m_InstanceContentBuffIdList ); - return m_InstanceContentBuffIdList; -} -const std::set< uint32_t >& getInstanceContentTextDataIdList() -{ - if( m_InstanceContentTextDataIdList.size() == 0 ) + return m_InstanceContentBuffIdList; + } + + const std::set< uint32_t >& getInstanceContentTextDataIdList() + { + if( m_InstanceContentTextDataIdList.size() == 0 ) loadIdList( m_InstanceContentTextDataDat, m_InstanceContentTextDataIdList ); - return m_InstanceContentTextDataIdList; -} -const std::set< uint32_t >& getItemIdList() -{ - if( m_ItemIdList.size() == 0 ) + return m_InstanceContentTextDataIdList; + } + + const std::set< uint32_t >& getItemIdList() + { + if( m_ItemIdList.size() == 0 ) loadIdList( m_ItemDat, m_ItemIdList ); - return m_ItemIdList; -} -const std::set< uint32_t >& getItemActionIdList() -{ - if( m_ItemActionIdList.size() == 0 ) + return m_ItemIdList; + } + + const std::set< uint32_t >& getItemActionIdList() + { + if( m_ItemActionIdList.size() == 0 ) loadIdList( m_ItemActionDat, m_ItemActionIdList ); - return m_ItemActionIdList; -} -const std::set< uint32_t >& getItemFoodIdList() -{ - if( m_ItemFoodIdList.size() == 0 ) + return m_ItemActionIdList; + } + + const std::set< uint32_t >& getItemFoodIdList() + { + if( m_ItemFoodIdList.size() == 0 ) loadIdList( m_ItemFoodDat, m_ItemFoodIdList ); - return m_ItemFoodIdList; -} -const std::set< uint32_t >& getItemSearchCategoryIdList() -{ - if( m_ItemSearchCategoryIdList.size() == 0 ) + return m_ItemFoodIdList; + } + + const std::set< uint32_t >& getItemSearchCategoryIdList() + { + if( m_ItemSearchCategoryIdList.size() == 0 ) loadIdList( m_ItemSearchCategoryDat, m_ItemSearchCategoryIdList ); - return m_ItemSearchCategoryIdList; -} -const std::set< uint32_t >& getItemSeriesIdList() -{ - if( m_ItemSeriesIdList.size() == 0 ) + return m_ItemSearchCategoryIdList; + } + + const std::set< uint32_t >& getItemSeriesIdList() + { + if( m_ItemSeriesIdList.size() == 0 ) loadIdList( m_ItemSeriesDat, m_ItemSeriesIdList ); - return m_ItemSeriesIdList; -} -const std::set< uint32_t >& getItemSpecialBonusIdList() -{ - if( m_ItemSpecialBonusIdList.size() == 0 ) + return m_ItemSeriesIdList; + } + + const std::set< uint32_t >& getItemSpecialBonusIdList() + { + if( m_ItemSpecialBonusIdList.size() == 0 ) loadIdList( m_ItemSpecialBonusDat, m_ItemSpecialBonusIdList ); - return m_ItemSpecialBonusIdList; -} -const std::set< uint32_t >& getItemUICategoryIdList() -{ - if( m_ItemUICategoryIdList.size() == 0 ) + return m_ItemSpecialBonusIdList; + } + + const std::set< uint32_t >& getItemUICategoryIdList() + { + if( m_ItemUICategoryIdList.size() == 0 ) loadIdList( m_ItemUICategoryDat, m_ItemUICategoryIdList ); - return m_ItemUICategoryIdList; -} -const std::set< uint32_t >& getJournalCategoryIdList() -{ - if( m_JournalCategoryIdList.size() == 0 ) + return m_ItemUICategoryIdList; + } + + const std::set< uint32_t >& getJournalCategoryIdList() + { + if( m_JournalCategoryIdList.size() == 0 ) loadIdList( m_JournalCategoryDat, m_JournalCategoryIdList ); - return m_JournalCategoryIdList; -} -const std::set< uint32_t >& getJournalGenreIdList() -{ - if( m_JournalGenreIdList.size() == 0 ) + return m_JournalCategoryIdList; + } + + const std::set< uint32_t >& getJournalGenreIdList() + { + if( m_JournalGenreIdList.size() == 0 ) loadIdList( m_JournalGenreDat, m_JournalGenreIdList ); - return m_JournalGenreIdList; -} -const std::set< uint32_t >& getJournalSectionIdList() -{ - if( m_JournalSectionIdList.size() == 0 ) + return m_JournalGenreIdList; + } + + const std::set< uint32_t >& getJournalSectionIdList() + { + if( m_JournalSectionIdList.size() == 0 ) loadIdList( m_JournalSectionDat, m_JournalSectionIdList ); - return m_JournalSectionIdList; -} -const std::set< uint32_t >& getLeveIdList() -{ - if( m_LeveIdList.size() == 0 ) + return m_JournalSectionIdList; + } + + const std::set< uint32_t >& getLeveIdList() + { + if( m_LeveIdList.size() == 0 ) loadIdList( m_LeveDat, m_LeveIdList ); - return m_LeveIdList; -} -const std::set< uint32_t >& getLeveAssignmentTypeIdList() -{ - if( m_LeveAssignmentTypeIdList.size() == 0 ) + return m_LeveIdList; + } + + const std::set< uint32_t >& getLeveAssignmentTypeIdList() + { + if( m_LeveAssignmentTypeIdList.size() == 0 ) loadIdList( m_LeveAssignmentTypeDat, m_LeveAssignmentTypeIdList ); - return m_LeveAssignmentTypeIdList; -} -const std::set< uint32_t >& getLeveClientIdList() -{ - if( m_LeveClientIdList.size() == 0 ) + return m_LeveAssignmentTypeIdList; + } + + const std::set< uint32_t >& getLeveClientIdList() + { + if( m_LeveClientIdList.size() == 0 ) loadIdList( m_LeveClientDat, m_LeveClientIdList ); - return m_LeveClientIdList; -} -const std::set< uint32_t >& getLevelIdList() -{ - if( m_LevelIdList.size() == 0 ) + return m_LeveClientIdList; + } + + const std::set< uint32_t >& getLevelIdList() + { + if( m_LevelIdList.size() == 0 ) loadIdList( m_LevelDat, m_LevelIdList ); - return m_LevelIdList; -} -const std::set< uint32_t >& getLeveRewardItemIdList() -{ - if( m_LeveRewardItemIdList.size() == 0 ) + return m_LevelIdList; + } + + const std::set< uint32_t >& getLeveRewardItemIdList() + { + if( m_LeveRewardItemIdList.size() == 0 ) loadIdList( m_LeveRewardItemDat, m_LeveRewardItemIdList ); - return m_LeveRewardItemIdList; -} -const std::set< uint32_t >& getLeveRewardItemGroupIdList() -{ - if( m_LeveRewardItemGroupIdList.size() == 0 ) + return m_LeveRewardItemIdList; + } + + const std::set< uint32_t >& getLeveRewardItemGroupIdList() + { + if( m_LeveRewardItemGroupIdList.size() == 0 ) loadIdList( m_LeveRewardItemGroupDat, m_LeveRewardItemGroupIdList ); - return m_LeveRewardItemGroupIdList; -} -const std::set< uint32_t >& getLeveVfxIdList() -{ - if( m_LeveVfxIdList.size() == 0 ) + return m_LeveRewardItemGroupIdList; + } + + const std::set< uint32_t >& getLeveVfxIdList() + { + if( m_LeveVfxIdList.size() == 0 ) loadIdList( m_LeveVfxDat, m_LeveVfxIdList ); - return m_LeveVfxIdList; -} -const std::set< uint32_t >& getLogFilterIdList() -{ - if( m_LogFilterIdList.size() == 0 ) + return m_LeveVfxIdList; + } + + const std::set< uint32_t >& getLogFilterIdList() + { + if( m_LogFilterIdList.size() == 0 ) loadIdList( m_LogFilterDat, m_LogFilterIdList ); - return m_LogFilterIdList; -} -const std::set< uint32_t >& getLogKindIdList() -{ - if( m_LogKindIdList.size() == 0 ) + return m_LogFilterIdList; + } + + const std::set< uint32_t >& getLogKindIdList() + { + if( m_LogKindIdList.size() == 0 ) loadIdList( m_LogKindDat, m_LogKindIdList ); - return m_LogKindIdList; -} -const std::set< uint32_t >& getLogKindCategoryTextIdList() -{ - if( m_LogKindCategoryTextIdList.size() == 0 ) + return m_LogKindIdList; + } + + const std::set< uint32_t >& getLogKindCategoryTextIdList() + { + if( m_LogKindCategoryTextIdList.size() == 0 ) loadIdList( m_LogKindCategoryTextDat, m_LogKindCategoryTextIdList ); - return m_LogKindCategoryTextIdList; -} -const std::set< uint32_t >& getLogMessageIdList() -{ - if( m_LogMessageIdList.size() == 0 ) + return m_LogKindCategoryTextIdList; + } + + const std::set< uint32_t >& getLogMessageIdList() + { + if( m_LogMessageIdList.size() == 0 ) loadIdList( m_LogMessageDat, m_LogMessageIdList ); - return m_LogMessageIdList; -} -const std::set< uint32_t >& getMacroIconIdList() -{ - if( m_MacroIconIdList.size() == 0 ) + return m_LogMessageIdList; + } + + const std::set< uint32_t >& getMacroIconIdList() + { + if( m_MacroIconIdList.size() == 0 ) loadIdList( m_MacroIconDat, m_MacroIconIdList ); - return m_MacroIconIdList; -} -const std::set< uint32_t >& getMacroIconRedirectOldIdList() -{ - if( m_MacroIconRedirectOldIdList.size() == 0 ) + return m_MacroIconIdList; + } + + const std::set< uint32_t >& getMacroIconRedirectOldIdList() + { + if( m_MacroIconRedirectOldIdList.size() == 0 ) loadIdList( m_MacroIconRedirectOldDat, m_MacroIconRedirectOldIdList ); - return m_MacroIconRedirectOldIdList; -} -const std::set< uint32_t >& getMainCommandIdList() -{ - if( m_MainCommandIdList.size() == 0 ) + return m_MacroIconRedirectOldIdList; + } + + const std::set< uint32_t >& getMainCommandIdList() + { + if( m_MainCommandIdList.size() == 0 ) loadIdList( m_MainCommandDat, m_MainCommandIdList ); - return m_MainCommandIdList; -} -const std::set< uint32_t >& getMainCommandCategoryIdList() -{ - if( m_MainCommandCategoryIdList.size() == 0 ) + return m_MainCommandIdList; + } + + const std::set< uint32_t >& getMainCommandCategoryIdList() + { + if( m_MainCommandCategoryIdList.size() == 0 ) loadIdList( m_MainCommandCategoryDat, m_MainCommandCategoryIdList ); - return m_MainCommandCategoryIdList; -} -const std::set< uint32_t >& getMapIdList() -{ - if( m_MapIdList.size() == 0 ) + return m_MainCommandCategoryIdList; + } + + const std::set< uint32_t >& getMapIdList() + { + if( m_MapIdList.size() == 0 ) loadIdList( m_MapDat, m_MapIdList ); - return m_MapIdList; -} -const std::set< uint32_t >& getMapMarkerIdList() -{ - if( m_MapMarkerIdList.size() == 0 ) + return m_MapIdList; + } + + const std::set< uint32_t >& getMapMarkerIdList() + { + if( m_MapMarkerIdList.size() == 0 ) loadIdList( m_MapMarkerDat, m_MapMarkerIdList ); - return m_MapMarkerIdList; -} -const std::set< uint32_t >& getMapMarkerRegionIdList() -{ - if( m_MapMarkerRegionIdList.size() == 0 ) + return m_MapMarkerIdList; + } + + const std::set< uint32_t >& getMapMarkerRegionIdList() + { + if( m_MapMarkerRegionIdList.size() == 0 ) loadIdList( m_MapMarkerRegionDat, m_MapMarkerRegionIdList ); - return m_MapMarkerRegionIdList; -} -const std::set< uint32_t >& getMapSymbolIdList() -{ - if( m_MapSymbolIdList.size() == 0 ) + return m_MapMarkerRegionIdList; + } + + const std::set< uint32_t >& getMapSymbolIdList() + { + if( m_MapSymbolIdList.size() == 0 ) loadIdList( m_MapSymbolDat, m_MapSymbolIdList ); - return m_MapSymbolIdList; -} -const std::set< uint32_t >& getMarkerIdList() -{ - if( m_MarkerIdList.size() == 0 ) + return m_MapSymbolIdList; + } + + const std::set< uint32_t >& getMarkerIdList() + { + if( m_MarkerIdList.size() == 0 ) loadIdList( m_MarkerDat, m_MarkerIdList ); - return m_MarkerIdList; -} -const std::set< uint32_t >& getMasterpieceSupplyDutyIdList() -{ - if( m_MasterpieceSupplyDutyIdList.size() == 0 ) + return m_MarkerIdList; + } + + const std::set< uint32_t >& getMasterpieceSupplyDutyIdList() + { + if( m_MasterpieceSupplyDutyIdList.size() == 0 ) loadIdList( m_MasterpieceSupplyDutyDat, m_MasterpieceSupplyDutyIdList ); - return m_MasterpieceSupplyDutyIdList; -} -const std::set< uint32_t >& getMasterpieceSupplyMultiplierIdList() -{ - if( m_MasterpieceSupplyMultiplierIdList.size() == 0 ) + return m_MasterpieceSupplyDutyIdList; + } + + const std::set< uint32_t >& getMasterpieceSupplyMultiplierIdList() + { + if( m_MasterpieceSupplyMultiplierIdList.size() == 0 ) loadIdList( m_MasterpieceSupplyMultiplierDat, m_MasterpieceSupplyMultiplierIdList ); - return m_MasterpieceSupplyMultiplierIdList; -} -const std::set< uint32_t >& getMateriaIdList() -{ - if( m_MateriaIdList.size() == 0 ) + return m_MasterpieceSupplyMultiplierIdList; + } + + const std::set< uint32_t >& getMateriaIdList() + { + if( m_MateriaIdList.size() == 0 ) loadIdList( m_MateriaDat, m_MateriaIdList ); - return m_MateriaIdList; -} -const std::set< uint32_t >& getMinionRaceIdList() -{ - if( m_MinionRaceIdList.size() == 0 ) + return m_MateriaIdList; + } + + const std::set< uint32_t >& getMinionRaceIdList() + { + if( m_MinionRaceIdList.size() == 0 ) loadIdList( m_MinionRaceDat, m_MinionRaceIdList ); - return m_MinionRaceIdList; -} -const std::set< uint32_t >& getMinionRulesIdList() -{ - if( m_MinionRulesIdList.size() == 0 ) + return m_MinionRaceIdList; + } + + const std::set< uint32_t >& getMinionRulesIdList() + { + if( m_MinionRulesIdList.size() == 0 ) loadIdList( m_MinionRulesDat, m_MinionRulesIdList ); - return m_MinionRulesIdList; -} -const std::set< uint32_t >& getMinionSkillTypeIdList() -{ - if( m_MinionSkillTypeIdList.size() == 0 ) + return m_MinionRulesIdList; + } + + const std::set< uint32_t >& getMinionSkillTypeIdList() + { + if( m_MinionSkillTypeIdList.size() == 0 ) loadIdList( m_MinionSkillTypeDat, m_MinionSkillTypeIdList ); - return m_MinionSkillTypeIdList; -} -const std::set< uint32_t >& getMobHuntTargetIdList() -{ - if( m_MobHuntTargetIdList.size() == 0 ) + return m_MinionSkillTypeIdList; + } + + const std::set< uint32_t >& getMobHuntTargetIdList() + { + if( m_MobHuntTargetIdList.size() == 0 ) loadIdList( m_MobHuntTargetDat, m_MobHuntTargetIdList ); - return m_MobHuntTargetIdList; -} -const std::set< uint32_t >& getModelCharaIdList() -{ - if( m_ModelCharaIdList.size() == 0 ) + return m_MobHuntTargetIdList; + } + + const std::set< uint32_t >& getModelCharaIdList() + { + if( m_ModelCharaIdList.size() == 0 ) loadIdList( m_ModelCharaDat, m_ModelCharaIdList ); - return m_ModelCharaIdList; -} -const std::set< uint32_t >& getMonsterNoteIdList() -{ - if( m_MonsterNoteIdList.size() == 0 ) + return m_ModelCharaIdList; + } + + const std::set< uint32_t >& getMonsterNoteIdList() + { + if( m_MonsterNoteIdList.size() == 0 ) loadIdList( m_MonsterNoteDat, m_MonsterNoteIdList ); - return m_MonsterNoteIdList; -} -const std::set< uint32_t >& getMonsterNoteTargetIdList() -{ - if( m_MonsterNoteTargetIdList.size() == 0 ) + return m_MonsterNoteIdList; + } + + const std::set< uint32_t >& getMonsterNoteTargetIdList() + { + if( m_MonsterNoteTargetIdList.size() == 0 ) loadIdList( m_MonsterNoteTargetDat, m_MonsterNoteTargetIdList ); - return m_MonsterNoteTargetIdList; -} -const std::set< uint32_t >& getMountIdList() -{ - if( m_MountIdList.size() == 0 ) + return m_MonsterNoteTargetIdList; + } + + const std::set< uint32_t >& getMountIdList() + { + if( m_MountIdList.size() == 0 ) loadIdList( m_MountDat, m_MountIdList ); - return m_MountIdList; -} -const std::set< uint32_t >& getMountActionIdList() -{ - if( m_MountActionIdList.size() == 0 ) + return m_MountIdList; + } + + const std::set< uint32_t >& getMountActionIdList() + { + if( m_MountActionIdList.size() == 0 ) loadIdList( m_MountActionDat, m_MountActionIdList ); - return m_MountActionIdList; -} -const std::set< uint32_t >& getMoveTimelineIdList() -{ - if( m_MoveTimelineIdList.size() == 0 ) + return m_MountActionIdList; + } + + const std::set< uint32_t >& getMoveTimelineIdList() + { + if( m_MoveTimelineIdList.size() == 0 ) loadIdList( m_MoveTimelineDat, m_MoveTimelineIdList ); - return m_MoveTimelineIdList; -} -const std::set< uint32_t >& getMoveVfxIdList() -{ - if( m_MoveVfxIdList.size() == 0 ) + return m_MoveTimelineIdList; + } + + const std::set< uint32_t >& getMoveVfxIdList() + { + if( m_MoveVfxIdList.size() == 0 ) loadIdList( m_MoveVfxDat, m_MoveVfxIdList ); - return m_MoveVfxIdList; -} -const std::set< uint32_t >& getNpcEquipIdList() -{ - if( m_NpcEquipIdList.size() == 0 ) + return m_MoveVfxIdList; + } + + const std::set< uint32_t >& getNpcEquipIdList() + { + if( m_NpcEquipIdList.size() == 0 ) loadIdList( m_NpcEquipDat, m_NpcEquipIdList ); - return m_NpcEquipIdList; -} -const std::set< uint32_t >& getOmenIdList() -{ - if( m_OmenIdList.size() == 0 ) + return m_NpcEquipIdList; + } + + const std::set< uint32_t >& getOmenIdList() + { + if( m_OmenIdList.size() == 0 ) loadIdList( m_OmenDat, m_OmenIdList ); - return m_OmenIdList; -} -const std::set< uint32_t >& getOnlineStatusIdList() -{ - if( m_OnlineStatusIdList.size() == 0 ) + return m_OmenIdList; + } + + const std::set< uint32_t >& getOnlineStatusIdList() + { + if( m_OnlineStatusIdList.size() == 0 ) loadIdList( m_OnlineStatusDat, m_OnlineStatusIdList ); - return m_OnlineStatusIdList; -} -const std::set< uint32_t >& getOpeningIdList() -{ - if( m_OpeningIdList.size() == 0 ) + return m_OnlineStatusIdList; + } + + const std::set< uint32_t >& getOpeningIdList() + { + if( m_OpeningIdList.size() == 0 ) loadIdList( m_OpeningDat, m_OpeningIdList ); - return m_OpeningIdList; -} -const std::set< uint32_t >& getOrchestrionIdList() -{ - if( m_OrchestrionIdList.size() == 0 ) + return m_OpeningIdList; + } + + const std::set< uint32_t >& getOrchestrionIdList() + { + if( m_OrchestrionIdList.size() == 0 ) loadIdList( m_OrchestrionDat, m_OrchestrionIdList ); - return m_OrchestrionIdList; -} -const std::set< uint32_t >& getOrchestrionCategoryIdList() -{ - if( m_OrchestrionCategoryIdList.size() == 0 ) + return m_OrchestrionIdList; + } + + const std::set< uint32_t >& getOrchestrionCategoryIdList() + { + if( m_OrchestrionCategoryIdList.size() == 0 ) loadIdList( m_OrchestrionCategoryDat, m_OrchestrionCategoryIdList ); - return m_OrchestrionCategoryIdList; -} -const std::set< uint32_t >& getOrchestrionPathIdList() -{ - if( m_OrchestrionPathIdList.size() == 0 ) + return m_OrchestrionCategoryIdList; + } + + const std::set< uint32_t >& getOrchestrionPathIdList() + { + if( m_OrchestrionPathIdList.size() == 0 ) loadIdList( m_OrchestrionPathDat, m_OrchestrionPathIdList ); - return m_OrchestrionPathIdList; -} -const std::set< uint32_t >& getOrchestrionUiparamIdList() -{ - if( m_OrchestrionUiparamIdList.size() == 0 ) + return m_OrchestrionPathIdList; + } + + const std::set< uint32_t >& getOrchestrionUiparamIdList() + { + if( m_OrchestrionUiparamIdList.size() == 0 ) loadIdList( m_OrchestrionUiparamDat, m_OrchestrionUiparamIdList ); - return m_OrchestrionUiparamIdList; -} -const std::set< uint32_t >& getParamGrowIdList() -{ - if( m_ParamGrowIdList.size() == 0 ) + return m_OrchestrionUiparamIdList; + } + + const std::set< uint32_t >& getParamGrowIdList() + { + if( m_ParamGrowIdList.size() == 0 ) loadIdList( m_ParamGrowDat, m_ParamGrowIdList ); - return m_ParamGrowIdList; -} -const std::set< uint32_t >& getPerformIdList() -{ - if( m_PerformIdList.size() == 0 ) + return m_ParamGrowIdList; + } + + const std::set< uint32_t >& getPerformIdList() + { + if( m_PerformIdList.size() == 0 ) loadIdList( m_PerformDat, m_PerformIdList ); - return m_PerformIdList; -} -const std::set< uint32_t >& getPerformTransientIdList() -{ - if( m_PerformTransientIdList.size() == 0 ) + return m_PerformIdList; + } + + const std::set< uint32_t >& getPerformTransientIdList() + { + if( m_PerformTransientIdList.size() == 0 ) loadIdList( m_PerformTransientDat, m_PerformTransientIdList ); - return m_PerformTransientIdList; -} -const std::set< uint32_t >& getPetIdList() -{ - if( m_PetIdList.size() == 0 ) + return m_PerformTransientIdList; + } + + const std::set< uint32_t >& getPetIdList() + { + if( m_PetIdList.size() == 0 ) loadIdList( m_PetDat, m_PetIdList ); - return m_PetIdList; -} -const std::set< uint32_t >& getPetActionIdList() -{ - if( m_PetActionIdList.size() == 0 ) + return m_PetIdList; + } + + const std::set< uint32_t >& getPetActionIdList() + { + if( m_PetActionIdList.size() == 0 ) loadIdList( m_PetActionDat, m_PetActionIdList ); - return m_PetActionIdList; -} -const std::set< uint32_t >& getPictureIdList() -{ - if( m_PictureIdList.size() == 0 ) + return m_PetActionIdList; + } + + const std::set< uint32_t >& getPictureIdList() + { + if( m_PictureIdList.size() == 0 ) loadIdList( m_PictureDat, m_PictureIdList ); - return m_PictureIdList; -} -const std::set< uint32_t >& getPlaceNameIdList() -{ - if( m_PlaceNameIdList.size() == 0 ) + return m_PictureIdList; + } + + const std::set< uint32_t >& getPlaceNameIdList() + { + if( m_PlaceNameIdList.size() == 0 ) loadIdList( m_PlaceNameDat, m_PlaceNameIdList ); - return m_PlaceNameIdList; -} -const std::set< uint32_t >& getPublicContentIdList() -{ - if( m_PublicContentIdList.size() == 0 ) + return m_PlaceNameIdList; + } + + const std::set< uint32_t >& getPublicContentIdList() + { + if( m_PublicContentIdList.size() == 0 ) loadIdList( m_PublicContentDat, m_PublicContentIdList ); - return m_PublicContentIdList; -} -const std::set< uint32_t >& getPvPActionSortIdList() -{ - if( m_PvPActionSortIdList.size() == 0 ) + return m_PublicContentIdList; + } + + const std::set< uint32_t >& getPvPActionSortIdList() + { + if( m_PvPActionSortIdList.size() == 0 ) loadIdList( m_PvPActionSortDat, m_PvPActionSortIdList ); - return m_PvPActionSortIdList; -} -const std::set< uint32_t >& getQuestIdList() -{ - if( m_QuestIdList.size() == 0 ) + return m_PvPActionSortIdList; + } + + const std::set< uint32_t >& getQuestIdList() + { + if( m_QuestIdList.size() == 0 ) loadIdList( m_QuestDat, m_QuestIdList ); - return m_QuestIdList; -} -const std::set< uint32_t >& getQuestClassJobRewardIdList() -{ - if( m_QuestClassJobRewardIdList.size() == 0 ) + return m_QuestIdList; + } + + const std::set< uint32_t >& getQuestClassJobRewardIdList() + { + if( m_QuestClassJobRewardIdList.size() == 0 ) loadIdList( m_QuestClassJobRewardDat, m_QuestClassJobRewardIdList ); - return m_QuestClassJobRewardIdList; -} -const std::set< uint32_t >& getQuestRepeatFlagIdList() -{ - if( m_QuestRepeatFlagIdList.size() == 0 ) + return m_QuestClassJobRewardIdList; + } + + const std::set< uint32_t >& getQuestRepeatFlagIdList() + { + if( m_QuestRepeatFlagIdList.size() == 0 ) loadIdList( m_QuestRepeatFlagDat, m_QuestRepeatFlagIdList ); - return m_QuestRepeatFlagIdList; -} -const std::set< uint32_t >& getQuestRewardOtherIdList() -{ - if( m_QuestRewardOtherIdList.size() == 0 ) + return m_QuestRepeatFlagIdList; + } + + const std::set< uint32_t >& getQuestRewardOtherIdList() + { + if( m_QuestRewardOtherIdList.size() == 0 ) loadIdList( m_QuestRewardOtherDat, m_QuestRewardOtherIdList ); - return m_QuestRewardOtherIdList; -} -const std::set< uint32_t >& getQuickChatIdList() -{ - if( m_QuickChatIdList.size() == 0 ) + return m_QuestRewardOtherIdList; + } + + const std::set< uint32_t >& getQuickChatIdList() + { + if( m_QuickChatIdList.size() == 0 ) loadIdList( m_QuickChatDat, m_QuickChatIdList ); - return m_QuickChatIdList; -} -const std::set< uint32_t >& getQuickChatTransientIdList() -{ - if( m_QuickChatTransientIdList.size() == 0 ) + return m_QuickChatIdList; + } + + const std::set< uint32_t >& getQuickChatTransientIdList() + { + if( m_QuickChatTransientIdList.size() == 0 ) loadIdList( m_QuickChatTransientDat, m_QuickChatTransientIdList ); - return m_QuickChatTransientIdList; -} -const std::set< uint32_t >& getRaceIdList() -{ - if( m_RaceIdList.size() == 0 ) + return m_QuickChatTransientIdList; + } + + const std::set< uint32_t >& getRaceIdList() + { + if( m_RaceIdList.size() == 0 ) loadIdList( m_RaceDat, m_RaceIdList ); - return m_RaceIdList; -} -const std::set< uint32_t >& getRacingChocoboItemIdList() -{ - if( m_RacingChocoboItemIdList.size() == 0 ) + return m_RaceIdList; + } + + const std::set< uint32_t >& getRacingChocoboItemIdList() + { + if( m_RacingChocoboItemIdList.size() == 0 ) loadIdList( m_RacingChocoboItemDat, m_RacingChocoboItemIdList ); - return m_RacingChocoboItemIdList; -} -const std::set< uint32_t >& getRacingChocoboNameIdList() -{ - if( m_RacingChocoboNameIdList.size() == 0 ) + return m_RacingChocoboItemIdList; + } + + const std::set< uint32_t >& getRacingChocoboNameIdList() + { + if( m_RacingChocoboNameIdList.size() == 0 ) loadIdList( m_RacingChocoboNameDat, m_RacingChocoboNameIdList ); - return m_RacingChocoboNameIdList; -} -const std::set< uint32_t >& getRacingChocoboNameCategoryIdList() -{ - if( m_RacingChocoboNameCategoryIdList.size() == 0 ) + return m_RacingChocoboNameIdList; + } + + const std::set< uint32_t >& getRacingChocoboNameCategoryIdList() + { + if( m_RacingChocoboNameCategoryIdList.size() == 0 ) loadIdList( m_RacingChocoboNameCategoryDat, m_RacingChocoboNameCategoryIdList ); - return m_RacingChocoboNameCategoryIdList; -} -const std::set< uint32_t >& getRacingChocoboNameInfoIdList() -{ - if( m_RacingChocoboNameInfoIdList.size() == 0 ) + return m_RacingChocoboNameCategoryIdList; + } + + const std::set< uint32_t >& getRacingChocoboNameInfoIdList() + { + if( m_RacingChocoboNameInfoIdList.size() == 0 ) loadIdList( m_RacingChocoboNameInfoDat, m_RacingChocoboNameInfoIdList ); - return m_RacingChocoboNameInfoIdList; -} -const std::set< uint32_t >& getRacingChocoboParamIdList() -{ - if( m_RacingChocoboParamIdList.size() == 0 ) + return m_RacingChocoboNameInfoIdList; + } + + const std::set< uint32_t >& getRacingChocoboParamIdList() + { + if( m_RacingChocoboParamIdList.size() == 0 ) loadIdList( m_RacingChocoboParamDat, m_RacingChocoboParamIdList ); - return m_RacingChocoboParamIdList; -} -const std::set< uint32_t >& getRecipeIdList() -{ - if( m_RecipeIdList.size() == 0 ) + return m_RacingChocoboParamIdList; + } + + const std::set< uint32_t >& getRecipeIdList() + { + if( m_RecipeIdList.size() == 0 ) loadIdList( m_RecipeDat, m_RecipeIdList ); - return m_RecipeIdList; -} -const std::set< uint32_t >& getRecipeElementIdList() -{ - if( m_RecipeElementIdList.size() == 0 ) + return m_RecipeIdList; + } + + const std::set< uint32_t >& getRecipeElementIdList() + { + if( m_RecipeElementIdList.size() == 0 ) loadIdList( m_RecipeElementDat, m_RecipeElementIdList ); - return m_RecipeElementIdList; -} -const std::set< uint32_t >& getRecipeLevelTableIdList() -{ - if( m_RecipeLevelTableIdList.size() == 0 ) + return m_RecipeElementIdList; + } + + const std::set< uint32_t >& getRecipeLevelTableIdList() + { + if( m_RecipeLevelTableIdList.size() == 0 ) loadIdList( m_RecipeLevelTableDat, m_RecipeLevelTableIdList ); - return m_RecipeLevelTableIdList; -} -const std::set< uint32_t >& getRecipeNotebookListIdList() -{ - if( m_RecipeNotebookListIdList.size() == 0 ) + return m_RecipeLevelTableIdList; + } + + const std::set< uint32_t >& getRecipeNotebookListIdList() + { + if( m_RecipeNotebookListIdList.size() == 0 ) loadIdList( m_RecipeNotebookListDat, m_RecipeNotebookListIdList ); - return m_RecipeNotebookListIdList; -} -const std::set< uint32_t >& getRecommendContentsIdList() -{ - if( m_RecommendContentsIdList.size() == 0 ) + return m_RecipeNotebookListIdList; + } + + const std::set< uint32_t >& getRecommendContentsIdList() + { + if( m_RecommendContentsIdList.size() == 0 ) loadIdList( m_RecommendContentsDat, m_RecommendContentsIdList ); - return m_RecommendContentsIdList; -} -const std::set< uint32_t >& getRelicIdList() -{ - if( m_RelicIdList.size() == 0 ) + return m_RecommendContentsIdList; + } + + const std::set< uint32_t >& getRelicIdList() + { + if( m_RelicIdList.size() == 0 ) loadIdList( m_RelicDat, m_RelicIdList ); - return m_RelicIdList; -} -const std::set< uint32_t >& getRelic3IdList() -{ - if( m_Relic3IdList.size() == 0 ) + return m_RelicIdList; + } + + const std::set< uint32_t >& getRelic3IdList() + { + if( m_Relic3IdList.size() == 0 ) loadIdList( m_Relic3Dat, m_Relic3IdList ); - return m_Relic3IdList; -} -const std::set< uint32_t >& getRelicItemIdList() -{ - if( m_RelicItemIdList.size() == 0 ) + return m_Relic3IdList; + } + + const std::set< uint32_t >& getRelicItemIdList() + { + if( m_RelicItemIdList.size() == 0 ) loadIdList( m_RelicItemDat, m_RelicItemIdList ); - return m_RelicItemIdList; -} -const std::set< uint32_t >& getRelicNoteIdList() -{ - if( m_RelicNoteIdList.size() == 0 ) + return m_RelicItemIdList; + } + + const std::set< uint32_t >& getRelicNoteIdList() + { + if( m_RelicNoteIdList.size() == 0 ) loadIdList( m_RelicNoteDat, m_RelicNoteIdList ); - return m_RelicNoteIdList; -} -const std::set< uint32_t >& getRelicNoteCategoryIdList() -{ - if( m_RelicNoteCategoryIdList.size() == 0 ) + return m_RelicNoteIdList; + } + + const std::set< uint32_t >& getRelicNoteCategoryIdList() + { + if( m_RelicNoteCategoryIdList.size() == 0 ) loadIdList( m_RelicNoteCategoryDat, m_RelicNoteCategoryIdList ); - return m_RelicNoteCategoryIdList; -} -const std::set< uint32_t >& getRetainerTaskIdList() -{ - if( m_RetainerTaskIdList.size() == 0 ) + return m_RelicNoteCategoryIdList; + } + + const std::set< uint32_t >& getRetainerTaskIdList() + { + if( m_RetainerTaskIdList.size() == 0 ) loadIdList( m_RetainerTaskDat, m_RetainerTaskIdList ); - return m_RetainerTaskIdList; -} -const std::set< uint32_t >& getRetainerTaskLvRangeIdList() -{ - if( m_RetainerTaskLvRangeIdList.size() == 0 ) + return m_RetainerTaskIdList; + } + + const std::set< uint32_t >& getRetainerTaskLvRangeIdList() + { + if( m_RetainerTaskLvRangeIdList.size() == 0 ) loadIdList( m_RetainerTaskLvRangeDat, m_RetainerTaskLvRangeIdList ); - return m_RetainerTaskLvRangeIdList; -} -const std::set< uint32_t >& getRetainerTaskNormalIdList() -{ - if( m_RetainerTaskNormalIdList.size() == 0 ) + return m_RetainerTaskLvRangeIdList; + } + + const std::set< uint32_t >& getRetainerTaskNormalIdList() + { + if( m_RetainerTaskNormalIdList.size() == 0 ) loadIdList( m_RetainerTaskNormalDat, m_RetainerTaskNormalIdList ); - return m_RetainerTaskNormalIdList; -} -const std::set< uint32_t >& getRetainerTaskParameterIdList() -{ - if( m_RetainerTaskParameterIdList.size() == 0 ) + return m_RetainerTaskNormalIdList; + } + + const std::set< uint32_t >& getRetainerTaskParameterIdList() + { + if( m_RetainerTaskParameterIdList.size() == 0 ) loadIdList( m_RetainerTaskParameterDat, m_RetainerTaskParameterIdList ); - return m_RetainerTaskParameterIdList; -} -const std::set< uint32_t >& getRetainerTaskRandomIdList() -{ - if( m_RetainerTaskRandomIdList.size() == 0 ) + return m_RetainerTaskParameterIdList; + } + + const std::set< uint32_t >& getRetainerTaskRandomIdList() + { + if( m_RetainerTaskRandomIdList.size() == 0 ) loadIdList( m_RetainerTaskRandomDat, m_RetainerTaskRandomIdList ); - return m_RetainerTaskRandomIdList; -} -const std::set< uint32_t >& getSalvageIdList() -{ - if( m_SalvageIdList.size() == 0 ) + return m_RetainerTaskRandomIdList; + } + + const std::set< uint32_t >& getSalvageIdList() + { + if( m_SalvageIdList.size() == 0 ) loadIdList( m_SalvageDat, m_SalvageIdList ); - return m_SalvageIdList; -} -const std::set< uint32_t >& getSatisfactionNpcIdList() -{ - if( m_SatisfactionNpcIdList.size() == 0 ) + return m_SalvageIdList; + } + + const std::set< uint32_t >& getSatisfactionNpcIdList() + { + if( m_SatisfactionNpcIdList.size() == 0 ) loadIdList( m_SatisfactionNpcDat, m_SatisfactionNpcIdList ); - return m_SatisfactionNpcIdList; -} -const std::set< uint32_t >& getSatisfactionSupplyIdList() -{ - if( m_SatisfactionSupplyIdList.size() == 0 ) + return m_SatisfactionNpcIdList; + } + + const std::set< uint32_t >& getSatisfactionSupplyIdList() + { + if( m_SatisfactionSupplyIdList.size() == 0 ) loadIdList( m_SatisfactionSupplyDat, m_SatisfactionSupplyIdList ); - return m_SatisfactionSupplyIdList; -} -const std::set< uint32_t >& getSatisfactionSupplyRewardIdList() -{ - if( m_SatisfactionSupplyRewardIdList.size() == 0 ) + return m_SatisfactionSupplyIdList; + } + + const std::set< uint32_t >& getSatisfactionSupplyRewardIdList() + { + if( m_SatisfactionSupplyRewardIdList.size() == 0 ) loadIdList( m_SatisfactionSupplyRewardDat, m_SatisfactionSupplyRewardIdList ); - return m_SatisfactionSupplyRewardIdList; -} -const std::set< uint32_t >& getScenarioTreeIdList() -{ - if( m_ScenarioTreeIdList.size() == 0 ) + return m_SatisfactionSupplyRewardIdList; + } + + const std::set< uint32_t >& getScenarioTreeIdList() + { + if( m_ScenarioTreeIdList.size() == 0 ) loadIdList( m_ScenarioTreeDat, m_ScenarioTreeIdList ); - return m_ScenarioTreeIdList; -} -const std::set< uint32_t >& getScenarioTreeTipsIdList() -{ - if( m_ScenarioTreeTipsIdList.size() == 0 ) + return m_ScenarioTreeIdList; + } + + const std::set< uint32_t >& getScenarioTreeTipsIdList() + { + if( m_ScenarioTreeTipsIdList.size() == 0 ) loadIdList( m_ScenarioTreeTipsDat, m_ScenarioTreeTipsIdList ); - return m_ScenarioTreeTipsIdList; -} -const std::set< uint32_t >& getScenarioTreeTipsClassQuestIdList() -{ - if( m_ScenarioTreeTipsClassQuestIdList.size() == 0 ) + return m_ScenarioTreeTipsIdList; + } + + const std::set< uint32_t >& getScenarioTreeTipsClassQuestIdList() + { + if( m_ScenarioTreeTipsClassQuestIdList.size() == 0 ) loadIdList( m_ScenarioTreeTipsClassQuestDat, m_ScenarioTreeTipsClassQuestIdList ); - return m_ScenarioTreeTipsClassQuestIdList; -} -const std::set< uint32_t >& getScenarioTreeTipsQuestIdList() -{ - if( m_ScenarioTreeTipsQuestIdList.size() == 0 ) + return m_ScenarioTreeTipsClassQuestIdList; + } + + const std::set< uint32_t >& getScenarioTreeTipsQuestIdList() + { + if( m_ScenarioTreeTipsQuestIdList.size() == 0 ) loadIdList( m_ScenarioTreeTipsQuestDat, m_ScenarioTreeTipsQuestIdList ); - return m_ScenarioTreeTipsQuestIdList; -} -const std::set< uint32_t >& getScenarioTypeIdList() -{ - if( m_ScenarioTypeIdList.size() == 0 ) + return m_ScenarioTreeTipsQuestIdList; + } + + const std::set< uint32_t >& getScenarioTypeIdList() + { + if( m_ScenarioTypeIdList.size() == 0 ) loadIdList( m_ScenarioTypeDat, m_ScenarioTypeIdList ); - return m_ScenarioTypeIdList; -} -const std::set< uint32_t >& getScreenImageIdList() -{ - if( m_ScreenImageIdList.size() == 0 ) + return m_ScenarioTypeIdList; + } + + const std::set< uint32_t >& getScreenImageIdList() + { + if( m_ScreenImageIdList.size() == 0 ) loadIdList( m_ScreenImageDat, m_ScreenImageIdList ); - return m_ScreenImageIdList; -} -const std::set< uint32_t >& getSecretRecipeBookIdList() -{ - if( m_SecretRecipeBookIdList.size() == 0 ) + return m_ScreenImageIdList; + } + + const std::set< uint32_t >& getSecretRecipeBookIdList() + { + if( m_SecretRecipeBookIdList.size() == 0 ) loadIdList( m_SecretRecipeBookDat, m_SecretRecipeBookIdList ); - return m_SecretRecipeBookIdList; -} -const std::set< uint32_t >& getSkyIsland2MissionIdList() -{ - if( m_SkyIsland2MissionIdList.size() == 0 ) + return m_SecretRecipeBookIdList; + } + + const std::set< uint32_t >& getSkyIsland2MissionIdList() + { + if( m_SkyIsland2MissionIdList.size() == 0 ) loadIdList( m_SkyIsland2MissionDat, m_SkyIsland2MissionIdList ); - return m_SkyIsland2MissionIdList; -} -const std::set< uint32_t >& getSkyIsland2MissionDetailIdList() -{ - if( m_SkyIsland2MissionDetailIdList.size() == 0 ) + return m_SkyIsland2MissionIdList; + } + + const std::set< uint32_t >& getSkyIsland2MissionDetailIdList() + { + if( m_SkyIsland2MissionDetailIdList.size() == 0 ) loadIdList( m_SkyIsland2MissionDetailDat, m_SkyIsland2MissionDetailIdList ); - return m_SkyIsland2MissionDetailIdList; -} -const std::set< uint32_t >& getSkyIsland2MissionTypeIdList() -{ - if( m_SkyIsland2MissionTypeIdList.size() == 0 ) + return m_SkyIsland2MissionDetailIdList; + } + + const std::set< uint32_t >& getSkyIsland2MissionTypeIdList() + { + if( m_SkyIsland2MissionTypeIdList.size() == 0 ) loadIdList( m_SkyIsland2MissionTypeDat, m_SkyIsland2MissionTypeIdList ); - return m_SkyIsland2MissionTypeIdList; -} -const std::set< uint32_t >& getSkyIsland2RangeTypeIdList() -{ - if( m_SkyIsland2RangeTypeIdList.size() == 0 ) + return m_SkyIsland2MissionTypeIdList; + } + + const std::set< uint32_t >& getSkyIsland2RangeTypeIdList() + { + if( m_SkyIsland2RangeTypeIdList.size() == 0 ) loadIdList( m_SkyIsland2RangeTypeDat, m_SkyIsland2RangeTypeIdList ); - return m_SkyIsland2RangeTypeIdList; -} -const std::set< uint32_t >& getSpearfishingItemIdList() -{ - if( m_SpearfishingItemIdList.size() == 0 ) + return m_SkyIsland2RangeTypeIdList; + } + + const std::set< uint32_t >& getSpearfishingItemIdList() + { + if( m_SpearfishingItemIdList.size() == 0 ) loadIdList( m_SpearfishingItemDat, m_SpearfishingItemIdList ); - return m_SpearfishingItemIdList; -} -const std::set< uint32_t >& getSpearfishingNotebookIdList() -{ - if( m_SpearfishingNotebookIdList.size() == 0 ) + return m_SpearfishingItemIdList; + } + + const std::set< uint32_t >& getSpearfishingNotebookIdList() + { + if( m_SpearfishingNotebookIdList.size() == 0 ) loadIdList( m_SpearfishingNotebookDat, m_SpearfishingNotebookIdList ); - return m_SpearfishingNotebookIdList; -} -const std::set< uint32_t >& getSpecialShopIdList() -{ - if( m_SpecialShopIdList.size() == 0 ) + return m_SpearfishingNotebookIdList; + } + + const std::set< uint32_t >& getSpecialShopIdList() + { + if( m_SpecialShopIdList.size() == 0 ) loadIdList( m_SpecialShopDat, m_SpecialShopIdList ); - return m_SpecialShopIdList; -} -const std::set< uint32_t >& getSpecialShopItemCategoryIdList() -{ - if( m_SpecialShopItemCategoryIdList.size() == 0 ) + return m_SpecialShopIdList; + } + + const std::set< uint32_t >& getSpecialShopItemCategoryIdList() + { + if( m_SpecialShopItemCategoryIdList.size() == 0 ) loadIdList( m_SpecialShopItemCategoryDat, m_SpecialShopItemCategoryIdList ); - return m_SpecialShopItemCategoryIdList; -} -const std::set< uint32_t >& getStainIdList() -{ - if( m_StainIdList.size() == 0 ) + return m_SpecialShopItemCategoryIdList; + } + + const std::set< uint32_t >& getStainIdList() + { + if( m_StainIdList.size() == 0 ) loadIdList( m_StainDat, m_StainIdList ); - return m_StainIdList; -} -const std::set< uint32_t >& getStainTransientIdList() -{ - if( m_StainTransientIdList.size() == 0 ) + return m_StainIdList; + } + + const std::set< uint32_t >& getStainTransientIdList() + { + if( m_StainTransientIdList.size() == 0 ) loadIdList( m_StainTransientDat, m_StainTransientIdList ); - return m_StainTransientIdList; -} -const std::set< uint32_t >& getStatusIdList() -{ - if( m_StatusIdList.size() == 0 ) + return m_StainTransientIdList; + } + + const std::set< uint32_t >& getStatusIdList() + { + if( m_StatusIdList.size() == 0 ) loadIdList( m_StatusDat, m_StatusIdList ); - return m_StatusIdList; -} -const std::set< uint32_t >& getStatusHitEffectIdList() -{ - if( m_StatusHitEffectIdList.size() == 0 ) + return m_StatusIdList; + } + + const std::set< uint32_t >& getStatusHitEffectIdList() + { + if( m_StatusHitEffectIdList.size() == 0 ) loadIdList( m_StatusHitEffectDat, m_StatusHitEffectIdList ); - return m_StatusHitEffectIdList; -} -const std::set< uint32_t >& getStatusLoopVFXIdList() -{ - if( m_StatusLoopVFXIdList.size() == 0 ) + return m_StatusHitEffectIdList; + } + + const std::set< uint32_t >& getStatusLoopVFXIdList() + { + if( m_StatusLoopVFXIdList.size() == 0 ) loadIdList( m_StatusLoopVFXDat, m_StatusLoopVFXIdList ); - return m_StatusLoopVFXIdList; -} -const std::set< uint32_t >& getStoryIdList() -{ - if( m_StoryIdList.size() == 0 ) + return m_StatusLoopVFXIdList; + } + + const std::set< uint32_t >& getStoryIdList() + { + if( m_StoryIdList.size() == 0 ) loadIdList( m_StoryDat, m_StoryIdList ); - return m_StoryIdList; -} -const std::set< uint32_t >& getSubmarineExplorationIdList() -{ - if( m_SubmarineExplorationIdList.size() == 0 ) + return m_StoryIdList; + } + + const std::set< uint32_t >& getSubmarineExplorationIdList() + { + if( m_SubmarineExplorationIdList.size() == 0 ) loadIdList( m_SubmarineExplorationDat, m_SubmarineExplorationIdList ); - return m_SubmarineExplorationIdList; -} -const std::set< uint32_t >& getSubmarinePartIdList() -{ - if( m_SubmarinePartIdList.size() == 0 ) + return m_SubmarineExplorationIdList; + } + + const std::set< uint32_t >& getSubmarinePartIdList() + { + if( m_SubmarinePartIdList.size() == 0 ) loadIdList( m_SubmarinePartDat, m_SubmarinePartIdList ); - return m_SubmarinePartIdList; -} -const std::set< uint32_t >& getSubmarineRankIdList() -{ - if( m_SubmarineRankIdList.size() == 0 ) + return m_SubmarinePartIdList; + } + + const std::set< uint32_t >& getSubmarineRankIdList() + { + if( m_SubmarineRankIdList.size() == 0 ) loadIdList( m_SubmarineRankDat, m_SubmarineRankIdList ); - return m_SubmarineRankIdList; -} -const std::set< uint32_t >& getSwitchTalkIdList() -{ - if( m_SwitchTalkIdList.size() == 0 ) + return m_SubmarineRankIdList; + } + + const std::set< uint32_t >& getSwitchTalkIdList() + { + if( m_SwitchTalkIdList.size() == 0 ) loadIdList( m_SwitchTalkDat, m_SwitchTalkIdList ); - return m_SwitchTalkIdList; -} -const std::set< uint32_t >& getTerritoryTypeIdList() -{ - if( m_TerritoryTypeIdList.size() == 0 ) + return m_SwitchTalkIdList; + } + + const std::set< uint32_t >& getTerritoryTypeIdList() + { + if( m_TerritoryTypeIdList.size() == 0 ) loadIdList( m_TerritoryTypeDat, m_TerritoryTypeIdList ); - return m_TerritoryTypeIdList; -} -const std::set< uint32_t >& getTextCommandIdList() -{ - if( m_TextCommandIdList.size() == 0 ) + return m_TerritoryTypeIdList; + } + + const std::set< uint32_t >& getTextCommandIdList() + { + if( m_TextCommandIdList.size() == 0 ) loadIdList( m_TextCommandDat, m_TextCommandIdList ); - return m_TextCommandIdList; -} -const std::set< uint32_t >& getTitleIdList() -{ - if( m_TitleIdList.size() == 0 ) + return m_TextCommandIdList; + } + + const std::set< uint32_t >& getTitleIdList() + { + if( m_TitleIdList.size() == 0 ) loadIdList( m_TitleDat, m_TitleIdList ); - return m_TitleIdList; -} -const std::set< uint32_t >& getTomestonesIdList() -{ - if( m_TomestonesIdList.size() == 0 ) + return m_TitleIdList; + } + + const std::set< uint32_t >& getTomestonesIdList() + { + if( m_TomestonesIdList.size() == 0 ) loadIdList( m_TomestonesDat, m_TomestonesIdList ); - return m_TomestonesIdList; -} -const std::set< uint32_t >& getTomestonesItemIdList() -{ - if( m_TomestonesItemIdList.size() == 0 ) + return m_TomestonesIdList; + } + + const std::set< uint32_t >& getTomestonesItemIdList() + { + if( m_TomestonesItemIdList.size() == 0 ) loadIdList( m_TomestonesItemDat, m_TomestonesItemIdList ); - return m_TomestonesItemIdList; -} -const std::set< uint32_t >& getTopicSelectIdList() -{ - if( m_TopicSelectIdList.size() == 0 ) + return m_TomestonesItemIdList; + } + + const std::set< uint32_t >& getTopicSelectIdList() + { + if( m_TopicSelectIdList.size() == 0 ) loadIdList( m_TopicSelectDat, m_TopicSelectIdList ); - return m_TopicSelectIdList; -} -const std::set< uint32_t >& getTownIdList() -{ - if( m_TownIdList.size() == 0 ) + return m_TopicSelectIdList; + } + + const std::set< uint32_t >& getTownIdList() + { + if( m_TownIdList.size() == 0 ) loadIdList( m_TownDat, m_TownIdList ); - return m_TownIdList; -} -const std::set< uint32_t >& getTraitIdList() -{ - if( m_TraitIdList.size() == 0 ) + return m_TownIdList; + } + + const std::set< uint32_t >& getTraitIdList() + { + if( m_TraitIdList.size() == 0 ) loadIdList( m_TraitDat, m_TraitIdList ); - return m_TraitIdList; -} -const std::set< uint32_t >& getTraitRecastIdList() -{ - if( m_TraitRecastIdList.size() == 0 ) + return m_TraitIdList; + } + + const std::set< uint32_t >& getTraitRecastIdList() + { + if( m_TraitRecastIdList.size() == 0 ) loadIdList( m_TraitRecastDat, m_TraitRecastIdList ); - return m_TraitRecastIdList; -} -const std::set< uint32_t >& getTraitTransientIdList() -{ - if( m_TraitTransientIdList.size() == 0 ) + return m_TraitRecastIdList; + } + + const std::set< uint32_t >& getTraitTransientIdList() + { + if( m_TraitTransientIdList.size() == 0 ) loadIdList( m_TraitTransientDat, m_TraitTransientIdList ); - return m_TraitTransientIdList; -} -const std::set< uint32_t >& getTransformationIdList() -{ - if( m_TransformationIdList.size() == 0 ) + return m_TraitTransientIdList; + } + + const std::set< uint32_t >& getTransformationIdList() + { + if( m_TransformationIdList.size() == 0 ) loadIdList( m_TransformationDat, m_TransformationIdList ); - return m_TransformationIdList; -} -const std::set< uint32_t >& getTreasureIdList() -{ - if( m_TreasureIdList.size() == 0 ) + return m_TransformationIdList; + } + + const std::set< uint32_t >& getTreasureIdList() + { + if( m_TreasureIdList.size() == 0 ) loadIdList( m_TreasureDat, m_TreasureIdList ); - return m_TreasureIdList; -} -const std::set< uint32_t >& getTreasureHuntRankIdList() -{ - if( m_TreasureHuntRankIdList.size() == 0 ) + return m_TreasureIdList; + } + + const std::set< uint32_t >& getTreasureHuntRankIdList() + { + if( m_TreasureHuntRankIdList.size() == 0 ) loadIdList( m_TreasureHuntRankDat, m_TreasureHuntRankIdList ); - return m_TreasureHuntRankIdList; -} -const std::set< uint32_t >& getTribeIdList() -{ - if( m_TribeIdList.size() == 0 ) + return m_TreasureHuntRankIdList; + } + + const std::set< uint32_t >& getTribeIdList() + { + if( m_TribeIdList.size() == 0 ) loadIdList( m_TribeDat, m_TribeIdList ); - return m_TribeIdList; -} -const std::set< uint32_t >& getTripleTriadIdList() -{ - if( m_TripleTriadIdList.size() == 0 ) + return m_TribeIdList; + } + + const std::set< uint32_t >& getTripleTriadIdList() + { + if( m_TripleTriadIdList.size() == 0 ) loadIdList( m_TripleTriadDat, m_TripleTriadIdList ); - return m_TripleTriadIdList; -} -const std::set< uint32_t >& getTripleTriadCardIdList() -{ - if( m_TripleTriadCardIdList.size() == 0 ) + return m_TripleTriadIdList; + } + + const std::set< uint32_t >& getTripleTriadCardIdList() + { + if( m_TripleTriadCardIdList.size() == 0 ) loadIdList( m_TripleTriadCardDat, m_TripleTriadCardIdList ); - return m_TripleTriadCardIdList; -} -const std::set< uint32_t >& getTripleTriadCardRarityIdList() -{ - if( m_TripleTriadCardRarityIdList.size() == 0 ) + return m_TripleTriadCardIdList; + } + + const std::set< uint32_t >& getTripleTriadCardRarityIdList() + { + if( m_TripleTriadCardRarityIdList.size() == 0 ) loadIdList( m_TripleTriadCardRarityDat, m_TripleTriadCardRarityIdList ); - return m_TripleTriadCardRarityIdList; -} -const std::set< uint32_t >& getTripleTriadCardResidentIdList() -{ - if( m_TripleTriadCardResidentIdList.size() == 0 ) + return m_TripleTriadCardRarityIdList; + } + + const std::set< uint32_t >& getTripleTriadCardResidentIdList() + { + if( m_TripleTriadCardResidentIdList.size() == 0 ) loadIdList( m_TripleTriadCardResidentDat, m_TripleTriadCardResidentIdList ); - return m_TripleTriadCardResidentIdList; -} -const std::set< uint32_t >& getTripleTriadCardTypeIdList() -{ - if( m_TripleTriadCardTypeIdList.size() == 0 ) + return m_TripleTriadCardResidentIdList; + } + + const std::set< uint32_t >& getTripleTriadCardTypeIdList() + { + if( m_TripleTriadCardTypeIdList.size() == 0 ) loadIdList( m_TripleTriadCardTypeDat, m_TripleTriadCardTypeIdList ); - return m_TripleTriadCardTypeIdList; -} -const std::set< uint32_t >& getTripleTriadCompetitionIdList() -{ - if( m_TripleTriadCompetitionIdList.size() == 0 ) + return m_TripleTriadCardTypeIdList; + } + + const std::set< uint32_t >& getTripleTriadCompetitionIdList() + { + if( m_TripleTriadCompetitionIdList.size() == 0 ) loadIdList( m_TripleTriadCompetitionDat, m_TripleTriadCompetitionIdList ); - return m_TripleTriadCompetitionIdList; -} -const std::set< uint32_t >& getTripleTriadRuleIdList() -{ - if( m_TripleTriadRuleIdList.size() == 0 ) + return m_TripleTriadCompetitionIdList; + } + + const std::set< uint32_t >& getTripleTriadRuleIdList() + { + if( m_TripleTriadRuleIdList.size() == 0 ) loadIdList( m_TripleTriadRuleDat, m_TripleTriadRuleIdList ); - return m_TripleTriadRuleIdList; -} -const std::set< uint32_t >& getTutorialIdList() -{ - if( m_TutorialIdList.size() == 0 ) + return m_TripleTriadRuleIdList; + } + + const std::set< uint32_t >& getTutorialIdList() + { + if( m_TutorialIdList.size() == 0 ) loadIdList( m_TutorialDat, m_TutorialIdList ); - return m_TutorialIdList; -} -const std::set< uint32_t >& getTutorialDPSIdList() -{ - if( m_TutorialDPSIdList.size() == 0 ) + return m_TutorialIdList; + } + + const std::set< uint32_t >& getTutorialDPSIdList() + { + if( m_TutorialDPSIdList.size() == 0 ) loadIdList( m_TutorialDPSDat, m_TutorialDPSIdList ); - return m_TutorialDPSIdList; -} -const std::set< uint32_t >& getTutorialHealerIdList() -{ - if( m_TutorialHealerIdList.size() == 0 ) + return m_TutorialDPSIdList; + } + + const std::set< uint32_t >& getTutorialHealerIdList() + { + if( m_TutorialHealerIdList.size() == 0 ) loadIdList( m_TutorialHealerDat, m_TutorialHealerIdList ); - return m_TutorialHealerIdList; -} -const std::set< uint32_t >& getTutorialTankIdList() -{ - if( m_TutorialTankIdList.size() == 0 ) + return m_TutorialHealerIdList; + } + + const std::set< uint32_t >& getTutorialTankIdList() + { + if( m_TutorialTankIdList.size() == 0 ) loadIdList( m_TutorialTankDat, m_TutorialTankIdList ); - return m_TutorialTankIdList; -} -const std::set< uint32_t >& getVaseFlowerIdList() -{ - if( m_VaseFlowerIdList.size() == 0 ) + return m_TutorialTankIdList; + } + + const std::set< uint32_t >& getVaseFlowerIdList() + { + if( m_VaseFlowerIdList.size() == 0 ) loadIdList( m_VaseFlowerDat, m_VaseFlowerIdList ); - return m_VaseFlowerIdList; -} -const std::set< uint32_t >& getVFXIdList() -{ - if( m_VFXIdList.size() == 0 ) + return m_VaseFlowerIdList; + } + + const std::set< uint32_t >& getVFXIdList() + { + if( m_VFXIdList.size() == 0 ) loadIdList( m_VFXDat, m_VFXIdList ); - return m_VFXIdList; -} -const std::set< uint32_t >& getWarpIdList() -{ - if( m_WarpIdList.size() == 0 ) + return m_VFXIdList; + } + + const std::set< uint32_t >& getWarpIdList() + { + if( m_WarpIdList.size() == 0 ) loadIdList( m_WarpDat, m_WarpIdList ); - return m_WarpIdList; -} -const std::set< uint32_t >& getWarpConditionIdList() -{ - if( m_WarpConditionIdList.size() == 0 ) + return m_WarpIdList; + } + + const std::set< uint32_t >& getWarpConditionIdList() + { + if( m_WarpConditionIdList.size() == 0 ) loadIdList( m_WarpConditionDat, m_WarpConditionIdList ); - return m_WarpConditionIdList; -} -const std::set< uint32_t >& getWeatherIdList() -{ - if( m_WeatherIdList.size() == 0 ) + return m_WarpConditionIdList; + } + + const std::set< uint32_t >& getWeatherIdList() + { + if( m_WeatherIdList.size() == 0 ) loadIdList( m_WeatherDat, m_WeatherIdList ); - return m_WeatherIdList; -} -const std::set< uint32_t >& getWeatherGroupIdList() -{ - if( m_WeatherGroupIdList.size() == 0 ) + return m_WeatherIdList; + } + + const std::set< uint32_t >& getWeatherGroupIdList() + { + if( m_WeatherGroupIdList.size() == 0 ) loadIdList( m_WeatherGroupDat, m_WeatherGroupIdList ); - return m_WeatherGroupIdList; -} -const std::set< uint32_t >& getWeatherRateIdList() -{ - if( m_WeatherRateIdList.size() == 0 ) + return m_WeatherGroupIdList; + } + + const std::set< uint32_t >& getWeatherRateIdList() + { + if( m_WeatherRateIdList.size() == 0 ) loadIdList( m_WeatherRateDat, m_WeatherRateIdList ); - return m_WeatherRateIdList; -} -const std::set< uint32_t >& getWeddingBGMIdList() -{ - if( m_WeddingBGMIdList.size() == 0 ) + return m_WeatherRateIdList; + } + + const std::set< uint32_t >& getWeddingBGMIdList() + { + if( m_WeddingBGMIdList.size() == 0 ) loadIdList( m_WeddingBGMDat, m_WeddingBGMIdList ); - return m_WeddingBGMIdList; -} -const std::set< uint32_t >& getWeeklyBingoOrderDataIdList() -{ - if( m_WeeklyBingoOrderDataIdList.size() == 0 ) + return m_WeddingBGMIdList; + } + + const std::set< uint32_t >& getWeeklyBingoOrderDataIdList() + { + if( m_WeeklyBingoOrderDataIdList.size() == 0 ) loadIdList( m_WeeklyBingoOrderDataDat, m_WeeklyBingoOrderDataIdList ); - return m_WeeklyBingoOrderDataIdList; -} -const std::set< uint32_t >& getWeeklyBingoRewardDataIdList() -{ - if( m_WeeklyBingoRewardDataIdList.size() == 0 ) + return m_WeeklyBingoOrderDataIdList; + } + + const std::set< uint32_t >& getWeeklyBingoRewardDataIdList() + { + if( m_WeeklyBingoRewardDataIdList.size() == 0 ) loadIdList( m_WeeklyBingoRewardDataDat, m_WeeklyBingoRewardDataIdList ); - return m_WeeklyBingoRewardDataIdList; -} -const std::set< uint32_t >& getWeeklyBingoTextIdList() -{ - if( m_WeeklyBingoTextIdList.size() == 0 ) + return m_WeeklyBingoRewardDataIdList; + } + + const std::set< uint32_t >& getWeeklyBingoTextIdList() + { + if( m_WeeklyBingoTextIdList.size() == 0 ) loadIdList( m_WeeklyBingoTextDat, m_WeeklyBingoTextIdList ); - return m_WeeklyBingoTextIdList; -} -const std::set< uint32_t >& getWorldIdList() -{ - if( m_WorldIdList.size() == 0 ) + return m_WeeklyBingoTextIdList; + } + + const std::set< uint32_t >& getWorldIdList() + { + if( m_WorldIdList.size() == 0 ) loadIdList( m_WorldDat, m_WorldIdList ); - return m_WorldIdList; -} -const std::set< uint32_t >& getWorldDCGroupTypeIdList() -{ - if( m_WorldDCGroupTypeIdList.size() == 0 ) + return m_WorldIdList; + } + + const std::set< uint32_t >& getWorldDCGroupTypeIdList() + { + if( m_WorldDCGroupTypeIdList.size() == 0 ) loadIdList( m_WorldDCGroupTypeDat, m_WorldDCGroupTypeIdList ); - return m_WorldDCGroupTypeIdList; -} -const std::set< uint32_t >& getYKWIdList() -{ - if( m_YKWIdList.size() == 0 ) + return m_WorldDCGroupTypeIdList; + } + + const std::set< uint32_t >& getYKWIdList() + { + if( m_YKWIdList.size() == 0 ) loadIdList( m_YKWDat, m_YKWIdList ); - return m_YKWIdList; -} -const std::set< uint32_t >& getZoneSharedGroupIdList() -{ - if( m_ZoneSharedGroupIdList.size() == 0 ) + return m_YKWIdList; + } + + const std::set< uint32_t >& getZoneSharedGroupIdList() + { + if( m_ZoneSharedGroupIdList.size() == 0 ) loadIdList( m_ZoneSharedGroupDat, m_ZoneSharedGroupIdList ); - return m_ZoneSharedGroupIdList; -} + return m_ZoneSharedGroupIdList; + } - }; +}; } } diff --git a/src/common/Forwards.h b/src/common/Forwards.h index 663d5468..aad65318 100644 --- a/src/common/Forwards.h +++ b/src/common/Forwards.h @@ -3,35 +3,34 @@ #include -namespace Core -{ +namespace Core { - class ConfigMgr; +class ConfigMgr; - typedef boost::shared_ptr< ConfigMgr > ConfigMgrPtr; +typedef boost::shared_ptr< ConfigMgr > ConfigMgrPtr; - namespace Network - { - class Hive; - class Acceptor; - class Connection; +namespace Network { +class Hive; - typedef boost::shared_ptr< Hive > HivePtr; - typedef boost::shared_ptr< Acceptor > AcceptorPtr; - typedef boost::shared_ptr< Connection > ConnectionPtr; +class Acceptor; - namespace Packets - { - class GamePacket; - class FFXIVPacketBase; +class Connection; - typedef boost::shared_ptr< GamePacket > GamePacketPtr; - typedef boost::shared_ptr< FFXIVPacketBase > FFXIVPacketBasePtr; - } +typedef boost::shared_ptr< Hive > HivePtr; +typedef boost::shared_ptr< Acceptor > AcceptorPtr; +typedef boost::shared_ptr< Connection > ConnectionPtr; - } +namespace Packets { +class GamePacket; +class FFXIVPacketBase; + +typedef boost::shared_ptr< GamePacket > GamePacketPtr; +typedef boost::shared_ptr< FFXIVPacketBase > FFXIVPacketBasePtr; +} + +} } diff --git a/src/common/Framework.h b/src/common/Framework.h index d6e57fbc..0f6b57b2 100644 --- a/src/common/Framework.h +++ b/src/common/Framework.h @@ -7,30 +7,29 @@ #include #include -namespace Core +namespace Core { + +class Framework { + using TypenameToObject = std::map< std::type_index, boost::shared_ptr< void > >; + TypenameToObject ObjectMap; - class Framework - { - using TypenameToObject = std::map< std::type_index, boost::shared_ptr< void > >; - TypenameToObject ObjectMap; +public: + template< typename T > + boost::shared_ptr< T > get() + { + auto iType = ObjectMap.find( typeid( T ) ); + assert( !( iType == ObjectMap.end() ) ); + return boost::static_pointer_cast< T >( iType->second ); + } - public: - template< typename T > - boost::shared_ptr< T > get() - { - auto iType = ObjectMap.find( typeid( T ) ); - assert( !( iType == ObjectMap.end() ) ); - return boost::static_pointer_cast< T >( iType->second ); - } - - template< typename T > - void set( boost::shared_ptr< T > value ) - { - assert( value ); // why would anyone store nullptrs.... - ObjectMap[typeid( T )] = value; - } - }; + template< typename T > + void set( boost::shared_ptr< T > value ) + { + assert( value ); // why would anyone store nullptrs.... + ObjectMap[ typeid( T ) ] = value; + } +}; } diff --git a/src/common/Logging/Logger.cpp b/src/common/Logging/Logger.cpp index 6beb7a6e..4e00701e 100644 --- a/src/common/Logging/Logger.cpp +++ b/src/common/Logging/Logger.cpp @@ -17,72 +17,75 @@ namespace Core { - Logger::Logger() - { +Logger::Logger() +{ - } +} - Logger::~Logger() - { +Logger::~Logger() +{ - } +} - void Logger::setLogPath(const std::string& logPath) - { - m_logFile = logPath; - } +void Logger::setLogPath( const std::string& logPath ) +{ + m_logFile = logPath; +} - void Logger::init() - { +void Logger::init() +{ - auto format = ( - boost::log::expressions::stream << - boost::log::expressions::format_date_time< boost::posix_time::ptime >("TimeStamp", "[%H:%M:%S]") << - "[" << boost::log::trivial::severity << "] " << - boost::log::expressions::smessage - ); + auto format = ( + boost::log::expressions::stream << + boost::log::expressions::format_date_time< boost::posix_time::ptime >( + "TimeStamp", "[%H:%M:%S]" ) << + "[" << boost::log::trivial::severity << "] " << + boost::log::expressions::smessage + ); - boost::log::add_file_log - ( - boost::log::keywords::file_name = m_logFile + "%Y-%m-%d.log", /*< file name pattern >*/ - boost::log::keywords::rotation_size = 10 * 1024 * 1024, /*< rotate files every 10 MiB... >*/ - boost::log::keywords::time_based_rotation = boost::log::sinks::file::rotation_at_time_point(0, 0, 0), /*< ...or at midnight >*/ - boost::log::keywords::open_mode = std::ios::app, - boost::log::keywords::format = format, - boost::log::keywords::auto_flush = true - ); + boost::log::add_file_log + ( + boost::log::keywords::file_name = + m_logFile + "%Y-%m-%d.log", /*< file name pattern >*/ + boost::log::keywords::rotation_size = + 10 * 1024 * 1024, /*< rotate files every 10 MiB... >*/ + boost::log::keywords::time_based_rotation = boost::log::sinks::file::rotation_at_time_point( 0, 0, + 0 ), /*< ...or at midnight >*/ + boost::log::keywords::open_mode = std::ios::app, + boost::log::keywords::format = format, + boost::log::keywords::auto_flush = true + ); - boost::log::add_console_log(std::cout, boost::log::keywords::format = format); + boost::log::add_console_log( std::cout, boost::log::keywords::format = format ); - boost::log::add_common_attributes(); - } + boost::log::add_common_attributes(); +} - void Logger::Log(LoggingSeverity logSev, const std::string& text) - { - BOOST_LOG_SEV(m_lg, (boost::log::trivial::severity_level)logSev) << text; - } +void Logger::Log( LoggingSeverity logSev, const std::string& text ) +{ + BOOST_LOG_SEV( m_lg, ( boost::log::trivial::severity_level ) logSev ) << text; +} - void Logger::error( const std::string& text ) - { - BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::error ) << text; - } +void Logger::error( const std::string& text ) +{ + BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::error ) << text; +} - void Logger::info( const std::string& text ) - { - BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::info ) << text; - } +void Logger::info( const std::string& text ) +{ + BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::info ) << text; +} - void Logger::debug( const std::string& text ) - { - BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::debug ) << text; - } - - void Logger::fatal( const std::string& text ) - { - BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::fatal ) << text; - } +void Logger::debug( const std::string& text ) +{ + BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::debug ) << text; +} +void Logger::fatal( const std::string& text ) +{ + BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::fatal ) << text; +} } \ No newline at end of file diff --git a/src/common/Logging/Logger.h b/src/common/Logging/Logger.h index 731ba5d0..f85ad5e9 100644 --- a/src/common/Logging/Logger.h +++ b/src/common/Logging/Logger.h @@ -6,46 +6,48 @@ namespace Core { - enum struct LoggingSeverity : uint8_t - { - trace = 0, - debug = 1, - info = 2, - warning = 3, - error = 4, - fatal = 5 - }; +enum struct LoggingSeverity : + uint8_t +{ + trace = 0, + debug = 1, + info = 2, + warning = 3, + error = 4, + fatal = 5 +}; - class Logger - { +class Logger +{ - private: - boost::log::sources::severity_logger_mt< boost::log::trivial::severity_level > m_lg; +private: + boost::log::sources::severity_logger_mt< boost::log::trivial::severity_level > m_lg; - std::string m_logFile; + std::string m_logFile; - public: - Logger(); +public: + Logger(); - ~Logger(); + ~Logger(); - void init(); + void init(); - void Log(LoggingSeverity logSev, const std::string& text); + void Log( LoggingSeverity logSev, const std::string& text ); - void error( const std::string& text ); - void info( const std::string& text ); - void debug( const std::string& text ); - void fatal( const std::string& text ); + void error( const std::string& text ); - void setLogPath(const std::string& logPath); + void info( const std::string& text ); - }; + void debug( const std::string& text ); + void fatal( const std::string& text ); + + void setLogPath( const std::string& logPath ); + +}; } - #endif \ No newline at end of file diff --git a/src/common/Network/Acceptor.cpp b/src/common/Network/Acceptor.cpp index 3560b90d..94134845 100644 --- a/src/common/Network/Acceptor.cpp +++ b/src/common/Network/Acceptor.cpp @@ -4,127 +4,127 @@ #include #include -namespace Core +namespace Core { +namespace Network { + +//----------------------------------------------------------------------------- + +Acceptor::Acceptor( HivePtr hive ) + : + m_hive( hive ), + m_acceptor( hive->GetService() ), + m_io_strand( hive->GetService() ), + m_error_state( 0 ) { - namespace Network - { - - //----------------------------------------------------------------------------- - - Acceptor::Acceptor( HivePtr hive ) - : m_hive( hive ), - m_acceptor( hive->GetService() ), - m_io_strand( hive->GetService() ), - m_error_state( 0 ) - { - } - - Acceptor::~Acceptor() - { - } - - - bool Acceptor::OnAccept( ConnectionPtr connection, const std::string & host, uint16_t port ) - { - return true; - } - - void Acceptor::OnError( const boost::system::error_code & error ) - { - - } - - - void Acceptor::StartError( const boost::system::error_code & error ) - { - if( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 0 ) == 0 ) - { - boost::system::error_code ec; - m_acceptor.cancel( ec ); - m_acceptor.close( ec ); - OnError( error ); - } - } - - void Acceptor::DispatchAccept( ConnectionPtr connection ) - { - m_acceptor.async_accept( connection->GetSocket(), - connection->GetStrand().wrap( boost::bind( &Acceptor::HandleAccept, - shared_from_this(), - _1, - connection ) ) ); - } - - void Acceptor::HandleAccept( const boost::system::error_code & error, ConnectionPtr connection ) - { - if( error || HasError() || m_hive->HasStopped() ) - { - connection->StartError( error ); - } - else - { - if( connection->GetSocket().is_open() ) - { - if( OnAccept( connection, - connection->GetSocket().remote_endpoint().address().to_string(), - connection->GetSocket().remote_endpoint().port() ) ) - { - connection->OnAccept( m_acceptor.local_endpoint().address().to_string(), m_acceptor.local_endpoint().port() ); - connection->Recv(); - } - } - else - { - connection->StartError( error ); - } - } - } - - void Acceptor::Stop() - { - - } - - void Acceptor::Accept( ConnectionPtr connection ) - { - m_io_strand.post( boost::bind( &Acceptor::DispatchAccept, shared_from_this(), connection ) ); - } - - void Acceptor::Listen( const std::string & host, const uint16_t & port ) - { - try - { - boost::asio::ip::tcp::resolver resolver( m_hive->GetService() ); - boost::asio::ip::tcp::resolver::query query( host, std::to_string( port ) ); - boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve( query ); - - m_acceptor.open( endpoint.protocol() ); - m_acceptor.set_option( boost::asio::ip::tcp::acceptor::reuse_address( false ) ); - m_acceptor.bind( endpoint ); - m_acceptor.listen( boost::asio::socket_base::max_connections ); - } - catch( ... ) - { - // this should not happen - assert( true ); - } - - } - - HivePtr Acceptor::GetHive() - { - return m_hive; - } - - boost::asio::ip::tcp::acceptor & Acceptor::GetAcceptor() - { - return m_acceptor; - } - - bool Acceptor::HasError() - { - return ( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 1 ) == 1 ); - } - - } +} + +Acceptor::~Acceptor() +{ +} + + +bool Acceptor::OnAccept( ConnectionPtr connection, const std::string& host, uint16_t port ) +{ + return true; +} + +void Acceptor::OnError( const boost::system::error_code& error ) +{ + +} + + +void Acceptor::StartError( const boost::system::error_code& error ) +{ + if( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 0 ) == 0 ) + { + boost::system::error_code ec; + m_acceptor.cancel( ec ); + m_acceptor.close( ec ); + OnError( error ); + } +} + +void Acceptor::DispatchAccept( ConnectionPtr connection ) +{ + m_acceptor.async_accept( connection->GetSocket(), + connection->GetStrand().wrap( boost::bind( &Acceptor::HandleAccept, + shared_from_this(), + _1, + connection ) ) ); +} + +void Acceptor::HandleAccept( const boost::system::error_code& error, ConnectionPtr connection ) +{ + if( error || HasError() || m_hive->HasStopped() ) + { + connection->StartError( error ); + } + else + { + if( connection->GetSocket().is_open() ) + { + if( OnAccept( connection, + connection->GetSocket().remote_endpoint().address().to_string(), + connection->GetSocket().remote_endpoint().port() ) ) + { + connection->OnAccept( m_acceptor.local_endpoint().address().to_string(), + m_acceptor.local_endpoint().port() ); + connection->Recv(); + } + } + else + { + connection->StartError( error ); + } + } +} + +void Acceptor::Stop() +{ + +} + +void Acceptor::Accept( ConnectionPtr connection ) +{ + m_io_strand.post( boost::bind( &Acceptor::DispatchAccept, shared_from_this(), connection ) ); +} + +void Acceptor::Listen( const std::string& host, const uint16_t& port ) +{ + try + { + boost::asio::ip::tcp::resolver resolver( m_hive->GetService() ); + boost::asio::ip::tcp::resolver::query query( host, std::to_string( port ) ); + boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve( query ); + + m_acceptor.open( endpoint.protocol() ); + m_acceptor.set_option( boost::asio::ip::tcp::acceptor::reuse_address( false ) ); + m_acceptor.bind( endpoint ); + m_acceptor.listen( boost::asio::socket_base::max_connections ); + } + catch( ... ) + { + // this should not happen + assert( true ); + } + +} + +HivePtr Acceptor::GetHive() +{ + return m_hive; +} + +boost::asio::ip::tcp::acceptor& Acceptor::GetAcceptor() +{ + return m_acceptor; +} + +bool Acceptor::HasError() +{ + return ( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 1 ) == 1 ); +} + +} } diff --git a/src/common/Network/Acceptor.h b/src/common/Network/Acceptor.h index 01cfb606..b70b10e6 100644 --- a/src/common/Network/Acceptor.h +++ b/src/common/Network/Acceptor.h @@ -7,72 +7,76 @@ #include #include "Forwards.h" -namespace Core +namespace Core { +namespace Network { + +class Connection; + +class Acceptor : + public boost::enable_shared_from_this< Acceptor > { - namespace Network - { + friend class Hive; - class Connection; +private: + HivePtr m_hive; + boost::asio::ip::tcp::acceptor m_acceptor; + boost::asio::strand m_io_strand; + volatile uint32_t m_error_state; - class Acceptor : public boost::enable_shared_from_this< Acceptor > - { - friend class Hive; +private: + Acceptor( const Acceptor& rhs ); - private: - HivePtr m_hive; - boost::asio::ip::tcp::acceptor m_acceptor; - boost::asio::strand m_io_strand; - volatile uint32_t m_error_state; + Acceptor& operator=( const Acceptor& rhs ); - private: - Acceptor( const Acceptor & rhs ); - Acceptor & operator =( const Acceptor & rhs ); - void StartError( const boost::system::error_code & error ); - void DispatchAccept( ConnectionPtr connection ); - void HandleAccept( const boost::system::error_code & error, ConnectionPtr connection ); + void StartError( const boost::system::error_code& error ); - private: - // Called when a connection has connected to the server. This function - // should return true to invoke the connection's OnAccept function if the - // connection will be kept. If the connection will not be kept, the - // connection's Disconnect function should be called and the function - // should return false. - virtual bool OnAccept( ConnectionPtr connection, const std::string & host, uint16_t port ); + void DispatchAccept( ConnectionPtr connection ); - // Called when an error is encountered. Most typically, this is when the - // acceptor is being closed via the Stop function or if the Listen is - // called on an address that is not available. - virtual void OnError( const boost::system::error_code & error ); + void HandleAccept( const boost::system::error_code& error, ConnectionPtr connection ); - public: - Acceptor( HivePtr hive ); - virtual ~Acceptor(); +private: + // Called when a connection has connected to the server. This function + // should return true to invoke the connection's OnAccept function if the + // connection will be kept. If the connection will not be kept, the + // connection's Disconnect function should be called and the function + // should return false. + virtual bool OnAccept( ConnectionPtr connection, const std::string& host, uint16_t port ); - // Returns the Hive object. - HivePtr GetHive(); + // Called when an error is encountered. Most typically, this is when the + // acceptor is being closed via the Stop function or if the Listen is + // called on an address that is not available. + virtual void OnError( const boost::system::error_code& error ); - // Returns the acceptor object. - boost::asio::ip::tcp::acceptor & GetAcceptor(); +public: + Acceptor( HivePtr hive ); - // Returns the strand object. - boost::asio::strand & GetStrand(); + virtual ~Acceptor(); - // Returns true if this object has an error associated with it. - bool HasError(); + // Returns the Hive object. + HivePtr GetHive(); - public: - // Begin listening on the specific network interface. - void Listen( const std::string & host, const uint16_t & port ); + // Returns the acceptor object. + boost::asio::ip::tcp::acceptor& GetAcceptor(); - // Posts the connection to the listening interface. The next client that - // connections will be given this connection. If multiple calls to Accept - // are called at a time, then they are accepted in a FIFO order. - void Accept( ConnectionPtr connection ); + // Returns the strand object. + boost::asio::strand& GetStrand(); - // Stop the Acceptor from listening. - void Stop(); - }; + // Returns true if this object has an error associated with it. + bool HasError(); - } +public: + // Begin listening on the specific network interface. + void Listen( const std::string& host, const uint16_t& port ); + + // Posts the connection to the listening interface. The next client that + // connections will be given this connection. If multiple calls to Accept + // are called at a time, then they are accepted in a FIFO order. + void Accept( ConnectionPtr connection ); + + // Stop the Acceptor from listening. + void Stop(); +}; + +} } #endif diff --git a/src/common/Network/CommonActorControl.h b/src/common/Network/CommonActorControl.h index 6d44a884..3b96f952 100644 --- a/src/common/Network/CommonActorControl.h +++ b/src/common/Network/CommonActorControl.h @@ -12,289 +12,290 @@ // They are also defined within the Core::Common namespace to avoid collisions. // +--------------------------------------------------------------------------- namespace Core { - namespace Network { - namespace ActorControl { +namespace Network { +namespace ActorControl { - enum ActorControlType : uint16_t - { - /*! Toggles weapon status -> Sheathed/UnSheathed - \param param1 status 0|1 */ - ToggleWeapon = 0x00, - /*! Toggles Autoattack status on/off - \param param1 status 0|1 */ - AutoAttack = 0x01, - SetStatus = 0x02, - CastStart = 0x03, - ToggleAggro = 0x04, - ClassJobChange = 0x05, - DefeatMsg = 0x06, - GainExpMsg = 0x07, +enum ActorControlType : + uint16_t +{ + /*! Toggles weapon status -> Sheathed/UnSheathed + \param param1 status 0|1 */ + ToggleWeapon = 0x00, + /*! Toggles Autoattack status on/off + \param param1 status 0|1 */ + AutoAttack = 0x01, + SetStatus = 0x02, + CastStart = 0x03, + ToggleAggro = 0x04, + ClassJobChange = 0x05, + DefeatMsg = 0x06, + GainExpMsg = 0x07, - LevelUpEffect = 0x0A, + LevelUpEffect = 0x0A, - ExpChainMsg = 0x0C, - HpSetStat = 0x0D, - DeathAnimation = 0x0E, - CastInterrupt = 0x0F, + ExpChainMsg = 0x0C, + HpSetStat = 0x0D, + DeathAnimation = 0x0E, + CastInterrupt = 0x0F, - ActionStart = 0x11, + ActionStart = 0x11, - StatusEffectGain = 0x14, - StatusEffectLose = 0x15, + StatusEffectGain = 0x14, + StatusEffectLose = 0x15, - HPFloatingText = 0x17, - UpdateRestedExp = 0x018, - Unk2 = 0x19, + HPFloatingText = 0x17, + UpdateRestedExp = 0x018, + Unk2 = 0x19, - Flee = 0x1B, + Flee = 0x1B, - Unk3 = 0x20, // Animation related? + Unk3 = 0x20, // Animation related? - CombatIndicationShow = 0x22, + CombatIndicationShow = 0x22, - SpawnEffect = 0x25, - ToggleInvisible = 0x26, + SpawnEffect = 0x25, + ToggleInvisible = 0x26, - ToggleActionUnlock = 0x29, + ToggleActionUnlock = 0x29, - UpdateUiExp = 0x2B, - DmgTakenMsg = 0x2D, + UpdateUiExp = 0x2B, + DmgTakenMsg = 0x2D, - SetTarget = 0x32, - ToggleNameHidden = 0x36, + SetTarget = 0x32, + ToggleNameHidden = 0x36, - LimitbreakStart = 0x47, - LimitbreakPartyStart = 0x48, - BubbleText = 0x49, + LimitbreakStart = 0x47, + LimitbreakPartyStart = 0x48, + BubbleText = 0x49, - DamageEffect = 0x50, - RaiseAnimation = 0x51, - TreasureScreenMsg = 0x57, - SetOwnerId = 0x59, - ItemRepairMsg = 0x5C, + DamageEffect = 0x50, + RaiseAnimation = 0x51, + TreasureScreenMsg = 0x57, + SetOwnerId = 0x59, + ItemRepairMsg = 0x5C, - DirectorInit = 0x64, - DirectorClear = 0x65, + DirectorInit = 0x64, + DirectorClear = 0x65, - LeveStartAnim = 0x66, - LeveStartError = 0x67, - DirectorEObjMod = 0x6A, + LeveStartAnim = 0x66, + LeveStartError = 0x67, + DirectorEObjMod = 0x6A, - DirectorUpdate = 0x6D, + DirectorUpdate = 0x6D, - ItemObtainMsg = 0x75, - DutyQuestScreenMsg = 0x7B, + ItemObtainMsg = 0x75, + DutyQuestScreenMsg = 0x7B, - ItemObtainIcon = 0x84, - FateItemFailMsg = 0x85, - ItemFailMsg = 0x86, - ActionLearnMsg1 = 0x87, + ItemObtainIcon = 0x84, + FateItemFailMsg = 0x85, + ItemFailMsg = 0x86, + ActionLearnMsg1 = 0x87, - FreeEventPos = 0x8A, + FreeEventPos = 0x8A, - SetBGM = 0xA1, + SetBGM = 0xA1, - UnlockAetherCurrentMsg = 0xA4, + UnlockAetherCurrentMsg = 0xA4, - RemoveName = 0xA8, + RemoveName = 0xA8, - ScreenFadeOut = 0xAA, + ScreenFadeOut = 0xAA, - ZoneIn = 0xC8, - ZoneInDefaultPos = 0xC9, + ZoneIn = 0xC8, + ZoneInDefaultPos = 0xC9, - TeleportStart = 0xCB, + TeleportStart = 0xCB, - TeleportDone = 0xCD, - TeleportDoneFadeOut = 0xCE, - DespawnZoneScreenMsg = 0xCF, + TeleportDone = 0xCD, + TeleportDoneFadeOut = 0xCE, + DespawnZoneScreenMsg = 0xCF, - InstanceSelectDlg = 0xD2, - ActorDespawnEffect = 0xD4, + InstanceSelectDlg = 0xD2, + ActorDespawnEffect = 0xD4, - CompanionUnlock = 0xFD, - ObtainBarding = 0xFE, - EquipBarding = 0xFF, + CompanionUnlock = 0xFD, + ObtainBarding = 0xFE, + EquipBarding = 0xFF, - CompanionMsg1 = 0x102, - CompanionMsg2 = 0x103, - ShowPetHotbar = 0x104, + CompanionMsg1 = 0x102, + CompanionMsg2 = 0x103, + ShowPetHotbar = 0x104, - ActionLearnMsg = 0x109, - ActorFadeOut = 0x10A, - ActorFadeIn = 0x10B, - WithdrawMsg = 0x10C, - OrderMinion = 0x10D, - ToggleMinion = 0x10E, - LearnMinion = 0x10F, - ActorFateOut1 = 0x110, + ActionLearnMsg = 0x109, + ActorFadeOut = 0x10A, + ActorFadeIn = 0x10B, + WithdrawMsg = 0x10C, + OrderMinion = 0x10D, + ToggleMinion = 0x10E, + LearnMinion = 0x10F, + ActorFateOut1 = 0x110, - Emote = 0x122, - EmoteInterrupt = 0x123, + Emote = 0x122, + EmoteInterrupt = 0x123, - SetPose = 0x127, + SetPose = 0x127, - CraftingUnk = 0x12C, + CraftingUnk = 0x12C, - GatheringSenseMsg = 0x130, - PartyMsg = 0x131, - GatheringSenseMsg1 = 0x132, + GatheringSenseMsg = 0x130, + PartyMsg = 0x131, + GatheringSenseMsg1 = 0x132, - GatheringSenseMsg2 = 0x138, + GatheringSenseMsg2 = 0x138, - FishingMsg = 0x140, + FishingMsg = 0x140, - FishingBaitMsg = 0x145, + FishingBaitMsg = 0x145, - FishingReachMsg = 0x147, - FishingFailMsg = 0x148, + FishingReachMsg = 0x147, + FishingFailMsg = 0x148, - MateriaConvertMsg = 0x15E, - MeldSuccessMsg = 0x15F, - MeldFailMsg = 0x160, - MeldModeToggle = 0x161, + MateriaConvertMsg = 0x15E, + MeldSuccessMsg = 0x15F, + MeldFailMsg = 0x160, + MeldModeToggle = 0x161, - AetherRestoreMsg = 0x163, + AetherRestoreMsg = 0x163, - DyeMsg = 0x168, + DyeMsg = 0x168, - ToggleCrestMsg = 0x16A, - ToggleBulkCrestMsg = 0x16B, - MateriaRemoveMsg = 0x16C, - GlamourCastMsg = 0x16D, - GlamourRemoveMsg = 0x16E, + ToggleCrestMsg = 0x16A, + ToggleBulkCrestMsg = 0x16B, + MateriaRemoveMsg = 0x16C, + GlamourCastMsg = 0x16D, + GlamourRemoveMsg = 0x16E, - RelicInfuseMsg = 0x179, + RelicInfuseMsg = 0x179, - AetherReductionDlg = 0x17D, + AetherReductionDlg = 0x17D, - Unk6 = 0x19C, - EObjAnimation = 0x19D, + Unk6 = 0x19C, + EObjAnimation = 0x19D, - SetTitle = 0x1F4, + SetTitle = 0x1F4, - SetStatusIcon = 0x1F8, - LimitBreakGauge = 0x1F9, // Max level, amount, build type (chop sound), lb type(0=pve lb 1=pvp lb) - SetHomepoint = 0x1FB, - SetFavorite = 0x1FC, - LearnTeleport = 0x1FD, + SetStatusIcon = 0x1F8, + LimitBreakGauge = 0x1F9, // Max level, amount, build type (chop sound), lb type(0=pve lb 1=pvp lb) + SetHomepoint = 0x1FB, + SetFavorite = 0x1FC, + LearnTeleport = 0x1FD, - OpenRecommendationGuide = 0x200, - ArmoryErrorMsg = 0x201, + OpenRecommendationGuide = 0x200, + ArmoryErrorMsg = 0x201, - AchievementPopup = 0x203, + AchievementPopup = 0x203, - Unk7 = 0x205, // LogMessage? - AchievementMsg = 0x206, + Unk7 = 0x205, // LogMessage? + AchievementMsg = 0x206, - SetItemLevel = 0x209, + SetItemLevel = 0x209, - ChallengeEntryCompleteMsg = 0x20B, - ChallengeEntryUnlockMsg = 0x20C, + ChallengeEntryCompleteMsg = 0x20B, + ChallengeEntryUnlockMsg = 0x20C, - GilTrailMsg = 0x211, + GilTrailMsg = 0x211, - SetMaxGearSets = 0x230, + SetMaxGearSets = 0x230, - SetCharaGearParamUI = 0x260, - ToggleWireframeRendering = 0x261, + SetCharaGearParamUI = 0x260, + ToggleWireframeRendering = 0x261, - GearSetEquipMsg = 0x321, + GearSetEquipMsg = 0x321, - SetFestival = 0x386, // param1: festival.exd index + SetFestival = 0x386, // param1: festival.exd index - ToggleOrchestrionUnlock = 0x396, - Dismount = 0x3A0, + ToggleOrchestrionUnlock = 0x396, + Dismount = 0x3A0, - // Duty Recorder - BeginReplayAck = 0x3A1, - EndReplayAck = 0x3A2, + // Duty Recorder + BeginReplayAck = 0x3A1, + EndReplayAck = 0x3A2, - // PvP Duel - SetPvPState = 0x5E0, // param3 must be 6 to engage a duel (hardcoded in the client) - EndDuelSession = 0x5E1, // because someone went oob? - StartDuelCountdown = 0x5E2, // begins a countdown; also does some duel bgm thing. - StartDuel = 0x5E3, // actually all it does is set the challenger actor id; - DuelResultScreen = 0x5E4, // win/lose thing, also reset a target id just like what EndDuelSession does. + // PvP Duel + SetPvPState = 0x5E0, // param3 must be 6 to engage a duel (hardcoded in the client) + EndDuelSession = 0x5E1, // because someone went oob? + StartDuelCountdown = 0x5E2, // begins a countdown; also does some duel bgm thing. + StartDuel = 0x5E3, // actually all it does is set the challenger actor id; + DuelResultScreen = 0x5E4, // win/lose thing, also reset a target id just like what EndDuelSession does. - // Duty Action - SetDutyActionId = 0x5E8, // ContentExAction - SetDutyActionHud = 0x5E9, // disable/enable - SetDutyActionActive = 0x5EA, - SetDutyActionRemaining = 0x5EB, - }; + // Duty Action + SetDutyActionId = 0x5E8, // ContentExAction + SetDutyActionHud = 0x5E9, // disable/enable + SetDutyActionActive = 0x5EA, + SetDutyActionRemaining = 0x5EB, +}; - enum ClientTriggerType - { - ToggleSheathe = 0x01, - ToggleAutoAttack = 0x02, - ChangeTarget = 0x03, +enum ClientTriggerType +{ + ToggleSheathe = 0x01, + ToggleAutoAttack = 0x02, + ChangeTarget = 0x03, - DismountReq = 0x65, + DismountReq = 0x65, - RemoveStatusEffect = 0x68, - CastCancel = 0x69, + RemoveStatusEffect = 0x68, + CastCancel = 0x69, - Return = 0xC8, // return dead / accept raise - FinishZoning = 0xC9, - Teleport = 0xCA, + Return = 0xC8, // return dead / accept raise + FinishZoning = 0xC9, + Teleport = 0xCA, - MarkPlayer = 0x12D, // Mark player, visible to party only - SetTitleReq = 0x12E, - TitleList = 0x12F, + MarkPlayer = 0x12D, // Mark player, visible to party only + SetTitleReq = 0x12E, + TitleList = 0x12F, - UpdatedSeenHowTos = 0x133, - AllotAttribute = 0x135, + UpdatedSeenHowTos = 0x133, + AllotAttribute = 0x135, - ClearWaymarks = 0x13A, - CameraMode = 0x13B, // param12, 1 = camera mode enable, 0 = disable + ClearWaymarks = 0x13A, + CameraMode = 0x13B, // param12, 1 = camera mode enable, 0 = disable - HuntingLogDetails = 0x194, + HuntingLogDetails = 0x194, - Timers = 0x1AB, + Timers = 0x1AB, - DyeItem = 0x1B5, + DyeItem = 0x1B5, - RequestChocoboInventory = 0x1C4, + RequestChocoboInventory = 0x1C4, - EmoteReq = 0x1F4, - EmoteCancel = 0x1F6, - PersistentEmoteCancel = 0x1F7, - PoseChange = 0x1F9, - PoseReapply = 0x1FA, - PoseCancel = 0x1FB, + EmoteReq = 0x1F4, + EmoteCancel = 0x1F6, + PersistentEmoteCancel = 0x1F7, + PoseChange = 0x1F9, + PoseReapply = 0x1FA, + PoseCancel = 0x1FB, - AchievementCrit = 0x202, - AchievementComp = 0x203, - AchievementCatChat = 0x206, + AchievementCrit = 0x202, + AchievementComp = 0x203, + AchievementCatChat = 0x206, - DirectorInitFinish = 0x321, + DirectorInitFinish = 0x321, - DirectorSync = 0x328, // unsure what exactly triggers it, starts director when returning to instance though + DirectorSync = 0x328, // unsure what exactly triggers it, starts director when returning to instance though - EnterTerritoryEventFinished = 0x330, - RequestInstanceLeave = 0x333, // df menu button + EnterTerritoryEventFinished = 0x330, + RequestInstanceLeave = 0x333, // df menu button - AchievementCritReq = 0x3E8, - AchievementList = 0x3E9, + AchievementCritReq = 0x3E8, + AchievementList = 0x3E9, - CompanionAction = 0x6A4, - CompanionSetBarding = 0x6A5, - CompanionActionUnlock = 0x6A6, + CompanionAction = 0x6A4, + CompanionSetBarding = 0x6A5, + CompanionActionUnlock = 0x6A6, - OpenPerformInstrumentUI = 0x71C, + OpenPerformInstrumentUI = 0x71C, - StartReplay = 0x7BC, - EndReplay = 0x7BD, // request for restoring the original player state (actor, buff, gauge, etc..) + StartReplay = 0x7BC, + EndReplay = 0x7BD, // request for restoring the original player state (actor, buff, gauge, etc..) - OpenDuelUI = 0x898, // Open a duel ui - DuelRequestResult = 0x899, // either accept/reject + OpenDuelUI = 0x898, // Open a duel ui + DuelRequestResult = 0x899, // either accept/reject - }; +}; - } /* ActorControl */ - } /* Common */ +} /* ActorControl */ +} /* Common */ } /* Core */ #endif diff --git a/src/common/Network/CommonNetwork.h b/src/common/Network/CommonNetwork.h index a6901f2e..1ce7c50b 100644 --- a/src/common/Network/CommonNetwork.h +++ b/src/common/Network/CommonNetwork.h @@ -53,31 +53,31 @@ namespace Packets { */ struct FFXIVARR_PACKET_HEADER { - /** Unknown data, no actual use has been determined */ - uint64_t unknown_0; - uint64_t unknown_8; - /** Represents the number of milliseconds since epoch that the packet was sent. */ - uint64_t timestamp; - /** The size of the packet header and its payload */ - uint32_t size; - /** The type of this connection - 1 zone, 2 chat*/ - uint16_t connectionType; - /** The number of packet segments that follow. */ - uint16_t count; - uint8_t unknown_20; - /** Indicates if the data segments of this packet are compressed. */ - uint8_t isCompressed; - uint32_t unknown_24; + /** Unknown data, no actual use has been determined */ + uint64_t unknown_0; + uint64_t unknown_8; + /** Represents the number of milliseconds since epoch that the packet was sent. */ + uint64_t timestamp; + /** The size of the packet header and its payload */ + uint32_t size; + /** The type of this connection - 1 zone, 2 chat*/ + uint16_t connectionType; + /** The number of packet segments that follow. */ + uint16_t count; + uint8_t unknown_20; + /** Indicates if the data segments of this packet are compressed. */ + uint8_t isCompressed; + uint32_t unknown_24; }; -inline ostream& operator << ( ostream& os, const FFXIVARR_PACKET_HEADER& hdr ) +inline ostream& operator<<( ostream& os, const FFXIVARR_PACKET_HEADER& hdr ) { - return os.write( reinterpret_cast< const char* >( &hdr ), sizeof hdr ); + return os.write( reinterpret_cast< const char* >( &hdr ), sizeof hdr ); } -inline istream& operator >> ( istream& is, FFXIVARR_PACKET_HEADER& hdr ) +inline istream& operator>>( istream& is, FFXIVARR_PACKET_HEADER& hdr ) { - return is.read( reinterpret_cast< char* >( &hdr ), sizeof hdr ); + return is.read( reinterpret_cast< char* >( &hdr ), sizeof hdr ); } /** @@ -97,37 +97,41 @@ inline istream& operator >> ( istream& is, FFXIVARR_PACKET_HEADER& hdr ) */ struct FFXIVARR_PACKET_SEGMENT_HEADER { - /** The size of the segment header and its data. */ - uint32_t size; - /** The session ID this segment describes. */ - uint32_t source_actor; - /** The session ID this packet is being delivered to. */ - uint32_t target_actor; - /** The segment type. (1, 2, 3, 7, 8, 9, 10) */ - uint16_t type; - uint16_t padding; + /** The size of the segment header and its data. */ + uint32_t size; + /** The session ID this segment describes. */ + uint32_t source_actor; + /** The session ID this packet is being delivered to. */ + uint32_t target_actor; + /** The segment type. (1, 2, 3, 7, 8, 9, 10) */ + uint16_t type; + uint16_t padding; }; -inline ostream& operator << ( ostream& os, const FFXIVARR_PACKET_SEGMENT_HEADER& hdr ) +inline ostream& operator<<( ostream& os, const FFXIVARR_PACKET_SEGMENT_HEADER& hdr ) { - return os.write( reinterpret_cast< const char* >( &hdr ), sizeof hdr ); + return os.write( reinterpret_cast< const char* >( &hdr ), sizeof hdr ); } -inline istream& operator >> ( istream& is, FFXIVARR_PACKET_SEGMENT_HEADER& hdr ) +inline istream& operator>>( istream& is, FFXIVARR_PACKET_SEGMENT_HEADER& hdr ) { - return is.read( reinterpret_cast< char* >( &hdr ), sizeof hdr ); + return is.read( reinterpret_cast< char* >( &hdr ), sizeof hdr ); } -template < int T > struct FFXIVIpcBasePacket +template< int T > +struct FFXIVIpcBasePacket { - /** Creates a constant representing the IPC type */ - enum { _ServerIpcType = T }; + /** Creates a constant representing the IPC type */ + enum + { + _ServerIpcType = T + }; }; struct FFXIVARR_PACKET_RAW { - FFXIVARR_PACKET_SEGMENT_HEADER segHdr; - std::vector< uint8_t > data; + FFXIVARR_PACKET_SEGMENT_HEADER segHdr; + std::vector< uint8_t > data; }; /** @@ -137,11 +141,11 @@ struct FFXIVARR_PACKET_RAW */ enum FFXIVARR_SEGMENT_TYPE { - SEGMENTTYPE_SESSIONINIT = 1, - SEGMENTTYPE_IPC = 3, - SEGMENTTYPE_KEEPALIVE = 7, - //SEGMENTTYPE_RESPONSE = 8, - SEGMENTTYPE_ENCRYPTIONINIT = 9, + SEGMENTTYPE_SESSIONINIT = 1, + SEGMENTTYPE_IPC = 3, + SEGMENTTYPE_KEEPALIVE = 7, + //SEGMENTTYPE_RESPONSE = 8, + SEGMENTTYPE_ENCRYPTIONINIT = 9, }; /** @@ -159,22 +163,22 @@ enum FFXIVARR_SEGMENT_TYPE */ struct FFXIVARR_IPC_HEADER { - uint16_t reserved; - uint16_t type; - uint16_t padding; - uint16_t serverId; - uint32_t timestamp; - uint32_t padding1; + uint16_t reserved; + uint16_t type; + uint16_t padding; + uint16_t serverId; + uint32_t timestamp; + uint32_t padding1; }; -inline ostream& operator << ( ostream& os, const FFXIVARR_IPC_HEADER& hdr ) +inline ostream& operator<<( ostream& os, const FFXIVARR_IPC_HEADER& hdr ) { - return os.write( reinterpret_cast< const char* >( &hdr ), sizeof hdr ); + return os.write( reinterpret_cast< const char* >( &hdr ), sizeof hdr ); } -inline istream& operator >> ( istream& is, FFXIVARR_IPC_HEADER& hdr ) +inline istream& operator>>( istream& is, FFXIVARR_IPC_HEADER& hdr ) { - return is.read( reinterpret_cast< char* >( &hdr ), sizeof hdr ); + return is.read( reinterpret_cast< char* >( &hdr ), sizeof hdr ); } } /* Packets */ diff --git a/src/common/Network/Connection.cpp b/src/common/Network/Connection.cpp index 6e4040b2..9b314f18 100644 --- a/src/common/Network/Connection.cpp +++ b/src/common/Network/Connection.cpp @@ -4,207 +4,210 @@ #include namespace Core { - namespace Network { - //----------------------------------------------------------------------------- +namespace Network { +//----------------------------------------------------------------------------- - Connection::Connection( HivePtr hive ) - : m_hive( hive ), - m_socket( hive->GetService() ), - m_io_strand( hive->GetService() ), - m_receive_buffer_size( 32000 ), - m_error_state( 0 ) - { - } +Connection::Connection( HivePtr hive ) + : + m_hive( hive ), + m_socket( hive->GetService() ), + m_io_strand( hive->GetService() ), + m_receive_buffer_size( 32000 ), + m_error_state( 0 ) +{ +} - Connection::~Connection() - { - } +Connection::~Connection() +{ +} - void Connection::Bind( const std::string & ip, uint16_t port ) - { - boost::asio::ip::tcp::endpoint endpoint( boost::asio::ip::address::from_string( ip ), port ); - m_socket.open( endpoint.protocol() ); - m_socket.set_option( boost::asio::ip::tcp::acceptor::reuse_address( false ) ); - m_socket.bind( endpoint ); - } +void Connection::Bind( const std::string& ip, uint16_t port ) +{ + boost::asio::ip::tcp::endpoint endpoint( boost::asio::ip::address::from_string( ip ), port ); + m_socket.open( endpoint.protocol() ); + m_socket.set_option( boost::asio::ip::tcp::acceptor::reuse_address( false ) ); + m_socket.bind( endpoint ); +} - void Connection::StartSend() - { - if( !m_pending_sends.empty() ) - { - boost::asio::async_write( m_socket, - boost::asio::buffer( m_pending_sends.front() ), - m_io_strand.wrap( boost::bind( &Connection::HandleSend, - shared_from_this(), - boost::asio::placeholders::error, - m_pending_sends.begin() ) ) ); - } - } +void Connection::StartSend() +{ + if( !m_pending_sends.empty() ) + { + boost::asio::async_write( m_socket, + boost::asio::buffer( m_pending_sends.front() ), + m_io_strand.wrap( boost::bind( &Connection::HandleSend, + shared_from_this(), + boost::asio::placeholders::error, + m_pending_sends.begin() ) ) ); + } +} - void Connection::StartRecv( int32_t total_bytes ) - { - if( total_bytes > 0 ) - { - m_recv_buffer.resize( total_bytes ); - boost::asio::async_read( m_socket, - boost::asio::buffer( m_recv_buffer ), - m_io_strand.wrap( boost::bind( &Connection::HandleRecv, - shared_from_this(), - _1, - _2 ) ) ); - } - else - { - m_recv_buffer.resize( m_receive_buffer_size ); - m_socket.async_read_some( boost::asio::buffer( m_recv_buffer ), - m_io_strand.wrap( boost::bind( &Connection::HandleRecv, - shared_from_this(), - _1, - _2 ) ) ); - } - } +void Connection::StartRecv( int32_t total_bytes ) +{ + if( total_bytes > 0 ) + { + m_recv_buffer.resize( total_bytes ); + boost::asio::async_read( m_socket, + boost::asio::buffer( m_recv_buffer ), + m_io_strand.wrap( boost::bind( &Connection::HandleRecv, + shared_from_this(), + _1, + _2 ) ) ); + } + else + { + m_recv_buffer.resize( m_receive_buffer_size ); + m_socket.async_read_some( boost::asio::buffer( m_recv_buffer ), + m_io_strand.wrap( boost::bind( &Connection::HandleRecv, + shared_from_this(), + _1, + _2 ) ) ); + } +} - void Connection::StartError( const boost::system::error_code & error ) - { - if( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 0 ) == 0 ) - { - boost::system::error_code ec; - m_socket.shutdown( boost::asio::ip::tcp::socket::shutdown_both, ec ); - m_socket.close( ec ); - OnError( error ); - } - } +void Connection::StartError( const boost::system::error_code& error ) +{ + if( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 0 ) == 0 ) + { + boost::system::error_code ec; + m_socket.shutdown( boost::asio::ip::tcp::socket::shutdown_both, ec ); + m_socket.close( ec ); + OnError( error ); + } +} - void Connection::HandleConnect( const boost::system::error_code & error ) - { - if( error || HasError() || m_hive->HasStopped() ) - { - StartError( error ); - } - else - { - if( m_socket.is_open() ) - { - OnConnect( m_socket.remote_endpoint().address().to_string(), m_socket.remote_endpoint().port() ); - Recv(); - } - else - { - StartError( error ); - } - } - } +void Connection::HandleConnect( const boost::system::error_code& error ) +{ + if( error || HasError() || m_hive->HasStopped() ) + { + StartError( error ); + } + else + { + if( m_socket.is_open() ) + { + OnConnect( m_socket.remote_endpoint().address().to_string(), m_socket.remote_endpoint().port() ); + Recv(); + } + else + { + StartError( error ); + } + } +} - void Connection::HandleSend( const boost::system::error_code & error, std::list< std::vector< uint8_t > >::iterator itr ) - { - if( error || HasError() || m_hive->HasStopped() ) - { - StartError( error ); - } - else - { - OnSend( *itr ); - m_pending_sends.erase( itr ); - StartSend(); - } - } +void +Connection::HandleSend( const boost::system::error_code& error, std::list< std::vector< uint8_t > >::iterator itr ) +{ + if( error || HasError() || m_hive->HasStopped() ) + { + StartError( error ); + } + else + { + OnSend( *itr ); + m_pending_sends.erase( itr ); + StartSend(); + } +} - void Connection::HandleRecv( const boost::system::error_code & error, int32_t actual_bytes ) - { - if( error || HasError() || m_hive->HasStopped() ) - { - StartError( error ); - } - else - { - m_recv_buffer.resize( actual_bytes ); - OnRecv( m_recv_buffer ); - Recv(); - m_pending_recvs.pop_front(); - if( !m_pending_recvs.empty() ) - { - StartRecv( m_pending_recvs.front() ); - } - } - } +void Connection::HandleRecv( const boost::system::error_code& error, int32_t actual_bytes ) +{ + if( error || HasError() || m_hive->HasStopped() ) + { + StartError( error ); + } + else + { + m_recv_buffer.resize( actual_bytes ); + OnRecv( m_recv_buffer ); + Recv(); + m_pending_recvs.pop_front(); + if( !m_pending_recvs.empty() ) + { + StartRecv( m_pending_recvs.front() ); + } + } +} - void Connection::DispatchSend( std::vector< uint8_t > buffer ) - { - bool should_start_send = m_pending_sends.empty(); - m_pending_sends.push_back( buffer ); - if( should_start_send ) - { - StartSend(); - } - } +void Connection::DispatchSend( std::vector< uint8_t > buffer ) +{ + bool should_start_send = m_pending_sends.empty(); + m_pending_sends.push_back( buffer ); + if( should_start_send ) + { + StartSend(); + } +} - void Connection::DispatchRecv( int32_t total_bytes ) - { - bool should_start_receive = m_pending_recvs.empty(); - m_pending_recvs.push_back( total_bytes ); - if( should_start_receive ) - { - StartRecv( total_bytes ); - } - } +void Connection::DispatchRecv( int32_t total_bytes ) +{ + bool should_start_receive = m_pending_recvs.empty(); + m_pending_recvs.push_back( total_bytes ); + if( should_start_receive ) + { + StartRecv( total_bytes ); + } +} - void Connection::Connect( const std::string & host, uint16_t port) - { - boost::asio::ip::tcp::resolver resolver( m_hive->GetService() ); - boost::asio::ip::tcp::resolver::query query( host, std::to_string( port ) ); - boost::asio::ip::tcp::resolver::iterator iterator = resolver.resolve( query ); - m_socket.async_connect( *iterator, m_io_strand.wrap( boost::bind( &Connection::HandleConnect, shared_from_this(), _1 ) ) ); +void Connection::Connect( const std::string& host, uint16_t port ) +{ + boost::asio::ip::tcp::resolver resolver( m_hive->GetService() ); + boost::asio::ip::tcp::resolver::query query( host, std::to_string( port ) ); + boost::asio::ip::tcp::resolver::iterator iterator = resolver.resolve( query ); + m_socket.async_connect( *iterator, + m_io_strand.wrap( boost::bind( &Connection::HandleConnect, shared_from_this(), _1 ) ) ); - } +} - void Connection::Disconnect() - { - OnDisconnect(); - m_socket.close(); - } +void Connection::Disconnect() +{ + OnDisconnect(); + m_socket.close(); +} - void Connection::Recv( int32_t total_bytes ) - { - m_io_strand.post( boost::bind( &Connection::DispatchRecv, shared_from_this(), total_bytes ) ); - } +void Connection::Recv( int32_t total_bytes ) +{ + m_io_strand.post( boost::bind( &Connection::DispatchRecv, shared_from_this(), total_bytes ) ); +} - void Connection::Send( const std::vector< uint8_t > & buffer ) - { - m_io_strand.post( boost::bind( &Connection::DispatchSend, shared_from_this(), buffer ) ); - } +void Connection::Send( const std::vector< uint8_t >& buffer ) +{ + m_io_strand.post( boost::bind( &Connection::DispatchSend, shared_from_this(), buffer ) ); +} - boost::asio::ip::tcp::socket & Connection::GetSocket() - { - return m_socket; - } +boost::asio::ip::tcp::socket& Connection::GetSocket() +{ + return m_socket; +} - boost::asio::strand & Connection::GetStrand() - { - return m_io_strand; - } +boost::asio::strand& Connection::GetStrand() +{ + return m_io_strand; +} - HivePtr Connection::GetHive() - { - return m_hive; - } +HivePtr Connection::GetHive() +{ + return m_hive; +} - void Connection::SetReceiveBufferSize( int32_t size ) - { - m_receive_buffer_size = size; - } +void Connection::SetReceiveBufferSize( int32_t size ) +{ + m_receive_buffer_size = size; +} - int32_t Connection::GetReceiveBufferSize() const - { - return m_receive_buffer_size; - } +int32_t Connection::GetReceiveBufferSize() const +{ + return m_receive_buffer_size; +} - bool Connection::HasError() - { - return ( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 1 ) == 1 ); - } +bool Connection::HasError() +{ + return ( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 1 ) == 1 ); +} - } +} } //----------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/common/Network/Connection.h b/src/common/Network/Connection.h index 342d79c6..bb4decf6 100644 --- a/src/common/Network/Connection.h +++ b/src/common/Network/Connection.h @@ -14,130 +14,156 @@ namespace Core { - namespace Network { - //----------------------------------------------------------------------------- +namespace Network { +//----------------------------------------------------------------------------- - class Hive; - class Acceptor; - class Connection; +class Hive; - //----------------------------------------------------------------------------- +class Acceptor; - class Connection : public boost::enable_shared_from_this< Connection > - { - friend class Acceptor; - friend class Hive; +class Connection; - protected: - HivePtr m_hive; - boost::asio::ip::tcp::socket m_socket; - boost::asio::strand m_io_strand; - std::vector< uint8_t > m_recv_buffer; - std::list< int32_t > m_pending_recvs; - std::list< std::vector< uint8_t > > m_pending_sends; - int32_t m_receive_buffer_size; - volatile uint32_t m_error_state; +//----------------------------------------------------------------------------- + +class Connection : + public boost::enable_shared_from_this< Connection > +{ + friend class Acceptor; + + friend class Hive; + +protected: + HivePtr m_hive; + boost::asio::ip::tcp::socket m_socket; + boost::asio::strand m_io_strand; + std::vector< uint8_t > m_recv_buffer; + std::list< int32_t > m_pending_recvs; + std::list< std::vector< uint8_t > > m_pending_sends; + int32_t m_receive_buffer_size; + volatile uint32_t m_error_state; - Connection( HivePtr hive ); - virtual ~Connection(); + Connection( HivePtr hive ); - private: - Connection( const Connection & rhs ); - Connection & operator =( const Connection & rhs ); - void StartSend(); - void StartRecv( int32_t total_bytes ); - void StartError( const boost::system::error_code & error ); - void DispatchSend( std::vector< uint8_t > buffer ); - void DispatchRecv( int32_t total_bytes ); - void HandleConnect( const boost::system::error_code & error ); - void HandleSend( const boost::system::error_code & error, std::list< std::vector< uint8_t > >::iterator itr ); - void HandleRecv( const boost::system::error_code & error, int32_t actual_bytes ); + virtual ~Connection(); + +private: + Connection( const Connection& rhs ); + + Connection& operator=( const Connection& rhs ); + + void StartSend(); + + void StartRecv( int32_t total_bytes ); + + void StartError( const boost::system::error_code& error ); + + void DispatchSend( std::vector< uint8_t > buffer ); + + void DispatchRecv( int32_t total_bytes ); + + void HandleConnect( const boost::system::error_code& error ); + + void HandleSend( const boost::system::error_code& error, std::list< std::vector< uint8_t > >::iterator itr ); + + void HandleRecv( const boost::system::error_code& error, int32_t actual_bytes ); - private: - // Called when the connection has successfully connected to the local host. - virtual void OnAccept( const std::string & host, uint16_t port ) {}; +private: + // Called when the connection has successfully connected to the local host. + virtual void OnAccept( const std::string& host, uint16_t port ) + { + }; - // Called when the connection has successfully connected to the remote host. - virtual void OnConnect( const std::string & host, uint16_t port ) {}; + // Called when the connection has successfully connected to the remote host. + virtual void OnConnect( const std::string& host, uint16_t port ) + { + }; - // Called when data has been sent by the connection. - virtual void OnSend( const std::vector< uint8_t > & buffer ) {}; + // Called when data has been sent by the connection. + virtual void OnSend( const std::vector< uint8_t >& buffer ) + { + }; - // Called when data has been received by the connection. - virtual void OnRecv( std::vector< uint8_t > & buffer ) {}; + // Called when data has been received by the connection. + virtual void OnRecv( std::vector< uint8_t >& buffer ) + { + }; - // Called when an error is encountered. - virtual void OnError( const boost::system::error_code & error ) {}; + // Called when an error is encountered. + virtual void OnError( const boost::system::error_code& error ) + { + }; - // Called when the connection has been disconnected - virtual void OnDisconnect() {}; + // Called when the connection has been disconnected + virtual void OnDisconnect() + { + }; - public: - // Returns the Hive object. - HivePtr GetHive(); +public: + // Returns the Hive object. + HivePtr GetHive(); - // Returns the socket object. - boost::asio::ip::tcp::socket & GetSocket(); + // Returns the socket object. + boost::asio::ip::tcp::socket& GetSocket(); - // Returns the strand object. - boost::asio::strand & GetStrand(); + // Returns the strand object. + boost::asio::strand& GetStrand(); - // Sets the application specific receive buffer size used. For stream - // based protocols such as HTTP, you want this to be pretty large, like - // 64kb. For packet based protocols, then it will be much smaller, - // usually 512b - 8kb depending on the protocol. The default value is - // 4kb. - void SetReceiveBufferSize( int32_t size ); + // Sets the application specific receive buffer size used. For stream + // based protocols such as HTTP, you want this to be pretty large, like + // 64kb. For packet based protocols, then it will be much smaller, + // usually 512b - 8kb depending on the protocol. The default value is + // 4kb. + void SetReceiveBufferSize( int32_t size ); - // Returns the size of the receive buffer size of the current object. - int32_t GetReceiveBufferSize() const; + // Returns the size of the receive buffer size of the current object. + int32_t GetReceiveBufferSize() const; - // Returns true if this object has an error associated with it. - bool HasError(); + // Returns true if this object has an error associated with it. + bool HasError(); - // Binds the socket to the specified interface. - void Bind( const std::string & ip, uint16_t port ); + // Binds the socket to the specified interface. + void Bind( const std::string& ip, uint16_t port ); - // Starts an a/synchronous connect. - void Connect( const std::string & host, uint16_t port ); + // Starts an a/synchronous connect. + void Connect( const std::string& host, uint16_t port ); - // Posts data to be sent to the connection. - void Send( const std::vector< uint8_t > & buffer ); + // Posts data to be sent to the connection. + void Send( const std::vector< uint8_t >& buffer ); - // Posts a recv for the connection to process. If total_bytes is 0, then - // as many bytes as possible up to GetReceiveBufferSize() will be - // waited for. If Recv is not 0, then the connection will wait for exactly - // total_bytes before invoking OnRecv. - void Recv( int32_t total_bytes = 0 ); + // Posts a recv for the connection to process. If total_bytes is 0, then + // as many bytes as possible up to GetReceiveBufferSize() will be + // waited for. If Recv is not 0, then the connection will wait for exactly + // total_bytes before invoking OnRecv. + void Recv( int32_t total_bytes = 0 ); - // Posts an asynchronous disconnect event for the object to process. - void Disconnect(); - }; + // Posts an asynchronous disconnect event for the object to process. + void Disconnect(); +}; - //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- - //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- - template - boost::shared_ptr< T > addServerToHive( const std::string& listenIp, uint32_t port, HivePtr pHive ) - { - try - { - AcceptorPtr acceptor( new Acceptor( pHive ) ); - acceptor->Listen( listenIp, port ); - boost::shared_ptr< T > connection( new T( pHive, acceptor ) ); - acceptor->Accept( connection ); - return connection; - } - catch( std::runtime_error e ) - { - throw; - } - } +template< class T > +boost::shared_ptr< T > addServerToHive( const std::string& listenIp, uint32_t port, HivePtr pHive ) +{ + try + { + AcceptorPtr acceptor( new Acceptor( pHive ) ); + acceptor->Listen( listenIp, port ); + boost::shared_ptr< T > connection( new T( pHive, acceptor ) ); + acceptor->Accept( connection ); + return connection; + } + catch( std::runtime_error e ) + { + throw; + } +} - } +} } diff --git a/src/common/Network/GamePacketNew.h b/src/common/Network/GamePacketNew.h index d0c09326..6512000b 100644 --- a/src/common/Network/GamePacketNew.h +++ b/src/common/Network/GamePacketNew.h @@ -22,7 +22,7 @@ namespace Packets { // Must forward define these in order to enable the compiler to produce the // correct template functions. -template < typename T, typename T1 > +template< typename T, typename T1 > class FFXIVIpcPacket; template< class T > @@ -38,40 +38,41 @@ using LobbyChannelPacket = FFXIVIpcPacket< T, ServerLobbyIpcType >; template< class T, typename... Args > boost::shared_ptr< ZoneChannelPacket< T > > makeZonePacket( Args... args ) { - return boost::make_shared< ZoneChannelPacket< T > >( args... ); + return boost::make_shared< ZoneChannelPacket< T > >( args... ); } template< class T, typename... Args > boost::shared_ptr< T > makeWrappedPacket( Args... args ) { - return boost::make_shared< T >( args... ); + return boost::make_shared< T >( args... ); } template< class T, typename... Args > boost::shared_ptr< ChatChannelPacket< T > > makeChatPacket( Args... args ) { - return boost::make_shared< ChatChannelPacket< T > >( args... ); + return boost::make_shared< ChatChannelPacket< T > >( args... ); } template< class T, typename... Args > boost::shared_ptr< LobbyChannelPacket< T > > makeLobbyPacket( Args... args ) { - return boost::make_shared< LobbyChannelPacket< T > >( args... ); + return boost::make_shared< LobbyChannelPacket< T > >( args... ); } /** * The base implementation of a game packet. Needed for parsing packets. */ -template < typename T1 > +template< typename T1 > class FFXIVIpcPacketBase { public: - virtual ~FFXIVIpcPacketBase() = default; - /** - * @brief Gets the IPC type of this packet. (Useful for determining the - * type of a parsed packet.) - */ - virtual T1 ipcType() = 0; + virtual ~FFXIVIpcPacketBase() = default; + + /** + * @brief Gets the IPC type of this packet. (Useful for determining the + * type of a parsed packet.) + */ + virtual T1 ipcType() = 0; }; ////////////////////////////////////////////////7 @@ -79,238 +80,256 @@ public: class FFXIVPacketBase { public: - FFXIVPacketBase() : - m_segmentType( 0 ) - { - initializeSegmentHeader(); - } + FFXIVPacketBase() : + m_segmentType( 0 ) + { + initializeSegmentHeader(); + } - FFXIVPacketBase( uint16_t segmentType, uint32_t sourceActorId, uint32_t targetActorId ) : - m_segmentType( segmentType ) - { - initializeSegmentHeader(); - setSourceActor( sourceActorId ); - setTargetActor( targetActorId ); - } + FFXIVPacketBase( uint16_t segmentType, uint32_t sourceActorId, uint32_t targetActorId ) : + m_segmentType( segmentType ) + { + initializeSegmentHeader(); + setSourceActor( sourceActorId ); + setTargetActor( targetActorId ); + } - std::size_t getSize() const - { - return m_segHdr.size; - } + std::size_t getSize() const + { + return m_segHdr.size; + } - virtual std::vector< uint8_t > getData() const - { - return {}; - } + virtual std::vector< uint8_t > getData() const + { + return {}; + } protected: - /** The segment header */ - FFXIVARR_PACKET_SEGMENT_HEADER m_segHdr; - uint16_t m_segmentType; + /** The segment header */ + FFXIVARR_PACKET_SEGMENT_HEADER m_segHdr; + uint16_t m_segmentType; public: - virtual uint32_t getContentSize() { return 0; }; - virtual std::vector< uint8_t > getContent() { return{}; }; + virtual uint32_t getContentSize() + { + return 0; + }; - /** - * @brief Gets the segment type of this packet. - */ - uint16_t getSegmentType() const - { - return m_segmentType; - } + virtual std::vector< uint8_t > getContent() + { + return {}; + }; - /** - * @brief Sets the source actor id for this packet. - * @param actorId The source actor id. - */ - void setSourceActor( uint32_t actorId ) - { - m_segHdr.source_actor = actorId; - }; + /** + * @brief Gets the segment type of this packet. + */ + uint16_t getSegmentType() const + { + return m_segmentType; + } - /** - * @brief Gets the source actor id for this packet. - * @return The source actor id. - */ - uint32_t getSourceActor() const - { - return m_segHdr.source_actor; - }; + /** + * @brief Sets the source actor id for this packet. + * @param actorId The source actor id. + */ + void setSourceActor( uint32_t actorId ) + { + m_segHdr.source_actor = actorId; + }; - /** - * @brief Sets the target actor id for this packet. - * @param actorId The target actor id. - */ - void setTargetActor( uint32_t actorId ) - { - m_segHdr.target_actor = actorId; - }; + /** + * @brief Gets the source actor id for this packet. + * @return The source actor id. + */ + uint32_t getSourceActor() const + { + return m_segHdr.source_actor; + }; - /** - * @brief Gets the target actor id for this packet. - */ - uint32_t getTargetActor( void ) const - { - return m_segHdr.target_actor; - }; + /** + * @brief Sets the target actor id for this packet. + * @param actorId The target actor id. + */ + void setTargetActor( uint32_t actorId ) + { + m_segHdr.target_actor = actorId; + }; - /** Initializes the fields of the segment header structure */ - virtual void initializeSegmentHeader( void ) - { - // Zero out the structure. - memset( &m_segHdr, 0, sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) ); + /** + * @brief Gets the target actor id for this packet. + */ + uint32_t getTargetActor( void ) const + { + return m_segHdr.target_actor; + }; - // Set the values of static fields. - // The size must be the sum of the segment header and the content - m_segHdr.size = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) + getContentSize(); - m_segHdr.type = getSegmentType(); - } + /** Initializes the fields of the segment header structure */ + virtual void initializeSegmentHeader( void ) + { + // Zero out the structure. + memset( &m_segHdr, 0, sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) ); + + // Set the values of static fields. + // The size must be the sum of the segment header and the content + m_segHdr.size = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) + getContentSize(); + m_segHdr.type = getSegmentType(); + } }; -template < typename T, typename T1 > -class FFXIVIpcPacket : public FFXIVIpcPacketBase< T1 >, public FFXIVPacketBase +template< typename T, typename T1 > +class FFXIVIpcPacket : + public FFXIVIpcPacketBase< T1 >, public FFXIVPacketBase { public: - FFXIVIpcPacket< T, T1 >( uint32_t sourceActorId, uint32_t targetActorId ) : - FFXIVPacketBase( 3, sourceActorId, targetActorId ) - { - initialize(); - }; + FFXIVIpcPacket< T, T1 >( uint32_t sourceActorId, uint32_t targetActorId ) : + FFXIVPacketBase( 3, sourceActorId, targetActorId ) + { + initialize(); + }; - FFXIVIpcPacket< T, T1 >( uint32_t sourceActorId ) : - FFXIVPacketBase( 3, sourceActorId, sourceActorId ) - { - initialize(); - }; + FFXIVIpcPacket< T, T1 >( uint32_t sourceActorId ) : + FFXIVPacketBase( 3, sourceActorId, sourceActorId ) + { + initialize(); + }; - FFXIVIpcPacket< T, T1 >( const FFXIVARR_PACKET_RAW& rawPacket ) - { - auto ipcHdrSize = sizeof( FFXIVARR_IPC_HEADER ); - auto copySize = std::min< uint32_t >( sizeof( T ), rawPacket.segHdr.size - ipcHdrSize ); + FFXIVIpcPacket< T, T1 >( const FFXIVARR_PACKET_RAW& rawPacket ) + { + auto ipcHdrSize = sizeof( FFXIVARR_IPC_HEADER ); + auto copySize = std::min< uint32_t >( sizeof( T ), rawPacket.segHdr.size - ipcHdrSize ); - memcpy( &m_segHdr, &rawPacket.segHdr, sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) ); - memcpy( &m_data, &rawPacket.data[0] + ipcHdrSize, copySize ); + memcpy( &m_segHdr, &rawPacket.segHdr, sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) ); + memcpy( &m_data, &rawPacket.data[ 0 ] + ipcHdrSize, copySize ); - memset( &m_ipcHdr, 0, ipcHdrSize ); - m_ipcHdr.type = static_cast< ServerZoneIpcType >( m_data._ServerIpcType ); - } + memset( &m_ipcHdr, 0, ipcHdrSize ); + m_ipcHdr.type = static_cast< ServerZoneIpcType >( m_data._ServerIpcType ); + } - uint32_t getContentSize() override - { - return sizeof( FFXIVARR_IPC_HEADER ) + sizeof( T ); - } + uint32_t getContentSize() override + { + return sizeof( FFXIVARR_IPC_HEADER ) + sizeof( T ); + } - std::vector< uint8_t > getContent() override - { - std::vector< uint8_t > content( getContentSize() ); - memcpy( content.data(), &m_ipcHdr, sizeof( FFXIVARR_IPC_HEADER ) ); - memcpy( content.data() + sizeof( FFXIVARR_IPC_HEADER ), &m_data, sizeof( T ) ); - return content; - } + std::vector< uint8_t > getContent() override + { + std::vector< uint8_t > content( getContentSize() ); + memcpy( content.data(), &m_ipcHdr, sizeof( FFXIVARR_IPC_HEADER ) ); + memcpy( content.data() + sizeof( FFXIVARR_IPC_HEADER ), &m_data, sizeof( T ) ); + return content; + } - std::vector< uint8_t > getData() const override - { - auto segmentHeaderSize = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); - auto ipcHeaderSize = sizeof( FFXIVARR_IPC_HEADER ); - auto dataSize = sizeof( m_data ); + std::vector< uint8_t > getData() const override + { + auto segmentHeaderSize = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); + auto ipcHeaderSize = sizeof( FFXIVARR_IPC_HEADER ); + auto dataSize = sizeof( m_data ); - std::vector< uint8_t > data( segmentHeaderSize + ipcHeaderSize + dataSize ); + std::vector< uint8_t > data( segmentHeaderSize + ipcHeaderSize + dataSize ); - memcpy( &data[0], &m_segHdr, segmentHeaderSize ); - memcpy( &data[segmentHeaderSize], &m_ipcHdr, ipcHeaderSize ); - memcpy( &data[segmentHeaderSize + ipcHeaderSize], &m_data, dataSize ); + memcpy( &data[ 0 ], &m_segHdr, segmentHeaderSize ); + memcpy( &data[ segmentHeaderSize ], &m_ipcHdr, ipcHeaderSize ); + memcpy( &data[ segmentHeaderSize + ipcHeaderSize ], &m_data, dataSize ); - return data; - } + return data; + } - T1 ipcType() override - { - return static_cast< T1 >( m_data._ServerIpcType ); - }; + T1 ipcType() override + { + return static_cast< T1 >( m_data._ServerIpcType ); + }; - /** Gets a reference to the underlying IPC data structure. */ - T& data() { return m_data; }; + /** Gets a reference to the underlying IPC data structure. */ + T& data() + { + return m_data; + }; - const T& data() const { return m_data; } + const T& data() const + { + return m_data; + } protected: - /** Initializes the fields of the header structures */ - virtual void initialize() - { - // Zero out the structures. - memset( &m_ipcHdr, 0, sizeof( FFXIVARR_IPC_HEADER ) ); - memset( &m_data, 0, sizeof( T ) ); + /** Initializes the fields of the header structures */ + virtual void initialize() + { + // Zero out the structures. + memset( &m_ipcHdr, 0, sizeof( FFXIVARR_IPC_HEADER ) ); + memset( &m_data, 0, sizeof( T ) ); - // The IPC type itself. - m_ipcHdr.type = static_cast< ServerZoneIpcType >( m_data._ServerIpcType ); - m_ipcHdr.timestamp = static_cast< uint32_t >( Util::getTimeSeconds() ); - m_segHdr.size = sizeof( T ) + sizeof( FFXIVARR_IPC_HEADER ) + sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); - }; + // The IPC type itself. + m_ipcHdr.type = static_cast< ServerZoneIpcType >( m_data._ServerIpcType ); + m_ipcHdr.timestamp = static_cast< uint32_t >( Util::getTimeSeconds() ); + m_segHdr.size = sizeof( T ) + sizeof( FFXIVARR_IPC_HEADER ) + sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); + }; protected: - /** The IPC packet header */ - FFXIVARR_IPC_HEADER m_ipcHdr; - /** The underlying data portion of the packet as a structure */ - T m_data; + /** The IPC packet header */ + FFXIVARR_IPC_HEADER m_ipcHdr; + /** The underlying data portion of the packet as a structure */ + T m_data; }; -class FFXIVRawPacket : public FFXIVPacketBase +class FFXIVRawPacket : + public FFXIVPacketBase { public: - FFXIVRawPacket( uint16_t type, uint32_t size, uint32_t sourceActorId, uint32_t targetActorId ) : - m_data( std::vector< uint8_t >( size - sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) ) ), - FFXIVPacketBase( type, sourceActorId, targetActorId ) - { - initialize(); - m_segHdr.size = size; - }; + FFXIVRawPacket( uint16_t type, uint32_t size, uint32_t sourceActorId, uint32_t targetActorId ) : + m_data( std::vector< uint8_t >( size - sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) ) ), + FFXIVPacketBase( type, sourceActorId, targetActorId ) + { + initialize(); + m_segHdr.size = size; + }; - FFXIVRawPacket( char* data, uint16_t size ) : - m_data( std::vector< uint8_t >( size ) ) - { - auto segmentHdrSize = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); + FFXIVRawPacket( char* data, uint16_t size ) : + m_data( std::vector< uint8_t >( size ) ) + { + auto segmentHdrSize = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); - memcpy( &m_data[0], data + segmentHdrSize, size - segmentHdrSize ); - memcpy( &m_segHdr, data, segmentHdrSize ); - } + memcpy( &m_data[ 0 ], data + segmentHdrSize, size - segmentHdrSize ); + memcpy( &m_segHdr, data, segmentHdrSize ); + } - uint32_t getContentSize() override - { - return m_data.size(); - } + uint32_t getContentSize() override + { + return m_data.size(); + } - std::vector< uint8_t > getContent() override - { - return m_data; - } + std::vector< uint8_t > getContent() override + { + return m_data; + } - virtual std::vector< uint8_t > getData() const override - { - std::vector< uint8_t > data( sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) + m_data.size() ); + virtual std::vector< uint8_t > getData() const override + { + std::vector< uint8_t > data( sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) + m_data.size() ); - memcpy( &data[0], &m_segHdr, sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) ); - memcpy( &data[sizeof( FFXIVARR_PACKET_SEGMENT_HEADER )], &m_data[0], m_data.size() ); + memcpy( &data[ 0 ], &m_segHdr, sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) ); + memcpy( &data[ sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) ], &m_data[ 0 ], m_data.size() ); - return data; - } + return data; + } - /** Gets a reference to the underlying IPC data structure. */ - std::vector< uint8_t >& data() { return m_data; }; + /** Gets a reference to the underlying IPC data structure. */ + std::vector< uint8_t >& data() + { + return m_data; + }; protected: - /** Initializes the fields of the header structures */ - virtual void initialize() - { - // Zero out the structures. - memset( &m_data[0], 0, m_data.size() ); - }; + /** Initializes the fields of the header structures */ + virtual void initialize() + { + // Zero out the structures. + memset( &m_data[ 0 ], 0, m_data.size() ); + }; protected: - /** The underlying data portion of the packet as a structure */ - std::vector< uint8_t > m_data; + /** The underlying data portion of the packet as a structure */ + std::vector< uint8_t > m_data; }; diff --git a/src/common/Network/GamePacketParser.cpp b/src/common/Network/GamePacketParser.cpp index 52cfe1a3..77add05c 100644 --- a/src/common/Network/GamePacketParser.cpp +++ b/src/common/Network/GamePacketParser.cpp @@ -5,122 +5,122 @@ using namespace Core::Network::Packets; -PacketParseResult Core::Network::Packets::getHeader( const std::vector< uint8_t > &buffer, +PacketParseResult Core::Network::Packets::getHeader( const std::vector< uint8_t >& buffer, const uint32_t offset, - FFXIVARR_PACKET_HEADER &header ) + FFXIVARR_PACKET_HEADER& header ) { - const auto headerSize = sizeof( FFXIVARR_PACKET_HEADER ); + const auto headerSize = sizeof( FFXIVARR_PACKET_HEADER ); - // Check if we have enough bytes in the buffer. - auto remainingBytes = buffer.size() - offset; - if( remainingBytes < headerSize ) - return Incomplete; + // Check if we have enough bytes in the buffer. + auto remainingBytes = buffer.size() - offset; + if( remainingBytes < headerSize ) + return Incomplete; - // Copy packet header. - memcpy( &header, buffer.data() + offset, headerSize ); + // Copy packet header. + memcpy( &header, buffer.data() + offset, headerSize ); - if( !checkHeader(header) ) - return Malformed; + if( !checkHeader( header ) ) + return Malformed; - return Success; + return Success; } -PacketParseResult Core::Network::Packets::getSegmentHeader( const std::vector< uint8_t > &buffer, +PacketParseResult Core::Network::Packets::getSegmentHeader( const std::vector< uint8_t >& buffer, const uint32_t offset, - FFXIVARR_PACKET_SEGMENT_HEADER &header ) + FFXIVARR_PACKET_SEGMENT_HEADER& header ) { - const auto headerSize = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); + const auto headerSize = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ); - // Check if we have enough bytes in the buffer. - auto remainingBytes = buffer.size() - offset; - if( remainingBytes < headerSize ) - return Incomplete; + // Check if we have enough bytes in the buffer. + auto remainingBytes = buffer.size() - offset; + if( remainingBytes < headerSize ) + return Incomplete; - // Copy segment header - memcpy( &header, buffer.data() + offset, headerSize ); + // Copy segment header + memcpy( &header, buffer.data() + offset, headerSize ); - return Success; + return Success; } -PacketParseResult Core::Network::Packets::getPackets( const std::vector< uint8_t > &buffer, +PacketParseResult Core::Network::Packets::getPackets( const std::vector< uint8_t >& buffer, const uint32_t offset, - const FFXIVARR_PACKET_HEADER &packetHeader, - std::vector< FFXIVARR_PACKET_RAW > &packets ) + const FFXIVARR_PACKET_HEADER& packetHeader, + std::vector< FFXIVARR_PACKET_RAW >& packets ) { - // sanity check: check there's enough bytes in the buffer - const auto bytesExpected = packetHeader.size - sizeof( struct FFXIVARR_PACKET_HEADER ); - if( buffer.size() - offset < bytesExpected ) - return Incomplete; + // sanity check: check there's enough bytes in the buffer + const auto bytesExpected = packetHeader.size - sizeof( struct FFXIVARR_PACKET_HEADER ); + if( buffer.size() - offset < bytesExpected ) + return Incomplete; - // Loop each message - uint32_t count = 0; - uint32_t bytesProcessed = 0; - while( count < packetHeader.count ) - { - FFXIVARR_PACKET_RAW rawPacket; + // Loop each message + uint32_t count = 0; + uint32_t bytesProcessed = 0; + while( count < packetHeader.count ) + { + FFXIVARR_PACKET_RAW rawPacket; - // Copy ipc packet message - const auto packetResult = getPacket( buffer, offset + bytesProcessed, rawPacket ); - if( packetResult != Success ) - return packetResult; + // Copy ipc packet message + const auto packetResult = getPacket( buffer, offset + bytesProcessed, rawPacket ); + if( packetResult != Success ) + return packetResult; - // NOTE: isn't rawPacket is allocated on stack? - // why is okay to do this? - packets.push_back( rawPacket ); + // NOTE: isn't rawPacket is allocated on stack? + // why is okay to do this? + packets.push_back( rawPacket ); - // Add message size and count - bytesProcessed += rawPacket.segHdr.size; - count += 1; - } + // Add message size and count + bytesProcessed += rawPacket.segHdr.size; + count += 1; + } - // sanity check: check if we processed all bytes. - // this check can fail if size of messages don't add up to size reported from packet header. - if( bytesExpected != bytesProcessed ) - return Malformed; + // sanity check: check if we processed all bytes. + // this check can fail if size of messages don't add up to size reported from packet header. + if( bytesExpected != bytesProcessed ) + return Malformed; - return Success; + return Success; } -PacketParseResult Core::Network::Packets::getPacket( const std::vector< uint8_t > &buffer, const uint32_t offset, - FFXIVARR_PACKET_RAW &packet ) +PacketParseResult Core::Network::Packets::getPacket( const std::vector< uint8_t >& buffer, const uint32_t offset, + FFXIVARR_PACKET_RAW& packet ) { - // Copy segment header - const auto headerResult = getSegmentHeader( buffer, offset, packet.segHdr ); - if( headerResult != Success ) - return headerResult; + // Copy segment header + const auto headerResult = getSegmentHeader( buffer, offset, packet.segHdr ); + if( headerResult != Success ) + return headerResult; - // Check header sanity and it's size - if( !checkSegmentHeader( packet.segHdr ) ) - return Malformed; + // Check header sanity and it's size + if( !checkSegmentHeader( packet.segHdr ) ) + return Malformed; - const auto dataOffset = offset + sizeof( struct FFXIVARR_PACKET_SEGMENT_HEADER ); - const auto dataSize = packet.segHdr.size; + const auto dataOffset = offset + sizeof( struct FFXIVARR_PACKET_SEGMENT_HEADER ); + const auto dataSize = packet.segHdr.size; - // Allocate data buffer and copy - packet.data.resize( dataSize ); - memcpy( packet.data.data(), buffer.data() + dataOffset, dataSize ); + // Allocate data buffer and copy + packet.data.resize( dataSize ); + memcpy( packet.data.data(), buffer.data() + dataOffset, dataSize ); - return Success; + return Success; } -bool Core::Network::Packets::checkHeader( const FFXIVARR_PACKET_HEADER &header ) +bool Core::Network::Packets::checkHeader( const FFXIVARR_PACKET_HEADER& header ) { - // Max size of the packet is capped at 1MB for now. - if( header.size > 1 * 1024 * 1024 ) - return false; + // Max size of the packet is capped at 1MB for now. + if( header.size > 1 * 1024 * 1024 ) + return false; - // Max number of message is capped at 255 for now. - if( header.count > 255 ) - return false; + // Max number of message is capped at 255 for now. + if( header.count > 255 ) + return false; - return true; + return true; } -bool Core::Network::Packets::checkSegmentHeader( const FFXIVARR_PACKET_SEGMENT_HEADER &header ) +bool Core::Network::Packets::checkSegmentHeader( const FFXIVARR_PACKET_SEGMENT_HEADER& header ) { - // Max size of individual message is capped at 256KB for now. - if( header.size > 256 * 1024 ) - return false; + // Max size of individual message is capped at 256KB for now. + if( header.size > 256 * 1024 ) + return false; - return true; + return true; } diff --git a/src/common/Network/GamePacketParser.h b/src/common/Network/GamePacketParser.h index 6f870bd2..2a2ce58c 100644 --- a/src/common/Network/GamePacketParser.h +++ b/src/common/Network/GamePacketParser.h @@ -1,47 +1,49 @@ #ifndef _GAMEPACKETPARSER_H #define _GAMEPACKETPARSER_H + #include "CommonNetwork.h" namespace Core { namespace Network { namespace Packets { - enum PacketParseResult - { - /// Dissected game packet successfully - Success, +enum PacketParseResult +{ + /// Dissected game packet successfully + Success, - /// Buffer is too short to dissect a message. - Incomplete, + /// Buffer is too short to dissect a message. + Incomplete, - /// Invalid data detected. - Malformed - }; + /// Invalid data detected. + Malformed +}; - /// Read packet header from buffer with given offset. - /// Buffer with given offset must be pointing to start of the new FFXIV packet. - PacketParseResult getHeader( const std::vector< uint8_t > &buffer, const uint32_t offset, - FFXIVARR_PACKET_HEADER &header ); +/// Read packet header from buffer with given offset. +/// Buffer with given offset must be pointing to start of the new FFXIV packet. +PacketParseResult getHeader( const std::vector< uint8_t >& buffer, const uint32_t offset, + FFXIVARR_PACKET_HEADER& header ); - /// Read packet header from buffer with given offset. - /// Buffer with given offset must be pointing to start of FFXIVARR_PACKET_SEGMENT_HEADER data. - /// Keep in mind that this function does check for data validity. Call checkSegmentHeader() if that's needed. - PacketParseResult getSegmentHeader( const std::vector< uint8_t > &buffer, const uint32_t offset, - FFXIVARR_PACKET_SEGMENT_HEADER &header ); +/// Read packet header from buffer with given offset. +/// Buffer with given offset must be pointing to start of FFXIVARR_PACKET_SEGMENT_HEADER data. +/// Keep in mind that this function does check for data validity. Call checkSegmentHeader() if that's needed. +PacketParseResult getSegmentHeader( const std::vector< uint8_t >& buffer, const uint32_t offset, + FFXIVARR_PACKET_SEGMENT_HEADER& header ); - /// Read packets from the buffer with given offset. - /// Buffer with given offset must be pointing to end of FFXIVARR_PACKET_HEADER data. - PacketParseResult getPackets( const std::vector< uint8_t > &buffer, const uint32_t offset, - const FFXIVARR_PACKET_HEADER &header, - std::vector< Packets::FFXIVARR_PACKET_RAW > &packets ); +/// Read packets from the buffer with given offset. +/// Buffer with given offset must be pointing to end of FFXIVARR_PACKET_HEADER data. +PacketParseResult getPackets( const std::vector< uint8_t >& buffer, const uint32_t offset, + const FFXIVARR_PACKET_HEADER& header, + std::vector< Packets::FFXIVARR_PACKET_RAW >& packets ); - /// Read single packet from the buffer with given offset. - /// Buffer with an offset must be pointing to start of FFXIVARR_PACKET_SEGMENT_HEADER data. - PacketParseResult getPacket( const std::vector< uint8_t > &buffer, const uint32_t offset, - FFXIVARR_PACKET_RAW &packet ); +/// Read single packet from the buffer with given offset. +/// Buffer with an offset must be pointing to start of FFXIVARR_PACKET_SEGMENT_HEADER data. +PacketParseResult getPacket( const std::vector< uint8_t >& buffer, const uint32_t offset, + FFXIVARR_PACKET_RAW& packet ); - bool checkHeader(const FFXIVARR_PACKET_HEADER &header); - bool checkSegmentHeader(const FFXIVARR_PACKET_SEGMENT_HEADER &header); +bool checkHeader( const FFXIVARR_PACKET_HEADER& header ); + +bool checkSegmentHeader( const FFXIVARR_PACKET_SEGMENT_HEADER& header ); } } diff --git a/src/common/Network/Hive.cpp b/src/common/Network/Hive.cpp index 41cf0e25..73c12895 100644 --- a/src/common/Network/Hive.cpp +++ b/src/common/Network/Hive.cpp @@ -4,58 +4,59 @@ #include "Hive.h" namespace Core { - namespace Network { +namespace Network { - //----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- - Hive::Hive() - : m_work_ptr( new boost::asio::io_service::work( m_io_service ) ), - m_shutdown( 0 ) - { - } +Hive::Hive() + : + m_work_ptr( new boost::asio::io_service::work( m_io_service ) ), + m_shutdown( 0 ) +{ +} - Hive::~Hive() - { - } +Hive::~Hive() +{ +} - boost::asio::io_service & Hive::GetService() - { - return m_io_service; - } +boost::asio::io_service& Hive::GetService() +{ + return m_io_service; +} - bool Hive::HasStopped() - { - return ( boost::interprocess::ipcdetail::atomic_cas32( &m_shutdown, 1, 1 ) == 1 ); - } +bool Hive::HasStopped() +{ + return ( boost::interprocess::ipcdetail::atomic_cas32( &m_shutdown, 1, 1 ) == 1 ); +} - void Hive::Poll() - { - m_io_service.poll(); - } +void Hive::Poll() +{ + m_io_service.poll(); +} - void Hive::Run() - { - m_io_service.run(); - } +void Hive::Run() +{ + m_io_service.run(); +} - void Hive::Stop() - { - if( boost::interprocess::ipcdetail::atomic_cas32( &m_shutdown, 1, 0 ) == 0 ) - { - m_work_ptr.reset(); - m_io_service.run(); - m_io_service.stop(); - } - } +void Hive::Stop() +{ + if( boost::interprocess::ipcdetail::atomic_cas32( &m_shutdown, 1, 0 ) == 0 ) + { + m_work_ptr.reset(); + m_io_service.run(); + m_io_service.stop(); + } +} - void Hive::Reset() - { - if( boost::interprocess::ipcdetail::atomic_cas32( &m_shutdown, 0, 1 ) == 1 ) - { - m_io_service.reset(); - m_work_ptr.reset( new boost::asio::io_service::work( m_io_service ) ); - } - } +void Hive::Reset() +{ + if( boost::interprocess::ipcdetail::atomic_cas32( &m_shutdown, 0, 1 ) == 1 ) + { + m_io_service.reset(); + m_work_ptr.reset( new boost::asio::io_service::work( m_io_service ) ); + } +} - } +} } \ No newline at end of file diff --git a/src/common/Network/Hive.h b/src/common/Network/Hive.h index 0448cfc8..4e77ae8a 100644 --- a/src/common/Network/Hive.h +++ b/src/common/Network/Hive.h @@ -6,49 +6,52 @@ #include namespace Core { - namespace Network { +namespace Network { - class Hive : public boost::enable_shared_from_this< Hive > - { - private: - boost::asio::io_service m_io_service; - boost::shared_ptr< boost::asio::io_service::work > m_work_ptr; - volatile uint32_t m_shutdown; +class Hive : + public boost::enable_shared_from_this< Hive > +{ +private: + boost::asio::io_service m_io_service; + boost::shared_ptr< boost::asio::io_service::work > m_work_ptr; + volatile uint32_t m_shutdown; - private: - Hive( const Hive & rhs ); - Hive & operator =( const Hive & rhs ); +private: + Hive( const Hive& rhs ); - public: - Hive(); - virtual ~Hive(); + Hive& operator=( const Hive& rhs ); - // Returns the io_service of this object. - boost::asio::io_service & GetService(); +public: + Hive(); - // Returns true if the Stop function has been called. - bool HasStopped(); + virtual ~Hive(); - // Polls the networking subsystem once from the current thread and - // returns. - void Poll(); + // Returns the io_service of this object. + boost::asio::io_service& GetService(); - // Runs the networking system on the current thread. This function blocks - // until the networking system is stopped, so do not call on a single - // threaded application with no other means of being able to call Stop - // unless you code in such logic. - void Run(); + // Returns true if the Stop function has been called. + bool HasStopped(); - // Stops the networking system. All work is finished and no more - // networking interactions will be possible afterwards until Reset is called. - void Stop(); + // Polls the networking subsystem once from the current thread and + // returns. + void Poll(); - // Restarts the networking system after Stop as been called. A new work - // object is created ad the shutdown flag is cleared. - void Reset(); - }; + // Runs the networking system on the current thread. This function blocks + // until the networking system is stopped, so do not call on a single + // threaded application with no other means of being able to call Stop + // unless you code in such logic. + void Run(); - } + // Stops the networking system. All work is finished and no more + // networking interactions will be possible afterwards until Reset is called. + void Stop(); + + // Restarts the networking system after Stop as been called. A new work + // object is created ad the shutdown flag is cleared. + void Reset(); +}; + +} } //----------------------------------------------------------------------------- #endif \ No newline at end of file diff --git a/src/common/Network/PacketContainer.cpp b/src/common/Network/PacketContainer.cpp index 73f5c134..a51196a4 100644 --- a/src/common/Network/PacketContainer.cpp +++ b/src/common/Network/PacketContainer.cpp @@ -10,81 +10,81 @@ #include Core::Network::Packets::PacketContainer::PacketContainer( uint32_t segmentTargetOverride ) : - m_segmentTargetOverride( segmentTargetOverride ) + m_segmentTargetOverride( segmentTargetOverride ) { - memset( &m_ipcHdr, 0, sizeof( FFXIVARR_PACKET_HEADER ) ); - m_ipcHdr.size = sizeof( FFXIVARR_PACKET_HEADER ); - m_ipcHdr.count = 0; + memset( &m_ipcHdr, 0, sizeof( FFXIVARR_PACKET_HEADER ) ); + m_ipcHdr.size = sizeof( FFXIVARR_PACKET_HEADER ); + m_ipcHdr.count = 0; } Core::Network::Packets::PacketContainer::~PacketContainer() { - m_entryList.clear(); + m_entryList.clear(); } void Core::Network::Packets::PacketContainer::addPacket( Core::Network::Packets::FFXIVPacketBasePtr entry ) { - m_entryList.push_back( entry ); + m_entryList.push_back( entry ); - m_ipcHdr.size += entry->getSize(); - m_ipcHdr.count++; + m_ipcHdr.size += entry->getSize(); + m_ipcHdr.count++; } void Core::Network::Packets::PacketContainer::fillSendBuffer( std::vector< uint8_t >& sendBuffer ) { - std::vector< uint8_t > tempBuffer( m_ipcHdr.size ); - memset( &tempBuffer[0], 0, m_ipcHdr.size ); + std::vector< uint8_t > tempBuffer( m_ipcHdr.size ); + memset( &tempBuffer[ 0 ], 0, m_ipcHdr.size ); - using namespace std::chrono; - auto ms = duration_cast< milliseconds >( system_clock::now().time_since_epoch() ); - uint64_t tick = ms.count(); - m_ipcHdr.unknown_0 = 0xE2465DFF41a05252; - m_ipcHdr.unknown_8 = 0x75C4997B4D642A7F; - m_ipcHdr.timestamp = tick; - m_ipcHdr.unknown_20 = 1; + using namespace std::chrono; + auto ms = duration_cast< milliseconds >( system_clock::now().time_since_epoch() ); + uint64_t tick = ms.count(); + m_ipcHdr.unknown_0 = 0xE2465DFF41a05252; + m_ipcHdr.unknown_8 = 0x75C4997B4D642A7F; + m_ipcHdr.timestamp = tick; + m_ipcHdr.unknown_20 = 1; - memcpy( &tempBuffer[0], &m_ipcHdr, sizeof( FFXIVARR_PACKET_HEADER ) ); + memcpy( &tempBuffer[ 0 ], &m_ipcHdr, sizeof( FFXIVARR_PACKET_HEADER ) ); - auto it = m_entryList.begin(); - std::size_t offset = 0; + auto it = m_entryList.begin(); + std::size_t offset = 0; - if( m_entryList.size() > 1 ) - offset = 0; + if( m_entryList.size() > 1 ) + offset = 0; - for( ; it != m_entryList.end(); ++it ) - { - auto pPacket = (*it); + for( ; it != m_entryList.end(); ++it ) + { + auto pPacket = ( *it ); - if( m_segmentTargetOverride != 0 && pPacket->getSegmentType() == SEGMENTTYPE_IPC ) - { - pPacket->setTargetActor( m_segmentTargetOverride ); - } + if( m_segmentTargetOverride != 0 && pPacket->getSegmentType() == SEGMENTTYPE_IPC ) + { + pPacket->setTargetActor( m_segmentTargetOverride ); + } - auto data = pPacket->getData(); - memcpy( &tempBuffer[0] + sizeof( FFXIVARR_PACKET_HEADER ) + offset, &data[0], pPacket->getSize() ); - offset += pPacket->getSize(); - } + auto data = pPacket->getData(); + memcpy( &tempBuffer[ 0 ] + sizeof( FFXIVARR_PACKET_HEADER ) + offset, &data[ 0 ], pPacket->getSize() ); + offset += pPacket->getSize(); + } - sendBuffer.assign( &tempBuffer[0], &tempBuffer[0] + m_ipcHdr.size ); + sendBuffer.assign( &tempBuffer[ 0 ], &tempBuffer[ 0 ] + m_ipcHdr.size ); } std::string Core::Network::Packets::PacketContainer::toString() { - std::vector< uint8_t > tmpBuffer; + std::vector< uint8_t > tmpBuffer; - fillSendBuffer( tmpBuffer ); + fillSendBuffer( tmpBuffer ); - std::string str = "\n"; - for( uint32_t i = 0; i < m_ipcHdr.size; i++ ) - { - str += boost::str( boost::format( "%|02X|" ) % static_cast< int32_t >( tmpBuffer[i] & 0xFF ) ) + " "; + std::string str = "\n"; + for( uint32_t i = 0; i < m_ipcHdr.size; i++ ) + { + str += boost::str( boost::format( "%|02X|" ) % static_cast< int32_t >( tmpBuffer[ i ] & 0xFF ) ) + " "; - if( ( i + 1 ) % 16 == 0 ) - str += "\n"; - } - str += "\n"; + if( ( i + 1 ) % 16 == 0 ) + str += "\n"; + } + str += "\n"; - return str; + return str; } diff --git a/src/common/Network/PacketContainer.h b/src/common/Network/PacketContainer.h index 373954bd..041c349b 100644 --- a/src/common/Network/PacketContainer.h +++ b/src/common/Network/PacketContainer.h @@ -17,21 +17,22 @@ typedef boost::shared_ptr< FFXIVPacketBase > FFXIVPacketBasePtr; class PacketContainer { public: - PacketContainer( uint32_t segmentTargetOverride = 0 ); - ~PacketContainer(); + PacketContainer( uint32_t segmentTargetOverride = 0 ); - void addPacket( FFXIVPacketBasePtr entry ); + ~PacketContainer(); - FFXIVARR_PACKET_HEADER m_ipcHdr; + void addPacket( FFXIVPacketBasePtr entry ); - std::vector< FFXIVPacketBasePtr > m_entryList; + FFXIVARR_PACKET_HEADER m_ipcHdr; - std::string toString(); + std::vector< FFXIVPacketBasePtr > m_entryList; - void fillSendBuffer( std::vector< uint8_t >& sendBuffer ); + std::string toString(); + + void fillSendBuffer( std::vector< uint8_t >& sendBuffer ); private: - uint32_t m_segmentTargetOverride; + uint32_t m_segmentTargetOverride; }; diff --git a/src/common/Network/PacketDef/Chat/ServerChatDef.h b/src/common/Network/PacketDef/Chat/ServerChatDef.h index 19a22b97..50353c32 100644 --- a/src/common/Network/PacketDef/Chat/ServerChatDef.h +++ b/src/common/Network/PacketDef/Chat/ServerChatDef.h @@ -13,25 +13,27 @@ namespace Server { * Structural representation of the packet sent by the server as response * to a tell request */ -struct FFXIVIpcTell : FFXIVIpcBasePacket +struct FFXIVIpcTell : + FFXIVIpcBasePacket< Tell > { - uint32_t u1; - uint16_t u2a; - uint16_t u2b; - uint8_t preName; - uint8_t u3a; - uint8_t u3b; //Setting this to 1 seems to mark the tell as a GM tell (More research needed) - char receipientName[32]; - char msg[1031]; + uint32_t u1; + uint16_t u2a; + uint16_t u2b; + uint8_t preName; + uint8_t u3a; + uint8_t u3b; //Setting this to 1 seems to mark the tell as a GM tell (More research needed) + char receipientName[32]; + char msg[1031]; }; - /** +/** * Structural representation of the packet sent by the server as response * to a failed tell because of unavailable target player */ -struct FFXIVIpcTellErrNotFound : FFXIVIpcBasePacket +struct FFXIVIpcTellErrNotFound : + FFXIVIpcBasePacket< TellErrNotFound > { - char receipientName[32]; + char receipientName[32]; }; } /* Server */ diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index 72381f75..a535f3dc 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -7,291 +7,296 @@ namespace Core { namespace Network { namespace Packets { - //////////////////////////////////////////////////////////////////////////////// - /// Lobby Connection IPC Codes - /** - * Server IPC Lobby Type Codes. - */ - enum ServerLobbyIpcType : uint16_t - { - LobbyError = 0x0002, - LobbyServiceAccountList = 0x000C, - LobbyCharList = 0x000D, - LobbyCharCreate = 0x000E, - LobbyEnterWorld = 0x000F, - LobbyServerList = 0x0015, - LobbyRetainerList = 0x0017, - - }; - - /** - * Client IPC Lobby Type Codes. - */ - enum ClientLobbyIpcType : uint16_t - { - ReqCharList = 0x0003, - ReqEnterWorld = 0x0004, - ReqServiceAccountList = 0x0005, - - ReqCharDelete = 0x000A, - ReqCharCreate = 0x000B, - }; - - //////////////////////////////////////////////////////////////////////////////// - /// Zone Connection IPC Codes - /** - * Server IPC Zone Type Codes. - */ - enum ServerZoneIpcType : uint16_t - { - - // static opcode ( the ones that rarely, if ever, change ) - Ping = 0x0065, - Init = 0x0066, - - ActorFreeSpawn = 0x0191, - InitZone = 0x019A, - - AddStatusEffect = 0x0141, - ActorControl142 = 0x0142, - ActorControl143 = 0x0143, - ActorControl144 = 0x0144, - UpdateHpMpTp = 0x0145, - - /////////////////////////////////////////////////// - - ChatBanned = 0x006B, - Logout = 0x0077, // updated 4.3 - CFNotify = 0x0078, - CFMemberStatus = 0x0079, - CFDutyInfo = 0x007A, - CFPlayerInNeed = 0x007F, - - SocialRequestError = 0x00AD, +//////////////////////////////////////////////////////////////////////////////// +/// Lobby Connection IPC Codes +/** +* Server IPC Lobby Type Codes. +*/ +enum ServerLobbyIpcType : + uint16_t +{ + LobbyError = 0x0002, + LobbyServiceAccountList = 0x000C, + LobbyCharList = 0x000D, + LobbyCharCreate = 0x000E, + LobbyEnterWorld = 0x000F, + LobbyServerList = 0x0015, + LobbyRetainerList = 0x0017, + +}; + +/** +* Client IPC Lobby Type Codes. +*/ +enum ClientLobbyIpcType : + uint16_t +{ + ReqCharList = 0x0003, + ReqEnterWorld = 0x0004, + ReqServiceAccountList = 0x0005, + + ReqCharDelete = 0x000A, + ReqCharCreate = 0x000B, +}; + +//////////////////////////////////////////////////////////////////////////////// +/// Zone Connection IPC Codes +/** +* Server IPC Zone Type Codes. +*/ +enum ServerZoneIpcType : + uint16_t +{ + + // static opcode ( the ones that rarely, if ever, change ) + Ping = 0x0065, + Init = 0x0066, + + ActorFreeSpawn = 0x0191, + InitZone = 0x019A, + + AddStatusEffect = 0x0141, + ActorControl142 = 0x0142, + ActorControl143 = 0x0143, + ActorControl144 = 0x0144, + UpdateHpMpTp = 0x0145, + + /////////////////////////////////////////////////// + + ChatBanned = 0x006B, + Logout = 0x0077, // updated 4.3 + CFNotify = 0x0078, + CFMemberStatus = 0x0079, + CFDutyInfo = 0x007A, + CFPlayerInNeed = 0x007F, + + SocialRequestError = 0x00AD, + + CFRegistered = 0x00B8, // updated 4.1 + SocialRequestResponse = 0x00BB, // updated 4.1 + CancelAllianceForming = 0x00C6, // updated 4.2 - CFRegistered = 0x00B8, // updated 4.1 - SocialRequestResponse = 0x00BB, // updated 4.1 - CancelAllianceForming = 0x00C6, // updated 4.2 + Playtime = 0x00F5, // updated 4.3 + Chat = 0x00F7, // updated 4.3 + SocialList = 0x00FD, // updated 4.3 - Playtime = 0x00F5, // updated 4.3 - Chat = 0x00F7, // updated 4.3 - SocialList = 0x00FD, // updated 4.3 + UpdateSearchInfo = 0x0100, // updated 4.3 + InitSearchInfo = 0x0101, // updated 4.3 - UpdateSearchInfo = 0x0100, // updated 4.3 - InitSearchInfo = 0x0101, // updated 4.3 + ServerNotice = 0x0106, // updated 4.3 + SetOnlineStatus = 0x0107, // updated 4.3 - ServerNotice = 0x0106, // updated 4.3 - SetOnlineStatus = 0x0107, // updated 4.3 + CountdownInitiate = 0x0111, // updated 4.3 + CountdownCancel = 0x0112, // updated 4.3 - CountdownInitiate = 0x0111, // updated 4.3 - CountdownCancel = 0x0112, // updated 4.3 + BlackList = 0x0115, // updated 4.3 - BlackList = 0x0115, // updated 4.3 + LogMessage = 0x00D0, - LogMessage = 0x00D0, + LinkshellList = 0x011C, // updated 4.3 + CharaFreeCompanyTag = 0x013B, // updated 4.3 + FreeCompanyBoardMsg = 0x013C, // updated 4.3 + FreeCompanyInfo = 0x013D, // updated 4.3 - LinkshellList = 0x011C, // updated 4.3 - CharaFreeCompanyTag = 0x013B, // updated 4.3 - FreeCompanyBoardMsg = 0x013C, // updated 4.3 - FreeCompanyInfo = 0x013D, // updated 4.3 + StatusEffectList = 0x014E, // updated 4.3 + Effect = 0x0151, // updated 4.3 + AoeEffect8 = 0x0154, // updated 4.3 + AoeEffect16 = 0x0155, // updated 4.3 + AoeEffect24 = 0x0156, // updated 4.3 + AoeEffect32 = 0x0157, // updated 4.3 + PersistantEffect = 0x0158, // updated 4.3 - StatusEffectList = 0x014E, // updated 4.3 - Effect = 0x0151, // updated 4.3 - AoeEffect8 = 0x0154, // updated 4.3 - AoeEffect16 = 0x0155, // updated 4.3 - AoeEffect24 = 0x0156, // updated 4.3 - AoeEffect32 = 0x0157, // updated 4.3 - PersistantEffect = 0x0158, // updated 4.3 + GCAffiliation = 0x0162, // updated 4.3 - GCAffiliation = 0x0162, // updated 4.3 + PlayerSpawn = 0x0172, // updated 4.3 + NpcSpawn = 0x0173, // updated 4.3 + ActorMove = 0x0174, // updated 4.3 + ActorSetPos = 0x0176, // updated 4.3 - PlayerSpawn = 0x0172, // updated 4.3 - NpcSpawn = 0x0173, // updated 4.3 - ActorMove = 0x0174, // updated 4.3 - ActorSetPos = 0x0176, // updated 4.3 + ActorCast = 0x0178, // updated 4.3 - ActorCast = 0x0178, // updated 4.3 + PartyList = 0x017A, // updated 4.3 + HateList = 0x017B, // updated 4.3 - PartyList = 0x017A, // updated 4.3 - HateList = 0x017B, // updated 4.3 + ObjectSpawn = 0x017D, // updated 4.3 + ObjectDespawn = 0x017E, // updated 4.3 - ObjectSpawn = 0x017D, // updated 4.3 - ObjectDespawn = 0x017E, // updated 4.3 + SetLevelSync = 0x017F, // updated 4.3 + SilentSetClassJob = 0x0180, // updated 4.3 - seems to be the case, not sure if it's actually used for anything - SetLevelSync = 0x017F, // updated 4.3 - SilentSetClassJob = 0x0180, // updated 4.3 - seems to be the case, not sure if it's actually used for anything + InitUI = 0x0181, // updated 4.3 + PlayerStats = 0x0182, // updated 4.3 + ActorOwner = 0x0183, // updated 4.3 ? + PlayerStateFlags = 0x0184, // updated 4.3 + PlayerClassInfo = 0x0185, // updated 4.3 + ModelEquip = 0x0186, // updated 4.3 - InitUI = 0x0181, // updated 4.3 - PlayerStats = 0x0182, // updated 4.3 - ActorOwner = 0x0183, // updated 4.3 ? - PlayerStateFlags = 0x0184, // updated 4.3 - PlayerClassInfo = 0x0185, // updated 4.3 - ModelEquip = 0x0186, // updated 4.3 + UpdateClassInfo = 0x018A, // updated 4.3 - UpdateClassInfo = 0x018A, // updated 4.3 + ItemInfo = 0x0190, // updated 4.3 + ContainerInfo = 0x0192, // updated 4.3 + InventoryTransactionFinish = 0x0193, // updated 4.3 + InventoryTransaction = 0x0194, // updated 4.3 + CurrencyCrystalInfo = 0x0195, // updated 4.3 + InventoryActionAck = 0x0197, // updated 4.3 + UpdateInventorySlot = 0x0198, // updated 4.3 - ItemInfo = 0x0190, // updated 4.3 - ContainerInfo = 0x0192, // updated 4.3 - InventoryTransactionFinish = 0x0193, // updated 4.3 - InventoryTransaction = 0x0194, // updated 4.3 - CurrencyCrystalInfo = 0x0195, // updated 4.3 - InventoryActionAck = 0x0197, // updated 4.3 - UpdateInventorySlot = 0x0198, // updated 4.3 + EventPlay = 0x01A6, // updated 4.3 + EventOpenGilShop = 0x01AD, // updated 4.3 + DirectorPlayScene = 0x01AA, // updated 4.3 - EventPlay = 0x01A6, // updated 4.3 - EventOpenGilShop = 0x01AD, // updated 4.3 - DirectorPlayScene = 0x01AA, // updated 4.3 + EventStart = 0x01AF, // updated 4.3 + EventFinish = 0x01B0, // updated 4.3 - EventStart = 0x01AF, // updated 4.3 - EventFinish = 0x01B0, // updated 4.3 + EventLinkshell = 0x1169, - EventLinkshell = 0x1169, + QuestActiveList = 0x01C3, // updated 4.3 + QuestUpdate = 0x01C4, // updated 4.3 + QuestCompleteList = 0x01C5, // updated 4.3 - QuestActiveList = 0x01C3, // updated 4.3 - QuestUpdate = 0x01C4, // updated 4.3 - QuestCompleteList = 0x01C5, // updated 4.3 + QuestFinish = 0x01C6, // updated 4.3 + MSQTrackerComplete = 0x01C7, // updated 4.3 + MSQTrackerProgress = 0x01C8, // updated 4.3 - QuestFinish = 0x01C6, // updated 4.3 - MSQTrackerComplete = 0x01C7, // updated 4.3 - MSQTrackerProgress = 0x01C8, // updated 4.3 + QuestMessage = 0x01CE, // updated 4.3 - QuestMessage = 0x01CE, // updated 4.3 + QuestTracker = 0x01D3, // updated 4.3 - QuestTracker = 0x01D3, // updated 4.3 + Mount = 0x01E3, // updated 4.3 - Mount = 0x01E3, // updated 4.3 + DirectorVars = 0x01E5, // updated 4.3 - DirectorVars = 0x01E5, // updated 4.3 + CFAvailableContents = 0x01FD, // updated 4.2 - CFAvailableContents = 0x01FD, // updated 4.2 + WeatherChange = 0x0200, // updated 4.3 + PlayerTitleList = 0x0201, // updated 4.3 + Discovery = 0x0202, // updated 4.3 - WeatherChange = 0x0200, // updated 4.3 - PlayerTitleList = 0x0201, // updated 4.3 - Discovery = 0x0202, // updated 4.3 + EorzeaTimeOffset = 0x0204, // updated 4.3 - EorzeaTimeOffset = 0x0204, // updated 4.3 + EquipDisplayFlags = 0x0210, // updated 4.3 - EquipDisplayFlags = 0x0210, // updated 4.3 + WardInfo = 0x0224, // updated 4.3 + WardHousingPermission = 0x022D, // updated 4.3 + WardYardInfo = 0x022F, // updated 4.3 - WardInfo = 0x0224, // updated 4.3 - WardHousingPermission = 0x022D, // updated 4.3 - WardYardInfo = 0x022F, // updated 4.3 + DuelChallenge = 0x0277, // 4.2; this is responsible for opening the ui + PerformNote = 0x0286, // updated 4.3 - DuelChallenge = 0x0277, // 4.2; this is responsible for opening the ui - PerformNote = 0x0286, // updated 4.3 + PrepareZoning = 0x0291, // updated 4.3 + ActorGauge = 0x0292, // updated 4.3 - PrepareZoning = 0x0291, // updated 4.3 - ActorGauge = 0x0292, // updated 4.3 + // Unknown IPC types that still need to be sent + // TODO: figure all these out properly + IPCTYPE_UNK_320 = 0x024C, // updated 4.3 + IPCTYPE_UNK_322 = 0x024E, // updated 4.3 - // Unknown IPC types that still need to be sent - // TODO: figure all these out properly - IPCTYPE_UNK_320 = 0x024C, // updated 4.3 - IPCTYPE_UNK_322 = 0x024E, // updated 4.3 +}; - }; +/** +* Client IPC Zone Type Codes. +*/ +enum ClientZoneIpcType : + uint16_t +{ - /** - * Client IPC Zone Type Codes. - */ - enum ClientZoneIpcType : uint16_t - { + PingHandler = 0x0065, // unchanged 4.3 + InitHandler = 0x0066, // unchanged 4.3 - PingHandler = 0x0065, // unchanged 4.3 - InitHandler = 0x0066, // unchanged 4.3 + FinishLoadingHandler = 0x0069, // unchanged 4.3 - FinishLoadingHandler = 0x0069, // unchanged 4.3 + CFCommenceHandler = 0x006F, - CFCommenceHandler = 0x006F, + CFRegisterDuty = 0x0071, + CFRegisterRoulette = 0x0072, + PlayTimeHandler = 0x0073, // unchanged 4.3 + LogoutHandler = 0x0074, // unchanged 4.3 + CFDutyInfoHandler = 0x0078, // updated 4.2 - CFRegisterDuty = 0x0071, - CFRegisterRoulette = 0x0072, - PlayTimeHandler = 0x0073, // unchanged 4.3 - LogoutHandler = 0x0074, // unchanged 4.3 + SocialReqSendHandler = 0x00AE, // updated 4.1 + CreateCrossWorldLS = 0x00AF, // updated 4.3 - CFDutyInfoHandler = 0x0078, // updated 4.2 + ChatHandler = 0x00D3, // updated 4.3 - SocialReqSendHandler = 0x00AE, // updated 4.1 - CreateCrossWorldLS = 0x00AF, // updated 4.3 + SocialListHandler = 0x00DB, // updated 4.3 + ReqSearchInfoHandler = 0x00E0, // updated 4.3 + SetSearchInfoHandler = 0x00DE, // updated 4.3 - ChatHandler = 0x00D3, // updated 4.3 + BlackListHandler = 0x00EC, // updated 4.3 + PlayerSearchHandler = 0x00E2, // updated 4.2 - SocialListHandler = 0x00DB, // updated 4.3 - ReqSearchInfoHandler = 0x00E0, // updated 4.3 - SetSearchInfoHandler = 0x00DE, // updated 4.3 + LinkshellListHandler = 0x00F4, // updated 4.3 - BlackListHandler = 0x00EC, // updated 4.3 - PlayerSearchHandler = 0x00E2, // updated 4.2 + SearchMarketboard = 0x0103, // updated 4.3 - LinkshellListHandler = 0x00F4, // updated 4.3 + FcInfoReqHandler = 0x011A, // updated 4.2 - SearchMarketboard = 0x0103, // updated 4.3 + ReqMarketWishList = 0x012C, // updated 4.3 - FcInfoReqHandler = 0x011A, // updated 4.2 + ReqJoinNoviceNetwork = 0x0129, // updated 4.2 - ReqMarketWishList = 0x012C, // updated 4.3 + ReqCountdownInitiate = 0x0138, // updated 4.3 + ReqCountdownCancel = 0x0139, // updated 4.3 + ClearWaymarks = 0x013A, // updated 4.3 - ReqJoinNoviceNetwork = 0x0129, // updated 4.2 + ZoneLineHandler = 0x013C, // updated 4.3 + ClientTrigger = 0x013D, // updated 4.3 + DiscoveryHandler = 0x013E, // updated 4.3 - ReqCountdownInitiate = 0x0138, // updated 4.3 - ReqCountdownCancel = 0x0139, // updated 4.3 - ClearWaymarks = 0x013A, // updated 4.3 + AddWaymark = 0x013F, // updated 4.3 - ZoneLineHandler = 0x013C, // updated 4.3 - ClientTrigger = 0x013D, // updated 4.3 - DiscoveryHandler = 0x013E, // updated 4.3 + SkillHandler = 0x0140, // updated 4.3 + GMCommand1 = 0x0141, // updated 4.3 + GMCommand2 = 0x0142, // updated 4.3 - AddWaymark = 0x013F, // updated 4.3 + UpdatePositionHandler = 0x0144, // updated 4.3 + UpdatePositionInstance = 0x0183, // updated 4.3 - SkillHandler = 0x0140, // updated 4.3 - GMCommand1 = 0x0141, // updated 4.3 - GMCommand2 = 0x0142, // updated 4.3 + InventoryModifyHandler = 0x014B, // updated 4.3 - UpdatePositionHandler = 0x0144, // updated 4.3 - UpdatePositionInstance = 0x0183, // updated 4.3 + TalkEventHandler = 0x0154, // updated 4.3 + EmoteEventHandler = 0x0155, // updated 4.3 + WithinRangeEventHandler = 0x0156, // updated 4.3 + OutOfRangeEventHandler = 0x0157, // updated 4.3 + EnterTeriEventHandler = 0x0158, // updated 4.3 - InventoryModifyHandler = 0x014B, // updated 4.3 + ReturnEventHandler = 0x015D, // updated 4.3 + TradeReturnEventHandler = 0x015E, // updated 4.3 - TalkEventHandler = 0x0154, // updated 4.3 - EmoteEventHandler = 0x0155, // updated 4.3 - WithinRangeEventHandler = 0x0156, // updated 4.3 - OutOfRangeEventHandler = 0x0157, // updated 4.3 - EnterTeriEventHandler = 0x0158, // updated 4.3 + LinkshellEventHandler = 0x0150, // updated 4.1 ?? + LinkshellEventHandler1 = 0x0151, // updated 4.1 ?? - ReturnEventHandler = 0x015D, // updated 4.3 - TradeReturnEventHandler = 0x015E, // updated 4.3 + PerformNoteHandler = 0x029B, // updated 4.3 - LinkshellEventHandler = 0x0150, // updated 4.1 ?? - LinkshellEventHandler1 = 0x0151, // updated 4.1 ?? + ReqEquipDisplayFlagsChange = 0x0178, // updated 4.3 - PerformNoteHandler = 0x029B, // updated 4.3 - ReqEquipDisplayFlagsChange = 0x0178, // updated 4.3 +}; +//////////////////////////////////////////////////////////////////////////////// +/// Chat Connection IPC Codes +/** +* Server IPC Chat Type Codes. +*/ +enum ServerChatIpcType : + uint16_t +{ + Tell = 0x0064, // updated for sb + TellErrNotFound = 0x0066, +}; - }; - - //////////////////////////////////////////////////////////////////////////////// - /// Chat Connection IPC Codes - /** - * Server IPC Chat Type Codes. - */ - enum ServerChatIpcType : uint16_t - { - Tell = 0x0064, // updated for sb - TellErrNotFound = 0x0066, - }; - - /** - * Client IPC Chat Type Codes. - */ - enum ClientChatIpcType : uint16_t - { - TellReq = 0x0064, - }; +/** +* Client IPC Chat Type Codes. +*/ +enum ClientChatIpcType : + uint16_t +{ + TellReq = 0x0064, +}; } /* Packets */ diff --git a/src/common/Network/PacketDef/Lobby/ServerLobbyDef.h b/src/common/Network/PacketDef/Lobby/ServerLobbyDef.h index 92d1f304..05132749 100644 --- a/src/common/Network/PacketDef/Lobby/ServerLobbyDef.h +++ b/src/common/Network/PacketDef/Lobby/ServerLobbyDef.h @@ -9,133 +9,140 @@ namespace Network { namespace Packets { namespace Server { -struct FFXIVIpcRetainerList : FFXIVIpcBasePacket +struct FFXIVIpcRetainerList : + FFXIVIpcBasePacket< LobbyRetainerList > { - uint8_t padding[0x210]; + uint8_t padding[0x210]; }; /** */ -struct FFXIVIpcServiceIdInfo : FFXIVIpcBasePacket +struct FFXIVIpcServiceIdInfo : + FFXIVIpcBasePacket< LobbyServiceAccountList > { - uint64_t seq; - uint8_t padding; - uint8_t numServiceAccounts; - uint8_t u1; - uint8_t u2; - uint32_t padding1; + uint64_t seq; + uint8_t padding; + uint8_t numServiceAccounts; + uint8_t u1; + uint8_t u2; + uint32_t padding1; - struct - { - uint32_t id; - uint32_t unknown; - uint32_t index; - char name[0x44]; - } serviceAccount[8]; + struct + { + uint32_t id; + uint32_t unknown; + uint32_t index; + char name[0x44]; + } serviceAccount[8]; }; -struct FFXIVIpcServerList : FFXIVIpcBasePacket +struct FFXIVIpcServerList : + FFXIVIpcBasePacket< LobbyServerList > { - uint64_t seq; - uint16_t final; - uint16_t offset; - uint32_t numServers; - uint32_t padding; - uint32_t padding1; + uint64_t seq; + uint16_t final; + uint16_t offset; + uint32_t numServers; + uint32_t padding; + uint32_t padding1; - struct - { - uint16_t id; - uint16_t index; - uint32_t flags; // 0x02 = World not accepting new characters - uint32_t padding1; - uint32_t icon; // 2 = bonus XP star - uint32_t padding2; - char name[0x40]; - } server[6]; + struct + { + uint16_t id; + uint16_t index; + uint32_t flags; // 0x02 = World not accepting new characters + uint32_t padding1; + uint32_t icon; // 2 = bonus XP star + uint32_t padding2; + char name[0x40]; + } server[6]; }; -struct FFXIVIpcCharList : FFXIVIpcBasePacket +struct FFXIVIpcCharList : + FFXIVIpcBasePacket< LobbyCharList > { - uint64_t seq; - uint8_t counter; // current packet count * 4, count * 4 +1 on last packet. - uint8_t numInPacket; // always 2?? - uint16_t padding; - uint8_t unknown1; - uint8_t unknown2; - uint8_t unknown3; - uint8_t unknown4; // 0x80 in case of last packet - uint32_t unknown5[7]; - uint8_t unknown6; // 0x80 in case of last packet - uint8_t veteranRank; - uint8_t unknown7; - uint8_t padding1; - uint32_t daysSubscribed; - uint32_t remainingDays; - uint32_t daysToNextRank; - uint16_t maxCharOnWorld; - uint16_t unknown8; - uint32_t entitledExpansion; - uint32_t padding2; + uint64_t seq; + uint8_t counter; // current packet count * 4, count * 4 +1 on last packet. + uint8_t numInPacket; // always 2?? + uint16_t padding; + uint8_t unknown1; + uint8_t unknown2; + uint8_t unknown3; + uint8_t unknown4; // 0x80 in case of last packet + uint32_t unknown5[7]; + uint8_t unknown6; // 0x80 in case of last packet + uint8_t veteranRank; + uint8_t unknown7; + uint8_t padding1; + uint32_t daysSubscribed; + uint32_t remainingDays; + uint32_t daysToNextRank; + uint16_t maxCharOnWorld; + uint16_t unknown8; + uint32_t entitledExpansion; + uint32_t padding2; - struct CharaDetails - { - uint32_t uniqueId; - uint32_t padding; - uint64_t contentId; - uint32_t index; - uint32_t padding2; - uint16_t serverId; - uint16_t serverId1; - char nameChara[32]; - char nameServer[32]; - char nameServer1[32]; - char charDetailJson[1028]; - } charaDetails[2]; + struct CharaDetails + { + uint32_t uniqueId; + uint32_t padding; + uint64_t contentId; + uint32_t index; + uint32_t padding2; + uint16_t serverId; + uint16_t serverId1; + char nameChara[32]; + char nameServer[32]; + char nameServer1[32]; + char charDetailJson[1028]; + } charaDetails[2]; }; -struct FFXIVIpcEnterWorld : FFXIVIpcBasePacket +struct FFXIVIpcEnterWorld : + FFXIVIpcBasePacket< LobbyEnterWorld > { - uint64_t seq; - uint32_t charId; - uint32_t padding; - uint64_t contentId; - uint32_t padding2; - char sid[66]; - uint16_t port; - char host[48]; - uint64_t padding3; - uint64_t padding4; + uint64_t seq; + uint32_t charId; + uint32_t padding; + uint64_t contentId; + uint32_t padding2; + char sid[66]; + uint16_t port; + char host[48]; + uint64_t padding3; + uint64_t padding4; }; -struct FFXIVIpcCharCreate : FFXIVIpcBasePacket +struct FFXIVIpcCharCreate : + FFXIVIpcBasePacket< LobbyCharCreate > { - uint64_t seq; - uint8_t unknown; - uint8_t unknown_2; - uint8_t type; - uint8_t padding; - uint32_t unknown_3; - uint32_t unknown_4; - uint32_t unknown_5; - uint64_t content_id; - uint16_t unknown_7; - uint16_t unknown_8; - uint32_t unknown_9; - uint16_t unknown_10; - char name[32]; - char world[32]; + uint64_t seq; + uint8_t unknown; + uint8_t unknown_2; + uint8_t type; + uint8_t padding; + uint32_t unknown_3; + uint32_t unknown_4; + uint32_t unknown_5; + uint64_t content_id; + uint16_t unknown_7; + uint16_t unknown_8; + uint32_t unknown_9; + uint16_t unknown_10; + char name[32]; + char world[32]; }; -struct FFXIVIpcLobbyError : FFXIVIpcBasePacket +struct FFXIVIpcLobbyError : + FFXIVIpcBasePacket< LobbyError > { - uint64_t seq; - uint32_t error_id; - uint32_t param; - uint16_t message_id; - char message[516]; + uint64_t seq; + uint32_t error_id; + uint32_t param; + uint16_t message_id; + char message[516]; }; } diff --git a/src/common/Network/PacketDef/Zone/ClientZoneDef.h b/src/common/Network/PacketDef/Zone/ClientZoneDef.h index b7cd1b32..3f751d4f 100644 --- a/src/common/Network/PacketDef/Zone/ClientZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ClientZoneDef.h @@ -9,160 +9,178 @@ namespace Network { namespace Packets { namespace Client { -struct FFXIVIpcGmCommand1 : FFXIVIpcBasePacket< GMCommand1 > +struct FFXIVIpcGmCommand1 : + FFXIVIpcBasePacket< GMCommand1 > { - /* 0000 */ uint32_t commandId; - /* 0004 */ uint32_t param1; - /* 0008 */ uint32_t param2; - /* 000C */ uint8_t unknown_C[0xC]; - /* 0018 */ uint32_t param3; + /* 0000 */ uint32_t commandId; + /* 0004 */ uint32_t param1; + /* 0008 */ uint32_t param2; + /* 000C */ uint8_t unknown_C[0xC]; + /* 0018 */ uint32_t param3; }; -struct FFXIVIpcGmCommand2 : FFXIVIpcBasePacket< GMCommand2 > +struct FFXIVIpcGmCommand2 : + FFXIVIpcBasePacket< GMCommand2 > { - /* 0000 */ uint32_t commandId; - /* 0004 */ char unk_4[0x10]; - /* 0014 */ char param1[0x20]; + /* 0000 */ uint32_t commandId; + /* 0004 */ char unk_4[0x10]; + /* 0014 */ char param1[0x20]; }; -struct FFXIVIpcClientTrigger : FFXIVIpcBasePacket< ClientTrigger > +struct FFXIVIpcClientTrigger : + FFXIVIpcBasePacket< ClientTrigger > { - /* 0000 */ uint16_t commandId; - /* 0002 */ uint8_t unk_2[2]; - /* 0004 */ uint32_t param11; - /* 0008 */ uint32_t param12; - /* 000C */ uint32_t param2; - /* 0010 */ char unk_10[8]; - /* 0018 */ uint64_t param3; + /* 0000 */ uint16_t commandId; + /* 0002 */ uint8_t unk_2[2]; + /* 0004 */ uint32_t param11; + /* 0008 */ uint32_t param12; + /* 000C */ uint32_t param2; + /* 0010 */ char unk_10[8]; + /* 0018 */ uint64_t param3; }; -struct FFXIVIpcSkillHandler : FFXIVIpcBasePacket< SkillHandler > +struct FFXIVIpcSkillHandler : + FFXIVIpcBasePacket< SkillHandler > { - /* 0000 */ char pad_0000[1]; - /* 0001 */ uint8_t type; - /* 0002 */ char pad_0002[2]; - /* 0004 */ uint32_t actionId; - /* 0008 */ uint32_t useCount; - /* 000C */ char pad_000C[4]; - /* 0010 */ uint64_t targetId; + /* 0000 */ char pad_0000[1]; + /* 0001 */ uint8_t type; + /* 0002 */ char pad_0002[2]; + /* 0004 */ uint32_t actionId; + /* 0008 */ uint32_t useCount; + /* 000C */ char pad_000C[4]; + /* 0010 */ uint64_t targetId; }; -struct FFXIVIpcZoneLineHandler : FFXIVIpcBasePacket< ZoneLineHandler > +struct FFXIVIpcZoneLineHandler : + FFXIVIpcBasePacket< ZoneLineHandler > { - /* 0000 */ uint32_t zoneLineId; + /* 0000 */ uint32_t zoneLineId; }; -struct FFXIVIpcDiscoveryHandler : FFXIVIpcBasePacket< DiscoveryHandler > +struct FFXIVIpcDiscoveryHandler : + FFXIVIpcBasePacket< DiscoveryHandler > { - /* 0000 */ uint32_t positionRef; + /* 0000 */ uint32_t positionRef; }; -struct FFXIVIpcEventHandlerReturn : FFXIVIpcBasePacket< ReturnEventHandler > +struct FFXIVIpcEventHandlerReturn : + FFXIVIpcBasePacket< ReturnEventHandler > { - /* 0000 */ uint32_t eventId; - /* 0004 */ uint16_t scene; - /* 0006 */ uint16_t param1; - /* 0008 */ uint16_t param2; - /* 000A */ char pad_000A[2]; - /* 000C */ uint16_t param3; - /* 000E */ char pad_000E[2]; - /* 0010 */ uint16_t param4; + /* 0000 */ uint32_t eventId; + /* 0004 */ uint16_t scene; + /* 0006 */ uint16_t param1; + /* 0008 */ uint16_t param2; + /* 000A */ char pad_000A[2]; + /* 000C */ uint16_t param3; + /* 000E */ char pad_000E[2]; + /* 0010 */ uint16_t param4; }; -struct FFXIVIpcEnterTerritoryHandler : FFXIVIpcBasePacket< EnterTeriEventHandler > +struct FFXIVIpcEnterTerritoryHandler : + FFXIVIpcBasePacket< EnterTeriEventHandler > { - /* 0000 */ uint32_t eventId; - /* 0004 */ uint16_t param1; - /* 0006 */ uint16_t param2; + /* 0000 */ uint32_t eventId; + /* 0004 */ uint16_t param1; + /* 0006 */ uint16_t param2; }; -struct FFXIVIpcEventHandlerOutsideRange : FFXIVIpcBasePacket< OutOfRangeEventHandler > +struct FFXIVIpcEventHandlerOutsideRange : + FFXIVIpcBasePacket< OutOfRangeEventHandler > { - /* 0000 */ uint32_t param1; - /* 0004 */ uint32_t eventId; - /* 0008 */ Common::FFXIVARR_POSITION3 position; + /* 0000 */ uint32_t param1; + /* 0004 */ uint32_t eventId; + /* 0008 */ Common::FFXIVARR_POSITION3 position; }; -struct FFXIVIpcEventHandlerWithinRange : FFXIVIpcBasePacket< WithinRangeEventHandler > +struct FFXIVIpcEventHandlerWithinRange : + FFXIVIpcBasePacket< WithinRangeEventHandler > { - /* 0000 */ uint32_t param1; - /* 0004 */ uint32_t eventId; - /* 0008 */ Common::FFXIVARR_POSITION3 position; + /* 0000 */ uint32_t param1; + /* 0004 */ uint32_t eventId; + /* 0008 */ Common::FFXIVARR_POSITION3 position; }; -struct FFXIVIpcEventHandlerEmote : FFXIVIpcBasePacket< EmoteEventHandler > +struct FFXIVIpcEventHandlerEmote : + FFXIVIpcBasePacket< EmoteEventHandler > { - /* 0000 */ uint64_t actorId; - /* 0008 */ uint32_t eventId; - /* 000C */ uint16_t emoteId; + /* 0000 */ uint64_t actorId; + /* 0008 */ uint32_t eventId; + /* 000C */ uint16_t emoteId; }; -struct FFXIVIpcEventHandlerTalk : FFXIVIpcBasePacket< TalkEventHandler > +struct FFXIVIpcEventHandlerTalk : + FFXIVIpcBasePacket< TalkEventHandler > { - /* 0000 */ uint64_t actorId; - /* 0008 */ uint32_t eventId; + /* 0000 */ uint64_t actorId; + /* 0008 */ uint32_t eventId; }; -struct FFXIVIpcPingHandler : FFXIVIpcBasePacket< PingHandler > +struct FFXIVIpcPingHandler : + FFXIVIpcBasePacket< PingHandler > { - /* 0000 */ uint32_t timestamp; // maybe lol.. + /* 0000 */ uint32_t timestamp; // maybe lol.. }; -struct FFXIVIpcSetSearchInfo : FFXIVIpcBasePacket< SetSearchInfoHandler > +struct FFXIVIpcSetSearchInfo : + FFXIVIpcBasePacket< SetSearchInfoHandler > { - union - { - /* 0000 */ uint64_t status; - struct - { - /* 0000 */ uint32_t status1; - /* 0004 */ uint32_t status2; - }; - }; + union + { + /* 0000 */ uint64_t status; + struct + { + /* 0000 */ uint32_t status1; + /* 0004 */ uint32_t status2; + }; + }; - /* 0008 */ char pad_0008[9]; - /* 0011 */ Common::ClientLanguage language; - /* 0012 */ char searchComment[193]; + /* 0008 */ char pad_0008[9]; + /* 0011 */ Common::ClientLanguage language; + /* 0012 */ char searchComment[193]; }; -struct FFXIVIpcTellHandler : FFXIVIpcBasePacket< TellReq > +struct FFXIVIpcTellHandler : + FFXIVIpcBasePacket< TellReq > { - /* 0000 */ char pad_0000[4]; - /* 0004 */ char targetPCName[32]; - /* 0024 */ char message[1012]; + /* 0000 */ char pad_0000[4]; + /* 0004 */ char targetPCName[32]; + /* 0024 */ char message[1012]; }; -struct FFXIVIpcChatHandler : FFXIVIpcBasePacket< ChatHandler > +struct FFXIVIpcChatHandler : + FFXIVIpcBasePacket< ChatHandler > { - /* 0000 */ char pad_0000[4]; - /* 0004 */ uint32_t sourceId; - /* 0008 */ char pad_0008[16]; - /* 0018 */ Common::ChatType chatType; - /* 001A */ char message[1012]; + /* 0000 */ char pad_0000[4]; + /* 0004 */ uint32_t sourceId; + /* 0008 */ char pad_0008[16]; + /* 0018 */ Common::ChatType chatType; + /* 001A */ char message[1012]; }; -struct FFXIVIpcLinkshellEventHandler : FFXIVIpcBasePacket< LinkshellEventHandler > +struct FFXIVIpcLinkshellEventHandler : + FFXIVIpcBasePacket< LinkshellEventHandler > { - /* 0000 */ uint32_t eventId; - /* 0004 */ uint16_t scene; - /* 0006 */ char pad_0006[1]; - /* 0007 */ char lsName[21]; + /* 0000 */ uint32_t eventId; + /* 0004 */ uint16_t scene; + /* 0006 */ char pad_0006[1]; + /* 0007 */ char lsName[21]; }; -struct FFXIVIpcInventoryModifyHandler : FFXIVIpcBasePacket< InventoryModifyHandler > +struct FFXIVIpcInventoryModifyHandler : + FFXIVIpcBasePacket< InventoryModifyHandler > { - /* 0000 */ uint32_t seq; - /* 0004 */ Common::InventoryOperation action; - /* 0005 */ char pad_0005[7]; - /* 000C */ uint16_t fromContainer; - /* 000E */ char pad_000E[2]; - /* 0010 */ uint8_t fromSlot; - /* 0011 */ char pad_0011[15]; - /* 0020 */ uint16_t toContainer; - /* 0022 */ char pad_0022[2]; - /* 0024 */ uint8_t toSlot; - /* 0025 */ uint8_t pad_0025[3]; - /* 0028 */ uint32_t splitCount; + /* 0000 */ uint32_t seq; + /* 0004 */ Common::InventoryOperation action; + /* 0005 */ char pad_0005[7]; + /* 000C */ uint16_t fromContainer; + /* 000E */ char pad_000E[2]; + /* 0010 */ uint8_t fromSlot; + /* 0011 */ char pad_0011[15]; + /* 0020 */ uint16_t toContainer; + /* 0022 */ char pad_0022[2]; + /* 0024 */ uint8_t toSlot; + /* 0025 */ uint8_t pad_0025[3]; + /* 0028 */ uint32_t splitCount; }; } diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 7e158c2d..c894fdf1 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -19,59 +19,65 @@ namespace Server { * Structural representation of the packet sent by the server as response * to a ping packet */ -struct FFXIVIpcPing : FFXIVIpcBasePacket +struct FFXIVIpcPing : + FFXIVIpcBasePacket< Ping > { - /* 0000 */ uint64_t timeInMilliseconds; - /* 0008 */ uint8_t unknown_8[0x38]; + /* 0000 */ uint64_t timeInMilliseconds; + /* 0008 */ uint8_t unknown_8[0x38]; }; /** * Structural representation of the packet sent by the server as response * to a ping packet */ -struct FFXIVIpcInit : FFXIVIpcBasePacket +struct FFXIVIpcInit : + FFXIVIpcBasePacket< Init > { - uint64_t unknown; - uint32_t charId; - uint32_t unknown1; + uint64_t unknown; + uint32_t charId; + uint32_t unknown1; }; /** * Structural representation of the packet sent by the server * carrying chat messages */ -struct FFXIVIpcChat : FFXIVIpcBasePacket +struct FFXIVIpcChat : + FFXIVIpcBasePacket< Chat > { - /* 0000 */ uint8_t padding[14]; //Maybe this is SubCode, or some kind of talker ID... - Common::ChatType chatType; - char name[32]; - char msg[1012]; + /* 0000 */ uint8_t padding[14]; //Maybe this is SubCode, or some kind of talker ID... + Common::ChatType chatType; + char name[32]; + char msg[1012]; }; -struct FFXIVIpcChatBanned : FFXIVIpcBasePacket +struct FFXIVIpcChatBanned : + FFXIVIpcBasePacket< ChatBanned > { - uint8_t padding[4]; // I was not sure reinterpreting ZST is valid behavior in C++. - // client doesn't care about the data (zero sized) for this opcode anyway. + uint8_t padding[4]; // I was not sure reinterpreting ZST is valid behavior in C++. + // client doesn't care about the data (zero sized) for this opcode anyway. }; /** * Structural representation of the packet sent by the server * carrying chat messages */ -struct FFXIVIpcLogout : FFXIVIpcBasePacket +struct FFXIVIpcLogout : + FFXIVIpcBasePacket< Logout > { - uint32_t flags1; - uint32_t flags2; + uint32_t flags1; + uint32_t flags2; }; /** * Structural representation of the packet sent by the server * sent to show the play time */ -struct FFXIVIpcPlayTime : FFXIVIpcBasePacket +struct FFXIVIpcPlayTime : + FFXIVIpcBasePacket< Playtime > { - uint32_t playTimeInMinutes; - uint32_t padding; + uint32_t playTimeInMinutes; + uint32_t padding; }; @@ -79,219 +85,235 @@ struct FFXIVIpcPlayTime : FFXIVIpcBasePacket * Structural representation of the packet sent by the server * with a list of players ( party list | friend list | search results ) */ -struct PlayerEntry { - uint64_t contentId; - uint8_t bytes[12]; - uint16_t zoneId; - uint16_t zoneId1; - char bytes1[8]; - uint64_t onlineStatusMask; - uint8_t classJob; - uint8_t padding; - uint8_t level; - uint8_t padding1; - uint16_t padding2; - uint8_t one; - char name[0x20]; - char fcTag[9]; +struct PlayerEntry +{ + uint64_t contentId; + uint8_t bytes[12]; + uint16_t zoneId; + uint16_t zoneId1; + char bytes1[8]; + uint64_t onlineStatusMask; + uint8_t classJob; + uint8_t padding; + uint8_t level; + uint8_t padding1; + uint16_t padding2; + uint8_t one; + char name[0x20]; + char fcTag[9]; }; -struct FFXIVIpcSocialList : FFXIVIpcBasePacket +struct FFXIVIpcSocialList : + FFXIVIpcBasePacket< SocialList > { - uint32_t padding; - uint32_t padding1; - uint32_t padding2; - uint8_t type; - uint8_t sequence; - uint16_t padding3; + uint32_t padding; + uint32_t padding1; + uint32_t padding2; + uint8_t type; + uint8_t sequence; + uint16_t padding3; - PlayerEntry entries[10]; + PlayerEntry entries[10]; }; -struct FFXIVIpcSetSearchInfo : FFXIVIpcBasePacket +struct FFXIVIpcSetSearchInfo : + FFXIVIpcBasePacket< UpdateSearchInfo > { - uint64_t onlineStatusFlags; - uint64_t unknown; - uint32_t unknown1; - uint8_t padding; - uint8_t selectRegion; - char searchMessage[193]; - uint8_t padding2; + uint64_t onlineStatusFlags; + uint64_t unknown; + uint32_t unknown1; + uint8_t padding; + uint8_t selectRegion; + char searchMessage[193]; + uint8_t padding2; }; -struct FFXIVIpcInitSearchInfo : FFXIVIpcBasePacket +struct FFXIVIpcInitSearchInfo : + FFXIVIpcBasePacket< InitSearchInfo > { - uint64_t onlineStatusFlags; - uint64_t unknown; - uint8_t unknown1; - uint8_t selectRegion; - char searchMessage[193]; - char padding[5]; + uint64_t onlineStatusFlags; + uint64_t unknown; + uint8_t unknown1; + uint8_t selectRegion; + char searchMessage[193]; + char padding[5]; }; /** * Structural representation of the packet sent by the server * to display a server notice message */ -struct FFXIVIpcServerNotice : FFXIVIpcBasePacket +struct FFXIVIpcServerNotice : + FFXIVIpcBasePacket< ServerNotice > { - /* 0000 */ uint8_t padding; - char message[307]; + /* 0000 */ uint8_t padding; + char message[307]; }; -struct FFXIVIpcSetOnlineStatus : FFXIVIpcBasePacket +struct FFXIVIpcSetOnlineStatus : + FFXIVIpcBasePacket< SetOnlineStatus > { - uint64_t onlineStatusFlags; + uint64_t onlineStatusFlags; }; -struct FFXIVIpcBlackList : FFXIVIpcBasePacket +struct FFXIVIpcBlackList : + FFXIVIpcBasePacket< BlackList > { - struct BlEntry - { - uint64_t contentId; - char name[32]; - } entry[20]; - uint8_t padding; - uint8_t padding1; - uint16_t sequence; - uint32_t padding2; + struct BlEntry + { + uint64_t contentId; + char name[32]; + } entry[20]; + uint8_t padding; + uint8_t padding1; + uint16_t sequence; + uint32_t padding2; }; -struct FFXIVIpcLogMessage : FFXIVIpcBasePacket +struct FFXIVIpcLogMessage : + FFXIVIpcBasePacket< LogMessage > { - uint32_t field_0; - uint32_t field_4; - uint32_t field_8; - uint32_t field_12; - uint32_t category; - uint32_t logMessage; - uint8_t field_24; - uint8_t field_25; - uint8_t field_26[32]; - uint32_t field_58; + uint32_t field_0; + uint32_t field_4; + uint32_t field_8; + uint32_t field_12; + uint32_t category; + uint32_t logMessage; + uint8_t field_24; + uint8_t field_25; + uint8_t field_26[32]; + uint32_t field_58; }; -struct FFXIVIpcLinkshellList : FFXIVIpcBasePacket +struct FFXIVIpcLinkshellList : + FFXIVIpcBasePacket< LinkshellList > { - struct LsEntry - { - uint64_t lsId; - uint64_t unknownId; - uint8_t unknown; - uint8_t rank; - uint16_t padding; - uint8_t lsName[20]; - } entry[8]; + struct LsEntry + { + uint64_t lsId; + uint64_t unknownId; + uint8_t unknown; + uint8_t rank; + uint16_t padding; + uint8_t lsName[20]; + } entry[8]; }; -struct FFXIVIpcStatusEffectList : FFXIVIpcBasePacket +struct FFXIVIpcStatusEffectList : + FFXIVIpcBasePacket< StatusEffectList > { - uint8_t classId; - uint8_t level1; - uint16_t level; - uint32_t current_hp; - uint32_t max_hp; - uint16_t current_mp; - uint16_t max_mp; - uint16_t currentTp; - uint16_t unknown1; - Common::StatusEffect effect[30]; - uint32_t padding; + uint8_t classId; + uint8_t level1; + uint16_t level; + uint32_t current_hp; + uint32_t max_hp; + uint16_t current_mp; + uint16_t max_mp; + uint16_t currentTp; + uint16_t unknown1; + Common::StatusEffect effect[30]; + uint32_t padding; }; -struct FFXIVGCAffiliation : FFXIVIpcBasePacket +struct FFXIVGCAffiliation : + FFXIVIpcBasePacket< GCAffiliation > { - uint8_t gcId; - uint8_t gcRank[3]; + uint8_t gcId; + uint8_t gcRank[3]; }; /** * Structural representation of the packet sent by the server * add a status effect */ -struct FFXIVIpcAddStatusEffect : FFXIVIpcBasePacket +struct FFXIVIpcAddStatusEffect : + FFXIVIpcBasePacket< AddStatusEffect > { - uint32_t unknown; - uint32_t actor_id; - uint8_t unknown1; - uint8_t unknown2; - uint16_t padding1; - uint32_t current_hp; - uint16_t current_mp; - uint16_t current_tp; - uint32_t max_hp; - uint16_t max_mp; - uint16_t max_something; - uint8_t effect_index; // which position do i display this - uint8_t unknown3; - uint16_t effect_id; - uint16_t param; - uint16_t unknown5; // Sort this out (old right half of power/param property) - float duration; - uint32_t actor_id1; - uint8_t unknown4[52]; + uint32_t unknown; + uint32_t actor_id; + uint8_t unknown1; + uint8_t unknown2; + uint16_t padding1; + uint32_t current_hp; + uint16_t current_mp; + uint16_t current_tp; + uint32_t max_hp; + uint16_t max_mp; + uint16_t max_something; + uint8_t effect_index; // which position do i display this + uint8_t unknown3; + uint16_t effect_id; + uint16_t param; + uint16_t unknown5; // Sort this out (old right half of power/param property) + float duration; + uint32_t actor_id1; + uint8_t unknown4[52]; }; /** * Structural representation of the packet sent by the server * to update certain player details / status */ -struct FFXIVIpcActorControl142 : FFXIVIpcBasePacket +struct FFXIVIpcActorControl142 : + FFXIVIpcBasePacket< ActorControl142 > { - /* 0000 */ uint16_t category; - /* 0002 */ uint16_t padding; - /* 0004 */ uint32_t param1; - /* 0008 */ uint32_t param2; - /* 000C */ uint32_t param3; - /* 0010 */ uint32_t param4; - /* 0014 */ uint32_t padding1; + /* 0000 */ uint16_t category; + /* 0002 */ uint16_t padding; + /* 0004 */ uint32_t param1; + /* 0008 */ uint32_t param2; + /* 000C */ uint32_t param3; + /* 0010 */ uint32_t param4; + /* 0014 */ uint32_t padding1; }; /** * Structural representation of the packet sent by the server * to update certain player details / status */ -struct FFXIVIpcActorControl143 : FFXIVIpcBasePacket +struct FFXIVIpcActorControl143 : + FFXIVIpcBasePacket< ActorControl143 > { - /* 0000 */ uint16_t category; - /* 0002 */ uint16_t padding; - /* 0004 */ uint32_t param1; - /* 0008 */ uint32_t param2; - /* 000C */ uint32_t param3; - /* 0010 */ uint32_t param4; - /* 0014 */ uint32_t param5; - /* 0018 */ uint32_t param6; - /* 0018 */ uint32_t padding1; + /* 0000 */ uint16_t category; + /* 0002 */ uint16_t padding; + /* 0004 */ uint32_t param1; + /* 0008 */ uint32_t param2; + /* 000C */ uint32_t param3; + /* 0010 */ uint32_t param4; + /* 0014 */ uint32_t param5; + /* 0018 */ uint32_t param6; + /* 0018 */ uint32_t padding1; }; /** * Structural representation of the packet sent by the server * to update certain player details / status */ -struct FFXIVIpcActorControl144 : FFXIVIpcBasePacket +struct FFXIVIpcActorControl144 : + FFXIVIpcBasePacket< ActorControl144 > { - /* 0000 */ uint16_t category; - /* 0002 */ uint16_t padding; - /* 0004 */ uint32_t param1; - /* 0008 */ uint32_t param2; - /* 000C */ uint32_t param3; - /* 0010 */ uint32_t param4; - /* 0014 */ uint32_t padding1; - /* 0018 */ uint64_t targetId; + /* 0000 */ uint16_t category; + /* 0002 */ uint16_t padding; + /* 0004 */ uint32_t param1; + /* 0008 */ uint32_t param2; + /* 000C */ uint32_t param3; + /* 0010 */ uint32_t param4; + /* 0014 */ uint32_t padding1; + /* 0018 */ uint64_t targetId; }; /** * Structural representation of the packet sent by the server * to update HP / MP / TP */ -struct FFXIVIpcUpdateHpMpTp : FFXIVIpcBasePacket +struct FFXIVIpcUpdateHpMpTp : + FFXIVIpcBasePacket< UpdateHpMpTp > { - /* 0000 */ uint32_t hp; - /* 0004 */ uint16_t mp; - /* 0006 */ uint16_t tp; - /* 0008 */ uint32_t unknown_8; - /* 000C */ uint32_t unknown_12; + /* 0000 */ uint32_t hp; + /* 0004 */ uint16_t mp; + /* 0006 */ uint16_t tp; + /* 0008 */ uint32_t unknown_8; + /* 000C */ uint32_t unknown_12; }; @@ -301,349 +323,371 @@ struct FFXIVIpcUpdateHpMpTp : FFXIVIpcBasePacket */ struct EffectEntry { - Common::ActionEffectType effectType; - Common::ActionHitSeverityType hitSeverity; - uint8_t param; - int8_t bonusPercent; // shows an additional percentage in the battle log, will not change the damage number sent & shown - uint8_t valueMultiplier; // This multiplies whatever value is in the 'value' param by 10. Possibly a workaround for big numbers - uint8_t flags; - int16_t value; + Common::ActionEffectType effectType; + Common::ActionHitSeverityType hitSeverity; + uint8_t param; + int8_t bonusPercent; // shows an additional percentage in the battle log, will not change the damage number sent & shown + uint8_t valueMultiplier; // This multiplies whatever value is in the 'value' param by 10. Possibly a workaround for big numbers + uint8_t flags; + int16_t value; }; struct EffectHeader { - uint64_t animationTargetId; // who the animation targets - uint32_t actionId; // what the casting player casts, shown in battle log/ui + uint64_t animationTargetId; // who the animation targets + uint32_t actionId; // what the casting player casts, shown in battle log/ui - uint32_t globalEffectCounter; // seems to only increment on retail? - float animationLockTime; // maybe? doesn't seem to do anything + uint32_t globalEffectCounter; // seems to only increment on retail? + float animationLockTime; // maybe? doesn't seem to do anything - uint32_t someTargetId; // always 00 00 00 E0, 0x0E000000 is the internal def for INVALID TARGET ID + uint32_t someTargetId; // always 00 00 00 E0, 0x0E000000 is the internal def for INVALID TARGET ID - uint16_t hiddenAnimation; // if 0, always shows animation, otherwise hides it. counts up by 1 for each animation skipped on a caster + uint16_t hiddenAnimation; // if 0, always shows animation, otherwise hides it. counts up by 1 for each animation skipped on a caster - uint16_t rotation; + uint16_t rotation; - uint16_t actionAnimationId; // the animation that is played by the casting character - uint8_t unknown1E; // can be 0,1,2 - maybe other values? - doesn't do anything? + uint16_t actionAnimationId; // the animation that is played by the casting character + uint8_t unknown1E; // can be 0,1,2 - maybe other values? - doesn't do anything? - Common::ActionEffectDisplayType effectDisplayType; + Common::ActionEffectDisplayType effectDisplayType; - uint8_t unknown20; // is read by handler, runs code which gets the LODWORD of animationLockTime (wtf?) - uint8_t effectCount; // ignores effects if 0, otherwise parses all of them + uint8_t unknown20; // is read by handler, runs code which gets the LODWORD of animationLockTime (wtf?) + uint8_t effectCount; // ignores effects if 0, otherwise parses all of them - uint32_t padding_22[2]; + uint32_t padding_22[2]; }; -struct FFXIVIpcEffect : FFXIVIpcBasePacket +struct FFXIVIpcEffect : + FFXIVIpcBasePacket< Effect > { - EffectHeader header; + EffectHeader header; - EffectEntry effects[8]; + EffectEntry effects[8]; - uint16_t padding_6A[3]; + uint16_t padding_6A[3]; - uint32_t effectTargetId; // who the effect targets - uint32_t effectFlags; // nonzero = effects do nothing, no battle log, no ui text - only shows animations + uint32_t effectTargetId; // who the effect targets + uint32_t effectFlags; // nonzero = effects do nothing, no battle log, no ui text - only shows animations - uint32_t padding_78; + uint32_t padding_78; }; template< int size > struct FFXIVIpcAoeEffect { - EffectHeader header; + EffectHeader header; - EffectEntry effects[size]; + EffectEntry effects[size]; - uint16_t padding_6A[3]; + uint16_t padding_6A[3]; - uint32_t effectTargetId[size]; - Common::FFXIVARR_POSITION3 position; - uint32_t effectFlags; + uint32_t effectTargetId[size]; + Common::FFXIVARR_POSITION3 position; + uint32_t effectFlags; - uint32_t padding_78; + uint32_t padding_78; }; -struct FFXIVIpcAoeEffect8 : FFXIVIpcBasePacket< AoeEffect8 >, FFXIVIpcAoeEffect< 8 > {}; -struct FFXIVIpcAoeEffect16 : FFXIVIpcBasePacket< AoeEffect16 >, FFXIVIpcAoeEffect< 16 > {}; -struct FFXIVIpcAoeEffect24 : FFXIVIpcBasePacket< AoeEffect24 >, FFXIVIpcAoeEffect< 24 > {}; -struct FFXIVIpcAoeEffect32 : FFXIVIpcBasePacket< AoeEffect32 >, FFXIVIpcAoeEffect< 32 > {}; +struct FFXIVIpcAoeEffect8 : + FFXIVIpcBasePacket< AoeEffect8 >, FFXIVIpcAoeEffect< 8 > +{ +}; +struct FFXIVIpcAoeEffect16 : + FFXIVIpcBasePacket< AoeEffect16 >, FFXIVIpcAoeEffect< 16 > +{ +}; +struct FFXIVIpcAoeEffect24 : + FFXIVIpcBasePacket< AoeEffect24 >, FFXIVIpcAoeEffect< 24 > +{ +}; +struct FFXIVIpcAoeEffect32 : + FFXIVIpcBasePacket< AoeEffect32 >, FFXIVIpcAoeEffect< 32 > +{ +}; /** * Structural representation of the packet sent by the server * to spawn an actor */ -struct FFXIVIpcPlayerSpawn : FFXIVIpcBasePacket +struct FFXIVIpcPlayerSpawn : + FFXIVIpcBasePacket< PlayerSpawn > { - uint16_t title; - uint16_t u1b; - uint8_t u2b; - uint8_t u2ab; - uint8_t gmRank; - uint8_t u3b; + uint16_t title; + uint16_t u1b; + uint8_t u2b; + uint8_t u2ab; + uint8_t gmRank; + uint8_t u3b; - uint8_t u3a; - uint8_t onlineStatus; - uint8_t u3c; - uint8_t pose; + uint8_t u3a; + uint8_t onlineStatus; + uint8_t u3c; + uint8_t pose; - uint32_t u4; + uint32_t u4; - uint64_t targetId; - uint32_t u6; - uint32_t u7; - uint64_t mainWeaponModel; - uint64_t secWeaponModel; - uint64_t craftToolModel; + uint64_t targetId; + uint32_t u6; + uint32_t u7; + uint64_t mainWeaponModel; + uint64_t secWeaponModel; + uint64_t craftToolModel; - uint32_t u14; - uint32_t u15; - uint32_t bNPCBase; - uint32_t bNPCName; - uint32_t u18; - uint32_t u19; - uint32_t directorId; - uint32_t ownerId; - uint32_t u22; - uint32_t hPMax; - uint32_t hPCurr; - uint32_t displayFlags; - uint16_t fateID; - uint16_t mPCurr; - uint16_t tPCurr; - uint16_t mPMax; - uint16_t tPMax; - uint16_t modelChara; - uint16_t rotation; - uint16_t activeMinion; - uint8_t spawnIndex; - uint8_t state; - uint8_t persistentEmote; - uint8_t modelType; - uint8_t subtype; - uint8_t voice; - uint16_t u25c; - uint8_t enemyType; - uint8_t level; - uint8_t classJob; - uint8_t u26d; - uint16_t u27a; - uint8_t currentMount; - uint8_t mountHead; - uint8_t mountBody; - uint8_t mountFeet; - uint8_t mountColor; - uint8_t scale; - uint32_t u29b; - uint32_t u30b; - Common::StatusEffect effect[30]; - Common::FFXIVARR_POSITION3 pos; - uint32_t models[10]; - char name[32]; - uint8_t look[26]; - char fcTag[6]; - uint32_t unk30; + uint32_t u14; + uint32_t u15; + uint32_t bNPCBase; + uint32_t bNPCName; + uint32_t u18; + uint32_t u19; + uint32_t directorId; + uint32_t ownerId; + uint32_t u22; + uint32_t hPMax; + uint32_t hPCurr; + uint32_t displayFlags; + uint16_t fateID; + uint16_t mPCurr; + uint16_t tPCurr; + uint16_t mPMax; + uint16_t tPMax; + uint16_t modelChara; + uint16_t rotation; + uint16_t activeMinion; + uint8_t spawnIndex; + uint8_t state; + uint8_t persistentEmote; + uint8_t modelType; + uint8_t subtype; + uint8_t voice; + uint16_t u25c; + uint8_t enemyType; + uint8_t level; + uint8_t classJob; + uint8_t u26d; + uint16_t u27a; + uint8_t currentMount; + uint8_t mountHead; + uint8_t mountBody; + uint8_t mountFeet; + uint8_t mountColor; + uint8_t scale; + uint32_t u29b; + uint32_t u30b; + Common::StatusEffect effect[30]; + Common::FFXIVARR_POSITION3 pos; + uint32_t models[10]; + char name[32]; + uint8_t look[26]; + char fcTag[6]; + uint32_t unk30; }; /** * Structural representation of the packet sent by the server * to spawn an actor */ -struct FFXIVIpcNpcSpawn : FFXIVIpcBasePacket +struct FFXIVIpcNpcSpawn : + FFXIVIpcBasePacket< NpcSpawn > { - uint32_t gimmickId; // needs to be existing in the map, mob will snap to it - uint8_t u2b; - uint8_t u2ab; - uint8_t gmRank; - uint8_t u3b; + uint32_t gimmickId; // needs to be existing in the map, mob will snap to it + uint8_t u2b; + uint8_t u2ab; + uint8_t gmRank; + uint8_t u3b; - uint8_t aggressionMode; // 1 passive, 2 aggressive - uint8_t onlineStatus; - uint8_t u3c; - uint8_t pose; + uint8_t aggressionMode; // 1 passive, 2 aggressive + uint8_t onlineStatus; + uint8_t u3c; + uint8_t pose; - uint32_t u4; + uint32_t u4; - uint64_t targetId; - uint32_t u6; - uint32_t u7; - uint64_t mainWeaponModel; - uint64_t secWeaponModel; - uint64_t craftToolModel; + uint64_t targetId; + uint32_t u6; + uint32_t u7; + uint64_t mainWeaponModel; + uint64_t secWeaponModel; + uint64_t craftToolModel; - uint32_t u14; - uint32_t u15; - uint32_t bNPCBase; - uint32_t bNPCName; - uint32_t u18; - uint32_t u19; - uint32_t directorId; - uint32_t spawnerId; - uint32_t parentActorId; - uint32_t hPMax; - uint32_t hPCurr; - uint32_t displayFlags; - uint16_t fateID; - uint16_t mPCurr; - uint16_t tPCurr; - uint16_t mPMax; - uint16_t tPMax; - uint16_t modelChara; - uint16_t rotation; - uint16_t activeMinion; - uint8_t spawnIndex; - uint8_t state; - uint8_t persistantEmote; - uint8_t modelType; - uint8_t subtype; - uint8_t voice; - uint16_t u25c; - uint8_t enemyType; - uint8_t level; - uint8_t classJob; - uint8_t u26d; - uint16_t u27a; - uint8_t currentMount; - uint8_t mountHead; - uint8_t mountBody; - uint8_t mountFeet; - uint8_t mountColor; - uint8_t scale; - uint32_t u29b; - uint32_t u30b; - Common::StatusEffect effect[30]; - Common::FFXIVARR_POSITION3 pos; - uint32_t models[10]; - char name[32]; - uint8_t look[26]; - char fcTag[6]; - uint32_t unk30; - uint32_t unk31; - uint8_t bNPCPartSlot; - uint8_t unk32; - uint16_t unk33; - uint32_t unk34; + uint32_t u14; + uint32_t u15; + uint32_t bNPCBase; + uint32_t bNPCName; + uint32_t u18; + uint32_t u19; + uint32_t directorId; + uint32_t spawnerId; + uint32_t parentActorId; + uint32_t hPMax; + uint32_t hPCurr; + uint32_t displayFlags; + uint16_t fateID; + uint16_t mPCurr; + uint16_t tPCurr; + uint16_t mPMax; + uint16_t tPMax; + uint16_t modelChara; + uint16_t rotation; + uint16_t activeMinion; + uint8_t spawnIndex; + uint8_t state; + uint8_t persistantEmote; + uint8_t modelType; + uint8_t subtype; + uint8_t voice; + uint16_t u25c; + uint8_t enemyType; + uint8_t level; + uint8_t classJob; + uint8_t u26d; + uint16_t u27a; + uint8_t currentMount; + uint8_t mountHead; + uint8_t mountBody; + uint8_t mountFeet; + uint8_t mountColor; + uint8_t scale; + uint32_t u29b; + uint32_t u30b; + Common::StatusEffect effect[30]; + Common::FFXIVARR_POSITION3 pos; + uint32_t models[10]; + char name[32]; + uint8_t look[26]; + char fcTag[6]; + uint32_t unk30; + uint32_t unk31; + uint8_t bNPCPartSlot; + uint8_t unk32; + uint16_t unk33; + uint32_t unk34; }; /** * Structural representation of the packet sent by the server * to show player movement */ -struct FFXIVIpcActorFreeSpawn : FFXIVIpcBasePacket +struct FFXIVIpcActorFreeSpawn : + FFXIVIpcBasePacket< ActorFreeSpawn > { - uint32_t spawnId; - uint32_t actorId; + uint32_t spawnId; + uint32_t actorId; }; /** * Structural representation of the packet sent by the server * to show player movement */ -struct FFXIVIpcActorMove : FFXIVIpcBasePacket +struct FFXIVIpcActorMove : + FFXIVIpcBasePacket< ActorMove > { - /* 0000 */ uint8_t rotation; - /* 0001 */ uint8_t unknown_1; - /* 0002 */ uint8_t unknown_2; - /* 0003 */ uint8_t unknown_3; - /* 0004 */ uint16_t unknown_4; - /* 0006 */ uint16_t posX; - /* 0008 */ uint16_t posY; - /* 000a */ uint16_t posZ; - /* 000C */ uint32_t unknown_12; + /* 0000 */ uint8_t rotation; + /* 0001 */ uint8_t unknown_1; + /* 0002 */ uint8_t unknown_2; + /* 0003 */ uint8_t unknown_3; + /* 0004 */ uint16_t unknown_4; + /* 0006 */ uint16_t posX; + /* 0008 */ uint16_t posY; + /* 000a */ uint16_t posZ; + /* 000C */ uint32_t unknown_12; }; /** * Structural representation of the packet sent by the server * to set an actors position */ -struct FFXIVIpcActorSetPos : FFXIVIpcBasePacket +struct FFXIVIpcActorSetPos : + FFXIVIpcBasePacket< ActorSetPos > { - uint16_t r16; - uint8_t waitForLoad; - uint8_t unknown1; - uint32_t unknown2; - float x; - float y; - float z; - uint32_t unknown3; + uint16_t r16; + uint8_t waitForLoad; + uint8_t unknown1; + uint32_t unknown2; + float x; + float y; + float z; + uint32_t unknown3; }; - /** * Structural representation of the packet sent by the server * to start an actors casting */ -struct FFXIVIpcActorCast : FFXIVIpcBasePacket +struct FFXIVIpcActorCast : + FFXIVIpcBasePacket< ActorCast > { - uint16_t action_id; - Common::SkillType skillType; - uint8_t unknown; - uint32_t unknown_1; // Also action id - float cast_time; - uint32_t target_id; - float rotation; // In radians - uint32_t unknown_2; - uint16_t posX; - uint16_t posY; - uint16_t posZ; - uint16_t unknown_3; + uint16_t action_id; + Common::SkillType skillType; + uint8_t unknown; + uint32_t unknown_1; // Also action id + float cast_time; + uint32_t target_id; + float rotation; // In radians + uint32_t unknown_2; + uint16_t posX; + uint16_t posY; + uint16_t posZ; + uint16_t unknown_3; }; -struct FFXIVIpcHateList : FFXIVIpcBasePacket +struct FFXIVIpcHateList : + FFXIVIpcBasePacket< HateList > { - uint32_t numEntries; - struct LsEntry - { - uint32_t actorId; - uint8_t hatePercent; - uint8_t unknown; - uint16_t padding; - } entry[32]; - uint32_t padding; + uint32_t numEntries; + struct LsEntry + { + uint32_t actorId; + uint8_t hatePercent; + uint8_t unknown; + uint16_t padding; + } entry[32]; + uint32_t padding; }; -struct FFXIVIpcUpdateClassInfo : FFXIVIpcBasePacket +struct FFXIVIpcUpdateClassInfo : + FFXIVIpcBasePacket< UpdateClassInfo > { - uint8_t classId; - uint8_t level1; - uint16_t level; - uint32_t nextLevelIndex; - uint32_t currentExp; - uint32_t restedExp; + uint8_t classId; + uint8_t level1; + uint16_t level; + uint32_t nextLevelIndex; + uint32_t currentExp; + uint32_t restedExp; }; /** * Structural representation of the packet sent by the server * to send the titles available to the player */ -struct FFXIVIpcPlayerTitleList : FFXIVIpcBasePacket +struct FFXIVIpcPlayerTitleList : + FFXIVIpcBasePacket< PlayerTitleList > { - uint8_t titleList[48]; + uint8_t titleList[48]; }; /** * Structural representation of the packet sent by the server * to initialize a zone for the player */ -struct FFXIVIpcInitZone : FFXIVIpcBasePacket +struct FFXIVIpcInitZone : + FFXIVIpcBasePacket< InitZone > { - uint16_t serverId; - uint16_t zoneId; - uint16_t unknown1; - uint16_t unknown2; - uint32_t unknown3; - uint32_t unknown4; - uint8_t weatherId; - uint8_t bitmask; - uint16_t unknown5; - uint16_t festivalId; - uint16_t unknown7; - uint32_t unknown8; - Common::FFXIVARR_POSITION3 pos; + uint16_t serverId; + uint16_t zoneId; + uint16_t unknown1; + uint16_t unknown2; + uint32_t unknown3; + uint32_t unknown4; + uint8_t weatherId; + uint8_t bitmask; + uint16_t unknown5; + uint16_t festivalId; + uint16_t unknown7; + uint32_t unknown8; + Common::FFXIVARR_POSITION3 pos; }; @@ -651,147 +695,148 @@ struct FFXIVIpcInitZone : FFXIVIpcBasePacket * Structural representation of the packet sent by the server to initialize * the client UI upon initial connection. */ -struct FFXIVIpcInitUI : FFXIVIpcBasePacket +struct FFXIVIpcInitUI : + FFXIVIpcBasePacket< InitUI > { - // plain C types for a bit until the packet is actually fixed. - // makes conversion between different editors easier. - uint64_t contentId; - unsigned int unknown8; - unsigned int unknownC; - unsigned int charId; - unsigned int restedExp; - unsigned int companionCurrentExp; - unsigned int unknown1C; - unsigned int fishCaught; - unsigned int useBaitCatalogId; - unsigned int unknown28; - unsigned short unknownPvp2C; - unsigned short unknown3; - unsigned int pvpFrontlineOverallCampaigns; - unsigned int unknownTimestamp34; - unsigned int unknownTimestamp38; - unsigned int unknown3C; - unsigned int unknown40; - unsigned int unknown44; - float companionTimePassed; - unsigned int unknown4C; - unsigned short unknown50; - unsigned short unknownPvp52[4]; - unsigned short playerCommendations; - unsigned short unknown5C; - unsigned short unknown5E; - unsigned short pvpFrontlineWeeklyCampaigns; - unsigned short enhancedAnimaGlassProgress; - unsigned short unknown64[4]; // needs confirmation, probably pvp total/weeklies - unsigned short pvpRivalWingsTotalMatches; - unsigned short pvpRivalWingsTotalVictories; - unsigned short pvpRivalWingsWeeklyMatches; // needs confirmation - unsigned short pvpRivalWingsWeeklyVictories; // needs confirmation - unsigned char maxLevel; - unsigned char expansion; - unsigned char unknown76; - unsigned char race; - unsigned char tribe; - unsigned char gender; - unsigned char currentJob; - unsigned char currentClass; - unsigned char deity; - unsigned char namedayMonth; - unsigned char namedayDay; - unsigned char cityState; - unsigned char homepoint; - unsigned char unknown81; - unsigned char petHotBar; - unsigned char companionRank; - unsigned char companionStars; - unsigned char companionSp; - unsigned char companionUnk86; - unsigned char companionColor; - unsigned char companionFavoFeed; - unsigned char unknown89; - unsigned char unknown8A[4]; - unsigned char hasRelicBook; - unsigned char relicBookId; - unsigned char unknown90[4]; - unsigned char craftingMasterMask; - unsigned char unknown95[10]; - unsigned char unknown9F[2]; - unsigned char unknownA1[3]; - unsigned int exp[25]; - unsigned int unknown108; - unsigned int pvpTotalExp; - unsigned int unknownPvp110; - unsigned int pvpExp; - unsigned int pvpFrontlineOverallRanks[3]; - unsigned int exploratoryMissionNextTimestamp; - unsigned short levels[25]; - unsigned short unknown15C[9]; - unsigned short fishingRecordsFish[26]; - unsigned short fishingRecordsFishWeight[26]; - unsigned short beastExp[11]; - unsigned short unknown1EA[5]; - unsigned short pvpFrontlineWeeklyRanks[3]; - unsigned short unknownMask1FA[3]; - unsigned char companionName[21]; - unsigned char companionDefRank; - unsigned char companionAttRank; - unsigned char companionHealRank; - unsigned char mountGuideMask[16]; - char name[32]; - unsigned char unknownOword[16]; - unsigned char unknown258; - unsigned char unlockBitmask[64]; - unsigned char aetheryte[17]; - unsigned char discovery[421]; - unsigned char howto[33]; - unsigned char minions[38]; - unsigned char chocoboTaxiMask[8]; - unsigned char watchedCutscenes[111]; - unsigned char companionBardingMask[9]; - unsigned char companionEquippedHead; - unsigned char companionEquippedBody; - unsigned char companionEquippedLegs; - unsigned char unknown519[4]; - unsigned char unknownMask51D[11]; - unsigned char fishingGuideMask[89]; - unsigned char fishingSpotVisited[25]; - unsigned char unknown59A[15]; - unsigned char unknown5A9[2]; - unsigned char unknownPvp5AB[2]; - unsigned char pvpLevel; - unsigned char beastRank[11]; - unsigned char unknown5B9[11]; - unsigned char pose; - unsigned char weaponPose; - unsigned char unknownMask5C4[3]; - unsigned char unknown5C9[2]; - unsigned char challengeLogComplete[9]; - unsigned char unknown5D4[9]; - unsigned char unknownMask5DD[28]; - unsigned char relicCompletion[12]; - unsigned char sightseeingMask[26]; - unsigned char huntingMarkMask[55]; - unsigned char tripleTriadCards[29]; - unsigned char unknownMask673[10]; - unsigned char unknown67D; - unsigned char aetherCurrentMask[22]; - unsigned char unknown694[3]; - unsigned char orchestrionMask[40]; - unsigned char hallOfNoviceCompleteMask[3]; - unsigned char animaCompletion[11]; - unsigned char unknown6CD[3]; - unsigned char unknownMask6C0[11]; - unsigned char unknownMask6DB[13]; - unsigned char unlockedRaids[28]; - unsigned char unlockedDungeons[18]; - unsigned char unlockedGuildhests[10]; - unsigned char unlockedTrials[7]; - unsigned char unlockedPvp[5]; - unsigned char clearedRaids[28]; - unsigned char clearedDungeons[18]; - unsigned char clearedGuildhests[10]; - unsigned char clearedTrials[7]; - unsigned char clearedPvp[5]; + // plain C types for a bit until the packet is actually fixed. + // makes conversion between different editors easier. + uint64_t contentId; + unsigned int unknown8; + unsigned int unknownC; + unsigned int charId; + unsigned int restedExp; + unsigned int companionCurrentExp; + unsigned int unknown1C; + unsigned int fishCaught; + unsigned int useBaitCatalogId; + unsigned int unknown28; + unsigned short unknownPvp2C; + unsigned short unknown3; + unsigned int pvpFrontlineOverallCampaigns; + unsigned int unknownTimestamp34; + unsigned int unknownTimestamp38; + unsigned int unknown3C; + unsigned int unknown40; + unsigned int unknown44; + float companionTimePassed; + unsigned int unknown4C; + unsigned short unknown50; + unsigned short unknownPvp52[4]; + unsigned short playerCommendations; + unsigned short unknown5C; + unsigned short unknown5E; + unsigned short pvpFrontlineWeeklyCampaigns; + unsigned short enhancedAnimaGlassProgress; + unsigned short unknown64[4]; // needs confirmation, probably pvp total/weeklies + unsigned short pvpRivalWingsTotalMatches; + unsigned short pvpRivalWingsTotalVictories; + unsigned short pvpRivalWingsWeeklyMatches; // needs confirmation + unsigned short pvpRivalWingsWeeklyVictories; // needs confirmation + unsigned char maxLevel; + unsigned char expansion; + unsigned char unknown76; + unsigned char race; + unsigned char tribe; + unsigned char gender; + unsigned char currentJob; + unsigned char currentClass; + unsigned char deity; + unsigned char namedayMonth; + unsigned char namedayDay; + unsigned char cityState; + unsigned char homepoint; + unsigned char unknown81; + unsigned char petHotBar; + unsigned char companionRank; + unsigned char companionStars; + unsigned char companionSp; + unsigned char companionUnk86; + unsigned char companionColor; + unsigned char companionFavoFeed; + unsigned char unknown89; + unsigned char unknown8A[4]; + unsigned char hasRelicBook; + unsigned char relicBookId; + unsigned char unknown90[4]; + unsigned char craftingMasterMask; + unsigned char unknown95[10]; + unsigned char unknown9F[2]; + unsigned char unknownA1[3]; + unsigned int exp[25]; + unsigned int unknown108; + unsigned int pvpTotalExp; + unsigned int unknownPvp110; + unsigned int pvpExp; + unsigned int pvpFrontlineOverallRanks[3]; + unsigned int exploratoryMissionNextTimestamp; + unsigned short levels[25]; + unsigned short unknown15C[9]; + unsigned short fishingRecordsFish[26]; + unsigned short fishingRecordsFishWeight[26]; + unsigned short beastExp[11]; + unsigned short unknown1EA[5]; + unsigned short pvpFrontlineWeeklyRanks[3]; + unsigned short unknownMask1FA[3]; + unsigned char companionName[21]; + unsigned char companionDefRank; + unsigned char companionAttRank; + unsigned char companionHealRank; + unsigned char mountGuideMask[16]; + char name[32]; + unsigned char unknownOword[16]; + unsigned char unknown258; + unsigned char unlockBitmask[64]; + unsigned char aetheryte[17]; + unsigned char discovery[421]; + unsigned char howto[33]; + unsigned char minions[38]; + unsigned char chocoboTaxiMask[8]; + unsigned char watchedCutscenes[111]; + unsigned char companionBardingMask[9]; + unsigned char companionEquippedHead; + unsigned char companionEquippedBody; + unsigned char companionEquippedLegs; + unsigned char unknown519[4]; + unsigned char unknownMask51D[11]; + unsigned char fishingGuideMask[89]; + unsigned char fishingSpotVisited[25]; + unsigned char unknown59A[15]; + unsigned char unknown5A9[2]; + unsigned char unknownPvp5AB[2]; + unsigned char pvpLevel; + unsigned char beastRank[11]; + unsigned char unknown5B9[11]; + unsigned char pose; + unsigned char weaponPose; + unsigned char unknownMask5C4[3]; + unsigned char unknown5C9[2]; + unsigned char challengeLogComplete[9]; + unsigned char unknown5D4[9]; + unsigned char unknownMask5DD[28]; + unsigned char relicCompletion[12]; + unsigned char sightseeingMask[26]; + unsigned char huntingMarkMask[55]; + unsigned char tripleTriadCards[29]; + unsigned char unknownMask673[10]; + unsigned char unknown67D; + unsigned char aetherCurrentMask[22]; + unsigned char unknown694[3]; + unsigned char orchestrionMask[40]; + unsigned char hallOfNoviceCompleteMask[3]; + unsigned char animaCompletion[11]; + unsigned char unknown6CD[3]; + unsigned char unknownMask6C0[11]; + unsigned char unknownMask6DB[13]; + unsigned char unlockedRaids[28]; + unsigned char unlockedDungeons[18]; + unsigned char unlockedGuildhests[10]; + unsigned char unlockedTrials[7]; + unsigned char unlockedPvp[5]; + unsigned char clearedRaids[28]; + unsigned char clearedDungeons[18]; + unsigned char clearedGuildhests[10]; + unsigned char clearedTrials[7]; + unsigned char clearedPvp[5]; }; @@ -799,202 +844,213 @@ struct FFXIVIpcInitUI : FFXIVIpcBasePacket * Structural representation of the packet sent by the server * to set a players stats */ -struct FFXIVIpcPlayerStats : FFXIVIpcBasePacket +struct FFXIVIpcPlayerStats : + FFXIVIpcBasePacket< PlayerStats > { - uint32_t strength; - uint32_t dexterity; - uint32_t vitality; - uint32_t intelligence; - uint32_t mind; - uint32_t piety; - uint32_t hp; - uint32_t mp; - uint32_t tp; - uint32_t unknown; - uint32_t unknown_1; - uint32_t unknown_2; - uint32_t tenacity; - uint32_t attack; - uint32_t defense; - uint32_t accuracy; - uint32_t spellSpeed; - uint32_t magicDefense; - uint32_t criticalHitRate; - uint32_t resistanceSlashing; - uint32_t resistancePiercing; - uint32_t resistanceBlunt; - uint32_t attackMagicPotency; - uint32_t healingMagicPotency; - uint32_t fire; - uint32_t ice; - uint32_t wind; - uint32_t earth; - uint32_t lightning; - uint32_t water; - uint32_t determination; - uint32_t skillSpeed; - uint32_t spellSpeed1; - uint32_t spellSpeedMod; - uint32_t unknown_6; - uint32_t craftsmanship; - uint32_t control; - uint32_t gathering; - uint32_t perception; - uint32_t resistanceSlow; - uint32_t resistanceSilence; - uint32_t resistanceBlind; - uint32_t resistancePoison; - uint32_t resistanceStun; - uint32_t resistanceSleep; - uint32_t resistanceBind; - uint32_t resistanceHeavy; - uint32_t unknown_7[9]; // possibly level sync stats. + uint32_t strength; + uint32_t dexterity; + uint32_t vitality; + uint32_t intelligence; + uint32_t mind; + uint32_t piety; + uint32_t hp; + uint32_t mp; + uint32_t tp; + uint32_t unknown; + uint32_t unknown_1; + uint32_t unknown_2; + uint32_t tenacity; + uint32_t attack; + uint32_t defense; + uint32_t accuracy; + uint32_t spellSpeed; + uint32_t magicDefense; + uint32_t criticalHitRate; + uint32_t resistanceSlashing; + uint32_t resistancePiercing; + uint32_t resistanceBlunt; + uint32_t attackMagicPotency; + uint32_t healingMagicPotency; + uint32_t fire; + uint32_t ice; + uint32_t wind; + uint32_t earth; + uint32_t lightning; + uint32_t water; + uint32_t determination; + uint32_t skillSpeed; + uint32_t spellSpeed1; + uint32_t spellSpeedMod; + uint32_t unknown_6; + uint32_t craftsmanship; + uint32_t control; + uint32_t gathering; + uint32_t perception; + uint32_t resistanceSlow; + uint32_t resistanceSilence; + uint32_t resistanceBlind; + uint32_t resistancePoison; + uint32_t resistanceStun; + uint32_t resistanceSleep; + uint32_t resistanceBind; + uint32_t resistanceHeavy; + uint32_t unknown_7[9]; // possibly level sync stats. }; /** * Structural representation of the packet sent by the server * to set an actors current owner */ -struct FFXIVIpcActorOwner : FFXIVIpcBasePacket +struct FFXIVIpcActorOwner : + FFXIVIpcBasePacket< ActorOwner > { - uint8_t type; - uint8_t padding[7]; - uint32_t actorId; - uint32_t actorId2; + uint8_t type; + uint8_t padding[7]; + uint32_t actorId; + uint32_t actorId2; }; /** * Structural representation of the packet sent by the server * to set a players state */ -struct FFXIVIpcPlayerStateFlags : FFXIVIpcBasePacket +struct FFXIVIpcPlayerStateFlags : + FFXIVIpcBasePacket< PlayerStateFlags > { - uint8_t flags[12]; - uint32_t padding; + uint8_t flags[12]; + uint32_t padding; }; /** * Structural representation of the packet sent by the server * containing current class information */ -struct FFXIVIpcPlayerClassInfo : FFXIVIpcBasePacket +struct FFXIVIpcPlayerClassInfo : + FFXIVIpcBasePacket< PlayerClassInfo > { - uint16_t classId; - uint8_t unknown; - uint8_t isSpecialist; - uint16_t level; // Locks actions, equipment, prob more - uint16_t level1; // Locks roles, prob more - uint32_t roleActions[10]; + uint16_t classId; + uint8_t unknown; + uint8_t isSpecialist; + uint16_t level; // Locks actions, equipment, prob more + uint16_t level1; // Locks roles, prob more + uint32_t roleActions[10]; }; /** * Structural representation of the packet sent by the server * to update a players appearance */ -struct FFXIVIpcModelEquip : FFXIVIpcBasePacket +struct FFXIVIpcModelEquip : + FFXIVIpcBasePacket< ModelEquip > { - /* 0000 */ uint64_t mainWeapon; - /* 0008 */ uint64_t offWeapon; - /* 0010 */ uint32_t padding1; - /* 0014 */ uint32_t models[10]; - /* 003C */ uint32_t padding2; + /* 0000 */ uint64_t mainWeapon; + /* 0008 */ uint64_t offWeapon; + /* 0010 */ uint32_t padding1; + /* 0014 */ uint32_t models[10]; + /* 003C */ uint32_t padding2; }; /** * Structural representation of the packet sent by the server * to update a players appearance */ -struct FFXIVIpcItemInfo : FFXIVIpcBasePacket +struct FFXIVIpcItemInfo : + FFXIVIpcBasePacket< ItemInfo > { - uint32_t sequence; - uint32_t unknown; - uint16_t containerId; - uint16_t slot; - uint32_t quantity; - uint32_t catalogId; - uint32_t reservedFlag; - uint64_t signatureId; - uint8_t hqFlag; - uint8_t unknown2; - uint16_t condition; - uint16_t spiritBond; - uint16_t color; - uint32_t glamourCatalogId; - uint16_t materia1; - uint16_t materia2; - uint16_t materia3; - uint16_t materia4; - uint16_t materia5; - uint8_t buffer1; - uint8_t buffer2; - uint8_t buffer3; - uint8_t buffer4; - uint8_t buffer5; - uint8_t padding; - uint32_t unknown10; + uint32_t sequence; + uint32_t unknown; + uint16_t containerId; + uint16_t slot; + uint32_t quantity; + uint32_t catalogId; + uint32_t reservedFlag; + uint64_t signatureId; + uint8_t hqFlag; + uint8_t unknown2; + uint16_t condition; + uint16_t spiritBond; + uint16_t color; + uint32_t glamourCatalogId; + uint16_t materia1; + uint16_t materia2; + uint16_t materia3; + uint16_t materia4; + uint16_t materia5; + uint8_t buffer1; + uint8_t buffer2; + uint8_t buffer3; + uint8_t buffer4; + uint8_t buffer5; + uint8_t padding; + uint32_t unknown10; }; /** * Structural representation of the packet sent by the server * to update a players appearance */ -struct FFXIVIpcContainerInfo : FFXIVIpcBasePacket +struct FFXIVIpcContainerInfo : + FFXIVIpcBasePacket< ContainerInfo > { - uint32_t sequence; - uint32_t numItems; - uint32_t containerId; - uint32_t unknown; + uint32_t sequence; + uint32_t numItems; + uint32_t containerId; + uint32_t unknown; }; /** * Structural representation of the packet sent by the server * to update a players appearance */ -struct FFXIVIpcCurrencyCrystalInfo : FFXIVIpcBasePacket +struct FFXIVIpcCurrencyCrystalInfo : + FFXIVIpcBasePacket< CurrencyCrystalInfo > { - uint32_t sequence; - uint16_t containerId; - uint16_t slot; - uint32_t quantity; - uint32_t unknown; - uint32_t catalogId; - uint32_t unknown1; - uint32_t unknown2; - uint32_t unknown3; + uint32_t sequence; + uint16_t containerId; + uint16_t slot; + uint32_t quantity; + uint32_t unknown; + uint32_t catalogId; + uint32_t unknown1; + uint32_t unknown2; + uint32_t unknown3; }; -struct FFXIVIpcInventoryTransactionFinish : FFXIVIpcBasePacket +struct FFXIVIpcInventoryTransactionFinish : + FFXIVIpcBasePacket< InventoryTransactionFinish > { - uint32_t transactionId; - uint32_t transactionId1; - uint64_t padding; + uint32_t transactionId; + uint32_t transactionId1; + uint64_t padding; }; -struct FFXIVIpcInventoryTransaction : FFXIVIpcBasePacket +struct FFXIVIpcInventoryTransaction : + FFXIVIpcBasePacket< InventoryTransaction > { - uint32_t transactionId; - uint8_t type; - uint8_t padding; - uint16_t padding1; - uint32_t ownerId; - uint32_t storageId; - uint16_t slotId; - uint16_t padding2; - uint32_t stackSize; - uint32_t catalogId; - uint32_t someActorId; - int32_t targetStorageId; - uint32_t padding3[3]; + uint32_t transactionId; + uint8_t type; + uint8_t padding; + uint16_t padding1; + uint32_t ownerId; + uint32_t storageId; + uint16_t slotId; + uint16_t padding2; + uint32_t stackSize; + uint32_t catalogId; + uint32_t someActorId; + int32_t targetStorageId; + uint32_t padding3[3]; }; -struct FFXIVIpcInventoryActionAck : FFXIVIpcBasePacket +struct FFXIVIpcInventoryActionAck : + FFXIVIpcBasePacket< InventoryActionAck > { - uint32_t sequence; - uint16_t type; - uint16_t padding; - uint32_t padding1; - uint32_t padding2; + uint32_t sequence; + uint16_t type; + uint16_t padding; + uint32_t padding1; + uint32_t padding2; }; @@ -1002,48 +1058,50 @@ struct FFXIVIpcInventoryActionAck : FFXIVIpcBasePacket * Structural representation of the packet sent by the server * to update a slot in the inventory */ -struct FFXIVIpcUpdateInventorySlot : FFXIVIpcBasePacket +struct FFXIVIpcUpdateInventorySlot : + FFXIVIpcBasePacket< UpdateInventorySlot > { - uint32_t sequence; - uint32_t unknown; - uint16_t containerId; - uint16_t slot; - uint32_t quantity; - uint32_t catalogId; - uint32_t reservedFlag; - uint64_t signatureId; - uint16_t hqFlag; - uint16_t condition; - uint16_t spiritBond; - uint16_t color; - uint32_t glamourCatalogId; - uint16_t materia1; - uint16_t materia2; - uint16_t materia3; - uint16_t materia4; - uint16_t materia5; - uint8_t buffer1; - uint8_t buffer2; - uint8_t buffer3; - uint8_t buffer4; - uint8_t buffer5; - uint8_t padding; - uint32_t unknown10; + uint32_t sequence; + uint32_t unknown; + uint16_t containerId; + uint16_t slot; + uint32_t quantity; + uint32_t catalogId; + uint32_t reservedFlag; + uint64_t signatureId; + uint16_t hqFlag; + uint16_t condition; + uint16_t spiritBond; + uint16_t color; + uint32_t glamourCatalogId; + uint16_t materia1; + uint16_t materia2; + uint16_t materia3; + uint16_t materia4; + uint16_t materia5; + uint8_t buffer1; + uint8_t buffer2; + uint8_t buffer3; + uint8_t buffer4; + uint8_t buffer5; + uint8_t padding; + uint32_t unknown10; }; /** * Structural representation of the packet sent by the server * to start an event, not actually playing it, but registering */ -struct FFXIVIpcEventStart : FFXIVIpcBasePacket +struct FFXIVIpcEventStart : + FFXIVIpcBasePacket< EventStart > { - /* 0000 */ uint64_t actorId; - /* 0008 */ uint32_t eventId; - /* 000C */ uint8_t param1; - /* 000D */ uint8_t param2; - /* 000E */ uint16_t padding; - /* 0010 */ uint32_t param3; - /* 0014 */ uint32_t padding1; + /* 0000 */ uint64_t actorId; + /* 0008 */ uint32_t eventId; + /* 000C */ uint8_t param1; + /* 000D */ uint8_t param2; + /* 000E */ uint16_t padding; + /* 0010 */ uint32_t param3; + /* 0014 */ uint32_t padding1; }; @@ -1051,62 +1109,66 @@ struct FFXIVIpcEventStart : FFXIVIpcBasePacket * Structural representation of the packet sent by the server * to play an event */ -struct FFXIVIpcEventPlay : FFXIVIpcBasePacket +struct FFXIVIpcEventPlay : + FFXIVIpcBasePacket< EventPlay > { - uint64_t actorId; - uint32_t eventId; - uint16_t scene; - uint16_t padding; - uint32_t flags; - uint32_t param3; - uint8_t param4; - uint8_t padding1[3]; - uint32_t param5; - uint8_t unknown[8]; + uint64_t actorId; + uint32_t eventId; + uint16_t scene; + uint16_t padding; + uint32_t flags; + uint32_t param3; + uint8_t param4; + uint8_t padding1[3]; + uint32_t param5; + uint8_t unknown[8]; }; - /** +/** * Structural representation of the packet sent by the server * to play an event */ -struct FFXIVIpcDirectorPlayScene : FFXIVIpcBasePacket +struct FFXIVIpcDirectorPlayScene : + FFXIVIpcBasePacket< DirectorPlayScene > { - uint64_t actorId; - uint32_t eventId; - uint16_t scene; - uint16_t padding; - uint32_t flags; - uint32_t param3; - uint8_t param4; - uint8_t padding1[3]; - uint32_t param5; - uint8_t unknown8[0x08]; - uint8_t unknown[0x38]; + uint64_t actorId; + uint32_t eventId; + uint16_t scene; + uint16_t padding; + uint32_t flags; + uint32_t param3; + uint8_t param4; + uint8_t padding1[3]; + uint32_t param5; + uint8_t unknown8[0x08]; + uint8_t unknown[0x38]; }; /** * Structural representation of the packet sent by the server * to finish an event */ -struct FFXIVIpcEventFinish : FFXIVIpcBasePacket +struct FFXIVIpcEventFinish : + FFXIVIpcBasePacket< EventFinish > { - /* 0000 */ uint32_t eventId; - /* 0004 */ uint8_t param1; - /* 0005 */ uint8_t param2; - /* 0006 */ uint16_t padding; - /* 0008 */ uint32_t param3; - /* 000C */ uint32_t padding1; + /* 0000 */ uint32_t eventId; + /* 0004 */ uint8_t param1; + /* 0005 */ uint8_t param2; + /* 0006 */ uint16_t padding; + /* 0008 */ uint32_t param3; + /* 000C */ uint32_t padding1; }; -struct FFXIVIpcEventOpenGilShop : FFXIVIpcBasePacket +struct FFXIVIpcEventOpenGilShop : + FFXIVIpcBasePacket< EventOpenGilShop > { - uint64_t actorId; - uint32_t eventId; - uint16_t scene; - uint16_t padding; - uint32_t sceneFlags; + uint64_t actorId; + uint32_t eventId; + uint16_t scene; + uint16_t padding; + uint32_t sceneFlags; - uint32_t unknown_wtf[0x101]; + uint32_t unknown_wtf[0x101]; }; @@ -1114,59 +1176,64 @@ struct FFXIVIpcEventOpenGilShop : FFXIVIpcBasePacket * Structural representation of the packet sent by the server * to respond to a linkshell creation event */ -struct FFXIVIpcEventLinkshell : FFXIVIpcBasePacket +struct FFXIVIpcEventLinkshell : + FFXIVIpcBasePacket< EventLinkshell > { - uint32_t eventId; - uint8_t scene; - uint8_t param1; - uint8_t param2; - uint8_t param3; - uint32_t unknown1; - uint32_t unknown2; - uint32_t unknown3; - uint32_t unknown4; + uint32_t eventId; + uint8_t scene; + uint8_t param1; + uint8_t param2; + uint8_t param3; + uint32_t unknown1; + uint32_t unknown2; + uint32_t unknown3; + uint32_t unknown4; }; /** * Structural representation of the packet sent by the server * to send the active quests */ -struct FFXIVIpcQuestActiveList : FFXIVIpcBasePacket +struct FFXIVIpcQuestActiveList : + FFXIVIpcBasePacket< QuestActiveList > { - Common::QuestActive activeQuests[30]; + Common::QuestActive activeQuests[30]; }; /** * Structural representation of the packet sent by the server * to send update a quest slot */ -struct FFXIVIpcQuestUpdate : FFXIVIpcBasePacket +struct FFXIVIpcQuestUpdate : + FFXIVIpcBasePacket< QuestUpdate > { - uint16_t slot; - uint16_t padding; - Common::QuestActive questInfo; + uint16_t slot; + uint16_t padding; + Common::QuestActive questInfo; }; /** * Structural representation of the packet sent by the server * to send the completed quests mask */ -struct FFXIVIpcQuestCompleteList : FFXIVIpcBasePacket +struct FFXIVIpcQuestCompleteList : + FFXIVIpcBasePacket< QuestCompleteList > { - uint8_t questCompleteMask[396]; - uint8_t unknownCompleteMask[32]; + uint8_t questCompleteMask[396]; + uint8_t unknownCompleteMask[32]; }; /** * Structural representation of the packet sent by the server * to finish a quest */ -struct FFXIVIpcQuestFinish : FFXIVIpcBasePacket +struct FFXIVIpcQuestFinish : + FFXIVIpcBasePacket< QuestFinish > { - uint16_t questId; - uint8_t flag1; - uint8_t flag2; - uint32_t padding; + uint16_t questId; + uint8_t flag1; + uint8_t flag2; + uint32_t padding; }; /** @@ -1176,76 +1243,83 @@ struct FFXIVIpcQuestFinish : FFXIVIpcBasePacket * type 1 icon * type 5 status */ -struct FFXIVIpcQuestMessage : FFXIVIpcBasePacket +struct FFXIVIpcQuestMessage : + FFXIVIpcBasePacket< QuestMessage > { - /* 0000 */ uint32_t questId; - /* 0000 */ uint8_t msgId; - /* 0000 */ uint8_t type; - /* 0000 */ uint16_t padding1; - /* 0000 */ uint32_t var1; - /* 0000 */ uint32_t var2; + /* 0000 */ uint32_t questId; + /* 0000 */ uint8_t msgId; + /* 0000 */ uint8_t type; + /* 0000 */ uint16_t padding1; + /* 0000 */ uint32_t var1; + /* 0000 */ uint32_t var2; }; -struct FFXIVIpcQuestTracker : FFXIVIpcBasePacket +struct FFXIVIpcQuestTracker : + FFXIVIpcBasePacket< QuestTracker > { - struct TrackerEntry - { - uint8_t active; - uint8_t questIndex; - } entry[5]; - uint16_t padding[3]; + struct TrackerEntry + { + uint8_t active; + uint8_t questIndex; + } entry[5]; + uint16_t padding[3]; }; -struct FFXIVIpcWeatherChange : FFXIVIpcBasePacket +struct FFXIVIpcWeatherChange : + FFXIVIpcBasePacket< WeatherChange > { - uint32_t weatherId; - float delay; + uint32_t weatherId; + float delay; }; /** * Structural representation of the packet sent by the server * to send a unviel a map */ -struct FFXIVIpcDiscovery : FFXIVIpcBasePacket +struct FFXIVIpcDiscovery : + FFXIVIpcBasePacket< Discovery > { - /* 0000 */ uint32_t map_part_id; - /* 0004 */ uint32_t map_id; + /* 0000 */ uint32_t map_part_id; + /* 0004 */ uint32_t map_id; }; /** * UNKOWN TYPE */ -struct FFXIVARR_IPC_UNK322 : FFXIVIpcBasePacket +struct FFXIVARR_IPC_UNK322 : + FFXIVIpcBasePacket< IPCTYPE_UNK_322 > { - /* 0000 */ uint8_t unk[8]; + /* 0000 */ uint8_t unk[8]; }; /** * UNKOWN TYPE */ -struct FFXIVARR_IPC_UNK320 : FFXIVIpcBasePacket +struct FFXIVARR_IPC_UNK320 : + FFXIVIpcBasePacket< IPCTYPE_UNK_320 > { - /* 0000 */ uint8_t unk[0x38]; + /* 0000 */ uint8_t unk[0x38]; }; /** * Structural representation of the packet sent by the server * prepare zoning, showing screenmessage */ -struct FFXIVIpcPrepareZoning : FFXIVIpcBasePacket +struct FFXIVIpcPrepareZoning : + FFXIVIpcBasePacket< PrepareZoning > { - uint32_t logMessage; - uint16_t targetZone; - uint16_t animation; - uint8_t param4; - uint8_t hideChar; - uint8_t fadeOut; - uint8_t param7; - uint8_t fadeOutTime; - uint8_t unknown; - uint16_t padding; + uint32_t logMessage; + uint16_t targetZone; + uint16_t animation; + uint8_t param4; + uint8_t hideChar; + uint8_t fadeOut; + uint8_t param7; + uint8_t fadeOutTime; + uint8_t unknown; + uint16_t padding; }; /** @@ -1254,17 +1328,18 @@ struct FFXIVIpcPrepareZoning : FFXIVIpcBasePacket * * See https://gist.github.com/Minoost/c35843c4c8a7a931f31fdaac9bce64c2 */ -struct FFXIVIpcCFNotify : FFXIVIpcBasePacket +struct FFXIVIpcCFNotify : + FFXIVIpcBasePacket< CFNotify > { - uint32_t state1; // 3 = cancelled, 4 = duty ready - uint32_t state2; // if state1 == 3, state2 is cancelled reason + uint32_t state1; // 3 = cancelled, 4 = duty ready + uint32_t state2; // if state1 == 3, state2 is cancelled reason - uint32_t param1; // usually classJobId - uint32_t param2; // usually flag - uint32_t param3; // usually languages, sometimes join in progress timestamp + uint32_t param1; // usually classJobId + uint32_t param2; // usually flag + uint32_t param3; // usually languages, sometimes join in progress timestamp - uint16_t param4; // usually roulette id - uint16_t contents[5]; + uint16_t param4; // usually roulette id + uint16_t contents[5]; }; /** @@ -1274,212 +1349,231 @@ struct FFXIVIpcCFNotify : FFXIVIpcBasePacket * Do note that this packet has to come early in login phase (around initui packet) * or it won't be applied until you reconnect */ -struct FFXIVIpcCFAvailableContents : FFXIVIpcBasePacket +struct FFXIVIpcCFAvailableContents : + FFXIVIpcBasePacket< CFAvailableContents > { - uint8_t contents[0x48]; + uint8_t contents[0x48]; }; /** * Structural representation of the packet sent by the server * to update adventure in needs in duty roulette */ -struct FFXIVIpcCFPlayerInNeed : FFXIVIpcBasePacket +struct FFXIVIpcCFPlayerInNeed : + FFXIVIpcBasePacket< CFPlayerInNeed > { - // Ordered by roulette id - uint8_t inNeeds[0x10]; + // Ordered by roulette id + uint8_t inNeeds[0x10]; }; /** * Structural representation of the packet sent by the server * to update duty info in general */ -struct FFXIVIpcCFDutyInfo : FFXIVIpcBasePacket +struct FFXIVIpcCFDutyInfo : + FFXIVIpcBasePacket< CFDutyInfo > { - uint8_t penaltyTime; - uint8_t unknown[7]; + uint8_t penaltyTime; + uint8_t unknown[7]; }; -struct FFXIVIpcCFRegisterDuty : FFXIVIpcBasePacket +struct FFXIVIpcCFRegisterDuty : + FFXIVIpcBasePacket< CFRegisterDuty > { - uint32_t unknown0; // 0x301 - uint8_t rouletteId; // if it's a daily roulette - uint8_t unknown1; // 0xDB - uint16_t contentId; + uint32_t unknown0; // 0x301 + uint8_t rouletteId; // if it's a daily roulette + uint8_t unknown1; // 0xDB + uint16_t contentId; }; -struct FFXIVIpcCFMemberStatus : FFXIVIpcBasePacket +struct FFXIVIpcCFMemberStatus : + FFXIVIpcBasePacket< CFMemberStatus > { - uint16_t contentId; - uint16_t unknown1; - uint8_t status; - uint8_t currentTank; - uint8_t currentDps; - uint8_t currentHealer; - uint8_t estimatedTime; - uint8_t unknown2[3]; - uint32_t unknown3; + uint16_t contentId; + uint16_t unknown1; + uint8_t status; + uint8_t currentTank; + uint8_t currentDps; + uint8_t currentHealer; + uint8_t estimatedTime; + uint8_t unknown2[3]; + uint32_t unknown3; }; -struct FFXIVIpcEorzeaTimeOffset : FFXIVIpcBasePacket +struct FFXIVIpcEorzeaTimeOffset : + FFXIVIpcBasePacket< EorzeaTimeOffset > { - uint64_t timestamp; + uint64_t timestamp; }; /** * Structural representation of the packet sent by the server * to set the gear show/hide status of a character */ -struct FFXIVIpcEquipDisplayFlags : FFXIVIpcBasePacket +struct FFXIVIpcEquipDisplayFlags : + FFXIVIpcBasePacket< EquipDisplayFlags > { - uint8_t bitmask; + uint8_t bitmask; }; /** * Structural representation of the packet sent by the server * to mount a player */ -struct FFXIVIpcMount : FFXIVIpcBasePacket +struct FFXIVIpcMount : + FFXIVIpcBasePacket< Mount > { - uint32_t id; + uint32_t id; }; /** * Structural representation of the packet sent by the server * to mount a player */ -struct FFXIVIpcDirectorVars : FFXIVIpcBasePacket +struct FFXIVIpcDirectorVars : + FFXIVIpcBasePacket< DirectorVars > { - /*! DirectorType | ContentId */ - uint32_t m_directorId; - /*! currect sequence */ - uint8_t m_sequence; - /*! current branch */ - uint8_t m_branch; - /*! raw storage for flags/vars */ - uint8_t m_unionData[10]; + /*! DirectorType | ContentId */ + uint32_t m_directorId; + /*! currect sequence */ + uint8_t m_sequence; + /*! current branch */ + uint8_t m_branch; + /*! raw storage for flags/vars */ + uint8_t m_unionData[10]; }; -struct FFXIVIpcActorGauge : FFXIVIpcBasePacket +struct FFXIVIpcActorGauge : + FFXIVIpcBasePacket< ActorGauge > { - uint8_t classJobId; - uint8_t data[15]; // depends on classJobId + uint8_t classJobId; + uint8_t data[15]; // depends on classJobId }; -struct FFXIVIpcPerformNote : FFXIVIpcBasePacket +struct FFXIVIpcPerformNote : + FFXIVIpcBasePacket< PerformNote > { - uint8_t data[32]; + uint8_t data[32]; }; -struct FFXIVIpcWardInfo : FFXIVIpcBasePacket +struct FFXIVIpcWardInfo : + FFXIVIpcBasePacket< WardInfo > { - uint16_t unknown0; - uint16_t wardNum; // set 1 for "Mist, Ward 2" - uint16_t zoneId; - uint16_t worldId; - uint8_t unknown1; - uint8_t subInstance; // (default : 1/2) - uint8_t unknown3; - uint8_t unknown4; - uint8_t unknown5; - uint8_t unknown6; - uint8_t unknown7; - uint8_t unknown8; - struct { - uint8_t houseSize; //1 = small, 2 = middle, 3 = big; 1 - uint8_t houseState; //1 = for sell, 2 = sold, 3 = hasOwner, 0x0A = House sharing; 2 - uint8_t iconColor; //HouseState has to be 3; 1 = Private, 2 = FC House; 4 - uint8_t iconAddIcon; //Heart Icon = 2; 6 - uint32_t unknown9; //can be 0 (default) maybe fcId; 8 - uint32_t fcIcon; //can be 0 (default); 12 - uint32_t fcIconColor; //can be 0 (default); 16 - uint16_t houseRoofId; //18 - uint16_t houseFacadeId;//20 - uint16_t houseWindowId;//22 - uint16_t houseDoorId;//24 - uint8_t gardenData[4];//28 - uint16_t gardenSignId; //For fcIcon; 30 - uint16_t gardenFenceId; //32 - uint8_t color[8]; //40 - } landSet[30]; + uint16_t unknown0; + uint16_t wardNum; // set 1 for "Mist, Ward 2" + uint16_t zoneId; + uint16_t worldId; + uint8_t unknown1; + uint8_t subInstance; // (default : 1/2) + uint8_t unknown3; + uint8_t unknown4; + uint8_t unknown5; + uint8_t unknown6; + uint8_t unknown7; + uint8_t unknown8; + struct + { + uint8_t houseSize; //1 = small, 2 = middle, 3 = big; 1 + uint8_t houseState; //1 = for sell, 2 = sold, 3 = hasOwner, 0x0A = House sharing; 2 + uint8_t iconColor; //HouseState has to be 3; 1 = Private, 2 = FC House; 4 + uint8_t iconAddIcon; //Heart Icon = 2; 6 + uint32_t unknown9; //can be 0 (default) maybe fcId; 8 + uint32_t fcIcon; //can be 0 (default); 12 + uint32_t fcIconColor; //can be 0 (default); 16 + uint16_t houseRoofId; //18 + uint16_t houseFacadeId;//20 + uint16_t houseWindowId;//22 + uint16_t houseDoorId;//24 + uint8_t gardenData[4];//28 + uint16_t gardenSignId; //For fcIcon; 30 + uint16_t gardenFenceId; //32 + uint8_t color[8]; //40 + } landSet[30]; }; -struct FFXIVIpcWardYardInfo : FFXIVIpcBasePacket +struct FFXIVIpcWardYardInfo : + FFXIVIpcBasePacket< WardYardInfo > { - /* consistency check? */ - uint32_t unknown1; //always 0xFFFFFFFF - uint32_t unknown2; //always 0xFFFFFFFF - uint8_t unknown3; //always 0xFF - /* --- */ - uint8_t packetNum; - uint16_t packetTotal; - struct - { - uint32_t itemId; - uint16_t itemRotation; - uint16_t pos_x; - uint16_t pos_y; - uint16_t pos_z; - } object[100]; + /* consistency check? */ + uint32_t unknown1; //always 0xFFFFFFFF + uint32_t unknown2; //always 0xFFFFFFFF + uint8_t unknown3; //always 0xFF + /* --- */ + uint8_t packetNum; + uint16_t packetTotal; + struct + { + uint32_t itemId; + uint16_t itemRotation; + uint16_t pos_x; + uint16_t pos_y; + uint16_t pos_z; + } object[100]; }; -struct FFXIVIpcMSQTrackerProgress : FFXIVIpcBasePacket +struct FFXIVIpcMSQTrackerProgress : + FFXIVIpcBasePacket< MSQTrackerProgress > { - uint32_t id; - uint32_t padding; + uint32_t id; + uint32_t padding; }; -struct FFXIVIpcMSQTrackerComplete : FFXIVIpcBasePacket +struct FFXIVIpcMSQTrackerComplete : + FFXIVIpcBasePacket< MSQTrackerComplete > { - uint32_t id; - uint32_t padding1; - uint64_t padding2; - uint64_t padding3; - uint64_t padding4; // last 4 bytes is uint32_t but who cares + uint32_t id; + uint32_t padding1; + uint64_t padding2; + uint64_t padding3; + uint64_t padding4; // last 4 bytes is uint32_t but who cares }; -struct FFXIVIpcObjectSpawn : FFXIVIpcBasePacket +struct FFXIVIpcObjectSpawn : + FFXIVIpcBasePacket< ObjectSpawn > { - uint8_t spawnIndex; - uint8_t objKind; - uint8_t state; - uint8_t unknown3; - uint32_t objId; - uint32_t actorId; - uint32_t levelId; - uint32_t unknown10; - uint32_t someActorId14; - uint32_t gimmickId; - float scale; - int16_t unknown20a; - uint16_t rotation; - int16_t unknown24a; - int16_t unknown24b; - uint16_t unknown28a; - int16_t unknown28c; - uint32_t unknown2C; - Common::FFXIVARR_POSITION3 position; - int16_t unknown3C; - int16_t unknown3E; + uint8_t spawnIndex; + uint8_t objKind; + uint8_t state; + uint8_t unknown3; + uint32_t objId; + uint32_t actorId; + uint32_t levelId; + uint32_t unknown10; + uint32_t someActorId14; + uint32_t gimmickId; + float scale; + int16_t unknown20a; + uint16_t rotation; + int16_t unknown24a; + int16_t unknown24b; + uint16_t unknown28a; + int16_t unknown28c; + uint32_t unknown2C; + Common::FFXIVARR_POSITION3 position; + int16_t unknown3C; + int16_t unknown3E; }; -struct FFXIVIpcObjectDespawn : FFXIVIpcBasePacket +struct FFXIVIpcObjectDespawn : + FFXIVIpcBasePacket< ObjectDespawn > { - uint8_t spawnIndex; - uint8_t padding[7]; + uint8_t spawnIndex; + uint8_t padding[7]; }; -struct FFXIVIpcDuelChallenge : FFXIVIpcBasePacket +struct FFXIVIpcDuelChallenge : + FFXIVIpcBasePacket< DuelChallenge > { - uint8_t otherClassJobId; - uint8_t otherLevel; // class job level - uint8_t challengeByYou; // 0 if the other challenges you, 1 if you challenges the other. - uint8_t otherItemLevel; + uint8_t otherClassJobId; + uint8_t otherLevel; // class job level + uint8_t challengeByYou; // 0 if the other challenges you, 1 if you challenges the other. + uint8_t otherItemLevel; - uint32_t otherActorId; + uint32_t otherActorId; - char otherName[32]; + char otherName[32]; }; diff --git a/src/common/Util/LockedQueue.h b/src/common/Util/LockedQueue.h index 02cd24f9..18d143a3 100644 --- a/src/common/Util/LockedQueue.h +++ b/src/common/Util/LockedQueue.h @@ -1,4 +1,5 @@ #pragma once + #include #include #include @@ -7,118 +8,120 @@ namespace Core { - template - class LockedQueue - { - public: - LockedQueue(); - ~LockedQueue(); +template< class T > +class LockedQueue +{ +public: + LockedQueue(); - T pop(); + ~LockedQueue(); - //we can pass this in by reference, instead of copying - void push(const T object); + T pop(); - //we can pass this in by reference - //this will push it onto the queue, and swap the object - // with a default-constructed T at the same time. - void push_swap(T& object); - void push_reset(T& object); + //we can pass this in by reference, instead of copying + void push( const T object ); + + //we can pass this in by reference + //this will push it onto the queue, and swap the object + // with a default-constructed T at the same time. + void push_swap( T& object ); + + void push_reset( T& object ); - std::size_t size(); + std::size_t size(); - protected: - std::queue m_queue; - std::mutex m_mutex; +protected: + std::queue< T > m_queue; + std::mutex m_mutex; - }; +}; - template - LockedQueue::LockedQueue() - { +template< class T > +LockedQueue< T >::LockedQueue() +{ - } +} - template - std::size_t LockedQueue::size() - { - std::lock_guard lock( m_mutex); - return m_queue.size(); - } +template< class T > +std::size_t LockedQueue< T >::size() +{ + std::lock_guard< std::mutex > lock( m_mutex ); + return m_queue.size(); +} - template - LockedQueue::~LockedQueue() - { +template< class T > +LockedQueue< T >::~LockedQueue() +{ - } +} - template - T LockedQueue::pop() - { - std::lock_guard lock( m_mutex); +template< class T > +T LockedQueue< T >::pop() +{ + std::lock_guard< std::mutex > lock( m_mutex ); - if( m_queue.empty()) - { - return T(); - } + if( m_queue.empty() ) + { + return T(); + } - T result = m_queue.front(); + T result = m_queue.front(); - m_queue.pop(); + m_queue.pop(); - return result; - } + return result; +} - template - void LockedQueue::push(const T object) - { - std::lock_guard lock( m_mutex); - m_queue.push(object); - } +template< class T > +void LockedQueue< T >::push( const T object ) +{ + std::lock_guard< std::mutex > lock( m_mutex ); + m_queue.push( object ); +} - template - void LockedQueue::push_swap(T& object) - { - std::lock_guard lock( m_mutex); +template< class T > +void LockedQueue< T >::push_swap( T& object ) +{ + std::lock_guard< std::mutex > lock( m_mutex ); - m_queue.push(object); + m_queue.push( object ); - T default_ctored_object = T(); - //this is a special swap that will do a legit naive swap normally, - // except if there exists a function called T::swap(), which is - // specialized and possibly faster. - boost::swap(object, default_ctored_object); + T default_ctored_object = T(); + //this is a special swap that will do a legit naive swap normally, + // except if there exists a function called T::swap(), which is + // specialized and possibly faster. + boost::swap( object, default_ctored_object ); - //default_ctored_object is now the value of object, and it will go out - // of scope here. In the case that T is a shared_ptr of some kind, - // this will allow that the object on the queue is the *last* shared_ptr - // in existance by the time this function returns. + //default_ctored_object is now the value of object, and it will go out + // of scope here. In the case that T is a shared_ptr of some kind, + // this will allow that the object on the queue is the *last* shared_ptr + // in existance by the time this function returns. - } +} - template - void LockedQueue::push_reset(T& object) - { - std::lock_guard lock( m_mutex); +template< class T > +void LockedQueue< T >::push_reset( T& object ) +{ + std::lock_guard< std::mutex > lock( m_mutex ); - m_queue.push(object); + m_queue.push( object ); - T default_ctored_object = T(); + T default_ctored_object = T(); - object.reset(); + object.reset(); - //default_ctored_object is now the value of object, and it will go out - // of scope here. In the case that T is a shared_ptr of some kind, - // this will allow that the object on the queue is the *last* shared_ptr - // in existance by the time this function returns. + //default_ctored_object is now the value of object, and it will go out + // of scope here. In the case that T is a shared_ptr of some kind, + // this will allow that the object on the queue is the *last* shared_ptr + // in existance by the time this function returns. - } +} } \ No newline at end of file diff --git a/src/common/Util/LockedWaitQueue.h b/src/common/Util/LockedWaitQueue.h index 1ac2eae9..e07103cf 100644 --- a/src/common/Util/LockedWaitQueue.h +++ b/src/common/Util/LockedWaitQueue.h @@ -8,90 +8,97 @@ #include #include -namespace Core -{ +namespace Core { template< typename T > class LockedWaitQueue { private: - std::mutex m_queueLock; - std::queue< T > m_queue; - std::condition_variable m_condition; - std::atomic m_shutdown; + std::mutex m_queueLock; + std::queue< T > m_queue; + std::condition_variable m_condition; + std::atomic< bool > m_shutdown; public: - LockedWaitQueue() : m_shutdown(false) { } + LockedWaitQueue< T >() : + m_shutdown( false ) + { + } - void push( const T& value ) + void push( const T& value ) + { + std::lock_guard< std::mutex > lock( m_queueLock ); + m_queue.push( std::move( value ) ); + + m_condition.notify_one(); + } + + bool empty() + { + std::lock_guard< std::mutex > lock( m_queueLock ); + + return m_queue.empty(); + } + + bool pop( T& value ) + { + std::lock_guard< std::mutex > lock( m_queueLock ); + + if( m_queue.empty() || m_shutdown ) + return false; + + value = m_queue.front(); + + m_queue.pop(); + + return true; + } + + void waitAndPop( T& value ) + { + std::unique_lock< std::mutex > lock( m_queueLock ); + + while( m_queue.empty() && !m_shutdown ) + m_condition.wait( lock ); + + if( m_queue.empty() || m_shutdown ) + return; + + value = m_queue.front(); + + m_queue.pop(); + } + + void cancel() + { + std::unique_lock< std::mutex > lock( m_queueLock ); + + while( !m_queue.empty() ) { - std::lock_guard< std::mutex > lock( m_queueLock ); - m_queue.push( std::move( value ) ); + T& value = m_queue.front(); - m_condition.notify_one(); + deleteQueuedObject( value ); + + m_queue.pop(); } - bool empty() - { - std::lock_guard< std::mutex > lock( m_queueLock ); + m_shutdown = true; - return m_queue.empty(); - } - - bool pop( T& value ) - { - std::lock_guard< std::mutex > lock( m_queueLock ); - - if( m_queue.empty() || m_shutdown ) - return false; - - value = m_queue.front(); - - m_queue.pop(); - - return true; - } - - void waitAndPop( T& value ) - { - std::unique_lock< std::mutex > lock( m_queueLock ); - - while( m_queue.empty() && !m_shutdown ) - m_condition.wait(lock); - - if( m_queue.empty() || m_shutdown ) - return; - - value = m_queue.front(); - - m_queue.pop(); - } - - void cancel() - { - std::unique_lock< std::mutex > lock( m_queueLock ); - - while( !m_queue.empty() ) - { - T& value = m_queue.front(); - - deleteQueuedObject( value ); - - m_queue.pop(); - } - - m_shutdown = true; - - m_condition.notify_all(); - } + m_condition.notify_all(); + } private: - template< typename E = T > - typename std::enable_if< std::is_pointer< E >::value >::type deleteQueuedObject( E& obj ) { delete obj; } + template< typename E = T > + typename std::enable_if< std::is_pointer< E >::value >::type deleteQueuedObject( E& obj ) + { + delete obj; + } - template< typename E = T > - typename std::enable_if< !std::is_pointer< E >::value >::type deleteQueuedObject( E const& ) { } + template< typename E = T > + typename std::enable_if< !std::is_pointer< E >::value >::type deleteQueuedObject( E const& ) + { + } }; } diff --git a/src/common/Util/SpawnIndexAllocator.h b/src/common/Util/SpawnIndexAllocator.h index d6af5a40..dad5fdf8 100644 --- a/src/common/Util/SpawnIndexAllocator.h +++ b/src/common/Util/SpawnIndexAllocator.h @@ -5,103 +5,102 @@ #include #include -namespace Core +namespace Core { +namespace Util { +template< typename T, typename ActorIdType = uint32_t > +class SpawnIndexAllocator { -namespace Util -{ - template< typename T, typename ActorIdType = uint32_t > - class SpawnIndexAllocator - { - public: - static_assert( std::is_same< T, uint8_t >::value || std::is_same< T, uint16_t >::value || - std::is_same< T, uint32_t >::value || std::is_same< T, uint64_t >::value, - "T must be uint8_t, uint16_t, uint32_t, uint64_t" ); +public: + static_assert( std::is_same< T, uint8_t >::value || std::is_same< T, uint16_t >::value || + std::is_same< T, uint32_t >::value || std::is_same< T, uint64_t >::value, + "T must be uint8_t, uint16_t, uint32_t, uint64_t" ); - SpawnIndexAllocator() : - m_maxSlotId( 0 ), - m_reserveFirstSlot( false ) - { } + SpawnIndexAllocator() : + m_maxSlotId( 0 ), + m_reserveFirstSlot( false ) + { + } - void init( T maxSlotId, bool reserveFirstSlot = false ) - { - m_maxSlotId = maxSlotId; - m_reserveFirstSlot = reserveFirstSlot; + void init( T maxSlotId, bool reserveFirstSlot = false ) + { + m_maxSlotId = maxSlotId; + m_reserveFirstSlot = reserveFirstSlot; - setupQueue(); + setupQueue(); - // todo: reserve max slot id in map to prevent any runtime reshashing - } + // todo: reserve max slot id in map to prevent any runtime reshashing + } - T freeUsedSpawnIndex( ActorIdType actorId ) - { - auto it = m_actorIdToAllocatedMap.find( actorId ); - if( it == m_actorIdToAllocatedMap.end() ) - return 0; + T freeUsedSpawnIndex( ActorIdType actorId ) + { + auto it = m_actorIdToAllocatedMap.find( actorId ); + if( it == m_actorIdToAllocatedMap.end() ) + return 0; - auto index = it->second; - m_availableIds.push( index ); - m_actorIdToAllocatedMap.erase( it ); + auto index = it->second; + m_availableIds.push( index ); + m_actorIdToAllocatedMap.erase( it ); - return index; - } + return index; + } - T getNextFreeSpawnIndex( ActorIdType actorId ) - { - assert( m_maxSlotId != 0 ); + T getNextFreeSpawnIndex( ActorIdType actorId ) + { + assert( m_maxSlotId != 0 ); - if( m_availableIds.empty() ) - return getAllocFailId(); + if( m_availableIds.empty() ) + return getAllocFailId(); - auto nextId = m_availableIds.front(); - m_availableIds.pop(); + auto nextId = m_availableIds.front(); + m_availableIds.pop(); - m_actorIdToAllocatedMap[actorId] = nextId; + m_actorIdToAllocatedMap[ actorId ] = nextId; - return nextId; - } + return nextId; + } - void freeAllSpawnIndexes() - { - setupQueue(); + void freeAllSpawnIndexes() + { + setupQueue(); - m_actorIdToAllocatedMap.clear(); - } + m_actorIdToAllocatedMap.clear(); + } - bool isSpawnIndexValid( T spawnIndex ) - { - return spawnIndex != getAllocFailId(); - } + bool isSpawnIndexValid( T spawnIndex ) + { + return spawnIndex != getAllocFailId(); + } - constexpr T getAllocFailId() const - { - return static_cast< T >( -1 ); - } + constexpr T getAllocFailId() const + { + return static_cast< T >( -1 ); + } - protected: - void setupQueue() - { - assert( m_maxSlotId != 0 ); +protected: + void setupQueue() + { + assert( m_maxSlotId != 0 ); - while( !m_availableIds.empty() ) - m_availableIds.pop(); + while( !m_availableIds.empty() ) + m_availableIds.pop(); - uint32_t start = 0; + uint32_t start = 0; - // slot 0 is reserved when used for spawning actors/players otherwise the local player actor spawnIndex - // will be used by another actor and despawn the local player - if( m_reserveFirstSlot ) - start = 1; + // slot 0 is reserved when used for spawning actors/players otherwise the local player actor spawnIndex + // will be used by another actor and despawn the local player + if( m_reserveFirstSlot ) + start = 1; - for( uint32_t i = start; i < m_maxSlotId; i++ ) - m_availableIds.push( i ); - } + for( uint32_t i = start; i < m_maxSlotId; i++ ) + m_availableIds.push( i ); + } - std::queue< T > m_availableIds; - std::unordered_map< ActorIdType, T > m_actorIdToAllocatedMap; + std::queue< T > m_availableIds; + std::unordered_map< ActorIdType, T > m_actorIdToAllocatedMap; - T m_maxSlotId; - bool m_reserveFirstSlot; - }; + T m_maxSlotId; + bool m_reserveFirstSlot; +}; } } diff --git a/src/common/Util/Util.cpp b/src/common/Util/Util.cpp index 48c565ae..56e277ba 100644 --- a/src/common/Util/Util.cpp +++ b/src/common/Util/Util.cpp @@ -4,102 +4,102 @@ std::string Core::Util::binaryToHexString( uint8_t* pBinData, uint16_t size ) { - std::string outStr; + std::string outStr; - for( uint32_t i = 0; i < size; i++ ) - { - outStr += boost::str( boost::format( "%|02X|" ) % ( int32_t ) ( pBinData[i] & 0xFF ) ); - } + for( uint32_t i = 0; i < size; i++ ) + { + outStr += boost::str( boost::format( "%|02X|" ) % ( int32_t ) ( pBinData[ i ] & 0xFF ) ); + } - return outStr; + return outStr; } std::string Core::Util::binaryToHexDump( uint8_t* pBinData, uint16_t size ) { - int bytesPerLine = 16; - constexpr char hexChars[] = "0123456789ABCDEF"; - - int offsetBlock = 8 + 3; - int byteBlock = offsetBlock + bytesPerLine * 3 + ( bytesPerLine - 1 ) / 8 + 2; - int lineLength = byteBlock + bytesPerLine + 1; + int bytesPerLine = 16; + constexpr char hexChars[] = "0123456789ABCDEF"; - std::string line ( lineLength, ' ' ); - int numLines = ( size + bytesPerLine - 1 ) / bytesPerLine; - + int offsetBlock = 8 + 3; + int byteBlock = offsetBlock + bytesPerLine * 3 + ( bytesPerLine - 1 ) / 8 + 2; + int lineLength = byteBlock + bytesPerLine + 1; - std::string outStr; + std::string line( lineLength, ' ' ); + int numLines = ( size + bytesPerLine - 1 ) / bytesPerLine; - for( uint32_t i = 0; i < size; i += bytesPerLine ) - { - line[0] = hexChars[( i >> 28 ) & 0xF]; - line[1] = hexChars[( i >> 24 ) & 0xF]; - line[2] = hexChars[( i >> 20 ) & 0xF]; - line[3] = hexChars[( i >> 16 ) & 0xF]; - line[4] = hexChars[( i >> 12 ) & 0xF]; - line[5] = hexChars[( i >> 8 ) & 0xF]; - line[6] = hexChars[( i >> 4 ) & 0xF]; - line[7] = hexChars[( i >> 0 ) & 0xF]; - int hexColumn = offsetBlock; - int charColumn = byteBlock; + std::string outStr; - for( int j = 0; j < bytesPerLine; j++ ) + for( uint32_t i = 0; i < size; i += bytesPerLine ) + { + line[ 0 ] = hexChars[ ( i >> 28 ) & 0xF ]; + line[ 1 ] = hexChars[ ( i >> 24 ) & 0xF ]; + line[ 2 ] = hexChars[ ( i >> 20 ) & 0xF ]; + line[ 3 ] = hexChars[ ( i >> 16 ) & 0xF ]; + line[ 4 ] = hexChars[ ( i >> 12 ) & 0xF ]; + line[ 5 ] = hexChars[ ( i >> 8 ) & 0xF ]; + line[ 6 ] = hexChars[ ( i >> 4 ) & 0xF ]; + line[ 7 ] = hexChars[ ( i >> 0 ) & 0xF ]; + + int hexColumn = offsetBlock; + int charColumn = byteBlock; + + for( int j = 0; j < bytesPerLine; j++ ) + { + if( j > 0 && ( j & 7 ) == 0 ) { - if( j > 0 && ( j & 7 ) == 0) - { - hexColumn++; - } - - if( i + j >= size ) - { - line[hexColumn] = ' '; - line[hexColumn + 1] = ' '; - line[charColumn] = ' '; - } - else - { - uint8_t by = pBinData[i + j]; - line[hexColumn] = hexChars[( by >> 4 ) & 0xF]; - line[hexColumn + 1] = hexChars[by & 0xF]; - line[charColumn] = by < 32 ? '.' : static_cast< char >( by ); - } - - hexColumn += 3; - charColumn++; + hexColumn++; } - outStr += line + "\n"; - } + if( i + j >= size ) + { + line[ hexColumn ] = ' '; + line[ hexColumn + 1 ] = ' '; + line[ charColumn ] = ' '; + } + else + { + uint8_t by = pBinData[ i + j ]; + line[ hexColumn ] = hexChars[ ( by >> 4 ) & 0xF ]; + line[ hexColumn + 1 ] = hexChars[ by & 0xF ]; + line[ charColumn ] = by < 32 ? '.' : static_cast< char >( by ); + } - return outStr; + hexColumn += 3; + charColumn++; + } + + outStr += line + "\n"; + } + + return outStr; } uint64_t Core::Util::getTimeMs() { - std::chrono::milliseconds epoch = std::chrono::duration_cast< std::chrono::milliseconds > - ( std::chrono::system_clock::now().time_since_epoch() ); - return epoch.count(); + std::chrono::milliseconds epoch = std::chrono::duration_cast< std::chrono::milliseconds > + ( std::chrono::system_clock::now().time_since_epoch() ); + return epoch.count(); } int64_t Core::Util::getTimeSeconds() { - std::chrono::seconds epoch = std::chrono::seconds( std::time( nullptr ) ); - return epoch.count(); + std::chrono::seconds epoch = std::chrono::seconds( std::time( nullptr ) ); + return epoch.count(); } uint64_t Core::Util::getEorzeanTimeStamp() { - return static_cast< uint64_t >( getTimeSeconds() * 20.571428571428573f ); + return static_cast< uint64_t >( getTimeSeconds() * 20.571428571428573f ); } void Core::Util::valueToFlagByteIndexValue( uint32_t inVal, uint8_t& outVal, uint16_t& outIndex ) { - uint32_t id = inVal; - outIndex = id / 8; - uint8_t bitIndex = id % 8; + uint32_t id = inVal; + outIndex = id / 8; + uint8_t bitIndex = id % 8; - outVal = 1 << bitIndex; + outVal = 1 << bitIndex; } diff --git a/src/common/Util/UtilMath.cpp b/src/common/Util/UtilMath.cpp index 680998d1..890d986c 100644 --- a/src/common/Util/UtilMath.cpp +++ b/src/common/Util/UtilMath.cpp @@ -3,69 +3,69 @@ float Core::Math::Util::distanceSq( float x, float y, float z, float x1, float y1, float z1 ) { - float deltaX = x - x1; - float deltaY = y - y1; - float deltaZ = z - z1; + float deltaX = x - x1; + float deltaY = y - y1; + float deltaZ = z - z1; - return ( deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ ); + return ( deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ ); } float Core::Math::Util::distance( float x, float y, float z, float x1, float y1, float z1 ) { - return sqrtf( distanceSq( x, y, z, x1, y1, z1 ) ); + return sqrtf( distanceSq( x, y, z, x1, y1, z1 ) ); } float Core::Math::Util::distance2DSq( float x, float y, float x1, float y1 ) { - float deltaX = x - x1; - float deltaY = y - y1; - return ( deltaX * deltaX + deltaY * deltaY ); + float deltaX = x - x1; + float deltaY = y - y1; + return ( deltaX * deltaX + deltaY * deltaY ); } float Core::Math::Util::distance2D( float x, float y, float x1, float y1 ) { - return sqrtf( distance2DSq( x, y, x1, y1 ) ); + return sqrtf( distance2DSq( x, y, x1, y1 ) ); } float Core::Math::Util::calcAngTo( float x, float y, float x1, float y1 ) { - float dx = x - x1; - float dy = y - y1; - if( dy != 0.0f ) - { - return atan2( dy, dx ); - } - else - { - return 0.0f; - } + float dx = x - x1; + float dy = y - y1; + if( dy != 0.0f ) + { + return atan2( dy, dx ); + } + else + { + return 0.0f; + } } float Core::Math::Util::calcAngFrom( float x, float y, float x1, float y1 ) { - float dx = x - x1; - float dy = y - y1; - if( dy != 0.0f ) - { - return atan2( dy, dx ); - } - else - { - return 0.0f; - } + float dx = x - x1; + float dy = y - y1; + if( dy != 0.0f ) + { + return atan2( dy, dx ); + } + else + { + return 0.0f; + } } uint16_t Core::Math::Util::floatToUInt16( float val ) { - return static_cast< uint16_t >( 0x8000 + val * 32.767f ); + return static_cast< uint16_t >( 0x8000 + val * 32.767f ); } uint16_t Core::Math::Util::floatToUInt16Rot( float val ) { - return static_cast< uint16_t >( 0x8000 * ( ( val + PI ) ) / PI ); + return static_cast< uint16_t >( 0x8000 * ( ( val + PI ) ) / PI ); } uint8_t Core::Math::Util::floatToUInt8Rot( float val ) { - return static_cast< uint8_t >( 0x80 * ( ( val + PI ) ) / PI ); + 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 68feeabe..5826b08f 100644 --- a/src/common/Util/UtilMath.h +++ b/src/common/Util/UtilMath.h @@ -22,24 +22,26 @@ float calcAngTo( float x, float y, float x1, float y1 ); float calcAngFrom( float x, float y, float x1, float y1 ); uint16_t floatToUInt16( float val ); + uint16_t floatToUInt16Rot( float val ); + uint8_t floatToUInt8Rot( float val ); template - + < typename T > T clamp( T val, T minimum, T maximum ) { - if (val > maximum) - { - return maximum; - } - - if (val < minimum) - { - return minimum; - } + if( val > maximum ) + { + return maximum; + } - return val; + if( val < minimum ) + { + return minimum; + } + + return val; } } } diff --git a/src/common/Version.h b/src/common/Version.h index 3a02b99e..3b795fc6 100644 --- a/src/common/Version.h +++ b/src/common/Version.h @@ -4,12 +4,12 @@ #include namespace Core { - namespace Version { +namespace Version { - extern const std::string GIT_HASH; - extern const std::string VERSION; +extern const std::string GIT_HASH; +extern const std::string VERSION; - } /* Version */ +} /* Version */ } /* Core */ #endif diff --git a/src/servers/Scripts/action/ActionReturn6.cpp b/src/servers/Scripts/action/ActionReturn6.cpp index 7afc07e1..09169014 100644 --- a/src/servers/Scripts/action/ActionReturn6.cpp +++ b/src/servers/Scripts/action/ActionReturn6.cpp @@ -2,14 +2,17 @@ #include "../ScriptObject.h" #include -class ActionReturn6 : public ActionScript +class ActionReturn6 : + public ActionScript { public: - ActionReturn6() : ActionScript( 6 ) - {} + ActionReturn6() : + ActionScript( 6 ) + { + } - void onCastFinish( Core::Entity::Player& player, Core::Entity::Chara& targetActor ) override - { - player.returnToHomepoint(); - } + void onCastFinish( Core::Entity::Player& player, Core::Entity::Chara& targetActor ) override + { + player.returnToHomepoint(); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/action/ActionSprint3.cpp b/src/servers/Scripts/action/ActionSprint3.cpp index b630cd8b..b44746ae 100644 --- a/src/servers/Scripts/action/ActionSprint3.cpp +++ b/src/servers/Scripts/action/ActionSprint3.cpp @@ -1,14 +1,17 @@ #include #include -class ActionSprint3 : public ActionScript +class ActionSprint3 : + public ActionScript { public: - ActionSprint3() : ActionScript( 3 ) - {} + ActionSprint3() : + ActionScript( 3 ) + { + } - void onCastFinish( Core::Entity::Player& player, Core::Entity::Chara& targetActor ) override - { - player.addStatusEffectByIdIfNotExist( 50, 20000, player, 30 ); - } + void onCastFinish( Core::Entity::Player& player, Core::Entity::Chara& targetActor ) override + { + player.addStatusEffectByIdIfNotExist( 50, 20000, player, 30 ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/Aethernet.cpp b/src/servers/Scripts/common/Aethernet.cpp index b925564e..3391049b 100644 --- a/src/servers/Scripts/common/Aethernet.cpp +++ b/src/servers/Scripts/common/Aethernet.cpp @@ -10,37 +10,41 @@ #define AETHERYTE_MENU_FAVORITE_POINT 4 #define AETHERYTE_MENU_FAVORITE_POINT_SECURITY_TOKEN 5 -class Aethernet : public EventScript +class Aethernet : + public EventScript { public: - Aethernet() : EventScript( EVENTSCRIPT_AETHERNET_ID ) - {} + Aethernet() : + EventScript( EVENTSCRIPT_AETHERNET_ID ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - if( player.isAetheryteRegistered( eventId & 0xFFFF ) ) + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + if( player.isAetheryteRegistered( eventId & 0xFFFF ) ) + { + player.playScene( eventId, 2, 0, []( Entity::Player& player, const Event::SceneResult& result ) { - player.playScene( eventId, 2, 0, []( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param1 == 256 ) - { - player.teleport( result.param2, 2 ); - } - } ); - } - else - { - player.eventActionStart( eventId, ACTION_ATTUNE, []( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - player.registerAetheryte( eventId & 0xFFFF ); - player.playScene( eventId, 3, 0, 0, 0 ); - }, - [] ( Entity::Player& ply, uint32_t evntId, uint64_t additional ) - { + if( result.param1 == 256 ) + { + player.teleport( result.param2, 2 ); + } + } ); + } + else + { + player.eventActionStart( eventId, ACTION_ATTUNE, + []( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + player.registerAetheryte( eventId & 0xFFFF ); + player.playScene( eventId, 3, 0, 0, 0 ); + }, + []( Entity::Player& ply, uint32_t evntId, uint64_t additional ) + { - }, 0 ); + }, 0 ); - } + } - } + } }; diff --git a/src/servers/Scripts/common/Aetheryte.cpp b/src/servers/Scripts/common/Aetheryte.cpp index d883bd3c..39c920e7 100644 --- a/src/servers/Scripts/common/Aetheryte.cpp +++ b/src/servers/Scripts/common/Aetheryte.cpp @@ -12,58 +12,63 @@ #define AETHERYTE_MENU_FAVORITE_POINT 4 #define AETHERYTE_MENU_FAVORITE_POINT_SECURITY_TOKEN 5 -class Aetheryte : public EventScript +class Aetheryte : + public EventScript { public: - Aetheryte() : EventScript( EVENTSCRIPT_AETHERYTE_ID ) - {} + Aetheryte() : + EventScript( EVENTSCRIPT_AETHERYTE_ID ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - if( player.isAetheryteRegistered( eventId & 0xFFFF ) ) + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + if( player.isAetheryteRegistered( eventId & 0xFFFF ) ) + { + player.playScene( eventId, 0, 1, []( Entity::Player& player, const Event::SceneResult& result ) { - player.playScene( eventId, 0, 1, []( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param1 == 256 ) // set homepoint - { - player.setHomepoint( result.eventId & 0xFFFF ); - player.sendQuestMessage( result.eventId, 2, 0xEA, 0, 0 ); - } else if( result.param1 == 512 ) // aethernet access - { - if( result.param2 == 4 ) - { - player.teleport( result.param3, 2 ); - } - else if( result.param2 == 2 ) // register favored destination - { + if( result.param1 == 256 ) // set homepoint + { + player.setHomepoint( result.eventId & 0xFFFF ); + player.sendQuestMessage( result.eventId, 2, 0xEA, 0, 0 ); + } + else if( result.param1 == 512 ) // aethernet access + { + if( result.param2 == 4 ) + { + player.teleport( result.param3, 2 ); + } + else if( result.param2 == 2 ) // register favored destination + { - } + } // else if( param2 == 0xC3E1 ) // register free destination // { // // } - } - } ); - } - else - { - player.eventActionStart( eventId, ACTION_ATTUNE, []( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - player.registerAetheryte( eventId & 0xFFFF ); + } + } ); + } + else + { + player.eventActionStart( eventId, ACTION_ATTUNE, + []( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + player.registerAetheryte( eventId & 0xFFFF ); - if( player.isActionLearned( ACTION_TELEPORT ) ) - { - player.sendQuestMessage( eventId, 0, 2, 0, 0 ); - } - else - { - player.sendQuestMessage( eventId, 0, 1, 1, 0 ); - player.learnAction( ACTION_TELEPORT ); - } - }, - [] ( Entity::Player& player, uint32_t eventId, uint64_t additional ) - {}, 0 ); - } - } + if( player.isActionLearned( ACTION_TELEPORT ) ) + { + player.sendQuestMessage( eventId, 0, 2, 0, 0 ); + } + else + { + player.sendQuestMessage( eventId, 0, 1, 1, 0 ); + player.learnAction( ACTION_TELEPORT ); + } + }, + []( Entity::Player& player, uint32_t eventId, uint64_t additional ) + {}, 0 ); + } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/CmnDefCutSceneReplay.cpp b/src/servers/Scripts/common/CmnDefCutSceneReplay.cpp index 137c5a02..746fa79d 100644 --- a/src/servers/Scripts/common/CmnDefCutSceneReplay.cpp +++ b/src/servers/Scripts/common/CmnDefCutSceneReplay.cpp @@ -1,37 +1,40 @@ #include #include -class CmnDefCutSceneReplay : public EventScript +class CmnDefCutSceneReplay : + public EventScript { public: - CmnDefCutSceneReplay() : EventScript( 721028 ) - {} + CmnDefCutSceneReplay() : + EventScript( 721028 ) + { + } - void Scene00000( Entity::Player& player ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00000( Entity::Player& player ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 != 0 ) { - if( result.param2 != 0 ) - { - Scene00001( player, result.param2 ); - } - }; + Scene00001( player, result.param2 ); + } + }; - player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1, callback ); - } + player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1, callback ); + } - void Scene00001( Entity::Player& player, uint16_t returnScene ) - { - auto callback = []( Entity::Player& player, const Event::SceneResult& result ) - { - // todo: this is fucked - }; + void Scene00001( Entity::Player& player, uint16_t returnScene ) + { + auto callback = []( Entity::Player& player, const Event::SceneResult& result ) + { + // todo: this is fucked + }; - player.playScene( getId(), 1, 0xFB2EC8F8, 0, 1, returnScene, callback ); - } + player.playScene( getId(), 1, 0xFB2EC8F8, 0, 1, returnScene, callback ); + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00000( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00000( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/CmnDefHousingSignboard.cpp b/src/servers/Scripts/common/CmnDefHousingSignboard.cpp index cced1ec6..3b990e2d 100644 --- a/src/servers/Scripts/common/CmnDefHousingSignboard.cpp +++ b/src/servers/Scripts/common/CmnDefHousingSignboard.cpp @@ -1,19 +1,22 @@ #include #include -class CmnDefHousingSignboard : public EventScript +class CmnDefHousingSignboard : + public EventScript { public: - CmnDefHousingSignboard() : EventScript( 721031 ) - {} + CmnDefHousingSignboard() : + EventScript( 721031 ) + { + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00000( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00000( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/CmnDefInnBed.cpp b/src/servers/Scripts/common/CmnDefInnBed.cpp index 8c09c3c3..f1b59824 100644 --- a/src/servers/Scripts/common/CmnDefInnBed.cpp +++ b/src/servers/Scripts/common/CmnDefInnBed.cpp @@ -1,57 +1,60 @@ #include #include -class CmnDefInnBed : public EventScript +class CmnDefInnBed : + public EventScript { public: - CmnDefInnBed() : EventScript( 720916 ) - {} + CmnDefInnBed() : + EventScript( 720916 ) + { + } - // menu - void Scene00000( Entity::Player& player ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 > 0 ) - Scene00001( player, result.param2 ); - }; + // menu + void Scene00000( Entity::Player& player ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 > 0 ) + Scene00001( player, result.param2 ); + }; - player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1, callback ); - } + player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1, callback ); + } - // lay down - void Scene00001( Entity::Player& player, uint16_t param ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00002( player, result.param2 ); - }; + // lay down + void Scene00001( Entity::Player& player, uint16_t param ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00002( player, result.param2 ); + }; - player.playScene( getId(), 1, 0xF32E48F8, 0, 1, param, callback ); - } + player.playScene( getId(), 1, 0xF32E48F8, 0, 1, param, callback ); + } - // logout - void Scene00002( Entity::Player& player, uint16_t param ) - { - player.playScene( getId(), 2, 0xF32E48F8, 0, 1, param, nullptr ); - } + // logout + void Scene00002( Entity::Player& player, uint16_t param ) + { + player.playScene( getId(), 2, 0xF32E48F8, 0, 1, param, nullptr ); + } - // wake up - void Scene00100( Entity::Player& player ) - { - auto callback = []( Entity::Player& player, const Event::SceneResult& result ) - { }; + // wake up + void Scene00100( Entity::Player& player ) + { + auto callback = []( Entity::Player& player, const Event::SceneResult& result ) + {}; - player.playScene( getId(), 100, 0x800, 0, 0, callback ); - } + player.playScene( getId(), 100, 0x800, 0, 0, callback ); + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00000( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00000( player ); + } - void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override - { - Scene00100( player ); - } + void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override + { + Scene00100( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/CmnDefLinkShell.cpp b/src/servers/Scripts/common/CmnDefLinkShell.cpp index 81d174b8..0faba511 100644 --- a/src/servers/Scripts/common/CmnDefLinkShell.cpp +++ b/src/servers/Scripts/common/CmnDefLinkShell.cpp @@ -5,55 +5,58 @@ #define ACTION_RENAME 3 #define ACTION_REMOVE 4 -class CmnDefLinkShell : public EventScript +class CmnDefLinkShell : + public EventScript { public: - CmnDefLinkShell() : EventScript( 0xB0006 ) - {} + CmnDefLinkShell() : + EventScript( 0xB0006 ) + { + } - void Scene00001( Entity::Player& player ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00001( Entity::Player& player ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + switch( result.param2 ) { - switch( result.param2 ) - { - case ACTION_CREATE: - Scene00002( player ); - break; + case ACTION_CREATE: + Scene00002( player ); + break; - case ACTION_RENAME: - Scene00003( player ); - break; + case ACTION_RENAME: + Scene00003( player ); + break; - case ACTION_REMOVE: - Scene00004( player ); - break; - } - }; + case ACTION_REMOVE: + Scene00004( player ); + break; + } + }; - player.playScene( getId(), 1, 0, 0, 0, callback ); - } + player.playScene( getId(), 1, 0, 0, 0, callback ); + } - // create linkshell - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, 0, 0, 0 ); - } + // create linkshell + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, 0, 0, 0 ); + } - // rename linkshell - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, 0, 0, 0 ); - } + // rename linkshell + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, 0, 0, 0 ); + } - // remove linkshell - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, 0, 0, 0 ); - } + // remove linkshell + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, 0, 0, 0 ); + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00001( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00001( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/CmnDefMarketBoardGridania.cpp b/src/servers/Scripts/common/CmnDefMarketBoardGridania.cpp index 292bdaa9..47c7c8b6 100644 --- a/src/servers/Scripts/common/CmnDefMarketBoardGridania.cpp +++ b/src/servers/Scripts/common/CmnDefMarketBoardGridania.cpp @@ -1,19 +1,22 @@ #include #include -class CmnDefMarketBoardGridania : public EventScript +class CmnDefMarketBoardGridania : + public EventScript { public: - CmnDefMarketBoardGridania() : EventScript( 0xB0027 ) - {} + CmnDefMarketBoardGridania() : + EventScript( 0xB0027 ) + { + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00000( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00000( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/CmnDefMogLetter.cpp b/src/servers/Scripts/common/CmnDefMogLetter.cpp index 424ebb53..1a921c1b 100644 --- a/src/servers/Scripts/common/CmnDefMogLetter.cpp +++ b/src/servers/Scripts/common/CmnDefMogLetter.cpp @@ -1,22 +1,25 @@ #include #include -class CmnDefMogLetter : public EventScript +class CmnDefMogLetter : + public EventScript { public: - CmnDefMogLetter() : EventScript( 720898 ) - {} + CmnDefMogLetter() : + EventScript( 720898 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00000( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00000( player ); + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, 0, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, 0, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/CmnDefNpcRepair.cpp b/src/servers/Scripts/common/CmnDefNpcRepair.cpp index 18be6f72..08656651 100644 --- a/src/servers/Scripts/common/CmnDefNpcRepair.cpp +++ b/src/servers/Scripts/common/CmnDefNpcRepair.cpp @@ -1,19 +1,22 @@ #include #include -class CmnDefNpcRepair : public EventScript +class CmnDefNpcRepair : + public EventScript { public: - CmnDefNpcRepair() : EventScript( 0xB0013 ) - {} + CmnDefNpcRepair() : + EventScript( 0xB0013 ) + { + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00000( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00000( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/CmnDefWeatherForeCast.cpp b/src/servers/Scripts/common/CmnDefWeatherForeCast.cpp index 7676b46c..82305449 100644 --- a/src/servers/Scripts/common/CmnDefWeatherForeCast.cpp +++ b/src/servers/Scripts/common/CmnDefWeatherForeCast.cpp @@ -1,22 +1,25 @@ #include #include -class CmnDefWeatherForeCast : public EventScript +class CmnDefWeatherForeCast : + public EventScript { public: - CmnDefWeatherForeCast() : EventScript( 721100 ) - {} + CmnDefWeatherForeCast() : + EventScript( 721100 ) + { + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00000( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00000( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/ComDefMobHuntBoard.cpp b/src/servers/Scripts/common/ComDefMobHuntBoard.cpp index 1c0281a5..c328bb5d 100644 --- a/src/servers/Scripts/common/ComDefMobHuntBoard.cpp +++ b/src/servers/Scripts/common/ComDefMobHuntBoard.cpp @@ -1,19 +1,22 @@ #include #include -class ComDefMobHuntBoard : public EventScript +class ComDefMobHuntBoard : + public EventScript { public: - ComDefMobHuntBoard() : EventScript( 0xB00CA ) - {} + ComDefMobHuntBoard() : + EventScript( 0xB00CA ) + { + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00000( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00000( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/GilShop.cpp b/src/servers/Scripts/common/GilShop.cpp index 8ff007f4..4181e5c0 100644 --- a/src/servers/Scripts/common/GilShop.cpp +++ b/src/servers/Scripts/common/GilShop.cpp @@ -1,48 +1,51 @@ #include #include -class GilShop : public EventScript +class GilShop : + public EventScript { public: - GilShop() : EventScript( 0x00040001 ) - {} + GilShop() : + EventScript( 0x00040001 ) + { + } - constexpr static auto SCENE_FLAGS = HIDE_HOTBAR | NO_DEFAULT_CAMERA; + constexpr static auto SCENE_FLAGS = HIDE_HOTBAR | NO_DEFAULT_CAMERA; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - player.playScene( eventId, 0, SCENE_FLAGS, 0, 2, shopCallback ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + player.playScene( eventId, 0, SCENE_FLAGS, 0, 2, shopCallback ); + } private: - static void shopInteractionCallback( Entity::Player& player, const Event::SceneResult& result ) - { - // item purchase - if( result.param1 == 768 ) + static void shopInteractionCallback( Entity::Player& player, const Event::SceneResult& result ) + { + // item purchase + if( result.param1 == 768 ) + { + // buy + if( result.param2 == 1 ) { - // buy - if( result.param2 == 1 ) - { - } - - // sell - else if( result.param2 == 2 ) - { - - } - - player.sendDebug( "got tradeQuantity: " + std::to_string( result.param4 ) ); - player.playGilShop( result.eventId, SCENE_FLAGS, shopInteractionCallback ); - return; } - // exit - player.playScene( result.eventId, 255, SCENE_FLAGS ); - } + // sell + else if( result.param2 == 2 ) + { - static void shopCallback( Entity::Player& player, const Event::SceneResult& result ) - { + } + + player.sendDebug( "got tradeQuantity: " + std::to_string( result.param4 ) ); player.playGilShop( result.eventId, SCENE_FLAGS, shopInteractionCallback ); - } + return; + } + + // exit + player.playScene( result.eventId, 255, SCENE_FLAGS ); + } + + static void shopCallback( Entity::Player& player, const Event::SceneResult& result ) + { + player.playGilShop( result.eventId, SCENE_FLAGS, shopInteractionCallback ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/common/HouFurOrchestrion.cpp b/src/servers/Scripts/common/HouFurOrchestrion.cpp index 514f86a9..bfdc35b6 100644 --- a/src/servers/Scripts/common/HouFurOrchestrion.cpp +++ b/src/servers/Scripts/common/HouFurOrchestrion.cpp @@ -1,19 +1,22 @@ #include #include -class HouFurOrchestrion : public EventScript +class HouFurOrchestrion : + public EventScript { public: - HouFurOrchestrion() : EventScript( 721226 ) - {} + HouFurOrchestrion() : + EventScript( 721226 ) + { + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1 ); + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - Scene00000( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + Scene00000( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/AkhAfahAmphitheatreExtreme.cpp b/src/servers/Scripts/instances/AkhAfahAmphitheatreExtreme.cpp index fadf0cf5..ee9b597c 100644 --- a/src/servers/Scripts/instances/AkhAfahAmphitheatreExtreme.cpp +++ b/src/servers/Scripts/instances/AkhAfahAmphitheatreExtreme.cpp @@ -1,40 +1,50 @@ #include #include -class AkhAfahAmphitheatreExtreme : public InstanceContentScript +class AkhAfahAmphitheatreExtreme : + public InstanceContentScript { public: - AkhAfahAmphitheatreExtreme() : InstanceContentScript( 20025 ) - { } + AkhAfahAmphitheatreExtreme() : + InstanceContentScript( 20025 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2004238, 4772738, 4, { -1.210436f, 0.000000f, -0.715586f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_r1fc_b0472", 2004239, 4797573, 4, { 1.181316f, -0.000000f, 1.563968f }, 1.000000f, 0.000000f ); - // States -> wind_def wind_def_anim wind_pop wind_pop_anim - instance->registerEObj( "sgvf_r1fc_b0471", 2004240, 4841629, 4, { 11.000000f, 0.000000f, -11.000000f }, 1.000000f, 0.793709f ); - // States -> magi_def magi_def_anim magi_pop magi_pop_anim - instance->registerEObj( "sgvf_r1fc_b0471_1", 2004349, 4841631, 4, { 12.811310f, -0.000000f, 9.376424f }, 1.000000f, 0.000000f ); - // States -> magi_def magi_def_anim magi_pop magi_pop_anim - instance->registerEObj( "sgvf_r1fc_b0471_2", 2004350, 4841632, 4, { -8.033875f, 0.000000f, 10.406790f }, 1.000000f, 0.000000f ); - // States -> magi_def magi_def_anim magi_pop magi_pop_anim - instance->registerEObj( "sgvf_r1fc_b0471_3", 2004351, 4841633, 4, { -8.319038f, -0.000001f, -10.997720f }, 1.000000f, 0.000000f ); - // States -> magi_def magi_def_anim magi_pop magi_pop_anim - instance->registerEObj( "Entrance", 2000182, 4738599, 5, { 9.717670f, 0.000000f, 14.522430f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -15.000000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2004238, 4772738, 4, { -1.210436f, 0.000000f, -0.715586f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_r1fc_b0472", 2004239, 4797573, 4, { 1.181316f, -0.000000f, 1.563968f }, 1.000000f, + 0.000000f ); + // States -> wind_def wind_def_anim wind_pop wind_pop_anim + instance->registerEObj( "sgvf_r1fc_b0471", 2004240, 4841629, 4, { 11.000000f, 0.000000f, -11.000000f }, 1.000000f, + 0.793709f ); + // States -> magi_def magi_def_anim magi_pop magi_pop_anim + instance->registerEObj( "sgvf_r1fc_b0471_1", 2004349, 4841631, 4, { 12.811310f, -0.000000f, 9.376424f }, 1.000000f, + 0.000000f ); + // States -> magi_def magi_def_anim magi_pop magi_pop_anim + instance->registerEObj( "sgvf_r1fc_b0471_2", 2004350, 4841632, 4, { -8.033875f, 0.000000f, 10.406790f }, 1.000000f, + 0.000000f ); + // States -> magi_def magi_def_anim magi_pop magi_pop_anim + instance->registerEObj( "sgvf_r1fc_b0471_3", 2004351, 4841633, 4, { -8.319038f, -0.000001f, -10.997720f }, + 1.000000f, 0.000000f ); + // States -> magi_def magi_def_anim magi_pop magi_pop_anim + instance->registerEObj( "Entrance", 2000182, 4738599, 5, { 9.717670f, 0.000000f, 14.522430f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -15.000000f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors101110.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors101110.cpp index 711fae97..f5030961 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors101110.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors101110.cpp @@ -1,30 +1,35 @@ #include #include -class ThePalaceoftheDeadFloors101110 : public InstanceContentScript +class ThePalaceoftheDeadFloors101110 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors101110() : InstanceContentScript( 60011 ) - { } + ThePalaceoftheDeadFloors101110() : + InstanceContentScript( 60011 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6527847, 4, { -300.000000f, 0.000026f, -237.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - instance->registerEObj( "sgvf_w_lvd_b0959_1", 2000608, 6544382, 4, { 301.149902f, -0.045413f, 285.247589f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6527847, 4, { -300.000000f, 0.000026f, -237.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + instance->registerEObj( "sgvf_w_lvd_b0959_1", 2000608, 6544382, 4, { 301.149902f, -0.045413f, 285.247589f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors110.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors110.cpp index 855e7490..0b13ff79 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors110.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors110.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors110 : public InstanceContentScript +class ThePalaceoftheDeadFloors110 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors110() : InstanceContentScript( 60001 ) - { } + ThePalaceoftheDeadFloors110() : + InstanceContentScript( 60001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2002872, 6324883, 4, { -300.000000f, -0.000010f, -220.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2002872, 6324883, 4, { -300.000000f, -0.000010f, -220.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors111120.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors111120.cpp index a7c11f16..1b4a904b 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors111120.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors111120.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors111120 : public InstanceContentScript +class ThePalaceoftheDeadFloors111120 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors111120() : InstanceContentScript( 60012 ) - { } + ThePalaceoftheDeadFloors111120() : + InstanceContentScript( 60012 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6535115, 4, { -300.000000f, 0.000026f, -237.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6535115, 4, { -300.000000f, 0.000026f, -237.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors1120.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors1120.cpp index 2a437c06..51a8eae2 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors1120.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors1120.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors1120 : public InstanceContentScript +class ThePalaceoftheDeadFloors1120 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors1120() : InstanceContentScript( 60002 ) - { } + ThePalaceoftheDeadFloors1120() : + InstanceContentScript( 60002 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6353850, 4, { -300.000000f, 0.000026f, -237.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6353850, 4, { -300.000000f, 0.000026f, -237.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors121130.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors121130.cpp index dcaa393a..67089369 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors121130.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors121130.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors121130 : public InstanceContentScript +class ThePalaceoftheDeadFloors121130 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors121130() : InstanceContentScript( 60013 ) - { } + ThePalaceoftheDeadFloors121130() : + InstanceContentScript( 60013 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6535115, 4, { -300.000000f, 0.000026f, -237.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6535115, 4, { -300.000000f, 0.000026f, -237.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors131140.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors131140.cpp index 4188d6e8..29d00cd1 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors131140.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors131140.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors131140 : public InstanceContentScript +class ThePalaceoftheDeadFloors131140 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors131140() : InstanceContentScript( 60014 ) - { } + ThePalaceoftheDeadFloors131140() : + InstanceContentScript( 60014 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6535683, 4, { -300.000000f, -0.000205f, -237.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6535683, 4, { -300.000000f, -0.000205f, -237.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors141150.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors141150.cpp index 5c3523d5..3607b3ff 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors141150.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors141150.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors141150 : public InstanceContentScript +class ThePalaceoftheDeadFloors141150 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors141150() : InstanceContentScript( 60015 ) - { } + ThePalaceoftheDeadFloors141150() : + InstanceContentScript( 60015 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6535683, 4, { -300.000000f, -0.000205f, -237.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6535683, 4, { -300.000000f, -0.000205f, -237.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors151160.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors151160.cpp index 802de0e8..cbf9ef60 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors151160.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors151160.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors151160 : public InstanceContentScript +class ThePalaceoftheDeadFloors151160 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors151160() : InstanceContentScript( 60016 ) - { } + ThePalaceoftheDeadFloors151160() : + InstanceContentScript( 60016 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, 1.000000f, -0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, + 1.000000f, -0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors161170.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors161170.cpp index 4b892ff3..521c63e0 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors161170.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors161170.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors161170 : public InstanceContentScript +class ThePalaceoftheDeadFloors161170 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors161170() : InstanceContentScript( 60017 ) - { } + ThePalaceoftheDeadFloors161170() : + InstanceContentScript( 60017 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, 1.000000f, -0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, + 1.000000f, -0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors171180.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors171180.cpp index 38adbaca..b0a9337c 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors171180.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors171180.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors171180 : public InstanceContentScript +class ThePalaceoftheDeadFloors171180 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors171180() : InstanceContentScript( 60018 ) - { } + ThePalaceoftheDeadFloors171180() : + InstanceContentScript( 60018 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, 1.000000f, -0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, + 1.000000f, -0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors181190.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors181190.cpp index dedc42fc..86e16dd9 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors181190.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors181190.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors181190 : public InstanceContentScript +class ThePalaceoftheDeadFloors181190 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors181190() : InstanceContentScript( 60019 ) - { } + ThePalaceoftheDeadFloors181190() : + InstanceContentScript( 60019 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, 1.000000f, -0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, + 1.000000f, -0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors191200.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors191200.cpp index df4d3f25..b4e8f66e 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors191200.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors191200.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors191200 : public InstanceContentScript +class ThePalaceoftheDeadFloors191200 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors191200() : InstanceContentScript( 60020 ) - { } + ThePalaceoftheDeadFloors191200() : + InstanceContentScript( 60020 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, 1.000000f, -0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6534547, 4, { -301.179504f, 0.130118f, -301.014709f }, + 1.000000f, -0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors2130.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors2130.cpp index f529b0a7..c91696de 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors2130.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors2130.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors2130 : public InstanceContentScript +class ThePalaceoftheDeadFloors2130 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors2130() : InstanceContentScript( 60003 ) - { } + ThePalaceoftheDeadFloors2130() : + InstanceContentScript( 60003 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2002872, 6387948, 4, { -300.000000f, -0.116918f, -237.513199f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2002872, 6387948, 4, { -300.000000f, -0.116918f, -237.513199f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors3140.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors3140.cpp index 9566958d..493f2f3f 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors3140.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors3140.cpp @@ -1,36 +1,47 @@ #include #include -class ThePalaceoftheDeadFloors3140 : public InstanceContentScript +class ThePalaceoftheDeadFloors3140 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors3140() : InstanceContentScript( 60004 ) - { } + ThePalaceoftheDeadFloors3140() : + InstanceContentScript( 60004 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6367892, 4, { -300.000000f, 0.000000f, -225.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - instance->registerEObj( "sgvf_w_lvd_b0959_1", 2002872, 6392196, 4, { 300.000000f, 0.000000f, 374.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - instance->registerEObj( "unknown_0", 2007351, 6277715, 4, { 300.036102f, 0.000000f, 373.916687f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007352, 6394671, 4, { 307.159912f, 0.000000f, 370.556702f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007353, 6394677, 4, { 305.303894f, 0.000000f, 380.231415f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007354, 6394673, 4, { 296.024109f, -0.000000f, 381.100189f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007355, 6394675, 4, { 291.561890f, 0.000000f, 372.412689f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2007356, 6394674, 4, { 298.511902f, 0.000000f, 366.134003f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6367892, 4, { -300.000000f, 0.000000f, -225.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + instance->registerEObj( "sgvf_w_lvd_b0959_1", 2002872, 6392196, 4, { 300.000000f, 0.000000f, 374.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + instance->registerEObj( "unknown_0", 2007351, 6277715, 4, { 300.036102f, 0.000000f, 373.916687f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2007352, 6394671, 4, { 307.159912f, 0.000000f, 370.556702f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2007353, 6394677, 4, { 305.303894f, 0.000000f, 380.231415f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2007354, 6394673, 4, { 296.024109f, -0.000000f, 381.100189f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2007355, 6394675, 4, { 291.561890f, 0.000000f, 372.412689f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2007356, 6394674, 4, { 298.511902f, 0.000000f, 366.134003f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors4150.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors4150.cpp index 67e35bca..c89b2c1b 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors4150.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors4150.cpp @@ -1,36 +1,47 @@ #include #include -class ThePalaceoftheDeadFloors4150 : public InstanceContentScript +class ThePalaceoftheDeadFloors4150 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors4150() : InstanceContentScript( 60005 ) - { } + ThePalaceoftheDeadFloors4150() : + InstanceContentScript( 60005 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6367892, 4, { -300.000000f, 0.000000f, -225.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - instance->registerEObj( "sgvf_w_lvd_b0959_1", 2002872, 6392196, 4, { 300.000000f, 0.000000f, 374.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - instance->registerEObj( "unknown_0", 2007351, 6277715, 4, { 300.036102f, 0.000000f, 373.916687f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007352, 6394671, 4, { 307.159912f, 0.000000f, 370.556702f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007353, 6394677, 4, { 305.303894f, 0.000000f, 380.231415f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007354, 6394673, 4, { 296.024109f, -0.000000f, 381.100189f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007355, 6394675, 4, { 291.561890f, 0.000000f, 372.412689f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2007356, 6394674, 4, { 298.511902f, 0.000000f, 366.134003f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6367892, 4, { -300.000000f, 0.000000f, -225.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + instance->registerEObj( "sgvf_w_lvd_b0959_1", 2002872, 6392196, 4, { 300.000000f, 0.000000f, 374.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + instance->registerEObj( "unknown_0", 2007351, 6277715, 4, { 300.036102f, 0.000000f, 373.916687f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2007352, 6394671, 4, { 307.159912f, 0.000000f, 370.556702f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2007353, 6394677, 4, { 305.303894f, 0.000000f, 380.231415f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2007354, 6394673, 4, { 296.024109f, -0.000000f, 381.100189f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2007355, 6394675, 4, { 291.561890f, 0.000000f, 372.412689f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2007356, 6394674, 4, { 298.511902f, 0.000000f, 366.134003f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors5160.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors5160.cpp index 108b616e..77d1f9d4 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors5160.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors5160.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors5160 : public InstanceContentScript +class ThePalaceoftheDeadFloors5160 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors5160() : InstanceContentScript( 60006 ) - { } + ThePalaceoftheDeadFloors5160() : + InstanceContentScript( 60006 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6521120, 4, { -300.000000f, 3.189805f, -241.061096f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6521120, 4, { -300.000000f, 3.189805f, -241.061096f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors6170.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors6170.cpp index e97c0a35..d3dec50e 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors6170.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors6170.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors6170 : public InstanceContentScript +class ThePalaceoftheDeadFloors6170 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors6170() : InstanceContentScript( 60007 ) - { } + ThePalaceoftheDeadFloors6170() : + InstanceContentScript( 60007 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6521120, 4, { -300.000000f, 3.189805f, -241.061096f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6521120, 4, { -300.000000f, 3.189805f, -241.061096f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors7180.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors7180.cpp index 2cac3524..7642c7d3 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors7180.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors7180.cpp @@ -1,28 +1,32 @@ #include #include -class ThePalaceoftheDeadFloors7180 : public InstanceContentScript +class ThePalaceoftheDeadFloors7180 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors7180() : InstanceContentScript( 60008 ) - { } + ThePalaceoftheDeadFloors7180() : + InstanceContentScript( 60008 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6521120, 4, { -300.000000f, 3.189805f, -241.061096f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6521120, 4, { -300.000000f, 3.189805f, -241.061096f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors8190.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors8190.cpp index 6e883ccf..1f21f2dd 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors8190.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors8190.cpp @@ -1,30 +1,35 @@ #include #include -class ThePalaceoftheDeadFloors8190 : public InstanceContentScript +class ThePalaceoftheDeadFloors8190 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors8190() : InstanceContentScript( 60009 ) - { } + ThePalaceoftheDeadFloors8190() : + InstanceContentScript( 60009 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6527847, 4, { -300.000000f, 0.000026f, -237.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - instance->registerEObj( "sgvf_w_lvd_b0959_1", 2000608, 6544382, 4, { 301.149902f, -0.045413f, 285.247589f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6527847, 4, { -300.000000f, 0.000026f, -237.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + instance->registerEObj( "sgvf_w_lvd_b0959_1", 2000608, 6544382, 4, { 301.149902f, -0.045413f, 285.247589f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors91100.cpp b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors91100.cpp index 28f672d8..86aa9594 100644 --- a/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors91100.cpp +++ b/src/servers/Scripts/instances/deepdungeon/ThePalaceoftheDeadFloors91100.cpp @@ -1,30 +1,35 @@ #include #include -class ThePalaceoftheDeadFloors91100 : public InstanceContentScript +class ThePalaceoftheDeadFloors91100 : + public InstanceContentScript { public: - ThePalaceoftheDeadFloors91100() : InstanceContentScript( 60010 ) - { } + ThePalaceoftheDeadFloors91100() : + InstanceContentScript( 60010 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6527847, 4, { -300.000000f, 0.000026f, -237.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - instance->registerEObj( "sgvf_w_lvd_b0959_1", 2000608, 6544382, 4, { 301.149902f, -0.045413f, 285.247589f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0959", 2000608, 6527847, 4, { -300.000000f, 0.000026f, -237.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off + instance->registerEObj( "sgvf_w_lvd_b0959_1", 2000608, 6544382, 4, { 301.149902f, -0.045413f, 285.247589f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_on2off vf_bextwall_off - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/AlaMhigo.cpp b/src/servers/Scripts/instances/dungeons/AlaMhigo.cpp index e4350243..89237978 100644 --- a/src/servers/Scripts/instances/dungeons/AlaMhigo.cpp +++ b/src/servers/Scripts/instances/dungeons/AlaMhigo.cpp @@ -1,26 +1,29 @@ #include #include -class AlaMhigo : public InstanceContentScript +class AlaMhigo : + public InstanceContentScript { public: - AlaMhigo() : InstanceContentScript( 56 ) - { } + AlaMhigo() : + InstanceContentScript( 56 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/AmdaporKeep.cpp b/src/servers/Scripts/instances/dungeons/AmdaporKeep.cpp index f0934771..527291ac 100644 --- a/src/servers/Scripts/instances/dungeons/AmdaporKeep.cpp +++ b/src/servers/Scripts/instances/dungeons/AmdaporKeep.cpp @@ -1,149 +1,231 @@ #include #include -class AmdaporKeep : public InstanceContentScript +class AmdaporKeep : + public InstanceContentScript { public: - AmdaporKeep() : InstanceContentScript( 14 ) - { } + AmdaporKeep() : + InstanceContentScript( 14 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_f1d3_a1_gar2", 2000551, 4277027, 4, { -3.577190f, 48.000000f, -12.625050f }, 1.000000f, 0.000000f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_1", 2000552, 4277005, 4, { 21.455280f, 48.000011f, -12.604770f }, 1.000000f, 0.000000f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_2", 2000553, 4277029, 4, { -3.963791f, 48.000000f, 9.699657f }, 1.000000f, 0.000000f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_3", 2000554, 4277028, 4, { 21.081841f, 47.999920f, 9.731779f }, 1.000000f, 0.000000f ); - // States -> on off vfx_on - instance->registerEObj( "Entrance", 2000491, 4246565, 5, { -254.388702f, -8.857766f, -0.323940f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_0", 2000492, 0, 4, { -266.179810f, -9.200000f, -0.162207f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000493, 4246574, 4, { -12.466670f, 48.285069f, -0.015320f }, 0.991760f, 0.000048f ); - // States -> vf_htras1_on vf_htras1_of - instance->registerEObj( "sgvf_w_lvd_b0094", 2000494, 4246576, 4, { -81.527344f, 0.000003f, -1.602537f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118", 2000495, 4246594, 4, { -81.412201f, 0.000003f, 0.186550f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2000496, 4246595, 4, { 199.816895f, 21.957701f, -104.781303f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2000497, 4246596, 4, { 200.915497f, 21.957701f, -104.598198f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0249", 2000498, 4246617, 4, { 34.775269f, 48.081181f, 0.381470f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0250", 2000499, 4246618, 4, { 34.775269f, 48.081181f, -0.839294f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -246.833496f, -8.499996f, 4.016408f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Aetherialflow", 2000500, 4247835, 4, { -10.236110f, -0.000000f, -0.015320f }, 0.991760f, 0.000048f ); - instance->registerEObj( "PresenceChamberdoor", 2000502, 4308888, 4, { 60.483269f, 48.174511f, -0.015320f }, 0.991760f, 0.000048f ); - instance->registerEObj( "BloodyTranseptdoor", 2000687, 4308274, 4, { 199.985397f, 22.200001f, -103.389503f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_f1d1_b0008", 2002741, 4388278, 4, { -82.462273f, 0.000002f, 0.045686f }, 1.000000f, 0.000000f ); - // States -> vf_baria1_off vf_baria_on - instance->registerEObj( "sgbg_f1d3_a1_gar1", 2000509, 4271520, 4, { 134.111496f, 22.079769f, -5.935791f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_1", 2000510, 4271522, 4, { 142.229202f, 22.079769f, -6.088379f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_2", 2000511, 4271529, 4, { 158.129196f, 22.079769f, -6.088379f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_3", 2000512, 4271531, 4, { 133.958893f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_4", 2000513, 4271532, 4, { 142.015594f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_5", 2000514, 4271533, 4, { 158.190201f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_6", 2000521, 4274657, 4, { 193.987900f, 22.110291f, 42.099609f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_7", 2000522, 4274656, 4, { 193.804794f, 22.079769f, 57.938480f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_8", 2000523, 4274655, 4, { 193.804794f, 22.079769f, 65.964722f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_9", 2000524, 4274661, 4, { 206.317093f, 22.079769f, 42.038570f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_10", 2000525, 4274660, 4, { 206.286697f, 22.079769f, 57.968990f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_11", 2000526, 4274659, 4, { 206.286697f, 22.079769f, 65.995239f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_12", 2000533, 4274648, 4, { 241.992798f, 22.079769f, -6.332520f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_13", 2000534, 4274649, 4, { 258.075806f, 22.079769f, -6.332520f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_14", 2000535, 4274650, 4, { 265.949493f, 22.079769f, -6.271484f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_15", 2000536, 4274651, 4, { 241.931793f, 22.079769f, 6.240906f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_16", 2000537, 4274652, 4, { 258.075806f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_17", 2000538, 4274653, 4, { 266.071503f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_18", 2000545, 4274662, 4, { 193.804794f, 22.079769f, -34.042912f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_19", 2000546, 4274667, 4, { 193.804794f, 22.079769f, -42.008121f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_20", 2000547, 4274666, 4, { 193.804794f, 22.079769f, -58.335270f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_21", 2000548, 4274663, 4, { 206.317093f, 22.079769f, -33.890320f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_22", 2000549, 4274665, 4, { 206.317093f, 22.079769f, -41.916561f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_23", 2000550, 4274664, 4, { 206.317093f, 22.079769f, -58.274231f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar2_4", 2000503, 4274671, 4, { 134.111496f, 22.079769f, -5.935791f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_5", 2000504, 4274672, 4, { 142.229202f, 22.079769f, -6.088379f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_6", 2000505, 4274673, 4, { 158.129196f, 22.079769f, -6.088379f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_7", 2000506, 4274674, 4, { 133.958893f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_8", 2000507, 4274675, 4, { 142.015594f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_9", 2000508, 4274676, 4, { 158.190201f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_10", 2000515, 4274685, 4, { 193.987900f, 22.110291f, 42.099609f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_11", 2000516, 4274684, 4, { 193.804794f, 22.079769f, 57.938480f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_12", 2000517, 4274683, 4, { 193.804794f, 22.079769f, 65.964722f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_13", 2000518, 4274688, 4, { 206.317093f, 22.079769f, 42.038570f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_14", 2000519, 4274687, 4, { 206.317093f, 22.079769f, 57.968990f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_15", 2000520, 4274686, 4, { 206.317093f, 22.079769f, 65.995239f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_16", 2000527, 4274677, 4, { 241.992798f, 22.079769f, -6.332520f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_17", 2000528, 4274678, 4, { 258.075806f, 22.079769f, -6.332520f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_18", 2000529, 4274679, 4, { 265.949493f, 22.079769f, -6.271484f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_19", 2000530, 4274680, 4, { 241.931793f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_20", 2000531, 4274681, 4, { 258.075806f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_21", 2000532, 4274682, 4, { 266.071503f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_22", 2000539, 4274689, 4, { 193.804794f, 22.079769f, -34.042912f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_23", 2000540, 4274694, 4, { 193.804794f, 22.079769f, -42.008121f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_24", 2000541, 4274693, 4, { 193.804794f, 22.079769f, -58.335270f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_25", 2000542, 4274690, 4, { 206.317093f, 22.079769f, -33.890320f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_26", 2000543, 4274692, 4, { 206.317093f, 22.079769f, -41.916561f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_27", 2000544, 4274691, 4, { 206.317093f, 22.079769f, -58.274231f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "Entrance_1", 2000182, 5608623, 5, { -156.520401f, -2.800003f, -5.140180f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5608617, 4, { -154.662003f, -2.800003f, 5.028913f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2002735, 0, 4, { -151.232193f, -2.822998f, 0.289556f }, 1.174927f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2005128, 5608619, 4, { -112.240501f, -2.800003f, -0.701091f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002735, 0, 4, { -46.585720f, 0.045776f, 0.190301f }, 1.179312f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5608620, 4, { -46.476231f, 0.000000f, -0.510445f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Exit_1", 2000139, 0, 4, { -7.766907f, -0.015320f, 0.015198f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_f1d3_bo189", 2000561, 4248559, 4, { 200.121902f, 21.988159f, -114.000000f }, 1.000000f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00", 2000555, 4249099, 4, { 200.000000f, 21.988159f, -151.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Aetherialflow_1", 2000501, 4247838, 4, { 200.061005f, 22.000000f, -165.266006f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_1", 2000556, 4249100, 4, { 200.000000f, 21.988159f, -146.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_2", 2000557, 4249101, 4, { 200.000000f, 21.988159f, -141.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_3", 2000560, 4249104, 4, { 200.000000f, 21.988159f, -126.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_4", 2000602, 4253048, 4, { 200.000000f, 21.988159f, -121.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_5", 2000559, 4249103, 4, { 200.000000f, 21.988159f, -131.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_6", 2000558, 4249102, 4, { 200.000000f, 21.957701f, -136.838501f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_f1d3_a1_gar2", 2000551, 4277027, 4, { -3.577190f, 48.000000f, -12.625050f }, + 1.000000f, 0.000000f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_1", 2000552, 4277005, 4, { 21.455280f, 48.000011f, -12.604770f }, + 1.000000f, 0.000000f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_2", 2000553, 4277029, 4, { -3.963791f, 48.000000f, 9.699657f }, + 1.000000f, 0.000000f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_3", 2000554, 4277028, 4, { 21.081841f, 47.999920f, 9.731779f }, + 1.000000f, 0.000000f ); + // States -> on off vfx_on + instance->registerEObj( "Entrance", 2000491, 4246565, 5, { -254.388702f, -8.857766f, -0.323940f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_0", 2000492, 0, 4, { -266.179810f, -9.200000f, -0.162207f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000493, 4246574, 4, { -12.466670f, 48.285069f, -0.015320f }, 0.991760f, + 0.000048f ); + // States -> vf_htras1_on vf_htras1_of + instance->registerEObj( "sgvf_w_lvd_b0094", 2000494, 4246576, 4, { -81.527344f, 0.000003f, -1.602537f }, 1.000000f, + 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118", 2000495, 4246594, 4, { -81.412201f, 0.000003f, 0.186550f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2000496, 4246595, 4, { 199.816895f, 21.957701f, -104.781303f }, + 0.991760f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2000497, 4246596, 4, { 200.915497f, 21.957701f, -104.598198f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0249", 2000498, 4246617, 4, { 34.775269f, 48.081181f, 0.381470f }, 0.991760f, + 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0250", 2000499, 4246618, 4, { 34.775269f, 48.081181f, -0.839294f }, 0.991760f, + 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -246.833496f, -8.499996f, 4.016408f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Aetherialflow", 2000500, 4247835, 4, { -10.236110f, -0.000000f, -0.015320f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "PresenceChamberdoor", 2000502, 4308888, 4, { 60.483269f, 48.174511f, -0.015320f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "BloodyTranseptdoor", 2000687, 4308274, 4, { 199.985397f, 22.200001f, -103.389503f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_f1d1_b0008", 2002741, 4388278, 4, { -82.462273f, 0.000002f, 0.045686f }, 1.000000f, + 0.000000f ); + // States -> vf_baria1_off vf_baria_on + instance->registerEObj( "sgbg_f1d3_a1_gar1", 2000509, 4271520, 4, { 134.111496f, 22.079769f, -5.935791f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_1", 2000510, 4271522, 4, { 142.229202f, 22.079769f, -6.088379f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_2", 2000511, 4271529, 4, { 158.129196f, 22.079769f, -6.088379f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_3", 2000512, 4271531, 4, { 133.958893f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_4", 2000513, 4271532, 4, { 142.015594f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_5", 2000514, 4271533, 4, { 158.190201f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_6", 2000521, 4274657, 4, { 193.987900f, 22.110291f, 42.099609f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_7", 2000522, 4274656, 4, { 193.804794f, 22.079769f, 57.938480f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_8", 2000523, 4274655, 4, { 193.804794f, 22.079769f, 65.964722f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_9", 2000524, 4274661, 4, { 206.317093f, 22.079769f, 42.038570f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_10", 2000525, 4274660, 4, { 206.286697f, 22.079769f, 57.968990f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_11", 2000526, 4274659, 4, { 206.286697f, 22.079769f, 65.995239f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_12", 2000533, 4274648, 4, { 241.992798f, 22.079769f, -6.332520f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_13", 2000534, 4274649, 4, { 258.075806f, 22.079769f, -6.332520f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_14", 2000535, 4274650, 4, { 265.949493f, 22.079769f, -6.271484f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_15", 2000536, 4274651, 4, { 241.931793f, 22.079769f, 6.240906f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_16", 2000537, 4274652, 4, { 258.075806f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_17", 2000538, 4274653, 4, { 266.071503f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_18", 2000545, 4274662, 4, { 193.804794f, 22.079769f, -34.042912f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_19", 2000546, 4274667, 4, { 193.804794f, 22.079769f, -42.008121f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_20", 2000547, 4274666, 4, { 193.804794f, 22.079769f, -58.335270f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_21", 2000548, 4274663, 4, { 206.317093f, 22.079769f, -33.890320f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_22", 2000549, 4274665, 4, { 206.317093f, 22.079769f, -41.916561f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_23", 2000550, 4274664, 4, { 206.317093f, 22.079769f, -58.274231f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar2_4", 2000503, 4274671, 4, { 134.111496f, 22.079769f, -5.935791f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_5", 2000504, 4274672, 4, { 142.229202f, 22.079769f, -6.088379f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_6", 2000505, 4274673, 4, { 158.129196f, 22.079769f, -6.088379f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_7", 2000506, 4274674, 4, { 133.958893f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_8", 2000507, 4274675, 4, { 142.015594f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_9", 2000508, 4274676, 4, { 158.190201f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_10", 2000515, 4274685, 4, { 193.987900f, 22.110291f, 42.099609f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_11", 2000516, 4274684, 4, { 193.804794f, 22.079769f, 57.938480f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_12", 2000517, 4274683, 4, { 193.804794f, 22.079769f, 65.964722f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_13", 2000518, 4274688, 4, { 206.317093f, 22.079769f, 42.038570f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_14", 2000519, 4274687, 4, { 206.317093f, 22.079769f, 57.968990f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_15", 2000520, 4274686, 4, { 206.317093f, 22.079769f, 65.995239f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_16", 2000527, 4274677, 4, { 241.992798f, 22.079769f, -6.332520f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_17", 2000528, 4274678, 4, { 258.075806f, 22.079769f, -6.332520f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_18", 2000529, 4274679, 4, { 265.949493f, 22.079769f, -6.271484f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_19", 2000530, 4274680, 4, { 241.931793f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_20", 2000531, 4274681, 4, { 258.075806f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_21", 2000532, 4274682, 4, { 266.071503f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_22", 2000539, 4274689, 4, { 193.804794f, 22.079769f, -34.042912f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_23", 2000540, 4274694, 4, { 193.804794f, 22.079769f, -42.008121f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_24", 2000541, 4274693, 4, { 193.804794f, 22.079769f, -58.335270f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_25", 2000542, 4274690, 4, { 206.317093f, 22.079769f, -33.890320f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_26", 2000543, 4274692, 4, { 206.317093f, 22.079769f, -41.916561f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_27", 2000544, 4274691, 4, { 206.317093f, 22.079769f, -58.274231f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "Entrance_1", 2000182, 5608623, 5, { -156.520401f, -2.800003f, -5.140180f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5608617, 4, { -154.662003f, -2.800003f, 5.028913f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2002735, 0, 4, { -151.232193f, -2.822998f, 0.289556f }, 1.174927f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2005128, 5608619, 4, { -112.240501f, -2.800003f, -0.701091f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002735, 0, 4, { -46.585720f, 0.045776f, 0.190301f }, 1.179312f, -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5608620, 4, { -46.476231f, 0.000000f, -0.510445f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Exit_1", 2000139, 0, 4, { -7.766907f, -0.015320f, 0.015198f }, 0.991760f, 0.000048f ); + instance->registerEObj( "sgvf_f1d3_bo189", 2000561, 4248559, 4, { 200.121902f, 21.988159f, -114.000000f }, + 1.000000f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00", 2000555, 4249099, 4, { 200.000000f, 21.988159f, -151.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Aetherialflow_1", 2000501, 4247838, 4, { 200.061005f, 22.000000f, -165.266006f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_1", 2000556, 4249100, 4, { 200.000000f, 21.988159f, -146.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_2", 2000557, 4249101, 4, { 200.000000f, 21.988159f, -141.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_3", 2000560, 4249104, 4, { 200.000000f, 21.988159f, -126.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_4", 2000602, 4253048, 4, { 200.000000f, 21.988159f, -121.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_5", 2000559, 4249103, 4, { 200.000000f, 21.988159f, -131.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_6", 2000558, 4249102, 4, { 200.000000f, 21.957701f, -136.838501f }, + 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/AmdaporKeepHard.cpp b/src/servers/Scripts/instances/dungeons/AmdaporKeepHard.cpp index 512146c4..27cf8230 100644 --- a/src/servers/Scripts/instances/dungeons/AmdaporKeepHard.cpp +++ b/src/servers/Scripts/instances/dungeons/AmdaporKeepHard.cpp @@ -1,66 +1,95 @@ #include #include -class AmdaporKeepHard : public InstanceContentScript +class AmdaporKeepHard : + public InstanceContentScript { public: - AmdaporKeepHard() : InstanceContentScript( 29 ) - { } + AmdaporKeepHard() : + InstanceContentScript( 29 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 5040923, 4, { 203.452301f, 0.116688f, 208.657593f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_0", 2002735, 0, 4, { 199.471802f, 0.116693f, 210.128204f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_f1d7_a4_scy01", 2005153, 5619221, 4, { 198.706802f, -20.000010f, 229.113907f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2004696, 5009720, 4, { -200.316895f, -4.301562f, -43.621670f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2004697, 5009721, 4, { -47.771290f, -0.000000f, -71.658272f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_f1d7_a1_evl01", 2004698, 5031991, 4, { -125.087196f, -2.000000f, 28.417601f }, 1.000000f, -0.000000f ); - // States -> evils_def evils_off_anim evils_on evils_on_anim - instance->registerEObj( "sgvf_f1d7_b0574", 2004699, 5031992, 4, { -104.790604f, -2.000000f, 47.174728f }, 1.000000f, 0.000000f ); - // States -> vf_baria1_off vf_baria_on - instance->registerEObj( "unknown_3", 2004700, 0, 4, { 2.343430f, 48.179089f, -2.083742f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2004702, 5009732, 4, { 125.604897f, 43.999989f, 3.999085f }, 1.000000f, 0.005971f ); - instance->registerEObj( "unknown_5", 2004701, 0, 4, { 149.666000f, 44.200001f, -0.006115f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2004703, 5010816, 4, { 196.927399f, 44.000019f, -101.381798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_f1d7_a1_evl01_1", 2004704, 5032163, 4, { 199.696106f, 44.000000f, -181.197006f }, 1.000000f, 0.000000f ); - // States -> evils_def evils_off_anim evils_on evils_on_anim - instance->registerEObj( "Aetherialflow", 2004705, 5032164, 4, { 199.682800f, 44.163898f, -180.392395f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Fellorb", 2004706, 5009746, 4, { 200.094101f, -0.000008f, 0.050249f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Aetherialflow_1", 2004707, 5033533, 4, { 199.899506f, 0.000000f, -3.297300f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_7", 2004768, 5033548, 4, { 210.649307f, 0.116687f, -6.120441f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2004769, 5033549, 4, { 189.489807f, 0.116688f, -6.804901f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2004770, 5033551, 4, { 204.506500f, 0.116687f, 9.902725f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2004708, 5034801, 4, { -119.510101f, -2.400002f, 18.885540f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 5034800, 4, { -130.314606f, -2.400000f, -18.221069f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_10", 2002735, 0, 4, { -125.041801f, -1.964380f, -20.543480f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1d7_a1_gar0", 2004996, 5390927, 4, { -112.845497f, -2.400000f, 12.122500f }, 1.000000f, 0.785314f ); - instance->registerEObj( "sgpl_f1d7_a1_gar0_1", 2004997, 5390928, 4, { -112.845497f, -2.400000f, -12.378100f }, 1.000000f, 0.785457f ); - instance->registerEObj( "sgpl_f1d7_a1_gar0_2", 2004998, 5390929, 4, { -137.250000f, -2.400000f, 12.122500f }, 1.000000f, -0.785410f ); - instance->registerEObj( "sgpl_f1d7_a1_gar0_3", 2004999, 5390930, 4, { -137.396194f, -2.400000f, -12.366500f }, 1.000000f, -0.785398f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2004782, 5038257, 4, { 198.459198f, 43.991699f, -172.369705f }, 1.000000f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 5038255, 4, { 197.802597f, 43.991699f, -125.932701f }, 1.000000f, -0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_11", 2002735, 0, 4, { 199.511703f, 44.022221f, -130.601303f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Entrance", 2000182, 5018466, 5, { -255.724792f, -9.199999f, -5.249732f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -252.173401f, -9.199999f, 5.737248f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 200.798599f, -0.000008f, 240.880905f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 5040923, 4, { 203.452301f, 0.116688f, 208.657593f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_0", 2002735, 0, 4, { 199.471802f, 0.116693f, 210.128204f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_f1d7_a4_scy01", 2005153, 5619221, 4, { 198.706802f, -20.000010f, 229.113907f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2004696, 5009720, 4, { -200.316895f, -4.301562f, -43.621670f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2004697, 5009721, 4, { -47.771290f, -0.000000f, -71.658272f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_f1d7_a1_evl01", 2004698, 5031991, 4, { -125.087196f, -2.000000f, 28.417601f }, + 1.000000f, -0.000000f ); + // States -> evils_def evils_off_anim evils_on evils_on_anim + instance->registerEObj( "sgvf_f1d7_b0574", 2004699, 5031992, 4, { -104.790604f, -2.000000f, 47.174728f }, 1.000000f, + 0.000000f ); + // States -> vf_baria1_off vf_baria_on + instance->registerEObj( "unknown_3", 2004700, 0, 4, { 2.343430f, 48.179089f, -2.083742f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2004702, 5009732, 4, { 125.604897f, 43.999989f, 3.999085f }, 1.000000f, + 0.005971f ); + instance->registerEObj( "unknown_5", 2004701, 0, 4, { 149.666000f, 44.200001f, -0.006115f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_6", 2004703, 5010816, 4, { 196.927399f, 44.000019f, -101.381798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_f1d7_a1_evl01_1", 2004704, 5032163, 4, { 199.696106f, 44.000000f, -181.197006f }, + 1.000000f, 0.000000f ); + // States -> evils_def evils_off_anim evils_on evils_on_anim + instance->registerEObj( "Aetherialflow", 2004705, 5032164, 4, { 199.682800f, 44.163898f, -180.392395f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Fellorb", 2004706, 5009746, 4, { 200.094101f, -0.000008f, 0.050249f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Aetherialflow_1", 2004707, 5033533, 4, { 199.899506f, 0.000000f, -3.297300f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_7", 2004768, 5033548, 4, { 210.649307f, 0.116687f, -6.120441f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2004769, 5033549, 4, { 189.489807f, 0.116688f, -6.804901f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2004770, 5033551, 4, { 204.506500f, 0.116687f, 9.902725f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2004708, 5034801, 4, { -119.510101f, -2.400002f, 18.885540f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 5034800, 4, { -130.314606f, -2.400000f, -18.221069f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_10", 2002735, 0, 4, { -125.041801f, -1.964380f, -20.543480f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_f1d7_a1_gar0", 2004996, 5390927, 4, { -112.845497f, -2.400000f, 12.122500f }, + 1.000000f, 0.785314f ); + instance->registerEObj( "sgpl_f1d7_a1_gar0_1", 2004997, 5390928, 4, { -112.845497f, -2.400000f, -12.378100f }, + 1.000000f, 0.785457f ); + instance->registerEObj( "sgpl_f1d7_a1_gar0_2", 2004998, 5390929, 4, { -137.250000f, -2.400000f, 12.122500f }, + 1.000000f, -0.785410f ); + instance->registerEObj( "sgpl_f1d7_a1_gar0_3", 2004999, 5390930, 4, { -137.396194f, -2.400000f, -12.366500f }, + 1.000000f, -0.785398f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2004782, 5038257, 4, { 198.459198f, 43.991699f, -172.369705f }, + 1.000000f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 5038255, 4, { 197.802597f, 43.991699f, -125.932701f }, + 1.000000f, -0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_11", 2002735, 0, 4, { 199.511703f, 44.022221f, -130.601303f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Entrance", 2000182, 5018466, 5, { -255.724792f, -9.199999f, -5.249732f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -252.173401f, -9.199999f, 5.737248f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 200.798599f, -0.000008f, 240.880905f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/BaelsarsWall.cpp b/src/servers/Scripts/instances/dungeons/BaelsarsWall.cpp index ec9e761e..29aeaebb 100644 --- a/src/servers/Scripts/instances/dungeons/BaelsarsWall.cpp +++ b/src/servers/Scripts/instances/dungeons/BaelsarsWall.cpp @@ -1,58 +1,85 @@ #include #include -class BaelsarsWall : public InstanceContentScript +class BaelsarsWall : + public InstanceContentScript { public: - BaelsarsWall() : InstanceContentScript( 48 ) - { } + BaelsarsWall() : + InstanceContentScript( 48 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -173.966797f, 3.049999f, 52.443710f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6588628, 4, { -173.612198f, 3.049997f, 52.688000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 6588629, 4, { -154.029907f, 3.049906f, 72.262756f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2002735, 0, 4, { 95.577843f, -300.028412f, 0.707827f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6588652, 4, { 95.163948f, -300.028198f, 0.952097f }, 1.000000f, -1.570451f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 6588653, 4, { 135.748398f, -300.000092f, 0.172490f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 6588667, 4, { 371.527588f, 212.000000f, 391.566010f }, 1.000000f, -0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002735, 0, 4, { 371.795685f, 212.000000f, 391.643097f }, 1.000000f, -1.570451f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -230.764297f, -0.932137f, -173.143600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 352.071411f, 212.000000f, 391.988892f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 6562675, 5, { -228.044006f, -0.901261f, -183.153198f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Imperialidentificationkey", 2007567, 0, 4, { -202.837997f, -0.966086f, -62.488140f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Securityterminal", 2007571, 6640773, 4, { -206.023102f, 2.815013f, -48.897739f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007575, 6501039, 4, { -203.861694f, 1.804717f, -49.827511f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Imperialidentificationkey_1", 2007568, 0, 4, { -176.569397f, 2.150000f, 17.400681f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Securityterminal_1", 2007572, 6516973, 4, { -187.083206f, 2.707914f, 19.031469f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007576, 6502290, 4, { -174.854904f, 2.100000f, 23.458460f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2007776, 6500492, 4, { -126.770897f, 2.000089f, 72.952606f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Controlpanel", 2007580, 0, 4, { -0.003809f, -299.760315f, 0.024599f }, 2.000000f, 0.000048f ); - instance->registerEObj( "Controlpanel_1", 2007581, 0, 4, { 177.511993f, -298.963196f, 4.224624f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Controlpanel_2", 2007582, 6523203, 4, { 177.434006f, -298.072601f, 6.243333f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2007601, 6516974, 4, { 176.321396f, -299.105713f, 0.250570f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Imperialidentificationkey_2", 2007569, 0, 4, { 317.032288f, 169.000107f, 230.153503f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Securityterminal_2", 2007573, 6488516, 4, { 320.921600f, 169.867996f, 243.976807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2007577, 6488509, 4, { 328.225189f, 169.000107f, 244.581894f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2007578, 6777152, 4, { 382.790100f, 203.000000f, 357.169403f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -173.966797f, 3.049999f, 52.443710f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6588628, 4, { -173.612198f, 3.049997f, 52.688000f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 6588629, 4, { -154.029907f, 3.049906f, 72.262756f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2002735, 0, 4, { 95.577843f, -300.028412f, 0.707827f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6588652, 4, { 95.163948f, -300.028198f, 0.952097f }, + 1.000000f, -1.570451f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 6588653, 4, { 135.748398f, -300.000092f, 0.172490f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 6588667, 4, { 371.527588f, 212.000000f, 391.566010f }, + 1.000000f, -0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002735, 0, 4, { 371.795685f, 212.000000f, 391.643097f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -230.764297f, -0.932137f, -173.143600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 352.071411f, 212.000000f, 391.988892f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 6562675, 5, { -228.044006f, -0.901261f, -183.153198f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Imperialidentificationkey", 2007567, 0, 4, { -202.837997f, -0.966086f, -62.488140f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Securityterminal", 2007571, 6640773, 4, { -206.023102f, 2.815013f, -48.897739f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007575, 6501039, 4, { -203.861694f, 1.804717f, -49.827511f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Imperialidentificationkey_1", 2007568, 0, 4, { -176.569397f, 2.150000f, 17.400681f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Securityterminal_1", 2007572, 6516973, 4, { -187.083206f, 2.707914f, 19.031469f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007576, 6502290, 4, { -174.854904f, 2.100000f, 23.458460f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2007776, 6500492, 4, { -126.770897f, 2.000089f, 72.952606f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Controlpanel", 2007580, 0, 4, { -0.003809f, -299.760315f, 0.024599f }, 2.000000f, + 0.000048f ); + instance->registerEObj( "Controlpanel_1", 2007581, 0, 4, { 177.511993f, -298.963196f, 4.224624f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Controlpanel_2", 2007582, 6523203, 4, { 177.434006f, -298.072601f, 6.243333f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2007601, 6516974, 4, { 176.321396f, -299.105713f, 0.250570f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Imperialidentificationkey_2", 2007569, 0, 4, { 317.032288f, 169.000107f, 230.153503f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Securityterminal_2", 2007573, 6488516, 4, { 320.921600f, 169.867996f, 243.976807f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_7", 2007577, 6488509, 4, { 328.225189f, 169.000107f, 244.581894f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2007578, 6777152, 4, { 382.790100f, 203.000000f, 357.169403f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/BardamsMettle.cpp b/src/servers/Scripts/instances/dungeons/BardamsMettle.cpp index 2ca73d36..d05ad9e1 100644 --- a/src/servers/Scripts/instances/dungeons/BardamsMettle.cpp +++ b/src/servers/Scripts/instances/dungeons/BardamsMettle.cpp @@ -1,26 +1,29 @@ #include #include -class BardamsMettle : public InstanceContentScript +class BardamsMettle : + public InstanceContentScript { public: - BardamsMettle() : InstanceContentScript( 53 ) - { } + BardamsMettle() : + InstanceContentScript( 53 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/BrayfloxsLongstop.cpp b/src/servers/Scripts/instances/dungeons/BrayfloxsLongstop.cpp index 48aeb8b3..70a6b83b 100644 --- a/src/servers/Scripts/instances/dungeons/BrayfloxsLongstop.cpp +++ b/src/servers/Scripts/instances/dungeons/BrayfloxsLongstop.cpp @@ -1,49 +1,65 @@ #include #include -class BrayfloxsLongstop : public InstanceContentScript +class BrayfloxsLongstop : + public InstanceContentScript { public: - BrayfloxsLongstop() : InstanceContentScript( 8 ) - { } + BrayfloxsLongstop() : + InstanceContentScript( 8 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2001694, 0, 4, { -36.384769f, 34.915119f, -234.568405f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2001461, 0, 4, { 142.567200f, -1.266762f, 67.804497f }, 0.991760f, 0.000048f ); - instance->registerEObj( "RunstopHeadgate", 2001462, 3996541, 4, { 105.920601f, 1.745684f, 11.445460f }, 1.000000f, 0.000000f ); - instance->registerEObj( "RunstopGutgate", 2001463, 3970152, 4, { 113.391296f, -0.849704f, -33.166710f }, 1.000000f, 0.000000f ); - instance->registerEObj( "RunstopBackgate", 2001464, 3970154, 4, { -19.424801f, 7.919373f, -71.122383f }, 0.991760f, 0.000048f ); - instance->registerEObj( "LongstopHeadgate", 2001465, 3970153, 4, { -113.634499f, 1.332127f, -58.144779f }, 1.000000f, 0.000000f ); - instance->registerEObj( "LongstopGutgate", 2001466, 3976772, 4, { -89.831360f, 14.042510f, -96.676224f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2001584, 4086949, 4, { 106.822800f, -1.629326f, 2.541263f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2001585, 0, 4, { 110.429604f, -1.663330f, 3.311157f }, 0.991760f, 0.214809f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001586, 4088979, 4, { 8.021301f, 5.921407f, -69.090309f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_3", 2001587, 0, 4, { 6.458210f, 5.902269f, -67.560417f }, 1.000000f, -0.788830f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001588, 4088985, 4, { -106.298798f, -2.123102f, -10.585170f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_4", 2001589, 0, 4, { -105.172897f, -2.123102f, -10.865350f }, 1.000000f, -0.043989f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2001590, 4088991, 4, { -68.039551f, 33.716820f, -232.938904f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_5", 2001591, 0, 4, { -68.693542f, 33.682091f, -234.070496f }, 1.000000f, -1.318638f ); - instance->registerEObj( "Entrance", 2000182, 4097104, 5, { 122.445702f, -1.119082f, 68.403687f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 113.256897f, -1.172536f, 59.115589f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -8.639429f, 35.641689f, -234.813797f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2001694, 0, 4, { -36.384769f, 34.915119f, -234.568405f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2001461, 0, 4, { 142.567200f, -1.266762f, 67.804497f }, 0.991760f, 0.000048f ); + instance->registerEObj( "RunstopHeadgate", 2001462, 3996541, 4, { 105.920601f, 1.745684f, 11.445460f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "RunstopGutgate", 2001463, 3970152, 4, { 113.391296f, -0.849704f, -33.166710f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "RunstopBackgate", 2001464, 3970154, 4, { -19.424801f, 7.919373f, -71.122383f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "LongstopHeadgate", 2001465, 3970153, 4, { -113.634499f, 1.332127f, -58.144779f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "LongstopGutgate", 2001466, 3976772, 4, { -89.831360f, 14.042510f, -96.676224f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2001584, 4086949, 4, { 106.822800f, -1.629326f, 2.541263f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2001585, 0, 4, { 110.429604f, -1.663330f, 3.311157f }, 0.991760f, 0.214809f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001586, 4088979, 4, { 8.021301f, 5.921407f, -69.090309f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_3", 2001587, 0, 4, { 6.458210f, 5.902269f, -67.560417f }, 1.000000f, -0.788830f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001588, 4088985, 4, { -106.298798f, -2.123102f, -10.585170f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_4", 2001589, 0, 4, { -105.172897f, -2.123102f, -10.865350f }, 1.000000f, + -0.043989f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2001590, 4088991, 4, { -68.039551f, 33.716820f, -232.938904f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_5", 2001591, 0, 4, { -68.693542f, 33.682091f, -234.070496f }, 1.000000f, + -1.318638f ); + instance->registerEObj( "Entrance", 2000182, 4097104, 5, { 122.445702f, -1.119082f, 68.403687f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 113.256897f, -1.172536f, 59.115589f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -8.639429f, 35.641689f, -234.813797f }, 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/BrayfloxsLongstopHard.cpp b/src/servers/Scripts/instances/dungeons/BrayfloxsLongstopHard.cpp index 145e0171..2460fec0 100644 --- a/src/servers/Scripts/instances/dungeons/BrayfloxsLongstopHard.cpp +++ b/src/servers/Scripts/instances/dungeons/BrayfloxsLongstopHard.cpp @@ -1,55 +1,76 @@ #include #include -class BrayfloxsLongstopHard : public InstanceContentScript +class BrayfloxsLongstopHard : + public InstanceContentScript { public: - BrayfloxsLongstopHard() : InstanceContentScript( 20 ) - { } + BrayfloxsLongstopHard() : + InstanceContentScript( 20 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2003103, 0, 4, { -16.800230f, 25.375731f, -171.007904f }, 0.991760f, 0.000048f ); - instance->registerEObj( "RunstopHeadgate", 2002182, 4542379, 4, { 105.912804f, 1.724182f, 11.428960f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002183, 4621964, 4, { 111.650299f, 0.228821f, -49.790279f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -75.025421f, -1.210333f, 73.659332f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4543753, 5, { -77.622681f, 0.605630f, 95.628304f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_1", 2002326, 0, 4, { -3.491464f, -0.354560f, -24.718349f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Tinykey", 2002325, 0, 4, { -62.769581f, -0.332854f, 36.199650f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_b0118_wide", 2002872, 4543726, 4, { 111.888000f, -2.109839f, -6.942894f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002735, 0, 4, { 114.658699f, -2.093417f, -6.149437f }, 1.100000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2002109, 4549243, 4, { 92.977211f, 5.002774f, -110.975502f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2002150, 4549448, 4, { 30.497520f, 8.248112f, -82.096916f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2002180, 4549459, 4, { 27.134510f, 7.114878f, -120.719704f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2002181, 4574849, 4, { 45.695850f, 7.015042f, -129.344604f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Stolenwares", 2002262, 4598415, 4, { -28.610241f, 25.192631f, -174.631195f }, 0.991760f, -0.000527f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2002735, 0, 4, { 44.686901f, 7.015000f, -131.547394f }, 0.500000f, -0.532325f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4543729, 4, { 44.232769f, 7.015042f, -129.352997f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "ãƒ–ãƒ¬ã‚¤ãƒ•ãƒ­ã‚¯ã‚¹ã®æŠœé“", 2003429, 0, 4, { 44.358749f, 7.554582f, -132.341095f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -25.894650f, 35.019409f, -222.949600f }, 0.991760f, 0.000048f ); - instance->registerEObj( "SwiftmakeCheckgate", 2002184, 4549240, 4, { -95.264717f, 12.888430f, -122.593300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "SwiftmakeCheckgate_1", 2002665, 4549241, 4, { -100.273201f, 20.310730f, -163.513397f }, 1.000000f, 0.000000f ); - instance->registerEObj( "SwiftmakeCheckgate_2", 2002884, 4572942, 4, { -102.647499f, 21.011600f, -187.365494f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0250", 2002872, 4543735, 4, { -48.175251f, 34.706921f, -234.463196f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_8", 2002735, 0, 4, { -48.271229f, 34.918541f, -235.574203f }, 1.000000f, -1.497719f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2003103, 0, 4, { -16.800230f, 25.375731f, -171.007904f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "RunstopHeadgate", 2002182, 4542379, 4, { 105.912804f, 1.724182f, 11.428960f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002183, 4621964, 4, { 111.650299f, 0.228821f, -49.790279f }, 0.991760f, + 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -75.025421f, -1.210333f, 73.659332f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4543753, 5, { -77.622681f, 0.605630f, 95.628304f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_1", 2002326, 0, 4, { -3.491464f, -0.354560f, -24.718349f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Tinykey", 2002325, 0, 4, { -62.769581f, -0.332854f, 36.199650f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_b0118_wide", 2002872, 4543726, 4, { 111.888000f, -2.109839f, -6.942894f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002735, 0, 4, { 114.658699f, -2.093417f, -6.149437f }, 1.100000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2002109, 4549243, 4, { 92.977211f, 5.002774f, -110.975502f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2002150, 4549448, 4, { 30.497520f, 8.248112f, -82.096916f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2002180, 4549459, 4, { 27.134510f, 7.114878f, -120.719704f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2002181, 4574849, 4, { 45.695850f, 7.015042f, -129.344604f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Stolenwares", 2002262, 4598415, 4, { -28.610241f, 25.192631f, -174.631195f }, 0.991760f, + -0.000527f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2002735, 0, 4, { 44.686901f, 7.015000f, -131.547394f }, 0.500000f, + -0.532325f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4543729, 4, { 44.232769f, 7.015042f, -129.352997f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "ãƒ–ãƒ¬ã‚¤ãƒ•ãƒ­ã‚¯ã‚¹ã®æŠœé“", 2003429, 0, 4, { 44.358749f, 7.554582f, -132.341095f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -25.894650f, 35.019409f, -222.949600f }, 0.991760f, 0.000048f ); + instance->registerEObj( "SwiftmakeCheckgate", 2002184, 4549240, 4, { -95.264717f, 12.888430f, -122.593300f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "SwiftmakeCheckgate_1", 2002665, 4549241, 4, { -100.273201f, 20.310730f, -163.513397f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "SwiftmakeCheckgate_2", 2002884, 4572942, 4, { -102.647499f, 21.011600f, -187.365494f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0250", 2002872, 4543735, 4, { -48.175251f, 34.706921f, -234.463196f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_8", 2002735, 0, 4, { -48.271229f, 34.918541f, -235.574203f }, 1.000000f, + -1.497719f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/CastrumAbania.cpp b/src/servers/Scripts/instances/dungeons/CastrumAbania.cpp index cd6a9c1a..e733abcd 100644 --- a/src/servers/Scripts/instances/dungeons/CastrumAbania.cpp +++ b/src/servers/Scripts/instances/dungeons/CastrumAbania.cpp @@ -1,26 +1,29 @@ #include #include -class CastrumAbania : public InstanceContentScript +class CastrumAbania : + public InstanceContentScript { public: - CastrumAbania() : InstanceContentScript( 55 ) - { } + CastrumAbania() : + InstanceContentScript( 55 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/CastrumMeridianum.cpp b/src/servers/Scripts/instances/dungeons/CastrumMeridianum.cpp index 6c604220..71318436 100644 --- a/src/servers/Scripts/instances/dungeons/CastrumMeridianum.cpp +++ b/src/servers/Scripts/instances/dungeons/CastrumMeridianum.cpp @@ -1,96 +1,152 @@ #include #include -class CastrumMeridianum : public InstanceContentScript +class CastrumMeridianum : + public InstanceContentScript { public: - CastrumMeridianum() : InstanceContentScript( 15 ) - { } + CastrumMeridianum() : + InstanceContentScript( 15 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0250", 2000593, 4249703, 4, { -67.576859f, 70.350082f, -36.382999f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_0", 2000594, 0, 4, { -72.778549f, 70.163177f, -38.339291f }, 1.000000f, 1.406840f ); - instance->registerEObj( "Magitekmissile", 2000662, 0, 4, { -108.687798f, 70.343590f, -8.558592f }, 1.400000f, -0.605074f ); - instance->registerEObj( "Magitekmissile_1", 2000663, 0, 4, { -116.665100f, 70.390266f, -53.063919f }, 1.400000f, -0.849513f ); - instance->registerEObj( "unknown_1", 2001149, 0, 4, { -72.778549f, 70.163177f, -38.339291f }, 1.000000f, 1.406839f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2000591, 4249720, 4, { -25.465830f, 83.385536f, -254.529602f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2000592, 0, 4, { -25.038260f, 81.798767f, -248.906296f }, 1.100000f, 0.000000f ); - instance->registerEObj( "Imperialidentificationkey", 2000870, 0, 4, { -67.439163f, 81.798767f, -231.079102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2000588, 0, 4, { 34.634392f, 71.755402f, -45.910198f }, 0.900000f, 1.543478f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000587, 4249693, 4, { 36.526970f, 70.598427f, -46.207680f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Imperialidentificationkey_1", 2000869, 0, 4, { -7.280443f, 69.781212f, 27.170691f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2000590, 0, 4, { -7.938801f, 70.550377f, 55.590679f }, 1.100000f, -0.213036f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000589, 4249713, 4, { -5.998041f, 70.281548f, 58.349812f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Searchlightterminal", 2000564, 3169670, 4, { 213.829102f, 89.024597f, -107.133797f }, 1.000000f, 1.045186f ); - // States -> blue_on red_on white_on - instance->registerEObj( "sgbg_w_emp_015_01a", 2000565, 4204866, 4, { 210.588501f, 88.962471f, -106.430901f }, 0.991760f, 0.000048f ); - // States -> blue_on red_on light_off - instance->registerEObj( "Shortcut", 2000603, 0, 4, { 242.256302f, 87.579422f, -95.018204f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Disposalchute", 2000597, 0, 4, { 40.790581f, 71.410004f, -11.781850f }, 0.991760f, 1.191010f ); - instance->registerEObj( "unknown_5", 2000860, 3168876, 4, { 197.143005f, 92.716309f, -155.744797f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2000861, 3168877, 4, { 211.024704f, 89.452042f, -70.152588f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Searchlightterminal_1", 2000873, 4317191, 4, { 206.509399f, 90.986397f, -79.219772f }, 1.000000f, 1.466079f ); - // States -> blue_on red_on white_on - instance->registerEObj( "unknown_7", 2000566, 4204867, 4, { -62.804321f, 72.657097f, 180.368805f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Searchlightterminal_2", 2000567, 4204869, 4, { -71.896492f, 74.742790f, 151.474503f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2000569, 4204871, 4, { 1.863623f, 71.927399f, 89.175919f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Unstablepaneling", 2000571, 3956106, 4, { 95.737846f, 64.963051f, 103.147400f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2000573, 3149745, 4, { 93.090912f, 66.531853f, 117.642097f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2000572, 4065604, 4, { 83.071327f, 60.587688f, 116.300903f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Unstablepaneling_1", 2000574, 3956104, 4, { 104.309601f, 64.941147f, 67.240013f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000575, 4065628, 4, { 93.616432f, 60.529831f, 51.407162f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2000576, 3149747, 4, { 101.933800f, 66.905586f, 52.199631f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2000577, 3642024, 4, { 20.799950f, 70.334259f, 4.277452f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2000862, 3149816, 4, { -77.378540f, 78.416023f, 130.266205f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Incendiary#37", 2000570, 0, 4, { 109.141098f, 64.757690f, 62.367512f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Incendiary#37_1", 2001113, 0, 4, { 124.726898f, 64.689621f, 62.085869f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2001206, 0, 4, { 104.233803f, 66.103699f, 68.343483f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2001205, 0, 4, { 95.566910f, 66.188728f, 101.984398f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2000578, 3642033, 4, { 5.540902f, 70.172447f, -68.735893f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2000586, 3169187, 4, { -84.639374f, 86.075699f, -294.635010f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal", 2000582, 0, 4, { -62.063919f, 69.259163f, -89.851593f }, 1.500000f, 0.261981f ); - instance->registerEObj( "Magitekterminal_1", 2000583, 0, 4, { -43.080639f, 69.331673f, -84.657654f }, 1.480042f, 0.271375f ); - instance->registerEObj( "unknown_19", 2000584, 3642010, 4, { -53.516090f, 69.940781f, -85.333992f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2000863, 3169178, 4, { 31.803410f, 83.652863f, -168.188904f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Searchlightterminal_3", 2000568, 4204872, 4, { 24.724890f, 77.701874f, -154.365402f }, 0.991760f, 0.795709f ); - // States -> blue_on red_on white_on - instance->registerEObj( "sgbg_w_emp_015_01a_1", 2000874, 4317259, 4, { 10.967040f, 74.960777f, -139.438599f }, 1.000000f, 0.000000f ); - // States -> blue_on red_on light_off - instance->registerEObj( "unknown_21", 2001136, 4265914, 4, { -18.308630f, 81.798767f, -204.730896f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2001160, 4200584, 4, { 5.338250f, 70.502319f, -87.827461f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_23", 2001159, 4200444, 4, { 21.572090f, 70.516617f, 9.031565f }, 1.000000f, 0.000000f ); - instance->registerEObj( "MarkXLIIIantiaircraftcannon", 2000595, 0, 4, { -66.151108f, 69.594437f, -20.559780f }, 0.991760f, 1.356260f ); - instance->registerEObj( "MarkXLIIIantiaircraftcannon_1", 2000600, 0, 4, { -70.083420f, 69.122810f, -65.019180f }, 0.991760f, 0.891590f ); - instance->registerEObj( "MarkXLIIIantiaircraftcannon_2", 2000601, 0, 4, { -44.756939f, 67.998627f, -39.293011f }, 0.991760f, 1.490808f ); - instance->registerEObj( "unknown_24", 2000865, 3169123, 4, { -27.982929f, 79.754509f, -48.873550f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_25", 2000865, 3284996, 4, { -19.120440f, 79.754509f, -11.464200f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Searchlightterminal_4", 2000580, 4204877, 4, { -26.230459f, 79.754509f, -42.167561f }, 0.991760f, 1.557559f ); - // States -> blue_on red_on white_on - instance->registerEObj( "Searchlightterminal_5", 2000581, 4265903, 4, { -23.853939f, 79.754509f, -15.348020f }, 0.991760f, 0.000048f ); - // States -> blue_on red_on white_on - instance->registerEObj( "sgbg_w_emp_015_01a_2", 2000875, 4317262, 4, { -45.087860f, 67.998833f, -39.263939f }, 1.000000f, 0.000000f ); - // States -> blue_on red_on light_off - instance->registerEObj( "Entrance", 2000562, 4247977, 5, { 257.286194f, 87.030891f, -99.538628f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_26", 2000563, 0, 4, { 260.508087f, 86.897049f, -89.411842f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000596, 0, 4, { -121.432404f, 70.350082f, -28.426470f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0250", 2000593, 4249703, 4, { -67.576859f, 70.350082f, -36.382999f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_0", 2000594, 0, 4, { -72.778549f, 70.163177f, -38.339291f }, 1.000000f, + 1.406840f ); + instance->registerEObj( "Magitekmissile", 2000662, 0, 4, { -108.687798f, 70.343590f, -8.558592f }, 1.400000f, + -0.605074f ); + instance->registerEObj( "Magitekmissile_1", 2000663, 0, 4, { -116.665100f, 70.390266f, -53.063919f }, 1.400000f, + -0.849513f ); + instance->registerEObj( "unknown_1", 2001149, 0, 4, { -72.778549f, 70.163177f, -38.339291f }, 1.000000f, + 1.406839f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2000591, 4249720, 4, { -25.465830f, 83.385536f, -254.529602f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2000592, 0, 4, { -25.038260f, 81.798767f, -248.906296f }, 1.100000f, + 0.000000f ); + instance->registerEObj( "Imperialidentificationkey", 2000870, 0, 4, { -67.439163f, 81.798767f, -231.079102f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2000588, 0, 4, { 34.634392f, 71.755402f, -45.910198f }, 0.900000f, 1.543478f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000587, 4249693, 4, { 36.526970f, 70.598427f, -46.207680f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Imperialidentificationkey_1", 2000869, 0, 4, { -7.280443f, 69.781212f, 27.170691f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2000590, 0, 4, { -7.938801f, 70.550377f, 55.590679f }, 1.100000f, -0.213036f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000589, 4249713, 4, { -5.998041f, 70.281548f, 58.349812f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Searchlightterminal", 2000564, 3169670, 4, { 213.829102f, 89.024597f, -107.133797f }, + 1.000000f, 1.045186f ); + // States -> blue_on red_on white_on + instance->registerEObj( "sgbg_w_emp_015_01a", 2000565, 4204866, 4, { 210.588501f, 88.962471f, -106.430901f }, + 0.991760f, 0.000048f ); + // States -> blue_on red_on light_off + instance->registerEObj( "Shortcut", 2000603, 0, 4, { 242.256302f, 87.579422f, -95.018204f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Disposalchute", 2000597, 0, 4, { 40.790581f, 71.410004f, -11.781850f }, 0.991760f, + 1.191010f ); + instance->registerEObj( "unknown_5", 2000860, 3168876, 4, { 197.143005f, 92.716309f, -155.744797f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2000861, 3168877, 4, { 211.024704f, 89.452042f, -70.152588f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Searchlightterminal_1", 2000873, 4317191, 4, { 206.509399f, 90.986397f, -79.219772f }, + 1.000000f, 1.466079f ); + // States -> blue_on red_on white_on + instance->registerEObj( "unknown_7", 2000566, 4204867, 4, { -62.804321f, 72.657097f, 180.368805f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Searchlightterminal_2", 2000567, 4204869, 4, { -71.896492f, 74.742790f, 151.474503f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_8", 2000569, 4204871, 4, { 1.863623f, 71.927399f, 89.175919f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Unstablepaneling", 2000571, 3956106, 4, { 95.737846f, 64.963051f, 103.147400f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2000573, 3149745, 4, { 93.090912f, 66.531853f, 117.642097f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2000572, 4065604, 4, { 83.071327f, 60.587688f, 116.300903f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Unstablepaneling_1", 2000574, 3956104, 4, { 104.309601f, 64.941147f, 67.240013f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_11", 2000575, 4065628, 4, { 93.616432f, 60.529831f, 51.407162f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2000576, 3149747, 4, { 101.933800f, 66.905586f, 52.199631f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2000577, 3642024, 4, { 20.799950f, 70.334259f, 4.277452f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2000862, 3149816, 4, { -77.378540f, 78.416023f, 130.266205f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Incendiary#37", 2000570, 0, 4, { 109.141098f, 64.757690f, 62.367512f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Incendiary#37_1", 2001113, 0, 4, { 124.726898f, 64.689621f, 62.085869f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2001206, 0, 4, { 104.233803f, 66.103699f, 68.343483f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2001205, 0, 4, { 95.566910f, 66.188728f, 101.984398f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2000578, 3642033, 4, { 5.540902f, 70.172447f, -68.735893f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2000586, 3169187, 4, { -84.639374f, 86.075699f, -294.635010f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekterminal", 2000582, 0, 4, { -62.063919f, 69.259163f, -89.851593f }, 1.500000f, + 0.261981f ); + instance->registerEObj( "Magitekterminal_1", 2000583, 0, 4, { -43.080639f, 69.331673f, -84.657654f }, 1.480042f, + 0.271375f ); + instance->registerEObj( "unknown_19", 2000584, 3642010, 4, { -53.516090f, 69.940781f, -85.333992f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2000863, 3169178, 4, { 31.803410f, 83.652863f, -168.188904f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Searchlightterminal_3", 2000568, 4204872, 4, { 24.724890f, 77.701874f, -154.365402f }, + 0.991760f, 0.795709f ); + // States -> blue_on red_on white_on + instance->registerEObj( "sgbg_w_emp_015_01a_1", 2000874, 4317259, 4, { 10.967040f, 74.960777f, -139.438599f }, + 1.000000f, 0.000000f ); + // States -> blue_on red_on light_off + instance->registerEObj( "unknown_21", 2001136, 4265914, 4, { -18.308630f, 81.798767f, -204.730896f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_22", 2001160, 4200584, 4, { 5.338250f, 70.502319f, -87.827461f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_23", 2001159, 4200444, 4, { 21.572090f, 70.516617f, 9.031565f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "MarkXLIIIantiaircraftcannon", 2000595, 0, 4, { -66.151108f, 69.594437f, -20.559780f }, + 0.991760f, 1.356260f ); + instance->registerEObj( "MarkXLIIIantiaircraftcannon_1", 2000600, 0, 4, { -70.083420f, 69.122810f, -65.019180f }, + 0.991760f, 0.891590f ); + instance->registerEObj( "MarkXLIIIantiaircraftcannon_2", 2000601, 0, 4, { -44.756939f, 67.998627f, -39.293011f }, + 0.991760f, 1.490808f ); + instance->registerEObj( "unknown_24", 2000865, 3169123, 4, { -27.982929f, 79.754509f, -48.873550f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_25", 2000865, 3284996, 4, { -19.120440f, 79.754509f, -11.464200f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Searchlightterminal_4", 2000580, 4204877, 4, { -26.230459f, 79.754509f, -42.167561f }, + 0.991760f, 1.557559f ); + // States -> blue_on red_on white_on + instance->registerEObj( "Searchlightterminal_5", 2000581, 4265903, 4, { -23.853939f, 79.754509f, -15.348020f }, + 0.991760f, 0.000048f ); + // States -> blue_on red_on white_on + instance->registerEObj( "sgbg_w_emp_015_01a_2", 2000875, 4317262, 4, { -45.087860f, 67.998833f, -39.263939f }, + 1.000000f, 0.000000f ); + // States -> blue_on red_on light_off + instance->registerEObj( "Entrance", 2000562, 4247977, 5, { 257.286194f, 87.030891f, -99.538628f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_26", 2000563, 0, 4, { 260.508087f, 86.897049f, -89.411842f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000596, 0, 4, { -121.432404f, 70.350082f, -28.426470f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/CopperbellMines.cpp b/src/servers/Scripts/instances/dungeons/CopperbellMines.cpp index a8189c10..38436bae 100644 --- a/src/servers/Scripts/instances/dungeons/CopperbellMines.cpp +++ b/src/servers/Scripts/instances/dungeons/CopperbellMines.cpp @@ -1,80 +1,129 @@ #include #include -class CopperbellMines : public InstanceContentScript +class CopperbellMines : + public InstanceContentScript { public: - CopperbellMines() : InstanceContentScript( 3 ) - { } + CopperbellMines() : + InstanceContentScript( 3 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2000068, 0, 4, { 44.405670f, -9.596272f, -115.661201f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2001526, 4056196, 4, { 42.862770f, -9.734462f, -118.006302f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2000069, 0, 4, { 35.776779f, -38.010250f, 86.627357f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001527, 4056695, 4, { 34.781620f, -38.026581f, 85.051003f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001528, 4056696, 4, { -93.129417f, -57.842449f, 54.637360f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2000037, 0, 4, { -90.569702f, -57.860081f, 55.157581f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2000266, 3163462, 4, { -73.202423f, -55.895020f, 1.983328f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2000267, 3163472, 4, { -123.490501f, -56.689388f, 36.337471f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Improvedblastingdevice", 2000184, 4093714, 4, { 30.553780f, -37.974628f, 110.802399f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2000239, 4093740, 4, { 34.836300f, -38.021832f, 115.035202f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -100.877403f, -56.042820f, -15.206130f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_6", 2000186, 3163464, 4, { -127.532204f, -56.557701f, 13.108460f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Tinykey", 2000159, 0, 4, { -209.307999f, 23.619301f, -210.254105f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Sealedblastingdoor", 2000160, 4025573, 4, { -205.498901f, 23.819269f, -208.536697f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_7", 2000161, 4024332, 4, { -184.037094f, 13.828580f, -208.114502f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Liftlever", 2000162, 4018210, 4, { -191.827606f, 23.433090f, -205.127106f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Liftlever_1", 2000163, 0, 4, { -183.969498f, 24.006029f, -205.712097f }, 0.991760f, 1.570451f ); - instance->registerEObj( "unknown_8", 2001559, 4023678, 4, { -189.593399f, 23.392031f, -208.209396f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4085080, 5, { -253.156403f, 23.528379f, -174.613998f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -237.184906f, 21.988159f, -166.420502f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2000167, 0, 4, { -81.437439f, -5.447510f, -171.343597f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2000168, 3163094, 4, { -74.540337f, -5.935791f, -162.462799f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Firesand", 2000169, 0, 4, { -20.828609f, -8.071711f, -161.638901f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Blastingdevice", 2000170, 4053820, 4, { 41.374290f, -9.249741f, -135.238800f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Firesand_1", 2000172, 0, 4, { 53.101452f, -3.845266f, -153.826401f }, 0.991760f, 0.901467f ); - instance->registerEObj( "Sealedblastingdoor_1", 2000173, 4025574, 4, { 43.376751f, -9.109680f, -58.134281f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Liftlever_2", 2000174, 4018213, 4, { 55.344479f, -8.804504f, -1.751919f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Liftlever_3", 2000175, 0, 4, { 55.965420f, -8.264337f, 6.017679f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Liftlever_4", 2000166, 0, 4, { -183.969498f, -6.008533f, -205.992905f }, 0.991760f, -1.570451f ); - instance->registerEObj( "Liftlever_5", 2000165, 4018211, 4, { -176.318695f, -6.546204f, -210.956100f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Tinykey_1", 2000178, 0, 4, { 42.903980f, -9.979086f, -69.086594f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_11", 2001529, 4024331, 4, { 58.267658f, -19.085461f, 6.177349f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Powderchamber", 2001536, 0, 4, { 43.821098f, -8.847800f, -128.329102f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2001560, 4023676, 4, { -178.386200f, -6.605137f, -207.831696f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2001561, 4023677, 4, { 58.670898f, -8.835022f, 0.472961f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_14", 2000171, 3163067, 4, { 43.472900f, -9.262273f, -126.115898f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Liftlever_6", 2000176, 4018212, 4, { 61.119492f, -37.911671f, 13.438640f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Liftlever_7", 2000177, 0, 4, { 55.985229f, -38.263531f, 6.003702f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Firesand_2", 2000179, 0, 4, { 14.572330f, -42.069149f, 43.503422f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Blastingdevice_1", 2000180, 4053821, 4, { 56.726372f, -37.999741f, 47.990452f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Firesand_3", 2001531, 0, 4, { 93.184647f, -41.640049f, 67.395599f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Firesand_4", 2001532, 0, 4, { 38.064529f, -38.712662f, 60.511768f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Firesand_5", 2001533, 0, 4, { 31.755930f, -37.938789f, 114.646599f }, 1.000000f, -1.263692f ); - instance->registerEObj( "Blastingdevice_2", 2001534, 4053822, 4, { 10.162710f, -36.846409f, 106.696999f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_15", 2001535, 3163445, 4, { 5.569519f, -38.040829f, 111.711197f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Powderchamber_1", 2001537, 0, 4, { 58.852821f, -37.774250f, 55.076962f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Powderchamber_2", 2001538, 0, 4, { 6.485046f, -37.171558f, 113.633904f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_16", 2001562, 4023675, 4, { 57.846920f, -38.864811f, 11.550960f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_17", 2000181, 3163079, 4, { 57.479050f, -38.038540f, 56.536980f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2000185, 3163454, 4, { -55.588661f, -37.033691f, 94.193893f }, 0.991789f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2000068, 0, 4, { 44.405670f, -9.596272f, -115.661201f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2001526, 4056196, 4, { 42.862770f, -9.734462f, -118.006302f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2000069, 0, 4, { 35.776779f, -38.010250f, 86.627357f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001527, 4056695, 4, { 34.781620f, -38.026581f, 85.051003f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001528, 4056696, 4, { -93.129417f, -57.842449f, 54.637360f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2000037, 0, 4, { -90.569702f, -57.860081f, 55.157581f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2000266, 3163462, 4, { -73.202423f, -55.895020f, 1.983328f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2000267, 3163472, 4, { -123.490501f, -56.689388f, 36.337471f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Improvedblastingdevice", 2000184, 4093714, 4, { 30.553780f, -37.974628f, 110.802399f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_5", 2000239, 4093740, 4, { 34.836300f, -38.021832f, 115.035202f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -100.877403f, -56.042820f, -15.206130f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_6", 2000186, 3163464, 4, { -127.532204f, -56.557701f, 13.108460f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Tinykey", 2000159, 0, 4, { -209.307999f, 23.619301f, -210.254105f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Sealedblastingdoor", 2000160, 4025573, 4, { -205.498901f, 23.819269f, -208.536697f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_7", 2000161, 4024332, 4, { -184.037094f, 13.828580f, -208.114502f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Liftlever", 2000162, 4018210, 4, { -191.827606f, 23.433090f, -205.127106f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Liftlever_1", 2000163, 0, 4, { -183.969498f, 24.006029f, -205.712097f }, 0.991760f, + 1.570451f ); + instance->registerEObj( "unknown_8", 2001559, 4023678, 4, { -189.593399f, 23.392031f, -208.209396f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4085080, 5, { -253.156403f, 23.528379f, -174.613998f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -237.184906f, 21.988159f, -166.420502f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2000167, 0, 4, { -81.437439f, -5.447510f, -171.343597f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2000168, 3163094, 4, { -74.540337f, -5.935791f, -162.462799f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Firesand", 2000169, 0, 4, { -20.828609f, -8.071711f, -161.638901f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Blastingdevice", 2000170, 4053820, 4, { 41.374290f, -9.249741f, -135.238800f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Firesand_1", 2000172, 0, 4, { 53.101452f, -3.845266f, -153.826401f }, 0.991760f, + 0.901467f ); + instance->registerEObj( "Sealedblastingdoor_1", 2000173, 4025574, 4, { 43.376751f, -9.109680f, -58.134281f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Liftlever_2", 2000174, 4018213, 4, { 55.344479f, -8.804504f, -1.751919f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Liftlever_3", 2000175, 0, 4, { 55.965420f, -8.264337f, 6.017679f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Liftlever_4", 2000166, 0, 4, { -183.969498f, -6.008533f, -205.992905f }, 0.991760f, + -1.570451f ); + instance->registerEObj( "Liftlever_5", 2000165, 4018211, 4, { -176.318695f, -6.546204f, -210.956100f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Tinykey_1", 2000178, 0, 4, { 42.903980f, -9.979086f, -69.086594f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_11", 2001529, 4024331, 4, { 58.267658f, -19.085461f, 6.177349f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Powderchamber", 2001536, 0, 4, { 43.821098f, -8.847800f, -128.329102f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2001560, 4023676, 4, { -178.386200f, -6.605137f, -207.831696f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2001561, 4023677, 4, { 58.670898f, -8.835022f, 0.472961f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_14", 2000171, 3163067, 4, { 43.472900f, -9.262273f, -126.115898f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Liftlever_6", 2000176, 4018212, 4, { 61.119492f, -37.911671f, 13.438640f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Liftlever_7", 2000177, 0, 4, { 55.985229f, -38.263531f, 6.003702f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Firesand_2", 2000179, 0, 4, { 14.572330f, -42.069149f, 43.503422f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Blastingdevice_1", 2000180, 4053821, 4, { 56.726372f, -37.999741f, 47.990452f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Firesand_3", 2001531, 0, 4, { 93.184647f, -41.640049f, 67.395599f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Firesand_4", 2001532, 0, 4, { 38.064529f, -38.712662f, 60.511768f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Firesand_5", 2001533, 0, 4, { 31.755930f, -37.938789f, 114.646599f }, 1.000000f, + -1.263692f ); + instance->registerEObj( "Blastingdevice_2", 2001534, 4053822, 4, { 10.162710f, -36.846409f, 106.696999f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_15", 2001535, 3163445, 4, { 5.569519f, -38.040829f, 111.711197f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Powderchamber_1", 2001537, 0, 4, { 58.852821f, -37.774250f, 55.076962f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Powderchamber_2", 2001538, 0, 4, { 6.485046f, -37.171558f, 113.633904f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_16", 2001562, 4023675, 4, { 57.846920f, -38.864811f, 11.550960f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_17", 2000181, 3163079, 4, { 57.479050f, -38.038540f, 56.536980f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2000185, 3163454, 4, { -55.588661f, -37.033691f, 94.193893f }, 0.991789f, + 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/CopperbellMinesHard.cpp b/src/servers/Scripts/instances/dungeons/CopperbellMinesHard.cpp index 58073b22..0354b449 100644 --- a/src/servers/Scripts/instances/dungeons/CopperbellMinesHard.cpp +++ b/src/servers/Scripts/instances/dungeons/CopperbellMinesHard.cpp @@ -1,72 +1,114 @@ #include #include -class CopperbellMinesHard : public InstanceContentScript +class CopperbellMinesHard : + public InstanceContentScript { public: - CopperbellMinesHard() : InstanceContentScript( 18 ) - { } + CopperbellMinesHard() : + InstanceContentScript( 18 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002930, 0, 4, { -90.674911f, -57.698959f, 55.099388f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002929, 4481287, 4, { -93.494362f, -57.942631f, 52.914669f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Crystallizedrock", 2002947, 0, 4, { -104.992798f, -53.764061f, -21.253201f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Crystallizedrock_1", 2003150, 0, 4, { -131.401993f, -56.204762f, 0.851171f }, 0.991760f, -0.745382f ); - instance->registerEObj( "Crystallizedrock_2", 2003151, 0, 4, { -62.481171f, -59.339249f, 24.728519f }, 0.991760f, 1.004150f ); - instance->registerEObj( "Crystallizedrock_3", 2003152, 0, 4, { -86.379723f, -58.526180f, 47.109539f }, 0.991760f, 0.098224f ); - instance->registerEObj( "Crystallizedrock_4", 2003153, 0, 4, { -114.249298f, -57.590469f, 38.164780f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Crystallizedrock_5", 2003154, 0, 4, { -78.472977f, -56.144230f, -6.125785f }, 0.991760f, 0.703581f ); - instance->registerEObj( "unknown_1", 2002735, 0, 4, { 66.489433f, -9.196375f, -91.109978f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4481282, 4, { 69.178787f, -9.885409f, -91.345154f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4497376, 4, { 64.314568f, -9.885409f, -48.220890f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002866, 4498423, 4, { 73.371529f, -11.611810f, -91.558388f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2002867, 4498424, 4, { 79.777977f, -11.999900f, -79.149048f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2002868, 4498425, 4, { 91.175873f, -12.124900f, -66.404877f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2002869, 4498426, 4, { 77.390869f, -12.124900f, -55.604710f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2002735, 0, 4, { 35.741501f, -38.003502f, 86.637199f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4481286, 4, { 34.816029f, -37.807098f, 89.653633f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Improvedblastingdevice", 2002870, 4500271, 4, { 39.532532f, -37.026131f, 113.598297f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002948, 4508121, 4, { 6.729187f, -37.796692f, 112.748901f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Liftlever", 2002902, 0, 4, { -184.034393f, 23.988701f, -205.737198f }, 1.000000f, -1.554668f ); - instance->registerEObj( "Liftlever_1", 2002904, 0, 4, { -183.968002f, -6.010950f, -205.991592f }, 1.000000f, 1.545402f ); - instance->registerEObj( "unknown_7", 2002905, 4478636, 4, { -192.156906f, 22.842710f, -208.392502f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_8", 2002900, 4498399, 4, { -209.037796f, 23.594311f, -208.732300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Liftlever_2", 2002901, 4478628, 4, { -191.601700f, 23.360180f, -205.152100f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Liftlever_3", 2002903, 4478629, 4, { -176.329803f, -6.592807f, -210.900894f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2002906, 4478634, 4, { -177.598907f, -6.741823f, -208.024597f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2002907, 4478650, 4, { -183.958496f, 8.816254f, -208.023193f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2002908, 4498400, 4, { -50.309021f, -3.189148f, -200.885101f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2002909, 4498416, 4, { 21.741100f, -9.932099f, -141.413300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2002910, 4498406, 4, { -12.649780f, -6.958161f, -219.043304f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_14", 2002911, 4498409, 4, { 18.035469f, -6.958161f, -209.711594f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2002912, 4498410, 4, { 17.977119f, -7.000057f, -185.896194f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2002923, 4498451, 4, { 60.402431f, -38.719849f, 51.888512f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2002924, 4498457, 4, { 65.252907f, -38.455730f, 39.846581f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2002925, 4498456, 4, { 55.235111f, -38.564739f, 39.248360f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2002926, 4500996, 4, { -82.288239f, -39.313419f, 101.057198f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4481330, 5, { -253.156403f, 23.528379f, -174.613998f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -100.877403f, -56.042820f, -15.206130f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -237.184906f, 21.988159f, -166.420502f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_20", 2002899, 0, 4, { -267.241791f, 23.005880f, -170.712494f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002930, 0, 4, { -90.674911f, -57.698959f, 55.099388f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002929, 4481287, 4, { -93.494362f, -57.942631f, 52.914669f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Crystallizedrock", 2002947, 0, 4, { -104.992798f, -53.764061f, -21.253201f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Crystallizedrock_1", 2003150, 0, 4, { -131.401993f, -56.204762f, 0.851171f }, 0.991760f, + -0.745382f ); + instance->registerEObj( "Crystallizedrock_2", 2003151, 0, 4, { -62.481171f, -59.339249f, 24.728519f }, 0.991760f, + 1.004150f ); + instance->registerEObj( "Crystallizedrock_3", 2003152, 0, 4, { -86.379723f, -58.526180f, 47.109539f }, 0.991760f, + 0.098224f ); + instance->registerEObj( "Crystallizedrock_4", 2003153, 0, 4, { -114.249298f, -57.590469f, 38.164780f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Crystallizedrock_5", 2003154, 0, 4, { -78.472977f, -56.144230f, -6.125785f }, 0.991760f, + 0.703581f ); + instance->registerEObj( "unknown_1", 2002735, 0, 4, { 66.489433f, -9.196375f, -91.109978f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4481282, 4, { 69.178787f, -9.885409f, -91.345154f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4497376, 4, { 64.314568f, -9.885409f, -48.220890f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002866, 4498423, 4, { 73.371529f, -11.611810f, -91.558388f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2002867, 4498424, 4, { 79.777977f, -11.999900f, -79.149048f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2002868, 4498425, 4, { 91.175873f, -12.124900f, -66.404877f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2002869, 4498426, 4, { 77.390869f, -12.124900f, -55.604710f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2002735, 0, 4, { 35.741501f, -38.003502f, 86.637199f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4481286, 4, { 34.816029f, -37.807098f, 89.653633f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Improvedblastingdevice", 2002870, 4500271, 4, { 39.532532f, -37.026131f, 113.598297f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002948, 4508121, 4, { 6.729187f, -37.796692f, 112.748901f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Liftlever", 2002902, 0, 4, { -184.034393f, 23.988701f, -205.737198f }, 1.000000f, + -1.554668f ); + instance->registerEObj( "Liftlever_1", 2002904, 0, 4, { -183.968002f, -6.010950f, -205.991592f }, 1.000000f, + 1.545402f ); + instance->registerEObj( "unknown_7", 2002905, 4478636, 4, { -192.156906f, 22.842710f, -208.392502f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_8", 2002900, 4498399, 4, { -209.037796f, 23.594311f, -208.732300f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Liftlever_2", 2002901, 4478628, 4, { -191.601700f, 23.360180f, -205.152100f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Liftlever_3", 2002903, 4478629, 4, { -176.329803f, -6.592807f, -210.900894f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2002906, 4478634, 4, { -177.598907f, -6.741823f, -208.024597f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2002907, 4478650, 4, { -183.958496f, 8.816254f, -208.023193f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2002908, 4498400, 4, { -50.309021f, -3.189148f, -200.885101f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2002909, 4498416, 4, { 21.741100f, -9.932099f, -141.413300f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2002910, 4498406, 4, { -12.649780f, -6.958161f, -219.043304f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_14", 2002911, 4498409, 4, { 18.035469f, -6.958161f, -209.711594f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2002912, 4498410, 4, { 17.977119f, -7.000057f, -185.896194f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2002923, 4498451, 4, { 60.402431f, -38.719849f, 51.888512f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2002924, 4498457, 4, { 65.252907f, -38.455730f, 39.846581f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2002925, 4498456, 4, { 55.235111f, -38.564739f, 39.248360f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2002926, 4500996, 4, { -82.288239f, -39.313419f, 101.057198f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4481330, 5, { -253.156403f, 23.528379f, -174.613998f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -100.877403f, -56.042820f, -15.206130f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -237.184906f, 21.988159f, -166.420502f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_20", 2002899, 0, 4, { -267.241791f, 23.005880f, -170.712494f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/CuttersCry.cpp b/src/servers/Scripts/instances/dungeons/CuttersCry.cpp index d65b21fd..ae170f84 100644 --- a/src/servers/Scripts/instances/dungeons/CuttersCry.cpp +++ b/src/servers/Scripts/instances/dungeons/CuttersCry.cpp @@ -1,66 +1,96 @@ #include #include -class CuttersCry : public InstanceContentScript +class CuttersCry : + public InstanceContentScript { public: - CuttersCry() : InstanceContentScript( 12 ) - { } + CuttersCry() : + InstanceContentScript( 12 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2000659, 0, 4, { -190.040604f, -4.267580f, -210.611801f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221", 2001133, 4323450, 4, { 268.610687f, -4.089700f, 104.917397f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_1", 2001133, 4323451, 4, { 250.254807f, -3.751600f, 99.675102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_2", 2001133, 4323452, 4, { 268.589386f, -2.609000f, 88.017700f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_3", 2001133, 4323453, 4, { 105.129799f, -0.534200f, 147.850800f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_4", 2001133, 4323454, 4, { 119.166603f, 0.308000f, 155.483704f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_5", 2001133, 4323455, 4, { 103.312500f, -0.406300f, 194.717194f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_6", 2001133, 4323456, 4, { 73.898598f, 0.574600f, 187.497803f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_7", 2001133, 4323457, 4, { 72.064903f, 0.259800f, 157.992203f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_8", 2001133, 4323458, 4, { 116.819603f, -0.614000f, 179.620300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_9", 2001133, 4323459, 4, { -11.408770f, -1.184585f, 148.053894f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_10", 2001133, 4323460, 4, { -46.669281f, 0.651785f, 135.550003f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_11", 2001133, 4323462, 4, { -24.331600f, -1.221600f, 145.870697f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_12", 2001133, 4323464, 4, { 15.181000f, -0.706100f, 126.443100f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0221_13", 2001133, 4323468, 4, { -92.665901f, 4.399500f, 112.625504f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4222581, 5, { 263.888306f, -0.101790f, 157.188995f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 265.520508f, 0.002038f, 142.558197f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shiftingsands", 2000460, 4279880, 4, { 259.501709f, -3.500300f, 88.085403f }, 1.000000f, 0.000000f ); - // States -> vf_on disp_on disp_of - instance->registerEObj( "Shiftingsands_1", 2000461, 4279889, 4, { 79.087517f, 0.289220f, 152.208694f }, 0.991760f, 0.000048f ); - // States -> vf_on disp_on disp_of - instance->registerEObj( "sgvf_w_lvd_b0118", 2000462, 4222616, 4, { -46.215149f, 6.077029f, 159.979706f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2000463, 0, 4, { -48.096859f, 5.781024f, 159.723999f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shiftingsands_2", 2000464, 4279890, 4, { -8.133057f, -5.813782f, 215.716797f }, 0.991760f, 0.000048f ); - // States -> vf_on disp_on disp_of - instance->registerEObj( "Shiftingsands_3", 2000465, 4279892, 4, { 301.838593f, -0.717224f, -111.039902f }, 0.991760f, 0.000048f ); - // States -> vf_on disp_on disp_of - instance->registerEObj( "Shiftingsands_4", 2000466, 4279893, 4, { 319.020294f, 0.259338f, -232.654297f }, 0.991760f, 0.000048f ); - // States -> vf_on disp_on disp_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000467, 4374288, 4, { -146.843597f, -0.005151f, 184.227493f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2000468, 0, 4, { -144.488297f, -0.192320f, 184.547104f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shiftingsands_5", 2000469, 4279894, 4, { -144.457199f, -3.646973f, 134.843994f }, 0.991760f, 0.000048f ); - // States -> vf_on disp_on disp_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000471, 4222648, 4, { -182.117905f, -0.203522f, -160.895706f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_3", 2000472, 0, 4, { -179.869202f, -0.089300f, -160.548294f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -180.661194f, -4.240662f, -222.797607f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2000659, 0, 4, { -190.040604f, -4.267580f, -210.611801f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221", 2001133, 4323450, 4, { 268.610687f, -4.089700f, 104.917397f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_1", 2001133, 4323451, 4, { 250.254807f, -3.751600f, 99.675102f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_2", 2001133, 4323452, 4, { 268.589386f, -2.609000f, 88.017700f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_3", 2001133, 4323453, 4, { 105.129799f, -0.534200f, 147.850800f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_4", 2001133, 4323454, 4, { 119.166603f, 0.308000f, 155.483704f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_5", 2001133, 4323455, 4, { 103.312500f, -0.406300f, 194.717194f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_6", 2001133, 4323456, 4, { 73.898598f, 0.574600f, 187.497803f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_7", 2001133, 4323457, 4, { 72.064903f, 0.259800f, 157.992203f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_8", 2001133, 4323458, 4, { 116.819603f, -0.614000f, 179.620300f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_9", 2001133, 4323459, 4, { -11.408770f, -1.184585f, 148.053894f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_10", 2001133, 4323460, 4, { -46.669281f, 0.651785f, 135.550003f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_11", 2001133, 4323462, 4, { -24.331600f, -1.221600f, 145.870697f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_12", 2001133, 4323464, 4, { 15.181000f, -0.706100f, 126.443100f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0221_13", 2001133, 4323468, 4, { -92.665901f, 4.399500f, 112.625504f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4222581, 5, { 263.888306f, -0.101790f, 157.188995f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 265.520508f, 0.002038f, 142.558197f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Shiftingsands", 2000460, 4279880, 4, { 259.501709f, -3.500300f, 88.085403f }, 1.000000f, + 0.000000f ); + // States -> vf_on disp_on disp_of + instance->registerEObj( "Shiftingsands_1", 2000461, 4279889, 4, { 79.087517f, 0.289220f, 152.208694f }, 0.991760f, + 0.000048f ); + // States -> vf_on disp_on disp_of + instance->registerEObj( "sgvf_w_lvd_b0118", 2000462, 4222616, 4, { -46.215149f, 6.077029f, 159.979706f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2000463, 0, 4, { -48.096859f, 5.781024f, 159.723999f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Shiftingsands_2", 2000464, 4279890, 4, { -8.133057f, -5.813782f, 215.716797f }, 0.991760f, + 0.000048f ); + // States -> vf_on disp_on disp_of + instance->registerEObj( "Shiftingsands_3", 2000465, 4279892, 4, { 301.838593f, -0.717224f, -111.039902f }, + 0.991760f, 0.000048f ); + // States -> vf_on disp_on disp_of + instance->registerEObj( "Shiftingsands_4", 2000466, 4279893, 4, { 319.020294f, 0.259338f, -232.654297f }, 0.991760f, + 0.000048f ); + // States -> vf_on disp_on disp_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000467, 4374288, 4, { -146.843597f, -0.005151f, 184.227493f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2000468, 0, 4, { -144.488297f, -0.192320f, 184.547104f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shiftingsands_5", 2000469, 4279894, 4, { -144.457199f, -3.646973f, 134.843994f }, + 0.991760f, 0.000048f ); + // States -> vf_on disp_on disp_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000471, 4222648, 4, { -182.117905f, -0.203522f, -160.895706f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_3", 2000472, 0, 4, { -179.869202f, -0.089300f, -160.548294f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -180.661194f, -4.240662f, -222.797607f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/DomaCastle.cpp b/src/servers/Scripts/instances/dungeons/DomaCastle.cpp index 9b18b769..640e01c0 100644 --- a/src/servers/Scripts/instances/dungeons/DomaCastle.cpp +++ b/src/servers/Scripts/instances/dungeons/DomaCastle.cpp @@ -1,26 +1,29 @@ #include #include -class DomaCastle : public InstanceContentScript +class DomaCastle : + public InstanceContentScript { public: - DomaCastle() : InstanceContentScript( 54 ) - { } + DomaCastle() : + InstanceContentScript( 54 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/DzemaelDarkhold.cpp b/src/servers/Scripts/instances/dungeons/DzemaelDarkhold.cpp index cd6bb243..28ffd8f7 100644 --- a/src/servers/Scripts/instances/dungeons/DzemaelDarkhold.cpp +++ b/src/servers/Scripts/instances/dungeons/DzemaelDarkhold.cpp @@ -1,126 +1,193 @@ #include #include -class DzemaelDarkhold : public InstanceContentScript +class DzemaelDarkhold : + public InstanceContentScript { public: - DzemaelDarkhold() : InstanceContentScript( 13 ) - { } + DzemaelDarkhold() : + InstanceContentScript( 13 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "埋門", 2000033, 3328371, 4, { 79.909241f, 1.268266f, 161.509598f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000066, 3328664, 4, { 144.020004f, -6.834667f, 162.001907f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Grandhallgate", 2000438, 3328665, 4, { 98.210373f, -6.834594f, 111.974403f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2000453, 0, 4, { 79.384338f, -10.733530f, 106.701599f }, 1.000000f, -0.706750f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2000452, 4229638, 4, { 76.745064f, -11.090400f, 105.321198f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Magitektransporter", 2000458, 0, 4, { 23.358509f, -12.304620f, 57.612831f }, 1.000000f, 0.000000f ); - instance->registerEObj( "MagitekterminalI", 2000476, 4256808, 4, { 80.927979f, 1.365243f, 173.289703f }, 1.000000f, 0.000000f ); - // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of - instance->registerEObj( "MagitekterminalIII", 2000478, 4256810, 4, { 124.023804f, -13.794070f, 123.296898f }, 1.000000f, 0.000000f ); - // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of - instance->registerEObj( "MagitekterminalIV", 2000479, 4256811, 4, { 140.853195f, -11.962310f, 113.256302f }, 1.000000f, 0.000000f ); - // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of - instance->registerEObj( "sgvf_r1r1_b0173", 2000276, 4255636, 4, { 36.155140f, 8.079000f, 207.374298f }, 1.000000f, 0.000000f ); - // States -> vfbright_b_on vfbright_b_off - instance->registerEObj( "sgvf_r1r1_b0173_1", 2000276, 4255639, 4, { 112.091797f, -3.877179f, 176.216904f }, 1.000000f, 0.000000f ); - // States -> vfbright_b_on vfbright_b_off - instance->registerEObj( "sgvf_r1r1_b0173_2", 2000276, 4255640, 4, { 139.427399f, -10.726720f, 108.501404f }, 1.000000f, 0.000000f ); - // States -> vfbright_b_on vfbright_b_off - instance->registerEObj( "sgvf_r1r1_b0173_3", 2000276, 4255644, 4, { 67.860687f, -14.328120f, 84.076920f }, 1.000000f, 0.000000f ); - // States -> vfbright_b_on vfbright_b_off - instance->registerEObj( "sgvf_r1r1_b0173_4", 2000276, 4255645, 4, { 51.562908f, -11.769940f, 111.841400f }, 1.000000f, 0.000000f ); - // States -> vfbright_b_on vfbright_b_off - instance->registerEObj( "sgvf_r1r1_b0173_5", 2000276, 4255646, 4, { 18.496250f, -15.965690f, 87.930252f }, 1.000000f, 0.000000f ); - // States -> vfbright_b_on vfbright_b_off - instance->registerEObj( "sgvf_r1r1_b0173_6", 2000276, 4255648, 4, { 19.309570f, -10.954800f, 51.356911f }, 1.000000f, 0.000000f ); - // States -> vfbright_b_on vfbright_b_off - instance->registerEObj( "unknown_1", 2000279, 4247600, 4, { 35.302368f, 8.108457f, 206.288605f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2000279, 4247601, 4, { 111.093102f, -3.403727f, 176.495895f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2000279, 4247603, 4, { 68.310699f, -14.257320f, 83.756592f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2000279, 4247604, 4, { 52.317631f, -11.815490f, 110.621300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2000279, 4247605, 4, { 18.860821f, -14.036660f, 88.283234f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2000279, 4247606, 4, { 20.972610f, -11.172370f, 51.726391f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2000279, 4247602, 4, { 138.802094f, -10.764680f, 110.383400f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitektransporter_1", 2000474, 0, 4, { -96.800278f, -30.000010f, -41.821941f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2000455, 0, 4, { -106.309601f, -26.688049f, -16.372990f }, 0.991760f, 0.737616f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000454, 4233746, 4, { -107.679703f, -26.639919f, -15.815070f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_9", 2000487, 4184823, 4, { -111.157799f, -22.833250f, 2.271249f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_r1r1_b0174", 2000490, 4255705, 4, { -242.711304f, -24.146959f, -32.381401f }, 1.000000f, 0.000000f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_1", 2000490, 4255691, 4, { -261.321289f, -25.547960f, -34.986919f }, 1.000000f, 0.000000f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_2", 2000490, 4255694, 4, { -261.811310f, -26.640051f, -20.854830f }, 1.000000f, 0.000000f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_3", 2000490, 4255706, 4, { -237.266907f, -48.000000f, -0.833767f }, 1.000000f, 0.000000f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_4", 2000490, 4255707, 4, { -217.921600f, -18.200211f, 20.315559f }, 1.000000f, 0.000000f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_5", 2000490, 4255708, 4, { -169.460999f, -33.749729f, 51.753731f }, 1.000000f, 0.000000f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_6", 2000490, 4255709, 4, { -166.205704f, -33.174091f, 41.379780f }, 1.000000f, 0.000000f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_7", 2000490, 4255710, 4, { -136.133698f, -24.761801f, 11.194330f }, 1.000000f, 0.000000f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "unknown_10", 2000280, 4247607, 4, { -260.415710f, -25.404510f, -36.083500f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000280, 4247608, 4, { -262.467896f, -26.663879f, -21.408119f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2000280, 4247609, 4, { -241.470901f, -24.060431f, -29.972530f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2000280, 4247611, 4, { -238.320496f, -47.903111f, -3.008399f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2000280, 4247610, 4, { -219.957108f, -17.854340f, 18.911011f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2000280, 4247613, 4, { -168.223907f, -33.658329f, 50.704330f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2000280, 4247612, 4, { -165.114899f, -32.678890f, 41.844219f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2000280, 4247614, 4, { -133.651001f, -24.416229f, 10.934760f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_emp_b0021", 2000488, 4233760, 4, { 13.842580f, -15.160090f, -143.072693f }, 1.000000f, 0.000000f ); - // States -> vf_baria_on vf_baria_off - instance->registerEObj( "MagitekterminalVIII", 2000483, 4256818, 4, { -16.049601f, -17.297310f, -177.329498f }, 0.991760f, 0.000048f ); - // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of - instance->registerEObj( "MagitekterminalIX", 2000484, 4256819, 4, { -14.914310f, -21.075211f, -144.145996f }, 1.000000f, 0.000000f ); - // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of - instance->registerEObj( "unknown_18", 2000457, 0, 4, { 56.778809f, -36.148682f, -150.835495f }, 0.991760f, 0.957075f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000456, 4233771, 4, { 55.222290f, -35.782471f, -150.255600f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_r1r1_b0174_8", 2000490, 4255718, 4, { -48.459080f, -19.742540f, -176.405197f }, 0.991760f, 0.000048f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_9", 2000490, 4255720, 4, { -11.239590f, -21.204630f, -144.906204f }, 0.991760f, 0.000048f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_10", 2000490, 4255721, 4, { -15.353870f, -17.228140f, -178.818893f }, 0.991760f, 0.000048f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_11", 2000490, 4255722, 4, { 29.525160f, -23.532890f, -108.452202f }, 0.991760f, 0.000048f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_12", 2000490, 4255723, 4, { 27.773970f, -23.532040f, -114.936401f }, 0.991760f, 0.000048f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_13", 2000490, 4255725, 4, { 64.981979f, -38.499950f, -172.408997f }, 0.991760f, 0.000048f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_14", 2000490, 4255728, 4, { 70.785149f, -37.665981f, -203.212097f }, 0.991760f, 0.000048f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "sgvf_r1r1_b0174_15", 2000490, 4255729, 4, { 105.072098f, -38.024330f, -158.260803f }, 0.991760f, 0.000048f ); - // States -> vfbright_o_on vfbright_o_off - instance->registerEObj( "unknown_19", 2000280, 4246846, 4, { -45.950432f, -19.312410f, -177.762207f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2000280, 4246848, 4, { -14.610830f, -21.218700f, -145.140900f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2000280, 4246847, 4, { -16.411739f, -16.383909f, -180.914902f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2000280, 4246849, 4, { 26.993160f, -23.453131f, -107.682999f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_23", 2000280, 0, 4, { 32.493099f, -24.000099f, -113.021797f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_24", 2000280, 4246850, 4, { 66.021332f, -38.500019f, -172.238098f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_25", 2000280, 4246851, 4, { 70.452782f, -37.655048f, -202.913803f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_26", 2000280, 4246852, 4, { 103.330498f, -38.100510f, -159.167999f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit_1", 2000139, 0, 4, { 79.243332f, -38.930771f, -182.480194f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4229601, 5, { -48.620270f, 19.892130f, 221.013596f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -44.993790f, 14.002300f, 204.521896f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "埋門", 2000033, 3328371, 4, { 79.909241f, 1.268266f, 161.509598f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Exit", 2000066, 3328664, 4, { 144.020004f, -6.834667f, 162.001907f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Grandhallgate", 2000438, 3328665, 4, { 98.210373f, -6.834594f, 111.974403f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_0", 2000453, 0, 4, { 79.384338f, -10.733530f, 106.701599f }, 1.000000f, + -0.706750f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2000452, 4229638, 4, { 76.745064f, -11.090400f, 105.321198f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Magitektransporter", 2000458, 0, 4, { 23.358509f, -12.304620f, 57.612831f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "MagitekterminalI", 2000476, 4256808, 4, { 80.927979f, 1.365243f, 173.289703f }, 1.000000f, + 0.000000f ); + // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of + instance->registerEObj( "MagitekterminalIII", 2000478, 4256810, 4, { 124.023804f, -13.794070f, 123.296898f }, + 1.000000f, 0.000000f ); + // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of + instance->registerEObj( "MagitekterminalIV", 2000479, 4256811, 4, { 140.853195f, -11.962310f, 113.256302f }, + 1.000000f, 0.000000f ); + // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of + instance->registerEObj( "sgvf_r1r1_b0173", 2000276, 4255636, 4, { 36.155140f, 8.079000f, 207.374298f }, 1.000000f, + 0.000000f ); + // States -> vfbright_b_on vfbright_b_off + instance->registerEObj( "sgvf_r1r1_b0173_1", 2000276, 4255639, 4, { 112.091797f, -3.877179f, 176.216904f }, + 1.000000f, 0.000000f ); + // States -> vfbright_b_on vfbright_b_off + instance->registerEObj( "sgvf_r1r1_b0173_2", 2000276, 4255640, 4, { 139.427399f, -10.726720f, 108.501404f }, + 1.000000f, 0.000000f ); + // States -> vfbright_b_on vfbright_b_off + instance->registerEObj( "sgvf_r1r1_b0173_3", 2000276, 4255644, 4, { 67.860687f, -14.328120f, 84.076920f }, + 1.000000f, 0.000000f ); + // States -> vfbright_b_on vfbright_b_off + instance->registerEObj( "sgvf_r1r1_b0173_4", 2000276, 4255645, 4, { 51.562908f, -11.769940f, 111.841400f }, + 1.000000f, 0.000000f ); + // States -> vfbright_b_on vfbright_b_off + instance->registerEObj( "sgvf_r1r1_b0173_5", 2000276, 4255646, 4, { 18.496250f, -15.965690f, 87.930252f }, + 1.000000f, 0.000000f ); + // States -> vfbright_b_on vfbright_b_off + instance->registerEObj( "sgvf_r1r1_b0173_6", 2000276, 4255648, 4, { 19.309570f, -10.954800f, 51.356911f }, + 1.000000f, 0.000000f ); + // States -> vfbright_b_on vfbright_b_off + instance->registerEObj( "unknown_1", 2000279, 4247600, 4, { 35.302368f, 8.108457f, 206.288605f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2000279, 4247601, 4, { 111.093102f, -3.403727f, 176.495895f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2000279, 4247603, 4, { 68.310699f, -14.257320f, 83.756592f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2000279, 4247604, 4, { 52.317631f, -11.815490f, 110.621300f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2000279, 4247605, 4, { 18.860821f, -14.036660f, 88.283234f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2000279, 4247606, 4, { 20.972610f, -11.172370f, 51.726391f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2000279, 4247602, 4, { 138.802094f, -10.764680f, 110.383400f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitektransporter_1", 2000474, 0, 4, { -96.800278f, -30.000010f, -41.821941f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2000455, 0, 4, { -106.309601f, -26.688049f, -16.372990f }, 0.991760f, + 0.737616f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000454, 4233746, 4, { -107.679703f, -26.639919f, -15.815070f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_9", 2000487, 4184823, 4, { -111.157799f, -22.833250f, 2.271249f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_r1r1_b0174", 2000490, 4255705, 4, { -242.711304f, -24.146959f, -32.381401f }, + 1.000000f, 0.000000f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_1", 2000490, 4255691, 4, { -261.321289f, -25.547960f, -34.986919f }, + 1.000000f, 0.000000f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_2", 2000490, 4255694, 4, { -261.811310f, -26.640051f, -20.854830f }, + 1.000000f, 0.000000f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_3", 2000490, 4255706, 4, { -237.266907f, -48.000000f, -0.833767f }, + 1.000000f, 0.000000f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_4", 2000490, 4255707, 4, { -217.921600f, -18.200211f, 20.315559f }, + 1.000000f, 0.000000f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_5", 2000490, 4255708, 4, { -169.460999f, -33.749729f, 51.753731f }, + 1.000000f, 0.000000f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_6", 2000490, 4255709, 4, { -166.205704f, -33.174091f, 41.379780f }, + 1.000000f, 0.000000f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_7", 2000490, 4255710, 4, { -136.133698f, -24.761801f, 11.194330f }, + 1.000000f, 0.000000f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "unknown_10", 2000280, 4247607, 4, { -260.415710f, -25.404510f, -36.083500f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2000280, 4247608, 4, { -262.467896f, -26.663879f, -21.408119f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2000280, 4247609, 4, { -241.470901f, -24.060431f, -29.972530f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2000280, 4247611, 4, { -238.320496f, -47.903111f, -3.008399f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2000280, 4247610, 4, { -219.957108f, -17.854340f, 18.911011f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2000280, 4247613, 4, { -168.223907f, -33.658329f, 50.704330f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2000280, 4247612, 4, { -165.114899f, -32.678890f, 41.844219f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2000280, 4247614, 4, { -133.651001f, -24.416229f, 10.934760f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_emp_b0021", 2000488, 4233760, 4, { 13.842580f, -15.160090f, -143.072693f }, + 1.000000f, 0.000000f ); + // States -> vf_baria_on vf_baria_off + instance->registerEObj( "MagitekterminalVIII", 2000483, 4256818, 4, { -16.049601f, -17.297310f, -177.329498f }, + 0.991760f, 0.000048f ); + // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of + instance->registerEObj( "MagitekterminalIX", 2000484, 4256819, 4, { -14.914310f, -21.075211f, -144.145996f }, + 1.000000f, 0.000000f ); + // States -> vf_tarmn1_on vf_tarmn1_of vf_tarmn2_on vf_bg_on vf_bg_of + instance->registerEObj( "unknown_18", 2000457, 0, 4, { 56.778809f, -36.148682f, -150.835495f }, 0.991760f, + 0.957075f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000456, 4233771, 4, { 55.222290f, -35.782471f, -150.255600f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_r1r1_b0174_8", 2000490, 4255718, 4, { -48.459080f, -19.742540f, -176.405197f }, + 0.991760f, 0.000048f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_9", 2000490, 4255720, 4, { -11.239590f, -21.204630f, -144.906204f }, + 0.991760f, 0.000048f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_10", 2000490, 4255721, 4, { -15.353870f, -17.228140f, -178.818893f }, + 0.991760f, 0.000048f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_11", 2000490, 4255722, 4, { 29.525160f, -23.532890f, -108.452202f }, + 0.991760f, 0.000048f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_12", 2000490, 4255723, 4, { 27.773970f, -23.532040f, -114.936401f }, + 0.991760f, 0.000048f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_13", 2000490, 4255725, 4, { 64.981979f, -38.499950f, -172.408997f }, + 0.991760f, 0.000048f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_14", 2000490, 4255728, 4, { 70.785149f, -37.665981f, -203.212097f }, + 0.991760f, 0.000048f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "sgvf_r1r1_b0174_15", 2000490, 4255729, 4, { 105.072098f, -38.024330f, -158.260803f }, + 0.991760f, 0.000048f ); + // States -> vfbright_o_on vfbright_o_off + instance->registerEObj( "unknown_19", 2000280, 4246846, 4, { -45.950432f, -19.312410f, -177.762207f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2000280, 4246848, 4, { -14.610830f, -21.218700f, -145.140900f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2000280, 4246847, 4, { -16.411739f, -16.383909f, -180.914902f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_22", 2000280, 4246849, 4, { 26.993160f, -23.453131f, -107.682999f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_23", 2000280, 0, 4, { 32.493099f, -24.000099f, -113.021797f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_24", 2000280, 4246850, 4, { 66.021332f, -38.500019f, -172.238098f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_25", 2000280, 4246851, 4, { 70.452782f, -37.655048f, -202.913803f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_26", 2000280, 4246852, 4, { 103.330498f, -38.100510f, -159.167999f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit_1", 2000139, 0, 4, { 79.243332f, -38.930771f, -182.480194f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4229601, 5, { -48.620270f, 19.892130f, 221.013596f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -44.993790f, 14.002300f, 204.521896f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/Halatali.cpp b/src/servers/Scripts/instances/dungeons/Halatali.cpp index 8f7cdb59..64012f02 100644 --- a/src/servers/Scripts/instances/dungeons/Halatali.cpp +++ b/src/servers/Scripts/instances/dungeons/Halatali.cpp @@ -1,77 +1,118 @@ #include #include -class Halatali : public InstanceContentScript +class Halatali : + public InstanceContentScript { public: - Halatali() : InstanceContentScript( 7 ) - { } + Halatali() : + InstanceContentScript( 7 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4600269, 5, { -245.383194f, 17.225630f, 16.103081f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -279.773407f, 17.233170f, 19.434681f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2001609, 0, 4, { 241.292603f, 11.057950f, 9.784212f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance_1", 2001649, 4097866, 5, { 238.950500f, 9.900879f, -1.209344f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit_1", 2001610, 4097973, 4, { -280.512299f, 17.240601f, 20.057501f }, 1.000000f, 0.000000f ); - // States -> vf_htras1_on vf_htras1_of - instance->registerEObj( "sgvf_w_lvd_b0094", 2001611, 4097992, 4, { 19.113859f, 0.900208f, 98.170502f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118", 2001612, 4098036, 4, { 17.948280f, 0.925217f, 99.310219f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001613, 4098064, 4, { -120.074501f, -5.801239f, -111.402496f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001614, 4098077, 4, { -121.598503f, -5.727614f, -112.049599f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_2", 2001615, 4098237, 4, { -228.286301f, 17.565599f, 16.208900f }, 1.000000f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001616, 4098241, 4, { -229.136703f, 17.565599f, 16.208900f }, 1.000000f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2001618, 4014394, 4, { 29.098881f, 1.785278f, 130.418793f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Aetherialflow", 2001619, 0, 4, { 32.968849f, 3.815735f, 131.179199f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_2", 2001620, 2815987, 4, { 120.471397f, -0.516086f, -57.500610f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2001621, 4098194, 4, { -95.942581f, -9.659227f, -101.942596f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2001622, 4043181, 4, { -94.468628f, -2.151611f, -68.864014f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Ludusdoor", 2001623, 4005252, 4, { -172.249695f, 12.559910f, 12.742130f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch", 2001624, 4016950, 4, { 74.518059f, -10.988300f, -107.067703f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch_1", 2001625, 4016951, 4, { 42.154171f, -10.941640f, -84.664078f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch_2", 2001626, 4016952, 4, { 17.515020f, -10.957320f, -190.023102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch_3", 2001627, 4016953, 4, { -39.127491f, -11.066550f, -129.097504f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch_4", 2001628, 4016954, 4, { -82.474548f, -10.952540f, -113.137199f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2001634, 4082420, 4, { -129.441193f, 9.833186f, -0.625334f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001635, 3629276, 4, { -3.044897f, 0.927666f, 144.884506f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2001636, 3629274, 4, { 27.769211f, 0.954134f, 166.929398f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2001637, 3629277, 4, { 69.039284f, 0.968122f, 137.080902f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2001638, 4016486, 4, { -19.781490f, 2.187618f, 152.349899f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2001639, 4016487, 4, { 24.469919f, 2.233563f, 180.853195f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2001640, 4016488, 4, { 89.225769f, 2.247621f, 140.072006f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2001641, 4018090, 4, { -277.600494f, 17.568609f, 40.599701f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2001642, 4018091, 4, { -255.703506f, 17.578291f, 47.590672f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2001643, 4018092, 4, { -237.108002f, 17.604349f, 38.970459f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2001644, 4018089, 4, { -279.140015f, 17.555901f, -2.742105f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2001645, 4018088, 4, { -261.194214f, 17.568060f, -11.064940f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2001646, 4018087, 4, { -239.163101f, 17.568661f, -4.435994f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Aetherialflow_1", 2001647, 4103310, 4, { -177.996506f, -14.694460f, -133.043503f }, 0.991760f, 0.000048f ); - // States -> tornade_off tornade_on - instance->registerEObj( "unknown_18", 2001648, 4105956, 4, { -171.435196f, -14.633480f, -127.946999f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_19", 2001650, 0, 4, { -230.125793f, 17.157061f, 16.380630f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 242.225601f, 9.970665f, -11.333600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2001712, 0, 4, { -131.216003f, 10.073990f, -1.326215f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2000210, 0, 4, { -256.084503f, 17.537910f, 17.740490f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4600269, 5, { -245.383194f, 17.225630f, 16.103081f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -279.773407f, 17.233170f, 19.434681f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2001609, 0, 4, { 241.292603f, 11.057950f, 9.784212f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance_1", 2001649, 4097866, 5, { 238.950500f, 9.900879f, -1.209344f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit_1", 2001610, 4097973, 4, { -280.512299f, 17.240601f, 20.057501f }, 1.000000f, + 0.000000f ); + // States -> vf_htras1_on vf_htras1_of + instance->registerEObj( "sgvf_w_lvd_b0094", 2001611, 4097992, 4, { 19.113859f, 0.900208f, 98.170502f }, 0.991760f, + 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118", 2001612, 4098036, 4, { 17.948280f, 0.925217f, 99.310219f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001613, 4098064, 4, { -120.074501f, -5.801239f, -111.402496f }, + 1.000000f, 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001614, 4098077, 4, { -121.598503f, -5.727614f, -112.049599f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_2", 2001615, 4098237, 4, { -228.286301f, 17.565599f, 16.208900f }, + 1.000000f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001616, 4098241, 4, { -229.136703f, 17.565599f, 16.208900f }, + 1.000000f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2001618, 4014394, 4, { 29.098881f, 1.785278f, 130.418793f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Aetherialflow", 2001619, 0, 4, { 32.968849f, 3.815735f, 131.179199f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_2", 2001620, 2815987, 4, { 120.471397f, -0.516086f, -57.500610f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2001621, 4098194, 4, { -95.942581f, -9.659227f, -101.942596f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2001622, 4043181, 4, { -94.468628f, -2.151611f, -68.864014f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Ludusdoor", 2001623, 4005252, 4, { -172.249695f, 12.559910f, 12.742130f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch", 2001624, 4016950, 4, { 74.518059f, -10.988300f, -107.067703f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch_1", 2001625, 4016951, 4, { 42.154171f, -10.941640f, -84.664078f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch_2", 2001626, 4016952, 4, { 17.515020f, -10.957320f, -190.023102f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch_3", 2001627, 4016953, 4, { -39.127491f, -11.066550f, -129.097504f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch_4", 2001628, 4016954, 4, { -82.474548f, -10.952540f, -113.137199f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2001634, 4082420, 4, { -129.441193f, 9.833186f, -0.625334f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001635, 3629276, 4, { -3.044897f, 0.927666f, 144.884506f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2001636, 3629274, 4, { 27.769211f, 0.954134f, 166.929398f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2001637, 3629277, 4, { 69.039284f, 0.968122f, 137.080902f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2001638, 4016486, 4, { -19.781490f, 2.187618f, 152.349899f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2001639, 4016487, 4, { 24.469919f, 2.233563f, 180.853195f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2001640, 4016488, 4, { 89.225769f, 2.247621f, 140.072006f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2001641, 4018090, 4, { -277.600494f, 17.568609f, 40.599701f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2001642, 4018091, 4, { -255.703506f, 17.578291f, 47.590672f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2001643, 4018092, 4, { -237.108002f, 17.604349f, 38.970459f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2001644, 4018089, 4, { -279.140015f, 17.555901f, -2.742105f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2001645, 4018088, 4, { -261.194214f, 17.568060f, -11.064940f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2001646, 4018087, 4, { -239.163101f, 17.568661f, -4.435994f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Aetherialflow_1", 2001647, 4103310, 4, { -177.996506f, -14.694460f, -133.043503f }, + 0.991760f, 0.000048f ); + // States -> tornade_off tornade_on + instance->registerEObj( "unknown_18", 2001648, 4105956, 4, { -171.435196f, -14.633480f, -127.946999f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_19", 2001650, 0, 4, { -230.125793f, 17.157061f, 16.380630f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 242.225601f, 9.970665f, -11.333600f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_20", 2001712, 0, 4, { -131.216003f, 10.073990f, -1.326215f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2000210, 0, 4, { -256.084503f, 17.537910f, 17.740490f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/HalataliHard.cpp b/src/servers/Scripts/instances/dungeons/HalataliHard.cpp index 95d78de6..fb54d7d6 100644 --- a/src/servers/Scripts/instances/dungeons/HalataliHard.cpp +++ b/src/servers/Scripts/instances/dungeons/HalataliHard.cpp @@ -1,82 +1,132 @@ #include #include -class HalataliHard : public InstanceContentScript +class HalataliHard : + public InstanceContentScript { public: - HalataliHard() : InstanceContentScript( 21 ) - { } + HalataliHard() : + InstanceContentScript( 21 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Thalsscepter", 2003646, 0, 4, { -270.088409f, 17.593571f, 31.956100f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_0", 2003695, 4617495, 4, { -280.035614f, 17.622829f, 22.302071f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2003696, 4563389, 4, { -286.231689f, 17.622749f, 20.657721f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Thalsscepter_1", 2003674, 0, 4, { -271.908386f, 17.593571f, 6.173567f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Thalsscepter_2", 2003675, 0, 4, { -244.251801f, 17.593571f, 30.251480f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Thalsscepter_3", 2003676, 0, 4, { -246.038696f, 17.593571f, 4.371015f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Mammetactivator", 2003641, 4616318, 4, { -84.695412f, -10.178000f, -91.555862f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shadowyorb", 2003642, 0, 4, { 163.469803f, 6.240906f, 219.745102f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shadowyorb_1", 2003643, 0, 4, { 154.283905f, 6.240900f, 239.520905f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shadowyorb_2", 2003644, 0, 4, { 143.742905f, 6.240900f, 210.525208f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shadowyorb_3", 2003645, 0, 4, { 134.607193f, 6.240900f, 230.328094f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2003569, 4603298, 4, { 148.951706f, 4.509544f, 224.628006f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2001610, 4569374, 4, { -278.262390f, 17.622650f, 19.181259f }, 0.991760f, 0.000048f ); - // States -> vf_htras1_on vf_htras1_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 139.879395f, -0.228372f, -31.551029f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4569369, 5, { 149.187393f, -0.228943f, -35.111019f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_3", 2002575, 0, 4, { 160.775299f, -1.641945f, -10.606120f }, 0.991760f, -1.265160f ); - instance->registerEObj( "unknown_4", 2002735, 0, 4, { -50.385818f, -10.178000f, -114.820198f }, 0.991760f, -1.005012f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4569384, 4, { -48.920971f, -10.792460f, -116.285103f }, 0.991760f, -1.062825f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_5", 2002735, 0, 4, { 129.072403f, 4.509535f, 216.306305f }, 1.000000f, 1.129171f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4569379, 4, { 130.018494f, 4.509536f, 217.130295f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_6", 2002735, 0, 4, { -233.786301f, 17.622999f, 16.764700f }, 1.000000f, -1.486617f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4569389, 4, { -233.389206f, 17.622990f, 16.739140f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2003506, 4594991, 4, { 101.606300f, -4.171019f, -69.914146f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2003507, 4598981, 4, { -41.245178f, -10.879700f, -121.934898f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2003508, 4603945, 4, { -52.140079f, -10.696590f, -91.691528f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2003509, 4564172, 4, { 130.022095f, -0.534058f, 5.172791f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_11", 2003510, 4594992, 4, { 123.552200f, -2.731445f, 25.131590f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2003511, 4598084, 4, { 89.130997f, -3.711910f, 78.724213f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2003512, 4599477, 4, { 73.157578f, -3.335556f, 178.491302f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2003513, 4594999, 4, { 100.220802f, 0.477127f, 203.242798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2003514, 4616527, 4, { 167.865707f, 4.509536f, 233.584396f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_16", 2003515, 4567234, 4, { -191.532196f, 4.456180f, 94.520203f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2003516, 4567237, 4, { -128.869400f, 12.073380f, 96.752960f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2003517, 4567232, 4, { -66.065460f, 14.565810f, 26.350080f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2003518, 4567230, 4, { -171.754501f, 12.467810f, 12.301850f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2003519, 4596306, 4, { -198.995102f, 11.315890f, 13.488570f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2003520, 4565306, 4, { 96.452271f, -3.738525f, 39.688599f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_22", 2003521, 4565309, 4, { 127.885902f, -3.738525f, 60.807129f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_23", 2003522, 4565307, 4, { 82.383423f, -3.646973f, 59.189701f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_24", 2003523, 4565308, 4, { 108.323700f, -3.738525f, 80.552368f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_25", 2003524, 4565302, 4, { -2.324507f, 0.927634f, 144.329300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_26", 2003525, 4565303, 4, { 27.311819f, 0.927548f, 166.238098f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_27", 2003526, 4565305, 4, { 68.331223f, 0.927661f, 136.889404f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_28", 2003527, 4595900, 4, { 77.372299f, -10.608900f, -91.074203f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_29", 2003528, 4595901, 4, { 36.027271f, -9.635880f, -104.808601f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_30", 2003529, 4595903, 4, { 2.165477f, -11.282240f, -188.867599f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_31", 2003530, 4618276, 4, { -10.216280f, -11.049250f, -152.788300f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_32", 2003531, 4595904, 4, { -21.241859f, -11.023320f, -136.299393f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance_1", 2000182, 4970117, 5, { -243.015701f, 19.074579f, 10.923530f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit_1", 2000139, 0, 4, { -272.688904f, 19.074579f, 18.222231f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Thalsscepter", 2003646, 0, 4, { -270.088409f, 17.593571f, 31.956100f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_0", 2003695, 4617495, 4, { -280.035614f, 17.622829f, 22.302071f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2003696, 4563389, 4, { -286.231689f, 17.622749f, 20.657721f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Thalsscepter_1", 2003674, 0, 4, { -271.908386f, 17.593571f, 6.173567f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Thalsscepter_2", 2003675, 0, 4, { -244.251801f, 17.593571f, 30.251480f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Thalsscepter_3", 2003676, 0, 4, { -246.038696f, 17.593571f, 4.371015f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Mammetactivator", 2003641, 4616318, 4, { -84.695412f, -10.178000f, -91.555862f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Shadowyorb", 2003642, 0, 4, { 163.469803f, 6.240906f, 219.745102f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Shadowyorb_1", 2003643, 0, 4, { 154.283905f, 6.240900f, 239.520905f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Shadowyorb_2", 2003644, 0, 4, { 143.742905f, 6.240900f, 210.525208f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shadowyorb_3", 2003645, 0, 4, { 134.607193f, 6.240900f, 230.328094f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2003569, 4603298, 4, { 148.951706f, 4.509544f, 224.628006f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2001610, 4569374, 4, { -278.262390f, 17.622650f, 19.181259f }, 0.991760f, + 0.000048f ); + // States -> vf_htras1_on vf_htras1_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 139.879395f, -0.228372f, -31.551029f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4569369, 5, { 149.187393f, -0.228943f, -35.111019f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_3", 2002575, 0, 4, { 160.775299f, -1.641945f, -10.606120f }, 0.991760f, + -1.265160f ); + instance->registerEObj( "unknown_4", 2002735, 0, 4, { -50.385818f, -10.178000f, -114.820198f }, 0.991760f, + -1.005012f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4569384, 4, { -48.920971f, -10.792460f, -116.285103f }, + 0.991760f, -1.062825f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_5", 2002735, 0, 4, { 129.072403f, 4.509535f, 216.306305f }, 1.000000f, 1.129171f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4569379, 4, { 130.018494f, 4.509536f, 217.130295f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_6", 2002735, 0, 4, { -233.786301f, 17.622999f, 16.764700f }, 1.000000f, + -1.486617f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4569389, 4, { -233.389206f, 17.622990f, 16.739140f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2003506, 4594991, 4, { 101.606300f, -4.171019f, -69.914146f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2003507, 4598981, 4, { -41.245178f, -10.879700f, -121.934898f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2003508, 4603945, 4, { -52.140079f, -10.696590f, -91.691528f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2003509, 4564172, 4, { 130.022095f, -0.534058f, 5.172791f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_11", 2003510, 4594992, 4, { 123.552200f, -2.731445f, 25.131590f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2003511, 4598084, 4, { 89.130997f, -3.711910f, 78.724213f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2003512, 4599477, 4, { 73.157578f, -3.335556f, 178.491302f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2003513, 4594999, 4, { 100.220802f, 0.477127f, 203.242798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2003514, 4616527, 4, { 167.865707f, 4.509536f, 233.584396f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_16", 2003515, 4567234, 4, { -191.532196f, 4.456180f, 94.520203f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2003516, 4567237, 4, { -128.869400f, 12.073380f, 96.752960f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2003517, 4567232, 4, { -66.065460f, 14.565810f, 26.350080f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2003518, 4567230, 4, { -171.754501f, 12.467810f, 12.301850f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2003519, 4596306, 4, { -198.995102f, 11.315890f, 13.488570f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2003520, 4565306, 4, { 96.452271f, -3.738525f, 39.688599f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_22", 2003521, 4565309, 4, { 127.885902f, -3.738525f, 60.807129f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_23", 2003522, 4565307, 4, { 82.383423f, -3.646973f, 59.189701f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_24", 2003523, 4565308, 4, { 108.323700f, -3.738525f, 80.552368f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_25", 2003524, 4565302, 4, { -2.324507f, 0.927634f, 144.329300f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_26", 2003525, 4565303, 4, { 27.311819f, 0.927548f, 166.238098f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_27", 2003526, 4565305, 4, { 68.331223f, 0.927661f, 136.889404f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_28", 2003527, 4595900, 4, { 77.372299f, -10.608900f, -91.074203f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_29", 2003528, 4595901, 4, { 36.027271f, -9.635880f, -104.808601f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_30", 2003529, 4595903, 4, { 2.165477f, -11.282240f, -188.867599f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_31", 2003530, 4618276, 4, { -10.216280f, -11.049250f, -152.788300f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_32", 2003531, 4595904, 4, { -21.241859f, -11.023320f, -136.299393f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance_1", 2000182, 4970117, 5, { -243.015701f, 19.074579f, 10.923530f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit_1", 2000139, 0, 4, { -272.688904f, 19.074579f, 18.222231f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/HaukkeManor.cpp b/src/servers/Scripts/instances/dungeons/HaukkeManor.cpp index ba476a83..00ef8180 100644 --- a/src/servers/Scripts/instances/dungeons/HaukkeManor.cpp +++ b/src/servers/Scripts/instances/dungeons/HaukkeManor.cpp @@ -1,70 +1,101 @@ #include #include -class HaukkeManor : public InstanceContentScript +class HaukkeManor : + public InstanceContentScript { public: - HaukkeManor() : InstanceContentScript( 6 ) - { } + HaukkeManor() : + InstanceContentScript( 6 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Voidlamp", 2000366, 3873151, 4, { 19.527651f, 17.000000f, 22.036671f }, 0.991789f, 0.785398f ); - // States -> vf_slamp_on vf_slamp_of - instance->registerEObj( "Voidlamp_1", 2000367, 3873152, 4, { -24.524000f, 16.999901f, 22.023741f }, 1.000000f, -0.785398f ); - // States -> vf_slamp_on vf_slamp_of - instance->registerEObj( "Voidlamp_2", 2000368, 3873153, 4, { 19.541849f, 16.999950f, -13.996940f }, 1.000000f, 0.785398f ); - // States -> vf_slamp_on vf_slamp_of - instance->registerEObj( "Voidlamp_3", 2000369, 3873154, 4, { -24.503330f, 16.999889f, -14.014120f }, 1.000000f, -0.785398f ); - // States -> vf_slamp_on vf_slamp_of - instance->registerEObj( "Exit", 2000370, 0, 4, { -2.517786f, 16.952730f, 21.011629f }, 0.930753f, 0.000240f ); - instance->registerEObj( "unknown_0", 2000371, 0, 4, { 81.895119f, 0.228838f, -0.106860f }, 0.900235f, 0.000336f ); - instance->registerEObj( "Tinykey", 2000302, 0, 4, { 71.396912f, -0.001627f, 28.641140f }, 0.869717f, 0.932147f ); - instance->registerEObj( "Tinykey_1", 2000303, 0, 4, { -26.322651f, -0.005771f, 50.722679f }, 0.778163f, -0.528574f ); - instance->registerEObj( "Tinykey_2", 2000304, 0, 4, { -52.424351f, -0.002903f, 22.515909f }, 0.930753f, 0.987942f ); - instance->registerEObj( "Tinykey_3", 2000305, 0, 4, { -68.498917f, -16.795919f, -8.967492f }, 0.869717f, 1.115077f ); - instance->registerEObj( "Tinykey_4", 2000306, 0, 4, { -46.234051f, -18.800501f, 38.557331f }, 0.900235f, 0.549108f ); - instance->registerEObj( "Tinykey_5", 2000307, 0, 4, { 14.015370f, -18.796499f, -43.227589f }, 0.900235f, 0.868678f ); - instance->registerEObj( "Tinykey_6", 2000308, 0, 4, { -11.804590f, -18.800249f, -50.647060f }, 0.991789f, 0.312732f ); - instance->registerEObj( "Lockeddoor", 2000329, 3457073, 4, { 0.509394f, 0.143553f, 56.976101f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Lockeddoor_1", 2000331, 3457076, 4, { -16.586599f, 0.172088f, 84.043991f }, 0.961271f, 0.000144f ); - instance->registerEObj( "Lockeddoor_2", 2000337, 3457070, 4, { -48.657558f, 0.174862f, -36.017189f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Lockeddoor_3", 2000338, 3457071, 4, { -48.701061f, 0.167371f, 36.007271f }, 0.930753f, 0.000240f ); - instance->registerEObj( "Lockeddoor_4", 2000339, 3457083, 4, { -25.116051f, -18.616779f, -34.637550f }, 0.961271f, 0.000144f ); - instance->registerEObj( "Lockeddoor_5", 2000343, 3457090, 4, { -1.899940f, -18.615101f, 34.620899f }, 0.961271f, 0.000144f ); - instance->registerEObj( "Lockeddoor_6", 2000344, 3457093, 4, { 25.192600f, -18.692350f, 34.531120f }, 0.930753f, 0.000240f ); - instance->registerEObj( "IvyDoor", 2000355, 3457081, 4, { -48.382030f, 0.425044f, -0.015306f }, 0.961271f, 0.000144f ); - instance->registerEObj( "CarnationDoor", 2000356, 3457082, 4, { -25.558910f, -18.570280f, -0.076342f }, 0.930753f, 0.000240f ); - instance->registerEObj( "LilyDoor", 2000357, 3449005, 4, { 22.842710f, 17.196871f, -0.015306f }, 0.991789f, 0.000048f ); - instance->registerEObj( "unknown_1", 2001080, 0, 4, { 22.000000f, 17.000000f, 0.000000f }, 0.575000f, -1.570451f ); - instance->registerEObj( "unknown_2", 2001236, 3852702, 4, { 24.498400f, 0.449216f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Sealedbarrier", 2001233, 3909497, 4, { 46.699810f, 9.875019f, -0.253856f }, 1.000000f, 0.000000f ); - // States -> vf_baria1_off vf_baria_on - instance->registerEObj( "Yellowkey", 2000325, 0, 4, { -12.348700f, -18.803230f, 52.290878f }, 1.000000f, -0.839410f ); - instance->registerEObj( "Lockeddoor_7", 2000345, 3457077, 4, { 16.464439f, 17.135830f, 84.153458f }, 0.930753f, 0.000240f ); - instance->registerEObj( "sgvf_w_lvd_b0094", 2001604, 4103506, 4, { -23.510660f, -0.000664f, 0.588553f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118", 2001605, 4103511, 4, { -23.446470f, -0.000633f, -0.525669f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001606, 4103508, 4, { -24.734859f, -18.800381f, 0.630995f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2001607, 4103512, 4, { -24.765221f, -18.800400f, -0.546668f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Entrance", 2000182, 4143756, 5, { 73.330597f, 0.000000f, 0.000000f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Greenkey", 2000324, 0, 4, { 1.500000f, 0.007936f, -0.000000f }, 0.961271f, 0.638080f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Voidlamp", 2000366, 3873151, 4, { 19.527651f, 17.000000f, 22.036671f }, 0.991789f, + 0.785398f ); + // States -> vf_slamp_on vf_slamp_of + instance->registerEObj( "Voidlamp_1", 2000367, 3873152, 4, { -24.524000f, 16.999901f, 22.023741f }, 1.000000f, + -0.785398f ); + // States -> vf_slamp_on vf_slamp_of + instance->registerEObj( "Voidlamp_2", 2000368, 3873153, 4, { 19.541849f, 16.999950f, -13.996940f }, 1.000000f, + 0.785398f ); + // States -> vf_slamp_on vf_slamp_of + instance->registerEObj( "Voidlamp_3", 2000369, 3873154, 4, { -24.503330f, 16.999889f, -14.014120f }, 1.000000f, + -0.785398f ); + // States -> vf_slamp_on vf_slamp_of + instance->registerEObj( "Exit", 2000370, 0, 4, { -2.517786f, 16.952730f, 21.011629f }, 0.930753f, 0.000240f ); + instance->registerEObj( "unknown_0", 2000371, 0, 4, { 81.895119f, 0.228838f, -0.106860f }, 0.900235f, 0.000336f ); + instance->registerEObj( "Tinykey", 2000302, 0, 4, { 71.396912f, -0.001627f, 28.641140f }, 0.869717f, 0.932147f ); + instance->registerEObj( "Tinykey_1", 2000303, 0, 4, { -26.322651f, -0.005771f, 50.722679f }, 0.778163f, + -0.528574f ); + instance->registerEObj( "Tinykey_2", 2000304, 0, 4, { -52.424351f, -0.002903f, 22.515909f }, 0.930753f, 0.987942f ); + instance->registerEObj( "Tinykey_3", 2000305, 0, 4, { -68.498917f, -16.795919f, -8.967492f }, 0.869717f, + 1.115077f ); + instance->registerEObj( "Tinykey_4", 2000306, 0, 4, { -46.234051f, -18.800501f, 38.557331f }, 0.900235f, + 0.549108f ); + instance->registerEObj( "Tinykey_5", 2000307, 0, 4, { 14.015370f, -18.796499f, -43.227589f }, 0.900235f, + 0.868678f ); + instance->registerEObj( "Tinykey_6", 2000308, 0, 4, { -11.804590f, -18.800249f, -50.647060f }, 0.991789f, + 0.312732f ); + instance->registerEObj( "Lockeddoor", 2000329, 3457073, 4, { 0.509394f, 0.143553f, 56.976101f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Lockeddoor_1", 2000331, 3457076, 4, { -16.586599f, 0.172088f, 84.043991f }, 0.961271f, + 0.000144f ); + instance->registerEObj( "Lockeddoor_2", 2000337, 3457070, 4, { -48.657558f, 0.174862f, -36.017189f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Lockeddoor_3", 2000338, 3457071, 4, { -48.701061f, 0.167371f, 36.007271f }, 0.930753f, + 0.000240f ); + instance->registerEObj( "Lockeddoor_4", 2000339, 3457083, 4, { -25.116051f, -18.616779f, -34.637550f }, 0.961271f, + 0.000144f ); + instance->registerEObj( "Lockeddoor_5", 2000343, 3457090, 4, { -1.899940f, -18.615101f, 34.620899f }, 0.961271f, + 0.000144f ); + instance->registerEObj( "Lockeddoor_6", 2000344, 3457093, 4, { 25.192600f, -18.692350f, 34.531120f }, 0.930753f, + 0.000240f ); + instance->registerEObj( "IvyDoor", 2000355, 3457081, 4, { -48.382030f, 0.425044f, -0.015306f }, 0.961271f, + 0.000144f ); + instance->registerEObj( "CarnationDoor", 2000356, 3457082, 4, { -25.558910f, -18.570280f, -0.076342f }, 0.930753f, + 0.000240f ); + instance->registerEObj( "LilyDoor", 2000357, 3449005, 4, { 22.842710f, 17.196871f, -0.015306f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2001080, 0, 4, { 22.000000f, 17.000000f, 0.000000f }, 0.575000f, -1.570451f ); + instance->registerEObj( "unknown_2", 2001236, 3852702, 4, { 24.498400f, 0.449216f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Sealedbarrier", 2001233, 3909497, 4, { 46.699810f, 9.875019f, -0.253856f }, 1.000000f, + 0.000000f ); + // States -> vf_baria1_off vf_baria_on + instance->registerEObj( "Yellowkey", 2000325, 0, 4, { -12.348700f, -18.803230f, 52.290878f }, 1.000000f, + -0.839410f ); + instance->registerEObj( "Lockeddoor_7", 2000345, 3457077, 4, { 16.464439f, 17.135830f, 84.153458f }, 0.930753f, + 0.000240f ); + instance->registerEObj( "sgvf_w_lvd_b0094", 2001604, 4103506, 4, { -23.510660f, -0.000664f, 0.588553f }, 1.000000f, + 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118", 2001605, 4103511, 4, { -23.446470f, -0.000633f, -0.525669f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001606, 4103508, 4, { -24.734859f, -18.800381f, 0.630995f }, + 1.000000f, 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2001607, 4103512, 4, { -24.765221f, -18.800400f, -0.546668f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Entrance", 2000182, 4143756, 5, { 73.330597f, 0.000000f, 0.000000f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Greenkey", 2000324, 0, 4, { 1.500000f, 0.007936f, -0.000000f }, 0.961271f, 0.638080f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/HaukkeManorHard.cpp b/src/servers/Scripts/instances/dungeons/HaukkeManorHard.cpp index 05c91502..09f95923 100644 --- a/src/servers/Scripts/instances/dungeons/HaukkeManorHard.cpp +++ b/src/servers/Scripts/instances/dungeons/HaukkeManorHard.cpp @@ -1,96 +1,139 @@ #include #include -class HaukkeManorHard : public InstanceContentScript +class HaukkeManorHard : + public InstanceContentScript { public: - HaukkeManorHard() : InstanceContentScript( 19 ) - { } + HaukkeManorHard() : + InstanceContentScript( 19 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -26.487801f, 17.000000f, -0.008300f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2002872, 4497628, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgbg_f1d4_c1_ori01", 2002873, 4498555, 4, { -1.869557f, 17.000000f, 15.055300f }, 1.000000f, 0.000000f ); - // States -> vf_fire_on0 vf_fire_on vf_fire_of0 vf_fire_of - instance->registerEObj( "sgbg_f1d4_c1_ori01_1", 2002874, 4498556, 4, { -5.211004f, 17.000000f, -10.575720f }, 1.000000f, 0.000000f ); - // States -> vf_fire_on0 vf_fire_on vf_fire_of0 vf_fire_of - instance->registerEObj( "unknown_1", 2003318, 4484553, 4, { 23.178410f, 16.983280f, 0.137329f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_2", 2002735, 0, 4, { 25.786711f, 0.000000f, 0.119909f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4505837, 4, { 23.084200f, 0.000000f, -1.591900f }, 1.000000f, -1.570796f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2003126, 4521780, 4, { -20.141510f, -0.000000f, -0.141697f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_3", 2002735, 0, 4, { -24.169260f, -18.905939f, -0.137390f }, 0.991760f, -1.551983f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4509134, 4, { -22.072941f, -18.814390f, -0.320496f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_4", 2002997, 0, 4, { -20.433430f, -18.936470f, 0.755735f }, 1.000000f, 0.000000f ); - instance->registerEObj( "LilyDoor", 2002915, 4484551, 4, { -28.152889f, 16.983280f, 0.015198f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d4_d1_gago1", 2002917, 4505698, 4, { -36.195190f, 16.983280f, -5.685384f }, 0.991760f, 0.000048f ); - // States -> bg_gago1_on bg_gago1_off bg_gago1_out - instance->registerEObj( "Crystalball", 2002916, 4488372, 4, { 28.044069f, 16.983280f, 0.168350f }, 0.991760f, 0.811345f ); - instance->registerEObj( "sgbg_f1d4_d1_gago1_1", 2003319, 4544200, 4, { -36.143250f, 17.000000f, 7.445584f }, 1.000000f, 0.000000f ); - // States -> bg_gago1_on bg_gago1_off bg_gago1_out - instance->registerEObj( "Lockeddoor", 2003315, 4484546, 4, { 15.988830f, 17.000000f, -82.166763f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Tinykey", 2003312, 0, 4, { 23.053480f, 17.000000f, -63.610909f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Lockeddoor_1", 2003316, 4484554, 4, { 0.701762f, 17.000000f, -96.124260f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Lockeddoor_2", 2003317, 4484573, 4, { -15.941600f, 17.000000f, -86.214546f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Tinykey_1", 2003314, 0, 4, { 11.497100f, 17.000000f, -97.655212f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Tinykey_2", 2003430, 0, 4, { -10.688510f, 17.000000f, -98.849060f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2002938, 4484560, 4, { 16.478939f, 0.000000f, -83.923622f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Crystalball_1", 2002941, 4488371, 4, { -43.455170f, -0.000000f, 13.580270f }, 1.000000f, -1.392958f ); - instance->registerEObj( "RoseDoor", 2002943, 0, 4, { 27.084721f, -0.015320f, 0.045776f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Redkey", 2002942, 0, 4, { 58.672710f, 0.000000f, -30.483391f }, 1.000000f, -0.000345f ); - instance->registerEObj( "unknown_6", 2002937, 4484569, 4, { -16.476231f, 0.000000f, -69.988670f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2002944, 4499358, 4, { -16.603889f, 0.000000f, -68.606903f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2002945, 4499362, 4, { 16.527910f, 0.000000f, -85.147072f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Voidlamp", 2002939, 4488368, 4, { -29.871300f, -0.015320f, -70.456650f }, 0.991760f, 1.074421f ); - // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 - instance->registerEObj( "Voidlamp_1", 2002940, 4488367, 4, { -17.039709f, 0.000000f, -84.537079f }, 1.000000f, -1.569551f ); - // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 - instance->registerEObj( "Sealedbarrier", 2003321, 4545173, 4, { 29.337740f, 0.000000f, -1.101776f }, 1.000000f, 0.000000f ); - // States -> bg_barrier1_on bg_barrier1_off bg_barrier1_out - instance->registerEObj( "Lockeddoor_3", 2003320, 4484571, 4, { 46.738281f, -0.015320f, -35.965580f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Tinykey_3", 2003313, 0, 4, { 43.982948f, 0.000000f, -34.342270f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_f1d4_v1_lmp1", 2003463, 4588435, 4, { -5.889304f, 0.000000f, -71.199730f }, 1.000000f, 0.000000f ); - // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 - instance->registerEObj( "sgbg_f1d4_v1_lmp1_1", 2003464, 4588440, 4, { 6.823740f, 0.000000f, -82.895660f }, 1.000000f, 0.000000f ); - // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 - instance->registerEObj( "sgbg_f1d4_v1_lmp1_2", 2003465, 4588441, 4, { 16.834749f, 0.000000f, -70.555031f }, 1.000000f, 0.000000f ); - // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 - instance->registerEObj( "sgbg_f1d4_v1_lmp1_3", 2003466, 4588442, 4, { 27.007900f, 0.000000f, -82.771332f }, 1.000000f, 0.000000f ); - // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 - instance->registerEObj( "sgbg_f1d4_v1_lmp1_4", 2003467, 4588444, 4, { 34.488140f, -0.000000f, -61.907959f }, 1.000000f, 0.010569f ); - // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 - instance->registerEObj( "sgbg_f1d4_v1_lmp1_5", 2003468, 4588448, 4, { 48.546879f, 0.000000f, -53.979691f }, 1.000000f, 0.009430f ); - // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 - instance->registerEObj( "sgbg_f1d4_v1_lmp1_6", 2003469, 4588445, 4, { 24.192520f, 0.000000f, -55.798260f }, 1.000000f, 0.000000f ); - // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 - instance->registerEObj( "unknown_9", 2002951, 4486667, 4, { -25.301229f, -18.799990f, -33.673420f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2002952, 4486668, 4, { 1.978515f, -18.799990f, -34.167542f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2002953, 0, 4, { 25.467291f, -18.814390f, 33.859741f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2002954, 4486671, 4, { -2.139196f, -18.799990f, 34.235821f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Sealedbarrier_1", 2002955, 4508183, 4, { -25.881571f, -18.799999f, 0.041033f }, 1.000000f, 0.000000f ); - // States -> bg_barrier1_on bg_barrier1_off bg_barrier1_out - instance->registerEObj( "unknown_13", 2003322, 4486669, 4, { 28.549561f, -18.799999f, -33.402039f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4488394, 5, { 73.319580f, -0.015320f, -0.015320f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 17.397711f, -18.804060f, 0.066881f }, 0.900200f, 0.000335f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 72.756577f, 0.000000f, 5.215310f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2002913, 0, 4, { 81.361702f, 0.249998f, -0.409441f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -26.487801f, 17.000000f, -0.008300f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2002872, 4497628, 4, { 0.000000f, 0.000000f, 0.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgbg_f1d4_c1_ori01", 2002873, 4498555, 4, { -1.869557f, 17.000000f, 15.055300f }, + 1.000000f, 0.000000f ); + // States -> vf_fire_on0 vf_fire_on vf_fire_of0 vf_fire_of + instance->registerEObj( "sgbg_f1d4_c1_ori01_1", 2002874, 4498556, 4, { -5.211004f, 17.000000f, -10.575720f }, + 1.000000f, 0.000000f ); + // States -> vf_fire_on0 vf_fire_on vf_fire_of0 vf_fire_of + instance->registerEObj( "unknown_1", 2003318, 4484553, 4, { 23.178410f, 16.983280f, 0.137329f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_2", 2002735, 0, 4, { 25.786711f, 0.000000f, 0.119909f }, 1.000000f, -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4505837, 4, { 23.084200f, 0.000000f, -1.591900f }, 1.000000f, + -1.570796f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2003126, 4521780, 4, { -20.141510f, -0.000000f, -0.141697f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_3", 2002735, 0, 4, { -24.169260f, -18.905939f, -0.137390f }, 0.991760f, + -1.551983f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4509134, 4, { -22.072941f, -18.814390f, -0.320496f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_4", 2002997, 0, 4, { -20.433430f, -18.936470f, 0.755735f }, 1.000000f, 0.000000f ); + instance->registerEObj( "LilyDoor", 2002915, 4484551, 4, { -28.152889f, 16.983280f, 0.015198f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgbg_f1d4_d1_gago1", 2002917, 4505698, 4, { -36.195190f, 16.983280f, -5.685384f }, + 0.991760f, 0.000048f ); + // States -> bg_gago1_on bg_gago1_off bg_gago1_out + instance->registerEObj( "Crystalball", 2002916, 4488372, 4, { 28.044069f, 16.983280f, 0.168350f }, 0.991760f, + 0.811345f ); + instance->registerEObj( "sgbg_f1d4_d1_gago1_1", 2003319, 4544200, 4, { -36.143250f, 17.000000f, 7.445584f }, + 1.000000f, 0.000000f ); + // States -> bg_gago1_on bg_gago1_off bg_gago1_out + instance->registerEObj( "Lockeddoor", 2003315, 4484546, 4, { 15.988830f, 17.000000f, -82.166763f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Tinykey", 2003312, 0, 4, { 23.053480f, 17.000000f, -63.610909f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Lockeddoor_1", 2003316, 4484554, 4, { 0.701762f, 17.000000f, -96.124260f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Lockeddoor_2", 2003317, 4484573, 4, { -15.941600f, 17.000000f, -86.214546f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Tinykey_1", 2003314, 0, 4, { 11.497100f, 17.000000f, -97.655212f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Tinykey_2", 2003430, 0, 4, { -10.688510f, 17.000000f, -98.849060f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2002938, 4484560, 4, { 16.478939f, 0.000000f, -83.923622f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Crystalball_1", 2002941, 4488371, 4, { -43.455170f, -0.000000f, 13.580270f }, 1.000000f, + -1.392958f ); + instance->registerEObj( "RoseDoor", 2002943, 0, 4, { 27.084721f, -0.015320f, 0.045776f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Redkey", 2002942, 0, 4, { 58.672710f, 0.000000f, -30.483391f }, 1.000000f, -0.000345f ); + instance->registerEObj( "unknown_6", 2002937, 4484569, 4, { -16.476231f, 0.000000f, -69.988670f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2002944, 4499358, 4, { -16.603889f, 0.000000f, -68.606903f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2002945, 4499362, 4, { 16.527910f, 0.000000f, -85.147072f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Voidlamp", 2002939, 4488368, 4, { -29.871300f, -0.015320f, -70.456650f }, 0.991760f, + 1.074421f ); + // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 + instance->registerEObj( "Voidlamp_1", 2002940, 4488367, 4, { -17.039709f, 0.000000f, -84.537079f }, 1.000000f, + -1.569551f ); + // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 + instance->registerEObj( "Sealedbarrier", 2003321, 4545173, 4, { 29.337740f, 0.000000f, -1.101776f }, 1.000000f, + 0.000000f ); + // States -> bg_barrier1_on bg_barrier1_off bg_barrier1_out + instance->registerEObj( "Lockeddoor_3", 2003320, 4484571, 4, { 46.738281f, -0.015320f, -35.965580f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Tinykey_3", 2003313, 0, 4, { 43.982948f, 0.000000f, -34.342270f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_f1d4_v1_lmp1", 2003463, 4588435, 4, { -5.889304f, 0.000000f, -71.199730f }, 1.000000f, + 0.000000f ); + // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 + instance->registerEObj( "sgbg_f1d4_v1_lmp1_1", 2003464, 4588440, 4, { 6.823740f, 0.000000f, -82.895660f }, + 1.000000f, 0.000000f ); + // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 + instance->registerEObj( "sgbg_f1d4_v1_lmp1_2", 2003465, 4588441, 4, { 16.834749f, 0.000000f, -70.555031f }, + 1.000000f, 0.000000f ); + // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 + instance->registerEObj( "sgbg_f1d4_v1_lmp1_3", 2003466, 4588442, 4, { 27.007900f, 0.000000f, -82.771332f }, + 1.000000f, 0.000000f ); + // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 + instance->registerEObj( "sgbg_f1d4_v1_lmp1_4", 2003467, 4588444, 4, { 34.488140f, -0.000000f, -61.907959f }, + 1.000000f, 0.010569f ); + // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 + instance->registerEObj( "sgbg_f1d4_v1_lmp1_5", 2003468, 4588448, 4, { 48.546879f, 0.000000f, -53.979691f }, + 1.000000f, 0.009430f ); + // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 + instance->registerEObj( "sgbg_f1d4_v1_lmp1_6", 2003469, 4588445, 4, { 24.192520f, 0.000000f, -55.798260f }, + 1.000000f, 0.000000f ); + // States -> vf_slamp_on0 vf_slamp_of vf_slamp_hide vf_slamp_on1 + instance->registerEObj( "unknown_9", 2002951, 4486667, 4, { -25.301229f, -18.799990f, -33.673420f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2002952, 4486668, 4, { 1.978515f, -18.799990f, -34.167542f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2002953, 0, 4, { 25.467291f, -18.814390f, 33.859741f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2002954, 4486671, 4, { -2.139196f, -18.799990f, 34.235821f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Sealedbarrier_1", 2002955, 4508183, 4, { -25.881571f, -18.799999f, 0.041033f }, 1.000000f, + 0.000000f ); + // States -> bg_barrier1_on bg_barrier1_off bg_barrier1_out + instance->registerEObj( "unknown_13", 2003322, 4486669, 4, { 28.549561f, -18.799999f, -33.402039f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4488394, 5, { 73.319580f, -0.015320f, -0.015320f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 17.397711f, -18.804060f, 0.066881f }, 0.900200f, 0.000335f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 72.756577f, 0.000000f, 5.215310f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_14", 2002913, 0, 4, { 81.361702f, 0.249998f, -0.409441f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/HellsLid.cpp b/src/servers/Scripts/instances/dungeons/HellsLid.cpp index c2309cb4..96df6ce5 100644 --- a/src/servers/Scripts/instances/dungeons/HellsLid.cpp +++ b/src/servers/Scripts/instances/dungeons/HellsLid.cpp @@ -1,26 +1,29 @@ #include #include -class HellsLid : public InstanceContentScript +class HellsLid : + public InstanceContentScript { public: - HellsLid() : InstanceContentScript( 59 ) - { } + HellsLid() : + InstanceContentScript( 59 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/HullbreakerIsle.cpp b/src/servers/Scripts/instances/dungeons/HullbreakerIsle.cpp index 87446f15..e105e6eb 100644 --- a/src/servers/Scripts/instances/dungeons/HullbreakerIsle.cpp +++ b/src/servers/Scripts/instances/dungeons/HullbreakerIsle.cpp @@ -1,94 +1,142 @@ #include #include -class HullbreakerIsle : public InstanceContentScript +class HullbreakerIsle : + public InstanceContentScript { public: - HullbreakerIsle() : InstanceContentScript( 23 ) - { } + HullbreakerIsle() : + InstanceContentScript( 23 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_btl_b0485", 2004341, 4797423, 4, { -368.761902f, 1.900000f, 20.220869f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_1", 2004342, 4797424, 4, { -367.525085f, 1.900000f, 26.995680f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_2", 2004343, 4797425, 4, { -371.746185f, 1.900000f, 32.584270f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_3", 2004338, 4797426, 4, { -362.507385f, 1.900000f, 48.482269f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_4", 2004339, 4797427, 4, { -355.184601f, 1.899924f, 47.853260f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_5", 2004340, 4797428, 4, { -349.628601f, 1.899914f, 52.138340f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_6", 2004335, 4797429, 4, { -334.406708f, 1.899990f, 43.799950f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_7", 2004336, 4797430, 4, { -336.870087f, 1.900000f, 37.104382f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_8", 2004337, 4797431, 4, { -332.837006f, 1.900000f, 30.666309f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_9", 2004344, 4797421, 4, { -341.024414f, 1.880961f, 15.649740f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_10", 2004345, 4797419, 4, { -348.232788f, 1.900000f, 15.852800f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "sgvf_w_btl_b0485_11", 2004346, 4797422, 4, { -353.540588f, 1.899946f, 11.553900f }, 1.000000f, -0.000000f ); - // States -> omen fukidasi end_0f end_anm omen1 - instance->registerEObj( "Entrance", 2000182, 4685106, 5, { 320.642792f, 3.735552f, 302.314301f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_0", 2002735, 0, 4, { 220.874298f, 64.988159f, 13.046390f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4685143, 4, { 220.800797f, 64.801514f, 13.539410f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0250", 2004050, 4685147, 4, { 219.745102f, 64.682983f, -33.707211f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_w_transparent05", 2004049, 4685157, 4, { 219.958694f, 65.018677f, 47.991199f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2002735, 0, 4, { -60.079769f, 44.339741f, -124.669800f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4685162, 4, { -61.990799f, 44.123230f, -125.263000f }, 1.000000f, -1.570451f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2004051, 4685163, 4, { -98.791832f, 44.299992f, -124.783699f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002735, 0, 4, { -315.480286f, 1.957748f, 33.432499f }, 0.991760f, -1.184874f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4685167, 4, { -314.885803f, 1.999334f, 32.833080f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 325.360901f, 6.499028f, 292.726807f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2004052, 4584550, 4, { 165.269104f, 52.440060f, -190.280197f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Stonepedestal", 2004057, 4588393, 4, { 163.784195f, 52.706680f, -185.027100f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2004053, 4584553, 4, { -35.849411f, 44.986191f, -124.177696f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Stonepedestal_1", 2004058, 4588617, 4, { -32.145729f, 44.996059f, -118.336502f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Stonepedestal_2", 2004059, 4588610, 4, { -32.404221f, 44.937031f, -128.964096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -326.989685f, 2.000000f, 43.114891f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer", 2004074, 0, 4, { 191.947693f, 59.006939f, -163.899307f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_1", 2004075, 0, 4, { 194.472900f, 59.156731f, -165.022003f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_2", 2004076, 0, 4, { 196.017197f, 59.853050f, -161.548294f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_3", 2004077, 0, 4, { 198.798004f, 60.096630f, -162.115204f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_4", 2004078, 0, 4, { 199.929993f, 60.852970f, -158.189896f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_5", 2004079, 0, 4, { 203.014206f, 61.084290f, -158.453995f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Wildbananatree", 2004062, 4706914, 4, { 206.036896f, 65.302567f, -27.040119f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wildbananatree_1", 2004063, 4722842, 4, { 199.376907f, 64.682983f, -11.735090f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wildbananatree_2", 2004064, 4706915, 4, { 205.968002f, 64.690811f, 3.866779f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wildbananatree_3", 2004065, 4706916, 4, { 236.652100f, 64.927116f, -28.061340f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2004066, 0, 4, { 206.655502f, 65.036621f, -25.903111f }, 0.991760f, -1.260904f ); - instance->registerEObj( "unknown_6", 2004067, 0, 4, { 200.604294f, 64.690804f, -10.987260f }, 0.991760f, -0.736456f ); - instance->registerEObj( "unknown_7", 2004068, 0, 4, { 206.716095f, 64.690811f, 3.346290f }, 0.991760f, -0.921409f ); - instance->registerEObj( "unknown_8", 2004069, 0, 4, { 235.736603f, 64.682983f, -27.115360f }, 0.991760f, 0.613842f ); - instance->registerEObj( "unknown_9", 2004060, 4585424, 4, { -218.153107f, -0.000002f, -6.398464f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2004061, 4585624, 4, { -307.270905f, 4.409851f, 14.023010f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wildbananatree_4", 2004070, 4722840, 4, { 241.380005f, 64.956383f, -12.841170f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Wildbananatree_5", 2004071, 4706917, 4, { 234.644501f, 64.824364f, 2.652663f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2004072, 0, 4, { 239.884903f, 64.690811f, -12.610960f }, 1.000000f, 0.600320f ); - instance->registerEObj( "unknown_12", 2004073, 0, 4, { 233.623596f, 64.760551f, 2.089992f }, 1.000000f, 0.684586f ); - instance->registerEObj( "unknown_13", 2004129, 0, 4, { -80.000000f, 44.200001f, -124.500000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_btl_b0485", 2004341, 4797423, 4, { -368.761902f, 1.900000f, 20.220869f }, 1.000000f, + -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_1", 2004342, 4797424, 4, { -367.525085f, 1.900000f, 26.995680f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_2", 2004343, 4797425, 4, { -371.746185f, 1.900000f, 32.584270f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_3", 2004338, 4797426, 4, { -362.507385f, 1.900000f, 48.482269f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_4", 2004339, 4797427, 4, { -355.184601f, 1.899924f, 47.853260f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_5", 2004340, 4797428, 4, { -349.628601f, 1.899914f, 52.138340f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_6", 2004335, 4797429, 4, { -334.406708f, 1.899990f, 43.799950f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_7", 2004336, 4797430, 4, { -336.870087f, 1.900000f, 37.104382f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_8", 2004337, 4797431, 4, { -332.837006f, 1.900000f, 30.666309f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_9", 2004344, 4797421, 4, { -341.024414f, 1.880961f, 15.649740f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_10", 2004345, 4797419, 4, { -348.232788f, 1.900000f, 15.852800f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "sgvf_w_btl_b0485_11", 2004346, 4797422, 4, { -353.540588f, 1.899946f, 11.553900f }, + 1.000000f, -0.000000f ); + // States -> omen fukidasi end_0f end_anm omen1 + instance->registerEObj( "Entrance", 2000182, 4685106, 5, { 320.642792f, 3.735552f, 302.314301f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_0", 2002735, 0, 4, { 220.874298f, 64.988159f, 13.046390f }, 0.991760f, 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4685143, 4, { 220.800797f, 64.801514f, 13.539410f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0250", 2004050, 4685147, 4, { 219.745102f, 64.682983f, -33.707211f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_w_transparent05", 2004049, 4685157, 4, { 219.958694f, 65.018677f, 47.991199f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_1", 2002735, 0, 4, { -60.079769f, 44.339741f, -124.669800f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4685162, 4, { -61.990799f, 44.123230f, -125.263000f }, + 1.000000f, -1.570451f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2004051, 4685163, 4, { -98.791832f, 44.299992f, -124.783699f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002735, 0, 4, { -315.480286f, 1.957748f, 33.432499f }, 0.991760f, + -1.184874f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4685167, 4, { -314.885803f, 1.999334f, 32.833080f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 325.360901f, 6.499028f, 292.726807f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_3", 2004052, 4584550, 4, { 165.269104f, 52.440060f, -190.280197f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Stonepedestal", 2004057, 4588393, 4, { 163.784195f, 52.706680f, -185.027100f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2004053, 4584553, 4, { -35.849411f, 44.986191f, -124.177696f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Stonepedestal_1", 2004058, 4588617, 4, { -32.145729f, 44.996059f, -118.336502f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Stonepedestal_2", 2004059, 4588610, 4, { -32.404221f, 44.937031f, -128.964096f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -326.989685f, 2.000000f, 43.114891f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Treasurecoffer", 2004074, 0, 4, { 191.947693f, 59.006939f, -163.899307f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_1", 2004075, 0, 4, { 194.472900f, 59.156731f, -165.022003f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_2", 2004076, 0, 4, { 196.017197f, 59.853050f, -161.548294f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_3", 2004077, 0, 4, { 198.798004f, 60.096630f, -162.115204f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_4", 2004078, 0, 4, { 199.929993f, 60.852970f, -158.189896f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_5", 2004079, 0, 4, { 203.014206f, 61.084290f, -158.453995f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Wildbananatree", 2004062, 4706914, 4, { 206.036896f, 65.302567f, -27.040119f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Wildbananatree_1", 2004063, 4722842, 4, { 199.376907f, 64.682983f, -11.735090f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Wildbananatree_2", 2004064, 4706915, 4, { 205.968002f, 64.690811f, 3.866779f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Wildbananatree_3", 2004065, 4706916, 4, { 236.652100f, 64.927116f, -28.061340f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_5", 2004066, 0, 4, { 206.655502f, 65.036621f, -25.903111f }, 0.991760f, + -1.260904f ); + instance->registerEObj( "unknown_6", 2004067, 0, 4, { 200.604294f, 64.690804f, -10.987260f }, 0.991760f, + -0.736456f ); + instance->registerEObj( "unknown_7", 2004068, 0, 4, { 206.716095f, 64.690811f, 3.346290f }, 0.991760f, -0.921409f ); + instance->registerEObj( "unknown_8", 2004069, 0, 4, { 235.736603f, 64.682983f, -27.115360f }, 0.991760f, + 0.613842f ); + instance->registerEObj( "unknown_9", 2004060, 4585424, 4, { -218.153107f, -0.000002f, -6.398464f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2004061, 4585624, 4, { -307.270905f, 4.409851f, 14.023010f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Wildbananatree_4", 2004070, 4722840, 4, { 241.380005f, 64.956383f, -12.841170f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Wildbananatree_5", 2004071, 4706917, 4, { 234.644501f, 64.824364f, 2.652663f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2004072, 0, 4, { 239.884903f, 64.690811f, -12.610960f }, 1.000000f, + 0.600320f ); + instance->registerEObj( "unknown_12", 2004073, 0, 4, { 233.623596f, 64.760551f, 2.089992f }, 1.000000f, 0.684586f ); + instance->registerEObj( "unknown_13", 2004129, 0, 4, { -80.000000f, 44.200001f, -124.500000f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/HullbreakerIsleHard.cpp b/src/servers/Scripts/instances/dungeons/HullbreakerIsleHard.cpp index f3d16e4b..3d9d46b0 100644 --- a/src/servers/Scripts/instances/dungeons/HullbreakerIsleHard.cpp +++ b/src/servers/Scripts/instances/dungeons/HullbreakerIsleHard.cpp @@ -1,57 +1,82 @@ #include #include -class HullbreakerIsleHard : public InstanceContentScript +class HullbreakerIsleHard : + public InstanceContentScript { public: - HullbreakerIsleHard() : InstanceContentScript( 45 ) - { } + HullbreakerIsleHard() : + InstanceContentScript( 45 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -343.904602f, 7.822294f, 39.109711f }, 0.500000f, 0.498864f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6253922, 4, { -342.837006f, 6.196667f, 36.610142f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -360.775909f, 7.864089f, 68.887756f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer", 2007257, 0, 4, { -350.992401f, 7.892528f, 56.902512f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_1", 2007258, 0, 4, { -354.052490f, 7.892528f, 54.626640f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007359, 0, 4, { -352.179810f, 7.927567f, 63.128880f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6245769, 5, { 322.891693f, 3.635096f, 313.253510f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 328.376587f, 5.844693f, 298.411591f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007025, 6235928, 4, { 307.237701f, 11.852150f, 276.543915f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007026, 6240784, 4, { 286.591309f, 19.136169f, 239.456497f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007027, 6239711, 4, { 306.575897f, 31.887329f, 181.107697f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2007028, 6244799, 4, { 220.128998f, 63.509621f, 114.498398f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2007156, 6249693, 4, { 308.747314f, 51.440979f, 125.671898f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2007157, 6249706, 4, { 313.862793f, 51.438110f, 123.826897f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_8", 2007030, 6244507, 4, { 60.801022f, 85.774963f, -64.387527f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2007034, 6232348, 4, { -35.186840f, 44.985500f, -123.946198f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2007035, 6243845, 4, { -235.700607f, 0.607149f, 8.445139f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2007036, 6243848, 4, { -284.362396f, 0.606121f, 11.598470f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2007037, 6243852, 4, { -334.528412f, 1.244455f, 21.911160f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2002735, 0, 4, { 222.214600f, 65.079712f, 11.398440f }, 1.400000f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 6253107, 4, { 221.229599f, 65.079712f, 13.333970f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_14", 2007072, 6241286, 4, { 198.155396f, 64.976288f, -11.912840f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2002735, 0, 4, { -60.746220f, 44.327389f, -123.705002f }, 0.991760f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6253215, 4, { -58.605789f, 45.157280f, -124.548203f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2007073, 6253218, 4, { -102.000999f, 45.915119f, -123.827301f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_16", 2007260, 6252642, 4, { -76.831734f, 44.106281f, -123.152199f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -343.904602f, 7.822294f, 39.109711f }, 0.500000f, 0.498864f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6253922, 4, { -342.837006f, 6.196667f, 36.610142f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -360.775909f, 7.864089f, 68.887756f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Treasurecoffer", 2007257, 0, 4, { -350.992401f, 7.892528f, 56.902512f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_1", 2007258, 0, 4, { -354.052490f, 7.892528f, 54.626640f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2007359, 0, 4, { -352.179810f, 7.927567f, 63.128880f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6245769, 5, { 322.891693f, 3.635096f, 313.253510f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 328.376587f, 5.844693f, 298.411591f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007025, 6235928, 4, { 307.237701f, 11.852150f, 276.543915f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2007026, 6240784, 4, { 286.591309f, 19.136169f, 239.456497f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2007027, 6239711, 4, { 306.575897f, 31.887329f, 181.107697f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2007028, 6244799, 4, { 220.128998f, 63.509621f, 114.498398f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2007156, 6249693, 4, { 308.747314f, 51.440979f, 125.671898f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2007157, 6249706, 4, { 313.862793f, 51.438110f, 123.826897f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_8", 2007030, 6244507, 4, { 60.801022f, 85.774963f, -64.387527f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2007034, 6232348, 4, { -35.186840f, 44.985500f, -123.946198f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2007035, 6243845, 4, { -235.700607f, 0.607149f, 8.445139f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2007036, 6243848, 4, { -284.362396f, 0.606121f, 11.598470f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2007037, 6243852, 4, { -334.528412f, 1.244455f, 21.911160f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2002735, 0, 4, { 222.214600f, 65.079712f, 11.398440f }, 1.400000f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 6253107, 4, { 221.229599f, 65.079712f, 13.333970f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_14", 2007072, 6241286, 4, { 198.155396f, 64.976288f, -11.912840f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2002735, 0, 4, { -60.746220f, 44.327389f, -123.705002f }, 0.991760f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6253215, 4, { -58.605789f, 45.157280f, -124.548203f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2007073, 6253218, 4, { -102.000999f, 45.915119f, -123.827301f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_16", 2007260, 6252642, 4, { -76.831734f, 44.106281f, -123.152199f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/KuganeCastle.cpp b/src/servers/Scripts/instances/dungeons/KuganeCastle.cpp index 9e05a7ea..51ed857e 100644 --- a/src/servers/Scripts/instances/dungeons/KuganeCastle.cpp +++ b/src/servers/Scripts/instances/dungeons/KuganeCastle.cpp @@ -1,26 +1,29 @@ #include #include -class KuganeCastle : public InstanceContentScript +class KuganeCastle : + public InstanceContentScript { public: - KuganeCastle() : InstanceContentScript( 57 ) - { } + KuganeCastle() : + InstanceContentScript( 57 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/Neverreap.cpp b/src/servers/Scripts/instances/dungeons/Neverreap.cpp index d2bbf14f..5c525c42 100644 --- a/src/servers/Scripts/instances/dungeons/Neverreap.cpp +++ b/src/servers/Scripts/instances/dungeons/Neverreap.cpp @@ -1,26 +1,29 @@ #include #include -class Neverreap : public InstanceContentScript +class Neverreap : + public InstanceContentScript { public: - Neverreap() : InstanceContentScript( 33 ) - { } + Neverreap() : + InstanceContentScript( 33 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/PharosSirius.cpp b/src/servers/Scripts/instances/dungeons/PharosSirius.cpp index 013daa40..a07b2643 100644 --- a/src/servers/Scripts/instances/dungeons/PharosSirius.cpp +++ b/src/servers/Scripts/instances/dungeons/PharosSirius.cpp @@ -1,61 +1,85 @@ #include #include -class PharosSirius : public InstanceContentScript +class PharosSirius : + public InstanceContentScript { public: - PharosSirius() : InstanceContentScript( 17 ) - { } + PharosSirius() : + InstanceContentScript( 17 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2002718, 4378108, 5, { 88.730026f, 0.300000f, 69.993042f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_0", 2002719, 0, 4, { 118.749496f, 0.300000f, 70.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -18.275600f, 193.987900f, 0.000000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2002735, 0, 4, { 42.000000f, 30.001560f, -31.911860f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2002720, 4378115, 4, { 41.977539f, 30.001610f, -32.837688f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002723, 4391376, 4, { 23.849791f, 29.984011f, -56.015869f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2002735, 0, 4, { 21.750000f, 90.008011f, 0.000000f }, 1.000000f, -1.570796f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002721, 4378121, 4, { 20.298759f, 90.000008f, 0.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002724, 4378123, 4, { -20.870550f, 90.000008f, 0.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_4", 2002735, 0, 4, { 25.750000f, 194.136505f, 0.000000f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002722, 4378127, 4, { 24.286779f, 194.000000f, 0.000000f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 76.644943f, 0.300000f, 66.422493f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2002725, 4392603, 4, { -42.923710f, 29.984011f, -56.504211f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_6", 2002726, 4392604, 4, { -19.028080f, 36.148560f, -22.110350f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_7", 2002727, 4392605, 4, { 17.898800f, 44.388432f, -22.415590f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_8", 2002728, 4392606, 4, { 26.840580f, 52.091381f, 10.055660f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2002729, 4404469, 4, { -41.947140f, 29.984011f, 55.924320f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2002735, 0, 4, { 0.000000f, 140.000000f, 21.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002744, 4390583, 4, { 0.213522f, 139.893402f, 22.075270f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002743, 4390585, 4, { -0.033084f, 140.000000f, -20.026180f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_11", 2002742, 4390546, 4, { -11.093380f, 1.388489f, -23.453131f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Aethervalve", 2002730, 4392611, 4, { -0.015320f, 119.981598f, -32.913761f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Aethervalve_1", 2002731, 4392612, 4, { -0.076355f, 139.970901f, 42.618408f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2002787, 4395239, 4, { -38.345951f, 60.593510f, 21.011600f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_13", 2003436, 4406574, 4, { 41.813019f, 29.999941f, -29.969271f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2003032, 0, 4, { 42.000000f, 30.000771f, -59.314499f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2003033, 0, 4, { 42.000000f, 30.000771f, -56.244320f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2003034, 0, 4, { 42.000000f, 30.000771f, -51.724258f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2002718, 4378108, 5, { 88.730026f, 0.300000f, 69.993042f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_0", 2002719, 0, 4, { 118.749496f, 0.300000f, 70.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -18.275600f, 193.987900f, 0.000000f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_1", 2002735, 0, 4, { 42.000000f, 30.001560f, -31.911860f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2002720, 4378115, 4, { 41.977539f, 30.001610f, -32.837688f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002723, 4391376, 4, { 23.849791f, 29.984011f, -56.015869f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2002735, 0, 4, { 21.750000f, 90.008011f, 0.000000f }, 1.000000f, -1.570796f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002721, 4378121, 4, { 20.298759f, 90.000008f, 0.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002724, 4378123, 4, { -20.870550f, 90.000008f, 0.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_4", 2002735, 0, 4, { 25.750000f, 194.136505f, 0.000000f }, 1.000000f, -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002722, 4378127, 4, { 24.286779f, 194.000000f, 0.000000f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 76.644943f, 0.300000f, 66.422493f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_5", 2002725, 4392603, 4, { -42.923710f, 29.984011f, -56.504211f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_6", 2002726, 4392604, 4, { -19.028080f, 36.148560f, -22.110350f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_7", 2002727, 4392605, 4, { 17.898800f, 44.388432f, -22.415590f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_8", 2002728, 4392606, 4, { 26.840580f, 52.091381f, 10.055660f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2002729, 4404469, 4, { -41.947140f, 29.984011f, 55.924320f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2002735, 0, 4, { 0.000000f, 140.000000f, 21.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002744, 4390583, 4, { 0.213522f, 139.893402f, 22.075270f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002743, 4390585, 4, { -0.033084f, 140.000000f, -20.026180f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_11", 2002742, 4390546, 4, { -11.093380f, 1.388489f, -23.453131f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Aethervalve", 2002730, 4392611, 4, { -0.015320f, 119.981598f, -32.913761f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Aethervalve_1", 2002731, 4392612, 4, { -0.076355f, 139.970901f, 42.618408f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2002787, 4395239, 4, { -38.345951f, 60.593510f, 21.011600f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_13", 2003436, 4406574, 4, { 41.813019f, 29.999941f, -29.969271f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2003032, 0, 4, { 42.000000f, 30.000771f, -59.314499f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2003033, 0, 4, { 42.000000f, 30.000771f, -56.244320f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2003034, 0, 4, { 42.000000f, 30.000771f, -51.724258f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/PharosSiriusHard.cpp b/src/servers/Scripts/instances/dungeons/PharosSiriusHard.cpp index 8d7e4864..fb5c5d9f 100644 --- a/src/servers/Scripts/instances/dungeons/PharosSiriusHard.cpp +++ b/src/servers/Scripts/instances/dungeons/PharosSiriusHard.cpp @@ -1,58 +1,82 @@ #include #include -class PharosSiriusHard : public InstanceContentScript +class PharosSiriusHard : + public InstanceContentScript { public: - PharosSiriusHard() : InstanceContentScript( 40 ) - { } + PharosSiriusHard() : + InstanceContentScript( 40 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 5963936, 4, { -1.480164f, 93.003777f, -23.788879f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -0.228943f, 93.016541f, -22.052860f }, 0.869751f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5963943, 4, { 21.051910f, 90.039482f, -0.641622f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2006551, 0, 4, { 6.820740f, 90.135010f, -0.717224f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 5963945, 4, { 20.515039f, 30.001440f, -55.973820f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002735, 0, 4, { 21.438900f, 30.001369f, -55.832821f }, 0.869751f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5963948, 4, { 60.977539f, 30.000811f, -56.096581f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_3", 2006563, 0, 4, { 42.160641f, 29.984011f, -60.227360f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 5963970, 4, { -95.386551f, -5.551003f, -272.570099f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_4", 2002735, 0, 4, { -95.423126f, -5.551003f, -271.765991f }, 1.000000f, -0.005750f ); - instance->registerEObj( "Entrance", 2000182, 5963633, 5, { 39.155338f, 189.990097f, -2.100519f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 39.255451f, 188.130096f, -17.964260f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -95.418854f, -5.446677f, -305.998199f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2006461, 5961306, 4, { -42.092682f, 170.000000f, 1.321840f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2006462, 5961309, 4, { 0.142279f, 160.000000f, 41.544201f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2006463, 5965424, 4, { 1.331733f, 158.160294f, 25.044350f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2006464, 5964060, 4, { 0.116699f, 139.949997f, -18.497431f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Candlekeepkey", 2006467, 0, 4, { 13.504210f, 29.984011f, -54.795170f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Lockeddoor", 2006470, 5955784, 4, { 15.219990f, 31.371090f, -56.250301f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2006465, 5963843, 4, { 32.070061f, 72.230629f, -55.058460f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2006466, 5965844, 4, { -0.253021f, 39.999969f, -21.544781f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Port3526", 2006471, 5960472, 4, { -16.647579f, 7.686357f, -153.002304f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Port3524", 2006472, 5960468, 4, { -94.266373f, -0.598898f, -227.302200f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_11", 2006528, 5967682, 4, { 10.338900f, 10.519330f, -124.110298f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2006564, 5967692, 4, { -3.081049f, 5.016401f, -212.859802f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_collison_only", 2002618, 5993225, 4, { 0.231439f, 90.039482f, -21.072599f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 5963936, 4, { -1.480164f, 93.003777f, -23.788879f }, 0.991760f, + 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -0.228943f, 93.016541f, -22.052860f }, 0.869751f, 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5963943, 4, { 21.051910f, 90.039482f, -0.641622f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2006551, 0, 4, { 6.820740f, 90.135010f, -0.717224f }, 0.991760f, 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 5963945, 4, { 20.515039f, 30.001440f, -55.973820f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002735, 0, 4, { 21.438900f, 30.001369f, -55.832821f }, 0.869751f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5963948, 4, { 60.977539f, 30.000811f, -56.096581f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_3", 2006563, 0, 4, { 42.160641f, 29.984011f, -60.227360f }, 0.991760f, 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 5963970, 4, { -95.386551f, -5.551003f, -272.570099f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_4", 2002735, 0, 4, { -95.423126f, -5.551003f, -271.765991f }, 1.000000f, + -0.005750f ); + instance->registerEObj( "Entrance", 2000182, 5963633, 5, { 39.155338f, 189.990097f, -2.100519f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 39.255451f, 188.130096f, -17.964260f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -95.418854f, -5.446677f, -305.998199f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_5", 2006461, 5961306, 4, { -42.092682f, 170.000000f, 1.321840f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2006462, 5961309, 4, { 0.142279f, 160.000000f, 41.544201f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2006463, 5965424, 4, { 1.331733f, 158.160294f, 25.044350f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2006464, 5964060, 4, { 0.116699f, 139.949997f, -18.497431f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Candlekeepkey", 2006467, 0, 4, { 13.504210f, 29.984011f, -54.795170f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Lockeddoor", 2006470, 5955784, 4, { 15.219990f, 31.371090f, -56.250301f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2006465, 5963843, 4, { 32.070061f, 72.230629f, -55.058460f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2006466, 5965844, 4, { -0.253021f, 39.999969f, -21.544781f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Port3526", 2006471, 5960472, 4, { -16.647579f, 7.686357f, -153.002304f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Port3524", 2006472, 5960468, 4, { -94.266373f, -0.598898f, -227.302200f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_11", 2006528, 5967682, 4, { 10.338900f, 10.519330f, -124.110298f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2006564, 5967692, 4, { -3.081049f, 5.016401f, -212.859802f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_collison_only", 2002618, 5993225, 4, { 0.231439f, 90.039482f, -21.072599f }, + 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/SaintMociannesArboretum.cpp b/src/servers/Scripts/instances/dungeons/SaintMociannesArboretum.cpp index bc4139bb..bf12946f 100644 --- a/src/servers/Scripts/instances/dungeons/SaintMociannesArboretum.cpp +++ b/src/servers/Scripts/instances/dungeons/SaintMociannesArboretum.cpp @@ -1,26 +1,29 @@ #include #include -class SaintMociannesArboretum : public InstanceContentScript +class SaintMociannesArboretum : + public InstanceContentScript { public: - SaintMociannesArboretum() : InstanceContentScript( 41 ) - { } + SaintMociannesArboretum() : + InstanceContentScript( 41 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/Sastasha.cpp b/src/servers/Scripts/instances/dungeons/Sastasha.cpp index cfdd3837..5c0314fc 100644 --- a/src/servers/Scripts/instances/dungeons/Sastasha.cpp +++ b/src/servers/Scripts/instances/dungeons/Sastasha.cpp @@ -2,76 +2,119 @@ #include #include -class Sastasha : public InstanceContentScript +class Sastasha : + public InstanceContentScript { public: - Sastasha() : InstanceContentScript( 4 ) - { } + Sastasha() : + InstanceContentScript( 4 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2000211, 0, 4, { 367.827087f, 47.400051f, -226.694305f }, 4.714991f, 0.000432f ); - instance->registerEObj( "sgvf_w_lvd_b0250", 2001504, 4323996, 4, { 94.597588f, 26.865030f, -68.584061f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0249", 2001505, 4323997, 4, { 95.510597f, 26.620729f, -67.853653f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "unknown_1", 2001506, 3653862, 4, { -9.239832f, 24.789940f, 35.778252f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0094", 2001507, 4035750, 4, { -2.841087f, 23.114571f, 38.090420f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "unknown_2", 2001539, 3653864, 4, { -158.560898f, 8.099012f, 214.344803f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001540, 4056793, 4, { -163.598602f, 8.026373f, 214.030106f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgpl_s1d1_bosswall", 2001508, 4236989, 4, { -303.983612f, 5.576412f, 276.214111f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1d1_bossline", 2001509, 4236990, 4, { -305.302002f, 5.542851f, 275.750885f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4096706, 5, { 361.881714f, 46.092751f, -225.181305f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 344.705688f, 43.781551f, -217.365997f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -314.279114f, 5.630589f, 348.735596f }, 0.900235f, 0.000336f ); - instance->registerEObj( "Bluecoralformation", 2000213, 3668215, 4, { 75.869797f, 35.101421f, -32.537209f }, 0.930753f, 0.000240f ); - instance->registerEObj( "Redcoralformation", 2000214, 3668214, 4, { 88.769371f, 31.135691f, -40.869640f }, 0.930753f, 0.000240f ); - instance->registerEObj( "Greencoralformation", 2000215, 3668216, 4, { 64.988159f, 33.672821f, -56.690559f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Inconspicuousswitch", 2000216, 3653858, 4, { 62.907951f, 33.969521f, -31.172279f }, 1.000000f, -1.396264f ); - instance->registerEObj( "Hiddendoor", 2000217, 3653517, 4, { 59.000000f, 32.000000f, -35.000000f }, 1.000000f, -2.007129f ); - instance->registerEObj( "Giantclam", 2000222, 4208408, 4, { 181.170303f, 32.104599f, -128.069000f }, 0.991789f, -0.862350f ); - // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close - instance->registerEObj( "sgbg_s1d1_p1_shel1", 2000260, 4208409, 4, { 166.318695f, 30.735420f, -128.312103f }, 0.991789f, 0.481030f ); - // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close - instance->registerEObj( "sgbg_s1d1_p1_shel1_1", 2000261, 4208410, 4, { 158.800598f, 28.586321f, -76.340927f }, 0.991789f, 1.471638f ); - // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close - instance->registerEObj( "sgbg_s1d1_p1_shel1_2", 2000262, 4208411, 4, { 125.463402f, 29.260550f, -51.934608f }, 0.991789f, -0.375975f ); - // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close - instance->registerEObj( "sgbg_s1d1_p1_shel1_3", 2000263, 4208412, 4, { 126.070198f, 28.913260f, -99.908722f }, 1.000000f, 0.020540f ); - // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close - instance->registerEObj( "sgbg_s1d1_p1_shel1_4", 2000264, 4208413, 4, { 97.055313f, 27.081551f, -70.264381f }, 0.991789f, -0.618915f ); - // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close - instance->registerEObj( "Bloodymemo", 2000212, 0, 4, { 320.812988f, 47.862450f, -130.776306f }, 0.600000f, -0.898762f ); - instance->registerEObj( "Bloodymemo_1", 2001548, 0, 4, { 320.812988f, 47.862450f, -130.776306f }, 0.600000f, -0.898762f ); - instance->registerEObj( "Bloodymemo_2", 2001549, 0, 4, { 320.812988f, 47.862450f, -130.776306f }, 0.600000f, -0.898762f ); - instance->registerEObj( "Rambadedoor", 2000225, 3653865, 4, { -35.299999f, 24.000000f, 60.799999f }, 1.000000f, -2.007129f ); - instance->registerEObj( "Captainsquarters", 2000227, 3687697, 4, { -95.044670f, 20.513069f, 172.039597f }, 0.991789f, 0.000048f ); - instance->registerEObj( "WaveriderGate", 2000231, 3655909, 4, { -130.600006f, 16.000000f, 156.800003f }, 1.000000f, -2.007129f ); - instance->registerEObj( "TheHole", 2000232, 3656260, 4, { -36.000000f, 16.500000f, 163.300003f }, 1.000000f, 1.047198f ); - instance->registerEObj( "Rambadedoor_1", 2000236, 3655908, 4, { -190.000000f, 7.000000f, 252.000000f }, 1.000000f, -2.443461f ); - instance->registerEObj( "unknown_3", 2000235, 3656262, 4, { -156.500000f, 8.600000f, 252.500000f }, 1.000000f, 1.134464f ); - instance->registerEObj( "WaveriderGatekey", 2000255, 0, 4, { -95.515343f, 20.000000f, 177.197800f }, 1.000000f, 0.000000f ); - instance->registerEObj( "KeytotheHole", 2000256, 0, 4, { -38.076599f, 17.232731f, 158.839401f }, 0.991760f, 1.561760f ); - instance->registerEObj( "Captainsquarterskey", 2000250, 0, 4, { -100.625000f, 15.600010f, 137.150696f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1d1_sghit_ctrl", 2000223, 4200832, 4, { -24.018980f, 18.475060f, 111.404900f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Unnaturalripples", 2000405, 3992454, 4, { -301.973206f, 6.500000f, 300.029388f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Unnaturalripples_1", 2000406, 3992452, 4, { -302.037598f, 6.500000f, 336.047302f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Unnaturalripples_2", 2000407, 3992449, 4, { -338.036499f, 6.500000f, 300.206512f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Unnaturalripples_3", 2000408, 3992453, 4, { -337.929596f, 6.500000f, 335.975311f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2000211, 0, 4, { 367.827087f, 47.400051f, -226.694305f }, 4.714991f, + 0.000432f ); + instance->registerEObj( "sgvf_w_lvd_b0250", 2001504, 4323996, 4, { 94.597588f, 26.865030f, -68.584061f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0249", 2001505, 4323997, 4, { 95.510597f, 26.620729f, -67.853653f }, 1.000000f, + 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "unknown_1", 2001506, 3653862, 4, { -9.239832f, 24.789940f, 35.778252f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0094", 2001507, 4035750, 4, { -2.841087f, 23.114571f, 38.090420f }, 0.991760f, + 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "unknown_2", 2001539, 3653864, 4, { -158.560898f, 8.099012f, 214.344803f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001540, 4056793, 4, { -163.598602f, 8.026373f, 214.030106f }, + 0.991760f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgpl_s1d1_bosswall", 2001508, 4236989, 4, { -303.983612f, 5.576412f, 276.214111f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_s1d1_bossline", 2001509, 4236990, 4, { -305.302002f, 5.542851f, 275.750885f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4096706, 5, { 361.881714f, 46.092751f, -225.181305f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 344.705688f, 43.781551f, -217.365997f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -314.279114f, 5.630589f, 348.735596f }, 0.900235f, 0.000336f ); + instance->registerEObj( "Bluecoralformation", 2000213, 3668215, 4, { 75.869797f, 35.101421f, -32.537209f }, + 0.930753f, 0.000240f ); + instance->registerEObj( "Redcoralformation", 2000214, 3668214, 4, { 88.769371f, 31.135691f, -40.869640f }, + 0.930753f, 0.000240f ); + instance->registerEObj( "Greencoralformation", 2000215, 3668216, 4, { 64.988159f, 33.672821f, -56.690559f }, + 0.991789f, 0.000048f ); + instance->registerEObj( "Inconspicuousswitch", 2000216, 3653858, 4, { 62.907951f, 33.969521f, -31.172279f }, + 1.000000f, -1.396264f ); + instance->registerEObj( "Hiddendoor", 2000217, 3653517, 4, { 59.000000f, 32.000000f, -35.000000f }, 1.000000f, + -2.007129f ); + instance->registerEObj( "Giantclam", 2000222, 4208408, 4, { 181.170303f, 32.104599f, -128.069000f }, 0.991789f, + -0.862350f ); + // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close + instance->registerEObj( "sgbg_s1d1_p1_shel1", 2000260, 4208409, 4, { 166.318695f, 30.735420f, -128.312103f }, + 0.991789f, 0.481030f ); + // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close + instance->registerEObj( "sgbg_s1d1_p1_shel1_1", 2000261, 4208410, 4, { 158.800598f, 28.586321f, -76.340927f }, + 0.991789f, 1.471638f ); + // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close + instance->registerEObj( "sgbg_s1d1_p1_shel1_2", 2000262, 4208411, 4, { 125.463402f, 29.260550f, -51.934608f }, + 0.991789f, -0.375975f ); + // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close + instance->registerEObj( "sgbg_s1d1_p1_shel1_3", 2000263, 4208412, 4, { 126.070198f, 28.913260f, -99.908722f }, + 1.000000f, 0.020540f ); + // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close + instance->registerEObj( "sgbg_s1d1_p1_shel1_4", 2000264, 4208413, 4, { 97.055313f, 27.081551f, -70.264381f }, + 0.991789f, -0.618915f ); + // States -> vf_kai_off vf_kai_on vf_kai_pop close_open open_close + instance->registerEObj( "Bloodymemo", 2000212, 0, 4, { 320.812988f, 47.862450f, -130.776306f }, 0.600000f, + -0.898762f ); + instance->registerEObj( "Bloodymemo_1", 2001548, 0, 4, { 320.812988f, 47.862450f, -130.776306f }, 0.600000f, + -0.898762f ); + instance->registerEObj( "Bloodymemo_2", 2001549, 0, 4, { 320.812988f, 47.862450f, -130.776306f }, 0.600000f, + -0.898762f ); + instance->registerEObj( "Rambadedoor", 2000225, 3653865, 4, { -35.299999f, 24.000000f, 60.799999f }, 1.000000f, + -2.007129f ); + instance->registerEObj( "Captainsquarters", 2000227, 3687697, 4, { -95.044670f, 20.513069f, 172.039597f }, + 0.991789f, 0.000048f ); + instance->registerEObj( "WaveriderGate", 2000231, 3655909, 4, { -130.600006f, 16.000000f, 156.800003f }, 1.000000f, + -2.007129f ); + instance->registerEObj( "TheHole", 2000232, 3656260, 4, { -36.000000f, 16.500000f, 163.300003f }, 1.000000f, + 1.047198f ); + instance->registerEObj( "Rambadedoor_1", 2000236, 3655908, 4, { -190.000000f, 7.000000f, 252.000000f }, 1.000000f, + -2.443461f ); + instance->registerEObj( "unknown_3", 2000235, 3656262, 4, { -156.500000f, 8.600000f, 252.500000f }, 1.000000f, + 1.134464f ); + instance->registerEObj( "WaveriderGatekey", 2000255, 0, 4, { -95.515343f, 20.000000f, 177.197800f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "KeytotheHole", 2000256, 0, 4, { -38.076599f, 17.232731f, 158.839401f }, 0.991760f, + 1.561760f ); + instance->registerEObj( "Captainsquarterskey", 2000250, 0, 4, { -100.625000f, 15.600010f, 137.150696f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_s1d1_sghit_ctrl", 2000223, 4200832, 4, { -24.018980f, 18.475060f, 111.404900f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Unnaturalripples", 2000405, 3992454, 4, { -301.973206f, 6.500000f, 300.029388f }, + 0.991789f, 0.000048f ); + instance->registerEObj( "Unnaturalripples_1", 2000406, 3992452, 4, { -302.037598f, 6.500000f, 336.047302f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Unnaturalripples_2", 2000407, 3992449, 4, { -338.036499f, 6.500000f, 300.206512f }, + 0.991789f, 0.000048f ); + instance->registerEObj( "Unnaturalripples_3", 2000408, 3992453, 4, { -337.929596f, 6.500000f, 335.975311f }, + 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/SastashaHard.cpp b/src/servers/Scripts/instances/dungeons/SastashaHard.cpp index 7be5da3f..c49b1d9d 100644 --- a/src/servers/Scripts/instances/dungeons/SastashaHard.cpp +++ b/src/servers/Scripts/instances/dungeons/SastashaHard.cpp @@ -1,66 +1,103 @@ #include #include -class SastashaHard : public InstanceContentScript +class SastashaHard : + public InstanceContentScript { public: - SastashaHard() : InstanceContentScript( 28 ) - { } + SastashaHard() : + InstanceContentScript( 28 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002735, 0, 4, { 157.165298f, 14.000000f, -65.283813f }, 1.000000f, 0.443513f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4887881, 4, { 157.156601f, 14.074050f, -62.918228f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4887882, 4, { 143.947693f, 14.031430f, -75.422539f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2002735, 0, 4, { -103.378998f, 15.750010f, 113.646400f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4887934, 4, { -102.988998f, 14.900710f, 111.903198f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002872, 4868757, 4, { -120.026100f, 15.610280f, 152.360199f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2002735, 0, 4, { -300.099213f, 5.569519f, 278.309296f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -326.124603f, 5.082251f, 320.072388f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2004421, 4769863, 4, { 228.091507f, 40.730598f, -164.119293f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Drainagepump", 2004406, 4768296, 4, { 179.233200f, 33.911160f, -25.225599f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2004405, 4768239, 4, { 164.693695f, 26.418791f, -51.467159f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2004407, 4877642, 4, { 116.227898f, 13.992490f, -60.624149f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_7", 2004408, 4867860, 4, { 94.502289f, 14.098320f, -72.764816f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2004409, 4867859, 4, { 61.426201f, 16.933029f, -87.107803f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2004410, 4878592, 4, { -14.773780f, 12.568780f, -21.590240f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2004411, 4878584, 4, { -34.366249f, 12.620500f, -10.794950f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2004412, 4878593, 4, { -38.197849f, 12.744050f, -32.694260f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2004422, 4770074, 4, { -47.051659f, 12.731530f, -15.329430f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2004413, 4878605, 4, { -75.129097f, 7.724828f, -3.396252f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2004414, 4878604, 4, { -67.776993f, 7.424381f, 10.125570f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2004415, 4878603, 4, { -74.879089f, 7.540010f, 24.726391f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2004416, 4878609, 4, { -92.286110f, 7.701883f, 26.123421f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2004417, 4878523, 4, { -103.974098f, 8.528216f, 17.928379f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2004418, 4878606, 4, { -107.137001f, 7.762873f, 7.250639f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2004419, 4878607, 4, { -97.134842f, 7.622185f, -4.976304f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2004420, 4878608, 4, { -83.913422f, 7.926591f, -9.813313f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2004423, 4770075, 4, { -84.640503f, 7.804197f, 29.907909f }, 1.000000f, 0.000000f ); - instance->registerEObj( "DoortoDeadMansDrink", 2004424, 4765267, 4, { -96.240341f, 19.268089f, 87.404861f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2004425, 4761283, 4, { -188.014496f, 7.483281f, 252.162704f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_23", 2004426, 4762024, 4, { -299.676086f, 5.576687f, 280.853699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_24", 2004429, 0, 4, { -302.662689f, 5.569519f, 269.489502f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_25", 2004441, 4765263, 4, { -130.635300f, 16.327169f, 156.933502f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_lvd_board_col_on_off", 2004428, 4890021, 4, { -295.493286f, 5.576687f, 275.610901f }, 1.000000f, 0.000000f ); - // States -> col_on col_off - instance->registerEObj( "Entrance", 2000182, 4878710, 5, { 347.674713f, 44.019909f, -221.552002f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 328.774994f, 44.119980f, -229.481705f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002735, 0, 4, { 157.165298f, 14.000000f, -65.283813f }, 1.000000f, + 0.443513f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4887881, 4, { 157.156601f, 14.074050f, -62.918228f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4887882, 4, { 143.947693f, 14.031430f, -75.422539f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2002735, 0, 4, { -103.378998f, 15.750010f, 113.646400f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4887934, 4, { -102.988998f, 14.900710f, 111.903198f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002872, 4868757, 4, { -120.026100f, 15.610280f, 152.360199f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2002735, 0, 4, { -300.099213f, 5.569519f, 278.309296f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -326.124603f, 5.082251f, 320.072388f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2004421, 4769863, 4, { 228.091507f, 40.730598f, -164.119293f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Drainagepump", 2004406, 4768296, 4, { 179.233200f, 33.911160f, -25.225599f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2004405, 4768239, 4, { 164.693695f, 26.418791f, -51.467159f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2004407, 4877642, 4, { 116.227898f, 13.992490f, -60.624149f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_7", 2004408, 4867860, 4, { 94.502289f, 14.098320f, -72.764816f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2004409, 4867859, 4, { 61.426201f, 16.933029f, -87.107803f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2004410, 4878592, 4, { -14.773780f, 12.568780f, -21.590240f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2004411, 4878584, 4, { -34.366249f, 12.620500f, -10.794950f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2004412, 4878593, 4, { -38.197849f, 12.744050f, -32.694260f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2004422, 4770074, 4, { -47.051659f, 12.731530f, -15.329430f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2004413, 4878605, 4, { -75.129097f, 7.724828f, -3.396252f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2004414, 4878604, 4, { -67.776993f, 7.424381f, 10.125570f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2004415, 4878603, 4, { -74.879089f, 7.540010f, 24.726391f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2004416, 4878609, 4, { -92.286110f, 7.701883f, 26.123421f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2004417, 4878523, 4, { -103.974098f, 8.528216f, 17.928379f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2004418, 4878606, 4, { -107.137001f, 7.762873f, 7.250639f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2004419, 4878607, 4, { -97.134842f, 7.622185f, -4.976304f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2004420, 4878608, 4, { -83.913422f, 7.926591f, -9.813313f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2004423, 4770075, 4, { -84.640503f, 7.804197f, 29.907909f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "DoortoDeadMansDrink", 2004424, 4765267, 4, { -96.240341f, 19.268089f, 87.404861f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_22", 2004425, 4761283, 4, { -188.014496f, 7.483281f, 252.162704f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_23", 2004426, 4762024, 4, { -299.676086f, 5.576687f, 280.853699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_24", 2004429, 0, 4, { -302.662689f, 5.569519f, 269.489502f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_25", 2004441, 4765263, 4, { -130.635300f, 16.327169f, 156.933502f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_lvd_board_col_on_off", 2004428, 4890021, 4, + { -295.493286f, 5.576687f, 275.610901f }, 1.000000f, 0.000000f ); + // States -> col_on col_off + instance->registerEObj( "Entrance", 2000182, 4878710, 5, { 347.674713f, 44.019909f, -221.552002f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 328.774994f, 44.119980f, -229.481705f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/ShisuioftheVioletTides.cpp b/src/servers/Scripts/instances/dungeons/ShisuioftheVioletTides.cpp index e9a87601..240f574d 100644 --- a/src/servers/Scripts/instances/dungeons/ShisuioftheVioletTides.cpp +++ b/src/servers/Scripts/instances/dungeons/ShisuioftheVioletTides.cpp @@ -1,26 +1,29 @@ #include #include -class ShisuioftheVioletTides : public InstanceContentScript +class ShisuioftheVioletTides : + public InstanceContentScript { public: - ShisuioftheVioletTides() : InstanceContentScript( 50 ) - { } + ShisuioftheVioletTides() : + InstanceContentScript( 50 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/Snowcloak.cpp b/src/servers/Scripts/instances/dungeons/Snowcloak.cpp index be8a3e9a..e4bf7996 100644 --- a/src/servers/Scripts/instances/dungeons/Snowcloak.cpp +++ b/src/servers/Scripts/instances/dungeons/Snowcloak.cpp @@ -1,72 +1,107 @@ #include #include -class Snowcloak : public InstanceContentScript +class Snowcloak : + public InstanceContentScript { public: - Snowcloak() : InstanceContentScript( 27 ) - { } + Snowcloak() : + InstanceContentScript( 27 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -25.554501f, 40.000000f, 65.525902f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4729361, 4, { -29.985430f, 40.000000f, 65.539711f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "DoortoSilence", 2004203, 4680394, 4, { 57.114368f, 4.480070f, -45.937630f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2004204, 4682554, 4, { 40.009041f, 0.491693f, -60.195160f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1d3_t2_ball1", 2004206, 4725471, 4, { 32.621071f, -4.715674f, -117.578201f }, 1.000000f, 0.000000f ); - // States -> s_ball_def s_ball_anim - instance->registerEObj( "sgbg_r1d3_t2_ball1_1", 2004206, 4731431, 4, { 5.652817f, -1.779197f, -107.755600f }, 1.000000f, 0.000000f ); - // States -> s_ball_def s_ball_anim - instance->registerEObj( "sgvf_r1d3_b0435", 2004208, 4895362, 4, { -30.982800f, -10.047770f, -162.841003f }, 1.000000f, 0.000000f ); - // States -> wind_sw_anim wind_def wind_strong wind_ws_anim - instance->registerEObj( "unknown_2", 2004209, 4685130, 4, { -39.827599f, -10.619430f, -155.585907f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_r1d3_b0435_1", 2004210, 4895363, 4, { -53.244961f, 3.577940f, -135.326797f }, 1.000000f, 0.000000f ); - // States -> wind_sw_anim wind_def wind_strong wind_ws_anim - instance->registerEObj( "unknown_3", 2004211, 4685137, 4, { -57.355659f, 4.520907f, -101.443703f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1d3_t2_ball1_2", 2004212, 4731432, 4, { -50.192619f, 6.129761f, -94.793358f }, 1.000000f, 0.000000f ); - // States -> s_ball_def s_ball_anim - instance->registerEObj( "sgvf_r1d3_b0435_2", 2004692, 5018298, 4, { 1.842873f, -9.975479f, -135.724899f }, 1.000000f, 0.000000f ); - // States -> wind_sw_anim wind_def wind_strong wind_ws_anim - instance->registerEObj( "unknown_4", 2004214, 4680578, 4, { -76.946297f, 28.400000f, -25.080601f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2004215, 4680579, 4, { -76.355118f, 28.400000f, -0.768542f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2004216, 4680574, 4, { -71.720413f, 28.400000f, 2.866590f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2004217, 4680909, 4, { -59.031670f, 28.399969f, 6.586658f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2004218, 4680572, 4, { -46.184601f, 27.650000f, 1.393153f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2004219, 4680571, 4, { -41.333439f, 28.400000f, -9.966988f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2004220, 4680577, 4, { -81.969833f, 38.540291f, -11.185970f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2004221, 4680576, 4, { -82.257988f, 38.540291f, -0.033865f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2004222, 4680575, 4, { -73.807869f, 38.540279f, 8.961772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2004223, 4680573, 4, { -44.264439f, 38.540291f, 9.105038f }, 1.000000f, 0.000000f ); - instance->registerEObj( "DoortoOblivion", 2004224, 4680395, 4, { -52.060501f, 40.000000f, 65.066193f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2002735, 0, 4, { 46.358002f, -2.246400f, -72.299896f }, 0.800000f, 0.554992f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4725552, 4, { 48.054039f, -2.500000f, -74.312141f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2004205, 4725555, 4, { 59.417969f, -1.480164f, -102.836304f }, 0.991760f, 0.126302f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_r1d3_b0498", 2004577, 4982369, 4, { 44.252331f, -2.500000f, -89.438400f }, 1.000000f, 0.000000f ); - // States -> ring_off ring_off_anim ring_pop ring_pop_anim - instance->registerEObj( "unknown_15", 2002735, 0, 4, { -79.379898f, 10.614600f, -109.116402f }, 1.000000f, -1.195699f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4725659, 4, { -83.147453f, 10.501150f, -112.069199f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2004213, 4725660, 4, { -107.265800f, 10.450760f, -103.052803f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Entrance", 2000182, 4725473, 5, { 116.416702f, -9.665442f, 114.240799f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 117.194199f, -11.854060f, 106.498703f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 18.403561f, 40.000000f, 67.026413f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -25.554501f, 40.000000f, 65.525902f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4729361, 4, { -29.985430f, 40.000000f, 65.539711f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "DoortoSilence", 2004203, 4680394, 4, { 57.114368f, 4.480070f, -45.937630f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2004204, 4682554, 4, { 40.009041f, 0.491693f, -60.195160f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_r1d3_t2_ball1", 2004206, 4725471, 4, { 32.621071f, -4.715674f, -117.578201f }, + 1.000000f, 0.000000f ); + // States -> s_ball_def s_ball_anim + instance->registerEObj( "sgbg_r1d3_t2_ball1_1", 2004206, 4731431, 4, { 5.652817f, -1.779197f, -107.755600f }, + 1.000000f, 0.000000f ); + // States -> s_ball_def s_ball_anim + instance->registerEObj( "sgvf_r1d3_b0435", 2004208, 4895362, 4, { -30.982800f, -10.047770f, -162.841003f }, + 1.000000f, 0.000000f ); + // States -> wind_sw_anim wind_def wind_strong wind_ws_anim + instance->registerEObj( "unknown_2", 2004209, 4685130, 4, { -39.827599f, -10.619430f, -155.585907f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_r1d3_b0435_1", 2004210, 4895363, 4, { -53.244961f, 3.577940f, -135.326797f }, + 1.000000f, 0.000000f ); + // States -> wind_sw_anim wind_def wind_strong wind_ws_anim + instance->registerEObj( "unknown_3", 2004211, 4685137, 4, { -57.355659f, 4.520907f, -101.443703f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_r1d3_t2_ball1_2", 2004212, 4731432, 4, { -50.192619f, 6.129761f, -94.793358f }, + 1.000000f, 0.000000f ); + // States -> s_ball_def s_ball_anim + instance->registerEObj( "sgvf_r1d3_b0435_2", 2004692, 5018298, 4, { 1.842873f, -9.975479f, -135.724899f }, + 1.000000f, 0.000000f ); + // States -> wind_sw_anim wind_def wind_strong wind_ws_anim + instance->registerEObj( "unknown_4", 2004214, 4680578, 4, { -76.946297f, 28.400000f, -25.080601f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2004215, 4680579, 4, { -76.355118f, 28.400000f, -0.768542f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2004216, 4680574, 4, { -71.720413f, 28.400000f, 2.866590f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2004217, 4680909, 4, { -59.031670f, 28.399969f, 6.586658f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2004218, 4680572, 4, { -46.184601f, 27.650000f, 1.393153f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2004219, 4680571, 4, { -41.333439f, 28.400000f, -9.966988f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2004220, 4680577, 4, { -81.969833f, 38.540291f, -11.185970f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2004221, 4680576, 4, { -82.257988f, 38.540291f, -0.033865f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2004222, 4680575, 4, { -73.807869f, 38.540279f, 8.961772f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2004223, 4680573, 4, { -44.264439f, 38.540291f, 9.105038f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "DoortoOblivion", 2004224, 4680395, 4, { -52.060501f, 40.000000f, 65.066193f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2002735, 0, 4, { 46.358002f, -2.246400f, -72.299896f }, 0.800000f, + 0.554992f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4725552, 4, { 48.054039f, -2.500000f, -74.312141f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2004205, 4725555, 4, { 59.417969f, -1.480164f, -102.836304f }, + 0.991760f, 0.126302f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_r1d3_b0498", 2004577, 4982369, 4, { 44.252331f, -2.500000f, -89.438400f }, 1.000000f, + 0.000000f ); + // States -> ring_off ring_off_anim ring_pop ring_pop_anim + instance->registerEObj( "unknown_15", 2002735, 0, 4, { -79.379898f, 10.614600f, -109.116402f }, 1.000000f, + -1.195699f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4725659, 4, { -83.147453f, 10.501150f, -112.069199f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2004213, 4725660, 4, { -107.265800f, 10.450760f, -103.052803f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Entrance", 2000182, 4725473, 5, { 116.416702f, -9.665442f, 114.240799f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 117.194199f, -11.854060f, 106.498703f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 18.403561f, 40.000000f, 67.026413f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/SohmAl.cpp b/src/servers/Scripts/instances/dungeons/SohmAl.cpp index f599cfbe..ce0a4a8d 100644 --- a/src/servers/Scripts/instances/dungeons/SohmAl.cpp +++ b/src/servers/Scripts/instances/dungeons/SohmAl.cpp @@ -1,26 +1,29 @@ #include #include -class SohmAl : public InstanceContentScript +class SohmAl : + public InstanceContentScript { public: - SohmAl() : InstanceContentScript( 37 ) - { } + SohmAl() : + InstanceContentScript( 37 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/SohmAlHard.cpp b/src/servers/Scripts/instances/dungeons/SohmAlHard.cpp index d42d75c1..091d3cb1 100644 --- a/src/servers/Scripts/instances/dungeons/SohmAlHard.cpp +++ b/src/servers/Scripts/instances/dungeons/SohmAlHard.cpp @@ -1,26 +1,29 @@ #include #include -class SohmAlHard : public InstanceContentScript +class SohmAlHard : + public InstanceContentScript { public: - SohmAlHard() : InstanceContentScript( 49 ) - { } + SohmAlHard() : + InstanceContentScript( 49 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/SohrKhai.cpp b/src/servers/Scripts/instances/dungeons/SohrKhai.cpp index 37a019f4..11ac00b9 100644 --- a/src/servers/Scripts/instances/dungeons/SohrKhai.cpp +++ b/src/servers/Scripts/instances/dungeons/SohrKhai.cpp @@ -1,26 +1,29 @@ #include #include -class SohrKhai : public InstanceContentScript +class SohrKhai : + public InstanceContentScript { public: - SohrKhai() : InstanceContentScript( 44 ) - { } + SohrKhai() : + InstanceContentScript( 44 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheAery.cpp b/src/servers/Scripts/instances/dungeons/TheAery.cpp index 8ee907bc..21ff18b3 100644 --- a/src/servers/Scripts/instances/dungeons/TheAery.cpp +++ b/src/servers/Scripts/instances/dungeons/TheAery.cpp @@ -1,26 +1,29 @@ #include #include -class TheAery : public InstanceContentScript +class TheAery : + public InstanceContentScript { public: - TheAery() : InstanceContentScript( 39 ) - { } + TheAery() : + InstanceContentScript( 39 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheAetherochemicalResearchFacility.cpp b/src/servers/Scripts/instances/dungeons/TheAetherochemicalResearchFacility.cpp index 357536eb..da1ab337 100644 --- a/src/servers/Scripts/instances/dungeons/TheAetherochemicalResearchFacility.cpp +++ b/src/servers/Scripts/instances/dungeons/TheAetherochemicalResearchFacility.cpp @@ -1,26 +1,29 @@ #include #include -class TheAetherochemicalResearchFacility : public InstanceContentScript +class TheAetherochemicalResearchFacility : + public InstanceContentScript { public: - TheAetherochemicalResearchFacility() : InstanceContentScript( 38 ) - { } + TheAetherochemicalResearchFacility() : + InstanceContentScript( 38 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheAntitower.cpp b/src/servers/Scripts/instances/dungeons/TheAntitower.cpp index d650014a..c572adf7 100644 --- a/src/servers/Scripts/instances/dungeons/TheAntitower.cpp +++ b/src/servers/Scripts/instances/dungeons/TheAntitower.cpp @@ -1,26 +1,29 @@ #include #include -class TheAntitower : public InstanceContentScript +class TheAntitower : + public InstanceContentScript { public: - TheAntitower() : InstanceContentScript( 43 ) - { } + TheAntitower() : + InstanceContentScript( 43 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheAurumVale.cpp b/src/servers/Scripts/instances/dungeons/TheAurumVale.cpp index a4272fa0..9333d849 100644 --- a/src/servers/Scripts/instances/dungeons/TheAurumVale.cpp +++ b/src/servers/Scripts/instances/dungeons/TheAurumVale.cpp @@ -1,48 +1,62 @@ #include #include -class TheAurumVale : public InstanceContentScript +class TheAurumVale : + public InstanceContentScript { public: - TheAurumVale() : InstanceContentScript( 5 ) - { } + TheAurumVale() : + InstanceContentScript( 5 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4246303, 5, { 158.558304f, -0.023911f, 81.249123f }, 1.000000f, 1.503130f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -410.069702f, -33.063400f, -116.395897f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 151.384796f, -1.596331f, 86.655884f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_0", 2000272, 3643401, 4, { -44.571659f, -16.218571f, -112.108101f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2000779, 4259184, 4, { 58.213131f, -9.300029f, -0.564636f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094", 2000780, 4259186, 4, { 58.539280f, -8.801913f, 4.282087f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0250", 2000785, 4259185, 4, { 34.952770f, -9.096572f, -23.527361f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2000273, 4248891, 4, { -333.089203f, -32.733212f, -161.730392f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000781, 4259189, 4, { -127.598099f, -30.310749f, -139.019302f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2000782, 4259188, 4, { -126.660500f, -30.285540f, -134.096695f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000786, 4259190, 4, { -169.906296f, -27.704550f, -169.152496f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2000783, 4246452, 4, { -374.789612f, -32.153561f, -140.808197f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_2", 2000784, 4246451, 4, { -372.679901f, -32.341091f, -136.354401f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4246303, 5, { 158.558304f, -0.023911f, 81.249123f }, 1.000000f, + 1.503130f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -410.069702f, -33.063400f, -116.395897f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 151.384796f, -1.596331f, 86.655884f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_0", 2000272, 3643401, 4, { -44.571659f, -16.218571f, -112.108101f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2000779, 4259184, 4, { 58.213131f, -9.300029f, -0.564636f }, 0.991760f, + 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094", 2000780, 4259186, 4, { 58.539280f, -8.801913f, 4.282087f }, 1.000000f, + 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0250", 2000785, 4259185, 4, { 34.952770f, -9.096572f, -23.527361f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2000273, 4248891, 4, { -333.089203f, -32.733212f, -161.730392f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000781, 4259189, 4, { -127.598099f, -30.310749f, -139.019302f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2000782, 4259188, 4, { -126.660500f, -30.285540f, -134.096695f }, + 1.000000f, 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000786, 4259190, 4, { -169.906296f, -27.704550f, -169.152496f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2000783, 4246452, 4, { -374.789612f, -32.153561f, -140.808197f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_2", 2000784, 4246451, 4, { -372.679901f, -32.341091f, -136.354401f }, + 1.000000f, 0.000000f ); + // States -> vf_line_on vf_line_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheDrownedCityofSkalla.cpp b/src/servers/Scripts/instances/dungeons/TheDrownedCityofSkalla.cpp index 785ff5e3..0ddb3298 100644 --- a/src/servers/Scripts/instances/dungeons/TheDrownedCityofSkalla.cpp +++ b/src/servers/Scripts/instances/dungeons/TheDrownedCityofSkalla.cpp @@ -1,26 +1,29 @@ #include #include -class TheDrownedCityofSkalla : public InstanceContentScript +class TheDrownedCityofSkalla : + public InstanceContentScript { public: - TheDrownedCityofSkalla() : InstanceContentScript( 58 ) - { } + TheDrownedCityofSkalla() : + InstanceContentScript( 58 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheDuskVigil.cpp b/src/servers/Scripts/instances/dungeons/TheDuskVigil.cpp index 73284952..740353ae 100644 --- a/src/servers/Scripts/instances/dungeons/TheDuskVigil.cpp +++ b/src/servers/Scripts/instances/dungeons/TheDuskVigil.cpp @@ -1,26 +1,29 @@ #include #include -class TheDuskVigil : public InstanceContentScript +class TheDuskVigil : + public InstanceContentScript { public: - TheDuskVigil() : InstanceContentScript( 36 ) - { } + TheDuskVigil() : + InstanceContentScript( 36 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheFractalContinuum.cpp b/src/servers/Scripts/instances/dungeons/TheFractalContinuum.cpp index 16fbb68b..8b15827c 100644 --- a/src/servers/Scripts/instances/dungeons/TheFractalContinuum.cpp +++ b/src/servers/Scripts/instances/dungeons/TheFractalContinuum.cpp @@ -1,26 +1,29 @@ #include #include -class TheFractalContinuum : public InstanceContentScript +class TheFractalContinuum : + public InstanceContentScript { public: - TheFractalContinuum() : InstanceContentScript( 35 ) - { } + TheFractalContinuum() : + InstanceContentScript( 35 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheFractalContinuumHard.cpp b/src/servers/Scripts/instances/dungeons/TheFractalContinuumHard.cpp index 89992e90..ab5323b5 100644 --- a/src/servers/Scripts/instances/dungeons/TheFractalContinuumHard.cpp +++ b/src/servers/Scripts/instances/dungeons/TheFractalContinuumHard.cpp @@ -1,26 +1,29 @@ #include #include -class TheFractalContinuumHard : public InstanceContentScript +class TheFractalContinuumHard : + public InstanceContentScript { public: - TheFractalContinuumHard() : InstanceContentScript( 60 ) - { } + TheFractalContinuumHard() : + InstanceContentScript( 60 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheGreatGubalLibrary.cpp b/src/servers/Scripts/instances/dungeons/TheGreatGubalLibrary.cpp index e99ae513..1d6397be 100644 --- a/src/servers/Scripts/instances/dungeons/TheGreatGubalLibrary.cpp +++ b/src/servers/Scripts/instances/dungeons/TheGreatGubalLibrary.cpp @@ -1,26 +1,29 @@ #include #include -class TheGreatGubalLibrary : public InstanceContentScript +class TheGreatGubalLibrary : + public InstanceContentScript { public: - TheGreatGubalLibrary() : InstanceContentScript( 31 ) - { } + TheGreatGubalLibrary() : + InstanceContentScript( 31 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheGreatGubalLibraryHard.cpp b/src/servers/Scripts/instances/dungeons/TheGreatGubalLibraryHard.cpp index 02b29aba..7062d5c0 100644 --- a/src/servers/Scripts/instances/dungeons/TheGreatGubalLibraryHard.cpp +++ b/src/servers/Scripts/instances/dungeons/TheGreatGubalLibraryHard.cpp @@ -1,26 +1,29 @@ #include #include -class TheGreatGubalLibraryHard : public InstanceContentScript +class TheGreatGubalLibraryHard : + public InstanceContentScript { public: - TheGreatGubalLibraryHard() : InstanceContentScript( 47 ) - { } + TheGreatGubalLibraryHard() : + InstanceContentScript( 47 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheKeeperoftheLake.cpp b/src/servers/Scripts/instances/dungeons/TheKeeperoftheLake.cpp index e340c4dc..e49b3015 100644 --- a/src/servers/Scripts/instances/dungeons/TheKeeperoftheLake.cpp +++ b/src/servers/Scripts/instances/dungeons/TheKeeperoftheLake.cpp @@ -1,61 +1,88 @@ #include #include -class TheKeeperoftheLake : public InstanceContentScript +class TheKeeperoftheLake : + public InstanceContentScript { public: - TheKeeperoftheLake() : InstanceContentScript( 32 ) - { } + TheKeeperoftheLake() : + InstanceContentScript( 32 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -40.786701f, 641.215271f, -59.415600f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 5097808, 4, { -40.752449f, 641.160522f, -54.934898f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2004825, 5040985, 4, { 194.842896f, -0.000001f, -91.318947f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_l1d1_q1_arm04", 2004826, 5097903, 4, { 139.959106f, 4.489269f, -37.319328f }, 1.000000f, 0.000000f ); - // States -> arm04_def arm04_def_anim arm04_down arm04_down_anim - instance->registerEObj( "unknown_2", 2004828, 5041736, 4, { -97.215271f, 329.152313f, -129.564407f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekterminal", 2004829, 5073686, 4, { -104.691200f, 328.877686f, -135.171402f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2004830, 5054264, 4, { -85.465736f, 329.158203f, -114.917397f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2004831, 5054260, 4, { -74.450752f, 350.933899f, -163.969894f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2004832, 5054262, 4, { -68.565010f, 338.613892f, -210.672806f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2004833, 5041738, 4, { -36.703850f, 338.613892f, -209.867294f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal_1", 2004834, 5073702, 4, { -33.987030f, 338.612915f, -200.545197f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_7", 2004835, 5041733, 4, { -102.992203f, 338.700012f, -173.230301f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2004836, 5041740, 4, { -91.617867f, 338.742096f, -191.340103f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2004837, 5041734, 4, { -56.932819f, 338.613800f, -220.085907f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2004838, 5041739, 4, { -58.661549f, 338.321289f, -231.786407f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_l1d1_q1_arm02", 2004840, 5097049, 4, { 60.261662f, 608.420776f, -64.327179f }, 1.000000f, 0.000000f ); - // States -> arm02_def arm02_def_anim arm02_des arm02_des_anim - instance->registerEObj( "sgbg_l1d1_q1_arm03", 2004842, 5097050, 4, { -42.140709f, 637.801575f, -13.313470f }, 1.000000f, 0.000000f ); - // States -> arm03_def arm03_def_anim arm03_des arm03_des_anim - instance->registerEObj( "unknown_11", 2002735, 0, 4, { 36.823841f, 26.884010f, -25.290840f }, 1.000000f, 1.175128f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5072855, 4, { 40.635441f, 24.890421f, -26.286221f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2004827, 5072856, 4, { 5.803720f, 26.994020f, -14.402020f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_12", 2002735, 0, 4, { 8.333900f, 345.993805f, -169.028107f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5076365, 4, { 9.495131f, 345.449799f, -172.095505f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2004839, 5076366, 4, { 7.837297f, 345.993805f, -134.142197f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Entrance", 2000182, 5072285, 5, { 294.405701f, 3.332572f, -157.864304f }, 1.000000f, 0.079727f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -48.338951f, 641.026917f, -87.713493f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 279.041687f, 2.095404f, -159.624695f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -40.786701f, 641.215271f, -59.415600f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 5097808, 4, { -40.752449f, 641.160522f, -54.934898f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2004825, 5040985, 4, { 194.842896f, -0.000001f, -91.318947f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_l1d1_q1_arm04", 2004826, 5097903, 4, { 139.959106f, 4.489269f, -37.319328f }, + 1.000000f, 0.000000f ); + // States -> arm04_def arm04_def_anim arm04_down arm04_down_anim + instance->registerEObj( "unknown_2", 2004828, 5041736, 4, { -97.215271f, 329.152313f, -129.564407f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekterminal", 2004829, 5073686, 4, { -104.691200f, 328.877686f, -135.171402f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_3", 2004830, 5054264, 4, { -85.465736f, 329.158203f, -114.917397f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_4", 2004831, 5054260, 4, { -74.450752f, 350.933899f, -163.969894f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2004832, 5054262, 4, { -68.565010f, 338.613892f, -210.672806f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2004833, 5041738, 4, { -36.703850f, 338.613892f, -209.867294f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekterminal_1", 2004834, 5073702, 4, { -33.987030f, 338.612915f, -200.545197f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_7", 2004835, 5041733, 4, { -102.992203f, 338.700012f, -173.230301f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2004836, 5041740, 4, { -91.617867f, 338.742096f, -191.340103f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2004837, 5041734, 4, { -56.932819f, 338.613800f, -220.085907f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2004838, 5041739, 4, { -58.661549f, 338.321289f, -231.786407f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgbg_l1d1_q1_arm02", 2004840, 5097049, 4, { 60.261662f, 608.420776f, -64.327179f }, + 1.000000f, 0.000000f ); + // States -> arm02_def arm02_def_anim arm02_des arm02_des_anim + instance->registerEObj( "sgbg_l1d1_q1_arm03", 2004842, 5097050, 4, { -42.140709f, 637.801575f, -13.313470f }, + 1.000000f, 0.000000f ); + // States -> arm03_def arm03_def_anim arm03_des arm03_des_anim + instance->registerEObj( "unknown_11", 2002735, 0, 4, { 36.823841f, 26.884010f, -25.290840f }, 1.000000f, + 1.175128f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5072855, 4, { 40.635441f, 24.890421f, -26.286221f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2004827, 5072856, 4, { 5.803720f, 26.994020f, -14.402020f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_12", 2002735, 0, 4, { 8.333900f, 345.993805f, -169.028107f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5076365, 4, { 9.495131f, 345.449799f, -172.095505f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2004839, 5076366, 4, { 7.837297f, 345.993805f, -134.142197f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Entrance", 2000182, 5072285, 5, { 294.405701f, 3.332572f, -157.864304f }, 1.000000f, + 0.079727f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -48.338951f, 641.026917f, -87.713493f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 279.041687f, 2.095404f, -159.624695f }, 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheLostCityofAmdapor.cpp b/src/servers/Scripts/instances/dungeons/TheLostCityofAmdapor.cpp index 37f39068..b0d24236 100644 --- a/src/servers/Scripts/instances/dungeons/TheLostCityofAmdapor.cpp +++ b/src/servers/Scripts/instances/dungeons/TheLostCityofAmdapor.cpp @@ -1,81 +1,125 @@ #include #include -class TheLostCityofAmdapor : public InstanceContentScript +class TheLostCityofAmdapor : + public InstanceContentScript { public: - TheLostCityofAmdapor() : InstanceContentScript( 22 ) - { } + TheLostCityofAmdapor() : + InstanceContentScript( 22 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4579298, 4, { 9.791200f, -279.967285f, 21.616301f }, 0.700000f, -0.494801f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_0", 2002735, 0, 4, { 8.967742f, -279.844086f, 22.640949f }, 1.000000f, -0.407391f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -6.668615f, -279.989990f, -16.121090f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Diabolicalgate", 2003262, 0, 4, { -11.735310f, -279.600006f, 1.146639f }, 1.000000f, -0.357945f ); - instance->registerEObj( "Diabolicalgate_1", 2003263, 0, 4, { -5.801897f, -279.600006f, -2.180922f }, 1.000000f, -0.579334f ); - instance->registerEObj( "Diabolicalgate_2", 2003264, 0, 4, { -9.593593f, -279.600006f, 5.704061f }, 1.000000f, -0.499409f ); - instance->registerEObj( "Diabolicalgate_3", 2003265, 0, 4, { -3.149769f, -279.600006f, 2.478353f }, 1.000000f, -0.520267f ); - instance->registerEObj( "Dubiouscoffer", 2003266, 0, 4, { 8.612234f, -279.989990f, -20.760429f }, 1.000000f, 0.406471f ); - instance->registerEObj( "Dubiouscoffer_1", 2003267, 0, 4, { 20.769291f, -279.989990f, -8.610124f }, 1.000000f, 1.180338f ); - instance->registerEObj( "Dubiouscoffer_2", 2003268, 0, 4, { -20.776131f, -279.989990f, 8.642863f }, 0.991760f, -1.160291f ); - instance->registerEObj( "Dubiouscoffer_3", 2003269, 0, 4, { -20.738871f, -279.989990f, -8.552890f }, 1.000000f, -1.185745f ); - instance->registerEObj( "Dubiouscoffer_4", 2003270, 0, 4, { 20.683531f, -279.989990f, 8.612939f }, 1.000000f, 1.247274f ); - instance->registerEObj( "Dubiouscoffer_5", 2003271, 0, 4, { -8.611513f, -279.989990f, 20.715059f }, 1.000000f, -0.423025f ); - instance->registerEObj( "unknown_1", 2003361, 4538596, 4, { 146.386597f, 68.131821f, -32.655411f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_2", 2003431, 4577623, 4, { 141.929794f, 66.690971f, -22.680590f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2003362, 4577620, 4, { 124.650101f, 58.000000f, 21.475590f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer", 2003800, 0, 4, { 125.169800f, 58.259232f, 24.765381f }, 0.991760f, -1.568190f ); - instance->registerEObj( "unknown_4", 2003364, 4538597, 4, { 1.248910f, 34.305920f, -96.145103f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2003432, 4577625, 4, { 7.652231f, 33.999989f, -83.909409f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_f1d5_a3_kin03", 2003365, 4572307, 4, { 16.420071f, 30.172510f, -53.162449f }, 1.000000f, 0.000000f ); - // States -> plant_def plant_action_anim - instance->registerEObj( "sgvf_f1d5_b0360", 2003366, 4629067, 4, { 13.762910f, 27.170670f, -29.499069f }, 1.000000f, 0.000000f ); - // States -> liq_def liq_on liq_on_anim liq_off_anim - instance->registerEObj( "unknown_6", 2003367, 4577622, 4, { -35.077301f, 20.181410f, -5.543382f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_f1d5_a3_kin03_1", 2003368, 4572310, 4, { -36.282841f, 10.771230f, 27.777269f }, 1.000000f, 0.000000f ); - // States -> plant_def plant_action_anim - instance->registerEObj( "sgvf_f1d5_b0359", 2003369, 4629073, 4, { -38.452469f, 10.771230f, 26.955620f }, 1.000000f, 0.000000f ); - // States -> liq_def liq_on liq_on_anim liq_off_anim - instance->registerEObj( "unknown_7", 2003370, 4538791, 4, { 11.000470f, 7.980469f, 18.231581f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d5_a3_kin03_2", 2003371, 4572309, 4, { 15.090590f, 6.133745f, 32.735611f }, 1.000000f, 0.000000f ); - // States -> plant_def plant_action_anim - instance->registerEObj( "sgvf_f1d5_b0358", 2003372, 4629074, 4, { 11.812460f, 6.045094f, 32.012810f }, 1.000000f, 0.000000f ); - // States -> liq_def liq_on liq_on_anim liq_off_anim - instance->registerEObj( "unknown_8", 2003433, 4577626, 4, { 25.308140f, 6.141701f, 43.055359f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_1", 2003801, 0, 4, { -39.169922f, 18.680960f, -1.968445f }, 0.991760f, -0.789868f ); - instance->registerEObj( "unknown_9", 2003374, 4583478, 4, { 23.827320f, -252.500000f, -65.956993f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2003375, 4583476, 4, { 9.536644f, -252.394394f, -55.117130f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2003376, 4583473, 4, { 47.898071f, -270.801910f, 54.428829f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2003377, 4583472, 4, { 35.751831f, -270.679901f, 43.045650f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_13", 2003378, 4583471, 4, { 42.832031f, -270.801910f, 35.995972f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_14", 2003379, 4583474, 4, { 54.564331f, -270.899994f, 47.591949f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4577505, 4, { 100.376602f, 43.960560f, 2.708986f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_15", 2002735, 0, 4, { 97.980797f, 42.137150f, -0.222000f }, 0.900000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2003363, 4578411, 4, { 86.630951f, 42.801220f, -47.240730f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2003373, 4578103, 4, { -38.428570f, 12.100000f, 70.544273f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4578066, 4, { 6.156913f, 11.249960f, 70.316727f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_17", 2002735, 0, 4, { 4.235116f, 12.085570f, 69.965263f }, 1.000000f, -1.570451f ); - instance->registerEObj( "unknown_18", 2003360, 0, 4, { 284.752808f, 100.000000f, -31.765209f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4574610, 5, { 270.581207f, 100.000000f, -17.202379f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 265.173615f, 100.000000f, -32.604542f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4579298, 4, { 9.791200f, -279.967285f, 21.616301f }, 0.700000f, + -0.494801f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_0", 2002735, 0, 4, { 8.967742f, -279.844086f, 22.640949f }, 1.000000f, + -0.407391f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -6.668615f, -279.989990f, -16.121090f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Diabolicalgate", 2003262, 0, 4, { -11.735310f, -279.600006f, 1.146639f }, 1.000000f, + -0.357945f ); + instance->registerEObj( "Diabolicalgate_1", 2003263, 0, 4, { -5.801897f, -279.600006f, -2.180922f }, 1.000000f, + -0.579334f ); + instance->registerEObj( "Diabolicalgate_2", 2003264, 0, 4, { -9.593593f, -279.600006f, 5.704061f }, 1.000000f, + -0.499409f ); + instance->registerEObj( "Diabolicalgate_3", 2003265, 0, 4, { -3.149769f, -279.600006f, 2.478353f }, 1.000000f, + -0.520267f ); + instance->registerEObj( "Dubiouscoffer", 2003266, 0, 4, { 8.612234f, -279.989990f, -20.760429f }, 1.000000f, + 0.406471f ); + instance->registerEObj( "Dubiouscoffer_1", 2003267, 0, 4, { 20.769291f, -279.989990f, -8.610124f }, 1.000000f, + 1.180338f ); + instance->registerEObj( "Dubiouscoffer_2", 2003268, 0, 4, { -20.776131f, -279.989990f, 8.642863f }, 0.991760f, + -1.160291f ); + instance->registerEObj( "Dubiouscoffer_3", 2003269, 0, 4, { -20.738871f, -279.989990f, -8.552890f }, 1.000000f, + -1.185745f ); + instance->registerEObj( "Dubiouscoffer_4", 2003270, 0, 4, { 20.683531f, -279.989990f, 8.612939f }, 1.000000f, + 1.247274f ); + instance->registerEObj( "Dubiouscoffer_5", 2003271, 0, 4, { -8.611513f, -279.989990f, 20.715059f }, 1.000000f, + -0.423025f ); + instance->registerEObj( "unknown_1", 2003361, 4538596, 4, { 146.386597f, 68.131821f, -32.655411f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_2", 2003431, 4577623, 4, { 141.929794f, 66.690971f, -22.680590f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2003362, 4577620, 4, { 124.650101f, 58.000000f, 21.475590f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer", 2003800, 0, 4, { 125.169800f, 58.259232f, 24.765381f }, 0.991760f, + -1.568190f ); + instance->registerEObj( "unknown_4", 2003364, 4538597, 4, { 1.248910f, 34.305920f, -96.145103f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2003432, 4577625, 4, { 7.652231f, 33.999989f, -83.909409f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_f1d5_a3_kin03", 2003365, 4572307, 4, { 16.420071f, 30.172510f, -53.162449f }, + 1.000000f, 0.000000f ); + // States -> plant_def plant_action_anim + instance->registerEObj( "sgvf_f1d5_b0360", 2003366, 4629067, 4, { 13.762910f, 27.170670f, -29.499069f }, 1.000000f, + 0.000000f ); + // States -> liq_def liq_on liq_on_anim liq_off_anim + instance->registerEObj( "unknown_6", 2003367, 4577622, 4, { -35.077301f, 20.181410f, -5.543382f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_f1d5_a3_kin03_1", 2003368, 4572310, 4, { -36.282841f, 10.771230f, 27.777269f }, + 1.000000f, 0.000000f ); + // States -> plant_def plant_action_anim + instance->registerEObj( "sgvf_f1d5_b0359", 2003369, 4629073, 4, { -38.452469f, 10.771230f, 26.955620f }, 1.000000f, + 0.000000f ); + // States -> liq_def liq_on liq_on_anim liq_off_anim + instance->registerEObj( "unknown_7", 2003370, 4538791, 4, { 11.000470f, 7.980469f, 18.231581f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgbg_f1d5_a3_kin03_2", 2003371, 4572309, 4, { 15.090590f, 6.133745f, 32.735611f }, + 1.000000f, 0.000000f ); + // States -> plant_def plant_action_anim + instance->registerEObj( "sgvf_f1d5_b0358", 2003372, 4629074, 4, { 11.812460f, 6.045094f, 32.012810f }, 1.000000f, + 0.000000f ); + // States -> liq_def liq_on liq_on_anim liq_off_anim + instance->registerEObj( "unknown_8", 2003433, 4577626, 4, { 25.308140f, 6.141701f, 43.055359f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_1", 2003801, 0, 4, { -39.169922f, 18.680960f, -1.968445f }, 0.991760f, + -0.789868f ); + instance->registerEObj( "unknown_9", 2003374, 4583478, 4, { 23.827320f, -252.500000f, -65.956993f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2003375, 4583476, 4, { 9.536644f, -252.394394f, -55.117130f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2003376, 4583473, 4, { 47.898071f, -270.801910f, 54.428829f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2003377, 4583472, 4, { 35.751831f, -270.679901f, 43.045650f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_13", 2003378, 4583471, 4, { 42.832031f, -270.801910f, 35.995972f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_14", 2003379, 4583474, 4, { 54.564331f, -270.899994f, 47.591949f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4577505, 4, { 100.376602f, 43.960560f, 2.708986f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_15", 2002735, 0, 4, { 97.980797f, 42.137150f, -0.222000f }, 0.900000f, 0.000000f ); + instance->registerEObj( "unknown_16", 2003363, 4578411, 4, { 86.630951f, 42.801220f, -47.240730f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2003373, 4578103, 4, { -38.428570f, 12.100000f, 70.544273f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4578066, 4, { 6.156913f, 11.249960f, 70.316727f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_17", 2002735, 0, 4, { 4.235116f, 12.085570f, 69.965263f }, 1.000000f, -1.570451f ); + instance->registerEObj( "unknown_18", 2003360, 0, 4, { 284.752808f, 100.000000f, -31.765209f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4574610, 5, { 270.581207f, 100.000000f, -17.202379f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 265.173615f, 100.000000f, -32.604542f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheLostCityofAmdaporHard.cpp b/src/servers/Scripts/instances/dungeons/TheLostCityofAmdaporHard.cpp index 52f6890c..4240a3ee 100644 --- a/src/servers/Scripts/instances/dungeons/TheLostCityofAmdaporHard.cpp +++ b/src/servers/Scripts/instances/dungeons/TheLostCityofAmdaporHard.cpp @@ -1,72 +1,114 @@ #include #include -class TheLostCityofAmdaporHard : public InstanceContentScript +class TheLostCityofAmdaporHard : + public InstanceContentScript { public: - TheLostCityofAmdaporHard() : InstanceContentScript( 42 ) - { } + TheLostCityofAmdaporHard() : + InstanceContentScript( 42 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6159060, 4, { -199.881607f, 11.999990f, -280.139313f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -200.009201f, 12.116690f, -280.037506f }, 0.991760f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2003373, 6159063, 4, { -238.928894f, 12.100000f, -279.455688f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2006848, 0, 4, { -227.145905f, 11.978270f, -284.676086f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6158913, 4, { -262.326813f, -278.432312f, -241.982407f }, 1.000000f, -0.424392f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002735, 0, 4, { -261.926788f, -278.586792f, -242.680695f }, 0.800000f, -0.511830f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2006850, 6161174, 4, { -281.669495f, -278.783203f, -207.507401f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_3", 2006851, 0, 4, { -287.205292f, -278.675507f, -219.428604f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2006852, 0, 4, { -285.709991f, -278.675507f, -222.022598f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2006853, 0, 4, { -284.489288f, -278.675507f, -217.719604f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_6", 2006854, 0, 4, { -282.932892f, -278.675507f, -220.527298f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 6177873, 4, { 236.391098f, -854.348206f, 388.999908f }, 0.991760f, -0.424392f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2002735, 0, 4, { 236.928299f, -854.301025f, 388.437988f }, 0.991760f, -0.272621f ); - instance->registerEObj( "unknown_8", 2006855, 0, 4, { 245.654495f, -854.500000f, 408.186615f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2006856, 0, 4, { 245.602402f, -854.500000f, 408.203186f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2006857, 0, 4, { 217.570694f, -854.500000f, 414.970306f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_11", 2006867, 0, 4, { 238.696899f, -854.398376f, 400.472900f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2006868, 0, 4, { 225.070404f, -854.520508f, 402.559692f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_13", 2007000, 6217077, 4, { 230.880493f, -854.459717f, 414.889313f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Guardianstatue", 2006976, 0, 4, { 231.118698f, -852.800171f, 414.090088f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Guardianstatue_1", 2006977, 0, 4, { 231.113907f, -852.801514f, 414.085785f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Guardianstatue_2", 2006978, 0, 4, { 231.101898f, -852.801514f, 414.089111f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6159123, 5, { 73.070312f, 100.000000f, -376.644592f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 65.173607f, 100.000000f, -382.604614f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 228.895599f, -854.546082f, 420.274109f }, 0.991760f, -0.919204f ); - instance->registerEObj( "unknown_14", 2006825, 6173434, 4, { -45.716091f, 57.999512f, -311.654205f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_15", 2006826, 6173447, 4, { -174.685303f, 6.271362f, -302.651215f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_16", 2006827, 6173458, 4, { -174.227493f, 6.973328f, -299.721588f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_17", 2006828, 6155704, 4, { -74.714241f, 58.247410f, -327.713287f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_18", 2006829, 6184879, 4, { -170.839996f, -252.613205f, -408.640503f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_19", 2006830, 6184881, 4, { -163.902496f, -272.319397f, -294.726501f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2006831, 6162191, 4, { -243.942093f, -280.660706f, -273.564789f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Stoneoftransference", 2006834, 6173379, 4, { -295.032104f, -273.037506f, -185.082397f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2006832, 6177949, 4, { 166.001007f, -844.999817f, 265.365814f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2006833, 6177947, 4, { 226.690002f, -856.247681f, 262.675415f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_23", 2006835, 6202096, 4, { 255.720200f, -865.873474f, 319.853210f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_w_qic_004_03a", 2002872, 6904891, 4, { 236.391205f, -854.348083f, 388.999908f }, 0.991760f, -0.424392f ); - instance->registerEObj( "unknown_24", 2002735, 0, 4, { 236.928299f, -854.301025f, 388.437988f }, 0.991760f, -0.272621f ); - instance->registerEObj( "sgbg_w_qic_004_03a_1", 2007457, 6904603, 4, { 249.195099f, -856.351624f, 343.526215f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_25", 2007457, 6217077, 4, { 233.497299f, -854.546021f, 414.179413f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6159060, 4, { -199.881607f, 11.999990f, -280.139313f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -200.009201f, 12.116690f, -280.037506f }, 0.991760f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2003373, 6159063, 4, { -238.928894f, 12.100000f, -279.455688f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2006848, 0, 4, { -227.145905f, 11.978270f, -284.676086f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6158913, 4, { -262.326813f, -278.432312f, -241.982407f }, + 1.000000f, -0.424392f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002735, 0, 4, { -261.926788f, -278.586792f, -242.680695f }, 0.800000f, + -0.511830f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2006850, 6161174, 4, { -281.669495f, -278.783203f, -207.507401f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_3", 2006851, 0, 4, { -287.205292f, -278.675507f, -219.428604f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_4", 2006852, 0, 4, { -285.709991f, -278.675507f, -222.022598f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2006853, 0, 4, { -284.489288f, -278.675507f, -217.719604f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_6", 2006854, 0, 4, { -282.932892f, -278.675507f, -220.527298f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 6177873, 4, { 236.391098f, -854.348206f, 388.999908f }, + 0.991760f, -0.424392f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2002735, 0, 4, { 236.928299f, -854.301025f, 388.437988f }, 0.991760f, + -0.272621f ); + instance->registerEObj( "unknown_8", 2006855, 0, 4, { 245.654495f, -854.500000f, 408.186615f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2006856, 0, 4, { 245.602402f, -854.500000f, 408.203186f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2006857, 0, 4, { 217.570694f, -854.500000f, 414.970306f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_11", 2006867, 0, 4, { 238.696899f, -854.398376f, 400.472900f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2006868, 0, 4, { 225.070404f, -854.520508f, 402.559692f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_13", 2007000, 6217077, 4, { 230.880493f, -854.459717f, 414.889313f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Guardianstatue", 2006976, 0, 4, { 231.118698f, -852.800171f, 414.090088f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Guardianstatue_1", 2006977, 0, 4, { 231.113907f, -852.801514f, 414.085785f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Guardianstatue_2", 2006978, 0, 4, { 231.101898f, -852.801514f, 414.089111f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6159123, 5, { 73.070312f, 100.000000f, -376.644592f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 65.173607f, 100.000000f, -382.604614f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 228.895599f, -854.546082f, 420.274109f }, 0.991760f, -0.919204f ); + instance->registerEObj( "unknown_14", 2006825, 6173434, 4, { -45.716091f, 57.999512f, -311.654205f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_15", 2006826, 6173447, 4, { -174.685303f, 6.271362f, -302.651215f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_16", 2006827, 6173458, 4, { -174.227493f, 6.973328f, -299.721588f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_17", 2006828, 6155704, 4, { -74.714241f, 58.247410f, -327.713287f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_18", 2006829, 6184879, 4, { -170.839996f, -252.613205f, -408.640503f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_19", 2006830, 6184881, 4, { -163.902496f, -272.319397f, -294.726501f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2006831, 6162191, 4, { -243.942093f, -280.660706f, -273.564789f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Stoneoftransference", 2006834, 6173379, 4, { -295.032104f, -273.037506f, -185.082397f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_21", 2006832, 6177949, 4, { 166.001007f, -844.999817f, 265.365814f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_22", 2006833, 6177947, 4, { 226.690002f, -856.247681f, 262.675415f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_23", 2006835, 6202096, 4, { 255.720200f, -865.873474f, 319.853210f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_w_qic_004_03a", 2002872, 6904891, 4, { 236.391205f, -854.348083f, 388.999908f }, + 0.991760f, -0.424392f ); + instance->registerEObj( "unknown_24", 2002735, 0, 4, { 236.928299f, -854.301025f, 388.437988f }, 0.991760f, + -0.272621f ); + instance->registerEObj( "sgbg_w_qic_004_03a_1", 2007457, 6904603, 4, { 249.195099f, -856.351624f, 343.526215f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_25", 2007457, 6217077, 4, { 233.497299f, -854.546021f, 414.179413f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/ThePraetorium.cpp b/src/servers/Scripts/instances/dungeons/ThePraetorium.cpp index c9033f68..65ec8a85 100644 --- a/src/servers/Scripts/instances/dungeons/ThePraetorium.cpp +++ b/src/servers/Scripts/instances/dungeons/ThePraetorium.cpp @@ -1,142 +1,247 @@ #include #include -class ThePraetorium : public InstanceContentScript +class ThePraetorium : + public InstanceContentScript { public: - ThePraetorium() : InstanceContentScript( 16 ) - { } + ThePraetorium() : + InstanceContentScript( 16 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0118", 2000828, 4305694, 4, { -784.536987f, -344.000000f, 0.121873f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_0", 2000829, 0, 4, { -781.198120f, -344.000000f, 0.127798f }, 0.900000f, -1.570451f ); - instance->registerEObj( "Shortcut", 2000848, 0, 4, { -788.420593f, -400.046387f, -601.281189f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2000832, 4303065, 4, { -703.485413f, -185.734299f, 461.314697f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_2", 2000833, 4303324, 4, { -721.744019f, -185.531204f, 478.978302f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2000834, 4303325, 4, { -704.359924f, -185.731995f, 498.390015f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2000831, 0, 4, { -781.198120f, -344.000000f, 0.127800f }, 0.900000f, -1.570451f ); - instance->registerEObj( "unknown_5", 2002538, 0, 4, { -781.198120f, -344.000000f, 0.127800f }, 0.900000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000828, 4305491, 4, { 212.974304f, 75.866501f, -0.668073f }, 1.000000f, 1.568613f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_6", 2000829, 0, 4, { 215.905304f, 76.000000f, -0.131676f }, 0.700000f, 1.568640f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000822, 4305462, 4, { -135.017593f, -103.976402f, -1.129792f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2000823, 0, 4, { -129.654205f, -104.027000f, -0.290400f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2000826, 4305555, 4, { -216.218002f, -103.997398f, -3.836082f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_8", 2000827, 0, 4, { -208.879593f, -103.997398f, -0.252325f }, 1.000000f, -1.570451f ); - instance->registerEObj( "Shortcut_1", 2000848, 0, 4, { -577.757812f, -268.000000f, 218.871399f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w1d5_bossA_lvd_b0118", 2000876, 4317513, 4, { 180.458893f, 76.089233f, -0.360356f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_9", 2000976, 0, 4, { 180.548401f, 76.089943f, 0.959593f }, 1.000000f, -0.000248f ); - instance->registerEObj( "sgvf_w_btl_b0216", 2001134, 4326317, 4, { -166.447800f, -104.221901f, 16.976521f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2001135, 4326381, 4, { -196.318497f, -104.078903f, -0.786835f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_10", 2001766, 4175265, 4, { -570.270081f, -268.000000f, 217.461197f }, 1.000000f, 0.000000f ); - instance->registerEObj( "仮シド指令", 2000806, 0, 4, { 217.957397f, 46.000000f, -11.597380f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal", 2000851, 0, 4, { 133.745193f, 22.964720f, -0.015320f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekterminal_1", 2000852, 0, 4, { 134.477707f, 7.614197f, -0.045776f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekterminal_2", 2000856, 0, 4, { 145.769394f, 21.988159f, 7.095398f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_11", 2000813, 0, 4, { 136.430801f, 22.354429f, -0.137390f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekterminal_3", 2000858, 0, 4, { 121.995796f, -104.020798f, 3.707886f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekarmor", 2000872, 0, 4, { 12.002250f, -107.811699f, -78.686447f }, 2.578735f, -1.562172f ); - instance->registerEObj( "Magitekarmor_1", 2000872, 0, 4, { 108.952103f, -106.029999f, -7.573757f }, 2.578735f, -0.369535f ); - instance->registerEObj( "unknown_12", 2000791, 4118536, 4, { 226.850998f, 155.775497f, 3.640267f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2000836, 4178897, 4, { 230.933899f, 156.818100f, 25.887810f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal_4", 2000792, 0, 4, { 240.527893f, 155.626495f, 4.989798f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_14", 2000793, 4243244, 4, { 187.994705f, 152.227097f, -80.103348f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2000794, 4178131, 4, { 157.029907f, 155.725204f, -56.634510f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2000795, 4118533, 4, { 171.986206f, 160.259903f, -32.392151f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_transparent06", 2000796, 4317691, 4, { 177.690002f, 155.500000f, -35.500401f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Imperialidentificationkey", 2000837, 0, 4, { 226.065094f, 155.807800f, 7.053694f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2000855, 4178132, 4, { 224.098007f, 156.000000f, -26.999870f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_transparent04", 2000845, 4316977, 4, { 221.255707f, 156.000000f, 6.591867f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal_5", 2001145, 4329956, 4, { 196.345398f, 186.275101f, -3.980006f }, 1.000000f, 0.000000f ); - // States -> ele_off ele_on - instance->registerEObj( "Magitekterminal_6", 2001146, 4329960, 4, { 196.312805f, 155.999893f, 4.083439f }, 1.000000f, 0.000000f ); - // States -> ele_off ele_on - instance->registerEObj( "Magitektransporter", 2001147, 0, 4, { 204.421494f, 120.000000f, -60.006229f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitektransporter_1", 2001148, 0, 4, { 228.831696f, 71.500000f, -28.156210f }, 1.000000f, 0.827528f ); - instance->registerEObj( "unknown_18", 2002628, 4305528, 4, { 221.126099f, 153.428696f, -69.269623f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2000871, 0, 4, { 174.414993f, 102.515198f, -88.973930f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2000797, 4118552, 4, { 227.155396f, 72.000000f, -43.219952f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2000798, 4119463, 4, { 190.957703f, 72.355438f, -64.773132f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal_7", 2000799, 0, 4, { 268.474396f, 67.031410f, -49.967129f }, 0.991760f, -0.501567f ); - instance->registerEObj( "Imperialidentificationkey_1", 2000838, 0, 4, { 263.129395f, 66.381569f, -71.274437f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2000667, 4119461, 4, { 271.022614f, 68.049881f, -45.787529f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_23", 2000800, 4124814, 4, { 237.461395f, 72.250000f, 33.809959f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_24", 2000843, 4119464, 4, { 190.731094f, 67.877243f, -85.008949f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_25", 2000844, 0, 4, { 254.749405f, 72.098747f, -36.545410f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekterminal_8", 2000841, 0, 4, { 234.100006f, 72.101990f, -5.516209f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Imperialidentificationkey_2", 2000840, 0, 4, { 242.130798f, 72.250000f, 26.153481f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_26", 2000842, 4186210, 4, { 224.041794f, 75.715820f, -0.347510f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal_9", 2000802, 4299253, 4, { 177.904907f, 76.066162f, -5.569580f }, 0.991760f, -0.010379f ); - instance->registerEObj( "Magitekterminal_10", 2000803, 0, 4, { 173.805496f, 76.081238f, 4.123073f }, 1.000000f, 0.729448f ); - instance->registerEObj( "unknown_27", 2000804, 4175899, 4, { 172.537292f, 76.600563f, -0.941921f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal_11", 2000849, 0, 4, { 173.793900f, 47.632881f, 4.163035f }, 0.991760f, 0.694225f ); - instance->registerEObj( "unknown_28", 2001020, 4119459, 4, { 236.713104f, 68.589233f, 77.256348f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_29", 2001021, 4119458, 4, { 214.862198f, 47.531738f, 39.169922f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_transparent05", 2000877, 4317555, 4, { 178.867599f, 76.089233f, -0.117565f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_transparent05_1", 2000878, 4317536, 4, { 168.665405f, 46.519169f, 1.801311f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_30", 2002629, 4305536, 4, { 241.707993f, 66.877907f, -82.835068f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_31", 2002630, 4305537, 4, { 112.046898f, 67.002319f, 46.555180f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekterminal_12", 2000805, 4299251, 4, { 167.034500f, 46.199989f, 8.192681f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_32", 2000811, 4175901, 4, { 149.577499f, 46.799969f, -30.579741f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_33", 2000807, 4309445, 4, { 146.929092f, 45.975342f, -50.736271f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Identificationkeyreader", 2000808, 4182427, 4, { 128.409805f, 47.799999f, -49.366180f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal_13", 2000809, 4298905, 4, { 150.029999f, 46.723068f, -39.001339f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal_14", 2000810, 0, 4, { 154.199600f, 46.894550f, -34.215000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_34", 2000812, 4119481, 4, { 208.043594f, 43.053101f, 0.003599f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Imperialidentificationkey_3", 2000839, 0, 4, { 155.484695f, 46.000000f, -57.763378f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekterminal_15", 2000850, 0, 4, { 154.192307f, 101.909103f, -34.226189f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekterminal_16", 2000857, 0, 4, { 142.995895f, 46.047619f, -53.038639f }, 0.991760f, -0.743907f ); - instance->registerEObj( "Magitekarmor_2", 2000872, 0, 4, { 140.619904f, 102.000000f, -50.628609f }, 2.600000f, -0.817672f ); - instance->registerEObj( "Magitekterminal_17", 2000904, 4298910, 4, { 150.108398f, 102.204201f, -39.998730f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_transparent05_2", 2000879, 4317581, 4, { 145.143005f, 46.118488f, -33.631050f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_transparent05_3", 2000880, 4317584, 4, { 144.416595f, 102.000000f, -35.715260f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_35", 2002539, 4323543, 4, { 191.892395f, 46.000000f, -42.993431f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_36", 2001205, 0, 4, { 134.810394f, 21.910000f, -0.001021f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_37", 2001205, 0, 4, { 133.078400f, -102.979202f, 0.123506f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekarmor_3", 2000872, 0, 4, { 129.111298f, 68.261063f, -59.929440f }, 2.578735f, -0.094404f ); - instance->registerEObj( "unknown_38", 2000815, 4190796, 4, { 81.888397f, -107.400002f, -45.959042f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_transparent05_4", 2000816, 4323560, 4, { 38.618160f, -107.400002f, -72.955917f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_39", 2000817, 4190794, 4, { 37.580742f, -107.400002f, -70.481018f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_transparent05_5", 2000819, 4323562, 4, { -38.041451f, -103.786201f, 0.069122f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_40", 2000818, 4200594, 4, { -31.718330f, -103.400002f, 2.561740f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_41", 2000820, 4190789, 4, { -31.696360f, -103.400002f, -2.409777f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_42", 2000821, 4189149, 4, { -68.916000f, -102.759399f, -0.015143f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_43", 2000824, 4119565, 4, { -184.609695f, -104.221901f, -2.135104f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekterminal_18", 2000825, 0, 4, { -238.152893f, -104.051300f, -19.744539f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_44", 2000854, 4119564, 4, { -117.637398f, -103.993301f, 0.252331f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shortcut_2", 2000853, 0, 4, { -228.197906f, -103.997398f, 0.789458f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_transparent05_6", 2000814, 4323557, 4, { 84.611214f, -107.408302f, -51.255131f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_45", 2001138, 4125125, 4, { -249.059494f, -104.000000f, -3.238936f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shortcut_3", 2000846, 0, 4, { -787.271912f, -344.000000f, 2.392201f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shortcut_4", 2000847, 0, 4, { -787.513977f, -344.014587f, -1.791996f }, 1.000000f, 0.000000f ); - instance->registerEObj( "PortaDecumanaentryway", 2001045, 0, 4, { -792.387329f, -343.440887f, -0.126096f }, 1.500000f, -1.570451f ); - instance->registerEObj( "sgbg_w1d5_q6_lift2", 2001139, 4328790, 4, { -765.431274f, -343.997589f, 1.749690f }, 1.000000f, 0.000000f ); - // States -> down_Ncut arrival_Ncut upstairs gate1_open gate1_close gate2_open gate2_close start stop ele_off ele_on down_Ncut_hide hide - instance->registerEObj( "unknown_46", 2000787, 0, 4, { 147.015701f, 186.100006f, -4.199400f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000788, 0, 4, { -721.074524f, -185.731598f, 478.324890f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut_5", 2000789, 0, 4, { 167.870895f, 186.000000f, -0.104399f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000790, 4301608, 5, { 152.054794f, 187.039200f, 3.392751f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut_6", 2000789, 0, 4, { -237.161896f, -104.020897f, -21.575460f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut_7", 2000789, 0, 4, { 115.949501f, 67.588867f, -74.186333f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0118", 2000828, 4305694, 4, { -784.536987f, -344.000000f, 0.121873f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_0", 2000829, 0, 4, { -781.198120f, -344.000000f, 0.127798f }, 0.900000f, + -1.570451f ); + instance->registerEObj( "Shortcut", 2000848, 0, 4, { -788.420593f, -400.046387f, -601.281189f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2000832, 4303065, 4, { -703.485413f, -185.734299f, 461.314697f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_2", 2000833, 4303324, 4, { -721.744019f, -185.531204f, 478.978302f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2000834, 4303325, 4, { -704.359924f, -185.731995f, 498.390015f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_4", 2000831, 0, 4, { -781.198120f, -344.000000f, 0.127800f }, 0.900000f, + -1.570451f ); + instance->registerEObj( "unknown_5", 2002538, 0, 4, { -781.198120f, -344.000000f, 0.127800f }, 0.900000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000828, 4305491, 4, { 212.974304f, 75.866501f, -0.668073f }, + 1.000000f, 1.568613f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_6", 2000829, 0, 4, { 215.905304f, 76.000000f, -0.131676f }, 0.700000f, 1.568640f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000822, 4305462, 4, { -135.017593f, -103.976402f, -1.129792f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2000823, 0, 4, { -129.654205f, -104.027000f, -0.290400f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2000826, 4305555, 4, { -216.218002f, -103.997398f, -3.836082f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_8", 2000827, 0, 4, { -208.879593f, -103.997398f, -0.252325f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "Shortcut_1", 2000848, 0, 4, { -577.757812f, -268.000000f, 218.871399f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w1d5_bossA_lvd_b0118", 2000876, 4317513, 4, { 180.458893f, 76.089233f, -0.360356f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_9", 2000976, 0, 4, { 180.548401f, 76.089943f, 0.959593f }, 1.000000f, -0.000248f ); + instance->registerEObj( "sgvf_w_btl_b0216", 2001134, 4326317, 4, { -166.447800f, -104.221901f, 16.976521f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2001135, 4326381, 4, { -196.318497f, -104.078903f, -0.786835f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_10", 2001766, 4175265, 4, { -570.270081f, -268.000000f, 217.461197f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "仮シド指令", 2000806, 0, 4, { 217.957397f, 46.000000f, -11.597380f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Magitekterminal", 2000851, 0, 4, { 133.745193f, 22.964720f, -0.015320f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekterminal_1", 2000852, 0, 4, { 134.477707f, 7.614197f, -0.045776f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekterminal_2", 2000856, 0, 4, { 145.769394f, 21.988159f, 7.095398f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_11", 2000813, 0, 4, { 136.430801f, 22.354429f, -0.137390f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekterminal_3", 2000858, 0, 4, { 121.995796f, -104.020798f, 3.707886f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekarmor", 2000872, 0, 4, { 12.002250f, -107.811699f, -78.686447f }, 2.578735f, + -1.562172f ); + instance->registerEObj( "Magitekarmor_1", 2000872, 0, 4, { 108.952103f, -106.029999f, -7.573757f }, 2.578735f, + -0.369535f ); + instance->registerEObj( "unknown_12", 2000791, 4118536, 4, { 226.850998f, 155.775497f, 3.640267f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2000836, 4178897, 4, { 230.933899f, 156.818100f, 25.887810f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekterminal_4", 2000792, 0, 4, { 240.527893f, 155.626495f, 4.989798f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_14", 2000793, 4243244, 4, { 187.994705f, 152.227097f, -80.103348f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2000794, 4178131, 4, { 157.029907f, 155.725204f, -56.634510f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2000795, 4118533, 4, { 171.986206f, 160.259903f, -32.392151f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_w_transparent06", 2000796, 4317691, 4, { 177.690002f, 155.500000f, -35.500401f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Imperialidentificationkey", 2000837, 0, 4, { 226.065094f, 155.807800f, 7.053694f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_17", 2000855, 4178132, 4, { 224.098007f, 156.000000f, -26.999870f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_w_transparent04", 2000845, 4316977, 4, { 221.255707f, 156.000000f, 6.591867f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Magitekterminal_5", 2001145, 4329956, 4, { 196.345398f, 186.275101f, -3.980006f }, + 1.000000f, 0.000000f ); + // States -> ele_off ele_on + instance->registerEObj( "Magitekterminal_6", 2001146, 4329960, 4, { 196.312805f, 155.999893f, 4.083439f }, + 1.000000f, 0.000000f ); + // States -> ele_off ele_on + instance->registerEObj( "Magitektransporter", 2001147, 0, 4, { 204.421494f, 120.000000f, -60.006229f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitektransporter_1", 2001148, 0, 4, { 228.831696f, 71.500000f, -28.156210f }, 1.000000f, + 0.827528f ); + instance->registerEObj( "unknown_18", 2002628, 4305528, 4, { 221.126099f, 153.428696f, -69.269623f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2000871, 0, 4, { 174.414993f, 102.515198f, -88.973930f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2000797, 4118552, 4, { 227.155396f, 72.000000f, -43.219952f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2000798, 4119463, 4, { 190.957703f, 72.355438f, -64.773132f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekterminal_7", 2000799, 0, 4, { 268.474396f, 67.031410f, -49.967129f }, 0.991760f, + -0.501567f ); + instance->registerEObj( "Imperialidentificationkey_1", 2000838, 0, 4, { 263.129395f, 66.381569f, -71.274437f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_22", 2000667, 4119461, 4, { 271.022614f, 68.049881f, -45.787529f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_23", 2000800, 4124814, 4, { 237.461395f, 72.250000f, 33.809959f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_24", 2000843, 4119464, 4, { 190.731094f, 67.877243f, -85.008949f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_25", 2000844, 0, 4, { 254.749405f, 72.098747f, -36.545410f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekterminal_8", 2000841, 0, 4, { 234.100006f, 72.101990f, -5.516209f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Imperialidentificationkey_2", 2000840, 0, 4, { 242.130798f, 72.250000f, 26.153481f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_26", 2000842, 4186210, 4, { 224.041794f, 75.715820f, -0.347510f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekterminal_9", 2000802, 4299253, 4, { 177.904907f, 76.066162f, -5.569580f }, + 0.991760f, -0.010379f ); + instance->registerEObj( "Magitekterminal_10", 2000803, 0, 4, { 173.805496f, 76.081238f, 4.123073f }, 1.000000f, + 0.729448f ); + instance->registerEObj( "unknown_27", 2000804, 4175899, 4, { 172.537292f, 76.600563f, -0.941921f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekterminal_11", 2000849, 0, 4, { 173.793900f, 47.632881f, 4.163035f }, 0.991760f, + 0.694225f ); + instance->registerEObj( "unknown_28", 2001020, 4119459, 4, { 236.713104f, 68.589233f, 77.256348f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_29", 2001021, 4119458, 4, { 214.862198f, 47.531738f, 39.169922f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_transparent05", 2000877, 4317555, 4, { 178.867599f, 76.089233f, -0.117565f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_transparent05_1", 2000878, 4317536, 4, { 168.665405f, 46.519169f, 1.801311f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_30", 2002629, 4305536, 4, { 241.707993f, 66.877907f, -82.835068f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_31", 2002630, 4305537, 4, { 112.046898f, 67.002319f, 46.555180f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekterminal_12", 2000805, 4299251, 4, { 167.034500f, 46.199989f, 8.192681f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_32", 2000811, 4175901, 4, { 149.577499f, 46.799969f, -30.579741f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_33", 2000807, 4309445, 4, { 146.929092f, 45.975342f, -50.736271f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Identificationkeyreader", 2000808, 4182427, 4, { 128.409805f, 47.799999f, -49.366180f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Magitekterminal_13", 2000809, 4298905, 4, { 150.029999f, 46.723068f, -39.001339f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Magitekterminal_14", 2000810, 0, 4, { 154.199600f, 46.894550f, -34.215000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_34", 2000812, 4119481, 4, { 208.043594f, 43.053101f, 0.003599f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Imperialidentificationkey_3", 2000839, 0, 4, { 155.484695f, 46.000000f, -57.763378f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Magitekterminal_15", 2000850, 0, 4, { 154.192307f, 101.909103f, -34.226189f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekterminal_16", 2000857, 0, 4, { 142.995895f, 46.047619f, -53.038639f }, 0.991760f, + -0.743907f ); + instance->registerEObj( "Magitekarmor_2", 2000872, 0, 4, { 140.619904f, 102.000000f, -50.628609f }, 2.600000f, + -0.817672f ); + instance->registerEObj( "Magitekterminal_17", 2000904, 4298910, 4, { 150.108398f, 102.204201f, -39.998730f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_transparent05_2", 2000879, 4317581, 4, { 145.143005f, 46.118488f, -33.631050f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_transparent05_3", 2000880, 4317584, 4, { 144.416595f, 102.000000f, -35.715260f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_35", 2002539, 4323543, 4, { 191.892395f, 46.000000f, -42.993431f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_36", 2001205, 0, 4, { 134.810394f, 21.910000f, -0.001021f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_37", 2001205, 0, 4, { 133.078400f, -102.979202f, 0.123506f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekarmor_3", 2000872, 0, 4, { 129.111298f, 68.261063f, -59.929440f }, 2.578735f, + -0.094404f ); + instance->registerEObj( "unknown_38", 2000815, 4190796, 4, { 81.888397f, -107.400002f, -45.959042f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_w_transparent05_4", 2000816, 4323560, 4, { 38.618160f, -107.400002f, -72.955917f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_39", 2000817, 4190794, 4, { 37.580742f, -107.400002f, -70.481018f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_w_transparent05_5", 2000819, 4323562, 4, { -38.041451f, -103.786201f, 0.069122f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_40", 2000818, 4200594, 4, { -31.718330f, -103.400002f, 2.561740f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_41", 2000820, 4190789, 4, { -31.696360f, -103.400002f, -2.409777f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_42", 2000821, 4189149, 4, { -68.916000f, -102.759399f, -0.015143f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_43", 2000824, 4119565, 4, { -184.609695f, -104.221901f, -2.135104f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekterminal_18", 2000825, 0, 4, { -238.152893f, -104.051300f, -19.744539f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_44", 2000854, 4119564, 4, { -117.637398f, -103.993301f, 0.252331f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shortcut_2", 2000853, 0, 4, { -228.197906f, -103.997398f, 0.789458f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_transparent05_6", 2000814, 4323557, 4, { 84.611214f, -107.408302f, -51.255131f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_45", 2001138, 4125125, 4, { -249.059494f, -104.000000f, -3.238936f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shortcut_3", 2000846, 0, 4, { -787.271912f, -344.000000f, 2.392201f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shortcut_4", 2000847, 0, 4, { -787.513977f, -344.014587f, -1.791996f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "PortaDecumanaentryway", 2001045, 0, 4, { -792.387329f, -343.440887f, -0.126096f }, + 1.500000f, -1.570451f ); + instance->registerEObj( "sgbg_w1d5_q6_lift2", 2001139, 4328790, 4, { -765.431274f, -343.997589f, 1.749690f }, + 1.000000f, 0.000000f ); + // States -> down_Ncut arrival_Ncut upstairs gate1_open gate1_close gate2_open gate2_close start stop ele_off ele_on down_Ncut_hide hide + instance->registerEObj( "unknown_46", 2000787, 0, 4, { 147.015701f, 186.100006f, -4.199400f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000788, 0, 4, { -721.074524f, -185.731598f, 478.324890f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Shortcut_5", 2000789, 0, 4, { 167.870895f, 186.000000f, -0.104399f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000790, 4301608, 5, { 152.054794f, 187.039200f, 3.392751f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut_6", 2000789, 0, 4, { -237.161896f, -104.020897f, -21.575460f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Shortcut_7", 2000789, 0, 4, { 115.949501f, 67.588867f, -74.186333f }, 0.991760f, + 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheSirensongSea.cpp b/src/servers/Scripts/instances/dungeons/TheSirensongSea.cpp index 4b013972..3a6b16a2 100644 --- a/src/servers/Scripts/instances/dungeons/TheSirensongSea.cpp +++ b/src/servers/Scripts/instances/dungeons/TheSirensongSea.cpp @@ -1,26 +1,29 @@ #include #include -class TheSirensongSea : public InstanceContentScript +class TheSirensongSea : + public InstanceContentScript { public: - TheSirensongSea() : InstanceContentScript( 52 ) - { } + TheSirensongSea() : + InstanceContentScript( 52 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheStoneVigil.cpp b/src/servers/Scripts/instances/dungeons/TheStoneVigil.cpp index bfe93648..ccbf91fa 100644 --- a/src/servers/Scripts/instances/dungeons/TheStoneVigil.cpp +++ b/src/servers/Scripts/instances/dungeons/TheStoneVigil.cpp @@ -1,63 +1,83 @@ #include #include -class TheStoneVigil : public InstanceContentScript +class TheStoneVigil : + public InstanceContentScript { public: - TheStoneVigil() : InstanceContentScript( 11 ) - { } + TheStoneVigil() : + InstanceContentScript( 11 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2000611, 0, 4, { 0.015198f, 0.350891f, -246.784195f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2001869, 4239670, 5, { -0.000510f, 3.949623f, 307.392395f }, 2.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_1", 2001870, 0, 4, { 0.015198f, 3.949618f, 317.179199f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit", 2001871, 4239710, 4, { 0.004404f, 0.076945f, -268.716095f }, 1.000000f, 0.000000f ); - // States -> vf_htras1_on vf_htras1_of - instance->registerEObj( "sgvf_w_lvd_b0094", 2001872, 4239719, 4, { -0.106873f, 3.860474f, 136.491898f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118_r1d1", 2001873, 4239720, 4, { -0.625671f, 3.829956f, 136.461395f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001874, 4239769, 4, { 20.620710f, 3.949919f, -80.003052f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118", 2001875, 4239782, 4, { 20.559681f, 3.949919f, -80.277771f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_2", 2001876, 4239833, 4, { -0.197872f, 4.844441f, -223.182404f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118_r1d1_1", 2001877, 4239838, 4, { 0.816688f, 4.854907f, -223.199707f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 3.484173f, 4.000121f, 298.130005f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1d1_t1_fwal1", 2001878, 4239736, 4, { 0.228821f, 3.982544f, 95.231567f }, 0.991760f, 0.000048f ); - // States -> fire_on fire_of - instance->registerEObj( "sgbg_r1d1_t1_fwal1_1", 2001879, 4239917, 4, { -0.137390f, -0.076355f, -90.104553f }, 0.991760f, 0.000048f ); - // States -> fire_on fire_of - instance->registerEObj( "Strongroomgate", 2001880, 4172415, 4, { -0.022534f, 4.052033f, -215.388901f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_r1d1_b0172", 2001881, 4240140, 4, { 24.443140f, -0.000003f, -16.325529f }, 1.000000f, 0.000000f ); - // States -> snow_of snow_on - instance->registerEObj( "sgvf_r1d1_b0172_1", 2001882, 4240143, 4, { 24.207170f, -0.386616f, -119.586502f }, 1.000000f, 0.000000f ); - // States -> snow_of snow_on - instance->registerEObj( "sgvf_r1d1_b0172_2", 2001883, 4240145, 4, { 24.277100f, -0.015320f, -168.047699f }, 0.991760f, 0.000048f ); - // States -> snow_of snow_on - instance->registerEObj( "Bertha", 2001884, 0, 4, { 56.748291f, 4.989685f, -86.472900f }, 0.991760f, 1.040362f ); - instance->registerEObj( "Bertha_1", 2001885, 0, 4, { 58.899940f, 4.989685f, -79.857857f }, 0.991760f, 1.535637f ); - instance->registerEObj( "Bertha_2", 2001886, 0, 4, { 56.935600f, 5.003687f, -73.150261f }, 0.991760f, 1.076136f ); - instance->registerEObj( "sgpl_w_lvd_collison_only", 2002618, 4334349, 4, { -0.221096f, 4.007471f, 137.674500f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_collison_only_1", 2002618, 4334437, 4, { 0.000000f, 5.259686f, -221.867004f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_collison_only_2", 2002618, 4334925, 4, { -0.016311f, 0.434590f, -224.636993f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_collison_only_3", 2002618, 4334973, 4, { 0.117383f, 0.135054f, -224.822800f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2000611, 0, 4, { 0.015198f, 0.350891f, -246.784195f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Entrance", 2001869, 4239670, 5, { -0.000510f, 3.949623f, 307.392395f }, 2.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_1", 2001870, 0, 4, { 0.015198f, 3.949618f, 317.179199f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Exit", 2001871, 4239710, 4, { 0.004404f, 0.076945f, -268.716095f }, 1.000000f, 0.000000f ); + // States -> vf_htras1_on vf_htras1_of + instance->registerEObj( "sgvf_w_lvd_b0094", 2001872, 4239719, 4, { -0.106873f, 3.860474f, 136.491898f }, 0.991760f, + 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118_r1d1", 2001873, 4239720, 4, { -0.625671f, 3.829956f, 136.461395f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001874, 4239769, 4, { 20.620710f, 3.949919f, -80.003052f }, + 0.991760f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118", 2001875, 4239782, 4, { 20.559681f, 3.949919f, -80.277771f }, 0.991760f, + 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_2", 2001876, 4239833, 4, { -0.197872f, 4.844441f, -223.182404f }, + 1.000000f, 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118_r1d1_1", 2001877, 4239838, 4, { 0.816688f, 4.854907f, -223.199707f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 3.484173f, 4.000121f, 298.130005f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1d1_t1_fwal1", 2001878, 4239736, 4, { 0.228821f, 3.982544f, 95.231567f }, 0.991760f, + 0.000048f ); + // States -> fire_on fire_of + instance->registerEObj( "sgbg_r1d1_t1_fwal1_1", 2001879, 4239917, 4, { -0.137390f, -0.076355f, -90.104553f }, + 0.991760f, 0.000048f ); + // States -> fire_on fire_of + instance->registerEObj( "Strongroomgate", 2001880, 4172415, 4, { -0.022534f, 4.052033f, -215.388901f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_r1d1_b0172", 2001881, 4240140, 4, { 24.443140f, -0.000003f, -16.325529f }, 1.000000f, + 0.000000f ); + // States -> snow_of snow_on + instance->registerEObj( "sgvf_r1d1_b0172_1", 2001882, 4240143, 4, { 24.207170f, -0.386616f, -119.586502f }, + 1.000000f, 0.000000f ); + // States -> snow_of snow_on + instance->registerEObj( "sgvf_r1d1_b0172_2", 2001883, 4240145, 4, { 24.277100f, -0.015320f, -168.047699f }, + 0.991760f, 0.000048f ); + // States -> snow_of snow_on + instance->registerEObj( "Bertha", 2001884, 0, 4, { 56.748291f, 4.989685f, -86.472900f }, 0.991760f, 1.040362f ); + instance->registerEObj( "Bertha_1", 2001885, 0, 4, { 58.899940f, 4.989685f, -79.857857f }, 0.991760f, 1.535637f ); + instance->registerEObj( "Bertha_2", 2001886, 0, 4, { 56.935600f, 5.003687f, -73.150261f }, 0.991760f, 1.076136f ); + instance->registerEObj( "sgpl_w_lvd_collison_only", 2002618, 4334349, 4, { -0.221096f, 4.007471f, 137.674500f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_collison_only_1", 2002618, 4334437, 4, { 0.000000f, 5.259686f, -221.867004f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_collison_only_2", 2002618, 4334925, 4, { -0.016311f, 0.434590f, -224.636993f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_collison_only_3", 2002618, 4334973, 4, { 0.117383f, 0.135054f, -224.822800f }, + 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheStoneVigilHard.cpp b/src/servers/Scripts/instances/dungeons/TheStoneVigilHard.cpp index 8ce39c0b..2c9922fc 100644 --- a/src/servers/Scripts/instances/dungeons/TheStoneVigilHard.cpp +++ b/src/servers/Scripts/instances/dungeons/TheStoneVigilHard.cpp @@ -1,56 +1,72 @@ #include #include -class TheStoneVigilHard : public InstanceContentScript +class TheStoneVigilHard : + public InstanceContentScript { public: - TheStoneVigilHard() : InstanceContentScript( 25 ) - { } + TheStoneVigilHard() : + InstanceContentScript( 25 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Exit", 2000139, 0, 4, { -138.305603f, -7.970538f, -56.005821f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -103.660202f, -7.970543f, -55.945332f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0250", 2002872, 4724293, 4, { -105.613098f, -7.970541f, -56.019131f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2002735, 0, 4, { -47.933350f, -3.938287f, 35.426449f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4725733, 4, { -47.291790f, -3.999902f, 33.349419f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_r1d2_b0442", 2002872, 4725734, 4, { -38.530239f, -3.999901f, 23.897659f }, 1.000000f, 0.000000f ); - // States -> vf_fire_on vf_fire_of - instance->registerEObj( "unknown_2", 2002735, 0, 4, { -0.189037f, 3.895030f, -223.430893f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4724833, 4, { 0.361240f, 3.879290f, -226.177200f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Entrance", 2001869, 4559005, 5, { 131.881805f, 4.081586f, 116.103600f }, 1.000000f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 113.577202f, 8.000000f, 113.037003f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_r1d2_b0442_1", 2002872, 4864542, 4, { -24.639549f, -0.050003f, 47.771549f }, 1.000000f, 0.000000f ); - // States -> vf_fire_on vf_fire_of - instance->registerEObj( "sgvf_r1d2_b0442_2", 2004182, 4933921, 4, { -0.990592f, 0.027524f, 96.986580f }, 1.000000f, 0.000000f ); - // States -> vf_fire_on vf_fire_of - instance->registerEObj( "Bertha", 2003540, 0, 4, { 31.943810f, 0.326915f, -151.623703f }, 1.000000f, -1.363030f ); - instance->registerEObj( "Bertha_1", 2003541, 0, 4, { 34.257309f, 0.068675f, -143.886703f }, 1.000000f, -1.570451f ); - instance->registerEObj( "Bertha_2", 2003542, 0, 4, { 31.738079f, 0.068675f, -136.270004f }, 1.000000f, -1.400810f ); - instance->registerEObj( "unknown_3", 2003543, 4635871, 4, { 24.398520f, -0.049999f, -178.281799f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_r1d2_b0442_3", 2003544, 4724326, 4, { -7.216811f, 0.000001f, -183.345200f }, 1.000000f, 0.000000f ); - // States -> vf_fire_on vf_fire_of - instance->registerEObj( "Mainstoragevaultgate", 2003547, 4556427, 4, { -96.021538f, -1.183108f, -56.314732f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_r1d2_b0442_4", 2004183, 4933927, 4, { -48.010059f, -0.050043f, -85.297096f }, 1.000000f, 0.000000f ); - // States -> vf_fire_on vf_fire_of - instance->registerEObj( "sgvf_r1d2_b0442_5", 2004184, 4947920, 4, { -43.944740f, -0.050000f, -96.101196f }, 1.000000f, 0.000000f ); - // States -> vf_fire_on vf_fire_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Exit", 2000139, 0, 4, { -138.305603f, -7.970538f, -56.005821f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -103.660202f, -7.970543f, -55.945332f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0250", 2002872, 4724293, 4, { -105.613098f, -7.970541f, -56.019131f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2002735, 0, 4, { -47.933350f, -3.938287f, 35.426449f }, 0.991760f, 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4725733, 4, { -47.291790f, -3.999902f, 33.349419f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_r1d2_b0442", 2002872, 4725734, 4, { -38.530239f, -3.999901f, 23.897659f }, 1.000000f, + 0.000000f ); + // States -> vf_fire_on vf_fire_of + instance->registerEObj( "unknown_2", 2002735, 0, 4, { -0.189037f, 3.895030f, -223.430893f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4724833, 4, { 0.361240f, 3.879290f, -226.177200f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Entrance", 2001869, 4559005, 5, { 131.881805f, 4.081586f, 116.103600f }, 1.000000f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 113.577202f, 8.000000f, 113.037003f }, 0.991760f, 0.000048f ); + instance->registerEObj( "sgvf_r1d2_b0442_1", 2002872, 4864542, 4, { -24.639549f, -0.050003f, 47.771549f }, + 1.000000f, 0.000000f ); + // States -> vf_fire_on vf_fire_of + instance->registerEObj( "sgvf_r1d2_b0442_2", 2004182, 4933921, 4, { -0.990592f, 0.027524f, 96.986580f }, 1.000000f, + 0.000000f ); + // States -> vf_fire_on vf_fire_of + instance->registerEObj( "Bertha", 2003540, 0, 4, { 31.943810f, 0.326915f, -151.623703f }, 1.000000f, -1.363030f ); + instance->registerEObj( "Bertha_1", 2003541, 0, 4, { 34.257309f, 0.068675f, -143.886703f }, 1.000000f, -1.570451f ); + instance->registerEObj( "Bertha_2", 2003542, 0, 4, { 31.738079f, 0.068675f, -136.270004f }, 1.000000f, -1.400810f ); + instance->registerEObj( "unknown_3", 2003543, 4635871, 4, { 24.398520f, -0.049999f, -178.281799f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_r1d2_b0442_3", 2003544, 4724326, 4, { -7.216811f, 0.000001f, -183.345200f }, + 1.000000f, 0.000000f ); + // States -> vf_fire_on vf_fire_of + instance->registerEObj( "Mainstoragevaultgate", 2003547, 4556427, 4, { -96.021538f, -1.183108f, -56.314732f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_r1d2_b0442_4", 2004183, 4933927, 4, { -48.010059f, -0.050043f, -85.297096f }, + 1.000000f, 0.000000f ); + // States -> vf_fire_on vf_fire_of + instance->registerEObj( "sgvf_r1d2_b0442_5", 2004184, 4947920, 4, { -43.944740f, -0.050000f, -96.101196f }, + 1.000000f, 0.000000f ); + // States -> vf_fire_on vf_fire_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheSunkenTempleofQarn.cpp b/src/servers/Scripts/instances/dungeons/TheSunkenTempleofQarn.cpp index 4dd192cc..c3afe439 100644 --- a/src/servers/Scripts/instances/dungeons/TheSunkenTempleofQarn.cpp +++ b/src/servers/Scripts/instances/dungeons/TheSunkenTempleofQarn.cpp @@ -1,89 +1,139 @@ #include #include -class TheSunkenTempleofQarn : public InstanceContentScript +class TheSunkenTempleofQarn : + public InstanceContentScript { public: - TheSunkenTempleofQarn() : InstanceContentScript( 9 ) - { } + TheSunkenTempleofQarn() : + InstanceContentScript( 9 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2000413, 0, 4, { -211.000000f, 0.000002f, 2.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "TheWarden", 2000414, 0, 4, { -111.221802f, 14.346200f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "TheFlameofMagic", 2000415, 3878710, 4, { 8.987488f, -17.399031f, 53.998150f }, 1.000000f, -0.000000f ); - instance->registerEObj( "TheFruitofKnowledge", 2000416, 3878713, 4, { 9.005134f, -17.409531f, -53.991970f }, 1.000000f, -0.000000f ); - instance->registerEObj( "TheGemofAffluence", 2000417, 3878714, 4, { -151.210800f, -10.391200f, -62.004131f }, 1.000000f, -0.000000f ); - instance->registerEObj( "TheHelmofMight", 2000418, 3878715, 4, { -151.162506f, -7.407125f, 61.966801f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Stonepedestal", 2000419, 0, 4, { 117.361099f, -3.708839f, -23.835030f }, 1.000000f, 0.000000f ); - instance->registerEObj( "DoortotheVaultofAether", 2000420, 3692635, 4, { 125.343102f, -0.964693f, -20.363819f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Stonepedestal_1", 2000421, 0, 4, { 117.353203f, -3.713329f, 23.859619f }, 1.000000f, 0.000000f ); - instance->registerEObj( "DoortotheVaultofSecrets", 2000422, 3692636, 4, { 125.292603f, -1.268839f, 20.414270f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Stonepedestal_2", 2000423, 0, 4, { 61.900841f, -17.710569f, 22.327250f }, 1.000000f, 0.000000f ); - instance->registerEObj( "DoortotheVaultofWealth", 2000424, 3692634, 4, { 70.569122f, -15.302040f, 21.475040f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Stonepedestal_3", 2000425, 0, 4, { 61.907928f, -17.695210f, -22.335239f }, 1.000000f, 0.000000f ); - instance->registerEObj( "DoortotheVaultofSteel", 2000426, 3692631, 4, { 70.709091f, -15.224650f, -21.394239f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Leftpan", 2000427, 0, 4, { 190.478394f, -4.200000f, -0.796000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "ThePathtoRetribution", 2000429, 3692668, 4, { 206.461700f, 0.128704f, 0.089424f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2000430, 3693498, 4, { 191.008408f, -0.694424f, -14.489020f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Sealeddoor", 2000431, 3692650, 4, { -9.500046f, -15.008410f, 0.079636f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Sealeddoor_1", 2000432, 3689141, 4, { 9.008017f, -16.388670f, -27.499990f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Sealeddoor_2", 2000433, 3692625, 4, { 8.971441f, -16.420650f, 27.488810f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Sealedentryway", 2000434, 3692683, 4, { 75.484787f, -8.687153f, 0.065771f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Sealeddoor_3", 2000435, 3692667, 4, { 132.458893f, -1.129695f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "InnerSanctumgate", 2000436, 3689097, 4, { -62.922180f, -9.678907f, -43.500019f }, 1.000000f, 0.000000f ); - instance->registerEObj( "LowerSanctumgate", 2000437, 3692684, 4, { 48.112701f, -45.229740f, 19.500000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4208417, 5, { -202.000000f, 0.000002f, 2.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -173.000000f, 12.000000f, 4.500000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Rightpan", 2000428, 0, 4, { 190.478394f, -4.200000f, 0.831205f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2000443, 4208428, 4, { -96.278473f, -11.750040f, -58.418720f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2000444, 0, 4, { -95.744789f, -11.997100f, -61.865219f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000445, 4208432, 4, { 65.669456f, -45.004108f, -34.907001f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_3", 2000446, 0, 4, { 68.223022f, -44.998901f, -35.050049f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_lvd_b0250_w1d3", 2000447, 4208435, 4, { 208.815399f, -4.000029f, 3.424202f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_4", 2000448, 0, 4, { 208.268402f, -4.000159f, 0.000000f }, 1.000000f, -1.570451f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 255.000000f, -3.999998f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "TheScalesofJudgment", 2000658, 0, 4, { 190.569901f, -2.364499f, 0.034341f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_5", 2001156, 4069463, 4, { 190.000000f, -4.000078f, -0.800000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001157, 4069468, 4, { 190.000000f, -4.000021f, 0.800000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Leftpan_1", 2001165, 0, 4, { 190.478394f, -4.170000f, -0.796000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Rightpan_1", 2001166, 0, 4, { 190.478394f, -4.170000f, 0.831200f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_w_lvd_w1d3_wall", 2001765, 4334159, 4, { -10.000000f, -18.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0197", 2000281, 4323974, 4, { 228.750000f, -3.999998f, -9.250000f }, 1.000000f, 0.000000f ); - // States -> floor_on floor_of wall_on wall_of col_0f - instance->registerEObj( "sgvf_w_btl_b0197_1", 2000281, 4323976, 4, { 247.250000f, -3.999998f, -9.250000f }, 1.000000f, 0.000000f ); - // States -> floor_on floor_of wall_on wall_of col_0f - instance->registerEObj( "sgvf_w_btl_b0197_2", 2000281, 4323978, 4, { 228.750000f, -3.999998f, 9.250000f }, 1.000000f, 0.000000f ); - // States -> floor_on floor_of wall_on wall_of col_0f - instance->registerEObj( "sgvf_w_btl_b0197_3", 2000281, 4323979, 4, { 247.250000f, -3.999998f, 9.250000f }, 1.000000f, 0.000000f ); - // States -> floor_on floor_of wall_on wall_of col_0f - instance->registerEObj( "unknown_7", 2000655, 3947232, 4, { 225.699997f, -2.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2000656, 3947235, 4, { 238.000000f, -2.000000f, 12.250000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2000657, 3947234, 4, { 238.000000f, -2.000000f, -12.250000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2000866, 4309073, 4, { -82.750000f, -11.000000f, -61.680000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000867, 4309075, 4, { -69.175003f, -11.000000f, -52.720001f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2000868, 4309074, 4, { -55.514999f, -11.000000f, -61.680000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2000650, 3879215, 4, { -20.000000f, -16.500000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2000651, 3879238, 4, { 9.000000f, -17.000000f, -15.500000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2000652, 3879240, 4, { 9.000000f, -17.000000f, 15.500000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2000653, 3879241, 4, { 50.000000f, -17.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2000654, 3879249, 4, { 124.500000f, -2.000000f, 0.000000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2000413, 0, 4, { -211.000000f, 0.000002f, 2.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "TheWarden", 2000414, 0, 4, { -111.221802f, 14.346200f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "TheFlameofMagic", 2000415, 3878710, 4, { 8.987488f, -17.399031f, 53.998150f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "TheFruitofKnowledge", 2000416, 3878713, 4, { 9.005134f, -17.409531f, -53.991970f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "TheGemofAffluence", 2000417, 3878714, 4, { -151.210800f, -10.391200f, -62.004131f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "TheHelmofMight", 2000418, 3878715, 4, { -151.162506f, -7.407125f, 61.966801f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Stonepedestal", 2000419, 0, 4, { 117.361099f, -3.708839f, -23.835030f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "DoortotheVaultofAether", 2000420, 3692635, 4, { 125.343102f, -0.964693f, -20.363819f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Stonepedestal_1", 2000421, 0, 4, { 117.353203f, -3.713329f, 23.859619f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "DoortotheVaultofSecrets", 2000422, 3692636, 4, { 125.292603f, -1.268839f, 20.414270f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Stonepedestal_2", 2000423, 0, 4, { 61.900841f, -17.710569f, 22.327250f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "DoortotheVaultofWealth", 2000424, 3692634, 4, { 70.569122f, -15.302040f, 21.475040f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Stonepedestal_3", 2000425, 0, 4, { 61.907928f, -17.695210f, -22.335239f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "DoortotheVaultofSteel", 2000426, 3692631, 4, { 70.709091f, -15.224650f, -21.394239f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Leftpan", 2000427, 0, 4, { 190.478394f, -4.200000f, -0.796000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "ThePathtoRetribution", 2000429, 3692668, 4, { 206.461700f, 0.128704f, 0.089424f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2000430, 3693498, 4, { 191.008408f, -0.694424f, -14.489020f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Sealeddoor", 2000431, 3692650, 4, { -9.500046f, -15.008410f, 0.079636f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Sealeddoor_1", 2000432, 3689141, 4, { 9.008017f, -16.388670f, -27.499990f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Sealeddoor_2", 2000433, 3692625, 4, { 8.971441f, -16.420650f, 27.488810f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Sealedentryway", 2000434, 3692683, 4, { 75.484787f, -8.687153f, 0.065771f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Sealeddoor_3", 2000435, 3692667, 4, { 132.458893f, -1.129695f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "InnerSanctumgate", 2000436, 3689097, 4, { -62.922180f, -9.678907f, -43.500019f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "LowerSanctumgate", 2000437, 3692684, 4, { 48.112701f, -45.229740f, 19.500000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4208417, 5, { -202.000000f, 0.000002f, 2.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -173.000000f, 12.000000f, 4.500000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Rightpan", 2000428, 0, 4, { 190.478394f, -4.200000f, 0.831205f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2000443, 4208428, 4, { -96.278473f, -11.750040f, -58.418720f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2000444, 0, 4, { -95.744789f, -11.997100f, -61.865219f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2000445, 4208432, 4, { 65.669456f, -45.004108f, -34.907001f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_3", 2000446, 0, 4, { 68.223022f, -44.998901f, -35.050049f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_lvd_b0250_w1d3", 2000447, 4208435, 4, { 208.815399f, -4.000029f, 3.424202f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_4", 2000448, 0, 4, { 208.268402f, -4.000159f, 0.000000f }, 1.000000f, -1.570451f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 255.000000f, -3.999998f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "TheScalesofJudgment", 2000658, 0, 4, { 190.569901f, -2.364499f, 0.034341f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_5", 2001156, 4069463, 4, { 190.000000f, -4.000078f, -0.800000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001157, 4069468, 4, { 190.000000f, -4.000021f, 0.800000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Leftpan_1", 2001165, 0, 4, { 190.478394f, -4.170000f, -0.796000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Rightpan_1", 2001166, 0, 4, { 190.478394f, -4.170000f, 0.831200f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "sgbg_w_lvd_w1d3_wall", 2001765, 4334159, 4, { -10.000000f, -18.000000f, 0.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0197", 2000281, 4323974, 4, { 228.750000f, -3.999998f, -9.250000f }, 1.000000f, + 0.000000f ); + // States -> floor_on floor_of wall_on wall_of col_0f + instance->registerEObj( "sgvf_w_btl_b0197_1", 2000281, 4323976, 4, { 247.250000f, -3.999998f, -9.250000f }, + 1.000000f, 0.000000f ); + // States -> floor_on floor_of wall_on wall_of col_0f + instance->registerEObj( "sgvf_w_btl_b0197_2", 2000281, 4323978, 4, { 228.750000f, -3.999998f, 9.250000f }, + 1.000000f, 0.000000f ); + // States -> floor_on floor_of wall_on wall_of col_0f + instance->registerEObj( "sgvf_w_btl_b0197_3", 2000281, 4323979, 4, { 247.250000f, -3.999998f, 9.250000f }, + 1.000000f, 0.000000f ); + // States -> floor_on floor_of wall_on wall_of col_0f + instance->registerEObj( "unknown_7", 2000655, 3947232, 4, { 225.699997f, -2.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2000656, 3947235, 4, { 238.000000f, -2.000000f, 12.250000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2000657, 3947234, 4, { 238.000000f, -2.000000f, -12.250000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2000866, 4309073, 4, { -82.750000f, -11.000000f, -61.680000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2000867, 4309075, 4, { -69.175003f, -11.000000f, -52.720001f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2000868, 4309074, 4, { -55.514999f, -11.000000f, -61.680000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2000650, 3879215, 4, { -20.000000f, -16.500000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2000651, 3879238, 4, { 9.000000f, -17.000000f, -15.500000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2000652, 3879240, 4, { 9.000000f, -17.000000f, 15.500000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2000653, 3879241, 4, { 50.000000f, -17.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2000654, 3879249, 4, { 124.500000f, -2.000000f, 0.000000f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheSunkenTempleofQarnHard.cpp b/src/servers/Scripts/instances/dungeons/TheSunkenTempleofQarnHard.cpp index 81a552c3..2f131d49 100644 --- a/src/servers/Scripts/instances/dungeons/TheSunkenTempleofQarnHard.cpp +++ b/src/servers/Scripts/instances/dungeons/TheSunkenTempleofQarnHard.cpp @@ -1,80 +1,126 @@ #include #include -class TheSunkenTempleofQarnHard : public InstanceContentScript +class TheSunkenTempleofQarnHard : + public InstanceContentScript { public: - TheSunkenTempleofQarnHard() : InstanceContentScript( 26 ) - { } + TheSunkenTempleofQarnHard() : + InstanceContentScript( 26 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4876828, 5, { -201.196701f, 0.682657f, 0.238411f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000603, 0, 4, { -172.011398f, 12.472960f, 3.615232f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 128.831894f, -3.999020f, -0.076355f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_0", 2004381, 4688136, 4, { -62.950489f, -9.042180f, -43.471519f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Lockeddoor", 2004382, 4686911, 4, { -52.102619f, -15.747660f, 0.003015f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2004383, 4880940, 4, { -32.646118f, -15.322760f, -0.535999f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2004384, 4688144, 4, { -9.445859f, -15.431120f, 0.091173f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2002735, 0, 4, { -24.503120f, -51.014042f, -2.151611f }, 0.991760f, 1.469946f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4877209, 4, { -24.127260f, -49.149910f, -1.216785f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2004385, 4877211, 4, { -33.270012f, -49.495350f, -17.436060f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_4", 2004576, 4880984, 4, { -32.350761f, -15.369120f, 1.208490f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w1d8_b0492", 2004386, 4877345, 4, { 47.455811f, -46.541481f, 18.191370f }, 1.000000f, 0.000000f ); - // States -> vf_wall_off vf_wall_fade vf_wall_on - instance->registerEObj( "Lockeddoor_1", 2004388, 4688151, 4, { 166.535797f, -43.147060f, 0.015993f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w1d8_b0492_1", 2004402, 4877619, 4, { 213.946701f, -42.801571f, -0.015320f }, 0.991760f, 0.000048f ); - // States -> vf_wall_off vf_wall_fade vf_wall_on - instance->registerEObj( "unknown_5", 2004389, 4688148, 4, { 207.414703f, -1.759183f, 0.009065f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2002735, 0, 4, { 256.782104f, -3.999999f, 0.025025f }, 1.000000f, 1.556998f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4877953, 4, { 257.319305f, -2.265031f, 0.350891f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2004431, 4879695, 4, { 218.928802f, -2.699499f, 0.015198f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2004391, 4742442, 4, { -44.851521f, -16.474951f, -61.569599f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_8", 2004392, 4742441, 4, { -34.082909f, -16.222090f, -39.745499f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2004403, 4688145, 4, { -9.412401f, -14.700150f, -48.979301f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2004393, 4685534, 4, { 13.954340f, -16.478741f, -36.432899f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_11", 2004394, 4688137, 4, { 8.975560f, -14.432130f, -28.492041f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magickedpedestal", 2004396, 4688166, 4, { 53.655460f, -15.371500f, 0.015198f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2004397, 4688139, 4, { 70.286049f, -14.700250f, -20.531210f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magickedpedestal_1", 2004398, 4685848, 4, { 79.511627f, -15.096250f, -36.674881f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_13", 2004399, 4688140, 4, { 70.381950f, -14.689050f, 20.486361f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magickedpedestal_2", 2004400, 4685849, 4, { 79.392357f, -14.749610f, 36.721691f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w1d8_b0118_boss_wall", 2002872, 4981816, 4, { 97.856079f, -4.013123f, -1.052917f }, 0.991760f, 0.000048f ); - // States -> on off - instance->registerEObj( "sgpl_w1d8_b0094_boss_line", 2004772, 4878447, 4, { 98.950607f, -4.000012f, -2.245166f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2004602, 0, 4, { 133.195908f, -4.013123f, -0.015320f }, 0.991760f, 1.570451f ); - instance->registerEObj( "unknown_15", 2004603, 0, 4, { 133.195908f, -4.013123f, 12.924380f }, 0.991760f, 1.570451f ); - instance->registerEObj( "unknown_16", 2004709, 0, 4, { 128.074203f, -4.000000f, 18.223900f }, 1.000000f, 0.000488f ); - instance->registerEObj( "unknown_17", 2004710, 0, 4, { 115.087196f, -4.000000f, 18.223900f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2004711, 0, 4, { 102.068398f, -4.000000f, 18.223900f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2004712, 0, 4, { 97.276253f, -4.013123f, 12.893800f }, 0.991760f, -1.570451f ); - instance->registerEObj( "unknown_20", 2004713, 0, 4, { 97.276253f, -4.013123f, -0.045776f }, 0.991760f, -1.570451f ); - instance->registerEObj( "unknown_21", 2004714, 0, 4, { 97.293999f, -4.000000f, -12.961500f }, 1.000000f, -1.570451f ); - instance->registerEObj( "unknown_22", 2004715, 0, 4, { 102.037003f, -4.013123f, -17.868410f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_23", 2004716, 0, 4, { 115.069099f, -4.000000f, -17.860500f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_24", 2004717, 0, 4, { 128.038498f, -4.013123f, -17.898861f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_25", 2004718, 0, 4, { 133.195908f, -4.013123f, -12.954960f }, 0.991760f, 1.570451f ); - instance->registerEObj( "unknown_26", 2004604, 0, 4, { 130.266205f, -4.013123f, 15.518430f }, 0.991760f, 0.785937f ); - instance->registerEObj( "unknown_27", 2004719, 0, 4, { 99.982773f, -4.000000f, 15.879740f }, 1.000000f, -0.785398f ); - instance->registerEObj( "unknown_28", 2004720, 0, 4, { 100.288803f, -4.000000f, -15.013530f }, 1.000000f, -0.785398f ); - instance->registerEObj( "unknown_29", 2004721, 0, 4, { 130.501694f, -4.000000f, -14.939790f }, 1.000000f, 0.785398f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4876828, 5, { -201.196701f, 0.682657f, 0.238411f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000603, 0, 4, { -172.011398f, 12.472960f, 3.615232f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 128.831894f, -3.999020f, -0.076355f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_0", 2004381, 4688136, 4, { -62.950489f, -9.042180f, -43.471519f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Lockeddoor", 2004382, 4686911, 4, { -52.102619f, -15.747660f, 0.003015f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2004383, 4880940, 4, { -32.646118f, -15.322760f, -0.535999f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2004384, 4688144, 4, { -9.445859f, -15.431120f, 0.091173f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2002735, 0, 4, { -24.503120f, -51.014042f, -2.151611f }, 0.991760f, + 1.469946f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4877209, 4, { -24.127260f, -49.149910f, -1.216785f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2004385, 4877211, 4, { -33.270012f, -49.495350f, -17.436060f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_4", 2004576, 4880984, 4, { -32.350761f, -15.369120f, 1.208490f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w1d8_b0492", 2004386, 4877345, 4, { 47.455811f, -46.541481f, 18.191370f }, 1.000000f, + 0.000000f ); + // States -> vf_wall_off vf_wall_fade vf_wall_on + instance->registerEObj( "Lockeddoor_1", 2004388, 4688151, 4, { 166.535797f, -43.147060f, 0.015993f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w1d8_b0492_1", 2004402, 4877619, 4, { 213.946701f, -42.801571f, -0.015320f }, + 0.991760f, 0.000048f ); + // States -> vf_wall_off vf_wall_fade vf_wall_on + instance->registerEObj( "unknown_5", 2004389, 4688148, 4, { 207.414703f, -1.759183f, 0.009065f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2002735, 0, 4, { 256.782104f, -3.999999f, 0.025025f }, 1.000000f, 1.556998f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4877953, 4, { 257.319305f, -2.265031f, 0.350891f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2004431, 4879695, 4, { 218.928802f, -2.699499f, 0.015198f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2004391, 4742442, 4, { -44.851521f, -16.474951f, -61.569599f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_8", 2004392, 4742441, 4, { -34.082909f, -16.222090f, -39.745499f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2004403, 4688145, 4, { -9.412401f, -14.700150f, -48.979301f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2004393, 4685534, 4, { 13.954340f, -16.478741f, -36.432899f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_11", 2004394, 4688137, 4, { 8.975560f, -14.432130f, -28.492041f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magickedpedestal", 2004396, 4688166, 4, { 53.655460f, -15.371500f, 0.015198f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2004397, 4688139, 4, { 70.286049f, -14.700250f, -20.531210f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magickedpedestal_1", 2004398, 4685848, 4, { 79.511627f, -15.096250f, -36.674881f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_13", 2004399, 4688140, 4, { 70.381950f, -14.689050f, 20.486361f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magickedpedestal_2", 2004400, 4685849, 4, { 79.392357f, -14.749610f, 36.721691f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgpl_w1d8_b0118_boss_wall", 2002872, 4981816, 4, { 97.856079f, -4.013123f, -1.052917f }, + 0.991760f, 0.000048f ); + // States -> on off + instance->registerEObj( "sgpl_w1d8_b0094_boss_line", 2004772, 4878447, 4, { 98.950607f, -4.000012f, -2.245166f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_14", 2004602, 0, 4, { 133.195908f, -4.013123f, -0.015320f }, 0.991760f, + 1.570451f ); + instance->registerEObj( "unknown_15", 2004603, 0, 4, { 133.195908f, -4.013123f, 12.924380f }, 0.991760f, + 1.570451f ); + instance->registerEObj( "unknown_16", 2004709, 0, 4, { 128.074203f, -4.000000f, 18.223900f }, 1.000000f, + 0.000488f ); + instance->registerEObj( "unknown_17", 2004710, 0, 4, { 115.087196f, -4.000000f, 18.223900f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2004711, 0, 4, { 102.068398f, -4.000000f, 18.223900f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2004712, 0, 4, { 97.276253f, -4.013123f, 12.893800f }, 0.991760f, + -1.570451f ); + instance->registerEObj( "unknown_20", 2004713, 0, 4, { 97.276253f, -4.013123f, -0.045776f }, 0.991760f, + -1.570451f ); + instance->registerEObj( "unknown_21", 2004714, 0, 4, { 97.293999f, -4.000000f, -12.961500f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "unknown_22", 2004715, 0, 4, { 102.037003f, -4.013123f, -17.868410f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_23", 2004716, 0, 4, { 115.069099f, -4.000000f, -17.860500f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_24", 2004717, 0, 4, { 128.038498f, -4.013123f, -17.898861f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_25", 2004718, 0, 4, { 133.195908f, -4.013123f, -12.954960f }, 0.991760f, + 1.570451f ); + instance->registerEObj( "unknown_26", 2004604, 0, 4, { 130.266205f, -4.013123f, 15.518430f }, 0.991760f, + 0.785937f ); + instance->registerEObj( "unknown_27", 2004719, 0, 4, { 99.982773f, -4.000000f, 15.879740f }, 1.000000f, + -0.785398f ); + instance->registerEObj( "unknown_28", 2004720, 0, 4, { 100.288803f, -4.000000f, -15.013530f }, 1.000000f, + -0.785398f ); + instance->registerEObj( "unknown_29", 2004721, 0, 4, { 130.501694f, -4.000000f, -14.939790f }, 1.000000f, + 0.785398f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheTamTaraDeepcroft.cpp b/src/servers/Scripts/instances/dungeons/TheTamTaraDeepcroft.cpp index cf3a0dc9..1645ce8b 100644 --- a/src/servers/Scripts/instances/dungeons/TheTamTaraDeepcroft.cpp +++ b/src/servers/Scripts/instances/dungeons/TheTamTaraDeepcroft.cpp @@ -1,57 +1,75 @@ #include #include -class TheTamTaraDeepcroft : public InstanceContentScript +class TheTamTaraDeepcroft : + public InstanceContentScript { public: - TheTamTaraDeepcroft() : InstanceContentScript( 2 ) - { } + TheTamTaraDeepcroft() : + InstanceContentScript( 2 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Cultistorb", 2000061, 3816929, 4, { -8.115554f, 31.427530f, -15.950320f }, 1.000000f, -1.570451f ); - // States -> vf_beam1_on vf_beam1_off all_off - instance->registerEObj( "Cultistorb_1", 2000062, 3817025, 4, { -22.784361f, 25.526300f, 20.482220f }, 1.000000f, -0.625840f ); - // States -> vf_beam2_off vf_beam2_on all_off - instance->registerEObj( "Sealedbarrier", 2000060, 2065984, 4, { -103.196800f, 16.825590f, 15.152160f }, 0.950000f, -1.044062f ); - instance->registerEObj( "Cultistrosary", 2000057, 0, 4, { -179.952606f, 14.711600f, -4.996500f }, 0.750000f, -1.570796f ); - instance->registerEObj( "Cultistorb_2", 2000063, 3817039, 4, { -89.733833f, 15.701490f, 13.923830f }, 0.991789f, 0.925052f ); - // States -> vf_beam3_off vf_beam3_on all_off - instance->registerEObj( "Cultistorb_3", 2000067, 3817052, 4, { -94.766899f, 15.709600f, 3.820237f }, 1.000000f, 1.227256f ); - // States -> vf_beam3_off vf_beam3_on all_off - instance->registerEObj( "unknown_0", 2000054, 0, 4, { -53.345570f, 49.647820f, -146.799103f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2001085, 0, 4, { -68.771881f, 15.144450f, -3.840616f }, 0.539465f, 1.095248f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2001697, 4108043, 4, { 13.157160f, 29.280100f, -7.370761f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001698, 4108046, 4, { -18.524361f, 23.342850f, 42.375740f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001699, 4108055, 4, { 19.811380f, 30.119770f, -20.717630f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2001700, 0, 4, { 19.739401f, 30.119801f, -19.838511f }, 1.000000f, 1.409320f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2001701, 4108071, 4, { -3.087158f, 23.754129f, 40.895020f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_3", 2001702, 0, 4, { -3.984208f, 23.754129f, 41.874859f }, 1.000000f, -0.675014f ); - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2001703, 4108078, 4, { -95.779678f, 14.524550f, 45.017761f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_4", 2001704, 0, 4, { -97.035683f, 14.524550f, 44.317101f }, 1.000000f, 0.656244f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -57.755428f, 47.653931f, -120.622597f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_5", 2001741, 3860684, 4, { -64.365189f, 15.049010f, -4.720837f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -42.771080f, 14.067750f, -17.288521f }, 0.991789f, 0.000144f ); - instance->registerEObj( "Entrance", 2000182, 4108136, 5, { -57.606178f, 49.507038f, -142.170105f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Cultistorb", 2000061, 3816929, 4, { -8.115554f, 31.427530f, -15.950320f }, 1.000000f, + -1.570451f ); + // States -> vf_beam1_on vf_beam1_off all_off + instance->registerEObj( "Cultistorb_1", 2000062, 3817025, 4, { -22.784361f, 25.526300f, 20.482220f }, 1.000000f, + -0.625840f ); + // States -> vf_beam2_off vf_beam2_on all_off + instance->registerEObj( "Sealedbarrier", 2000060, 2065984, 4, { -103.196800f, 16.825590f, 15.152160f }, 0.950000f, + -1.044062f ); + instance->registerEObj( "Cultistrosary", 2000057, 0, 4, { -179.952606f, 14.711600f, -4.996500f }, 0.750000f, + -1.570796f ); + instance->registerEObj( "Cultistorb_2", 2000063, 3817039, 4, { -89.733833f, 15.701490f, 13.923830f }, 0.991789f, + 0.925052f ); + // States -> vf_beam3_off vf_beam3_on all_off + instance->registerEObj( "Cultistorb_3", 2000067, 3817052, 4, { -94.766899f, 15.709600f, 3.820237f }, 1.000000f, + 1.227256f ); + // States -> vf_beam3_off vf_beam3_on all_off + instance->registerEObj( "unknown_0", 2000054, 0, 4, { -53.345570f, 49.647820f, -146.799103f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2001085, 0, 4, { -68.771881f, 15.144450f, -3.840616f }, 0.539465f, 1.095248f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2001697, 4108043, 4, { 13.157160f, 29.280100f, -7.370761f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001698, 4108046, 4, { -18.524361f, 23.342850f, 42.375740f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001699, 4108055, 4, { 19.811380f, 30.119770f, -20.717630f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2001700, 0, 4, { 19.739401f, 30.119801f, -19.838511f }, 1.000000f, 1.409320f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2001701, 4108071, 4, { -3.087158f, 23.754129f, 40.895020f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_3", 2001702, 0, 4, { -3.984208f, 23.754129f, 41.874859f }, 1.000000f, -0.675014f ); + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2001703, 4108078, 4, { -95.779678f, 14.524550f, 45.017761f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_4", 2001704, 0, 4, { -97.035683f, 14.524550f, 44.317101f }, 1.000000f, 0.656244f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -57.755428f, 47.653931f, -120.622597f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_5", 2001741, 3860684, 4, { -64.365189f, 15.049010f, -4.720837f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -42.771080f, 14.067750f, -17.288521f }, 0.991789f, 0.000144f ); + instance->registerEObj( "Entrance", 2000182, 4108136, 5, { -57.606178f, 49.507038f, -142.170105f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheTamTaraDeepcroftHard.cpp b/src/servers/Scripts/instances/dungeons/TheTamTaraDeepcroftHard.cpp index 1796e774..26498411 100644 --- a/src/servers/Scripts/instances/dungeons/TheTamTaraDeepcroftHard.cpp +++ b/src/servers/Scripts/instances/dungeons/TheTamTaraDeepcroftHard.cpp @@ -1,104 +1,154 @@ #include #include -class TheTamTaraDeepcroftHard : public InstanceContentScript +class TheTamTaraDeepcroftHard : + public InstanceContentScript { public: - TheTamTaraDeepcroftHard() : InstanceContentScript( 24 ) - { } + TheTamTaraDeepcroftHard() : + InstanceContentScript( 24 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2001085, 0, 4, { -68.771881f, 15.144450f, -3.840616f }, 0.539465f, 1.095248f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4660133, 4, { -67.088028f, 14.657070f, -5.210713f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2004286, 4745117, 4, { -60.778740f, 14.055000f, -22.019831f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2004287, 4745111, 4, { -42.778549f, 14.055000f, -12.943500f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2004288, 4745124, 4, { -48.035992f, 14.055000f, -5.265638f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2004289, 4745125, 4, { -57.996319f, 14.055000f, -5.661358f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2004290, 4745126, 4, { -59.234348f, 14.055000f, -15.781390f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2004291, 4745127, 4, { -50.008671f, 14.055000f, -22.601339f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_void01_large", 2004285, 4867481, 4, { -55.031620f, 14.055000f, 5.443754f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_1", 2004285, 4867482, 4, { -41.704861f, 14.055000f, 2.969403f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_2", 2004285, 4867483, 4, { -33.780270f, 14.055000f, -9.729918f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_3", 2004285, 4867484, 4, { -39.301521f, 14.055000f, -26.615370f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_4", 2004285, 4867485, 4, { -55.347961f, 14.055000f, -30.450310f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_5", 2004285, 4867486, 4, { -65.834686f, 14.055000f, -19.944820f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4660142, 4, { 19.425310f, 16.400459f, 72.640419f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2004084, 4660138, 4, { 47.314381f, 16.403030f, 108.679100f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2002735, 0, 4, { 20.629601f, 16.280300f, 75.420700f }, 1.000000f, 0.688908f ); - instance->registerEObj( "unknown_8", 2002735, 0, 4, { 88.048500f, 22.493870f, -21.533701f }, 1.000000f, -0.001870f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4660145, 4, { 88.376717f, 21.338551f, -19.283840f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_w_lvd_void01_large_6", 2004285, 4771300, 4, { 84.103310f, 22.101000f, -58.390091f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_7", 2004285, 4771301, 4, { 96.234253f, 22.101000f, -56.482040f }, 1.000000f, 0.723667f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_8", 2004285, 4771302, 4, { 105.255798f, 22.101000f, -44.764778f }, 1.000000f, 1.518654f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_9", 2004285, 4771303, 4, { 102.038200f, 22.101000f, -32.837021f }, 1.000000f, 0.857277f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_10", 2004285, 4771304, 4, { 91.888603f, 22.101000f, -25.882389f }, 1.000000f, -0.007381f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_11", 2004285, 4771305, 4, { 80.039169f, 22.101000f, -26.985500f }, 1.000000f, -0.690998f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_12", 2004285, 4771306, 4, { 71.290688f, 22.101000f, -37.049461f }, 1.000000f, -1.482906f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgpl_w_lvd_void01_large_13", 2004285, 4771307, 4, { 71.819580f, 22.079769f, -49.945210f }, 0.991760f, -0.798114f ); - // States -> vfx_on vfx_off - instance->registerEObj( "Tornfolio", 2004297, 0, 4, { -47.454521f, 44.378349f, -68.195801f }, 0.991760f, -1.194174f ); - instance->registerEObj( "Tornfolio_1", 2004298, 0, 4, { -11.833840f, 29.549919f, -15.995260f }, 1.000000f, 1.058869f ); - instance->registerEObj( "Tornfolio_2", 2004299, 0, 4, { -28.185230f, 24.286421f, 20.665119f }, 0.991760f, -0.909425f ); - instance->registerEObj( "Tornfolio_3", 2004300, 0, 4, { 72.129387f, 16.396311f, 132.066803f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Tornfolio_4", 2004301, 0, 4, { 80.744392f, 16.907101f, 57.719940f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Tornfolio_5", 2004302, 0, 4, { 147.103104f, 18.005850f, 69.150192f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Tornfolio_6", 2004303, 0, 4, { -147.644699f, 15.900680f, 113.328697f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2004086, 4656964, 4, { -7.602334f, 30.454849f, -18.853220f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2004088, 4656965, 4, { -20.840630f, 24.342739f, 19.409069f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_f1d6_lvd_barr1", 2004087, 4671678, 4, { 11.105700f, 29.275560f, -8.141251f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgbg_f1d6_barr2", 2004089, 4671683, 4, { -6.673915f, 23.630680f, 39.042259f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgbg_f1d6_barr1", 2004093, 4671679, 4, { 74.836761f, 16.445829f, 108.252800f }, 1.000000f, 0.000000f ); - // States -> vfx_on vfx_off - instance->registerEObj( "sgbg_f1d6_barr1_1", 2004094, 4671680, 4, { 100.083900f, 17.257870f, 47.440189f }, 0.991760f, 0.000048f ); - // States -> vfx_on vfx_off - instance->registerEObj( "Defiledcoffin", 2004090, 4695648, 4, { 78.676689f, 17.793221f, 150.248901f }, 1.000000f, 0.000000f ); - // States -> vf_moya_on vf_moya_off vf_moya_off2 - instance->registerEObj( "Defiledcoffin_1", 2004091, 4671204, 4, { 72.424454f, 18.387079f, 48.386349f }, 0.991760f, 0.000048f ); - // States -> vf_moya_on vf_moya_off vf_moya_off2 - instance->registerEObj( "Defiledcoffin_2", 2004092, 4668899, 4, { 146.684906f, 17.990360f, 69.562866f }, 0.991760f, 0.000048f ); - // States -> vf_moya_on vf_moya_off vf_moya_off2 - instance->registerEObj( "Aetherialflow", 2004095, 4696055, 4, { 96.409500f, 22.100000f, -49.506569f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2004099, 0, 4, { -85.344437f, 15.048210f, 7.188452f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2004096, 4656966, 4, { -89.972237f, 14.236630f, 16.250851f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_13", 2004097, 4656967, 4, { -97.824608f, 14.083040f, 2.446555f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_f1b6_b0446", 2004098, 4660132, 4, { -89.234444f, 13.859010f, 8.573526f }, 1.000000f, 0.000000f ); - // States -> mayu_on mayu_off mayu_off_anim - instance->registerEObj( "Exit", 2000139, 0, 4, { -42.771080f, 14.067750f, -17.288521f }, 0.991789f, 0.000144f ); - instance->registerEObj( "Entrance", 2000182, 4660224, 5, { -57.606178f, 49.507038f, -142.170105f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -57.755428f, 47.653931f, -120.622597f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2001085, 0, 4, { -68.771881f, 15.144450f, -3.840616f }, 0.539465f, 1.095248f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4660133, 4, { -67.088028f, 14.657070f, -5.210713f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2004286, 4745117, 4, { -60.778740f, 14.055000f, -22.019831f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2004287, 4745111, 4, { -42.778549f, 14.055000f, -12.943500f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2004288, 4745124, 4, { -48.035992f, 14.055000f, -5.265638f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2004289, 4745125, 4, { -57.996319f, 14.055000f, -5.661358f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2004290, 4745126, 4, { -59.234348f, 14.055000f, -15.781390f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2004291, 4745127, 4, { -50.008671f, 14.055000f, -22.601339f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_void01_large", 2004285, 4867481, 4, { -55.031620f, 14.055000f, 5.443754f }, + 1.000000f, 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_1", 2004285, 4867482, 4, { -41.704861f, 14.055000f, 2.969403f }, + 1.000000f, 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_2", 2004285, 4867483, 4, { -33.780270f, 14.055000f, -9.729918f }, + 1.000000f, 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_3", 2004285, 4867484, 4, { -39.301521f, 14.055000f, -26.615370f }, + 1.000000f, 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_4", 2004285, 4867485, 4, { -55.347961f, 14.055000f, -30.450310f }, + 1.000000f, 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_5", 2004285, 4867486, 4, { -65.834686f, 14.055000f, -19.944820f }, + 1.000000f, 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4660142, 4, { 19.425310f, 16.400459f, 72.640419f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2004084, 4660138, 4, { 47.314381f, 16.403030f, 108.679100f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2002735, 0, 4, { 20.629601f, 16.280300f, 75.420700f }, 1.000000f, 0.688908f ); + instance->registerEObj( "unknown_8", 2002735, 0, 4, { 88.048500f, 22.493870f, -21.533701f }, 1.000000f, + -0.001870f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 4660145, 4, { 88.376717f, 21.338551f, -19.283840f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_w_lvd_void01_large_6", 2004285, 4771300, 4, { 84.103310f, 22.101000f, -58.390091f }, + 1.000000f, 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_7", 2004285, 4771301, 4, { 96.234253f, 22.101000f, -56.482040f }, + 1.000000f, 0.723667f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_8", 2004285, 4771302, 4, { 105.255798f, 22.101000f, -44.764778f }, + 1.000000f, 1.518654f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_9", 2004285, 4771303, 4, { 102.038200f, 22.101000f, -32.837021f }, + 1.000000f, 0.857277f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_10", 2004285, 4771304, 4, { 91.888603f, 22.101000f, -25.882389f }, + 1.000000f, -0.007381f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_11", 2004285, 4771305, 4, { 80.039169f, 22.101000f, -26.985500f }, + 1.000000f, -0.690998f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_12", 2004285, 4771306, 4, { 71.290688f, 22.101000f, -37.049461f }, + 1.000000f, -1.482906f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgpl_w_lvd_void01_large_13", 2004285, 4771307, 4, { 71.819580f, 22.079769f, -49.945210f }, + 0.991760f, -0.798114f ); + // States -> vfx_on vfx_off + instance->registerEObj( "Tornfolio", 2004297, 0, 4, { -47.454521f, 44.378349f, -68.195801f }, 0.991760f, + -1.194174f ); + instance->registerEObj( "Tornfolio_1", 2004298, 0, 4, { -11.833840f, 29.549919f, -15.995260f }, 1.000000f, + 1.058869f ); + instance->registerEObj( "Tornfolio_2", 2004299, 0, 4, { -28.185230f, 24.286421f, 20.665119f }, 0.991760f, + -0.909425f ); + instance->registerEObj( "Tornfolio_3", 2004300, 0, 4, { 72.129387f, 16.396311f, 132.066803f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Tornfolio_4", 2004301, 0, 4, { 80.744392f, 16.907101f, 57.719940f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Tornfolio_5", 2004302, 0, 4, { 147.103104f, 18.005850f, 69.150192f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Tornfolio_6", 2004303, 0, 4, { -147.644699f, 15.900680f, 113.328697f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2004086, 4656964, 4, { -7.602334f, 30.454849f, -18.853220f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2004088, 4656965, 4, { -20.840630f, 24.342739f, 19.409069f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_f1d6_lvd_barr1", 2004087, 4671678, 4, { 11.105700f, 29.275560f, -8.141251f }, + 1.000000f, 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgbg_f1d6_barr2", 2004089, 4671683, 4, { -6.673915f, 23.630680f, 39.042259f }, 1.000000f, + 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgbg_f1d6_barr1", 2004093, 4671679, 4, { 74.836761f, 16.445829f, 108.252800f }, 1.000000f, + 0.000000f ); + // States -> vfx_on vfx_off + instance->registerEObj( "sgbg_f1d6_barr1_1", 2004094, 4671680, 4, { 100.083900f, 17.257870f, 47.440189f }, + 0.991760f, 0.000048f ); + // States -> vfx_on vfx_off + instance->registerEObj( "Defiledcoffin", 2004090, 4695648, 4, { 78.676689f, 17.793221f, 150.248901f }, 1.000000f, + 0.000000f ); + // States -> vf_moya_on vf_moya_off vf_moya_off2 + instance->registerEObj( "Defiledcoffin_1", 2004091, 4671204, 4, { 72.424454f, 18.387079f, 48.386349f }, 0.991760f, + 0.000048f ); + // States -> vf_moya_on vf_moya_off vf_moya_off2 + instance->registerEObj( "Defiledcoffin_2", 2004092, 4668899, 4, { 146.684906f, 17.990360f, 69.562866f }, 0.991760f, + 0.000048f ); + // States -> vf_moya_on vf_moya_off vf_moya_off2 + instance->registerEObj( "Aetherialflow", 2004095, 4696055, 4, { 96.409500f, 22.100000f, -49.506569f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2004099, 0, 4, { -85.344437f, 15.048210f, 7.188452f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_12", 2004096, 4656966, 4, { -89.972237f, 14.236630f, 16.250851f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_13", 2004097, 4656967, 4, { -97.824608f, 14.083040f, 2.446555f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_f1b6_b0446", 2004098, 4660132, 4, { -89.234444f, 13.859010f, 8.573526f }, 1.000000f, + 0.000000f ); + // States -> mayu_on mayu_off mayu_off_anim + instance->registerEObj( "Exit", 2000139, 0, 4, { -42.771080f, 14.067750f, -17.288521f }, 0.991789f, 0.000144f ); + instance->registerEObj( "Entrance", 2000182, 4660224, 5, { -57.606178f, 49.507038f, -142.170105f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -57.755428f, 47.653931f, -120.622597f }, 0.991760f, + 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheTempleoftheFist.cpp b/src/servers/Scripts/instances/dungeons/TheTempleoftheFist.cpp index 3873360c..5c7b5c46 100644 --- a/src/servers/Scripts/instances/dungeons/TheTempleoftheFist.cpp +++ b/src/servers/Scripts/instances/dungeons/TheTempleoftheFist.cpp @@ -1,26 +1,29 @@ #include #include -class TheTempleoftheFist : public InstanceContentScript +class TheTempleoftheFist : + public InstanceContentScript { public: - TheTempleoftheFist() : InstanceContentScript( 51 ) - { } + TheTempleoftheFist() : + InstanceContentScript( 51 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheThousandMawsofTotoRak.cpp b/src/servers/Scripts/instances/dungeons/TheThousandMawsofTotoRak.cpp index 713e4c5f..f25044b6 100644 --- a/src/servers/Scripts/instances/dungeons/TheThousandMawsofTotoRak.cpp +++ b/src/servers/Scripts/instances/dungeons/TheThousandMawsofTotoRak.cpp @@ -1,79 +1,130 @@ #include #include -class TheThousandMawsofTotoRak : public InstanceContentScript +class TheThousandMawsofTotoRak : + public InstanceContentScript { public: - TheThousandMawsofTotoRak() : InstanceContentScript( 1 ) - { } + TheThousandMawsofTotoRak() : + InstanceContentScript( 1 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2000404, 0, 4, { 216.937500f, -35.568851f, -142.076797f }, 0.961304f, 0.000144f ); - instance->registerEObj( "unknown_1", 2000133, 0, 4, { 185.564896f, -34.195511f, -144.640305f }, 0.900235f, 0.000336f ); - instance->registerEObj( "Exit", 2000683, 0, 4, { 237.565506f, -38.900299f, -144.195099f }, 1.000000f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2000041, 3879345, 4, { 191.261795f, -36.122822f, -143.910904f }, 1.267374f, -1.570451f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2000040, 0, 4, { 191.150696f, -36.117340f, -144.592300f }, 1.000000f, -1.570451f ); - instance->registerEObj( "unknown_3", 2001005, 0, 4, { 188.864594f, -35.987011f, -144.216095f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1r1_subboss1line", 2000131, 4126014, 4, { -117.593002f, -4.171226f, 107.608299f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_f1r1_subboss2line", 2000132, 4127292, 4, { -76.504066f, -8.171217f, -41.161350f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1r1_subboss1wall", 2000137, 4127387, 4, { -119.798599f, -4.165526f, 104.508904f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_f1r1_subboss2wall", 2000138, 4127414, 4, { -78.310173f, -8.133030f, -44.002850f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1r1_bossplusfloor", 2001152, 4374098, 4, { 197.405899f, -39.475101f, -147.966705f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Waterstainednote", 2000093, 0, 4, { -241.596100f, 4.936373f, -72.770317f }, 0.930753f, 0.000240f ); - instance->registerEObj( "Waterstainednote_1", 2000094, 0, 4, { -211.121002f, 2.082635f, -67.117737f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Waterstainednote_2", 2000095, 0, 4, { -204.427002f, -1.617569f, 21.831829f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Waterstainednote_3", 2000096, 0, 4, { -149.074097f, -2.569309f, 101.795403f }, 0.930753f, 0.000240f ); - instance->registerEObj( "Magitekphotocell", 2000100, 0, 4, { -202.105804f, 0.318934f, -79.179108f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Magitekphotocell_1", 2000101, 0, 4, { -221.659195f, -4.425579f, 54.985451f }, 0.869717f, 0.000432f ); - instance->registerEObj( "Magitekphotocell_2", 2000102, 0, 4, { -204.699799f, -4.926546f, 88.822723f }, 0.900235f, 0.000336f ); - instance->registerEObj( "Magitekphotocell_3", 2000103, 0, 4, { -104.023300f, -3.463795f, 104.075897f }, 0.839199f, 0.000527f ); - instance->registerEObj( "Magitekterminal", 2000116, 0, 4, { -112.013199f, -4.132327f, 112.031403f }, 0.991789f, 0.000048f ); - instance->registerEObj( "unknown_4", 2000117, 1699196, 4, { -95.990372f, -4.125101f, 111.985901f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Magitekterminal_1", 2000118, 0, 4, { -80.026077f, -8.132326f, -47.971760f }, 0.961271f, 0.000144f ); - instance->registerEObj( "unknown_5", 2000121, 1699201, 4, { -95.538803f, -8.133920f, -48.020191f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Accusationchamberdoor", 2000384, 3302267, 4, { -207.996994f, 0.110343f, -95.749359f }, 0.961271f, 0.000144f ); - instance->registerEObj( "Abacinationchamberdoor", 2000385, 3302270, 4, { 96.210892f, -19.927860f, -112.002098f }, 0.961271f, 0.000144f ); - instance->registerEObj( "unknown_6", 2000389, 3302276, 4, { -223.993698f, 2.170142f, -111.314598f }, 0.900235f, 0.000336f ); - instance->registerEObj( "unknown_7", 2000390, 3302281, 4, { 15.396310f, -12.161490f, -31.967699f }, 0.961271f, 0.000144f ); - instance->registerEObj( "unknown_8", 2000391, 3302277, 4, { -111.986000f, -11.694670f, -63.677799f }, 0.961271f, 0.000144f ); - instance->registerEObj( "unknown_9", 2000392, 3302279, 4, { -54.326931f, -12.619540f, -135.517899f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2000393, 3302283, 4, { 127.918297f, -24.124969f, -112.616798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000397, 3302282, 4, { -66.330208f, -8.057444f, -48.020191f }, 0.961271f, 0.000144f ); - instance->registerEObj( "unknown_12", 2000398, 3302278, 4, { -103.188698f, -12.587360f, -137.701004f }, 0.991789f, 0.000048f ); - instance->registerEObj( "unknown_13", 2000399, 3302280, 4, { -7.119315f, -12.783910f, -137.865402f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2000400, 3302275, 4, { 175.723206f, -34.137970f, -140.074005f }, 0.930753f, 0.000240f ); - instance->registerEObj( "Magitekphotocell_4", 2000104, 0, 4, { -130.358597f, -8.977930f, -71.240982f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_15", 2000111, 0, 4, { -221.057495f, -0.076355f, -113.847603f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_16", 2000112, 0, 4, { 18.393040f, -12.250300f, -28.183680f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2000113, 0, 4, { -109.852501f, -11.441870f, -58.962391f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2000114, 0, 4, { -55.111301f, -12.534730f, -140.141006f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2000115, 0, 4, { 121.910698f, -23.325809f, -110.515297f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekphotocell_5", 2000105, 0, 4, { -130.724106f, -9.414856f, -68.131592f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekphotocell_6", 2000106, 0, 4, { -130.418900f, -9.567444f, -67.856873f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Magitekphotocell_7", 2000107, 0, 4, { -130.101807f, -9.739193f, -67.526657f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Magitekphotocell_8", 2000107, 0, 4, { -129.796707f, -9.914070f, -67.221481f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Magitekphotocell_9", 2000039, 0, 4, { -73.754570f, -6.333896f, 21.536640f }, 0.991789f, 0.000048f ); - instance->registerEObj( "Magitekphotocell_10", 2000108, 0, 4, { -186.655807f, -0.160111f, -10.531350f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magitekphotocell_11", 2000109, 0, 4, { -143.922195f, 0.079653f, 1.801933f }, 0.961271f, 0.000144f ); - instance->registerEObj( "Magitekphotocell_12", 2000110, 0, 4, { -233.539398f, -0.167908f, -103.013702f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -311.485504f, 9.496978f, -76.989082f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4127435, 5, { -322.238495f, 11.991770f, -78.470192f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2000404, 0, 4, { 216.937500f, -35.568851f, -142.076797f }, 0.961304f, + 0.000144f ); + instance->registerEObj( "unknown_1", 2000133, 0, 4, { 185.564896f, -34.195511f, -144.640305f }, 0.900235f, + 0.000336f ); + instance->registerEObj( "Exit", 2000683, 0, 4, { 237.565506f, -38.900299f, -144.195099f }, 1.000000f, 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2000041, 3879345, 4, { 191.261795f, -36.122822f, -143.910904f }, + 1.267374f, -1.570451f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2000040, 0, 4, { 191.150696f, -36.117340f, -144.592300f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "unknown_3", 2001005, 0, 4, { 188.864594f, -35.987011f, -144.216095f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_f1r1_subboss1line", 2000131, 4126014, 4, { -117.593002f, -4.171226f, 107.608299f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgpl_f1r1_subboss2line", 2000132, 4127292, 4, { -76.504066f, -8.171217f, -41.161350f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_f1r1_subboss1wall", 2000137, 4127387, 4, { -119.798599f, -4.165526f, 104.508904f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_f1r1_subboss2wall", 2000138, 4127414, 4, { -78.310173f, -8.133030f, -44.002850f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_f1r1_bossplusfloor", 2001152, 4374098, 4, { 197.405899f, -39.475101f, -147.966705f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Waterstainednote", 2000093, 0, 4, { -241.596100f, 4.936373f, -72.770317f }, 0.930753f, + 0.000240f ); + instance->registerEObj( "Waterstainednote_1", 2000094, 0, 4, { -211.121002f, 2.082635f, -67.117737f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Waterstainednote_2", 2000095, 0, 4, { -204.427002f, -1.617569f, 21.831829f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Waterstainednote_3", 2000096, 0, 4, { -149.074097f, -2.569309f, 101.795403f }, 0.930753f, + 0.000240f ); + instance->registerEObj( "Magitekphotocell", 2000100, 0, 4, { -202.105804f, 0.318934f, -79.179108f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Magitekphotocell_1", 2000101, 0, 4, { -221.659195f, -4.425579f, 54.985451f }, 0.869717f, + 0.000432f ); + instance->registerEObj( "Magitekphotocell_2", 2000102, 0, 4, { -204.699799f, -4.926546f, 88.822723f }, 0.900235f, + 0.000336f ); + instance->registerEObj( "Magitekphotocell_3", 2000103, 0, 4, { -104.023300f, -3.463795f, 104.075897f }, 0.839199f, + 0.000527f ); + instance->registerEObj( "Magitekterminal", 2000116, 0, 4, { -112.013199f, -4.132327f, 112.031403f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "unknown_4", 2000117, 1699196, 4, { -95.990372f, -4.125101f, 111.985901f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Magitekterminal_1", 2000118, 0, 4, { -80.026077f, -8.132326f, -47.971760f }, 0.961271f, + 0.000144f ); + instance->registerEObj( "unknown_5", 2000121, 1699201, 4, { -95.538803f, -8.133920f, -48.020191f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Accusationchamberdoor", 2000384, 3302267, 4, { -207.996994f, 0.110343f, -95.749359f }, + 0.961271f, 0.000144f ); + instance->registerEObj( "Abacinationchamberdoor", 2000385, 3302270, 4, { 96.210892f, -19.927860f, -112.002098f }, + 0.961271f, 0.000144f ); + instance->registerEObj( "unknown_6", 2000389, 3302276, 4, { -223.993698f, 2.170142f, -111.314598f }, 0.900235f, + 0.000336f ); + instance->registerEObj( "unknown_7", 2000390, 3302281, 4, { 15.396310f, -12.161490f, -31.967699f }, 0.961271f, + 0.000144f ); + instance->registerEObj( "unknown_8", 2000391, 3302277, 4, { -111.986000f, -11.694670f, -63.677799f }, 0.961271f, + 0.000144f ); + instance->registerEObj( "unknown_9", 2000392, 3302279, 4, { -54.326931f, -12.619540f, -135.517899f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2000393, 3302283, 4, { 127.918297f, -24.124969f, -112.616798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2000397, 3302282, 4, { -66.330208f, -8.057444f, -48.020191f }, 0.961271f, + 0.000144f ); + instance->registerEObj( "unknown_12", 2000398, 3302278, 4, { -103.188698f, -12.587360f, -137.701004f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "unknown_13", 2000399, 3302280, 4, { -7.119315f, -12.783910f, -137.865402f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2000400, 3302275, 4, { 175.723206f, -34.137970f, -140.074005f }, 0.930753f, + 0.000240f ); + instance->registerEObj( "Magitekphotocell_4", 2000104, 0, 4, { -130.358597f, -8.977930f, -71.240982f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_15", 2000111, 0, 4, { -221.057495f, -0.076355f, -113.847603f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_16", 2000112, 0, 4, { 18.393040f, -12.250300f, -28.183680f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2000113, 0, 4, { -109.852501f, -11.441870f, -58.962391f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2000114, 0, 4, { -55.111301f, -12.534730f, -140.141006f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2000115, 0, 4, { 121.910698f, -23.325809f, -110.515297f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekphotocell_5", 2000105, 0, 4, { -130.724106f, -9.414856f, -68.131592f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekphotocell_6", 2000106, 0, 4, { -130.418900f, -9.567444f, -67.856873f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Magitekphotocell_7", 2000107, 0, 4, { -130.101807f, -9.739193f, -67.526657f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Magitekphotocell_8", 2000107, 0, 4, { -129.796707f, -9.914070f, -67.221481f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Magitekphotocell_9", 2000039, 0, 4, { -73.754570f, -6.333896f, 21.536640f }, 0.991789f, + 0.000048f ); + instance->registerEObj( "Magitekphotocell_10", 2000108, 0, 4, { -186.655807f, -0.160111f, -10.531350f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magitekphotocell_11", 2000109, 0, 4, { -143.922195f, 0.079653f, 1.801933f }, 0.961271f, + 0.000144f ); + instance->registerEObj( "Magitekphotocell_12", 2000110, 0, 4, { -233.539398f, -0.167908f, -103.013702f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -311.485504f, 9.496978f, -76.989082f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4127435, 5, { -322.238495f, 11.991770f, -78.470192f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheVault.cpp b/src/servers/Scripts/instances/dungeons/TheVault.cpp index ecf5244f..278a6e94 100644 --- a/src/servers/Scripts/instances/dungeons/TheVault.cpp +++ b/src/servers/Scripts/instances/dungeons/TheVault.cpp @@ -1,26 +1,29 @@ #include #include -class TheVault : public InstanceContentScript +class TheVault : + public InstanceContentScript { public: - TheVault() : InstanceContentScript( 34 ) - { } + TheVault() : + InstanceContentScript( 34 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheWanderersPalace.cpp b/src/servers/Scripts/instances/dungeons/TheWanderersPalace.cpp index 668fed1b..7bfbe408 100644 --- a/src/servers/Scripts/instances/dungeons/TheWanderersPalace.cpp +++ b/src/servers/Scripts/instances/dungeons/TheWanderersPalace.cpp @@ -1,80 +1,128 @@ #include #include -class TheWanderersPalace : public InstanceContentScript +class TheWanderersPalace : + public InstanceContentScript { public: - TheWanderersPalace() : InstanceContentScript( 10 ) - { } + TheWanderersPalace() : + InstanceContentScript( 10 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2001809, 0, 4, { 134.115601f, -17.997431f, 473.641693f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 137.299393f, -17.990360f, 454.401398f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 73.105957f, 9.994568f, -475.590790f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4177700, 5, { 130.745697f, -17.983120f, 461.438293f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_1", 2001822, 4086687, 4, { 125.014000f, -9.459579f, 64.149277f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2001811, 4259124, 4, { 127.094200f, -12.000000f, 125.826500f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094", 2001810, 4259126, 4, { 124.986603f, -12.039370f, 125.401100f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0250", 2000277, 4259125, 4, { 125.461502f, -12.000000f, 89.079697f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2001114, 4323503, 4, { 118.000000f, -8.700125f, 65.370102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2001823, 4323504, 4, { 117.995003f, -7.766907f, 65.232300f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Nymiandevice", 2001123, 4126926, 4, { 117.995003f, -9.001419f, 65.378754f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2002790, 4405761, 4, { 125.029999f, -13.277490f, 181.098602f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001813, 4259128, 4, { 45.925018f, 0.000000f, -212.411499f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001812, 4259127, 4, { 43.121960f, -0.015320f, -212.616592f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "unknown_5", 2001824, 4086767, 4, { 43.140591f, 0.499020f, -29.383511f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001827, 4086770, 4, { 43.011742f, 0.540422f, -152.602997f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000278, 4259129, 4, { 43.493420f, -0.100058f, -248.056198f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2001115, 4323510, 4, { 35.000000f, 1.250271f, -5.876968f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2001116, 4323508, 4, { 35.000000f, 1.249865f, -28.099899f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2001117, 4323512, 4, { 43.000000f, 1.300663f, -58.799179f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2001118, 4323515, 4, { 54.099178f, 9.249764f, -95.999512f }, 1.000000f, 1.570451f ); - instance->registerEObj( "unknown_11", 2001119, 4323518, 4, { 122.099899f, 1.250139f, -145.999405f }, 1.000000f, 1.570451f ); - instance->registerEObj( "unknown_12", 2001120, 4323522, 4, { 36.000000f, 1.299810f, -151.049896f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2001825, 4323511, 4, { 35.027500f, 2.231338f, -5.969540f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_14", 2001826, 4323509, 4, { 34.988789f, 2.301583f, -28.158291f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2001828, 4323513, 4, { 43.003689f, 2.351689f, -58.849869f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2001829, 4323516, 4, { 54.100830f, 10.258660f, -95.915703f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_17", 2001830, 4323519, 4, { 121.982201f, 2.305465f, -145.991302f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_18", 2001831, 4323523, 4, { 35.995869f, 2.276821f, -151.081100f }, 0.991760f, 0.000048f ); - instance->registerEObj( "RustedNymiandevice", 2001124, 4126931, 4, { 34.988892f, 0.930786f, -6.393555f }, 0.991760f, 0.000048f ); - instance->registerEObj( "RustedNymiandevice_1", 2001125, 4126938, 4, { 34.988892f, 0.930786f, -27.634159f }, 0.991760f, 0.000048f ); - instance->registerEObj( "RustedNymiandevice_2", 2001126, 4126941, 4, { 42.984619f, 0.991760f, -58.335270f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Nymiandevice_1", 2001127, 4126947, 4, { 53.613361f, 8.952527f, -95.999352f }, 1.000000f, 1.570451f ); - instance->registerEObj( "RustedNymiandevice_3", 2001128, 4126952, 4, { 121.629601f, 0.930786f, -146.013596f }, 0.991760f, 1.570451f ); - instance->registerEObj( "RustedNymiandevice_4", 2001129, 4126956, 4, { 35.995972f, 0.991760f, -150.591400f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Lanternoil", 2002789, 0, 4, { 35.621380f, -0.164260f, -23.125179f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2001832, 4086777, 4, { 73.005737f, 10.540420f, -380.487610f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1d3_bossline", 2001814, 4239448, 4, { 72.890900f, 9.976854f, -400.332489f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1d3_bosswall", 2001815, 4239449, 4, { 74.758614f, 9.976894f, -400.332489f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2001121, 4323530, 4, { 80.979607f, 11.245850f, -380.117493f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_21", 2001122, 4323528, 4, { 65.000000f, 11.249720f, -380.099792f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2001833, 4323531, 4, { 81.010132f, 12.313960f, -380.117493f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_23", 2001834, 4323529, 4, { 65.001831f, 12.381110f, -380.103790f }, 1.000000f, 0.000000f ); - instance->registerEObj( "RustedNymiandevice_5", 2001130, 4126964, 4, { 80.979607f, 10.940670f, -379.629211f }, 0.991760f, 0.000048f ); - instance->registerEObj( "RustedNymiandevice_6", 2001131, 4126966, 4, { 64.988159f, 10.940670f, -379.629211f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2005197, 5674883, 4, { 73.492577f, 6.000000f, -464.485596f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2001809, 0, 4, { 134.115601f, -17.997431f, 473.641693f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 137.299393f, -17.990360f, 454.401398f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 73.105957f, 9.994568f, -475.590790f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4177700, 5, { 130.745697f, -17.983120f, 461.438293f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_1", 2001822, 4086687, 4, { 125.014000f, -9.459579f, 64.149277f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2001811, 4259124, 4, { 127.094200f, -12.000000f, 125.826500f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094", 2001810, 4259126, 4, { 124.986603f, -12.039370f, 125.401100f }, + 0.991760f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0250", 2000277, 4259125, 4, { 125.461502f, -12.000000f, 89.079697f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2001114, 4323503, 4, { 118.000000f, -8.700125f, 65.370102f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2001823, 4323504, 4, { 117.995003f, -7.766907f, 65.232300f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Nymiandevice", 2001123, 4126926, 4, { 117.995003f, -9.001419f, 65.378754f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_4", 2002790, 4405761, 4, { 125.029999f, -13.277490f, 181.098602f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001813, 4259128, 4, { 45.925018f, 0.000000f, -212.411499f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001812, 4259127, 4, { 43.121960f, -0.015320f, -212.616592f }, + 0.991760f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "unknown_5", 2001824, 4086767, 4, { 43.140591f, 0.499020f, -29.383511f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001827, 4086770, 4, { 43.011742f, 0.540422f, -152.602997f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000278, 4259129, 4, { 43.493420f, -0.100058f, -248.056198f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2001115, 4323510, 4, { 35.000000f, 1.250271f, -5.876968f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2001116, 4323508, 4, { 35.000000f, 1.249865f, -28.099899f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2001117, 4323512, 4, { 43.000000f, 1.300663f, -58.799179f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2001118, 4323515, 4, { 54.099178f, 9.249764f, -95.999512f }, 1.000000f, + 1.570451f ); + instance->registerEObj( "unknown_11", 2001119, 4323518, 4, { 122.099899f, 1.250139f, -145.999405f }, 1.000000f, + 1.570451f ); + instance->registerEObj( "unknown_12", 2001120, 4323522, 4, { 36.000000f, 1.299810f, -151.049896f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2001825, 4323511, 4, { 35.027500f, 2.231338f, -5.969540f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_14", 2001826, 4323509, 4, { 34.988789f, 2.301583f, -28.158291f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2001828, 4323513, 4, { 43.003689f, 2.351689f, -58.849869f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2001829, 4323516, 4, { 54.100830f, 10.258660f, -95.915703f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_17", 2001830, 4323519, 4, { 121.982201f, 2.305465f, -145.991302f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_18", 2001831, 4323523, 4, { 35.995869f, 2.276821f, -151.081100f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "RustedNymiandevice", 2001124, 4126931, 4, { 34.988892f, 0.930786f, -6.393555f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "RustedNymiandevice_1", 2001125, 4126938, 4, { 34.988892f, 0.930786f, -27.634159f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "RustedNymiandevice_2", 2001126, 4126941, 4, { 42.984619f, 0.991760f, -58.335270f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Nymiandevice_1", 2001127, 4126947, 4, { 53.613361f, 8.952527f, -95.999352f }, 1.000000f, + 1.570451f ); + instance->registerEObj( "RustedNymiandevice_3", 2001128, 4126952, 4, { 121.629601f, 0.930786f, -146.013596f }, + 0.991760f, 1.570451f ); + instance->registerEObj( "RustedNymiandevice_4", 2001129, 4126956, 4, { 35.995972f, 0.991760f, -150.591400f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Lanternoil", 2002789, 0, 4, { 35.621380f, -0.164260f, -23.125179f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2001832, 4086777, 4, { 73.005737f, 10.540420f, -380.487610f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_s1d3_bossline", 2001814, 4239448, 4, { 72.890900f, 9.976854f, -400.332489f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_s1d3_bosswall", 2001815, 4239449, 4, { 74.758614f, 9.976894f, -400.332489f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_20", 2001121, 4323530, 4, { 80.979607f, 11.245850f, -380.117493f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_21", 2001122, 4323528, 4, { 65.000000f, 11.249720f, -380.099792f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_22", 2001833, 4323531, 4, { 81.010132f, 12.313960f, -380.117493f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_23", 2001834, 4323529, 4, { 65.001831f, 12.381110f, -380.103790f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "RustedNymiandevice_5", 2001130, 4126964, 4, { 80.979607f, 10.940670f, -379.629211f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "RustedNymiandevice_6", 2001131, 4126966, 4, { 64.988159f, 10.940670f, -379.629211f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2005197, 5674883, 4, { 73.492577f, 6.000000f, -464.485596f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/TheWanderersPalaceHard.cpp b/src/servers/Scripts/instances/dungeons/TheWanderersPalaceHard.cpp index 92ea37cb..11044623 100644 --- a/src/servers/Scripts/instances/dungeons/TheWanderersPalaceHard.cpp +++ b/src/servers/Scripts/instances/dungeons/TheWanderersPalaceHard.cpp @@ -1,61 +1,89 @@ #include #include -class TheWanderersPalaceHard : public InstanceContentScript +class TheWanderersPalaceHard : + public InstanceContentScript { public: - TheWanderersPalaceHard() : InstanceContentScript( 30 ) - { } + TheWanderersPalaceHard() : + InstanceContentScript( 30 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0250", 2000277, 4898030, 4, { 125.461502f, -12.000000f, 89.079697f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094", 2001810, 4898029, 4, { 124.986603f, -12.039370f, 125.401100f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118", 2001811, 4898028, 4, { 127.094200f, -12.000000f, 125.826500f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001812, 4898056, 4, { 43.121960f, -0.015320f, -212.616592f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001813, 4898057, 4, { 45.925018f, 0.000000f, -212.411499f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000278, 4898058, 4, { 43.472900f, -0.106873f, -248.065994f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_s1d3_bosswall", 2001815, 4898090, 4, { 74.753906f, 9.964111f, -400.351013f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_s1d3_bossline", 2001814, 4898089, 4, { 72.890900f, 9.976854f, -400.332489f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2005119, 0, 4, { 68.684860f, 6.000000f, -449.635315f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2005196, 5674432, 4, { 72.966209f, 6.000000f, -464.577209f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 137.285400f, -17.990419f, 454.398407f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 73.105957f, 9.994568f, -475.590790f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4898005, 5, { 130.745697f, -17.983120f, 461.438293f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_1", 2004551, 5018234, 4, { 184.679901f, -14.023070f, 304.066406f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_2", 2004552, 5018233, 4, { 125.230698f, -14.053590f, 244.800400f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2004553, 5018223, 4, { 124.956100f, -14.023070f, 183.581207f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2004554, 5018182, 4, { 42.770088f, -0.167908f, -26.822309f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2004555, 5018205, 4, { 42.862549f, 0.442505f, -150.225098f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Asylumcell", 2004556, 5019054, 4, { 71.785713f, -11.783800f, -311.787598f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Asylumcell_1", 2004557, 5019055, 4, { 71.870552f, -11.659170f, -324.391602f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_6", 2004558, 5019051, 4, { 94.316040f, -12.008810f, -312.062286f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_7", 2004559, 5019004, 4, { 161.119995f, -8.011047f, -353.322693f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_8", 2004560, 5018224, 4, { 73.226128f, 10.390440f, -379.721588f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2004561, 5034792, 4, { 120.347900f, -12.000000f, -338.826599f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Drainagevalve", 2004562, 5022359, 4, { 124.002098f, -10.704290f, -341.825287f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2004564, 5018828, 4, { 141.315598f, -11.750000f, -326.359711f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Nymiandevice", 2004565, 4896865, 4, { 156.023407f, -6.851379f, -351.735809f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0250", 2000277, 4898030, 4, { 125.461502f, -12.000000f, 89.079697f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094", 2001810, 4898029, 4, { 124.986603f, -12.039370f, 125.401100f }, + 0.991760f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118", 2001811, 4898028, 4, { 127.094200f, -12.000000f, 125.826500f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001812, 4898056, 4, { 43.121960f, -0.015320f, -212.616592f }, + 0.991760f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001813, 4898057, 4, { 45.925018f, 0.000000f, -212.411499f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2000278, 4898058, 4, { 43.472900f, -0.106873f, -248.065994f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_s1d3_bosswall", 2001815, 4898090, 4, { 74.753906f, 9.964111f, -400.351013f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgpl_s1d3_bossline", 2001814, 4898089, 4, { 72.890900f, 9.976854f, -400.332489f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2005119, 0, 4, { 68.684860f, 6.000000f, -449.635315f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2005196, 5674432, 4, { 72.966209f, 6.000000f, -464.577209f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 137.285400f, -17.990419f, 454.398407f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 73.105957f, 9.994568f, -475.590790f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4898005, 5, { 130.745697f, -17.983120f, 461.438293f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_1", 2004551, 5018234, 4, { 184.679901f, -14.023070f, 304.066406f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_2", 2004552, 5018233, 4, { 125.230698f, -14.053590f, 244.800400f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2004553, 5018223, 4, { 124.956100f, -14.023070f, 183.581207f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_4", 2004554, 5018182, 4, { 42.770088f, -0.167908f, -26.822309f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2004555, 5018205, 4, { 42.862549f, 0.442505f, -150.225098f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Asylumcell", 2004556, 5019054, 4, { 71.785713f, -11.783800f, -311.787598f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Asylumcell_1", 2004557, 5019055, 4, { 71.870552f, -11.659170f, -324.391602f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_6", 2004558, 5019051, 4, { 94.316040f, -12.008810f, -312.062286f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_7", 2004559, 5019004, 4, { 161.119995f, -8.011047f, -353.322693f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_8", 2004560, 5018224, 4, { 73.226128f, 10.390440f, -379.721588f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2004561, 5034792, 4, { 120.347900f, -12.000000f, -338.826599f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Drainagevalve", 2004562, 5022359, 4, { 124.002098f, -10.704290f, -341.825287f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2004564, 5018828, 4, { 141.315598f, -11.750000f, -326.359711f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Nymiandevice", 2004565, 4896865, 4, { 156.023407f, -6.851379f, -351.735809f }, 0.991760f, + 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/dungeons/Xelphatol.cpp b/src/servers/Scripts/instances/dungeons/Xelphatol.cpp index b8272a13..50d51f3e 100644 --- a/src/servers/Scripts/instances/dungeons/Xelphatol.cpp +++ b/src/servers/Scripts/instances/dungeons/Xelphatol.cpp @@ -1,26 +1,29 @@ #include #include -class Xelphatol : public InstanceContentScript +class Xelphatol : + public InstanceContentScript { public: - Xelphatol() : InstanceContentScript( 46 ) - { } + Xelphatol() : + InstanceContentScript( 46 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/events/TheHauntedManor.cpp b/src/servers/Scripts/instances/events/TheHauntedManor.cpp index c7e3deab..9aaf91d0 100644 --- a/src/servers/Scripts/instances/events/TheHauntedManor.cpp +++ b/src/servers/Scripts/instances/events/TheHauntedManor.cpp @@ -1,43 +1,57 @@ #include #include -class TheHauntedManor : public InstanceContentScript +class TheHauntedManor : + public InstanceContentScript { public: - TheHauntedManor() : InstanceContentScript( 25001 ) - { } + TheHauntedManor() : + InstanceContentScript( 25001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Pumpkinchest", 2007385, 0, 4, { 72.176666f, -0.000001f, 8.325592f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Crypticnote", 2007394, 0, 4, { 77.017143f, 0.000000f, 7.811212f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Curiousswitch", 2007406, 0, 4, { 75.432663f, 0.000000f, 9.083635f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Goldbasket", 2007407, 0, 4, { 67.265839f, -0.000000f, 8.740001f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Silverbasket", 2007408, 0, 4, { 69.001480f, 0.000000f, 7.453632f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Bronzebasket", 2007409, 0, 4, { 65.439072f, 0.000000f, 7.248850f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Jackolantern", 2007410, 0, 4, { 61.411270f, 0.000000f, 12.014820f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Smolderingcoal", 2007411, 0, 4, { 58.469200f, -0.000000f, 11.999350f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Truesightsmokebomb", 2007412, 0, 4, { 55.969971f, 0.000000f, 12.118080f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Pumpkincoffer", 2007413, 0, 4, { 53.116581f, -0.015320f, 12.344480f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 15.229340f, -18.678320f, -0.619758f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Obfuscationcharm", 2007414, 0, 4, { 54.995380f, 0.000000f, 9.411625f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Jackinthebox", 2007547, 0, 4, { 69.704788f, 0.000000f, 10.012170f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Suspiciouspumpkin", 2007548, 0, 4, { 67.828171f, 0.000000f, 10.094330f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Suspiciouschest", 2007562, 0, 4, { 3.501173f, -18.779980f, -0.195926f }, 1.000000f, 1.568754f ); - instance->registerEObj( "Entrance", 2000182, 6381325, 5, { 73.499107f, -0.000000f, 4.652901f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Pumpkinchest", 2007385, 0, 4, { 72.176666f, -0.000001f, 8.325592f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Crypticnote", 2007394, 0, 4, { 77.017143f, 0.000000f, 7.811212f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Curiousswitch", 2007406, 0, 4, { 75.432663f, 0.000000f, 9.083635f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Goldbasket", 2007407, 0, 4, { 67.265839f, -0.000000f, 8.740001f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Silverbasket", 2007408, 0, 4, { 69.001480f, 0.000000f, 7.453632f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Bronzebasket", 2007409, 0, 4, { 65.439072f, 0.000000f, 7.248850f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Jackolantern", 2007410, 0, 4, { 61.411270f, 0.000000f, 12.014820f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Smolderingcoal", 2007411, 0, 4, { 58.469200f, -0.000000f, 11.999350f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Truesightsmokebomb", 2007412, 0, 4, { 55.969971f, 0.000000f, 12.118080f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Pumpkincoffer", 2007413, 0, 4, { 53.116581f, -0.015320f, 12.344480f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 15.229340f, -18.678320f, -0.619758f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Obfuscationcharm", 2007414, 0, 4, { 54.995380f, 0.000000f, 9.411625f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Jackinthebox", 2007547, 0, 4, { 69.704788f, 0.000000f, 10.012170f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Suspiciouspumpkin", 2007548, 0, 4, { 67.828171f, 0.000000f, 10.094330f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Suspiciouschest", 2007562, 0, 4, { 3.501173f, -18.779980f, -0.195926f }, 1.000000f, + 1.568754f ); + instance->registerEObj( "Entrance", 2000182, 6381325, 5, { 73.499107f, -0.000000f, 4.652901f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/events/TheValentionesCeremony.cpp b/src/servers/Scripts/instances/events/TheValentionesCeremony.cpp index a4983a8e..09bdf12d 100644 --- a/src/servers/Scripts/instances/events/TheValentionesCeremony.cpp +++ b/src/servers/Scripts/instances/events/TheValentionesCeremony.cpp @@ -1,71 +1,117 @@ #include #include -class TheValentionesCeremony : public InstanceContentScript +class TheValentionesCeremony : + public InstanceContentScript { public: - TheValentionesCeremony() : InstanceContentScript( 25002 ) - { } + TheValentionesCeremony() : + InstanceContentScript( 25002 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_f1e9_g1_swt01", 2007457, 7231658, 4, { -3.500000f, -6.000000f, -42.000000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03", 2007457, 7231654, 4, { 17.466560f, -6.000000f, -45.513531f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_1", 2007457, 7231667, 4, { 18.500000f, -6.000000f, -59.500000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_1", 2007457, 7231666, 4, { -9.500000f, -6.000000f, -68.500000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_2", 2007457, 7231668, 4, { -18.500000f, -6.000000f, -59.500000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_2", 2007457, 7231669, 4, { 11.489990f, -6.027344f, -68.528320f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_3", 2007457, 7231672, 4, { 15.495000f, -6.027344f, -77.500671f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_3", 2007457, 7231671, 4, { -16.500000f, -6.000000f, -71.500000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_4", 2007457, 7231673, 4, { 8.500000f, -8.000000f, -95.199997f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_4", 2007457, 7231674, 4, { -6.515625f, -8.011047f, -92.729057f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_5", 2007457, 7231677, 4, { -6.500000f, -8.000000f, -89.699997f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_5", 2007457, 7231676, 4, { 8.475829f, -8.011047f, -101.701401f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_6", 2007457, 7231678, 4, { -18.500000f, -8.000000f, -112.699997f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_6", 2007457, 7231679, 4, { 14.500000f, -8.000000f, -111.699997f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_7", 2007457, 7231681, 4, { 10.000000f, -8.000000f, -134.699997f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_7", 2007457, 7231680, 4, { -15.500000f, -8.000000f, -127.699997f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_8", 2007457, 7231683, 4, { -16.500000f, -10.000000f, -160.699997f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_8", 2007457, 7231684, 4, { 3.558000f, -10.000000f, -150.699997f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_9", 2007457, 7231686, 4, { 6.499207f, -10.025270f, -172.723999f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_9", 2007457, 7231687, 4, { -17.471680f, -10.025270f, -170.716904f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_10", 2007457, 7231689, 4, { 18.500000f, -10.000000f, -190.199997f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_10", 2007457, 7231688, 4, { -3.550100f, -10.000000f, -186.699997f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_swt01_11", 2007457, 7231690, 4, { -18.500000f, -10.000000f, -190.199997f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgbg_f1e9_g1_gat03_11", 2007457, 7231691, 4, { 3.550100f, -10.000000f, -186.699997f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_0", 2007457, 7171421, 4, { -0.007954f, -11.881100f, -230.514008f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_f1e9_b1321", 2007457, 7231843, 4, { 0.006785f, -11.881100f, -253.447296f }, 1.000000f, 0.000000f ); - instance->registerEObj( "ValentionesDaycard", 2009385, 7231795, 4, { -5.426984f, -11.917360f, -260.462494f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_1", 2009387, 7231796, 4, { -9.668927f, -11.917360f, -260.401611f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_2", 2009388, 7231797, 4, { -6.021372f, -11.917360f, -253.618393f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_3", 2009389, 7231798, 4, { -10.334230f, -11.917360f, -253.545105f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_4", 2009390, 7231799, 4, { -4.210987f, -11.917360f, -246.692703f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_5", 2009391, 7231800, 4, { -8.330921f, -11.917360f, -246.662094f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_6", 2009392, 7231801, 4, { 5.258507f, -11.917360f, -260.425812f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_7", 2009393, 7231802, 4, { 9.500511f, -11.917360f, -260.425812f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_8", 2009394, 7231803, 4, { 6.041663f, -11.881100f, -253.545105f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_9", 2009395, 7231804, 4, { 10.315010f, -11.881100f, -253.545105f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_10", 2009396, 7231805, 4, { 3.961101f, -11.917360f, -246.662094f }, 0.991760f, 0.000048f ); - instance->registerEObj( "ValentionesDaycard_11", 2009397, 7231806, 4, { 8.203044f, -11.917360f, -246.662094f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 7186874, 5, { -0.017344f, 0.700000f, 15.850460f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.151178f, -11.881100f, -262.439209f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007457, 7167001, 4, { -0.198283f, 0.437501f, 3.359166f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007457, 7167005, 4, { -10.222270f, -6.000000f, -25.717331f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007457, 7167002, 4, { 10.259260f, -6.000000f, -25.717331f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007457, 7154005, 4, { -0.045776f, -11.734250f, -210.009903f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_f1e9_g1_swt01", 2007457, 7231658, 4, { -3.500000f, -6.000000f, -42.000000f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03", 2007457, 7231654, 4, { 17.466560f, -6.000000f, -45.513531f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_1", 2007457, 7231667, 4, { 18.500000f, -6.000000f, -59.500000f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_1", 2007457, 7231666, 4, { -9.500000f, -6.000000f, -68.500000f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_2", 2007457, 7231668, 4, { -18.500000f, -6.000000f, -59.500000f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_2", 2007457, 7231669, 4, { 11.489990f, -6.027344f, -68.528320f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_3", 2007457, 7231672, 4, { 15.495000f, -6.027344f, -77.500671f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_3", 2007457, 7231671, 4, { -16.500000f, -6.000000f, -71.500000f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_4", 2007457, 7231673, 4, { 8.500000f, -8.000000f, -95.199997f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_4", 2007457, 7231674, 4, { -6.515625f, -8.011047f, -92.729057f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_5", 2007457, 7231677, 4, { -6.500000f, -8.000000f, -89.699997f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_5", 2007457, 7231676, 4, { 8.475829f, -8.011047f, -101.701401f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_6", 2007457, 7231678, 4, { -18.500000f, -8.000000f, -112.699997f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_6", 2007457, 7231679, 4, { 14.500000f, -8.000000f, -111.699997f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_7", 2007457, 7231681, 4, { 10.000000f, -8.000000f, -134.699997f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_7", 2007457, 7231680, 4, { -15.500000f, -8.000000f, -127.699997f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_8", 2007457, 7231683, 4, { -16.500000f, -10.000000f, -160.699997f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_8", 2007457, 7231684, 4, { 3.558000f, -10.000000f, -150.699997f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_9", 2007457, 7231686, 4, { 6.499207f, -10.025270f, -172.723999f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_9", 2007457, 7231687, 4, { -17.471680f, -10.025270f, -170.716904f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_10", 2007457, 7231689, 4, { 18.500000f, -10.000000f, -190.199997f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_10", 2007457, 7231688, 4, { -3.550100f, -10.000000f, -186.699997f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_swt01_11", 2007457, 7231690, 4, { -18.500000f, -10.000000f, -190.199997f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "sgbg_f1e9_g1_gat03_11", 2007457, 7231691, 4, { 3.550100f, -10.000000f, -186.699997f }, + 1.000000f, -0.000000f ); + instance->registerEObj( "unknown_0", 2007457, 7171421, 4, { -0.007954f, -11.881100f, -230.514008f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_f1e9_b1321", 2007457, 7231843, 4, { 0.006785f, -11.881100f, -253.447296f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "ValentionesDaycard", 2009385, 7231795, 4, { -5.426984f, -11.917360f, -260.462494f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_1", 2009387, 7231796, 4, { -9.668927f, -11.917360f, -260.401611f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_2", 2009388, 7231797, 4, { -6.021372f, -11.917360f, -253.618393f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_3", 2009389, 7231798, 4, { -10.334230f, -11.917360f, -253.545105f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_4", 2009390, 7231799, 4, { -4.210987f, -11.917360f, -246.692703f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_5", 2009391, 7231800, 4, { -8.330921f, -11.917360f, -246.662094f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_6", 2009392, 7231801, 4, { 5.258507f, -11.917360f, -260.425812f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_7", 2009393, 7231802, 4, { 9.500511f, -11.917360f, -260.425812f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_8", 2009394, 7231803, 4, { 6.041663f, -11.881100f, -253.545105f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_9", 2009395, 7231804, 4, { 10.315010f, -11.881100f, -253.545105f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_10", 2009396, 7231805, 4, { 3.961101f, -11.917360f, -246.662094f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "ValentionesDaycard_11", 2009397, 7231806, 4, { 8.203044f, -11.917360f, -246.662094f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 7186874, 5, { -0.017344f, 0.700000f, 15.850460f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.151178f, -11.881100f, -262.439209f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007457, 7167001, 4, { -0.198283f, 0.437501f, 3.359166f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2007457, 7167005, 4, { -10.222270f, -6.000000f, -25.717331f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2007457, 7167002, 4, { 10.259260f, -6.000000f, -25.717331f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2007457, 7154005, 4, { -0.045776f, -11.734250f, -210.009903f }, 0.991760f, + 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/AllsWellthatEndsintheWell.cpp b/src/servers/Scripts/instances/guildhests/AllsWellthatEndsintheWell.cpp index 8524dc49..601fcad7 100644 --- a/src/servers/Scripts/instances/guildhests/AllsWellthatEndsintheWell.cpp +++ b/src/servers/Scripts/instances/guildhests/AllsWellthatEndsintheWell.cpp @@ -1,29 +1,33 @@ #include #include -class AllsWellthatEndsintheWell : public InstanceContentScript +class AllsWellthatEndsintheWell : + public InstanceContentScript { public: - AllsWellthatEndsintheWell() : InstanceContentScript( 10007 ) - { } + AllsWellthatEndsintheWell() : + InstanceContentScript( 10007 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 5021407, 5, { 623.000000f, 23.872311f, 94.505638f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 623.000000f, 23.656260f, 61.956181f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 5021407, 5, { 623.000000f, 23.872311f, 94.505638f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 623.000000f, 23.656260f, 61.956181f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/AnnoytheVoid.cpp b/src/servers/Scripts/instances/guildhests/AnnoytheVoid.cpp index ed50c9bd..eb43ae50 100644 --- a/src/servers/Scripts/instances/guildhests/AnnoytheVoid.cpp +++ b/src/servers/Scripts/instances/guildhests/AnnoytheVoid.cpp @@ -1,26 +1,29 @@ #include #include -class AnnoytheVoid : public InstanceContentScript +class AnnoytheVoid : + public InstanceContentScript { public: - AnnoytheVoid() : InstanceContentScript( 10010 ) - { } + AnnoytheVoid() : + InstanceContentScript( 10010 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/BasicTrainingEnemyParties.cpp b/src/servers/Scripts/instances/guildhests/BasicTrainingEnemyParties.cpp index 9e22b6d1..99dad474 100644 --- a/src/servers/Scripts/instances/guildhests/BasicTrainingEnemyParties.cpp +++ b/src/servers/Scripts/instances/guildhests/BasicTrainingEnemyParties.cpp @@ -1,26 +1,29 @@ #include #include -class BasicTrainingEnemyParties : public InstanceContentScript +class BasicTrainingEnemyParties : + public InstanceContentScript { public: - BasicTrainingEnemyParties() : InstanceContentScript( 10001 ) - { } + BasicTrainingEnemyParties() : + InstanceContentScript( 10001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/BasicTrainingEnemyStrongholds.cpp b/src/servers/Scripts/instances/guildhests/BasicTrainingEnemyStrongholds.cpp index 3ef2622e..af6a3a18 100644 --- a/src/servers/Scripts/instances/guildhests/BasicTrainingEnemyStrongholds.cpp +++ b/src/servers/Scripts/instances/guildhests/BasicTrainingEnemyStrongholds.cpp @@ -1,30 +1,35 @@ #include #include -class BasicTrainingEnemyStrongholds : public InstanceContentScript +class BasicTrainingEnemyStrongholds : + public InstanceContentScript { public: - BasicTrainingEnemyStrongholds() : InstanceContentScript( 10003 ) - { } + BasicTrainingEnemyStrongholds() : + InstanceContentScript( 10003 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Exit", 2000605, 0, 4, { -715.942383f, 69.420113f, -830.370300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2000606, 3861081, 4, { -670.462280f, 63.293751f, -801.510986f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000604, 4262798, 5, { -677.634888f, 64.116386f, -803.174927f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Exit", 2000605, 0, 4, { -715.942383f, 69.420113f, -830.370300f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2000606, 3861081, 4, { -670.462280f, 63.293751f, -801.510986f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000604, 4262798, 5, { -677.634888f, 64.116386f, -803.174927f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/FlickingSticksandTakingNames.cpp b/src/servers/Scripts/instances/guildhests/FlickingSticksandTakingNames.cpp index 488e06de..4f68f5a8 100644 --- a/src/servers/Scripts/instances/guildhests/FlickingSticksandTakingNames.cpp +++ b/src/servers/Scripts/instances/guildhests/FlickingSticksandTakingNames.cpp @@ -1,27 +1,31 @@ #include #include -class FlickingSticksandTakingNames : public InstanceContentScript +class FlickingSticksandTakingNames : + public InstanceContentScript { public: - FlickingSticksandTakingNames() : InstanceContentScript( 10008 ) - { } + FlickingSticksandTakingNames() : + InstanceContentScript( 10008 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2005192, 5760474, 4, { -51.493111f, 0.309087f, 71.436897f }, 1.000000f, -0.000006f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2005192, 5760474, 4, { -51.493111f, 0.309087f, 71.436897f }, 1.000000f, + -0.000006f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/HeroontheHalfShell.cpp b/src/servers/Scripts/instances/guildhests/HeroontheHalfShell.cpp index b4c93aa3..b7624e99 100644 --- a/src/servers/Scripts/instances/guildhests/HeroontheHalfShell.cpp +++ b/src/servers/Scripts/instances/guildhests/HeroontheHalfShell.cpp @@ -1,26 +1,29 @@ #include #include -class HeroontheHalfShell : public InstanceContentScript +class HeroontheHalfShell : + public InstanceContentScript { public: - HeroontheHalfShell() : InstanceContentScript( 10004 ) - { } + HeroontheHalfShell() : + InstanceContentScript( 10004 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/LongLivetheQueen.cpp b/src/servers/Scripts/instances/guildhests/LongLivetheQueen.cpp index 0ac5fa56..959340b4 100644 --- a/src/servers/Scripts/instances/guildhests/LongLivetheQueen.cpp +++ b/src/servers/Scripts/instances/guildhests/LongLivetheQueen.cpp @@ -1,43 +1,61 @@ #include #include -class LongLivetheQueen : public InstanceContentScript +class LongLivetheQueen : + public InstanceContentScript { public: - LongLivetheQueen() : InstanceContentScript( 10012 ) - { } + LongLivetheQueen() : + InstanceContentScript( 10012 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_w_qic_001_04a", 2006993, 6235274, 4, { -35.822102f, 298.899994f, -205.263199f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2006952, 0, 4, { -35.712589f, 298.899994f, -204.878006f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 556.049377f, 348.102509f, -752.435730f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4600289, 5, { 523.532471f, 348.223389f, -736.685730f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_1", 2002332, 0, 4, { 533.090881f, 348.691895f, -742.750916f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2002333, 0, 4, { 539.940430f, 348.836395f, -734.401489f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2000608, 3967803, 4, { 202.369598f, 257.761108f, 80.435272f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2000608, 3976993, 4, { 273.634705f, 254.600204f, 106.048500f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2000608, 3986797, 4, { 205.504898f, 246.188995f, 194.875702f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2000608, 3986798, 4, { 326.313385f, 239.193497f, 221.138901f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2000608, 2718481, 4, { 240.552307f, 302.769714f, -199.979996f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2000608, 4065433, 4, { 204.970001f, 302.119995f, -216.311600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2000608, 2814617, 4, { 205.869995f, 302.219086f, -276.681396f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2000608, 2763112, 4, { -433.000000f, 211.007706f, -216.148605f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000608, 4187649, 4, { -453.000000f, 211.000000f, -281.046600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2000608, 4187961, 4, { -416.000000f, 210.788193f, -279.813812f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_w_qic_001_04a", 2006993, 6235274, 4, { -35.822102f, 298.899994f, -205.263199f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2006952, 0, 4, { -35.712589f, 298.899994f, -204.878006f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 556.049377f, 348.102509f, -752.435730f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4600289, 5, { 523.532471f, 348.223389f, -736.685730f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_1", 2002332, 0, 4, { 533.090881f, 348.691895f, -742.750916f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2002333, 0, 4, { 539.940430f, 348.836395f, -734.401489f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2000608, 3967803, 4, { 202.369598f, 257.761108f, 80.435272f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2000608, 3976993, 4, { 273.634705f, 254.600204f, 106.048500f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2000608, 3986797, 4, { 205.504898f, 246.188995f, 194.875702f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2000608, 3986798, 4, { 326.313385f, 239.193497f, 221.138901f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2000608, 2718481, 4, { 240.552307f, 302.769714f, -199.979996f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2000608, 4065433, 4, { 204.970001f, 302.119995f, -216.311600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2000608, 2814617, 4, { 205.869995f, 302.219086f, -276.681396f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2000608, 2763112, 4, { -433.000000f, 211.007706f, -216.148605f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2000608, 4187649, 4, { -453.000000f, 211.000000f, -281.046600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2000608, 4187961, 4, { -416.000000f, 210.788193f, -279.813812f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/MorethanaFeeler.cpp b/src/servers/Scripts/instances/guildhests/MorethanaFeeler.cpp index 31d9bf17..d893b680 100644 --- a/src/servers/Scripts/instances/guildhests/MorethanaFeeler.cpp +++ b/src/servers/Scripts/instances/guildhests/MorethanaFeeler.cpp @@ -1,26 +1,29 @@ #include #include -class MorethanaFeeler : public InstanceContentScript +class MorethanaFeeler : + public InstanceContentScript { public: - MorethanaFeeler() : InstanceContentScript( 10009 ) - { } + MorethanaFeeler() : + InstanceContentScript( 10009 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/PullingPoisonPosies.cpp b/src/servers/Scripts/instances/guildhests/PullingPoisonPosies.cpp index 3842606b..a82acbb9 100644 --- a/src/servers/Scripts/instances/guildhests/PullingPoisonPosies.cpp +++ b/src/servers/Scripts/instances/guildhests/PullingPoisonPosies.cpp @@ -1,26 +1,29 @@ #include #include -class PullingPoisonPosies : public InstanceContentScript +class PullingPoisonPosies : + public InstanceContentScript { public: - PullingPoisonPosies() : InstanceContentScript( 10005 ) - { } + PullingPoisonPosies() : + InstanceContentScript( 10005 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/ShadowandClaw.cpp b/src/servers/Scripts/instances/guildhests/ShadowandClaw.cpp index 61a1ca68..3604227a 100644 --- a/src/servers/Scripts/instances/guildhests/ShadowandClaw.cpp +++ b/src/servers/Scripts/instances/guildhests/ShadowandClaw.cpp @@ -1,43 +1,61 @@ #include #include -class ShadowandClaw : public InstanceContentScript +class ShadowandClaw : + public InstanceContentScript { public: - ShadowandClaw() : InstanceContentScript( 10011 ) - { } + ShadowandClaw() : + InstanceContentScript( 10011 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_w_qic_001_04a", 2006993, 6235274, 4, { -35.822102f, 298.899994f, -205.263199f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2006952, 0, 4, { -35.712589f, 298.899994f, -204.878006f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 556.049377f, 348.102509f, -752.435730f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4600289, 5, { 523.532471f, 348.223389f, -736.685730f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_1", 2002332, 0, 4, { 533.090881f, 348.691895f, -742.750916f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2002333, 0, 4, { 539.940430f, 348.836395f, -734.401489f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2000608, 3967803, 4, { 202.369598f, 257.761108f, 80.435272f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2000608, 3976993, 4, { 273.634705f, 254.600204f, 106.048500f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2000608, 3986797, 4, { 205.504898f, 246.188995f, 194.875702f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2000608, 3986798, 4, { 326.313385f, 239.193497f, 221.138901f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2000608, 2718481, 4, { 240.552307f, 302.769714f, -199.979996f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2000608, 4065433, 4, { 204.970001f, 302.119995f, -216.311600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2000608, 2814617, 4, { 205.869995f, 302.219086f, -276.681396f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2000608, 2763112, 4, { -433.000000f, 211.007706f, -216.148605f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000608, 4187649, 4, { -453.000000f, 211.000000f, -281.046600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2000608, 4187961, 4, { -416.000000f, 210.788193f, -279.813812f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_w_qic_001_04a", 2006993, 6235274, 4, { -35.822102f, 298.899994f, -205.263199f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2006952, 0, 4, { -35.712589f, 298.899994f, -204.878006f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 556.049377f, 348.102509f, -752.435730f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4600289, 5, { 523.532471f, 348.223389f, -736.685730f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_1", 2002332, 0, 4, { 533.090881f, 348.691895f, -742.750916f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2002333, 0, 4, { 539.940430f, 348.836395f, -734.401489f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2000608, 3967803, 4, { 202.369598f, 257.761108f, 80.435272f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2000608, 3976993, 4, { 273.634705f, 254.600204f, 106.048500f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2000608, 3986797, 4, { 205.504898f, 246.188995f, 194.875702f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2000608, 3986798, 4, { 326.313385f, 239.193497f, 221.138901f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2000608, 2718481, 4, { 240.552307f, 302.769714f, -199.979996f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2000608, 4065433, 4, { 204.970001f, 302.119995f, -216.311600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2000608, 2814617, 4, { 205.869995f, 302.219086f, -276.681396f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2000608, 2763112, 4, { -433.000000f, 211.007706f, -216.148605f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2000608, 4187649, 4, { -453.000000f, 211.000000f, -281.046600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2000608, 4187961, 4, { -416.000000f, 210.788193f, -279.813812f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/SolemnTrinity.cpp b/src/servers/Scripts/instances/guildhests/SolemnTrinity.cpp index 77bbbe08..40059594 100644 --- a/src/servers/Scripts/instances/guildhests/SolemnTrinity.cpp +++ b/src/servers/Scripts/instances/guildhests/SolemnTrinity.cpp @@ -1,26 +1,29 @@ #include #include -class SolemnTrinity : public InstanceContentScript +class SolemnTrinity : + public InstanceContentScript { public: - SolemnTrinity() : InstanceContentScript( 10014 ) - { } + SolemnTrinity() : + InstanceContentScript( 10014 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/StingingBack.cpp b/src/servers/Scripts/instances/guildhests/StingingBack.cpp index 5631663e..1719cdb5 100644 --- a/src/servers/Scripts/instances/guildhests/StingingBack.cpp +++ b/src/servers/Scripts/instances/guildhests/StingingBack.cpp @@ -1,29 +1,33 @@ #include #include -class StingingBack : public InstanceContentScript +class StingingBack : + public InstanceContentScript { public: - StingingBack() : InstanceContentScript( 10006 ) - { } + StingingBack() : + InstanceContentScript( 10006 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 5021407, 5, { 623.000000f, 23.872311f, 94.505638f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 623.000000f, 23.656260f, 61.956181f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 5021407, 5, { 623.000000f, 23.872311f, 94.505638f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 623.000000f, 23.656260f, 61.956181f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/UndertheArmor.cpp b/src/servers/Scripts/instances/guildhests/UndertheArmor.cpp index d785be5a..45bda089 100644 --- a/src/servers/Scripts/instances/guildhests/UndertheArmor.cpp +++ b/src/servers/Scripts/instances/guildhests/UndertheArmor.cpp @@ -1,27 +1,31 @@ #include #include -class UndertheArmor : public InstanceContentScript +class UndertheArmor : + public InstanceContentScript { public: - UndertheArmor() : InstanceContentScript( 10002 ) - { } + UndertheArmor() : + InstanceContentScript( 10002 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2005192, 5760474, 4, { -51.493111f, 0.309087f, 71.436897f }, 1.000000f, -0.000006f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2005192, 5760474, 4, { -51.493111f, 0.309087f, 71.436897f }, 1.000000f, + -0.000006f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/guildhests/WardUp.cpp b/src/servers/Scripts/instances/guildhests/WardUp.cpp index 2f423b10..dee18e3f 100644 --- a/src/servers/Scripts/instances/guildhests/WardUp.cpp +++ b/src/servers/Scripts/instances/guildhests/WardUp.cpp @@ -1,26 +1,29 @@ #include #include -class WardUp : public InstanceContentScript +class WardUp : + public InstanceContentScript { public: - WardUp() : InstanceContentScript( 10013 ) - { } + WardUp() : + InstanceContentScript( 10013 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/AccrueEnmityfromMultipleTargets.cpp b/src/servers/Scripts/instances/hallofthenovice/AccrueEnmityfromMultipleTargets.cpp index ec20ccba..a0a3fb8d 100644 --- a/src/servers/Scripts/instances/hallofthenovice/AccrueEnmityfromMultipleTargets.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/AccrueEnmityfromMultipleTargets.cpp @@ -1,36 +1,43 @@ #include #include -class AccrueEnmityfromMultipleTargets : public InstanceContentScript +class AccrueEnmityfromMultipleTargets : + public InstanceContentScript { public: - AccrueEnmityfromMultipleTargets() : InstanceContentScript( 15004 ) - { } + AccrueEnmityfromMultipleTargets() : + InstanceContentScript( 15004 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/AssistAlliesinDefeatingaTarget.cpp b/src/servers/Scripts/instances/hallofthenovice/AssistAlliesinDefeatingaTarget.cpp index 08766aac..02b97476 100644 --- a/src/servers/Scripts/instances/hallofthenovice/AssistAlliesinDefeatingaTarget.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/AssistAlliesinDefeatingaTarget.cpp @@ -1,36 +1,43 @@ #include #include -class AssistAlliesinDefeatingaTarget : public InstanceContentScript +class AssistAlliesinDefeatingaTarget : + public InstanceContentScript { public: - AssistAlliesinDefeatingaTarget() : InstanceContentScript( 15008 ) - { } + AssistAlliesinDefeatingaTarget() : + InstanceContentScript( 15008 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/AvoidAreaofEffectAttacks.cpp b/src/servers/Scripts/instances/hallofthenovice/AvoidAreaofEffectAttacks.cpp index 58c9eba4..e82eb156 100644 --- a/src/servers/Scripts/instances/hallofthenovice/AvoidAreaofEffectAttacks.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/AvoidAreaofEffectAttacks.cpp @@ -1,36 +1,43 @@ #include #include -class AvoidAreaofEffectAttacks : public InstanceContentScript +class AvoidAreaofEffectAttacks : + public InstanceContentScript { public: - AvoidAreaofEffectAttacks() : InstanceContentScript( 15001 ) - { } + AvoidAreaofEffectAttacks() : + InstanceContentScript( 15001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/AvoidEngagedTargets.cpp b/src/servers/Scripts/instances/hallofthenovice/AvoidEngagedTargets.cpp index 13bfe298..071ed2c3 100644 --- a/src/servers/Scripts/instances/hallofthenovice/AvoidEngagedTargets.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/AvoidEngagedTargets.cpp @@ -1,36 +1,43 @@ #include #include -class AvoidEngagedTargets : public InstanceContentScript +class AvoidEngagedTargets : + public InstanceContentScript { public: - AvoidEngagedTargets() : InstanceContentScript( 15015 ) - { } + AvoidEngagedTargets() : + InstanceContentScript( 15015 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/DefeatanOccupiedTarget.cpp b/src/servers/Scripts/instances/hallofthenovice/DefeatanOccupiedTarget.cpp index 0a015a4a..a4d4ab80 100644 --- a/src/servers/Scripts/instances/hallofthenovice/DefeatanOccupiedTarget.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/DefeatanOccupiedTarget.cpp @@ -1,36 +1,43 @@ #include #include -class DefeatanOccupiedTarget : public InstanceContentScript +class DefeatanOccupiedTarget : + public InstanceContentScript { public: - DefeatanOccupiedTarget() : InstanceContentScript( 15009 ) - { } + DefeatanOccupiedTarget() : + InstanceContentScript( 15009 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/EngageEnemyReinforcements.cpp b/src/servers/Scripts/instances/hallofthenovice/EngageEnemyReinforcements.cpp index 33ddf467..2873b5c3 100644 --- a/src/servers/Scripts/instances/hallofthenovice/EngageEnemyReinforcements.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/EngageEnemyReinforcements.cpp @@ -1,36 +1,43 @@ #include #include -class EngageEnemyReinforcements : public InstanceContentScript +class EngageEnemyReinforcements : + public InstanceContentScript { public: - EngageEnemyReinforcements() : InstanceContentScript( 15011 ) - { } + EngageEnemyReinforcements() : + InstanceContentScript( 15011 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/EngageMultipleTargets.cpp b/src/servers/Scripts/instances/hallofthenovice/EngageMultipleTargets.cpp index c71a589e..3c0516fb 100644 --- a/src/servers/Scripts/instances/hallofthenovice/EngageMultipleTargets.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/EngageMultipleTargets.cpp @@ -1,36 +1,43 @@ #include #include -class EngageMultipleTargets : public InstanceContentScript +class EngageMultipleTargets : + public InstanceContentScript { public: - EngageMultipleTargets() : InstanceContentScript( 15005 ) - { } + EngageMultipleTargets() : + InstanceContentScript( 15005 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/ExecuteaComboinBattle.cpp b/src/servers/Scripts/instances/hallofthenovice/ExecuteaComboinBattle.cpp index 798fcc84..560af13b 100644 --- a/src/servers/Scripts/instances/hallofthenovice/ExecuteaComboinBattle.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/ExecuteaComboinBattle.cpp @@ -1,36 +1,43 @@ #include #include -class ExecuteaComboinBattle : public InstanceContentScript +class ExecuteaComboinBattle : + public InstanceContentScript { public: - ExecuteaComboinBattle() : InstanceContentScript( 15003 ) - { } + ExecuteaComboinBattle() : + InstanceContentScript( 15003 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/ExecuteaCombotoIncreaseEnmity.cpp b/src/servers/Scripts/instances/hallofthenovice/ExecuteaCombotoIncreaseEnmity.cpp index 9e066641..18370750 100644 --- a/src/servers/Scripts/instances/hallofthenovice/ExecuteaCombotoIncreaseEnmity.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/ExecuteaCombotoIncreaseEnmity.cpp @@ -1,36 +1,43 @@ #include #include -class ExecuteaCombotoIncreaseEnmity : public InstanceContentScript +class ExecuteaCombotoIncreaseEnmity : + public InstanceContentScript { public: - ExecuteaCombotoIncreaseEnmity() : InstanceContentScript( 15002 ) - { } + ExecuteaCombotoIncreaseEnmity() : + InstanceContentScript( 15002 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/ExecuteaRangedAttacktoIncreaseEnmity.cpp b/src/servers/Scripts/instances/hallofthenovice/ExecuteaRangedAttacktoIncreaseEnmity.cpp index e0175ffc..7daeb8d3 100644 --- a/src/servers/Scripts/instances/hallofthenovice/ExecuteaRangedAttacktoIncreaseEnmity.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/ExecuteaRangedAttacktoIncreaseEnmity.cpp @@ -1,36 +1,43 @@ #include #include -class ExecuteaRangedAttacktoIncreaseEnmity : public InstanceContentScript +class ExecuteaRangedAttacktoIncreaseEnmity : + public InstanceContentScript { public: - ExecuteaRangedAttacktoIncreaseEnmity() : InstanceContentScript( 15006 ) - { } + ExecuteaRangedAttacktoIncreaseEnmity() : + InstanceContentScript( 15006 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/FinalExercise.cpp b/src/servers/Scripts/instances/hallofthenovice/FinalExercise.cpp index a121efa5..05f1a343 100644 --- a/src/servers/Scripts/instances/hallofthenovice/FinalExercise.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/FinalExercise.cpp @@ -1,29 +1,34 @@ #include #include -class FinalExercise : public InstanceContentScript +class FinalExercise : + public InstanceContentScript { public: - FinalExercise() : InstanceContentScript( 15016 ) - { } + FinalExercise() : + InstanceContentScript( 15016 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 6228959, 5, { 457.583801f, 5.680784f, 280.512787f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_0", 2000608, 2807920, 4, { -95.322441f, -25.054260f, 61.518002f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 6228959, 5, { 457.583801f, 5.680784f, 280.512787f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_0", 2000608, 2807920, 4, { -95.322441f, -25.054260f, 61.518002f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/HealMultipleAllies.cpp b/src/servers/Scripts/instances/hallofthenovice/HealMultipleAllies.cpp index 44669332..f8755628 100644 --- a/src/servers/Scripts/instances/hallofthenovice/HealMultipleAllies.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/HealMultipleAllies.cpp @@ -1,36 +1,43 @@ #include #include -class HealMultipleAllies : public InstanceContentScript +class HealMultipleAllies : + public InstanceContentScript { public: - HealMultipleAllies() : InstanceContentScript( 15014 ) - { } + HealMultipleAllies() : + InstanceContentScript( 15014 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/HealanAlly.cpp b/src/servers/Scripts/instances/hallofthenovice/HealanAlly.cpp index 0691ce44..f81514c6 100644 --- a/src/servers/Scripts/instances/hallofthenovice/HealanAlly.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/HealanAlly.cpp @@ -1,36 +1,43 @@ #include #include -class HealanAlly : public InstanceContentScript +class HealanAlly : + public InstanceContentScript { public: - HealanAlly() : InstanceContentScript( 15013 ) - { } + HealanAlly() : + InstanceContentScript( 15013 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/hallofthenovice/InteractwiththeBattlefield.cpp b/src/servers/Scripts/instances/hallofthenovice/InteractwiththeBattlefield.cpp index 3d8d28ba..10f746bd 100644 --- a/src/servers/Scripts/instances/hallofthenovice/InteractwiththeBattlefield.cpp +++ b/src/servers/Scripts/instances/hallofthenovice/InteractwiththeBattlefield.cpp @@ -1,36 +1,43 @@ #include #include -class InteractwiththeBattlefield : public InstanceContentScript +class InteractwiththeBattlefield : + public InstanceContentScript { public: - InteractwiththeBattlefield() : InstanceContentScript( 15012 ) - { } + InteractwiththeBattlefield() : + InstanceContentScript( 15012 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007001, 0, 4, { -5.135936f, -0.986339f, -0.059807f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007004, 0, 4, { -6.501123f, -0.986346f, 2.121102f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007005, 0, 4, { -5.178086f, -0.986341f, -0.227772f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007006, 0, 4, { -7.272448f, -0.986346f, -2.204096f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007007, 6216275, 4, { -30.849630f, 0.697522f, -1.415699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Gatelever", 2007008, 0, 4, { -31.199289f, 1.850766f, -7.087492f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6215534, 5, { 44.100491f, 1.056062f, 1.068363f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_5", 2001403, 3968682, 4, { 30.986059f, 0.993235f, 1.480142f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001404, 3968585, 4, { -31.243280f, 1.043213f, 1.580577f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/Astragalos.cpp b/src/servers/Scripts/instances/pvp/Astragalos.cpp index 551cb40c..dd1ae49f 100644 --- a/src/servers/Scripts/instances/pvp/Astragalos.cpp +++ b/src/servers/Scripts/instances/pvp/Astragalos.cpp @@ -1,40 +1,57 @@ #include #include -class Astragalos : public InstanceContentScript +class Astragalos : + public InstanceContentScript { public: - Astragalos() : InstanceContentScript( 51001 ) - { } + Astragalos() : + InstanceContentScript( 51001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007457, 7033316, 4, { -140.058197f, 45.799999f, -133.960495f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007457, 7033315, 4, { -123.008400f, 16.299999f, 103.779503f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007457, 7033317, 4, { 105.712799f, 16.299980f, 114.356003f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007457, 7033318, 4, { 183.420807f, 45.799980f, -111.239098f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Powergenerator", 2009034, 7032566, 4, { 6.485046f, 46.386410f, -10.055730f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Hangarterminal", 2009035, 7032549, 4, { -258.015198f, 44.361351f, 21.038191f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Hangarterminal_1", 2009062, 7032550, 4, { -262.674988f, 44.773441f, -32.764599f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Hangarterminal_2", 2009063, 7032561, 4, { 276.628510f, 44.544209f, 18.968180f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Hangarterminal_3", 2009064, 7032562, 4, { 258.262787f, 44.210709f, 69.718079f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Ceruleumtank", 2009031, 0, 4, { 8.651855f, 46.280640f, -142.595596f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Steamcannon", 2009032, 0, 4, { -181.307602f, 47.593700f, -28.846230f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Steamcannon_1", 2009033, 0, 4, { -178.482193f, 47.593700f, 2.992350f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Steamcannon_2", 2009040, 0, 4, { 186.000504f, 47.578602f, 31.721189f }, 0.991760f, -0.454976f ); - instance->registerEObj( "Steamcannon_3", 2009041, 0, 4, { 196.952606f, 47.593700f, 1.659642f }, 1.000000f, -0.455053f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007457, 7033316, 4, { -140.058197f, 45.799999f, -133.960495f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2007457, 7033315, 4, { -123.008400f, 16.299999f, 103.779503f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2007457, 7033317, 4, { 105.712799f, 16.299980f, 114.356003f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2007457, 7033318, 4, { 183.420807f, 45.799980f, -111.239098f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Powergenerator", 2009034, 7032566, 4, { 6.485046f, 46.386410f, -10.055730f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Hangarterminal", 2009035, 7032549, 4, { -258.015198f, 44.361351f, 21.038191f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Hangarterminal_1", 2009062, 7032550, 4, { -262.674988f, 44.773441f, -32.764599f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Hangarterminal_2", 2009063, 7032561, 4, { 276.628510f, 44.544209f, 18.968180f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Hangarterminal_3", 2009064, 7032562, 4, { 258.262787f, 44.210709f, 69.718079f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Ceruleumtank", 2009031, 0, 4, { 8.651855f, 46.280640f, -142.595596f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Steamcannon", 2009032, 0, 4, { -181.307602f, 47.593700f, -28.846230f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Steamcannon_1", 2009033, 0, 4, { -178.482193f, 47.593700f, 2.992350f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Steamcannon_2", 2009040, 0, 4, { 186.000504f, 47.578602f, 31.721189f }, 0.991760f, + -0.454976f ); + instance->registerEObj( "Steamcannon_3", 2009041, 0, 4, { 196.952606f, 47.593700f, 1.659642f }, 1.000000f, + -0.455053f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/SealRockSeize.cpp b/src/servers/Scripts/instances/pvp/SealRockSeize.cpp index fa2dcc80..ae34c0dd 100644 --- a/src/servers/Scripts/instances/pvp/SealRockSeize.cpp +++ b/src/servers/Scripts/instances/pvp/SealRockSeize.cpp @@ -1,26 +1,29 @@ #include #include -class SealRockSeize : public InstanceContentScript +class SealRockSeize : + public InstanceContentScript { public: - SealRockSeize() : InstanceContentScript( 50004 ) - { } + SealRockSeize() : + InstanceContentScript( 50004 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheBorderlandRuinsSecure.cpp b/src/servers/Scripts/instances/pvp/TheBorderlandRuinsSecure.cpp index 9b85d972..4e3799a1 100644 --- a/src/servers/Scripts/instances/pvp/TheBorderlandRuinsSecure.cpp +++ b/src/servers/Scripts/instances/pvp/TheBorderlandRuinsSecure.cpp @@ -1,51 +1,69 @@ #include #include -class TheBorderlandRuinsSecure : public InstanceContentScript +class TheBorderlandRuinsSecure : + public InstanceContentScript { public: - TheBorderlandRuinsSecure() : InstanceContentScript( 50001 ) - { } + TheBorderlandRuinsSecure() : + InstanceContentScript( 50001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_l1p1_q3_swhu1", 2005078, 5573675, 4, { -150.601807f, -15.195440f, 86.396042f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_1", 2005079, 5573676, 4, { -160.177505f, -15.426880f, 111.877502f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_2", 2005080, 5573677, 4, { -178.133102f, -15.426880f, 85.038406f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_3", 2005081, 5573687, 4, { 147.790497f, -15.205700f, 85.606216f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_4", 2005082, 5573688, 4, { 181.170303f, -15.426880f, 81.284790f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_5", 2005083, 5573689, 4, { 160.730392f, -15.457460f, 117.518303f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_6", 2005084, 5573690, 4, { -0.015320f, -15.426880f, -162.924103f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_7", 2005085, 5573691, 4, { 19.010229f, -15.416970f, -200.015396f }, 1.000000f, 0.000000f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_8", 2005086, 5573692, 4, { -18.994471f, -15.426880f, -199.992905f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "unknown_0", 2004187, 4724282, 4, { -0.007111f, 12.000000f, -386.299896f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2004188, 4724284, 4, { 335.025513f, 12.000000f, 193.711899f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2004189, 4724283, 4, { -334.556213f, 12.000000f, 193.274796f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_l1p1_lvd_b0441", 2004202, 4797506, 4, { -0.101569f, 30.000000f, 1.413736f }, 1.000000f, 0.000000f ); - // States -> STAGE_def STAGE_pop_anim - instance->registerEObj( "Magitekreaper", 2007710, 0, 4, { -0.135500f, 28.501801f, 18.021700f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007722, 6642830, 4, { 7.805808f, 29.000000f, 0.239120f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_l1p1_q3_swhu1", 2005078, 5573675, 4, { -150.601807f, -15.195440f, 86.396042f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_1", 2005079, 5573676, 4, { -160.177505f, -15.426880f, 111.877502f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_2", 2005080, 5573677, 4, { -178.133102f, -15.426880f, 85.038406f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_3", 2005081, 5573687, 4, { 147.790497f, -15.205700f, 85.606216f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_4", 2005082, 5573688, 4, { 181.170303f, -15.426880f, 81.284790f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_5", 2005083, 5573689, 4, { 160.730392f, -15.457460f, 117.518303f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_6", 2005084, 5573690, 4, { -0.015320f, -15.426880f, -162.924103f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_7", 2005085, 5573691, 4, { 19.010229f, -15.416970f, -200.015396f }, + 1.000000f, 0.000000f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_8", 2005086, 5573692, 4, { -18.994471f, -15.426880f, -199.992905f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "unknown_0", 2004187, 4724282, 4, { -0.007111f, 12.000000f, -386.299896f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2004188, 4724284, 4, { 335.025513f, 12.000000f, 193.711899f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2004189, 4724283, 4, { -334.556213f, 12.000000f, 193.274796f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_l1p1_lvd_b0441", 2004202, 4797506, 4, { -0.101569f, 30.000000f, 1.413736f }, + 1.000000f, 0.000000f ); + // States -> STAGE_def STAGE_pop_anim + instance->registerEObj( "Magitekreaper", 2007710, 0, 4, { -0.135500f, 28.501801f, 18.021700f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2007722, 6642830, 4, { 7.805808f, 29.000000f, 0.239120f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFeast4on4LightParty.cpp b/src/servers/Scripts/instances/pvp/TheFeast4on4LightParty.cpp index 5c198c9a..800713cf 100644 --- a/src/servers/Scripts/instances/pvp/TheFeast4on4LightParty.cpp +++ b/src/servers/Scripts/instances/pvp/TheFeast4on4LightParty.cpp @@ -1,30 +1,37 @@ #include #include -class TheFeast4on4LightParty : public InstanceContentScript +class TheFeast4on4LightParty : + public InstanceContentScript { public: - TheFeast4on4LightParty() : InstanceContentScript( 40012 ) - { } + TheFeast4on4LightParty() : + InstanceContentScript( 40012 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2006819, 6218908, 4, { -89.012909f, 8.477110f, -0.326954f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2006818, 6218909, 4, { 95.872437f, 8.468750f, -0.320496f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_lvd_collison_only", 2002618, 6220121, 4, { -78.605072f, 0.920299f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_collison_only_1", 2002618, 6220123, 4, { 79.651703f, 0.811267f, -0.306571f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2006819, 6218908, 4, { -89.012909f, 8.477110f, -0.326954f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2006818, 6218909, 4, { 95.872437f, 8.468750f, -0.320496f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_lvd_collison_only", 2002618, 6220121, 4, { -78.605072f, 0.920299f, 0.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_collison_only_1", 2002618, 6220123, 4, { 79.651703f, 0.811267f, -0.306571f }, + 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFeast4on4Ranked.cpp b/src/servers/Scripts/instances/pvp/TheFeast4on4Ranked.cpp index 521ef812..eddd483c 100644 --- a/src/servers/Scripts/instances/pvp/TheFeast4on4Ranked.cpp +++ b/src/servers/Scripts/instances/pvp/TheFeast4on4Ranked.cpp @@ -1,28 +1,33 @@ #include #include -class TheFeast4on4Ranked : public InstanceContentScript +class TheFeast4on4Ranked : + public InstanceContentScript { public: - TheFeast4on4Ranked() : InstanceContentScript( 40018 ) - { } + TheFeast4on4Ranked() : + InstanceContentScript( 40018 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007657, 6632432, 4, { -64.289970f, 8.262049f, 13.375790f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2007658, 6632431, 4, { 39.169922f, 8.194031f, -45.822941f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007657, 6632432, 4, { -64.289970f, 8.262049f, 13.375790f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2007658, 6632431, 4, { 39.169922f, 8.194031f, -45.822941f }, 0.991760f, + 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFeast4on4Training.cpp b/src/servers/Scripts/instances/pvp/TheFeast4on4Training.cpp index 92f4e579..d83d1360 100644 --- a/src/servers/Scripts/instances/pvp/TheFeast4on4Training.cpp +++ b/src/servers/Scripts/instances/pvp/TheFeast4on4Training.cpp @@ -1,28 +1,33 @@ #include #include -class TheFeast4on4Training : public InstanceContentScript +class TheFeast4on4Training : + public InstanceContentScript { public: - TheFeast4on4Training() : InstanceContentScript( 40016 ) - { } + TheFeast4on4Training() : + InstanceContentScript( 40016 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007657, 6632432, 4, { -64.289970f, 8.262049f, 13.375790f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2007658, 6632431, 4, { 39.169922f, 8.194031f, -45.822941f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007657, 6632432, 4, { -64.289970f, 8.262049f, 13.375790f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2007658, 6632431, 4, { 39.169922f, 8.194031f, -45.822941f }, 0.991760f, + 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFeastCustomMatchCrystalTower.cpp b/src/servers/Scripts/instances/pvp/TheFeastCustomMatchCrystalTower.cpp index ce4e3d36..2f8ed69a 100644 --- a/src/servers/Scripts/instances/pvp/TheFeastCustomMatchCrystalTower.cpp +++ b/src/servers/Scripts/instances/pvp/TheFeastCustomMatchCrystalTower.cpp @@ -1,32 +1,41 @@ #include #include -class TheFeastCustomMatchCrystalTower : public InstanceContentScript +class TheFeastCustomMatchCrystalTower : + public InstanceContentScript { public: - TheFeastCustomMatchCrystalTower() : InstanceContentScript( 40025 ) - { } + TheFeastCustomMatchCrystalTower() : + InstanceContentScript( 40025 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2008986, 7240684, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_1", 2008987, 7240683, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_2", 2007457, 7164689, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_3", 2007457, 7164690, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_4", 2007457, 7164691, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_5", 2007457, 7164692, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2008986, 7240684, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_1", 2008987, 7240683, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_2", 2007457, 7164689, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_3", 2007457, 7164690, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_4", 2007457, 7164691, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_5", 2007457, 7164692, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFeastCustomMatchFeastingGrounds.cpp b/src/servers/Scripts/instances/pvp/TheFeastCustomMatchFeastingGrounds.cpp index 5773bff2..275a654f 100644 --- a/src/servers/Scripts/instances/pvp/TheFeastCustomMatchFeastingGrounds.cpp +++ b/src/servers/Scripts/instances/pvp/TheFeastCustomMatchFeastingGrounds.cpp @@ -1,30 +1,37 @@ #include #include -class TheFeastCustomMatchFeastingGrounds : public InstanceContentScript +class TheFeastCustomMatchFeastingGrounds : + public InstanceContentScript { public: - TheFeastCustomMatchFeastingGrounds() : InstanceContentScript( 40014 ) - { } + TheFeastCustomMatchFeastingGrounds() : + InstanceContentScript( 40014 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2006819, 6218908, 4, { -89.012909f, 8.477110f, -0.326954f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2006818, 6218909, 4, { 95.872437f, 8.468750f, -0.320496f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_lvd_collison_only", 2002618, 6220121, 4, { -78.605072f, 0.920299f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_collison_only_1", 2002618, 6220123, 4, { 79.651703f, 0.811267f, -0.306571f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2006819, 6218908, 4, { -89.012909f, 8.477110f, -0.326954f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2006818, 6218909, 4, { 95.872437f, 8.468750f, -0.320496f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_lvd_collison_only", 2002618, 6220121, 4, { -78.605072f, 0.920299f, 0.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_collison_only_1", 2002618, 6220123, 4, { 79.651703f, 0.811267f, -0.306571f }, + 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFeastCustomMatchLichenweed.cpp b/src/servers/Scripts/instances/pvp/TheFeastCustomMatchLichenweed.cpp index e8084bac..eca3aa6d 100644 --- a/src/servers/Scripts/instances/pvp/TheFeastCustomMatchLichenweed.cpp +++ b/src/servers/Scripts/instances/pvp/TheFeastCustomMatchLichenweed.cpp @@ -1,28 +1,33 @@ #include #include -class TheFeastCustomMatchLichenweed : public InstanceContentScript +class TheFeastCustomMatchLichenweed : + public InstanceContentScript { public: - TheFeastCustomMatchLichenweed() : InstanceContentScript( 40021 ) - { } + TheFeastCustomMatchLichenweed() : + InstanceContentScript( 40021 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007657, 6632432, 4, { -64.289970f, 8.262049f, 13.375790f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2007658, 6632431, 4, { 39.169922f, 8.194031f, -45.822941f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007657, 6632432, 4, { -64.289970f, 8.262049f, 13.375790f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2007658, 6632431, 4, { 39.169922f, 8.194031f, -45.822941f }, 0.991760f, + 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFeastRanked.cpp b/src/servers/Scripts/instances/pvp/TheFeastRanked.cpp index 5473eb1d..ad095559 100644 --- a/src/servers/Scripts/instances/pvp/TheFeastRanked.cpp +++ b/src/servers/Scripts/instances/pvp/TheFeastRanked.cpp @@ -1,32 +1,41 @@ #include #include -class TheFeastRanked : public InstanceContentScript +class TheFeastRanked : + public InstanceContentScript { public: - TheFeastRanked() : InstanceContentScript( 40023 ) - { } + TheFeastRanked() : + InstanceContentScript( 40023 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2008986, 7240684, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_1", 2008987, 7240683, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_2", 2007457, 7164689, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_3", 2007457, 7164690, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_4", 2007457, 7164691, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_5", 2007457, 7164692, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2008986, 7240684, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_1", 2008987, 7240683, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_2", 2007457, 7164689, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_3", 2007457, 7164690, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_4", 2007457, 7164691, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_5", 2007457, 7164692, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFeastTeamRanked.cpp b/src/servers/Scripts/instances/pvp/TheFeastTeamRanked.cpp index 0f019311..d5b2cfeb 100644 --- a/src/servers/Scripts/instances/pvp/TheFeastTeamRanked.cpp +++ b/src/servers/Scripts/instances/pvp/TheFeastTeamRanked.cpp @@ -1,32 +1,41 @@ #include #include -class TheFeastTeamRanked : public InstanceContentScript +class TheFeastTeamRanked : + public InstanceContentScript { public: - TheFeastTeamRanked() : InstanceContentScript( 40022 ) - { } + TheFeastTeamRanked() : + InstanceContentScript( 40022 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2008986, 7240684, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_1", 2008987, 7240683, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_2", 2007457, 7164689, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_3", 2007457, 7164690, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_4", 2007457, 7164691, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_5", 2007457, 7164692, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2008986, 7240684, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_1", 2008987, 7240683, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_2", 2007457, 7164689, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_3", 2007457, 7164690, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_4", 2007457, 7164691, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_5", 2007457, 7164692, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFeastTraining.cpp b/src/servers/Scripts/instances/pvp/TheFeastTraining.cpp index 01d99119..cef07558 100644 --- a/src/servers/Scripts/instances/pvp/TheFeastTraining.cpp +++ b/src/servers/Scripts/instances/pvp/TheFeastTraining.cpp @@ -1,32 +1,41 @@ #include #include -class TheFeastTraining : public InstanceContentScript +class TheFeastTraining : + public InstanceContentScript { public: - TheFeastTraining() : InstanceContentScript( 40024 ) - { } + TheFeastTraining() : + InstanceContentScript( 40024 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2008986, 7240684, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_1", 2008987, 7240683, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_2", 2007457, 7164689, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_3", 2007457, 7164690, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_4", 2007457, 7164691, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - instance->registerEObj( "unknown_5", 2007457, 7164692, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2008986, 7240684, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_1", 2008987, 7240683, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_2", 2007457, 7164689, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_3", 2007457, 7164690, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_4", 2007457, 7164691, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "unknown_5", 2007457, 7164692, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/pvp/TheFieldsofGloryShatter.cpp b/src/servers/Scripts/instances/pvp/TheFieldsofGloryShatter.cpp index 82747ba8..12b6bd20 100644 --- a/src/servers/Scripts/instances/pvp/TheFieldsofGloryShatter.cpp +++ b/src/servers/Scripts/instances/pvp/TheFieldsofGloryShatter.cpp @@ -1,26 +1,29 @@ #include #include -class TheFieldsofGloryShatter : public InstanceContentScript +class TheFieldsofGloryShatter : + public InstanceContentScript { public: - TheFieldsofGloryShatter() : InstanceContentScript( 50005 ) - { } + TheFieldsofGloryShatter() : + InstanceContentScript( 50005 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/ABloodyReunion.cpp b/src/servers/Scripts/instances/questbattles/ABloodyReunion.cpp index bf9ed3a1..28388cbb 100644 --- a/src/servers/Scripts/instances/questbattles/ABloodyReunion.cpp +++ b/src/servers/Scripts/instances/questbattles/ABloodyReunion.cpp @@ -1,26 +1,29 @@ #include #include -class ABloodyReunion : public InstanceContentScript +class ABloodyReunion : + public InstanceContentScript { public: - ABloodyReunion() : InstanceContentScript( 5002 ) - { } + ABloodyReunion() : + InstanceContentScript( 5002 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/ASpectaclefortheAges.cpp b/src/servers/Scripts/instances/questbattles/ASpectaclefortheAges.cpp index 4d847687..e35a95be 100644 --- a/src/servers/Scripts/instances/questbattles/ASpectaclefortheAges.cpp +++ b/src/servers/Scripts/instances/questbattles/ASpectaclefortheAges.cpp @@ -1,43 +1,61 @@ #include #include -class ASpectaclefortheAges : public InstanceContentScript +class ASpectaclefortheAges : + public InstanceContentScript { public: - ASpectaclefortheAges() : InstanceContentScript( 5001 ) - { } + ASpectaclefortheAges() : + InstanceContentScript( 5001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_w_qic_001_04a", 2006993, 6235274, 4, { -35.822102f, 298.899994f, -205.263199f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2006952, 0, 4, { -35.712589f, 298.899994f, -204.878006f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 556.049377f, 348.102509f, -752.435730f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4600289, 5, { 523.532471f, 348.223389f, -736.685730f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_1", 2002332, 0, 4, { 533.090881f, 348.691895f, -742.750916f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2002333, 0, 4, { 539.940430f, 348.836395f, -734.401489f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2000608, 3967803, 4, { 202.369598f, 257.761108f, 80.435272f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2000608, 3976993, 4, { 273.634705f, 254.600204f, 106.048500f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2000608, 3986797, 4, { 205.504898f, 246.188995f, 194.875702f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2000608, 3986798, 4, { 326.313385f, 239.193497f, 221.138901f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2000608, 2718481, 4, { 240.552307f, 302.769714f, -199.979996f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2000608, 4065433, 4, { 204.970001f, 302.119995f, -216.311600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2000608, 2814617, 4, { 205.869995f, 302.219086f, -276.681396f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2000608, 2763112, 4, { -433.000000f, 211.007706f, -216.148605f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000608, 4187649, 4, { -453.000000f, 211.000000f, -281.046600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2000608, 4187961, 4, { -416.000000f, 210.788193f, -279.813812f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_w_qic_001_04a", 2006993, 6235274, 4, { -35.822102f, 298.899994f, -205.263199f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2006952, 0, 4, { -35.712589f, 298.899994f, -204.878006f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 556.049377f, 348.102509f, -752.435730f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4600289, 5, { 523.532471f, 348.223389f, -736.685730f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_1", 2002332, 0, 4, { 533.090881f, 348.691895f, -742.750916f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2002333, 0, 4, { 539.940430f, 348.836395f, -734.401489f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2000608, 3967803, 4, { 202.369598f, 257.761108f, 80.435272f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2000608, 3976993, 4, { 273.634705f, 254.600204f, 106.048500f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2000608, 3986797, 4, { 205.504898f, 246.188995f, 194.875702f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2000608, 3986798, 4, { 326.313385f, 239.193497f, 221.138901f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2000608, 2718481, 4, { 240.552307f, 302.769714f, -199.979996f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2000608, 4065433, 4, { 204.970001f, 302.119995f, -216.311600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2000608, 2814617, 4, { 205.869995f, 302.219086f, -276.681396f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2000608, 2763112, 4, { -433.000000f, 211.007706f, -216.148605f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2000608, 4187649, 4, { -453.000000f, 211.000000f, -281.046600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2000608, 4187961, 4, { -416.000000f, 210.788193f, -279.813812f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/BloodDragoon.cpp b/src/servers/Scripts/instances/questbattles/BloodDragoon.cpp index 0db9c41c..d4846762 100644 --- a/src/servers/Scripts/instances/questbattles/BloodDragoon.cpp +++ b/src/servers/Scripts/instances/questbattles/BloodDragoon.cpp @@ -1,26 +1,29 @@ #include #include -class BloodDragoon : public InstanceContentScript +class BloodDragoon : + public InstanceContentScript { public: - BloodDragoon() : InstanceContentScript( 5021 ) - { } + BloodDragoon() : + InstanceContentScript( 5021 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/BloodontheDeck.cpp b/src/servers/Scripts/instances/questbattles/BloodontheDeck.cpp index c994038c..f495d081 100644 --- a/src/servers/Scripts/instances/questbattles/BloodontheDeck.cpp +++ b/src/servers/Scripts/instances/questbattles/BloodontheDeck.cpp @@ -1,28 +1,32 @@ #include #include -class BloodontheDeck : public InstanceContentScript +class BloodontheDeck : + public InstanceContentScript { public: - BloodontheDeck() : InstanceContentScript( 5009 ) - { } + BloodontheDeck() : + InstanceContentScript( 5009 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_w_qic_004_01a", 2007457, 6904219, 4, { 5.684449f, 16.347240f, 3.782750f }, 1.000000f, 0.000000f ); - // States -> cage01_close_01 cage01_open_01 cage01_open_02 + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_w_qic_004_01a", 2007457, 6904219, 4, { 5.684449f, 16.347240f, 3.782750f }, 1.000000f, + 0.000000f ); + // States -> cage01_close_01 cage01_open_01 cage01_open_02 - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/CuriousGorgeMeetsHisMatch.cpp b/src/servers/Scripts/instances/questbattles/CuriousGorgeMeetsHisMatch.cpp index 5343e5f7..031d2469 100644 --- a/src/servers/Scripts/instances/questbattles/CuriousGorgeMeetsHisMatch.cpp +++ b/src/servers/Scripts/instances/questbattles/CuriousGorgeMeetsHisMatch.cpp @@ -1,29 +1,34 @@ #include #include -class CuriousGorgeMeetsHisMatch : public InstanceContentScript +class CuriousGorgeMeetsHisMatch : + public InstanceContentScript { public: - CuriousGorgeMeetsHisMatch() : InstanceContentScript( 5013 ) - { } + CuriousGorgeMeetsHisMatch() : + InstanceContentScript( 5013 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Summoningbell", 2000401, 4260827, 4, { 14.143430f, 5.238082f, 13.664930f }, 1.000000f, 0.000000f ); - // States -> vf_rtbell_on - instance->registerEObj( "Teamboard", 2009097, 4302533, 4, { 15.508660f, 6.051773f, -14.767720f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Summoningbell", 2000401, 4260827, 4, { 14.143430f, 5.238082f, 13.664930f }, 1.000000f, + 0.000000f ); + // States -> vf_rtbell_on + instance->registerEObj( "Teamboard", 2009097, 4302533, 4, { 15.508660f, 6.051773f, -14.767720f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/DarkwingDragon.cpp b/src/servers/Scripts/instances/questbattles/DarkwingDragon.cpp index 5ee859c1..52050fa8 100644 --- a/src/servers/Scripts/instances/questbattles/DarkwingDragon.cpp +++ b/src/servers/Scripts/instances/questbattles/DarkwingDragon.cpp @@ -1,26 +1,29 @@ #include #include -class DarkwingDragon : public InstanceContentScript +class DarkwingDragon : + public InstanceContentScript { public: - DarkwingDragon() : InstanceContentScript( 5016 ) - { } + DarkwingDragon() : + InstanceContentScript( 5016 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/InThalsName.cpp b/src/servers/Scripts/instances/questbattles/InThalsName.cpp index 61e0a032..5d44f670 100644 --- a/src/servers/Scripts/instances/questbattles/InThalsName.cpp +++ b/src/servers/Scripts/instances/questbattles/InThalsName.cpp @@ -1,28 +1,32 @@ #include #include -class InThalsName : public InstanceContentScript +class InThalsName : + public InstanceContentScript { public: - InThalsName() : InstanceContentScript( 5006 ) - { } + InThalsName() : + InstanceContentScript( 5006 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2004364, 0, 4, { -93.101089f, -13.129550f, 6.845694f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Companychest", 2000470, 4255822, 4, { 128.974701f, 5.067919f, -40.913502f }, 1.000000f, -0.343160f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2004364, 0, 4, { -93.101089f, -13.129550f, 6.845694f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Companychest", 2000470, 4255822, 4, { 128.974701f, 5.067919f, -40.913502f }, 1.000000f, + -0.343160f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/InterdimensionalRift.cpp b/src/servers/Scripts/instances/questbattles/InterdimensionalRift.cpp index f305edee..00833902 100644 --- a/src/servers/Scripts/instances/questbattles/InterdimensionalRift.cpp +++ b/src/servers/Scripts/instances/questbattles/InterdimensionalRift.cpp @@ -1,26 +1,29 @@ #include #include -class InterdimensionalRift : public InstanceContentScript +class InterdimensionalRift : + public InstanceContentScript { public: - InterdimensionalRift() : InstanceContentScript( 5023 ) - { } + InterdimensionalRift() : + InstanceContentScript( 5023 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/ItsProbablyaTrap.cpp b/src/servers/Scripts/instances/questbattles/ItsProbablyaTrap.cpp index e0471d55..1f7940dd 100644 --- a/src/servers/Scripts/instances/questbattles/ItsProbablyaTrap.cpp +++ b/src/servers/Scripts/instances/questbattles/ItsProbablyaTrap.cpp @@ -1,26 +1,29 @@ #include #include -class ItsProbablyaTrap : public InstanceContentScript +class ItsProbablyaTrap : + public InstanceContentScript { public: - ItsProbablyaTrap() : InstanceContentScript( 5005 ) - { } + ItsProbablyaTrap() : + InstanceContentScript( 5005 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/MatsubaMayhem.cpp b/src/servers/Scripts/instances/questbattles/MatsubaMayhem.cpp index 2b1ace2e..02fddf53 100644 --- a/src/servers/Scripts/instances/questbattles/MatsubaMayhem.cpp +++ b/src/servers/Scripts/instances/questbattles/MatsubaMayhem.cpp @@ -1,26 +1,29 @@ #include #include -class MatsubaMayhem : public InstanceContentScript +class MatsubaMayhem : + public InstanceContentScript { public: - MatsubaMayhem() : InstanceContentScript( 5011 ) - { } + MatsubaMayhem() : + InstanceContentScript( 5011 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/Naadam.cpp b/src/servers/Scripts/instances/questbattles/Naadam.cpp index c0ea7653..caf4fb95 100644 --- a/src/servers/Scripts/instances/questbattles/Naadam.cpp +++ b/src/servers/Scripts/instances/questbattles/Naadam.cpp @@ -1,26 +1,29 @@ #include #include -class Naadam : public InstanceContentScript +class Naadam : + public InstanceContentScript { public: - Naadam() : InstanceContentScript( 5008 ) - { } + Naadam() : + InstanceContentScript( 5008 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/OneLifeforOneWorld.cpp b/src/servers/Scripts/instances/questbattles/OneLifeforOneWorld.cpp index b951f6b2..7301c8ad 100644 --- a/src/servers/Scripts/instances/questbattles/OneLifeforOneWorld.cpp +++ b/src/servers/Scripts/instances/questbattles/OneLifeforOneWorld.cpp @@ -1,31 +1,35 @@ #include #include -class OneLifeforOneWorld : public InstanceContentScript +class OneLifeforOneWorld : + public InstanceContentScript { public: - OneLifeforOneWorld() : InstanceContentScript( 5003 ) - { } + OneLifeforOneWorld() : + InstanceContentScript( 5003 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4177874, 5, { -16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2007452, 0, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "BladeofLight", 2007454, 0, 4, { 0.000000f, 0.000000f, 11.300000f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4177874, 5, { -16.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2007452, 0, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "BladeofLight", 2007454, 0, 4, { 0.000000f, 0.000000f, 11.300000f }, 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/OurCompromise.cpp b/src/servers/Scripts/instances/questbattles/OurCompromise.cpp index 6c01c1a4..aa1b863f 100644 --- a/src/servers/Scripts/instances/questbattles/OurCompromise.cpp +++ b/src/servers/Scripts/instances/questbattles/OurCompromise.cpp @@ -1,26 +1,29 @@ #include #include -class OurCompromise : public InstanceContentScript +class OurCompromise : + public InstanceContentScript { public: - OurCompromise() : InstanceContentScript( 5020 ) - { } + OurCompromise() : + InstanceContentScript( 5020 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/OurUnsungHeroes.cpp b/src/servers/Scripts/instances/questbattles/OurUnsungHeroes.cpp index ca934fdd..cdb99a30 100644 --- a/src/servers/Scripts/instances/questbattles/OurUnsungHeroes.cpp +++ b/src/servers/Scripts/instances/questbattles/OurUnsungHeroes.cpp @@ -1,72 +1,114 @@ #include #include -class OurUnsungHeroes : public InstanceContentScript +class OurUnsungHeroes : + public InstanceContentScript { public: - OurUnsungHeroes() : InstanceContentScript( 5014 ) - { } + OurUnsungHeroes() : + InstanceContentScript( 5014 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6159060, 4, { -199.881607f, 11.999990f, -280.139313f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -200.009201f, 12.116690f, -280.037506f }, 0.991760f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2003373, 6159063, 4, { -238.928894f, 12.100000f, -279.455688f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2006848, 0, 4, { -227.145905f, 11.978270f, -284.676086f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6158913, 4, { -262.326813f, -278.432312f, -241.982407f }, 1.000000f, -0.424392f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002735, 0, 4, { -261.926788f, -278.586792f, -242.680695f }, 0.800000f, -0.511830f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2006850, 6161174, 4, { -281.669495f, -278.783203f, -207.507401f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_3", 2006851, 0, 4, { -287.205292f, -278.675507f, -219.428604f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2006852, 0, 4, { -285.709991f, -278.675507f, -222.022598f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2006853, 0, 4, { -284.489288f, -278.675507f, -217.719604f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_6", 2006854, 0, 4, { -282.932892f, -278.675507f, -220.527298f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 6177873, 4, { 236.391098f, -854.348206f, 388.999908f }, 0.991760f, -0.424392f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2002735, 0, 4, { 236.928299f, -854.301025f, 388.437988f }, 0.991760f, -0.272621f ); - instance->registerEObj( "unknown_8", 2006855, 0, 4, { 245.654495f, -854.500000f, 408.186615f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2006856, 0, 4, { 245.602402f, -854.500000f, 408.203186f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2006857, 0, 4, { 217.570694f, -854.500000f, 414.970306f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_11", 2006867, 0, 4, { 238.696899f, -854.398376f, 400.472900f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2006868, 0, 4, { 225.070404f, -854.520508f, 402.559692f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_13", 2007000, 6217077, 4, { 230.880493f, -854.459717f, 414.889313f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Guardianstatue", 2006976, 0, 4, { 231.118698f, -852.800171f, 414.090088f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Guardianstatue_1", 2006977, 0, 4, { 231.113907f, -852.801514f, 414.085785f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Guardianstatue_2", 2006978, 0, 4, { 231.101898f, -852.801514f, 414.089111f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6159123, 5, { 73.070312f, 100.000000f, -376.644592f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 65.173607f, 100.000000f, -382.604614f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 228.895599f, -854.546082f, 420.274109f }, 0.991760f, -0.919204f ); - instance->registerEObj( "unknown_14", 2006825, 6173434, 4, { -45.716091f, 57.999512f, -311.654205f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_15", 2006826, 6173447, 4, { -174.685303f, 6.271362f, -302.651215f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_16", 2006827, 6173458, 4, { -174.227493f, 6.973328f, -299.721588f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_17", 2006828, 6155704, 4, { -74.714241f, 58.247410f, -327.713287f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_18", 2006829, 6184879, 4, { -170.839996f, -252.613205f, -408.640503f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_19", 2006830, 6184881, 4, { -163.902496f, -272.319397f, -294.726501f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2006831, 6162191, 4, { -243.942093f, -280.660706f, -273.564789f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Stoneoftransference", 2006834, 6173379, 4, { -295.032104f, -273.037506f, -185.082397f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2006832, 6177949, 4, { 166.001007f, -844.999817f, 265.365814f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2006833, 6177947, 4, { 226.690002f, -856.247681f, 262.675415f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_23", 2006835, 6202096, 4, { 255.720200f, -865.873474f, 319.853210f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_w_qic_004_03a", 2002872, 6904891, 4, { 236.391205f, -854.348083f, 388.999908f }, 0.991760f, -0.424392f ); - instance->registerEObj( "unknown_24", 2002735, 0, 4, { 236.928299f, -854.301025f, 388.437988f }, 0.991760f, -0.272621f ); - instance->registerEObj( "sgbg_w_qic_004_03a_1", 2007457, 6904603, 4, { 249.195099f, -856.351624f, 343.526215f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_25", 2007457, 6217077, 4, { 233.497299f, -854.546021f, 414.179413f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6159060, 4, { -199.881607f, 11.999990f, -280.139313f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -200.009201f, 12.116690f, -280.037506f }, 0.991760f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2003373, 6159063, 4, { -238.928894f, 12.100000f, -279.455688f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2006848, 0, 4, { -227.145905f, 11.978270f, -284.676086f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6158913, 4, { -262.326813f, -278.432312f, -241.982407f }, + 1.000000f, -0.424392f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002735, 0, 4, { -261.926788f, -278.586792f, -242.680695f }, 0.800000f, + -0.511830f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2006850, 6161174, 4, { -281.669495f, -278.783203f, -207.507401f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_3", 2006851, 0, 4, { -287.205292f, -278.675507f, -219.428604f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_4", 2006852, 0, 4, { -285.709991f, -278.675507f, -222.022598f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2006853, 0, 4, { -284.489288f, -278.675507f, -217.719604f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_6", 2006854, 0, 4, { -282.932892f, -278.675507f, -220.527298f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 6177873, 4, { 236.391098f, -854.348206f, 388.999908f }, + 0.991760f, -0.424392f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2002735, 0, 4, { 236.928299f, -854.301025f, 388.437988f }, 0.991760f, + -0.272621f ); + instance->registerEObj( "unknown_8", 2006855, 0, 4, { 245.654495f, -854.500000f, 408.186615f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2006856, 0, 4, { 245.602402f, -854.500000f, 408.203186f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2006857, 0, 4, { 217.570694f, -854.500000f, 414.970306f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_11", 2006867, 0, 4, { 238.696899f, -854.398376f, 400.472900f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2006868, 0, 4, { 225.070404f, -854.520508f, 402.559692f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_13", 2007000, 6217077, 4, { 230.880493f, -854.459717f, 414.889313f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Guardianstatue", 2006976, 0, 4, { 231.118698f, -852.800171f, 414.090088f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Guardianstatue_1", 2006977, 0, 4, { 231.113907f, -852.801514f, 414.085785f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Guardianstatue_2", 2006978, 0, 4, { 231.101898f, -852.801514f, 414.089111f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6159123, 5, { 73.070312f, 100.000000f, -376.644592f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 65.173607f, 100.000000f, -382.604614f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 228.895599f, -854.546082f, 420.274109f }, 0.991760f, -0.919204f ); + instance->registerEObj( "unknown_14", 2006825, 6173434, 4, { -45.716091f, 57.999512f, -311.654205f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_15", 2006826, 6173447, 4, { -174.685303f, 6.271362f, -302.651215f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_16", 2006827, 6173458, 4, { -174.227493f, 6.973328f, -299.721588f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_17", 2006828, 6155704, 4, { -74.714241f, 58.247410f, -327.713287f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_18", 2006829, 6184879, 4, { -170.839996f, -252.613205f, -408.640503f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_19", 2006830, 6184881, 4, { -163.902496f, -272.319397f, -294.726501f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2006831, 6162191, 4, { -243.942093f, -280.660706f, -273.564789f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Stoneoftransference", 2006834, 6173379, 4, { -295.032104f, -273.037506f, -185.082397f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_21", 2006832, 6177949, 4, { 166.001007f, -844.999817f, 265.365814f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_22", 2006833, 6177947, 4, { 226.690002f, -856.247681f, 262.675415f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_23", 2006835, 6202096, 4, { 255.720200f, -865.873474f, 319.853210f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgbg_w_qic_004_03a", 2002872, 6904891, 4, { 236.391205f, -854.348083f, 388.999908f }, + 0.991760f, -0.424392f ); + instance->registerEObj( "unknown_24", 2002735, 0, 4, { 236.928299f, -854.301025f, 388.437988f }, 0.991760f, + -0.272621f ); + instance->registerEObj( "sgbg_w_qic_004_03a_1", 2007457, 6904603, 4, { 249.195099f, -856.351624f, 343.526215f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_25", 2007457, 6217077, 4, { 233.497299f, -854.546021f, 414.179413f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/RaisingtheSword.cpp b/src/servers/Scripts/instances/questbattles/RaisingtheSword.cpp index 61c54417..9fd28249 100644 --- a/src/servers/Scripts/instances/questbattles/RaisingtheSword.cpp +++ b/src/servers/Scripts/instances/questbattles/RaisingtheSword.cpp @@ -1,28 +1,32 @@ #include #include -class RaisingtheSword : public InstanceContentScript +class RaisingtheSword : + public InstanceContentScript { public: - RaisingtheSword() : InstanceContentScript( 5018 ) - { } + RaisingtheSword() : + InstanceContentScript( 5018 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2004364, 0, 4, { -93.101089f, -13.129550f, 6.845694f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Companychest", 2000470, 4255822, 4, { 128.974701f, 5.067919f, -40.913502f }, 1.000000f, -0.343160f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2004364, 0, 4, { -93.101089f, -13.129550f, 6.845694f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Companychest", 2000470, 4255822, 4, { 128.974701f, 5.067919f, -40.913502f }, 1.000000f, + -0.343160f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/ReturnoftheBull.cpp b/src/servers/Scripts/instances/questbattles/ReturnoftheBull.cpp index 91fd7a2d..45ace5b3 100644 --- a/src/servers/Scripts/instances/questbattles/ReturnoftheBull.cpp +++ b/src/servers/Scripts/instances/questbattles/ReturnoftheBull.cpp @@ -1,26 +1,29 @@ #include #include -class ReturnoftheBull : public InstanceContentScript +class ReturnoftheBull : + public InstanceContentScript { public: - ReturnoftheBull() : InstanceContentScript( 5024 ) - { } + ReturnoftheBull() : + InstanceContentScript( 5024 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/TheBattleonBekko.cpp b/src/servers/Scripts/instances/questbattles/TheBattleonBekko.cpp index e11794f2..b7cec9d3 100644 --- a/src/servers/Scripts/instances/questbattles/TheBattleonBekko.cpp +++ b/src/servers/Scripts/instances/questbattles/TheBattleonBekko.cpp @@ -1,26 +1,29 @@ #include #include -class TheBattleonBekko : public InstanceContentScript +class TheBattleonBekko : + public InstanceContentScript { public: - TheBattleonBekko() : InstanceContentScript( 5012 ) - { } + TheBattleonBekko() : + InstanceContentScript( 5012 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/TheCarteneauFlatsHeliodrome.cpp b/src/servers/Scripts/instances/questbattles/TheCarteneauFlatsHeliodrome.cpp index fba35856..a6d30fe7 100644 --- a/src/servers/Scripts/instances/questbattles/TheCarteneauFlatsHeliodrome.cpp +++ b/src/servers/Scripts/instances/questbattles/TheCarteneauFlatsHeliodrome.cpp @@ -1,51 +1,69 @@ #include #include -class TheCarteneauFlatsHeliodrome : public InstanceContentScript +class TheCarteneauFlatsHeliodrome : + public InstanceContentScript { public: - TheCarteneauFlatsHeliodrome() : InstanceContentScript( 5004 ) - { } + TheCarteneauFlatsHeliodrome() : + InstanceContentScript( 5004 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_l1p1_q3_swhu1", 2005078, 5573675, 4, { -150.601807f, -15.195440f, 86.396042f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_1", 2005079, 5573676, 4, { -160.177505f, -15.426880f, 111.877502f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_2", 2005080, 5573677, 4, { -178.133102f, -15.426880f, 85.038406f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_3", 2005081, 5573687, 4, { 147.790497f, -15.205700f, 85.606216f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_4", 2005082, 5573688, 4, { 181.170303f, -15.426880f, 81.284790f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_5", 2005083, 5573689, 4, { 160.730392f, -15.457460f, 117.518303f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_6", 2005084, 5573690, 4, { -0.015320f, -15.426880f, -162.924103f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_7", 2005085, 5573691, 4, { 19.010229f, -15.416970f, -200.015396f }, 1.000000f, 0.000000f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "sgbg_l1p1_q3_swhu1_8", 2005086, 5573692, 4, { -18.994471f, -15.426880f, -199.992905f }, 0.991760f, 0.000048f ); - // States -> magic_go magic_down magic_2down magic_on magic_2on - instance->registerEObj( "unknown_0", 2004187, 4724282, 4, { -0.007111f, 12.000000f, -386.299896f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2004188, 4724284, 4, { 335.025513f, 12.000000f, 193.711899f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2004189, 4724283, 4, { -334.556213f, 12.000000f, 193.274796f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_l1p1_lvd_b0441", 2004202, 4797506, 4, { -0.101569f, 30.000000f, 1.413736f }, 1.000000f, 0.000000f ); - // States -> STAGE_def STAGE_pop_anim - instance->registerEObj( "Magitekreaper", 2007710, 0, 4, { -0.135500f, 28.501801f, 18.021700f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007722, 6642830, 4, { 7.805808f, 29.000000f, 0.239120f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_l1p1_q3_swhu1", 2005078, 5573675, 4, { -150.601807f, -15.195440f, 86.396042f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_1", 2005079, 5573676, 4, { -160.177505f, -15.426880f, 111.877502f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_2", 2005080, 5573677, 4, { -178.133102f, -15.426880f, 85.038406f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_3", 2005081, 5573687, 4, { 147.790497f, -15.205700f, 85.606216f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_4", 2005082, 5573688, 4, { 181.170303f, -15.426880f, 81.284790f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_5", 2005083, 5573689, 4, { 160.730392f, -15.457460f, 117.518303f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_6", 2005084, 5573690, 4, { -0.015320f, -15.426880f, -162.924103f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_7", 2005085, 5573691, 4, { 19.010229f, -15.416970f, -200.015396f }, + 1.000000f, 0.000000f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "sgbg_l1p1_q3_swhu1_8", 2005086, 5573692, 4, { -18.994471f, -15.426880f, -199.992905f }, + 0.991760f, 0.000048f ); + // States -> magic_go magic_down magic_2down magic_on magic_2on + instance->registerEObj( "unknown_0", 2004187, 4724282, 4, { -0.007111f, 12.000000f, -386.299896f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2004188, 4724284, 4, { 335.025513f, 12.000000f, 193.711899f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2004189, 4724283, 4, { -334.556213f, 12.000000f, 193.274796f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_l1p1_lvd_b0441", 2004202, 4797506, 4, { -0.101569f, 30.000000f, 1.413736f }, + 1.000000f, 0.000000f ); + // States -> STAGE_def STAGE_pop_anim + instance->registerEObj( "Magitekreaper", 2007710, 0, 4, { -0.135500f, 28.501801f, 18.021700f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2007722, 6642830, 4, { 7.805808f, 29.000000f, 0.239120f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/TheFaceofTrueEvil.cpp b/src/servers/Scripts/instances/questbattles/TheFaceofTrueEvil.cpp index 84bbd953..399bd529 100644 --- a/src/servers/Scripts/instances/questbattles/TheFaceofTrueEvil.cpp +++ b/src/servers/Scripts/instances/questbattles/TheFaceofTrueEvil.cpp @@ -1,26 +1,29 @@ #include #include -class TheFaceofTrueEvil : public InstanceContentScript +class TheFaceofTrueEvil : + public InstanceContentScript { public: - TheFaceofTrueEvil() : InstanceContentScript( 5010 ) - { } + TheFaceofTrueEvil() : + InstanceContentScript( 5010 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/TheHeartoftheProblem.cpp b/src/servers/Scripts/instances/questbattles/TheHeartoftheProblem.cpp index 8fffbccb..1013210f 100644 --- a/src/servers/Scripts/instances/questbattles/TheHeartoftheProblem.cpp +++ b/src/servers/Scripts/instances/questbattles/TheHeartoftheProblem.cpp @@ -1,26 +1,29 @@ #include #include -class TheHeartoftheProblem : public InstanceContentScript +class TheHeartoftheProblem : + public InstanceContentScript { public: - TheHeartoftheProblem() : InstanceContentScript( 5015 ) - { } + TheHeartoftheProblem() : + InstanceContentScript( 5015 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/TheOrphansandtheBrokenBlade.cpp b/src/servers/Scripts/instances/questbattles/TheOrphansandtheBrokenBlade.cpp index 9d5bc468..d85856ec 100644 --- a/src/servers/Scripts/instances/questbattles/TheOrphansandtheBrokenBlade.cpp +++ b/src/servers/Scripts/instances/questbattles/TheOrphansandtheBrokenBlade.cpp @@ -1,26 +1,29 @@ #include #include -class TheOrphansandtheBrokenBlade : public InstanceContentScript +class TheOrphansandtheBrokenBlade : + public InstanceContentScript { public: - TheOrphansandtheBrokenBlade() : InstanceContentScript( 5019 ) - { } + TheOrphansandtheBrokenBlade() : + InstanceContentScript( 5019 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/TheResonant.cpp b/src/servers/Scripts/instances/questbattles/TheResonant.cpp index 73f90b8c..e17f0ec6 100644 --- a/src/servers/Scripts/instances/questbattles/TheResonant.cpp +++ b/src/servers/Scripts/instances/questbattles/TheResonant.cpp @@ -1,26 +1,29 @@ #include #include -class TheResonant : public InstanceContentScript +class TheResonant : + public InstanceContentScript { public: - TheResonant() : InstanceContentScript( 5017 ) - { } + TheResonant() : + InstanceContentScript( 5017 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/WhenClansCollide.cpp b/src/servers/Scripts/instances/questbattles/WhenClansCollide.cpp index 22d6fdc1..d9feda85 100644 --- a/src/servers/Scripts/instances/questbattles/WhenClansCollide.cpp +++ b/src/servers/Scripts/instances/questbattles/WhenClansCollide.cpp @@ -1,26 +1,29 @@ #include #include -class WhenClansCollide : public InstanceContentScript +class WhenClansCollide : + public InstanceContentScript { public: - WhenClansCollide() : InstanceContentScript( 5022 ) - { } + WhenClansCollide() : + InstanceContentScript( 5022 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/questbattles/WithHeartandSteel.cpp b/src/servers/Scripts/instances/questbattles/WithHeartandSteel.cpp index 5d71e7ff..3d227158 100644 --- a/src/servers/Scripts/instances/questbattles/WithHeartandSteel.cpp +++ b/src/servers/Scripts/instances/questbattles/WithHeartandSteel.cpp @@ -1,26 +1,29 @@ #include #include -class WithHeartandSteel : public InstanceContentScript +class WithHeartandSteel : + public InstanceContentScript { public: - WithHeartandSteel() : InstanceContentScript( 5007 ) - { } + WithHeartandSteel() : + InstanceContentScript( 5007 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheArmoftheFather.cpp b/src/servers/Scripts/instances/raids/AlexanderTheArmoftheFather.cpp index 73793d1a..25f9416d 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheArmoftheFather.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheArmoftheFather.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheArmoftheFather : public InstanceContentScript +class AlexanderTheArmoftheFather : + public InstanceContentScript { public: - AlexanderTheArmoftheFather() : InstanceContentScript( 30023 ) - { } + AlexanderTheArmoftheFather() : + InstanceContentScript( 30023 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheArmoftheFatherSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheArmoftheFatherSavage.cpp index 8c6ac0e3..ca6dd6ab 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheArmoftheFatherSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheArmoftheFatherSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheArmoftheFatherSavage : public InstanceContentScript +class AlexanderTheArmoftheFatherSavage : + public InstanceContentScript { public: - AlexanderTheArmoftheFatherSavage() : InstanceContentScript( 30027 ) - { } + AlexanderTheArmoftheFatherSavage() : + InstanceContentScript( 30027 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheArmoftheSon.cpp b/src/servers/Scripts/instances/raids/AlexanderTheArmoftheSon.cpp index 48920e20..5569847c 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheArmoftheSon.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheArmoftheSon.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheArmoftheSon : public InstanceContentScript +class AlexanderTheArmoftheSon : + public InstanceContentScript { public: - AlexanderTheArmoftheSon() : InstanceContentScript( 30032 ) - { } + AlexanderTheArmoftheSon() : + InstanceContentScript( 30032 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheArmoftheSonSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheArmoftheSonSavage.cpp index fa9848bc..71571c9d 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheArmoftheSonSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheArmoftheSonSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheArmoftheSonSavage : public InstanceContentScript +class AlexanderTheArmoftheSonSavage : + public InstanceContentScript { public: - AlexanderTheArmoftheSonSavage() : InstanceContentScript( 30036 ) - { } + AlexanderTheArmoftheSonSavage() : + InstanceContentScript( 30036 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheBreathoftheCreator.cpp b/src/servers/Scripts/instances/raids/AlexanderTheBreathoftheCreator.cpp index 8929deaa..78db0df9 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheBreathoftheCreator.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheBreathoftheCreator.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheBreathoftheCreator : public InstanceContentScript +class AlexanderTheBreathoftheCreator : + public InstanceContentScript { public: - AlexanderTheBreathoftheCreator() : InstanceContentScript( 30040 ) - { } + AlexanderTheBreathoftheCreator() : + InstanceContentScript( 30040 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheBreathoftheCreatorSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheBreathoftheCreatorSavage.cpp index 861e32de..ecd88e6f 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheBreathoftheCreatorSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheBreathoftheCreatorSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheBreathoftheCreatorSavage : public InstanceContentScript +class AlexanderTheBreathoftheCreatorSavage : + public InstanceContentScript { public: - AlexanderTheBreathoftheCreatorSavage() : InstanceContentScript( 30044 ) - { } + AlexanderTheBreathoftheCreatorSavage() : + InstanceContentScript( 30044 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheFather.cpp b/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheFather.cpp index 18c59d56..dd8315cd 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheFather.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheFather.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheBurdenoftheFather : public InstanceContentScript +class AlexanderTheBurdenoftheFather : + public InstanceContentScript { public: - AlexanderTheBurdenoftheFather() : InstanceContentScript( 30024 ) - { } + AlexanderTheBurdenoftheFather() : + InstanceContentScript( 30024 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheFatherSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheFatherSavage.cpp index a4b16086..05b57379 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheFatherSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheFatherSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheBurdenoftheFatherSavage : public InstanceContentScript +class AlexanderTheBurdenoftheFatherSavage : + public InstanceContentScript { public: - AlexanderTheBurdenoftheFatherSavage() : InstanceContentScript( 30028 ) - { } + AlexanderTheBurdenoftheFatherSavage() : + InstanceContentScript( 30028 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheSon.cpp b/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheSon.cpp index bdb5d5fd..bdfabc6f 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheSon.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheSon.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheBurdenoftheSon : public InstanceContentScript +class AlexanderTheBurdenoftheSon : + public InstanceContentScript { public: - AlexanderTheBurdenoftheSon() : InstanceContentScript( 30033 ) - { } + AlexanderTheBurdenoftheSon() : + InstanceContentScript( 30033 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheSonSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheSonSavage.cpp index 72c5a708..e19a95c8 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheSonSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheBurdenoftheSonSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheBurdenoftheSonSavage : public InstanceContentScript +class AlexanderTheBurdenoftheSonSavage : + public InstanceContentScript { public: - AlexanderTheBurdenoftheSonSavage() : InstanceContentScript( 30037 ) - { } + AlexanderTheBurdenoftheSonSavage() : + InstanceContentScript( 30037 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheFather.cpp b/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheFather.cpp index 32d6908c..d0fca8dd 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheFather.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheFather.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheCuffoftheFather : public InstanceContentScript +class AlexanderTheCuffoftheFather : + public InstanceContentScript { public: - AlexanderTheCuffoftheFather() : InstanceContentScript( 30022 ) - { } + AlexanderTheCuffoftheFather() : + InstanceContentScript( 30022 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheFatherSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheFatherSavage.cpp index ff04aa9e..519d6970 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheFatherSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheFatherSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheCuffoftheFatherSavage : public InstanceContentScript +class AlexanderTheCuffoftheFatherSavage : + public InstanceContentScript { public: - AlexanderTheCuffoftheFatherSavage() : InstanceContentScript( 30026 ) - { } + AlexanderTheCuffoftheFatherSavage() : + InstanceContentScript( 30026 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheSon.cpp b/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheSon.cpp index 96fd9198..0651488e 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheSon.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheSon.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheCuffoftheSon : public InstanceContentScript +class AlexanderTheCuffoftheSon : + public InstanceContentScript { public: - AlexanderTheCuffoftheSon() : InstanceContentScript( 30031 ) - { } + AlexanderTheCuffoftheSon() : + InstanceContentScript( 30031 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheSonSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheSonSavage.cpp index 43e3af7b..11ecab11 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheSonSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheCuffoftheSonSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheCuffoftheSonSavage : public InstanceContentScript +class AlexanderTheCuffoftheSonSavage : + public InstanceContentScript { public: - AlexanderTheCuffoftheSonSavage() : InstanceContentScript( 30035 ) - { } + AlexanderTheCuffoftheSonSavage() : + InstanceContentScript( 30035 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheEyesoftheCreator.cpp b/src/servers/Scripts/instances/raids/AlexanderTheEyesoftheCreator.cpp index 5d9681ff..e658ffe7 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheEyesoftheCreator.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheEyesoftheCreator.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheEyesoftheCreator : public InstanceContentScript +class AlexanderTheEyesoftheCreator : + public InstanceContentScript { public: - AlexanderTheEyesoftheCreator() : InstanceContentScript( 30039 ) - { } + AlexanderTheEyesoftheCreator() : + InstanceContentScript( 30039 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheEyesoftheCreatorSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheEyesoftheCreatorSavage.cpp index b5ad4d84..6d29ed1f 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheEyesoftheCreatorSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheEyesoftheCreatorSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheEyesoftheCreatorSavage : public InstanceContentScript +class AlexanderTheEyesoftheCreatorSavage : + public InstanceContentScript { public: - AlexanderTheEyesoftheCreatorSavage() : InstanceContentScript( 30043 ) - { } + AlexanderTheEyesoftheCreatorSavage() : + InstanceContentScript( 30043 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheFistoftheFather.cpp b/src/servers/Scripts/instances/raids/AlexanderTheFistoftheFather.cpp index a44545eb..b1f17518 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheFistoftheFather.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheFistoftheFather.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheFistoftheFather : public InstanceContentScript +class AlexanderTheFistoftheFather : + public InstanceContentScript { public: - AlexanderTheFistoftheFather() : InstanceContentScript( 30021 ) - { } + AlexanderTheFistoftheFather() : + InstanceContentScript( 30021 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheFistoftheFatherSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheFistoftheFatherSavage.cpp index 657c0d38..ee5a214f 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheFistoftheFatherSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheFistoftheFatherSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheFistoftheFatherSavage : public InstanceContentScript +class AlexanderTheFistoftheFatherSavage : + public InstanceContentScript { public: - AlexanderTheFistoftheFatherSavage() : InstanceContentScript( 30025 ) - { } + AlexanderTheFistoftheFatherSavage() : + InstanceContentScript( 30025 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheFistoftheSon.cpp b/src/servers/Scripts/instances/raids/AlexanderTheFistoftheSon.cpp index 8584cde4..fae14861 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheFistoftheSon.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheFistoftheSon.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheFistoftheSon : public InstanceContentScript +class AlexanderTheFistoftheSon : + public InstanceContentScript { public: - AlexanderTheFistoftheSon() : InstanceContentScript( 30030 ) - { } + AlexanderTheFistoftheSon() : + InstanceContentScript( 30030 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheFistoftheSonSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheFistoftheSonSavage.cpp index f91d4591..a0c3ea5d 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheFistoftheSonSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheFistoftheSonSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheFistoftheSonSavage : public InstanceContentScript +class AlexanderTheFistoftheSonSavage : + public InstanceContentScript { public: - AlexanderTheFistoftheSonSavage() : InstanceContentScript( 30034 ) - { } + AlexanderTheFistoftheSonSavage() : + InstanceContentScript( 30034 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheHeartoftheCreator.cpp b/src/servers/Scripts/instances/raids/AlexanderTheHeartoftheCreator.cpp index 5e835c50..cf10c286 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheHeartoftheCreator.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheHeartoftheCreator.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheHeartoftheCreator : public InstanceContentScript +class AlexanderTheHeartoftheCreator : + public InstanceContentScript { public: - AlexanderTheHeartoftheCreator() : InstanceContentScript( 30041 ) - { } + AlexanderTheHeartoftheCreator() : + InstanceContentScript( 30041 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheHeartoftheCreatorSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheHeartoftheCreatorSavage.cpp index fdbc11b8..3cd0816a 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheHeartoftheCreatorSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheHeartoftheCreatorSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheHeartoftheCreatorSavage : public InstanceContentScript +class AlexanderTheHeartoftheCreatorSavage : + public InstanceContentScript { public: - AlexanderTheHeartoftheCreatorSavage() : InstanceContentScript( 30045 ) - { } + AlexanderTheHeartoftheCreatorSavage() : + InstanceContentScript( 30045 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheSouloftheCreator.cpp b/src/servers/Scripts/instances/raids/AlexanderTheSouloftheCreator.cpp index 5c258c4f..325083f6 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheSouloftheCreator.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheSouloftheCreator.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheSouloftheCreator : public InstanceContentScript +class AlexanderTheSouloftheCreator : + public InstanceContentScript { public: - AlexanderTheSouloftheCreator() : InstanceContentScript( 30042 ) - { } + AlexanderTheSouloftheCreator() : + InstanceContentScript( 30042 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/AlexanderTheSouloftheCreatorSavage.cpp b/src/servers/Scripts/instances/raids/AlexanderTheSouloftheCreatorSavage.cpp index b3eb20bd..a16e2253 100644 --- a/src/servers/Scripts/instances/raids/AlexanderTheSouloftheCreatorSavage.cpp +++ b/src/servers/Scripts/instances/raids/AlexanderTheSouloftheCreatorSavage.cpp @@ -1,26 +1,29 @@ #include #include -class AlexanderTheSouloftheCreatorSavage : public InstanceContentScript +class AlexanderTheSouloftheCreatorSavage : + public InstanceContentScript { public: - AlexanderTheSouloftheCreatorSavage() : InstanceContentScript( 30046 ) - { } + AlexanderTheSouloftheCreatorSavage() : + InstanceContentScript( 30046 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/DeltascapeV10.cpp b/src/servers/Scripts/instances/raids/DeltascapeV10.cpp index 7c33ed24..1ffee190 100644 --- a/src/servers/Scripts/instances/raids/DeltascapeV10.cpp +++ b/src/servers/Scripts/instances/raids/DeltascapeV10.cpp @@ -1,26 +1,29 @@ #include #include -class DeltascapeV10 : public InstanceContentScript +class DeltascapeV10 : + public InstanceContentScript { public: - DeltascapeV10() : InstanceContentScript( 30049 ) - { } + DeltascapeV10() : + InstanceContentScript( 30049 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/DeltascapeV10Savage.cpp b/src/servers/Scripts/instances/raids/DeltascapeV10Savage.cpp index 7888e7ae..c17d9a87 100644 --- a/src/servers/Scripts/instances/raids/DeltascapeV10Savage.cpp +++ b/src/servers/Scripts/instances/raids/DeltascapeV10Savage.cpp @@ -1,26 +1,29 @@ #include #include -class DeltascapeV10Savage : public InstanceContentScript +class DeltascapeV10Savage : + public InstanceContentScript { public: - DeltascapeV10Savage() : InstanceContentScript( 30053 ) - { } + DeltascapeV10Savage() : + InstanceContentScript( 30053 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/DeltascapeV20.cpp b/src/servers/Scripts/instances/raids/DeltascapeV20.cpp index 879ff9ff..8098d0b8 100644 --- a/src/servers/Scripts/instances/raids/DeltascapeV20.cpp +++ b/src/servers/Scripts/instances/raids/DeltascapeV20.cpp @@ -1,26 +1,29 @@ #include #include -class DeltascapeV20 : public InstanceContentScript +class DeltascapeV20 : + public InstanceContentScript { public: - DeltascapeV20() : InstanceContentScript( 30050 ) - { } + DeltascapeV20() : + InstanceContentScript( 30050 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/DeltascapeV20Savage.cpp b/src/servers/Scripts/instances/raids/DeltascapeV20Savage.cpp index 7c8a4cdc..2ad50735 100644 --- a/src/servers/Scripts/instances/raids/DeltascapeV20Savage.cpp +++ b/src/servers/Scripts/instances/raids/DeltascapeV20Savage.cpp @@ -1,26 +1,29 @@ #include #include -class DeltascapeV20Savage : public InstanceContentScript +class DeltascapeV20Savage : + public InstanceContentScript { public: - DeltascapeV20Savage() : InstanceContentScript( 30054 ) - { } + DeltascapeV20Savage() : + InstanceContentScript( 30054 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/DeltascapeV30.cpp b/src/servers/Scripts/instances/raids/DeltascapeV30.cpp index 8845ac5e..b38cccc4 100644 --- a/src/servers/Scripts/instances/raids/DeltascapeV30.cpp +++ b/src/servers/Scripts/instances/raids/DeltascapeV30.cpp @@ -1,26 +1,29 @@ #include #include -class DeltascapeV30 : public InstanceContentScript +class DeltascapeV30 : + public InstanceContentScript { public: - DeltascapeV30() : InstanceContentScript( 30051 ) - { } + DeltascapeV30() : + InstanceContentScript( 30051 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/DeltascapeV30Savage.cpp b/src/servers/Scripts/instances/raids/DeltascapeV30Savage.cpp index 18f3296c..bac1dbe6 100644 --- a/src/servers/Scripts/instances/raids/DeltascapeV30Savage.cpp +++ b/src/servers/Scripts/instances/raids/DeltascapeV30Savage.cpp @@ -1,26 +1,29 @@ #include #include -class DeltascapeV30Savage : public InstanceContentScript +class DeltascapeV30Savage : + public InstanceContentScript { public: - DeltascapeV30Savage() : InstanceContentScript( 30055 ) - { } + DeltascapeV30Savage() : + InstanceContentScript( 30055 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/DeltascapeV40.cpp b/src/servers/Scripts/instances/raids/DeltascapeV40.cpp index 1197532f..ca29cf35 100644 --- a/src/servers/Scripts/instances/raids/DeltascapeV40.cpp +++ b/src/servers/Scripts/instances/raids/DeltascapeV40.cpp @@ -1,26 +1,29 @@ #include #include -class DeltascapeV40 : public InstanceContentScript +class DeltascapeV40 : + public InstanceContentScript { public: - DeltascapeV40() : InstanceContentScript( 30052 ) - { } + DeltascapeV40() : + InstanceContentScript( 30052 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/DeltascapeV40Savage.cpp b/src/servers/Scripts/instances/raids/DeltascapeV40Savage.cpp index 7734552d..a839a324 100644 --- a/src/servers/Scripts/instances/raids/DeltascapeV40Savage.cpp +++ b/src/servers/Scripts/instances/raids/DeltascapeV40Savage.cpp @@ -1,26 +1,29 @@ #include #include -class DeltascapeV40Savage : public InstanceContentScript +class DeltascapeV40Savage : + public InstanceContentScript { public: - DeltascapeV40Savage() : InstanceContentScript( 30056 ) - { } + DeltascapeV40Savage() : + InstanceContentScript( 30056 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/DunScaith.cpp b/src/servers/Scripts/instances/raids/DunScaith.cpp index f9509059..49b1b1a0 100644 --- a/src/servers/Scripts/instances/raids/DunScaith.cpp +++ b/src/servers/Scripts/instances/raids/DunScaith.cpp @@ -1,26 +1,29 @@ #include #include -class DunScaith : public InstanceContentScript +class DunScaith : + public InstanceContentScript { public: - DunScaith() : InstanceContentScript( 30047 ) - { } + DunScaith() : + InstanceContentScript( 30047 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/SigmascapeV10.cpp b/src/servers/Scripts/instances/raids/SigmascapeV10.cpp index 7f9c094e..148c283b 100644 --- a/src/servers/Scripts/instances/raids/SigmascapeV10.cpp +++ b/src/servers/Scripts/instances/raids/SigmascapeV10.cpp @@ -1,26 +1,29 @@ #include #include -class SigmascapeV10 : public InstanceContentScript +class SigmascapeV10 : + public InstanceContentScript { public: - SigmascapeV10() : InstanceContentScript( 30059 ) - { } + SigmascapeV10() : + InstanceContentScript( 30059 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/SigmascapeV10Savage.cpp b/src/servers/Scripts/instances/raids/SigmascapeV10Savage.cpp index ca8d30db..f04564ce 100644 --- a/src/servers/Scripts/instances/raids/SigmascapeV10Savage.cpp +++ b/src/servers/Scripts/instances/raids/SigmascapeV10Savage.cpp @@ -1,26 +1,29 @@ #include #include -class SigmascapeV10Savage : public InstanceContentScript +class SigmascapeV10Savage : + public InstanceContentScript { public: - SigmascapeV10Savage() : InstanceContentScript( 30063 ) - { } + SigmascapeV10Savage() : + InstanceContentScript( 30063 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/SigmascapeV20.cpp b/src/servers/Scripts/instances/raids/SigmascapeV20.cpp index b7602c00..e9f7899e 100644 --- a/src/servers/Scripts/instances/raids/SigmascapeV20.cpp +++ b/src/servers/Scripts/instances/raids/SigmascapeV20.cpp @@ -1,26 +1,29 @@ #include #include -class SigmascapeV20 : public InstanceContentScript +class SigmascapeV20 : + public InstanceContentScript { public: - SigmascapeV20() : InstanceContentScript( 30060 ) - { } + SigmascapeV20() : + InstanceContentScript( 30060 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/SigmascapeV20Savage.cpp b/src/servers/Scripts/instances/raids/SigmascapeV20Savage.cpp index 2e0b6056..d976f853 100644 --- a/src/servers/Scripts/instances/raids/SigmascapeV20Savage.cpp +++ b/src/servers/Scripts/instances/raids/SigmascapeV20Savage.cpp @@ -1,26 +1,29 @@ #include #include -class SigmascapeV20Savage : public InstanceContentScript +class SigmascapeV20Savage : + public InstanceContentScript { public: - SigmascapeV20Savage() : InstanceContentScript( 30064 ) - { } + SigmascapeV20Savage() : + InstanceContentScript( 30064 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/SigmascapeV30.cpp b/src/servers/Scripts/instances/raids/SigmascapeV30.cpp index 6086671e..3a497bcc 100644 --- a/src/servers/Scripts/instances/raids/SigmascapeV30.cpp +++ b/src/servers/Scripts/instances/raids/SigmascapeV30.cpp @@ -1,26 +1,29 @@ #include #include -class SigmascapeV30 : public InstanceContentScript +class SigmascapeV30 : + public InstanceContentScript { public: - SigmascapeV30() : InstanceContentScript( 30061 ) - { } + SigmascapeV30() : + InstanceContentScript( 30061 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/SigmascapeV30Savage.cpp b/src/servers/Scripts/instances/raids/SigmascapeV30Savage.cpp index e69fbe70..2ac3604a 100644 --- a/src/servers/Scripts/instances/raids/SigmascapeV30Savage.cpp +++ b/src/servers/Scripts/instances/raids/SigmascapeV30Savage.cpp @@ -1,26 +1,29 @@ #include #include -class SigmascapeV30Savage : public InstanceContentScript +class SigmascapeV30Savage : + public InstanceContentScript { public: - SigmascapeV30Savage() : InstanceContentScript( 30065 ) - { } + SigmascapeV30Savage() : + InstanceContentScript( 30065 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/SigmascapeV40.cpp b/src/servers/Scripts/instances/raids/SigmascapeV40.cpp index 0580cadb..2fbb3989 100644 --- a/src/servers/Scripts/instances/raids/SigmascapeV40.cpp +++ b/src/servers/Scripts/instances/raids/SigmascapeV40.cpp @@ -1,26 +1,29 @@ #include #include -class SigmascapeV40 : public InstanceContentScript +class SigmascapeV40 : + public InstanceContentScript { public: - SigmascapeV40() : InstanceContentScript( 30062 ) - { } + SigmascapeV40() : + InstanceContentScript( 30062 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/SigmascapeV40Savage.cpp b/src/servers/Scripts/instances/raids/SigmascapeV40Savage.cpp index 1aed3d19..200c05ec 100644 --- a/src/servers/Scripts/instances/raids/SigmascapeV40Savage.cpp +++ b/src/servers/Scripts/instances/raids/SigmascapeV40Savage.cpp @@ -1,26 +1,29 @@ #include #include -class SigmascapeV40Savage : public InstanceContentScript +class SigmascapeV40Savage : + public InstanceContentScript { public: - SigmascapeV40Savage() : InstanceContentScript( 30066 ) - { } + SigmascapeV40Savage() : + InstanceContentScript( 30066 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/SyrcusTower.cpp b/src/servers/Scripts/instances/raids/SyrcusTower.cpp index 9209a3b7..788b9d14 100644 --- a/src/servers/Scripts/instances/raids/SyrcusTower.cpp +++ b/src/servers/Scripts/instances/raids/SyrcusTower.cpp @@ -1,94 +1,148 @@ #include #include -class SyrcusTower : public InstanceContentScript +class SyrcusTower : + public InstanceContentScript { public: - SyrcusTower() : InstanceContentScript( 30011 ) - { } + SyrcusTower() : + InstanceContentScript( 30011 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002587, 0, 4, { -370.000000f, 500.115387f, -199.956299f }, 0.700000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0250", 2002872, 4738783, 4, { -394.730194f, 500.000000f, -199.572800f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -415.668213f, 500.000000f, -200.003296f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_l1r2_d2_mete2", 2004244, 4757482, 4, { -390.384705f, 500.000000f, -194.533203f }, 1.000000f, 0.000000f ); - // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout - instance->registerEObj( "sgbg_l1r2_d2_mete2_1", 2004292, 4757483, 4, { -401.338287f, 500.000000f, -196.787003f }, 1.000000f, 0.000000f ); - // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout - instance->registerEObj( "sgbg_l1r2_d2_mete2_2", 2004293, 4757484, 4, { -403.504913f, 500.000000f, -196.539597f }, 1.000000f, 0.000000f ); - // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout - instance->registerEObj( "sgbg_l1r2_d2_mete2_3", 2004294, 4757485, 4, { -405.170593f, 500.000000f, -202.118393f }, 1.000000f, 0.000000f ); - // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout - instance->registerEObj( "sgbg_l1r2_d2_mete2_4", 2004295, 4757486, 4, { -400.173798f, 500.000000f, -200.892807f }, 1.000000f, 0.000000f ); - // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout - instance->registerEObj( "sgbg_l1r2_d2_mete2_5", 2004296, 4757487, 4, { -395.280304f, 500.000000f, -200.854401f }, 1.000000f, 0.000000f ); - // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout - instance->registerEObj( "sgbg_l1r2_d2_mete1", 2004243, 4757498, 4, { -400.242615f, 500.000000f, -197.116501f }, 1.000000f, 0.000000f ); - // States -> b4_mete_off_01 b4_mete_off_02 b4_mete_on_01 b4_mete_off_03 b4_mete_on_02 b4_mete_on_03 b4_mete_on_04 b4_mete_on_05 b4_mete_on_06 b4_mete_fdout - instance->registerEObj( "unknown_1", 2004354, 0, 4, { -397.029785f, 500.000000f, -196.979202f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2004355, 0, 4, { -459.071411f, 506.001801f, -196.468506f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2004236, 4759659, 4, { -1.397732f, -589.900085f, -194.801498f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2004237, 0, 4, { 2.182007f, -589.929077f, -198.077499f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2002587, 0, 4, { -0.015320f, -590.000000f, -152.513794f }, 0.686646f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0250_1", 2002872, 4725495, 4, { 0.228821f, -590.000000f, -174.995300f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_6", 2002587, 0, 4, { -0.883440f, -4.000000f, -141.001801f }, 0.700000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0250_2", 2002872, 4738653, 4, { -0.991882f, 0.000000f, -196.720993f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2004245, 4711823, 4, { -0.379705f, 0.000000f, -145.342300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2004246, 4711824, 4, { 0.710614f, 0.000000f, -199.171204f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2004247, 4711825, 4, { 0.439319f, 0.000001f, -201.553802f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2004248, 4711828, 4, { 0.202690f, 0.000000f, -199.270599f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2004250, 4867789, 4, { -0.142451f, -0.000001f, -199.916000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2004251, 4771487, 4, { 6.207808f, 0.025001f, -197.716293f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2004252, 4771488, 4, { 0.912855f, 0.000000f, -200.229401f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2004253, 4771264, 4, { -0.249095f, 0.000000f, -200.632095f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2004540, 0, 4, { 2.310606f, 0.000000f, -199.315903f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2002587, 0, 4, { 16.500000f, 600.000000f, -175.000000f }, 0.700000f, -0.584685f ); - instance->registerEObj( "sgvf_w_lvd_b0250_3", 2002872, 4738751, 4, { 6.038667f, 600.000000f, -191.625595f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_17", 2004249, 0, 4, { 0.534058f, 600.000000f, -204.089493f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_18", 2004372, 0, 4, { 2.491530f, 600.000000f, -197.343201f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2004498, 0, 4, { 7.797371f, 600.000000f, -197.855301f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2002587, 0, 4, { 0.000000f, -700.000000f, 79.955803f }, 0.700000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0250_4", 2002872, 4725557, 4, { -0.328611f, -700.000000f, 53.732899f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_21", 2002587, 0, 4, { 29.805300f, -400.000000f, -200.000000f }, 0.700000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0250_5", 2002872, 4725580, 4, { 5.249963f, -400.000000f, -199.878006f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_22", 2002587, 0, 4, { 0.000000f, 200.000000f, -229.757797f }, 0.700000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0250_6", 2002872, 4738682, 4, { 0.542766f, 199.899994f, -231.713898f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Entrance", 2000182, 4723157, 5, { -0.325782f, -897.940918f, 371.584106f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Allaganteleporter", 2004154, 4645409, 4, { -5.014030f, -894.781982f, 324.891296f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Allaganteleporter_1", 2004155, 4645410, 4, { 8.084772f, -708.339111f, 175.045898f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Allaganteleporter_2", 2004158, 4645412, 4, { 7.971835f, -598.362915f, -76.990211f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Allaganteleporter_3", 2004156, 4652344, 4, { 72.370857f, -402.456696f, -206.931000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Allaganteleporter_4", 2004159, 4645415, 4, { -6.906353f, -2.365848f, -126.353897f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Allaganteleporter_5", 2004157, 4645417, 4, { -6.845924f, 197.827805f, -274.836700f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Allaganteleporter_6", 2004160, 4651219, 4, { 29.220949f, 599.725220f, -140.581406f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Allaganteleporter_7", 2004161, 4636419, 4, { -317.290192f, 500.821808f, -189.288193f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_23", 2004164, 4738634, 4, { 0.448093f, -700.000000f, 104.558601f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_24", 2004173, 4720323, 4, { 0.019809f, -590.000000f, -150.897903f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_25", 2004167, 4711138, 4, { 44.295219f, -403.598602f, -199.389694f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_26", 2004176, 4710992, 4, { 0.045776f, 0.000000f, -180.284607f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_27", 2004170, 4710494, 4, { 0.449279f, 196.100006f, -262.072296f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_28", 2004179, 4742340, 4, { 28.708071f, 598.000183f, -156.658600f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002587, 0, 4, { -370.000000f, 500.115387f, -199.956299f }, 0.700000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0250", 2002872, 4738783, 4, { -394.730194f, 500.000000f, -199.572800f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -415.668213f, 500.000000f, -200.003296f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_l1r2_d2_mete2", 2004244, 4757482, 4, { -390.384705f, 500.000000f, -194.533203f }, + 1.000000f, 0.000000f ); + // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout + instance->registerEObj( "sgbg_l1r2_d2_mete2_1", 2004292, 4757483, 4, { -401.338287f, 500.000000f, -196.787003f }, + 1.000000f, 0.000000f ); + // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout + instance->registerEObj( "sgbg_l1r2_d2_mete2_2", 2004293, 4757484, 4, { -403.504913f, 500.000000f, -196.539597f }, + 1.000000f, 0.000000f ); + // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout + instance->registerEObj( "sgbg_l1r2_d2_mete2_3", 2004294, 4757485, 4, { -405.170593f, 500.000000f, -202.118393f }, + 1.000000f, 0.000000f ); + // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout + instance->registerEObj( "sgbg_l1r2_d2_mete2_4", 2004295, 4757486, 4, { -400.173798f, 500.000000f, -200.892807f }, + 1.000000f, 0.000000f ); + // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout + instance->registerEObj( "sgbg_l1r2_d2_mete2_5", 2004296, 4757487, 4, { -395.280304f, 500.000000f, -200.854401f }, + 1.000000f, 0.000000f ); + // States -> b4_come_off_01 b4_come_off_02 b4_come_on_01 b4_come_off_03 b4_come_on_02 b4_come_on_03 b4_come_on_04 b4_come_on_05 b4_come_on_06 b4_come_fdout + instance->registerEObj( "sgbg_l1r2_d2_mete1", 2004243, 4757498, 4, { -400.242615f, 500.000000f, -197.116501f }, + 1.000000f, 0.000000f ); + // States -> b4_mete_off_01 b4_mete_off_02 b4_mete_on_01 b4_mete_off_03 b4_mete_on_02 b4_mete_on_03 b4_mete_on_04 b4_mete_on_05 b4_mete_on_06 b4_mete_fdout + instance->registerEObj( "unknown_1", 2004354, 0, 4, { -397.029785f, 500.000000f, -196.979202f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2004355, 0, 4, { -459.071411f, 506.001801f, -196.468506f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2004236, 4759659, 4, { -1.397732f, -589.900085f, -194.801498f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2004237, 0, 4, { 2.182007f, -589.929077f, -198.077499f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2002587, 0, 4, { -0.015320f, -590.000000f, -152.513794f }, 0.686646f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0250_1", 2002872, 4725495, 4, { 0.228821f, -590.000000f, -174.995300f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_6", 2002587, 0, 4, { -0.883440f, -4.000000f, -141.001801f }, 0.700000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0250_2", 2002872, 4738653, 4, { -0.991882f, 0.000000f, -196.720993f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2004245, 4711823, 4, { -0.379705f, 0.000000f, -145.342300f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2004246, 4711824, 4, { 0.710614f, 0.000000f, -199.171204f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2004247, 4711825, 4, { 0.439319f, 0.000001f, -201.553802f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2004248, 4711828, 4, { 0.202690f, 0.000000f, -199.270599f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2004250, 4867789, 4, { -0.142451f, -0.000001f, -199.916000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2004251, 4771487, 4, { 6.207808f, 0.025001f, -197.716293f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2004252, 4771488, 4, { 0.912855f, 0.000000f, -200.229401f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2004253, 4771264, 4, { -0.249095f, 0.000000f, -200.632095f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2004540, 0, 4, { 2.310606f, 0.000000f, -199.315903f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_16", 2002587, 0, 4, { 16.500000f, 600.000000f, -175.000000f }, 0.700000f, + -0.584685f ); + instance->registerEObj( "sgvf_w_lvd_b0250_3", 2002872, 4738751, 4, { 6.038667f, 600.000000f, -191.625595f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_17", 2004249, 0, 4, { 0.534058f, 600.000000f, -204.089493f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_18", 2004372, 0, 4, { 2.491530f, 600.000000f, -197.343201f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2004498, 0, 4, { 7.797371f, 600.000000f, -197.855301f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2002587, 0, 4, { 0.000000f, -700.000000f, 79.955803f }, 0.700000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0250_4", 2002872, 4725557, 4, { -0.328611f, -700.000000f, 53.732899f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_21", 2002587, 0, 4, { 29.805300f, -400.000000f, -200.000000f }, 0.700000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0250_5", 2002872, 4725580, 4, { 5.249963f, -400.000000f, -199.878006f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_22", 2002587, 0, 4, { 0.000000f, 200.000000f, -229.757797f }, 0.700000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0250_6", 2002872, 4738682, 4, { 0.542766f, 199.899994f, -231.713898f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Entrance", 2000182, 4723157, 5, { -0.325782f, -897.940918f, 371.584106f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Allaganteleporter", 2004154, 4645409, 4, { -5.014030f, -894.781982f, 324.891296f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Allaganteleporter_1", 2004155, 4645410, 4, { 8.084772f, -708.339111f, 175.045898f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Allaganteleporter_2", 2004158, 4645412, 4, { 7.971835f, -598.362915f, -76.990211f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Allaganteleporter_3", 2004156, 4652344, 4, { 72.370857f, -402.456696f, -206.931000f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Allaganteleporter_4", 2004159, 4645415, 4, { -6.906353f, -2.365848f, -126.353897f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Allaganteleporter_5", 2004157, 4645417, 4, { -6.845924f, 197.827805f, -274.836700f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Allaganteleporter_6", 2004160, 4651219, 4, { 29.220949f, 599.725220f, -140.581406f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Allaganteleporter_7", 2004161, 4636419, 4, { -317.290192f, 500.821808f, -189.288193f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_23", 2004164, 4738634, 4, { 0.448093f, -700.000000f, 104.558601f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_24", 2004173, 4720323, 4, { 0.019809f, -590.000000f, -150.897903f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_25", 2004167, 4711138, 4, { 44.295219f, -403.598602f, -199.389694f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_26", 2004176, 4710992, 4, { 0.045776f, 0.000000f, -180.284607f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_27", 2004170, 4710494, 4, { 0.449279f, 196.100006f, -262.072296f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_28", 2004179, 4742340, 4, { 28.708071f, 598.000183f, -156.658600f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn1.cpp b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn1.cpp index f00c9001..c862527d 100644 --- a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn1.cpp +++ b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn1.cpp @@ -1,63 +1,96 @@ #include #include -class TheBindingCoilofBahamutTurn1 : public InstanceContentScript +class TheBindingCoilofBahamutTurn1 : + public InstanceContentScript { public: - TheBindingCoilofBahamutTurn1() : InstanceContentScript( 30002 ) - { } + TheBindingCoilofBahamutTurn1() : + InstanceContentScript( 30002 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0118", 2000620, 4293369, 4, { -1.810616f, 13.164380f, 57.682442f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094", 2000619, 4293368, 4, { -3.276026f, 13.164380f, 57.488449f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "unknown_0", 2000680, 0, 4, { 0.000000f, 5.245687f, 4.314113f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1b1_bosswall", 2000620, 4293633, 4, { 8.673634f, 4.398203f, -361.720886f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0249", 2000619, 4293632, 4, { 7.539745f, 4.948945f, -366.654388f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "unknown_1", 2001137, 0, 4, { -8.048342f, 1.700000f, -412.088593f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2001696, 0, 4, { -23.791620f, 1.300000f, -414.239990f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -45.330261f, 25.136589f, 134.093399f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1b1_door_col", 2000486, 4374535, 4, { -5.435945f, 12.209330f, 0.953091f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2000746, 4312523, 4, { 57.321320f, 2.000001f, -254.168396f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2000746, 4312527, 4, { 36.303661f, 2.815034f, -341.235992f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganterminal", 2001154, 4083745, 4, { -38.633110f, 0.899952f, -414.162201f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2001167, 4329693, 4, { -50.832001f, 59.871399f, -332.417511f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1b1_lightwall", 2002712, 4374479, 4, { 52.174641f, 2.740428f, -248.752899f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_s1b1_lightwall_1", 2002712, 4374482, 4, { 44.598309f, 1.549361f, -340.584991f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1r1_bossplusfloor", 2001152, 4374713, 4, { -4.591531f, 4.500000f, -379.052795f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1r1_bossplusfloor_1", 2001152, 4374714, 4, { -47.199150f, 4.900000f, -430.581299f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_f1r1_bossplusfloor_2", 2001152, 4374715, 4, { -12.391370f, -0.160584f, -378.187805f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_f1r1_bossplusfloor_3", 2001152, 4374749, 4, { -12.091370f, -0.160584f, -376.087799f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_6", 2000681, 4312291, 4, { 0.534759f, 4.500000f, -374.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2000681, 4312292, 4, { -7.437989f, 0.900002f, -387.547607f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2000681, 4312293, 4, { -23.117430f, 0.472961f, -387.472412f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2000681, 4312297, 4, { -46.428509f, 0.500000f, -400.448212f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2000681, 4312296, 4, { -30.738091f, 0.099998f, -400.874908f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000681, 4312295, 4, { -14.994600f, -0.299999f, -400.505615f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2000681, 4312294, 4, { 0.589670f, -0.700001f, -400.720093f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2000681, 4312298, 4, { -7.442382f, 1.700001f, -414.361389f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2000681, 4312299, 4, { -22.934330f, 1.296936f, -414.053589f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_15", 2000681, 4312300, 4, { -38.631561f, 0.900004f, -414.153595f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2000681, 4312303, 4, { -49.847839f, 4.899996f, -429.440002f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2000681, 4312302, 4, { -30.867050f, 2.500000f, -428.009308f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2000681, 4312301, 4, { -15.123560f, 2.100006f, -427.852295f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000627, 4293311, 5, { -57.085258f, 25.136589f, 146.983200f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0118", 2000620, 4293369, 4, { -1.810616f, 13.164380f, 57.682442f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094", 2000619, 4293368, 4, { -3.276026f, 13.164380f, 57.488449f }, 1.000000f, + 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "unknown_0", 2000680, 0, 4, { 0.000000f, 5.245687f, 4.314113f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_s1b1_bosswall", 2000620, 4293633, 4, { 8.673634f, 4.398203f, -361.720886f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0249", 2000619, 4293632, 4, { 7.539745f, 4.948945f, -366.654388f }, 0.991760f, + 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "unknown_1", 2001137, 0, 4, { -8.048342f, 1.700000f, -412.088593f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2001696, 0, 4, { -23.791620f, 1.300000f, -414.239990f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -45.330261f, 25.136589f, 134.093399f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_s1b1_door_col", 2000486, 4374535, 4, { -5.435945f, 12.209330f, 0.953091f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2000746, 4312523, 4, { 57.321320f, 2.000001f, -254.168396f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2000746, 4312527, 4, { 36.303661f, 2.815034f, -341.235992f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganterminal", 2001154, 4083745, 4, { -38.633110f, 0.899952f, -414.162201f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2001167, 4329693, 4, { -50.832001f, 59.871399f, -332.417511f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_s1b1_lightwall", 2002712, 4374479, 4, { 52.174641f, 2.740428f, -248.752899f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgpl_s1b1_lightwall_1", 2002712, 4374482, 4, { 44.598309f, 1.549361f, -340.584991f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_f1r1_bossplusfloor", 2001152, 4374713, 4, { -4.591531f, 4.500000f, -379.052795f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_f1r1_bossplusfloor_1", 2001152, 4374714, 4, { -47.199150f, 4.900000f, -430.581299f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgpl_f1r1_bossplusfloor_2", 2001152, 4374715, 4, { -12.391370f, -0.160584f, -378.187805f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgpl_f1r1_bossplusfloor_3", 2001152, 4374749, 4, { -12.091370f, -0.160584f, -376.087799f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_6", 2000681, 4312291, 4, { 0.534759f, 4.500000f, -374.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2000681, 4312292, 4, { -7.437989f, 0.900002f, -387.547607f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2000681, 4312293, 4, { -23.117430f, 0.472961f, -387.472412f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2000681, 4312297, 4, { -46.428509f, 0.500000f, -400.448212f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2000681, 4312296, 4, { -30.738091f, 0.099998f, -400.874908f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2000681, 4312295, 4, { -14.994600f, -0.299999f, -400.505615f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2000681, 4312294, 4, { 0.589670f, -0.700001f, -400.720093f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2000681, 4312298, 4, { -7.442382f, 1.700001f, -414.361389f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2000681, 4312299, 4, { -22.934330f, 1.296936f, -414.053589f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_15", 2000681, 4312300, 4, { -38.631561f, 0.900004f, -414.153595f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2000681, 4312303, 4, { -49.847839f, 4.899996f, -429.440002f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2000681, 4312302, 4, { -30.867050f, 2.500000f, -428.009308f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2000681, 4312301, 4, { -15.123560f, 2.100006f, -427.852295f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000627, 4293311, 5, { -57.085258f, 25.136589f, 146.983200f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn2.cpp b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn2.cpp index 512d27a1..dacdfbd5 100644 --- a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn2.cpp +++ b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn2.cpp @@ -1,64 +1,96 @@ #include #include -class TheBindingCoilofBahamutTurn2 : public InstanceContentScript +class TheBindingCoilofBahamutTurn2 : + public InstanceContentScript { public: - TheBindingCoilofBahamutTurn2() : InstanceContentScript( 30003 ) - { } + TheBindingCoilofBahamutTurn2() : + InstanceContentScript( 30003 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0094", 2000668, 4307413, 4, { -16.838060f, -60.912392f, 116.477898f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgpl_s1b2_bosswall_c", 2000669, 4307414, 4, { -16.655029f, -61.041161f, 117.352303f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_s1b2_bossline2", 2000670, 4306762, 4, { -65.538063f, -38.998699f, 90.104332f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1b2_bosswall_r", 2000671, 4306763, 4, { -66.396652f, -38.998539f, 88.058296f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_0", 2000680, 0, 4, { -48.355518f, -38.578499f, 86.879211f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_s1b2_bossline3", 2000672, 4293655, 4, { -51.865479f, -18.020941f, 35.080441f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_s1b2_bosswall_r_1", 2000673, 4293656, 4, { -50.583679f, -18.020941f, 35.538212f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0249", 2000674, 4331576, 4, { 0.736900f, 0.033629f, 31.115801f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0250", 2000675, 4331583, 4, { 1.580210f, 0.032013f, 29.906660f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_s1b2_bossline5", 2000676, 4306493, 4, { 52.177799f, -21.010019f, 34.437031f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1b2_bosswall_r_2", 2000677, 4306494, 4, { 51.183399f, -21.011810f, 34.504452f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_s1b2_bosswall_r_3", 2000679, 4306772, 4, { 60.934231f, -41.989620f, 101.246002f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_s1b2_bossline6", 2000678, 4306771, 4, { 59.622169f, -41.994068f, 98.767616f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_s1b2_bossline", 2000621, 4307578, 4, { 0.106751f, -65.934273f, 82.291870f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_s1b2_bosswall", 2000622, 4307579, 4, { -0.320496f, -65.934273f, 82.322388f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2000640, 4092173, 4, { -14.019790f, -0.010602f, 31.855391f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2000641, 4092174, 4, { 15.101930f, -0.029503f, 31.798840f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2000638, 4092177, 4, { -58.677170f, -18.016920f, 47.536171f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2000639, 4092181, 4, { -27.060640f, -18.102751f, 58.292858f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2000642, 4092183, 4, { 58.277191f, -20.996519f, 62.605671f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2000643, 4092178, 4, { 30.274019f, -20.952881f, 58.602650f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2000644, 4092182, 4, { 29.367611f, -41.975361f, 110.864998f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2000635, 4092184, 4, { 0.539888f, -62.460609f, 100.908897f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2000636, 4092179, 4, { -55.941719f, -38.998539f, 78.436340f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2000637, 4092180, 4, { -51.528130f, -38.998749f, 109.805901f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000645, 4092175, 4, { 0.474554f, -65.943604f, 68.078178f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganterminal", 2001161, 4107517, 4, { -0.118857f, -102.612297f, 0.534058f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2001152, 4107515, 4, { 2.090964f, 0.000001f, 22.575050f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000628, 4293644, 5, { 0.852533f, 0.148087f, 20.254930f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0094", 2000668, 4307413, 4, { -16.838060f, -60.912392f, 116.477898f }, + 1.000000f, 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgpl_s1b2_bosswall_c", 2000669, 4307414, 4, { -16.655029f, -61.041161f, 117.352303f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_s1b2_bossline2", 2000670, 4306762, 4, { -65.538063f, -38.998699f, 90.104332f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_s1b2_bosswall_r", 2000671, 4306763, 4, { -66.396652f, -38.998539f, 88.058296f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_0", 2000680, 0, 4, { -48.355518f, -38.578499f, 86.879211f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_s1b2_bossline3", 2000672, 4293655, 4, { -51.865479f, -18.020941f, 35.080441f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgpl_s1b2_bosswall_r_1", 2000673, 4293656, 4, { -50.583679f, -18.020941f, 35.538212f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0249", 2000674, 4331576, 4, { 0.736900f, 0.033629f, 31.115801f }, 1.000000f, + 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0250", 2000675, 4331583, 4, { 1.580210f, 0.032013f, 29.906660f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_s1b2_bossline5", 2000676, 4306493, 4, { 52.177799f, -21.010019f, 34.437031f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_s1b2_bosswall_r_2", 2000677, 4306494, 4, { 51.183399f, -21.011810f, 34.504452f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_s1b2_bosswall_r_3", 2000679, 4306772, 4, { 60.934231f, -41.989620f, 101.246002f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_s1b2_bossline6", 2000678, 4306771, 4, { 59.622169f, -41.994068f, 98.767616f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_s1b2_bossline", 2000621, 4307578, 4, { 0.106751f, -65.934273f, 82.291870f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgpl_s1b2_bosswall", 2000622, 4307579, 4, { -0.320496f, -65.934273f, 82.322388f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_1", 2000640, 4092173, 4, { -14.019790f, -0.010602f, 31.855391f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2000641, 4092174, 4, { 15.101930f, -0.029503f, 31.798840f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2000638, 4092177, 4, { -58.677170f, -18.016920f, 47.536171f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2000639, 4092181, 4, { -27.060640f, -18.102751f, 58.292858f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2000642, 4092183, 4, { 58.277191f, -20.996519f, 62.605671f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2000643, 4092178, 4, { 30.274019f, -20.952881f, 58.602650f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2000644, 4092182, 4, { 29.367611f, -41.975361f, 110.864998f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2000635, 4092184, 4, { 0.539888f, -62.460609f, 100.908897f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2000636, 4092179, 4, { -55.941719f, -38.998539f, 78.436340f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2000637, 4092180, 4, { -51.528130f, -38.998749f, 109.805901f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2000645, 4092175, 4, { 0.474554f, -65.943604f, 68.078178f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganterminal", 2001161, 4107517, 4, { -0.118857f, -102.612297f, 0.534058f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2001152, 4107515, 4, { 2.090964f, 0.000001f, 22.575050f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000628, 4293644, 5, { 0.852533f, 0.148087f, 20.254930f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn3.cpp b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn3.cpp index 1723893f..ad7a4e58 100644 --- a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn3.cpp +++ b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn3.cpp @@ -1,74 +1,123 @@ #include #include -class TheBindingCoilofBahamutTurn3 : public InstanceContentScript +class TheBindingCoilofBahamutTurn3 : + public InstanceContentScript { public: - TheBindingCoilofBahamutTurn3() : InstanceContentScript( 30004 ) - { } + TheBindingCoilofBahamutTurn3() : + InstanceContentScript( 30004 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2001046, 4204647, 4, { -38.434280f, 0.755630f, 27.186541f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2001047, 4204649, 4, { -22.930870f, -38.074230f, 51.622608f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2001048, 4204652, 4, { 17.410521f, -36.911560f, 65.506958f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2001049, 4204654, 4, { 43.230721f, -36.854370f, 41.278610f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2001050, 4204661, 4, { 41.756340f, -37.405720f, 11.258040f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2001051, 4204644, 4, { 18.406361f, -75.101082f, 30.246229f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001052, 4204665, 4, { -30.734369f, -111.808601f, 16.055771f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2001053, 4204660, 4, { 28.263350f, -74.681847f, -39.544411f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2001054, 4204664, 4, { -8.499553f, -113.039597f, -34.010311f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2001055, 4204662, 4, { -15.483490f, -112.471001f, -20.925671f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Silentterminal", 2001132, 4322464, 4, { -6.976719f, -112.013496f, 23.202400f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -16.955231f, -0.864158f, 0.593589f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2001152, 4238687, 4, { -1.707294f, 0.000000f, 3.048101f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2001056, 4204669, 4, { -14.240080f, -150.417404f, 1.736771f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2001057, 4204678, 4, { -29.648090f, -188.419907f, -3.748357f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2001058, 4204672, 4, { -12.738200f, -187.302002f, 51.141499f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2001059, 4204697, 4, { 0.332115f, -225.076202f, 50.155842f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2001060, 4204703, 4, { 52.345329f, -224.740707f, 37.453941f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2001061, 4204709, 4, { 46.480949f, -262.093811f, 5.845346f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2001062, 4204723, 4, { 28.585011f, -299.527008f, 19.833670f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2001063, 4204712, 4, { -15.037280f, -262.281311f, 51.584450f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2001064, 4204725, 4, { -15.719740f, -300.085785f, -22.829020f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2001065, 4204720, 4, { -0.428782f, -300.866394f, 22.938450f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2001066, 4204671, 4, { 9.075709f, -150.864899f, -17.327230f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2001067, 4204680, 4, { -25.603180f, -188.390701f, -25.489799f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_23", 2001068, 4204687, 4, { 28.229540f, -188.408707f, -2.975939f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_24", 2001069, 4204684, 4, { 37.952412f, -187.292603f, -39.644798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_25", 2001070, 4204707, 4, { -5.330157f, -225.534607f, -50.912369f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_26", 2001071, 4204688, 4, { 23.554840f, -223.922607f, -46.970329f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_27", 2001072, 4204689, 4, { -44.635330f, -225.534607f, -27.836760f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_28", 2001073, 4204715, 4, { -24.786400f, -262.708405f, -39.642220f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_29", 2001074, 4204716, 4, { -0.141846f, -262.624695f, -63.058170f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Silentterminal_1", 2001140, 4328681, 4, { -8.207968f, -300.679108f, -11.383970f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_30", 2001075, 4204730, 4, { -27.307819f, -347.278900f, 23.850750f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_31", 2001076, 4204722, 4, { -32.117531f, -347.483307f, -18.936440f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_32", 2001077, 4204728, 4, { -0.090805f, -348.068695f, -13.361250f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_33", 2001078, 4204719, 4, { 27.568150f, -347.808289f, 23.699249f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_34", 2001106, 4204738, 4, { -64.801163f, -383.539886f, -16.602329f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_35", 2001107, 4204740, 4, { -34.187149f, -383.967804f, -51.634480f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_36", 2001108, 4204732, 4, { 58.207191f, -383.523010f, -18.762280f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_37", 2001109, 4204735, 4, { 27.461531f, -384.122589f, 40.984268f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_38", 2001110, 4204746, 4, { 22.577141f, -422.501587f, 53.173019f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_39", 2001111, 4204744, 4, { -46.433231f, -422.842804f, 34.744751f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_40", 2001112, 4204747, 4, { 17.206091f, -423.418488f, -16.318670f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganterminal", 2001162, 4317929, 4, { -15.875440f, -423.430511f, 18.778770f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Silentterminal_2", 2002600, 4334493, 4, { -24.909149f, -423.472595f, 41.999378f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000629, 4294859, 5, { -0.075790f, 0.000000f, 0.310051f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2001046, 4204647, 4, { -38.434280f, 0.755630f, 27.186541f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2001047, 4204649, 4, { -22.930870f, -38.074230f, 51.622608f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2001048, 4204652, 4, { 17.410521f, -36.911560f, 65.506958f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2001049, 4204654, 4, { 43.230721f, -36.854370f, 41.278610f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2001050, 4204661, 4, { 41.756340f, -37.405720f, 11.258040f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2001051, 4204644, 4, { 18.406361f, -75.101082f, 30.246229f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001052, 4204665, 4, { -30.734369f, -111.808601f, 16.055771f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2001053, 4204660, 4, { 28.263350f, -74.681847f, -39.544411f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2001054, 4204664, 4, { -8.499553f, -113.039597f, -34.010311f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2001055, 4204662, 4, { -15.483490f, -112.471001f, -20.925671f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Silentterminal", 2001132, 4322464, 4, { -6.976719f, -112.013496f, 23.202400f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -16.955231f, -0.864158f, 0.593589f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_10", 2001152, 4238687, 4, { -1.707294f, 0.000000f, 3.048101f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2001056, 4204669, 4, { -14.240080f, -150.417404f, 1.736771f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2001057, 4204678, 4, { -29.648090f, -188.419907f, -3.748357f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2001058, 4204672, 4, { -12.738200f, -187.302002f, 51.141499f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2001059, 4204697, 4, { 0.332115f, -225.076202f, 50.155842f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2001060, 4204703, 4, { 52.345329f, -224.740707f, 37.453941f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2001061, 4204709, 4, { 46.480949f, -262.093811f, 5.845346f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2001062, 4204723, 4, { 28.585011f, -299.527008f, 19.833670f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2001063, 4204712, 4, { -15.037280f, -262.281311f, 51.584450f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2001064, 4204725, 4, { -15.719740f, -300.085785f, -22.829020f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2001065, 4204720, 4, { -0.428782f, -300.866394f, 22.938450f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2001066, 4204671, 4, { 9.075709f, -150.864899f, -17.327230f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_22", 2001067, 4204680, 4, { -25.603180f, -188.390701f, -25.489799f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_23", 2001068, 4204687, 4, { 28.229540f, -188.408707f, -2.975939f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_24", 2001069, 4204684, 4, { 37.952412f, -187.292603f, -39.644798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_25", 2001070, 4204707, 4, { -5.330157f, -225.534607f, -50.912369f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_26", 2001071, 4204688, 4, { 23.554840f, -223.922607f, -46.970329f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_27", 2001072, 4204689, 4, { -44.635330f, -225.534607f, -27.836760f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_28", 2001073, 4204715, 4, { -24.786400f, -262.708405f, -39.642220f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_29", 2001074, 4204716, 4, { -0.141846f, -262.624695f, -63.058170f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Silentterminal_1", 2001140, 4328681, 4, { -8.207968f, -300.679108f, -11.383970f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_30", 2001075, 4204730, 4, { -27.307819f, -347.278900f, 23.850750f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_31", 2001076, 4204722, 4, { -32.117531f, -347.483307f, -18.936440f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_32", 2001077, 4204728, 4, { -0.090805f, -348.068695f, -13.361250f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_33", 2001078, 4204719, 4, { 27.568150f, -347.808289f, 23.699249f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_34", 2001106, 4204738, 4, { -64.801163f, -383.539886f, -16.602329f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_35", 2001107, 4204740, 4, { -34.187149f, -383.967804f, -51.634480f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_36", 2001108, 4204732, 4, { 58.207191f, -383.523010f, -18.762280f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_37", 2001109, 4204735, 4, { 27.461531f, -384.122589f, 40.984268f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_38", 2001110, 4204746, 4, { 22.577141f, -422.501587f, 53.173019f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_39", 2001111, 4204744, 4, { -46.433231f, -422.842804f, 34.744751f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_40", 2001112, 4204747, 4, { 17.206091f, -423.418488f, -16.318670f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganterminal", 2001162, 4317929, 4, { -15.875440f, -423.430511f, 18.778770f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Silentterminal_2", 2002600, 4334493, 4, { -24.909149f, -423.472595f, 41.999378f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000629, 4294859, 5, { -0.075790f, 0.000000f, 0.310051f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn4.cpp b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn4.cpp index 0e58db36..c1d85f90 100644 --- a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn4.cpp +++ b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn4.cpp @@ -1,43 +1,61 @@ #include #include -class TheBindingCoilofBahamutTurn4 : public InstanceContentScript +class TheBindingCoilofBahamutTurn4 : + public InstanceContentScript { public: - TheBindingCoilofBahamutTurn4() : InstanceContentScript( 30005 ) - { } + TheBindingCoilofBahamutTurn4() : + InstanceContentScript( 30005 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Silentterminal", 2000633, 4974723, 4, { -16.904461f, 1.700597f, 17.125530f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Silentterminal_1", 2000634, 4974724, 4, { 17.103741f, 1.662121f, 16.896111f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2001153, 4254608, 4, { 7.917505f, 0.058137f, -7.647632f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2001153, 4254609, 4, { 8.217505f, 0.058137f, -6.747632f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2001153, 4254607, 4, { 8.517506f, 0.000000f, -5.847631f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2001153, 4254606, 4, { 8.817506f, 0.000000f, -4.947631f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2001155, 4974722, 4, { -16.599979f, 0.058137f, -16.803070f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2001155, 4974721, 4, { 16.776859f, 0.058137f, -16.643490f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001764, 3961628, 4, { -0.983059f, 0.058134f, 3.319265f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2001764, 4974712, 4, { -2.906071f, 0.058134f, 2.796373f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2001764, 3962580, 4, { -4.811448f, 0.000001f, 9.066607f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2001764, 4330325, 4, { 2.346304f, 0.058136f, 5.385328f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2001764, 4330326, 4, { 4.663461f, 0.058136f, 4.726402f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000630, 4294847, 5, { -12.531030f, 0.000001f, 12.592170f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "sgvf_w_lvd_b0055", 2000615, 4374568, 4, { -15.534740f, 0.058137f, -15.601170f }, 1.000000f, 0.000000f ); - // States -> vf_dext01_of vf_dext01_on + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Silentterminal", 2000633, 4974723, 4, { -16.904461f, 1.700597f, 17.125530f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Silentterminal_1", 2000634, 4974724, 4, { 17.103741f, 1.662121f, 16.896111f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_0", 2001153, 4254608, 4, { 7.917505f, 0.058137f, -7.647632f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2001153, 4254609, 4, { 8.217505f, 0.058137f, -6.747632f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2001153, 4254607, 4, { 8.517506f, 0.000000f, -5.847631f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2001153, 4254606, 4, { 8.817506f, 0.000000f, -4.947631f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2001155, 4974722, 4, { -16.599979f, 0.058137f, -16.803070f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2001155, 4974721, 4, { 16.776859f, 0.058137f, -16.643490f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001764, 3961628, 4, { -0.983059f, 0.058134f, 3.319265f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2001764, 4974712, 4, { -2.906071f, 0.058134f, 2.796373f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2001764, 3962580, 4, { -4.811448f, 0.000001f, 9.066607f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2001764, 4330325, 4, { 2.346304f, 0.058136f, 5.385328f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2001764, 4330326, 4, { 4.663461f, 0.058136f, 4.726402f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000630, 4294847, 5, { -12.531030f, 0.000001f, 12.592170f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "sgvf_w_lvd_b0055", 2000615, 4374568, 4, { -15.534740f, 0.058137f, -15.601170f }, 1.000000f, + 0.000000f ); + // States -> vf_dext01_of vf_dext01_on - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn5.cpp b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn5.cpp index e81a8a46..05e36969 100644 --- a/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn5.cpp +++ b/src/servers/Scripts/instances/raids/TheBindingCoilofBahamutTurn5.cpp @@ -1,36 +1,43 @@ #include #include -class TheBindingCoilofBahamutTurn5 : public InstanceContentScript +class TheBindingCoilofBahamutTurn5 : + public InstanceContentScript { public: - TheBindingCoilofBahamutTurn5() : InstanceContentScript( 30006 ) - { } + TheBindingCoilofBahamutTurn5() : + InstanceContentScript( 30006 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2000623, 4328290, 4, { -7.770457f, 54.493511f, -29.083250f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2000666, 4323972, 4, { -3.001781f, 50.022308f, -7.576328f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2000682, 0, 4, { -0.531223f, 50.025429f, 6.100062f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2001151, 0, 4, { 11.681320f, 50.085152f, -0.915123f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2001150, 0, 4, { 14.631230f, 50.087898f, 1.687731f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2001168, 0, 4, { 17.845060f, 50.181900f, -0.676077f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2002664, 0, 4, { -7.768790f, 50.005032f, -4.092178f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganterminal", 2001163, 4328464, 4, { 51.910549f, 48.460838f, 72.757553f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000631, 4294944, 5, { -26.751080f, 100.099998f, -128.204498f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2000623, 4328290, 4, { -7.770457f, 54.493511f, -29.083250f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2000666, 4323972, 4, { -3.001781f, 50.022308f, -7.576328f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2000682, 0, 4, { -0.531223f, 50.025429f, 6.100062f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2001151, 0, 4, { 11.681320f, 50.085152f, -0.915123f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2001150, 0, 4, { 14.631230f, 50.087898f, 1.687731f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_5", 2001168, 0, 4, { 17.845060f, 50.181900f, -0.676077f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_6", 2002664, 0, 4, { -7.768790f, 50.005032f, -4.092178f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Allaganterminal", 2001163, 4328464, 4, { 51.910549f, 48.460838f, 72.757553f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000631, 4294944, 5, { -26.751080f, 100.099998f, -128.204498f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn1.cpp b/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn1.cpp index 0e8f5d62..8845b8c6 100644 --- a/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn1.cpp +++ b/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn1.cpp @@ -1,51 +1,76 @@ #include #include -class TheFinalCoilofBahamutTurn1 : public InstanceContentScript +class TheFinalCoilofBahamutTurn1 : + public InstanceContentScript { public: - TheFinalCoilofBahamutTurn1() : InstanceContentScript( 30016 ) - { } + TheFinalCoilofBahamutTurn1() : + InstanceContentScript( 30016 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2004612, 0, 4, { -0.116493f, -0.000001f, -293.875214f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2004613, 0, 4, { -5.014206f, -0.000001f, -285.730896f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4894214, 5, { 0.172209f, 1.707170f, 221.425903f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -6.029538f, -0.000005f, 188.016205f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2003679, 4868598, 4, { -0.125790f, 0.523954f, 167.023605f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2004605, 4852714, 4, { -0.194780f, -0.000003f, 177.104095f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2003849, 4881763, 4, { 0.031929f, -19.494820f, 141.135101f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2003905, 4868599, 4, { -0.095059f, -7.275987f, 79.729607f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2004605, 4879813, 4, { -10.904620f, -18.183340f, 116.685303f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2004605, 4879797, 4, { 11.416480f, -18.931650f, 116.685303f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2004605, 4879805, 4, { 11.416480f, -19.000000f, 103.064003f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2004605, 4879822, 4, { -11.312880f, -19.000000f, 103.064003f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2004116, 4881762, 4, { 0.171127f, -19.487169f, 30.039690f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2004117, 4868600, 4, { 0.009460f, -29.465590f, 10.045650f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2004605, 4879838, 4, { 0.047739f, -29.000000f, 19.918270f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2004605, 4879850, 4, { 0.018590f, -29.000000f, 19.923750f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2004118, 4881761, 4, { 0.003261f, -4.463747f, -152.984604f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2004119, 4868601, 4, { 0.003693f, -4.463205f, -166.994400f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_16", 2002735, 0, 4, { 0.007116f, -5.000001f, -171.749207f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4895024, 4, { -0.005186f, -4.890112f, -171.362305f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_17", 2004305, 4841650, 4, { 0.086417f, 0.090680f, -300.234711f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganterminal", 2004141, 4841682, 4, { 0.003672f, 1.083544f, -337.998596f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_lvd_colwithnavi", 2004137, 4895069, 4, { 3.638081f, 0.152056f, -331.675415f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2004612, 0, 4, { -0.116493f, -0.000001f, -293.875214f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2004613, 0, 4, { -5.014206f, -0.000001f, -285.730896f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4894214, 5, { 0.172209f, 1.707170f, 221.425903f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -6.029538f, -0.000005f, 188.016205f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2003679, 4868598, 4, { -0.125790f, 0.523954f, 167.023605f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2004605, 4852714, 4, { -0.194780f, -0.000003f, 177.104095f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2003849, 4881763, 4, { 0.031929f, -19.494820f, 141.135101f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2003905, 4868599, 4, { -0.095059f, -7.275987f, 79.729607f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2004605, 4879813, 4, { -10.904620f, -18.183340f, 116.685303f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2004605, 4879797, 4, { 11.416480f, -18.931650f, 116.685303f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2004605, 4879805, 4, { 11.416480f, -19.000000f, 103.064003f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2004605, 4879822, 4, { -11.312880f, -19.000000f, 103.064003f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2004116, 4881762, 4, { 0.171127f, -19.487169f, 30.039690f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2004117, 4868600, 4, { 0.009460f, -29.465590f, 10.045650f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2004605, 4879838, 4, { 0.047739f, -29.000000f, 19.918270f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2004605, 4879850, 4, { 0.018590f, -29.000000f, 19.923750f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2004118, 4881761, 4, { 0.003261f, -4.463747f, -152.984604f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2004119, 4868601, 4, { 0.003693f, -4.463205f, -166.994400f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_16", 2002735, 0, 4, { 0.007116f, -5.000001f, -171.749207f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4895024, 4, { -0.005186f, -4.890112f, -171.362305f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_17", 2004305, 4841650, 4, { 0.086417f, 0.090680f, -300.234711f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganterminal", 2004141, 4841682, 4, { 0.003672f, 1.083544f, -337.998596f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_lvd_colwithnavi", 2004137, 4895069, 4, { 3.638081f, 0.152056f, -331.675415f }, + 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn2.cpp b/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn2.cpp index c8250fbe..db8b7ba4 100644 --- a/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn2.cpp +++ b/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn2.cpp @@ -1,61 +1,91 @@ #include #include -class TheFinalCoilofBahamutTurn2 : public InstanceContentScript +class TheFinalCoilofBahamutTurn2 : + public InstanceContentScript { public: - TheFinalCoilofBahamutTurn2() : InstanceContentScript( 30017 ) - { } + TheFinalCoilofBahamutTurn2() : + InstanceContentScript( 30017 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2004618, 0, 4, { 8.377602f, -4.963000f, 2.130980f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w1b2_b0338", 2004622, 5004388, 4, { 0.000000f, -4.963000f, 0.000000f }, 1.000000f, 0.000000f ); - // States -> brr_off brr_on2off brr_on brr_off2on - instance->registerEObj( "unknown_1", 2004138, 4985190, 4, { 3.028988f, -85.357613f, 329.862915f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -8.983331f, -89.405617f, 340.705505f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4895376, 5, { -2.304138f, -95.841980f, 373.883514f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_2", 2004138, 4772070, 4, { -3.471196f, -85.362328f, 329.862915f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2004138, 0, 4, { 3.028988f, -85.357613f, 329.862915f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2004138, 4772073, 4, { 82.671562f, 89.558182f, 312.686188f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2004138, 4772071, 4, { -87.694283f, 61.779518f, 322.880798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2004138, 4772074, 4, { 68.781647f, 74.135750f, 257.001312f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2004138, 4772072, 4, { -71.265640f, 50.681782f, 262.029907f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2004138, 0, 4, { 3.045514f, -50.605240f, 198.785202f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2004131, 4772088, 4, { -0.320496f, -61.905880f, 240.100693f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2004131, 4772089, 4, { -0.150618f, -58.926769f, 229.063507f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2004130, 4903493, 4, { 0.167786f, -56.382141f, 216.998505f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2004138, 4772084, 4, { 5.588670f, -50.254120f, 198.785202f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2004138, 4985729, 4, { -1.068177f, -50.250832f, 198.785202f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2004138, 4772077, 4, { 93.772713f, 2.760812f, 164.237198f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2004138, 4772078, 4, { 62.832458f, 2.703932f, 109.635002f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2004138, 4772079, 4, { -101.804497f, -15.054380f, 174.336105f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2004138, 4772080, 4, { -68.094177f, -9.272421f, 114.627701f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2004131, 4772085, 4, { -33.952530f, 1.069616f, 57.437080f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2004131, 4772087, 4, { 34.497631f, 1.062853f, 57.576210f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2004130, 4903494, 4, { -18.231251f, 0.578985f, 63.141258f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2004130, 4903495, 4, { 18.776350f, 0.578991f, 63.349949f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2004138, 4772081, 4, { 0.088281f, 0.909978f, 67.335487f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_23", 2004138, 4772082, 4, { -66.984283f, 1.029588f, -0.043371f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_24", 2004138, 4772083, 4, { 67.627632f, 1.029588f, -0.043371f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_25", 2002735, 0, 4, { 0.046454f, 0.339829f, 55.289249f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4896001, 4, { -0.021759f, 0.578989f, 57.955990f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Allaganterminal", 2004142, 4797408, 4, { 0.001913f, -4.224863f, -30.000130f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_colwithnavi", 2004137, 4895798, 4, { -0.366558f, -4.738363f, -24.911970f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2004618, 0, 4, { 8.377602f, -4.963000f, 2.130980f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w1b2_b0338", 2004622, 5004388, 4, { 0.000000f, -4.963000f, 0.000000f }, 1.000000f, + 0.000000f ); + // States -> brr_off brr_on2off brr_on brr_off2on + instance->registerEObj( "unknown_1", 2004138, 4985190, 4, { 3.028988f, -85.357613f, 329.862915f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -8.983331f, -89.405617f, 340.705505f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4895376, 5, { -2.304138f, -95.841980f, 373.883514f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_2", 2004138, 4772070, 4, { -3.471196f, -85.362328f, 329.862915f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2004138, 0, 4, { 3.028988f, -85.357613f, 329.862915f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_4", 2004138, 4772073, 4, { 82.671562f, 89.558182f, 312.686188f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2004138, 4772071, 4, { -87.694283f, 61.779518f, 322.880798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2004138, 4772074, 4, { 68.781647f, 74.135750f, 257.001312f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2004138, 4772072, 4, { -71.265640f, 50.681782f, 262.029907f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2004138, 0, 4, { 3.045514f, -50.605240f, 198.785202f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_9", 2004131, 4772088, 4, { -0.320496f, -61.905880f, 240.100693f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2004131, 4772089, 4, { -0.150618f, -58.926769f, 229.063507f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2004130, 4903493, 4, { 0.167786f, -56.382141f, 216.998505f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2004138, 4772084, 4, { 5.588670f, -50.254120f, 198.785202f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2004138, 4985729, 4, { -1.068177f, -50.250832f, 198.785202f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2004138, 4772077, 4, { 93.772713f, 2.760812f, 164.237198f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2004138, 4772078, 4, { 62.832458f, 2.703932f, 109.635002f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2004138, 4772079, 4, { -101.804497f, -15.054380f, 174.336105f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2004138, 4772080, 4, { -68.094177f, -9.272421f, 114.627701f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2004131, 4772085, 4, { -33.952530f, 1.069616f, 57.437080f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2004131, 4772087, 4, { 34.497631f, 1.062853f, 57.576210f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2004130, 4903494, 4, { -18.231251f, 0.578985f, 63.141258f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2004130, 4903495, 4, { 18.776350f, 0.578991f, 63.349949f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_22", 2004138, 4772081, 4, { 0.088281f, 0.909978f, 67.335487f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_23", 2004138, 4772082, 4, { -66.984283f, 1.029588f, -0.043371f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_24", 2004138, 4772083, 4, { 67.627632f, 1.029588f, -0.043371f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_25", 2002735, 0, 4, { 0.046454f, 0.339829f, 55.289249f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4896001, 4, { -0.021759f, 0.578989f, 57.955990f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Allaganterminal", 2004142, 4797408, 4, { 0.001913f, -4.224863f, -30.000130f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_colwithnavi", 2004137, 4895798, 4, { -0.366558f, -4.738363f, -24.911970f }, + 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn3.cpp b/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn3.cpp index 1689600a..5704b291 100644 --- a/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn3.cpp +++ b/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn3.cpp @@ -1,34 +1,43 @@ #include #include -class TheFinalCoilofBahamutTurn3 : public InstanceContentScript +class TheFinalCoilofBahamutTurn3 : + public InstanceContentScript { public: - TheFinalCoilofBahamutTurn3() : InstanceContentScript( 30018 ) - { } + TheFinalCoilofBahamutTurn3() : + InstanceContentScript( 30018 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2004611, 0, 4, { -7.491028f, -53.235149f, -153.215500f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2004610, 0, 4, { 22.322800f, -53.235241f, -154.775101f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w1b3_b0502", 2004627, 5009741, 4, { 0.000000f, -53.682961f, -160.000000f }, 1.000000f, 0.000000f ); - // States -> brr_off brr_on2off brr_on brr_off2on - instance->registerEObj( "unknown_2", 2004638, 0, 4, { -14.415940f, -53.682961f, -162.090302f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4895872, 5, { 0.005331f, -53.234989f, -140.846207f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Entrypoint", 2004650, 0, 4, { -0.019161f, -53.626511f, -182.364700f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2004611, 0, 4, { -7.491028f, -53.235149f, -153.215500f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2004610, 0, 4, { 22.322800f, -53.235241f, -154.775101f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w1b3_b0502", 2004627, 5009741, 4, { 0.000000f, -53.682961f, -160.000000f }, 1.000000f, + 0.000000f ); + // States -> brr_off brr_on2off brr_on brr_off2on + instance->registerEObj( "unknown_2", 2004638, 0, 4, { -14.415940f, -53.682961f, -162.090302f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4895872, 5, { 0.005331f, -53.234989f, -140.846207f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Entrypoint", 2004650, 0, 4, { -0.019161f, -53.626511f, -182.364700f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn4.cpp b/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn4.cpp index 0da9629a..b6921d0e 100644 --- a/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn4.cpp +++ b/src/servers/Scripts/instances/raids/TheFinalCoilofBahamutTurn4.cpp @@ -1,34 +1,40 @@ #include #include -class TheFinalCoilofBahamutTurn4 : public InstanceContentScript +class TheFinalCoilofBahamutTurn4 : + public InstanceContentScript { public: - TheFinalCoilofBahamutTurn4() : InstanceContentScript( 30019 ) - { } + TheFinalCoilofBahamutTurn4() : + InstanceContentScript( 30019 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2004578, 0, 4, { 452.681213f, 0.000000f, 6.016883f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2004579, 0, 4, { 450.366699f, -0.000000f, 5.948895f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2004580, 0, 4, { 443.205688f, 0.000000f, 4.024448f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4895882, 5, { 450.000000f, 0.000000f, 21.250090f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_3", 2004785, 5039563, 4, { 450.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2004649, 5018241, 4, { 448.419403f, 0.000000f, 4.765350f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2004651, 0, 4, { 450.000000f, 0.000000f, 29.273590f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2004578, 0, 4, { 452.681213f, 0.000000f, 6.016883f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2004579, 0, 4, { 450.366699f, -0.000000f, 5.948895f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2004580, 0, 4, { 443.205688f, 0.000000f, 4.024448f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4895882, 5, { 450.000000f, 0.000000f, 21.250090f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_3", 2004785, 5039563, 4, { 450.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2004649, 5018241, 4, { 448.419403f, 0.000000f, 4.765350f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2004651, 0, 4, { 450.000000f, 0.000000f, 29.273590f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheLabyrinthoftheAncients.cpp b/src/servers/Scripts/instances/raids/TheLabyrinthoftheAncients.cpp index c2318a39..981e844d 100644 --- a/src/servers/Scripts/instances/raids/TheLabyrinthoftheAncients.cpp +++ b/src/servers/Scripts/instances/raids/TheLabyrinthoftheAncients.cpp @@ -1,107 +1,174 @@ #include #include -class TheLabyrinthoftheAncients : public InstanceContentScript +class TheLabyrinthoftheAncients : + public InstanceContentScript { public: - TheLabyrinthoftheAncients() : InstanceContentScript( 30001 ) - { } + TheLabyrinthoftheAncients() : + InstanceContentScript( 30001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002108, 0, 4, { -109.946503f, 44.168140f, -165.619995f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4317322, 5, { -110.032799f, 30.372690f, 417.614990f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Allaganteleporter", 2001023, 3445281, 4, { -117.450104f, 45.942120f, 317.195892f }, 0.778198f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0294", 2002793, 4493308, 4, { -148.301498f, 48.301128f, 279.915802f }, 1.000000f, 0.000000f ); - // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop - instance->registerEObj( "sgvf_w_lvd_b0294_1", 2002794, 4493309, 4, { -109.977203f, 48.251709f, 243.024094f }, 0.991760f, 0.000048f ); - // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop - instance->registerEObj( "sgvf_w_lvd_b0294_2", 2002795, 4493310, 4, { -71.722931f, 48.301121f, 280.086487f }, 1.000000f, 0.000000f ); - // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop - instance->registerEObj( "unknown_1", 2001024, 4199521, 4, { -451.214386f, 41.580811f, 182.050903f }, 1.000000f, 0.000048f ); - instance->registerEObj( "sgpl_l1r1_boss1wall", 2001025, 4303928, 4, { -451.373688f, 24.800070f, 73.862427f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2001026, 0, 4, { -451.305206f, 24.873600f, 73.806000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2002798, 0, 4, { -355.665405f, 41.884102f, 279.420288f }, 1.550000f, -1.570796f ); - instance->registerEObj( "sgvf_w_lvd_b0250", 2002801, 4478011, 4, { -346.181488f, 42.801510f, 279.988708f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_4", 2002799, 0, 4, { -415.959198f, 42.400002f, 280.898804f }, 1.550000f, -1.570796f ); - instance->registerEObj( "sgvf_w_lvd_b0250_1", 2002802, 4478013, 4, { -415.761597f, 42.400002f, 279.982788f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_5", 2002800, 0, 4, { -452.406799f, 42.400002f, 239.395096f }, 1.550000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0250_2", 2002803, 4478015, 4, { -451.081909f, 41.580811f, 243.305099f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0269", 2002839, 4493435, 4, { -413.650909f, 42.000000f, 279.285889f }, 0.991760f, 0.000048f ); - // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop - instance->registerEObj( "sgvf_w_lvd_b0269_1", 2002840, 4493436, 4, { -450.220612f, 41.580811f, 247.690399f }, 0.991760f, 0.000048f ); - // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop - instance->registerEObj( "Allaganteleporter_1", 2002807, 3445282, 4, { -301.062592f, 54.375320f, 290.201904f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Allaganteleporter_2", 2002808, 3974161, 4, { -457.203400f, 38.418018f, 104.051903f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut", 2002804, 0, 4, { -451.176910f, 25.504910f, 18.912251f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_l1r1_trash2wall", 2001027, 4304910, 4, { 191.423996f, 51.658699f, 280.097992f }, 0.400000f, 0.000000f ); - // States -> on off - instance->registerEObj( "sgpl_l1r1_trash2line", 2001028, 4304912, 4, { 191.145798f, 51.767059f, 279.359497f }, 0.400000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001032, 0, 4, { 409.496094f, 66.240303f, 280.004395f }, 0.800000f, -1.570451f ); - instance->registerEObj( "sgpl_l1r1_boss2wall", 2001031, 4304071, 4, { 438.027588f, 69.382690f, 281.602203f }, 0.778198f, -1.570451f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Allaganteleporter_3", 2002809, 3445284, 4, { 115.688499f, 65.110123f, 280.018311f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_7", 2002813, 4199883, 4, { 253.669495f, 51.066391f, 244.695007f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2002814, 4199882, 4, { 253.676102f, 51.066399f, 279.965607f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2002815, 4199881, 4, { 253.683899f, 51.066360f, 315.213013f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2002816, 4199880, 4, { 213.707596f, 51.052799f, 244.895493f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2002817, 4199878, 4, { 213.688202f, 51.052799f, 280.125214f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2002818, 4199879, 4, { 213.723404f, 51.052799f, 315.105286f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganteleporter_4", 2002810, 3974166, 4, { 349.215515f, 60.567490f, 268.536591f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut_1", 2002805, 0, 4, { 455.122894f, 66.249268f, 279.987701f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_13", 2001030, 4199894, 4, { 264.739899f, 50.679981f, 279.921509f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_l1r1_boss3wall", 2001033, 4305031, 4, { -110.210899f, 44.083248f, -116.227997f }, 0.381470f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_14", 2001034, 0, 4, { -110.254898f, 44.168098f, -111.387901f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2001035, 4317566, 4, { -110.054497f, 46.072929f, -214.578705f }, 0.400000f, 0.000000f ); - instance->registerEObj( "sgpl_l1r1_boss3wall_1", 2001036, 4305191, 4, { -111.224899f, 67.886620f, -344.147797f }, 0.400000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_16", 2001037, 0, 4, { -109.930298f, 67.892403f, -338.731415f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Energytowerconsole", 2001038, 0, 4, { -85.032784f, 70.241432f, -343.493713f }, 0.800000f, 1.570451f ); - instance->registerEObj( "Energytowerconsole_1", 2001039, 0, 4, { -85.044861f, 70.240898f, -393.307587f }, 0.800000f, 0.000000f ); - instance->registerEObj( "Energytowerconsole_2", 2001040, 0, 4, { -134.983994f, 70.240898f, -343.431213f }, 0.800000f, 0.000000f ); - instance->registerEObj( "Energytowerconsole_3", 2001041, 0, 4, { -134.925201f, 70.240898f, -393.378296f }, 0.800000f, -1.570451f ); - instance->registerEObj( "Allaganteleporter_5", 2002811, 3445283, 4, { -117.500000f, 39.417461f, -60.409302f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2002819, 4317548, 4, { -109.942200f, 44.168140f, -140.697403f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2002820, 4317564, 4, { -109.933800f, 44.168140f, -190.218903f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganteleporter_6", 2002812, 3974167, 4, { -117.461098f, 57.435680f, -288.075104f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut_2", 2002806, 0, 4, { -109.976601f, 68.215019f, -378.115906f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2002821, 4407451, 4, { -110.134598f, 68.248489f, -367.669708f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganteleporter_7", 2002822, 4322323, 4, { -123.763496f, 650.608582f, 254.596695f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_l1r1_boss4wall", 2001042, 4491496, 4, { -110.122498f, 650.015808f, 227.968597f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_20", 2001043, 0, 4, { -110.052299f, 650.020020f, 227.514893f }, 0.800000f, 0.000048f ); - instance->registerEObj( "unknown_21", 2001044, 4497411, 4, { -109.941299f, 650.720886f, 194.445694f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_22", 2002823, 4101871, 4, { -86.638451f, 650.731018f, 191.568298f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_23", 2002824, 4101872, 4, { -109.887199f, 650.970886f, 207.029099f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_24", 2002825, 4101873, 4, { -132.905304f, 650.731018f, 191.279907f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_25", 2002826, 0, 4, { -78.160004f, 649.940125f, 206.024597f }, 0.800000f, -0.634151f ); - instance->registerEObj( "unknown_26", 2002832, 0, 4, { -85.569000f, 649.940125f, 213.420593f }, 0.800000f, -0.911137f ); - instance->registerEObj( "unknown_27", 2002833, 0, 4, { -94.658401f, 649.940125f, 218.672806f }, 0.800000f, -1.177247f ); - instance->registerEObj( "unknown_28", 2002834, 0, 4, { -125.350403f, 649.940125f, 218.672806f }, 0.800000f, -1.153363f ); - instance->registerEObj( "unknown_29", 2002835, 0, 4, { -134.429901f, 649.940125f, 213.420593f }, 0.800000f, -0.918754f ); - instance->registerEObj( "unknown_30", 2002836, 0, 4, { -141.827698f, 649.940125f, 206.024597f }, 0.800000f, -0.639576f ); - instance->registerEObj( "unknown_31", 2002837, 4478584, 4, { -89.563782f, 650.019226f, 209.632706f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_32", 2002838, 4478586, 4, { -131.352798f, 650.019226f, 210.327194f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -110.009903f, 650.972229f, 157.832199f }, 0.793408f, 0.000048f ); - instance->registerEObj( "unknown_33", 2001029, 4499125, 4, { -109.987602f, 650.731018f, 181.576202f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002108, 0, 4, { -109.946503f, 44.168140f, -165.619995f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4317322, 5, { -110.032799f, 30.372690f, 417.614990f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Allaganteleporter", 2001023, 3445281, 4, { -117.450104f, 45.942120f, 317.195892f }, + 0.778198f, 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0294", 2002793, 4493308, 4, { -148.301498f, 48.301128f, 279.915802f }, + 1.000000f, 0.000000f ); + // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop + instance->registerEObj( "sgvf_w_lvd_b0294_1", 2002794, 4493309, 4, { -109.977203f, 48.251709f, 243.024094f }, + 0.991760f, 0.000048f ); + // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop + instance->registerEObj( "sgvf_w_lvd_b0294_2", 2002795, 4493310, 4, { -71.722931f, 48.301121f, 280.086487f }, + 1.000000f, 0.000000f ); + // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop + instance->registerEObj( "unknown_1", 2001024, 4199521, 4, { -451.214386f, 41.580811f, 182.050903f }, 1.000000f, + 0.000048f ); + instance->registerEObj( "sgpl_l1r1_boss1wall", 2001025, 4303928, 4, { -451.373688f, 24.800070f, 73.862427f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2001026, 0, 4, { -451.305206f, 24.873600f, 73.806000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2002798, 0, 4, { -355.665405f, 41.884102f, 279.420288f }, 1.550000f, + -1.570796f ); + instance->registerEObj( "sgvf_w_lvd_b0250", 2002801, 4478011, 4, { -346.181488f, 42.801510f, 279.988708f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_4", 2002799, 0, 4, { -415.959198f, 42.400002f, 280.898804f }, 1.550000f, + -1.570796f ); + instance->registerEObj( "sgvf_w_lvd_b0250_1", 2002802, 4478013, 4, { -415.761597f, 42.400002f, 279.982788f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_5", 2002800, 0, 4, { -452.406799f, 42.400002f, 239.395096f }, 1.550000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0250_2", 2002803, 4478015, 4, { -451.081909f, 41.580811f, 243.305099f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0269", 2002839, 4493435, 4, { -413.650909f, 42.000000f, 279.285889f }, + 0.991760f, 0.000048f ); + // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop + instance->registerEObj( "sgvf_w_lvd_b0269_1", 2002840, 4493436, 4, { -450.220612f, 41.580811f, 247.690399f }, + 0.991760f, 0.000048f ); + // States -> barrier_2loop barrier_stop barrier_loop barrier_2stop + instance->registerEObj( "Allaganteleporter_1", 2002807, 3445282, 4, { -301.062592f, 54.375320f, 290.201904f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Allaganteleporter_2", 2002808, 3974161, 4, { -457.203400f, 38.418018f, 104.051903f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Shortcut", 2002804, 0, 4, { -451.176910f, 25.504910f, 18.912251f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_l1r1_trash2wall", 2001027, 4304910, 4, { 191.423996f, 51.658699f, 280.097992f }, + 0.400000f, 0.000000f ); + // States -> on off + instance->registerEObj( "sgpl_l1r1_trash2line", 2001028, 4304912, 4, { 191.145798f, 51.767059f, 279.359497f }, + 0.400000f, 0.000000f ); + instance->registerEObj( "unknown_6", 2001032, 0, 4, { 409.496094f, 66.240303f, 280.004395f }, 0.800000f, + -1.570451f ); + instance->registerEObj( "sgpl_l1r1_boss2wall", 2001031, 4304071, 4, { 438.027588f, 69.382690f, 281.602203f }, + 0.778198f, -1.570451f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Allaganteleporter_3", 2002809, 3445284, 4, { 115.688499f, 65.110123f, 280.018311f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_7", 2002813, 4199883, 4, { 253.669495f, 51.066391f, 244.695007f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2002814, 4199882, 4, { 253.676102f, 51.066399f, 279.965607f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2002815, 4199881, 4, { 253.683899f, 51.066360f, 315.213013f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2002816, 4199880, 4, { 213.707596f, 51.052799f, 244.895493f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2002817, 4199878, 4, { 213.688202f, 51.052799f, 280.125214f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2002818, 4199879, 4, { 213.723404f, 51.052799f, 315.105286f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganteleporter_4", 2002810, 3974166, 4, { 349.215515f, 60.567490f, 268.536591f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Shortcut_1", 2002805, 0, 4, { 455.122894f, 66.249268f, 279.987701f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_13", 2001030, 4199894, 4, { 264.739899f, 50.679981f, 279.921509f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_l1r1_boss3wall", 2001033, 4305031, 4, { -110.210899f, 44.083248f, -116.227997f }, + 0.381470f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_14", 2001034, 0, 4, { -110.254898f, 44.168098f, -111.387901f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2001035, 4317566, 4, { -110.054497f, 46.072929f, -214.578705f }, 0.400000f, + 0.000000f ); + instance->registerEObj( "sgpl_l1r1_boss3wall_1", 2001036, 4305191, 4, { -111.224899f, 67.886620f, -344.147797f }, + 0.400000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_16", 2001037, 0, 4, { -109.930298f, 67.892403f, -338.731415f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Energytowerconsole", 2001038, 0, 4, { -85.032784f, 70.241432f, -343.493713f }, 0.800000f, + 1.570451f ); + instance->registerEObj( "Energytowerconsole_1", 2001039, 0, 4, { -85.044861f, 70.240898f, -393.307587f }, 0.800000f, + 0.000000f ); + instance->registerEObj( "Energytowerconsole_2", 2001040, 0, 4, { -134.983994f, 70.240898f, -343.431213f }, + 0.800000f, 0.000000f ); + instance->registerEObj( "Energytowerconsole_3", 2001041, 0, 4, { -134.925201f, 70.240898f, -393.378296f }, + 0.800000f, -1.570451f ); + instance->registerEObj( "Allaganteleporter_5", 2002811, 3445283, 4, { -117.500000f, 39.417461f, -60.409302f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_17", 2002819, 4317548, 4, { -109.942200f, 44.168140f, -140.697403f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2002820, 4317564, 4, { -109.933800f, 44.168140f, -190.218903f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganteleporter_6", 2002812, 3974167, 4, { -117.461098f, 57.435680f, -288.075104f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Shortcut_2", 2002806, 0, 4, { -109.976601f, 68.215019f, -378.115906f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2002821, 4407451, 4, { -110.134598f, 68.248489f, -367.669708f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganteleporter_7", 2002822, 4322323, 4, { -123.763496f, 650.608582f, 254.596695f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgpl_l1r1_boss4wall", 2001042, 4491496, 4, { -110.122498f, 650.015808f, 227.968597f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_20", 2001043, 0, 4, { -110.052299f, 650.020020f, 227.514893f }, 0.800000f, + 0.000048f ); + instance->registerEObj( "unknown_21", 2001044, 4497411, 4, { -109.941299f, 650.720886f, 194.445694f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_22", 2002823, 4101871, 4, { -86.638451f, 650.731018f, 191.568298f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_23", 2002824, 4101872, 4, { -109.887199f, 650.970886f, 207.029099f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_24", 2002825, 4101873, 4, { -132.905304f, 650.731018f, 191.279907f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_25", 2002826, 0, 4, { -78.160004f, 649.940125f, 206.024597f }, 0.800000f, + -0.634151f ); + instance->registerEObj( "unknown_26", 2002832, 0, 4, { -85.569000f, 649.940125f, 213.420593f }, 0.800000f, + -0.911137f ); + instance->registerEObj( "unknown_27", 2002833, 0, 4, { -94.658401f, 649.940125f, 218.672806f }, 0.800000f, + -1.177247f ); + instance->registerEObj( "unknown_28", 2002834, 0, 4, { -125.350403f, 649.940125f, 218.672806f }, 0.800000f, + -1.153363f ); + instance->registerEObj( "unknown_29", 2002835, 0, 4, { -134.429901f, 649.940125f, 213.420593f }, 0.800000f, + -0.918754f ); + instance->registerEObj( "unknown_30", 2002836, 0, 4, { -141.827698f, 649.940125f, 206.024597f }, 0.800000f, + -0.639576f ); + instance->registerEObj( "unknown_31", 2002837, 4478584, 4, { -89.563782f, 650.019226f, 209.632706f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_32", 2002838, 4478586, 4, { -131.352798f, 650.019226f, 210.327194f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -110.009903f, 650.972229f, 157.832199f }, 0.793408f, 0.000048f ); + instance->registerEObj( "unknown_33", 2001029, 4499125, 4, { -109.987602f, 650.731018f, 181.576202f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheRoyalCityofRabanastre.cpp b/src/servers/Scripts/instances/raids/TheRoyalCityofRabanastre.cpp index 69643e23..0336e666 100644 --- a/src/servers/Scripts/instances/raids/TheRoyalCityofRabanastre.cpp +++ b/src/servers/Scripts/instances/raids/TheRoyalCityofRabanastre.cpp @@ -1,26 +1,29 @@ #include #include -class TheRoyalCityofRabanastre : public InstanceContentScript +class TheRoyalCityofRabanastre : + public InstanceContentScript { public: - TheRoyalCityofRabanastre() : InstanceContentScript( 30058 ) - { } + TheRoyalCityofRabanastre() : + InstanceContentScript( 30058 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn1.cpp b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn1.cpp index 67aed517..c54a8c76 100644 --- a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn1.cpp +++ b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn1.cpp @@ -1,42 +1,57 @@ #include #include -class TheSecondCoilofBahamutSavageTurn1 : public InstanceContentScript +class TheSecondCoilofBahamutSavageTurn1 : + public InstanceContentScript { public: - TheSecondCoilofBahamutSavageTurn1() : InstanceContentScript( 30012 ) - { } + TheSecondCoilofBahamutSavageTurn1() : + InstanceContentScript( 30012 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2003012, 0, 4, { -266.882690f, 10.421330f, 43.491699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2003043, 0, 4, { -261.309113f, 10.383500f, 37.739429f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2003044, 0, 4, { -259.553802f, 10.421330f, 31.442730f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2003045, 0, 4, { -262.154510f, 10.421330f, 23.808010f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4614306, 5, { -120.168602f, 11.010820f, -99.074913f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -131.611206f, 9.156082f, -82.660057f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2001269, 4544126, 4, { -137.669403f, 9.502172f, -11.353470f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Destination", 2002372, 4579467, 4, { -171.978897f, -49.907219f, -10.220380f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1b2_bosswall", 2002872, 4616656, 4, { -248.873596f, 10.236450f, 33.155060f }, 1.000000f, -0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_5", 2002735, 0, 4, { -246.919006f, 9.938496f, 34.239399f }, 1.000000f, -1.570451f ); - instance->registerEObj( "Allaganterminal", 2003416, 4664435, 4, { -314.106995f, 9.414734f, 43.198238f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_lvd_b0118_col_char", 2003421, 4651262, 4, { -292.780701f, 10.351920f, 39.414989f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_6", 2003428, 4615269, 4, { -120.556702f, 8.820233f, -76.764412f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2003012, 0, 4, { -266.882690f, 10.421330f, 43.491699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2003043, 0, 4, { -261.309113f, 10.383500f, 37.739429f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2003044, 0, 4, { -259.553802f, 10.421330f, 31.442730f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2003045, 0, 4, { -262.154510f, 10.421330f, 23.808010f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4614306, 5, { -120.168602f, 11.010820f, -99.074913f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -131.611206f, 9.156082f, -82.660057f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2001269, 4544126, 4, { -137.669403f, 9.502172f, -11.353470f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Destination", 2002372, 4579467, 4, { -171.978897f, -49.907219f, -10.220380f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_f1b2_bosswall", 2002872, 4616656, 4, { -248.873596f, 10.236450f, 33.155060f }, + 1.000000f, -0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_5", 2002735, 0, 4, { -246.919006f, 9.938496f, 34.239399f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "Allaganterminal", 2003416, 4664435, 4, { -314.106995f, 9.414734f, 43.198238f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_lvd_b0118_col_char", 2003421, 4651262, 4, { -292.780701f, 10.351920f, 39.414989f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_6", 2003428, 4615269, 4, { -120.556702f, 8.820233f, -76.764412f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn2.cpp b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn2.cpp index cfee5d24..33a627e0 100644 --- a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn2.cpp +++ b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn2.cpp @@ -1,42 +1,58 @@ #include #include -class TheSecondCoilofBahamutSavageTurn2 : public InstanceContentScript +class TheSecondCoilofBahamutSavageTurn2 : + public InstanceContentScript { public: - TheSecondCoilofBahamutSavageTurn2() : InstanceContentScript( 30013 ) - { } + TheSecondCoilofBahamutSavageTurn2() : + InstanceContentScript( 30013 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2003299, 4646804, 4, { -449.999908f, 800.027222f, 69.995399f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2003311, 4646803, 4, { -449.999908f, 800.027222f, 69.995354f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Ripenedbulb", 2003293, 4646806, 4, { -449.999908f, 800.027222f, 69.995399f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4646962, 5, { -358.417694f, -270.655487f, -0.875555f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -384.512085f, -270.435699f, -2.731445f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_2", 2002469, 4646048, 4, { -447.239197f, 799.923584f, 70.054077f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_lvd_colwithnavi", 2002470, 4646986, 4, { -448.371613f, 800.000000f, 20.807449f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2002471, 4646049, 4, { -372.196899f, -270.740997f, -1.014158f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Innerbulkhead", 2003415, 0, 4, { -375.434814f, -268.802399f, -0.859896f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganterminal", 2003417, 4682781, 4, { -450.001099f, 799.969971f, 143.447495f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2002735, 0, 4, { -449.981689f, 800.000000f, 47.625530f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_f1b2_bosswall", 2002872, 4646969, 4, { -449.981689f, 801.188416f, 47.036610f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_w_lvd_b0118_col_char", 2002472, 4646987, 4, { -449.121704f, 800.000000f, 91.049332f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2003299, 4646804, 4, { -449.999908f, 800.027222f, 69.995399f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2003311, 4646803, 4, { -449.999908f, 800.027222f, 69.995354f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Ripenedbulb", 2003293, 4646806, 4, { -449.999908f, 800.027222f, 69.995399f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4646962, 5, { -358.417694f, -270.655487f, -0.875555f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -384.512085f, -270.435699f, -2.731445f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_2", 2002469, 4646048, 4, { -447.239197f, 799.923584f, 70.054077f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_lvd_colwithnavi", 2002470, 4646986, 4, { -448.371613f, 800.000000f, 20.807449f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2002471, 4646049, 4, { -372.196899f, -270.740997f, -1.014158f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Innerbulkhead", 2003415, 0, 4, { -375.434814f, -268.802399f, -0.859896f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganterminal", 2003417, 4682781, 4, { -450.001099f, 799.969971f, 143.447495f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2002735, 0, 4, { -449.981689f, 800.000000f, 47.625530f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_f1b2_bosswall", 2002872, 4646969, 4, { -449.981689f, 801.188416f, 47.036610f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_w_lvd_b0118_col_char", 2002472, 4646987, 4, { -449.121704f, 800.000000f, 91.049332f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn3.cpp b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn3.cpp index 58d862b0..9345cf4b 100644 --- a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn3.cpp +++ b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn3.cpp @@ -1,105 +1,156 @@ #include #include -class TheSecondCoilofBahamutSavageTurn3 : public InstanceContentScript +class TheSecondCoilofBahamutSavageTurn3 : + public InstanceContentScript { public: - TheSecondCoilofBahamutSavageTurn3() : InstanceContentScript( 30014 ) - { } + TheSecondCoilofBahamutSavageTurn3() : + InstanceContentScript( 30014 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Fragrantbloom", 2003342, 0, 4, { 5.540659f, -506.930115f, 105.670197f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Destination", 2003387, 0, 4, { 5.248638f, -506.929993f, 104.130501f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Sylphpodling", 2003348, 0, 4, { 4.584954f, -506.929993f, 106.997597f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Skybulb", 2003358, 0, 4, { 3.469964f, -506.929993f, 104.900299f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Destination_1", 2003289, 4681305, 4, { -28.488001f, -506.700012f, 105.307297f }, 1.000000f, -1.570796f ); - // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 - instance->registerEObj( "Destination_2", 2003289, 4681302, 4, { -2.644600f, -506.700012f, 79.710602f }, 1.000000f, 0.000000f ); - // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 - instance->registerEObj( "Destination_3", 2003289, 4681303, 4, { 23.007401f, -506.700012f, 105.309097f }, 1.000000f, 1.570796f ); - // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 - instance->registerEObj( "Destination_4", 2003289, 4681304, 4, { -2.685100f, -506.700012f, 131.011307f }, 1.000000f, -3.141593f ); - // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 - instance->registerEObj( "Entrance", 2000182, 4649322, 5, { 71.763351f, -505.710297f, -183.265305f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 78.751831f, -508.192688f, -166.063995f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_f1b3_b0384", 2003117, 4649426, 4, { 71.787033f, -523.938416f, -91.769341f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_1", 2003149, 4649428, 4, { 71.647507f, -539.766907f, -10.543050f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_2", 2003178, 4649429, 4, { -72.118347f, -523.848206f, -91.955490f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_3", 2003179, 4649430, 4, { -71.857773f, -539.706909f, -11.043210f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_4", 2003180, 4649427, 4, { 32.211380f, -491.286011f, -105.322304f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_5", 2003187, 4649436, 4, { 31.604389f, -498.100800f, -68.374847f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_6", 2003188, 4649435, 4, { 31.776440f, -506.867188f, -22.942039f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_7", 2003196, 4649437, 4, { 31.800430f, -514.005920f, 12.637740f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_8", 2003198, 4649442, 4, { -32.055038f, -491.285187f, -104.874397f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_9", 2003200, 4649444, 4, { -31.019110f, -497.691315f, -68.166161f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_10", 2003201, 4649443, 4, { -32.114700f, -507.132690f, -23.686880f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_11", 2003202, 4649445, 4, { -32.647800f, -514.520386f, 12.987520f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_12", 2003203, 4649441, 4, { 39.004780f, -451.620209f, -100.687401f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_13", 2003204, 4649439, 4, { 36.536411f, -459.008911f, -57.215809f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_14", 2003211, 4649440, 4, { 36.232590f, -468.665405f, -16.744450f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_15", 2003212, 4649438, 4, { 39.456009f, -475.805695f, 24.956329f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_16", 2003220, 4649449, 4, { -38.816181f, -450.369904f, -100.764801f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_17", 2003272, 4649447, 4, { -39.033329f, -459.976013f, -57.518230f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_18", 2003273, 4649448, 4, { -38.558640f, -467.593109f, -20.011221f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_19", 2003274, 4649446, 4, { -39.651970f, -475.626709f, 24.849569f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_20", 2003275, 4649434, 4, { 72.266907f, -442.713989f, -75.343910f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_21", 2003286, 4649431, 4, { 71.894348f, -458.468506f, 5.267881f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_22", 2003287, 4649432, 4, { -71.852654f, -442.697113f, -75.916992f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_23", 2003288, 4649433, 4, { -71.777451f, -458.403107f, 4.927437f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "unknown_0", 2002473, 4649110, 4, { 71.824219f, -515.343018f, -132.707794f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2002474, 4649108, 4, { 71.847183f, -531.168091f, -51.265450f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2002579, 4649109, 4, { 71.850891f, -546.907227f, 29.809669f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Boxofcrystals", 2002592, 4649105, 4, { -71.854797f, -515.314209f, -132.724899f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Boxofcrystals_1", 2002593, 4649103, 4, { -71.848587f, -531.122681f, -51.389240f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Boxofcrystals_2", 2002594, 4649104, 4, { -71.852577f, -547.315125f, 29.686489f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2002885, 4649106, 4, { -0.000875f, -482.805389f, -84.219566f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2002886, 4649107, 4, { -0.003072f, -498.601105f, -3.013031f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2003453, 4672990, 4, { 0.015892f, -506.314087f, 46.485531f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1b3_bosswall", 2002872, 4649551, 4, { -2.840854f, -506.553986f, 68.877274f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_6", 2002735, 0, 4, { -2.788200f, -507.313385f, 68.893646f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganterminal", 2003418, 4672991, 4, { -2.071490f, -506.798004f, 144.172394f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Frontalbulkhead", 2003420, 4649112, 4, { -0.091233f, -505.180695f, 26.463760f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1b3_boss_col", 2003422, 4651265, 4, { -2.657619f, -506.929993f, 124.653297f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_board_col_only", 2003677, 4681484, 4, { -2.678503f, -506.980103f, 84.769417f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Fragrantbloom", 2003342, 0, 4, { 5.540659f, -506.930115f, 105.670197f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Destination", 2003387, 0, 4, { 5.248638f, -506.929993f, 104.130501f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Sylphpodling", 2003348, 0, 4, { 4.584954f, -506.929993f, 106.997597f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Skybulb", 2003358, 0, 4, { 3.469964f, -506.929993f, 104.900299f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Destination_1", 2003289, 4681305, 4, { -28.488001f, -506.700012f, 105.307297f }, 1.000000f, + -1.570796f ); + // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 + instance->registerEObj( "Destination_2", 2003289, 4681302, 4, { -2.644600f, -506.700012f, 79.710602f }, 1.000000f, + 0.000000f ); + // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 + instance->registerEObj( "Destination_3", 2003289, 4681303, 4, { 23.007401f, -506.700012f, 105.309097f }, 1.000000f, + 1.570796f ); + // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 + instance->registerEObj( "Destination_4", 2003289, 4681304, 4, { -2.685100f, -506.700012f, 131.011307f }, 1.000000f, + -3.141593f ); + // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 + instance->registerEObj( "Entrance", 2000182, 4649322, 5, { 71.763351f, -505.710297f, -183.265305f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 78.751831f, -508.192688f, -166.063995f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_f1b3_b0384", 2003117, 4649426, 4, { 71.787033f, -523.938416f, -91.769341f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_1", 2003149, 4649428, 4, { 71.647507f, -539.766907f, -10.543050f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_2", 2003178, 4649429, 4, { -72.118347f, -523.848206f, -91.955490f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_3", 2003179, 4649430, 4, { -71.857773f, -539.706909f, -11.043210f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_4", 2003180, 4649427, 4, { 32.211380f, -491.286011f, -105.322304f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_5", 2003187, 4649436, 4, { 31.604389f, -498.100800f, -68.374847f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_6", 2003188, 4649435, 4, { 31.776440f, -506.867188f, -22.942039f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_7", 2003196, 4649437, 4, { 31.800430f, -514.005920f, 12.637740f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_8", 2003198, 4649442, 4, { -32.055038f, -491.285187f, -104.874397f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_9", 2003200, 4649444, 4, { -31.019110f, -497.691315f, -68.166161f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_10", 2003201, 4649443, 4, { -32.114700f, -507.132690f, -23.686880f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_11", 2003202, 4649445, 4, { -32.647800f, -514.520386f, 12.987520f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_12", 2003203, 4649441, 4, { 39.004780f, -451.620209f, -100.687401f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_13", 2003204, 4649439, 4, { 36.536411f, -459.008911f, -57.215809f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_14", 2003211, 4649440, 4, { 36.232590f, -468.665405f, -16.744450f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_15", 2003212, 4649438, 4, { 39.456009f, -475.805695f, 24.956329f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_16", 2003220, 4649449, 4, { -38.816181f, -450.369904f, -100.764801f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_17", 2003272, 4649447, 4, { -39.033329f, -459.976013f, -57.518230f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_18", 2003273, 4649448, 4, { -38.558640f, -467.593109f, -20.011221f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_19", 2003274, 4649446, 4, { -39.651970f, -475.626709f, 24.849569f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_20", 2003275, 4649434, 4, { 72.266907f, -442.713989f, -75.343910f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_21", 2003286, 4649431, 4, { 71.894348f, -458.468506f, 5.267881f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_22", 2003287, 4649432, 4, { -71.852654f, -442.697113f, -75.916992f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_23", 2003288, 4649433, 4, { -71.777451f, -458.403107f, 4.927437f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "unknown_0", 2002473, 4649110, 4, { 71.824219f, -515.343018f, -132.707794f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2002474, 4649108, 4, { 71.847183f, -531.168091f, -51.265450f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2002579, 4649109, 4, { 71.850891f, -546.907227f, 29.809669f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Boxofcrystals", 2002592, 4649105, 4, { -71.854797f, -515.314209f, -132.724899f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Boxofcrystals_1", 2002593, 4649103, 4, { -71.848587f, -531.122681f, -51.389240f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Boxofcrystals_2", 2002594, 4649104, 4, { -71.852577f, -547.315125f, 29.686489f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_3", 2002885, 4649106, 4, { -0.000875f, -482.805389f, -84.219566f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_4", 2002886, 4649107, 4, { -0.003072f, -498.601105f, -3.013031f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2003453, 4672990, 4, { 0.015892f, -506.314087f, 46.485531f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_f1b3_bosswall", 2002872, 4649551, 4, { -2.840854f, -506.553986f, 68.877274f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_6", 2002735, 0, 4, { -2.788200f, -507.313385f, 68.893646f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganterminal", 2003418, 4672991, 4, { -2.071490f, -506.798004f, 144.172394f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Frontalbulkhead", 2003420, 4649112, 4, { -0.091233f, -505.180695f, 26.463760f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_f1b3_boss_col", 2003422, 4651265, 4, { -2.657619f, -506.929993f, 124.653297f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_board_col_only", 2003677, 4681484, 4, { -2.678503f, -506.980103f, 84.769417f }, + 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn4.cpp b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn4.cpp index 1330ce2c..94ea3f2e 100644 --- a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn4.cpp +++ b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutSavageTurn4.cpp @@ -1,41 +1,53 @@ #include #include -class TheSecondCoilofBahamutSavageTurn4 : public InstanceContentScript +class TheSecondCoilofBahamutSavageTurn4 : + public InstanceContentScript { public: - TheSecondCoilofBahamutSavageTurn4() : InstanceContentScript( 30015 ) - { } + TheSecondCoilofBahamutSavageTurn4() : + InstanceContentScript( 30015 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2003412, 0, 4, { -1.586798f, 0.000000f, 6.322940f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2003413, 4592650, 4, { 0.246630f, 0.000000f, -0.575616f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2003414, 4596280, 4, { 2.330916f, 0.000000f, 1.675908f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2003411, 4585907, 4, { -0.036626f, -0.000000f, -0.514996f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2003392, 4632812, 4, { 0.000000f, -0.000002f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2003393, 0, 4, { 16.296391f, -0.000002f, -4.751545f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2003394, 0, 4, { 11.781120f, -0.000001f, 4.780689f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2003391, 0, 4, { 8.938168f, 0.060000f, -11.440830f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0427", 2003427, 4664504, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - // States -> on off - instance->registerEObj( "Entrance", 2000182, 4614314, 5, { -0.059309f, -0.000001f, 15.090750f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Allaganterminal", 2003419, 4682784, 4, { -15.104980f, 0.572263f, -27.316570f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2003452, 4615853, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2003678, 4663755, 4, { 16.207529f, 0.571903f, 28.091551f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2003412, 0, 4, { -1.586798f, 0.000000f, 6.322940f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2003413, 4592650, 4, { 0.246630f, 0.000000f, -0.575616f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2003414, 4596280, 4, { 2.330916f, 0.000000f, 1.675908f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2003411, 4585907, 4, { -0.036626f, -0.000000f, -0.514996f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2003392, 4632812, 4, { 0.000000f, -0.000002f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2003393, 0, 4, { 16.296391f, -0.000002f, -4.751545f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_6", 2003394, 0, 4, { 11.781120f, -0.000001f, 4.780689f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_7", 2003391, 0, 4, { 8.938168f, 0.060000f, -11.440830f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0427", 2003427, 4664504, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + // States -> on off + instance->registerEObj( "Entrance", 2000182, 4614314, 5, { -0.059309f, -0.000001f, 15.090750f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Allaganterminal", 2003419, 4682784, 4, { -15.104980f, 0.572263f, -27.316570f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2003452, 4615853, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2003678, 4663755, 4, { 16.207529f, 0.571903f, 28.091551f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn1.cpp b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn1.cpp index 0e06439c..b053b609 100644 --- a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn1.cpp +++ b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn1.cpp @@ -1,42 +1,57 @@ #include #include -class TheSecondCoilofBahamutTurn1 : public InstanceContentScript +class TheSecondCoilofBahamutTurn1 : + public InstanceContentScript { public: - TheSecondCoilofBahamutTurn1() : InstanceContentScript( 30007 ) - { } + TheSecondCoilofBahamutTurn1() : + InstanceContentScript( 30007 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2003012, 0, 4, { -266.882690f, 10.421330f, 43.491699f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2003043, 0, 4, { -261.309113f, 10.383500f, 37.739429f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2003044, 0, 4, { -259.553802f, 10.421330f, 31.442730f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2003045, 0, 4, { -262.154510f, 10.421330f, 23.808010f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4614306, 5, { -120.168602f, 11.010820f, -99.074913f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -131.611206f, 9.156082f, -82.660057f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2001269, 4544126, 4, { -137.669403f, 9.502172f, -11.353470f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Destination", 2002372, 4579467, 4, { -171.978897f, -49.907219f, -10.220380f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1b2_bosswall", 2002872, 4616656, 4, { -248.873596f, 10.236450f, 33.155060f }, 1.000000f, -0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_5", 2002735, 0, 4, { -246.919006f, 9.938496f, 34.239399f }, 1.000000f, -1.570451f ); - instance->registerEObj( "Allaganterminal", 2003416, 4664435, 4, { -314.106995f, 9.414734f, 43.198238f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_lvd_b0118_col_char", 2003421, 4651262, 4, { -292.780701f, 10.351920f, 39.414989f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_6", 2003428, 4615269, 4, { -120.556702f, 8.820233f, -76.764412f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2003012, 0, 4, { -266.882690f, 10.421330f, 43.491699f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2003043, 0, 4, { -261.309113f, 10.383500f, 37.739429f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2003044, 0, 4, { -259.553802f, 10.421330f, 31.442730f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2003045, 0, 4, { -262.154510f, 10.421330f, 23.808010f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4614306, 5, { -120.168602f, 11.010820f, -99.074913f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -131.611206f, 9.156082f, -82.660057f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2001269, 4544126, 4, { -137.669403f, 9.502172f, -11.353470f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Destination", 2002372, 4579467, 4, { -171.978897f, -49.907219f, -10.220380f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_f1b2_bosswall", 2002872, 4616656, 4, { -248.873596f, 10.236450f, 33.155060f }, + 1.000000f, -0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_5", 2002735, 0, 4, { -246.919006f, 9.938496f, 34.239399f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "Allaganterminal", 2003416, 4664435, 4, { -314.106995f, 9.414734f, 43.198238f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_lvd_b0118_col_char", 2003421, 4651262, 4, { -292.780701f, 10.351920f, 39.414989f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_6", 2003428, 4615269, 4, { -120.556702f, 8.820233f, -76.764412f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn2.cpp b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn2.cpp index 382fc38f..f071b21b 100644 --- a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn2.cpp +++ b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn2.cpp @@ -1,42 +1,58 @@ #include #include -class TheSecondCoilofBahamutTurn2 : public InstanceContentScript +class TheSecondCoilofBahamutTurn2 : + public InstanceContentScript { public: - TheSecondCoilofBahamutTurn2() : InstanceContentScript( 30008 ) - { } + TheSecondCoilofBahamutTurn2() : + InstanceContentScript( 30008 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2003299, 4646804, 4, { -449.999908f, 800.027222f, 69.995399f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2003311, 4646803, 4, { -449.999908f, 800.027222f, 69.995354f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Ripenedbulb", 2003293, 4646806, 4, { -449.999908f, 800.027222f, 69.995399f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4646962, 5, { -358.417694f, -270.655487f, -0.875555f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -384.512085f, -270.435699f, -2.731445f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_2", 2002469, 4646048, 4, { -447.239197f, 799.923584f, 70.054077f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_w_lvd_colwithnavi", 2002470, 4646986, 4, { -448.371613f, 800.000000f, 20.807449f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2002471, 4646049, 4, { -372.196899f, -270.740997f, -1.014158f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Innerbulkhead", 2003415, 0, 4, { -375.434814f, -268.802399f, -0.859896f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganterminal", 2003417, 4682781, 4, { -450.001099f, 799.969971f, 143.447495f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2002735, 0, 4, { -449.981689f, 800.000000f, 47.625530f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgpl_f1b2_bosswall", 2002872, 4646969, 4, { -449.981689f, 801.188416f, 47.036610f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgpl_w_lvd_b0118_col_char", 2002472, 4646987, 4, { -449.121704f, 800.000000f, 91.049332f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2003299, 4646804, 4, { -449.999908f, 800.027222f, 69.995399f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2003311, 4646803, 4, { -449.999908f, 800.027222f, 69.995354f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Ripenedbulb", 2003293, 4646806, 4, { -449.999908f, 800.027222f, 69.995399f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4646962, 5, { -358.417694f, -270.655487f, -0.875555f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -384.512085f, -270.435699f, -2.731445f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_2", 2002469, 4646048, 4, { -447.239197f, 799.923584f, 70.054077f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_w_lvd_colwithnavi", 2002470, 4646986, 4, { -448.371613f, 800.000000f, 20.807449f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2002471, 4646049, 4, { -372.196899f, -270.740997f, -1.014158f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Innerbulkhead", 2003415, 0, 4, { -375.434814f, -268.802399f, -0.859896f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganterminal", 2003417, 4682781, 4, { -450.001099f, 799.969971f, 143.447495f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2002735, 0, 4, { -449.981689f, 800.000000f, 47.625530f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgpl_f1b2_bosswall", 2002872, 4646969, 4, { -449.981689f, 801.188416f, 47.036610f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgpl_w_lvd_b0118_col_char", 2002472, 4646987, 4, { -449.121704f, 800.000000f, 91.049332f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn3.cpp b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn3.cpp index 56b59269..eccbc875 100644 --- a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn3.cpp +++ b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn3.cpp @@ -1,105 +1,156 @@ #include #include -class TheSecondCoilofBahamutTurn3 : public InstanceContentScript +class TheSecondCoilofBahamutTurn3 : + public InstanceContentScript { public: - TheSecondCoilofBahamutTurn3() : InstanceContentScript( 30009 ) - { } + TheSecondCoilofBahamutTurn3() : + InstanceContentScript( 30009 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Fragrantbloom", 2003342, 0, 4, { 5.540659f, -506.930115f, 105.670197f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Destination", 2003387, 0, 4, { 5.248638f, -506.929993f, 104.130501f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Sylphpodling", 2003348, 0, 4, { 4.584954f, -506.929993f, 106.997597f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Skybulb", 2003358, 0, 4, { 3.469964f, -506.929993f, 104.900299f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Destination_1", 2003289, 4681305, 4, { -28.488001f, -506.700012f, 105.307297f }, 1.000000f, -1.570796f ); - // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 - instance->registerEObj( "Destination_2", 2003289, 4681302, 4, { -2.644600f, -506.700012f, 79.710602f }, 1.000000f, 0.000000f ); - // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 - instance->registerEObj( "Destination_3", 2003289, 4681303, 4, { 23.007401f, -506.700012f, 105.309097f }, 1.000000f, 1.570796f ); - // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 - instance->registerEObj( "Destination_4", 2003289, 4681304, 4, { -2.685100f, -506.700012f, 131.011307f }, 1.000000f, -3.141593f ); - // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 - instance->registerEObj( "Entrance", 2000182, 4649322, 5, { 71.763351f, -505.710297f, -183.265305f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 78.751831f, -508.192688f, -166.063995f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_f1b3_b0384", 2003117, 4649426, 4, { 71.787033f, -523.938416f, -91.769341f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_1", 2003149, 4649428, 4, { 71.647507f, -539.766907f, -10.543050f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_2", 2003178, 4649429, 4, { -72.118347f, -523.848206f, -91.955490f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_3", 2003179, 4649430, 4, { -71.857773f, -539.706909f, -11.043210f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_4", 2003180, 4649427, 4, { 32.211380f, -491.286011f, -105.322304f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_5", 2003187, 4649436, 4, { 31.604389f, -498.100800f, -68.374847f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_6", 2003188, 4649435, 4, { 31.776440f, -506.867188f, -22.942039f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_7", 2003196, 4649437, 4, { 31.800430f, -514.005920f, 12.637740f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_8", 2003198, 4649442, 4, { -32.055038f, -491.285187f, -104.874397f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_9", 2003200, 4649444, 4, { -31.019110f, -497.691315f, -68.166161f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_10", 2003201, 4649443, 4, { -32.114700f, -507.132690f, -23.686880f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_11", 2003202, 4649445, 4, { -32.647800f, -514.520386f, 12.987520f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_12", 2003203, 4649441, 4, { 39.004780f, -451.620209f, -100.687401f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_13", 2003204, 4649439, 4, { 36.536411f, -459.008911f, -57.215809f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_14", 2003211, 4649440, 4, { 36.232590f, -468.665405f, -16.744450f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_15", 2003212, 4649438, 4, { 39.456009f, -475.805695f, 24.956329f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_16", 2003220, 4649449, 4, { -38.816181f, -450.369904f, -100.764801f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_17", 2003272, 4649447, 4, { -39.033329f, -459.976013f, -57.518230f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_18", 2003273, 4649448, 4, { -38.558640f, -467.593109f, -20.011221f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_19", 2003274, 4649446, 4, { -39.651970f, -475.626709f, 24.849569f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_20", 2003275, 4649434, 4, { 72.266907f, -442.713989f, -75.343910f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_21", 2003286, 4649431, 4, { 71.894348f, -458.468506f, 5.267881f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_22", 2003287, 4649432, 4, { -71.852654f, -442.697113f, -75.916992f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "sgvf_f1b3_b0384_23", 2003288, 4649433, 4, { -71.777451f, -458.403107f, 4.927437f }, 1.000000f, 0.000000f ); - // States -> vf_lese_on - instance->registerEObj( "unknown_0", 2002473, 4649110, 4, { 71.824219f, -515.343018f, -132.707794f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2002474, 4649108, 4, { 71.847183f, -531.168091f, -51.265450f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2002579, 4649109, 4, { 71.850891f, -546.907227f, 29.809669f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Boxofcrystals", 2002592, 4649105, 4, { -71.854797f, -515.314209f, -132.724899f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Boxofcrystals_1", 2002593, 4649103, 4, { -71.848587f, -531.122681f, -51.389240f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Boxofcrystals_2", 2002594, 4649104, 4, { -71.852577f, -547.315125f, 29.686489f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2002885, 4649106, 4, { -0.000875f, -482.805389f, -84.219566f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2002886, 4649107, 4, { -0.003072f, -498.601105f, -3.013031f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2003453, 4672990, 4, { 0.015892f, -506.314087f, 46.485531f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1b3_bosswall", 2002872, 4649551, 4, { -2.840854f, -506.553986f, 68.877274f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_6", 2002735, 0, 4, { -2.788200f, -507.313385f, 68.893646f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Allaganterminal", 2003418, 4672991, 4, { -2.071490f, -506.798004f, 144.172394f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Frontalbulkhead", 2003420, 4649112, 4, { -0.091233f, -505.180695f, 26.463760f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_f1b3_boss_col", 2003422, 4651265, 4, { -2.657619f, -506.929993f, 124.653297f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgpl_w_lvd_board_col_only", 2003677, 4681484, 4, { -2.678503f, -506.980103f, 84.769417f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Fragrantbloom", 2003342, 0, 4, { 5.540659f, -506.930115f, 105.670197f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Destination", 2003387, 0, 4, { 5.248638f, -506.929993f, 104.130501f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Sylphpodling", 2003348, 0, 4, { 4.584954f, -506.929993f, 106.997597f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Skybulb", 2003358, 0, 4, { 3.469964f, -506.929993f, 104.900299f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Destination_1", 2003289, 4681305, 4, { -28.488001f, -506.700012f, 105.307297f }, 1.000000f, + -1.570796f ); + // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 + instance->registerEObj( "Destination_2", 2003289, 4681302, 4, { -2.644600f, -506.700012f, 79.710602f }, 1.000000f, + 0.000000f ); + // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 + instance->registerEObj( "Destination_3", 2003289, 4681303, 4, { 23.007401f, -506.700012f, 105.309097f }, 1.000000f, + 1.570796f ); + // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 + instance->registerEObj( "Destination_4", 2003289, 4681304, 4, { -2.685100f, -506.700012f, 131.011307f }, 1.000000f, + -3.141593f ); + // States -> tower_off tower_on2off tower_up tower_off2up tower_on tower_up2on tower_step1 tower_step0_1 tower_step2 tower_step1_2 tower_step3 tower_step2_3 tower_step4 tower_step3_4 tower_step5 tower_step4_5 + instance->registerEObj( "Entrance", 2000182, 4649322, 5, { 71.763351f, -505.710297f, -183.265305f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 78.751831f, -508.192688f, -166.063995f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "sgvf_f1b3_b0384", 2003117, 4649426, 4, { 71.787033f, -523.938416f, -91.769341f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_1", 2003149, 4649428, 4, { 71.647507f, -539.766907f, -10.543050f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_2", 2003178, 4649429, 4, { -72.118347f, -523.848206f, -91.955490f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_3", 2003179, 4649430, 4, { -71.857773f, -539.706909f, -11.043210f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_4", 2003180, 4649427, 4, { 32.211380f, -491.286011f, -105.322304f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_5", 2003187, 4649436, 4, { 31.604389f, -498.100800f, -68.374847f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_6", 2003188, 4649435, 4, { 31.776440f, -506.867188f, -22.942039f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_7", 2003196, 4649437, 4, { 31.800430f, -514.005920f, 12.637740f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_8", 2003198, 4649442, 4, { -32.055038f, -491.285187f, -104.874397f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_9", 2003200, 4649444, 4, { -31.019110f, -497.691315f, -68.166161f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_10", 2003201, 4649443, 4, { -32.114700f, -507.132690f, -23.686880f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_11", 2003202, 4649445, 4, { -32.647800f, -514.520386f, 12.987520f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_12", 2003203, 4649441, 4, { 39.004780f, -451.620209f, -100.687401f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_13", 2003204, 4649439, 4, { 36.536411f, -459.008911f, -57.215809f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_14", 2003211, 4649440, 4, { 36.232590f, -468.665405f, -16.744450f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_15", 2003212, 4649438, 4, { 39.456009f, -475.805695f, 24.956329f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_16", 2003220, 4649449, 4, { -38.816181f, -450.369904f, -100.764801f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_17", 2003272, 4649447, 4, { -39.033329f, -459.976013f, -57.518230f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_18", 2003273, 4649448, 4, { -38.558640f, -467.593109f, -20.011221f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_19", 2003274, 4649446, 4, { -39.651970f, -475.626709f, 24.849569f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_20", 2003275, 4649434, 4, { 72.266907f, -442.713989f, -75.343910f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_21", 2003286, 4649431, 4, { 71.894348f, -458.468506f, 5.267881f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_22", 2003287, 4649432, 4, { -71.852654f, -442.697113f, -75.916992f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "sgvf_f1b3_b0384_23", 2003288, 4649433, 4, { -71.777451f, -458.403107f, 4.927437f }, + 1.000000f, 0.000000f ); + // States -> vf_lese_on + instance->registerEObj( "unknown_0", 2002473, 4649110, 4, { 71.824219f, -515.343018f, -132.707794f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_1", 2002474, 4649108, 4, { 71.847183f, -531.168091f, -51.265450f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2002579, 4649109, 4, { 71.850891f, -546.907227f, 29.809669f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Boxofcrystals", 2002592, 4649105, 4, { -71.854797f, -515.314209f, -132.724899f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Boxofcrystals_1", 2002593, 4649103, 4, { -71.848587f, -531.122681f, -51.389240f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Boxofcrystals_2", 2002594, 4649104, 4, { -71.852577f, -547.315125f, 29.686489f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_3", 2002885, 4649106, 4, { -0.000875f, -482.805389f, -84.219566f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_4", 2002886, 4649107, 4, { -0.003072f, -498.601105f, -3.013031f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2003453, 4672990, 4, { 0.015892f, -506.314087f, 46.485531f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_f1b3_bosswall", 2002872, 4649551, 4, { -2.840854f, -506.553986f, 68.877274f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_6", 2002735, 0, 4, { -2.788200f, -507.313385f, 68.893646f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Allaganterminal", 2003418, 4672991, 4, { -2.071490f, -506.798004f, 144.172394f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Frontalbulkhead", 2003420, 4649112, 4, { -0.091233f, -505.180695f, 26.463760f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgpl_f1b3_boss_col", 2003422, 4651265, 4, { -2.657619f, -506.929993f, 124.653297f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgpl_w_lvd_board_col_only", 2003677, 4681484, 4, { -2.678503f, -506.980103f, 84.769417f }, + 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn4.cpp b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn4.cpp index f95eba79..2a18157d 100644 --- a/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn4.cpp +++ b/src/servers/Scripts/instances/raids/TheSecondCoilofBahamutTurn4.cpp @@ -1,41 +1,53 @@ #include #include -class TheSecondCoilofBahamutTurn4 : public InstanceContentScript +class TheSecondCoilofBahamutTurn4 : + public InstanceContentScript { public: - TheSecondCoilofBahamutTurn4() : InstanceContentScript( 30010 ) - { } + TheSecondCoilofBahamutTurn4() : + InstanceContentScript( 30010 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2003412, 0, 4, { -1.586798f, 0.000000f, 6.322940f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2003413, 4592650, 4, { 0.246630f, 0.000000f, -0.575616f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2003414, 4596280, 4, { 2.330916f, 0.000000f, 1.675908f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2003411, 4585907, 4, { -0.036626f, -0.000000f, -0.514996f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2003392, 4632812, 4, { 0.000000f, -0.000002f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2003393, 0, 4, { 16.296391f, -0.000002f, -4.751545f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2003394, 0, 4, { 11.781120f, -0.000001f, 4.780689f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2003391, 0, 4, { 8.938168f, 0.060000f, -11.440830f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0427", 2003427, 4664504, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, -0.000000f ); - // States -> on off - instance->registerEObj( "Entrance", 2000182, 4614314, 5, { -0.059309f, -0.000001f, 15.090750f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Allaganterminal", 2003419, 4682784, 4, { -15.104980f, 0.572263f, -27.316570f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2003452, 4615853, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2003678, 4663755, 4, { 16.207529f, 0.571903f, 28.091551f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2003412, 0, 4, { -1.586798f, 0.000000f, 6.322940f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2003413, 4592650, 4, { 0.246630f, 0.000000f, -0.575616f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2003414, 4596280, 4, { 2.330916f, 0.000000f, 1.675908f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2003411, 4585907, 4, { -0.036626f, -0.000000f, -0.514996f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2003392, 4632812, 4, { 0.000000f, -0.000002f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2003393, 0, 4, { 16.296391f, -0.000002f, -4.751545f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_6", 2003394, 0, 4, { 11.781120f, -0.000001f, 4.780689f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_7", 2003391, 0, 4, { 8.938168f, 0.060000f, -11.440830f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0427", 2003427, 4664504, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + -0.000000f ); + // States -> on off + instance->registerEObj( "Entrance", 2000182, 4614314, 5, { -0.059309f, -0.000001f, 15.090750f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Allaganterminal", 2003419, 4682784, 4, { -15.104980f, 0.572263f, -27.316570f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2003452, 4615853, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2003678, 4663755, 4, { 16.207529f, 0.571903f, 28.091551f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheUnendingCoilofBahamutUltimate.cpp b/src/servers/Scripts/instances/raids/TheUnendingCoilofBahamutUltimate.cpp index 46c29d9f..24ed0439 100644 --- a/src/servers/Scripts/instances/raids/TheUnendingCoilofBahamutUltimate.cpp +++ b/src/servers/Scripts/instances/raids/TheUnendingCoilofBahamutUltimate.cpp @@ -1,35 +1,45 @@ #include #include -class TheUnendingCoilofBahamutUltimate : public InstanceContentScript +class TheUnendingCoilofBahamutUltimate : + public InstanceContentScript { public: - TheUnendingCoilofBahamutUltimate() : InstanceContentScript( 30057 ) - { } + TheUnendingCoilofBahamutUltimate() : + InstanceContentScript( 30057 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007457, 7040178, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007457, 7040443, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007457, 7040473, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007457, 7144982, 4, { 0.000000f, 0.017127f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007457, 7075281, 4, { 0.000000f, 0.017127f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2007457, 7144855, 4, { 0.000000f, 0.017127f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -20.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 7068018, 5, { 0.000000f, 0.000000f, 18.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007457, 7040178, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2007457, 7040443, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2007457, 7040473, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2007457, 7144982, 4, { 0.000000f, 0.017127f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2007457, 7075281, 4, { 0.000000f, 0.017127f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2007457, 7144855, 4, { 0.000000f, 0.017127f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -20.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 7068018, 5, { 0.000000f, 0.000000f, 18.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheVoidArk.cpp b/src/servers/Scripts/instances/raids/TheVoidArk.cpp index 917dfda5..2255517b 100644 --- a/src/servers/Scripts/instances/raids/TheVoidArk.cpp +++ b/src/servers/Scripts/instances/raids/TheVoidArk.cpp @@ -1,26 +1,29 @@ #include #include -class TheVoidArk : public InstanceContentScript +class TheVoidArk : + public InstanceContentScript { public: - TheVoidArk() : InstanceContentScript( 30029 ) - { } + TheVoidArk() : + InstanceContentScript( 30029 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheWeaponsRefrainUltimate.cpp b/src/servers/Scripts/instances/raids/TheWeaponsRefrainUltimate.cpp index 96204fbf..c6acf655 100644 --- a/src/servers/Scripts/instances/raids/TheWeaponsRefrainUltimate.cpp +++ b/src/servers/Scripts/instances/raids/TheWeaponsRefrainUltimate.cpp @@ -1,36 +1,48 @@ #include #include -class TheWeaponsRefrainUltimate : public InstanceContentScript +class TheWeaponsRefrainUltimate : + public InstanceContentScript { public: - TheWeaponsRefrainUltimate() : InstanceContentScript( 30067 ) - { } + TheWeaponsRefrainUltimate() : + InstanceContentScript( 30067 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2009480, 0, 4, { 94.011192f, 0.000000f, 107.700996f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w1fz_b1432", 2007457, 7372735, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007457, 7373056, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2009481, 0, 4, { 101.695602f, 0.000000f, 101.959396f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007457, 7237754, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007457, 7237753, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2007457, 7237756, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2007457, 7237755, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2007457, 7343478, 5, { 100.000000f, 0.000000f, 116.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 100.000000f, 0.000000f, 85.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2007457, 7538258, 4, { 100.160004f, 0.000000f, 101.443398f }, 1.000000f, 0.000000f ); - } + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2009480, 0, 4, { 94.011192f, 0.000000f, 107.700996f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_w1fz_b1432", 2007457, 7372735, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2007457, 7373056, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2009481, 0, 4, { 101.695602f, 0.000000f, 101.959396f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2007457, 7237754, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2007457, 7237753, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2007457, 7237756, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2007457, 7237755, 4, { 100.000000f, 0.000000f, 100.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2007457, 7343478, 5, { 100.000000f, 0.000000f, 116.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 100.000000f, 0.000000f, 85.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_7", 2007457, 7538258, 4, { 100.160004f, 0.000000f, 101.443398f }, 1.000000f, + 0.000000f ); + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheWeepingCityofMhach.cpp b/src/servers/Scripts/instances/raids/TheWeepingCityofMhach.cpp index 5e74bfc4..f8cd3779 100644 --- a/src/servers/Scripts/instances/raids/TheWeepingCityofMhach.cpp +++ b/src/servers/Scripts/instances/raids/TheWeepingCityofMhach.cpp @@ -1,26 +1,29 @@ #include #include -class TheWeepingCityofMhach : public InstanceContentScript +class TheWeepingCityofMhach : + public InstanceContentScript { public: - TheWeepingCityofMhach() : InstanceContentScript( 30038 ) - { } + TheWeepingCityofMhach() : + InstanceContentScript( 30038 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/raids/TheWorldofDarkness.cpp b/src/servers/Scripts/instances/raids/TheWorldofDarkness.cpp index 44537474..3b029253 100644 --- a/src/servers/Scripts/instances/raids/TheWorldofDarkness.cpp +++ b/src/servers/Scripts/instances/raids/TheWorldofDarkness.cpp @@ -1,143 +1,235 @@ #include #include -class TheWorldofDarkness : public InstanceContentScript +class TheWorldofDarkness : + public InstanceContentScript { public: - TheWorldofDarkness() : InstanceContentScript( 30020 ) - { } + TheWorldofDarkness() : + InstanceContentScript( 30020 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 5033058, 4, { -148.309006f, 25.000000f, 327.505005f }, 1.000000f, -0.785398f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -147.190506f, 34.000000f, 326.593597f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5033059, 4, { -116.020401f, 25.000000f, 291.514313f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2004749, 5022919, 4, { -150.811707f, 33.999840f, 292.778412f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2004750, 5022920, 4, { -143.519608f, 34.000000f, 294.027710f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2004751, 5022915, 4, { -143.096893f, 34.000000f, 301.814209f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2004752, 5022916, 4, { -151.221893f, 34.000000f, 301.291809f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2004753, 5034307, 4, { -153.117905f, 34.000000f, 292.031494f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_6", 2004754, 5034303, 4, { -141.245300f, 34.000000f, 291.586212f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2004755, 5034301, 4, { -141.807693f, 34.000000f, 303.198395f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2004756, 5034306, 4, { -151.877304f, 34.000000f, 303.085297f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2004748, 5033636, 4, { -149.922104f, 34.000000f, 293.955414f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2004774, 5033642, 4, { -144.841095f, 34.000000f, 295.275208f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2004775, 5033641, 4, { -144.940308f, 34.000000f, 300.121399f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2004776, 5033639, 4, { -150.097397f, 34.000000f, 299.867798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_l1r3_b0541a", 2005026, 5444436, 4, { -147.017593f, 34.000000f, 317.352814f }, 1.000000f, 0.000000f ); - // States -> boss_pop_off_a boss_pop_on_a boss_pop_on_c - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 5033193, 4, { 200.082001f, 81.974503f, 211.096603f }, 1.000000f, -0.785398f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_13", 2002735, 0, 4, { 200.000000f, 82.124329f, 208.778595f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5035970, 4, { 167.647797f, 81.909058f, 178.824493f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_14", 2004777, 0, 4, { 192.319397f, 82.000000f, 182.835999f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2004778, 0, 4, { 197.039703f, 81.986687f, 184.863007f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_16", 2004779, 0, 4, { 204.338196f, 82.000000f, 183.053802f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2004780, 0, 4, { 189.642700f, 82.000000f, 176.451202f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2005018, 0, 4, { 199.442200f, 82.000000f, 183.869598f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2002587, 0, 4, { 0.000000f, 129.250000f, -157.414307f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 5040833, 4, { -0.855141f, 129.250000f, -164.190598f }, 0.991760f, -0.785362f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_20", 2002872, 5039743, 4, { 0.048592f, 128.906403f, -155.346100f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Openfetter", 2004787, 0, 4, { 2.542549f, 129.250000f, -205.570496f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Openfetter_1", 2004789, 0, 4, { 3.817404f, 129.250000f, -207.100800f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magickedfetter", 2004790, 5039668, 4, { -17.519341f, 129.250000f, -235.697693f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Magickedfetter_1", 2004791, 5039667, 4, { 17.275551f, 129.198105f, -235.656799f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_21", 2004808, 5039717, 4, { -10.696810f, -497.601990f, -204.956100f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2004809, 5039714, 4, { 6.635397f, -498.601898f, -210.257507f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_23", 2004810, 5039710, 4, { 11.312720f, -498.093597f, -196.581207f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_24", 2004811, 5039721, 4, { -9.022294f, -499.107513f, -190.416397f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_25", 2004548, 0, 4, { 1.212110f, 129.300003f, -202.733398f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_26", 2002735, 0, 4, { -0.000000f, 143.250000f, -314.710114f }, 1.000000f, 0.000048f ); - instance->registerEObj( "sgvf_w_lvd_b0118_5", 2002872, 5041153, 4, { -0.147327f, 143.250000f, -328.516998f }, 0.991760f, -0.785362f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_27", 2004732, 5039981, 4, { -0.015320f, 143.236298f, -316.334808f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { -299.977112f, 279.987701f, -420.645508f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_28", 2004814, 0, 4, { -300.240906f, 280.000000f, -402.510712f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_29", 2004815, 0, 4, { -300.687103f, 280.000000f, -398.160706f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_30", 2004620, 0, 4, { 0.203211f, 129.250000f, -202.244904f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_btl_b0528", 2004816, 5041561, 4, { -304.280212f, 279.987701f, -415.243805f }, 0.991760f, 0.000048f ); - // States -> baria_off baria_omen_a baria_omen_b baria_a baria_b baria_c - instance->registerEObj( "sgvf_w_btl_b0528_1", 2004817, 5041563, 4, { -286.856506f, 280.000000f, -392.695404f }, 1.000000f, 0.000000f ); - // States -> baria_off baria_omen_a baria_omen_b baria_a baria_b baria_c - instance->registerEObj( "sgvf_w_btl_b0528_2", 2004818, 5041562, 4, { -313.290710f, 280.000000f, -392.472412f }, 1.000000f, 0.000000f ); - // States -> baria_off baria_omen_a baria_omen_b baria_a baria_b baria_c - instance->registerEObj( "sgvf_w_lvd_b0118_6", 2002872, 5032353, 4, { -54.450321f, 16.000000f, 406.409088f }, 1.000000f, -0.785398f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_31", 2002735, 0, 4, { -56.151901f, 16.000000f, 403.855896f }, 1.000000f, -0.785398f ); - instance->registerEObj( "sgvf_w_lvd_b0118_7", 2002872, 5032356, 4, { -102.950996f, 16.000000f, 383.202911f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_l1r3_b0541b", 2004735, 5437119, 4, { -76.985458f, 16.000000f, 382.746613f }, 1.000000f, 0.000000f ); - // States -> boss_pop2_off_a boss_pop2_on_a - instance->registerEObj( "unknown_32", 2004736, 0, 4, { -74.916229f, 16.000000f, 380.485291f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_33", 2002735, 0, 4, { 99.718719f, 63.999989f, 265.143799f }, 1.000000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_8", 2002872, 5035968, 4, { 95.926514f, 63.980949f, 265.796906f }, 0.991760f, -0.785362f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_9", 2002872, 5035969, 4, { 167.944199f, 65.533363f, 264.945587f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Treasurecoffer", 2004745, 0, 4, { 130.000000f, 63.999989f, 264.710388f }, 1.000000f, 1.570796f ); - instance->registerEObj( "sgvf_l1r3_b0541b_1", 2004738, 5437120, 4, { 130.000000f, 65.431679f, 264.710388f }, 0.991760f, 0.000048f ); - // States -> boss_pop2_off_a boss_pop2_on_a - instance->registerEObj( "sgvf_w_lvd_b0556", 2004739, 5037994, 4, { 138.468002f, 63.999989f, 275.781311f }, 1.000000f, 0.000000f ); - // States -> void_off_a void_off_b void_on_a void_omen - instance->registerEObj( "sgvf_w_lvd_b0556_1", 2004740, 5037996, 4, { 129.901001f, 63.999729f, 278.588593f }, 1.000000f, 0.000000f ); - // States -> void_off_a void_off_b void_on_a void_omen - instance->registerEObj( "sgvf_w_lvd_b0556_2", 2004741, 5037997, 4, { 121.644699f, 63.999729f, 275.762695f }, 1.000000f, 0.000000f ); - // States -> void_off_a void_off_b void_on_a void_omen - instance->registerEObj( "sgvf_w_lvd_b0556_3", 2004742, 5037998, 4, { 138.356506f, 63.999989f, 250.555603f }, 1.000000f, 0.000000f ); - // States -> void_off_a void_off_b void_on_a void_omen - instance->registerEObj( "sgvf_w_lvd_b0556_4", 2004743, 5037999, 4, { 129.881393f, 64.000031f, 250.721893f }, 1.000000f, 0.000000f ); - // States -> void_off_a void_off_b void_on_a void_omen - instance->registerEObj( "sgvf_w_lvd_b0556_5", 2004744, 5038000, 4, { 121.628601f, 63.999989f, 250.572296f }, 1.000000f, 0.000000f ); - // States -> void_off_a void_off_b void_on_a void_omen - instance->registerEObj( "sgvf_w_lvd_b0557", 2004746, 5037995, 4, { 130.020493f, 63.999748f, 279.027191f }, 1.000000f, 0.000000f ); - // States -> void_off_a void_off_b void_on_a void_omen - instance->registerEObj( "sgvf_w_lvd_b0557_1", 2004747, 5038001, 4, { 130.056702f, 63.999989f, 249.980301f }, 1.000000f, 0.000000f ); - // States -> void_off_a void_off_b void_on_a void_omen - instance->registerEObj( "unknown_34", 2002735, 0, 4, { 0.000000f, 94.750053f, 84.669502f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_35", 2004788, 5499560, 4, { 0.320374f, 95.231567f, 31.296261f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_36", 2004792, 5038584, 4, { -28.578890f, 95.250008f, 39.174721f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_37", 2004793, 5038586, 4, { -21.418350f, 95.250008f, 51.649750f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_38", 2004794, 5038587, 4, { -33.994980f, 95.250008f, 58.976070f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_39", 2004795, 5038580, 4, { -41.014271f, 95.250008f, 46.442242f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_40", 2004796, 5038588, 4, { 7.240406f, 95.250008f, -12.319770f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_41", 2004797, 5038590, 4, { 7.179711f, 95.250008f, 2.152661f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_42", 2004798, 5038589, 4, { -7.245643f, 95.250008f, 2.096094f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_43", 2004799, 5038570, 4, { -7.080731f, 95.250008f, -12.155750f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_44", 2004800, 5038591, 4, { 41.068710f, 95.250008f, 46.325569f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_45", 2004801, 5038592, 4, { 33.762070f, 95.250008f, 58.721840f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_46", 2004802, 5038593, 4, { 21.204290f, 95.250008f, 51.578461f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_47", 2004803, 5038571, 4, { 28.640770f, 95.250008f, 39.349319f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0250", 2002872, 5038256, 4, { -0.165812f, 94.731613f, 85.317574f }, 0.991760f, -0.785362f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_48", 2004784, 5489265, 4, { 0.294310f, 90.349991f, 22.469700f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_49", 2005042, 5476812, 4, { -0.380919f, 99.969032f, 29.779119f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 5032012, 5, { 0.112444f, 1.000004f, 460.032898f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Wormholegenerator", 2004722, 4985258, 4, { -9.284863f, 0.332117f, 436.627411f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wormholegenerator_1", 2004723, 4985259, 4, { -157.081207f, 25.477930f, 382.938385f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wormholegenerator_2", 2004724, 4985260, 4, { 65.994957f, 65.452766f, 265.003998f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wormholegenerator_3", 2004725, 4985261, 4, { 210.040405f, 73.397346f, 264.987091f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wormholegenerator_4", 2004726, 4985262, 4, { 9.958203f, 96.762039f, 104.047096f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wormholegenerator_5", 2004727, 4985263, 4, { -9.978291f, 128.313095f, -121.979301f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Wormholegenerator_6", 2004728, 4985264, 4, { 9.998364f, 128.645798f, -274.001892f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_50", 2004729, 5034813, 4, { -91.447388f, 32.791962f, 296.223389f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_51", 2004730, 5034821, 4, { 143.374405f, 80.799957f, 179.826706f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 5033058, 4, { -148.309006f, 25.000000f, 327.505005f }, + 1.000000f, -0.785398f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -147.190506f, 34.000000f, 326.593597f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5033059, 4, { -116.020401f, 25.000000f, 291.514313f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2004749, 5022919, 4, { -150.811707f, 33.999840f, 292.778412f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2004750, 5022920, 4, { -143.519608f, 34.000000f, 294.027710f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2004751, 5022915, 4, { -143.096893f, 34.000000f, 301.814209f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2004752, 5022916, 4, { -151.221893f, 34.000000f, 301.291809f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2004753, 5034307, 4, { -153.117905f, 34.000000f, 292.031494f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_6", 2004754, 5034303, 4, { -141.245300f, 34.000000f, 291.586212f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2004755, 5034301, 4, { -141.807693f, 34.000000f, 303.198395f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2004756, 5034306, 4, { -151.877304f, 34.000000f, 303.085297f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2004748, 5033636, 4, { -149.922104f, 34.000000f, 293.955414f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2004774, 5033642, 4, { -144.841095f, 34.000000f, 295.275208f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2004775, 5033641, 4, { -144.940308f, 34.000000f, 300.121399f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2004776, 5033639, 4, { -150.097397f, 34.000000f, 299.867798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_l1r3_b0541a", 2005026, 5444436, 4, { -147.017593f, 34.000000f, 317.352814f }, + 1.000000f, 0.000000f ); + // States -> boss_pop_off_a boss_pop_on_a boss_pop_on_c + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 5033193, 4, { 200.082001f, 81.974503f, 211.096603f }, + 1.000000f, -0.785398f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_13", 2002735, 0, 4, { 200.000000f, 82.124329f, 208.778595f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5035970, 4, { 167.647797f, 81.909058f, 178.824493f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_14", 2004777, 0, 4, { 192.319397f, 82.000000f, 182.835999f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2004778, 0, 4, { 197.039703f, 81.986687f, 184.863007f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_16", 2004779, 0, 4, { 204.338196f, 82.000000f, 183.053802f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2004780, 0, 4, { 189.642700f, 82.000000f, 176.451202f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2005018, 0, 4, { 199.442200f, 82.000000f, 183.869598f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2002587, 0, 4, { 0.000000f, 129.250000f, -157.414307f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 5040833, 4, { -0.855141f, 129.250000f, -164.190598f }, + 0.991760f, -0.785362f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_20", 2002872, 5039743, 4, { 0.048592f, 128.906403f, -155.346100f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Openfetter", 2004787, 0, 4, { 2.542549f, 129.250000f, -205.570496f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Openfetter_1", 2004789, 0, 4, { 3.817404f, 129.250000f, -207.100800f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Magickedfetter", 2004790, 5039668, 4, { -17.519341f, 129.250000f, -235.697693f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Magickedfetter_1", 2004791, 5039667, 4, { 17.275551f, 129.198105f, -235.656799f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_21", 2004808, 5039717, 4, { -10.696810f, -497.601990f, -204.956100f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_22", 2004809, 5039714, 4, { 6.635397f, -498.601898f, -210.257507f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_23", 2004810, 5039710, 4, { 11.312720f, -498.093597f, -196.581207f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_24", 2004811, 5039721, 4, { -9.022294f, -499.107513f, -190.416397f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_25", 2004548, 0, 4, { 1.212110f, 129.300003f, -202.733398f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_26", 2002735, 0, 4, { -0.000000f, 143.250000f, -314.710114f }, 1.000000f, + 0.000048f ); + instance->registerEObj( "sgvf_w_lvd_b0118_5", 2002872, 5041153, 4, { -0.147327f, 143.250000f, -328.516998f }, + 0.991760f, -0.785362f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_27", 2004732, 5039981, 4, { -0.015320f, 143.236298f, -316.334808f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { -299.977112f, 279.987701f, -420.645508f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_28", 2004814, 0, 4, { -300.240906f, 280.000000f, -402.510712f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_29", 2004815, 0, 4, { -300.687103f, 280.000000f, -398.160706f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_30", 2004620, 0, 4, { 0.203211f, 129.250000f, -202.244904f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_btl_b0528", 2004816, 5041561, 4, { -304.280212f, 279.987701f, -415.243805f }, + 0.991760f, 0.000048f ); + // States -> baria_off baria_omen_a baria_omen_b baria_a baria_b baria_c + instance->registerEObj( "sgvf_w_btl_b0528_1", 2004817, 5041563, 4, { -286.856506f, 280.000000f, -392.695404f }, + 1.000000f, 0.000000f ); + // States -> baria_off baria_omen_a baria_omen_b baria_a baria_b baria_c + instance->registerEObj( "sgvf_w_btl_b0528_2", 2004818, 5041562, 4, { -313.290710f, 280.000000f, -392.472412f }, + 1.000000f, 0.000000f ); + // States -> baria_off baria_omen_a baria_omen_b baria_a baria_b baria_c + instance->registerEObj( "sgvf_w_lvd_b0118_6", 2002872, 5032353, 4, { -54.450321f, 16.000000f, 406.409088f }, + 1.000000f, -0.785398f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_31", 2002735, 0, 4, { -56.151901f, 16.000000f, 403.855896f }, 1.000000f, + -0.785398f ); + instance->registerEObj( "sgvf_w_lvd_b0118_7", 2002872, 5032356, 4, { -102.950996f, 16.000000f, 383.202911f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_l1r3_b0541b", 2004735, 5437119, 4, { -76.985458f, 16.000000f, 382.746613f }, + 1.000000f, 0.000000f ); + // States -> boss_pop2_off_a boss_pop2_on_a + instance->registerEObj( "unknown_32", 2004736, 0, 4, { -74.916229f, 16.000000f, 380.485291f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_33", 2002735, 0, 4, { 99.718719f, 63.999989f, 265.143799f }, 1.000000f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_8", 2002872, 5035968, 4, { 95.926514f, 63.980949f, 265.796906f }, + 0.991760f, -0.785362f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_9", 2002872, 5035969, 4, { 167.944199f, 65.533363f, 264.945587f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Treasurecoffer", 2004745, 0, 4, { 130.000000f, 63.999989f, 264.710388f }, 1.000000f, + 1.570796f ); + instance->registerEObj( "sgvf_l1r3_b0541b_1", 2004738, 5437120, 4, { 130.000000f, 65.431679f, 264.710388f }, + 0.991760f, 0.000048f ); + // States -> boss_pop2_off_a boss_pop2_on_a + instance->registerEObj( "sgvf_w_lvd_b0556", 2004739, 5037994, 4, { 138.468002f, 63.999989f, 275.781311f }, + 1.000000f, 0.000000f ); + // States -> void_off_a void_off_b void_on_a void_omen + instance->registerEObj( "sgvf_w_lvd_b0556_1", 2004740, 5037996, 4, { 129.901001f, 63.999729f, 278.588593f }, + 1.000000f, 0.000000f ); + // States -> void_off_a void_off_b void_on_a void_omen + instance->registerEObj( "sgvf_w_lvd_b0556_2", 2004741, 5037997, 4, { 121.644699f, 63.999729f, 275.762695f }, + 1.000000f, 0.000000f ); + // States -> void_off_a void_off_b void_on_a void_omen + instance->registerEObj( "sgvf_w_lvd_b0556_3", 2004742, 5037998, 4, { 138.356506f, 63.999989f, 250.555603f }, + 1.000000f, 0.000000f ); + // States -> void_off_a void_off_b void_on_a void_omen + instance->registerEObj( "sgvf_w_lvd_b0556_4", 2004743, 5037999, 4, { 129.881393f, 64.000031f, 250.721893f }, + 1.000000f, 0.000000f ); + // States -> void_off_a void_off_b void_on_a void_omen + instance->registerEObj( "sgvf_w_lvd_b0556_5", 2004744, 5038000, 4, { 121.628601f, 63.999989f, 250.572296f }, + 1.000000f, 0.000000f ); + // States -> void_off_a void_off_b void_on_a void_omen + instance->registerEObj( "sgvf_w_lvd_b0557", 2004746, 5037995, 4, { 130.020493f, 63.999748f, 279.027191f }, + 1.000000f, 0.000000f ); + // States -> void_off_a void_off_b void_on_a void_omen + instance->registerEObj( "sgvf_w_lvd_b0557_1", 2004747, 5038001, 4, { 130.056702f, 63.999989f, 249.980301f }, + 1.000000f, 0.000000f ); + // States -> void_off_a void_off_b void_on_a void_omen + instance->registerEObj( "unknown_34", 2002735, 0, 4, { 0.000000f, 94.750053f, 84.669502f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_35", 2004788, 5499560, 4, { 0.320374f, 95.231567f, 31.296261f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_36", 2004792, 5038584, 4, { -28.578890f, 95.250008f, 39.174721f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_37", 2004793, 5038586, 4, { -21.418350f, 95.250008f, 51.649750f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_38", 2004794, 5038587, 4, { -33.994980f, 95.250008f, 58.976070f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_39", 2004795, 5038580, 4, { -41.014271f, 95.250008f, 46.442242f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_40", 2004796, 5038588, 4, { 7.240406f, 95.250008f, -12.319770f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_41", 2004797, 5038590, 4, { 7.179711f, 95.250008f, 2.152661f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_42", 2004798, 5038589, 4, { -7.245643f, 95.250008f, 2.096094f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_43", 2004799, 5038570, 4, { -7.080731f, 95.250008f, -12.155750f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_44", 2004800, 5038591, 4, { 41.068710f, 95.250008f, 46.325569f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_45", 2004801, 5038592, 4, { 33.762070f, 95.250008f, 58.721840f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_46", 2004802, 5038593, 4, { 21.204290f, 95.250008f, 51.578461f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_47", 2004803, 5038571, 4, { 28.640770f, 95.250008f, 39.349319f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0250", 2002872, 5038256, 4, { -0.165812f, 94.731613f, 85.317574f }, 0.991760f, + -0.785362f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_48", 2004784, 5489265, 4, { 0.294310f, 90.349991f, 22.469700f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_49", 2005042, 5476812, 4, { -0.380919f, 99.969032f, 29.779119f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 5032012, 5, { 0.112444f, 1.000004f, 460.032898f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Wormholegenerator", 2004722, 4985258, 4, { -9.284863f, 0.332117f, 436.627411f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Wormholegenerator_1", 2004723, 4985259, 4, { -157.081207f, 25.477930f, 382.938385f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Wormholegenerator_2", 2004724, 4985260, 4, { 65.994957f, 65.452766f, 265.003998f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Wormholegenerator_3", 2004725, 4985261, 4, { 210.040405f, 73.397346f, 264.987091f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Wormholegenerator_4", 2004726, 4985262, 4, { 9.958203f, 96.762039f, 104.047096f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Wormholegenerator_5", 2004727, 4985263, 4, { -9.978291f, 128.313095f, -121.979301f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Wormholegenerator_6", 2004728, 4985264, 4, { 9.998364f, 128.645798f, -274.001892f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_50", 2004729, 5034813, 4, { -91.447388f, 32.791962f, 296.223389f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_51", 2004730, 5034821, 4, { 143.374405f, 80.799957f, 179.826706f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/treasurehunt/TheAquapolis.cpp b/src/servers/Scripts/instances/treasurehunt/TheAquapolis.cpp index be94ab18..1838b6ee 100644 --- a/src/servers/Scripts/instances/treasurehunt/TheAquapolis.cpp +++ b/src/servers/Scripts/instances/treasurehunt/TheAquapolis.cpp @@ -1,128 +1,220 @@ #include #include -class TheAquapolis : public InstanceContentScript +class TheAquapolis : + public InstanceContentScript { public: - TheAquapolis() : InstanceContentScript( 55001 ) - { } + TheAquapolis() : + InstanceContentScript( 55001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Treasurecoffer", 2007190, 0, 4, { 0.001130f, 0.200000f, 340.004486f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_1", 2007191, 0, 4, { 0.002947f, -7.800000f, 215.005096f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_2", 2007192, 0, 4, { 0.002900f, -15.800000f, 90.001167f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Treasurecoffer_3", 2007193, 0, 4, { -0.000139f, -23.819401f, -34.999279f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Treasurecoffer_4", 2007194, 0, 4, { 0.001485f, -31.815121f, -160.003693f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Treasurecoffer_5", 2007195, 0, 4, { 0.004197f, -39.810791f, -284.993011f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Treasurecoffer_6", 2007196, 0, 4, { 0.000420f, -47.806580f, -409.995514f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_0", 2002735, 0, 4, { -0.122746f, 0.000000f, 361.538513f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6288992, 4, { 0.686486f, 0.049996f, 362.050415f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Vaultdoor", 2007203, 6287388, 4, { -18.243860f, 0.099997f, 321.842285f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultdoor_1", 2007204, 6287665, 4, { 18.988001f, 0.099997f, 321.533508f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007287, 6288229, 4, { -25.275770f, 0.000000f, 340.210388f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007288, 6288231, 4, { 0.185137f, 0.000000f, 312.600098f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2007289, 6288233, 4, { 25.078310f, 0.000000f, 339.623596f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultkey", 2007282, 0, 4, { 0.829522f, 0.220668f, 337.850708f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2007316, 6288699, 4, { -18.478701f, -5.661133f, 279.285889f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2007317, 6286455, 4, { 15.609920f, -6.088379f, 277.302094f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_6", 2007328, 6383033, 4, { -16.922300f, 0.076233f, 321.705902f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_7", 2007329, 6383032, 4, { 18.844851f, 0.076233f, 322.468903f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_8", 2007343, 6289147, 4, { 3.738403f, 0.198364f, 339.833588f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2002735, 0, 4, { -0.120655f, -7.700002f, 236.767395f }, 1.000000f, -0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 6289205, 4, { -0.442505f, -7.827942f, 237.140396f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Vaultdoor_2", 2007205, 6288210, 4, { -18.722839f, -7.827942f, 196.063095f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Vaultdoor_3", 2007206, 6288211, 4, { 18.844851f, -7.827942f, 196.185196f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2007290, 6288342, 4, { -25.317570f, -7.980009f, 215.039398f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2007291, 6288340, 4, { 0.322333f, -7.980009f, 189.283798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2007292, 6288337, 4, { 24.222750f, -7.980009f, 215.066498f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultkey_1", 2007311, 0, 4, { -3.870050f, -7.800000f, 213.458496f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2007318, 6288701, 4, { -16.983280f, -13.870480f, 153.185303f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_14", 2007319, 6286451, 4, { 16.678040f, -13.962040f, 152.574997f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_15", 2007330, 6383034, 4, { -17.685249f, -7.797425f, 197.619507f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_16", 2007331, 6383035, 4, { 18.509090f, -7.827942f, 197.497406f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_17", 2007344, 6289152, 4, { -1.286773f, -7.800001f, 215.448593f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6289228, 4, { -0.142505f, -15.800000f, 112.190002f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_18", 2002735, 0, 4, { 0.053155f, -15.700000f, 111.576698f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Vaultdoor_4", 2007207, 6288213, 4, { -18.719660f, -15.805200f, 71.150551f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultdoor_5", 2007208, 6288215, 4, { 18.666090f, -15.800000f, 71.347427f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2007293, 6288400, 4, { -25.407360f, -15.950010f, 89.850311f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2007294, 6288402, 4, { 0.914349f, -15.950010f, 64.629997f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2007295, 6288404, 4, { 24.828060f, -15.950010f, 89.997643f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultkey_2", 2007312, 0, 4, { 0.302402f, -15.800000f, 94.839752f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_22", 2007320, 6288702, 4, { -17.441099f, -21.797001f, 28.519039f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_23", 2007321, 6286453, 4, { 16.342409f, -21.896730f, 28.458010f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_24", 2007332, 6383037, 4, { -16.861271f, -15.915160f, 70.694946f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_25", 2007333, 6383036, 4, { 18.326050f, -15.915160f, 72.465088f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_26", 2007345, 6289153, 4, { 4.112751f, -15.800000f, 94.003380f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 6289248, 4, { -0.327447f, -23.797190f, -12.626270f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_27", 2002735, 0, 4, { -0.005597f, -23.697189f, -13.437240f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Vaultdoor_6", 2007209, 6288216, 4, { -18.686550f, -23.797190f, -53.735790f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultdoor_7", 2007210, 6288218, 4, { 18.561710f, -23.797190f, -53.381920f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_28", 2007296, 6288442, 4, { -24.187929f, -23.863649f, -34.945591f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_29", 2007297, 6288444, 4, { 0.165738f, -23.873119f, -62.594398f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_30", 2007298, 6288446, 4, { 25.276409f, -23.913509f, -35.549301f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultkey_3", 2007313, 0, 4, { -2.565299f, -23.799999f, -37.906879f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_31", 2007322, 6288703, 4, { -16.708679f, -29.892460f, -96.391296f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_32", 2007323, 6288689, 4, { 15.640440f, -30.075560f, -97.917236f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_33", 2007334, 6383039, 4, { -17.044371f, -23.910950f, -54.093319f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_34", 2007335, 6383038, 4, { 18.326050f, -23.910950f, -52.323238f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_35", 2007346, 6289154, 4, { 1.893377f, -23.785940f, -36.201401f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 6289271, 4, { -0.402360f, -31.785391f, -137.661194f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_36", 2002735, 0, 4, { 0.026965f, -31.685390f, -138.459503f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Vaultdoor_8", 2007211, 6288221, 4, { -18.820810f, -31.785391f, -179.046600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultdoor_9", 2007212, 6288219, 4, { 18.590670f, -31.785391f, -178.683807f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_37", 2007299, 6288471, 4, { -25.063971f, -31.928049f, -159.375900f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_38", 2007300, 6288469, 4, { -0.225626f, -31.950010f, -184.941803f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_39", 2007301, 6288473, 4, { 24.164009f, -31.929609f, -159.852798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultkey_4", 2007314, 0, 4, { -1.933799f, -31.799999f, -161.905502f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_40", 2007324, 6288704, 4, { -15.976260f, -38.010250f, -222.247696f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_41", 2007325, 6288690, 4, { 15.274170f, -38.071289f, -222.339203f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_42", 2007336, 6383042, 4, { -17.596230f, -31.900000f, -178.846298f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_43", 2007337, 6383041, 4, { 18.875370f, -31.906679f, -177.538803f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_44", 2007347, 6289155, 4, { 1.494756f, -31.797430f, -156.976593f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_5", 2002872, 6289287, 4, { -0.102360f, -39.780590f, -262.818298f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_45", 2002735, 0, 4, { -0.061376f, -39.680592f, -263.631805f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Vaultdoor_10", 2007213, 6288224, 4, { -18.631350f, -39.810791f, -303.547699f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Vaultdoor_11", 2007214, 6288223, 4, { 18.847080f, -39.780579f, -304.087585f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_46", 2007302, 6288508, 4, { -24.544001f, -39.909939f, -284.787201f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_47", 2007303, 6288524, 4, { -0.272618f, -39.928360f, -310.519714f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_48", 2007304, 6288522, 4, { 24.354900f, -39.900742f, -285.109314f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Vaultkey_5", 2007315, 0, 4, { -2.969681f, -39.799999f, -286.637512f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_49", 2007326, 6288705, 4, { -15.793150f, -45.975460f, -346.730804f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_50", 2007327, 6288694, 4, { 16.555969f, -46.005981f, -347.859894f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_51", 2007338, 6383044, 4, { -17.091330f, -39.875000f, -302.618896f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_52", 2007339, 6383045, 4, { 17.074829f, -39.902340f, -303.334198f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_53", 2007348, 6289156, 4, { 1.662274f, -39.779591f, -284.155792f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_w_lvd_b0118_6", 2002872, 6289300, 4, { 0.019862f, -47.800430f, -387.795288f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_54", 2002735, 0, 4, { 0.060846f, -47.799999f, -388.568115f }, 1.000000f, -0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.076233f, -47.887440f, -427.461304f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_55", 2007305, 6288552, 4, { -24.623159f, -47.927639f, -409.027313f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_56", 2007306, 6288548, 4, { -0.124747f, -47.950401f, -433.348785f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_57", 2007307, 6288550, 4, { 23.612570f, -47.899090f, -409.669586f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_58", 2007349, 6395686, 4, { 2.822051f, -47.754410f, -409.509888f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6289067, 5, { 1.346699f, 0.199998f, 429.462097f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 3.438223f, -0.100000f, 415.292694f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Treasurecoffer", 2007190, 0, 4, { 0.001130f, 0.200000f, 340.004486f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_1", 2007191, 0, 4, { 0.002947f, -7.800000f, 215.005096f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_2", 2007192, 0, 4, { 0.002900f, -15.800000f, 90.001167f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Treasurecoffer_3", 2007193, 0, 4, { -0.000139f, -23.819401f, -34.999279f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Treasurecoffer_4", 2007194, 0, 4, { 0.001485f, -31.815121f, -160.003693f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Treasurecoffer_5", 2007195, 0, 4, { 0.004197f, -39.810791f, -284.993011f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Treasurecoffer_6", 2007196, 0, 4, { 0.000420f, -47.806580f, -409.995514f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_0", 2002735, 0, 4, { -0.122746f, 0.000000f, 361.538513f }, 1.000000f, -0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 6288992, 4, { 0.686486f, 0.049996f, 362.050415f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Vaultdoor", 2007203, 6287388, 4, { -18.243860f, 0.099997f, 321.842285f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultdoor_1", 2007204, 6287665, 4, { 18.988001f, 0.099997f, 321.533508f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2007287, 6288229, 4, { -25.275770f, 0.000000f, 340.210388f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2007288, 6288231, 4, { 0.185137f, 0.000000f, 312.600098f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2007289, 6288233, 4, { 25.078310f, 0.000000f, 339.623596f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultkey", 2007282, 0, 4, { 0.829522f, 0.220668f, 337.850708f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_4", 2007316, 6288699, 4, { -18.478701f, -5.661133f, 279.285889f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2007317, 6286455, 4, { 15.609920f, -6.088379f, 277.302094f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_6", 2007328, 6383033, 4, { -16.922300f, 0.076233f, 321.705902f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_7", 2007329, 6383032, 4, { 18.844851f, 0.076233f, 322.468903f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_8", 2007343, 6289147, 4, { 3.738403f, 0.198364f, 339.833588f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2002735, 0, 4, { -0.120655f, -7.700002f, 236.767395f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 6289205, 4, { -0.442505f, -7.827942f, 237.140396f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Vaultdoor_2", 2007205, 6288210, 4, { -18.722839f, -7.827942f, 196.063095f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Vaultdoor_3", 2007206, 6288211, 4, { 18.844851f, -7.827942f, 196.185196f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2007290, 6288342, 4, { -25.317570f, -7.980009f, 215.039398f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2007291, 6288340, 4, { 0.322333f, -7.980009f, 189.283798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2007292, 6288337, 4, { 24.222750f, -7.980009f, 215.066498f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultkey_1", 2007311, 0, 4, { -3.870050f, -7.800000f, 213.458496f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2007318, 6288701, 4, { -16.983280f, -13.870480f, 153.185303f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_14", 2007319, 6286451, 4, { 16.678040f, -13.962040f, 152.574997f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_15", 2007330, 6383034, 4, { -17.685249f, -7.797425f, 197.619507f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_16", 2007331, 6383035, 4, { 18.509090f, -7.827942f, 197.497406f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_17", 2007344, 6289152, 4, { -1.286773f, -7.800001f, 215.448593f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 6289228, 4, { -0.142505f, -15.800000f, 112.190002f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_18", 2002735, 0, 4, { 0.053155f, -15.700000f, 111.576698f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Vaultdoor_4", 2007207, 6288213, 4, { -18.719660f, -15.805200f, 71.150551f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultdoor_5", 2007208, 6288215, 4, { 18.666090f, -15.800000f, 71.347427f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2007293, 6288400, 4, { -25.407360f, -15.950010f, 89.850311f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2007294, 6288402, 4, { 0.914349f, -15.950010f, 64.629997f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2007295, 6288404, 4, { 24.828060f, -15.950010f, 89.997643f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultkey_2", 2007312, 0, 4, { 0.302402f, -15.800000f, 94.839752f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_22", 2007320, 6288702, 4, { -17.441099f, -21.797001f, 28.519039f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_23", 2007321, 6286453, 4, { 16.342409f, -21.896730f, 28.458010f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_24", 2007332, 6383037, 4, { -16.861271f, -15.915160f, 70.694946f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_25", 2007333, 6383036, 4, { 18.326050f, -15.915160f, 72.465088f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_26", 2007345, 6289153, 4, { 4.112751f, -15.800000f, 94.003380f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 6289248, 4, { -0.327447f, -23.797190f, -12.626270f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_27", 2002735, 0, 4, { -0.005597f, -23.697189f, -13.437240f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Vaultdoor_6", 2007209, 6288216, 4, { -18.686550f, -23.797190f, -53.735790f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultdoor_7", 2007210, 6288218, 4, { 18.561710f, -23.797190f, -53.381920f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_28", 2007296, 6288442, 4, { -24.187929f, -23.863649f, -34.945591f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_29", 2007297, 6288444, 4, { 0.165738f, -23.873119f, -62.594398f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_30", 2007298, 6288446, 4, { 25.276409f, -23.913509f, -35.549301f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultkey_3", 2007313, 0, 4, { -2.565299f, -23.799999f, -37.906879f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_31", 2007322, 6288703, 4, { -16.708679f, -29.892460f, -96.391296f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_32", 2007323, 6288689, 4, { 15.640440f, -30.075560f, -97.917236f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_33", 2007334, 6383039, 4, { -17.044371f, -23.910950f, -54.093319f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_34", 2007335, 6383038, 4, { 18.326050f, -23.910950f, -52.323238f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_35", 2007346, 6289154, 4, { 1.893377f, -23.785940f, -36.201401f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_4", 2002872, 6289271, 4, { -0.402360f, -31.785391f, -137.661194f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_36", 2002735, 0, 4, { 0.026965f, -31.685390f, -138.459503f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Vaultdoor_8", 2007211, 6288221, 4, { -18.820810f, -31.785391f, -179.046600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultdoor_9", 2007212, 6288219, 4, { 18.590670f, -31.785391f, -178.683807f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_37", 2007299, 6288471, 4, { -25.063971f, -31.928049f, -159.375900f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_38", 2007300, 6288469, 4, { -0.225626f, -31.950010f, -184.941803f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_39", 2007301, 6288473, 4, { 24.164009f, -31.929609f, -159.852798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultkey_4", 2007314, 0, 4, { -1.933799f, -31.799999f, -161.905502f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_40", 2007324, 6288704, 4, { -15.976260f, -38.010250f, -222.247696f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_41", 2007325, 6288690, 4, { 15.274170f, -38.071289f, -222.339203f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_42", 2007336, 6383042, 4, { -17.596230f, -31.900000f, -178.846298f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_43", 2007337, 6383041, 4, { 18.875370f, -31.906679f, -177.538803f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_44", 2007347, 6289155, 4, { 1.494756f, -31.797430f, -156.976593f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_5", 2002872, 6289287, 4, { -0.102360f, -39.780590f, -262.818298f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_45", 2002735, 0, 4, { -0.061376f, -39.680592f, -263.631805f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Vaultdoor_10", 2007213, 6288224, 4, { -18.631350f, -39.810791f, -303.547699f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Vaultdoor_11", 2007214, 6288223, 4, { 18.847080f, -39.780579f, -304.087585f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_46", 2007302, 6288508, 4, { -24.544001f, -39.909939f, -284.787201f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_47", 2007303, 6288524, 4, { -0.272618f, -39.928360f, -310.519714f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_48", 2007304, 6288522, 4, { 24.354900f, -39.900742f, -285.109314f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Vaultkey_5", 2007315, 0, 4, { -2.969681f, -39.799999f, -286.637512f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_49", 2007326, 6288705, 4, { -15.793150f, -45.975460f, -346.730804f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_50", 2007327, 6288694, 4, { 16.555969f, -46.005981f, -347.859894f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_51", 2007338, 6383044, 4, { -17.091330f, -39.875000f, -302.618896f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_52", 2007339, 6383045, 4, { 17.074829f, -39.902340f, -303.334198f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_53", 2007348, 6289156, 4, { 1.662274f, -39.779591f, -284.155792f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_w_lvd_b0118_6", 2002872, 6289300, 4, { 0.019862f, -47.800430f, -387.795288f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_54", 2002735, 0, 4, { 0.060846f, -47.799999f, -388.568115f }, 1.000000f, + -0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.076233f, -47.887440f, -427.461304f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_55", 2007305, 6288552, 4, { -24.623159f, -47.927639f, -409.027313f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_56", 2007306, 6288548, 4, { -0.124747f, -47.950401f, -433.348785f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_57", 2007307, 6288550, 4, { 23.612570f, -47.899090f, -409.669586f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_58", 2007349, 6395686, 4, { 2.822051f, -47.754410f, -409.509888f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6289067, 5, { 1.346699f, 0.199998f, 429.462097f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 3.438223f, -0.100000f, 415.292694f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/treasurehunt/TheHiddenCanalsofUznair.cpp b/src/servers/Scripts/instances/treasurehunt/TheHiddenCanalsofUznair.cpp index f7308558..3b343355 100644 --- a/src/servers/Scripts/instances/treasurehunt/TheHiddenCanalsofUznair.cpp +++ b/src/servers/Scripts/instances/treasurehunt/TheHiddenCanalsofUznair.cpp @@ -1,26 +1,29 @@ #include #include -class TheHiddenCanalsofUznair : public InstanceContentScript +class TheHiddenCanalsofUznair : + public InstanceContentScript { public: - TheHiddenCanalsofUznair() : InstanceContentScript( 55003 ) - { } + TheHiddenCanalsofUznair() : + InstanceContentScript( 55003 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/treasurehunt/TheLostCanalsofUznair.cpp b/src/servers/Scripts/instances/treasurehunt/TheLostCanalsofUznair.cpp index c767cd36..57070cfa 100644 --- a/src/servers/Scripts/instances/treasurehunt/TheLostCanalsofUznair.cpp +++ b/src/servers/Scripts/instances/treasurehunt/TheLostCanalsofUznair.cpp @@ -1,26 +1,29 @@ #include #include -class TheLostCanalsofUznair : public InstanceContentScript +class TheLostCanalsofUznair : + public InstanceContentScript { public: - TheLostCanalsofUznair() : InstanceContentScript( 55002 ) - { } + TheLostCanalsofUznair() : + InstanceContentScript( 55002 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ARelicReborntheChimera.cpp b/src/servers/Scripts/instances/trials/ARelicReborntheChimera.cpp index 8d177bc3..e2f45f2e 100644 --- a/src/servers/Scripts/instances/trials/ARelicReborntheChimera.cpp +++ b/src/servers/Scripts/instances/trials/ARelicReborntheChimera.cpp @@ -1,43 +1,61 @@ #include #include -class ARelicReborntheChimera : public InstanceContentScript +class ARelicReborntheChimera : + public InstanceContentScript { public: - ARelicReborntheChimera() : InstanceContentScript( 20019 ) - { } + ARelicReborntheChimera() : + InstanceContentScript( 20019 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_w_qic_001_04a", 2006993, 6235274, 4, { -35.822102f, 298.899994f, -205.263199f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2006952, 0, 4, { -35.712589f, 298.899994f, -204.878006f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000139, 0, 4, { 556.049377f, 348.102509f, -752.435730f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4600289, 5, { 523.532471f, 348.223389f, -736.685730f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_1", 2002332, 0, 4, { 533.090881f, 348.691895f, -742.750916f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2002333, 0, 4, { 539.940430f, 348.836395f, -734.401489f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_3", 2000608, 3967803, 4, { 202.369598f, 257.761108f, 80.435272f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2000608, 3976993, 4, { 273.634705f, 254.600204f, 106.048500f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2000608, 3986797, 4, { 205.504898f, 246.188995f, 194.875702f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2000608, 3986798, 4, { 326.313385f, 239.193497f, 221.138901f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2000608, 2718481, 4, { 240.552307f, 302.769714f, -199.979996f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2000608, 4065433, 4, { 204.970001f, 302.119995f, -216.311600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2000608, 2814617, 4, { 205.869995f, 302.219086f, -276.681396f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2000608, 2763112, 4, { -433.000000f, 211.007706f, -216.148605f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2000608, 4187649, 4, { -453.000000f, 211.000000f, -281.046600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2000608, 4187961, 4, { -416.000000f, 210.788193f, -279.813812f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_w_qic_001_04a", 2006993, 6235274, 4, { -35.822102f, 298.899994f, -205.263199f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2006952, 0, 4, { -35.712589f, 298.899994f, -204.878006f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000139, 0, 4, { 556.049377f, 348.102509f, -752.435730f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4600289, 5, { 523.532471f, 348.223389f, -736.685730f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_1", 2002332, 0, 4, { 533.090881f, 348.691895f, -742.750916f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2002333, 0, 4, { 539.940430f, 348.836395f, -734.401489f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_3", 2000608, 3967803, 4, { 202.369598f, 257.761108f, 80.435272f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2000608, 3976993, 4, { 273.634705f, 254.600204f, 106.048500f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2000608, 3986797, 4, { 205.504898f, 246.188995f, 194.875702f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2000608, 3986798, 4, { 326.313385f, 239.193497f, 221.138901f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2000608, 2718481, 4, { 240.552307f, 302.769714f, -199.979996f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2000608, 4065433, 4, { 204.970001f, 302.119995f, -216.311600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2000608, 2814617, 4, { 205.869995f, 302.219086f, -276.681396f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2000608, 2763112, 4, { -433.000000f, 211.007706f, -216.148605f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2000608, 4187649, 4, { -453.000000f, 211.000000f, -281.046600f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2000608, 4187961, 4, { -416.000000f, 210.788193f, -279.813812f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ARelicReborntheHydra.cpp b/src/servers/Scripts/instances/trials/ARelicReborntheHydra.cpp index a44347cc..e2b81eb2 100644 --- a/src/servers/Scripts/instances/trials/ARelicReborntheHydra.cpp +++ b/src/servers/Scripts/instances/trials/ARelicReborntheHydra.cpp @@ -1,77 +1,118 @@ #include #include -class ARelicReborntheHydra : public InstanceContentScript +class ARelicReborntheHydra : + public InstanceContentScript { public: - ARelicReborntheHydra() : InstanceContentScript( 20020 ) - { } + ARelicReborntheHydra() : + InstanceContentScript( 20020 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4600269, 5, { -245.383194f, 17.225630f, 16.103081f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -279.773407f, 17.233170f, 19.434681f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2001609, 0, 4, { 241.292603f, 11.057950f, 9.784212f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance_1", 2001649, 4097866, 5, { 238.950500f, 9.900879f, -1.209344f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit_1", 2001610, 4097973, 4, { -280.512299f, 17.240601f, 20.057501f }, 1.000000f, 0.000000f ); - // States -> vf_htras1_on vf_htras1_of - instance->registerEObj( "sgvf_w_lvd_b0094", 2001611, 4097992, 4, { 19.113859f, 0.900208f, 98.170502f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118", 2001612, 4098036, 4, { 17.948280f, 0.925217f, 99.310219f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001613, 4098064, 4, { -120.074501f, -5.801239f, -111.402496f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001614, 4098077, 4, { -121.598503f, -5.727614f, -112.049599f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_2", 2001615, 4098237, 4, { -228.286301f, 17.565599f, 16.208900f }, 1.000000f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001616, 4098241, 4, { -229.136703f, 17.565599f, 16.208900f }, 1.000000f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2001618, 4014394, 4, { 29.098881f, 1.785278f, 130.418793f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Aetherialflow", 2001619, 0, 4, { 32.968849f, 3.815735f, 131.179199f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_2", 2001620, 2815987, 4, { 120.471397f, -0.516086f, -57.500610f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2001621, 4098194, 4, { -95.942581f, -9.659227f, -101.942596f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2001622, 4043181, 4, { -94.468628f, -2.151611f, -68.864014f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Ludusdoor", 2001623, 4005252, 4, { -172.249695f, 12.559910f, 12.742130f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch", 2001624, 4016950, 4, { 74.518059f, -10.988300f, -107.067703f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch_1", 2001625, 4016951, 4, { 42.154171f, -10.941640f, -84.664078f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch_2", 2001626, 4016952, 4, { 17.515020f, -10.957320f, -190.023102f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch_3", 2001627, 4016953, 4, { -39.127491f, -11.066550f, -129.097504f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Chainwinch_4", 2001628, 4016954, 4, { -82.474548f, -10.952540f, -113.137199f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_5", 2001634, 4082420, 4, { -129.441193f, 9.833186f, -0.625334f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2001635, 3629276, 4, { -3.044897f, 0.927666f, 144.884506f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_7", 2001636, 3629274, 4, { 27.769211f, 0.954134f, 166.929398f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2001637, 3629277, 4, { 69.039284f, 0.968122f, 137.080902f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_9", 2001638, 4016486, 4, { -19.781490f, 2.187618f, 152.349899f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_10", 2001639, 4016487, 4, { 24.469919f, 2.233563f, 180.853195f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_11", 2001640, 4016488, 4, { 89.225769f, 2.247621f, 140.072006f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_12", 2001641, 4018090, 4, { -277.600494f, 17.568609f, 40.599701f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2001642, 4018091, 4, { -255.703506f, 17.578291f, 47.590672f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2001643, 4018092, 4, { -237.108002f, 17.604349f, 38.970459f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2001644, 4018089, 4, { -279.140015f, 17.555901f, -2.742105f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_16", 2001645, 4018088, 4, { -261.194214f, 17.568060f, -11.064940f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2001646, 4018087, 4, { -239.163101f, 17.568661f, -4.435994f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Aetherialflow_1", 2001647, 4103310, 4, { -177.996506f, -14.694460f, -133.043503f }, 0.991760f, 0.000048f ); - // States -> tornade_off tornade_on - instance->registerEObj( "unknown_18", 2001648, 4105956, 4, { -171.435196f, -14.633480f, -127.946999f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_19", 2001650, 0, 4, { -230.125793f, 17.157061f, 16.380630f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 242.225601f, 9.970665f, -11.333600f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2001712, 0, 4, { -131.216003f, 10.073990f, -1.326215f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2000210, 0, 4, { -256.084503f, 17.537910f, 17.740490f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4600269, 5, { -245.383194f, 17.225630f, 16.103081f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -279.773407f, 17.233170f, 19.434681f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2001609, 0, 4, { 241.292603f, 11.057950f, 9.784212f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance_1", 2001649, 4097866, 5, { 238.950500f, 9.900879f, -1.209344f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit_1", 2001610, 4097973, 4, { -280.512299f, 17.240601f, 20.057501f }, 1.000000f, + 0.000000f ); + // States -> vf_htras1_on vf_htras1_of + instance->registerEObj( "sgvf_w_lvd_b0094", 2001611, 4097992, 4, { 19.113859f, 0.900208f, 98.170502f }, 0.991760f, + 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118", 2001612, 4098036, 4, { 17.948280f, 0.925217f, 99.310219f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2001613, 4098064, 4, { -120.074501f, -5.801239f, -111.402496f }, + 1.000000f, 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2001614, 4098077, 4, { -121.598503f, -5.727614f, -112.049599f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_2", 2001615, 4098237, 4, { -228.286301f, 17.565599f, 16.208900f }, + 1.000000f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2001616, 4098241, 4, { -229.136703f, 17.565599f, 16.208900f }, + 1.000000f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2001618, 4014394, 4, { 29.098881f, 1.785278f, 130.418793f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Aetherialflow", 2001619, 0, 4, { 32.968849f, 3.815735f, 131.179199f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_2", 2001620, 2815987, 4, { 120.471397f, -0.516086f, -57.500610f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2001621, 4098194, 4, { -95.942581f, -9.659227f, -101.942596f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2001622, 4043181, 4, { -94.468628f, -2.151611f, -68.864014f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Ludusdoor", 2001623, 4005252, 4, { -172.249695f, 12.559910f, 12.742130f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch", 2001624, 4016950, 4, { 74.518059f, -10.988300f, -107.067703f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch_1", 2001625, 4016951, 4, { 42.154171f, -10.941640f, -84.664078f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch_2", 2001626, 4016952, 4, { 17.515020f, -10.957320f, -190.023102f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch_3", 2001627, 4016953, 4, { -39.127491f, -11.066550f, -129.097504f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Chainwinch_4", 2001628, 4016954, 4, { -82.474548f, -10.952540f, -113.137199f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_5", 2001634, 4082420, 4, { -129.441193f, 9.833186f, -0.625334f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2001635, 3629276, 4, { -3.044897f, 0.927666f, 144.884506f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_7", 2001636, 3629274, 4, { 27.769211f, 0.954134f, 166.929398f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2001637, 3629277, 4, { 69.039284f, 0.968122f, 137.080902f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_9", 2001638, 4016486, 4, { -19.781490f, 2.187618f, 152.349899f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_10", 2001639, 4016487, 4, { 24.469919f, 2.233563f, 180.853195f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_11", 2001640, 4016488, 4, { 89.225769f, 2.247621f, 140.072006f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_12", 2001641, 4018090, 4, { -277.600494f, 17.568609f, 40.599701f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2001642, 4018091, 4, { -255.703506f, 17.578291f, 47.590672f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2001643, 4018092, 4, { -237.108002f, 17.604349f, 38.970459f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2001644, 4018089, 4, { -279.140015f, 17.555901f, -2.742105f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_16", 2001645, 4018088, 4, { -261.194214f, 17.568060f, -11.064940f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2001646, 4018087, 4, { -239.163101f, 17.568661f, -4.435994f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Aetherialflow_1", 2001647, 4103310, 4, { -177.996506f, -14.694460f, -133.043503f }, + 0.991760f, 0.000048f ); + // States -> tornade_off tornade_on + instance->registerEObj( "unknown_18", 2001648, 4105956, 4, { -171.435196f, -14.633480f, -127.946999f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_19", 2001650, 0, 4, { -230.125793f, 17.157061f, 16.380630f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 242.225601f, 9.970665f, -11.333600f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_20", 2001712, 0, 4, { -131.216003f, 10.073990f, -1.326215f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2000210, 0, 4, { -256.084503f, 17.537910f, 17.740490f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/AkhAfahAmphitheatreHard.cpp b/src/servers/Scripts/instances/trials/AkhAfahAmphitheatreHard.cpp index 120fdf33..be109248 100644 --- a/src/servers/Scripts/instances/trials/AkhAfahAmphitheatreHard.cpp +++ b/src/servers/Scripts/instances/trials/AkhAfahAmphitheatreHard.cpp @@ -1,40 +1,50 @@ #include #include -class AkhAfahAmphitheatreHard : public InstanceContentScript +class AkhAfahAmphitheatreHard : + public InstanceContentScript { public: - AkhAfahAmphitheatreHard() : InstanceContentScript( 20024 ) - { } + AkhAfahAmphitheatreHard() : + InstanceContentScript( 20024 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2004238, 4772738, 4, { -1.210436f, 0.000000f, -0.715586f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_r1fc_b0472", 2004239, 4797573, 4, { 1.181316f, -0.000000f, 1.563968f }, 1.000000f, 0.000000f ); - // States -> wind_def wind_def_anim wind_pop wind_pop_anim - instance->registerEObj( "sgvf_r1fc_b0471", 2004240, 4841629, 4, { 11.000000f, 0.000000f, -11.000000f }, 1.000000f, 0.793709f ); - // States -> magi_def magi_def_anim magi_pop magi_pop_anim - instance->registerEObj( "sgvf_r1fc_b0471_1", 2004349, 4841631, 4, { 12.811310f, -0.000000f, 9.376424f }, 1.000000f, 0.000000f ); - // States -> magi_def magi_def_anim magi_pop magi_pop_anim - instance->registerEObj( "sgvf_r1fc_b0471_2", 2004350, 4841632, 4, { -8.033875f, 0.000000f, 10.406790f }, 1.000000f, 0.000000f ); - // States -> magi_def magi_def_anim magi_pop magi_pop_anim - instance->registerEObj( "sgvf_r1fc_b0471_3", 2004351, 4841633, 4, { -8.319038f, -0.000001f, -10.997720f }, 1.000000f, 0.000000f ); - // States -> magi_def magi_def_anim magi_pop magi_pop_anim - instance->registerEObj( "Entrance", 2000182, 4738599, 5, { 9.717670f, 0.000000f, 14.522430f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -15.000000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2004238, 4772738, 4, { -1.210436f, 0.000000f, -0.715586f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "sgvf_r1fc_b0472", 2004239, 4797573, 4, { 1.181316f, -0.000000f, 1.563968f }, 1.000000f, + 0.000000f ); + // States -> wind_def wind_def_anim wind_pop wind_pop_anim + instance->registerEObj( "sgvf_r1fc_b0471", 2004240, 4841629, 4, { 11.000000f, 0.000000f, -11.000000f }, 1.000000f, + 0.793709f ); + // States -> magi_def magi_def_anim magi_pop magi_pop_anim + instance->registerEObj( "sgvf_r1fc_b0471_1", 2004349, 4841631, 4, { 12.811310f, -0.000000f, 9.376424f }, 1.000000f, + 0.000000f ); + // States -> magi_def magi_def_anim magi_pop magi_pop_anim + instance->registerEObj( "sgvf_r1fc_b0471_2", 2004350, 4841632, 4, { -8.033875f, 0.000000f, 10.406790f }, 1.000000f, + 0.000000f ); + // States -> magi_def magi_def_anim magi_pop magi_pop_anim + instance->registerEObj( "sgvf_r1fc_b0471_3", 2004351, 4841633, 4, { -8.319038f, -0.000001f, -10.997720f }, + 1.000000f, 0.000000f ); + // States -> magi_def magi_def_anim magi_pop magi_pop_anim + instance->registerEObj( "Entrance", 2000182, 4738599, 5, { 9.717670f, 0.000000f, 14.522430f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -15.000000f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/BattleintheBigKeep.cpp b/src/servers/Scripts/instances/trials/BattleintheBigKeep.cpp index 0d1cb656..538965a3 100644 --- a/src/servers/Scripts/instances/trials/BattleintheBigKeep.cpp +++ b/src/servers/Scripts/instances/trials/BattleintheBigKeep.cpp @@ -1,149 +1,231 @@ #include #include -class BattleintheBigKeep : public InstanceContentScript +class BattleintheBigKeep : + public InstanceContentScript { public: - BattleintheBigKeep() : InstanceContentScript( 20030 ) - { } + BattleintheBigKeep() : + InstanceContentScript( 20030 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_f1d3_a1_gar2", 2000551, 4277027, 4, { -3.577190f, 48.000000f, -12.625050f }, 1.000000f, 0.000000f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_1", 2000552, 4277005, 4, { 21.455280f, 48.000011f, -12.604770f }, 1.000000f, 0.000000f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_2", 2000553, 4277029, 4, { -3.963791f, 48.000000f, 9.699657f }, 1.000000f, 0.000000f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_3", 2000554, 4277028, 4, { 21.081841f, 47.999920f, 9.731779f }, 1.000000f, 0.000000f ); - // States -> on off vfx_on - instance->registerEObj( "Entrance", 2000491, 4246565, 5, { -254.388702f, -8.857766f, -0.323940f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_0", 2000492, 0, 4, { -266.179810f, -9.200000f, -0.162207f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2000493, 4246574, 4, { -12.466670f, 48.285069f, -0.015320f }, 0.991760f, 0.000048f ); - // States -> vf_htras1_on vf_htras1_of - instance->registerEObj( "sgvf_w_lvd_b0094", 2000494, 4246576, 4, { -81.527344f, 0.000003f, -1.602537f }, 1.000000f, 0.000000f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0118", 2000495, 4246594, 4, { -81.412201f, 0.000003f, 0.186550f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0094_1", 2000496, 4246595, 4, { 199.816895f, 21.957701f, -104.781303f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2000497, 4246596, 4, { 200.915497f, 21.957701f, -104.598198f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0249", 2000498, 4246617, 4, { 34.775269f, 48.081181f, 0.381470f }, 0.991760f, 0.000048f ); - // States -> vf_line_on vf_line_of - instance->registerEObj( "sgvf_w_lvd_b0250", 2000499, 4246618, 4, { 34.775269f, 48.081181f, -0.839294f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -246.833496f, -8.499996f, 4.016408f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Aetherialflow", 2000500, 4247835, 4, { -10.236110f, -0.000000f, -0.015320f }, 0.991760f, 0.000048f ); - instance->registerEObj( "PresenceChamberdoor", 2000502, 4308888, 4, { 60.483269f, 48.174511f, -0.015320f }, 0.991760f, 0.000048f ); - instance->registerEObj( "BloodyTranseptdoor", 2000687, 4308274, 4, { 199.985397f, 22.200001f, -103.389503f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_f1d1_b0008", 2002741, 4388278, 4, { -82.462273f, 0.000002f, 0.045686f }, 1.000000f, 0.000000f ); - // States -> vf_baria1_off vf_baria_on - instance->registerEObj( "sgbg_f1d3_a1_gar1", 2000509, 4271520, 4, { 134.111496f, 22.079769f, -5.935791f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_1", 2000510, 4271522, 4, { 142.229202f, 22.079769f, -6.088379f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_2", 2000511, 4271529, 4, { 158.129196f, 22.079769f, -6.088379f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_3", 2000512, 4271531, 4, { 133.958893f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_4", 2000513, 4271532, 4, { 142.015594f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_5", 2000514, 4271533, 4, { 158.190201f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_6", 2000521, 4274657, 4, { 193.987900f, 22.110291f, 42.099609f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_7", 2000522, 4274656, 4, { 193.804794f, 22.079769f, 57.938480f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_8", 2000523, 4274655, 4, { 193.804794f, 22.079769f, 65.964722f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_9", 2000524, 4274661, 4, { 206.317093f, 22.079769f, 42.038570f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_10", 2000525, 4274660, 4, { 206.286697f, 22.079769f, 57.968990f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_11", 2000526, 4274659, 4, { 206.286697f, 22.079769f, 65.995239f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_12", 2000533, 4274648, 4, { 241.992798f, 22.079769f, -6.332520f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_13", 2000534, 4274649, 4, { 258.075806f, 22.079769f, -6.332520f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_14", 2000535, 4274650, 4, { 265.949493f, 22.079769f, -6.271484f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_15", 2000536, 4274651, 4, { 241.931793f, 22.079769f, 6.240906f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_16", 2000537, 4274652, 4, { 258.075806f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_17", 2000538, 4274653, 4, { 266.071503f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_18", 2000545, 4274662, 4, { 193.804794f, 22.079769f, -34.042912f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_19", 2000546, 4274667, 4, { 193.804794f, 22.079769f, -42.008121f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_20", 2000547, 4274666, 4, { 193.804794f, 22.079769f, -58.335270f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_21", 2000548, 4274663, 4, { 206.317093f, 22.079769f, -33.890320f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_22", 2000549, 4274665, 4, { 206.317093f, 22.079769f, -41.916561f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar1_23", 2000550, 4274664, 4, { 206.317093f, 22.079769f, -58.274231f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_f1d3_a1_gar2_4", 2000503, 4274671, 4, { 134.111496f, 22.079769f, -5.935791f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_5", 2000504, 4274672, 4, { 142.229202f, 22.079769f, -6.088379f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_6", 2000505, 4274673, 4, { 158.129196f, 22.079769f, -6.088379f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_7", 2000506, 4274674, 4, { 133.958893f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_8", 2000507, 4274675, 4, { 142.015594f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_9", 2000508, 4274676, 4, { 158.190201f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_10", 2000515, 4274685, 4, { 193.987900f, 22.110291f, 42.099609f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_11", 2000516, 4274684, 4, { 193.804794f, 22.079769f, 57.938480f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_12", 2000517, 4274683, 4, { 193.804794f, 22.079769f, 65.964722f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_13", 2000518, 4274688, 4, { 206.317093f, 22.079769f, 42.038570f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_14", 2000519, 4274687, 4, { 206.317093f, 22.079769f, 57.968990f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_15", 2000520, 4274686, 4, { 206.317093f, 22.079769f, 65.995239f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_16", 2000527, 4274677, 4, { 241.992798f, 22.079769f, -6.332520f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_17", 2000528, 4274678, 4, { 258.075806f, 22.079769f, -6.332520f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_18", 2000529, 4274679, 4, { 265.949493f, 22.079769f, -6.271484f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_19", 2000530, 4274680, 4, { 241.931793f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_20", 2000531, 4274681, 4, { 258.075806f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_21", 2000532, 4274682, 4, { 266.071503f, 22.079769f, 6.271362f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_22", 2000539, 4274689, 4, { 193.804794f, 22.079769f, -34.042912f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_23", 2000540, 4274694, 4, { 193.804794f, 22.079769f, -42.008121f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_24", 2000541, 4274693, 4, { 193.804794f, 22.079769f, -58.335270f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_25", 2000542, 4274690, 4, { 206.317093f, 22.079769f, -33.890320f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_26", 2000543, 4274692, 4, { 206.317093f, 22.079769f, -41.916561f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "sgbg_f1d3_a1_gar2_27", 2000544, 4274691, 4, { 206.317093f, 22.079769f, -58.274231f }, 0.991760f, 0.000048f ); - // States -> on off vfx_on - instance->registerEObj( "Entrance_1", 2000182, 5608623, 5, { -156.520401f, -2.800003f, -5.140180f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5608617, 4, { -154.662003f, -2.800003f, 5.028913f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2002735, 0, 4, { -151.232193f, -2.822998f, 0.289556f }, 1.174927f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2005128, 5608619, 4, { -112.240501f, -2.800003f, -0.701091f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_2", 2002735, 0, 4, { -46.585720f, 0.045776f, 0.190301f }, 1.179312f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5608620, 4, { -46.476231f, 0.000000f, -0.510445f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Exit_1", 2000139, 0, 4, { -7.766907f, -0.015320f, 0.015198f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgvf_f1d3_bo189", 2000561, 4248559, 4, { 200.121902f, 21.988159f, -114.000000f }, 1.000000f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00", 2000555, 4249099, 4, { 200.000000f, 21.988159f, -151.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Aetherialflow_1", 2000501, 4247838, 4, { 200.061005f, 22.000000f, -165.266006f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_1", 2000556, 4249100, 4, { 200.000000f, 21.988159f, -146.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_2", 2000557, 4249101, 4, { 200.000000f, 21.988159f, -141.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_3", 2000560, 4249104, 4, { 200.000000f, 21.988159f, -126.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_4", 2000602, 4253048, 4, { 200.000000f, 21.988159f, -121.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_5", 2000559, 4249103, 4, { 200.000000f, 21.988159f, -131.822800f }, 0.991760f, 0.000048f ); - instance->registerEObj( "sgbg_col_wall_00_6", 2000558, 4249102, 4, { 200.000000f, 21.957701f, -136.838501f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_f1d3_a1_gar2", 2000551, 4277027, 4, { -3.577190f, 48.000000f, -12.625050f }, + 1.000000f, 0.000000f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_1", 2000552, 4277005, 4, { 21.455280f, 48.000011f, -12.604770f }, + 1.000000f, 0.000000f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_2", 2000553, 4277029, 4, { -3.963791f, 48.000000f, 9.699657f }, + 1.000000f, 0.000000f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_3", 2000554, 4277028, 4, { 21.081841f, 47.999920f, 9.731779f }, + 1.000000f, 0.000000f ); + // States -> on off vfx_on + instance->registerEObj( "Entrance", 2000491, 4246565, 5, { -254.388702f, -8.857766f, -0.323940f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_0", 2000492, 0, 4, { -266.179810f, -9.200000f, -0.162207f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2000493, 4246574, 4, { -12.466670f, 48.285069f, -0.015320f }, 0.991760f, + 0.000048f ); + // States -> vf_htras1_on vf_htras1_of + instance->registerEObj( "sgvf_w_lvd_b0094", 2000494, 4246576, 4, { -81.527344f, 0.000003f, -1.602537f }, 1.000000f, + 0.000000f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0118", 2000495, 4246594, 4, { -81.412201f, 0.000003f, 0.186550f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0094_1", 2000496, 4246595, 4, { 199.816895f, 21.957701f, -104.781303f }, + 0.991760f, 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgpl_w_lvd_b0118_f1d2", 2000497, 4246596, 4, { 200.915497f, 21.957701f, -104.598198f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0249", 2000498, 4246617, 4, { 34.775269f, 48.081181f, 0.381470f }, 0.991760f, + 0.000048f ); + // States -> vf_line_on vf_line_of + instance->registerEObj( "sgvf_w_lvd_b0250", 2000499, 4246618, 4, { 34.775269f, 48.081181f, -0.839294f }, 0.991760f, + 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -246.833496f, -8.499996f, 4.016408f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Aetherialflow", 2000500, 4247835, 4, { -10.236110f, -0.000000f, -0.015320f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "PresenceChamberdoor", 2000502, 4308888, 4, { 60.483269f, 48.174511f, -0.015320f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "BloodyTranseptdoor", 2000687, 4308274, 4, { 199.985397f, 22.200001f, -103.389503f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_f1d1_b0008", 2002741, 4388278, 4, { -82.462273f, 0.000002f, 0.045686f }, 1.000000f, + 0.000000f ); + // States -> vf_baria1_off vf_baria_on + instance->registerEObj( "sgbg_f1d3_a1_gar1", 2000509, 4271520, 4, { 134.111496f, 22.079769f, -5.935791f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_1", 2000510, 4271522, 4, { 142.229202f, 22.079769f, -6.088379f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_2", 2000511, 4271529, 4, { 158.129196f, 22.079769f, -6.088379f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_3", 2000512, 4271531, 4, { 133.958893f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_4", 2000513, 4271532, 4, { 142.015594f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_5", 2000514, 4271533, 4, { 158.190201f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_6", 2000521, 4274657, 4, { 193.987900f, 22.110291f, 42.099609f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_7", 2000522, 4274656, 4, { 193.804794f, 22.079769f, 57.938480f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_8", 2000523, 4274655, 4, { 193.804794f, 22.079769f, 65.964722f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_9", 2000524, 4274661, 4, { 206.317093f, 22.079769f, 42.038570f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_10", 2000525, 4274660, 4, { 206.286697f, 22.079769f, 57.968990f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_11", 2000526, 4274659, 4, { 206.286697f, 22.079769f, 65.995239f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_12", 2000533, 4274648, 4, { 241.992798f, 22.079769f, -6.332520f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_13", 2000534, 4274649, 4, { 258.075806f, 22.079769f, -6.332520f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_14", 2000535, 4274650, 4, { 265.949493f, 22.079769f, -6.271484f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_15", 2000536, 4274651, 4, { 241.931793f, 22.079769f, 6.240906f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_16", 2000537, 4274652, 4, { 258.075806f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_17", 2000538, 4274653, 4, { 266.071503f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_18", 2000545, 4274662, 4, { 193.804794f, 22.079769f, -34.042912f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_19", 2000546, 4274667, 4, { 193.804794f, 22.079769f, -42.008121f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_20", 2000547, 4274666, 4, { 193.804794f, 22.079769f, -58.335270f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_21", 2000548, 4274663, 4, { 206.317093f, 22.079769f, -33.890320f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_22", 2000549, 4274665, 4, { 206.317093f, 22.079769f, -41.916561f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar1_23", 2000550, 4274664, 4, { 206.317093f, 22.079769f, -58.274231f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_f1d3_a1_gar2_4", 2000503, 4274671, 4, { 134.111496f, 22.079769f, -5.935791f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_5", 2000504, 4274672, 4, { 142.229202f, 22.079769f, -6.088379f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_6", 2000505, 4274673, 4, { 158.129196f, 22.079769f, -6.088379f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_7", 2000506, 4274674, 4, { 133.958893f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_8", 2000507, 4274675, 4, { 142.015594f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_9", 2000508, 4274676, 4, { 158.190201f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_10", 2000515, 4274685, 4, { 193.987900f, 22.110291f, 42.099609f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_11", 2000516, 4274684, 4, { 193.804794f, 22.079769f, 57.938480f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_12", 2000517, 4274683, 4, { 193.804794f, 22.079769f, 65.964722f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_13", 2000518, 4274688, 4, { 206.317093f, 22.079769f, 42.038570f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_14", 2000519, 4274687, 4, { 206.317093f, 22.079769f, 57.968990f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_15", 2000520, 4274686, 4, { 206.317093f, 22.079769f, 65.995239f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_16", 2000527, 4274677, 4, { 241.992798f, 22.079769f, -6.332520f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_17", 2000528, 4274678, 4, { 258.075806f, 22.079769f, -6.332520f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_18", 2000529, 4274679, 4, { 265.949493f, 22.079769f, -6.271484f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_19", 2000530, 4274680, 4, { 241.931793f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_20", 2000531, 4274681, 4, { 258.075806f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_21", 2000532, 4274682, 4, { 266.071503f, 22.079769f, 6.271362f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_22", 2000539, 4274689, 4, { 193.804794f, 22.079769f, -34.042912f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_23", 2000540, 4274694, 4, { 193.804794f, 22.079769f, -42.008121f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_24", 2000541, 4274693, 4, { 193.804794f, 22.079769f, -58.335270f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_25", 2000542, 4274690, 4, { 206.317093f, 22.079769f, -33.890320f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_26", 2000543, 4274692, 4, { 206.317093f, 22.079769f, -41.916561f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "sgbg_f1d3_a1_gar2_27", 2000544, 4274691, 4, { 206.317093f, 22.079769f, -58.274231f }, + 0.991760f, 0.000048f ); + // States -> on off vfx_on + instance->registerEObj( "Entrance_1", 2000182, 5608623, 5, { -156.520401f, -2.800003f, -5.140180f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 5608617, 4, { -154.662003f, -2.800003f, 5.028913f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2002735, 0, 4, { -151.232193f, -2.822998f, 0.289556f }, 1.174927f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2005128, 5608619, 4, { -112.240501f, -2.800003f, -0.701091f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_2", 2002735, 0, 4, { -46.585720f, 0.045776f, 0.190301f }, 1.179312f, -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_3", 2002872, 5608620, 4, { -46.476231f, 0.000000f, -0.510445f }, + 1.000000f, 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Exit_1", 2000139, 0, 4, { -7.766907f, -0.015320f, 0.015198f }, 0.991760f, 0.000048f ); + instance->registerEObj( "sgvf_f1d3_bo189", 2000561, 4248559, 4, { 200.121902f, 21.988159f, -114.000000f }, + 1.000000f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00", 2000555, 4249099, 4, { 200.000000f, 21.988159f, -151.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Aetherialflow_1", 2000501, 4247838, 4, { 200.061005f, 22.000000f, -165.266006f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_1", 2000556, 4249100, 4, { 200.000000f, 21.988159f, -146.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_2", 2000557, 4249101, 4, { 200.000000f, 21.988159f, -141.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_3", 2000560, 4249104, 4, { 200.000000f, 21.988159f, -126.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_4", 2000602, 4253048, 4, { 200.000000f, 21.988159f, -121.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_5", 2000559, 4249103, 4, { 200.000000f, 21.988159f, -131.822800f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "sgbg_col_wall_00_6", 2000558, 4249102, 4, { 200.000000f, 21.957701f, -136.838501f }, + 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/BattleontheBigBridge.cpp b/src/servers/Scripts/instances/trials/BattleontheBigBridge.cpp index 5ee749b7..f460afcc 100644 --- a/src/servers/Scripts/instances/trials/BattleontheBigBridge.cpp +++ b/src/servers/Scripts/instances/trials/BattleontheBigBridge.cpp @@ -1,38 +1,46 @@ #include #include -class BattleontheBigBridge : public InstanceContentScript +class BattleontheBigBridge : + public InstanceContentScript { public: - BattleontheBigBridge() : InstanceContentScript( 20021 ) - { } + BattleontheBigBridge() : + InstanceContentScript( 20021 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002735, 0, 4, { 106.355499f, -5.000003f, -0.049812f }, 0.404395f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4630952, 4, { 109.916496f, -5.000003f, -0.035030f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_1", 2002735, 0, 4, { -75.653900f, 1.999997f, 0.149403f }, 0.500000f, -1.570451f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4635071, 4, { -72.579193f, 1.999997f, 0.830825f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2003902, 4635078, 4, { -37.106110f, 2.000000f, 1.552188f }, 1.000000f, 0.000000f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "Entrance", 2000182, 4630929, 5, { -141.564804f, 1.314597f, 3.459962f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 143.814301f, -5.000000f, -0.081344f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -136.750107f, 1.329580f, 5.374416f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002735, 0, 4, { 106.355499f, -5.000003f, -0.049812f }, 0.404395f, + -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4630952, 4, { 109.916496f, -5.000003f, -0.035030f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_1", 2002735, 0, 4, { -75.653900f, 1.999997f, 0.149403f }, 0.500000f, -1.570451f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4635071, 4, { -72.579193f, 1.999997f, 0.830825f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2003902, 4635078, 4, { -37.106110f, 2.000000f, 1.552188f }, 1.000000f, + 0.000000f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "Entrance", 2000182, 4630929, 5, { -141.564804f, 1.314597f, 3.459962f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 143.814301f, -5.000000f, -0.081344f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -136.750107f, 1.329580f, 5.374416f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/CapeWestwind.cpp b/src/servers/Scripts/instances/trials/CapeWestwind.cpp index a9be0a33..60ef9d96 100644 --- a/src/servers/Scripts/instances/trials/CapeWestwind.cpp +++ b/src/servers/Scripts/instances/trials/CapeWestwind.cpp @@ -1,30 +1,35 @@ #include #include -class CapeWestwind : public InstanceContentScript +class CapeWestwind : + public InstanceContentScript { public: - CapeWestwind() : InstanceContentScript( 20007 ) - { } + CapeWestwind() : + InstanceContentScript( 20007 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Exit", 2000605, 0, 4, { -715.942383f, 69.420113f, -830.370300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2000606, 3861081, 4, { -670.462280f, 63.293751f, -801.510986f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000604, 4262798, 5, { -677.634888f, 64.116386f, -803.174927f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Exit", 2000605, 0, 4, { -715.942383f, 69.420113f, -830.370300f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2000606, 3861081, 4, { -670.462280f, 63.293751f, -801.510986f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000604, 4262798, 5, { -677.634888f, 64.116386f, -803.174927f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ContainmentBayP1T6.cpp b/src/servers/Scripts/instances/trials/ContainmentBayP1T6.cpp index a42123e5..7b364104 100644 --- a/src/servers/Scripts/instances/trials/ContainmentBayP1T6.cpp +++ b/src/servers/Scripts/instances/trials/ContainmentBayP1T6.cpp @@ -1,26 +1,29 @@ #include #include -class ContainmentBayP1T6 : public InstanceContentScript +class ContainmentBayP1T6 : + public InstanceContentScript { public: - ContainmentBayP1T6() : InstanceContentScript( 20041 ) - { } + ContainmentBayP1T6() : + InstanceContentScript( 20041 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ContainmentBayP1T6Extreme.cpp b/src/servers/Scripts/instances/trials/ContainmentBayP1T6Extreme.cpp index f788224e..2233c641 100644 --- a/src/servers/Scripts/instances/trials/ContainmentBayP1T6Extreme.cpp +++ b/src/servers/Scripts/instances/trials/ContainmentBayP1T6Extreme.cpp @@ -1,26 +1,29 @@ #include #include -class ContainmentBayP1T6Extreme : public InstanceContentScript +class ContainmentBayP1T6Extreme : + public InstanceContentScript { public: - ContainmentBayP1T6Extreme() : InstanceContentScript( 20042 ) - { } + ContainmentBayP1T6Extreme() : + InstanceContentScript( 20042 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ContainmentBayS1T7.cpp b/src/servers/Scripts/instances/trials/ContainmentBayS1T7.cpp index 41d885ae..ea1a1c46 100644 --- a/src/servers/Scripts/instances/trials/ContainmentBayS1T7.cpp +++ b/src/servers/Scripts/instances/trials/ContainmentBayS1T7.cpp @@ -1,26 +1,29 @@ #include #include -class ContainmentBayS1T7 : public InstanceContentScript +class ContainmentBayS1T7 : + public InstanceContentScript { public: - ContainmentBayS1T7() : InstanceContentScript( 20037 ) - { } + ContainmentBayS1T7() : + InstanceContentScript( 20037 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ContainmentBayS1T7Extreme.cpp b/src/servers/Scripts/instances/trials/ContainmentBayS1T7Extreme.cpp index 3584a978..e14aa856 100644 --- a/src/servers/Scripts/instances/trials/ContainmentBayS1T7Extreme.cpp +++ b/src/servers/Scripts/instances/trials/ContainmentBayS1T7Extreme.cpp @@ -1,26 +1,29 @@ #include #include -class ContainmentBayS1T7Extreme : public InstanceContentScript +class ContainmentBayS1T7Extreme : + public InstanceContentScript { public: - ContainmentBayS1T7Extreme() : InstanceContentScript( 20038 ) - { } + ContainmentBayS1T7Extreme() : + InstanceContentScript( 20038 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ContainmentBayZ1T9.cpp b/src/servers/Scripts/instances/trials/ContainmentBayZ1T9.cpp index 951dbeac..d9fd7ced 100644 --- a/src/servers/Scripts/instances/trials/ContainmentBayZ1T9.cpp +++ b/src/servers/Scripts/instances/trials/ContainmentBayZ1T9.cpp @@ -1,26 +1,29 @@ #include #include -class ContainmentBayZ1T9 : public InstanceContentScript +class ContainmentBayZ1T9 : + public InstanceContentScript { public: - ContainmentBayZ1T9() : InstanceContentScript( 20043 ) - { } + ContainmentBayZ1T9() : + InstanceContentScript( 20043 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ContainmentBayZ1T9Extreme.cpp b/src/servers/Scripts/instances/trials/ContainmentBayZ1T9Extreme.cpp index cf3af5e2..9d2d8f3b 100644 --- a/src/servers/Scripts/instances/trials/ContainmentBayZ1T9Extreme.cpp +++ b/src/servers/Scripts/instances/trials/ContainmentBayZ1T9Extreme.cpp @@ -1,26 +1,29 @@ #include #include -class ContainmentBayZ1T9Extreme : public InstanceContentScript +class ContainmentBayZ1T9Extreme : + public InstanceContentScript { public: - ContainmentBayZ1T9Extreme() : InstanceContentScript( 20044 ) - { } + ContainmentBayZ1T9Extreme() : + InstanceContentScript( 20044 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/Emanation.cpp b/src/servers/Scripts/instances/trials/Emanation.cpp index 9098605f..049dd810 100644 --- a/src/servers/Scripts/instances/trials/Emanation.cpp +++ b/src/servers/Scripts/instances/trials/Emanation.cpp @@ -1,26 +1,29 @@ #include #include -class Emanation : public InstanceContentScript +class Emanation : + public InstanceContentScript { public: - Emanation() : InstanceContentScript( 20048 ) - { } + Emanation() : + InstanceContentScript( 20048 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/EmanationExtreme.cpp b/src/servers/Scripts/instances/trials/EmanationExtreme.cpp index b79218e3..d5d13ae0 100644 --- a/src/servers/Scripts/instances/trials/EmanationExtreme.cpp +++ b/src/servers/Scripts/instances/trials/EmanationExtreme.cpp @@ -1,26 +1,29 @@ #include #include -class EmanationExtreme : public InstanceContentScript +class EmanationExtreme : + public InstanceContentScript { public: - EmanationExtreme() : InstanceContentScript( 20049 ) - { } + EmanationExtreme() : + InstanceContentScript( 20049 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/SpecialEventI.cpp b/src/servers/Scripts/instances/trials/SpecialEventI.cpp index d6820ecd..e6778180 100644 --- a/src/servers/Scripts/instances/trials/SpecialEventI.cpp +++ b/src/servers/Scripts/instances/trials/SpecialEventI.cpp @@ -1,29 +1,33 @@ #include #include -class SpecialEventI : public InstanceContentScript +class SpecialEventI : + public InstanceContentScript { public: - SpecialEventI() : InstanceContentScript( 20014 ) - { } + SpecialEventI() : + InstanceContentScript( 20014 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4236868, 5, { 0.000000f, 0.000000f, 24.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -10.000000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4236868, 5, { 0.000000f, 0.000000f, 24.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -10.000000f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/SpecialEventII.cpp b/src/servers/Scripts/instances/trials/SpecialEventII.cpp index e67b169f..3b08d377 100644 --- a/src/servers/Scripts/instances/trials/SpecialEventII.cpp +++ b/src/servers/Scripts/instances/trials/SpecialEventII.cpp @@ -1,26 +1,29 @@ #include #include -class SpecialEventII : public InstanceContentScript +class SpecialEventII : + public InstanceContentScript { public: - SpecialEventII() : InstanceContentScript( 20015 ) - { } + SpecialEventII() : + InstanceContentScript( 20015 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/SpecialEventIII.cpp b/src/servers/Scripts/instances/trials/SpecialEventIII.cpp index b51956b0..95bea8a0 100644 --- a/src/servers/Scripts/instances/trials/SpecialEventIII.cpp +++ b/src/servers/Scripts/instances/trials/SpecialEventIII.cpp @@ -1,26 +1,29 @@ #include #include -class SpecialEventIII : public InstanceContentScript +class SpecialEventIII : + public InstanceContentScript { public: - SpecialEventIII() : InstanceContentScript( 20016 ) - { } + SpecialEventIII() : + InstanceContentScript( 20016 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheBowlofEmbers.cpp b/src/servers/Scripts/instances/trials/TheBowlofEmbers.cpp index 30a15c0d..bc0cfe0e 100644 --- a/src/servers/Scripts/instances/trials/TheBowlofEmbers.cpp +++ b/src/servers/Scripts/instances/trials/TheBowlofEmbers.cpp @@ -1,31 +1,35 @@ #include #include -class TheBowlofEmbers : public InstanceContentScript +class TheBowlofEmbers : + public InstanceContentScript { public: - TheBowlofEmbers() : InstanceContentScript( 20001 ) - { } + TheBowlofEmbers() : + InstanceContentScript( 20001 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4177874, 5, { -16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2007452, 0, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "BladeofLight", 2007454, 0, 4, { 0.000000f, 0.000000f, 11.300000f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4177874, 5, { -16.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2007452, 0, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "BladeofLight", 2007454, 0, 4, { 0.000000f, 0.000000f, 11.300000f }, 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheBowlofEmbersExtreme.cpp b/src/servers/Scripts/instances/trials/TheBowlofEmbersExtreme.cpp index 1609c1ad..748594a7 100644 --- a/src/servers/Scripts/instances/trials/TheBowlofEmbersExtreme.cpp +++ b/src/servers/Scripts/instances/trials/TheBowlofEmbersExtreme.cpp @@ -1,31 +1,35 @@ #include #include -class TheBowlofEmbersExtreme : public InstanceContentScript +class TheBowlofEmbersExtreme : + public InstanceContentScript { public: - TheBowlofEmbersExtreme() : InstanceContentScript( 20008 ) - { } + TheBowlofEmbersExtreme() : + InstanceContentScript( 20008 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4177874, 5, { -16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2007452, 0, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "BladeofLight", 2007454, 0, 4, { 0.000000f, 0.000000f, 11.300000f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4177874, 5, { -16.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2007452, 0, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "BladeofLight", 2007454, 0, 4, { 0.000000f, 0.000000f, 11.300000f }, 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheBowlofEmbersHard.cpp b/src/servers/Scripts/instances/trials/TheBowlofEmbersHard.cpp index 8ee93875..96471b06 100644 --- a/src/servers/Scripts/instances/trials/TheBowlofEmbersHard.cpp +++ b/src/servers/Scripts/instances/trials/TheBowlofEmbersHard.cpp @@ -1,31 +1,35 @@ #include #include -class TheBowlofEmbersHard : public InstanceContentScript +class TheBowlofEmbersHard : + public InstanceContentScript { public: - TheBowlofEmbersHard() : InstanceContentScript( 20004 ) - { } + TheBowlofEmbersHard() : + InstanceContentScript( 20004 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4177874, 5, { -16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_0", 2007452, 0, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "BladeofLight", 2007454, 0, 4, { 0.000000f, 0.000000f, 11.300000f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4177874, 5, { -16.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 16.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_0", 2007452, 0, 4, { 0.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "BladeofLight", 2007454, 0, 4, { 0.000000f, 0.000000f, 11.300000f }, 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheChrysalis.cpp b/src/servers/Scripts/instances/trials/TheChrysalis.cpp index 07d2c1c4..499c4975 100644 --- a/src/servers/Scripts/instances/trials/TheChrysalis.cpp +++ b/src/servers/Scripts/instances/trials/TheChrysalis.cpp @@ -1,59 +1,77 @@ #include #include -class TheChrysalis : public InstanceContentScript +class TheChrysalis : + public InstanceContentScript { public: - TheChrysalis() : InstanceContentScript( 20029 ) - { } + TheChrysalis() : + InstanceContentScript( 20029 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgvf_z1e9_b0606", 2005209, 5689928, 4, { -0.866003f, 0.000000f, -29.632271f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 5649517, 5, { -0.064617f, 0.000000f, 21.704861f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -22.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_z1e9_t1_yuka1", 2005160, 5652375, 4, { -1.683807f, -0.002888f, -0.074251f }, 1.000000f, 0.000000f ); - // States -> d_def d_def_anim d_01 d_01_anim d_02 d_02_anim d_03 d_03_anim d_04 d_04_anim - instance->registerEObj( "unknown_0", 2005158, 0, 4, { 220.000000f, -0.045776f, 0.000000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_1", 2005159, 0, 4, { 229.899994f, -0.013268f, 9.900000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_2", 2004550, 0, 4, { 0.068370f, -0.002887f, -0.230858f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_z1e1_b0598", 2005161, 5652362, 4, { 219.837494f, -0.000000f, -20.737341f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_1", 2005198, 5675943, 4, { 234.366592f, -0.000818f, -14.481080f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_2", 2005199, 5675944, 4, { 238.872803f, -0.002887f, -0.791933f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_3", 2005200, 5675945, 4, { 233.135101f, -0.002692f, 13.732260f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_4", 2005201, 5675946, 4, { 220.264893f, -0.002887f, 18.895180f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_5", 2005202, 5675947, 4, { 206.385605f, -0.002087f, 13.131840f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_6", 2005203, 5675948, 4, { 201.101196f, -0.002887f, -0.591635f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_7", 2005204, 5675951, 4, { 206.584305f, -0.002887f, -14.412730f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_8", 2005205, 5675952, 4, { 227.781204f, -0.002888f, -8.587747f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_9", 2005206, 5675953, 4, { 227.676605f, -0.002889f, 8.141966f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_10", 2005207, 5675954, 4, { 211.709396f, -0.002890f, 7.657639f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - instance->registerEObj( "sgvf_z1e1_b0598_11", 2005208, 5675955, 4, { 211.825500f, -0.001177f, -9.651319f }, 1.000000f, 0.000000f ); - // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgvf_z1e9_b0606", 2005209, 5689928, 4, { -0.866003f, 0.000000f, -29.632271f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 5649517, 5, { -0.064617f, 0.000000f, 21.704861f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -22.000000f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_z1e9_t1_yuka1", 2005160, 5652375, 4, { -1.683807f, -0.002888f, -0.074251f }, + 1.000000f, 0.000000f ); + // States -> d_def d_def_anim d_01 d_01_anim d_02 d_02_anim d_03 d_03_anim d_04 d_04_anim + instance->registerEObj( "unknown_0", 2005158, 0, 4, { 220.000000f, -0.045776f, 0.000000f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_1", 2005159, 0, 4, { 229.899994f, -0.013268f, 9.900000f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_2", 2004550, 0, 4, { 0.068370f, -0.002887f, -0.230858f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_z1e1_b0598", 2005161, 5652362, 4, { 219.837494f, -0.000000f, -20.737341f }, 1.000000f, + 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_1", 2005198, 5675943, 4, { 234.366592f, -0.000818f, -14.481080f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_2", 2005199, 5675944, 4, { 238.872803f, -0.002887f, -0.791933f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_3", 2005200, 5675945, 4, { 233.135101f, -0.002692f, 13.732260f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_4", 2005201, 5675946, 4, { 220.264893f, -0.002887f, 18.895180f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_5", 2005202, 5675947, 4, { 206.385605f, -0.002087f, 13.131840f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_6", 2005203, 5675948, 4, { 201.101196f, -0.002887f, -0.591635f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_7", 2005204, 5675951, 4, { 206.584305f, -0.002887f, -14.412730f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_8", 2005205, 5675952, 4, { 227.781204f, -0.002888f, -8.587747f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_9", 2005206, 5675953, 4, { 227.676605f, -0.002889f, 8.141966f }, 1.000000f, + 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_10", 2005207, 5675954, 4, { 211.709396f, -0.002890f, 7.657639f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim + instance->registerEObj( "sgvf_z1e1_b0598_11", 2005208, 5675955, 4, { 211.825500f, -0.001177f, -9.651319f }, + 1.000000f, 0.000000f ); + // States -> crack_def crack_01 crack_01_anim crack_02 crack_02_anim crack_03 crack_03_anim crack_04 crack_04_anim - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheDragonsNeck.cpp b/src/servers/Scripts/instances/trials/TheDragonsNeck.cpp index 0b17e684..f0b8c17e 100644 --- a/src/servers/Scripts/instances/trials/TheDragonsNeck.cpp +++ b/src/servers/Scripts/instances/trials/TheDragonsNeck.cpp @@ -1,82 +1,132 @@ #include #include -class TheDragonsNeck : public InstanceContentScript +class TheDragonsNeck : + public InstanceContentScript { public: - TheDragonsNeck() : InstanceContentScript( 20026 ) - { } + TheDragonsNeck() : + InstanceContentScript( 20026 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Thalsscepter", 2003646, 0, 4, { -270.088409f, 17.593571f, 31.956100f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_0", 2003695, 4617495, 4, { -280.035614f, 17.622829f, 22.302071f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2003696, 4563389, 4, { -286.231689f, 17.622749f, 20.657721f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Thalsscepter_1", 2003674, 0, 4, { -271.908386f, 17.593571f, 6.173567f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Thalsscepter_2", 2003675, 0, 4, { -244.251801f, 17.593571f, 30.251480f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Thalsscepter_3", 2003676, 0, 4, { -246.038696f, 17.593571f, 4.371015f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Mammetactivator", 2003641, 4616318, 4, { -84.695412f, -10.178000f, -91.555862f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shadowyorb", 2003642, 0, 4, { 163.469803f, 6.240906f, 219.745102f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shadowyorb_1", 2003643, 0, 4, { 154.283905f, 6.240900f, 239.520905f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shadowyorb_2", 2003644, 0, 4, { 143.742905f, 6.240900f, 210.525208f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Shadowyorb_3", 2003645, 0, 4, { 134.607193f, 6.240900f, 230.328094f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2003569, 4603298, 4, { 148.951706f, 4.509544f, 224.628006f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Exit", 2001610, 4569374, 4, { -278.262390f, 17.622650f, 19.181259f }, 0.991760f, 0.000048f ); - // States -> vf_htras1_on vf_htras1_of - instance->registerEObj( "Shortcut", 2000700, 0, 4, { 139.879395f, -0.228372f, -31.551029f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Entrance", 2000182, 4569369, 5, { 149.187393f, -0.228943f, -35.111019f }, 0.991760f, 0.000048f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "unknown_3", 2002575, 0, 4, { 160.775299f, -1.641945f, -10.606120f }, 0.991760f, -1.265160f ); - instance->registerEObj( "unknown_4", 2002735, 0, 4, { -50.385818f, -10.178000f, -114.820198f }, 0.991760f, -1.005012f ); - instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4569384, 4, { -48.920971f, -10.792460f, -116.285103f }, 0.991760f, -1.062825f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_5", 2002735, 0, 4, { 129.072403f, 4.509535f, 216.306305f }, 1.000000f, 1.129171f ); - instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4569379, 4, { 130.018494f, 4.509536f, 217.130295f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_6", 2002735, 0, 4, { -233.786301f, 17.622999f, 16.764700f }, 1.000000f, -1.486617f ); - instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4569389, 4, { -233.389206f, 17.622990f, 16.739140f }, 0.991760f, 0.000048f ); - // States -> vf_bextwall_on vf_bextwall_of - instance->registerEObj( "unknown_7", 2003506, 4594991, 4, { 101.606300f, -4.171019f, -69.914146f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_8", 2003507, 4598981, 4, { -41.245178f, -10.879700f, -121.934898f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_9", 2003508, 4603945, 4, { -52.140079f, -10.696590f, -91.691528f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_10", 2003509, 4564172, 4, { 130.022095f, -0.534058f, 5.172791f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_11", 2003510, 4594992, 4, { 123.552200f, -2.731445f, 25.131590f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_12", 2003511, 4598084, 4, { 89.130997f, -3.711910f, 78.724213f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_13", 2003512, 4599477, 4, { 73.157578f, -3.335556f, 178.491302f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_14", 2003513, 4594999, 4, { 100.220802f, 0.477127f, 203.242798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_15", 2003514, 4616527, 4, { 167.865707f, 4.509536f, 233.584396f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_16", 2003515, 4567234, 4, { -191.532196f, 4.456180f, 94.520203f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_17", 2003516, 4567237, 4, { -128.869400f, 12.073380f, 96.752960f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_18", 2003517, 4567232, 4, { -66.065460f, 14.565810f, 26.350080f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_19", 2003518, 4567230, 4, { -171.754501f, 12.467810f, 12.301850f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_20", 2003519, 4596306, 4, { -198.995102f, 11.315890f, 13.488570f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_21", 2003520, 4565306, 4, { 96.452271f, -3.738525f, 39.688599f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_22", 2003521, 4565309, 4, { 127.885902f, -3.738525f, 60.807129f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_23", 2003522, 4565307, 4, { 82.383423f, -3.646973f, 59.189701f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_24", 2003523, 4565308, 4, { 108.323700f, -3.738525f, 80.552368f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_25", 2003524, 4565302, 4, { -2.324507f, 0.927634f, 144.329300f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_26", 2003525, 4565303, 4, { 27.311819f, 0.927548f, 166.238098f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_27", 2003526, 4565305, 4, { 68.331223f, 0.927661f, 136.889404f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_28", 2003527, 4595900, 4, { 77.372299f, -10.608900f, -91.074203f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_29", 2003528, 4595901, 4, { 36.027271f, -9.635880f, -104.808601f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_30", 2003529, 4595903, 4, { 2.165477f, -11.282240f, -188.867599f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_31", 2003530, 4618276, 4, { -10.216280f, -11.049250f, -152.788300f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_32", 2003531, 4595904, 4, { -21.241859f, -11.023320f, -136.299393f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance_1", 2000182, 4970117, 5, { -243.015701f, 19.074579f, 10.923530f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit_1", 2000139, 0, 4, { -272.688904f, 19.074579f, 18.222231f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Thalsscepter", 2003646, 0, 4, { -270.088409f, 17.593571f, 31.956100f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_0", 2003695, 4617495, 4, { -280.035614f, 17.622829f, 22.302071f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2003696, 4563389, 4, { -286.231689f, 17.622749f, 20.657721f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Thalsscepter_1", 2003674, 0, 4, { -271.908386f, 17.593571f, 6.173567f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Thalsscepter_2", 2003675, 0, 4, { -244.251801f, 17.593571f, 30.251480f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Thalsscepter_3", 2003676, 0, 4, { -246.038696f, 17.593571f, 4.371015f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Mammetactivator", 2003641, 4616318, 4, { -84.695412f, -10.178000f, -91.555862f }, + 0.991760f, 0.000048f ); + instance->registerEObj( "Shadowyorb", 2003642, 0, 4, { 163.469803f, 6.240906f, 219.745102f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Shadowyorb_1", 2003643, 0, 4, { 154.283905f, 6.240900f, 239.520905f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Shadowyorb_2", 2003644, 0, 4, { 143.742905f, 6.240900f, 210.525208f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Shadowyorb_3", 2003645, 0, 4, { 134.607193f, 6.240900f, 230.328094f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2003569, 4603298, 4, { 148.951706f, 4.509544f, 224.628006f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Exit", 2001610, 4569374, 4, { -278.262390f, 17.622650f, 19.181259f }, 0.991760f, + 0.000048f ); + // States -> vf_htras1_on vf_htras1_of + instance->registerEObj( "Shortcut", 2000700, 0, 4, { 139.879395f, -0.228372f, -31.551029f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Entrance", 2000182, 4569369, 5, { 149.187393f, -0.228943f, -35.111019f }, 0.991760f, + 0.000048f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "unknown_3", 2002575, 0, 4, { 160.775299f, -1.641945f, -10.606120f }, 0.991760f, + -1.265160f ); + instance->registerEObj( "unknown_4", 2002735, 0, 4, { -50.385818f, -10.178000f, -114.820198f }, 0.991760f, + -1.005012f ); + instance->registerEObj( "sgvf_w_lvd_b0118", 2002872, 4569384, 4, { -48.920971f, -10.792460f, -116.285103f }, + 0.991760f, -1.062825f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_5", 2002735, 0, 4, { 129.072403f, 4.509535f, 216.306305f }, 1.000000f, 1.129171f ); + instance->registerEObj( "sgvf_w_lvd_b0118_1", 2002872, 4569379, 4, { 130.018494f, 4.509536f, 217.130295f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_6", 2002735, 0, 4, { -233.786301f, 17.622999f, 16.764700f }, 1.000000f, + -1.486617f ); + instance->registerEObj( "sgvf_w_lvd_b0118_2", 2002872, 4569389, 4, { -233.389206f, 17.622990f, 16.739140f }, + 0.991760f, 0.000048f ); + // States -> vf_bextwall_on vf_bextwall_of + instance->registerEObj( "unknown_7", 2003506, 4594991, 4, { 101.606300f, -4.171019f, -69.914146f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_8", 2003507, 4598981, 4, { -41.245178f, -10.879700f, -121.934898f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_9", 2003508, 4603945, 4, { -52.140079f, -10.696590f, -91.691528f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_10", 2003509, 4564172, 4, { 130.022095f, -0.534058f, 5.172791f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_11", 2003510, 4594992, 4, { 123.552200f, -2.731445f, 25.131590f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_12", 2003511, 4598084, 4, { 89.130997f, -3.711910f, 78.724213f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_13", 2003512, 4599477, 4, { 73.157578f, -3.335556f, 178.491302f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_14", 2003513, 4594999, 4, { 100.220802f, 0.477127f, 203.242798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_15", 2003514, 4616527, 4, { 167.865707f, 4.509536f, 233.584396f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_16", 2003515, 4567234, 4, { -191.532196f, 4.456180f, 94.520203f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_17", 2003516, 4567237, 4, { -128.869400f, 12.073380f, 96.752960f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_18", 2003517, 4567232, 4, { -66.065460f, 14.565810f, 26.350080f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_19", 2003518, 4567230, 4, { -171.754501f, 12.467810f, 12.301850f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_20", 2003519, 4596306, 4, { -198.995102f, 11.315890f, 13.488570f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_21", 2003520, 4565306, 4, { 96.452271f, -3.738525f, 39.688599f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_22", 2003521, 4565309, 4, { 127.885902f, -3.738525f, 60.807129f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_23", 2003522, 4565307, 4, { 82.383423f, -3.646973f, 59.189701f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_24", 2003523, 4565308, 4, { 108.323700f, -3.738525f, 80.552368f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_25", 2003524, 4565302, 4, { -2.324507f, 0.927634f, 144.329300f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_26", 2003525, 4565303, 4, { 27.311819f, 0.927548f, 166.238098f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_27", 2003526, 4565305, 4, { 68.331223f, 0.927661f, 136.889404f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_28", 2003527, 4595900, 4, { 77.372299f, -10.608900f, -91.074203f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_29", 2003528, 4595901, 4, { 36.027271f, -9.635880f, -104.808601f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_30", 2003529, 4595903, 4, { 2.165477f, -11.282240f, -188.867599f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_31", 2003530, 4618276, 4, { -10.216280f, -11.049250f, -152.788300f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_32", 2003531, 4595904, 4, { -21.241859f, -11.023320f, -136.299393f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance_1", 2000182, 4970117, 5, { -243.015701f, 19.074579f, 10.923530f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit_1", 2000139, 0, 4, { -272.688904f, 19.074579f, 18.222231f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheFinalStepsofFaith.cpp b/src/servers/Scripts/instances/trials/TheFinalStepsofFaith.cpp index e0b2b811..b3f3ac92 100644 --- a/src/servers/Scripts/instances/trials/TheFinalStepsofFaith.cpp +++ b/src/servers/Scripts/instances/trials/TheFinalStepsofFaith.cpp @@ -1,32 +1,37 @@ #include #include -class TheFinalStepsofFaith : public InstanceContentScript +class TheFinalStepsofFaith : + public InstanceContentScript { public: - TheFinalStepsofFaith() : InstanceContentScript( 20039 ) - { } + TheFinalStepsofFaith() : + InstanceContentScript( 20039 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007132, 0, 4, { 1.180504f, -0.000001f, -5.348264f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007360, 0, 4, { 0.893822f, -0.000029f, 9.867915f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6243772, 5, { 5.791933f, 0.049998f, 17.147869f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -0.802442f, 0.050000f, -16.948071f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007393, 6279966, 4, { 0.867247f, -0.000024f, 9.141238f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007132, 0, 4, { 1.180504f, -0.000001f, -5.348264f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007360, 0, 4, { 0.893822f, -0.000029f, 9.867915f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6243772, 5, { 5.791933f, 0.049998f, 17.147869f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -0.802442f, 0.050000f, -16.948071f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007393, 6279966, 4, { 0.867247f, -0.000024f, 9.141238f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheHowlingEye.cpp b/src/servers/Scripts/instances/trials/TheHowlingEye.cpp index 65d5e1fe..06054df1 100644 --- a/src/servers/Scripts/instances/trials/TheHowlingEye.cpp +++ b/src/servers/Scripts/instances/trials/TheHowlingEye.cpp @@ -1,37 +1,49 @@ #include #include -class TheHowlingEye : public InstanceContentScript +class TheHowlingEye : + public InstanceContentScript { public: - TheHowlingEye() : InstanceContentScript( 20003 ) - { } + TheHowlingEye() : + InstanceContentScript( 20003 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_r1fa_a_rockcol", 2000646, 4256721, 4, { -4.592406f, -1.261766f, 4.724565f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_1", 2000647, 4256725, 4, { 7.587256f, -1.233237f, 6.169516f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_2", 2000648, 4256726, 4, { -6.329784f, 3.332559f, -6.736721f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_3", 2000649, 4256727, 4, { 5.895649f, 3.275768f, -6.217119f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_4", 2000646, 4488538, 4, { -7.000000f, 0.000000f, 7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_5", 2000647, 4488545, 4, { 7.000000f, 0.000000f, 7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_6", 2000648, 4488546, 4, { -7.000000f, 0.000000f, -7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_7", 2000649, 4488548, 4, { 7.000000f, 0.000000f, -7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000274, 4246117, 5, { 0.506547f, -1.935848f, 14.110570f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000275, 0, 4, { 1.078937f, -2.041544f, -18.363190f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_r1fa_a_rockcol", 2000646, 4256721, 4, { -4.592406f, -1.261766f, 4.724565f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_1", 2000647, 4256725, 4, { 7.587256f, -1.233237f, 6.169516f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_2", 2000648, 4256726, 4, { -6.329784f, 3.332559f, -6.736721f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_3", 2000649, 4256727, 4, { 5.895649f, 3.275768f, -6.217119f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_4", 2000646, 4488538, 4, { -7.000000f, 0.000000f, 7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_5", 2000647, 4488545, 4, { 7.000000f, 0.000000f, 7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_6", 2000648, 4488546, 4, { -7.000000f, 0.000000f, -7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_7", 2000649, 4488548, 4, { 7.000000f, 0.000000f, -7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000274, 4246117, 5, { 0.506547f, -1.935848f, 14.110570f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000275, 0, 4, { 1.078937f, -2.041544f, -18.363190f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheHowlingEyeExtreme.cpp b/src/servers/Scripts/instances/trials/TheHowlingEyeExtreme.cpp index 8c4c6d5b..d56af2dd 100644 --- a/src/servers/Scripts/instances/trials/TheHowlingEyeExtreme.cpp +++ b/src/servers/Scripts/instances/trials/TheHowlingEyeExtreme.cpp @@ -1,37 +1,49 @@ #include #include -class TheHowlingEyeExtreme : public InstanceContentScript +class TheHowlingEyeExtreme : + public InstanceContentScript { public: - TheHowlingEyeExtreme() : InstanceContentScript( 20010 ) - { } + TheHowlingEyeExtreme() : + InstanceContentScript( 20010 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_r1fa_a_rockcol", 2000646, 4256721, 4, { -4.592406f, -1.261766f, 4.724565f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_1", 2000647, 4256725, 4, { 7.587256f, -1.233237f, 6.169516f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_2", 2000648, 4256726, 4, { -6.329784f, 3.332559f, -6.736721f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_3", 2000649, 4256727, 4, { 5.895649f, 3.275768f, -6.217119f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_4", 2000646, 4488538, 4, { -7.000000f, 0.000000f, 7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_5", 2000647, 4488545, 4, { 7.000000f, 0.000000f, 7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_6", 2000648, 4488546, 4, { -7.000000f, 0.000000f, -7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_7", 2000649, 4488548, 4, { 7.000000f, 0.000000f, -7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000274, 4246117, 5, { 0.506547f, -1.935848f, 14.110570f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000275, 0, 4, { 1.078937f, -2.041544f, -18.363190f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_r1fa_a_rockcol", 2000646, 4256721, 4, { -4.592406f, -1.261766f, 4.724565f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_1", 2000647, 4256725, 4, { 7.587256f, -1.233237f, 6.169516f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_2", 2000648, 4256726, 4, { -6.329784f, 3.332559f, -6.736721f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_3", 2000649, 4256727, 4, { 5.895649f, 3.275768f, -6.217119f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_4", 2000646, 4488538, 4, { -7.000000f, 0.000000f, 7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_5", 2000647, 4488545, 4, { 7.000000f, 0.000000f, 7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_6", 2000648, 4488546, 4, { -7.000000f, 0.000000f, -7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_7", 2000649, 4488548, 4, { 7.000000f, 0.000000f, -7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000274, 4246117, 5, { 0.506547f, -1.935848f, 14.110570f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000275, 0, 4, { 1.078937f, -2.041544f, -18.363190f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheHowlingEyeHard.cpp b/src/servers/Scripts/instances/trials/TheHowlingEyeHard.cpp index 3d232cff..51e430fc 100644 --- a/src/servers/Scripts/instances/trials/TheHowlingEyeHard.cpp +++ b/src/servers/Scripts/instances/trials/TheHowlingEyeHard.cpp @@ -1,37 +1,49 @@ #include #include -class TheHowlingEyeHard : public InstanceContentScript +class TheHowlingEyeHard : + public InstanceContentScript { public: - TheHowlingEyeHard() : InstanceContentScript( 20006 ) - { } + TheHowlingEyeHard() : + InstanceContentScript( 20006 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "sgbg_r1fa_a_rockcol", 2000646, 4256721, 4, { -4.592406f, -1.261766f, 4.724565f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_1", 2000647, 4256725, 4, { 7.587256f, -1.233237f, 6.169516f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_2", 2000648, 4256726, 4, { -6.329784f, 3.332559f, -6.736721f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_3", 2000649, 4256727, 4, { 5.895649f, 3.275768f, -6.217119f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_4", 2000646, 4488538, 4, { -7.000000f, 0.000000f, 7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_5", 2000647, 4488545, 4, { 7.000000f, 0.000000f, 7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_6", 2000648, 4488546, 4, { -7.000000f, 0.000000f, -7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgbg_r1fa_a_rockcol_7", 2000649, 4488548, 4, { 7.000000f, 0.000000f, -7.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000274, 4246117, 5, { 0.506547f, -1.935848f, 14.110570f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000275, 0, 4, { 1.078937f, -2.041544f, -18.363190f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "sgbg_r1fa_a_rockcol", 2000646, 4256721, 4, { -4.592406f, -1.261766f, 4.724565f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_1", 2000647, 4256725, 4, { 7.587256f, -1.233237f, 6.169516f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_2", 2000648, 4256726, 4, { -6.329784f, 3.332559f, -6.736721f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_3", 2000649, 4256727, 4, { 5.895649f, 3.275768f, -6.217119f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_4", 2000646, 4488538, 4, { -7.000000f, 0.000000f, 7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_5", 2000647, 4488545, 4, { 7.000000f, 0.000000f, 7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_6", 2000648, 4488546, 4, { -7.000000f, 0.000000f, -7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "sgbg_r1fa_a_rockcol_7", 2000649, 4488548, 4, { 7.000000f, 0.000000f, -7.000000f }, + 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000274, 4246117, 5, { 0.506547f, -1.935848f, 14.110570f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000275, 0, 4, { 1.078937f, -2.041544f, -18.363190f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheJadeStoa.cpp b/src/servers/Scripts/instances/trials/TheJadeStoa.cpp index ef50f35c..185c4595 100644 --- a/src/servers/Scripts/instances/trials/TheJadeStoa.cpp +++ b/src/servers/Scripts/instances/trials/TheJadeStoa.cpp @@ -1,26 +1,29 @@ #include #include -class TheJadeStoa : public InstanceContentScript +class TheJadeStoa : + public InstanceContentScript { public: - TheJadeStoa() : InstanceContentScript( 20051 ) - { } + TheJadeStoa() : + InstanceContentScript( 20051 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheJadeStoaExtreme.cpp b/src/servers/Scripts/instances/trials/TheJadeStoaExtreme.cpp index 5ff17e0d..01e63480 100644 --- a/src/servers/Scripts/instances/trials/TheJadeStoaExtreme.cpp +++ b/src/servers/Scripts/instances/trials/TheJadeStoaExtreme.cpp @@ -1,26 +1,29 @@ #include #include -class TheJadeStoaExtreme : public InstanceContentScript +class TheJadeStoaExtreme : + public InstanceContentScript { public: - TheJadeStoaExtreme() : InstanceContentScript( 20052 ) - { } + TheJadeStoaExtreme() : + InstanceContentScript( 20052 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheLimitlessBlueExtreme.cpp b/src/servers/Scripts/instances/trials/TheLimitlessBlueExtreme.cpp index 31e9b2bd..2f914e32 100644 --- a/src/servers/Scripts/instances/trials/TheLimitlessBlueExtreme.cpp +++ b/src/servers/Scripts/instances/trials/TheLimitlessBlueExtreme.cpp @@ -1,26 +1,29 @@ #include #include -class TheLimitlessBlueExtreme : public InstanceContentScript +class TheLimitlessBlueExtreme : + public InstanceContentScript { public: - TheLimitlessBlueExtreme() : InstanceContentScript( 20034 ) - { } + TheLimitlessBlueExtreme() : + InstanceContentScript( 20034 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheLimitlessBlueHard.cpp b/src/servers/Scripts/instances/trials/TheLimitlessBlueHard.cpp index 5b24e2d0..1271e610 100644 --- a/src/servers/Scripts/instances/trials/TheLimitlessBlueHard.cpp +++ b/src/servers/Scripts/instances/trials/TheLimitlessBlueHard.cpp @@ -1,26 +1,29 @@ #include #include -class TheLimitlessBlueHard : public InstanceContentScript +class TheLimitlessBlueHard : + public InstanceContentScript { public: - TheLimitlessBlueHard() : InstanceContentScript( 20033 ) - { } + TheLimitlessBlueHard() : + InstanceContentScript( 20033 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheMinstrelsBalladNidhoggsRage.cpp b/src/servers/Scripts/instances/trials/TheMinstrelsBalladNidhoggsRage.cpp index de99240b..604715c2 100644 --- a/src/servers/Scripts/instances/trials/TheMinstrelsBalladNidhoggsRage.cpp +++ b/src/servers/Scripts/instances/trials/TheMinstrelsBalladNidhoggsRage.cpp @@ -1,32 +1,37 @@ #include #include -class TheMinstrelsBalladNidhoggsRage : public InstanceContentScript +class TheMinstrelsBalladNidhoggsRage : + public InstanceContentScript { public: - TheMinstrelsBalladNidhoggsRage() : InstanceContentScript( 20040 ) - { } + TheMinstrelsBalladNidhoggsRage() : + InstanceContentScript( 20040 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2007132, 0, 4, { 1.180504f, -0.000001f, -5.348264f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2007360, 0, 4, { 0.893822f, -0.000029f, 9.867915f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 6243772, 5, { 5.791933f, 0.049998f, 17.147869f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { -0.802442f, 0.050000f, -16.948071f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2007393, 6279966, 4, { 0.867247f, -0.000024f, 9.141238f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2007132, 0, 4, { 1.180504f, -0.000001f, -5.348264f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_1", 2007360, 0, 4, { 0.893822f, -0.000029f, 9.867915f }, 1.000000f, 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 6243772, 5, { 5.791933f, 0.049998f, 17.147869f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { -0.802442f, 0.050000f, -16.948071f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2007393, 6279966, 4, { 0.867247f, -0.000024f, 9.141238f }, 1.000000f, + 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheMinstrelsBalladShinryusDomain.cpp b/src/servers/Scripts/instances/trials/TheMinstrelsBalladShinryusDomain.cpp index bbd8061d..e36016db 100644 --- a/src/servers/Scripts/instances/trials/TheMinstrelsBalladShinryusDomain.cpp +++ b/src/servers/Scripts/instances/trials/TheMinstrelsBalladShinryusDomain.cpp @@ -1,26 +1,29 @@ #include #include -class TheMinstrelsBalladShinryusDomain : public InstanceContentScript +class TheMinstrelsBalladShinryusDomain : + public InstanceContentScript { public: - TheMinstrelsBalladShinryusDomain() : InstanceContentScript( 20050 ) - { } + TheMinstrelsBalladShinryusDomain() : + InstanceContentScript( 20050 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheMinstrelsBalladThordansReign.cpp b/src/servers/Scripts/instances/trials/TheMinstrelsBalladThordansReign.cpp index d6f704d5..954cffc3 100644 --- a/src/servers/Scripts/instances/trials/TheMinstrelsBalladThordansReign.cpp +++ b/src/servers/Scripts/instances/trials/TheMinstrelsBalladThordansReign.cpp @@ -1,26 +1,29 @@ #include #include -class TheMinstrelsBalladThordansReign : public InstanceContentScript +class TheMinstrelsBalladThordansReign : + public InstanceContentScript { public: - TheMinstrelsBalladThordansReign() : InstanceContentScript( 20036 ) - { } + TheMinstrelsBalladThordansReign() : + InstanceContentScript( 20036 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheMinstrelsBalladUltimasBane.cpp b/src/servers/Scripts/instances/trials/TheMinstrelsBalladUltimasBane.cpp index bda9c611..01cc8765 100644 --- a/src/servers/Scripts/instances/trials/TheMinstrelsBalladUltimasBane.cpp +++ b/src/servers/Scripts/instances/trials/TheMinstrelsBalladUltimasBane.cpp @@ -1,35 +1,45 @@ #include #include -class TheMinstrelsBalladUltimasBane : public InstanceContentScript +class TheMinstrelsBalladUltimasBane : + public InstanceContentScript { public: - TheMinstrelsBalladUltimasBane() : InstanceContentScript( 20013 ) - { } + TheMinstrelsBalladUltimasBane() : + InstanceContentScript( 20013 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2002745, 4391076, 4, { 7.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2002746, 4391074, 4, { -7.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2002747, 4976890, 4, { 0.000000f, -0.131581f, -18.566719f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2002748, 4391072, 4, { 17.676531f, -0.144861f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_4", 2002749, 4976892, 4, { 0.000000f, 0.000000f, 17.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2002750, 4976891, 4, { -17.000000f, 0.000000f, 0.000000f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4391941, 5, { -6.677185f, 0.068419f, 12.835030f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -16.316700f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2002745, 4391076, 4, { 7.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2002746, 4391074, 4, { -7.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2002747, 4976890, 4, { 0.000000f, -0.131581f, -18.566719f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2002748, 4391072, 4, { 17.676531f, -0.144861f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_4", 2002749, 4976892, 4, { 0.000000f, 0.000000f, 17.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2002750, 4976891, 4, { -17.000000f, 0.000000f, 0.000000f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4391941, 5, { -6.677185f, 0.068419f, 12.835030f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -16.316700f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheNavel.cpp b/src/servers/Scripts/instances/trials/TheNavel.cpp index 1b17ac7d..8c7d0345 100644 --- a/src/servers/Scripts/instances/trials/TheNavel.cpp +++ b/src/servers/Scripts/instances/trials/TheNavel.cpp @@ -1,29 +1,33 @@ #include #include -class TheNavel : public InstanceContentScript +class TheNavel : + public InstanceContentScript { public: - TheNavel() : InstanceContentScript( 20002 ) - { } + TheNavel() : + InstanceContentScript( 20002 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4236868, 5, { 0.000000f, 0.000000f, 24.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -10.000000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4236868, 5, { 0.000000f, 0.000000f, 24.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -10.000000f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheNavelExtreme.cpp b/src/servers/Scripts/instances/trials/TheNavelExtreme.cpp index 7fba63c0..8a56af6f 100644 --- a/src/servers/Scripts/instances/trials/TheNavelExtreme.cpp +++ b/src/servers/Scripts/instances/trials/TheNavelExtreme.cpp @@ -1,29 +1,33 @@ #include #include -class TheNavelExtreme : public InstanceContentScript +class TheNavelExtreme : + public InstanceContentScript { public: - TheNavelExtreme() : InstanceContentScript( 20009 ) - { } + TheNavelExtreme() : + InstanceContentScript( 20009 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4236868, 5, { 0.000000f, 0.000000f, 24.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -10.000000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4236868, 5, { 0.000000f, 0.000000f, 24.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -10.000000f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheNavelHard.cpp b/src/servers/Scripts/instances/trials/TheNavelHard.cpp index 966285ef..41f79165 100644 --- a/src/servers/Scripts/instances/trials/TheNavelHard.cpp +++ b/src/servers/Scripts/instances/trials/TheNavelHard.cpp @@ -1,29 +1,33 @@ #include #include -class TheNavelHard : public InstanceContentScript +class TheNavelHard : + public InstanceContentScript { public: - TheNavelHard() : InstanceContentScript( 20005 ) - { } + TheNavelHard() : + InstanceContentScript( 20005 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4236868, 5, { 0.000000f, 0.000000f, 24.000000f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -10.000000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4236868, 5, { 0.000000f, 0.000000f, 24.000000f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.000000f, -10.000000f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ThePoolofTribute.cpp b/src/servers/Scripts/instances/trials/ThePoolofTribute.cpp index 15745fcd..f2654337 100644 --- a/src/servers/Scripts/instances/trials/ThePoolofTribute.cpp +++ b/src/servers/Scripts/instances/trials/ThePoolofTribute.cpp @@ -1,26 +1,29 @@ #include #include -class ThePoolofTribute : public InstanceContentScript +class ThePoolofTribute : + public InstanceContentScript { public: - ThePoolofTribute() : InstanceContentScript( 20046 ) - { } + ThePoolofTribute() : + InstanceContentScript( 20046 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ThePoolofTributeExtreme.cpp b/src/servers/Scripts/instances/trials/ThePoolofTributeExtreme.cpp index 7fdd35f8..ff4ec030 100644 --- a/src/servers/Scripts/instances/trials/ThePoolofTributeExtreme.cpp +++ b/src/servers/Scripts/instances/trials/ThePoolofTributeExtreme.cpp @@ -1,26 +1,29 @@ #include #include -class ThePoolofTributeExtreme : public InstanceContentScript +class ThePoolofTributeExtreme : + public InstanceContentScript { public: - ThePoolofTributeExtreme() : InstanceContentScript( 20047 ) - { } + ThePoolofTributeExtreme() : + InstanceContentScript( 20047 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheRoyalMenagerie.cpp b/src/servers/Scripts/instances/trials/TheRoyalMenagerie.cpp index f1a7d1b3..2a12ea4e 100644 --- a/src/servers/Scripts/instances/trials/TheRoyalMenagerie.cpp +++ b/src/servers/Scripts/instances/trials/TheRoyalMenagerie.cpp @@ -1,26 +1,29 @@ #include #include -class TheRoyalMenagerie : public InstanceContentScript +class TheRoyalMenagerie : + public InstanceContentScript { public: - TheRoyalMenagerie() : InstanceContentScript( 20045 ) - { } + TheRoyalMenagerie() : + InstanceContentScript( 20045 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheSingularityReactor.cpp b/src/servers/Scripts/instances/trials/TheSingularityReactor.cpp index 03f4efef..5fd20a8a 100644 --- a/src/servers/Scripts/instances/trials/TheSingularityReactor.cpp +++ b/src/servers/Scripts/instances/trials/TheSingularityReactor.cpp @@ -1,26 +1,29 @@ #include #include -class TheSingularityReactor : public InstanceContentScript +class TheSingularityReactor : + public InstanceContentScript { public: - TheSingularityReactor() : InstanceContentScript( 20035 ) - { } + TheSingularityReactor() : + InstanceContentScript( 20035 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheStepsofFaith.cpp b/src/servers/Scripts/instances/trials/TheStepsofFaith.cpp index 706aca2f..87db0a55 100644 --- a/src/servers/Scripts/instances/trials/TheStepsofFaith.cpp +++ b/src/servers/Scripts/instances/trials/TheStepsofFaith.cpp @@ -1,53 +1,67 @@ #include #include -class TheStepsofFaith : public InstanceContentScript +class TheStepsofFaith : + public InstanceContentScript { public: - TheStepsofFaith() : InstanceContentScript( 20028 ) - { } + TheStepsofFaith() : + InstanceContentScript( 20028 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Dragonkiller", 2004760, 4999878, 4, { 43.311161f, 37.600201f, 35.701099f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Dragonkiller_1", 2004761, 4999884, 4, { -43.632969f, 37.582890f, -115.844101f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Dragonkiller_2", 2004762, 4999881, 4, { 43.015141f, 37.582890f, -284.251709f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_0", 2004767, 4886787, 4, { -3.110714f, 0.000000f, -348.303711f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2004757, 0, 4, { 2.667883f, 0.324675f, 123.758301f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2004758, 0, 4, { 4.085252f, 0.000000f, -28.159849f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2004759, 0, 4, { 1.381998f, 0.000000f, -194.763107f }, 1.000000f, 0.000000f ); - instance->registerEObj( "sgvf_r1fd_b0536", 2004763, 5038552, 4, { 0.000000f, -0.000000f, 45.788021f }, 1.000000f, 0.000000f ); - // States -> bal_t_def bal_t_def_anim bal_t_pop bal_t_pop_anim - instance->registerEObj( "sgvf_r1fd_b0536_1", 2004764, 5038553, 4, { -0.015320f, -0.015320f, -114.274803f }, 0.991760f, 0.000048f ); - // States -> bal_t_def bal_t_def_anim bal_t_pop bal_t_pop_anim - instance->registerEObj( "sgvf_r1fd_b0536_2", 2004765, 5038554, 4, { -0.015320f, -0.000000f, -276.691895f }, 0.991760f, 0.000048f ); - // States -> bal_t_def bal_t_def_anim bal_t_pop bal_t_pop_anim - instance->registerEObj( "Snare", 2005115, 0, 4, { -18.000000f, 0.045776f, -155.000000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Snare_1", 2005116, 0, 4, { 18.000000f, 0.045776f, -155.016403f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Snare_2", 2005117, 0, 4, { -18.000000f, 0.045776f, -315.022491f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Snare_3", 2005118, 0, 4, { 18.000000f, 0.045776f, -315.022491f }, 0.991760f, 0.000048f ); - instance->registerEObj( "unknown_4", 2005215, 5698814, 4, { 46.280449f, 37.600201f, 45.540260f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_5", 2005216, 5698815, 4, { -42.818661f, 37.600201f, -120.297798f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_6", 2005217, 5698817, 4, { 43.612808f, 37.600201f, -279.243195f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 5035236, 5, { 5.791933f, 0.049998f, 253.589600f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, -0.000000f, -350.057312f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Shortcut", 2000700, 0, 4, { -5.264404f, 0.045776f, 248.188004f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit_1", 2000139, 0, 4, { 0.000000f, -0.000104f, 125.000000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit_2", 2000139, 0, 4, { 0.000000f, -0.079958f, -35.000000f }, 0.991760f, 0.000048f ); - instance->registerEObj( "Exit_3", 2000139, 0, 4, { 0.000000f, 0.000000f, -195.000000f }, 0.991760f, 0.000048f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Dragonkiller", 2004760, 4999878, 4, { 43.311161f, 37.600201f, 35.701099f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Dragonkiller_1", 2004761, 4999884, 4, { -43.632969f, 37.582890f, -115.844101f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "Dragonkiller_2", 2004762, 4999881, 4, { 43.015141f, 37.582890f, -284.251709f }, 0.991760f, + 0.000048f ); + instance->registerEObj( "unknown_0", 2004767, 4886787, 4, { -3.110714f, 0.000000f, -348.303711f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2004757, 0, 4, { 2.667883f, 0.324675f, 123.758301f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_2", 2004758, 0, 4, { 4.085252f, 0.000000f, -28.159849f }, 1.000000f, 0.000000f ); + instance->registerEObj( "unknown_3", 2004759, 0, 4, { 1.381998f, 0.000000f, -194.763107f }, 1.000000f, 0.000000f ); + instance->registerEObj( "sgvf_r1fd_b0536", 2004763, 5038552, 4, { 0.000000f, -0.000000f, 45.788021f }, 1.000000f, + 0.000000f ); + // States -> bal_t_def bal_t_def_anim bal_t_pop bal_t_pop_anim + instance->registerEObj( "sgvf_r1fd_b0536_1", 2004764, 5038553, 4, { -0.015320f, -0.015320f, -114.274803f }, + 0.991760f, 0.000048f ); + // States -> bal_t_def bal_t_def_anim bal_t_pop bal_t_pop_anim + instance->registerEObj( "sgvf_r1fd_b0536_2", 2004765, 5038554, 4, { -0.015320f, -0.000000f, -276.691895f }, + 0.991760f, 0.000048f ); + // States -> bal_t_def bal_t_def_anim bal_t_pop bal_t_pop_anim + instance->registerEObj( "Snare", 2005115, 0, 4, { -18.000000f, 0.045776f, -155.000000f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Snare_1", 2005116, 0, 4, { 18.000000f, 0.045776f, -155.016403f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Snare_2", 2005117, 0, 4, { -18.000000f, 0.045776f, -315.022491f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Snare_3", 2005118, 0, 4, { 18.000000f, 0.045776f, -315.022491f }, 0.991760f, 0.000048f ); + instance->registerEObj( "unknown_4", 2005215, 5698814, 4, { 46.280449f, 37.600201f, 45.540260f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_5", 2005216, 5698815, 4, { -42.818661f, 37.600201f, -120.297798f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_6", 2005217, 5698817, 4, { 43.612808f, 37.600201f, -279.243195f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 5035236, 5, { 5.791933f, 0.049998f, 253.589600f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, -0.000000f, -350.057312f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Shortcut", 2000700, 0, 4, { -5.264404f, 0.045776f, 248.188004f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Exit_1", 2000139, 0, 4, { 0.000000f, -0.000104f, 125.000000f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Exit_2", 2000139, 0, 4, { 0.000000f, -0.079958f, -35.000000f }, 0.991760f, 0.000048f ); + instance->registerEObj( "Exit_3", 2000139, 0, 4, { 0.000000f, 0.000000f, -195.000000f }, 0.991760f, 0.000048f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheStrikingTreeExtreme.cpp b/src/servers/Scripts/instances/trials/TheStrikingTreeExtreme.cpp index 1f412b76..3a7116f2 100644 --- a/src/servers/Scripts/instances/trials/TheStrikingTreeExtreme.cpp +++ b/src/servers/Scripts/instances/trials/TheStrikingTreeExtreme.cpp @@ -1,29 +1,33 @@ #include #include -class TheStrikingTreeExtreme : public InstanceContentScript +class TheStrikingTreeExtreme : + public InstanceContentScript { public: - TheStrikingTreeExtreme() : InstanceContentScript( 20023 ) - { } + TheStrikingTreeExtreme() : + InstanceContentScript( 20023 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4712008, 5, { 5.026201f, 74.994751f, 16.039301f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 75.000000f, -7.671923f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4712008, 5, { 5.026201f, 74.994751f, 16.039301f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 75.000000f, -7.671923f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheStrikingTreeHard.cpp b/src/servers/Scripts/instances/trials/TheStrikingTreeHard.cpp index 0a45c68a..c019f898 100644 --- a/src/servers/Scripts/instances/trials/TheStrikingTreeHard.cpp +++ b/src/servers/Scripts/instances/trials/TheStrikingTreeHard.cpp @@ -1,29 +1,33 @@ #include #include -class TheStrikingTreeHard : public InstanceContentScript +class TheStrikingTreeHard : + public InstanceContentScript { public: - TheStrikingTreeHard() : InstanceContentScript( 20022 ) - { } + TheStrikingTreeHard() : + InstanceContentScript( 20022 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4712008, 5, { 5.026201f, 74.994751f, 16.039301f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 75.000000f, -7.671923f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4712008, 5, { 5.026201f, 74.994751f, 16.039301f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 75.000000f, -7.671923f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheWhorleaterExtreme.cpp b/src/servers/Scripts/instances/trials/TheWhorleaterExtreme.cpp index bd35f9f9..d25e232a 100644 --- a/src/servers/Scripts/instances/trials/TheWhorleaterExtreme.cpp +++ b/src/servers/Scripts/instances/trials/TheWhorleaterExtreme.cpp @@ -1,34 +1,43 @@ #include #include -class TheWhorleaterExtreme : public InstanceContentScript +class TheWhorleaterExtreme : + public InstanceContentScript { public: - TheWhorleaterExtreme() : InstanceContentScript( 20018 ) - { } + TheWhorleaterExtreme() : + InstanceContentScript( 20018 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2003496, 4600311, 4, { 4.240293f, 0.025694f, 2.306607f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2003497, 4600310, 4, { 0.072974f, 0.025694f, 3.729535f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Elementalconverter", 2003498, 4600308, 4, { -0.068011f, 0.025694f, 18.829760f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2003499, 4600477, 4, { -0.427824f, 0.025694f, -1.602400f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2003503, 4536477, 4, { -4.721506f, 0.025694f, -0.558033f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4600244, 5, { 2.559847f, 0.025694f, 16.605810f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.025694f, -15.000000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2003496, 4600311, 4, { 4.240293f, 0.025694f, 2.306607f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2003497, 4600310, 4, { 0.072974f, 0.025694f, 3.729535f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Elementalconverter", 2003498, 4600308, 4, { -0.068011f, 0.025694f, 18.829760f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2003499, 4600477, 4, { -0.427824f, 0.025694f, -1.602400f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2003503, 4536477, 4, { -4.721506f, 0.025694f, -0.558033f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4600244, 5, { 2.559847f, 0.025694f, 16.605810f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.025694f, -15.000000f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/TheWhorleaterHard.cpp b/src/servers/Scripts/instances/trials/TheWhorleaterHard.cpp index 19af13fc..e3468cdc 100644 --- a/src/servers/Scripts/instances/trials/TheWhorleaterHard.cpp +++ b/src/servers/Scripts/instances/trials/TheWhorleaterHard.cpp @@ -1,34 +1,43 @@ #include #include -class TheWhorleaterHard : public InstanceContentScript +class TheWhorleaterHard : + public InstanceContentScript { public: - TheWhorleaterHard() : InstanceContentScript( 20017 ) - { } + TheWhorleaterHard() : + InstanceContentScript( 20017 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "unknown_0", 2003496, 4600311, 4, { 4.240293f, 0.025694f, 2.306607f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_1", 2003497, 4600310, 4, { 0.072974f, 0.025694f, 3.729535f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Elementalconverter", 2003498, 4600308, 4, { -0.068011f, 0.025694f, 18.829760f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_2", 2003499, 4600477, 4, { -0.427824f, 0.025694f, -1.602400f }, 1.000000f, 0.000000f ); - instance->registerEObj( "unknown_3", 2003503, 4536477, 4, { -4.721506f, 0.025694f, -0.558033f }, 1.000000f, 0.000000f ); - instance->registerEObj( "Entrance", 2000182, 4600244, 5, { 2.559847f, 0.025694f, 16.605810f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.025694f, -15.000000f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "unknown_0", 2003496, 4600311, 4, { 4.240293f, 0.025694f, 2.306607f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_1", 2003497, 4600310, 4, { 0.072974f, 0.025694f, 3.729535f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Elementalconverter", 2003498, 4600308, 4, { -0.068011f, 0.025694f, 18.829760f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_2", 2003499, 4600477, 4, { -0.427824f, 0.025694f, -1.602400f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "unknown_3", 2003503, 4536477, 4, { -4.721506f, 0.025694f, -0.558033f }, 1.000000f, + 0.000000f ); + instance->registerEObj( "Entrance", 2000182, 4600244, 5, { 2.559847f, 0.025694f, 16.605810f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.000000f, 0.025694f, -15.000000f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ThokastThokExtreme.cpp b/src/servers/Scripts/instances/trials/ThokastThokExtreme.cpp index 6f51351c..c0043829 100644 --- a/src/servers/Scripts/instances/trials/ThokastThokExtreme.cpp +++ b/src/servers/Scripts/instances/trials/ThokastThokExtreme.cpp @@ -1,26 +1,29 @@ #include #include -class ThokastThokExtreme : public InstanceContentScript +class ThokastThokExtreme : + public InstanceContentScript { public: - ThokastThokExtreme() : InstanceContentScript( 20032 ) - { } + ThokastThokExtreme() : + InstanceContentScript( 20032 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ThokastThokHard.cpp b/src/servers/Scripts/instances/trials/ThokastThokHard.cpp index 16e53d87..aec7e3fe 100644 --- a/src/servers/Scripts/instances/trials/ThokastThokHard.cpp +++ b/src/servers/Scripts/instances/trials/ThokastThokHard.cpp @@ -1,26 +1,29 @@ #include #include -class ThokastThokHard : public InstanceContentScript +class ThokastThokHard : + public InstanceContentScript { public: - ThokastThokHard() : InstanceContentScript( 20031 ) - { } + ThokastThokHard() : + InstanceContentScript( 20031 ) + { + } - void onInit( InstanceContentPtr instance ) override - { + void onInit( InstanceContentPtr instance ) override + { - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ThornmarchExtreme.cpp b/src/servers/Scripts/instances/trials/ThornmarchExtreme.cpp index baf14f66..8fad525c 100644 --- a/src/servers/Scripts/instances/trials/ThornmarchExtreme.cpp +++ b/src/servers/Scripts/instances/trials/ThornmarchExtreme.cpp @@ -1,29 +1,33 @@ #include #include -class ThornmarchExtreme : public InstanceContentScript +class ThornmarchExtreme : + public InstanceContentScript { public: - ThornmarchExtreme() : InstanceContentScript( 20012 ) - { } + ThornmarchExtreme() : + InstanceContentScript( 20012 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4377976, 5, { -5.269677f, 0.467326f, 14.257640f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.014298f, -0.000000f, -17.786249f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4377976, 5, { -5.269677f, 0.467326f, 14.257640f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.014298f, -0.000000f, -17.786249f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/ThornmarchHard.cpp b/src/servers/Scripts/instances/trials/ThornmarchHard.cpp index 8dca0eb1..78f005b4 100644 --- a/src/servers/Scripts/instances/trials/ThornmarchHard.cpp +++ b/src/servers/Scripts/instances/trials/ThornmarchHard.cpp @@ -1,29 +1,33 @@ #include #include -class ThornmarchHard : public InstanceContentScript +class ThornmarchHard : + public InstanceContentScript { public: - ThornmarchHard() : InstanceContentScript( 20011 ) - { } + ThornmarchHard() : + InstanceContentScript( 20011 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 4377976, 5, { -5.269677f, 0.467326f, 14.257640f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 0.014298f, -0.000000f, -17.786249f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 4377976, 5, { -5.269677f, 0.467326f, 14.257640f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 0.014298f, -0.000000f, -17.786249f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/instances/trials/UrthsFount.cpp b/src/servers/Scripts/instances/trials/UrthsFount.cpp index cbe988f6..f865cb15 100644 --- a/src/servers/Scripts/instances/trials/UrthsFount.cpp +++ b/src/servers/Scripts/instances/trials/UrthsFount.cpp @@ -1,29 +1,33 @@ #include #include -class UrthsFount : public InstanceContentScript +class UrthsFount : + public InstanceContentScript { public: - UrthsFount() : InstanceContentScript( 20027 ) - { } + UrthsFount() : + InstanceContentScript( 20027 ) + { + } - void onInit( InstanceContentPtr instance ) override - { - instance->registerEObj( "Entrance", 2000182, 5021407, 5, { 623.000000f, 23.872311f, 94.505638f }, 1.000000f, 0.000000f ); - // States -> vf_lock_on vf_lock_of - instance->registerEObj( "Exit", 2000139, 0, 4, { 623.000000f, 23.656260f, 61.956181f }, 1.000000f, 0.000000f ); + void onInit( InstanceContentPtr instance ) override + { + instance->registerEObj( "Entrance", 2000182, 5021407, 5, { 623.000000f, 23.872311f, 94.505638f }, 1.000000f, + 0.000000f ); + // States -> vf_lock_on vf_lock_of + instance->registerEObj( "Exit", 2000139, 0, 4, { 623.000000f, 23.656260f, 61.956181f }, 1.000000f, 0.000000f ); - } + } - void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override - { + void onUpdate( InstanceContentPtr instance, uint32_t currTime ) override + { - } + } - void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, - uint16_t param2 ) override - { + void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) override + { - } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/opening/OpeningGridania.cpp b/src/servers/Scripts/opening/OpeningGridania.cpp index d8906905..db1a9a36 100644 --- a/src/servers/Scripts/opening/OpeningGridania.cpp +++ b/src/servers/Scripts/opening/OpeningGridania.cpp @@ -1,110 +1,124 @@ #include #include -class OpeningGridania : public EventScript +class OpeningGridania : + public EventScript { private: - static constexpr auto ERANGE_HOWTO_ANN_AND_QUEST = 2117539; - static constexpr auto ERANGE_HOWTO_QUEST_REWARD = 2366417; - static constexpr auto ERANGE_SEQ_1_CLOSED_1 = 2351918; - static constexpr auto POS_SEQ_1_CLOSED_RETURN_1 = 2351921; - static constexpr auto ERANGE_SEQ_1_CLOSED_2 = 2351919; - static constexpr auto POS_SEQ_1_CLOSED_RETURN_2 = 2351921; - static constexpr auto ERANGE_ALWAYS_CLOSED_1 = 2280846; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_1 = 2320804; - static constexpr auto ENPC_ALWAYS_CLOSED_1 = 2367988; - static constexpr auto ERANGE_ALWAYS_CLOSED_3 = 2280851; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_3 = 2320811; - static constexpr auto ENPC_ALWAYS_CLOSED_3 = 2563491; - static constexpr auto BGM_MUSIC_ZONE_FST_TWN = 1003; - static constexpr auto NCUT_FST_1 = 3; - static constexpr auto NCUT_FST_2 = 53; - static constexpr auto NCUT_FST_3 = 226; - static constexpr auto ENPC_QUEST_OFFER = 1985150; - static constexpr auto NCUT_LIGHT_ALL = 2; - static constexpr auto NCUT_LIGHT_FST_1 = 147; - static constexpr auto NCUT_LIGHT_FST_2 = 146; + static constexpr auto ERANGE_HOWTO_ANN_AND_QUEST = 2117539; + static constexpr auto ERANGE_HOWTO_QUEST_REWARD = 2366417; + static constexpr auto ERANGE_SEQ_1_CLOSED_1 = 2351918; + static constexpr auto POS_SEQ_1_CLOSED_RETURN_1 = 2351921; + static constexpr auto ERANGE_SEQ_1_CLOSED_2 = 2351919; + static constexpr auto POS_SEQ_1_CLOSED_RETURN_2 = 2351921; + static constexpr auto ERANGE_ALWAYS_CLOSED_1 = 2280846; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_1 = 2320804; + static constexpr auto ENPC_ALWAYS_CLOSED_1 = 2367988; + static constexpr auto ERANGE_ALWAYS_CLOSED_3 = 2280851; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_3 = 2320811; + static constexpr auto ENPC_ALWAYS_CLOSED_3 = 2563491; + static constexpr auto BGM_MUSIC_ZONE_FST_TWN = 1003; + static constexpr auto NCUT_FST_1 = 3; + static constexpr auto NCUT_FST_2 = 53; + static constexpr auto NCUT_FST_3 = 226; + static constexpr auto ENPC_QUEST_OFFER = 1985150; + static constexpr auto NCUT_LIGHT_ALL = 2; + static constexpr auto NCUT_LIGHT_FST_1 = 147; + static constexpr auto NCUT_LIGHT_FST_2 = 146; - void Scene00000( Entity::Player& player ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00000( Entity::Player& player ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + auto questionAnswer = result.param2; + + uint16_t itemId = 0; + + switch( questionAnswer ) { - auto questionAnswer = result.param2; + case 1: + itemId = 4423; + break; + case 2: + itemId = 4424; + break; + case 3: + itemId = 4425; + break; + case 4: + itemId = 4426; + break; + default: + itemId = 4426; + break; + } - uint16_t itemId = 0; + auto item = player.addItem( itemId, 1, false, true ); - switch( questionAnswer ) - { - case 1: itemId = 4423; break; - case 2: itemId = 4424; break; - case 3: itemId = 4425; break; - case 4: itemId = 4426; break; - default: itemId = 4426; break; - } + if( item ) + player.equipItem( Common::GearSetSlot::Ring2, item, true ); - auto item = player.addItem( itemId, 1, false, true ); + player.setOpeningSequence( 1 ); + Scene00001( player ); + }; - if( item ) - player.equipItem( Common::GearSetSlot::Ring2, item, true ); + player.playScene( getId(), 0, NO_DEFAULT_CAMERA | INVIS_ENPC | + CONDITION_CUTSCENE | HIDE_UI | + HIDE_HOTBAR | SILENT_ENTER_TERRI_ENV, 0, 1, callback ); + } - player.setOpeningSequence( 1 ); - Scene00001( player ); - }; + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 1, 0x32 ); + } - player.playScene( getId(), 0, NO_DEFAULT_CAMERA | INVIS_ENPC | - CONDITION_CUTSCENE | HIDE_UI | - HIDE_HOTBAR | SILENT_ENTER_TERRI_ENV, 0, 1, callback ); - } + void Scene00020( Entity::Player& player ) + { + player.playScene( getId(), 20, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 1 ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 1, 0x32 ); - } + void Scene00030( Entity::Player& player ) + { + player.playScene( getId(), 30, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 0 ); + } - void Scene00020( Entity::Player& player ) - { - player.playScene( getId(), 20, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 1 ); - } - - void Scene00030( Entity::Player& player ) - { - player.playScene( getId(), 30, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 0 ); - } - - void Scene00040( Entity::Player& player ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00040( Entity::Player& player ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( player.getOpeningSequence() == 2 ) { - if( player.getOpeningSequence() == 2 ) - { - // update the instance boundaries - Scene00030( player ); - } - }; + // update the instance boundaries + Scene00030( player ); + } + }; - player.playScene( getId(), 40, 1, 2, 1, callback ); - } + player.playScene( getId(), 40, 1, 2, 1, callback ); + } public: - OpeningGridania() : EventScript( 1245186 ) - { } + OpeningGridania() : + EventScript( 1245186 ) + { + } - void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override - { - if( player.getOpeningSequence() == 0 ) - { - Scene00000( player ); - } else - { - Scene00040( player ); - } - } + void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override + { + if( player.getOpeningSequence() == 0 ) + { + Scene00000( player ); + } + else + { + Scene00040( player ); + } + } - void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override - { - if( param1 == ERANGE_SEQ_1_CLOSED_1 || param1 == ERANGE_SEQ_1_CLOSED_2 ) - { - Scene00020( player ); - } - } + void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override + { + if( param1 == ERANGE_SEQ_1_CLOSED_1 || param1 == ERANGE_SEQ_1_CLOSED_2 ) + { + Scene00020( player ); + } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/opening/OpeningLimsa.cpp b/src/servers/Scripts/opening/OpeningLimsa.cpp index c249f262..de685b39 100644 --- a/src/servers/Scripts/opening/OpeningLimsa.cpp +++ b/src/servers/Scripts/opening/OpeningLimsa.cpp @@ -5,116 +5,129 @@ // Quest Name: OpeningLimsaLominsa // Quest ID: 1245185 -class OpeningLimsa : public EventScript +class OpeningLimsa : + public EventScript { private: - static constexpr auto ERANGE_HOWTO_ANN_AND_QUEST = 4101831; - static constexpr auto ERANGE_HOWTO_QUEST_REWARD = 4102066; - static constexpr auto ERANGE_SEQ_1_CLOSED_1 = 4101785; - static constexpr auto POS_SEQ_1_CLOSED_RETURN_1 = 4101797; - static constexpr auto ERANGE_ALWAYS_CLOSED_1 = 4101744; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_1 = 4101761; - static constexpr auto ENPC_ALWAYS_CLOSED_1 = 4102038; - static constexpr auto ERANGE_ALWAYS_CLOSED_2 = 4101746; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_2 = 4101763; - static constexpr auto ENPC_ALWAYS_CLOSED_2 = 4102036; - static constexpr auto ERANGE_ALWAYS_CLOSED_3 = 4101967; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_3 = 4101982; - static constexpr auto ENPC_ALWAYS_CLOSED_3 = 4102033; - static constexpr auto ERANGE_ALWAYS_CLOSED_4 = 4101970; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_4 = 4101984; - static constexpr auto ENPC_ALWAYS_CLOSED_4 = 4102031; - static constexpr auto ERANGE_ALWAYS_CLOSED_5 = 4101973; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_5 = 4101985; - static constexpr auto ENPC_ALWAYS_CLOSED_5 = 4102007; - static constexpr auto ERANGE_ALWAYS_CLOSED_6 = 4101979; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_6 = 4101988; - static constexpr auto ENPC_ALWAYS_CLOSED_6 = 2367400; - static constexpr auto BGM_MUSIC_ZONE_SEA_TWN = 1020; - static constexpr auto NCUT_SEA_1 = 200; - static constexpr auto NCUT_SEA_2 = 132; - static constexpr auto NCUT_SEA_3 = 201; - static constexpr auto ENPC_QUEST_OFFER = 4102039; - static constexpr auto NCUT_LIGHT_ALL = 2; - static constexpr auto NCUT_LIGHT_SEA_1 = 147; - static constexpr auto NCUT_LIGHT_SEA_2 = 138; + static constexpr auto ERANGE_HOWTO_ANN_AND_QUEST = 4101831; + static constexpr auto ERANGE_HOWTO_QUEST_REWARD = 4102066; + static constexpr auto ERANGE_SEQ_1_CLOSED_1 = 4101785; + static constexpr auto POS_SEQ_1_CLOSED_RETURN_1 = 4101797; + static constexpr auto ERANGE_ALWAYS_CLOSED_1 = 4101744; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_1 = 4101761; + static constexpr auto ENPC_ALWAYS_CLOSED_1 = 4102038; + static constexpr auto ERANGE_ALWAYS_CLOSED_2 = 4101746; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_2 = 4101763; + static constexpr auto ENPC_ALWAYS_CLOSED_2 = 4102036; + static constexpr auto ERANGE_ALWAYS_CLOSED_3 = 4101967; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_3 = 4101982; + static constexpr auto ENPC_ALWAYS_CLOSED_3 = 4102033; + static constexpr auto ERANGE_ALWAYS_CLOSED_4 = 4101970; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_4 = 4101984; + static constexpr auto ENPC_ALWAYS_CLOSED_4 = 4102031; + static constexpr auto ERANGE_ALWAYS_CLOSED_5 = 4101973; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_5 = 4101985; + static constexpr auto ENPC_ALWAYS_CLOSED_5 = 4102007; + static constexpr auto ERANGE_ALWAYS_CLOSED_6 = 4101979; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_6 = 4101988; + static constexpr auto ENPC_ALWAYS_CLOSED_6 = 2367400; + static constexpr auto BGM_MUSIC_ZONE_SEA_TWN = 1020; + static constexpr auto NCUT_SEA_1 = 200; + static constexpr auto NCUT_SEA_2 = 132; + static constexpr auto NCUT_SEA_3 = 201; + static constexpr auto ENPC_QUEST_OFFER = 4102039; + static constexpr auto NCUT_LIGHT_ALL = 2; + static constexpr auto NCUT_LIGHT_SEA_1 = 147; + static constexpr auto NCUT_LIGHT_SEA_2 = 138; - void Scene00000( Entity::Player& player ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00000( Entity::Player& player ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + auto questionAnswer = result.param2; + + uint16_t itemId = 0; + + switch( questionAnswer ) { - auto questionAnswer = result.param2; + case 1: + itemId = 4423; + break; + case 2: + itemId = 4424; + break; + case 3: + itemId = 4425; + break; + case 4: + itemId = 4426; + break; + default: + itemId = 4426; + break; + } - uint16_t itemId = 0; + auto item = player.addItem( itemId, 1, false, true ); - switch( questionAnswer ) - { - case 1: itemId = 4423; break; - case 2: itemId = 4424; break; - case 3: itemId = 4425; break; - case 4: itemId = 4426; break; - default: itemId = 4426; break; - } + if( item ) + player.equipItem( Common::GearSetSlot::Ring2, item, true ); - auto item = player.addItem( itemId, 1, false, true ); + player.setOpeningSequence( 1 ); + Scene00001( player ); + }; - if( item ) - player.equipItem( Common::GearSetSlot::Ring2, item, true ); + player.playScene( getId(), 0, NO_DEFAULT_CAMERA | INVIS_ENPC | + CONDITION_CUTSCENE | HIDE_UI | + HIDE_HOTBAR | SILENT_ENTER_TERRI_ENV, 0, 1, callback ); + } - player.setOpeningSequence( 1 ); - Scene00001( player ); - }; + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 1, 0x32 ); + } - player.playScene( getId(), 0, NO_DEFAULT_CAMERA | INVIS_ENPC | - CONDITION_CUTSCENE | HIDE_UI | - HIDE_HOTBAR | SILENT_ENTER_TERRI_ENV, 0, 1, callback ); - } + void Scene00020( Entity::Player& player ) + { + player.playScene( getId(), 20, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 1 ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 1, 0x32 ); - } + void Scene00030( Entity::Player& player ) + { + player.playScene( getId(), 30, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 0 ); + } - void Scene00020( Entity::Player& player ) - { - player.playScene( getId(), 20, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 1 ); - } - - void Scene00030( Entity::Player& player ) - { - player.playScene( getId(), 30, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 0 ); - } - - void Scene00040( Entity::Player& player ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00040( Entity::Player& player ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( player.getOpeningSequence() == 2 ) { - if( player.getOpeningSequence() == 2 ) - { - // update instance boundaries - Scene00030( player ); - } - }; + // update instance boundaries + Scene00030( player ); + } + }; - player.playScene( getId(), 40, NO_DEFAULT_CAMERA, 2, 1, callback ); - } + player.playScene( getId(), 40, NO_DEFAULT_CAMERA, 2, 1, callback ); + } public: - OpeningLimsa() : EventScript( 1245185 ) - { } + OpeningLimsa() : + EventScript( 1245185 ) + { + } - void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override - { - if( player.getOpeningSequence() == 0 ) - Scene00000( player ); - else - Scene00040( player ); - } + void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override + { + if( player.getOpeningSequence() == 0 ) + Scene00000( player ); + else + Scene00040( player ); + } - void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override - { - // todo: handle closed events - } + void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override + { + // todo: handle closed events + } }; \ No newline at end of file diff --git a/src/servers/Scripts/opening/OpeningUldah.cpp b/src/servers/Scripts/opening/OpeningUldah.cpp index b4513a25..1b26ec1b 100644 --- a/src/servers/Scripts/opening/OpeningUldah.cpp +++ b/src/servers/Scripts/opening/OpeningUldah.cpp @@ -1,112 +1,125 @@ #include #include -class OpeningUldah : public EventScript +class OpeningUldah : + public EventScript { private: - static constexpr auto ERANGE_HOWTO_ANN_AND_QUEST = 4101650; - static constexpr auto ERANGE_HOWTO_QUEST_REWARD = 4102883; - static constexpr auto ERANGE_SEQ_1_CLOSED_1 = 4101587; - static constexpr auto POS_SEQ_1_CLOSED_RETURN_1 = 4101691; - static constexpr auto ERANGE_ALWAYS_CLOSED_1 = 4101537; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_1 = 4101685; - static constexpr auto ENPC_ALWAYS_CLOSED_1 = 4101796; - static constexpr auto ERANGE_ALWAYS_CLOSED_2 = 4101525; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_2 = 4101680; - static constexpr auto ENPC_ALWAYS_CLOSED_2 = 4101789; - static constexpr auto ERANGE_ALWAYS_CLOSED_3 = 4101535; - static constexpr auto POS_ALWAYS_CLOSED_RETURN_3 = 4101681; - static constexpr auto ENPC_ALWAYS_CLOSED_3 = 4101787; - static constexpr auto BGM_MUSIC_ZONE_WIL_TWN = 1035; - static constexpr auto NCUT_WIL_1 = 186; - static constexpr auto NCUT_WIL_2 = 139; - static constexpr auto NCUT_WIL_3 = 187; - static constexpr auto ENPC_QUEST_OFFER = 3969639; - static constexpr auto NCUT_LIGHT_ALL = 2; - static constexpr auto NCUT_LIGHT_WIL_1 = 147; - static constexpr auto NCUT_LIGHT_WIL_2 = 145; + static constexpr auto ERANGE_HOWTO_ANN_AND_QUEST = 4101650; + static constexpr auto ERANGE_HOWTO_QUEST_REWARD = 4102883; + static constexpr auto ERANGE_SEQ_1_CLOSED_1 = 4101587; + static constexpr auto POS_SEQ_1_CLOSED_RETURN_1 = 4101691; + static constexpr auto ERANGE_ALWAYS_CLOSED_1 = 4101537; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_1 = 4101685; + static constexpr auto ENPC_ALWAYS_CLOSED_1 = 4101796; + static constexpr auto ERANGE_ALWAYS_CLOSED_2 = 4101525; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_2 = 4101680; + static constexpr auto ENPC_ALWAYS_CLOSED_2 = 4101789; + static constexpr auto ERANGE_ALWAYS_CLOSED_3 = 4101535; + static constexpr auto POS_ALWAYS_CLOSED_RETURN_3 = 4101681; + static constexpr auto ENPC_ALWAYS_CLOSED_3 = 4101787; + static constexpr auto BGM_MUSIC_ZONE_WIL_TWN = 1035; + static constexpr auto NCUT_WIL_1 = 186; + static constexpr auto NCUT_WIL_2 = 139; + static constexpr auto NCUT_WIL_3 = 187; + static constexpr auto ENPC_QUEST_OFFER = 3969639; + static constexpr auto NCUT_LIGHT_ALL = 2; + static constexpr auto NCUT_LIGHT_WIL_1 = 147; + static constexpr auto NCUT_LIGHT_WIL_2 = 145; - void Scene00000( Entity::Player& player ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00000( Entity::Player& player ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + auto questionAnswer = result.param2; + + uint16_t itemId = 0; + + switch( questionAnswer ) { - auto questionAnswer = result.param2; + case 1: + itemId = 4423; + break; + case 2: + itemId = 4424; + break; + case 3: + itemId = 4425; + break; + case 4: + itemId = 4426; + break; + default: + itemId = 4426; + break; + } - uint16_t itemId = 0; + auto item = player.addItem( itemId, 1, false, true ); - switch( questionAnswer ) - { - case 1: itemId = 4423; break; - case 2: itemId = 4424; break; - case 3: itemId = 4425; break; - case 4: itemId = 4426; break; - default: itemId = 4426; break; - } + if( item ) + player.equipItem( Common::GearSetSlot::Ring2, item, true ); - auto item = player.addItem( itemId, 1, false, true ); + player.setOpeningSequence( 1 ); + Scene00001( player ); + }; - if( item ) - player.equipItem( Common::GearSetSlot::Ring2, item, true ); + player.playScene( getId(), 0, NO_DEFAULT_CAMERA | INVIS_ENPC | + CONDITION_CUTSCENE | HIDE_UI | + HIDE_HOTBAR | SILENT_ENTER_TERRI_ENV, 0, 1, callback ); + } - player.setOpeningSequence( 1 ); - Scene00001( player ); - }; + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 1, 0x32 ); + } - player.playScene( getId(), 0, NO_DEFAULT_CAMERA | INVIS_ENPC | - CONDITION_CUTSCENE | HIDE_UI | - HIDE_HOTBAR | SILENT_ENTER_TERRI_ENV, 0, 1, callback ); - } + void Scene00020( Entity::Player& player ) + { + player.playScene( getId(), 20, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 1 ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 1, 0x32 ); - } + void Scene00030( Entity::Player& player ) + { + player.playScene( getId(), 30, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 ); + } - void Scene00020( Entity::Player& player ) - { - player.playScene( getId(), 20, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 1 ); - } + void Scene00040( Entity::Player& player ) + { + auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( player.getOpeningSequence() == 2 ) + Scene00030( player ); + }; - void Scene00030( Entity::Player& player ) - { - player.playScene( getId(), 30, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 ); - } - - void Scene00040( Entity::Player& player ) - { - auto callback = [this]( Entity::Player& player, const Event::SceneResult& result ) - { - if( player.getOpeningSequence() == 2 ) - Scene00030( player ); - }; - - player.playScene( getId(), 40, NO_DEFAULT_CAMERA, 2, 1, callback ); - } + player.playScene( getId(), 40, NO_DEFAULT_CAMERA, 2, 1, callback ); + } public: - OpeningUldah() : EventScript( 1245187 ) - { } + OpeningUldah() : + EventScript( 1245187 ) + { + } - void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override - { - if( player.getOpeningSequence() == 0 ) - Scene00000( player ); - else - Scene00040( player ); - } + void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override + { + if( player.getOpeningSequence() == 0 ) + Scene00000( player ); + else + Scene00040( player ); + } - void onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override - { - if( param1 == ERANGE_SEQ_1_CLOSED_1 ) - Scene00020( player ); - } + void onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override + { + if( param1 == ERANGE_SEQ_1_CLOSED_1 ) + Scene00020( player ); + } - void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override - { - if( param1 == ERANGE_ALWAYS_CLOSED_1 || param1 == ERANGE_ALWAYS_CLOSED_2 || param1 == ERANGE_ALWAYS_CLOSED_3 ) - { - Scene00020( player ); - } - } + void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override + { + if( param1 == ERANGE_ALWAYS_CLOSED_1 || param1 == ERANGE_ALWAYS_CLOSED_2 || param1 == ERANGE_ALWAYS_CLOSED_3 ) + { + Scene00020( player ); + } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/ManFst001.cpp b/src/servers/Scripts/quest/ManFst001.cpp index ba606e80..de98aeb5 100644 --- a/src/servers/Scripts/quest/ManFst001.cpp +++ b/src/servers/Scripts/quest/ManFst001.cpp @@ -9,90 +9,94 @@ // Start NPC: 1001148 // End NPC: 1001140 -class ManFst001 : public EventScript +class ManFst001 : + public EventScript { private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_FINISH = 255; + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_FINISH = 255; - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 103; + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 103; - static constexpr auto ACTOR0 = 1001148; - static constexpr auto ACTOR1 = 1001140; - static constexpr auto CUT_EVENT = 29; - static constexpr auto EOBJECT0 = 2001659; - static constexpr auto EOBJECT1 = 2001660; - static constexpr auto EOBJECT7 = 2616477; - static constexpr auto EVENT_ACTION_SEARCH = 1; - static constexpr auto HOWTO_QUEST_ACCEPT = 12; - static constexpr auto HOWTO_QUEST_ANNOUNCE = 2; - static constexpr auto HOWTO_REWARD = 11; - static constexpr auto HOWTO_TODO = 3; - static constexpr auto OPENING_EVENT_HANDLER = 1245186; - static constexpr auto SEQ_2_ACTOR1 = 2; + static constexpr auto ACTOR0 = 1001148; + static constexpr auto ACTOR1 = 1001140; + static constexpr auto CUT_EVENT = 29; + static constexpr auto EOBJECT0 = 2001659; + static constexpr auto EOBJECT1 = 2001660; + static constexpr auto EOBJECT7 = 2616477; + static constexpr auto EVENT_ACTION_SEARCH = 1; + static constexpr auto HOWTO_QUEST_ACCEPT = 12; + static constexpr auto HOWTO_QUEST_ANNOUNCE = 2; + static constexpr auto HOWTO_REWARD = 11; + static constexpr auto HOWTO_TODO = 3; + static constexpr auto OPENING_EVENT_HANDLER = 1245186; + static constexpr auto SEQ_2_ACTOR1 = 2; - void Scene00000( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00000( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // accept quest { - if( result.param2 == 1 ) // accept quest - { - player.setOpeningSequence( 2 ); - Scene00001( player ); - } - }; + player.setOpeningSequence( 2 ); + Scene00001( player ); + } + }; - player.playScene( getId(), 0, HIDE_HOTBAR, 0, 0, callback ); - } + player.playScene( getId(), 0, HIDE_HOTBAR, 0, 0, callback ); + } - void Scene00001( Entity::Player& player ) - { - player.playSceneChain( getId(), 1, DISABLE_SKIP | HIDE_HOTBAR | SET_BASE, bindScene( &ManFst001::Scene00002 ) ); - } + void Scene00001( Entity::Player& player ) + { + player.playSceneChain( getId(), 1, DISABLE_SKIP | HIDE_HOTBAR | SET_BASE, bindScene( &ManFst001::Scene00002 ) ); + } - void Scene00002( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00002( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SEQ_FINISH ); + + player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 ); + }; + + player.playScene( getId(), 2, 0, 0, 0, callback ); + } + + void Scene00004( Entity::Player& player ) + { + player.playSceneChain( getId(), 4, FADE_OUT | HIDE_HOTBAR | CONDITION_CUTSCENE | HIDE_UI, + bindScene( &ManFst001::Scene00005 ) ); + } + + void Scene00005( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) { - player.updateQuest( getId(), SEQ_FINISH ); + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + }; - player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 ); - }; - - player.playScene( getId(), 2, 0, 0, 0, callback ); - } - - void Scene00004( Entity::Player& player ) - { - player.playSceneChain( getId(), 4, FADE_OUT | HIDE_HOTBAR | CONDITION_CUTSCENE | HIDE_UI, bindScene( &ManFst001::Scene00005 ) ); - } - - void Scene00005( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - player.finishQuest( getId() ); - } - }; - - player.playScene( getId(), 5, INVIS_OTHER_PC, 0, 0, callback ); - } + player.playScene( getId(), 5, INVIS_OTHER_PC, 0, 0, callback ); + } public: - ManFst001() : EventScript( 65575 ) - {} + ManFst001() : + EventScript( 65575 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( actor == ACTOR0 ) - Scene00000( player ); - else if( actor == ACTOR1 ) - Scene00004( player ); - } + if( actor == ACTOR0 ) + Scene00000( player ); + else if( actor == ACTOR1 ) + Scene00004( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/ManFst002.cpp b/src/servers/Scripts/quest/ManFst002.cpp index b9c8e38d..93c6639c 100644 --- a/src/servers/Scripts/quest/ManFst002.cpp +++ b/src/servers/Scripts/quest/ManFst002.cpp @@ -9,208 +9,212 @@ // Start NPC: 1001140 // End NPC: 1000100 -class ManFst002 : public EventScript +class ManFst002 : + public EventScript { private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_1 = 1; - static constexpr auto SEQ_2 = 2; - static constexpr auto SEQ_FINISH = 255; - //this.SEQ_OFFER = ?; + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_1 = 1; + static constexpr auto SEQ_2 = 2; + static constexpr auto SEQ_FINISH = 255; + //this.SEQ_OFFER = ?; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardGil = 107; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardGil = 107; - // Entities found in the script data of the quest - // some of these may be useful - static constexpr auto ACTOR0 = 1001140; - static constexpr auto ACTOR1 = 2; - static constexpr auto ACTOR2 = 1000251; - static constexpr auto ACTOR20 = 1000159; - static constexpr auto ACTOR3 = 1000768; - static constexpr auto ACTOR4 = 1000100; - static constexpr auto BIND_ACTOR0 = 6229224; - static constexpr auto HOW_TO_DESION = 13; - static constexpr auto HOW_TO_MAP_AND_NAVI = 4; - static constexpr auto ITEM0 = 2000074; - static constexpr auto LOC_ACTOR0 = 1003159; - static constexpr auto LOC_MARKER_01 = 2153091; - static constexpr auto LOC_MARKER_02 = 2153104; - static constexpr auto LOC_MARKER_03 = 2153111; - static constexpr auto LOC_MARKER_04 = 2154539; - static constexpr auto LOC_MARKER_05 = 2154540; - static constexpr auto LOC_MARKER_06 = 2154541; - static constexpr auto LOC_MARKER_07 = 2210446; - static constexpr auto LOC_MARKER_08 = 2210454; - static constexpr auto LOC_MARKER_09 = 2210461; - static constexpr auto LOC_MOTION0 = 799; - static constexpr auto POPRANGE0 = 2280858; - static constexpr auto REWARD_DESION = 1; - static constexpr auto SEQ_0_ACTOR0 = 0; - static constexpr auto SEQ_0_ACTOR0_LQ = 50; - static constexpr auto SEQ_1_ACTOR0 = 4; - static constexpr auto SEQ_1_ACTOR1 = 1; - static constexpr auto SEQ_1_ACTOR1_WAIT = 51; - static constexpr auto SEQ_1_ACTOR2 = 2; - static constexpr auto SEQ_1_ACTOR3 = 3; - static constexpr auto SEQ_1_ACTOR3_NPCTRADENO = 99; - static constexpr auto SEQ_1_ACTOR3_NPCTRADEOK = 100; - static constexpr auto SEQ_2_ACTOR4 = 5; - static constexpr auto TERRITORYTYPE0 = 132; - static constexpr auto UNLOCK_DESION = 14; + // Entities found in the script data of the quest + // some of these may be useful + static constexpr auto ACTOR0 = 1001140; + static constexpr auto ACTOR1 = 2; + static constexpr auto ACTOR2 = 1000251; + static constexpr auto ACTOR20 = 1000159; + static constexpr auto ACTOR3 = 1000768; + static constexpr auto ACTOR4 = 1000100; + static constexpr auto BIND_ACTOR0 = 6229224; + static constexpr auto HOW_TO_DESION = 13; + static constexpr auto HOW_TO_MAP_AND_NAVI = 4; + static constexpr auto ITEM0 = 2000074; + static constexpr auto LOC_ACTOR0 = 1003159; + static constexpr auto LOC_MARKER_01 = 2153091; + static constexpr auto LOC_MARKER_02 = 2153104; + static constexpr auto LOC_MARKER_03 = 2153111; + static constexpr auto LOC_MARKER_04 = 2154539; + static constexpr auto LOC_MARKER_05 = 2154540; + static constexpr auto LOC_MARKER_06 = 2154541; + static constexpr auto LOC_MARKER_07 = 2210446; + static constexpr auto LOC_MARKER_08 = 2210454; + static constexpr auto LOC_MARKER_09 = 2210461; + static constexpr auto LOC_MOTION0 = 799; + static constexpr auto POPRANGE0 = 2280858; + static constexpr auto REWARD_DESION = 1; + static constexpr auto SEQ_0_ACTOR0 = 0; + static constexpr auto SEQ_0_ACTOR0_LQ = 50; + static constexpr auto SEQ_1_ACTOR0 = 4; + static constexpr auto SEQ_1_ACTOR1 = 1; + static constexpr auto SEQ_1_ACTOR1_WAIT = 51; + static constexpr auto SEQ_1_ACTOR2 = 2; + static constexpr auto SEQ_1_ACTOR3 = 3; + static constexpr auto SEQ_1_ACTOR3_NPCTRADENO = 99; + static constexpr auto SEQ_1_ACTOR3_NPCTRADEOK = 100; + static constexpr auto SEQ_2_ACTOR4 = 5; + static constexpr auto TERRITORYTYPE0 = 132; + static constexpr auto UNLOCK_DESION = 14; - void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) - { - if( varIdx == 3 ) - player.sendQuestMessage( getId(), 1, 0, 0, 0 ); - else if( varIdx == 2 ) - player.sendQuestMessage( getId(), 2, 0, 0, 0 ); + void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) + { + if( varIdx == 3 ) + player.sendQuestMessage( getId(), 1, 0, 0, 0 ); + else if( varIdx == 2 ) + player.sendQuestMessage( getId(), 2, 0, 0, 0 ); + else + player.sendQuestMessage( getId(), 0, 0, 0, 0 ); + + auto var_attuned = player.getQuestUI8AL( static_cast< uint16_t >( getId() ) ); + auto var_class = player.getQuestUI8BH( static_cast< uint16_t >( getId() ) ); + auto var_trade = player.getQuestUI8BL( static_cast< uint16_t >( getId() ) ); + + if( var_attuned == 1 && var_class == 1 && var_trade == 1 ) + player.updateQuest( getId(), SEQ_FINISH ); + } + + void Scene00000( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // accept quest + Scene00050( player ); + }; + + player.playScene( getId(), SEQ_0_ACTOR0, HIDE_HOTBAR, 0, 0, callback ); + } + + void Scene00001( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8AL( getId(), 1 ); + checkQuestCompletion( player, 0 ); + }; + + player.playScene( getId(), SEQ_1_ACTOR1, 0x0EFB, 0, 0, callback ); + } + + void Scene00002( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8BH( getId(), 1 ); + checkQuestCompletion( player, 3 ); + }; + + player.playScene( getId(), SEQ_1_ACTOR2, NONE, 0, 0, callback ); + } + + void Scene00003( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + Scene00100( player ); else - player.sendQuestMessage( getId(), 0, 0, 0, 0 ); + Scene00099( player ); + }; - auto var_attuned = player.getQuestUI8AL( static_cast< uint16_t >( getId() ) ); - auto var_class = player.getQuestUI8BH( static_cast< uint16_t >( getId() ) ); - auto var_trade = player.getQuestUI8BL( static_cast< uint16_t >( getId() ) ); + player.playScene( getId(), SEQ_1_ACTOR3, NONE, 0, 0, callback ); + } - if( var_attuned == 1 && var_class == 1 && var_trade == 1 ) - player.updateQuest( getId(), SEQ_FINISH ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), SEQ_1_ACTOR0, NONE, 0, 0 ); + } - void Scene00000( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00005( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // finish quest { - if( result.param2 == 1 ) // accept quest - Scene00050( player ); - }; + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + }; - player.playScene( getId(), SEQ_0_ACTOR0, HIDE_HOTBAR, 0, 0, callback ); - } + player.playScene( getId(), SEQ_2_ACTOR4, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, callback ); + } - void Scene00001( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8AL( getId(), 1 ); - checkQuestCompletion( player, 0 ); - }; + void Scene00050( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + // on quest accept + player.updateQuest( getId(), SEQ_1 ); + player.setQuestUI8CH( getId(), 1 ); // receive key item - player.playScene( getId(), SEQ_1_ACTOR1, 0x0EFB, 0, 0, callback ); - } + // teleport to real gridania + player.forceZoneing( TERRITORYTYPE0 ); + }; - void Scene00002( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8BH( getId(), 1 ); - checkQuestCompletion( player, 3 ); - }; + player.playScene( getId(), SEQ_0_ACTOR0_LQ, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, callback ); + } - player.playScene( getId(), SEQ_1_ACTOR2, NONE, 0, 0, callback ); - } + void Scene00051( Entity::Player& player ) + { + player.playSceneChain( getId(), SEQ_1_ACTOR1_WAIT, NONE, bindScene( &ManFst002::Scene00001 ) ); + } - void Scene00003( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - Scene00100( player ); - else - Scene00099( player ); - }; + void Scene00099( Entity::Player& player ) + { + player.playSceneChain( getId(), SEQ_1_ACTOR3_NPCTRADENO, NONE, bindScene( &ManFst002::Scene00005 ) ); + } - player.playScene( getId(), SEQ_1_ACTOR3, NONE, 0, 0, callback ); - } + void Scene00100( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8CH( getId(), 0 ); // remove traded key item + player.setQuestUI8BL( getId(), 1 ); - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), SEQ_1_ACTOR0, NONE, 0, 0 ); - } + checkQuestCompletion( player, 2 ); + }; - void Scene00005( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) // finish quest - { - if( player.giveQuestRewards( getId(), 0 )) - player.finishQuest( getId()); - } - }; - - player.playScene( getId(), SEQ_2_ACTOR4, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, callback ); - } - - void Scene00050( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - // on quest accept - player.updateQuest( getId(), SEQ_1 ); - player.setQuestUI8CH( getId(), 1 ); // receive key item - - // teleport to real gridania - player.forceZoneing( TERRITORYTYPE0 ); - }; - - player.playScene( getId(), SEQ_0_ACTOR0_LQ, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, callback ); - } - - void Scene00051( Entity::Player& player ) - { - player.playSceneChain( getId(), SEQ_1_ACTOR1_WAIT, NONE, bindScene( &ManFst002::Scene00001 )); - } - - void Scene00099( Entity::Player& player ) - { - player.playSceneChain( getId(), SEQ_1_ACTOR3_NPCTRADENO, NONE, bindScene( &ManFst002::Scene00005 )); - } - - void Scene00100( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8CH( getId(), 0 ); // remove traded key item - player.setQuestUI8BL( getId(), 1 ); - - checkQuestCompletion( player, 2 ); - }; - - player.playScene( getId(), SEQ_1_ACTOR3_NPCTRADEOK, 0x0EFB, 0, 0, callback ); - } + player.playScene( getId(), SEQ_1_ACTOR3_NPCTRADEOK, 0x0EFB, 0, 0, callback ); + } public: - ManFst002() : EventScript( 65621 ) - {} + ManFst002() : + EventScript( 65621 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( actor == ACTOR0 ) - Scene00000( player ); - else if( actor == ACTOR1 ) + if( actor == ACTOR0 ) + Scene00000( player ); + else if( actor == ACTOR1 ) + { + // attune + auto event = [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) { - // attune - auto event = [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); - player.registerAetheryte( 2 ); - player.learnAction( 1 ); + player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); + player.registerAetheryte( 2 ); + player.learnAction( 1 ); - Scene00051( player ); - }; + Scene00051( player ); + }; - player.eventActionStart( 0x050002, 0x13, event, nullptr, 0x050002 ); + player.eventActionStart( 0x050002, 0x13, event, nullptr, 0x050002 ); - } else if( actor == ACTOR2 ) - Scene00002( player ); - else if( actor == ACTOR3 ) - Scene00003( player ); - else if( actor == ACTOR4 ) - Scene00005( player ); - } + } + else if( actor == ACTOR2 ) + Scene00002( player ); + else if( actor == ACTOR3 ) + Scene00003( player ); + else if( actor == ACTOR4 ) + Scene00005( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/ManFst003.cpp b/src/servers/Scripts/quest/ManFst003.cpp index 3b1b597e..7048b2a6 100644 --- a/src/servers/Scripts/quest/ManFst003.cpp +++ b/src/servers/Scripts/quest/ManFst003.cpp @@ -8,240 +8,248 @@ // Start NPC: 1001140 // End NPC: 1000100 -class ManFst003 : public EventScript +class ManFst003 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestBitFlag8 - // GetQuestUI8AL - // GetQuestUI8BH - // GetQuestUI8BL - // GetQuestUI8CH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestBitFlag8 + // GetQuestUI8AL + // GetQuestUI8BH + // GetQuestUI8BL + // GetQuestUI8CH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardGil = 107; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardGil = 107; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001140; - static constexpr auto Actor1 = 2; - static constexpr auto Actor2 = 1000197; - static constexpr auto Actor20 = 1000159; - static constexpr auto Actor3 = 1000768; - static constexpr auto Actor4 = 1000100; - static constexpr auto BindActor0 = 6229224; - static constexpr auto Item0 = 2000119; - static constexpr auto LocActor0 = 1003159; - static constexpr auto LocMarker01 = 2153091; - static constexpr auto LocMarker02 = 2153104; - static constexpr auto LocMarker03 = 2153111; - static constexpr auto LocMarker04 = 2154539; - static constexpr auto LocMarker05 = 2154540; - static constexpr auto LocMarker06 = 2154541; - static constexpr auto LocMarker07 = 2210446; - static constexpr auto LocMarker08 = 2210454; - static constexpr auto LocMarker09 = 2210461; - static constexpr auto LocMotion0 = 799; - static constexpr auto Poprange0 = 2280858; - static constexpr auto RewardDesion = 1; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq0Actor0Lq = 50; - static constexpr auto Seq1Actor0 = 4; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq1Actor1Wait = 51; - static constexpr auto Seq1Actor2 = 2; - static constexpr auto Seq1Actor3 = 3; - static constexpr auto Seq1Actor3Npctradeno = 99; - static constexpr auto Seq1Actor3Npctradeok = 100; - static constexpr auto Seq2Actor4 = 5; - static constexpr auto Territorytype0 = 132; - static constexpr auto UnlockDesion = 14; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001140; + static constexpr auto Actor1 = 2; + static constexpr auto Actor2 = 1000197; + static constexpr auto Actor20 = 1000159; + static constexpr auto Actor3 = 1000768; + static constexpr auto Actor4 = 1000100; + static constexpr auto BindActor0 = 6229224; + static constexpr auto Item0 = 2000119; + static constexpr auto LocActor0 = 1003159; + static constexpr auto LocMarker01 = 2153091; + static constexpr auto LocMarker02 = 2153104; + static constexpr auto LocMarker03 = 2153111; + static constexpr auto LocMarker04 = 2154539; + static constexpr auto LocMarker05 = 2154540; + static constexpr auto LocMarker06 = 2154541; + static constexpr auto LocMarker07 = 2210446; + static constexpr auto LocMarker08 = 2210454; + static constexpr auto LocMarker09 = 2210461; + static constexpr auto LocMotion0 = 799; + static constexpr auto Poprange0 = 2280858; + static constexpr auto RewardDesion = 1; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq0Actor0Lq = 50; + static constexpr auto Seq1Actor0 = 4; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq1Actor1Wait = 51; + static constexpr auto Seq1Actor2 = 2; + static constexpr auto Seq1Actor3 = 3; + static constexpr auto Seq1Actor3Npctradeno = 99; + static constexpr auto Seq1Actor3Npctradeok = 100; + static constexpr auto Seq2Actor4 = 5; + static constexpr auto Territorytype0 = 132; + static constexpr auto UnlockDesion = 14; - public: - ManFst003() : EventScript( 65659 ){}; - ~ManFst003(){}; +public: + ManFst003() : + EventScript( 65659 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~ManFst003() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - player.eventActionStart( 0x050002, 0x13, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); - player.registerAetheryte( 2 ); - player.learnAction( 1 ); - Scene00051( player ); - }, - nullptr, eventId ); - } - else if( actor == Actor2 ) - { - Scene00002( player ); - } - else if( actor == Actor3 ) - { - Scene00003( player ); - } - else if( actor == Actor4 ) - { - Scene00005( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + player.eventActionStart( 0x050002, 0x13, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); + player.registerAetheryte( 2 ); + player.learnAction( 1 ); + Scene00051( player ); + }, + nullptr, eventId ); + } + else if( actor == Actor2 ) + { + Scene00002( player ); + } + else if( actor == Actor3 ) + { + Scene00003( player ); + } + else if( actor == Actor4 ) + { + Scene00005( player ); + } + } - void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) - { - if( varIdx == 3 ) - { - player.sendQuestMessage( getId(), 1, 0, 0, 0 ); - } - else if( varIdx == 2 ) - { - player.sendQuestMessage( getId(), 2, 0, 0, 0 ); - } - else - { - player.sendQuestMessage( getId(), 0, 0, 0, 0 ); - } +private: - auto questId = getId(); + void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) + { + if( varIdx == 3 ) + { + player.sendQuestMessage( getId(), 1, 0, 0, 0 ); + } + else if( varIdx == 2 ) + { + player.sendQuestMessage( getId(), 2, 0, 0, 0 ); + } + else + { + player.sendQuestMessage( getId(), 0, 0, 0, 0 ); + } - auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); - auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); - auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); + auto questId = getId(); - if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) - { - player.updateQuest( questId, SeqFinish ); - } - } + auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); + auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); + auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00050( player ); - } - } ); - } + if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) + { + player.updateQuest( questId, SeqFinish ); + } + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8AL( getId(), 1 ); - checkQuestCompletion( player, 0 ); - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00050( player ); + } + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8BH( getId(), 1 ); - checkQuestCompletion( player, 3 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8AL( getId(), 1 ); + checkQuestCompletion( player, 0 ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8BH( getId(), 1 ); + checkQuestCompletion( player, 3 ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 4, 0, 0, 0 ); - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 4, 0, 0, 0 ); + } ); + } - void Scene00050( Entity::Player& player ) - { - player.playScene( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), Seq1 ); - player.setQuestUI8CH( getId(), 1 ); - player.forceZoneing( 132 ); - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } - void Scene00051( Entity::Player& player ) - { - player.playScene( getId(), 51, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00001( player ); - } ); - } + void Scene00050( Entity::Player& player ) + { + player.playScene( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), Seq1 ); + player.setQuestUI8CH( getId(), 1 ); + player.forceZoneing( 132 ); + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00004( player ); - } ); - } + void Scene00051( Entity::Player& player ) + { + player.playScene( getId(), 51, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00001( player ); + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8CH( getId(), 0 ); - player.setQuestUI8BL( getId(), 1 ); - checkQuestCompletion( player, 2 ); - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00004( player ); + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8CH( getId(), 0 ); + player.setQuestUI8BL( getId(), 1 ); + checkQuestCompletion( player, 2 ); + } ); + } }; diff --git a/src/servers/Scripts/quest/ManFst004.cpp b/src/servers/Scripts/quest/ManFst004.cpp index a09be42e..5e208e03 100644 --- a/src/servers/Scripts/quest/ManFst004.cpp +++ b/src/servers/Scripts/quest/ManFst004.cpp @@ -8,247 +8,253 @@ // Start NPC: 1001140 // End NPC: 1000100 -class ManFst004 : public EventScript +class ManFst004 : + public EventScript { private: - // Basic quest information - // Quest vars / flags used - // GetQuestBitFlag8 - // GetQuestUI8AL - // GetQuestUI8BH - // GetQuestUI8BL - // GetQuestUI8CH + // Basic quest information + // Quest vars / flags used + // GetQuestBitFlag8 + // GetQuestUI8AL + // GetQuestUI8BH + // GetQuestUI8BL + // GetQuestUI8CH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardGil = 107; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardGil = 107; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001140; - static constexpr auto Actor1 = 2; - static constexpr auto Actor2 = 1000323; - static constexpr auto Actor20 = 1000159; - static constexpr auto Actor3 = 1000768; - static constexpr auto Actor4 = 1000100; - static constexpr auto BindActor0 = 6229224; - static constexpr auto Item0 = 2000120; - static constexpr auto LocActor0 = 1003159; - static constexpr auto LocMarker01 = 2153091; - static constexpr auto LocMarker02 = 2153104; - static constexpr auto LocMarker03 = 2153111; - static constexpr auto LocMarker04 = 2154539; - static constexpr auto LocMarker05 = 2154540; - static constexpr auto LocMarker06 = 2154541; - static constexpr auto LocMarker07 = 2210446; - static constexpr auto LocMarker08 = 2210454; - static constexpr auto LocMarker09 = 2210461; - static constexpr auto LocMotion0 = 799; - static constexpr auto Poprange0 = 2280858; - static constexpr auto RewardDesion = 1; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq0Actor0Lq = 50; - static constexpr auto Seq1Actor0 = 4; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq1Actor1Wait = 51; - static constexpr auto Seq1Actor2 = 2; - static constexpr auto Seq1Actor3 = 3; - static constexpr auto Seq1Actor3Npctradeno = 99; - static constexpr auto Seq1Actor3Npctradeok = 100; - static constexpr auto Seq2Actor4 = 5; - static constexpr auto Territorytype0 = 132; - static constexpr auto UnlockDesion = 14; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001140; + static constexpr auto Actor1 = 2; + static constexpr auto Actor2 = 1000323; + static constexpr auto Actor20 = 1000159; + static constexpr auto Actor3 = 1000768; + static constexpr auto Actor4 = 1000100; + static constexpr auto BindActor0 = 6229224; + static constexpr auto Item0 = 2000120; + static constexpr auto LocActor0 = 1003159; + static constexpr auto LocMarker01 = 2153091; + static constexpr auto LocMarker02 = 2153104; + static constexpr auto LocMarker03 = 2153111; + static constexpr auto LocMarker04 = 2154539; + static constexpr auto LocMarker05 = 2154540; + static constexpr auto LocMarker06 = 2154541; + static constexpr auto LocMarker07 = 2210446; + static constexpr auto LocMarker08 = 2210454; + static constexpr auto LocMarker09 = 2210461; + static constexpr auto LocMotion0 = 799; + static constexpr auto Poprange0 = 2280858; + static constexpr auto RewardDesion = 1; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq0Actor0Lq = 50; + static constexpr auto Seq1Actor0 = 4; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq1Actor1Wait = 51; + static constexpr auto Seq1Actor2 = 2; + static constexpr auto Seq1Actor3 = 3; + static constexpr auto Seq1Actor3Npctradeno = 99; + static constexpr auto Seq1Actor3Npctradeok = 100; + static constexpr auto Seq2Actor4 = 5; + static constexpr auto Territorytype0 = 132; + static constexpr auto UnlockDesion = 14; public: - ManFst004() : EventScript( 65660 ) - { }; + ManFst004() : + EventScript( 65660 ) + { + }; - ~ManFst004() - { }; + ~ManFst004() + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( actor == ManFst004::Actor0 ) - { - Scene00000( player ); - } - else if( actor == ManFst004::Actor1 ) - { - // starting the Aetheryte eventaction - // player.eventStart( actorId, 0x050002, 7, 0, 0); - // starting the eventaction 0x13 ( attuning ) - player.eventActionStart( 0x050002, 0x13, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); - player.registerAetheryte( 2 ); - player.learnAction( 1 ); - Scene00051( player ); - }, - nullptr, eventId); - } - else if( actor == ManFst004::Actor2 ) - { - Scene00002( player ); - } - else if( actor == ManFst004::Actor3 ) - { - Scene00003( player ); - } - else if( actor == ManFst004::Actor4 ) - { - Scene00005( player ); - } - } + if( actor == ManFst004::Actor0 ) + { + Scene00000( player ); + } + else if( actor == ManFst004::Actor1 ) + { + // starting the Aetheryte eventaction + // player.eventStart( actorId, 0x050002, 7, 0, 0); + // starting the eventaction 0x13 ( attuning ) + player.eventActionStart( 0x050002, 0x13, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); + player.registerAetheryte( 2 ); + player.learnAction( 1 ); + Scene00051( player ); + }, + nullptr, eventId ); + } + else if( actor == ManFst004::Actor2 ) + { + Scene00002( player ); + } + else if( actor == ManFst004::Actor3 ) + { + Scene00003( player ); + } + else if( actor == ManFst004::Actor4 ) + { + Scene00005( player ); + } + } private: - void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) - { - if( varIdx == 3 ) - { - player.sendQuestMessage( getId(), 1, 0, 0, 0 ); - } - else if( varIdx == 2 ) - { - player.sendQuestMessage( getId(), 2, 0, 0, 0 ); - } - else - { - player.sendQuestMessage( getId(), 0, 0, 0, 0 ); - } + void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) + { + if( varIdx == 3 ) + { + player.sendQuestMessage( getId(), 1, 0, 0, 0 ); + } + else if( varIdx == 2 ) + { + player.sendQuestMessage( getId(), 2, 0, 0, 0 ); + } + else + { + player.sendQuestMessage( getId(), 0, 0, 0, 0 ); + } - auto questId = getId(); + auto questId = getId(); - auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); - auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); - auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); + auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); + auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); + auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); - if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) - { - player.updateQuest( questId, SeqFinish ); - } - } + if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) + { + player.updateQuest( questId, SeqFinish ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) // accept quest - { - Scene00050( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // accept quest + { + Scene00050( player ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8AL( getId(), 1 ); - checkQuestCompletion( player, 0 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8AL( getId(), 1 ); + checkQuestCompletion( player, 0 ); + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8BH( getId(), 1 ); - checkQuestCompletion( player, 3 ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8BH( getId(), 1 ); + checkQuestCompletion( player, 3 ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } else - { - Scene00099( player ); - } - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 4, 0, 0, 0 ); - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 4, 0, 0, 0 ); + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) // finish quest - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // finish quest + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } - void Scene00050( Entity::Player& player ) - { - player.playScene( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0/*unk*/, 0/*unk*/, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - // accepting quest "close to home" - player.updateQuest( getId(), 1 ); - player.setQuestUI8CH( getId(), 1 ); // receive key item - // event is done, need to teleport to real zone. - player.setZone( 132 ); - //player.setZone(183); back to starting griania for debug purpose - } ); - } + void Scene00050( Entity::Player& player ) + { + player.playScene( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0/*unk*/, 0/*unk*/, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + // accepting quest "close to home" + player.updateQuest( getId(), 1 ); + player.setQuestUI8CH( getId(), 1 ); // receive key item + // event is done, need to teleport to real zone. + player.setZone( 132 ); + //player.setZone(183); back to starting griania for debug purpose + } ); + } - void Scene00051( Entity::Player& player ) - { - player.playScene( getId(), 51, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00001( player ); - } ); - } + void Scene00051( Entity::Player& player ) + { + player.playScene( getId(), 51, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00001( player ); + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00004( player ); - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00004( player ); + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8CH( getId(), 0 ); // remove key item, since we have just traded it - player.setQuestUI8BL( getId(), 1 ); - checkQuestCompletion( player, 2 ); - } ); - } + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8CH( getId(), 0 ); // remove key item, since we have just traded it + player.setQuestUI8BL( getId(), 1 ); + checkQuestCompletion( player, 2 ); + } ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/ManSea001.cpp b/src/servers/Scripts/quest/ManSea001.cpp index 17b65f2a..2ad910cb 100644 --- a/src/servers/Scripts/quest/ManSea001.cpp +++ b/src/servers/Scripts/quest/ManSea001.cpp @@ -8,140 +8,143 @@ // Start NPC: 1001028 // End NPC: 1002697 -class ManSea001 : public EventScript +class ManSea001 : + public EventScript { private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_1 = 1; - static constexpr auto SEQ_FINISH = 255; + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_1 = 1; + static constexpr auto SEQ_FINISH = 255; - static constexpr auto ACTOR0 = 1001028; - static constexpr auto ACTOR1 = 1002732; - static constexpr auto ACTOR2 = 1002697; - static constexpr auto CUT_EVENT = 202; - static constexpr auto EOBJECT0 = 2001679; - static constexpr auto EOBJECT1 = 2001680; - static constexpr auto EVENT_ACTION_SEARCH = 1; - static constexpr auto LOC_ACTOR0 = 1002732; - static constexpr auto LOC_POS_ACTOR0 = 4107186; - static constexpr auto OPENING_EVENT_HANDLER = 1245185; - static constexpr auto POPRANGE0 = 4127803; - static constexpr auto TERRITORYTYPE0 = 181; + static constexpr auto ACTOR0 = 1001028; + static constexpr auto ACTOR1 = 1002732; + static constexpr auto ACTOR2 = 1002697; + static constexpr auto CUT_EVENT = 202; + static constexpr auto EOBJECT0 = 2001679; + static constexpr auto EOBJECT1 = 2001680; + static constexpr auto EVENT_ACTION_SEARCH = 1; + static constexpr auto LOC_ACTOR0 = 1002732; + static constexpr auto LOC_POS_ACTOR0 = 4107186; + static constexpr auto OPENING_EVENT_HANDLER = 1245185; + static constexpr auto POPRANGE0 = 4127803; + static constexpr auto TERRITORYTYPE0 = 181; - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, 8192, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.setOpeningSequence( 2 ); - Scene00001( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, 8192, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.setOpeningSequence( 2 ); + Scene00001( player ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playSceneChain( getId(), 1, DISABLE_SKIP | HIDE_HOTBAR | SET_BASE, bindScene( &ManSea001::Scene00002 ) ); - } + void Scene00001( Entity::Player& player ) + { + player.playSceneChain( getId(), 1, DISABLE_SKIP | HIDE_HOTBAR | SET_BASE, bindScene( &ManSea001::Scene00002 ) ); + } - void Scene00002( Entity::Player& player ) - { - player.updateQuest( getId(), SEQ_1 ); - player.playSceneChain( getId(), 2, NONE, bindScene( &ManSea001::Scene00003 ) ); - } + void Scene00002( Entity::Player& player ) + { + player.updateQuest( getId(), SEQ_1 ); + player.playSceneChain( getId(), 2, NONE, bindScene( &ManSea001::Scene00003 ) ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, NONE, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 1, 0 ); - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, NONE, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 1, 0 ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, NONE, 0, 0 ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, NONE, 0, 0 ); + } - void Scene00005( Entity::Player& player ) - { - player.playSceneChain( getId(), 5, HIDE_HOTBAR, bindScene( &ManSea001::Scene00006 ) ); - } + void Scene00005( Entity::Player& player ) + { + player.playSceneChain( getId(), 5, HIDE_HOTBAR, bindScene( &ManSea001::Scene00006 ) ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, INVIS_OTHER_PC, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SEQ_FINISH ); - player.prepareZoning( player.getZoneId(), true, 1, 0 ); - player.changePosition( 9, 40, 14, 2 ); - } - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, INVIS_OTHER_PC, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SEQ_FINISH ); + player.prepareZoning( player.getZoneId(), true, 1, 0 ); + player.changePosition( 9, 40, 14, 2 ); + } + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, NONE, 0, 0 ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, NONE, 0, 0 ); + } - void Scene00008( Entity::Player& player ) - { - player.playScene( getId(), 8, NONE, 0, 0 ); - } + void Scene00008( Entity::Player& player ) + { + player.playScene( getId(), 8, NONE, 0, 0 ); + } - void Scene00009( Entity::Player& player ) - { - player.playScene( getId(), 9, NONE, 0, 0 ); - } + void Scene00009( Entity::Player& player ) + { + player.playScene( getId(), 9, NONE, 0, 0 ); + } - void Scene00010( Entity::Player& player ) - { - player.playScene( getId(), 10, NONE, 0, 0 ); - } + void Scene00010( Entity::Player& player ) + { + player.playScene( getId(), 10, NONE, 0, 0 ); + } - void Scene00011( Entity::Player& player ) - { - player.playSceneChain( getId(), 11, 0x2c02, 0, 0, bindScene( &ManSea001::Scene00012 ) ); - } + void Scene00011( Entity::Player& player ) + { + player.playSceneChain( getId(), 11, 0x2c02, 0, 0, bindScene( &ManSea001::Scene00012 ) ); + } - void Scene00012( Entity::Player& player ) - { - player.playScene( getId(), 12, INVIS_OTHER_PC, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) // finish quest - { - if(player.giveQuestRewards( getId(), 0 ) ) - player.finishQuest( getId() ); - } - } ); - } + void Scene00012( Entity::Player& player ) + { + player.playScene( getId(), 12, INVIS_OTHER_PC, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // finish quest + { + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + } ); + } - void Scene00013( Entity::Player& player ) - { - player.playScene( getId(), 13, NONE, 0, 0 ); - } + void Scene00013( Entity::Player& player ) + { + player.playScene( getId(), 13, NONE, 0, 0 ); + } public: - ManSea001() : EventScript( 65643 ) - {} + ManSea001() : + EventScript( 65643 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( actor == ACTOR0 ) - Scene00000( player ); - else if( actor == ACTOR1 ) - Scene00005( player ); - else if( actor == ACTOR2 ) - Scene00011( player ); - } + if( actor == ACTOR0 ) + Scene00000( player ); + else if( actor == ACTOR1 ) + Scene00005( player ); + else if( actor == ACTOR2 ) + Scene00011( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/ManSea002.cpp b/src/servers/Scripts/quest/ManSea002.cpp index 9d68d887..524e10be 100644 --- a/src/servers/Scripts/quest/ManSea002.cpp +++ b/src/servers/Scripts/quest/ManSea002.cpp @@ -8,186 +8,192 @@ // Start NPC: 1002697 // End NPC: 1000972 -class ManSea002 : public EventScript +class ManSea002 : + public EventScript { private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_1 = 1; - static constexpr auto SEQ_FINISH = 255; + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_1 = 1; + static constexpr auto SEQ_FINISH = 255; - static constexpr auto ACTOR0 = 1002697; - static constexpr auto ACTOR1 = 1001217; - static constexpr auto ACTOR2 = 1000926; - static constexpr auto ACTOR3 = 1000972; - static constexpr auto AETHERYTE0 = 8; - static constexpr auto BIND_ACTOR0 = 6229226; - static constexpr auto ITEM0 = 2000104; - static constexpr auto LOC_ACTOR1 = 1001023; - static constexpr auto LOC_FACE0 = 604; - static constexpr auto LOC_FACE1 = 605; - static constexpr auto LOC_POS_CAM1 = 4106696; - static constexpr auto LOC_POS_CAM2 = 4106698; - static constexpr auto REWARD0 = 1; - static constexpr auto SCREENIMAGE0 = 14; - static constexpr auto UNLOCK_DESION = 14; + static constexpr auto ACTOR0 = 1002697; + static constexpr auto ACTOR1 = 1001217; + static constexpr auto ACTOR2 = 1000926; + static constexpr auto ACTOR3 = 1000972; + static constexpr auto AETHERYTE0 = 8; + static constexpr auto BIND_ACTOR0 = 6229226; + static constexpr auto ITEM0 = 2000104; + static constexpr auto LOC_ACTOR1 = 1001023; + static constexpr auto LOC_FACE0 = 604; + static constexpr auto LOC_FACE1 = 605; + static constexpr auto LOC_POS_CAM1 = 4106696; + static constexpr auto LOC_POS_CAM2 = 4106698; + static constexpr auto REWARD0 = 1; + static constexpr auto SCREENIMAGE0 = 14; + static constexpr auto UNLOCK_DESION = 14; public: - ManSea002() : EventScript( 65644 ) - {} - ~ManSea002() - {}; + ManSea002() : + EventScript( 65644 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~ManSea002() + { + }; - if( actor == ACTOR0 ) - { - Scene00000( player ); - } - else if( actor == AETHERYTE0 ) - { - player.eventActionStart( 0x050002, 0x13, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); - player.registerAetheryte( 2 ); - player.learnAction( 1 ); - Scene00002( player ); - }, - nullptr, eventId ); - } - else if( actor == ACTOR1 ) - { - Scene00004( player ); - } - else if( actor == ACTOR2 ) - { - Scene00006( player ); - } - else if( actor == ACTOR3 ) - { - Scene00007( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + + if( actor == ACTOR0 ) + { + Scene00000( player ); + } + else if( actor == AETHERYTE0 ) + { + player.eventActionStart( 0x050002, 0x13, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); + player.registerAetheryte( 2 ); + player.learnAction( 1 ); + Scene00002( player ); + }, + nullptr, eventId ); + } + else if( actor == ACTOR1 ) + { + Scene00004( player ); + } + else if( actor == ACTOR2 ) + { + Scene00006( player ); + } + else if( actor == ACTOR3 ) + { + Scene00007( player ); + } + } private: - void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) - { - if( varIdx == 1 ) - { - player.sendQuestMessage( getId(), 1, 0, 0, 0 ); - } - else if( varIdx == 2 ) - { - player.sendQuestMessage( getId(), 2, 0, 0, 0 ); - } - else - { - player.sendQuestMessage( getId(), 0, 0, 0, 0 ); - } + void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) + { + if( varIdx == 1 ) + { + player.sendQuestMessage( getId(), 1, 0, 0, 0 ); + } + else if( varIdx == 2 ) + { + player.sendQuestMessage( getId(), 2, 0, 0, 0 ); + } + else + { + player.sendQuestMessage( getId(), 0, 0, 0, 0 ); + } - auto questId = getId(); + auto questId = getId(); - auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); - auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); - auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); + auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); + auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); + auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); - if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) - { - player.updateQuest( questId, SEQ_FINISH ); - } - } + if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) + { + player.updateQuest( questId, SEQ_FINISH ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00001( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00001( player ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), SEQ_1 ); - player.setQuestUI8CH( getId(), 1 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SEQ_1 ); + player.setQuestUI8CH( getId(), 1 ); + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00003( player ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00003( player ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8BL( getId(), 1 ); - checkQuestCompletion( player, 0 ); - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8BL( getId(), 1 ); + checkQuestCompletion( player, 0 ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00005( player ); - } - else return; - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00005( player ); + } + else + return; + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8CH( getId(), 0 ); - player.setQuestUI8BH( getId(), 1 ); - checkQuestCompletion( player, 1 ); - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8CH( getId(), 0 ); + player.setQuestUI8BH( getId(), 1 ); + checkQuestCompletion( player, 1 ); + } ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8AL( getId(), 1 ); - checkQuestCompletion( player, 2 ); - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8AL( getId(), 1 ); + checkQuestCompletion( player, 2 ); + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/ManSea003.cpp b/src/servers/Scripts/quest/ManSea003.cpp index 267b7602..e2a11715 100644 --- a/src/servers/Scripts/quest/ManSea003.cpp +++ b/src/servers/Scripts/quest/ManSea003.cpp @@ -8,201 +8,208 @@ // Start NPC: 1002697 // End NPC: 1000972 -class ManSea003 : public EventScript +class ManSea003 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestBitFlag8 - // GetQuestUI8AL - // GetQuestUI8BH - // GetQuestUI8BL - // GetQuestUI8CH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestBitFlag8 + // GetQuestUI8AL + // GetQuestUI8BH + // GetQuestUI8BL + // GetQuestUI8CH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardGil = 107; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardGil = 107; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1002697; - static constexpr auto Actor1 = 1001217; - static constexpr auto Actor2 = 1000895; - static constexpr auto Actor3 = 1000972; - static constexpr auto Aetheryte0 = 8; - static constexpr auto BindActor0 = 6229226; - static constexpr auto Item0 = 2000105; - static constexpr auto LocActor1 = 1001023; - static constexpr auto LocFace0 = 604; - static constexpr auto LocFace1 = 605; - static constexpr auto LocPosCam1 = 4106696; - static constexpr auto LocPosCam2 = 4106698; - static constexpr auto Reward0 = 1; - static constexpr auto Screenimage0 = 14; - static constexpr auto UnlockDesion = 14; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1002697; + static constexpr auto Actor1 = 1001217; + static constexpr auto Actor2 = 1000895; + static constexpr auto Actor3 = 1000972; + static constexpr auto Aetheryte0 = 8; + static constexpr auto BindActor0 = 6229226; + static constexpr auto Item0 = 2000105; + static constexpr auto LocActor1 = 1001023; + static constexpr auto LocFace0 = 604; + static constexpr auto LocFace1 = 605; + static constexpr auto LocPosCam1 = 4106696; + static constexpr auto LocPosCam2 = 4106698; + static constexpr auto Reward0 = 1; + static constexpr auto Screenimage0 = 14; + static constexpr auto UnlockDesion = 14; - public: - ManSea003() : EventScript( 65645 ) - {}; - ~ManSea003() - {}; +public: + ManSea003() : + EventScript( 65645 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~ManSea003() + { + }; - if( actor == Actor0) - { - Scene00000( player ); - } - else if( actor == Aetheryte0 ) - { - player.eventActionStart( 0x050002, 0x13, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); - player.registerAetheryte( 2 ); - player.learnAction( 1 ); - Scene00002( player ); - }, - nullptr, eventId ); - } - else if( actor == Actor1 ) - { - Scene00004( player ); - } - else if( actor == Actor2 ) - { - Scene00006( player ); - } - else if( actor == Actor3 ) - { - Scene00007( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Aetheryte0 ) + { + player.eventActionStart( 0x050002, 0x13, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); + player.registerAetheryte( 2 ); + player.learnAction( 1 ); + Scene00002( player ); + }, + nullptr, eventId ); + } + else if( actor == Actor1 ) + { + Scene00004( player ); + } + else if( actor == Actor2 ) + { + Scene00006( player ); + } + else if( actor == Actor3 ) + { + Scene00007( player ); + } + } - void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) - { - if( varIdx == 1 ) - { - player.sendQuestMessage( getId(), 1, 0, 0, 0 ); - } - else if( varIdx == 2 ) - { - player.sendQuestMessage( getId(), 2, 0, 0, 0 ); - } - else - { - player.sendQuestMessage( getId(), 0, 0, 0, 0 ); - } +private: - auto questId = getId(); + void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) + { + if( varIdx == 1 ) + { + player.sendQuestMessage( getId(), 1, 0, 0, 0 ); + } + else if( varIdx == 2 ) + { + player.sendQuestMessage( getId(), 2, 0, 0, 0 ); + } + else + { + player.sendQuestMessage( getId(), 0, 0, 0, 0 ); + } - auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); - auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); - auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); + auto questId = getId(); - if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) - { - player.updateQuest( questId, 255 ); - } - } + auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); + auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); + auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); - void Scene00000( Entity::Player& player) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if (result.param2 == 1) - { - Scene00001(player); - } - } ); - } + if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) + { + player.updateQuest( questId, 255 ); + } + } - void Scene00001( Entity::Player& player) - { - player.playScene( getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), 1 ); - player.setQuestUI8CH( getId(), 1 ); - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00001( player ); + } + } ); + } - void Scene00002( Entity::Player& player) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00003( player ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), 1 ); + player.setQuestUI8CH( getId(), 1 ); + } ); + } - void Scene00003( Entity::Player& player) - { - player.playScene( getId(), 3, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8BL( getId(), 1 ); - checkQuestCompletion( player, 0 ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00003( player ); + } ); + } - void Scene00004( Entity::Player& player) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00005( player ); - } - else return; - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8BL( getId(), 1 ); + checkQuestCompletion( player, 0 ); + } ); + } - void Scene00005( Entity::Player& player) - { - player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8CH( getId(), 0 ); - player.setQuestUI8BH( getId(), 1 ); - checkQuestCompletion( player, 1 ); - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00005( player ); + } + else + return; + } ); + } - void Scene00006( Entity::Player& player) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8AL( getId(), 1 ); - checkQuestCompletion( player, 2 ); - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8CH( getId(), 0 ); + player.setQuestUI8BH( getId(), 1 ); + checkQuestCompletion( player, 1 ); + } ); + } - void Scene00007( Entity::Player& player) - { - player.playScene( getId(), 7, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if(player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8AL( getId(), 1 ); + checkQuestCompletion( player, 2 ); + } ); + } + + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, 0, 0, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/ManWil001.cpp b/src/servers/Scripts/quest/ManWil001.cpp index 57c09a74..7a50a6e4 100644 --- a/src/servers/Scripts/quest/ManWil001.cpp +++ b/src/servers/Scripts/quest/ManWil001.cpp @@ -8,174 +8,177 @@ // Start NPC: 1003987 // End NPC: 1003988 -class ManWil001 : public EventScript +class ManWil001 : + public EventScript { private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_FINISH = 255; + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_FINISH = 255; - static constexpr auto ACTOR0 = 1003987; - static constexpr auto ACTOR1 = 1003988; - static constexpr auto ACTOR20 = 1001285; - static constexpr auto CUT_EVENT = 188; - static constexpr auto EOBJECT0 = 2001681; - static constexpr auto EOBJECT1 = 2001682; - static constexpr auto EOBJECT2 = 2001683; - static constexpr auto EOBJECT3 = 2001706; - static constexpr auto EVENT_ACTION_SEARCH = 1; - static constexpr auto OPENING_EVENT_HANDLER = 1245187; + static constexpr auto ACTOR0 = 1003987; + static constexpr auto ACTOR1 = 1003988; + static constexpr auto ACTOR20 = 1001285; + static constexpr auto CUT_EVENT = 188; + static constexpr auto EOBJECT0 = 2001681; + static constexpr auto EOBJECT1 = 2001682; + static constexpr auto EOBJECT2 = 2001683; + static constexpr auto EOBJECT3 = 2001706; + static constexpr auto EVENT_ACTION_SEARCH = 1; + static constexpr auto OPENING_EVENT_HANDLER = 1245187; - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.setOpeningSequence( 2 ); - Scene00001( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.setOpeningSequence( 2 ); + Scene00001( player ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, 0xF8482EFB, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00002( player ); - player.updateQuest( getId(), SEQ_FINISH ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, 0xF8482EFB, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00002( player ); + player.updateQuest( getId(), SEQ_FINISH ); + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 3, NONE, 0, 0 ); - }); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 3, NONE, 0, 0 ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, 0x2c02, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00005( player ); - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, 0x2c02, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00005( player ); + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, INVIS_OTHER_PC, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - player.finishQuest( getId() ); - } - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, INVIS_OTHER_PC, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + } ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 6, 0, 0, 0 ); - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 6, 0, 0, 0 ); + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 7, 0, 0, 0 ); - } ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 7, 0, 0, 0 ); + } ); + } - void Scene00008( Entity::Player& player ) - { - player.playScene( getId(), 8, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 8, 0, 0, 0 ); - } ); - } + void Scene00008( Entity::Player& player ) + { + player.playScene( getId(), 8, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 8, 0, 0, 0 ); + } ); + } - void Scene00009( Entity::Player& player ) - { - player.playScene( getId(), 9, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 9, 0, 0, 0 ); - } ); - } + void Scene00009( Entity::Player& player ) + { + player.playScene( getId(), 9, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 9, 0, 0, 0 ); + } ); + } - void Scene00010( Entity::Player& player ) - { - player.playScene( getId(), 10, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 10, 0, 0, 0 ); - } ); - } + void Scene00010( Entity::Player& player ) + { + player.playScene( getId(), 10, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 10, 0, 0, 0 ); + } ); + } - void Scene00011( Entity::Player& player ) - { - player.playScene( getId(), 11, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 11, 0, 0, 0 ); - } ); - } + void Scene00011( Entity::Player& player ) + { + player.playScene( getId(), 11, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 11, 0, 0, 0 ); + } ); + } - void Scene00012( Entity::Player& player ) - { - player.playScene( getId(), 12, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 12, 0, 0, 0 ); - } ); - } + void Scene00012( Entity::Player& player ) + { + player.playScene( getId(), 12, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 12, 0, 0, 0 ); + } ); + } - void Scene00013( Entity::Player& player ) - { - player.playScene( getId(), 13, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 13, 0, 0, 0 ); - } ); - } + void Scene00013( Entity::Player& player ) + { + player.playScene( getId(), 13, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 13, 0, 0, 0 ); + } ); + } public: - ManWil001() : EventScript( 66130 ) - {} + ManWil001() : + EventScript( 66130 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( actor == ACTOR0 ) - { - Scene00000( player ); - } - else if( actor == ACTOR1 ) - { - Scene00004( player ); - } - } + if( actor == ACTOR0 ) + { + Scene00000( player ); + } + else if( actor == ACTOR1 ) + { + Scene00004( player ); + } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/ManWil002.cpp b/src/servers/Scripts/quest/ManWil002.cpp index c690f06b..a28f7f0a 100644 --- a/src/servers/Scripts/quest/ManWil002.cpp +++ b/src/servers/Scripts/quest/ManWil002.cpp @@ -8,228 +8,235 @@ // Start NPC: 1003988 // End NPC: 1001353 -class ManWil002 : public EventScript +class ManWil002 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestBitFlag8 - // GetQuestUI8AL - // GetQuestUI8BH - // GetQuestUI8BL - // GetQuestUI8CH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestBitFlag8 + // GetQuestUI8AL + // GetQuestUI8BH + // GetQuestUI8BL + // GetQuestUI8CH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardGil = 107; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardGil = 107; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1003988; - static constexpr auto Actor1 = 1002277; - static constexpr auto Actor2 = 1003908; - static constexpr auto Actor20 = 1001637; - static constexpr auto Actor3 = 1001353; - static constexpr auto Aetheryte0 = 9; - static constexpr auto BindActor0 = 6229228; - static constexpr auto Item0 = 2000386; - static constexpr auto LocAction1 = 605; - static constexpr auto LocAction2 = 1005; - static constexpr auto LocMarker01 = 4009142; - static constexpr auto LocMarker02 = 4009152; - static constexpr auto LocPosCam1 = 4105872; - static constexpr auto LocPosCam2 = 4105874; - static constexpr auto LocPosCam3 = 4009150; - static constexpr auto LocPosCam4 = 4143488; - static constexpr auto Poprange0 = 4110794; - static constexpr auto Reward0 = 1; - static constexpr auto Screenimage0 = 14; - static constexpr auto Seq0Actor0Lq = 50; - static constexpr auto Territorytype0 = 130; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1003988; + static constexpr auto Actor1 = 1002277; + static constexpr auto Actor2 = 1003908; + static constexpr auto Actor20 = 1001637; + static constexpr auto Actor3 = 1001353; + static constexpr auto Aetheryte0 = 9; + static constexpr auto BindActor0 = 6229228; + static constexpr auto Item0 = 2000386; + static constexpr auto LocAction1 = 605; + static constexpr auto LocAction2 = 1005; + static constexpr auto LocMarker01 = 4009142; + static constexpr auto LocMarker02 = 4009152; + static constexpr auto LocPosCam1 = 4105872; + static constexpr auto LocPosCam2 = 4105874; + static constexpr auto LocPosCam3 = 4009150; + static constexpr auto LocPosCam4 = 4143488; + static constexpr auto Poprange0 = 4110794; + static constexpr auto Reward0 = 1; + static constexpr auto Screenimage0 = 14; + static constexpr auto Seq0Actor0Lq = 50; + static constexpr auto Territorytype0 = 130; - public: - ManWil002() : EventScript( 66104 ) - {}; - ~ManWil002() - {}; +public: + ManWil002() : + EventScript( 66104 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~ManWil002() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1) - { - Scene00003( player ); - } - else if( actor == Actor2 ) - { - Scene00004(player); - } - else if( actor == Actor3 ) - { - Scene00008( player ); - } - else if( actor == Aetheryte0 ) - { - player.eventActionStart( 0x050002, 0x13, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); - player.registerAetheryte( 2 ); - player.learnAction( 1 ); - Scene00001( player ); - }, - nullptr, eventId ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00003( player ); + } + else if( actor == Actor2 ) + { + Scene00004( player ); + } + else if( actor == Actor3 ) + { + Scene00008( player ); + } + else if( actor == Aetheryte0 ) + { + player.eventActionStart( 0x050002, 0x13, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + player.sendQuestMessage( 0x050002, 0, 1, 0, 0 ); + player.registerAetheryte( 2 ); + player.learnAction( 1 ); + Scene00001( player ); + }, + nullptr, eventId ); + } + } - void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) - { - if( varIdx == 1 ) - { - player.sendQuestMessage( getId(), 1, 0, 0, 0 ); - } - else if( varIdx == 2 ) - { - player.sendQuestMessage( getId(), 2, 0, 0, 0 ); - } - else - { - player.sendQuestMessage( getId(), 0, 0, 0, 0 ); - } +private: - auto questId = getId(); + void checkQuestCompletion( Entity::Player& player, uint32_t varIdx ) + { + if( varIdx == 1 ) + { + player.sendQuestMessage( getId(), 1, 0, 0, 0 ); + } + else if( varIdx == 2 ) + { + player.sendQuestMessage( getId(), 2, 0, 0, 0 ); + } + else + { + player.sendQuestMessage( getId(), 0, 0, 0, 0 ); + } - auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); - auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); - auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); + auto questId = getId(); - if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) - { - player.updateQuest( questId, SeqFinish ); - } - } + auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId ); + auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId ); + auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId ); - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) // accept quest - { - Scene00050( player ); - } - } ); - } + if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 ) + { + player.updateQuest( questId, SeqFinish ); + } + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00002( player ); - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // accept quest + { + Scene00050( player ); + } + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8BL( getId(), 1 ); - checkQuestCompletion( player, 0 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00002( player ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8AL( getId(), 1 ); - checkQuestCompletion( player, 1 ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8BL( getId(), 1 ); + checkQuestCompletion( player, 0 ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00005( player ); - } - else return; - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8AL( getId(), 1 ); + checkQuestCompletion( player, 1 ); + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8CH( getId(), 0 ); - player.setQuestUI8BH( getId(), 1 ); - checkQuestCompletion( player, 2 ); - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00005( player ); + } + else + return; + } ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8CH( getId(), 0 ); + player.setQuestUI8BH( getId(), 1 ); + checkQuestCompletion( player, 2 ); + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00008( Entity::Player& player ) - { - player.playScene( getId(), 8, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00050( Entity::Player& player ) - { - player.playScene( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - // on quest accept - player.updateQuest( getId(), Seq1 ); - player.setQuestUI8CH( getId(), 1 ); // receive key item + void Scene00008( Entity::Player& player ) + { + player.playScene( getId(), 8, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } - // teleport to real ul'dah - player.forceZoneing( 130 ); - } ); - } + void Scene00050( Entity::Player& player ) + { + player.playScene( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + // on quest accept + player.updateQuest( getId(), Seq1 ); + player.setQuestUI8CH( getId(), 1 ); // receive key item + + // teleport to real ul'dah + player.forceZoneing( 130 ); + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst001.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst001.cpp index 261233d9..0d157863 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst001.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst001.cpp @@ -8,79 +8,83 @@ // Start NPC: 1000206 // End NPC: 1000233 -class SubFst001 : public EventScript +class SubFst001 : + public EventScript { private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_FINISH = 255; - static constexpr auto ACTOR0 = 1000206; - static constexpr auto ACTOR1 = 1000233; - static constexpr auto ITEM0 = 2000079; - static constexpr auto SEQ_0_ACTOR0 = 0; - static constexpr auto SEQ_1_ACTOR1 = 1; - static constexpr auto SEQ_1_ACTOR1_NPCTRADENO = 99; - static constexpr auto SEQ_1_ACTOR1_NPCTRADEOK = 100; + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_FINISH = 255; + static constexpr auto ACTOR0 = 1000206; + static constexpr auto ACTOR1 = 1000233; + static constexpr auto ITEM0 = 2000079; + static constexpr auto SEQ_0_ACTOR0 = 0; + static constexpr auto SEQ_1_ACTOR1 = 1; + static constexpr auto SEQ_1_ACTOR1_NPCTRADENO = 99; + static constexpr auto SEQ_1_ACTOR1_NPCTRADEOK = 100; - void Scene00000( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00000( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // accept quest { - if( result.param2 == 1 ) // accept quest - { - player.setQuestUI8AL( getId(), 1 ); - player.setQuestUI8BH( getId(), 1 ); - player.updateQuest( getId(), SEQ_FINISH ); - } - }; + player.setQuestUI8AL( getId(), 1 ); + player.setQuestUI8BH( getId(), 1 ); + player.updateQuest( getId(), SEQ_FINISH ); + } + }; - player.playScene( getId(), 0, NONE, callback ); - } + player.playScene( getId(), 0, NONE, callback ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, NONE ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, NONE ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, NONE ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, NONE ); + } - void Scene00100( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00100( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // accept quest { - if( result.param2 == 1 ) // accept quest - { - if( player.giveQuestRewards( getId(), 0 )) - player.finishQuest( getId()); - } - }; + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + }; - player.playScene( getId(), 100, NONE, callback ); - } + player.playScene( getId(), 100, NONE, callback ); + } public: - SubFst001() : EventScript( 65560 ) - {} + SubFst001() : + EventScript( 65560 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId )); + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( actor == ACTOR0 ) - { - if( !player.hasQuest( getId() ) ) - Scene00000( player ); - else - Scene00001( player ); - } else if( actor == ACTOR1 ) - { - if( !player.hasQuest( getId() ) ) - Scene00099( player ); - else - Scene00100( player ); - } - } + if( actor == ACTOR0 ) + { + if( !player.hasQuest( getId() ) ) + Scene00000( player ); + else + Scene00001( player ); + } + else if( actor == ACTOR1 ) + { + if( !player.hasQuest( getId() ) ) + Scene00099( player ); + else + Scene00100( player ); + } + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst002.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst002.cpp index 124cc4ad..ef05cc93 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst002.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst002.cpp @@ -8,72 +8,75 @@ // Start NPC: 1000263 // End NPC: 1000263 -class SubFst002 : public EventScript +class SubFst002 : + public EventScript { private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_1 = 1; - static constexpr auto SEQ_2 = 2; - static constexpr auto SEQ_FINISH = 255; - static constexpr auto ACTOR0 = 1000263; - static constexpr auto ENEMY0 = 37; - static constexpr auto SEQ_0_ACTOR0 = 0; - static constexpr auto SEQ_2_ACTOR0 = 1; + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_1 = 1; + static constexpr auto SEQ_2 = 2; + static constexpr auto SEQ_FINISH = 255; + static constexpr auto ACTOR0 = 1000263; + static constexpr auto ENEMY0 = 37; + static constexpr auto SEQ_0_ACTOR0 = 0; + static constexpr auto SEQ_2_ACTOR0 = 1; - void Scene00000( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00000( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // accept quest { - if( result.param2 == 1 ) // accept quest - { - player.updateQuest( getId(), SEQ_1 ); - } - }; + player.updateQuest( getId(), SEQ_1 ); + } + }; - player.playScene( getId(), 0, NONE, callback ); - } + player.playScene( getId(), 0, NONE, callback ); + } - void Scene00001( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00001( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // finish quest { - if( result.param2 == 1 ) // finish quest - { - if( player.giveQuestRewards( getId(), 0 ) ) - player.finishQuest( getId() ); - } - }; + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + }; - player.playScene( getId(), 1, NONE, callback ); - } + player.playScene( getId(), 1, NONE, callback ); + } public: - SubFst002() : EventScript( 65561 ) - {} + SubFst002() : + EventScript( 65561 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( actor == ACTOR0 && !player.hasQuest( getId() ) ) - Scene00000( player ); - else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_FINISH ) - Scene00001( player ); - } + if( actor == ACTOR0 && !player.hasQuest( getId() ) ) + Scene00000( player ); + else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_FINISH ) + Scene00001( player ); + } - void onNpcKill( uint32_t npcId, Entity::Player& player ) override - { - if( npcId != ENEMY0 ) - return; + void onNpcKill( uint32_t npcId, Entity::Player& player ) override + { + if( npcId != ENEMY0 ) + return; - auto currentKC = player.getQuestUI8AL( getId()) + 1; + auto currentKC = player.getQuestUI8AL( getId() ) + 1; - if( currentKC >= 6 ) - player.updateQuest( getId(), SEQ_FINISH ); - else - { - player.setQuestUI8AL( getId(), currentKC ); - player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); - } - } + if( currentKC >= 6 ) + player.updateQuest( getId(), SEQ_FINISH ); + else + { + player.setQuestUI8AL( getId(), currentKC ); + player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); + } + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst003.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst003.cpp index a8644952..69065634 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst003.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst003.cpp @@ -8,107 +8,113 @@ // Start NPC: 1000297 // End NPC: 1000315 -class SubFst003 : public EventScript +class SubFst003 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 118; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 118; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000297; - static constexpr auto Actor1 = 1000315; - static constexpr auto Item0 = 2000028; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq1Actor1Npctradeno = 99; - static constexpr auto Seq1Actor1Npctradeok = 100; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000297; + static constexpr auto Actor1 = 1000315; + static constexpr auto Item0 = 2000028; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq1Actor1Npctradeno = 99; + static constexpr auto Seq1Actor1Npctradeok = 100; - public: - SubFst003() : EventScript( 65562 ) - {}; - ~SubFst003() - {}; +public: + SubFst003() : + EventScript( 65562 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst003() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), 1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), 1 ); + } + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 99, 0, 0, 0 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.setQuestUI8BH( getId(), 0 ); - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 99, 0, 0, 0 ); + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.setQuestUI8BH( getId(), 0 ); + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst004.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst004.cpp index 65361e6c..3ebb600d 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst004.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst004.cpp @@ -8,124 +8,130 @@ // Start NPC: 1000194 // End NPC: 1000789 -class SubFst004 : public EventScript +class SubFst004 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardItem = 5594; - static constexpr auto RewardItemCount = 10 ; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardItem = 5594; + static constexpr auto RewardItemCount = 10; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000194; - static constexpr auto Actor1 = 1000686; - static constexpr auto Actor2 = 1000789; - static constexpr auto Item0 = 2000024; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq2Actor2 = 2; - static constexpr auto Seq2Actor2Npctradeno = 99; - static constexpr auto Seq2Actor2Npctradeok = 100; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000194; + static constexpr auto Actor1 = 1000686; + static constexpr auto Actor2 = 1000789; + static constexpr auto Item0 = 2000024; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq2Actor2 = 2; + static constexpr auto Seq2Actor2Npctradeno = 99; + static constexpr auto Seq2Actor2Npctradeok = 100; - public: - SubFst004() : EventScript( 65563 ) - {}; - ~SubFst004() - {}; +public: + SubFst004() : + EventScript( 65563 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst004() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - else if( actor == Actor2 ) - { - Scene00002( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + else if( actor == Actor2 ) + { + Scene00002( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.sendQuestMessage( getId(), 0, 1, 21002, 0 ); - player.setQuestUI8BH( getId(), 1 ); - player.updateQuest( getId(), SeqFinish ); - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.sendQuestMessage( getId(), 0, 1, 21002, 0 ); + player.setQuestUI8BH( getId(), 1 ); + player.updateQuest( getId(), SeqFinish ); + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 99, 0, 0, 0 ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if(player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 99, 0, 0, 0 ); + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst008.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst008.cpp index 2e44f259..42c8940b 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst008.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst008.cpp @@ -8,124 +8,130 @@ // Start NPC: 1000372 // End NPC: 1000629 -class SubFst008 : public EventScript +class SubFst008 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - uint32_t RewardItemOptional[3] = { 2999, 3010, 5824 }; - uint32_t RewardItemOptionalCount[3] = { 1, 1, 1 }; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + uint32_t RewardItemOptional[3] = { 2999, 3010, 5824 }; + uint32_t RewardItemOptionalCount[3] = { 1, 1, 1 }; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000372; - static constexpr auto Actor1 = 1000311; - static constexpr auto Actor2 = 1000629; - static constexpr auto Item0 = 2000029; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq2Actor2 = 2; - static constexpr auto Seq2Actor2Npctradeno = 99; - static constexpr auto Seq2Actor2Npctradeok = 100; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000372; + static constexpr auto Actor1 = 1000311; + static constexpr auto Actor2 = 1000629; + static constexpr auto Item0 = 2000029; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq2Actor2 = 2; + static constexpr auto Seq2Actor2Npctradeno = 99; + static constexpr auto Seq2Actor2Npctradeok = 100; - public: - SubFst008() : EventScript( 65568 ) - {}; - ~SubFst008() - {}; +public: + SubFst008() : + EventScript( 65568 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst008() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - else if( actor == Actor2 ) - { - Scene00002( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + else if( actor == Actor2 ) + { + Scene00002( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.setQuestUI8BH( getId(), 1 ); - player.updateQuest( getId(), SeqFinish ); - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if ( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.setQuestUI8BH( getId(), 1 ); + player.updateQuest( getId(), SeqFinish ); + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 99, 0, 0, 0 ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene(getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if ( player.giveQuestRewards( getId(), 0 ) ) - { - player.setQuestUI8BH( getId(), 0 ); - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 99, 0, 0, 0 ); + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.setQuestUI8BH( getId(), 0 ); + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst009.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst009.cpp index ffacab7c..9a971596 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst009.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst009.cpp @@ -8,106 +8,112 @@ // Start NPC: 1000370 // End NPC: 1000408 -class SubFst009 : public EventScript +class SubFst009 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardGil = 127; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardGil = 127; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000370; - static constexpr auto Actor1 = 1000408; - static constexpr auto Item0 = 2000080; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq1Actor1Npctradeno = 99; - static constexpr auto Seq1Actor1Npctradeok = 100; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000370; + static constexpr auto Actor1 = 1000408; + static constexpr auto Item0 = 2000080; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq1Actor1Npctradeno = 99; + static constexpr auto Seq1Actor1Npctradeok = 100; - public: - SubFst009() : EventScript( 65570 ) - {}; - ~SubFst009() - {}; +public: + SubFst009() : + EventScript( 65570 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst009() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), 1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), 1 ); + } + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 99, 0 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 99, 0 ); + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst010.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst010.cpp index 104c8d2c..0503a73f 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst010.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst010.cpp @@ -8,52 +8,55 @@ // Start NPC: 1000146 // End NPC: 1000195 -class SubFst010 : public EventScript +class SubFst010 : + public EventScript { private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_FINISH = 255; - static constexpr auto ACTOR0 = 1000146; - static constexpr auto ACTOR1 = 1000195; - static constexpr auto SEQ_0_ACTOR0 = 0; - static constexpr auto SEQ_1_ACTOR1 = 1; + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_FINISH = 255; + static constexpr auto ACTOR0 = 1000146; + static constexpr auto ACTOR1 = 1000195; + static constexpr auto SEQ_0_ACTOR0 = 0; + static constexpr auto SEQ_1_ACTOR1 = 1; - void Scene00000( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00000( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // accept quest + player.updateQuest( getId(), SEQ_FINISH ); + }; + + player.playScene( getId(), 0, NONE, callback ); + } + + void Scene00001( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // finish quest { - if( result.param2 == 1 ) // accept quest - player.updateQuest( getId(), SEQ_FINISH ); - }; + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + }; - player.playScene( getId(), 0, NONE, callback ); - } - - void Scene00001( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) // finish quest - { - if( player.giveQuestRewards( getId(), 0 ) ) - player.finishQuest( getId() ); - } - }; - - player.playScene( getId(), 1, NONE, callback ); - } + player.playScene( getId(), 1, NONE, callback ); + } public: - SubFst010() : EventScript( 65537 ) - {} + SubFst010() : + EventScript( 65537 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( actor == ACTOR0 ) - Scene00000( player ); - else if( actor == ACTOR1 ) - Scene00001( player ); - } + if( actor == ACTOR0 ) + Scene00000( player ); + else if( actor == ACTOR1 ) + Scene00001( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst011.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst011.cpp index 868b8822..07b2310b 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst011.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst011.cpp @@ -10,90 +10,96 @@ //NEED TEST KILLCREDIT -class SubFst011 : public EventScript +class SubFst011 : + public EventScript { private: - // GetQuestUI8AL + // GetQuestUI8AL - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - uint32_t RewardItemOptional[3] = { 2653, 2655, 5823 }; - uint32_t RewardItemCount[3] = { 1, 1, 3 }; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + uint32_t RewardItemOptional[3] = { 2653, 2655, 5823 }; + uint32_t RewardItemCount[3] = { 1, 1, 3 }; - static constexpr auto Actor0 = 1000195; - static constexpr auto Enemy0 = 47; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq2Actor0 = 1; + static constexpr auto Actor0 = 1000195; + static constexpr auto Enemy0 = 47; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq2Actor0 = 1; public: - SubFst011() : EventScript( 65573 ) - {}; - ~SubFst011() - {}; + SubFst011() : + EventScript( 65573 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst011() + { + }; - if( actor == Actor0 && !player.hasQuest( getId() ) ) - { - Scene00000( player ); - } - else if( actor == Actor0 && player.getQuestSeq( getId() ) == SeqFinish ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - void onMobKill( Entity::Player& player, uint64_t npcId) - { - if( npcId != Enemy0 ) - return; + if( actor == Actor0 && !player.hasQuest( getId() ) ) + { + Scene00000( player ); + } + else if( actor == Actor0 && player.getQuestSeq( getId() ) == SeqFinish ) + { + Scene00001( player ); + } + } - auto currentKC = player.getQuestUI8AL( getId() ) + 1; + void onMobKill( Entity::Player& player, uint64_t npcId ) + { + if( npcId != Enemy0 ) + return; - if( currentKC >= 6 ) - player.updateQuest( getId(), SeqFinish ); - else - { - player.setQuestUI8AL( getId(), currentKC ); - player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); - } - } + auto currentKC = player.getQuestUI8AL( getId() ) + 1; + + if( currentKC >= 6 ) + player.updateQuest( getId(), SeqFinish ); + else + { + player.setQuestUI8AL( getId(), currentKC ); + player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); + } + } private: - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if (player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - }; + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + }; }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst013.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst013.cpp index c6f36790..0c52bc5c 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst013.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst013.cpp @@ -8,180 +8,183 @@ // Start NPC: 1000162 // End NPC: 1000162 -class SubFst013 : public EventScript +class SubFst013 : + public EventScript { private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_1 = 1; - static constexpr auto SEQ_2 = 2; - static constexpr auto SEQ_3 = 3; - static constexpr auto SEQ_4 = 4; - static constexpr auto SEQ_5 = 5; - static constexpr auto SEQ_FINISH = 255; + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_1 = 1; + static constexpr auto SEQ_2 = 2; + static constexpr auto SEQ_3 = 3; + static constexpr auto SEQ_4 = 4; + static constexpr auto SEQ_5 = 5; + static constexpr auto SEQ_FINISH = 255; - // Entities found in the script data of the quest - static constexpr auto ACTOR0 = 1000162; - static constexpr auto ACTOR1 = 1000161; - static constexpr auto FIRST_QUEST = 65575; - static constexpr auto SEQ_0_ACTOR0 = 0; - static constexpr auto SEQ_1_ACTOR1 = 1; - static constexpr auto SEQ_1_ACTOR1_EMOTENO = 99; - static constexpr auto SEQ_1_ACTOR1_EMOTEOK = 100; - static constexpr auto SEQ_2_ACTOR0 = 2; - static constexpr auto SEQ_3_ACTOR1 = 3; - static constexpr auto SEQ_3_ACTOR1_EMOTENO = 97; - static constexpr auto SEQ_3_ACTOR1_EMOTEOK = 98; - static constexpr auto SEQ_4_ACTOR0 = 4; - static constexpr auto SEQ_5_ACTOR1 = 5; - static constexpr auto SEQ_5_ACTOR1_EMOTENO = 95; - static constexpr auto SEQ_5_ACTOR1_EMOTEOK = 96; - static constexpr auto SEQ_6_ACTOR0 = 6; + // Entities found in the script data of the quest + static constexpr auto ACTOR0 = 1000162; + static constexpr auto ACTOR1 = 1000161; + static constexpr auto FIRST_QUEST = 65575; + static constexpr auto SEQ_0_ACTOR0 = 0; + static constexpr auto SEQ_1_ACTOR1 = 1; + static constexpr auto SEQ_1_ACTOR1_EMOTENO = 99; + static constexpr auto SEQ_1_ACTOR1_EMOTEOK = 100; + static constexpr auto SEQ_2_ACTOR0 = 2; + static constexpr auto SEQ_3_ACTOR1 = 3; + static constexpr auto SEQ_3_ACTOR1_EMOTENO = 97; + static constexpr auto SEQ_3_ACTOR1_EMOTEOK = 98; + static constexpr auto SEQ_4_ACTOR0 = 4; + static constexpr auto SEQ_5_ACTOR1 = 5; + static constexpr auto SEQ_5_ACTOR1_EMOTENO = 95; + static constexpr auto SEQ_5_ACTOR1_EMOTEOK = 96; + static constexpr auto SEQ_6_ACTOR0 = 6; - void Scene00000( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00000( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SEQ_1 ); - } - }; + player.updateQuest( getId(), SEQ_1 ); + } + }; - player.playScene( getId(), 0, NONE, callback ); - } + player.playScene( getId(), 0, NONE, callback ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 2, NONE ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 2, NONE ); + } - void Scene00002( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) + void Scene00002( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SEQ_3 ); + }; + + player.playScene( getId(), 2, NONE, callback ); + } + + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, NONE ); + } + + void Scene00004( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SEQ_5 ); + }; + + player.playScene( getId(), 4, NONE, callback ); + } + + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, NONE ); + } + + void Scene00006( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) // finish quest { - player.updateQuest( getId(), SEQ_3 ); - }; + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + }; - player.playScene( getId(), 2, NONE, callback ); - } + player.playScene( getId(), 6, NONE, callback ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, NONE ); - } + void Scene00095( Entity::Player& player ) + { + player.playScene( getId(), 95, NONE ); + } - void Scene00004( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), SEQ_5 ); - }; + void Scene00096( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SEQ_FINISH ); + player.sendQuestMessage( getId(), 4, 2, 0, 0 ); + }; - player.playScene( getId(), 4, NONE, callback ); - } + player.playScene( getId(), 96, NONE, callback ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, NONE ); - } + void Scene00097( Entity::Player& player ) + { + player.playScene( getId(), 97, NONE ); + } - void Scene00006( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) // finish quest - { - if( player.giveQuestRewards( getId(), 0 )) - player.finishQuest( getId()); - } - }; + void Scene00098( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SEQ_4 ); + player.sendQuestMessage( getId(), 2, 2, 0, 0 ); + }; - player.playScene( getId(), 6, NONE, callback ); - } + player.playScene( getId(), 98, NONE, callback ); + } - void Scene00095( Entity::Player& player ) - { - player.playScene( getId(), 95, NONE ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, NONE ); + } - void Scene00096( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), SEQ_FINISH ); - player.sendQuestMessage( getId(), 4, 2, 0, 0 ); - }; + void Scene00100( Entity::Player& player ) + { + auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SEQ_2 ); + player.sendQuestMessage( getId(), 0, 2, 0, 0 ); + }; - player.playScene( getId(), 96, NONE, callback ); - } - - void Scene00097( Entity::Player& player ) - { - player.playScene( getId(), 97, NONE ); - } - - void Scene00098( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), SEQ_4 ); - player.sendQuestMessage( getId(), 2, 2, 0, 0 ); - }; - - player.playScene( getId(), 98, NONE, callback ); - } - - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, NONE ); - } - - void Scene00100( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), SEQ_2 ); - player.sendQuestMessage( getId(), 0, 2, 0, 0 ); - }; - - player.playScene( getId(), 100, NONE, callback ); - } + player.playScene( getId(), 100, NONE, callback ); + } public: - SubFst013() : EventScript( 65576 ) - {} + SubFst013() : + EventScript( 65576 ) + { + } - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( !player.hasQuest( getId())) - { - Scene00000( player ); - return; - } + if( !player.hasQuest( getId() ) ) + { + Scene00000( player ); + return; + } - if( actor == ACTOR1 ) // talking to Aunillie while on quest - Scene00003( player ); - else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_2 ) - Scene00002( player ); - else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_4 ) - Scene00004( player ); - else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_FINISH ) - Scene00006( player ); - } + if( actor == ACTOR1 ) // talking to Aunillie while on quest + Scene00003( player ); + else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_2 ) + Scene00002( player ); + else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_4 ) + Scene00004( player ); + else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_FINISH ) + Scene00006( player ); + } - void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId )); + void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - if( actor == ACTOR1 && emoteId == 5 && player.getQuestSeq( getId() ) == SEQ_1 ) - Scene00100( player ); - else if( actor == ACTOR1 && emoteId == 18 && player.getQuestSeq( getId() ) == SEQ_3 ) - Scene00098( player ); - else if( actor == ACTOR1 && emoteId == 11 && player.getQuestSeq( getId() ) == SEQ_5 ) - Scene00096( player ); - } + if( actor == ACTOR1 && emoteId == 5 && player.getQuestSeq( getId() ) == SEQ_1 ) + Scene00100( player ); + else if( actor == ACTOR1 && emoteId == 18 && player.getQuestSeq( getId() ) == SEQ_3 ) + Scene00098( player ); + else if( actor == ACTOR1 && emoteId == 11 && player.getQuestSeq( getId() ) == SEQ_5 ) + Scene00096( player ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst014.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst014.cpp index f3c39a92..7a86bdb8 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst014.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst014.cpp @@ -8,341 +8,347 @@ // Start NPC: 1000300 // End NPC: 1000300 -class SubFst014 : public EventScript +class SubFst014 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // setQuestBitFlag8 - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // setQuestBitFlag8 + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 111; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 111; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000300; - static constexpr auto Eobject0 = 2000026; - static constexpr auto Eobject1 = 2000027; - static constexpr auto Eobject2 = 2000028; - static constexpr auto Eobject3 = 2000029; - static constexpr auto Eobject4 = 2000030; - static constexpr auto Eobject5 = 2000031; - static constexpr auto EventActionSearch = 1; - static constexpr auto Item0 = 2000084; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000300; + static constexpr auto Eobject0 = 2000026; + static constexpr auto Eobject1 = 2000027; + static constexpr auto Eobject2 = 2000028; + static constexpr auto Eobject3 = 2000029; + static constexpr auto Eobject4 = 2000030; + static constexpr auto Eobject5 = 2000031; + static constexpr auto EventActionSearch = 1; + static constexpr auto Item0 = 2000084; - public: - SubFst014() : EventScript( 65577 ) - {}; - ~SubFst014() - {}; +public: + SubFst014() : + EventScript( 65577 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst014() + { + }; - if( actor == Actor0 && !player.hasQuest( getId() ) ) - { - Scene00000( player ); - } - else if ( actor == Actor0 ) - { - Scene00007( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + + if( actor == Actor0 && !player.hasQuest( getId() ) ) + { + Scene00000( player ); + } + else if( actor == Actor0 ) + { + Scene00007( player ); + } //EOBJECTS CHECK - else if( actor == Eobject0 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00001( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject1 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00002( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject2 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00003( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject3 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00004( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject4 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00005( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject5 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00006( player ); - }, - nullptr, eventId ); - } - } + else if( actor == Eobject0 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00001( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject1 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00002( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject2 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00003( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject3 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00004( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject4 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00005( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject5 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00006( player ); + }, + nullptr, eventId ); + } + } - private: +private: - void checkQuestCompletion( Entity::Player& player ) - { - auto currentCC = player.getQuestUI8AL( getId() ); + void checkQuestCompletion( Entity::Player& player ) + { + auto currentCC = player.getQuestUI8AL( getId() ); - player.sendQuestMessage( getId(), 0, 2, currentCC + 1, 6 ); + player.sendQuestMessage( getId(), 0, 2, currentCC + 1, 6 ); - if( currentCC + 1 >= 6 ) - { - player.updateQuest( getId(), SeqFinish ); - } - else - { - player.setQuestUI8AL( getId(), currentCC + 1 ); - } - } + if( currentCC + 1 >= 6 ) + { + player.updateQuest( getId(), SeqFinish ); + } + else + { + player.setQuestUI8AL( getId(), currentCC + 1 ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - player.updateQuest( getId(), Seq1 ); - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + player.updateQuest( getId(), Seq1 ); + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00100( player ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00100( player ); + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00098( player ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00098( player ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00096( player ); - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00096( player ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00094( player ); - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00094( player ); + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00092( player ); - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00092( player ); + } ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00090( player ); - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00090( player ); + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00088( player ); - } - else - { - Scene00087( player ); - } - } ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00088( player ); + } + else + { + Scene00087( player ); + } + } ); + } - void Scene00087( Entity::Player& player ) - { - player.playScene( getId(), 87, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 87, 0, 0, 0 ); - } ); - } + void Scene00087( Entity::Player& player ) + { + player.playScene( getId(), 87, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 87, 0, 0, 0 ); + } ); + } - void Scene00088( Entity::Player& player ) - { - player.playScene( getId(), 88, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0) ) - { - player.setQuestUI8AL( getId(), 0 ); - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00088( Entity::Player& player ) + { + player.playScene( getId(), 88, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.setQuestUI8AL( getId(), 0 ); + player.finishQuest( getId() ); + } + } + } ); + } - void Scene00089( Entity::Player& player ) - { - player.playScene( getId(), 89, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00089( Entity::Player& player ) + { + player.playScene( getId(), 89, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00090( Entity::Player& player ) - { - player.playScene( getId(), 90, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 2, true ); - } ); - } + void Scene00090( Entity::Player& player ) + { + player.playScene( getId(), 90, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 2, true ); + } ); + } - void Scene00091( Entity::Player& player ) - { - player.playScene( getId(), 91, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00091( Entity::Player& player ) + { + player.playScene( getId(), 91, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00092( Entity::Player& player ) - { - player.playScene( getId(), 92, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 3, true ); - } ); - } + void Scene00092( Entity::Player& player ) + { + player.playScene( getId(), 92, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 3, true ); + } ); + } - void Scene00093( Entity::Player& player ) - { - player.playScene( getId(), 93, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00093( Entity::Player& player ) + { + player.playScene( getId(), 93, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00094( Entity::Player& player ) - { - player.playScene( getId(), 94, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 4, true ); - } ); - } + void Scene00094( Entity::Player& player ) + { + player.playScene( getId(), 94, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 4, true ); + } ); + } - void Scene00095( Entity::Player& player ) - { - player.playScene( getId(), 95, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00095( Entity::Player& player ) + { + player.playScene( getId(), 95, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00096( Entity::Player& player ) - { - player.playScene( getId(), 96, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 5, true ); - } ); - } + void Scene00096( Entity::Player& player ) + { + player.playScene( getId(), 96, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 5, true ); + } ); + } - void Scene00097( Entity::Player& player ) - { - player.playScene( getId(), 97, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00097( Entity::Player& player ) + { + player.playScene( getId(), 97, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00098( Entity::Player& player ) - { - player.playScene( getId(), 98, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 6, true ); - } ); - } + void Scene00098( Entity::Player& player ) + { + player.playScene( getId(), 98, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 6, true ); + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 7, true ); - } ); - } + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 7, true ); + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst015.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst015.cpp index ce48e3f8..515895c2 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst015.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst015.cpp @@ -8,315 +8,321 @@ // Start NPC: 1000286 // End NPC: 1000286 -class SubFst015 : public EventScript +class SubFst015 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestBitFlag8 - // GetQuestUI8AL +private: + // Basic quest information + // Quest vars / flags used + // GetQuestBitFlag8 + // GetQuestUI8AL - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 110; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 110; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000286; - static constexpr auto Eobject0 = 2000020; - static constexpr auto Eobject1 = 2000021; - static constexpr auto Eobject2 = 2000022; - static constexpr auto Eobject3 = 2000023; - static constexpr auto Eobject4 = 2000024; - static constexpr auto Eobject5 = 2000025; - static constexpr auto EventActionSearch = 1; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000286; + static constexpr auto Eobject0 = 2000020; + static constexpr auto Eobject1 = 2000021; + static constexpr auto Eobject2 = 2000022; + static constexpr auto Eobject3 = 2000023; + static constexpr auto Eobject4 = 2000024; + static constexpr auto Eobject5 = 2000025; + static constexpr auto EventActionSearch = 1; - public: - SubFst015() : EventScript( 65578 ) - {}; - ~SubFst015() - {}; +public: + SubFst015() : + EventScript( 65578 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst015() + { + }; - if( actor == Actor0 && !player.hasQuest( getId() ) ) - { - Scene00000( player ); - } - else if( actor == Actor0 ) - { - Scene00007( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + + if( actor == Actor0 && !player.hasQuest( getId() ) ) + { + Scene00000( player ); + } + else if( actor == Actor0 ) + { + Scene00007( player ); + } //EOBJECTS CHECK - else if( actor == Eobject0 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00001( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject1 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00002( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject2 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00003( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject3 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00004( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject4 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00005( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject5 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00006( player ); - }, - nullptr, eventId ); - } - } + else if( actor == Eobject0 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00001( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject1 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00002( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject2 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00003( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject3 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00004( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject4 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00005( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject5 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00006( player ); + }, + nullptr, eventId ); + } + } - private: +private: - void checkQuestCompletion( Entity::Player& player ) - { - auto currentCC = player.getQuestUI8AL( getId() ); + void checkQuestCompletion( Entity::Player& player ) + { + auto currentCC = player.getQuestUI8AL( getId() ); - player.sendQuestMessage( getId(), 0, 2, currentCC + 1, 6 ); + player.sendQuestMessage( getId(), 0, 2, currentCC + 1, 6 ); - if( currentCC + 1 >= 6 ) - { - player.updateQuest( getId(), SeqFinish ); - } - else - { - player.setQuestUI8AL( getId(), currentCC + 1 ); - } - } + if( currentCC + 1 >= 6 ) + { + player.updateQuest( getId(), SeqFinish ); + } + else + { + player.setQuestUI8AL( getId(), currentCC + 1 ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00100( player ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00100( player ); + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00098( player ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00098( player ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00096( player ); - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00096( player ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00094( player ); - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00094( player ); + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00092( player ); - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00092( player ); + } ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00090( player ); - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00090( player ); + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if (player.giveQuestRewards( getId(), 0) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } - void Scene00089( Entity::Player& player ) - { - player.playScene( getId(), 89, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00089( Entity::Player& player ) + { + player.playScene( getId(), 89, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00090( Entity::Player& player ) - { - player.playScene( getId(), 90, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 2, true ); - } ); - } + void Scene00090( Entity::Player& player ) + { + player.playScene( getId(), 90, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 2, true ); + } ); + } - void Scene00091( Entity::Player& player ) - { - player.playScene( getId(), 91, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00091( Entity::Player& player ) + { + player.playScene( getId(), 91, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00092( Entity::Player& player ) - { - player.playScene( getId(), 92, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 3, true ); - } ); - } + void Scene00092( Entity::Player& player ) + { + player.playScene( getId(), 92, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 3, true ); + } ); + } - void Scene00093( Entity::Player& player ) - { - player.playScene( getId(), 93, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00093( Entity::Player& player ) + { + player.playScene( getId(), 93, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00094( Entity::Player& player ) - { - player.playScene( getId(), 94, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 4, true ); - } ); - } + void Scene00094( Entity::Player& player ) + { + player.playScene( getId(), 94, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 4, true ); + } ); + } - void Scene00095( Entity::Player& player ) - { - player.playScene( getId(), 95, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00095( Entity::Player& player ) + { + player.playScene( getId(), 95, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00096( Entity::Player& player ) - { - player.playScene( getId(), 96, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 5, true ); - } ); - } + void Scene00096( Entity::Player& player ) + { + player.playScene( getId(), 96, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 5, true ); + } ); + } - void Scene00097( Entity::Player& player ) - { - player.playScene( getId(), 97, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00097( Entity::Player& player ) + { + player.playScene( getId(), 97, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00098( Entity::Player& player ) - { - player.playScene( getId(), 98, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 6, true ); - } ); - } + void Scene00098( Entity::Player& player ) + { + player.playScene( getId(), 98, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 6, true ); + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 7, true ); - } ); - } + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 7, true ); + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst019.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst019.cpp index 8fd91a5d..13b6a6ff 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst019.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst019.cpp @@ -8,77 +8,83 @@ // Start NPC: 1000788 // End NPC: 1000429 -class SubFst019 : public EventScript +class SubFst019 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardItem = 4551; - static constexpr auto RewardItemCount = 5; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardItem = 4551; + static constexpr auto RewardItemCount = 5; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000788; - static constexpr auto Actor1 = 1000429; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000788; + static constexpr auto Actor1 = 1000429; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; - public: - SubFst019() : EventScript( 65585 ) - {}; - ~SubFst019() - {}; +public: + SubFst019() : + EventScript( 65585 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst019() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + } + } ); + } + + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst026.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst026.cpp index 462910db..06993186 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst026.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst026.cpp @@ -10,93 +10,99 @@ //NEED TEST KILLCREDIT -class SubFst026 : public EventScript +class SubFst026 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardGil = 135; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardGil = 135; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000629; - static constexpr auto Enemy0 = 9; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq2Actor0 = 1; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000629; + static constexpr auto Enemy0 = 9; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq2Actor0 = 1; - public: - SubFst026() : EventScript( 65706 ) - {}; - ~SubFst026() - {}; +public: + SubFst026() : + EventScript( 65706 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst026() + { + }; - if( actor == Actor0 && !player.hasQuest( getId() ) ) - { - Scene00000( player ); - } - else if( actor == Actor0 && player.getQuestSeq( getId() ) == SeqFinish ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - void onMobKill( Entity::Player& player, uint64_t npcId ) - { - if(npcId != Enemy0) - return; + if( actor == Actor0 && !player.hasQuest( getId() ) ) + { + Scene00000( player ); + } + else if( actor == Actor0 && player.getQuestSeq( getId() ) == SeqFinish ) + { + Scene00001( player ); + } + } - auto currentKC = player.getQuestUI8AL( getId() ) + 1; + void onMobKill( Entity::Player& player, uint64_t npcId ) + { + if( npcId != Enemy0 ) + return; - if( currentKC >= 6 ) - player.updateQuest( getId(), SeqFinish ); - else - { - player.setQuestUI8AL( getId(), currentKC ); - player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); - } - } + auto currentKC = player.getQuestUI8AL( getId() ) + 1; - private: + if( currentKC >= 6 ) + player.updateQuest( getId(), SeqFinish ); + else + { + player.setQuestUI8AL( getId(), currentKC ); + player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if ( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } + + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst029.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst029.cpp index 5b99f3b1..b81f82ee 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst029.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst029.cpp @@ -8,102 +8,108 @@ // Start NPC: 1000430 // End NPC: 1000430 -class SubFst029 : public EventScript +class SubFst029 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AH - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardGil = 146; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardGil = 146; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000430; - static constexpr auto Ritem0 = 4552; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor0 = 1; - static constexpr auto Seq1Actor0Npctradeno = 99; - static constexpr auto Seq1Actor0Npctradeok = 100; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000430; + static constexpr auto Ritem0 = 4552; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor0 = 1; + static constexpr auto Seq1Actor0Npctradeno = 99; + static constexpr auto Seq1Actor0Npctradeok = 100; - public: - SubFst029() : EventScript( 65708 ) - {}; - ~SubFst029() - {}; +public: + SubFst029() : + EventScript( 65708 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst029() + { + }; - //NOT SAFE - CRASH + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - /*if( actor == SubFst029::Actor0 && !player.hasQuest( getId() ) ) - { - Scene00000( player ); - } - if( actor == SubFst029::Actor0 && player.getQuestSeq ( getId() ) == 255 ) - { - Scene00001( player ); - }*/ - } + //NOT SAFE - CRASH - private: + /*if( actor == SubFst029::Actor0 && !player.hasQuest( getId() ) ) + { + Scene00000( player ); + } + if( actor == SubFst029::Actor0 && player.getQuestSeq ( getId() ) == 255 ) + { + Scene00001( player ); + }*/ + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + } + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 99, 0, 0, 0 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 99, 0, 0, 0 ); + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst030.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst030.cpp index 1625df35..32464e95 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst030.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst030.cpp @@ -9,183 +9,189 @@ // Start NPC: 1000632 // End NPC: 1000632 -class SubFst030 : public EventScript +class SubFst030 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - Seq2 = 2, - Seq3 = 3, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + Seq2 = 2, + Seq3 = 3, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardItem = 4551; - static constexpr auto RewardItemCount = 10; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardItem = 4551; + static constexpr auto RewardItemCount = 10; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000632; - static constexpr auto Actor1 = 1000784; - static constexpr auto Actor2 = 1000764; - static constexpr auto Eobject0 = 2000146; - static constexpr auto EventActionGatherShort = 6; - static constexpr auto Item0 = 2000140; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq2Eobject0 = 2; - static constexpr auto Seq2Eobject0Eventactionno = 99; - static constexpr auto Seq2Eobject0Eventactionok = 100; - static constexpr auto Seq3Actor2 = 3; - static constexpr auto Seq3Actor2Npctradeno = 97; - static constexpr auto Seq3Actor2Npctradeok = 98; - static constexpr auto Seq4Actor0 = 4; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000632; + static constexpr auto Actor1 = 1000784; + static constexpr auto Actor2 = 1000764; + static constexpr auto Eobject0 = 2000146; + static constexpr auto EventActionGatherShort = 6; + static constexpr auto Item0 = 2000140; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq2Eobject0 = 2; + static constexpr auto Seq2Eobject0Eventactionno = 99; + static constexpr auto Seq2Eobject0Eventactionok = 100; + static constexpr auto Seq3Actor2 = 3; + static constexpr auto Seq3Actor2Npctradeno = 97; + static constexpr auto Seq3Actor2Npctradeok = 98; + static constexpr auto Seq4Actor0 = 4; - public: - SubFst030() : EventScript( 65709 ) - {}; - ~SubFst030() - {}; +public: + SubFst030() : + EventScript( 65709 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst030() + { + }; - if( actor == Actor0 && !player.hasQuest( getId() ) ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - else if( actor == Actor2 ) - { - Scene00003( player ); - } - else if( actor == Actor0 ) - { - Scene00004( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + + if( actor == Actor0 && !player.hasQuest( getId() ) ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + else if( actor == Actor2 ) + { + Scene00003( player ); + } + else if( actor == Actor0 ) + { + Scene00004( player ); + } // EOBJECT - else if( actor == Eobject0 ) - { - player.eventActionStart( getId(), 0x06, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00002( player ); - }, - nullptr, eventId ); - } - } + else if( actor == Eobject0 ) + { + player.eventActionStart( getId(), 0x06, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00002( player ); + }, + nullptr, eventId ); + } + } - private: +private: - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), Seq2 ); - player.sendQuestMessage( getId(), 0, 2, 0, 0 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), Seq2 ); + player.sendQuestMessage( getId(), 0, 2, 0, 0 ); + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene(getId(), 2, HIDE_HOTBAR, - [&](Entity::Player& player, const Event::SceneResult& result) - { - Scene00100( player ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00100( player ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene(getId(), 3, HIDE_HOTBAR, - [&](Entity::Player& player, const Event::SceneResult& result) - { - if( result.param2 == 1 ) - { - Scene00098( player ); - } - else - Scene00097( player ); - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00098( player ); + } + else + Scene00097( player ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene(getId(), 4, HIDE_HOTBAR, - [&](Entity::Player& player, const Event::SceneResult& result) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } - void Scene00097( Entity::Player& player ) - { - player.playScene( getId(), 97, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 97, 0, 0, 0 ); - } ); - } + void Scene00097( Entity::Player& player ) + { + player.playScene( getId(), 97, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 97, 0, 0, 0 ); + } ); + } - void Scene00098( Entity::Player& player ) - { - player.playScene( getId(), 98, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), SeqFinish ); - player.sendQuestMessage( getId(), 2, 2, 0, 0 ); - } ); - } + void Scene00098( Entity::Player& player ) + { + player.playScene( getId(), 98, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SeqFinish ); + player.sendQuestMessage( getId(), 2, 2, 0, 0 ); + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 99, 0, 0, 0 ); - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 99, 0, 0, 0 ); + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), 3 ); - player.sendQuestMessage( getId(), 1, 2, 0, 0 ); - player.setQuestUI8FL( getId(), 1 ); - player.setQuestUI8BH( getId(), 1 ); - } ); - } + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), 3 ); + player.sendQuestMessage( getId(), 1, 2, 0, 0 ); + player.setQuestUI8FL( getId(), 1 ); + player.setQuestUI8BH( getId(), 1 ); + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/gridania/SubFst041.cpp b/src/servers/Scripts/quest/subquest/gridania/SubFst041.cpp index bdba0172..00fea0e4 100644 --- a/src/servers/Scripts/quest/subquest/gridania/SubFst041.cpp +++ b/src/servers/Scripts/quest/subquest/gridania/SubFst041.cpp @@ -10,125 +10,131 @@ //NEED TEST KILLCREDIT -class SubFst041 : public EventScript +class SubFst041 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - uint32_t RewardItemOptional[3] = { 4657, 4658, 5823 }; - uint32_t RewardItemOptionalCount[3] = { 3, 3, 3 }; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + uint32_t RewardItemOptional[3] = { 4657, 4658, 5823 }; + uint32_t RewardItemOptionalCount[3] = { 3, 3, 3 }; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1000432; - static constexpr auto Actor1 = 1000411; - static constexpr auto Enemy0 = 159; - static constexpr auto Item0 = 2000142; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq2Actor1 = 1; - static constexpr auto Seq2Actor1Npctradeno = 99; - static constexpr auto Seq2Actor1Npctradeok = 100; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000432; + static constexpr auto Actor1 = 1000411; + static constexpr auto Enemy0 = 159; + static constexpr auto Item0 = 2000142; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq2Actor1 = 1; + static constexpr auto Seq2Actor1Npctradeno = 99; + static constexpr auto Seq2Actor1Npctradeok = 100; - public: - SubFst041() : EventScript( 65733 ) - {}; - ~SubFst041() - {}; +public: + SubFst041() : + EventScript( 65733 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubFst041() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - if( actor == Actor1 ) - { - Scene00001(player); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - void onMobKill( Entity::Player& player, uint64_t npcId ) - { - if( npcId != Enemy0 ) - return; + if( actor == Actor0 ) + { + Scene00000( player ); + } + if( actor == Actor1 ) + { + Scene00001( player ); + } + } - auto currentKC = player.getQuestUI8BH( getId() ) + 1; + void onMobKill( Entity::Player& player, uint64_t npcId ) + { + if( npcId != Enemy0 ) + return; - if( currentKC >= 6 ) - player.updateQuest( getId(), SeqFinish ); - else - { - player.setQuestUI8BH( getId(), currentKC ); - player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); - } - } + auto currentKC = player.getQuestUI8BH( getId() ) + 1; - private: + if( currentKC >= 6 ) + player.updateQuest( getId(), SeqFinish ); + else + { + player.setQuestUI8BH( getId(), currentKC ); + player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 99, 0, 0, 0 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.setQuestUI8BH( getId(), 0 ); - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 99, 0, 0, 0 ); + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.setQuestUI8BH( getId(), 0 ); + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/limsa/SubSea001.cpp b/src/servers/Scripts/quest/subquest/limsa/SubSea001.cpp index cc34923c..058f2675 100644 --- a/src/servers/Scripts/quest/subquest/limsa/SubSea001.cpp +++ b/src/servers/Scripts/quest/subquest/limsa/SubSea001.cpp @@ -9,327 +9,334 @@ // Start NPC: 1002698 // End NPC: 1003604 -class SubSea001 : public EventScript +class SubSea001 : + public EventScript { private: - // Basic quest information - // Quest vars / flags used - // GetQuestBitFlag8 - // GetQuestUI8AL - // GetQuestUI8BH + // Basic quest information + // Quest vars / flags used + // GetQuestBitFlag8 + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - Seq2 = 2, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + Seq2 = 2, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardItem = 4551; - static constexpr auto RewardItemCount = 2; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardItem = 4551; + static constexpr auto RewardItemCount = 2; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1002698; - static constexpr auto Actor1 = 1000969; - static constexpr auto Actor2 = 1003604; - static constexpr auto Eobject0 = 2001563; - static constexpr auto Eobject1 = 2001564; - static constexpr auto Eobject2 = 2001565; - static constexpr auto Eobject3 = 2001566; - static constexpr auto Eobject4 = 2001567; - static constexpr auto Eobject5 = 2001568; - static constexpr auto EventActionProcess = 14; - static constexpr auto Item0 = 2000447; - static constexpr auto Poprange0 = 4161445; - static constexpr auto Quest0 = 65644; - static constexpr auto Quest1 = 65645; - static constexpr auto Territorytype0 = 129; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1002698; + static constexpr auto Actor1 = 1000969; + static constexpr auto Actor2 = 1003604; + static constexpr auto Eobject0 = 2001563; + static constexpr auto Eobject1 = 2001564; + static constexpr auto Eobject2 = 2001565; + static constexpr auto Eobject3 = 2001566; + static constexpr auto Eobject4 = 2001567; + static constexpr auto Eobject5 = 2001568; + static constexpr auto EventActionProcess = 14; + static constexpr auto Item0 = 2000447; + static constexpr auto Poprange0 = 4161445; + static constexpr auto Quest0 = 65644; + static constexpr auto Quest1 = 65645; + static constexpr auto Territorytype0 = 129; public: - SubSea001() : EventScript( 65647 ) - {}; - ~SubSea001() - {}; + SubSea001() : + EventScript( 65647 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubSea001() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00002( player ); - } - else if( actor == Actor2 ) - { - Scene00016( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00002( player ); + } + else if( actor == Actor2 ) + { + Scene00016( player ); + } //EOBJECTS CHECK - else if( actor == Eobject0 ) - { - player.eventActionStart( getId(), 0x0E, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00003( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject1 ) - { - player.eventActionStart( getId(), 0x0E, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00005( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject2 ) - { - player.eventActionStart( getId(), 0x0E, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00007( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject3 ) - { - player.eventActionStart( getId(), 0x0E, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00009( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject4 ) - { - player.eventActionStart( getId(), 0x0E, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00011( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject5 ) - { - player.eventActionStart( getId(), 0x0E, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00013( player ); - }, - nullptr, eventId ); - } - }; + else if( actor == Eobject0 ) + { + player.eventActionStart( getId(), 0x0E, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00003( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject1 ) + { + player.eventActionStart( getId(), 0x0E, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00005( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject2 ) + { + player.eventActionStart( getId(), 0x0E, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00007( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject3 ) + { + player.eventActionStart( getId(), 0x0E, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00009( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject4 ) + { + player.eventActionStart( getId(), 0x0E, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00011( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject5 ) + { + player.eventActionStart( getId(), 0x0E, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00013( player ); + }, + nullptr, eventId ); + } + }; private: - void checkQuestCompletion( Entity::Player& player ) - { - auto currentCC = player.getQuestUI8BH( getId() ); + void checkQuestCompletion( Entity::Player& player ) + { + auto currentCC = player.getQuestUI8BH( getId() ); - player.sendQuestMessage( getId(), 1, 3, currentCC + 1, 6 ); + player.sendQuestMessage( getId(), 1, 3, currentCC + 1, 6 ); - if( currentCC + 1 >= 6 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), currentCC + 1 ); - player.setQuestUI8AL( getId(), currentCC + 1 ); - } - else - { - player.setQuestUI8BH( getId(), currentCC + 1 ); - player.setQuestUI8AL( getId(), currentCC + 1 ); - } - } + if( currentCC + 1 >= 6 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), currentCC + 1 ); + player.setQuestUI8AL( getId(), currentCC + 1 ); + } + else + { + player.setQuestUI8BH( getId(), currentCC + 1 ); + player.setQuestUI8AL( getId(), currentCC + 1 ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - player.updateQuest( getId(), 1 ); - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + player.updateQuest( getId(), 1 ); + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( player.hasQuest( Quest0 ) || player.hasQuest( Quest1 ) ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), 2 ); - player.changePosition( 10, 21, 13, -2 ); - player.forceZoneing( Territorytype0 ); // teleport to real limsa - } - } - else return; - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( player.hasQuest( Quest0 ) || player.hasQuest( Quest1 ) ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), 2 ); + player.changePosition( 10, 21, 13, -2 ); + player.forceZoneing( Territorytype0 ); // teleport to real limsa + } + } + else + return; + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00004( player ); - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00004( player ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 7, true ); - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 7, true ); + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00006( player ); - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00006( player ); + } ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 6, true ); - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 6, true ); + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00008( player ); - } ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00008( player ); + } ); + } - void Scene00008( Entity::Player& player ) - { - player.playScene( getId(), 8, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 5, true ); - } ); - } + void Scene00008( Entity::Player& player ) + { + player.playScene( getId(), 8, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 5, true ); + } ); + } - void Scene00009( Entity::Player& player ) - { - player.playScene( getId(), 9, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00010( player ); - } ); - } + void Scene00009( Entity::Player& player ) + { + player.playScene( getId(), 9, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00010( player ); + } ); + } - void Scene00010( Entity::Player& player ) - { - player.playScene( getId(), 10, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 4, true ); - } ); - } + void Scene00010( Entity::Player& player ) + { + player.playScene( getId(), 10, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 4, true ); + } ); + } - void Scene00011( Entity::Player& player ) - { - player.playScene( getId(), 11, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00012( player ); - } ); - } + void Scene00011( Entity::Player& player ) + { + player.playScene( getId(), 11, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00012( player ); + } ); + } - void Scene00012( Entity::Player& player ) - { - player.playScene( getId(), 12, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 3, true ); - } ); - } + void Scene00012( Entity::Player& player ) + { + player.playScene( getId(), 12, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 3, true ); + } ); + } - void Scene00013( Entity::Player& player ) - { - player.playScene( getId(), 13, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00014( player ); - } ); - } + void Scene00013( Entity::Player& player ) + { + player.playScene( getId(), 13, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00014( player ); + } ); + } - void Scene00014( Entity::Player& player ) - { - player.playScene( getId(), 14, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 2, true ); - } ); - } + void Scene00014( Entity::Player& player ) + { + player.playScene( getId(), 14, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 2, true ); + } ); + } - void Scene00015( Entity::Player& player ) - { - player.playScene( getId(), 15, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.playScene( getId(), 15, 0, 0, 0 ); - } ); - } + void Scene00015( Entity::Player& player ) + { + player.playScene( getId(), 15, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.playScene( getId(), 15, 0, 0, 0 ); + } ); + } - void Scene00016( Entity::Player& player ) - { - player.playScene( getId(), 16, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00017( player ); - } - } ); - } + void Scene00016( Entity::Player& player ) + { + player.playScene( getId(), 16, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00017( player ); + } + } ); + } - void Scene00017( Entity::Player& player ) - { - player.playScene( getId(), 17, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - player.finishQuest( getId() ); - } - } ); - } + void Scene00017( Entity::Player& player ) + { + player.playScene( getId(), 17, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil000.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil000.cpp index 9f46a6d5..6bd322ae 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil000.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil000.cpp @@ -8,99 +8,107 @@ // Start NPC: 1001285 // End NPC: 1002278 -class SubWil000 : public EventScript +class SubWil000 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 103; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 103; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001285; - static constexpr auto Actor1 = 1002278; - static constexpr auto Item0 = 2000136; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001285; + static constexpr auto Actor1 = 1002278; + static constexpr auto Item0 = 2000136; - public: - SubWil000() : EventScript( 65685 ){}; - ~SubWil000(){}; +public: + SubWil000() : + EventScript( 65685 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil000() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), 1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), 1 ); + } + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil001.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil001.cpp index 71171f7e..a028eb69 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil001.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil001.cpp @@ -8,74 +8,82 @@ // Start NPC: 1001287 // End NPC: 1001288 -class SubWil001 : public EventScript +class SubWil001 : + public EventScript { private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardItem = 4551; - static constexpr auto RewardItemCount = 2; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardItem = 4551; + static constexpr auto RewardItemCount = 2; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001287; - static constexpr auto Actor1 = 1001288; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001287; + static constexpr auto Actor1 = 1001288; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; public: - SubWil001() : EventScript( 65686 ) {}; - ~SubWil001() {}; + SubWil001() : + EventScript( 65686 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil001() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } private: - void Scene00000(Entity::Player& player) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; \ No newline at end of file diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil002.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil002.cpp index 15da9bec..8d9ec19d 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil002.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil002.cpp @@ -8,102 +8,110 @@ // Start NPC: 1001288 // End NPC: 1001289 -class SubWil002 : public EventScript +class SubWil002 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - uint16_t RewardItemOptional[2] = { 4551, 4555 }; - uint16_t RewardItemOptionalCount[2] = { 3, 3 }; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + uint16_t RewardItemOptional[2] = { 4551, 4555 }; + uint16_t RewardItemOptionalCount[2] = { 3, 3 }; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001288; - static constexpr auto Actor1 = 1001289; - static constexpr auto Item0 = 2000245; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq1Actor1Npctradeno = 99; - static constexpr auto Seq1Actor1Npctradeok = 100; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001288; + static constexpr auto Actor1 = 1001289; + static constexpr auto Item0 = 2000245; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq1Actor1Npctradeno = 99; + static constexpr auto Seq1Actor1Npctradeok = 100; - public: - SubWil002() : EventScript( 65687 ){}; - ~SubWil002(){}; +public: + SubWil002() : + EventScript( 65687 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil002() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), 1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), 1 ); + } + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - player.finishQuest( getId() ); - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil004.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil004.cpp index 7266fe02..33f6ecac 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil004.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil004.cpp @@ -8,254 +8,262 @@ // Start NPC: 1001291 // End NPC: 1003896 -class SubWil004 : public EventScript +class SubWil004 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestBitFlag8 - // GetQuestUI8AH - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestBitFlag8 + // GetQuestUI8AH + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - Seq2 = 2, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + Seq2 = 2, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardItem = 4551; - static constexpr auto RewardItemCount = 5; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardItem = 4551; + static constexpr auto RewardItemCount = 5; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001291; - static constexpr auto Actor1 = 1001292; - static constexpr auto Actor2 = 1003896; - static constexpr auto Eobject0 = 2000691; - static constexpr auto Eobject1 = 2000692; - static constexpr auto Eobject2 = 2000693; - static constexpr auto EventActionSearch = 1; - static constexpr auto Item0 = 2000137; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001291; + static constexpr auto Actor1 = 1001292; + static constexpr auto Actor2 = 1003896; + static constexpr auto Eobject0 = 2000691; + static constexpr auto Eobject1 = 2000692; + static constexpr auto Eobject2 = 2000693; + static constexpr auto EventActionSearch = 1; + static constexpr auto Item0 = 2000137; - public: - SubWil004() : EventScript( 65689 ){}; - ~SubWil004(){}; +public: + SubWil004() : + EventScript( 65689 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil004() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - else if( actor == Actor2 ) - { - Scene00008( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + else if( actor == Actor2 ) + { + Scene00008( player ); + } //EOBJECTS CHECK - else if( actor == Eobject0 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00003( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject1 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00005( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject2 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00007( player ); - }, - nullptr, eventId ); - } - } + else if( actor == Eobject0 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00003( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject1 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00005( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject2 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00007( player ); + }, + nullptr, eventId ); + } + } - private: +private: - void checkQuestCompletion( Entity::Player& player ) - { - auto currentCC = player.getQuestUI8AL( getId() ); - auto currentQC = player.getQuestUI8BH( getId() ); + void checkQuestCompletion( Entity::Player& player ) + { + auto currentCC = player.getQuestUI8AL( getId() ); + auto currentQC = player.getQuestUI8BH( getId() ); - player.sendQuestMessage( getId(), 1, 3, currentCC + 1, 3 ); + player.sendQuestMessage( getId(), 1, 3, currentCC + 1, 3 ); - if( currentCC + 1 >= 3 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8AH( getId(), currentCC + 1 ); - player.setQuestUI8AL( getId(), currentCC + 1 ); - player.setQuestUI8BH( getId(), 0 ); - } - else - { - player.setQuestUI8AH( getId(), currentCC + 1 ); - player.setQuestUI8AL( getId(), currentCC + 1 ); - player.setQuestUI8BH( getId(), currentQC - 1 ); - } - } + if( currentCC + 1 >= 3 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8AH( getId(), currentCC + 1 ); + player.setQuestUI8AL( getId(), currentCC + 1 ); + player.setQuestUI8BH( getId(), 0 ); + } + else + { + player.setQuestUI8AH( getId(), currentCC + 1 ); + player.setQuestUI8AL( getId(), currentCC + 1 ); + player.setQuestUI8BH( getId(), currentQC - 1 ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), Seq2 ); - player.sendQuestMessage( getId(), 0, 2, 0, 0 ); - player.setQuestUI8BH( getId(), 3 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), Seq2 ); + player.sendQuestMessage( getId(), 0, 2, 0, 0 ); + player.setQuestUI8BH( getId(), 3 ); + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00003( player ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00003( player ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 7, true ); - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 7, true ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00005( player ); - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00005( player ); + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 6, true ); - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 6, true ); + } ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00007( player ); - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00007( player ); + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 5, true ); - } ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 5, true ); + } ); + } - void Scene00008( Entity::Player& player ) - { - player.playScene( getId(), 8, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00008( Entity::Player& player ) + { + player.playScene( getId(), 8, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } - void Scene00009( Entity::Player& player ) - { - player.playScene( getId(), 9, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00009( Entity::Player& player ) + { + player.playScene( getId(), 9, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00010( Entity::Player& player ) - { - player.playScene( getId(), 10, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00010( Entity::Player& player ) + { + player.playScene( getId(), 10, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00011( Entity::Player& player ) - { - player.playScene( getId(), 11, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00011( Entity::Player& player ) + { + player.playScene( getId(), 11, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00012( Entity::Player& player ) - { - player.playScene( getId(), 12, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00012( Entity::Player& player ) + { + player.playScene( getId(), 12, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00013( Entity::Player& player ) - { - player.playScene( getId(), 13, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00013( Entity::Player& player ) + { + player.playScene( getId(), 13, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00014( Entity::Player& player ) - { - player.playScene( getId(), 14, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00014( Entity::Player& player ) + { + player.playScene( getId(), 14, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil006.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil006.cpp index e6a0709c..0812a1d3 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil006.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil006.cpp @@ -8,116 +8,124 @@ // Start NPC: 1001295 // End NPC: 1001299 -class SubWil006 : public EventScript +class SubWil006 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardItem = 5594; - static constexpr auto RewardItemCount = 10; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardItem = 5594; + static constexpr auto RewardItemCount = 10; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001295; - static constexpr auto Actor1 = 1002280; - static constexpr auto Actor2 = 1001299; - static constexpr auto Item0 = 2000201; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001295; + static constexpr auto Actor1 = 1002280; + static constexpr auto Actor2 = 1001299; + static constexpr auto Item0 = 2000201; - public: - SubWil006() : EventScript( 65701 ){}; - ~SubWil006(){}; +public: + SubWil006() : + EventScript( 65701 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil006() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - else if( actor == Actor2 ) - { - Scene00004( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + else if( actor == Actor2 ) + { + Scene00004( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - player.setQuestUI8BH( getId(), 1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00002( player ); - } - else - { - Scene00003( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + player.setQuestUI8BH( getId(), 1 ); + } + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), SeqFinish ); - player.sendQuestMessage( getId(), 0, 2, 0, 0 ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00002( player ); + } + else + { + Scene00003( player ); + } + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SeqFinish ); + player.sendQuestMessage( getId(), 0, 2, 0, 0 ); + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } + + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil007.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil007.cpp index a6e0de72..820c9022 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil007.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil007.cpp @@ -9,311 +9,319 @@ // Start NPC: 1007621 // End NPC: 1007621 -class SubWil007 : public EventScript +class SubWil007 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestBitFlag8 - // GetQuestUI8AL +private: + // Basic quest information + // Quest vars / flags used + // GetQuestBitFlag8 + // GetQuestUI8AL - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - Seq2 = 2, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + Seq2 = 2, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 102; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 102; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1007621; - static constexpr auto Actor1 = 1001297; - static constexpr auto Actor2 = 1001692; - static constexpr auto Actor3 = 1001693; - static constexpr auto Actor4 = 1001697; - static constexpr auto Actor5 = 1001698; - static constexpr auto FirstQuest = 66130; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1007621; + static constexpr auto Actor1 = 1001297; + static constexpr auto Actor2 = 1001692; + static constexpr auto Actor3 = 1001693; + static constexpr auto Actor4 = 1001697; + static constexpr auto Actor5 = 1001698; + static constexpr auto FirstQuest = 66130; - public: - SubWil007() : EventScript( 65703 ){}; - ~SubWil007(){}; +public: + SubWil007() : + EventScript( 65703 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil007() + { + }; - if( actor == Actor0 && !player.hasQuest( getId() ) ) - { - Scene00000( player ); - } - if( actor == Actor0 && player.getQuestSeq( getId() ) == SeqFinish ) - { - Scene00020( player ); - } - else if( actor == Actor1 ) - { - Scene00005( player ); - } - else if( actor == Actor2 ) - { - Scene00008( player ); - } - else if( actor == Actor3 ) - { - Scene00011( player ); - } - else if( actor == Actor4 ) - { - Scene00014( player ); - } - else if( actor == Actor5 ) - { - Scene00017( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + if( actor == Actor0 && !player.hasQuest( getId() ) ) + { + Scene00000( player ); + } + if( actor == Actor0 && player.getQuestSeq( getId() ) == SeqFinish ) + { + Scene00020( player ); + } + else if( actor == Actor1 ) + { + Scene00005( player ); + } + else if( actor == Actor2 ) + { + Scene00008( player ); + } + else if( actor == Actor3 ) + { + Scene00011( player ); + } + else if( actor == Actor4 ) + { + Scene00014( player ); + } + else if( actor == Actor5 ) + { + Scene00017( player ); + } + } - if( actor == Actor0 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq1 ) - { - Scene00003( player ); - } - else if( actor == Actor1 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) - { - Scene00006( player ); - } - else if( actor == Actor2 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) - { - Scene00009( player ); - } - else if( actor == Actor3 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) - { - Scene00012( player ); - } - else if( actor == Actor4 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) - { - Scene00015( player ); - } - else if( actor == Actor5 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) - { - Scene00018( player ); - } - } + void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq1 ) + { + Scene00003( player ); + } + else if( actor == Actor1 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) + { + Scene00006( player ); + } + else if( actor == Actor2 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) + { + Scene00009( player ); + } + else if( actor == Actor3 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) + { + Scene00012( player ); + } + else if( actor == Actor4 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) + { + Scene00015( player ); + } + else if( actor == Actor5 && emoteId == 41 && player.getQuestSeq( getId() ) == Seq2 ) + { + Scene00018( player ); + } + } - void checkQuestCompletion( Entity::Player& player ) - { - auto currentQC = player.getQuestUI8AL( getId() ) + 1; +private: - if( currentQC >= 5 ) - { - player.updateQuest( getId(), SeqFinish ); - player.sendQuestMessage( getId(), 1, 2, currentQC, 5 ); - } - else - { - player.setQuestUI8AL( getId(), currentQC ); - player.sendQuestMessage( getId(), 1, 2, currentQC, 5 ); - } - } + void checkQuestCompletion( Entity::Player& player ) + { + auto currentQC = player.getQuestUI8AL( getId() ) + 1; - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00001( player ); - } - } ); - } + if( currentQC >= 5 ) + { + player.updateQuest( getId(), SeqFinish ); + player.sendQuestMessage( getId(), 1, 2, currentQC, 5 ); + } + else + { + player.setQuestUI8AL( getId(), currentQC ); + player.sendQuestMessage( getId(), 1, 2, currentQC, 5 ); + } + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), Seq1 ); - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00001( player ); + } + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), Seq1 ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), Seq2 ); - player.sendQuestMessage( getId(), 0, 1, 0, 0 ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), Seq2 ); + player.sendQuestMessage( getId(), 0, 1, 0, 0 ); + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion(player); - player.setQuestBitFlag8(getId(), 7, true); - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 7, true ); + } ); + } - void Scene00008( Entity::Player& player ) - { - player.playScene( getId(), 8, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00009( Entity::Player& player ) - { - player.playScene( getId(), 9, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 6, true ); - } ); - } + void Scene00008( Entity::Player& player ) + { + player.playScene( getId(), 8, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00010( Entity::Player& player ) - { - player.playScene( getId(), 10, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00009( Entity::Player& player ) + { + player.playScene( getId(), 9, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 6, true ); + } ); + } - void Scene00011( Entity::Player& player ) - { - player.playScene( getId(), 11, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00010( Entity::Player& player ) + { + player.playScene( getId(), 10, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00012( Entity::Player& player ) - { - player.playScene( getId(), 12, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 5, true ); - } ); - } + void Scene00011( Entity::Player& player ) + { + player.playScene( getId(), 11, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00013( Entity::Player& player ) - { - player.playScene( getId(), 13, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00012( Entity::Player& player ) + { + player.playScene( getId(), 12, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 5, true ); + } ); + } - void Scene00014( Entity::Player& player ) - { - player.playScene( getId(), 14, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00013( Entity::Player& player ) + { + player.playScene( getId(), 13, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00015( Entity::Player& player ) - { - player.playScene( getId(), 15, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 4, true ); - } ); - } + void Scene00014( Entity::Player& player ) + { + player.playScene( getId(), 14, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00016( Entity::Player& player ) - { - player.playScene( getId(), 16, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00015( Entity::Player& player ) + { + player.playScene( getId(), 15, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 4, true ); + } ); + } - void Scene00017( Entity::Player& player ) - { - player.playScene( getId(), 17, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00016( Entity::Player& player ) + { + player.playScene( getId(), 16, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00018( Entity::Player& player ) - { - player.playScene( getId(), 18, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 3, true ); - } ); - } + void Scene00017( Entity::Player& player ) + { + player.playScene( getId(), 17, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00019( Entity::Player& player ) - { - player.playScene( getId(), 19, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00018( Entity::Player& player ) + { + player.playScene( getId(), 18, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 3, true ); + } ); + } - void Scene00020( Entity::Player& player ) - { - player.playScene( getId(), 20, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00019( Entity::Player& player ) + { + player.playScene( getId(), 19, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } + + void Scene00020( Entity::Player& player ) + { + player.playScene( getId(), 20, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil018.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil018.cpp index 31e84184..234670fb 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil018.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil018.cpp @@ -8,305 +8,313 @@ // Start NPC: 1001675 // End NPC: 1001675 -class SubWil018 : public EventScript +class SubWil018 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestBitFlag8 - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestBitFlag8 + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 102; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 102; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001675; - static constexpr auto Eobject0 = 2000695; - static constexpr auto Eobject1 = 2000696; - static constexpr auto Eobject2 = 2000697; - static constexpr auto Eobject3 = 2001089; - static constexpr auto Eobject4 = 2001090; - static constexpr auto EventActionSearch = 1; - static constexpr auto Item0 = 2000198; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001675; + static constexpr auto Eobject0 = 2000695; + static constexpr auto Eobject1 = 2000696; + static constexpr auto Eobject2 = 2000697; + static constexpr auto Eobject3 = 2001089; + static constexpr auto Eobject4 = 2001090; + static constexpr auto EventActionSearch = 1; + static constexpr auto Item0 = 2000198; - public: - SubWil018() : EventScript( 65932 ){}; - ~SubWil018(){}; +public: + SubWil018() : + EventScript( 65932 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil018() + { + }; - if( actor == Actor0 && !player.hasQuest( getId() ) ) - { - Scene00000( player ); - } - if( actor == Actor0 ) - { - Scene00016( player ); - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + + if( actor == Actor0 && !player.hasQuest( getId() ) ) + { + Scene00000( player ); + } + if( actor == Actor0 ) + { + Scene00016( player ); + } //EOBJECTS CHECK - else if( actor == Eobject0 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00001( player ); - }, - nullptr, eventId); - } - else if( actor == Eobject1 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00004( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject2 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00007( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject3 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00010( player ); - }, - nullptr, eventId ); - } - else if( actor == Eobject4 ) - { - player.eventActionStart( getId(), 0x01, - [&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) - { - Scene00013( player ); - }, - nullptr, eventId ); - } - } + else if( actor == Eobject0 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00001( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject1 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00004( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject2 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00007( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject3 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00010( player ); + }, + nullptr, eventId ); + } + else if( actor == Eobject4 ) + { + player.eventActionStart( getId(), 0x01, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) + { + Scene00013( player ); + }, + nullptr, eventId ); + } + } - private: +private: - void checkQuestCompletion( Entity::Player& player ) - { - auto currentCC = player.getQuestUI8AL( getId() ); + void checkQuestCompletion( Entity::Player& player ) + { + auto currentCC = player.getQuestUI8AL( getId() ); - player.sendQuestMessage( getId(), 0, 3, currentCC + 1, 5 ); + player.sendQuestMessage( getId(), 0, 3, currentCC + 1, 5 ); - if( currentCC + 1 >= 5 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), currentCC + 1 ); - player.setQuestUI8AL( getId(), currentCC + 1 ); - } - else - { - player.setQuestUI8BH( getId(), currentCC + 1 ); - player.setQuestUI8AL( getId(), currentCC + 1 ); - } - } + if( currentCC + 1 >= 5 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), currentCC + 1 ); + player.setQuestUI8AL( getId(), currentCC + 1 ); + } + else + { + player.setQuestUI8BH( getId(), currentCC + 1 ); + player.setQuestUI8AL( getId(), currentCC + 1 ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00002( player ); - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00002( player ); + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 7, true ); - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 7, true ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00005( player ); - } ); - } + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00005( player ); + } ); + } - void Scene00005( Entity::Player& player ) - { - player.playScene( getId(), 5, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 6, true ); - } ); - } + void Scene00005( Entity::Player& player ) + { + player.playScene( getId(), 5, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 6, true ); + } ); + } - void Scene00006( Entity::Player& player ) - { - player.playScene( getId(), 6, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00006( Entity::Player& player ) + { + player.playScene( getId(), 6, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00007( Entity::Player& player ) - { - player.playScene( getId(), 7, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00008( player ); - } ); - } + void Scene00007( Entity::Player& player ) + { + player.playScene( getId(), 7, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00008( player ); + } ); + } - void Scene00008( Entity::Player& player ) - { - player.playScene( getId(), 8, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 5, true ); - } ); - } + void Scene00008( Entity::Player& player ) + { + player.playScene( getId(), 8, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 5, true ); + } ); + } - void Scene00009( Entity::Player& player ) - { - player.playScene( getId(), 9, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00009( Entity::Player& player ) + { + player.playScene( getId(), 9, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00010( Entity::Player& player ) - { - player.playScene( getId(), 10, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00011( player ); - } ); - } + void Scene00010( Entity::Player& player ) + { + player.playScene( getId(), 10, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00011( player ); + } ); + } - void Scene00011( Entity::Player& player ) - { - player.playScene( getId(), 11, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 4, true ); - } ); - } + void Scene00011( Entity::Player& player ) + { + player.playScene( getId(), 11, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 4, true ); + } ); + } - void Scene00012( Entity::Player& player ) - { - player.playScene( getId(), 12, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00012( Entity::Player& player ) + { + player.playScene( getId(), 12, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00013( Entity::Player& player ) - { - player.playScene( getId(), 13, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - Scene00014(player); - } ); - } + void Scene00013( Entity::Player& player ) + { + player.playScene( getId(), 13, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + Scene00014( player ); + } ); + } - void Scene00014( Entity::Player& player ) - { - player.playScene( getId(), 14, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - checkQuestCompletion( player ); - player.setQuestBitFlag8( getId(), 3, true ); - } ); - } + void Scene00014( Entity::Player& player ) + { + player.playScene( getId(), 14, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + checkQuestCompletion( player ); + player.setQuestBitFlag8( getId(), 3, true ); + } ); + } - void Scene00015( Entity::Player& player ) - { - player.playScene( getId(), 15, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00015( Entity::Player& player ) + { + player.playScene( getId(), 15, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } - void Scene00016( Entity::Player& player ) - { - player.playScene( getId(), 16, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00017( player ); - } - else - { - Scene00018( player ); - } - } ); - } + void Scene00016( Entity::Player& player ) + { + player.playScene( getId(), 16, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00017( player ); + } + else + { + Scene00018( player ); + } + } ); + } - void Scene00017( Entity::Player& player ) - { - player.playScene( getId(), 17, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00017( Entity::Player& player ) + { + player.playScene( getId(), 17, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } - void Scene00018( Entity::Player& player ) - { - player.playScene( getId(), 18, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00018( Entity::Player& player ) + { + player.playScene( getId(), 18, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil019.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil019.cpp index fb3f35dd..b4542e13 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil019.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil019.cpp @@ -8,74 +8,82 @@ // Start NPC: 1001680 // End NPC: 1001691 -class SubWil019 : public EventScript +class SubWil019 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 111; - static constexpr auto RewardItem = 5539; - static constexpr auto RewardItemCount = 1; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 111; + static constexpr auto RewardItem = 5539; + static constexpr auto RewardItemCount = 1; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001680; - static constexpr auto Actor1 = 1001691; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001680; + static constexpr auto Actor1 = 1001691; - public: - SubWil019() : EventScript( 65928 ){}; - ~SubWil019(){}; +public: + SubWil019() : + EventScript( 65928 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil019() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + } + } ); + } + + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil021.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil021.cpp index 45df6489..9bdc0d8a 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil021.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil021.cpp @@ -8,103 +8,111 @@ // Start NPC: 1001766 // End NPC: 1001657 -class SubWil021 : public EventScript +class SubWil021 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 111; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 111; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001766; - static constexpr auto Actor1 = 1001657; - static constexpr auto Item0 = 2000196; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq1Actor1Npctradeno = 99; - static constexpr auto Seq1Actor1Npctradeok = 100; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001766; + static constexpr auto Actor1 = 1001657; + static constexpr auto Item0 = 2000196; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq1Actor1Npctradeno = 99; + static constexpr auto Seq1Actor1Npctradeok = 100; - public: - SubWil021() : EventScript( 65930 ){}; - ~SubWil021(){}; +public: + SubWil021() : + EventScript( 65930 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil021() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), 1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), 1 ); + } + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if(player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil022.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil022.cpp index 6e8d8647..7aa7c1f0 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil022.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil022.cpp @@ -8,101 +8,109 @@ // Start NPC: 1001657 // End NPC: 1001679 -class SubWil022 : public EventScript +class SubWil022 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 50; - static constexpr auto RewardGil = 111; + // Quest rewards + static constexpr auto RewardExpFactor = 50; + static constexpr auto RewardGil = 111; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001657; - static constexpr auto Actor1 = 1001679; - static constexpr auto Item0 = 2000197; - static constexpr auto Seq0Actor0 = 0; - static constexpr auto Seq1Actor1 = 1; - static constexpr auto Seq1Actor1Npctradeno = 99; - static constexpr auto Seq1Actor1Npctradeok = 100; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001657; + static constexpr auto Actor1 = 1001679; + static constexpr auto Item0 = 2000197; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; + static constexpr auto Seq1Actor1Npctradeno = 99; + static constexpr auto Seq1Actor1Npctradeok = 100; - public: - SubWil022() : EventScript( 65931 ){}; - ~SubWil022(){}; +public: + SubWil022() : + EventScript( 65931 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil022() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), 1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00100( player ); - } - else - { - Scene00099( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), 1 ); + } + } ); + } - void Scene00099( Entity::Player& player ) - { - player.playScene( getId(), 99, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00100( player ); + } + else + { + Scene00099( player ); + } + } ); + } - void Scene00100( Entity::Player& player ) - { - player.playScene( getId(), 100, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - player.finishQuest( getId() ); - } - } ); - } + void Scene00099( Entity::Player& player ) + { + player.playScene( getId(), 99, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } + + void Scene00100( Entity::Player& player ) + { + player.playScene( getId(), 100, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil027.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil027.cpp index 64600856..437e3bd4 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil027.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil027.cpp @@ -8,72 +8,80 @@ // Start NPC: 1001353 // End NPC: 1003995 -class SubWil027 : public EventScript +class SubWil027 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 200; - static constexpr auto RewardGil = 127; + // Quest rewards + static constexpr auto RewardExpFactor = 200; + static constexpr auto RewardGil = 127; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001353; - static constexpr auto Actor1 = 1003995; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001353; + static constexpr auto Actor1 = 1003995; - public: - SubWil027() : EventScript( 66131 ){}; - ~SubWil027(){}; +public: + SubWil027() : + EventScript( 66131 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil027() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + } + } ); + } + + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil028.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil028.cpp index 7f16f271..7a44725b 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil028.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil028.cpp @@ -8,99 +8,107 @@ // Start NPC: 1001678 // End NPC: 1001497 -class SubWil028 : public EventScript +class SubWil028 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - static constexpr auto RewardGil = 122; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + static constexpr auto RewardGil = 122; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001678; - static constexpr auto Actor1 = 1001497; - static constexpr auto Item0 = 2000241; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001678; + static constexpr auto Actor1 = 1001497; + static constexpr auto Item0 = 2000241; - public: - SubWil028() : EventScript( 65925 ){}; - ~SubWil028(){}; +public: + SubWil028() : + EventScript( 65925 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil028() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), 1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00002( player ); - } - else - { - Scene00003( player ); - } - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), 1 ); + } + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00002( player ); + } + else + { + Scene00003( player ); + } + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } + + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } }; diff --git a/src/servers/Scripts/quest/subquest/uldah/SubWil029.cpp b/src/servers/Scripts/quest/subquest/uldah/SubWil029.cpp index 5660e6ba..f9b4923c 100644 --- a/src/servers/Scripts/quest/subquest/uldah/SubWil029.cpp +++ b/src/servers/Scripts/quest/subquest/uldah/SubWil029.cpp @@ -8,116 +8,124 @@ // Start NPC: 1001313 // End NPC: 1001992 -class SubWil029 : public EventScript +class SubWil029 : + public EventScript { - private: - // Basic quest information - // Quest vars / flags used - // GetQuestUI8AL - // GetQuestUI8BH +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + // GetQuestUI8BH - enum Sequence : uint8_t - { - Seq0 = 0, - Seq1 = 1, - SeqFinish = 255, - }; + enum Sequence : + uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; - // Quest rewards - static constexpr auto RewardExpFactor = 100; - uint16_t RewardItemOptional[3] = { 2999, 3010, 5824 }; - uint16_t RewardItemOptionalCount[3] = { 1, 1, 1 }; + // Quest rewards + static constexpr auto RewardExpFactor = 100; + uint16_t RewardItemOptional[3] = { 2999, 3010, 5824 }; + uint16_t RewardItemOptionalCount[3] = { 1, 1, 1 }; - // Entities found in the script data of the quest - static constexpr auto Actor0 = 1001313; - static constexpr auto Actor1 = 1001390; - static constexpr auto Actor2 = 1001992; - static constexpr auto Item0 = 2000410; + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1001313; + static constexpr auto Actor1 = 1001390; + static constexpr auto Actor2 = 1001992; + static constexpr auto Item0 = 2000410; - public: - SubWil029() : EventScript( 65926 ){}; - ~SubWil029(){}; +public: + SubWil029() : + EventScript( 65926 ) + { + }; - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + ~SubWil029() + { + }; - if( actor == Actor0 ) - { - Scene00000( player ); - } - else if( actor == Actor1 ) - { - Scene00001( player ); - } - else if( actor == Actor2 ) - { - Scene00002( player ); - } - } + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - private: + if( actor == Actor0 ) + { + Scene00000( player ); + } + else if( actor == Actor1 ) + { + Scene00001( player ); + } + else if( actor == Actor2 ) + { + Scene00002( player ); + } + } - void Scene00000( Entity::Player& player ) - { - player.playScene( getId(), 0, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - player.updateQuest( getId(), Seq1 ); - } - } ); - } +private: - void Scene00001( Entity::Player& player ) - { - player.playScene( getId(), 1, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - player.updateQuest( getId(), SeqFinish ); - player.setQuestUI8BH( getId(), 1 ); - player.sendQuestMessage( getId(), 0, 2, 0, 0 ); - } ); - } + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + player.updateQuest( getId(), Seq1 ); + } + } ); + } - void Scene00002( Entity::Player& player ) - { - player.playScene( getId(), 2, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - Scene00003( player ); - } - else - { - Scene00004( player ); - } - } ); - } + void Scene00001( Entity::Player& player ) + { + player.playScene( getId(), 1, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + player.updateQuest( getId(), SeqFinish ); + player.setQuestUI8BH( getId(), 1 ); + player.sendQuestMessage( getId(), 0, 2, 0, 0 ); + } ); + } - void Scene00003( Entity::Player& player ) - { - player.playScene( getId(), 3, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - if( result.param2 == 1 ) - { - if( player.giveQuestRewards( getId(), 0 ) ) - { - player.finishQuest( getId() ); - } - } - } ); - } + void Scene00002( Entity::Player& player ) + { + player.playScene( getId(), 2, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + Scene00003( player ); + } + else + { + Scene00004( player ); + } + } ); + } - void Scene00004( Entity::Player& player ) - { - player.playScene( getId(), 4, HIDE_HOTBAR, - [&]( Entity::Player& player, const Event::SceneResult& result ) - { - } ); - } + void Scene00003( Entity::Player& player ) + { + player.playScene( getId(), 3, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + if( result.param2 == 1 ) + { + if( player.giveQuestRewards( getId(), 0 ) ) + { + player.finishQuest( getId() ); + } + } + } ); + } + + void Scene00004( Entity::Player& player ) + { + player.playScene( getId(), 4, HIDE_HOTBAR, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + } ); + } }; diff --git a/src/servers/sapphire_api/Forwards.h b/src/servers/sapphire_api/Forwards.h index bb416e83..ece38f18 100644 --- a/src/servers/sapphire_api/Forwards.h +++ b/src/servers/sapphire_api/Forwards.h @@ -3,96 +3,105 @@ #include -namespace Core -{ - - class Cell; - class Zone; - class Item; - class ItemContainer; - class Inventory; - class Session; - class ZonePosition; +namespace Core { - typedef boost::shared_ptr ZonePtr; - typedef boost::shared_ptr ItemPtr; - typedef boost::shared_ptr ItemContainerPtr; - typedef boost::shared_ptr InventoryPtr; - typedef boost::shared_ptr SessionPtr; - typedef boost::shared_ptr ZonePositionPtr; +class Cell; - namespace StatusEffect - { - class StatusEffect; - class StatusEffectContainer; +class Zone; - typedef boost::shared_ptr StatusEffectPtr; - typedef boost::shared_ptr StatusEffectContainerPtr; - } +class Item; - namespace Entity - { - class Chara; - class Player; - class BattleNpc; +class ItemContainer; - typedef boost::shared_ptr ActorPtr; - typedef boost::shared_ptr PlayerPtr; - typedef boost::shared_ptr BattleNpcPtr; - } +class Inventory; - namespace Event - { - class EventHandler; +class Session; - typedef boost::shared_ptr EventPtr; - } +class ZonePosition; - namespace Action - { - class Action; - class ActionTeleport; - class EventAction; +typedef boost::shared_ptr< Zone > ZonePtr; +typedef boost::shared_ptr< Item > ItemPtr; +typedef boost::shared_ptr< ItemContainer > ItemContainerPtr; +typedef boost::shared_ptr< Inventory > InventoryPtr; +typedef boost::shared_ptr< Session > SessionPtr; +typedef boost::shared_ptr< ZonePosition > ZonePositionPtr; - typedef boost::shared_ptr ActionPtr; - typedef boost::shared_ptr ActionTeleportPtr; - typedef boost::shared_ptr EventActionPtr; - } +namespace StatusEffect { +class StatusEffect; + +class StatusEffectContainer; + +typedef boost::shared_ptr< StatusEffect > StatusEffectPtr; +typedef boost::shared_ptr< StatusEffectContainer > StatusEffectContainerPtr; +} + +namespace Entity { +class Chara; + +class Player; + +class BattleNpc; + +typedef boost::shared_ptr< Chara > ActorPtr; +typedef boost::shared_ptr< Player > PlayerPtr; +typedef boost::shared_ptr< BattleNpc > BattleNpcPtr; +} + +namespace Event { +class EventHandler; + +typedef boost::shared_ptr< EventHandler > EventPtr; +} + +namespace Action { +class Action; + +class ActionTeleport; + +class EventAction; + +typedef boost::shared_ptr< Action > ActionPtr; +typedef boost::shared_ptr< ActionTeleport > ActionTeleportPtr; +typedef boost::shared_ptr< EventAction > EventActionPtr; +} - namespace Network - { - class Hive; - class Acceptor; - class Connection; - class WorldConnection; - class SessionConnection; - class ZoneConnection; +namespace Network { +class Hive; - typedef boost::shared_ptr HivePtr; - typedef boost::shared_ptr AcceptorPtr; - typedef boost::shared_ptr ConnectionPtr; - typedef boost::shared_ptr WorldConnectionPtr; - typedef boost::shared_ptr ZoneConnectionPtr; - typedef boost::shared_ptr SessionConnectionPtr; +class Acceptor; - namespace Packets - { - class GamePacket; +class Connection; + +class WorldConnection; + +class SessionConnection; + +class ZoneConnection; + +typedef boost::shared_ptr< Hive > HivePtr; +typedef boost::shared_ptr< Acceptor > AcceptorPtr; +typedef boost::shared_ptr< Connection > ConnectionPtr; +typedef boost::shared_ptr< WorldConnection > WorldConnectionPtr; +typedef boost::shared_ptr< ZoneConnection > ZoneConnectionPtr; +typedef boost::shared_ptr< SessionConnection > SessionConnectionPtr; + +namespace Packets { +class GamePacket; - typedef boost::shared_ptr GamePacketPtr; +typedef boost::shared_ptr< GamePacket > GamePacketPtr; - } - } +} +} - namespace Scripting - { - using EventReturnCallback = std::function< void( Entity::Player&, uint32_t, uint16_t, uint16_t, uint16_t, uint16_t ) >; - } +namespace Scripting { +using EventReturnCallback = std::function< void( Entity::Player&, uint32_t, uint16_t, uint16_t, uint16_t, + uint16_t ) >; +} - using ActionCallback = std::function< void( Entity::Player&, uint32_t, uint64_t ) >; +using ActionCallback = std::function< void( Entity::Player&, uint32_t, uint64_t ) >; } diff --git a/src/servers/sapphire_api/LoginSession.cpp b/src/servers/sapphire_api/LoginSession.cpp index d403ed37..ed9dcf5a 100644 --- a/src/servers/sapphire_api/LoginSession.cpp +++ b/src/servers/sapphire_api/LoginSession.cpp @@ -1,12 +1,15 @@ #include "LoginSession.h" + namespace Core { - LoginSession::LoginSession(void) { - //setSocket(NULL); +LoginSession::LoginSession( void ) +{ + //setSocket(NULL); - } - - LoginSession::~LoginSession(void) { - - } +} + +LoginSession::~LoginSession( void ) +{ + +} } diff --git a/src/servers/sapphire_api/LoginSession.h b/src/servers/sapphire_api/LoginSession.h index b74fd8fe..3b71802a 100644 --- a/src/servers/sapphire_api/LoginSession.h +++ b/src/servers/sapphire_api/LoginSession.h @@ -9,50 +9,57 @@ namespace Core { - class LoginSession { +class LoginSession +{ - private: - uint32_t m_IP; - uint32_t m_accountID; +private: + uint32_t m_IP; + uint32_t m_accountID; - uint8_t m_sessionId[56]; + uint8_t m_sessionId[56]; - public: +public: - std::string newCharName; + std::string newCharName; - LoginSession(void); - ~LoginSession(void); + LoginSession( void ); - uint32_t getIP() { - return m_IP; - } + ~LoginSession( void ); - void setSessionId(uint8_t * sessionId) { - memcpy(m_sessionId, sessionId, 56); - } + uint32_t getIP() + { + return m_IP; + } - void setIP(uint32_t iP) { - m_IP = iP; - } + void setSessionId( uint8_t* sessionId ) + { + memcpy( m_sessionId, sessionId, 56 ); + } - uint32_t getAccountID() { - return m_accountID; - } + void setIP( uint32_t iP ) + { + m_IP = iP; + } - void setAccountID(uint32_t iD) { - m_accountID = iD; - } + uint32_t getAccountID() + { + return m_accountID; + } - /*INLINE CLobbySocket* getSocket() { - return m_pGS; - } + void setAccountID( uint32_t iD ) + { + m_accountID = iD; + } - INLINE void setSocket(CLobbySocket * pS) { - m_pGS = pS; - }*/ + /*INLINE CLobbySocket* getSocket() { + return m_pGS; + } - }; + INLINE void setSocket(CLobbySocket * pS) { + m_pGS = pS; + }*/ + +}; } diff --git a/src/servers/sapphire_api/PlayerMinimal.cpp b/src/servers/sapphire_api/PlayerMinimal.cpp index 704d49a3..af1bca19 100644 --- a/src/servers/sapphire_api/PlayerMinimal.cpp +++ b/src/servers/sapphire_api/PlayerMinimal.cpp @@ -10,400 +10,406 @@ extern Core::Data::ExdDataGenerated g_exdDataGen; namespace Core { - using namespace Common; +using namespace Common; - // player constructor - PlayerMinimal::PlayerMinimal( void ) : m_id( 0 ) - { +// player constructor +PlayerMinimal::PlayerMinimal( void ) : + m_id( 0 ) +{ - } - - // deconstructor - PlayerMinimal::~PlayerMinimal( void ) - { - - } - - // load player from the db - // TODO change void CPlayer::load to bool, we want to know if something went wrong - void PlayerMinimal::load( uint32_t charId ) - { - - auto stmt = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_SEL_MINIMAL ); - - stmt->setUInt( 1, charId ); - auto res = g_charaDb.query( stmt ); - - if( !res->next() ) - return; - - m_id = charId; - - memset( m_name, 0, 32 ); - - strcpy( m_name, res->getString( "Name" ).c_str() ); - - auto customize = res->getBlobVector( "Customize" ); - memcpy( (char*)m_look, customize.data(), customize.size() ); - for( int32_t i = 0; i < 26; i++ ) - { - m_lookMap[i] = m_look[i]; - } - - auto modelEquip = res->getBlobVector( "ModelEquip" ); - memcpy( (char*)m_modelEquip, modelEquip.data(), modelEquip.size() ); - - - setBirthDay( res->getUInt8( "BirthDay" ), res->getUInt8( "BirthMonth" ) ); - m_guardianDeity = res->getUInt8( "GuardianDeity" ); - m_class = res->getUInt8( "Class" ); - m_contentId = res->getUInt64( "ContentId" ); - m_zoneId = res->getUInt8( "TerritoryId" ); - - // SELECT ClassIdx, Exp, Lvl - auto stmtClass = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_SEL_MINIMAL ); - stmtClass->setInt( 1, m_id ); - - auto resClass = g_charaDb.query( stmt ); - - while( resClass->next() ) - { - m_classMap[resClass->getUInt( 1 )] = resClass->getUInt( 3 ); - } - } - - - std::string PlayerMinimal::getLookString() - { - - auto it = m_lookMap.begin(); - - std::string lookString; - - for( ; it != m_lookMap.end(); ++it ) - { - - std::string s = std::to_string( it->second ); - - lookString += "\"" + s + "\""; - if( it != m_lookMap.end() ) - { - lookString += ","; - } - } - - return lookString.substr( 0, lookString.size() - 1 ); - } - - std::string PlayerMinimal::getModelString() - { - std::string modelString = "\"" - + std::to_string( m_modelEquip[2] ) + "\",\"" - + std::to_string( m_modelEquip[3] ) + "\",\"" - + std::to_string( m_modelEquip[4] ) + "\",\"" - + std::to_string( m_modelEquip[6] ) + "\",\"" - + std::to_string( m_modelEquip[7] ) + "\",\"5\",\"6\",\"7\",\"8\",\"9\""; - return modelString; - } - - std::string PlayerMinimal::getInfoJson() - { - std::string charDetails = "{\"content\":[\"" + std::string( getName() ) + "\"," + - //"[" + getClassString() + "]," + - "[\"0\",\"0\",\"0\",\"0\",\"0\",\"1\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"]," - "\"0\",\"0\",\"0\",\"" + - std::to_string( getBirthMonth() ) + - "\",\"" + std::to_string( getBirthDay() ) + - "\",\"" + std::to_string( getGuardianDeity() ) + - "\",\"" + std::to_string( m_class ) + - "\",\"0\",\"" + std::to_string( getZoneId() ) + - "\",\"0\"," + - - "[" + getLookString() + "]," + - "\"0\",\"0\"," + - "[" + getModelString() + "]," + - "\"1\",\"0\",\"0\",\"0\",\"0\",\"0\",\"\",\"0\",\"0\"]," + - "\"classname\":\"ClientSelectData\",\"classid\":116}"; - return charDetails; - } - - std::string PlayerMinimal::getClassString() - { - - std::map::iterator it; - - it = m_classMap.begin(); - - std::string classString; - - for( ; it != m_classMap.end(); ++it ) - { - - std::string s = std::to_string( it->second ); - - classString += "\"" + s + "\""; - if( it != m_classMap.end() ) - { - classString += ","; - } - } - - return classString.substr( 0, classString.size() - 1 ); - } - - void PlayerMinimal::saveAsNew() - { - - std::vector< uint8_t > customize( 26 ); - std::vector< uint8_t > howTo( 33 ); - std::vector< uint8_t > aetherytes( 16 ); - std::vector< uint8_t > discovery( 421 ); - std::vector< uint8_t > questComplete( 396 ); - std::vector< uint8_t > unlocks( 64 ); - std::vector< uint8_t > mountGuide( 15 ); - std::vector< uint8_t > orchestrion( 40 ); - std::vector< uint8_t > modelEquip( 40 ); - std::vector< uint8_t > questTracking8( 10 ); - std::vector< int16_t > questTracking = { -1, -1, -1, -1, -1 }; - - memset( questComplete.data(), 0, questComplete.size() ); - - memcpy( questTracking8.data(), questTracking.data(), questTracking8.size() ); - - for( uint32_t i = 0; i < m_lookMap.size(); i++ ) - { - customize[i] = m_lookMap[i]; - } - - uint32_t equipModel[10]; - memset( equipModel, 0, 40 ); - memcpy( modelEquip.data(), equipModel, modelEquip.size() ); - - uint32_t startZone; - float x, y, z, o; - int32_t startTown = 0; - - switch( static_cast< Core::Common::ClassJob >( m_class ) ) - { - case Core::Common::ClassJob::Conjurer: - case Core::Common::ClassJob::Lancer: - case Core::Common::ClassJob::Archer: - x = 127.0f; - y = -13.0f; - z = 147.0f; - o = -2.1f; - startZone = 183; - startTown = 2; - break; - - case Core::Common::ClassJob::Marauder: - case Core::Common::ClassJob::Arcanist: - x = -53.0f; - y = 18.0f; - z = 0.0f; - o = 1.5f; - startTown = 1; - startZone = 181; - break; - - case Core::Common::ClassJob::Thaumaturge: - case Core::Common::ClassJob::Pugilist: - case Core::Common::ClassJob::Gladiator: - x = 42.0f; - y = 4.0f; - z = -157.6f; - o = -0.3f; - startTown = 3; - startZone = 182; - break; - - default: - break; - } - - // "(AccountId, CharacterId, ContentId, Name, Hp, Mp, " - // "Customize, Voice, IsNewGame, TerritoryId, PosX, PosY, PosZ, PosR, ModelEquip, " - // "IsNewAdventurer, GuardianDeity, Birthday, BirthMonth, Class, Status, FirstClass, " - // "HomePoint, StartTown, Discovery, HowTo, QuestCompleteFlags, Unlocks, QuestTracking, " - // "Aetheryte, GMRank, UPDATE_DATE ) - - // CharacterId, ClassIdx, Exp, Lvl - auto stmtClass = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_CLASS_INS ); - stmtClass->setInt( 1, m_id ); - stmtClass->setInt( 2, g_exdDataGen.get< Core::Data::ClassJob >( m_class )->expArrayIndex ); - stmtClass->setInt( 3, 0 ); - stmtClass->setInt( 4, 1 ); - g_charaDb.directExecute( stmtClass ); - - auto stmt = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_INS ); - stmt->setInt( 1, m_accountId ); - stmt->setInt( 2, m_id ); - stmt->setInt64( 3, m_contentId ); - stmt->setString( 4, std::string( m_name ) ); - stmt->setInt( 5, 100 ); - stmt->setInt( 6, 100 ); - stmt->setBinary( 7, customize ); - stmt->setInt( 8, m_voice ); - stmt->setInt( 9, 1 ); - stmt->setInt( 10, startZone ); - stmt->setDouble( 11, x ); - stmt->setDouble( 12, y ); - stmt->setDouble( 13, z ); - stmt->setDouble( 14, o ); - stmt->setBinary( 15, modelEquip ); - stmt->setInt( 16, 1 ); - stmt->setInt( 17, m_guardianDeity ); - stmt->setInt( 18, m_birthDay ); - stmt->setInt( 19, m_birthMonth ); - stmt->setInt( 20, m_class ); - stmt->setInt( 21, 1 ); - stmt->setInt( 22, m_class ); - stmt->setInt( 23, 2 ); - stmt->setInt( 24, startTown ); - stmt->setBinary( 25, discovery ); - stmt->setBinary( 26, howTo ); - stmt->setBinary( 27, questComplete ); - stmt->setBinary( 28, unlocks ); - stmt->setBinary( 29, questTracking8 ); - stmt->setBinary( 30, aetherytes ); - stmt->setInt( 31, m_gmRank ); - stmt->setBinary( 32, mountGuide ); - stmt->setBinary( 33, orchestrion ); - g_charaDb.directExecute( stmt ); - - auto stmtSearchInfo = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_SEARCHINFO_INS ); - stmtSearchInfo->setInt( 1, m_id ); - g_charaDb.directExecute( stmtSearchInfo ); - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// SET UP INVENTORIES - createInvDbContainer( InventoryType::Bag0 ); - createInvDbContainer( InventoryType::Bag1 ); - createInvDbContainer( InventoryType::Bag2 ); - createInvDbContainer( InventoryType::Bag3 ); - - createInvDbContainer( InventoryType::ArmoryOff ); - - createInvDbContainer( InventoryType::ArmoryHead ); - createInvDbContainer( InventoryType::ArmoryBody ); - createInvDbContainer( InventoryType::ArmoryHand ); - createInvDbContainer( InventoryType::ArmoryWaist ); - createInvDbContainer( InventoryType::ArmoryLegs ); - createInvDbContainer( InventoryType::ArmoryFeet ); - - createInvDbContainer( InventoryType::ArmoryNeck ); - createInvDbContainer( InventoryType::ArmoryEar ); - createInvDbContainer( InventoryType::ArmoryWrist ); - createInvDbContainer( InventoryType::ArmoryRing ); - createInvDbContainer( InventoryType::ArmoryMain ); - - createInvDbContainer( InventoryType::Currency ); - createInvDbContainer( InventoryType::Crystal ); - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// SETUP EQUIPMENT / STARTING GEAR - auto classJobInfo = g_exdDataGen.get< Core::Data::ClassJob >( m_class ); - uint32_t weaponId = classJobInfo->itemStartingWeapon; - uint64_t uniqueId = getNextUId64(); - - uint8_t race = customize[CharaLook::Race]; - uint8_t gender = customize[CharaLook::Gender]; - - auto raceInfo = g_exdDataGen.get< Core::Data::Race >( race ); - - uint32_t body; - uint32_t hands; - uint32_t legs; - uint32_t feet; - uint64_t bodyUid = getNextUId64(); - uint64_t handsUid = getNextUId64(); - uint64_t legsUid = getNextUId64(); - uint64_t feetUid = getNextUId64(); - - if( gender == 0 ) - { - body = raceInfo->rSEMBody; - hands = raceInfo->rSEMHands; - legs = raceInfo->rSEMLegs; - feet = raceInfo->rSEMFeet; - } - else - { - body = raceInfo->rSEFBody; - hands = raceInfo->rSEFHands; - legs = raceInfo->rSEFLegs; - feet = raceInfo->rSEFFeet; - } - - insertDbGlobalItem( weaponId, uniqueId ); - insertDbGlobalItem( body, bodyUid ); - insertDbGlobalItem( hands, handsUid ); - insertDbGlobalItem( legs, legsUid ); - insertDbGlobalItem( feet, feetUid ); - - // Universal accessories - - uint64_t neckUid = getNextUId64(); - uint64_t earUid = getNextUId64(); - uint64_t wristUid = getNextUId64(); - uint64_t ringUid = getNextUId64(); - - - insertDbGlobalItem( 15130, neckUid ); - insertDbGlobalItem( 15131, earUid ); - insertDbGlobalItem( 15132, wristUid ); - insertDbGlobalItem( 15133, ringUid ); - - g_charaDb.execute( "INSERT INTO charaitemgearset (storageId, CharacterId, " - "container_" + std::to_string( GearSetSlot::MainHand ) + ", " - "container_" + std::to_string( GearSetSlot::Body ) + ", " - "container_" + std::to_string( GearSetSlot::Hands ) + ", " - "container_" + std::to_string( GearSetSlot::Legs ) + ", " - "container_" + std::to_string( GearSetSlot::Feet ) + ", " - "container_" + std::to_string( GearSetSlot::Neck ) + ", " - "container_" + std::to_string( GearSetSlot::Ear ) + ", " - "container_" + std::to_string( GearSetSlot::Wrist ) + ", " - "container_" + std::to_string( GearSetSlot::Ring1 ) + ", " - "UPDATE_DATE ) " - "VALUES ( " + std::to_string( InventoryType::GearSet0 ) + ", " + std::to_string( m_id ) + ", " + - std::to_string( uniqueId ) + ", " + - std::to_string( bodyUid ) + ", " + - std::to_string( handsUid ) + ", " + - std::to_string( legsUid ) + ", " + - std::to_string( feetUid ) + ", " + - std::to_string( neckUid ) + ", " + - std::to_string( earUid ) + ", " + - std::to_string( wristUid ) + ", " + - std::to_string( ringUid ) + ", NOW());" ); - - } - - void PlayerMinimal::insertDbGlobalItem( uint32_t itemId, uint64_t uniqueId ) const - { - auto stmtItemGlobal = g_charaDb.getPreparedStatement( Db::CHARA_ITEMGLOBAL_INS ); - stmtItemGlobal->setInt( 1, m_id ); - stmtItemGlobal->setInt64( 2, uniqueId ); - stmtItemGlobal->setInt( 3, itemId ); - g_charaDb.directExecute( stmtItemGlobal ); - } - - void PlayerMinimal::createInvDbContainer( uint16_t slot ) const - { - auto stmtCreateInv = g_charaDb.getPreparedStatement( Db::CHARA_ITEMINV_INS ); - stmtCreateInv->setInt( 1, m_id ); - stmtCreateInv->setInt( 2, slot ); - g_charaDb.directExecute( stmtCreateInv ); - } - - uint64_t PlayerMinimal::getNextUId64() const - { - g_charaDb.directExecute( std::string( "INSERT INTO uniqueiddata( IdName ) VALUES( 'NOT_SET' );" ) ); - auto res = g_charaDb.query( "SELECT LAST_INSERT_ID();" ); - - if( !res->next() ) - return 0; - - return res->getUInt64( 1 ); - } +} + +// deconstructor +PlayerMinimal::~PlayerMinimal( void ) +{ + +} + +// load player from the db +// TODO change void CPlayer::load to bool, we want to know if something went wrong +void PlayerMinimal::load( uint32_t charId ) +{ + + auto stmt = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_SEL_MINIMAL ); + + stmt->setUInt( 1, charId ); + auto res = g_charaDb.query( stmt ); + + if( !res->next() ) + return; + + m_id = charId; + + memset( m_name, 0, 32 ); + + strcpy( m_name, res->getString( "Name" ).c_str() ); + + auto customize = res->getBlobVector( "Customize" ); + memcpy( ( char* ) m_look, customize.data(), customize.size() ); + for( int32_t i = 0; i < 26; i++ ) + { + m_lookMap[ i ] = m_look[ i ]; + } + + auto modelEquip = res->getBlobVector( "ModelEquip" ); + memcpy( ( char* ) m_modelEquip, modelEquip.data(), modelEquip.size() ); + + + setBirthDay( res->getUInt8( "BirthDay" ), res->getUInt8( "BirthMonth" ) ); + m_guardianDeity = res->getUInt8( "GuardianDeity" ); + m_class = res->getUInt8( "Class" ); + m_contentId = res->getUInt64( "ContentId" ); + m_zoneId = res->getUInt8( "TerritoryId" ); + + // SELECT ClassIdx, Exp, Lvl + auto stmtClass = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_SEL_MINIMAL ); + stmtClass->setInt( 1, m_id ); + + auto resClass = g_charaDb.query( stmt ); + + while( resClass->next() ) + { + m_classMap[ resClass->getUInt( 1 ) ] = resClass->getUInt( 3 ); + } +} + + +std::string PlayerMinimal::getLookString() +{ + + auto it = m_lookMap.begin(); + + std::string lookString; + + for( ; it != m_lookMap.end(); ++it ) + { + + std::string s = std::to_string( it->second ); + + lookString += "\"" + s + "\""; + if( it != m_lookMap.end() ) + { + lookString += ","; + } + } + + return lookString.substr( 0, lookString.size() - 1 ); +} + +std::string PlayerMinimal::getModelString() +{ + std::string modelString = "\"" + + std::to_string( m_modelEquip[ 2 ] ) + "\",\"" + + std::to_string( m_modelEquip[ 3 ] ) + "\",\"" + + std::to_string( m_modelEquip[ 4 ] ) + "\",\"" + + std::to_string( m_modelEquip[ 6 ] ) + "\",\"" + + std::to_string( m_modelEquip[ 7 ] ) + "\",\"5\",\"6\",\"7\",\"8\",\"9\""; + return modelString; +} + +std::string PlayerMinimal::getInfoJson() +{ + std::string charDetails = "{\"content\":[\"" + std::string( getName() ) + "\"," + + //"[" + getClassString() + "]," + + "[\"0\",\"0\",\"0\",\"0\",\"0\",\"1\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"]," + "\"0\",\"0\",\"0\",\"" + + std::to_string( getBirthMonth() ) + + "\",\"" + std::to_string( getBirthDay() ) + + "\",\"" + std::to_string( getGuardianDeity() ) + + "\",\"" + std::to_string( m_class ) + + "\",\"0\",\"" + std::to_string( getZoneId() ) + + "\",\"0\"," + + + "[" + getLookString() + "]," + + "\"0\",\"0\"," + + "[" + getModelString() + "]," + + "\"1\",\"0\",\"0\",\"0\",\"0\",\"0\",\"\",\"0\",\"0\"]," + + "\"classname\":\"ClientSelectData\",\"classid\":116}"; + return charDetails; +} + +std::string PlayerMinimal::getClassString() +{ + + std::map< uint8_t, uint16_t >::iterator it; + + it = m_classMap.begin(); + + std::string classString; + + for( ; it != m_classMap.end(); ++it ) + { + + std::string s = std::to_string( it->second ); + + classString += "\"" + s + "\""; + if( it != m_classMap.end() ) + { + classString += ","; + } + } + + return classString.substr( 0, classString.size() - 1 ); +} + +void PlayerMinimal::saveAsNew() +{ + + std::vector< uint8_t > customize( 26 ); + std::vector< uint8_t > howTo( 33 ); + std::vector< uint8_t > aetherytes( 16 ); + std::vector< uint8_t > discovery( 421 ); + std::vector< uint8_t > questComplete( 396 ); + std::vector< uint8_t > unlocks( 64 ); + std::vector< uint8_t > mountGuide( 15 ); + std::vector< uint8_t > orchestrion( 40 ); + std::vector< uint8_t > modelEquip( 40 ); + std::vector< uint8_t > questTracking8( 10 ); + std::vector< int16_t > questTracking = { -1, -1, -1, -1, -1 }; + + memset( questComplete.data(), 0, questComplete.size() ); + + memcpy( questTracking8.data(), questTracking.data(), questTracking8.size() ); + + for( uint32_t i = 0; i < m_lookMap.size(); i++ ) + { + customize[ i ] = m_lookMap[ i ]; + } + + uint32_t equipModel[10]; + memset( equipModel, 0, 40 ); + memcpy( modelEquip.data(), equipModel, modelEquip.size() ); + + uint32_t startZone; + float x, y, z, o; + int32_t startTown = 0; + + switch( static_cast< Core::Common::ClassJob >( m_class ) ) + { + case Core::Common::ClassJob::Conjurer: + case Core::Common::ClassJob::Lancer: + case Core::Common::ClassJob::Archer: + x = 127.0f; + y = -13.0f; + z = 147.0f; + o = -2.1f; + startZone = 183; + startTown = 2; + break; + + case Core::Common::ClassJob::Marauder: + case Core::Common::ClassJob::Arcanist: + x = -53.0f; + y = 18.0f; + z = 0.0f; + o = 1.5f; + startTown = 1; + startZone = 181; + break; + + case Core::Common::ClassJob::Thaumaturge: + case Core::Common::ClassJob::Pugilist: + case Core::Common::ClassJob::Gladiator: + x = 42.0f; + y = 4.0f; + z = -157.6f; + o = -0.3f; + startTown = 3; + startZone = 182; + break; + + default: + break; + } + + // "(AccountId, CharacterId, ContentId, Name, Hp, Mp, " + // "Customize, Voice, IsNewGame, TerritoryId, PosX, PosY, PosZ, PosR, ModelEquip, " + // "IsNewAdventurer, GuardianDeity, Birthday, BirthMonth, Class, Status, FirstClass, " + // "HomePoint, StartTown, Discovery, HowTo, QuestCompleteFlags, Unlocks, QuestTracking, " + // "Aetheryte, GMRank, UPDATE_DATE ) + + // CharacterId, ClassIdx, Exp, Lvl + auto stmtClass = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_CLASS_INS ); + stmtClass->setInt( 1, m_id ); + stmtClass->setInt( 2, g_exdDataGen.get< Core::Data::ClassJob >( m_class )->expArrayIndex ); + stmtClass->setInt( 3, 0 ); + stmtClass->setInt( 4, 1 ); + g_charaDb.directExecute( stmtClass ); + + auto stmt = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_INS ); + stmt->setInt( 1, m_accountId ); + stmt->setInt( 2, m_id ); + stmt->setInt64( 3, m_contentId ); + stmt->setString( 4, std::string( m_name ) ); + stmt->setInt( 5, 100 ); + stmt->setInt( 6, 100 ); + stmt->setBinary( 7, customize ); + stmt->setInt( 8, m_voice ); + stmt->setInt( 9, 1 ); + stmt->setInt( 10, startZone ); + stmt->setDouble( 11, x ); + stmt->setDouble( 12, y ); + stmt->setDouble( 13, z ); + stmt->setDouble( 14, o ); + stmt->setBinary( 15, modelEquip ); + stmt->setInt( 16, 1 ); + stmt->setInt( 17, m_guardianDeity ); + stmt->setInt( 18, m_birthDay ); + stmt->setInt( 19, m_birthMonth ); + stmt->setInt( 20, m_class ); + stmt->setInt( 21, 1 ); + stmt->setInt( 22, m_class ); + stmt->setInt( 23, 2 ); + stmt->setInt( 24, startTown ); + stmt->setBinary( 25, discovery ); + stmt->setBinary( 26, howTo ); + stmt->setBinary( 27, questComplete ); + stmt->setBinary( 28, unlocks ); + stmt->setBinary( 29, questTracking8 ); + stmt->setBinary( 30, aetherytes ); + stmt->setInt( 31, m_gmRank ); + stmt->setBinary( 32, mountGuide ); + stmt->setBinary( 33, orchestrion ); + g_charaDb.directExecute( stmt ); + + auto stmtSearchInfo = g_charaDb.getPreparedStatement( Db::CharaDbStatements::CHARA_SEARCHINFO_INS ); + stmtSearchInfo->setInt( 1, m_id ); + g_charaDb.directExecute( stmtSearchInfo ); + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// SET UP INVENTORIES + createInvDbContainer( InventoryType::Bag0 ); + createInvDbContainer( InventoryType::Bag1 ); + createInvDbContainer( InventoryType::Bag2 ); + createInvDbContainer( InventoryType::Bag3 ); + + createInvDbContainer( InventoryType::ArmoryOff ); + + createInvDbContainer( InventoryType::ArmoryHead ); + createInvDbContainer( InventoryType::ArmoryBody ); + createInvDbContainer( InventoryType::ArmoryHand ); + createInvDbContainer( InventoryType::ArmoryWaist ); + createInvDbContainer( InventoryType::ArmoryLegs ); + createInvDbContainer( InventoryType::ArmoryFeet ); + + createInvDbContainer( InventoryType::ArmoryNeck ); + createInvDbContainer( InventoryType::ArmoryEar ); + createInvDbContainer( InventoryType::ArmoryWrist ); + createInvDbContainer( InventoryType::ArmoryRing ); + createInvDbContainer( InventoryType::ArmoryMain ); + + createInvDbContainer( InventoryType::Currency ); + createInvDbContainer( InventoryType::Crystal ); + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// SETUP EQUIPMENT / STARTING GEAR + auto classJobInfo = g_exdDataGen.get< Core::Data::ClassJob >( m_class ); + uint32_t weaponId = classJobInfo->itemStartingWeapon; + uint64_t uniqueId = getNextUId64(); + + uint8_t race = customize[ CharaLook::Race ]; + uint8_t gender = customize[ CharaLook::Gender ]; + + auto raceInfo = g_exdDataGen.get< Core::Data::Race >( race ); + + uint32_t body; + uint32_t hands; + uint32_t legs; + uint32_t feet; + uint64_t bodyUid = getNextUId64(); + uint64_t handsUid = getNextUId64(); + uint64_t legsUid = getNextUId64(); + uint64_t feetUid = getNextUId64(); + + if( gender == 0 ) + { + body = raceInfo->rSEMBody; + hands = raceInfo->rSEMHands; + legs = raceInfo->rSEMLegs; + feet = raceInfo->rSEMFeet; + } + else + { + body = raceInfo->rSEFBody; + hands = raceInfo->rSEFHands; + legs = raceInfo->rSEFLegs; + feet = raceInfo->rSEFFeet; + } + + insertDbGlobalItem( weaponId, uniqueId ); + insertDbGlobalItem( body, bodyUid ); + insertDbGlobalItem( hands, handsUid ); + insertDbGlobalItem( legs, legsUid ); + insertDbGlobalItem( feet, feetUid ); + + // Universal accessories + + uint64_t neckUid = getNextUId64(); + uint64_t earUid = getNextUId64(); + uint64_t wristUid = getNextUId64(); + uint64_t ringUid = getNextUId64(); + + + insertDbGlobalItem( 15130, neckUid ); + insertDbGlobalItem( 15131, earUid ); + insertDbGlobalItem( 15132, wristUid ); + insertDbGlobalItem( 15133, ringUid ); + + g_charaDb.execute( "INSERT INTO charaitemgearset (storageId, CharacterId, " + "container_" + std::to_string( GearSetSlot::MainHand ) + ", " + "container_" + + std::to_string( GearSetSlot::Body ) + ", " + "container_" + std::to_string( GearSetSlot::Hands ) + ", " + "container_" + + std::to_string( GearSetSlot::Legs ) + ", " + "container_" + std::to_string( GearSetSlot::Feet ) + ", " + "container_" + + std::to_string( GearSetSlot::Neck ) + ", " + "container_" + std::to_string( GearSetSlot::Ear ) + ", " + "container_" + + std::to_string( GearSetSlot::Wrist ) + ", " + "container_" + std::to_string( GearSetSlot::Ring1 ) + ", " + "UPDATE_DATE ) " + "VALUES ( " + + std::to_string( InventoryType::GearSet0 ) + ", " + std::to_string( m_id ) + ", " + + std::to_string( uniqueId ) + ", " + + std::to_string( bodyUid ) + ", " + + std::to_string( handsUid ) + ", " + + std::to_string( legsUid ) + ", " + + std::to_string( feetUid ) + ", " + + std::to_string( neckUid ) + ", " + + std::to_string( earUid ) + ", " + + std::to_string( wristUid ) + ", " + + std::to_string( ringUid ) + ", NOW());" ); + +} + +void PlayerMinimal::insertDbGlobalItem( uint32_t itemId, uint64_t uniqueId ) const +{ + auto stmtItemGlobal = g_charaDb.getPreparedStatement( Db::CHARA_ITEMGLOBAL_INS ); + stmtItemGlobal->setInt( 1, m_id ); + stmtItemGlobal->setInt64( 2, uniqueId ); + stmtItemGlobal->setInt( 3, itemId ); + g_charaDb.directExecute( stmtItemGlobal ); +} + +void PlayerMinimal::createInvDbContainer( uint16_t slot ) const +{ + auto stmtCreateInv = g_charaDb.getPreparedStatement( Db::CHARA_ITEMINV_INS ); + stmtCreateInv->setInt( 1, m_id ); + stmtCreateInv->setInt( 2, slot ); + g_charaDb.directExecute( stmtCreateInv ); +} + +uint64_t PlayerMinimal::getNextUId64() const +{ + g_charaDb.directExecute( std::string( "INSERT INTO uniqueiddata( IdName ) VALUES( 'NOT_SET' );" ) ); + auto res = g_charaDb.query( "SELECT LAST_INSERT_ID();" ); + + if( !res->next() ) + return 0; + + return res->getUInt64( 1 ); +} } diff --git a/src/servers/sapphire_api/PlayerMinimal.h b/src/servers/sapphire_api/PlayerMinimal.h index e2af647d..d9105a8b 100644 --- a/src/servers/sapphire_api/PlayerMinimal.h +++ b/src/servers/sapphire_api/PlayerMinimal.h @@ -4,195 +4,197 @@ #include #include #include + namespace Core { - class PlayerMinimal - { - public: - PlayerMinimal( void ); - ~PlayerMinimal( void ); +class PlayerMinimal +{ +public: + PlayerMinimal( void ); - // write player to the database - void write(); + ~PlayerMinimal( void ); - // load player from db, by id - void load( uint32_t charId ); + // write player to the database + void write(); - void saveAsNew(); + // load player from db, by id + void load( uint32_t charId ); - std::string getLookString(); + void saveAsNew(); - std::string getInfoJson(); + std::string getLookString(); - std::string getModelString(); + std::string getInfoJson(); - std::string getClassString(); + std::string getModelString(); - // return the id of the actor - uint32_t getId() const - { - return m_id; - } + std::string getClassString(); - void setId( uint32_t id ) - { - m_id = id; - } + // return the id of the actor + uint32_t getId() const + { + return m_id; + } - void setContentId( uint64_t id ) - { - m_contentId = id; - } + void setId( uint32_t id ) + { + m_id = id; + } - uint64_t getContentId() const - { - return m_contentId; - } + void setContentId( uint64_t id ) + { + m_contentId = id; + } + + uint64_t getContentId() const + { + return m_contentId; + } - uint32_t getAccountId() const - { - return m_accountId; - } + uint32_t getAccountId() const + { + return m_accountId; + } - void setAccountId( uint32_t accountId ) - { - m_accountId = accountId; - } + void setAccountId( uint32_t accountId ) + { + m_accountId = accountId; + } - // return the actors name - char * getName() - { - return m_name; - } + // return the actors name + char* getName() + { + return m_name; + } - void setLook( uint8_t index, uint32_t value ) - { - m_lookMap[index] = value; - } + void setLook( uint8_t index, uint32_t value ) + { + m_lookMap[ index ] = value; + } - // return the actors name - void setName( const char* name ) - { - strcpy( m_name, name ); - } + // return the actors name + void setName( const char* name ) + { + strcpy( m_name, name ); + } - void setClass( uint8_t classId ) - { - m_class = classId; - } + void setClass( uint8_t classId ) + { + m_class = classId; + } - uint8_t getClass() const - { - return m_class; - } + uint8_t getClass() const + { + return m_class; + } - uint8_t getGuardianDeity() const - { - return m_guardianDeity; - } + uint8_t getGuardianDeity() const + { + return m_guardianDeity; + } - void setGuardianDeity( uint8_t guardianId ) - { - m_guardianDeity = guardianId; - } + void setGuardianDeity( uint8_t guardianId ) + { + m_guardianDeity = guardianId; + } - void setBirthDay( uint8_t day, uint8_t month ) - { - m_birthDay = day; - m_birthMonth = month; - } + void setBirthDay( uint8_t day, uint8_t month ) + { + m_birthDay = day; + m_birthMonth = month; + } - uint8_t getBirthDay() const - { - return m_birthDay; - } + uint8_t getBirthDay() const + { + return m_birthDay; + } - uint8_t getBirthMonth() const - { - return m_birthMonth; - } + uint8_t getBirthMonth() const + { + return m_birthMonth; + } - uint8_t getVoice() const - { - return m_birthMonth; - } + uint8_t getVoice() const + { + return m_birthMonth; + } - void setVoice( uint8_t voice ) - { - m_voice = voice; - } + void setVoice( uint8_t voice ) + { + m_voice = voice; + } - uint32_t getZoneId() const - { - return m_zoneId; - } + uint32_t getZoneId() const + { + return m_zoneId; + } - uint32_t getTribe() const - { - return m_tribe; - } + uint32_t getTribe() const + { + return m_tribe; + } - void setTribe( uint8_t tribe ) - { - m_tribe = tribe; - } + void setTribe( uint8_t tribe ) + { + m_tribe = tribe; + } - uint8_t getGmRank() const - { - return m_gmRank; - } + uint8_t getGmRank() const + { + return m_gmRank; + } - void setGmRank( uint8_t rank ) - { - m_gmRank = rank; - } + void setGmRank( uint8_t rank ) + { + m_gmRank = rank; + } - bool getGmInvis() const - { - return m_gmInvis; - } + bool getGmInvis() const + { + return m_gmInvis; + } - void setGmInvis( bool invis ) - { - m_gmInvis = invis; - } + void setGmInvis( bool invis ) + { + m_gmInvis = invis; + } - void createInvDbContainer( uint16_t slot ) const; + void createInvDbContainer( uint16_t slot ) const; - uint32_t m_modelEquip[10]; + uint32_t m_modelEquip[10]; - uint64_t getNextUId64() const; + uint64_t getNextUId64() const; - private: - uint32_t m_accountId; - uint32_t m_id; - uint64_t m_contentId; +private: + uint32_t m_accountId; + uint32_t m_id; + uint64_t m_contentId; - uint8_t m_guardianDeity; - uint8_t m_birthMonth; - uint8_t m_birthDay; - uint8_t m_class; + uint8_t m_guardianDeity; + uint8_t m_birthMonth; + uint8_t m_birthDay; + uint8_t m_class; - uint8_t m_voice; + uint8_t m_voice; - uint8_t m_tribe; + uint8_t m_tribe; - uint16_t m_zoneId; + uint16_t m_zoneId; - std::map< uint8_t, uint8_t > m_lookMap; - std::map< uint8_t, uint16_t > m_classMap; - uint8_t m_look[26]; + std::map< uint8_t, uint8_t > m_lookMap; + std::map< uint8_t, uint16_t > m_classMap; + uint8_t m_look[26]; - uint8_t m_gmRank; - bool m_gmInvis; + uint8_t m_gmRank; + bool m_gmInvis; - char m_name[34]; + char m_name[34]; - void insertDbGlobalItem( uint32_t itemId, uint64_t uniqueId ) const; - }; + void insertDbGlobalItem( uint32_t itemId, uint64_t uniqueId ) const; +}; } #endif diff --git a/src/servers/sapphire_api/SapphireAPI.cpp b/src/servers/sapphire_api/SapphireAPI.cpp index 40c13e8b..28338026 100644 --- a/src/servers/sapphire_api/SapphireAPI.cpp +++ b/src/servers/sapphire_api/SapphireAPI.cpp @@ -5,6 +5,7 @@ #include #define BOOST_SPIRIT_THREADSAFE + #include #include #include @@ -16,276 +17,280 @@ Core::Network::SapphireAPI::SapphireAPI() { - + } Core::Network::SapphireAPI::~SapphireAPI() { - + } bool Core::Network::SapphireAPI::login( const std::string& username, const std::string& pass, std::string& sId ) { - std::string query = "SELECT account_id FROM accounts WHERE account_name = '" + username + "' AND account_pass = '" + pass + "';"; - - // check if a user with that name / password exists - auto pQR = g_charaDb.query( query ); - // found? - if( !pQR->next() ) - return false; + std::string query = + "SELECT account_id FROM accounts WHERE account_name = '" + username + "' AND account_pass = '" + pass + "';"; - // user found, proceed - uint32_t accountId = pQR->getUInt( 1 ); + // check if a user with that name / password exists + auto pQR = g_charaDb.query( query ); + // found? + if( !pQR->next() ) + return false; - // session id string generation - srand( ( uint32_t )time( NULL ) + 42 ); - uint8_t sid[58]; + // user found, proceed + uint32_t accountId = pQR->getUInt( 1 ); - for( int32_t i = 0; i < 56; i += 4 ) - { - short number = 0x1111 + rand() % 0xFFFF; - sprintf( ( char* )sid + i, "%04hx", number ); - } + // session id string generation + srand( ( uint32_t ) time( NULL ) + 42 ); + uint8_t sid[58]; - // create session for the new sessionid and store to sessionlist - auto pSession = boost::make_shared< Session >(); - pSession->setAccountId( accountId ); - pSession->setSessionId( sid ); + for( int32_t i = 0; i < 56; i += 4 ) + { + short number = 0x1111 + rand() % 0xFFFF; + sprintf( ( char* ) sid + i, "%04hx", number ); + } - //auto ip2 = boost::asio::ip::address::from_string( request->remote_endpoint_address ); + // create session for the new sessionid and store to sessionlist + auto pSession = boost::make_shared< Session >(); + pSession->setAccountId( accountId ); + pSession->setSessionId( sid ); - //pSession->setIP( ip2.to_v4().to_ulong() ); + //auto ip2 = boost::asio::ip::address::from_string( request->remote_endpoint_address ); - std::stringstream ss; + //pSession->setIP( ip2.to_v4().to_ulong() ); - for( size_t i = 0; i < 56; i++ ) - { - ss << std::hex << sid[i]; - } - m_sessionMap[ ss.str() ] = pSession; - sId = ss.str(); - - return true; + std::stringstream ss; + + for( size_t i = 0; i < 56; i++ ) + { + ss << std::hex << sid[ i ]; + } + m_sessionMap[ ss.str() ] = pSession; + sId = ss.str(); + + return true; } bool Core::Network::SapphireAPI::insertSession( const uint32_t& accountId, std::string& sId ) { - // create session for the new sessionid and store to sessionlist - auto pSession = boost::make_shared< Session >(); - pSession->setAccountId( accountId ); - pSession->setSessionId( (uint8_t *)sId.c_str() ); + // create session for the new sessionid and store to sessionlist + auto pSession = boost::make_shared< Session >(); + pSession->setAccountId( accountId ); + pSession->setSessionId( ( uint8_t* ) sId.c_str() ); - m_sessionMap[sId] = pSession; + m_sessionMap[ sId ] = pSession; - return true; + return true; } bool Core::Network::SapphireAPI::createAccount( const std::string& username, const std::string& pass, std::string& sId ) { - // get account from login name - auto pQR = g_charaDb.query( "SELECT account_id FROM accounts WHERE account_name = '" + username + "';" ); - // found? - if( pQR->next() ) - return false; + // get account from login name + auto pQR = g_charaDb.query( "SELECT account_id FROM accounts WHERE account_name = '" + username + "';" ); + // found? + if( pQR->next() ) + return false; - // we are clear and can create a new account - // get the next free account id - pQR = g_charaDb.query( "SELECT MAX(account_id) FROM accounts;" ); - if( !pQR->next() ) - return false; - uint32_t accountId = pQR->getUInt( 1 ) + 1; + // we are clear and can create a new account + // get the next free account id + pQR = g_charaDb.query( "SELECT MAX(account_id) FROM accounts;" ); + if( !pQR->next() ) + return false; + uint32_t accountId = pQR->getUInt( 1 ) + 1; - // store the account to the db - g_charaDb.directExecute( "INSERT INTO accounts (account_Id, account_name, account_pass, account_created) VALUE( " + - std::to_string( accountId ) + ", '" + - username + "', '" + - pass + "', " + - std::to_string( time( nullptr ) ) + ");"); + // store the account to the db + g_charaDb.directExecute( "INSERT INTO accounts (account_Id, account_name, account_pass, account_created) VALUE( " + + std::to_string( accountId ) + ", '" + + username + "', '" + + pass + "', " + + std::to_string( time( nullptr ) ) + ");" ); - - if( !login( username, pass, sId ) ) - return false; - return true; - + if( !login( username, pass, sId ) ) + return false; + + return true; + } -int Core::Network::SapphireAPI::createCharacter( const int& accountId, const std::string& name, const std::string& infoJson, const int& gmRank ) +int +Core::Network::SapphireAPI::createCharacter( const int& accountId, const std::string& name, const std::string& infoJson, + const int& gmRank ) { - Core::PlayerMinimal newPlayer; + Core::PlayerMinimal newPlayer; - newPlayer.setAccountId( accountId ); - newPlayer.setId( getNextCharId() ); - newPlayer.setContentId( getNextContentId() ); - newPlayer.setName( name.c_str() ); + newPlayer.setAccountId( accountId ); + newPlayer.setId( getNextCharId() ); + newPlayer.setContentId( getNextContentId() ); + newPlayer.setName( name.c_str() ); - boost::property_tree::ptree pt; + boost::property_tree::ptree pt; - std::stringstream ss; - ss << infoJson; + std::stringstream ss; + ss << infoJson; - boost::property_tree::read_json( ss, pt ); + boost::property_tree::read_json( ss, pt ); - const char *ptr = infoJson.c_str() + 50; + const char* ptr = infoJson.c_str() + 50; - std::string lookPart( ptr ); - int32_t pos = lookPart.find_first_of( "]" ); - if( pos != std::string::npos ) - { - lookPart = lookPart.substr( 0, pos + 1 ); - } + std::string lookPart( ptr ); + int32_t pos = lookPart.find_first_of( "]" ); + if( pos != std::string::npos ) + { + lookPart = lookPart.substr( 0, pos + 1 ); + } - std::vector< int32_t > tmpVector; - std::vector< int32_t > tmpVector2; + std::vector< int32_t > tmpVector; + std::vector< int32_t > tmpVector2; - BOOST_FOREACH( boost::property_tree::ptree::value_type &v, pt.get_child( "content" ) ) - { - boost::property_tree::ptree subtree1 = v.second; - BOOST_FOREACH( boost::property_tree::ptree::value_type &vs, subtree1 ) - { - boost::property_tree::ptree subtree2 = vs.second; - //std::cout << vs.second.data(); - tmpVector.push_back( std::stoi( vs.second.data() ) ); - } - if( !v.second.data().empty() ) - tmpVector2.push_back( std::stoi( v.second.data() ) ); - } - std::vector< int32_t >::iterator it = tmpVector.begin(); - for( int32_t i = 0; it != tmpVector.end(); ++it, i++ ) - { - newPlayer.setLook( i, *it ); - } + BOOST_FOREACH( boost::property_tree::ptree::value_type& v, pt.get_child( "content" ) ) + { + boost::property_tree::ptree subtree1 = v.second; + BOOST_FOREACH( boost::property_tree::ptree::value_type& vs, subtree1 ) + { + boost::property_tree::ptree subtree2 = vs.second; + //std::cout << vs.second.data(); + tmpVector.push_back( std::stoi( vs.second.data() ) ); + } + if( !v.second.data().empty() ) + tmpVector2.push_back( std::stoi( v.second.data() ) ); + } + std::vector< int32_t >::iterator it = tmpVector.begin(); + for( int32_t i = 0; it != tmpVector.end(); ++it, i++ ) + { + newPlayer.setLook( i, *it ); + } - std::string rest = infoJson.substr( pos + 53 ); + std::string rest = infoJson.substr( pos + 53 ); - newPlayer.setVoice( tmpVector2.at( 0 ) ); - newPlayer.setGuardianDeity( tmpVector2.at( 1 ) ); - newPlayer.setBirthDay( tmpVector2.at( 3 ), tmpVector2.at( 2 ) ); - newPlayer.setClass( tmpVector2.at( 4 ) ); - newPlayer.setTribe( tmpVector2.at( 5 ) ); - newPlayer.setGmRank( gmRank ); + newPlayer.setVoice( tmpVector2.at( 0 ) ); + newPlayer.setGuardianDeity( tmpVector2.at( 1 ) ); + newPlayer.setBirthDay( tmpVector2.at( 3 ), tmpVector2.at( 2 ) ); + newPlayer.setClass( tmpVector2.at( 4 ) ); + newPlayer.setTribe( tmpVector2.at( 5 ) ); + newPlayer.setGmRank( gmRank ); - newPlayer.saveAsNew(); + newPlayer.saveAsNew(); - return newPlayer.getAccountId(); + return newPlayer.getAccountId(); } void Core::Network::SapphireAPI::deleteCharacter( std::string name, uint32_t accountId ) { - PlayerMinimal deletePlayer; - auto charList = getCharList( accountId ); - for( uint32_t i = 0; i < charList.size(); i++ ) - { - PlayerMinimal tmpPlayer = charList.at( i ); + PlayerMinimal deletePlayer; + auto charList = getCharList( accountId ); + for( uint32_t i = 0; i < charList.size(); i++ ) + { + PlayerMinimal tmpPlayer = charList.at( i ); - if( tmpPlayer.getName() == name ) - { - deletePlayer = tmpPlayer; - break; - } - } + if( tmpPlayer.getName() == name ) + { + deletePlayer = tmpPlayer; + break; + } + } - int32_t id = deletePlayer.getId(); + int32_t id = deletePlayer.getId(); - g_charaDb.execute( "DELETE FROM charainfo WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM characlass WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charaglobalitem WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charainfoblacklist WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charainfofriendlist WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charainfolinkshell WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charainfosearch WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charaitemcrystal WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charaiteminventory WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charaitemgearset WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); - g_charaDb.execute( "DELETE FROM charaquestnew WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charainfo WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM characlass WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charaglobalitem WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charainfoblacklist WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charainfofriendlist WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charainfolinkshell WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charainfosearch WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charaitemcrystal WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charaiteminventory WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charaitemgearset WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); + g_charaDb.execute( "DELETE FROM charaquestnew WHERE CharacterId LIKE '" + std::to_string( id ) + "';" ); } std::vector< Core::PlayerMinimal > Core::Network::SapphireAPI::getCharList( uint32_t accountId ) { - std::vector< Core::PlayerMinimal > charList; + std::vector< Core::PlayerMinimal > charList; - auto pQR = g_charaDb.query( "SELECT CharacterId, ContentId FROM charainfo WHERE AccountId = " + std::to_string( accountId ) + ";" ); + auto pQR = g_charaDb.query( + "SELECT CharacterId, ContentId FROM charainfo WHERE AccountId = " + std::to_string( accountId ) + ";" ); - while( pQR->next() ) - { - Core::PlayerMinimal player; + while( pQR->next() ) + { + Core::PlayerMinimal player; - uint32_t charId = pQR->getUInt( 1 ); + uint32_t charId = pQR->getUInt( 1 ); - player.load( charId ); + player.load( charId ); - charList.push_back( player ); - } - return charList; + charList.push_back( player ); + } + return charList; } bool Core::Network::SapphireAPI::checkNameTaken( std::string name ) { - - g_charaDb.escapeString( name ); - std::string query = "SELECT * FROM charainfo WHERE Name = '" + name + "';"; - auto pQR = g_charaDb.query( query ); + g_charaDb.escapeString( name ); + std::string query = "SELECT * FROM charainfo WHERE Name = '" + name + "';"; - if( !pQR->next() ) - return false; - else - return true; + auto pQR = g_charaDb.query( query ); + + if( !pQR->next() ) + return false; + else + return true; } uint32_t Core::Network::SapphireAPI::getNextCharId() { - uint32_t charId = 0; + uint32_t charId = 0; - auto pQR = g_charaDb.query( "SELECT MAX(CharacterId) FROM charainfo" ); + auto pQR = g_charaDb.query( "SELECT MAX(CharacterId) FROM charainfo" ); - if( !pQR->next() ) - return 0x00200001; + if( !pQR->next() ) + return 0x00200001; - charId = pQR->getUInt( 1 ) + 1; - if( charId < 0x00200001 ) - return 0x00200001; + charId = pQR->getUInt( 1 ) + 1; + if( charId < 0x00200001 ) + return 0x00200001; - return charId; + return charId; } uint64_t Core::Network::SapphireAPI::getNextContentId() { - uint64_t contentId = 0; + uint64_t contentId = 0; - auto pQR = g_charaDb.query( "SELECT MAX(ContentId) FROM charainfo" ); + auto pQR = g_charaDb.query( "SELECT MAX(ContentId) FROM charainfo" ); - if( !pQR->next() ) - return 0x0040000001000001; + if( !pQR->next() ) + return 0x0040000001000001; - contentId = pQR->getUInt64( 1 ) + 1; - if( contentId < 0x0040000001000001 ) - return 0x0040000001000001; + contentId = pQR->getUInt64( 1 ) + 1; + if( contentId < 0x0040000001000001 ) + return 0x0040000001000001; - return contentId; + return contentId; } int Core::Network::SapphireAPI::checkSession( const std::string& sId ) { - auto it = m_sessionMap.find( sId ); + auto it = m_sessionMap.find( sId ); - if( it == m_sessionMap.end() ) - return -1; + if( it == m_sessionMap.end() ) + return -1; - return it->second->getAccountId(); + return it->second->getAccountId(); } bool Core::Network::SapphireAPI::removeSession( const std::string& sId ) { - auto it = m_sessionMap.find( sId ); + auto it = m_sessionMap.find( sId ); - if( it != m_sessionMap.end() ) - m_sessionMap.erase( sId ); + if( it != m_sessionMap.end() ) + m_sessionMap.erase( sId ); - return true; + return true; } diff --git a/src/servers/sapphire_api/SapphireAPI.h b/src/servers/sapphire_api/SapphireAPI.h index 26146455..6d367a21 100644 --- a/src/servers/sapphire_api/SapphireAPI.h +++ b/src/servers/sapphire_api/SapphireAPI.h @@ -8,47 +8,47 @@ #include "PlayerMinimal.h" -namespace Core +namespace Core { +class Session; + +namespace Network { + +class SapphireAPI { - class Session; +public: + SapphireAPI(); - namespace Network - { + ~SapphireAPI(); - class SapphireAPI - { - public: - SapphireAPI(); - ~SapphireAPI(); + using SessionMap = std::map< std::string, boost::shared_ptr< Session > >; - using SessionMap = std::map< std::string, boost::shared_ptr< Session > >; + bool login( const std::string& username, const std::string& pass, std::string& sId ); - bool login( const std::string& username, const std::string& pass, std::string& sId ); + bool createAccount( const std::string& username, const std::string& pass, std::string& sId ); - bool createAccount( const std::string& username, const std::string& pass, std::string& sId ); + int32_t + createCharacter( const int& accountId, const std::string& name, const std::string& infoJson, const int& gmRank ); - int32_t createCharacter( const int& accountId, const std::string& name, const std::string& infoJson, const int& gmRank ); - - void deleteCharacter( std::string name, uint32_t accountId ); + void deleteCharacter( std::string name, uint32_t accountId ); - bool insertSession( const uint32_t& accountId, std::string& sId ); + bool insertSession( const uint32_t& accountId, std::string& sId ); - std::vector getCharList( uint32_t accountId ); + std::vector< Core::PlayerMinimal > getCharList( uint32_t accountId ); - bool checkNameTaken( std::string name ); + bool checkNameTaken( std::string name ); - uint32_t getNextCharId(); + uint32_t getNextCharId(); - uint64_t getNextContentId(); + uint64_t getNextContentId(); - int32_t checkSession( const std::string& sId ); + int32_t checkSession( const std::string& sId ); - bool removeSession( const std::string& sId ); + bool removeSession( const std::string& sId ); - SessionMap m_sessionMap; + SessionMap m_sessionMap; - }; - } +}; +} } #endif \ No newline at end of file diff --git a/src/servers/sapphire_api/Session.cpp b/src/servers/sapphire_api/Session.cpp index e9b876dd..f3523a04 100644 --- a/src/servers/sapphire_api/Session.cpp +++ b/src/servers/sapphire_api/Session.cpp @@ -1,37 +1,38 @@ #include "Session.h" + namespace Core { - Session::Session() - { +Session::Session() +{ - } - - Session::~Session() - { - - } - - uint32_t Session::getIp() const - { - return m_ip; - } - - void Session::setSessionId( uint8_t * sessionId ) - { - memcpy( m_sessionId, sessionId, 56 ); - } - - void Session::setIp( uint32_t ip ) - { - m_ip = ip; - } - - uint32_t Session::getAccountId() const - { - return m_accountId; - } - - void Session::setAccountId( uint32_t id ) - { - m_accountId = id; - } +} + +Session::~Session() +{ + +} + +uint32_t Session::getIp() const +{ + return m_ip; +} + +void Session::setSessionId( uint8_t* sessionId ) +{ + memcpy( m_sessionId, sessionId, 56 ); +} + +void Session::setIp( uint32_t ip ) +{ + m_ip = ip; +} + +uint32_t Session::getAccountId() const +{ + return m_accountId; +} + +void Session::setAccountId( uint32_t id ) +{ + m_accountId = id; +} } diff --git a/src/servers/sapphire_api/Session.h b/src/servers/sapphire_api/Session.h index 46a39289..58551c1a 100644 --- a/src/servers/sapphire_api/Session.h +++ b/src/servers/sapphire_api/Session.h @@ -7,33 +7,34 @@ namespace Core { - class Session - { +class Session +{ - private: - uint32_t m_ip; - uint32_t m_accountId; +private: + uint32_t m_ip; + uint32_t m_accountId; - uint8_t m_sessionId[56]; + uint8_t m_sessionId[56]; - public: +public: - std::string newCharName; + std::string newCharName; - Session(); - ~Session(); + Session(); - uint32_t getIp() const; + ~Session(); - void setSessionId( uint8_t * sessionId ); + uint32_t getIp() const; - void setIp( uint32_t ip ); + void setSessionId( uint8_t* sessionId ); - uint32_t getAccountId() const; + void setIp( uint32_t ip ); - void setAccountId( uint32_t id ); + uint32_t getAccountId() const; - }; + void setAccountId( uint32_t id ); + +}; } diff --git a/src/servers/sapphire_api/main.cpp b/src/servers/sapphire_api/main.cpp index bd84343e..d62a4fa1 100644 --- a/src/servers/sapphire_api/main.cpp +++ b/src/servers/sapphire_api/main.cpp @@ -2,6 +2,7 @@ #include "client_http.hpp" #define BOOST_SPIRIT_THREADSAFE + #include #include #include @@ -48,8 +49,8 @@ using HttpServer = SimpleWeb::Server< SimpleWeb::HTTP >; using HttpClient = SimpleWeb::Client< SimpleWeb::HTTP >; //Added for the default_resource example -void default_resource_send( const HttpServer &server, const shared_ptr< HttpServer::Response > &response, - const shared_ptr< ifstream > &ifs ); +void default_resource_send( const HttpServer& server, const shared_ptr< HttpServer::Response >& response, + const shared_ptr< ifstream >& ifs ); auto m_pConfig = boost::make_shared< Core::ConfigMgr >(); @@ -58,752 +59,758 @@ std::string configPath( "rest.ini" ); void reloadConfig() { - m_pConfig = boost::make_shared< Core::ConfigMgr >(); + m_pConfig = boost::make_shared< Core::ConfigMgr >(); - if( !m_pConfig->loadConfig( configPath ) ) - throw "Error loading config "; + if( !m_pConfig->loadConfig( configPath ) ) + throw "Error loading config "; } -void print_request_info( shared_ptr< HttpServer::Request > request ) +void print_request_info( shared_ptr< HttpServer::Request > request ) { - g_log.info( "Request from " + request->remote_endpoint_address + " (" + request->path + ")" ); + g_log.info( "Request from " + request->remote_endpoint_address + " (" + request->path + ")" ); } bool loadSettings( int32_t argc, char* argv[] ) { - g_log.info( "Loading config " + configPath ); + g_log.info( "Loading config " + configPath ); - if( !m_pConfig->loadConfig( configPath ) ) - { - g_log.fatal( "Error loading config " + configPath ); - return false; - } + if( !m_pConfig->loadConfig( configPath ) ) + { + g_log.fatal( "Error loading config " + configPath ); + return false; + } - std::vector args( argv + 1, argv + argc ); - for( size_t i = 0; i + 1 < args.size(); i += 2 ) - { - std::string arg( "" ); - std::string val( "" ); + std::vector< std::string > args( argv + 1, argv + argc ); + for( size_t i = 0; i + 1 < args.size(); i += 2 ) + { + std::string arg( "" ); + std::string val( "" ); - try + try + { + arg = boost::to_lower_copy( std::string( args[ i ] ) ); + val = std::string( args[ i + 1 ] ); + + // trim '-' from start of arg + arg = arg.erase( 0, arg.find_first_not_of( '-' ) ); + + if( arg == "ip" ) { - arg = boost::to_lower_copy( std::string( args[i] ) ); - val = std::string( args[i + 1] ); - - // trim '-' from start of arg - arg = arg.erase( 0, arg.find_first_not_of( '-' ) ); - - if( arg == "ip" ) - { - m_pConfig->setValue< std::string >( "RestNetwork.ListenIp", val ); - } - else if( arg == "p" || arg == "port" ) - { - m_pConfig->setValue< std::string >( "RestNetwork.ListenPort", val ); - } - else if( arg == "exdpath" || arg == "datapath" ) - { - m_pConfig->setValue< std::string >( "GlobalParameters.DataPath", val ); - } - else if( arg == "h" || arg == "dbhost" ) - { - m_pConfig->setValue< std::string >( "Database.Host", val ); - } - else if( arg == "dbport" ) - { - m_pConfig->setValue< std::string >( "Database.Port", val ); - } - else if( arg == "u" || arg == "user" || arg == "dbuser" ) - { - m_pConfig->setValue< std::string >( "Database.Username", val ); - } - else if( arg == "pass" || arg == "dbpass" ) - { - m_pConfig->setValue< std::string >( "Database.Password", val ); - } - else if( arg == "d" || arg == "db" || arg == "database" ) - { - m_pConfig->setValue< std::string >( "Database.Database", val ); - } - else if ( arg == "lobbyip" || arg == "lobbyhost" ) - { - m_pConfig->setValue< std::string >( "GlobalNetwork.LobbyHost", val ); - } - else if ( arg == "lobbyport" ) - { - m_pConfig->setValue< std::string >( "GlobalNetwork.LobbyPort", val ); - } + m_pConfig->setValue< std::string >( "RestNetwork.ListenIp", val ); } - catch( ... ) + else if( arg == "p" || arg == "port" ) { - g_log.error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); - g_log.error( "Usage: \n" ); + m_pConfig->setValue< std::string >( "RestNetwork.ListenPort", val ); } - } + else if( arg == "exdpath" || arg == "datapath" ) + { + m_pConfig->setValue< std::string >( "GlobalParameters.DataPath", val ); + } + else if( arg == "h" || arg == "dbhost" ) + { + m_pConfig->setValue< std::string >( "Database.Host", val ); + } + else if( arg == "dbport" ) + { + m_pConfig->setValue< std::string >( "Database.Port", val ); + } + else if( arg == "u" || arg == "user" || arg == "dbuser" ) + { + m_pConfig->setValue< std::string >( "Database.Username", val ); + } + else if( arg == "pass" || arg == "dbpass" ) + { + m_pConfig->setValue< std::string >( "Database.Password", val ); + } + else if( arg == "d" || arg == "db" || arg == "database" ) + { + m_pConfig->setValue< std::string >( "Database.Database", val ); + } + else if( arg == "lobbyip" || arg == "lobbyhost" ) + { + m_pConfig->setValue< std::string >( "GlobalNetwork.LobbyHost", val ); + } + else if( arg == "lobbyport" ) + { + m_pConfig->setValue< std::string >( "GlobalNetwork.LobbyPort", val ); + } + } + catch( ... ) + { + g_log.error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); + g_log.error( "Usage: \n" ); + } + } - g_log.info( "Setting up generated EXD data" ); - if( !g_exdDataGen.init( m_pConfig->getValue< std::string >( "GlobalParameters.DataPath", "" ) ) ) - { - g_log.fatal( "Error setting up generated EXD data " ); - return false; - } + g_log.info( "Setting up generated EXD data" ); + if( !g_exdDataGen.init( m_pConfig->getValue< std::string >( "GlobalParameters.DataPath", "" ) ) ) + { + g_log.fatal( "Error setting up generated EXD data " ); + return false; + } - Core::Db::DbLoader loader; + Core::Db::DbLoader loader; - Core::Db::ConnectionInfo info; - info.password = m_pConfig->getValue< std::string >( "Database.Password", "" ); - info.host = m_pConfig->getValue< std::string >( "Database.Host", "127.0.0.1" ); - info.database = m_pConfig->getValue< std::string >( "Database.Database", "sapphire" ); - info.port = m_pConfig->getValue< uint16_t >( "Database.Port", 3306 ); - info.user = m_pConfig->getValue< std::string >( "Database.Username", "root" ); - info.syncThreads = m_pConfig->getValue< uint8_t >( "Database.SyncThreads", 2 ); - info.asyncThreads = m_pConfig->getValue< uint8_t >( "Database.AsyncThreads", 2 ); + Core::Db::ConnectionInfo info; + info.password = m_pConfig->getValue< std::string >( "Database.Password", "" ); + info.host = m_pConfig->getValue< std::string >( "Database.Host", "127.0.0.1" ); + info.database = m_pConfig->getValue< std::string >( "Database.Database", "sapphire" ); + info.port = m_pConfig->getValue< uint16_t >( "Database.Port", 3306 ); + info.user = m_pConfig->getValue< std::string >( "Database.Username", "root" ); + info.syncThreads = m_pConfig->getValue< uint8_t >( "Database.SyncThreads", 2 ); + info.asyncThreads = m_pConfig->getValue< uint8_t >( "Database.AsyncThreads", 2 ); - loader.addDb( g_charaDb, info ); - if( !loader.initDbs() ) - return false; + loader.addDb( g_charaDb, info ); + if( !loader.initDbs() ) + return false; - server.config.port = static_cast< uint16_t >( std::stoul( m_pConfig->getValue< std::string >( "RestNetwork.ListenPort", "80" ) ) ); - server.config.address = m_pConfig->getValue< std::string >( "RestNetwork.ListenIp", "0.0.0.0" ); + server.config.port = static_cast< uint16_t >( std::stoul( + m_pConfig->getValue< std::string >( "RestNetwork.ListenPort", "80" ) ) ); + server.config.address = m_pConfig->getValue< std::string >( "RestNetwork.ListenIp", "0.0.0.0" ); - g_log.info( "Database: Connected to " + info.host + ":" + std::to_string( info.port ) ); + g_log.info( "Database: Connected to " + info.host + ":" + std::to_string( info.port ) ); - return true; + return true; } -using ContentType = enum +using ContentType = enum { - NONE, - TEXT_PLAIN, - JSON, - XML, + NONE, + TEXT_PLAIN, + JSON, + XML, }; std::string buildHttpResponse( uint16_t rCode, const std::string& content = "", ContentType type = NONE ) { - std::string result{""}; - std::string httpHead{"HTTP/1.1 "}; - std::string contentHeader{"Content-Length: "}; - std::string contentTypeHeader{"Content-Type: "}; + std::string result{ "" }; + std::string httpHead{ "HTTP/1.1 " }; + std::string contentHeader{ "Content-Length: " }; + std::string contentTypeHeader{ "Content-Type: " }; - switch( type ) - { - case NONE: - contentTypeHeader = ""; + switch( type ) + { + case NONE: + contentTypeHeader = ""; break; - case TEXT_PLAIN: - contentTypeHeader += "text/plain\r\n"; + case TEXT_PLAIN: + contentTypeHeader += "text/plain\r\n"; break; - case JSON: - contentTypeHeader += "application/json\r\n"; + case JSON: + contentTypeHeader += "application/json\r\n"; break; - case XML: - contentTypeHeader += "text/xml\r\n"; + case XML: + contentTypeHeader += "text/xml\r\n"; break; - - } - - switch( rCode ) - { - case 200: - result += httpHead + "200 OK\r\n"; - if( content.size() > 0 ) - { - result += contentTypeHeader; - result += contentHeader + std::to_string( content.size() ) + "\r\n"; - } - break; - case 400: - case 401: - case 402: - case 403: - result += httpHead + std::to_string( rCode ) + "\r\n"; - if( content.size() > 0 ) - { - result += contentTypeHeader; - result += contentHeader + std::to_string( content.size() ) + "\r\n"; - } - break; - case 500: - result += httpHead + "500 Internal Server Error\r\n"; - break; - default: - result += httpHead + std::to_string( rCode ) + "\r\n"; - - - - } - result += "\r\n"; - if( content.size() > 0 ) - result += content; - - return result; -} + } -void getZoneName( shared_ptr response, shared_ptr request ) -{ - string number = request->path_match[1]; - auto info = g_exdDataGen.get< Core::Data::TerritoryType >( atoi( number.c_str() ) ); - std::string responseStr = "Not found!"; - if( info ) - responseStr = info->name + ", " + info->bg; - *response << buildHttpResponse( 200, responseStr ); -} - -void createAccount( shared_ptr response, shared_ptr request ) -{ - print_request_info( request ); - try - { - - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); - - std::string pass = pt.get( "pass" ); - std::string user = pt.get( "username" ); - // reloadConfig(); - - std::string sId; - if( g_sapphireAPI.createAccount( user, pass, sId ) ) + switch( rCode ) + { + case 200: + result += httpHead + "200 OK\r\n"; + if( content.size() > 0 ) { - std::string json_string = "{\"sId\":\"" + sId + - "\", \"lobbyHost\":\"" + m_pConfig->getValue< std::string >( "GlobalNetwork.LobbyHost" ) + - "\", \"frontierHost\":\"" + m_pConfig->getValue< std::string >( "GlobalNetwork.RestHost" ) + "\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); + result += contentTypeHeader; + result += contentHeader + std::to_string( content.size() ) + "\r\n"; } - else - *response << buildHttpResponse( 400 ); - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } -} - -void login( shared_ptr response, shared_ptr request ) -{ - print_request_info( request ); - try - { - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); - - std::string pass = pt.get( "pass" ); - std::string user = pt.get( "username" ); - - std::string sId; - - // reloadConfig(); - if( g_sapphireAPI.login( user, pass, sId ) ) + break; + case 400: + case 401: + case 402: + case 403: + result += httpHead + std::to_string( rCode ) + "\r\n"; + if( content.size() > 0 ) { - std::string json_string = "{\"sId\":\"" + sId + - "\", \"lobbyHost\":\"" + m_pConfig->getValue< std::string >( "GlobalNetwork.LobbyHost" ) + - "\", \"frontierHost\":\"" + m_pConfig->getValue< std::string >( "GlobalNetwork.RestHost" ) + "\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); + result += contentTypeHeader; + result += contentHeader + std::to_string( content.size() ) + "\r\n"; } - else - *response << buildHttpResponse( 400 ); + break; + case 500: + result += httpHead + "500 Internal Server Error\r\n"; + break; + default: + result += httpHead + std::to_string( rCode ) + "\r\n"; - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } + + } + result += "\r\n"; + if( content.size() > 0 ) + result += content; + + return result; +} + +void getZoneName( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) +{ + string number = request->path_match[ 1 ]; + auto info = g_exdDataGen.get< Core::Data::TerritoryType >( atoi( number.c_str() ) ); + std::string responseStr = "Not found!"; + if( info ) + responseStr = info->name + ", " + info->bg; + *response << buildHttpResponse( 200, responseStr ); +} + +void createAccount( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) +{ + print_request_info( request ); + try + { + + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); + + std::string pass = pt.get< string >( "pass" ); + std::string user = pt.get< string >( "username" ); + // reloadConfig(); + + std::string sId; + if( g_sapphireAPI.createAccount( user, pass, sId ) ) + { + std::string json_string = "{\"sId\":\"" + sId + + "\", \"lobbyHost\":\"" + + m_pConfig->getValue< std::string >( "GlobalNetwork.LobbyHost" ) + + "\", \"frontierHost\":\"" + + m_pConfig->getValue< std::string >( "GlobalNetwork.RestHost" ) + "\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + else + *response << buildHttpResponse( 400 ); + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } +} + +void login( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) +{ + print_request_info( request ); + try + { + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); + + std::string pass = pt.get< string >( "pass" ); + std::string user = pt.get< string >( "username" ); + + std::string sId; + + // reloadConfig(); + if( g_sapphireAPI.login( user, pass, sId ) ) + { + std::string json_string = "{\"sId\":\"" + sId + + "\", \"lobbyHost\":\"" + + m_pConfig->getValue< std::string >( "GlobalNetwork.LobbyHost" ) + + "\", \"frontierHost\":\"" + + m_pConfig->getValue< std::string >( "GlobalNetwork.RestHost" ) + "\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + else + *response << buildHttpResponse( 400 ); + + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } } -void deleteCharacter( shared_ptr response, shared_ptr request ) +void deleteCharacter( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) { - print_request_info( request ); - try - { - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); - std::string sId = pt.get( "sId" ); - std::string secret = pt.get( "secret" ); - std::string name = pt.get( "name" ); - - // reloadConfig(); + print_request_info( request ); + try + { + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); + std::string sId = pt.get< string >( "sId" ); + std::string secret = pt.get< string >( "secret" ); + std::string name = pt.get< string >( "name" ); - int32_t accountId = g_sapphireAPI.checkSession( sId ); + // reloadConfig(); + int32_t accountId = g_sapphireAPI.checkSession( sId ); + + if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) + { + std::string json_string = "{\"result\":\"invalid_secret\"}"; + *response << buildHttpResponse( 403, json_string, JSON ); + } + else + { + g_sapphireAPI.deleteCharacter( name, accountId ); + std::string json_string = "{\"result\":\"success\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } + +} + +void createCharacter( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) +{ + print_request_info( request ); + try + { + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); + std::string sId = pt.get< string >( "sId" ); + std::string secret = pt.get< string >( "secret" ); + std::string name = pt.get< string >( "name" ); + std::string infoJson = pt.get< string >( "infoJson" ); + + std::string finalJson = Core::Util::base64_decode( infoJson ); + + // reloadConfig(); + + int32_t result = g_sapphireAPI.checkSession( sId ); + + if( result != -1 ) + { if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) { - std::string json_string = "{\"result\":\"invalid_secret\"}"; - *response << buildHttpResponse( 403, json_string, JSON ); + std::string json_string = "{\"result\":\"invalid_secret\"}"; + *response << buildHttpResponse( 403, json_string, JSON ); } else { - g_sapphireAPI.deleteCharacter( name, accountId ); - std::string json_string = "{\"result\":\"success\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); + int32_t charId = g_sapphireAPI.createCharacter( result, name, finalJson, m_pConfig->getValue< uint8_t >( + "CharacterCreation.DefaultGMRank", 255 ) ); + + std::string json_string = "{\"result\":\"" + std::to_string( charId ) + "\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); } - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } + } + else + { + std::string json_string = "{\"result\":\"invalid\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } } -void createCharacter( shared_ptr response, shared_ptr request ) +void insertSession( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) { - print_request_info( request ); - try - { - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); - std::string sId = pt.get( "sId" ); - std::string secret = pt.get( "secret" ); - std::string name = pt.get( "name" ); - std::string infoJson = pt.get( "infoJson" ); + print_request_info( request ); - std::string finalJson = Core::Util::base64_decode( infoJson ); + try + { + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); + std::string sId = pt.get< string >( "sId" ); + uint32_t accountId = pt.get< uint32_t >( "accountId" ); + std::string secret = pt.get< string >( "secret" ); + // reloadConfig(); + if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) + { + std::string json_string = "{\"result\":\"invalid_secret\"}"; + *response << buildHttpResponse( 403, json_string, JSON ); + } + else + { + g_sapphireAPI.insertSession( accountId, sId ); + std::string json_string = "{\"result\":\"success\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } +} - // reloadConfig(); +void checkNameTaken( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) +{ + print_request_info( request ); - int32_t result = g_sapphireAPI.checkSession( sId ); + try + { + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); - if( result != -1 ) - { - if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) - { - std::string json_string = "{\"result\":\"invalid_secret\"}"; - *response << buildHttpResponse( 403, json_string, JSON ); - } - else - { - int32_t charId = g_sapphireAPI.createCharacter( result, name, finalJson, m_pConfig->getValue< uint8_t >( "CharacterCreation.DefaultGMRank", 255 ) ); + std::string name = pt.get< string >( "name" ); + std::string secret = pt.get< string >( "secret" ); - std::string json_string = "{\"result\":\"" + std::to_string( charId ) + "\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); - } - } + // reloadConfig(); + + if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) + { + std::string json_string = "{\"result\":\"invalid_secret\"}"; + *response << buildHttpResponse( 403, json_string, JSON ); + } + else + { + std::string json_string; + if( !g_sapphireAPI.checkNameTaken( name ) ) + json_string = "{\"result\":\"false\"}"; else - { - std::string json_string = "{\"result\":\"invalid\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); - } - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } - + json_string = "{\"result\":\"true\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } } -void insertSession( shared_ptr response, shared_ptr request ) +void checkSession( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) { - print_request_info( request ); + print_request_info( request ); + try + { + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); + std::string sId = pt.get< string >( "sId" ); + std::string secret = pt.get< string >( "secret" ); + int32_t result = g_sapphireAPI.checkSession( sId ); - try - { - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); - std::string sId = pt.get( "sId" ); - uint32_t accountId = pt.get( "accountId" ); - std::string secret = pt.get( "secret" ); - // reloadConfig(); + // reloadConfig(); + + if( result != -1 ) + { if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) { - std::string json_string = "{\"result\":\"invalid_secret\"}"; - *response << buildHttpResponse( 403, json_string, JSON ); + std::string json_string = "{\"result\":\"invalid_secret\"}"; + *response << buildHttpResponse( 403, json_string, JSON ); } else { - g_sapphireAPI.insertSession( accountId, sId ); - std::string json_string = "{\"result\":\"success\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); + std::string json_string = "{\"result\":\"" + std::to_string( result ) + "\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); } - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } + } + else + { + std::string json_string = "{\"result\":\"invalid\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } + } -void checkNameTaken( shared_ptr response, shared_ptr request ) +void getNextCharId( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) { - print_request_info( request ); + print_request_info( request ); + try + { + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); + std::string secret = pt.get< string >( "secret" ); - try - { - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); + // reloadConfig(); - std::string name = pt.get( "name" ); - std::string secret = pt.get( "secret" ); + if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) + { + std::string json_string = "{\"result\":\"invalid_secret\"}"; + *response << buildHttpResponse( 403, json_string, JSON ); + } + else + { + std::string json_string = "{\"result\":\"" + std::to_string( g_sapphireAPI.getNextCharId() ) + "\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } - // reloadConfig(); +} +void getNextContentId( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) +{ + print_request_info( request ); + + try + { + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); + std::string secret = pt.get< string >( "secret" ); + + // reloadConfig(); + + if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) + { + std::string json_string = "{\"result\":\"invalid_secret\"}"; + *response << buildHttpResponse( 403, json_string, JSON ); + } + else + { + std::string json_string = "{\"result\":\"" + std::to_string( g_sapphireAPI.getNextContentId() ) + "\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } + +} + +void getCharacterList( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) +{ + print_request_info( request ); + try + { + using namespace boost::property_tree; + ptree pt; + read_json( request->content, pt ); + std::string sId = pt.get< string >( "sId" ); + std::string secret = pt.get< string >( "secret" ); + + // reloadConfig(); + + int32_t result = g_sapphireAPI.checkSession( sId ); + + if( result != -1 ) + { if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) { - std::string json_string = "{\"result\":\"invalid_secret\"}"; - *response << buildHttpResponse( 403, json_string, JSON ); + std::string json_string = "{\"result\":\"invalid_secret\"}"; + *response << buildHttpResponse( 403, json_string, JSON ); } else { - std::string json_string; - if( !g_sapphireAPI.checkNameTaken( name ) ) - json_string = "{\"result\":\"false\"}"; - else - json_string = "{\"result\":\"true\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); + auto charList = g_sapphireAPI.getCharList( result ); + using boost::property_tree::ptree; + ptree pt; + ptree char_tree; + + for( auto entry : charList ) + { + ptree tree_entry; + tree_entry.put( "name", std::string( entry.getName() ) ); + tree_entry.put( "charId", std::to_string( entry.getId() ) ); + tree_entry.put( "contentId", std::to_string( entry.getContentId() ) ); + tree_entry.put( "infoJson", std::string( entry.getInfoJson() ) ); + char_tree.push_back( std::make_pair( "", tree_entry ) ); + } + + pt.add_child( "charArray", char_tree ); + pt.put( "result", "success" ); + std::ostringstream oss; + write_json( oss, pt ); + std::string responseStr = oss.str(); + *response << buildHttpResponse( 200, responseStr, JSON ); } - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } + } + else + { + std::string json_string = "{\"result\":\"invalid\"}"; + *response << buildHttpResponse( 200, json_string, JSON ); + } + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } } -void checkSession( shared_ptr response, shared_ptr request ) +void get_init( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) { - print_request_info( request ); - try - { - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); - std::string sId = pt.get( "sId" ); - std::string secret = pt.get( "secret" ); - int32_t result = g_sapphireAPI.checkSession( sId ); + print_request_info( request ); + try + { + auto web_root_path = boost::filesystem::canonical( "web" ); + auto path = boost::filesystem::canonical( web_root_path / "news.xml" ); + //Check if path is within web_root_path + if( distance( web_root_path.begin(), web_root_path.end() ) > distance( path.begin(), path.end() ) || + !std::equal( web_root_path.begin(), web_root_path.end(), path.begin() ) ) + throw invalid_argument( "path must be within root path" ); + if( !( boost::filesystem::exists( path ) && boost::filesystem::is_regular_file( path ) ) ) + throw invalid_argument( "file does not exist" ); - // reloadConfig(); + auto ifs = make_shared< ifstream >(); + ifs->open( path.string(), ifstream::in | ios::binary | ios::ate ); - if( result != -1 ) - { - if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) - { - std::string json_string = "{\"result\":\"invalid_secret\"}"; - *response << buildHttpResponse( 403, json_string, JSON ); - } - else - { - std::string json_string = "{\"result\":\"" + std::to_string( result ) + "\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); - } - } - else - { - std::string json_string = "{\"result\":\"invalid\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); - } - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } + if( *ifs ) + { + auto length = ifs->tellg(); + ifs->seekg( 0, ios::beg ); + *response << "HTTP/1.1 200 OK\r\n" << "Content-Length: " << length << "\r\n\r\n"; + default_resource_send( server, response, ifs ); + } + else + throw invalid_argument( "could not read file" ); + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } } -void getNextCharId( shared_ptr response, shared_ptr request ) +void get_headline_all( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) { - print_request_info( request ); - try - { - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); - std::string secret = pt.get( "secret" ); + print_request_info( request ); + try + { + auto web_root_path = boost::filesystem::canonical( "web" ); + auto path = boost::filesystem::canonical( web_root_path / "headlines.xml" ); + //Check if path is within web_root_path + if( distance( web_root_path.begin(), web_root_path.end() ) > distance( path.begin(), path.end() ) || + !std::equal( web_root_path.begin(), web_root_path.end(), path.begin() ) ) + throw invalid_argument( "path must be within root path" ); + if( !( boost::filesystem::exists( path ) && boost::filesystem::is_regular_file( path ) ) ) + throw invalid_argument( "file does not exist" ); - // reloadConfig(); - - if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) - { - std::string json_string = "{\"result\":\"invalid_secret\"}"; - *response << buildHttpResponse( 403, json_string, JSON ); - } - else - { - std::string json_string = "{\"result\":\"" + std::to_string( g_sapphireAPI.getNextCharId() ) + "\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); - } - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } + auto ifs = make_shared< ifstream >(); + ifs->open( path.string(), ifstream::in | ios::binary | ios::ate ); + if( *ifs ) + { + auto length = ifs->tellg(); + ifs->seekg( 0, ios::beg ); + *response << "HTTP/1.1 200 OK\r\n" << "Content-Length: " << length << "\r\n\r\n"; + default_resource_send( server, response, ifs ); + } + else + throw invalid_argument( "could not read file" ); + } + catch( exception& e ) + { + *response << buildHttpResponse( 500 ); + g_log.error( e.what() ); + } } -void getNextContentId( shared_ptr response, shared_ptr request ) +void defaultGet( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer::Request > request ) { - print_request_info( request ); + print_request_info( request ); + try + { + auto web_root_path = boost::filesystem::canonical( "web" ); + auto path = boost::filesystem::canonical( web_root_path / request->path ); + //Check if path is within web_root_path + if( distance( web_root_path.begin(), web_root_path.end() ) > distance( path.begin(), path.end() ) || + !std::equal( web_root_path.begin(), web_root_path.end(), path.begin() ) ) + throw invalid_argument( "path must be within root path" ); + if( boost::filesystem::is_directory( path ) ) + path /= "index.html"; + if( !( boost::filesystem::exists( path ) && boost::filesystem::is_regular_file( path ) ) ) + throw invalid_argument( "file does not exist" ); - try - { - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); - std::string secret = pt.get( "secret" ); + auto ifs = make_shared< ifstream >(); + ifs->open( path.string(), ifstream::in | ios::binary | ios::ate ); - // reloadConfig(); + if( *ifs ) + { + auto length = ifs->tellg(); + ifs->seekg( 0, ios::beg ); - if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) - { - std::string json_string = "{\"result\":\"invalid_secret\"}"; - *response << buildHttpResponse( 403, json_string, JSON ); - } - else - { - std::string json_string = "{\"result\":\"" + std::to_string( g_sapphireAPI.getNextContentId() ) + "\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); - } - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } - -} - -void getCharacterList( shared_ptr response, shared_ptr request ) -{ - print_request_info( request ); - try - { - using namespace boost::property_tree; - ptree pt; - read_json( request->content, pt ); - std::string sId = pt.get( "sId" ); - std::string secret = pt.get( "secret" ); - - // reloadConfig(); - - int32_t result = g_sapphireAPI.checkSession( sId ); - - if( result != -1 ) - { - if( m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ) != secret ) - { - std::string json_string = "{\"result\":\"invalid_secret\"}"; - *response << buildHttpResponse( 403, json_string, JSON ); - } - else - { - auto charList = g_sapphireAPI.getCharList( result ); - using boost::property_tree::ptree; - ptree pt; - ptree char_tree; - - for( auto entry : charList ) - { - ptree tree_entry; - tree_entry.put( "name", std::string( entry.getName() ) ); - tree_entry.put( "charId", std::to_string( entry.getId() ) ); - tree_entry.put( "contentId", std::to_string( entry.getContentId() ) ); - tree_entry.put( "infoJson", std::string( entry.getInfoJson() ) ); - char_tree.push_back( std::make_pair( "", tree_entry ) ); - } - - pt.add_child( "charArray", char_tree ); - pt.put( "result", "success" ); - std::ostringstream oss; - write_json( oss, pt ); - std::string responseStr = oss.str(); - *response << buildHttpResponse( 200, responseStr, JSON ); - } - } - else - { - std::string json_string = "{\"result\":\"invalid\"}"; - *response << buildHttpResponse( 200, json_string, JSON ); - } - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } -} - -void get_init( shared_ptr response, shared_ptr request ) -{ - print_request_info( request ); - try - { - auto web_root_path = boost::filesystem::canonical( "web" ); - auto path = boost::filesystem::canonical( web_root_path / "news.xml" ); - //Check if path is within web_root_path - if( distance( web_root_path.begin(), web_root_path.end() ) > distance( path.begin(), path.end() ) || - !std::equal( web_root_path.begin(), web_root_path.end(), path.begin() ) ) - throw invalid_argument( "path must be within root path" ); - if( !( boost::filesystem::exists( path ) && boost::filesystem::is_regular_file( path ) ) ) - throw invalid_argument( "file does not exist" ); - - auto ifs = make_shared(); - ifs->open( path.string(), ifstream::in | ios::binary | ios::ate ); - - if( *ifs ) - { - auto length = ifs->tellg(); - ifs->seekg( 0, ios::beg ); - - *response << "HTTP/1.1 200 OK\r\n" << "Content-Length: " << length << "\r\n\r\n"; - default_resource_send( server, response, ifs ); - } - else - throw invalid_argument( "could not read file" ); - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } -} - -void get_headline_all( shared_ptr response, shared_ptr request ) -{ - print_request_info( request ); - try - { - auto web_root_path = boost::filesystem::canonical( "web" ); - auto path = boost::filesystem::canonical( web_root_path / "headlines.xml" ); - //Check if path is within web_root_path - if( distance( web_root_path.begin(), web_root_path.end() ) > distance( path.begin(), path.end() ) || - !std::equal( web_root_path.begin(), web_root_path.end(), path.begin() ) ) - throw invalid_argument( "path must be within root path" ); - if( !( boost::filesystem::exists( path ) && boost::filesystem::is_regular_file( path ) ) ) - throw invalid_argument( "file does not exist" ); - - auto ifs = make_shared(); - ifs->open( path.string(), ifstream::in | ios::binary | ios::ate ); - - if( *ifs ) - { - auto length = ifs->tellg(); - ifs->seekg( 0, ios::beg ); - *response << "HTTP/1.1 200 OK\r\n" << "Content-Length: " << length << "\r\n\r\n"; - default_resource_send( server, response, ifs ); - } - else - throw invalid_argument( "could not read file" ); - } - catch( exception& e ) - { - *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); - } -} - -void defaultGet( shared_ptr response, shared_ptr request ) -{ - print_request_info( request ); - try - { - auto web_root_path = boost::filesystem::canonical( "web" ); - auto path = boost::filesystem::canonical( web_root_path / request->path ); - //Check if path is within web_root_path - if( distance( web_root_path.begin(), web_root_path.end() ) > distance( path.begin(), path.end() ) || - !std::equal( web_root_path.begin(), web_root_path.end(), path.begin() ) ) - throw invalid_argument( "path must be within root path" ); - if( boost::filesystem::is_directory( path ) ) - path /= "index.html"; - if( !( boost::filesystem::exists( path ) && boost::filesystem::is_regular_file( path ) ) ) - throw invalid_argument( "file does not exist" ); - - auto ifs = make_shared(); - ifs->open( path.string(), ifstream::in | ios::binary | ios::ate ); - - if( *ifs ) - { - auto length = ifs->tellg(); - ifs->seekg( 0, ios::beg ); - - *response << "HTTP/1.1 200 OK\r\n" << "Content-Length: " << length << "\r\n\r\n"; - default_resource_send( server, response, ifs ); - } - else - throw invalid_argument( "could not read file" ); - } - catch( const exception & ) - { - string content = "Path not found: " + request->path; - *response << buildHttpResponse( 400, content ); - } + *response << "HTTP/1.1 200 OK\r\n" << "Content-Length: " << length << "\r\n\r\n"; + default_resource_send( server, response, ifs ); + } + else + throw invalid_argument( "could not read file" ); + } + catch( const exception& ) + { + string content = "Path not found: " + request->path; + *response << buildHttpResponse( 400, content ); + } } int main( int argc, char* argv[] ) { - auto pLog = boost::shared_ptr< Core::Logger >( new Core::Logger() ); - g_fw.set< Core::Logger >( pLog ); - g_log.setLogPath( "log/SapphireAPI" ); - g_log.init(); + auto pLog = boost::shared_ptr< Core::Logger >( new Core::Logger() ); + g_fw.set< Core::Logger >( pLog ); + g_log.setLogPath( "log/SapphireAPI" ); + g_log.init(); - g_log.info( "===========================================================" ); - g_log.info( "Sapphire API Server " ); - g_log.info( "Version: 0.0.1" ); - g_log.info( "Compiled: " __DATE__ " " __TIME__ ); - g_log.info( "===========================================================" ); + g_log.info( "===========================================================" ); + g_log.info( "Sapphire API Server " ); + g_log.info( "Version: 0.0.1" ); + g_log.info( "Compiled: " __DATE__ " " __TIME__ ); + g_log.info( "===========================================================" ); - if( !loadSettings( argc, argv ) ) - throw std::exception(); + if( !loadSettings( argc, argv ) ) + throw std::exception(); - server.resource["^/ZoneName/([0-9]+)$"]["GET"] = &getZoneName; - server.resource["^/sapphire-api/lobby/createAccount"]["POST"] = &createAccount; - server.resource["^/sapphire-api/lobby/login"]["POST"] = &login; - server.resource["^/sapphire-api/lobby/deleteCharacter"]["POST"] = &deleteCharacter; - server.resource["^/sapphire-api/lobby/createCharacter"]["POST"] = &createCharacter; - server.resource["^/sapphire-api/lobby/insertSession"]["POST"] = &insertSession; - server.resource["^/sapphire-api/lobby/checkNameTaken"]["POST"] = &checkNameTaken; - server.resource["^/sapphire-api/lobby/checkSession"]["POST"] = &checkSession; - server.resource["^/sapphire-api/lobby/getNextCharId"]["POST"] = &getNextCharId; - server.resource["^/sapphire-api/lobby/getNextContentId"]["POST"] = &getNextContentId; - server.resource["^/sapphire-api/lobby/getCharacterList"]["POST"] = &getCharacterList; - server.resource["^(/frontier-api/ffxivsupport/view/get_init)(.*)"]["GET"] = &get_init; - server.resource["^(/frontier-api/ffxivsupport/information/get_headline_all)(.*)"]["GET"] = &get_headline_all; - - server.default_resource["GET"] = &defaultGet; - - thread server_thread( [&]() - { - //Start server - server.start(); - } ); + server.resource[ "^/ZoneName/([0-9]+)$" ][ "GET" ] = &getZoneName; + server.resource[ "^/sapphire-api/lobby/createAccount" ][ "POST" ] = &createAccount; + server.resource[ "^/sapphire-api/lobby/login" ][ "POST" ] = &login; + server.resource[ "^/sapphire-api/lobby/deleteCharacter" ][ "POST" ] = &deleteCharacter; + server.resource[ "^/sapphire-api/lobby/createCharacter" ][ "POST" ] = &createCharacter; + server.resource[ "^/sapphire-api/lobby/insertSession" ][ "POST" ] = &insertSession; + server.resource[ "^/sapphire-api/lobby/checkNameTaken" ][ "POST" ] = &checkNameTaken; + server.resource[ "^/sapphire-api/lobby/checkSession" ][ "POST" ] = &checkSession; + server.resource[ "^/sapphire-api/lobby/getNextCharId" ][ "POST" ] = &getNextCharId; + server.resource[ "^/sapphire-api/lobby/getNextContentId" ][ "POST" ] = &getNextContentId; + server.resource[ "^/sapphire-api/lobby/getCharacterList" ][ "POST" ] = &getCharacterList; + server.resource[ "^(/frontier-api/ffxivsupport/view/get_init)(.*)" ][ "GET" ] = &get_init; + server.resource[ "^(/frontier-api/ffxivsupport/information/get_headline_all)(.*)" ][ "GET" ] = &get_headline_all; - g_log.info( "API server running on " + m_pConfig->getValue< std::string >( "RestNetwork.ListenIp", "0.0.0.0" ) + ":" + m_pConfig->getValue< std::string >( "RestNetwork.ListenPort", "80" ) ); + server.default_resource[ "GET" ] = &defaultGet; - //Wait for server to start so that the client can connect - this_thread::sleep_for( chrono::seconds( 1 ) ); - - server_thread.join(); - return 0; + thread server_thread( [ & ]() + { + //Start server + server.start(); + } ); + + g_log.info( "API server running on " + m_pConfig->getValue< std::string >( "RestNetwork.ListenIp", "0.0.0.0" ) + ":" + + m_pConfig->getValue< std::string >( "RestNetwork.ListenPort", "80" ) ); + + //Wait for server to start so that the client can connect + this_thread::sleep_for( chrono::seconds( 1 ) ); + + server_thread.join(); + return 0; } -void default_resource_send( const HttpServer &server, const shared_ptr &response, - const shared_ptr &ifs ) +void default_resource_send( const HttpServer& server, const shared_ptr< HttpServer::Response >& response, + const shared_ptr< ifstream >& ifs ) { - //read and send 128 KB at a time - static vector buffer( 131072 ); // Safe when server is running on one thread - streamsize read_length; - if( ( read_length = ifs->read( &buffer[0], buffer.size() ).gcount() ) > 0 ) - { - response->write( &buffer[0], read_length ); - if( read_length == static_cast< streamsize >( buffer.size() ) ) + //read and send 128 KB at a time + static vector< char > buffer( 131072 ); // Safe when server is running on one thread + streamsize read_length; + if( ( read_length = ifs->read( &buffer[ 0 ], buffer.size() ).gcount() ) > 0 ) + { + response->write( &buffer[ 0 ], read_length ); + if( read_length == static_cast< streamsize >( buffer.size() ) ) + { + server.send( response, [ &server, response, ifs ]( const boost::system::error_code& ec ) { - server.send( response, [&server, response, ifs]( const boost::system::error_code &ec ) { - if( !ec ) - default_resource_send( server, response, ifs ); - else - cerr << "Connection interrupted" << endl; - } ); - } - } + if( !ec ) + default_resource_send( server, response, ifs ); + else + cerr << "Connection interrupted" << endl; + } ); + } + } } diff --git a/src/servers/sapphire_lobby/Forwards.h b/src/servers/sapphire_lobby/Forwards.h index 43d6703b..fbd24742 100644 --- a/src/servers/sapphire_lobby/Forwards.h +++ b/src/servers/sapphire_lobby/Forwards.h @@ -13,23 +13,24 @@ x ## Ptr make_ ## x( Args &&...args ) { \ return boost::make_shared< x >( std::forward< Args >( args ) ... ); }\ typedef std::vector< x > x ## PtrList; -namespace Core -{ - TYPE_FORWARD( LobbySession ); +namespace Core { +TYPE_FORWARD( LobbySession ); - namespace Network - { - TYPE_FORWARD( Hive ); - TYPE_FORWARD( Acceptor ); - TYPE_FORWARD( Connection ); - TYPE_FORWARD( GameConnection ); +namespace Network { +TYPE_FORWARD( Hive ); - namespace Packets - { - TYPE_FORWARD( GamePacket ); - TYPE_FORWARD( FFXIVPacketBase ); - } - } +TYPE_FORWARD( Acceptor ); + +TYPE_FORWARD( Connection ); + +TYPE_FORWARD( GameConnection ); + +namespace Packets { +TYPE_FORWARD( GamePacket ); + +TYPE_FORWARD( FFXIVPacketBase ); +} +} } diff --git a/src/servers/sapphire_lobby/GameConnection.cpp b/src/servers/sapphire_lobby/GameConnection.cpp index 798bf8ec..f5fccb94 100644 --- a/src/servers/sapphire_lobby/GameConnection.cpp +++ b/src/servers/sapphire_lobby/GameConnection.cpp @@ -27,9 +27,8 @@ using namespace Core::Network::Packets::Server; Core::Network::GameConnection::GameConnection( Core::Network::HivePtr pHive, Core::Network::AcceptorPtr pAcceptor ) - : Connection( pHive ) - , m_pAcceptor( pAcceptor ) - , m_bEncryptionInitialized( false ) + : + Connection( pHive ), m_pAcceptor( pAcceptor ), m_bEncryptionInitialized( false ) { } @@ -40,281 +39,310 @@ Core::Network::GameConnection::~GameConnection() // overwrite the parents onConnect for our game socket needs -void Core::Network::GameConnection::OnAccept( const std::string & host, uint16_t port ) +void Core::Network::GameConnection::OnAccept( const std::string& host, uint16_t port ) { - auto connection = make_GameConnection( m_hive, m_pAcceptor ); - m_pAcceptor->Accept( connection ); + auto connection = make_GameConnection( m_hive, m_pAcceptor ); + m_pAcceptor->Accept( connection ); - g_log.info( "Connect from " + m_socket.remote_endpoint().address().to_string() ); + g_log.info( "Connect from " + m_socket.remote_endpoint().address().to_string() ); } void Core::Network::GameConnection::OnDisconnect() { - g_log.debug( "DISCONNECT" ); + g_log.debug( "DISCONNECT" ); } void Core::Network::GameConnection::OnRecv( std::vector< uint8_t >& buffer ) { - Packets::FFXIVARR_PACKET_HEADER packetHeader; - const auto headerResult = Packets::getHeader( buffer, 0, packetHeader ); + Packets::FFXIVARR_PACKET_HEADER packetHeader; + const auto headerResult = Packets::getHeader( buffer, 0, packetHeader ); - if( headerResult == Incomplete ) - { - g_log.info("Dropping connection due to incomplete packet header."); - g_log.info("FIXME: Packet message bounary is not implemented."); - Disconnect(); - return; - } + if( headerResult == Incomplete ) + { + g_log.info( "Dropping connection due to incomplete packet header." ); + g_log.info( "FIXME: Packet message bounary is not implemented." ); + Disconnect(); + return; + } - if( headerResult == Malformed ) - { - g_log.info("Dropping connection due to malformed packet header."); - Disconnect(); - return; - } + if( headerResult == Malformed ) + { + g_log.info( "Dropping connection due to malformed packet header." ); + Disconnect(); + return; + } - // Dissect packet list - std::vector< Packets::FFXIVARR_PACKET_RAW > packetList; - const auto packetResult = Packets::getPackets( buffer, sizeof( struct FFXIVARR_PACKET_HEADER ), - packetHeader, packetList ); + // Dissect packet list + std::vector< Packets::FFXIVARR_PACKET_RAW > packetList; + const auto packetResult = Packets::getPackets( buffer, sizeof( struct FFXIVARR_PACKET_HEADER ), + packetHeader, packetList ); - if( packetResult == Incomplete ) - { - g_log.info("Dropping connection due to incomplete packets."); - g_log.info("FIXME: Packet message bounary is not implemented."); - Disconnect(); - return; - } + if( packetResult == Incomplete ) + { + g_log.info( "Dropping connection due to incomplete packets." ); + g_log.info( "FIXME: Packet message bounary is not implemented." ); + Disconnect(); + return; + } - if( packetResult == Malformed ) - { - g_log.info("Dropping connection due to malformed packets."); - Disconnect(); - return; - } + if( packetResult == Malformed ) + { + g_log.info( "Dropping connection due to malformed packets." ); + Disconnect(); + return; + } - // Handle it - handlePackets( packetHeader, packetList ); + // Handle it + handlePackets( packetHeader, packetList ); } -void Core::Network::GameConnection::OnError( const boost::system::error_code & error ) +void Core::Network::GameConnection::OnError( const boost::system::error_code& error ) { - g_log.info( "GameConnection closed: " + error.message() ); + g_log.info( "GameConnection closed: " + error.message() ); } -void Core::Network::GameConnection::sendError( uint64_t sequence, uint32_t errorcode, uint16_t messageId, uint32_t tmpId ) +void +Core::Network::GameConnection::sendError( uint64_t sequence, uint32_t errorcode, uint16_t messageId, uint32_t tmpId ) { - auto errorPacket = makeLobbyPacket< FFXIVIpcLobbyError >( tmpId ); - errorPacket->data().seq = sequence; - errorPacket->data().error_id = errorcode; - errorPacket->data().message_id = messageId; + auto errorPacket = makeLobbyPacket< FFXIVIpcLobbyError >( tmpId ); + errorPacket->data().seq = sequence; + errorPacket->data().error_id = errorcode; + errorPacket->data().message_id = messageId; - Packets::LobbyPacketContainer pRP( m_encKey ); - pRP.addPacket( errorPacket ); - sendPacket( pRP ); + Packets::LobbyPacketContainer pRP( m_encKey ); + pRP.addPacket( errorPacket ); + sendPacket( pRP ); } void Core::Network::GameConnection::getCharList( FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ) { - uint64_t sequence = *reinterpret_cast< uint64_t* >( &packet.data[0] + 0x10 ); - g_log.info( "Sequence [" + std::to_string( sequence ) + "]" ); + uint64_t sequence = *reinterpret_cast< uint64_t* >( &packet.data[ 0 ] + 0x10 ); + g_log.info( "Sequence [" + std::to_string( sequence ) + "]" ); - g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] ReqCharList" ); - Packets::LobbyPacketContainer pRP( m_encKey ); + g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] ReqCharList" ); + Packets::LobbyPacketContainer pRP( m_encKey ); - auto serverListPacket = makeLobbyPacket< FFXIVIpcServerList >( tmpId ); - serverListPacket->data().seq = 1; - serverListPacket->data().offset = 0; - serverListPacket->data().numServers = 1; - serverListPacket->data().server[0].id = g_serverLobby.getConfig()->getValue( "Lobby.WorldID", 1 ); - serverListPacket->data().server[0].index = 0; - serverListPacket->data().final = 1; - strcpy( serverListPacket->data().server[0].name, - g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); - pRP.addPacket( serverListPacket ); + auto serverListPacket = makeLobbyPacket< FFXIVIpcServerList >( tmpId ); + serverListPacket->data().seq = 1; + serverListPacket->data().offset = 0; + serverListPacket->data().numServers = 1; + serverListPacket->data().server[ 0 ].id = g_serverLobby.getConfig()->getValue< uint16_t >( "Lobby.WorldID", 1 ); + serverListPacket->data().server[ 0 ].index = 0; + serverListPacket->data().final = 1; + strcpy( serverListPacket->data().server[ 0 ].name, + g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); + pRP.addPacket( serverListPacket ); - auto retainerListPacket = makeLobbyPacket< FFXIVIpcRetainerList >( tmpId ); - retainerListPacket->data().padding[8] = 1; - pRP.addPacket( retainerListPacket ); + auto retainerListPacket = makeLobbyPacket< FFXIVIpcRetainerList >( tmpId ); + retainerListPacket->data().padding[ 8 ] = 1; + pRP.addPacket( retainerListPacket ); - sendPacket( pRP ); + sendPacket( pRP ); - auto charList = g_restConnector.getCharList( ( char * )m_pSession->getSessionId() ); + auto charList = g_restConnector.getCharList( ( char* ) m_pSession->getSessionId() ); - uint32_t charIndex = 0; + uint32_t charIndex = 0; - for( uint8_t i = 0; i < 4; i++ ) - { - auto charListPacket = makeLobbyPacket< FFXIVIpcCharList >( tmpId ); - charListPacket->data().seq = sequence; - charListPacket->data().numInPacket = 2; - charListPacket->data().counter = i * 4; - - for( uint8_t j = 0; j < 2; j++ ) + for( uint8_t i = 0; i < 4; i++ ) + { + auto charListPacket = makeLobbyPacket< FFXIVIpcCharList >( tmpId ); + charListPacket->data().seq = sequence; + charListPacket->data().numInPacket = 2; + charListPacket->data().counter = i * 4; + for( uint8_t j = 0; j < 2; j++ ) + { + if( charIndex < charList.size() && charList.size() != 0 ) { - if( charIndex < charList.size() && charList.size() != 0 ) - { - FFXIVIpcCharList::CharaDetails details; - memset( &details, 0, sizeof( FFXIVIpcCharList::CharaDetails ) ); + FFXIVIpcCharList::CharaDetails details; + memset( &details, 0, sizeof( FFXIVIpcCharList::CharaDetails ) ); - auto& charEntry = charList[charIndex]; - details.uniqueId = get< 1 >( charEntry ); - details.contentId = get< 2 >( charEntry ); - details.serverId = g_serverLobby.getConfig()->getValue( "Lobby.WorldID", 1 ); - details.index = charIndex; - strcpy( details.charDetailJson, get< 3 >( charEntry ).c_str() ); - strcpy( details.nameChara, get< 0 >( charEntry ).c_str() ); - strcpy( details.nameServer, g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); + auto& charEntry = charList[ charIndex ]; + details.uniqueId = get< 1 >( charEntry ); + details.contentId = get< 2 >( charEntry ); + details.serverId = g_serverLobby.getConfig()->getValue< uint16_t >( "Lobby.WorldID", 1 ); + details.index = charIndex; + strcpy( details.charDetailJson, get< 3 >( charEntry ).c_str() ); + strcpy( details.nameChara, get< 0 >( charEntry ).c_str() ); + strcpy( details.nameServer, + g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); - charListPacket->data().charaDetails[j] = details; + charListPacket->data().charaDetails[ j ] = details; - g_log.debug( "[" + std::to_string( charIndex ) + "] " + std::to_string( details.index ) + " - " - + get< 0 >( charEntry ) + " - " + - std::to_string( get< 1 >( charEntry ) ) + " - " + - std::to_string( get< 2 >( charEntry ) ) + " - " + - get< 3 >( charEntry ) ); - } - charIndex++; + g_log.debug( "[" + std::to_string( charIndex ) + "] " + std::to_string( details.index ) + " - " + + get< 0 >( charEntry ) + " - " + + std::to_string( get< 1 >( charEntry ) ) + " - " + + std::to_string( get< 2 >( charEntry ) ) + " - " + + get< 3 >( charEntry ) ); } + charIndex++; + } - // TODO: Eventually move to account info storage - if( i == 3 ) - { - charListPacket->data().entitledExpansion = 2; - charListPacket->data().maxCharOnWorld = 8; - charListPacket->data().unknown8 = 8; - charListPacket->data().veteranRank = 12; - charListPacket->data().counter = ( i * 4 ) + 1; - charListPacket->data().unknown4 = 128; - } - Packets::LobbyPacketContainer pRP( m_encKey ); - pRP.addPacket( charListPacket ); - sendPacket( pRP ); + // TODO: Eventually move to account info storage + if( i == 3 ) + { + charListPacket->data().entitledExpansion = 2; + charListPacket->data().maxCharOnWorld = 8; + charListPacket->data().unknown8 = 8; + charListPacket->data().veteranRank = 12; + charListPacket->data().counter = ( i * 4 ) + 1; + charListPacket->data().unknown4 = 128; + } + Packets::LobbyPacketContainer pRP( m_encKey ); + pRP.addPacket( charListPacket ); + sendPacket( pRP ); - } + } } void Core::Network::GameConnection::enterWorld( FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ) { - uint64_t sequence = *reinterpret_cast< uint64_t* >( &packet.data[0] + 0x10 ); - g_log.info( "Sequence [" + std::to_string( sequence ) + "]" ); + uint64_t sequence = *reinterpret_cast< uint64_t* >( &packet.data[ 0 ] + 0x10 ); + g_log.info( "Sequence [" + std::to_string( sequence ) + "]" ); - g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] ReqEnterWorld" ); + g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] ReqEnterWorld" ); - uint64_t lookupId = *reinterpret_cast< uint64_t* >( &packet.data[0] + 0x18 ); + uint64_t lookupId = *reinterpret_cast< uint64_t* >( &packet.data[ 0 ] + 0x18 ); - uint32_t logInCharId = -1; - std::string logInCharName; - auto charList = g_restConnector.getCharList( ( char * )m_pSession->getSessionId() ); - for( uint32_t i = 0; i < charList.size(); i++ ) - { - uint64_t thisContentId = get< 2 >( charList[i] ); + uint32_t logInCharId = -1; + std::string logInCharName; + auto charList = g_restConnector.getCharList( ( char* ) m_pSession->getSessionId() ); + for( uint32_t i = 0; i < charList.size(); i++ ) + { + uint64_t thisContentId = get< 2 >( charList[ i ] ); - if( thisContentId == lookupId ) - { - logInCharId = get< 1 >( charList[i] ); - logInCharName = get< 0 >( charList[i] ); - break; - } - } + if( thisContentId == lookupId ) + { + logInCharId = get< 1 >( charList[ i ] ); + logInCharName = get< 0 >( charList[ i ] ); + break; + } + } - if( logInCharId == -1 ) - return; + if( logInCharId == -1 ) + return; - g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] Logging in as " + logInCharName + "(" + std::to_string( logInCharId ) + ")" ); + g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] Logging in as " + logInCharName + "(" + + std::to_string( logInCharId ) + ")" ); - Packets::LobbyPacketContainer pRP( m_encKey ); + Packets::LobbyPacketContainer pRP( m_encKey ); - auto enterWorldPacket = makeLobbyPacket< FFXIVIpcEnterWorld >( tmpId ); - enterWorldPacket->data().contentId = lookupId; - enterWorldPacket->data().seq = sequence; - strcpy( enterWorldPacket->data().host, - g_serverLobby.getConfig()->getValue< std::string >( "GlobalNetwork.ZoneHost" ).c_str() ); - enterWorldPacket->data().port = g_serverLobby.getConfig()->getValue< uint16_t >( "GlobalNetwork.ZonePort" ); - enterWorldPacket->data().charId = logInCharId; - memcpy( enterWorldPacket->data().sid, m_pSession->getSessionId(), 66 ); - pRP.addPacket( enterWorldPacket ); - sendPacket( pRP ); + auto enterWorldPacket = makeLobbyPacket< FFXIVIpcEnterWorld >( tmpId ); + enterWorldPacket->data().contentId = lookupId; + enterWorldPacket->data().seq = sequence; + strcpy( enterWorldPacket->data().host, + g_serverLobby.getConfig()->getValue< std::string >( "GlobalNetwork.ZoneHost" ).c_str() ); + enterWorldPacket->data().port = g_serverLobby.getConfig()->getValue< uint16_t >( "GlobalNetwork.ZonePort" ); + enterWorldPacket->data().charId = logInCharId; + memcpy( enterWorldPacket->data().sid, m_pSession->getSessionId(), 66 ); + pRP.addPacket( enterWorldPacket ); + sendPacket( pRP ); } bool Core::Network::GameConnection::sendServiceAccountList( FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ) { - LobbySessionPtr pSession = g_serverLobby.getSession( ( char* )&packet.data[0] + 0x20 ); - - if( g_serverLobby.getConfig()->getValue< bool >( "Lobby.AllowNoSessionConnect" ) && pSession == nullptr ) - { - auto session = make_LobbySession(); - session->setAccountID( 0 ); - session->setSessionId( (uint8_t *)&packet.data[0] + 0x20 ); - pSession = session; - g_log.Log( LoggingSeverity::info, "Allowed connection with no session: " + std::string( ( char* )&packet.data[0] + 0x20 ) ); - } + LobbySessionPtr pSession = g_serverLobby.getSession( ( char* ) &packet.data[ 0 ] + 0x20 ); - if( pSession != nullptr ) - { - g_log.Log( LoggingSeverity::info, "Found session linked to accountId: " + std::to_string( pSession->getAccountID() ) ); - m_pSession = pSession; + if( g_serverLobby.getConfig()->getValue< bool >( "Lobby.AllowNoSessionConnect" ) && pSession == nullptr ) + { + auto session = make_LobbySession(); + session->setAccountID( 0 ); + session->setSessionId( ( uint8_t* ) &packet.data[ 0 ] + 0x20 ); + pSession = session; + g_log.Log( LoggingSeverity::info, + "Allowed connection with no session: " + std::string( ( char* ) &packet.data[ 0 ] + 0x20 ) ); + } - auto serviceIdInfoPacket = makeLobbyPacket< FFXIVIpcServiceIdInfo >( tmpId ); - sprintf( serviceIdInfoPacket->data().serviceAccount[0].name, "FINAL FANTASY XIV" ); - serviceIdInfoPacket->data().numServiceAccounts = 1; - serviceIdInfoPacket->data().u1 = 3; - serviceIdInfoPacket->data().u2 = 0x99; - serviceIdInfoPacket->data().serviceAccount[0].id = 0x002E4A2B; + if( pSession != nullptr ) + { + g_log.Log( LoggingSeverity::info, + "Found session linked to accountId: " + std::to_string( pSession->getAccountID() ) ); + m_pSession = pSession; - Packets::LobbyPacketContainer pRP( m_encKey ); - pRP.addPacket( serviceIdInfoPacket ); - sendPacket( pRP ); - } - else - { - g_log.Log( LoggingSeverity::info, "Could not retrieve session: " + std::string( ( char* )&packet.data[0] + 0x20 ) ); - sendError( 1, 5006, 13001, tmpId ); + auto serviceIdInfoPacket = makeLobbyPacket< FFXIVIpcServiceIdInfo >( tmpId ); + sprintf( serviceIdInfoPacket->data().serviceAccount[ 0 ].name, "FINAL FANTASY XIV" ); + serviceIdInfoPacket->data().numServiceAccounts = 1; + serviceIdInfoPacket->data().u1 = 3; + serviceIdInfoPacket->data().u2 = 0x99; + serviceIdInfoPacket->data().serviceAccount[ 0 ].id = 0x002E4A2B; - return true; - } - return false; + Packets::LobbyPacketContainer pRP( m_encKey ); + pRP.addPacket( serviceIdInfoPacket ); + sendPacket( pRP ); + } + else + { + g_log.Log( LoggingSeverity::info, + "Could not retrieve session: " + std::string( ( char* ) &packet.data[ 0 ] + 0x20 ) ); + sendError( 1, 5006, 13001, tmpId ); + + return true; + } + return false; } bool Core::Network::GameConnection::createOrModifyChar( FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ) { - uint64_t sequence = *reinterpret_cast< uint64_t* >( &packet.data[0] + 0x10 ); - uint8_t type = *reinterpret_cast< uint8_t* >( &packet.data[0] + 0x29 ); - g_log.info( "Sequence [" + std::to_string( sequence ) + "]" ); - g_log.info( "Type [" + std::to_string( type ) + "]" ); + uint64_t sequence = *reinterpret_cast< uint64_t* >( &packet.data[ 0 ] + 0x10 ); + uint8_t type = *reinterpret_cast< uint8_t* >( &packet.data[ 0 ] + 0x29 ); + g_log.info( "Sequence [" + std::to_string( sequence ) + "]" ); + g_log.info( "Type [" + std::to_string( type ) + "]" ); - g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] ReqCharCreate" ); + g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] ReqCharCreate" ); - std::string name; - uint32_t newId = g_restConnector.getNextCharId(); - uint64_t newContentId = g_restConnector.getNextContentId(); + std::string name; + uint32_t newId = g_restConnector.getNextCharId(); + uint64_t newContentId = g_restConnector.getNextContentId(); - if( type == 1 ) //Character creation name check - { - name = std::string( ( char* )&packet.data[0] + 0x2C ); + if( type == 1 ) //Character creation name check + { + name = std::string( ( char* ) &packet.data[ 0 ] + 0x2C ); - g_log.Log( LoggingSeverity::info, "[" + std::to_string( m_pSession->getAccountID() ) + "] Type 1: " + name ); + g_log.Log( LoggingSeverity::info, "[" + std::to_string( m_pSession->getAccountID() ) + "] Type 1: " + name ); + Packets::LobbyPacketContainer pRP( m_encKey ); + + m_pSession->newCharName = name; + + if( g_restConnector.checkNameTaken( m_pSession->newCharName ) ) + { + sendError( sequence, 3074, 13004, tmpId ); + return true; + } + + auto charCreatePacket = makeLobbyPacket< FFXIVIpcCharCreate >( tmpId ); + charCreatePacket->data().content_id = newContentId; + strcpy( charCreatePacket->data().name, name.c_str() ); + strcpy( charCreatePacket->data().world, + g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); + charCreatePacket->data().type = 1; + charCreatePacket->data().seq = sequence; + charCreatePacket->data().unknown = 1; + charCreatePacket->data().unknown_2 = 1; + charCreatePacket->data().unknown_7 = 1; + charCreatePacket->data().unknown_8 = 1; + pRP.addPacket( charCreatePacket ); + sendPacket( pRP ); + } + else if( type == 2 ) //Character creation finalize + { + std::string charDetails( ( char* ) &packet.data[ 0 ] + 0x4C ); + g_log.Log( LoggingSeverity::info, "[" + std::to_string( m_pSession->getAccountID() ) + "] Type 2: " + charDetails ); + + if( g_restConnector.createCharacter( ( char* ) m_pSession->getSessionId(), m_pSession->newCharName, charDetails ) != + -1 ) + { Packets::LobbyPacketContainer pRP( m_encKey ); - m_pSession->newCharName = name; - - if( g_restConnector.checkNameTaken( m_pSession->newCharName ) ) - { - sendError( sequence, 3074, 13004, tmpId ); - return true; - } - auto charCreatePacket = makeLobbyPacket< FFXIVIpcCharCreate >( tmpId ); charCreatePacket->data().content_id = newContentId; strcpy( charCreatePacket->data().name, name.c_str() ); strcpy( charCreatePacket->data().world, - g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); - charCreatePacket->data().type = 1; + g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); + charCreatePacket->data().type = 2; charCreatePacket->data().seq = sequence; charCreatePacket->data().unknown = 1; charCreatePacket->data().unknown_2 = 1; @@ -322,206 +350,184 @@ bool Core::Network::GameConnection::createOrModifyChar( FFXIVARR_PACKET_RAW& pac charCreatePacket->data().unknown_8 = 1; pRP.addPacket( charCreatePacket ); sendPacket( pRP ); - } - else if( type == 2 ) //Character creation finalize - { - std::string charDetails( ( char* )&packet.data[0] + 0x4C ); - g_log.Log( LoggingSeverity::info, "[" + std::to_string( m_pSession->getAccountID() ) + "] Type 2: " + charDetails ); - - if( g_restConnector.createCharacter( ( char* )m_pSession->getSessionId(), m_pSession->newCharName, charDetails ) != -1 ) - { - Packets::LobbyPacketContainer pRP( m_encKey ); - - auto charCreatePacket = makeLobbyPacket< FFXIVIpcCharCreate >( tmpId ); - charCreatePacket->data().content_id = newContentId; - strcpy( charCreatePacket->data().name, name.c_str() ); - strcpy( charCreatePacket->data().world, - g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); - charCreatePacket->data().type = 2; - charCreatePacket->data().seq = sequence; - charCreatePacket->data().unknown = 1; - charCreatePacket->data().unknown_2 = 1; - charCreatePacket->data().unknown_7 = 1; - charCreatePacket->data().unknown_8 = 1; - pRP.addPacket( charCreatePacket ); - sendPacket( pRP ); - } - else - { - sendError( sequence, 5006, 13001, tmpId ); - } - } - else if( type == 4 ) //Character delete - { - name = std::string( ( char* )&packet.data[0] + 0x2C ); - g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] Type 4: " + name ); + } + else + { + sendError( sequence, 5006, 13001, tmpId ); + } + } + else if( type == 4 ) //Character delete + { + name = std::string( ( char* ) &packet.data[ 0 ] + 0x2C ); + g_log.info( "[" + std::to_string( m_pSession->getAccountID() ) + "] Type 4: " + name ); + if( g_restConnector.deleteCharacter( ( char* ) m_pSession->getSessionId(), name ) ) + { - if( g_restConnector.deleteCharacter( ( char* )m_pSession->getSessionId(), name ) ) - { + auto charCreatePacket = makeLobbyPacket< FFXIVIpcCharCreate >( tmpId ); + //charCreatePacket->data().content_id = deletePlayer.getContentId(); + charCreatePacket->data().content_id = 0; + strcpy( charCreatePacket->data().name, name.c_str() ); + strcpy( charCreatePacket->data().world, + g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); + charCreatePacket->data().type = 4; + charCreatePacket->data().seq = sequence; + charCreatePacket->data().unknown = 1; + charCreatePacket->data().unknown_2 = 1; + charCreatePacket->data().unknown_7 = 1; + charCreatePacket->data().unknown_8 = 1; - auto charCreatePacket = makeLobbyPacket< FFXIVIpcCharCreate >( tmpId ); - //charCreatePacket->data().content_id = deletePlayer.getContentId(); - charCreatePacket->data().content_id = 0; - strcpy( charCreatePacket->data().name, name.c_str() ); - strcpy( charCreatePacket->data().world, g_serverLobby.getConfig()->getValue< std::string >( "Lobby.WorldName", "Sapphire" ).c_str() ); - charCreatePacket->data().type = 4; - charCreatePacket->data().seq = sequence; - charCreatePacket->data().unknown = 1; - charCreatePacket->data().unknown_2 = 1; - charCreatePacket->data().unknown_7 = 1; - charCreatePacket->data().unknown_8 = 1; - - Packets::LobbyPacketContainer pRP( m_encKey ); - pRP.addPacket( charCreatePacket ); - sendPacket( pRP ); - } - else - { - sendError( sequence, 5006, 13001, tmpId ); - } - } - else - { - g_log.error( "[" + std::to_string( m_pSession->getAccountID() ) + "] Unknown Character Creation Type: " + std::to_string( type ) ); - } - return false; + Packets::LobbyPacketContainer pRP( m_encKey ); + pRP.addPacket( charCreatePacket ); + sendPacket( pRP ); + } + else + { + sendError( sequence, 5006, 13001, tmpId ); + } + } + else + { + g_log.error( "[" + std::to_string( m_pSession->getAccountID() ) + "] Unknown Character Creation Type: " + + std::to_string( type ) ); + } + return false; } -void Core::Network::GameConnection::handleGamePacket( Packets::FFXIVARR_PACKET_RAW &packet ) +void Core::Network::GameConnection::handleGamePacket( Packets::FFXIVARR_PACKET_RAW& packet ) { - uint32_t tmpId = packet.segHdr.target_actor; + uint32_t tmpId = packet.segHdr.target_actor; - g_log.info( "OpCode [" + std::to_string( *reinterpret_cast< uint16_t* >( &packet.data[2] ) ) + "]" ); + g_log.info( "OpCode [" + std::to_string( *reinterpret_cast< uint16_t* >( &packet.data[ 2 ] ) ) + "]" ); - switch( *reinterpret_cast< uint16_t* >( &packet.data[2] ) ) - { - case ReqServiceAccountList: - { - sendServiceAccountList( packet, tmpId ); - } + switch( *reinterpret_cast< uint16_t* >( &packet.data[ 2 ] ) ) + { + case ReqServiceAccountList: + { + sendServiceAccountList( packet, tmpId ); + } break; - case ReqCharList: - { - getCharList( packet, tmpId ); - } + case ReqCharList: + { + getCharList( packet, tmpId ); + } break; - case ReqEnterWorld: - { - enterWorld( packet, tmpId ); - } + case ReqEnterWorld: + { + enterWorld( packet, tmpId ); + } break; - case ReqCharCreate: - { - createOrModifyChar( packet, tmpId ); - } + case ReqCharCreate: + { + createOrModifyChar( packet, tmpId ); + } break; - } + } } void Core::Network::GameConnection::sendPacket( Packets::LobbyPacketContainer& pLpc ) { - uint16_t size = pLpc.getSize(); - uint8_t* dataPtr = pLpc.getRawData( false ); - std::vector< uint8_t > sendBuffer; - sendBuffer.assign( dataPtr, dataPtr + size ); - Send( sendBuffer ); + uint16_t size = pLpc.getSize(); + uint8_t* dataPtr = pLpc.getRawData( false ); + std::vector< uint8_t > sendBuffer; + sendBuffer.assign( dataPtr, dataPtr + size ); + Send( sendBuffer ); } -void Core::Network::GameConnection::sendPackets( Packets::PacketContainer * pPacket ) +void Core::Network::GameConnection::sendPackets( Packets::PacketContainer* pPacket ) { - //g_log.Log(LoggingSeverity::info, pPacket->toString()); - std::vector< uint8_t > sendBuffer; + //g_log.Log(LoggingSeverity::info, pPacket->toString()); + std::vector< uint8_t > sendBuffer; - pPacket->fillSendBuffer( sendBuffer ); - Send( sendBuffer ); + pPacket->fillSendBuffer( sendBuffer ); + Send( sendBuffer ); } void Core::Network::GameConnection::sendSinglePacket( FFXIVPacketBasePtr pPacket ) { - PacketContainer pRP = PacketContainer(); - pRP.addPacket( pPacket ); - sendPackets( &pRP ); + PacketContainer pRP = PacketContainer(); + pRP.addPacket( pPacket ); + sendPackets( &pRP ); } void Core::Network::GameConnection::generateEncryptionKey( uint32_t key, const std::string& keyPhrase ) { - memset( m_baseKey, 0, 0x2C ); - m_baseKey[0] = 0x78; - m_baseKey[1] = 0x56; - m_baseKey[2] = 0x34; - m_baseKey[3] = 0x12; - memcpy( m_baseKey + 0x04, &key, 4 ); - m_baseKey[8] = 0xCC; - m_baseKey[9] = 0x10; - memcpy( ( char* )m_baseKey + 0x0C, keyPhrase.c_str(), keyPhrase.size() ); - Core::Util::md5( m_baseKey, m_encKey, 0x2C ); + memset( m_baseKey, 0, 0x2C ); + m_baseKey[ 0 ] = 0x78; + m_baseKey[ 1 ] = 0x56; + m_baseKey[ 2 ] = 0x34; + m_baseKey[ 3 ] = 0x12; + memcpy( m_baseKey + 0x04, &key, 4 ); + m_baseKey[ 8 ] = 0xCC; + m_baseKey[ 9 ] = 0x10; + memcpy( ( char* ) m_baseKey + 0x0C, keyPhrase.c_str(), keyPhrase.size() ); + Core::Util::md5( m_baseKey, m_encKey, 0x2C ); } void Core::Network::GameConnection::handlePackets( const Core::Network::Packets::FFXIVARR_PACKET_HEADER& ipcHeader, const std::vector< Core::Network::Packets::FFXIVARR_PACKET_RAW >& packetData ) { - for( auto inPacket : packetData ) - { + for( auto inPacket : packetData ) + { - if( m_bEncryptionInitialized && inPacket.segHdr.type == 3 ) + if( m_bEncryptionInitialized && inPacket.segHdr.type == 3 ) + { + BlowFish blowfish; + blowfish.initialize( m_encKey, 0x10 ); + blowfish.Decode( ( uint8_t* ) ( &inPacket.data[ 0 ] ), ( uint8_t* ) ( &inPacket.data[ 0 ] ), + ( inPacket.data.size() ) - 0x10 ); + } + + switch( inPacket.segHdr.type ) + { + case SEGMENTTYPE_ENCRYPTIONINIT: // Encryption init { - BlowFish blowfish; - blowfish.initialize( m_encKey, 0x10 ); - blowfish.Decode( ( uint8_t* )( &inPacket.data[0] ), ( uint8_t* )( &inPacket.data[0] ), - ( inPacket.data.size() ) - 0x10 ); + std::string key_phrase( reinterpret_cast< char* >( &inPacket.data[ 36 ] ) ); + generateEncryptionKey( *reinterpret_cast< uint32_t* >( &inPacket.data[ 100 ] ), key_phrase ); + m_bEncryptionInitialized = true; + + auto pe1 = boost::make_shared< FFXIVRawPacket >( 0x0A, 0x290, 0, 0 ); + *reinterpret_cast< uint32_t* >( &pe1->data()[ 0 ] ) = 0xE0003C2A; + + BlowFish blowfish; + blowfish.initialize( m_encKey, 0x10 ); + blowfish.Encode( &pe1->data()[ 0 ], &pe1->data()[ 0 ], 0x280 ); + + sendSinglePacket( pe1 ); + break; } - switch( inPacket.segHdr.type ) + + case SEGMENTTYPE_IPC: // game packet { - case SEGMENTTYPE_ENCRYPTIONINIT: // Encryption init - { - std::string key_phrase( reinterpret_cast< char* >( &inPacket.data[36] ) ); - generateEncryptionKey( *reinterpret_cast< uint32_t* >( &inPacket.data[100] ), key_phrase ); - m_bEncryptionInitialized = true; - - auto pe1 = boost::make_shared< FFXIVRawPacket >( 0x0A, 0x290, 0, 0 ); - *reinterpret_cast< uint32_t* >( &pe1->data()[0] ) = 0xE0003C2A; - - BlowFish blowfish; - blowfish.initialize( m_encKey, 0x10 ); - blowfish.Encode( &pe1->data()[0], &pe1->data()[0], 0x280 ); - - sendSinglePacket( pe1 ); - break; - } - - - case SEGMENTTYPE_IPC: // game packet - { - g_log.info( "GamePacket [" + std::to_string( inPacket.segHdr.type ) + "]" ); - handleGamePacket( inPacket ); - break; - } - case SEGMENTTYPE_KEEPALIVE: // keep alive - { - uint32_t id = *reinterpret_cast< uint32_t* >( &inPacket.data[0] ); - uint32_t timeStamp = *reinterpret_cast< uint32_t* >( &inPacket.data[4] ); - - auto pe4 = boost::make_shared< FFXIVRawPacket >( 0x08, 0x18, 0, 0 ); - *(unsigned int*)(&pe4->data()[0]) = id; - *(unsigned int*)(&pe4->data()[4]) = timeStamp; - sendSinglePacket( pe4 ); - - break; - } - case 8: - { - break; - } + g_log.info( "GamePacket [" + std::to_string( inPacket.segHdr.type ) + "]" ); + handleGamePacket( inPacket ); + break; } - } + case SEGMENTTYPE_KEEPALIVE: // keep alive + { + uint32_t id = *reinterpret_cast< uint32_t* >( &inPacket.data[ 0 ] ); + uint32_t timeStamp = *reinterpret_cast< uint32_t* >( &inPacket.data[ 4 ] ); + + auto pe4 = boost::make_shared< FFXIVRawPacket >( 0x08, 0x18, 0, 0 ); + *( unsigned int* ) ( &pe4->data()[ 0 ] ) = id; + *( unsigned int* ) ( &pe4->data()[ 4 ] ) = timeStamp; + sendSinglePacket( pe4 ); + + break; + } + case 8: + { + break; + } + } + } } diff --git a/src/servers/sapphire_lobby/GameConnection.h b/src/servers/sapphire_lobby/GameConnection.h index 64b600bb..5090637b 100644 --- a/src/servers/sapphire_lobby/GameConnection.h +++ b/src/servers/sapphire_lobby/GameConnection.h @@ -17,66 +17,70 @@ namespace Core { namespace Network { -class GameConnection : public Connection +class GameConnection : + public Connection { private: - // TODO move the next three params to the session, makes more sense there - // encryption key - uint8_t m_encKey[0x10]; + // TODO move the next three params to the session, makes more sense there + // encryption key + uint8_t m_encKey[0x10]; - // base key, the encryption key is generated from this - uint8_t m_baseKey[0x2C]; + // base key, the encryption key is generated from this + uint8_t m_baseKey[0x2C]; - bool m_bEncryptionInitialized; + bool m_bEncryptionInitialized; - AcceptorPtr m_pAcceptor; + AcceptorPtr m_pAcceptor; - LobbySessionPtr m_pSession; + LobbySessionPtr m_pSession; - LockedQueue< Packets::GamePacketPtr > m_inQueue; - LockedQueue< Packets::GamePacketPtr > m_outQueue; + LockedQueue< Packets::GamePacketPtr > m_inQueue; + LockedQueue< Packets::GamePacketPtr > m_outQueue; public: - GameConnection( HivePtr pHive, AcceptorPtr pAcceptor ); + GameConnection( HivePtr pHive, AcceptorPtr pAcceptor ); - ~GameConnection(); + ~GameConnection(); - void generateEncryptionKey( uint32_t key, const std::string& keyPhrase ); + void generateEncryptionKey( uint32_t key, const std::string& keyPhrase ); - // overwrite the parents onConnect for our game socket needs - void OnAccept( const std::string & host, uint16_t port ) override; + // overwrite the parents onConnect for our game socket needs + void OnAccept( const std::string& host, uint16_t port ) override; - void OnDisconnect() override; + void OnDisconnect() override; - void OnRecv( std::vector< uint8_t > & buffer ) override; + void OnRecv( std::vector< uint8_t >& buffer ) override; - void OnError( const boost::system::error_code & error ) override; - void sendError( uint64_t sequence, uint32_t errorcode, uint16_t messageId, uint32_t tmpId ); + void OnError( const boost::system::error_code& error ) override; - void getCharList( Packets::FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ); - void enterWorld( Packets::FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ); - bool sendServiceAccountList( Packets::FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ); - bool createOrModifyChar( Packets::FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ); + void sendError( uint64_t sequence, uint32_t errorcode, uint16_t messageId, uint32_t tmpId ); - void handlePackets( const Packets::FFXIVARR_PACKET_HEADER& ipcHeader, - const std::vector& packetData ); + void getCharList( Packets::FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ); - void handleGamePacket( Packets::FFXIVARR_PACKET_RAW &pPacket ); + void enterWorld( Packets::FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ); - void handlePacket( Packets::FFXIVPacketBasePtr pPacket ); + bool sendServiceAccountList( Packets::FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ); - void sendPackets( Packets::PacketContainer * pPacket ); + bool createOrModifyChar( Packets::FFXIVARR_PACKET_RAW& packet, uint32_t tmpId ); - void sendPacket( Packets::LobbyPacketContainer& pLpc ); + void handlePackets( const Packets::FFXIVARR_PACKET_HEADER& ipcHeader, + const std::vector< Packets::FFXIVARR_PACKET_RAW >& packetData ); - void sendSinglePacket( Packets::FFXIVPacketBasePtr pPacket ); + void handleGamePacket( Packets::FFXIVARR_PACKET_RAW& pPacket ); + + void handlePacket( Packets::FFXIVPacketBasePtr pPacket ); + + void sendPackets( Packets::PacketContainer* pPacket ); + + void sendPacket( Packets::LobbyPacketContainer& pLpc ); + + void sendSinglePacket( Packets::FFXIVPacketBasePtr pPacket ); }; - } } diff --git a/src/servers/sapphire_lobby/LobbyPacketContainer.cpp b/src/servers/sapphire_lobby/LobbyPacketContainer.cpp index db04de80..0927056a 100644 --- a/src/servers/sapphire_lobby/LobbyPacketContainer.cpp +++ b/src/servers/sapphire_lobby/LobbyPacketContainer.cpp @@ -9,47 +9,47 @@ using namespace Core::Network::Packets; Core::Network::Packets::LobbyPacketContainer::LobbyPacketContainer( uint8_t* encKey ) { - memset( &m_header, 0, sizeof( Core::Network::Packets::FFXIVARR_PACKET_HEADER ) ); - m_header.size = sizeof( Core::Network::Packets::FFXIVARR_PACKET_HEADER ); + memset( &m_header, 0, sizeof( Core::Network::Packets::FFXIVARR_PACKET_HEADER ) ); + m_header.size = sizeof( Core::Network::Packets::FFXIVARR_PACKET_HEADER ); - m_encKey = encKey; + m_encKey = encKey; - memset( m_dataBuf, 0, 0x1570 ); + memset( m_dataBuf, 0, 0x1570 ); } Core::Network::Packets::LobbyPacketContainer::~LobbyPacketContainer() { - m_entryList.clear(); + m_entryList.clear(); } void Core::Network::Packets::LobbyPacketContainer::addPacket( FFXIVPacketBasePtr pEntry ) { - memcpy( m_dataBuf + m_header.size, &pEntry->getData()[0], pEntry->getSize() ); + memcpy( m_dataBuf + m_header.size, &pEntry->getData()[ 0 ], pEntry->getSize() ); - // encryption key is set, we want to encrypt this packet - if( m_encKey != nullptr ) - { - BlowFish blowfish; - blowfish.initialize( m_encKey, 0x10 ); - blowfish.Encode( m_dataBuf + m_header.size + 0x10, m_dataBuf + m_header.size + 0x10, pEntry->getSize() - 0x10 ); - } + // encryption key is set, we want to encrypt this packet + if( m_encKey != nullptr ) + { + BlowFish blowfish; + blowfish.initialize( m_encKey, 0x10 ); + blowfish.Encode( m_dataBuf + m_header.size + 0x10, m_dataBuf + m_header.size + 0x10, pEntry->getSize() - 0x10 ); + } - m_header.size += pEntry->getSize(); - m_header.count++; + m_header.size += pEntry->getSize(); + m_header.count++; } uint16_t Core::Network::Packets::LobbyPacketContainer::getSize() const { - return m_header.size; + return m_header.size; } uint8_t* Core::Network::Packets::LobbyPacketContainer::getRawData( bool addstuff ) { - if( addstuff ) - { - m_header.unknown_0 = 0xff41a05252; - m_header.timestamp = Core::Util::getTimeMs(); - } - memcpy( m_dataBuf, &m_header, sizeof( Core::Network::Packets::FFXIVARR_PACKET_HEADER ) ); - return m_dataBuf; + if( addstuff ) + { + m_header.unknown_0 = 0xff41a05252; + m_header.timestamp = Core::Util::getTimeMs(); + } + memcpy( m_dataBuf, &m_header, sizeof( Core::Network::Packets::FFXIVARR_PACKET_HEADER ) ); + return m_dataBuf; } diff --git a/src/servers/sapphire_lobby/LobbyPacketContainer.h b/src/servers/sapphire_lobby/LobbyPacketContainer.h index 6ac7ea77..12807261 100644 --- a/src/servers/sapphire_lobby/LobbyPacketContainer.h +++ b/src/servers/sapphire_lobby/LobbyPacketContainer.h @@ -18,23 +18,24 @@ typedef boost::shared_ptr< FFXIVPacketBase > FFXIVPacketBasePtr; class LobbyPacketContainer { public: - LobbyPacketContainer( uint8_t* encKey = nullptr ); - ~LobbyPacketContainer(); + LobbyPacketContainer( uint8_t* encKey = nullptr ); - void addPacket( FFXIVPacketBasePtr pEntry ); + ~LobbyPacketContainer(); - uint16_t getSize() const; + void addPacket( FFXIVPacketBasePtr pEntry ); - uint8_t* getRawData( bool addstuff = true ); + uint16_t getSize() const; + + uint8_t* getRawData( bool addstuff = true ); private: - Core::Network::Packets::FFXIVARR_PACKET_HEADER m_header; + Core::Network::Packets::FFXIVARR_PACKET_HEADER m_header; - uint8_t* m_encKey; + uint8_t* m_encKey; - std::vector< FFXIVPacketBasePtr > m_entryList; + std::vector< FFXIVPacketBasePtr > m_entryList; - uint8_t m_dataBuf[0x2000]; + uint8_t m_dataBuf[0x2000]; }; diff --git a/src/servers/sapphire_lobby/LobbySession.cpp b/src/servers/sapphire_lobby/LobbySession.cpp index e8f4d902..3a20dfd4 100644 --- a/src/servers/sapphire_lobby/LobbySession.cpp +++ b/src/servers/sapphire_lobby/LobbySession.cpp @@ -1,15 +1,15 @@ #include "LobbySession.h" -namespace Core + +namespace Core { +LobbySession::LobbySession( void ) { - LobbySession::LobbySession( void ) - { - //setSocket(NULL); + //setSocket(NULL); - } - - LobbySession::~LobbySession( void ) - { - - } +} + +LobbySession::~LobbySession( void ) +{ + +} } diff --git a/src/servers/sapphire_lobby/LobbySession.h b/src/servers/sapphire_lobby/LobbySession.h index 867a1008..96bd84a1 100644 --- a/src/servers/sapphire_lobby/LobbySession.h +++ b/src/servers/sapphire_lobby/LobbySession.h @@ -9,53 +9,54 @@ namespace Core { - class LobbySession - { +class LobbySession +{ - private: - uint32_t m_IP; - uint32_t m_accountID; +private: + uint32_t m_IP; + uint32_t m_accountID; - uint8_t m_sessionId[56]; + uint8_t m_sessionId[56]; - public: +public: - std::string newCharName; + std::string newCharName; - LobbySession( void ); - ~LobbySession( void ); + LobbySession( void ); - uint32_t getIP() - { - return m_IP; - } + ~LobbySession( void ); - uint8_t * getSessionId() - { - return m_sessionId; - } + uint32_t getIP() + { + return m_IP; + } - void setSessionId( uint8_t * sessionId ) - { - memcpy( m_sessionId, sessionId, 56 ); - } + uint8_t* getSessionId() + { + return m_sessionId; + } - void setIP( uint32_t iP ) - { - m_IP = iP; - } + void setSessionId( uint8_t* sessionId ) + { + memcpy( m_sessionId, sessionId, 56 ); + } - uint32_t getAccountID() - { - return m_accountID; - } + void setIP( uint32_t iP ) + { + m_IP = iP; + } - void setAccountID( uint32_t iD ) - { - m_accountID = iD; - } + uint32_t getAccountID() + { + return m_accountID; + } - }; + void setAccountID( uint32_t iD ) + { + m_accountID = iD; + } + +}; } diff --git a/src/servers/sapphire_lobby/RestConnector.cpp b/src/servers/sapphire_lobby/RestConnector.cpp index 696e3904..5a9a5a3b 100644 --- a/src/servers/sapphire_lobby/RestConnector.cpp +++ b/src/servers/sapphire_lobby/RestConnector.cpp @@ -7,6 +7,7 @@ #include #define BOOST_SPIRIT_THREADSAFE + #include #include #include @@ -16,7 +17,7 @@ extern Core::Logger g_log; -typedef std::vector> CharList; +typedef std::vector< std::tuple< std::string, uint32_t, uint64_t, std::string>> CharList; Core::Network::RestConnector::RestConnector() { @@ -30,313 +31,327 @@ Core::Network::RestConnector::~RestConnector() HttpResponse Core::Network::RestConnector::requestApi( std::string endpoint, std::string data ) { - HttpClient client( restHost ); + HttpClient client( restHost ); - std::string reqstr = "/sapphire-api/lobby/" + endpoint; + std::string reqstr = "/sapphire-api/lobby/" + endpoint; - HttpResponse r; - try - { - r = client.request( "POST", reqstr, data ); - } - catch( std::exception& e ) - { - g_log.error( endpoint + " failed, REST is not reachable: " + std::string( e.what() ) ); - return nullptr; - } - return r; + HttpResponse r; + try + { + r = client.request( "POST", reqstr, data ); + } + catch( std::exception& e ) + { + g_log.error( endpoint + " failed, REST is not reachable: " + std::string( e.what() ) ); + return nullptr; + } + return r; } Core::LobbySessionPtr Core::Network::RestConnector::getSession( char* sId ) { - std::string json_string = "{\"sId\": \"" + std::string( sId ) + "\",\"secret\": \"" + serverSecret + "\"}"; + std::string json_string = "{\"sId\": \"" + std::string( sId ) + "\",\"secret\": \"" + serverSecret + "\"}"; - HttpResponse r = requestApi( "checkSession", json_string ); - - if( r == nullptr ) + HttpResponse r = requestApi( "checkSession", json_string ); + + if( r == nullptr ) + return nullptr; + + std::string content = std::string( std::istreambuf_iterator< char >( r->content ), {} ); + if( r->status_code.find( "200" ) != std::string::npos ) + { + using namespace boost::property_tree; + ptree pt; + + try + { + std::stringstream ss; + ss << content; + + read_json( ss, pt ); + } + catch( std::exception& e ) + { + g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); return nullptr; + } - std::string content = std::string( std::istreambuf_iterator( r->content ), {} ); - if( r->status_code.find( "200" ) != std::string::npos ) - { - using namespace boost::property_tree; - ptree pt; - - try { - std::stringstream ss; - ss << content; - - read_json( ss, pt ); - } - catch( std::exception& e ) - { - g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); - return nullptr; - } - - if( content.find( "invalid" ) == std::string::npos ) - { - LobbySessionPtr pSession( new Core::LobbySession() ); - pSession->setAccountID( atoi( pt.get( "result" ).c_str() ) ); - pSession->setSessionId( (uint8_t *)sId ); - return pSession; - } - else - { - return nullptr; - } - } - else - { + if( content.find( "invalid" ) == std::string::npos ) + { + LobbySessionPtr pSession( new Core::LobbySession() ); + pSession->setAccountID( atoi( pt.get< std::string >( "result" ).c_str() ) ); + pSession->setSessionId( ( uint8_t* ) sId ); + return pSession; + } + else + { return nullptr; - } + } + } + else + { + return nullptr; + } } bool Core::Network::RestConnector::checkNameTaken( std::string name ) { - std::string json_string = "{\"name\": \"" + name + "\",\"secret\": \"" + serverSecret + "\"}"; + std::string json_string = "{\"name\": \"" + name + "\",\"secret\": \"" + serverSecret + "\"}"; - HttpResponse r = requestApi( "checkNameTaken", json_string ); + HttpResponse r = requestApi( "checkNameTaken", json_string ); - if( r == nullptr ) + if( r == nullptr ) + return true; + + std::string content = std::string( std::istreambuf_iterator< char >( r->content ), {} ); + if( r->status_code.find( "200" ) != std::string::npos ) + { + using namespace boost::property_tree; + ptree pt; + + try + { + std::stringstream ss; + ss << content; + + read_json( ss, pt ); + } + catch( std::exception& e ) + { + g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); return true; + } - std::string content = std::string( std::istreambuf_iterator( r->content ), {} ); - if( r->status_code.find( "200" ) != std::string::npos ) - { - using namespace boost::property_tree; - ptree pt; - - try { - std::stringstream ss; - ss << content; - - read_json( ss, pt ); - } - catch( std::exception& e ) - { - g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); - return true; - } - - if( pt.get( "result" ) != "invalid" && pt.get( "result" ) == "false" ) - return false; - return true; - } - else - { - return true; - } + if( pt.get< std::string >( "result" ) != "invalid" && pt.get< std::string >( "result" ) == "false" ) + return false; + return true; + } + else + { + return true; + } } uint32_t Core::Network::RestConnector::getNextCharId() { - std::string json_string = "{\"secret\": \"" + serverSecret + "\"}"; + std::string json_string = "{\"secret\": \"" + serverSecret + "\"}"; - HttpResponse r = requestApi( "getNextCharId", json_string ); + HttpResponse r = requestApi( "getNextCharId", json_string ); - if( r == nullptr ) + if( r == nullptr ) + return -1; + + std::string content = std::string( std::istreambuf_iterator< char >( r->content ), {} ); + if( r->status_code.find( "200" ) != std::string::npos ) + { + using namespace boost::property_tree; + ptree pt; + + try + { + std::stringstream ss; + ss << content; + + read_json( ss, pt ); + } + catch( std::exception& e ) + { + g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); return -1; + } - std::string content = std::string( std::istreambuf_iterator( r->content ), {} ); - if( r->status_code.find( "200" ) != std::string::npos ) - { - using namespace boost::property_tree; - ptree pt; - - try { - std::stringstream ss; - ss << content; - - read_json( ss, pt ); - } - catch( std::exception& e ) - { - g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); - return -1; - } - - if( content.find( "invalid" ) == std::string::npos ) - { - return pt.get( "result" ); - } - else - { - return -1; - } - } - else - { + if( content.find( "invalid" ) == std::string::npos ) + { + return pt.get< uint32_t >( "result" ); + } + else + { return -1; - } + } + } + else + { + return -1; + } } uint64_t Core::Network::RestConnector::getNextContentId() { - std::string json_string = "{\"secret\": \"" + serverSecret + "\"}"; + std::string json_string = "{\"secret\": \"" + serverSecret + "\"}"; - HttpResponse r = requestApi( "getNextContentId", json_string ); + HttpResponse r = requestApi( "getNextContentId", json_string ); - if( r == nullptr ) + if( r == nullptr ) + return -1; + + std::string content = std::string( std::istreambuf_iterator< char >( r->content ), {} ); + if( r->status_code.find( "200" ) != std::string::npos ) + { + using namespace boost::property_tree; + ptree pt; + + try + { + std::stringstream ss; + ss << content; + + read_json( ss, pt ); + } + catch( std::exception& e ) + { + g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); return -1; + } - std::string content = std::string( std::istreambuf_iterator( r->content ), {} ); - if( r->status_code.find( "200" ) != std::string::npos ) - { - using namespace boost::property_tree; - ptree pt; - - try { - std::stringstream ss; - ss << content; - - read_json( ss, pt ); - } - catch( std::exception& e ) - { - g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); - return -1; - } - - if( content.find( "invalid" ) == std::string::npos ) - { - return pt.get( "result" ); - } - else - { - return -1; - } - } - else - { + if( content.find( "invalid" ) == std::string::npos ) + { + return pt.get< uint64_t >( "result" ); + } + else + { return -1; - } + } + } + else + { + return -1; + } } -CharList Core::Network::RestConnector::getCharList( char * sId ) +CharList Core::Network::RestConnector::getCharList( char* sId ) { - std::string json_string = "{\"sId\": \"" + std::string( sId, 56 ) + "\",\"secret\": \"" + serverSecret + "\"}"; + std::string json_string = "{\"sId\": \"" + std::string( sId, 56 ) + "\",\"secret\": \"" + serverSecret + "\"}"; - HttpResponse r = requestApi( "getCharacterList", json_string ); + HttpResponse r = requestApi( "getCharacterList", json_string ); + + CharList list; + if( r == nullptr ) + return list; + + std::string content = std::string( std::istreambuf_iterator< char >( r->content ), {} ); + g_log.debug( content ); + if( r->status_code.find( "200" ) != std::string::npos ) + { + using namespace boost::property_tree; + ptree pt; + + try + { + std::stringstream ss; + ss << content; + + read_json( ss, pt ); + } + catch( std::exception& e ) + { + g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); + return list; + } + + if( pt.get< std::string >( "result" ).find( "invalid" ) == std::string::npos ) + { + + g_log.debug( pt.get_value< std::string >( "result" ) ); + + for( auto& child : pt.get_child( "charArray" ) ) + { + g_log.debug( child.second.get< std::string >( "contentId" ) ); + list.push_back( std::make_tuple( child.second.get< std::string >( "name" ), + atoi( child.second.get< std::string >( "charId" ).c_str() ), + child.second.get< uint64_t >( "contentId" ), + child.second.get< std::string >( "infoJson" ) ) ); + } - CharList list; - if( r == nullptr ) return list; - std::string content = std::string( std::istreambuf_iterator( r->content ), {} ); - g_log.debug( content ); - if( r->status_code.find( "200" ) != std::string::npos ) - { - using namespace boost::property_tree; - ptree pt; - - try { - std::stringstream ss; - ss << content; - - read_json( ss, pt ); - } - catch( std::exception& e ) - { - g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); - return list; - } - - if( pt.get( "result" ).find( "invalid" ) == std::string::npos ) - { - - g_log.debug( pt.get_value( "result" ) ); - - for( auto& child : pt.get_child( "charArray" ) ){ - g_log.debug( child.second.get( "contentId" ) ); - list.push_back( std::make_tuple( child.second.get( "name" ), atoi( child.second.get( "charId" ).c_str() ), child.second.get( "contentId" ), child.second.get( "infoJson" ) ) ); - } - - return list; - - } - else - { - return list; - } - } - else - { + } + else + { return list; - } + } + } + else + { + return list; + } } bool Core::Network::RestConnector::deleteCharacter( char* sId, std::string name ) { - std::string json_string = "{\"sId\": \"" + std::string( sId, 56 ) + "\",\"secret\": \"" + serverSecret + "\",\"name\": \"" + name + "\"}"; + std::string json_string = + "{\"sId\": \"" + std::string( sId, 56 ) + "\",\"secret\": \"" + serverSecret + "\",\"name\": \"" + name + "\"}"; - HttpResponse r = requestApi( "deleteCharacter", json_string ); + HttpResponse r = requestApi( "deleteCharacter", json_string ); - if( r == nullptr ) + if( r == nullptr ) + return false; + + std::string content = std::string( std::istreambuf_iterator< char >( r->content ), {} ); + if( r->status_code.find( "200" ) != std::string::npos ) + { + using namespace boost::property_tree; + ptree pt; + + try + { + std::stringstream ss; + ss << content; + + read_json( ss, pt ); + } + catch( std::exception& e ) + { + g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); return false; + } - std::string content = std::string( std::istreambuf_iterator( r->content ), {} ); - if( r->status_code.find( "200" ) != std::string::npos ) - { - using namespace boost::property_tree; - ptree pt; - - try { - std::stringstream ss; - ss << content; - - read_json( ss, pt ); - } - catch( std::exception& e ) - { - g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); - return false; - } - - if( content.find( "invalid" ) == std::string::npos ) - return true; - return false; - } - else - { - return false; - } + if( content.find( "invalid" ) == std::string::npos ) + return true; + return false; + } + else + { + return false; + } } -int Core::Network::RestConnector::createCharacter( char * sId, std::string name, std::string infoJson ) +int Core::Network::RestConnector::createCharacter( char* sId, std::string name, std::string infoJson ) { - std::string json_string = "{\"sId\": \"" + std::string( sId, 56 ) + "\",\"secret\": \"" + serverSecret + "\",\"name\": \"" + name + "\",\"infoJson\": \"" + Core::Util::base64_encode( (uint8_t *)infoJson.c_str(), infoJson.length() ) + "\"}"; + std::string json_string = + "{\"sId\": \"" + std::string( sId, 56 ) + "\",\"secret\": \"" + serverSecret + "\",\"name\": \"" + name + + "\",\"infoJson\": \"" + Core::Util::base64_encode( ( uint8_t* ) infoJson.c_str(), infoJson.length() ) + "\"}"; - HttpResponse r = requestApi( "createCharacter", json_string ); + HttpResponse r = requestApi( "createCharacter", json_string ); - if( r == nullptr ) + if( r == nullptr ) + return -1; + + std::string content = std::string( std::istreambuf_iterator< char >( r->content ), {} ); + g_log.debug( content ); + if( r->status_code.find( "200" ) != std::string::npos ) + { + using namespace boost::property_tree; + ptree pt; + + try + { + std::stringstream ss; + ss << content; + + read_json( ss, pt ); + } + catch( std::exception& e ) + { + g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); return -1; + } - std::string content = std::string( std::istreambuf_iterator( r->content ), {} ); - g_log.debug( content ); - if( r->status_code.find( "200" ) != std::string::npos ) - { - using namespace boost::property_tree; - ptree pt; - - try { - std::stringstream ss; - ss << content; - - read_json( ss, pt ); - } - catch( std::exception& e ) - { - g_log.debug( "Could not parse REST response: " + std::string( e.what() ) ); - return -1; - } - - if( content.find( "invalid" ) == std::string::npos ) - return atoi( pt.get( "result" ).c_str() ); - return -1; - } - else - { - return -1; - } + if( content.find( "invalid" ) == std::string::npos ) + return atoi( pt.get< std::string >( "result" ).c_str() ); + return -1; + } + else + { + return -1; + } } diff --git a/src/servers/sapphire_lobby/RestConnector.h b/src/servers/sapphire_lobby/RestConnector.h index e76da1ab..aa8a3beb 100644 --- a/src/servers/sapphire_lobby/RestConnector.h +++ b/src/servers/sapphire_lobby/RestConnector.h @@ -8,37 +8,43 @@ #include "client_http.hpp" #include "Forwards.h" -typedef SimpleWeb::Client HttpClient; -typedef std::shared_ptr::Response> HttpResponse; +typedef SimpleWeb::Client< SimpleWeb::HTTP > HttpClient; +typedef std::shared_ptr< SimpleWeb::ClientBase< SimpleWeb::HTTP >::Response > HttpResponse; -namespace Core +namespace Core { +class Session; + +namespace Network { +class LobbySession; + +class RestConnector { - class Session; +public: + RestConnector(); - namespace Network - { - class LobbySession; + ~RestConnector(); - class RestConnector - { - public: - RestConnector(); - ~RestConnector(); + HttpResponse requestApi( std::string endpoint, std::string data ); - HttpResponse requestApi( std::string endpoint, std::string data ); - LobbySessionPtr getSession( char* sId ); - int32_t createCharacter( char * sId, std::string name, std::string infoJson ); - std::vector> getCharList( char * sId ); - bool deleteCharacter( char* sId, std::string name ); - bool checkNameTaken( std::string name ); - uint32_t getNextCharId(); - uint64_t getNextContentId(); + LobbySessionPtr getSession( char* sId ); - std::string serverSecret; - std::string restHost; + int32_t createCharacter( char* sId, std::string name, std::string infoJson ); - }; - } + std::vector< std::tuple< std::string, uint32_t, uint64_t, std::string>> getCharList( char* sId ); + + bool deleteCharacter( char* sId, std::string name ); + + bool checkNameTaken( std::string name ); + + uint32_t getNextCharId(); + + uint64_t getNextContentId(); + + std::string serverSecret; + std::string restHost; + +}; +} } #endif diff --git a/src/servers/sapphire_lobby/ServerLobby.cpp b/src/servers/sapphire_lobby/ServerLobby.cpp index a623a4e5..7ed5453a 100644 --- a/src/servers/sapphire_lobby/ServerLobby.cpp +++ b/src/servers/sapphire_lobby/ServerLobby.cpp @@ -33,110 +33,113 @@ Core::Network::RestConnector g_restConnector; namespace Core { - ServerLobby::ServerLobby( const std::string& configPath ) : - m_configPath( configPath ), - m_numConnections( 0 ) - { - m_pConfig = boost::shared_ptr< ConfigMgr >( new ConfigMgr ); - } - - ServerLobby::~ServerLobby( void ) - { - } - - LobbySessionPtr ServerLobby::getSession( char* sessionId ) - { - return g_restConnector.getSession( sessionId ); - } - - ConfigMgrPtr ServerLobby::getConfig() const - { - return m_pConfig; - } - - void ServerLobby::run( int32_t argc, char* argv[] ) - { - g_log.setLogPath( "log/SapphireLobby" ); - g_log.init(); - - g_log.info( "===========================================================" ); - g_log.info( "Sapphire Server Project " ); - g_log.info( "Version: " + Version::VERSION ); - g_log.info( "Git Hash: " + Version::GIT_HASH ); - g_log.info( "Compiled: " __DATE__ " " __TIME__ ); - g_log.info( "===========================================================" ); - - if( !loadSettings( argc, argv ) ) - { - g_log.fatal( "Error loading settings! " ); - return; - } - - Network::HivePtr hive( new Network::Hive() ); - Network::addServerToHive< Network::GameConnection >( m_ip, m_port, hive ); - - g_log.info( "Lobby server running on " + m_pConfig->getValue< std::string >( "LobbyNetwork.ListenIp", "0.0.0.0" ) + ":" + m_pConfig->getValue< std::string >( "LobbyNetwork.ListenPort", "80" ) ); - - boost::thread_group worker_threads; - worker_threads.create_thread( boost::bind( &Network::Hive::Run, hive.get() ) ); - worker_threads.join_all(); - - } - - bool ServerLobby::loadSettings( int32_t argc, char* argv[] ) - { - g_log.info( "Loading config " + m_configPath ); - - if( !m_pConfig->loadConfig( m_configPath ) ) - { - g_log.fatal( "Error loading config " + m_configPath ); - return false; - } - std::vector args( argv + 1, argv + argc ); - for( size_t i = 0; i + 1 < args.size(); i += 2 ) - { - std::string arg( "" ); - std::string val( "" ); - - try - { - arg = boost::to_lower_copy( std::string( args[i] ) ); - val = std::string( args[i + 1] ); - - // trim '-' from start of arg - arg = arg.erase( 0, arg.find_first_not_of( '-' ) ); - - if( arg == "ip" ) - { - // todo: ip addr in config - m_pConfig->setValue< std::string >( "LobbyNetwork.ListenIp", val ); - } - else if( arg == "p" || arg == "port" ) - { - m_pConfig->setValue< std::string >( "LobbyNetwork.LobbyPort", val ); - } - else if( arg == "worldip" || arg == "worldip" ) - { - m_pConfig->setValue < std::string >( "GlobalNetwork.ZoneHost", val ); - } - else if( arg == "worldport" ) - { - m_pConfig->setValue< std::string >( "GlobalNetwork.ZonePort", val ); - } - } - catch( ... ) - { - g_log.error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); - g_log.error( "Usage: \n" ); - } - } - - m_port = m_pConfig->getValue< uint16_t >( "LobbyNetwork.ListenPort", 54994 ); - m_ip = m_pConfig->getValue< std::string >( "LobbyNetwork.ListenIp", "0.0.0.0" ); - - g_restConnector.restHost = m_pConfig->getValue< std::string >( "GlobalNetwork.RestHost" ) + ":" + m_pConfig->getValue< std::string >( "GlobalNetwork.RestPort" ); - g_restConnector.serverSecret = m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ); - - return true; - } +ServerLobby::ServerLobby( const std::string& configPath ) : + m_configPath( configPath ), + m_numConnections( 0 ) +{ + m_pConfig = boost::shared_ptr< ConfigMgr >( new ConfigMgr ); +} + +ServerLobby::~ServerLobby( void ) +{ +} + +LobbySessionPtr ServerLobby::getSession( char* sessionId ) +{ + return g_restConnector.getSession( sessionId ); +} + +ConfigMgrPtr ServerLobby::getConfig() const +{ + return m_pConfig; +} + +void ServerLobby::run( int32_t argc, char* argv[] ) +{ + g_log.setLogPath( "log/SapphireLobby" ); + g_log.init(); + + g_log.info( "===========================================================" ); + g_log.info( "Sapphire Server Project " ); + g_log.info( "Version: " + Version::VERSION ); + g_log.info( "Git Hash: " + Version::GIT_HASH ); + g_log.info( "Compiled: " __DATE__ " " __TIME__ ); + g_log.info( "===========================================================" ); + + if( !loadSettings( argc, argv ) ) + { + g_log.fatal( "Error loading settings! " ); + return; + } + + Network::HivePtr hive( new Network::Hive() ); + Network::addServerToHive< Network::GameConnection >( m_ip, m_port, hive ); + + g_log.info( + "Lobby server running on " + m_pConfig->getValue< std::string >( "LobbyNetwork.ListenIp", "0.0.0.0" ) + ":" + + m_pConfig->getValue< std::string >( "LobbyNetwork.ListenPort", "80" ) ); + + boost::thread_group worker_threads; + worker_threads.create_thread( boost::bind( &Network::Hive::Run, hive.get() ) ); + worker_threads.join_all(); + +} + +bool ServerLobby::loadSettings( int32_t argc, char* argv[] ) +{ + g_log.info( "Loading config " + m_configPath ); + + if( !m_pConfig->loadConfig( m_configPath ) ) + { + g_log.fatal( "Error loading config " + m_configPath ); + return false; + } + std::vector< std::string > args( argv + 1, argv + argc ); + for( size_t i = 0; i + 1 < args.size(); i += 2 ) + { + std::string arg( "" ); + std::string val( "" ); + + try + { + arg = boost::to_lower_copy( std::string( args[ i ] ) ); + val = std::string( args[ i + 1 ] ); + + // trim '-' from start of arg + arg = arg.erase( 0, arg.find_first_not_of( '-' ) ); + + if( arg == "ip" ) + { + // todo: ip addr in config + m_pConfig->setValue< std::string >( "LobbyNetwork.ListenIp", val ); + } + else if( arg == "p" || arg == "port" ) + { + m_pConfig->setValue< std::string >( "LobbyNetwork.LobbyPort", val ); + } + else if( arg == "worldip" || arg == "worldip" ) + { + m_pConfig->setValue< std::string >( "GlobalNetwork.ZoneHost", val ); + } + else if( arg == "worldport" ) + { + m_pConfig->setValue< std::string >( "GlobalNetwork.ZonePort", val ); + } + } + catch( ... ) + { + g_log.error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); + g_log.error( "Usage: \n" ); + } + } + + m_port = m_pConfig->getValue< uint16_t >( "LobbyNetwork.ListenPort", 54994 ); + m_ip = m_pConfig->getValue< std::string >( "LobbyNetwork.ListenIp", "0.0.0.0" ); + + g_restConnector.restHost = m_pConfig->getValue< std::string >( "GlobalNetwork.RestHost" ) + ":" + + m_pConfig->getValue< std::string >( "GlobalNetwork.RestPort" ); + g_restConnector.serverSecret = m_pConfig->getValue< std::string >( "GlobalParameters.ServerSecret" ); + + return true; +} } diff --git a/src/servers/sapphire_lobby/ServerLobby.h b/src/servers/sapphire_lobby/ServerLobby.h index b4efd1db..c3706d5d 100644 --- a/src/servers/sapphire_lobby/ServerLobby.h +++ b/src/servers/sapphire_lobby/ServerLobby.h @@ -11,45 +11,49 @@ const std::string LOBBY_VERSION = "0.0.5"; -namespace Core +namespace Core { +class LobbySession; + +class ConfigMgr; + +typedef std::map< std::string, LobbySessionPtr > LobbySessionMap; + +class ServerLobby { - class LobbySession; - class ConfigMgr; - typedef std::map< std::string, LobbySessionPtr > LobbySessionMap; - class ServerLobby - { + friend class LobbyConnection; - friend class LobbyConnection; - private: +private: - LobbySessionMap m_sessionMap; - std::string m_configPath; + LobbySessionMap m_sessionMap; + std::string m_configPath; - uint16_t m_port; - std::string m_ip; + uint16_t m_port; + std::string m_ip; - boost::shared_ptr< ConfigMgr > m_pConfig; + boost::shared_ptr< ConfigMgr > m_pConfig; - public: - ServerLobby( const std::string& configPath ); - ~ServerLobby( void ); +public: + ServerLobby( const std::string& configPath ); - void run( int32_t argc, char* argv[] ); + ~ServerLobby( void ); - bool loadSettings( int32_t argc, char* argv[] ); + void run( int32_t argc, char* argv[] ); - void addSession( char* sessionId, LobbySessionPtr pSession ) - { - m_sessionMap[std::string( sessionId )] = pSession; - } - - boost::shared_ptr< ConfigMgr > getConfig() const; + bool loadSettings( int32_t argc, char* argv[] ); - LobbySessionPtr getSession( char* sessionId ); - uint32_t m_numConnections; + void addSession( char* sessionId, LobbySessionPtr pSession ) + { + m_sessionMap[ std::string( sessionId ) ] = pSession; + } - }; + boost::shared_ptr< ConfigMgr > getConfig() const; + + LobbySessionPtr getSession( char* sessionId ); + + uint32_t m_numConnections; + +}; } diff --git a/src/servers/sapphire_lobby/mainLobbyServer.cpp b/src/servers/sapphire_lobby/mainLobbyServer.cpp index 00747ecc..07997917 100644 --- a/src/servers/sapphire_lobby/mainLobbyServer.cpp +++ b/src/servers/sapphire_lobby/mainLobbyServer.cpp @@ -5,8 +5,8 @@ Core::ServerLobby g_serverLobby( "lobby.ini" ); int main( int32_t argc, char* argv[] ) { - g_serverLobby.run( argc, argv ); + g_serverLobby.run( argc, argv ); - return 0; + return 0; } diff --git a/src/servers/sapphire_zone/Action/Action.cpp b/src/servers/sapphire_zone/Action/Action.cpp index bff1549d..b1a0c0df 100644 --- a/src/servers/sapphire_zone/Action/Action.cpp +++ b/src/servers/sapphire_zone/Action/Action.cpp @@ -14,72 +14,72 @@ Core::Action::Action::~Action() uint16_t Core::Action::Action::getId() const { - return m_id; + return m_id; } Core::Common::HandleActionType Core::Action::Action::getHandleActionType() const { - return m_handleActionType; + return m_handleActionType; } Core::Entity::CharaPtr Core::Action::Action::getTargetChara() const { - return m_pTarget; + return m_pTarget; } bool Core::Action::Action::isInterrupted() const { - return m_bInterrupt; + return m_bInterrupt; } void Core::Action::Action::setInterrupted() { - m_bInterrupt = true; + m_bInterrupt = true; } uint64_t Core::Action::Action::getStartTime() const { - return m_startTime; + return m_startTime; } void Core::Action::Action::setStartTime( uint64_t startTime ) { - m_startTime = startTime; + m_startTime = startTime; } uint32_t Core::Action::Action::getCastTime() const { - return m_castTime; + return m_castTime; } void Core::Action::Action::setCastTime( uint32_t castTime ) { - m_castTime = castTime; + m_castTime = castTime; } Core::Entity::CharaPtr Core::Action::Action::getActionSource() const { - return m_pSource; + return m_pSource; } bool Core::Action::Action::update() { - // action has not been started yet - if( m_startTime == 0 ) - return false; + // action has not been started yet + if( m_startTime == 0 ) + return false; - if( m_bInterrupt ) - { - onInterrupt(); - return true; - } + if( m_bInterrupt ) + { + onInterrupt(); + return true; + } - uint64_t currTime = Util::getTimeMs(); + uint64_t currTime = Util::getTimeMs(); - if( ( currTime - m_startTime ) > m_castTime ) - { - onFinish(); - return true; - } - return false; + if( ( currTime - m_startTime ) > m_castTime ) + { + onFinish(); + return true; + } + return false; } diff --git a/src/servers/sapphire_zone/Action/Action.h b/src/servers/sapphire_zone/Action/Action.h index cb630610..2a5d93f9 100644 --- a/src/servers/sapphire_zone/Action/Action.h +++ b/src/servers/sapphire_zone/Action/Action.h @@ -7,53 +7,62 @@ namespace Core { namespace Action { - class Action - { +class Action +{ - public: - Action(); - virtual ~Action(); +public: + Action(); - uint16_t getId() const; + virtual ~Action(); - Common::HandleActionType getHandleActionType() const; + uint16_t getId() const; - Entity::CharaPtr getTargetChara() const; + Common::HandleActionType getHandleActionType() const; - bool isInterrupted() const; + Entity::CharaPtr getTargetChara() const; - void setInterrupted(); + bool isInterrupted() const; - uint64_t getStartTime() const; + void setInterrupted(); - void setStartTime( uint64_t startTime ); + uint64_t getStartTime() const; - uint32_t getCastTime() const; + void setStartTime( uint64_t startTime ); - void setCastTime( uint32_t castTime ); + uint32_t getCastTime() const; - Entity::CharaPtr getActionSource() const; + void setCastTime( uint32_t castTime ); - virtual void onStart() {}; - virtual void onFinish() {}; - virtual void onInterrupt() {}; + Entity::CharaPtr getActionSource() const; - // update action, if returns true, action is done and has to be removed from the actor - virtual bool update(); + virtual void onStart() + { + }; - protected: - uint16_t m_id; - Common::HandleActionType m_handleActionType; + virtual void onFinish() + { + }; - uint64_t m_startTime; - uint32_t m_castTime; + virtual void onInterrupt() + { + }; - Entity::CharaPtr m_pSource; - Entity::CharaPtr m_pTarget; + // update action, if returns true, action is done and has to be removed from the actor + virtual bool update(); - bool m_bInterrupt; +protected: + uint16_t m_id; + Common::HandleActionType m_handleActionType; - }; + uint64_t m_startTime; + uint32_t m_castTime; + + Entity::CharaPtr m_pSource; + Entity::CharaPtr m_pTarget; + + bool m_bInterrupt; + +}; } } diff --git a/src/servers/sapphire_zone/Action/ActionCast.cpp b/src/servers/sapphire_zone/Action/ActionCast.cpp index 46d0aad1..91aa9667 100644 --- a/src/servers/sapphire_zone/Action/ActionCast.cpp +++ b/src/servers/sapphire_zone/Action/ActionCast.cpp @@ -26,77 +26,77 @@ extern Core::Framework g_fw; Core::Action::ActionCast::ActionCast() { - m_handleActionType = Common::HandleActionType::Event; + m_handleActionType = Common::HandleActionType::Event; } Core::Action::ActionCast::ActionCast( Entity::CharaPtr pActor, Entity::CharaPtr pTarget, uint16_t actionId ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - m_startTime = 0; - m_id = actionId; - m_handleActionType = HandleActionType::Spell; - m_castTime = pExdData->get< Core::Data::Action >( actionId )->cast100ms * 100; // TODO: Add security checks. - m_pSource = pActor; - m_pTarget = pTarget; - m_bInterrupt = false; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + m_startTime = 0; + m_id = actionId; + m_handleActionType = HandleActionType::Spell; + m_castTime = pExdData->get< Core::Data::Action >( actionId )->cast100ms * 100; // TODO: Add security checks. + m_pSource = pActor; + m_pTarget = pTarget; + m_bInterrupt = false; } Core::Action::ActionCast::~ActionCast() = default; void Core::Action::ActionCast::onStart() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - m_pSource->getAsPlayer()->sendDebug( "onStart()" ); - m_startTime = Util::getTimeMs(); + m_pSource->getAsPlayer()->sendDebug( "onStart()" ); + m_startTime = Util::getTimeMs(); - auto castPacket = makeZonePacket< FFXIVIpcActorCast >( getId() ); + auto castPacket = makeZonePacket< FFXIVIpcActorCast >( getId() ); - castPacket->data().action_id = m_id; - castPacket->data().skillType = Common::SkillType::Normal; - castPacket->data().unknown_1 = m_id; - // This is used for the cast bar above the target bar of the caster. - castPacket->data().cast_time = static_cast< float >( m_castTime / 1000 ); - castPacket->data().target_id = m_pTarget->getId(); + castPacket->data().action_id = m_id; + castPacket->data().skillType = Common::SkillType::Normal; + castPacket->data().unknown_1 = m_id; + // This is used for the cast bar above the target bar of the caster. + castPacket->data().cast_time = static_cast< float >( m_castTime / 1000 ); + castPacket->data().target_id = m_pTarget->getId(); - m_pSource->sendToInRangeSet( castPacket, true ); - m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); + m_pSource->sendToInRangeSet( castPacket, true ); + m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); } void Core::Action::ActionCast::onFinish() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - auto pPlayer = m_pSource->getAsPlayer(); - pPlayer->sendDebug( "onFinish()" ); + auto pPlayer = m_pSource->getAsPlayer(); + pPlayer->sendDebug( "onFinish()" ); - pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); + pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); - /*auto control = ActorControlPacket143( m_pTarget->getId(), ActorControlType::Unk7, - 0x219, m_id, m_id, m_id, m_id ); - m_pSource->sendToInRangeSet( control, true );*/ + /*auto control = ActorControlPacket143( m_pTarget->getId(), ActorControlType::Unk7, + 0x219, m_id, m_id, m_id, m_id ); + m_pSource->sendToInRangeSet( control, true );*/ - pScriptMgr->onCastFinish( *pPlayer, m_pTarget, m_id ); + pScriptMgr->onCastFinish( *pPlayer, m_pTarget, m_id ); } void Core::Action::ActionCast::onInterrupt() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied1 ); - m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); + //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied1 ); + m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); - auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); + auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); - // Note: When cast interrupt from taking too much damage, set the last value to 1. This enables the cast interrupt effect. Example: - // auto control = ActorControlPacket142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); + // Note: When cast interrupt from taking too much damage, set the last value to 1. This enables the cast interrupt effect. Example: + // auto control = ActorControlPacket142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); - m_pSource->sendToInRangeSet( control, true ); + m_pSource->sendToInRangeSet( control, true ); } diff --git a/src/servers/sapphire_zone/Action/ActionCast.h b/src/servers/sapphire_zone/Action/ActionCast.h index c1dac482..cb4ab84f 100644 --- a/src/servers/sapphire_zone/Action/ActionCast.h +++ b/src/servers/sapphire_zone/Action/ActionCast.h @@ -7,21 +7,25 @@ namespace Core { namespace Action { - class ActionCast : public Action - { - private: +class ActionCast : + public Action +{ +private: - public: - ActionCast(); - ~ActionCast(); - - ActionCast( Entity::CharaPtr pActor, Entity::CharaPtr pTarget, uint16_t actionId ); +public: + ActionCast(); - void onStart() override; - void onFinish() override; - void onInterrupt() override; + ~ActionCast(); - }; + ActionCast( Entity::CharaPtr pActor, Entity::CharaPtr pTarget, uint16_t actionId ); + + void onStart() override; + + void onFinish() override; + + void onInterrupt() override; + +}; } } diff --git a/src/servers/sapphire_zone/Action/ActionCollision.cpp b/src/servers/sapphire_zone/Action/ActionCollision.cpp index 90a18e43..f7f3bb89 100644 --- a/src/servers/sapphire_zone/Action/ActionCollision.cpp +++ b/src/servers/sapphire_zone/Action/ActionCollision.cpp @@ -17,39 +17,39 @@ using namespace Core::Common; bool ActionCollision::isActorApplicable( Actor& actor, TargetFilter targetFilter ) { - bool actorApplicable = false; - switch( targetFilter ) - { - case TargetFilter::All: - { + bool actorApplicable = false; + switch( targetFilter ) + { + case TargetFilter::All: + { actorApplicable = true; break; - } - case TargetFilter::Players: - { + } + case TargetFilter::Players: + { actorApplicable = actor.isPlayer(); break; - } - case TargetFilter::Allies: - { + } + case TargetFilter::Allies: + { // todo: implement ally NPCs - // actorApplicable = !chara.isBattleNpc(); + // actorApplicable = !chara.isBattleNpc(); break; - } - case TargetFilter::Party: - { + } + case TargetFilter::Party: + { // todo: implement party actorApplicable = actor.isPlayer(); break; - } - case TargetFilter::Enemies: - { + } + case TargetFilter::Enemies: + { //actorApplicable = chara.isBattleNpc(); break; - } - } + } + } - return ( actorApplicable && actor.getAsChara()->isAlive() ); + return ( actorApplicable && actor.getAsChara()->isAlive() ); } std::set< Core::Entity::ActorPtr > ActionCollision::getActorsHitFromAction( FFXIVARR_POSITION3 aoePosition, @@ -57,84 +57,86 @@ std::set< Core::Entity::ActorPtr > ActionCollision::getActorsHitFromAction( FFXI boost::shared_ptr< Core::Data::Action > actionInfo, TargetFilter targetFilter ) { - std::set< ActorPtr > actorsCollided; + std::set< ActorPtr > actorsCollided; - switch( static_cast< ActionCollisionType >( actionInfo->castType ) ) - { - case ActionCollisionType::None: - case ActionCollisionType::SingleTarget: - { + switch( static_cast< ActionCollisionType >( actionInfo->castType ) ) + { + case ActionCollisionType::None: + case ActionCollisionType::SingleTarget: + { // This is actually needed. There is "splash damage" in actions marked as single target. // Notice how we're using aoe_width. How collision works for SingleTarget is unknown as of now. for( auto pActor : actorsInRange ) { - // Make sure actor exists. If it doesn't we done goofed. - assert( pActor ); + // Make sure actor exists. If it doesn't we done goofed. + assert( pActor ); - // Don't bother wasting on collision if actor doesn't apply for it - if ( !isActorApplicable( *pActor, targetFilter ) ) - continue; + // Don't bother wasting on collision if actor doesn't apply for it + if( !isActorApplicable( *pActor, targetFilter ) ) + continue; - // Test our collision from actor with the area generated by the action from the AoE data - if ( radiusCollision( pActor->getPos(), aoePosition, actionInfo->effectRange ) ) - { - // Add it to the actors collided with the area - actorsCollided.insert( pActor ); - } + // Test our collision from actor with the area generated by the action from the AoE data + if( radiusCollision( pActor->getPos(), aoePosition, actionInfo->effectRange ) ) + { + // Add it to the actors collided with the area + actorsCollided.insert( pActor ); + } } break; - } - case ActionCollisionType::Circle: - { + } + case ActionCollisionType::Circle: + { for( auto pActor : actorsInRange ) { - assert( pActor ); + assert( pActor ); - if ( !isActorApplicable( *pActor, targetFilter ) ) - continue; + if( !isActorApplicable( *pActor, targetFilter ) ) + continue; - if ( radiusCollision( pActor->getPos(), aoePosition, actionInfo->effectRange ) ) - actorsCollided.insert( pActor ); + if( radiusCollision( pActor->getPos(), aoePosition, actionInfo->effectRange ) ) + actorsCollided.insert( pActor ); } break; - } - case ActionCollisionType::Box: - { + } + case ActionCollisionType::Box: + { for( auto pActor : actorsInRange ) { - assert( pActor ); + assert( pActor ); - if ( !isActorApplicable( *pActor, targetFilter ) ) - continue; + if( !isActorApplicable( *pActor, targetFilter ) ) + continue; - if ( boxCollision( pActor->getPos(), aoePosition, actionInfo->xAxisModifier, actionInfo->effectRange ) ) - { - // todo: does this actually work? + if( boxCollision( pActor->getPos(), aoePosition, actionInfo->xAxisModifier, actionInfo->effectRange ) ) + { + // todo: does this actually work? - actorsCollided.insert( pActor ); - } + actorsCollided.insert( pActor ); + } } break; - } - default: - { + } + default: + { break; - } - } + } + } - return actorsCollided; + return actorsCollided; } -bool ActionCollision::radiusCollision( FFXIVARR_POSITION3 actorPosition, FFXIVARR_POSITION3 aoePosition, uint16_t radius ) +bool +ActionCollision::radiusCollision( FFXIVARR_POSITION3 actorPosition, FFXIVARR_POSITION3 aoePosition, uint16_t radius ) { - return Core::Math::Util::distance( actorPosition.x, actorPosition.y, actorPosition.z, - aoePosition.x, aoePosition.y, aoePosition.z ) <= radius; + return Core::Math::Util::distance( actorPosition.x, actorPosition.y, actorPosition.z, + aoePosition.x, aoePosition.y, aoePosition.z ) <= radius; } -bool ActionCollision::boxCollision( FFXIVARR_POSITION3 actorPosition, FFXIVARR_POSITION3 aoePosition, uint16_t width, uint16_t height ) +bool ActionCollision::boxCollision( FFXIVARR_POSITION3 actorPosition, FFXIVARR_POSITION3 aoePosition, uint16_t width, + uint16_t height ) { - return actorPosition.x < aoePosition.x + width && - actorPosition.x > aoePosition.x && - actorPosition.y < aoePosition.y + height && - actorPosition.y > aoePosition.y; + return actorPosition.x < aoePosition.x + width && + actorPosition.x > aoePosition.x && + actorPosition.y < aoePosition.y + height && + actorPosition.y > aoePosition.y; } diff --git a/src/servers/sapphire_zone/Action/ActionCollision.h b/src/servers/sapphire_zone/Action/ActionCollision.h index 89a3a99c..60ac70ae 100644 --- a/src/servers/sapphire_zone/Action/ActionCollision.h +++ b/src/servers/sapphire_zone/Action/ActionCollision.h @@ -5,40 +5,40 @@ #include "Forwards.h" namespace Core { -namespace Data -{ - struct Action; +namespace Data { +struct Action; } namespace Entity { - enum class TargetFilter - { - All, // All actors in the AoE are applicable for collision - Players, // Only players - Allies, // Only allies (players, ally NPCs) - Party, // Only party members - Enemies // Only enemies - }; +enum class TargetFilter +{ + All, // All actors in the AoE are applicable for collision + Players, // Only players + Allies, // Only allies (players, ally NPCs) + Party, // Only party members + Enemies // Only enemies +}; - class ActionCollision - { - public: +class ActionCollision +{ +public: - static bool isActorApplicable( Actor& actor, TargetFilter targetFilter ); - static std::set< ActorPtr > getActorsHitFromAction( Common::FFXIVARR_POSITION3 aoePosition, - std::set< ActorPtr > actorsInRange, - boost::shared_ptr< Data::Action > actionInfo, - TargetFilter targetFilter ); + static bool isActorApplicable( Actor& actor, TargetFilter targetFilter ); - private: - static bool radiusCollision( Common::FFXIVARR_POSITION3 actorPosition, Common::FFXIVARR_POSITION3 aoePosition, - uint16_t radius ); + static std::set< ActorPtr > getActorsHitFromAction( Common::FFXIVARR_POSITION3 aoePosition, + std::set< ActorPtr > actorsInRange, + boost::shared_ptr< Data::Action > actionInfo, + TargetFilter targetFilter ); - static bool boxCollision( Common::FFXIVARR_POSITION3 actorPosition, Common::FFXIVARR_POSITION3 aoePosition, - uint16_t width, uint16_t height ); +private: + static bool radiusCollision( Common::FFXIVARR_POSITION3 actorPosition, Common::FFXIVARR_POSITION3 aoePosition, + uint16_t radius ); - }; + static bool boxCollision( Common::FFXIVARR_POSITION3 actorPosition, Common::FFXIVARR_POSITION3 aoePosition, + uint16_t width, uint16_t height ); + +}; } } diff --git a/src/servers/sapphire_zone/Action/ActionMount.cpp b/src/servers/sapphire_zone/Action/ActionMount.cpp index 6d713c30..97822bd6 100644 --- a/src/servers/sapphire_zone/Action/ActionMount.cpp +++ b/src/servers/sapphire_zone/Action/ActionMount.cpp @@ -25,17 +25,17 @@ extern Core::Framework g_framework; Core::Action::ActionMount::ActionMount() { - m_handleActionType = HandleActionType::Event; + m_handleActionType = HandleActionType::Event; } Core::Action::ActionMount::ActionMount( Entity::CharaPtr pActor, uint16_t mountId ) { - m_startTime = 0; - m_id = mountId; - m_handleActionType = HandleActionType::Spell; - m_castTime = 1000; - m_pSource = pActor; - m_bInterrupt = false; + m_startTime = 0; + m_id = mountId; + m_handleActionType = HandleActionType::Spell; + m_castTime = 1000; + m_pSource = pActor; + m_bInterrupt = false; } Core::Action::ActionMount::~ActionMount() @@ -45,63 +45,63 @@ Core::Action::ActionMount::~ActionMount() void Core::Action::ActionMount::onStart() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - m_pSource->getAsPlayer()->sendDebug( "ActionMount::onStart()" ); - m_startTime = Util::getTimeMs(); + m_pSource->getAsPlayer()->sendDebug( "ActionMount::onStart()" ); + m_startTime = Util::getTimeMs(); - auto castPacket = makeZonePacket< FFXIVIpcActorCast >( getId() ); - castPacket->data().action_id = m_id; - castPacket->data().skillType = Common::SkillType::MountSkill; - castPacket->data().unknown_1 = m_id; - // This is used for the cast bar above the target bar of the caster. - castPacket->data().cast_time = static_cast< float >( m_castTime / 1000 ); - castPacket->data().target_id = m_pSource->getAsPlayer()->getId(); + auto castPacket = makeZonePacket< FFXIVIpcActorCast >( getId() ); + castPacket->data().action_id = m_id; + castPacket->data().skillType = Common::SkillType::MountSkill; + castPacket->data().unknown_1 = m_id; + // This is used for the cast bar above the target bar of the caster. + castPacket->data().cast_time = static_cast< float >( m_castTime / 1000 ); + castPacket->data().target_id = m_pSource->getAsPlayer()->getId(); - m_pSource->sendToInRangeSet( castPacket, true ); - m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); + m_pSource->sendToInRangeSet( castPacket, true ); + m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); } void Core::Action::ActionMount::onFinish() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - auto pPlayer = m_pSource->getAsPlayer(); - pPlayer->sendDebug( "ActionMount::onFinish()" ); + auto pPlayer = m_pSource->getAsPlayer(); + pPlayer->sendDebug( "ActionMount::onFinish()" ); - pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); + pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pPlayer->getId(), 4 ); - effectPacket->setRotation( Math::Util::floatToUInt16Rot( pPlayer->getRot() ) ); + auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pPlayer->getId(), 4 ); + effectPacket->setRotation( Math::Util::floatToUInt16Rot( pPlayer->getRot() ) ); - Server::EffectEntry effectEntry{}; - effectEntry.effectType = ActionEffectType::Mount; - effectEntry.hitSeverity = ActionHitSeverityType::CritDamage; - effectEntry.value = m_id; + Server::EffectEntry effectEntry{}; + effectEntry.effectType = ActionEffectType::Mount; + effectEntry.hitSeverity = ActionHitSeverityType::CritDamage; + effectEntry.value = m_id; - effectPacket->addEffect( effectEntry ); + effectPacket->addEffect( effectEntry ); - pPlayer->sendToInRangeSet( effectPacket, true ); + pPlayer->sendToInRangeSet( effectPacket, true ); - pPlayer->mount( m_id ); + pPlayer->mount( m_id ); } void Core::Action::ActionMount::onInterrupt() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied1 ); - m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); + //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied1 ); + m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); - auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); + auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); - // Note: When cast interrupt from taking too much damage, set the last value to 1. This enables the cast interrupt effect. Example: - // auto control = ActorControlPacket142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); + // Note: When cast interrupt from taking too much damage, set the last value to 1. This enables the cast interrupt effect. Example: + // auto control = ActorControlPacket142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); - m_pSource->sendToInRangeSet( control, true ); + m_pSource->sendToInRangeSet( control, true ); } diff --git a/src/servers/sapphire_zone/Action/ActionMount.h b/src/servers/sapphire_zone/Action/ActionMount.h index 23533c90..a1a73754 100644 --- a/src/servers/sapphire_zone/Action/ActionMount.h +++ b/src/servers/sapphire_zone/Action/ActionMount.h @@ -7,21 +7,25 @@ namespace Core { namespace Action { - class ActionMount : public Action - { - private: +class ActionMount : + public Action +{ +private: - public: - ActionMount(); - ~ActionMount(); - - ActionMount( Entity::CharaPtr pActor, uint16_t mountId ); +public: + ActionMount(); - void onStart() override; - void onFinish() override; - void onInterrupt() override; + ~ActionMount(); - }; + ActionMount( Entity::CharaPtr pActor, uint16_t mountId ); + + void onStart() override; + + void onFinish() override; + + void onInterrupt() override; + +}; } } diff --git a/src/servers/sapphire_zone/Action/ActionTeleport.cpp b/src/servers/sapphire_zone/Action/ActionTeleport.cpp index 47afcf63..91197f02 100644 --- a/src/servers/sapphire_zone/Action/ActionTeleport.cpp +++ b/src/servers/sapphire_zone/Action/ActionTeleport.cpp @@ -23,20 +23,20 @@ extern Core::Framework g_fw; Core::Action::ActionTeleport::ActionTeleport() { - m_handleActionType = HandleActionType::Event; + m_handleActionType = HandleActionType::Event; } Core::Action::ActionTeleport::ActionTeleport( Entity::CharaPtr pActor, uint16_t targetZone, uint16_t cost ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - m_startTime = 0; - m_id = 5; - m_handleActionType = HandleActionType::Teleport; - m_castTime = pExdData->get< Core::Data::Action >( 5 )->cast100ms * 100; // TODO: Add security checks. - m_pSource = pActor; - m_bInterrupt = false; - m_targetAetheryte = targetZone; - m_cost = cost; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + m_startTime = 0; + m_id = 5; + m_handleActionType = HandleActionType::Teleport; + m_castTime = pExdData->get< Core::Data::Action >( 5 )->cast100ms * 100; // TODO: Add security checks. + m_pSource = pActor; + m_bInterrupt = false; + m_targetAetheryte = targetZone; + m_cost = cost; } Core::Action::ActionTeleport::~ActionTeleport() @@ -46,62 +46,62 @@ Core::Action::ActionTeleport::~ActionTeleport() void Core::Action::ActionTeleport::onStart() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - m_startTime = Util::getTimeMs(); + m_startTime = Util::getTimeMs(); - auto castPacket = makeZonePacket< FFXIVIpcActorCast >( getId() ); - castPacket->data().action_id = 5; - castPacket->data().unknown = 1; - castPacket->data().cast_time = 5.0f; - castPacket->data().target_id = m_pSource->getId(); + auto castPacket = makeZonePacket< FFXIVIpcActorCast >( getId() ); + castPacket->data().action_id = 5; + castPacket->data().unknown = 1; + castPacket->data().cast_time = 5.0f; + castPacket->data().target_id = m_pSource->getId(); - m_pSource->sendToInRangeSet( castPacket, true ); - m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); + m_pSource->sendToInRangeSet( castPacket, true ); + m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); } void Core::Action::ActionTeleport::onFinish() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - auto pPlayer = m_pSource->getAsPlayer(); + auto pPlayer = m_pSource->getAsPlayer(); - // check we can finish teleporting - if( pPlayer->getCurrency( Common::CurrencyType::Gil ) < m_cost ) - { - onInterrupt(); - return; - } + // check we can finish teleporting + if( pPlayer->getCurrency( Common::CurrencyType::Gil ) < m_cost ) + { + onInterrupt(); + return; + } - pPlayer->removeCurrency( Common::CurrencyType::Gil, m_cost ); - - pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); + pPlayer->removeCurrency( Common::CurrencyType::Gil, m_cost ); - // TODO: not sure if this ever gets sent - //auto control = makeActorControl142( m_pSource->getId(), Common::ActorControlType::TeleportDone ); - //m_pSource->sendToInRangeSet( control, false ); + pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); - pPlayer->setZoningType( ZoneingType::Teleport ); + // TODO: not sure if this ever gets sent + //auto control = makeActorControl142( m_pSource->getId(), Common::ActorControlType::TeleportDone ); + //m_pSource->sendToInRangeSet( control, false ); - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pPlayer->getId(), 5 ); - effectPacket->setRotation( Math::Util::floatToUInt16Rot( pPlayer->getRot() ) ); + pPlayer->setZoningType( ZoneingType::Teleport ); + + auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pPlayer->getId(), 5 ); + effectPacket->setRotation( Math::Util::floatToUInt16Rot( pPlayer->getRot() ) ); - pPlayer->sendToInRangeSet( effectPacket, true ); - pPlayer->teleport( m_targetAetheryte ); + pPlayer->sendToInRangeSet( effectPacket, true ); + pPlayer->teleport( m_targetAetheryte ); } void Core::Action::ActionTeleport::onInterrupt() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); + m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); - auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 0x04, m_id, 0 ); - m_pSource->sendToInRangeSet( control, true ); + auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 0x04, m_id, 0 ); + m_pSource->sendToInRangeSet( control, true ); } diff --git a/src/servers/sapphire_zone/Action/ActionTeleport.h b/src/servers/sapphire_zone/Action/ActionTeleport.h index 4c42fc65..8fa4e134 100644 --- a/src/servers/sapphire_zone/Action/ActionTeleport.h +++ b/src/servers/sapphire_zone/Action/ActionTeleport.h @@ -7,23 +7,27 @@ namespace Core { namespace Action { - class ActionTeleport : public Action - { - private: - uint16_t m_targetAetheryte; - uint16_t m_cost; +class ActionTeleport : + public Action +{ +private: + uint16_t m_targetAetheryte; + uint16_t m_cost; - public: - ActionTeleport(); - ~ActionTeleport(); - - ActionTeleport( Entity::CharaPtr pActor, uint16_t action, uint16_t cost ); +public: + ActionTeleport(); - void onStart() override; - void onFinish() override; - void onInterrupt() override; + ~ActionTeleport(); - }; + ActionTeleport( Entity::CharaPtr pActor, uint16_t action, uint16_t cost ); + + void onStart() override; + + void onFinish() override; + + void onInterrupt() override; + +}; } } diff --git a/src/servers/sapphire_zone/Action/EventAction.cpp b/src/servers/sapphire_zone/Action/EventAction.cpp index 2a1d9efa..c8730296 100644 --- a/src/servers/sapphire_zone/Action/EventAction.cpp +++ b/src/servers/sapphire_zone/Action/EventAction.cpp @@ -21,23 +21,23 @@ using namespace Core::Network::ActorControl; Core::Action::EventAction::EventAction() { - m_handleActionType = HandleActionType::Event; + m_handleActionType = HandleActionType::Event; } Core::Action::EventAction::EventAction( Entity::CharaPtr pActor, uint32_t eventId, uint16_t action, ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - m_additional = additional; - m_handleActionType = HandleActionType::Event; - m_eventId = eventId; - m_id = action; - m_castTime = pExdData->get< Core::Data::EventAction >( action )->castTime * 1000; // TODO: Add security checks. - m_onActionFinishClb = finishRef; - m_onActionInterruptClb = interruptRef; - m_pSource = pActor; - m_bInterrupt = false; + m_additional = additional; + m_handleActionType = HandleActionType::Event; + m_eventId = eventId; + m_id = action; + m_castTime = pExdData->get< Core::Data::EventAction >( action )->castTime * 1000; // TODO: Add security checks. + m_onActionFinishClb = finishRef; + m_onActionInterruptClb = interruptRef; + m_pSource = pActor; + m_bInterrupt = false; } Core::Action::EventAction::~EventAction() @@ -47,95 +47,95 @@ Core::Action::EventAction::~EventAction() void Core::Action::EventAction::onStart() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - m_startTime = Util::getTimeMs(); + m_startTime = Util::getTimeMs(); - auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastStart, 1, m_id, 0x4000004E ); + auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastStart, 1, m_id, 0x4000004E ); - if( m_pSource->isPlayer() ) - { - m_pSource->sendToInRangeSet( control, true ); - if( m_pSource->getAsPlayer()->hasStateFlag( PlayerStateFlag::InNpcEvent ) ) - m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::InNpcEvent ); - } - else - m_pSource->sendToInRangeSet( control ); + if( m_pSource->isPlayer() ) + { + m_pSource->sendToInRangeSet( control, true ); + if( m_pSource->getAsPlayer()->hasStateFlag( PlayerStateFlag::InNpcEvent ) ) + m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::InNpcEvent ); + } + else + m_pSource->sendToInRangeSet( control ); } void Core::Action::EventAction::onFinish() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - try - { - auto pEvent = m_pSource->getAsPlayer()->getEvent( m_eventId ); + try + { + auto pEvent = m_pSource->getAsPlayer()->getEvent( m_eventId ); + pEvent->setPlayedScene( false ); + + if( m_onActionFinishClb ) + m_onActionFinishClb( *m_pSource->getAsPlayer(), m_eventId, m_additional ); + + auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastStart, 0, m_id ); + + if( !pEvent->hasPlayedScene() ) + m_pSource->getAsPlayer()->eventFinish( m_eventId, 1 ); + else pEvent->setPlayedScene( false ); - if( m_onActionFinishClb ) - m_onActionFinishClb( *m_pSource->getAsPlayer(), m_eventId, m_additional ); - - auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastStart, 0, m_id ); - - if( !pEvent->hasPlayedScene() ) - m_pSource->getAsPlayer()->eventFinish( m_eventId, 1 ); - else - pEvent->setPlayedScene( false ); - - if( m_pSource->isPlayer() ) - { - //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied2 ); - m_pSource->sendToInRangeSet( control, true ); - } - else - m_pSource->sendToInRangeSet( control ); - } - catch( std::exception& e ) - { - auto pLog = g_fw.get< Logger >(); - pLog->error( e.what() ); - } + if( m_pSource->isPlayer() ) + { + //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied2 ); + m_pSource->sendToInRangeSet( control, true ); + } + else + m_pSource->sendToInRangeSet( control ); + } + catch( std::exception& e ) + { + auto pLog = g_fw.get< Logger >(); + pLog->error( e.what() ); + } } void Core::Action::EventAction::onInterrupt() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - try - { + try + { - auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 0x04, m_id ); + auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 0x04, m_id ); - if( m_pSource->isPlayer() ) - { - auto control1 = makeActorControl143( m_pSource->getId(), ActorControlType::FreeEventPos, m_eventId ); + if( m_pSource->isPlayer() ) + { + auto control1 = makeActorControl143( m_pSource->getId(), ActorControlType::FreeEventPos, m_eventId ); - //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::NoCombat ); - //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied1 ); - m_pSource->sendToInRangeSet( control ); - m_pSource->sendToInRangeSet( control1 ); + //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::NoCombat ); + //m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied1 ); + m_pSource->sendToInRangeSet( control ); + m_pSource->sendToInRangeSet( control1 ); - m_pSource->getAsPlayer()->queuePacket( control1 ); - m_pSource->getAsPlayer()->queuePacket( control ); - m_pSource->getAsPlayer()->eventFinish( m_eventId, 1 ); + m_pSource->getAsPlayer()->queuePacket( control1 ); + m_pSource->getAsPlayer()->queuePacket( control ); + m_pSource->getAsPlayer()->eventFinish( m_eventId, 1 ); - } - else - m_pSource->sendToInRangeSet( control ); + } + else + m_pSource->sendToInRangeSet( control ); - if( m_onActionInterruptClb ) - m_onActionInterruptClb( *m_pSource->getAsPlayer(), m_eventId, m_additional ); + if( m_onActionInterruptClb ) + m_onActionInterruptClb( *m_pSource->getAsPlayer(), m_eventId, m_additional ); - } - catch( std::exception& e ) - { - auto pLog = g_fw.get< Logger >(); - pLog->error( e.what() ); - } + } + catch( std::exception& e ) + { + auto pLog = g_fw.get< Logger >(); + pLog->error( e.what() ); + } } diff --git a/src/servers/sapphire_zone/Action/EventAction.h b/src/servers/sapphire_zone/Action/EventAction.h index 346f0256..62b02c03 100644 --- a/src/servers/sapphire_zone/Action/EventAction.h +++ b/src/servers/sapphire_zone/Action/EventAction.h @@ -9,28 +9,32 @@ namespace Core { namespace Action { - class EventAction : public Action - { +class EventAction : + public Action +{ - public: - EventAction(); - ~EventAction(); - - EventAction( Entity::CharaPtr pActor, uint32_t eventId, uint16_t action, - ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional ); +public: + EventAction(); - void onStart() override; - void onFinish() override; - void onInterrupt() override; + ~EventAction(); - private: - uint32_t m_eventId; - uint64_t m_additional; - - ActionCallback m_onActionFinishClb; - ActionCallback m_onActionInterruptClb; + EventAction( Entity::CharaPtr pActor, uint32_t eventId, uint16_t action, + ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional ); - }; + void onStart() override; + + void onFinish() override; + + void onInterrupt() override; + +private: + uint32_t m_eventId; + uint64_t m_additional; + + ActionCallback m_onActionFinishClb; + ActionCallback m_onActionInterruptClb; + +}; } } diff --git a/src/servers/sapphire_zone/Action/EventItemAction.cpp b/src/servers/sapphire_zone/Action/EventItemAction.cpp index f82d8645..637d5573 100644 --- a/src/servers/sapphire_zone/Action/EventItemAction.cpp +++ b/src/servers/sapphire_zone/Action/EventItemAction.cpp @@ -24,95 +24,96 @@ using namespace Core::Network::ActorControl; Core::Action::EventItemAction::EventItemAction() { - m_handleActionType = HandleActionType::Event; + m_handleActionType = HandleActionType::Event; } Core::Action::EventItemAction::EventItemAction( Entity::CharaPtr pActor, uint32_t eventId, uint16_t action, - ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional ) + ActionCallback finishRef, ActionCallback interruptRef, + uint64_t additional ) { - m_additional = additional; - m_handleActionType = HandleActionType::Event; - m_eventId = eventId; - m_id = action; - // TODO: read the cast time from the action itself - m_castTime = 3000; - m_onActionFinishClb = finishRef; - m_onActionInterruptClb = interruptRef; - m_pSource = pActor; - m_bInterrupt = false; + m_additional = additional; + m_handleActionType = HandleActionType::Event; + m_eventId = eventId; + m_id = action; + // TODO: read the cast time from the action itself + m_castTime = 3000; + m_onActionFinishClb = finishRef; + m_onActionInterruptClb = interruptRef; + m_pSource = pActor; + m_bInterrupt = false; } Core::Action::EventItemAction::~EventItemAction() = default; void Core::Action::EventItemAction::onStart() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - m_startTime = Util::getTimeMs(); + m_startTime = Util::getTimeMs(); - auto castPacket = makeZonePacket< FFXIVIpcActorCast >( m_pSource->getId() ); - castPacket->data().action_id = 1; - castPacket->data().unknown = 3; - castPacket->data().unknown_1 = m_id; - castPacket->data().cast_time = 3.0f; - castPacket->data().target_id = m_pSource->getId(); + auto castPacket = makeZonePacket< FFXIVIpcActorCast >( m_pSource->getId() ); + castPacket->data().action_id = 1; + castPacket->data().unknown = 3; + castPacket->data().unknown_1 = m_id; + castPacket->data().cast_time = 3.0f; + castPacket->data().target_id = m_pSource->getId(); - m_pSource->sendToInRangeSet( castPacket, true ); - m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); + m_pSource->sendToInRangeSet( castPacket, true ); + m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); } void Core::Action::EventItemAction::onFinish() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - try - { - auto effectPacket = boost::make_shared< Server::EffectPacket >( m_pSource->getId(), m_additional, m_id ); - effectPacket->setAnimationId( 1 ); - effectPacket->setRotation( Math::Util::floatToUInt16Rot( m_pSource->getRot() ) ); + try + { + auto effectPacket = boost::make_shared< Server::EffectPacket >( m_pSource->getId(), m_additional, m_id ); + effectPacket->setAnimationId( 1 ); + effectPacket->setRotation( Math::Util::floatToUInt16Rot( m_pSource->getRot() ) ); - m_pSource->getAsPlayer()->unsetStateFlag( Common::PlayerStateFlag::Casting ); - m_pSource->sendToInRangeSet( effectPacket, true ); + m_pSource->getAsPlayer()->unsetStateFlag( Common::PlayerStateFlag::Casting ); + m_pSource->sendToInRangeSet( effectPacket, true ); - if( m_onActionFinishClb ) - m_onActionFinishClb( *m_pSource->getAsPlayer(), m_eventId, m_additional ); - } - catch( std::exception& e ) - { - auto pLog = g_fw.get< Logger >(); - pLog->error( e.what() ); - } + if( m_onActionFinishClb ) + m_onActionFinishClb( *m_pSource->getAsPlayer(), m_eventId, m_additional ); + } + catch( std::exception& e ) + { + auto pLog = g_fw.get< Logger >(); + pLog->error( e.what() ); + } } void Core::Action::EventItemAction::onInterrupt() { - if( !m_pSource ) - return; + if( !m_pSource ) + return; - try - { + try + { - auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 0x04, m_id ); - if( m_pSource->isPlayer() ) - { - m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); - m_pSource->sendToInRangeSet( control, true ); - } - else - m_pSource->sendToInRangeSet( control ); + auto control = makeActorControl142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 0x04, m_id ); + if( m_pSource->isPlayer() ) + { + m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); + m_pSource->sendToInRangeSet( control, true ); + } + else + m_pSource->sendToInRangeSet( control ); - if( m_onActionInterruptClb ) - m_onActionInterruptClb( *m_pSource->getAsPlayer(), m_eventId, m_additional ); + if( m_onActionInterruptClb ) + m_onActionInterruptClb( *m_pSource->getAsPlayer(), m_eventId, m_additional ); - } - catch( std::exception& e ) - { - auto pLog = g_fw.get< Logger >(); - pLog->error( e.what() ); - } + } + catch( std::exception& e ) + { + auto pLog = g_fw.get< Logger >(); + pLog->error( e.what() ); + } } diff --git a/src/servers/sapphire_zone/Action/EventItemAction.h b/src/servers/sapphire_zone/Action/EventItemAction.h index 69832263..dbaf9cf3 100644 --- a/src/servers/sapphire_zone/Action/EventItemAction.h +++ b/src/servers/sapphire_zone/Action/EventItemAction.h @@ -7,28 +7,32 @@ namespace Core { namespace Action { - class EventItemAction : public Action - { +class EventItemAction : + public Action +{ - public: - EventItemAction(); - ~EventItemAction(); - - EventItemAction( Entity::CharaPtr pActor, uint32_t eventId, uint16_t action, - ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional ); +public: + EventItemAction(); - void onStart() override; - void onFinish() override; - void onInterrupt() override; + ~EventItemAction(); - private: - uint32_t m_eventId; - uint64_t m_additional; - - ActionCallback m_onActionFinishClb; - ActionCallback m_onActionInterruptClb; + EventItemAction( Entity::CharaPtr pActor, uint32_t eventId, uint16_t action, + ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional ); - }; + void onStart() override; + + void onFinish() override; + + void onInterrupt() override; + +private: + uint32_t m_eventId; + uint64_t m_additional; + + ActionCallback m_onActionFinishClb; + ActionCallback m_onActionInterruptClb; + +}; } } diff --git a/src/servers/sapphire_zone/Actor/Actor.cpp b/src/servers/sapphire_zone/Actor/Actor.cpp index dd436423..e1985807 100644 --- a/src/servers/sapphire_zone/Actor/Actor.cpp +++ b/src/servers/sapphire_zone/Actor/Actor.cpp @@ -35,123 +35,123 @@ using namespace Core::Network::Packets; //using namespace Core::Network::Packets::Server; Core::Entity::Actor::Actor( ObjKind type ) : - m_objKind( type ) + m_objKind( type ) { } uint32_t Core::Entity::Actor::getId() const { - return m_id; + return m_id; } void Core::Entity::Actor::setId( uint32_t id ) { - m_id = id; + m_id = id; } Core::Common::ObjKind Core::Entity::Actor::getObjKind() const { - return m_objKind; + return m_objKind; } Core::Common::FFXIVARR_POSITION3& Core::Entity::Actor::getPos() { - return m_pos; + return m_pos; } void Core::Entity::Actor::setPos( float x, float y, float z ) { - m_pos.x = x; - m_pos.y = y; - m_pos.z = z; - m_pCurrentZone->updateActorPosition( *this ); + m_pos.x = x; + m_pos.y = y; + m_pos.z = z; + m_pCurrentZone->updateActorPosition( *this ); } void Core::Entity::Actor::setPos( const Core::Common::FFXIVARR_POSITION3& pos ) { - m_pos = pos; - m_pCurrentZone->updateActorPosition( *this ); + m_pos = pos; + m_pCurrentZone->updateActorPosition( *this ); } float Core::Entity::Actor::getRot() const { - return m_rot; + return m_rot; } void Core::Entity::Actor::setRot( float rot ) { - m_rot = rot; + m_rot = rot; } bool Core::Entity::Actor::isChara() const { - return isPlayer() || isBattleNpc() || isEventNpc() || isRetainer() || isCompanion(); + return isPlayer() || isBattleNpc() || isEventNpc() || isRetainer() || isCompanion(); } bool Core::Entity::Actor::isPlayer() const { - return m_objKind == ObjKind::Player; + return m_objKind == ObjKind::Player; } bool Core::Entity::Actor::isEventNpc() const { - return m_objKind == ObjKind::EventNpc; + return m_objKind == ObjKind::EventNpc; } bool Core::Entity::Actor::isBattleNpc() const { - return m_objKind == ObjKind::BattleNpc; + return m_objKind == ObjKind::BattleNpc; } bool Core::Entity::Actor::isRetainer() const { - return m_objKind == ObjKind::Retainer; + return m_objKind == ObjKind::Retainer; } bool Core::Entity::Actor::isCompanion() const { - return m_objKind == ObjKind::Companion; + return m_objKind == ObjKind::Companion; } bool Core::Entity::Actor::isEventObj() const { - return m_objKind == ObjKind::EventObj; + return m_objKind == ObjKind::EventObj; } bool Core::Entity::Actor::isHousingEventObj() const { - return m_objKind == ObjKind::Housing; + return m_objKind == ObjKind::Housing; } bool Core::Entity::Actor::isAetheryte() const { - return m_objKind == ObjKind::Aetheryte; + return m_objKind == ObjKind::Aetheryte; } /*! \return pointer to this instance as ActorPtr */ Core::Entity::CharaPtr Core::Entity::Actor::getAsChara() { - if( !isChara() ) - return nullptr; - return boost::dynamic_pointer_cast< Entity::Chara, Entity::Actor >( shared_from_this() ); + if( !isChara() ) + return nullptr; + return boost::dynamic_pointer_cast< Entity::Chara, Entity::Actor >( shared_from_this() ); } /*! \return pointer to this instance as PlayerPtr */ Core::Entity::PlayerPtr Core::Entity::Actor::getAsPlayer() { - if( !isPlayer() ) - return nullptr; - return boost::dynamic_pointer_cast< Entity::Player, Entity::Actor >( shared_from_this() ); + if( !isPlayer() ) + return nullptr; + return boost::dynamic_pointer_cast< Entity::Player, Entity::Actor >( shared_from_this() ); } /*! \return pointer to this instance as PlayerPtr */ Core::Entity::EventObjectPtr Core::Entity::Actor::getAsEventObj() { - if( !isEventObj() ) - return nullptr; - return boost::dynamic_pointer_cast< Entity::EventObject, Entity::Actor >( shared_from_this() ); + if( !isEventObj() ) + return nullptr; + return boost::dynamic_pointer_cast< Entity::EventObject, Entity::Actor >( shared_from_this() ); } /*! @@ -163,21 +163,21 @@ but also to the global actor map void Core::Entity::Actor::addInRangeActor( ActorPtr pActor ) { - // if this is null, something went wrong - assert( pActor ); + // if this is null, something went wrong + assert( pActor ); - // add actor to in range set - m_inRangeActor.insert( pActor ); + // add actor to in range set + m_inRangeActor.insert( pActor ); - if( pActor->isPlayer() ) - { - auto pPlayer = pActor->getAsPlayer(); + if( pActor->isPlayer() ) + { + auto pPlayer = pActor->getAsPlayer(); - spawn( pPlayer ); + spawn( pPlayer ); - // if actor is a player, add it to the in range player set - m_inRangePlayers.insert( pPlayer ); - } + // if actor is a player, add it to the in range player set + m_inRangePlayers.insert( pPlayer ); + } } /*! @@ -188,38 +188,38 @@ but also to the global actor map */ void Core::Entity::Actor::removeInRangeActor( Actor& actor ) { - // call virtual event - onRemoveInRangeActor( actor ); + // call virtual event + onRemoveInRangeActor( actor ); - // remove actor from in range actor set - m_inRangeActor.erase( actor.shared_from_this() ); + // remove actor from in range actor set + m_inRangeActor.erase( actor.shared_from_this() ); - // if actor is a player, despawn ourself for him - // TODO: move to virtual onRemove? - if( isPlayer() ) - actor.despawn( getAsPlayer() ); + // if actor is a player, despawn ourself for him + // TODO: move to virtual onRemove? + if( isPlayer() ) + actor.despawn( getAsPlayer() ); - if( actor.isPlayer() ) - m_inRangePlayers.erase( actor.getAsPlayer() ); + if( actor.isPlayer() ) + m_inRangePlayers.erase( actor.getAsPlayer() ); } /*! \return true if there is at least one actor in the in range set */ bool Core::Entity::Actor::hasInRangeActor() const { - return ( m_inRangeActor.size() > 0 ); + return ( m_inRangeActor.size() > 0 ); } void Core::Entity::Actor::removeFromInRange() { - if( !hasInRangeActor() ) - return; + if( !hasInRangeActor() ) + return; - Entity::ActorPtr pCurAct; + Entity::ActorPtr pCurAct; - for( auto& pCurAct : m_inRangeActor ) - { - pCurAct->removeInRangeActor( *this ); - } + for( auto& pCurAct : m_inRangeActor ) + { + pCurAct->removeInRangeActor( *this ); + } } @@ -231,46 +231,46 @@ check if a given actor is in the actors in range set */ bool Core::Entity::Actor::isInRangeSet( ActorPtr pActor ) const { - return !( m_inRangeActor.find( pActor ) == m_inRangeActor.end() ); + return !( m_inRangeActor.find( pActor ) == m_inRangeActor.end() ); } /*! \return ActorPtr of the closest actor in range, if none, nullptr */ Core::Entity::ActorPtr Core::Entity::Actor::getClosestActor() { - if( m_inRangeActor.empty() ) - // no actors in range, don't bother - return nullptr; + if( m_inRangeActor.empty() ) + // no actors in range, don't bother + return nullptr; - ActorPtr tmpActor = nullptr; + ActorPtr tmpActor = nullptr; - // arbitrary high number - float minDistance = 10000; + // arbitrary high number + float minDistance = 10000; - for( const auto& pCurAct : m_inRangeActor ) - { - float distance = Math::Util::distance( getPos().x, - getPos().y, - getPos().z, - pCurAct->getPos().x, - pCurAct->getPos().y, - pCurAct->getPos().z ); + for( const auto& pCurAct : m_inRangeActor ) + { + float distance = Math::Util::distance( getPos().x, + getPos().y, + getPos().z, + pCurAct->getPos().x, + pCurAct->getPos().y, + pCurAct->getPos().z ); - if( distance < minDistance ) - { - minDistance = distance; - tmpActor = pCurAct; - } - } + if( distance < minDistance ) + { + minDistance = distance; + tmpActor = pCurAct; + } + } - return tmpActor; + return tmpActor; } /*! Clear the whole in range set, this does no cleanup */ void Core::Entity::Actor::clearInRangeSet() { - m_inRangeActor.clear(); - m_inRangePlayers.clear(); + m_inRangeActor.clear(); + m_inRangePlayers.clear(); } /*! @@ -281,62 +281,62 @@ Send a packet to all players in range, potentially to self if set and is player */ void Core::Entity::Actor::sendToInRangeSet( Network::Packets::FFXIVPacketBasePtr pPacket, bool bToSelf ) { - auto pServerZone = g_fw.get< ServerZone >(); - if( bToSelf && isPlayer() ) - { - auto pPlayer = getAsPlayer(); + auto pServerZone = g_fw.get< ServerZone >(); + if( bToSelf && isPlayer() ) + { + auto pPlayer = getAsPlayer(); - auto pSession = pServerZone->getSession( pPlayer->getId() ); + auto pSession = pServerZone->getSession( pPlayer->getId() ); - // it might be that the player DC'd in which case the session would be invalid - if( pSession ) - pSession->getZoneConnection()->queueOutPacket( pPacket ); - } + // it might be that the player DC'd in which case the session would be invalid + if( pSession ) + pSession->getZoneConnection()->queueOutPacket( pPacket ); + } - if( m_inRangePlayers.empty() ) - return; + if( m_inRangePlayers.empty() ) + return; - pPacket->setSourceActor( m_id ); + pPacket->setSourceActor( m_id ); - for( const auto &pCurAct : m_inRangePlayers ) - { - assert( pCurAct ); - // it might be that the player DC'd in which case the session would be invalid - // TODO: copy packet to a new unique_ptr then move ownership - pCurAct->queuePacket( pPacket ); - } + for( const auto& pCurAct : m_inRangePlayers ) + { + assert( pCurAct ); + // it might be that the player DC'd in which case the session would be invalid + // TODO: copy packet to a new unique_ptr then move ownership + pCurAct->queuePacket( pPacket ); + } } /*! \return list of actors currently in range */ std::set< Core::Entity::ActorPtr > Core::Entity::Actor::getInRangeActors( bool includeSelf ) { - auto tempInRange = m_inRangeActor; + auto tempInRange = m_inRangeActor; - if( includeSelf ) - tempInRange.insert( shared_from_this() ); + if( includeSelf ) + tempInRange.insert( shared_from_this() ); - return tempInRange; + return tempInRange; } /*! \return ZonePtr to the current zone, nullptr if not set */ Core::ZonePtr Core::Entity::Actor::getCurrentZone() const { - return m_pCurrentZone; + return m_pCurrentZone; } /*! \param ZonePtr to the zone to be set as current */ void Core::Entity::Actor::setCurrentZone( ZonePtr currZone ) { - m_pCurrentZone = currZone; + m_pCurrentZone = currZone; } /*! \return InstanceContentPtr to the current instance, nullptr if not an instance or not set */ Core::InstanceContentPtr Core::Entity::Actor::getCurrentInstance() const { - if( m_pCurrentZone ) - return m_pCurrentZone->getAsInstanceContent(); + if( m_pCurrentZone ) + return m_pCurrentZone->getAsInstanceContent(); - return nullptr; + return nullptr; } /*! @@ -344,9 +344,9 @@ Get the current cell of a region the actor is in \return Cell* */ -Core::Cell * Core::Entity::Actor::getCellPtr() +Core::Cell* Core::Entity::Actor::getCellPtr() { - return m_pCell; + return m_pCell; } /*! @@ -354,7 +354,7 @@ Set the current cell the actor is in \param Cell* for the cell to be set */ -void Core::Entity::Actor::setCell( Cell * pCell ) +void Core::Entity::Actor::setCell( Cell* pCell ) { - m_pCell = pCell; + m_pCell = pCell; } diff --git a/src/servers/sapphire_zone/Actor/Actor.h b/src/servers/sapphire_zone/Actor/Actor.h index 33bc690e..d9009130 100644 --- a/src/servers/sapphire_zone/Actor/Actor.h +++ b/src/servers/sapphire_zone/Actor/Actor.h @@ -17,102 +17,129 @@ namespace Entity { \brief Base class for all actor/objects */ - class Actor : public boost::enable_shared_from_this< Actor > - { +class Actor : + public boost::enable_shared_from_this< Actor > +{ - protected: - /*! Position of the object */ - Common::FFXIVARR_POSITION3 m_pos; - /*! Rotation of the object */ - float m_rot; - /*! Id of the actor */ - uint32_t m_id; - /*! Type of the actor */ - Common::ObjKind m_objKind; - /*! Id of the zone the actor currently is in */ - uint32_t m_zoneId; - /*! Ptr to the ZoneObj the actor belongs to */ - ZonePtr m_pCurrentZone; +protected: + /*! Position of the object */ + Common::FFXIVARR_POSITION3 m_pos; + /*! Rotation of the object */ + float m_rot; + /*! Id of the actor */ + uint32_t m_id; + /*! Type of the actor */ + Common::ObjKind m_objKind; + /*! Id of the zone the actor currently is in */ + uint32_t m_zoneId; + /*! Ptr to the ZoneObj the actor belongs to */ + ZonePtr m_pCurrentZone; - /*! list of various actors in range */ - std::set< ActorPtr > m_inRangeActor; - std::set< PlayerPtr > m_inRangePlayers; + /*! list of various actors in range */ + std::set< ActorPtr > m_inRangeActor; + std::set< PlayerPtr > m_inRangePlayers; - /*! Parent cell in the zone */ - Core::Cell* m_pCell; + /*! Parent cell in the zone */ + Core::Cell* m_pCell; - public: - explicit Actor( Common::ObjKind type ); - virtual ~Actor() {}; +public: + explicit Actor( Common::ObjKind type ); - virtual void spawn( PlayerPtr pTarget ) {} - virtual void despawn( PlayerPtr pTarget ) {} + virtual ~Actor() + { + }; - uint32_t getId() const; - void setId( uint32_t id ); + virtual void spawn( PlayerPtr pTarget ) + { + } - Common::ObjKind getObjKind() const; + virtual void despawn( PlayerPtr pTarget ) + { + } - Common::FFXIVARR_POSITION3& getPos(); - void setPos( const Common::FFXIVARR_POSITION3& pos ); - void setPos( float x, float y, float z ); + uint32_t getId() const; - float getRot() const; - void setRot( float rot ); + void setId( uint32_t id ); - bool isChara() const; - bool isPlayer() const; - bool isEventNpc() const; - bool isBattleNpc() const; - bool isRetainer() const; - bool isCompanion() const; - bool isEventObj() const; - bool isHousingEventObj() const; - bool isAetheryte() const; + Common::ObjKind getObjKind() const; - ///// IN RANGE LOGIC /////////////////////////////// - virtual void onRemoveInRangeActor( Actor& pActor ) {} + Common::FFXIVARR_POSITION3& getPos(); - // check if another actor is in the actors in range set - bool isInRangeSet( ActorPtr pActor ) const; + void setPos( const Common::FFXIVARR_POSITION3& pos ); - ActorPtr getClosestActor(); + void setPos( float x, float y, float z ); - void sendToInRangeSet( Network::Packets::FFXIVPacketBasePtr pPacket, bool bToSelf = false ); + float getRot() const; - // add an actor to in range set - void addInRangeActor( ActorPtr pActor ); + void setRot( float rot ); - // remove an actor from the in range set - void removeInRangeActor( Actor& actor ); + bool isChara() const; - // return true if there is at least one actor in the in range set - bool hasInRangeActor() const; + bool isPlayer() const; - void removeFromInRange(); + bool isEventNpc() const; - // clear the whole in range set, this does no cleanup - virtual void clearInRangeSet(); + bool isBattleNpc() const; - std::set< ActorPtr > getInRangeActors( bool includeSelf = false ); + bool isRetainer() const; - //////////////////////////////////////////////////// + bool isCompanion() const; - CharaPtr getAsChara(); - PlayerPtr getAsPlayer(); - EventObjectPtr getAsEventObj(); + bool isEventObj() const; - ZonePtr getCurrentZone() const; - void setCurrentZone( ZonePtr currZone ); + bool isHousingEventObj() const; - InstanceContentPtr getCurrentInstance() const; + bool isAetheryte() const; - // get the current cell of a region the actor is in - Cell* getCellPtr(); - // set the current cell - void setCell( Cell* pCell ); + ///// IN RANGE LOGIC /////////////////////////////// + virtual void onRemoveInRangeActor( Actor& pActor ) + { + } - }; + // check if another actor is in the actors in range set + bool isInRangeSet( ActorPtr pActor ) const; + + ActorPtr getClosestActor(); + + void sendToInRangeSet( Network::Packets::FFXIVPacketBasePtr pPacket, bool bToSelf = false ); + + // add an actor to in range set + void addInRangeActor( ActorPtr pActor ); + + // remove an actor from the in range set + void removeInRangeActor( Actor& actor ); + + // return true if there is at least one actor in the in range set + bool hasInRangeActor() const; + + void removeFromInRange(); + + // clear the whole in range set, this does no cleanup + virtual void clearInRangeSet(); + + std::set< ActorPtr > getInRangeActors( bool includeSelf = false ); + + //////////////////////////////////////////////////// + + CharaPtr getAsChara(); + + PlayerPtr getAsPlayer(); + + EventObjectPtr getAsEventObj(); + + ZonePtr getCurrentZone() const; + + void setCurrentZone( ZonePtr currZone ); + + InstanceContentPtr getCurrentInstance() const; + + // get the current cell of a region the actor is in + Cell* getCellPtr(); + + // set the current cell + void setCell( Cell* pCell ); + +}; } } diff --git a/src/servers/sapphire_zone/Actor/BNpc.cpp b/src/servers/sapphire_zone/Actor/BNpc.cpp new file mode 100644 index 00000000..40d2ced6 --- /dev/null +++ b/src/servers/sapphire_zone/Actor/BNpc.cpp @@ -0,0 +1,47 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "Forwards.h" +#include "Action/Action.h" + +#include "Zone/Zone.h" + +#include "Network/GameConnection.h" +#include "Network/PacketWrappers/ActorControlPacket142.h" +#include "Network/PacketWrappers/ActorControlPacket143.h" +#include "Network/PacketWrappers/ActorControlPacket144.h" +#include "Network/PacketWrappers/UpdateHpMpTpPacket.h" + +#include "StatusEffect/StatusEffect.h" +#include "Action/ActionCollision.h" +#include "ServerZone.h" +#include "Session.h" +#include "Math/CalcBattle.h" +#include "Chara.h" +#include "Player.h" +#include "Zone/TerritoryMgr.h" +#include "Framework.h" +#include "Common.h" + +extern Core::Framework g_fw; + +using namespace Core::Common; +using namespace Core::Network::Packets; +using namespace Core::Network::Packets::Server; +using namespace Core::Network::ActorControl; + +Core::Entity::BNpc::BNpc( ObjKind type ) : + Npc( ObjKind::BattleNpc ), + m_targetId( INVALID_GAME_OBJECT_ID ) +{ + +} + +Core::Entity::BNpc::~BNpc() +{ +} diff --git a/src/servers/sapphire_zone/Actor/BNpc.h b/src/servers/sapphire_zone/Actor/BNpc.h new file mode 100644 index 00000000..5d6af213 --- /dev/null +++ b/src/servers/sapphire_zone/Actor/BNpc.h @@ -0,0 +1,46 @@ +#ifndef _BNPC_H_ +#define _BNPC_H_ + +#include +#include + +#include "Forwards.h" +#include "Chara.h" +#include +#include +#include + +namespace Core { +namespace Entity { + +/*! +\class Npc +\brief Base class for all Npcs + +*/ +class BNpc : + public Npc +{ + +public: + BNpc(); + + virtual ~BNpc() override; + +private: + uint32_t m_bNpcBaseId; + uint32_t m_bNpcNameId; + uint64_t m_weaponMain; + uint64_t m_weaponSub; + uint8_t m_aggressionMode; + uint8_t m_enemyType; + uint8_t m_onlineStatus; + uint8_t m_pose; + uint16_t m_modelChara; + uint32_t m_displayFlags; + +}; + +} +} +#endif diff --git a/src/servers/sapphire_zone/Actor/BNpcTemplate.cpp b/src/servers/sapphire_zone/Actor/BNpcTemplate.cpp index 0c5aabee..e8469144 100644 --- a/src/servers/sapphire_zone/Actor/BNpcTemplate.cpp +++ b/src/servers/sapphire_zone/Actor/BNpcTemplate.cpp @@ -5,23 +5,23 @@ Core::Entity::BNpcTemplate::BNpcTemplate( uint32_t baseId, uint32_t nameId, uint uint8_t aggressionMode, uint8_t enemyType, uint8_t onlineStatus, uint8_t pose, uint16_t modelChara, uint32_t displayFlags, uint32_t* modelEquip, uint8_t* customize ) : - m_bNpcBaseId( baseId ), - m_bNpcNameId( nameId ), - m_weaponMain( weaponMain ), - m_weaponSub( weaponSub ), - m_aggressionMode( aggressionMode ), - m_enemyType( enemyType ), - m_onlineStatus( onlineStatus ), - m_pose( pose ), - m_modelChara( modelChara ), - m_displayFlags( displayFlags ) + m_bNpcBaseId( baseId ), + m_bNpcNameId( nameId ), + m_weaponMain( weaponMain ), + m_weaponSub( weaponSub ), + m_aggressionMode( aggressionMode ), + m_enemyType( enemyType ), + m_onlineStatus( onlineStatus ), + m_pose( pose ), + m_modelChara( modelChara ), + m_displayFlags( displayFlags ) { - if( modelEquip ) - memcpy( m_modelEquip, modelEquip, sizeof( m_modelEquip) ); + if( modelEquip ) + memcpy( m_modelEquip, modelEquip, sizeof( m_modelEquip ) ); - if( customize ) - memcpy( m_customize, customize, sizeof( m_customize) ); + if( customize ) + memcpy( m_customize, customize, sizeof( m_customize ) ); } @@ -32,110 +32,110 @@ Core::Entity::BNpcTemplate::~BNpcTemplate() uint32_t Core::Entity::BNpcTemplate::getBNpcBaseId() const { - return m_bNpcBaseId; + return m_bNpcBaseId; } void Core::Entity::BNpcTemplate::setBNpcBaseId( uint32_t bNpcBaseId ) { - m_bNpcBaseId = bNpcBaseId; + m_bNpcBaseId = bNpcBaseId; } uint32_t Core::Entity::BNpcTemplate::getBNpcNameId() const { - return m_bNpcNameId; + return m_bNpcNameId; } void Core::Entity::BNpcTemplate::setBNpcNameId( uint32_t bNpcNameId ) { - m_bNpcNameId = bNpcNameId; + m_bNpcNameId = bNpcNameId; } uint64_t Core::Entity::BNpcTemplate::getWeaponMain() const { - return m_weaponMain; + return m_weaponMain; } void Core::Entity::BNpcTemplate::setWeaponMain( uint64_t weaponMain ) { - m_weaponMain = weaponMain; + m_weaponMain = weaponMain; } uint64_t Core::Entity::BNpcTemplate::getWeaponSub() const { - return m_weaponSub; + return m_weaponSub; } void Core::Entity::BNpcTemplate::setWeaponSub( uint64_t weaponSub ) { - m_weaponSub = weaponSub; + m_weaponSub = weaponSub; } uint8_t Core::Entity::BNpcTemplate::getAggressionMode() const { - return m_aggressionMode; + return m_aggressionMode; } void Core::Entity::BNpcTemplate::setAggressionMode( uint8_t aggressionMode ) { - m_aggressionMode = aggressionMode; + m_aggressionMode = aggressionMode; } uint8_t Core::Entity::BNpcTemplate::getEnemyType() const { - return m_enemyType; + return m_enemyType; } void Core::Entity::BNpcTemplate::setEnemyType( uint8_t enemyType ) { - m_enemyType = enemyType; + m_enemyType = enemyType; } uint8_t Core::Entity::BNpcTemplate::getOnlineStatus() const { - return m_onlineStatus; + return m_onlineStatus; } void Core::Entity::BNpcTemplate::setOnlineStatus( uint8_t onlineStatus ) { - m_onlineStatus = onlineStatus; + m_onlineStatus = onlineStatus; } uint8_t Core::Entity::BNpcTemplate::getPose() const { - return m_pose; + return m_pose; } void Core::Entity::BNpcTemplate::setPose( uint8_t pose ) { - m_pose = pose; + m_pose = pose; } uint16_t Core::Entity::BNpcTemplate::getModelChara() const { - return m_modelChara; + return m_modelChara; } void Core::Entity::BNpcTemplate::setModelChara( uint16_t modelChara ) { - m_modelChara = modelChara; + m_modelChara = modelChara; } uint32_t Core::Entity::BNpcTemplate::getDisplayFlags() const { - return m_displayFlags; + return m_displayFlags; } void Core::Entity::BNpcTemplate::setDisplayFlags( uint32_t displayFlags ) { - m_displayFlags = displayFlags; + m_displayFlags = displayFlags; } const uint32_t* Core::Entity::BNpcTemplate::getModelEquip() const { - return m_modelEquip; + return m_modelEquip; } const uint8_t* Core::Entity::BNpcTemplate::getCustomize() const { - return m_customize; + return m_customize; } diff --git a/src/servers/sapphire_zone/Actor/BNpcTemplate.h b/src/servers/sapphire_zone/Actor/BNpcTemplate.h index c3e58c9a..080164ca 100644 --- a/src/servers/sapphire_zone/Actor/BNpcTemplate.h +++ b/src/servers/sapphire_zone/Actor/BNpcTemplate.h @@ -16,59 +16,82 @@ ", " + cusStr + ", " + std::to_string( instance.gimmickId ) */ -namespace Core -{ -namespace Entity -{ +namespace Core { +namespace Entity { class BNpcTemplate { private: - uint32_t m_bNpcBaseId; - uint32_t m_bNpcNameId; - uint64_t m_weaponMain; - uint64_t m_weaponSub; - uint8_t m_aggressionMode; - uint8_t m_enemyType; - uint8_t m_onlineStatus; - uint8_t m_pose; - uint16_t m_modelChara; - uint32_t m_displayFlags; - uint32_t m_modelEquip[10]; - uint8_t m_customize[26]; + uint32_t m_bNpcBaseId; + uint32_t m_bNpcNameId; + uint64_t m_weaponMain; + uint64_t m_weaponSub; + uint8_t m_aggressionMode; + uint8_t m_enemyType; + uint8_t m_onlineStatus; + uint8_t m_pose; + uint16_t m_modelChara; + uint32_t m_displayFlags; + uint32_t m_modelEquip[10]; + uint8_t m_customize[26]; public: - BNpcTemplate() {}; - BNpcTemplate( uint32_t baseId, uint32_t nameId, uint64_t weaponMain, uint64_t weaponSub, uint8_t aggressionMode, - uint8_t enemyType, uint8_t onlineStatus, uint8_t pose, uint16_t modelChara, uint32_t displayFlags = 0, - uint32_t* modelEquip = nullptr, uint8_t* customize = nullptr ); + BNpcTemplate() + { + }; - virtual ~BNpcTemplate(); + BNpcTemplate( uint32_t baseId, uint32_t nameId, uint64_t weaponMain, uint64_t weaponSub, uint8_t aggressionMode, + uint8_t enemyType, uint8_t onlineStatus, uint8_t pose, uint16_t modelChara, + uint32_t displayFlags = 0, + uint32_t* modelEquip = nullptr, uint8_t* customize = nullptr ); - uint32_t getBNpcBaseId() const; - void setBNpcBaseId( uint32_t bNpcBaseId ); - uint32_t getBNpcNameId() const; - void setBNpcNameId( uint32_t bNpcNameId ); - uint64_t getWeaponMain() const; - void setWeaponMain( uint64_t weaponMain ); - uint64_t getWeaponSub() const; - void setWeaponSub( uint64_t weaponSub ); - uint8_t getAggressionMode() const; - void setAggressionMode( uint8_t aggressionMode ); - uint8_t getEnemyType() const; - void setEnemyType( uint8_t enemyType ); - uint8_t getOnlineStatus() const; - void setOnlineStatus( uint8_t m_onlineStatus ); - uint8_t getPose() const; - void setPose( uint8_t m_pose ); - uint16_t getModelChara() const; - void setModelChara( uint16_t modelChara ); - uint32_t getDisplayFlags() const; - void setDisplayFlags( uint32_t displayFlags ); - const uint32_t *getModelEquip() const; - const uint8_t *getCustomize() const; + virtual ~BNpcTemplate(); + + uint32_t getBNpcBaseId() const; + + void setBNpcBaseId( uint32_t bNpcBaseId ); + + uint32_t getBNpcNameId() const; + + void setBNpcNameId( uint32_t bNpcNameId ); + + uint64_t getWeaponMain() const; + + void setWeaponMain( uint64_t weaponMain ); + + uint64_t getWeaponSub() const; + + void setWeaponSub( uint64_t weaponSub ); + + uint8_t getAggressionMode() const; + + void setAggressionMode( uint8_t aggressionMode ); + + uint8_t getEnemyType() const; + + void setEnemyType( uint8_t enemyType ); + + uint8_t getOnlineStatus() const; + + void setOnlineStatus( uint8_t m_onlineStatus ); + + uint8_t getPose() const; + + void setPose( uint8_t m_pose ); + + uint16_t getModelChara() const; + + void setModelChara( uint16_t modelChara ); + + uint32_t getDisplayFlags() const; + + void setDisplayFlags( uint32_t displayFlags ); + + const uint32_t* getModelEquip() const; + + const uint8_t* getCustomize() const; }; diff --git a/src/servers/sapphire_zone/Actor/Chara.cpp b/src/servers/sapphire_zone/Actor/Chara.cpp index bea55026..bf8b78b5 100644 --- a/src/servers/sapphire_zone/Actor/Chara.cpp +++ b/src/servers/sapphire_zone/Actor/Chara.cpp @@ -36,14 +36,14 @@ using namespace Core::Network::Packets::Server; using namespace Core::Network::ActorControl; Core::Entity::Chara::Chara( ObjKind type ) : - Actor( type ), - m_targetId( INVALID_GAME_OBJECT_ID ) + Actor( type ), + m_targetId( INVALID_GAME_OBJECT_ID ) { - // initialize the free slot queue - for( uint8_t i = 0; i < MAX_STATUS_EFFECTS; i++ ) - { - m_statusEffectFreeSlotQueue.push( i ); - } + // initialize the free slot queue + for( uint8_t i = 0; i < MAX_STATUS_EFFECTS; i++ ) + { + m_statusEffectFreeSlotQueue.push( i ); + } } Core::Entity::Chara::~Chara() @@ -53,151 +53,151 @@ Core::Entity::Chara::~Chara() /*! \return the actors name */ std::string Core::Entity::Chara::getName() const { - return std::string( m_name ); + return std::string( m_name ); } /*! \return current stance of the actors */ Core::Common::Stance Core::Entity::Chara::getStance() const { - return m_currentStance; + return m_currentStance; } /*! \return actor stats */ Core::Entity::Chara::ActorStats Core::Entity::Chara::getStats() const { - return m_baseStats; + return m_baseStats; } /*! \return current HP */ uint32_t Core::Entity::Chara::getHp() const { - return m_hp; + return m_hp; } /*! \return current MP */ uint32_t Core::Entity::Chara::getMp() const { - return m_mp; + return m_mp; } /*! \return current TP */ uint16_t Core::Entity::Chara::getTp() const { - return m_tp; + return m_tp; } /*! \return current GP */ uint16_t Core::Entity::Chara::getGp() const { - return m_gp; + return m_gp; } /*! \return current invincibility type */ InvincibilityType Core::Entity::Chara::getInvincibilityType() const { - return m_invincibilityType; + return m_invincibilityType; } /*! \return current class or job */ Core::Common::ClassJob Core::Entity::Chara::getClass() const { - return m_class; + return m_class; } /*! \return current class or job as int32_t ( this feels pointless ) */ uint8_t Core::Entity::Chara::getClassAsInt() const { - return static_cast< uint8_t >( m_class ); + return static_cast< uint8_t >( m_class ); } /*! \param ClassJob to set */ void Core::Entity::Chara::setClass( Common::ClassJob classJob ) { - m_class = classJob; + m_class = classJob; } /*! \param Id of the target to set */ void Core::Entity::Chara::setTargetId( uint64_t targetId ) { - m_targetId = targetId; + m_targetId = targetId; } /*! \return Id of the current target */ uint64_t Core::Entity::Chara::getTargetId() const { - return m_targetId; + return m_targetId; } /*! \return True if the actor is alive */ bool Core::Entity::Chara::isAlive() const { - return ( m_hp > 0 ); + return ( m_hp > 0 ); } /*! \return max hp for the actor */ uint32_t Core::Entity::Chara::getMaxHp() const { - return m_baseStats.max_hp; + return m_baseStats.max_hp; } /*! \return max mp for the actor */ uint32_t Core::Entity::Chara::getMaxMp() const { - return m_baseStats.max_mp; + return m_baseStats.max_mp; } /*! \return reset hp to current max hp */ void Core::Entity::Chara::resetHp() { - m_hp = getMaxHp(); - sendStatusUpdate( true ); + m_hp = getMaxHp(); + sendStatusUpdate( true ); } /*! \return reset mp to current max mp */ void Core::Entity::Chara::resetMp() { - m_mp = getMaxMp(); - sendStatusUpdate( true ); + m_mp = getMaxMp(); + sendStatusUpdate( true ); } /*! \param hp amount to set ( caps to maxHp ) */ void Core::Entity::Chara::setHp( uint32_t hp ) { - m_hp = hp < getMaxHp() ? hp : getMaxHp(); - sendStatusUpdate( true ); + m_hp = hp < getMaxHp() ? hp : getMaxHp(); + sendStatusUpdate( true ); } /*! \param mp amount to set ( caps to maxMp ) */ void Core::Entity::Chara::setMp( uint32_t mp ) { - m_mp = mp < getMaxMp() ? mp : getMaxMp(); - sendStatusUpdate( true ); + m_mp = mp < getMaxMp() ? mp : getMaxMp(); + sendStatusUpdate( true ); } /*! \param gp amount to set*/ void Core::Entity::Chara::setGp( uint32_t gp ) { - m_gp = gp; - sendStatusUpdate( true ); + m_gp = gp; + sendStatusUpdate( true ); } /*! \param type invincibility type to set */ void Core::Entity::Chara::setInvincibilityType( Common::InvincibilityType type ) { - m_invincibilityType = type; + m_invincibilityType = type; } /*! \return current status of the actor */ Core::Common::ActorStatus Core::Entity::Chara::getStatus() const { - return m_status; + return m_status; } /*! \param status to set */ void Core::Entity::Chara::setStatus( ActorStatus status ) { - m_status = status; + m_status = status; } /*! @@ -206,25 +206,25 @@ Sets hp/mp/tp, sets status, plays animation and fires onDeath event */ void Core::Entity::Chara::die() { - m_status = ActorStatus::Dead; - m_hp = 0; - m_mp = 0; - m_tp = 0; + m_status = ActorStatus::Dead; + m_hp = 0; + m_mp = 0; + m_tp = 0; - // fire onDeath event - onDeath(); + // fire onDeath event + onDeath(); - // if the actor is a player, the update needs to be send to himself too - bool selfNeedsUpdate = isPlayer(); + // if the actor is a player, the update needs to be send to himself too + bool selfNeedsUpdate = isPlayer(); - FFXIVPacketBasePtr packet = makeActorControl142( m_id, SetStatus, static_cast< uint8_t >( ActorStatus::Dead ) ); - sendToInRangeSet( packet, selfNeedsUpdate ); + FFXIVPacketBasePtr packet = makeActorControl142( m_id, SetStatus, static_cast< uint8_t >( ActorStatus::Dead ) ); + sendToInRangeSet( packet, selfNeedsUpdate ); - // TODO: not all actor show the death animation when they die, some quest npcs might just despawn - // although that might be handled by setting the HP to 1 and doing some script magic + // TODO: not all actor show the death animation when they die, some quest npcs might just despawn + // although that might be handled by setting the HP to 1 and doing some script magic - FFXIVPacketBasePtr packet1 = makeActorControl142( m_id, DeathAnimation, 0, 0, 0, 0x20 ); - sendToInRangeSet( packet1, selfNeedsUpdate ); + FFXIVPacketBasePtr packet1 = makeActorControl142( m_id, DeathAnimation, 0, 0, 0, 0x20 ); + sendToInRangeSet( packet1, selfNeedsUpdate ); } @@ -236,15 +236,15 @@ position */ bool Core::Entity::Chara::face( const Common::FFXIVARR_POSITION3& p ) { - float oldRot = getRot(); - float rot = Math::Util::calcAngFrom( getPos().x, getPos().z, p.x, p.z ); - float newRot = PI - rot + ( PI / 2 ); + float oldRot = getRot(); + float rot = Math::Util::calcAngFrom( getPos().x, getPos().z, p.x, p.z ); + float newRot = PI - rot + ( PI / 2 ); - m_pCell = nullptr; + m_pCell = nullptr; - setRot( newRot ); + setRot( newRot ); - return oldRot != newRot ? true : false; + return oldRot != newRot ? true : false; } /*! @@ -255,10 +255,10 @@ Set and propagate the actor stance to in range players */ void Core::Entity::Chara::setStance( Stance stance ) { - m_currentStance = stance; + m_currentStance = stance; - FFXIVPacketBasePtr packet = makeActorControl142( m_id, ToggleWeapon, stance, 0 ); - sendToInRangeSet( packet ); + FFXIVPacketBasePtr packet = makeActorControl142( m_id, ToggleWeapon, stance, 0 ); + sendToInRangeSet( packet ); } /*! @@ -270,13 +270,13 @@ and if fully performed, clean up again. bool Core::Entity::Chara::checkAction() { - if( m_pCurrentAction == nullptr ) - return false; + if( m_pCurrentAction == nullptr ) + return false; - if( m_pCurrentAction->update() ) - m_pCurrentAction.reset(); + if( m_pCurrentAction->update() ) + m_pCurrentAction.reset(); - return true; + return true; } @@ -287,9 +287,9 @@ Change the current target and propagate to in range players */ void Core::Entity::Chara::changeTarget( uint64_t targetId ) { - setTargetId( targetId ); - FFXIVPacketBasePtr packet = makeActorControl144( m_id, SetTarget, 0, 0, 0, 0, targetId ); - sendToInRangeSet( packet ); + setTargetId( targetId ); + FFXIVPacketBasePtr packet = makeActorControl144( m_id, SetTarget, 0, 0, 0, 0, targetId ); + sendToInRangeSet( packet ); } /*! @@ -297,7 +297,7 @@ Dummy function \return 0 */ uint8_t Core::Entity::Chara::getLevel() const { - return 0; + return 0; } /*! @@ -311,25 +311,26 @@ magical dmg and take status effects into account */ void Core::Entity::Chara::takeDamage( uint32_t damage ) { - if( damage >= m_hp ) - { - switch( m_invincibilityType ) { - case InvincibilityNone: - setHp( 0 ); - die(); - break; - case InvincibilityRefill: - resetHp(); - break; - case InvincibilityStayAlive: - setHp( 0 ); - break; - } - } - else - m_hp -= damage; + if( damage >= m_hp ) + { + switch( m_invincibilityType ) + { + case InvincibilityNone: + setHp( 0 ); + die(); + break; + case InvincibilityRefill: + resetHp(); + break; + case InvincibilityStayAlive: + setHp( 0 ); + break; + } + } + else + m_hp -= damage; - sendStatusUpdate( false ); + sendStatusUpdate( false ); } /*! @@ -341,14 +342,14 @@ in range */ void Core::Entity::Chara::heal( uint32_t amount ) { - if( ( m_hp + amount ) > getMaxHp() ) - { - m_hp = getMaxHp(); - } - else - m_hp += amount; + if( ( m_hp + amount ) > getMaxHp() ) + { + m_hp = getMaxHp(); + } + else + m_hp += amount; - sendStatusUpdate( false ); + sendStatusUpdate( false ); } /*! @@ -360,20 +361,20 @@ so players can have their own version and we can abolish the param. */ void Core::Entity::Chara::sendStatusUpdate( bool toSelf ) { - FFXIVPacketBasePtr packet = boost::make_shared< UpdateHpMpTpPacket >( *this ); - sendToInRangeSet( packet ); + FFXIVPacketBasePtr packet = boost::make_shared< UpdateHpMpTpPacket >( *this ); + sendToInRangeSet( packet ); } /*! \return ActionPtr of the currently registered action, or nullptr */ Core::Action::ActionPtr Core::Entity::Chara::getCurrentAction() const { - return m_pCurrentAction; + return m_pCurrentAction; } /*! \param ActionPtr of the action to be registered */ void Core::Entity::Chara::setCurrentAction( Core::Action::ActionPtr pAction ) { - m_pCurrentAction = pAction; + m_pCurrentAction = pAction; } /*! @@ -388,34 +389,34 @@ Will have to be extended for ranged attacks. void Core::Entity::Chara::autoAttack( CharaPtr pTarget ) { - uint64_t tick = Util::getTimeMs(); + uint64_t tick = Util::getTimeMs(); - if( ( tick - m_lastAttack ) > 2500 ) - { - pTarget->onActionHostile( *this ); - m_lastAttack = tick; - srand( static_cast< uint32_t >( tick ) ); + if( ( tick - m_lastAttack ) > 2500 ) + { + pTarget->onActionHostile( *this ); + m_lastAttack = tick; + srand( static_cast< uint32_t >( tick ) ); - uint16_t damage = static_cast< uint16_t >( 10 + rand() % 12 ); - uint32_t variation = static_cast< uint32_t >( 0 + rand() % 4 ); + uint16_t damage = static_cast< uint16_t >( 10 + rand() % 12 ); + uint32_t variation = static_cast< uint32_t >( 0 + rand() % 4 ); - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 0x336 ); - effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); + auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 0x336 ); + effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); - Server::EffectEntry effectEntry{ }; - effectEntry.value = damage; - effectEntry.effectType = ActionEffectType::Damage; - effectEntry.hitSeverity = static_cast< ActionHitSeverityType >( variation ); + Server::EffectEntry effectEntry{}; + effectEntry.value = damage; + effectEntry.effectType = ActionEffectType::Damage; + effectEntry.hitSeverity = static_cast< ActionHitSeverityType >( variation ); - effectPacket->addEffect( effectEntry ); + effectPacket->addEffect( effectEntry ); - sendToInRangeSet( effectPacket ); + sendToInRangeSet( effectPacket ); - if( isPlayer() ) - getAsPlayer()->queuePacket( effectPacket ); + if( isPlayer() ) + getAsPlayer()->queuePacket( effectPacket ); - pTarget->takeDamage( damage ); - } + pTarget->takeDamage( damage ); + } } /*! @@ -427,27 +428,27 @@ ChaiScript Skill Handler. void Core::Entity::Chara::handleScriptSkill( uint32_t type, uint16_t actionId, uint64_t param1, uint64_t param2, Entity::Chara& target ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - if( isPlayer() ) - { - getAsPlayer()->sendDebug( std::to_string( target.getId() ) ); - getAsPlayer()->sendDebug( "Handle script skill type: " + std::to_string( type ) ); - } + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + if( isPlayer() ) + { + getAsPlayer()->sendDebug( std::to_string( target.getId() ) ); + getAsPlayer()->sendDebug( "Handle script skill type: " + std::to_string( type ) ); + } - auto actionInfoPtr = pExdData->get< Core::Data::Action >( actionId ); + auto actionInfoPtr = pExdData->get< Core::Data::Action >( actionId ); - // Todo: Effect packet generator. 90% of this is basically setting params and it's basically unreadable. - // Prepare packet. This is seemingly common for all packets in the action handler. + // Todo: Effect packet generator. 90% of this is basically setting params and it's basically unreadable. + // Prepare packet. This is seemingly common for all packets in the action handler. - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), target.getId(), actionId ); - effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); + auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), target.getId(), actionId ); + effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); - // Todo: for each actor, calculate how much damage the calculated value should deal to them - 2-step damage calc. we only have 1-step - switch( type ) - { + // Todo: for each actor, calculate how much damage the calculated value should deal to them - 2-step damage calc. we only have 1-step + switch( type ) + { - case ActionEffectType::Damage: - { + case ActionEffectType::Damage: + { Server::EffectEntry effectEntry{}; effectEntry.value = static_cast< uint16_t >( param1 ); effectEntry.effectType = ActionEffectType::Damage; @@ -457,55 +458,56 @@ void Core::Entity::Chara::handleScriptSkill( uint32_t type, uint16_t actionId, u if( actionInfoPtr->castType == 1 && actionInfoPtr->effectRange != 0 || actionInfoPtr->castType != 1 ) { - // If action on this specific target is valid... - if ( isPlayer() && !ActionCollision::isActorApplicable( target, TargetFilter::Enemies ) ) - break; + // If action on this specific target is valid... + if( isPlayer() && !ActionCollision::isActorApplicable( target, TargetFilter::Enemies ) ) + break; - sendToInRangeSet( effectPacket, true ); + sendToInRangeSet( effectPacket, true ); - if ( target.isAlive() ) - target.onActionHostile( *this ); + if( target.isAlive() ) + target.onActionHostile( *this ); - target.takeDamage( static_cast< uint32_t >( param1 ) ); + target.takeDamage( static_cast< uint32_t >( param1 ) ); } else { - auto actorsCollided = ActionCollision::getActorsHitFromAction( target.getPos(), getInRangeActors( true ), - actionInfoPtr, TargetFilter::Enemies ); + auto actorsCollided = ActionCollision::getActorsHitFromAction( target.getPos(), getInRangeActors( true ), + actionInfoPtr, TargetFilter::Enemies ); - for( const auto& pHitActor : actorsCollided ) - { - effectPacket->setTargetActor( pHitActor->getId() ); + for( const auto& pHitActor : actorsCollided ) + { + effectPacket->setTargetActor( pHitActor->getId() ); - // todo: send to range of what? ourselves? when mob script hits this is going to be lacking - sendToInRangeSet( effectPacket, true ); + // todo: send to range of what? ourselves? when mob script hits this is going to be lacking + sendToInRangeSet( effectPacket, true ); - if( pHitActor->getAsChara()->isAlive() ) - pHitActor->getAsChara()->onActionHostile( *this ); + if( pHitActor->getAsChara()->isAlive() ) + pHitActor->getAsChara()->onActionHostile( *this ); - pHitActor->getAsChara()->takeDamage( static_cast< uint32_t >( param1 ) ); + pHitActor->getAsChara()->takeDamage( static_cast< uint32_t >( param1 ) ); - // Debug - if ( isPlayer() ) - { - if ( pHitActor->isPlayer() ) - getAsPlayer()->sendDebug( "AoE hit actor " + std::to_string( pHitActor->getId() ) + - " (" + pHitActor->getAsChara()->getName() + ")" ); - else - getAsPlayer()->sendDebug( "AoE hit actor " + std::to_string( pHitActor->getId() ) ); - } - } + // Debug + if( isPlayer() ) + { + if( pHitActor->isPlayer() ) + getAsPlayer()->sendDebug( "AoE hit actor " + std::to_string( pHitActor->getId() ) + + " (" + pHitActor->getAsChara()->getName() + ")" ); + else + getAsPlayer()->sendDebug( "AoE hit actor " + std::to_string( pHitActor->getId() ) ); + } + } } break; - } + } - case ActionEffectType::Heal: - { - uint32_t calculatedHeal = Math::CalcBattle::calculateHealValue( getAsPlayer(), static_cast< uint32_t >( param1 ) ); + case ActionEffectType::Heal: + { + uint32_t calculatedHeal = Math::CalcBattle::calculateHealValue( getAsPlayer(), + static_cast< uint32_t >( param1 ) ); Server::EffectEntry effectEntry{}; effectEntry.value = calculatedHeal; @@ -516,253 +518,254 @@ void Core::Entity::Chara::handleScriptSkill( uint32_t type, uint16_t actionId, u if( actionInfoPtr->castType == 1 && actionInfoPtr->effectRange != 0 || actionInfoPtr->castType != 1 ) { - if( isPlayer() && !ActionCollision::isActorApplicable( target, TargetFilter::Allies ) ) - break; + if( isPlayer() && !ActionCollision::isActorApplicable( target, TargetFilter::Allies ) ) + break; - sendToInRangeSet( effectPacket, true ); - target.heal( calculatedHeal ); + sendToInRangeSet( effectPacket, true ); + target.heal( calculatedHeal ); } else { - // todo: get proper packets: the following was just kind of thrown together from what we know. - // atm buggy (packets look "delayed" from client) + // todo: get proper packets: the following was just kind of thrown together from what we know. + // atm buggy (packets look "delayed" from client) - auto actorsCollided = ActionCollision::getActorsHitFromAction( target.getPos(), getInRangeActors(true), - actionInfoPtr, TargetFilter::Allies ); + auto actorsCollided = ActionCollision::getActorsHitFromAction( target.getPos(), getInRangeActors( true ), + actionInfoPtr, TargetFilter::Allies ); - for( auto pHitActor : actorsCollided ) - { - effectPacket->setTargetActor( pHitActor->getId() ); + for( auto pHitActor : actorsCollided ) + { + effectPacket->setTargetActor( pHitActor->getId() ); - sendToInRangeSet( effectPacket, true ); - pHitActor->getAsChara()->heal( calculatedHeal ); + sendToInRangeSet( effectPacket, true ); + pHitActor->getAsChara()->heal( calculatedHeal ); - // Debug - if( isPlayer() ) - { - if( pHitActor->isPlayer() ) - getAsPlayer()->sendDebug( "AoE hit actor " + std::to_string( pHitActor->getId() ) + - " (" + pHitActor->getAsChara()->getName() + ")" ); - else - getAsPlayer()->sendDebug( "AoE hit actor " + std::to_string( pHitActor->getId() ) ); - } - } + // Debug + if( isPlayer() ) + { + if( pHitActor->isPlayer() ) + getAsPlayer()->sendDebug( "AoE hit actor " + std::to_string( pHitActor->getId() ) + + " (" + pHitActor->getAsChara()->getName() + ")" ); + else + getAsPlayer()->sendDebug( "AoE hit actor " + std::to_string( pHitActor->getId() ) ); + } + } } break; - } + } - default: + default: break; - } + } } /*! \param StatusEffectPtr to be applied to the actor */ void Core::Entity::Chara::addStatusEffect( StatusEffect::StatusEffectPtr pEffect ) { - int8_t nextSlot = getStatusEffectFreeSlot(); - // if there is no slot left, do not add the effect - if( nextSlot == -1 ) - return; + int8_t nextSlot = getStatusEffectFreeSlot(); + // if there is no slot left, do not add the effect + if( nextSlot == -1 ) + return; - pEffect->applyStatus(); - m_statusEffectMap[nextSlot] = pEffect; + pEffect->applyStatus(); + m_statusEffectMap[ nextSlot ] = pEffect; - auto statusEffectAdd = makeZonePacket< FFXIVIpcAddStatusEffect >( getId() ); - - statusEffectAdd->data().actor_id = pEffect->getTargetActorId(); - statusEffectAdd->data().actor_id1 = pEffect->getSrcActorId(); - statusEffectAdd->data().current_hp = getHp(); - statusEffectAdd->data().current_mp = getMp(); - statusEffectAdd->data().current_tp = getTp(); - statusEffectAdd->data().duration = static_cast< float >( pEffect->getDuration() ) / 1000; - statusEffectAdd->data().effect_id = pEffect->getId(); - statusEffectAdd->data().effect_index = nextSlot; - statusEffectAdd->data().max_hp = getMaxHp(); - statusEffectAdd->data().max_mp = getMaxMp(); - statusEffectAdd->data().max_something = 1; - //statusEffectAdd->data().unknown2 = 28; - statusEffectAdd->data().param = pEffect->getParam(); + auto statusEffectAdd = makeZonePacket< FFXIVIpcAddStatusEffect >( getId() ); - sendToInRangeSet( statusEffectAdd, isPlayer() ); + statusEffectAdd->data().actor_id = pEffect->getTargetActorId(); + statusEffectAdd->data().actor_id1 = pEffect->getSrcActorId(); + statusEffectAdd->data().current_hp = getHp(); + statusEffectAdd->data().current_mp = getMp(); + statusEffectAdd->data().current_tp = getTp(); + statusEffectAdd->data().duration = static_cast< float >( pEffect->getDuration() ) / 1000; + statusEffectAdd->data().effect_id = pEffect->getId(); + statusEffectAdd->data().effect_index = nextSlot; + statusEffectAdd->data().max_hp = getMaxHp(); + statusEffectAdd->data().max_mp = getMaxMp(); + statusEffectAdd->data().max_something = 1; + //statusEffectAdd->data().unknown2 = 28; + statusEffectAdd->data().param = pEffect->getParam(); + + sendToInRangeSet( statusEffectAdd, isPlayer() ); } /*! \param StatusEffectPtr to be applied to the actor */ void Core::Entity::Chara::addStatusEffectById( uint32_t id, int32_t duration, Entity::Chara& source, uint16_t param ) { - auto effect = StatusEffect::make_StatusEffect( id, source.getAsChara(), getAsChara(), duration, 3000 ); - effect->setParam( param ); - addStatusEffect( effect ); + auto effect = StatusEffect::make_StatusEffect( id, source.getAsChara(), getAsChara(), duration, 3000 ); + effect->setParam( param ); + addStatusEffect( effect ); } /*! \param StatusEffectPtr to be applied to the actor */ -void Core::Entity::Chara::addStatusEffectByIdIfNotExist( uint32_t id, int32_t duration, Entity::Chara& source, uint16_t param ) +void Core::Entity::Chara::addStatusEffectByIdIfNotExist( uint32_t id, int32_t duration, Entity::Chara& source, + uint16_t param ) { - if( hasStatusEffect( id ) ) - return; + if( hasStatusEffect( id ) ) + return; - auto effect = StatusEffect::make_StatusEffect( id, source.getAsChara(), getAsChara(), duration, 3000 ); - effect->setParam( param ); - addStatusEffect( effect ); + auto effect = StatusEffect::make_StatusEffect( id, source.getAsChara(), getAsChara(), duration, 3000 ); + effect->setParam( param ); + addStatusEffect( effect ); } int8_t Core::Entity::Chara::getStatusEffectFreeSlot() { - int8_t freeEffectSlot = -1; + int8_t freeEffectSlot = -1; - if( m_statusEffectFreeSlotQueue.empty() ) - return freeEffectSlot; + if( m_statusEffectFreeSlotQueue.empty() ) + return freeEffectSlot; - freeEffectSlot = m_statusEffectFreeSlotQueue.front(); - m_statusEffectFreeSlotQueue.pop(); + freeEffectSlot = m_statusEffectFreeSlotQueue.front(); + m_statusEffectFreeSlotQueue.pop(); - return freeEffectSlot; + return freeEffectSlot; } void Core::Entity::Chara::statusEffectFreeSlot( uint8_t slotId ) { - m_statusEffectFreeSlotQueue.push( slotId ); + m_statusEffectFreeSlotQueue.push( slotId ); } void Core::Entity::Chara::removeSingleStatusEffectById( uint32_t id ) { - for( auto effectIt : m_statusEffectMap ) - { - if( effectIt.second->getId() == id ) - { - removeStatusEffect( effectIt.first ); - break; - } - } + for( auto effectIt : m_statusEffectMap ) + { + if( effectIt.second->getId() == id ) + { + removeStatusEffect( effectIt.first ); + break; + } + } } void Core::Entity::Chara::removeStatusEffect( uint8_t effectSlotId ) { - auto pEffectIt = m_statusEffectMap.find( effectSlotId ); - if( pEffectIt == m_statusEffectMap.end() ) - return; + auto pEffectIt = m_statusEffectMap.find( effectSlotId ); + if( pEffectIt == m_statusEffectMap.end() ) + return; - statusEffectFreeSlot( effectSlotId ); + statusEffectFreeSlot( effectSlotId ); - auto pEffect = pEffectIt->second; - pEffect->removeStatus(); + auto pEffect = pEffectIt->second; + pEffect->removeStatus(); - sendToInRangeSet( makeActorControl142( getId(), StatusEffectLose, pEffect->getId() ), isPlayer() ); + sendToInRangeSet( makeActorControl142( getId(), StatusEffectLose, pEffect->getId() ), isPlayer() ); - m_statusEffectMap.erase( effectSlotId ); + m_statusEffectMap.erase( effectSlotId ); - sendStatusEffectUpdate(); + sendStatusEffectUpdate(); } std::map< uint8_t, Core::StatusEffect::StatusEffectPtr > Core::Entity::Chara::getStatusEffectMap() const { - return m_statusEffectMap; + return m_statusEffectMap; } void Core::Entity::Chara::sendStatusEffectUpdate() { - uint64_t currentTimeMs = Util::getTimeMs(); + uint64_t currentTimeMs = Util::getTimeMs(); - auto statusEffectList = makeZonePacket< FFXIVIpcStatusEffectList >( getId() ); - statusEffectList->data().classId = static_cast< uint8_t >( getClass() ); - statusEffectList->data().level = getLevel(); - statusEffectList->data().level1 = getLevel(); - statusEffectList->data().current_hp = getHp(); - statusEffectList->data().current_mp = getMp(); - statusEffectList->data().currentTp = getTp(); - statusEffectList->data().max_hp = getMaxHp(); - statusEffectList->data().max_mp = getMaxMp(); - uint8_t slot = 0; - for( auto effectIt : m_statusEffectMap ) - { - float timeLeft = static_cast< float >( effectIt.second->getDuration() - - ( currentTimeMs - effectIt.second->getStartTimeMs() ) ) / 1000; - statusEffectList->data().effect[slot].duration = timeLeft; - statusEffectList->data().effect[slot].effect_id = effectIt.second->getId(); - statusEffectList->data().effect[slot].sourceActorId = effectIt.second->getSrcActorId(); - slot++; - } + auto statusEffectList = makeZonePacket< FFXIVIpcStatusEffectList >( getId() ); + statusEffectList->data().classId = static_cast< uint8_t >( getClass() ); + statusEffectList->data().level = getLevel(); + statusEffectList->data().level1 = getLevel(); + statusEffectList->data().current_hp = getHp(); + statusEffectList->data().current_mp = getMp(); + statusEffectList->data().currentTp = getTp(); + statusEffectList->data().max_hp = getMaxHp(); + statusEffectList->data().max_mp = getMaxMp(); + uint8_t slot = 0; + for( auto effectIt : m_statusEffectMap ) + { + float timeLeft = static_cast< float >( effectIt.second->getDuration() - + ( currentTimeMs - effectIt.second->getStartTimeMs() ) ) / 1000; + statusEffectList->data().effect[ slot ].duration = timeLeft; + statusEffectList->data().effect[ slot ].effect_id = effectIt.second->getId(); + statusEffectList->data().effect[ slot ].sourceActorId = effectIt.second->getSrcActorId(); + slot++; + } - sendToInRangeSet( statusEffectList, isPlayer() ); + sendToInRangeSet( statusEffectList, isPlayer() ); } void Core::Entity::Chara::updateStatusEffects() { - uint64_t currentTimeMs = Util::getTimeMs(); + uint64_t currentTimeMs = Util::getTimeMs(); - uint32_t thisTickDmg = 0; - uint32_t thisTickHeal = 0; + uint32_t thisTickDmg = 0; + uint32_t thisTickHeal = 0; - for( auto effectIt : m_statusEffectMap ) - { - uint8_t effectIndex = effectIt.first; - auto effect = effectIt.second; + for( auto effectIt : m_statusEffectMap ) + { + uint8_t effectIndex = effectIt.first; + auto effect = effectIt.second; - uint64_t lastTick = effect->getLastTickMs(); - uint64_t startTime = effect->getStartTimeMs(); - uint32_t duration = effect->getDuration(); - uint32_t tickRate = effect->getTickRate(); + uint64_t lastTick = effect->getLastTickMs(); + uint64_t startTime = effect->getStartTimeMs(); + uint32_t duration = effect->getDuration(); + uint32_t tickRate = effect->getTickRate(); - if( ( currentTimeMs - startTime ) > duration ) + if( ( currentTimeMs - startTime ) > duration ) + { + // remove status effect + removeStatusEffect( effectIndex ); + // break because removing invalidates iterators + break; + } + + if( ( currentTimeMs - lastTick ) > tickRate ) + { + effect->setLastTick( currentTimeMs ); + effect->onTick(); + + auto thisEffect = effect->getTickEffect(); + + switch( thisEffect.first ) { - // remove status effect - removeStatusEffect( effectIndex ); - // break because removing invalidates iterators - break; + + case 1: + { + thisTickDmg += thisEffect.second; + break; + } + + case 2: + { + thisTickHeal += thisEffect.second; + break; + } + } + } - if( ( currentTimeMs - lastTick ) > tickRate ) - { - effect->setLastTick( currentTimeMs ); - effect->onTick(); + } - auto thisEffect = effect->getTickEffect(); + if( thisTickDmg != 0 ) + { + takeDamage( thisTickDmg ); + sendToInRangeSet( makeActorControl142( getId(), HPFloatingText, 0, + static_cast< uint8_t >( ActionEffectType::Damage ), thisTickDmg ) ); + } - switch( thisEffect.first ) - { - - case 1: - { - thisTickDmg += thisEffect.second; - break; - } - - case 2: - { - thisTickHeal += thisEffect.second; - break; - } - - } - } - - } - - if( thisTickDmg != 0 ) - { - takeDamage( thisTickDmg ); - sendToInRangeSet( makeActorControl142( getId(), HPFloatingText, 0, - static_cast< uint8_t >( ActionEffectType::Damage ), thisTickDmg ) ); - } - - if( thisTickHeal != 0 ) - { - heal( thisTickDmg ); - sendToInRangeSet( makeActorControl142( getId(), HPFloatingText, 0, - static_cast< uint8_t >( ActionEffectType::Heal ), thisTickHeal ) ); - } + if( thisTickHeal != 0 ) + { + heal( thisTickDmg ); + sendToInRangeSet( makeActorControl142( getId(), HPFloatingText, 0, + static_cast< uint8_t >( ActionEffectType::Heal ), thisTickHeal ) ); + } } bool Core::Entity::Chara::hasStatusEffect( uint32_t id ) { - if( m_statusEffectMap.find( id ) != m_statusEffectMap.end() ) - return true; - return false; + if( m_statusEffectMap.find( id ) != m_statusEffectMap.end() ) + return true; + return false; } Core::Common::ObjKind Chara::getObjKind() const { - return m_modelType; + return m_modelType; } diff --git a/src/servers/sapphire_zone/Actor/Chara.h b/src/servers/sapphire_zone/Actor/Chara.h index e792199b..52335d63 100644 --- a/src/servers/sapphire_zone/Actor/Chara.h +++ b/src/servers/sapphire_zone/Actor/Chara.h @@ -1,5 +1,5 @@ -#ifndef _ACTOR_H_ -#define _ACTOR_H_ +#ifndef _CHARA_H_ +#define _CHARA_H_ #include #include @@ -18,198 +18,236 @@ namespace Entity { \brief Base class for all animate actors */ -class Chara : public Actor +class Chara : + public Actor { public: - struct ActorStats - { - uint32_t max_mp = 0; - uint32_t max_hp = 0; + struct ActorStats + { + uint32_t max_mp = 0; + uint32_t max_hp = 0; - uint32_t str = 0; - uint32_t dex = 0; - uint32_t vit = 0; - uint32_t inte = 0; - uint32_t mnd = 0; - uint32_t pie = 0; + uint32_t str = 0; + uint32_t dex = 0; + uint32_t vit = 0; + uint32_t inte = 0; + uint32_t mnd = 0; + uint32_t pie = 0; - uint32_t tenacity = 0; - uint32_t attack = 0; - uint32_t defense = 0; - uint32_t accuracy = 0; - uint32_t spellSpeed = 0; - uint32_t magicDefense = 0; - uint32_t critHitRate = 0; - uint32_t resistSlash = 0; - uint32_t resistPierce = 0; - uint32_t resistBlunt = 0; - uint32_t attackPotMagic = 0; - uint32_t healingPotMagic = 0; - uint32_t determination = 0; - uint32_t skillSpeed = 0; + uint32_t tenacity = 0; + uint32_t attack = 0; + uint32_t defense = 0; + uint32_t accuracy = 0; + uint32_t spellSpeed = 0; + uint32_t magicDefense = 0; + uint32_t critHitRate = 0; + uint32_t resistSlash = 0; + uint32_t resistPierce = 0; + uint32_t resistBlunt = 0; + uint32_t attackPotMagic = 0; + uint32_t healingPotMagic = 0; + uint32_t determination = 0; + uint32_t skillSpeed = 0; - uint32_t resistSlow = 0; - uint32_t resistSilence = 0; - uint32_t resistBlind = 0; - uint32_t resistPoison = 0; - uint32_t resistStun = 0; - uint32_t resistSleep = 0; - uint32_t resistBind = 0; - uint32_t resistHeavy = 0; + uint32_t resistSlow = 0; + uint32_t resistSilence = 0; + uint32_t resistBlind = 0; + uint32_t resistPoison = 0; + uint32_t resistStun = 0; + uint32_t resistSleep = 0; + uint32_t resistBind = 0; + uint32_t resistHeavy = 0; - uint32_t resistFire = 0; - uint32_t resistIce = 0; - uint32_t resistWind = 0; - uint32_t resistEarth = 0; - uint32_t resistLightning = 0; - uint32_t resistWater = 0; + uint32_t resistFire = 0; + uint32_t resistIce = 0; + uint32_t resistWind = 0; + uint32_t resistEarth = 0; + uint32_t resistLightning = 0; + uint32_t resistWater = 0; - } m_baseStats; + } m_baseStats; protected: - char m_name[34]; - /*! Last tick time for the actor ( in ms ) */ - uint64_t m_lastTickTime; - /*! Last time the actor performed an autoAttack ( in ms ) */ - uint64_t m_lastAttack; - /*! Last time the actor was updated ( in ms ) */ - uint64_t m_lastUpdate; - /*! Current stance of the actor */ - Common::Stance m_currentStance; - /*! Current staus of the actor */ - Common::ActorStatus m_status; - /*! Max HP of the actor ( based on job / class ) */ - uint32_t m_maxHp; - /*! Max MP of the actor ( based on job / class ) */ - uint32_t m_maxMp; - /*! Current HP of the actor */ - uint32_t m_hp; - /*! Current MP of the actor */ - uint32_t m_mp; - /*! Current TP of the actor */ - uint16_t m_tp; - /*! Current GP of the actor */ - uint16_t m_gp; - /*! Additional look info of the actor */ - uint8_t m_customize[26]; - /*! Current class of the actor */ - Common::ClassJob m_class; - /*! Id of the currently selected target actor */ - uint64_t m_targetId; - /*! Ptr to a queued action */ - Action::ActionPtr m_pCurrentAction; - /*! Invincibility type */ - Common::InvincibilityType m_invincibilityType; - /*! Type of model to use, humanoid for actors that use look data */ - Common::ObjKind m_modelType; + char m_name[34]; + /*! Last tick time for the actor ( in ms ) */ + uint64_t m_lastTickTime; + /*! Last time the actor performed an autoAttack ( in ms ) */ + uint64_t m_lastAttack; + /*! Last time the actor was updated ( in ms ) */ + uint64_t m_lastUpdate; + /*! Current stance of the actor */ + Common::Stance m_currentStance; + /*! Current staus of the actor */ + Common::ActorStatus m_status; + /*! Max HP of the actor ( based on job / class ) */ + uint32_t m_maxHp; + /*! Max MP of the actor ( based on job / class ) */ + uint32_t m_maxMp; + /*! Current HP of the actor */ + uint32_t m_hp; + /*! Current MP of the actor */ + uint32_t m_mp; + /*! Current TP of the actor */ + uint16_t m_tp; + /*! Current GP of the actor */ + uint16_t m_gp; + /*! Additional look info of the actor */ + uint8_t m_customize[26]; + /*! Current class of the actor */ + Common::ClassJob m_class; + /*! Id of the currently selected target actor */ + uint64_t m_targetId; + /*! Ptr to a queued action */ + Action::ActionPtr m_pCurrentAction; + /*! Invincibility type */ + Common::InvincibilityType m_invincibilityType; + /*! Type of model to use, humanoid for actors that use look data */ + Common::ObjKind m_modelType; - /*! Status effects */ - const uint8_t MAX_STATUS_EFFECTS = 30; - std::queue< uint8_t > m_statusEffectFreeSlotQueue; - std::vector< std::pair< uint8_t, uint32_t> > m_statusEffectList; - std::map< uint8_t, StatusEffect::StatusEffectPtr > m_statusEffectMap; + /*! Status effects */ + const uint8_t MAX_STATUS_EFFECTS = 30; + std::queue< uint8_t > m_statusEffectFreeSlotQueue; + std::vector< std::pair< uint8_t, uint32_t > > m_statusEffectList; + std::map< uint8_t, StatusEffect::StatusEffectPtr > m_statusEffectMap; public: - Chara( Common::ObjKind type ); + Chara( Common::ObjKind type ); - virtual ~Chara() override; + virtual ~Chara() override; - virtual void calculateStats() {}; + virtual void calculateStats() + { + }; - /// Status effect functions - void addStatusEffect( StatusEffect::StatusEffectPtr pEffect ); - void removeStatusEffect( uint8_t effectSlotId ); - void removeSingleStatusEffectById( uint32_t id ); - void updateStatusEffects(); + /// Status effect functions + void addStatusEffect( StatusEffect::StatusEffectPtr pEffect ); - bool hasStatusEffect( uint32_t id ); + void removeStatusEffect( uint8_t effectSlotId ); - int8_t getStatusEffectFreeSlot(); - void statusEffectFreeSlot( uint8_t slotId ); + void removeSingleStatusEffectById( uint32_t id ); - std::map< uint8_t, Core::StatusEffect::StatusEffectPtr > getStatusEffectMap() const; + void updateStatusEffects(); - void sendStatusEffectUpdate(); - // add a status effect by id - void addStatusEffectById( uint32_t id, int32_t duration, Entity::Chara& source, uint16_t param = 0 ); + bool hasStatusEffect( uint32_t id ); - // add a status effect by id if it doesn't exist - void addStatusEffectByIdIfNotExist( uint32_t id, int32_t duration, Entity::Chara& source, uint16_t param = 0 ); + int8_t getStatusEffectFreeSlot(); - // remove a status effect by id - void removeSingleStatusEffectFromId( uint32_t id ); - /// End Status Effect Functions + void statusEffectFreeSlot( uint8_t slotId ); - std::string getName() const; + std::map< uint8_t, Core::StatusEffect::StatusEffectPtr > getStatusEffectMap() const; - bool face( const Common::FFXIVARR_POSITION3& p ); + void sendStatusEffectUpdate(); - Common::Stance getStance() const; + // add a status effect by id + void addStatusEffectById( uint32_t id, int32_t duration, Entity::Chara& source, uint16_t param = 0 ); - void setStance( Common::Stance stance ); + // add a status effect by id if it doesn't exist + void addStatusEffectByIdIfNotExist( uint32_t id, int32_t duration, Entity::Chara& source, uint16_t param = 0 ); - ActorStats getStats() const; + // remove a status effect by id + void removeSingleStatusEffectFromId( uint32_t id ); + /// End Status Effect Functions - uint32_t getHp() const; - uint32_t getMp() const; - uint16_t getTp() const; - uint16_t getGp() const; + std::string getName() const; - Common::InvincibilityType getInvincibilityType() const; + bool face( const Common::FFXIVARR_POSITION3& p ); - Common::ClassJob getClass() const; + Common::Stance getStance() const; - Common::ObjKind getObjKind() const; + void setStance( Common::Stance stance ); - uint8_t getClassAsInt() const; + ActorStats getStats() const; - void setClass( Common::ClassJob classJob ); + uint32_t getHp() const; - void setTargetId( uint64_t targetId ); + uint32_t getMp() const; - uint64_t getTargetId() const; + uint16_t getTp() const; - bool isAlive() const; + uint16_t getGp() const; - virtual uint32_t getMaxHp() const; - virtual uint32_t getMaxMp() const; + Common::InvincibilityType getInvincibilityType() const; - void resetHp(); - void resetMp(); + Common::ClassJob getClass() const; - void setHp( uint32_t hp ); - void setMp( uint32_t mp ); - void setGp( uint32_t gp ); + Common::ObjKind getObjKind() const; - void setInvincibilityType( Common::InvincibilityType type ); + uint8_t getClassAsInt() const; - void die(); + void setClass( Common::ClassJob classJob ); - Common::ActorStatus getStatus() const; + void setTargetId( uint64_t targetId ); - void setStatus( Common::ActorStatus status ); + uint64_t getTargetId() const; - void handleScriptSkill( uint32_t type, uint16_t actionId, uint64_t param1, uint64_t param2, Entity::Chara& target ); + bool isAlive() const; - virtual void autoAttack( CharaPtr pTarget ); + virtual uint32_t getMaxHp() const; - virtual void onDeath() {}; - virtual void onDamageTaken( Chara& pSource ) {}; - virtual void onActionHostile( Chara& source ) {}; - virtual void onActionFriendly( Chara& pSource ) {}; - virtual void onTick() {}; + virtual uint32_t getMaxMp() const; - virtual void changeTarget( uint64_t targetId ); - virtual uint8_t getLevel() const; - virtual void sendStatusUpdate( bool toSelf = true ); - virtual void takeDamage( uint32_t damage ); - virtual void heal( uint32_t amount ); - virtual bool checkAction(); - virtual void update( int64_t currTime ) {}; + void resetHp(); - Action::ActionPtr getCurrentAction() const; + void resetMp(); - void setCurrentAction( Action::ActionPtr pAction ); + void setHp( uint32_t hp ); + + void setMp( uint32_t mp ); + + void setGp( uint32_t gp ); + + void setInvincibilityType( Common::InvincibilityType type ); + + void die(); + + Common::ActorStatus getStatus() const; + + void setStatus( Common::ActorStatus status ); + + void + handleScriptSkill( uint32_t type, uint16_t actionId, uint64_t param1, uint64_t param2, Entity::Chara& target ); + + virtual void autoAttack( CharaPtr pTarget ); + + virtual void onDeath() + { + }; + + virtual void onDamageTaken( Chara& pSource ) + { + }; + + virtual void onActionHostile( Chara& source ) + { + }; + + virtual void onActionFriendly( Chara& pSource ) + { + }; + + virtual void onTick() + { + }; + + virtual void changeTarget( uint64_t targetId ); + + virtual uint8_t getLevel() const; + + virtual void sendStatusUpdate( bool toSelf = true ); + + virtual void takeDamage( uint32_t damage ); + + virtual void heal( uint32_t amount ); + + virtual bool checkAction(); + + virtual void update( int64_t currTime ) + { + }; + + Action::ActionPtr getCurrentAction() const; + + void setCurrentAction( Action::ActionPtr pAction ); }; diff --git a/src/servers/sapphire_zone/Actor/EventObject.cpp b/src/servers/sapphire_zone/Actor/EventObject.cpp index f7c32bc2..5e191703 100644 --- a/src/servers/sapphire_zone/Actor/EventObject.cpp +++ b/src/servers/sapphire_zone/Actor/EventObject.cpp @@ -19,124 +19,126 @@ using namespace Core::Network::Packets::Server; using namespace Core::Network::ActorControl; #include "Framework.h" + extern Core::Framework g_fw; Core::Entity::EventObject::EventObject( uint32_t actorId, uint32_t objectId, uint32_t gimmickId, uint8_t initialState, Common::FFXIVARR_POSITION3 pos, float rotation, const std::string& givenName ) : - Core::Entity::Actor( ObjKind::EventObj ), - m_gimmickId( gimmickId ), - m_state( initialState ), - m_objectId( objectId ), - m_name( givenName ) + Core::Entity::Actor( ObjKind::EventObj ), + m_gimmickId( gimmickId ), + m_state( initialState ), + m_objectId( objectId ), + m_name( givenName ) { - m_id = actorId; - m_pos.x = pos.x; - m_pos.y = pos.y; - m_pos.z = pos.z; - m_rot = rotation; + m_id = actorId; + m_pos.x = pos.x; + m_pos.y = pos.y; + m_pos.z = pos.z; + m_rot = rotation; } uint32_t Core::Entity::EventObject::getGimmickId() const { - return m_gimmickId; + return m_gimmickId; } uint32_t Core::Entity::EventObject::getObjectId() const { - return m_objectId; + return m_objectId; } float Core::Entity::EventObject::getScale() const { - return m_scale; + return m_scale; } void Core::Entity::EventObject::setScale( float scale ) { - m_scale = scale; + m_scale = scale; } Core::Entity::EventObject::OnTalkEventHandler Core::Entity::EventObject::getOnTalkHandler() const { - return m_onTalkEventHandler; + return m_onTalkEventHandler; } void Core::Entity::EventObject::setOnTalkHandler( Core::Entity::EventObject::OnTalkEventHandler handler ) { - m_onTalkEventHandler = handler; + m_onTalkEventHandler = handler; } void Core::Entity::EventObject::setGimmickId( uint32_t gimmickId ) { - m_gimmickId = gimmickId; + m_gimmickId = gimmickId; } uint8_t Core::Entity::EventObject::getState() const { - return m_state; + return m_state; } void Core::Entity::EventObject::setState( uint8_t state ) { - m_state = state; + m_state = state; - for( const auto& player : m_inRangePlayers ) - { - player->queuePacket( makeActorControl142( getId(), DirectorEObjMod, state ) ); - } + for( const auto& player : m_inRangePlayers ) + { + player->queuePacket( makeActorControl142( getId(), DirectorEObjMod, state ) ); + } } -void Core::Entity::EventObject::setAnimationFlag( uint32_t flag, uint32_t animationFlag ) { - for( const auto& player : m_inRangePlayers ) - { - player->queuePacket( makeActorControl142( getId(), EObjAnimation, flag, animationFlag ) ); - } +void Core::Entity::EventObject::setAnimationFlag( uint32_t flag, uint32_t animationFlag ) +{ + for( const auto& player : m_inRangePlayers ) + { + player->queuePacket( makeActorControl142( getId(), EObjAnimation, flag, animationFlag ) ); + } } void Core::Entity::EventObject::setParentInstance( Core::InstanceContentPtr instance ) { - m_parentInstance = instance; + m_parentInstance = instance; } Core::InstanceContentPtr Core::Entity::EventObject::getParentInstance() const { - return m_parentInstance; + return m_parentInstance; } void Core::Entity::EventObject::spawn( Core::Entity::PlayerPtr pTarget ) { - auto spawnIndex = pTarget->getNextObjSpawnIndexForActorId( getId( ) ); - if( !pTarget->isObjSpawnIndexValid( spawnIndex ) ) - return; + auto spawnIndex = pTarget->getNextObjSpawnIndexForActorId( getId() ); + if( !pTarget->isObjSpawnIndexValid( spawnIndex ) ) + return; - auto pLog = g_fw.get< Logger >(); + auto pLog = g_fw.get< Logger >(); - pLog->debug( "Spawning EObj: id:" + std::to_string( getId() ) + " name:" + getName() ); + pLog->debug( "Spawning EObj: id:" + std::to_string( getId() ) + " name:" + getName() ); - auto eobjStatePacket = makeZonePacket< FFXIVIpcObjectSpawn >( getId(), pTarget->getId() ); - eobjStatePacket->data().spawnIndex = spawnIndex; - eobjStatePacket->data().objKind = getObjKind(); - eobjStatePacket->data().state = getState(); - eobjStatePacket->data().objId = getObjectId(); - eobjStatePacket->data().gimmickId = getGimmickId(); - eobjStatePacket->data().position = getPos(); - eobjStatePacket->data().scale = getScale(); - eobjStatePacket->data().actorId = getId(); - eobjStatePacket->data().rotation = Math::Util::floatToUInt16Rot( getRot() ); - pTarget->queuePacket( eobjStatePacket ); + auto eobjStatePacket = makeZonePacket< FFXIVIpcObjectSpawn >( getId(), pTarget->getId() ); + eobjStatePacket->data().spawnIndex = spawnIndex; + eobjStatePacket->data().objKind = getObjKind(); + eobjStatePacket->data().state = getState(); + eobjStatePacket->data().objId = getObjectId(); + eobjStatePacket->data().gimmickId = getGimmickId(); + eobjStatePacket->data().position = getPos(); + eobjStatePacket->data().scale = getScale(); + eobjStatePacket->data().actorId = getId(); + eobjStatePacket->data().rotation = Math::Util::floatToUInt16Rot( getRot() ); + pTarget->queuePacket( eobjStatePacket ); } void Core::Entity::EventObject::despawn( Core::Entity::PlayerPtr pTarget ) { - auto pLog = g_fw.get< Logger >(); - pLog->debug( "despawn eobj: " + std::to_string( getId() ) ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( "despawn eobj: " + std::to_string( getId() ) ); - pTarget->freeObjSpawnIndexForActorId( getId( ) ); + pTarget->freeObjSpawnIndexForActorId( getId() ); } const std::string& Core::Entity::EventObject::getName() const { - return m_name; + return m_name; } diff --git a/src/servers/sapphire_zone/Actor/EventObject.h b/src/servers/sapphire_zone/Actor/EventObject.h index 30e757db..a39706cb 100644 --- a/src/servers/sapphire_zone/Actor/EventObject.h +++ b/src/servers/sapphire_zone/Actor/EventObject.h @@ -3,54 +3,59 @@ #include "Actor.h" -namespace Core +namespace Core { +namespace Entity { +class EventObject : + public Actor { -namespace Entity -{ - class EventObject : public Actor - { - public: - EventObject( uint32_t actorId, uint32_t objectId, uint32_t gimmickId, uint8_t initialState, - Common::FFXIVARR_POSITION3 pos, float rotation, const std::string& givenName = "none" ); +public: + EventObject( uint32_t actorId, uint32_t objectId, uint32_t gimmickId, uint8_t initialState, + Common::FFXIVARR_POSITION3 pos, float rotation, const std::string& givenName = "none" ); - using OnTalkEventHandler = std::function< void( Entity::Player&, Entity::EventObjectPtr, - InstanceContentPtr, uint64_t ) >; + using OnTalkEventHandler = std::function< void( Entity::Player&, Entity::EventObjectPtr, + InstanceContentPtr, uint64_t ) >; - uint32_t getGimmickId() const; - void setGimmickId( uint32_t gimmickId ); + uint32_t getGimmickId() const; - uint8_t getState() const; - void setState( uint8_t state ); + void setGimmickId( uint32_t gimmickId ); - float getScale() const; - void setScale( float scale ); + uint8_t getState() const; - void setOnTalkHandler( OnTalkEventHandler handler ); - OnTalkEventHandler getOnTalkHandler() const; + void setState( uint8_t state ); - uint32_t getObjectId() const; + float getScale() const; - const std::string& getName() const; + void setScale( float scale ); - InstanceContentPtr getParentInstance() const; - void setParentInstance( InstanceContentPtr instance ); + void setOnTalkHandler( OnTalkEventHandler handler ); - void spawn( PlayerPtr pTarget ) override; - void despawn( PlayerPtr pTarget ) override; + OnTalkEventHandler getOnTalkHandler() const; - void setAnimationFlag( uint32_t flag, uint32_t animationFlag ); + uint32_t getObjectId() const; - protected: - uint32_t m_gimmickId; - uint32_t m_objectId; - uint8_t m_state; - float m_scale; - std::string m_name; - InstanceContentPtr m_parentInstance; - OnTalkEventHandler m_onTalkEventHandler; + const std::string& getName() const; + + InstanceContentPtr getParentInstance() const; + + void setParentInstance( InstanceContentPtr instance ); + + void spawn( PlayerPtr pTarget ) override; + + void despawn( PlayerPtr pTarget ) override; + + void setAnimationFlag( uint32_t flag, uint32_t animationFlag ); + +protected: + uint32_t m_gimmickId; + uint32_t m_objectId; + uint8_t m_state; + float m_scale; + std::string m_name; + InstanceContentPtr m_parentInstance; + OnTalkEventHandler m_onTalkEventHandler; - }; +}; } } diff --git a/src/servers/sapphire_zone/Actor/Npc.cpp b/src/servers/sapphire_zone/Actor/Npc.cpp new file mode 100644 index 00000000..0dfa8e36 --- /dev/null +++ b/src/servers/sapphire_zone/Actor/Npc.cpp @@ -0,0 +1,47 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "Forwards.h" +#include "Action/Action.h" + +#include "Zone/Zone.h" + +#include "Network/GameConnection.h" +#include "Network/PacketWrappers/ActorControlPacket142.h" +#include "Network/PacketWrappers/ActorControlPacket143.h" +#include "Network/PacketWrappers/ActorControlPacket144.h" +#include "Network/PacketWrappers/UpdateHpMpTpPacket.h" + +#include "StatusEffect/StatusEffect.h" +#include "Action/ActionCollision.h" +#include "ServerZone.h" +#include "Session.h" +#include "Math/CalcBattle.h" +#include "Chara.h" +#include "Player.h" +#include "Zone/TerritoryMgr.h" +#include "Framework.h" +#include "Common.h" + +extern Core::Framework g_fw; + +using namespace Core::Common; +using namespace Core::Network::Packets; +using namespace Core::Network::Packets::Server; +using namespace Core::Network::ActorControl; + +Core::Entity::Npc::Npc( ObjKind type ) : + Chara( type ), + m_targetId( INVALID_GAME_OBJECT_ID ) +{ + +} + +Core::Entity::Npc::~Npc() +{ +} diff --git a/src/servers/sapphire_zone/Actor/Npc.h b/src/servers/sapphire_zone/Actor/Npc.h new file mode 100644 index 00000000..44f251d6 --- /dev/null +++ b/src/servers/sapphire_zone/Actor/Npc.h @@ -0,0 +1,34 @@ +#ifndef _NPC_H_ +#define _NPC_H_ + +#include +#include + +#include "Forwards.h" +#include "Chara.h" +#include +#include +#include + +namespace Core { +namespace Entity { + +/*! +\class Npc +\brief Base class for all Npcs + +*/ +class Npc : + public Chara +{ + +public: + Npc( ObjKind type ); + + virtual ~Npc() override; + +}; + +} +} +#endif diff --git a/src/servers/sapphire_zone/Actor/Player.cpp b/src/servers/sapphire_zone/Actor/Player.cpp index e1438a7e..502e69c8 100644 --- a/src/servers/sapphire_zone/Actor/Player.cpp +++ b/src/servers/sapphire_zone/Actor/Player.cpp @@ -54,46 +54,46 @@ using InvSlotPairVec = std::vector< InvSlotPair >; // player constructor Core::Entity::Player::Player() : - Chara( ObjKind::Player ), - m_lastWrite( 0 ), - m_lastPing( 0 ), - m_bIsLogin( false ), - m_contentId( 0 ), - m_modelMainWeapon( 0 ), - m_modelSubWeapon( 0 ), - m_homePoint( 0 ), - m_startTown( 0 ), - m_townWarpFstFlags( 0 ), - m_playTime( 0 ), - m_bInCombat( false ), - m_bLoadingComplete( false ), - m_bMarkedForZoning( false ), - m_zoningType( Common::ZoneingType::None ), - m_bAutoattack( false ), - m_markedForRemoval( false ), - m_mount( 0 ), - m_emoteMode( 0 ), - m_pose( 0 ), - m_directorInitialized( false ), - m_onEnterEventDone( false ) + Chara( ObjKind::Player ), + m_lastWrite( 0 ), + m_lastPing( 0 ), + m_bIsLogin( false ), + m_contentId( 0 ), + m_modelMainWeapon( 0 ), + m_modelSubWeapon( 0 ), + m_homePoint( 0 ), + m_startTown( 0 ), + m_townWarpFstFlags( 0 ), + m_playTime( 0 ), + m_bInCombat( false ), + m_bLoadingComplete( false ), + m_bMarkedForZoning( false ), + m_zoningType( Common::ZoneingType::None ), + m_bAutoattack( false ), + m_markedForRemoval( false ), + m_mount( 0 ), + m_emoteMode( 0 ), + m_pose( 0 ), + m_directorInitialized( false ), + m_onEnterEventDone( false ) { - m_id = 0; - m_currentStance = Stance::Passive; - m_onlineStatus = 0; - m_queuedZoneing = nullptr; - m_status = ActorStatus::Idle; - m_invincibilityType = InvincibilityType::InvincibilityNone; - m_modelType = ObjKind::Player; + m_id = 0; + m_currentStance = Stance::Passive; + m_onlineStatus = 0; + m_queuedZoneing = nullptr; + m_status = ActorStatus::Idle; + m_invincibilityType = InvincibilityType::InvincibilityNone; + m_modelType = ObjKind::Player; - memset( m_questTracking, 0, sizeof( m_questTracking ) ); - memset( m_name, 0, sizeof( m_name ) ); - memset( m_stateFlags, 0, sizeof( m_stateFlags ) ); - memset( m_searchMessage, 0, sizeof( m_searchMessage ) ); - memset( m_classArray, 0, sizeof( m_classArray ) ); - memset( m_expArray, 0, sizeof( m_expArray ) ); + memset( m_questTracking, 0, sizeof( m_questTracking ) ); + memset( m_name, 0, sizeof( m_name ) ); + memset( m_stateFlags, 0, sizeof( m_stateFlags ) ); + memset( m_searchMessage, 0, sizeof( m_searchMessage ) ); + memset( m_classArray, 0, sizeof( m_classArray ) ); + memset( m_expArray, 0, sizeof( m_expArray ) ); - m_objSpawnIndexAllocator.init( MAX_DISPLAYED_EOBJS ); - m_actorSpawnIndexAllocator.init( MAX_DISPLAYED_ACTORS, true ); + m_objSpawnIndexAllocator.init( MAX_DISPLAYED_EOBJS ); + m_actorSpawnIndexAllocator.init( MAX_DISPLAYED_ACTORS, true ); } Core::Entity::Player::~Player() @@ -102,1361 +102,1371 @@ Core::Entity::Player::~Player() void Core::Entity::Player::injectPacket( std::string path ) { - auto pServerZone = g_fw.get< ServerZone >(); - auto session = pServerZone->getSession( getId() ); - if( session ) - session->getZoneConnection()->injectPacket( path, *this ); + auto pServerZone = g_fw.get< ServerZone >(); + auto session = pServerZone->getSession( getId() ); + if( session ) + session->getZoneConnection()->injectPacket( path, *this ); } // TODO: add a proper calculation based on race / job / level / gear uint32_t Core::Entity::Player::getMaxHp() { - return m_baseStats.max_hp; + return m_baseStats.max_hp; } uint32_t Core::Entity::Player::getMaxMp() { - return m_baseStats.max_mp; + return m_baseStats.max_mp; } uint16_t Core::Entity::Player::getZoneId() const { - return m_zoneId; + return m_zoneId; } uint8_t Core::Entity::Player::getGmRank() const { - return m_gmRank; + return m_gmRank; } void Core::Entity::Player::setGmRank( uint8_t rank ) { - m_gmRank = rank; + m_gmRank = rank; } bool Core::Entity::Player::getGmInvis() const { - return m_gmInvis; + return m_gmInvis; } void Core::Entity::Player::setGmInvis( bool invis ) { - m_gmInvis = invis; + m_gmInvis = invis; } bool Core::Entity::Player::isActingAsGm() const { - auto status = getOnlineStatus(); - return status == OnlineStatus::GameMaster || status == OnlineStatus::GameMaster1 || status == OnlineStatus::GameMaster2; + auto status = getOnlineStatus(); + return status == OnlineStatus::GameMaster || status == OnlineStatus::GameMaster1 || + status == OnlineStatus::GameMaster2; } uint8_t Core::Entity::Player::getMode() const { - return m_mode; + return m_mode; } void Core::Entity::Player::setMode( uint8_t mode ) { - m_mode = mode; + m_mode = mode; } uint8_t Core::Entity::Player::getStartTown() const { - return m_startTown; + return m_startTown; } void Core::Entity::Player::setMarkedForRemoval() { - m_markedForRemoval = true; + m_markedForRemoval = true; } bool Core::Entity::Player::isMarkedForRemoval() const { - return m_markedForRemoval; + return m_markedForRemoval; } Core::Common::OnlineStatus Core::Entity::Player::getOnlineStatus() const { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - if( !pExdData ) - return OnlineStatus::Online; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + if( !pExdData ) + return OnlineStatus::Online; - uint32_t statusDisplayOrder = 0xFF14; - uint32_t applicableStatus = static_cast< uint32_t >( OnlineStatus::Online ); + uint32_t statusDisplayOrder = 0xFF14; + uint32_t applicableStatus = static_cast< uint32_t >( OnlineStatus::Online ); - for( uint32_t i = 0; i < std::numeric_limits< decltype( m_onlineStatus ) >::digits; i++ ) - { - bool bit = ( m_onlineStatus >> i ) & 1; + for( uint32_t i = 0; i < std::numeric_limits< decltype( m_onlineStatus ) >::digits; i++ ) + { + bool bit = ( m_onlineStatus >> i ) & 1; - if( !bit ) - continue; + if( !bit ) + continue; - auto pOnlineStatus = pExdData->get< Data::OnlineStatus >( i ); - if( !pOnlineStatus ) - continue; + auto pOnlineStatus = pExdData->get< Data::OnlineStatus >( i ); + if( !pOnlineStatus ) + continue; - if( pOnlineStatus->priority < statusDisplayOrder ) - { - // todo: also check that the status can actually be set here, otherwise we need to ignore it (and ban the player obv) - statusDisplayOrder = pOnlineStatus->priority; - applicableStatus = i; - } - } + if( pOnlineStatus->priority < statusDisplayOrder ) + { + // todo: also check that the status can actually be set here, otherwise we need to ignore it (and ban the player obv) + statusDisplayOrder = pOnlineStatus->priority; + applicableStatus = i; + } + } - return static_cast< OnlineStatus >( applicableStatus ); + return static_cast< OnlineStatus >( applicableStatus ); } void Core::Entity::Player::setOnlineStatusMask( uint64_t status ) { - m_onlineStatus = status; + m_onlineStatus = status; } uint64_t Core::Entity::Player::getOnlineStatusMask() const { - return m_onlineStatus; + return m_onlineStatus; } void Core::Entity::Player::prepareZoning( uint16_t targetZone, bool fadeOut, uint8_t fadeOutTime, uint16_t animation ) { - auto preparePacket = makeZonePacket< FFXIVIpcPrepareZoning >( getId() ); - preparePacket->data().targetZone = targetZone; - preparePacket->data().fadeOutTime = fadeOutTime; - preparePacket->data().animation = animation; - preparePacket->data().fadeOut = static_cast< uint8_t >( fadeOut ? 1 : 0 ); - queuePacket( preparePacket ); + auto preparePacket = makeZonePacket< FFXIVIpcPrepareZoning >( getId() ); + preparePacket->data().targetZone = targetZone; + preparePacket->data().fadeOutTime = fadeOutTime; + preparePacket->data().animation = animation; + preparePacket->data().fadeOut = static_cast< uint8_t >( fadeOut ? 1 : 0 ); + queuePacket( preparePacket ); } void Core::Entity::Player::calculateStats() { - uint8_t tribe = getLookAt( Common::CharaLook::Tribe ); - uint8_t level = getLevel(); - uint8_t job = static_cast< uint8_t >( getClass() ); + uint8_t tribe = getLookAt( Common::CharaLook::Tribe ); + uint8_t level = getLevel(); + uint8_t job = static_cast< uint8_t >( getClass() ); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto classInfo = pExdData->get< Core::Data::ClassJob >( job ); - auto tribeInfo = pExdData->get< Core::Data::Tribe >( tribe ); - auto paramGrowthInfo = pExdData->get< Core::Data::ParamGrow >( level ); + auto classInfo = pExdData->get< Core::Data::ClassJob >( job ); + auto tribeInfo = pExdData->get< Core::Data::Tribe >( tribe ); + auto paramGrowthInfo = pExdData->get< Core::Data::ParamGrow >( level ); - // TODO: put formula somewhere else... - float base = Math::CalcStats::calculateBaseStat( getAsPlayer() ); + // TODO: put formula somewhere else... + float base = Math::CalcStats::calculateBaseStat( getAsPlayer() ); - m_baseStats.str = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierStrength ) / 100 ) + tribeInfo->sTR ); - m_baseStats.dex = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierDexterity ) / 100 ) + tribeInfo->dEX ); - m_baseStats.vit = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierVitality ) / 100 ) + tribeInfo->vIT ); - m_baseStats.inte = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierIntelligence ) / 100 ) + tribeInfo->iNT ); - m_baseStats.mnd = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierMind ) / 100 ) + tribeInfo->mND ); - m_baseStats.pie = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierPiety ) / 100 ) + tribeInfo->pIE ); + m_baseStats.str = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierStrength ) / 100 ) + + tribeInfo->sTR ); + m_baseStats.dex = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierDexterity ) / 100 ) + + tribeInfo->dEX ); + m_baseStats.vit = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierVitality ) / 100 ) + + tribeInfo->vIT ); + m_baseStats.inte = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierIntelligence ) / 100 ) + + tribeInfo->iNT ); + m_baseStats.mnd = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierMind ) / 100 ) + + tribeInfo->mND ); + m_baseStats.pie = static_cast< uint32_t >( base * ( static_cast< float >( classInfo->modifierPiety ) / 100 ) + + tribeInfo->pIE ); - m_baseStats.skillSpeed = paramGrowthInfo->baseSpeed; - m_baseStats.spellSpeed = paramGrowthInfo->baseSpeed; - m_baseStats.accuracy = paramGrowthInfo->baseSpeed; - m_baseStats.critHitRate = paramGrowthInfo->baseSpeed; - m_baseStats.attackPotMagic = paramGrowthInfo->baseSpeed; - m_baseStats.healingPotMagic = paramGrowthInfo->baseSpeed; - m_baseStats.tenacity = paramGrowthInfo->baseSpeed; + m_baseStats.skillSpeed = paramGrowthInfo->baseSpeed; + m_baseStats.spellSpeed = paramGrowthInfo->baseSpeed; + m_baseStats.accuracy = paramGrowthInfo->baseSpeed; + m_baseStats.critHitRate = paramGrowthInfo->baseSpeed; + m_baseStats.attackPotMagic = paramGrowthInfo->baseSpeed; + m_baseStats.healingPotMagic = paramGrowthInfo->baseSpeed; + m_baseStats.tenacity = paramGrowthInfo->baseSpeed; - m_baseStats.max_mp = Math::CalcStats::calculateMaxMp( getAsPlayer() ); + m_baseStats.max_mp = Math::CalcStats::calculateMaxMp( getAsPlayer() ); - m_baseStats.max_hp = Math::CalcStats::calculateMaxHp( getAsPlayer() ); + m_baseStats.max_hp = Math::CalcStats::calculateMaxHp( getAsPlayer() ); - if( m_mp > m_baseStats.max_mp ) - m_mp = m_baseStats.max_mp; + if( m_mp > m_baseStats.max_mp ) + m_mp = m_baseStats.max_mp; - if( m_hp > m_baseStats.max_hp ) - m_hp = m_baseStats.max_hp; + if( m_hp > m_baseStats.max_hp ) + m_hp = m_baseStats.max_hp; - m_baseStats.determination = static_cast< uint32_t >( base ); + m_baseStats.determination = static_cast< uint32_t >( base ); } void Core::Entity::Player::setAutoattack( bool mode ) { - m_bAutoattack = mode; - m_lastAttack = Util::getTimeMs(); + m_bAutoattack = mode; + m_lastAttack = Util::getTimeMs(); } bool Core::Entity::Player::isAutoattackOn() const { - return m_bAutoattack; + return m_bAutoattack; } uint8_t Core::Entity::Player::getPose() const { - return m_pose; + return m_pose; } void Core::Entity::Player::setPose( uint8_t pose ) { - m_pose = pose; + m_pose = pose; } void Core::Entity::Player::sendStats() { - auto statPacket = makeZonePacket< FFXIVIpcPlayerStats >( getId() ); - statPacket->data().strength = m_baseStats.str; - statPacket->data().dexterity = m_baseStats.dex; - statPacket->data().vitality = m_baseStats.vit; - statPacket->data().intelligence = m_baseStats.inte; - statPacket->data().mind = m_baseStats.mnd; - statPacket->data().piety = m_baseStats.pie; - statPacket->data().determination = m_baseStats.determination; - statPacket->data().hp = m_baseStats.max_hp; - statPacket->data().mp = m_baseStats.max_mp; - statPacket->data().accuracy = m_baseStats.accuracy; - statPacket->data().attack = m_baseStats.attack; - statPacket->data().attackMagicPotency = m_baseStats.attackPotMagic; - statPacket->data().healingMagicPotency = m_baseStats.healingPotMagic; - statPacket->data().skillSpeed = m_baseStats.skillSpeed; - statPacket->data().spellSpeed = m_baseStats.spellSpeed; - statPacket->data().spellSpeed1 = m_baseStats.spellSpeed; - statPacket->data().spellSpeedMod = 100; + auto statPacket = makeZonePacket< FFXIVIpcPlayerStats >( getId() ); + statPacket->data().strength = m_baseStats.str; + statPacket->data().dexterity = m_baseStats.dex; + statPacket->data().vitality = m_baseStats.vit; + statPacket->data().intelligence = m_baseStats.inte; + statPacket->data().mind = m_baseStats.mnd; + statPacket->data().piety = m_baseStats.pie; + statPacket->data().determination = m_baseStats.determination; + statPacket->data().hp = m_baseStats.max_hp; + statPacket->data().mp = m_baseStats.max_mp; + statPacket->data().accuracy = m_baseStats.accuracy; + statPacket->data().attack = m_baseStats.attack; + statPacket->data().attackMagicPotency = m_baseStats.attackPotMagic; + statPacket->data().healingMagicPotency = m_baseStats.healingPotMagic; + statPacket->data().skillSpeed = m_baseStats.skillSpeed; + statPacket->data().spellSpeed = m_baseStats.spellSpeed; + statPacket->data().spellSpeed1 = m_baseStats.spellSpeed; + statPacket->data().spellSpeedMod = 100; - statPacket->data().criticalHitRate = m_baseStats.spellSpeed; - statPacket->data().defense = m_baseStats.spellSpeed; - statPacket->data().magicDefense = m_baseStats.spellSpeed; - statPacket->data().attack = m_baseStats.spellSpeed; + statPacket->data().criticalHitRate = m_baseStats.spellSpeed; + statPacket->data().defense = m_baseStats.spellSpeed; + statPacket->data().magicDefense = m_baseStats.spellSpeed; + statPacket->data().attack = m_baseStats.spellSpeed; - queuePacket( statPacket ); + queuePacket( statPacket ); } void Core::Entity::Player::teleport( uint16_t aetheryteId, uint8_t type ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pTeriMgr = g_fw.get< TerritoryMgr >(); - auto data = pExdData->get< Core::Data::Aetheryte >( aetheryteId ); + auto data = pExdData->get< Core::Data::Aetheryte >( aetheryteId ); - if( data == nullptr ) - { - return; - } + if( data == nullptr ) + { + return; + } - setStateFlag( PlayerStateFlag::BetweenAreas ); - auto targetPos = pTeriMgr->getTerritoryPosition( data->level.at( 0 ) ); + setStateFlag( PlayerStateFlag::BetweenAreas ); + auto targetPos = pTeriMgr->getTerritoryPosition( data->level.at( 0 ) ); - Common::FFXIVARR_POSITION3 pos; - pos.x = 0; - pos.y = 0; - pos.z = 0; - float rot = 0; + Common::FFXIVARR_POSITION3 pos; + pos.x = 0; + pos.y = 0; + pos.z = 0; + float rot = 0; - if( targetPos != nullptr ) - { - pos = targetPos->getTargetPosition(); - rot = targetPos->getTargetRotation(); - } + if( targetPos != nullptr ) + { + pos = targetPos->getTargetPosition(); + rot = targetPos->getTargetRotation(); + } - sendDebug( "Teleport: " + pExdData->get< Core::Data::PlaceName >( data->placeName )->name + " " + - pExdData->get< Core::Data::PlaceName >( data->aethernetName )->name + - "(" + std::to_string( data->territory ) + ")" ); + sendDebug( "Teleport: " + pExdData->get< Core::Data::PlaceName >( data->placeName )->name + " " + + pExdData->get< Core::Data::PlaceName >( data->aethernetName )->name + + "(" + std::to_string( data->territory ) + ")" ); - // TODO: this should be simplified and a type created in server_common/common.h. - if( type == 1 ) // teleport - { - prepareZoning( data->territory, true, 1, 112 ); // TODO: Really? - sendToInRangeSet( makeActorControl142( getId(), ActorDespawnEffect, 0x04 ) ); - setZoningType( Common::ZoneingType::Teleport ); - } - else if( type == 2 ) // aethernet - { - prepareZoning( data->territory, true, 1, 112 ); - sendToInRangeSet( makeActorControl142( getId(), ActorDespawnEffect, 0x04 ) ); - setZoningType( Common::ZoneingType::Teleport ); - } - else if( type == 3 ) // return - { - prepareZoning( data->territory, true, 1, 111 ); - sendToInRangeSet( makeActorControl142( getId(), ActorDespawnEffect, 0x03 ) ); - setZoningType( Common::ZoneingType::Return ); - } + // TODO: this should be simplified and a type created in server_common/common.h. + if( type == 1 ) // teleport + { + prepareZoning( data->territory, true, 1, 112 ); // TODO: Really? + sendToInRangeSet( makeActorControl142( getId(), ActorDespawnEffect, 0x04 ) ); + setZoningType( Common::ZoneingType::Teleport ); + } + else if( type == 2 ) // aethernet + { + prepareZoning( data->territory, true, 1, 112 ); + sendToInRangeSet( makeActorControl142( getId(), ActorDespawnEffect, 0x04 ) ); + setZoningType( Common::ZoneingType::Teleport ); + } + else if( type == 3 ) // return + { + prepareZoning( data->territory, true, 1, 111 ); + sendToInRangeSet( makeActorControl142( getId(), ActorDespawnEffect, 0x03 ) ); + setZoningType( Common::ZoneingType::Return ); + } - m_queuedZoneing = boost::make_shared< QueuedZoning >( data->territory, pos, Util::getTimeMs(), rot ); + m_queuedZoneing = boost::make_shared< QueuedZoning >( data->territory, pos, Util::getTimeMs(), rot ); } void Core::Entity::Player::forceZoneing( uint32_t zoneId ) { - m_queuedZoneing = boost::make_shared< QueuedZoning >( zoneId, getPos(), Util::getTimeMs(), 0.f ); - //performZoning( zoneId, Common::ZoneingType::None, getPos() ); + m_queuedZoneing = boost::make_shared< QueuedZoning >( zoneId, getPos(), Util::getTimeMs(), 0.f ); + //performZoning( zoneId, Common::ZoneingType::None, getPos() ); } void Core::Entity::Player::returnToHomepoint() { - setZoningType( Common::ZoneingType::Return ); - teleport( getHomepoint(), 3 ); + setZoningType( Common::ZoneingType::Return ); + teleport( getHomepoint(), 3 ); } void Core::Entity::Player::setZone( uint32_t zoneId ) { - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - m_onEnterEventDone = false; - if( !pTeriMgr->movePlayer( zoneId, getAsPlayer() ) ) - { - // todo: this will require proper handling, for now just return the player to their previous area - m_pos = m_prevPos; - m_rot = m_prevRot; - m_zoneId = m_prevZoneId; + auto pTeriMgr = g_fw.get< TerritoryMgr >(); + m_onEnterEventDone = false; + if( !pTeriMgr->movePlayer( zoneId, getAsPlayer() ) ) + { + // todo: this will require proper handling, for now just return the player to their previous area + m_pos = m_prevPos; + m_rot = m_prevRot; + m_zoneId = m_prevZoneId; - if( !pTeriMgr->movePlayer( m_zoneId, getAsPlayer() ) ) - return; - } + if( !pTeriMgr->movePlayer( m_zoneId, getAsPlayer() ) ) + return; + } - sendZonePackets(); + sendZonePackets(); } bool Core::Entity::Player::setInstance( uint32_t instanceContentId ) { - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - m_onEnterEventDone = false; - auto instance = pTeriMgr->getInstanceZonePtr( instanceContentId ); - if( !instance ) - return false; + auto pTeriMgr = g_fw.get< TerritoryMgr >(); + m_onEnterEventDone = false; + auto instance = pTeriMgr->getInstanceZonePtr( instanceContentId ); + if( !instance ) + return false; - return setInstance( instance ); + return setInstance( instance ); } bool Core::Entity::Player::setInstance( ZonePtr instance ) { - m_onEnterEventDone = false; - if( !instance ) - return false; + m_onEnterEventDone = false; + if( !instance ) + return false; - auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pTeriMgr = g_fw.get< TerritoryMgr >(); - // zoning within the same zone won't cause the prev data to be overwritten - if( instance->getTerritoryId() != m_zoneId ) - { - m_prevPos = m_pos; - m_prevRot = m_rot; - m_prevZoneId = m_zoneId; - } + // zoning within the same zone won't cause the prev data to be overwritten + if( instance->getTerritoryId() != m_zoneId ) + { + m_prevPos = m_pos; + m_prevRot = m_rot; + m_prevZoneId = m_zoneId; + } - if( !pTeriMgr->movePlayer( instance, getAsPlayer() ) ) - return false; + if( !pTeriMgr->movePlayer( instance, getAsPlayer() ) ) + return false; - sendZonePackets(); + sendZonePackets(); - return true; + return true; } bool Core::Entity::Player::exitInstance() { - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - if( !pTeriMgr->movePlayer( m_prevZoneId, getAsPlayer() ) ) - return false; + auto pTeriMgr = g_fw.get< TerritoryMgr >(); + if( !pTeriMgr->movePlayer( m_prevZoneId, getAsPlayer() ) ) + return false; - m_pos = m_prevPos; - m_rot = m_prevRot; - m_zoneId = m_prevZoneId; + m_pos = m_prevPos; + m_rot = m_prevRot; + m_zoneId = m_prevZoneId; - sendZonePackets(); + sendZonePackets(); - return true; + return true; } uint32_t Core::Entity::Player::getPlayTime() const { - return m_playTime; + return m_playTime; } uint8_t Core::Entity::Player::getRace() const { - return getLookAt( CharaLook::Race ); + return getLookAt( CharaLook::Race ); } uint8_t Core::Entity::Player::getGender() const { - return getLookAt( CharaLook::Gender ); + return getLookAt( CharaLook::Gender ); } void Core::Entity::Player::initSpawnIdQueue() { - m_actorSpawnIndexAllocator.freeAllSpawnIndexes(); + m_actorSpawnIndexAllocator.freeAllSpawnIndexes(); } uint8_t Core::Entity::Player::getSpawnIdForActorId( uint32_t actorId ) { - return m_actorSpawnIndexAllocator.getNextFreeSpawnIndex( actorId ); + return m_actorSpawnIndexAllocator.getNextFreeSpawnIndex( actorId ); } bool Core::Entity::Player::isActorSpawnIdValid( uint8_t spawnIndex ) { - return m_actorSpawnIndexAllocator.isSpawnIndexValid( spawnIndex ); + return m_actorSpawnIndexAllocator.isSpawnIndexValid( spawnIndex ); } void Core::Entity::Player::registerAetheryte( uint8_t aetheryteId ) { - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( aetheryteId, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( aetheryteId, value, index ); - m_aetheryte[index] |= value; - queuePacket( makeActorControl143( getId(), LearnTeleport, aetheryteId, 1 ) ); + m_aetheryte[ index ] |= value; + queuePacket( makeActorControl143( getId(), LearnTeleport, aetheryteId, 1 ) ); } bool Core::Entity::Player::isAetheryteRegistered( uint8_t aetheryteId ) const { - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( aetheryteId, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( aetheryteId, value, index ); - return ( m_aetheryte[index] & value ) != 0; + return ( m_aetheryte[ index ] & value ) != 0; } -uint8_t * Core::Entity::Player::getDiscoveryBitmask() +uint8_t* Core::Entity::Player::getDiscoveryBitmask() { - return m_discovery; + return m_discovery; } void Core::Entity::Player::discover( int16_t map_id, int16_t sub_id ) { - // map.exd field 12 -> index in one of the two discovery sections, if field 15 is false, need to use 2nd section - // section 1 starts at 4 - 2 bytes each + // map.exd field 12 -> index in one of the two discovery sections, if field 15 is false, need to use 2nd section + // section 1 starts at 4 - 2 bytes each - // section to starts at 320 - 4 bytes long + // section to starts at 320 - 4 bytes long - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - int32_t offset = 4; + int32_t offset = 4; - auto info = pExdData->get< Core::Data::Map >( pExdData->get< Core::Data::TerritoryType >( getCurrentZone()->getTerritoryId() )->map ); - if( info->discoveryArrayByte ) - offset = 4 + 2 * info->discoveryIndex; - else - offset = 324 + 4 * info->discoveryIndex; + auto info = pExdData->get< Core::Data::Map >( + pExdData->get< Core::Data::TerritoryType >( getCurrentZone()->getTerritoryId() )->map ); + if( info->discoveryArrayByte ) + offset = 4 + 2 * info->discoveryIndex; + else + offset = 324 + 4 * info->discoveryIndex; - int32_t index = offset + sub_id / 8; - uint8_t bitIndex = sub_id % 8; + int32_t index = offset + sub_id / 8; + uint8_t bitIndex = sub_id % 8; - uint8_t value = 1 << bitIndex; + uint8_t value = 1 << bitIndex; - m_discovery[index] |= value; + m_discovery[ index ] |= value; - uint16_t level = getLevel(); + uint16_t level = getLevel(); - uint32_t exp = ( pExdData->get< Core::Data::ParamGrow >( level )->expToNext * 5 / 100 ); - - gainExp( exp ); + uint32_t exp = ( pExdData->get< Core::Data::ParamGrow >( level )->expToNext * 5 / 100 ); + gainExp( exp ); } bool Core::Entity::Player::isNewAdventurer() const { - return m_bNewAdventurer; + return m_bNewAdventurer; } void Core::Entity::Player::setNewAdventurer( bool state ) { - //if( !state ) - //{ - // unsetStateFlag( PlayerStateFlag::NewAdventurer ); - //} - //else - //{ - // setStateFlag( PlayerStateFlag::NewAdventurer ); - //} - m_bNewAdventurer = state; + //if( !state ) + //{ + // unsetStateFlag( PlayerStateFlag::NewAdventurer ); + //} + //else + //{ + // setStateFlag( PlayerStateFlag::NewAdventurer ); + //} + m_bNewAdventurer = state; } void Core::Entity::Player::resetDiscovery() { - memset( m_discovery, 0, sizeof( m_discovery ) ); + memset( m_discovery, 0, sizeof( m_discovery ) ); } void Core::Entity::Player::changePosition( float x, float y, float z, float o ) { - Common::FFXIVARR_POSITION3 pos; - pos.x = x; - pos.y = y; - pos.z = z; - m_queuedZoneing = boost::make_shared( getZoneId(), pos, Util::getTimeMs(), o ); + Common::FFXIVARR_POSITION3 pos; + pos.x = x; + pos.y = y; + pos.z = z; + m_queuedZoneing = boost::make_shared< QueuedZoning >( getZoneId(), pos, Util::getTimeMs(), o ); } void Core::Entity::Player::learnAction( uint16_t actionId ) { - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( actionId, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( actionId, value, index ); - m_unlocks[index] |= value; + m_unlocks[ index ] |= value; - queuePacket( makeActorControl143( getId(), ToggleActionUnlock, actionId, 1 ) ); + queuePacket( makeActorControl143( getId(), ToggleActionUnlock, actionId, 1 ) ); } void Core::Entity::Player::learnSong( uint8_t songId, uint32_t itemId ) { - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( songId, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( songId, value, index ); - m_orchestrion[index] |= value; + m_orchestrion[ index ] |= value; - queuePacket( makeActorControl143( getId(), ToggleOrchestrionUnlock, songId, 1, itemId ) ); + queuePacket( makeActorControl143( getId(), ToggleOrchestrionUnlock, songId, 1, itemId ) ); } bool Core::Entity::Player::isActionLearned( uint8_t actionId ) const { - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( actionId, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( actionId, value, index ); - return ( m_unlocks[index] & value ) != 0; + return ( m_unlocks[ index ] & value ) != 0; } void Core::Entity::Player::gainExp( uint32_t amount ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint32_t currentExp = getExp(); + uint32_t currentExp = getExp(); - uint16_t level = getLevel(); + uint16_t level = getLevel(); - uint32_t neededExpToLevel = pExdData->get< Core::Data::ParamGrow >( level )->expToNext; + uint32_t neededExpToLevel = pExdData->get< Core::Data::ParamGrow >( level )->expToNext; - uint32_t neededExpToLevelplus1 = pExdData->get< Core::Data::ParamGrow >( level + 1 )->expToNext; + uint32_t neededExpToLevelplus1 = pExdData->get< Core::Data::ParamGrow >( level + 1 )->expToNext; - queuePacket( makeActorControl143( getId(), GainExpMsg, static_cast< uint8_t >( getClass() ), amount ) ); + queuePacket( makeActorControl143( getId(), GainExpMsg, static_cast< uint8_t >( getClass() ), amount ) ); - if( level >= 70 ) // temporary fix for leveling over levelcap - { - queuePacket( makeActorControl143( getId(), UpdateUiExp, static_cast< uint8_t >( getClass() ), amount ) ); - return; - } + if( level >= 70 ) // temporary fix for leveling over levelcap + { + queuePacket( makeActorControl143( getId(), UpdateUiExp, static_cast< uint8_t >( getClass() ), amount ) ); + return; + } - if( ( currentExp + amount ) >= neededExpToLevel ) - { - // levelup - amount = ( currentExp + amount - neededExpToLevel ) > neededExpToLevelplus1 ? - neededExpToLevelplus1 - 1 : - ( currentExp + amount - neededExpToLevel ); - setExp( amount ); - gainLevel(); - queuePacket( makeActorControl143( getId(), UpdateUiExp, static_cast< uint8_t >( getClass() ), amount ) ); + if( ( currentExp + amount ) >= neededExpToLevel ) + { + // levelup + amount = ( currentExp + amount - neededExpToLevel ) > neededExpToLevelplus1 ? + neededExpToLevelplus1 - 1 : + ( currentExp + amount - neededExpToLevel ); + setExp( amount ); + gainLevel(); + queuePacket( makeActorControl143( getId(), UpdateUiExp, static_cast< uint8_t >( getClass() ), amount ) ); - } - else - { - queuePacket( makeActorControl143( getId(), UpdateUiExp, static_cast< uint8_t >( getClass() ), currentExp + amount ) ); - setExp( currentExp + amount ); - } + } + else + { + queuePacket( + makeActorControl143( getId(), UpdateUiExp, static_cast< uint8_t >( getClass() ), currentExp + amount ) ); + setExp( currentExp + amount ); + } - sendStatusUpdate(); + sendStatusUpdate(); } void Core::Entity::Player::gainLevel() { - setLevel( getLevel() + 1 ); - calculateStats(); - sendStats(); - sendStatusUpdate(); + setLevel( getLevel() + 1 ); + calculateStats(); + sendStats(); + sendStatusUpdate(); - m_hp = getMaxHp(); - m_mp = getMaxMp(); + m_hp = getMaxHp(); + m_mp = getMaxMp(); - auto effectListPacket = makeZonePacket< FFXIVIpcStatusEffectList >( getId() ); - effectListPacket->data().classId = static_cast< uint8_t > ( getClass() ); - effectListPacket->data().level1 = getLevel(); - effectListPacket->data().level = getLevel(); - effectListPacket->data().current_hp = getMaxHp(); - effectListPacket->data().current_mp = getMaxMp(); - effectListPacket->data().currentTp = 1000; - effectListPacket->data().max_hp = getMaxHp(); - effectListPacket->data().max_mp = getMaxMp(); - sendToInRangeSet( effectListPacket, true ); + auto effectListPacket = makeZonePacket< FFXIVIpcStatusEffectList >( getId() ); + effectListPacket->data().classId = static_cast< uint8_t > ( getClass() ); + effectListPacket->data().level1 = getLevel(); + effectListPacket->data().level = getLevel(); + effectListPacket->data().current_hp = getMaxHp(); + effectListPacket->data().current_mp = getMaxMp(); + effectListPacket->data().currentTp = 1000; + effectListPacket->data().max_hp = getMaxHp(); + effectListPacket->data().max_mp = getMaxMp(); + sendToInRangeSet( effectListPacket, true ); - sendToInRangeSet( makeActorControl142( getId(), LevelUpEffect, static_cast< uint8_t >( getClass() ), - getLevel(), getLevel() - 1 ), true ); + sendToInRangeSet( makeActorControl142( getId(), LevelUpEffect, static_cast< uint8_t >( getClass() ), + getLevel(), getLevel() - 1 ), true ); - auto classInfoPacket = makeZonePacket< FFXIVIpcUpdateClassInfo >( getId() ); - classInfoPacket->data().classId = static_cast< uint8_t > ( getClass() ); - classInfoPacket->data().level1 = getLevel(); - classInfoPacket->data().level = getLevel(); - classInfoPacket->data().nextLevelIndex = getLevel(); - classInfoPacket->data().currentExp = getExp(); - queuePacket( classInfoPacket ); + auto classInfoPacket = makeZonePacket< FFXIVIpcUpdateClassInfo >( getId() ); + classInfoPacket->data().classId = static_cast< uint8_t > ( getClass() ); + classInfoPacket->data().level1 = getLevel(); + classInfoPacket->data().level = getLevel(); + classInfoPacket->data().nextLevelIndex = getLevel(); + classInfoPacket->data().currentExp = getExp(); + queuePacket( classInfoPacket ); } void Core::Entity::Player::sendStatusUpdate( bool toSelf ) { - sendToInRangeSet( boost::make_shared< UpdateHpMpTpPacket >( *this ), true ); + sendToInRangeSet( boost::make_shared< UpdateHpMpTpPacket >( *this ), true ); } uint8_t Core::Entity::Player::getLevel() const { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( getClass() ) )->expArrayIndex; - return static_cast< uint8_t >( m_classArray[classJobIndex] ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( getClass() ) )->expArrayIndex; + return static_cast< uint8_t >( m_classArray[ classJobIndex ] ); } uint8_t Core::Entity::Player::getLevelForClass( Common::ClassJob pClass ) const { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( pClass ) )->expArrayIndex; - return static_cast< uint8_t >( m_classArray[classJobIndex] ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( pClass ) )->expArrayIndex; + return static_cast< uint8_t >( m_classArray[ classJobIndex ] ); } bool Core::Entity::Player::isClassJobUnlocked( Common::ClassJob classJob ) const { - // todo: need to properly check if a job is unlocked, at the moment we just check the class array which will return true for every job if the base class is unlocked - return getLevelForClass( classJob ) != 0; + // todo: need to properly check if a job is unlocked, at the moment we just check the class array which will return true for every job if the base class is unlocked + return getLevelForClass( classJob ) != 0; } uint32_t Core::Entity::Player::getExp() const { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( getClass() ) )->expArrayIndex; - return m_expArray[classJobIndex]; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( getClass() ) )->expArrayIndex; + return m_expArray[ classJobIndex ]; } void Core::Entity::Player::setExp( uint32_t amount ) -{ auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( getClass() ) )->expArrayIndex; - m_expArray[classJobIndex] = amount; +{ + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( getClass() ) )->expArrayIndex; + m_expArray[ classJobIndex ] = amount; } bool Core::Entity::Player::isInCombat() const { - return m_bInCombat; + return m_bInCombat; } void Core::Entity::Player::setInCombat( bool mode ) { - //m_lastAttack = GetTickCount(); - m_bInCombat = mode; + //m_lastAttack = GetTickCount(); + m_bInCombat = mode; } void Core::Entity::Player::setClassJob( Common::ClassJob classJob ) { - m_class = classJob; - uint8_t level = getLevel(); + m_class = classJob; + uint8_t level = getLevel(); - if( getHp() > getMaxHp() ) - m_hp = getMaxHp(); + if( getHp() > getMaxHp() ) + m_hp = getMaxHp(); - if( getMp() > getMaxMp() ) - m_mp = getMaxMp(); + if( getMp() > getMaxMp() ) + m_mp = getMaxMp(); - m_tp = 0; + m_tp = 0; - auto classInfoPacket = makeZonePacket< FFXIVIpcPlayerClassInfo >( getId() ); - classInfoPacket->data().classId = static_cast< uint8_t >( getClass() ); - classInfoPacket->data().level = getLevel(); - queuePacket( classInfoPacket ); + auto classInfoPacket = makeZonePacket< FFXIVIpcPlayerClassInfo >( getId() ); + classInfoPacket->data().classId = static_cast< uint8_t >( getClass() ); + classInfoPacket->data().level = getLevel(); + queuePacket( classInfoPacket ); - sendToInRangeSet( makeActorControl142( getId(), ClassJobChange, 0x04 ), true ); + sendToInRangeSet( makeActorControl142( getId(), ClassJobChange, 0x04 ), true ); - sendStatusUpdate( true ); + sendStatusUpdate( true ); } void Core::Entity::Player::setLevel( uint8_t level ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( getClass() ) )->expArrayIndex; - m_classArray[classJobIndex] = level; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( getClass() ) )->expArrayIndex; + m_classArray[ classJobIndex ] = level; } void Core::Entity::Player::setLevelForClass( uint8_t level, Common::ClassJob classjob ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( classjob ) )->expArrayIndex; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( classjob ) )->expArrayIndex; - if( m_classArray[classJobIndex] == 0 ) - insertDbClass( classJobIndex ); + if( m_classArray[ classJobIndex ] == 0 ) + insertDbClass( classJobIndex ); - m_classArray[classJobIndex] = level; + m_classArray[ classJobIndex ] = level; } void Core::Entity::Player::sendModel() { - sendToInRangeSet( boost::make_shared< ModelEquipPacket >( *getAsPlayer() ), true ); + sendToInRangeSet( boost::make_shared< ModelEquipPacket >( *getAsPlayer() ), true ); } uint32_t Core::Entity::Player::getModelForSlot( Common::GearSetSlot slot ) { - return m_modelEquip[slot]; + return m_modelEquip[ slot ]; } void Core::Entity::Player::setModelForSlot( Common::GearSetSlot slot, uint32_t val ) { - m_modelEquip[slot] = val; + m_modelEquip[ slot ] = val; } uint64_t Core::Entity::Player::getModelMainWeapon() const { - return m_modelMainWeapon; + return m_modelMainWeapon; } uint64_t Core::Entity::Player::getModelSubWeapon() const { - return m_modelSubWeapon; + return m_modelSubWeapon; } uint64_t Core::Entity::Player::getModelSystemWeapon() const { - return m_modelSystemWeapon; + return m_modelSystemWeapon; } int8_t Core::Entity::Player::getAetheryteMaskAt( uint8_t index ) const { - if( index > sizeof( m_aetheryte ) ) - return 0; - return m_aetheryte[index]; + if( index > sizeof( m_aetheryte ) ) + return 0; + return m_aetheryte[ index ]; } uint8_t Core::Entity::Player::getBirthDay() const { - return m_birthDay; + return m_birthDay; } uint8_t Core::Entity::Player::getBirthMonth() const { - return m_birthMonth; + return m_birthMonth; } uint8_t Core::Entity::Player::getGuardianDeity() const { - return m_guardianDeity; + return m_guardianDeity; } uint8_t Core::Entity::Player::getLookAt( uint8_t index ) const { - return m_customize[index]; + return m_customize[ index ]; } void Core::Entity::Player::setLookAt( uint8_t index, uint8_t value ) { - m_customize[index] = value; + m_customize[ index ] = value; } // spawn this player for pTarget void Core::Entity::Player::spawn( Entity::PlayerPtr pTarget ) { - auto pLog = g_fw.get< Logger >(); - pLog->debug( "[" + std::to_string( pTarget->getId() ) + "] Spawning " + - getName() + " for " + - pTarget->getName() ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( "[" + std::to_string( pTarget->getId() ) + "] Spawning " + + getName() + " for " + + pTarget->getName() ); - pTarget->queuePacket( boost::make_shared< PlayerSpawnPacket >( *getAsPlayer(), *pTarget ) ); + pTarget->queuePacket( boost::make_shared< PlayerSpawnPacket >( *getAsPlayer(), *pTarget ) ); } // despawn void Core::Entity::Player::despawn( Entity::PlayerPtr pTarget ) { - auto pPlayer = pTarget; - auto pLog = g_fw.get< Logger >(); - pLog->debug( "despawning " + getName() + " for " + pTarget->getName() ); + auto pPlayer = pTarget; + auto pLog = g_fw.get< Logger >(); + pLog->debug( "despawning " + getName() + " for " + pTarget->getName() ); - pPlayer->freePlayerSpawnId( getId() ); + pPlayer->freePlayerSpawnId( getId() ); - pPlayer->queuePacket( makeActorControl143( getId(), DespawnZoneScreenMsg, 0x04, getId(), 0x01 ) ); + pPlayer->queuePacket( makeActorControl143( getId(), DespawnZoneScreenMsg, 0x04, getId(), 0x01 ) ); } Core::Entity::ActorPtr Core::Entity::Player::lookupTargetById( uint64_t targetId ) { - ActorPtr targetActor; - auto inRange = getInRangeActors(true); - for( auto actor : inRange ) - { - if( actor->getId() == targetId ) - targetActor = actor; - } - return targetActor; + ActorPtr targetActor; + auto inRange = getInRangeActors( true ); + for( auto actor : inRange ) + { + if( actor->getId() == targetId ) + targetActor = actor; + } + return targetActor; } void Core::Entity::Player::setLastPing( uint32_t ping ) { - m_lastPing = ping; + m_lastPing = ping; } uint32_t Core::Entity::Player::getLastPing() const { - return m_lastPing; + return m_lastPing; } void Core::Entity::Player::setVoiceId( uint8_t voiceId ) { - m_voice = voiceId; + m_voice = voiceId; } void Core::Entity::Player::setGc( uint8_t gc ) { - m_gc = gc; + m_gc = gc; - auto gcAffPacket = makeZonePacket< FFXIVGCAffiliation >( getId() ); - gcAffPacket->data().gcId = m_gc; - gcAffPacket->data().gcRank[0] = m_gcRank[0]; - gcAffPacket->data().gcRank[1] = m_gcRank[1]; - gcAffPacket->data().gcRank[2] = m_gcRank[2]; - queuePacket( gcAffPacket ); + auto gcAffPacket = makeZonePacket< FFXIVGCAffiliation >( getId() ); + gcAffPacket->data().gcId = m_gc; + gcAffPacket->data().gcRank[ 0 ] = m_gcRank[ 0 ]; + gcAffPacket->data().gcRank[ 1 ] = m_gcRank[ 1 ]; + gcAffPacket->data().gcRank[ 2 ] = m_gcRank[ 2 ]; + queuePacket( gcAffPacket ); } void Core::Entity::Player::setGcRankAt( uint8_t index, uint8_t rank ) { - m_gcRank[index] = rank; + m_gcRank[ index ] = rank; - auto gcAffPacket = makeZonePacket< FFXIVGCAffiliation >( getId() ); - gcAffPacket->data().gcId = m_gc; - gcAffPacket->data().gcRank[0] = m_gcRank[0]; - gcAffPacket->data().gcRank[1] = m_gcRank[1]; - gcAffPacket->data().gcRank[2] = m_gcRank[2]; - queuePacket( gcAffPacket ); + auto gcAffPacket = makeZonePacket< FFXIVGCAffiliation >( getId() ); + gcAffPacket->data().gcId = m_gc; + gcAffPacket->data().gcRank[ 0 ] = m_gcRank[ 0 ]; + gcAffPacket->data().gcRank[ 1 ] = m_gcRank[ 1 ]; + gcAffPacket->data().gcRank[ 2 ] = m_gcRank[ 2 ]; + queuePacket( gcAffPacket ); } const uint8_t* Core::Entity::Player::getStateFlags() const { - return m_stateFlags; + return m_stateFlags; } bool Core::Entity::Player::actionHasCastTime( uint32_t actionId ) //TODO: Add logic for special cases { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto actionInfoPtr = pExdData->get< Core::Data::Action >( actionId ); - if( actionInfoPtr->preservesCombo ) - return false; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto actionInfoPtr = pExdData->get< Core::Data::Action >( actionId ); + if( actionInfoPtr->preservesCombo ) + return false; - return actionInfoPtr->cast100ms != 0; + return actionInfoPtr->cast100ms != 0; } bool Core::Entity::Player::hasStateFlag( Common::PlayerStateFlag flag ) const { - int32_t iFlag = static_cast< uint32_t >( flag ); + int32_t iFlag = static_cast< uint32_t >( flag ); - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( iFlag, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( iFlag, value, index ); - return ( m_stateFlags[index] & value ) != 0; + return ( m_stateFlags[ index ] & value ) != 0; } void Core::Entity::Player::setStateFlag( Common::PlayerStateFlag flag ) { - auto prevOnlineStatus = getOnlineStatus(); - int32_t iFlag = static_cast< uint32_t >( flag ); + auto prevOnlineStatus = getOnlineStatus(); + int32_t iFlag = static_cast< uint32_t >( flag ); - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( iFlag, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( iFlag, value, index ); - m_stateFlags[index] |= value; - sendStateFlags(); + m_stateFlags[ index ] |= value; + sendStateFlags(); - auto newOnlineStatus = getOnlineStatus(); + auto newOnlineStatus = getOnlineStatus(); - if( prevOnlineStatus != newOnlineStatus ) - sendToInRangeSet( makeActorControl142( getId(), SetStatusIcon, - static_cast< uint8_t >( getOnlineStatus() ) ), true ); + if( prevOnlineStatus != newOnlineStatus ) + sendToInRangeSet( makeActorControl142( getId(), SetStatusIcon, + static_cast< uint8_t >( getOnlineStatus() ) ), true ); } void Core::Entity::Player::setStateFlags( std::vector< Common::PlayerStateFlag > flags ) { - for( const auto& flag : flags ) - { - setStateFlag( flag ); - } + for( const auto& flag : flags ) + { + setStateFlag( flag ); + } } void Core::Entity::Player::sendStateFlags() { - queuePacket( boost::make_shared< PlayerStateFlagsPacket >( *getAsPlayer() ) ); + queuePacket( boost::make_shared< PlayerStateFlagsPacket >( *getAsPlayer() ) ); } void Core::Entity::Player::unsetStateFlag( Common::PlayerStateFlag flag ) { - if( !hasStateFlag( flag ) ) - return; + if( !hasStateFlag( flag ) ) + return; - auto prevOnlineStatus = getOnlineStatus(); + auto prevOnlineStatus = getOnlineStatus(); - int32_t iFlag = static_cast< uint32_t >( flag ); + int32_t iFlag = static_cast< uint32_t >( flag ); - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( iFlag, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( iFlag, value, index ); - m_stateFlags[index] ^= value; - sendStateFlags(); + m_stateFlags[ index ] ^= value; + sendStateFlags(); - auto newOnlineStatus = getOnlineStatus(); + auto newOnlineStatus = getOnlineStatus(); - if( prevOnlineStatus != newOnlineStatus ) - sendToInRangeSet( makeActorControl142( getId(), SetStatusIcon, static_cast< uint8_t >( getOnlineStatus() ) ), true ); + if( prevOnlineStatus != newOnlineStatus ) + sendToInRangeSet( makeActorControl142( getId(), SetStatusIcon, static_cast< uint8_t >( getOnlineStatus() ) ), + true ); } void Core::Entity::Player::update( int64_t currTime ) { - // a zoning is pending, lets do it - if( m_queuedZoneing && ( currTime - m_queuedZoneing->m_queueTime ) > 800 ) - { - Common::FFXIVARR_POSITION3 targetPos = m_queuedZoneing->m_targetPosition; - if( getCurrentZone()->getTerritoryId() != m_queuedZoneing->m_targetZone ) + // a zoning is pending, lets do it + if( m_queuedZoneing && ( currTime - m_queuedZoneing->m_queueTime ) > 800 ) + { + Common::FFXIVARR_POSITION3 targetPos = m_queuedZoneing->m_targetPosition; + if( getCurrentZone()->getTerritoryId() != m_queuedZoneing->m_targetZone ) + { + performZoning( m_queuedZoneing->m_targetZone, targetPos, m_queuedZoneing->m_targetRotation ); + } + else + { + auto setActorPosPacket = makeZonePacket< FFXIVIpcActorSetPos >( getId() ); + setActorPosPacket->data().r16 = Math::Util::floatToUInt16Rot( m_queuedZoneing->m_targetRotation ); + setActorPosPacket->data().waitForLoad = 0x04; + setActorPosPacket->data().x = targetPos.x; + setActorPosPacket->data().y = targetPos.y; + setActorPosPacket->data().z = targetPos.z; + sendToInRangeSet( setActorPosPacket, true ); + setPos( targetPos ); + } + m_queuedZoneing.reset(); + return; + } + + if( m_hp <= 0 && m_status != ActorStatus::Dead ) + die(); + + if( !isAlive() ) + return; + + updateStatusEffects(); + + m_lastUpdate = currTime; + + if( !checkAction() ) + { + if( m_targetId && m_currentStance == Common::Stance::Active && isAutoattackOn() ) + { + auto mainWeap = getItemAt( Common::GearSet0, Common::GearSetSlot::MainHand ); + + // @TODO i dislike this, iterating over all in range actors when you already know the id of the actor you need... + for( auto actor : m_inRangeActor ) { - performZoning( m_queuedZoneing->m_targetZone, targetPos, m_queuedZoneing->m_targetRotation); - } - else - { - auto setActorPosPacket = makeZonePacket< FFXIVIpcActorSetPos >( getId() ); - setActorPosPacket->data().r16 = Math::Util::floatToUInt16Rot( m_queuedZoneing->m_targetRotation ); - setActorPosPacket->data().waitForLoad = 0x04; - setActorPosPacket->data().x = targetPos.x; - setActorPosPacket->data().y = targetPos.y; - setActorPosPacket->data().z = targetPos.z; - sendToInRangeSet( setActorPosPacket, true ); - setPos( targetPos ); - } - m_queuedZoneing.reset(); - return; - } + if( actor->getId() == m_targetId && actor->getAsChara()->isAlive() && mainWeap ) + { + // default autoattack range + // TODO make this dependant on bnpc size + uint32_t range = 7; - if( m_hp <= 0 && m_status != ActorStatus::Dead ) - die(); + // default autoattack range for ranged classes + if( getClass() == ClassJob::Machinist || + getClass() == ClassJob::Bard || + getClass() == ClassJob::Archer ) + range = 25; - if( !isAlive() ) - return; - updateStatusEffects(); + if( Math::Util::distance( getPos().x, getPos().y, getPos().z, + actor->getPos().x, actor->getPos().y, actor->getPos().z ) <= range ) + { - m_lastUpdate = currTime; - - if( !checkAction() ) - { - if( m_targetId && m_currentStance == Common::Stance::Active && isAutoattackOn() ) - { - auto mainWeap = getItemAt( Common::GearSet0, Common::GearSetSlot::MainHand ); - - // @TODO i dislike this, iterating over all in range actors when you already know the id of the actor you need... - for( auto actor : m_inRangeActor ) - { - if( actor->getId() == m_targetId && actor->getAsChara()->isAlive() && mainWeap ) + if( ( currTime - m_lastAttack ) > mainWeap->getDelay() ) { - // default autoattack range - // TODO make this dependant on bnpc size - uint32_t range = 7; - - // default autoattack range for ranged classes - if( getClass() == ClassJob::Machinist || - getClass() == ClassJob::Bard || - getClass() == ClassJob::Archer ) - range = 25; - - - if( Math::Util::distance(getPos().x, getPos().y, getPos().z, - actor->getPos().x, actor->getPos().y, actor->getPos().z) <= range ) - { - - if( ( currTime - m_lastAttack ) > mainWeap->getDelay() ) - { - m_lastAttack = currTime; - autoAttack( actor->getAsChara() ); - } - - } + m_lastAttack = currTime; + autoAttack( actor->getAsChara() ); } - } - } - } - if( ( currTime - m_lastTickTime ) > 3000 ) - { - // add 3 seconds to total play time - m_playTime += 3; - m_lastTickTime = currTime; - onTick(); - } + } + } + } + } + } + + if( ( currTime - m_lastTickTime ) > 3000 ) + { + // add 3 seconds to total play time + m_playTime += 3; + m_lastTickTime = currTime; + onTick(); + } } void Core::Entity::Player::onMobKill( uint16_t nameId ) { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - pScriptMgr->onMobKill( *getAsPlayer(), nameId ); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + pScriptMgr->onMobKill( *getAsPlayer(), nameId ); } void Core::Entity::Player::freePlayerSpawnId( uint32_t actorId ) { - auto spawnId = m_actorSpawnIndexAllocator.freeUsedSpawnIndex( actorId ); + auto spawnId = m_actorSpawnIndexAllocator.freeUsedSpawnIndex( actorId ); - auto freeActorSpawnPacket = makeZonePacket< FFXIVIpcActorFreeSpawn >( getId() ); - freeActorSpawnPacket->data().actorId = actorId; - freeActorSpawnPacket->data().spawnId = spawnId; - queuePacket( freeActorSpawnPacket ); + auto freeActorSpawnPacket = makeZonePacket< FFXIVIpcActorFreeSpawn >( getId() ); + freeActorSpawnPacket->data().actorId = actorId; + freeActorSpawnPacket->data().spawnId = spawnId; + queuePacket( freeActorSpawnPacket ); } -uint8_t * Core::Entity::Player::getAetheryteArray() +uint8_t* Core::Entity::Player::getAetheryteArray() { - return m_aetheryte; + return m_aetheryte; } /*! set homepoint */ void Core::Entity::Player::setHomepoint( uint8_t aetheryteId ) { - m_homePoint = aetheryteId; + m_homePoint = aetheryteId; - queuePacket( makeActorControl143( getId(), SetHomepoint, aetheryteId ) ); + queuePacket( makeActorControl143( getId(), SetHomepoint, aetheryteId ) ); } /*! get homepoint */ uint8_t Core::Entity::Player::getHomepoint() const { - return m_homePoint; + return m_homePoint; } uint16_t* Core::Entity::Player::getClassArray() { - return m_classArray; + return m_classArray; } const uint16_t* Core::Entity::Player::getClassArray() const { - return m_classArray; + return m_classArray; } const uint8_t* Core::Entity::Player::getLookArray() const { - return m_customize; + return m_customize; } const uint32_t* Core::Entity::Player::getModelArray() const { - return m_modelEquip; + return m_modelEquip; } uint32_t* Core::Entity::Player::getExpArray() { - return m_expArray; + return m_expArray; } const uint32_t* Core::Entity::Player::getExpArray() const { - return m_expArray; + return m_expArray; } uint8_t* Core::Entity::Player::getHowToArray() { - return m_howTo; + return m_howTo; } const uint8_t* Core::Entity::Player::getHowToArray() const { - return m_howTo; + return m_howTo; } const uint8_t* Core::Entity::Player::getUnlockBitmask() const { - return m_unlocks; + return m_unlocks; } const uint8_t* Core::Entity::Player::getOrchestrionBitmask() const { - return m_orchestrion; + return m_orchestrion; } const uint8_t* Core::Entity::Player::getMountGuideBitmask() const { - return m_mountGuide; + return m_mountGuide; } uint64_t Core::Entity::Player::getContentId() const { - return m_contentId; + return m_contentId; } uint8_t Core::Entity::Player::getVoiceId() const { - return m_voice; + return m_voice; } uint8_t Core::Entity::Player::getGc() const { - return m_gc; + return m_gc; } const uint8_t* Core::Entity::Player::getGcRankArray() const { - return m_gcRank; + return m_gcRank; } void Core::Entity::Player::queuePacket( Network::Packets::FFXIVPacketBasePtr pPacket ) { - auto pServerZone = g_fw.get< ServerZone >(); - auto pSession = pServerZone->getSession( m_id ); + auto pServerZone = g_fw.get< ServerZone >(); + auto pSession = pServerZone->getSession( m_id ); - if( !pSession ) - return; + if( !pSession ) + return; - auto pZoneCon = pSession->getZoneConnection(); + auto pZoneCon = pSession->getZoneConnection(); - if( pZoneCon ) - pZoneCon->queueOutPacket( pPacket ); + if( pZoneCon ) + pZoneCon->queueOutPacket( pPacket ); } void Core::Entity::Player::queueChatPacket( Network::Packets::FFXIVPacketBasePtr pPacket ) { - auto pServerZone = g_fw.get< ServerZone >(); - auto pSession = pServerZone->getSession( m_id ); + auto pServerZone = g_fw.get< ServerZone >(); + auto pSession = pServerZone->getSession( m_id ); - if( !pSession ) - return; + if( !pSession ) + return; - auto pChatCon = pSession->getChatConnection(); + auto pChatCon = pSession->getChatConnection(); - if( pChatCon ) - pChatCon->queueOutPacket( pPacket ); + if( pChatCon ) + pChatCon->queueOutPacket( pPacket ); } bool Core::Entity::Player::isLoadingComplete() const { - return m_bLoadingComplete; + return m_bLoadingComplete; } void Core::Entity::Player::setLoadingComplete( bool bComplete ) { - m_bLoadingComplete = bComplete; + m_bLoadingComplete = bComplete; } -void Core::Entity::Player::performZoning( uint16_t zoneId, const Common::FFXIVARR_POSITION3 &pos, float rotation ) +void Core::Entity::Player::performZoning( uint16_t zoneId, const Common::FFXIVARR_POSITION3& pos, float rotation ) { - m_pos = pos; - m_zoneId = zoneId; - m_bMarkedForZoning = true; - setRot( rotation ); - setZone( zoneId ); + m_pos = pos; + m_zoneId = zoneId; + m_bMarkedForZoning = true; + setRot( rotation ); + setZone( zoneId ); } bool Core::Entity::Player::isMarkedForZoning() const { - return m_bMarkedForZoning; + return m_bMarkedForZoning; } ZoneingType Core::Entity::Player::getZoningType() const { - return m_zoningType; + return m_zoningType; } void Core::Entity::Player::setZoningType( Common::ZoneingType zoneingType ) { - m_zoningType = zoneingType; + m_zoningType = zoneingType; } void Core::Entity::Player::setSearchInfo( uint8_t selectRegion, uint8_t selectClass, const char* searchMessage ) { - m_searchSelectRegion = selectRegion; - m_searchSelectClass = selectClass; - memset( &m_searchMessage[0], 0, sizeof( searchMessage ) ); - strcpy( &m_searchMessage[0], searchMessage ); + m_searchSelectRegion = selectRegion; + m_searchSelectClass = selectClass; + memset( &m_searchMessage[ 0 ], 0, sizeof( searchMessage ) ); + strcpy( &m_searchMessage[ 0 ], searchMessage ); } const char* Core::Entity::Player::getSearchMessage() const { - return &m_searchMessage[0]; + return &m_searchMessage[ 0 ]; } uint8_t Core::Entity::Player::getSearchSelectRegion() const { - return m_searchSelectRegion; + return m_searchSelectRegion; } uint8_t Core::Entity::Player::getSearchSelectClass() const { - return m_searchSelectClass; + return m_searchSelectClass; } void Core::Entity::Player::sendNotice( const std::string& message ) //Purple Text { - queuePacket( boost::make_shared< ServerNoticePacket >( getId(), message ) ); + queuePacket( boost::make_shared< ServerNoticePacket >( getId(), message ) ); } void Core::Entity::Player::sendUrgent( const std::string& message ) //Red Text { - queuePacket( boost::make_shared< ChatPacket >( *getAsPlayer(), ChatType::ServerUrgent, message ) ); + queuePacket( boost::make_shared< ChatPacket >( *getAsPlayer(), ChatType::ServerUrgent, message ) ); } void Core::Entity::Player::sendDebug( const std::string& message ) //Grey Text { - queuePacket( boost::make_shared< ChatPacket >( *getAsPlayer(), ChatType::ServerDebug, message ) ); + queuePacket( boost::make_shared< ChatPacket >( *getAsPlayer(), ChatType::ServerDebug, message ) ); } void Core::Entity::Player::updateHowtosSeen( uint32_t howToId ) { - uint8_t index = howToId / 8; - uint8_t bitIndex = howToId % 8; + uint8_t index = howToId / 8; + uint8_t bitIndex = howToId % 8; - uint8_t value = 1 << bitIndex; + uint8_t value = 1 << bitIndex; - m_howTo[index] |= value; + m_howTo[ index ] |= value; } void Core::Entity::Player::initHateSlotQueue() { - m_freeHateSlotQueue = std::queue< uint8_t >(); - for( int32_t i = 1; i < 26; i++ ) - m_freeHateSlotQueue.push( i ); + m_freeHateSlotQueue = std::queue< uint8_t >(); + for( int32_t i = 1; i < 26; i++ ) + m_freeHateSlotQueue.push( i ); } void Core::Entity::Player::sendHateList() { - auto hateListPacket = makeZonePacket< FFXIVIpcHateList >( getId() ); - hateListPacket->data().numEntries = m_actorIdTohateSlotMap.size(); - auto it = m_actorIdTohateSlotMap.begin(); - for( int32_t i = 0; it != m_actorIdTohateSlotMap.end(); ++it, i++ ) - { - hateListPacket->data().entry[i].actorId = it->first; - hateListPacket->data().entry[i].hatePercent = 100; - } - queuePacket( hateListPacket ); + auto hateListPacket = makeZonePacket< FFXIVIpcHateList >( getId() ); + hateListPacket->data().numEntries = m_actorIdTohateSlotMap.size(); + auto it = m_actorIdTohateSlotMap.begin(); + for( int32_t i = 0; it != m_actorIdTohateSlotMap.end(); ++it, i++ ) + { + hateListPacket->data().entry[ i ].actorId = it->first; + hateListPacket->data().entry[ i ].hatePercent = 100; + } + queuePacket( hateListPacket ); } bool Core::Entity::Player::isLogin() const { - return m_bIsLogin; + return m_bIsLogin; } void Core::Entity::Player::setIsLogin( bool bIsLogin ) { - m_bIsLogin = bIsLogin; + m_bIsLogin = bIsLogin; } uint8_t* Core::Entity::Player::getTitleList() { - return m_titleList; + return m_titleList; } const uint8_t* Core::Entity::Player::getTitleList() const { - return m_titleList; + return m_titleList; } uint16_t Core::Entity::Player::getTitle() const { - return m_activeTitle; + return m_activeTitle; } void Core::Entity::Player::addTitle( uint16_t titleId ) { - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( titleId, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( titleId, value, index ); - m_titleList[index] |= value; + m_titleList[ index ] |= value; } void Core::Entity::Player::setTitle( uint16_t titleId ) { - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( titleId, value, index ); + uint16_t index; + uint8_t value; + Util::valueToFlagByteIndexValue( titleId, value, index ); - if ( ( m_titleList[index] & value ) == 0 ) // Player doesn't have title - bail - return; + if( ( m_titleList[ index ] & value ) == 0 ) // Player doesn't have title - bail + return; - m_activeTitle = titleId; + m_activeTitle = titleId; - sendToInRangeSet( makeActorControl142( getId(), SetTitle, titleId ), true ); + sendToInRangeSet( makeActorControl142( getId(), SetTitle, titleId ), true ); } void Core::Entity::Player::setEquipDisplayFlags( uint8_t state ) { - m_equipDisplayFlags = state; - auto paramPacket = makeZonePacket< FFXIVIpcEquipDisplayFlags >( getId() ); - paramPacket->data().bitmask = m_equipDisplayFlags; - sendToInRangeSet( paramPacket, true ); + m_equipDisplayFlags = state; + auto paramPacket = makeZonePacket< FFXIVIpcEquipDisplayFlags >( getId() ); + paramPacket->data().bitmask = m_equipDisplayFlags; + sendToInRangeSet( paramPacket, true ); } uint8_t Core::Entity::Player::getEquipDisplayFlags() const { - return m_equipDisplayFlags; + return m_equipDisplayFlags; } void Core::Entity::Player::mount( uint32_t id ) { - m_mount = id; - sendToInRangeSet( makeActorControl142( getId(), ActorControlType::SetStatus, - static_cast< uint8_t >( Common::ActorStatus::Mounted ) ), true ); - sendToInRangeSet( makeActorControl143( getId(), 0x39e, 12 ), true ); //? + m_mount = id; + sendToInRangeSet( makeActorControl142( getId(), ActorControlType::SetStatus, + static_cast< uint8_t >( Common::ActorStatus::Mounted ) ), true ); + sendToInRangeSet( makeActorControl143( getId(), 0x39e, 12 ), true ); //? - auto mountPacket = makeZonePacket< FFXIVIpcMount >( getId() ); - mountPacket->data().id = id; - sendToInRangeSet( mountPacket, true ); + auto mountPacket = makeZonePacket< FFXIVIpcMount >( getId() ); + mountPacket->data().id = id; + sendToInRangeSet( mountPacket, true ); } void Core::Entity::Player::dismount() { - sendToInRangeSet( makeActorControl142( getId(), ActorControlType::SetStatus, - static_cast< uint8_t >( Common::ActorStatus::Idle ) ), true ); - sendToInRangeSet( makeActorControl143( getId(), ActorControlType::Dismount, 1 ), true ); - m_mount = 0; + sendToInRangeSet( makeActorControl142( getId(), ActorControlType::SetStatus, + static_cast< uint8_t >( Common::ActorStatus::Idle ) ), true ); + sendToInRangeSet( makeActorControl143( getId(), ActorControlType::Dismount, 1 ), true ); + m_mount = 0; } uint8_t Core::Entity::Player::getCurrentMount() const { - return m_mount; + return m_mount; } void Core::Entity::Player::setPersistentEmote( uint32_t emoteId ) { - m_emoteMode = emoteId; + m_emoteMode = emoteId; } uint32_t Core::Entity::Player::getPersistentEmote() const { - return m_emoteMode; + return m_emoteMode; } void Core::Entity::Player::autoAttack( CharaPtr pTarget ) { - auto mainWeap = getItemAt( Common::GearSet0, Common::GearSetSlot::MainHand ); + auto mainWeap = getItemAt( Common::GearSet0, Common::GearSetSlot::MainHand ); - pTarget->onActionHostile( *this ); - //uint64_t tick = Util::getTimeMs(); - //srand(static_cast< uint32_t >(tick)); + pTarget->onActionHostile( *this ); + //uint64_t tick = Util::getTimeMs(); + //srand(static_cast< uint32_t >(tick)); - uint32_t damage = static_cast< uint32_t >( mainWeap->getAutoAttackDmg() ); - uint32_t variation = 0 + rand() % 3; + uint32_t damage = static_cast< uint32_t >( mainWeap->getAutoAttackDmg() ); + uint32_t variation = 0 + rand() % 3; - if( getClass() == ClassJob::Machinist || getClass() == ClassJob::Bard || getClass() == ClassJob::Archer ) - { - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 8 ); - effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); + if( getClass() == ClassJob::Machinist || getClass() == ClassJob::Bard || getClass() == ClassJob::Archer ) + { + auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 8 ); + effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); - Server::EffectEntry entry; - entry.value = damage; - entry.effectType = Common::ActionEffectType::Damage; - entry.hitSeverity = Common::ActionHitSeverityType::NormalDamage; + Server::EffectEntry entry; + entry.value = damage; + entry.effectType = Common::ActionEffectType::Damage; + entry.hitSeverity = Common::ActionHitSeverityType::NormalDamage; - effectPacket->addEffect( entry ); + effectPacket->addEffect( entry ); - sendToInRangeSet( effectPacket, true ); - } - else - { - auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 7 ); - effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); + sendToInRangeSet( effectPacket, true ); + } + else + { + auto effectPacket = boost::make_shared< Server::EffectPacket >( getId(), pTarget->getId(), 7 ); + effectPacket->setRotation( Math::Util::floatToUInt16Rot( getRot() ) ); - Server::EffectEntry entry; - entry.value = damage; - entry.effectType = Common::ActionEffectType::Damage; - entry.hitSeverity = Common::ActionHitSeverityType::NormalDamage; + Server::EffectEntry entry; + entry.value = damage; + entry.effectType = Common::ActionEffectType::Damage; + entry.hitSeverity = Common::ActionHitSeverityType::NormalDamage; - effectPacket->addEffect( entry ); + effectPacket->addEffect( entry ); - sendToInRangeSet( effectPacket, true ); + sendToInRangeSet( effectPacket, true ); - } + } - pTarget->takeDamage( damage ); + pTarget->takeDamage( damage ); } @@ -1466,284 +1476,287 @@ void Core::Entity::Player::autoAttack( CharaPtr pTarget ) ///////////////////////////// uint32_t Core::Entity::Player::getCFPenaltyTimestamp() const { - return m_cfPenaltyUntil; + return m_cfPenaltyUntil; } void Core::Entity::Player::setCFPenaltyTimestamp( uint32_t timestamp ) { - m_cfPenaltyUntil = timestamp; + m_cfPenaltyUntil = timestamp; } uint32_t Core::Entity::Player::getCFPenaltyMinutes() const { - auto currentTimestamp = Core::Util::getTimeSeconds(); - auto endTimestamp = getCFPenaltyTimestamp(); + auto currentTimestamp = Core::Util::getTimeSeconds(); + auto endTimestamp = getCFPenaltyTimestamp(); - // check if penalty timestamp already passed current time - if( currentTimestamp > endTimestamp ) - return 0; + // check if penalty timestamp already passed current time + if( currentTimestamp > endTimestamp ) + return 0; - auto deltaTime = endTimestamp - currentTimestamp; - return static_cast< uint32_t > ( ceil( static_cast< float > (deltaTime) / 60 ) ); + auto deltaTime = endTimestamp - currentTimestamp; + return static_cast< uint32_t > ( ceil( static_cast< float > (deltaTime) / 60 ) ); } void Core::Entity::Player::setCFPenaltyMinutes( uint32_t minutes ) { - auto currentTimestamp = Core::Util::getTimeSeconds(); - setCFPenaltyTimestamp( static_cast< uint32_t >( currentTimestamp + minutes * 60 ) ); + auto currentTimestamp = Core::Util::getTimeSeconds(); + setCFPenaltyTimestamp( static_cast< uint32_t >( currentTimestamp + minutes * 60 ) ); } uint8_t Core::Entity::Player::getOpeningSequence() const { - return m_openingSequence; + return m_openingSequence; } void Core::Entity::Player::setOpeningSequence( uint8_t seq ) { - m_openingSequence = seq; + m_openingSequence = seq; } uint16_t Core::Entity::Player::getItemLevel() const { - return m_itemLevel; + return m_itemLevel; } /// Tells client to offset their eorzean time by given timestamp. void Core::Entity::Player::setEorzeaTimeOffset( uint64_t timestamp ) { - // TODO: maybe change to persistent? - auto packet = makeZonePacket< FFXIVIpcEorzeaTimeOffset >( getId() ); - packet->data().timestamp = timestamp; + // TODO: maybe change to persistent? + auto packet = makeZonePacket< FFXIVIpcEorzeaTimeOffset >( getId() ); + packet->data().timestamp = timestamp; - // Send to single player - queuePacket( packet ); + // Send to single player + queuePacket( packet ); } void Core::Entity::Player::setTerritoryId( uint32_t territoryId ) { - m_zoneId = territoryId; + m_zoneId = territoryId; } uint32_t Core::Entity::Player::getTerritoryId() const { - return m_zoneId; + return m_zoneId; } void Core::Entity::Player::sendZonePackets() { - getCurrentZone()->onBeforePlayerZoneIn( *this ); + getCurrentZone()->onBeforePlayerZoneIn( *this ); - auto initPacket = makeZonePacket< FFXIVIpcInit >( getId() ); - initPacket->data().charId = getId(); - queuePacket( initPacket ); + auto initPacket = makeZonePacket< FFXIVIpcInit >( getId() ); + initPacket->data().charId = getId(); + queuePacket( initPacket ); - sendInventory(); + sendInventory(); - if( isLogin() ) - { - queuePacket( makeActorControl143( getId(), SetCharaGearParamUI, m_equipDisplayFlags, 1 ) ); - } + if( isLogin() ) + { + queuePacket( makeActorControl143( getId(), SetCharaGearParamUI, m_equipDisplayFlags, 1 ) ); + } - // set flags, will be reset automatically by zoning ( only on client side though ) - //setStateFlag( PlayerStateFlag::BetweenAreas ); - //setStateFlag( PlayerStateFlag::BetweenAreas1 ); + // set flags, will be reset automatically by zoning ( only on client side though ) + //setStateFlag( PlayerStateFlag::BetweenAreas ); + //setStateFlag( PlayerStateFlag::BetweenAreas1 ); - sendStats(); + sendStats(); - // only initialize the UI if the player in fact just logged in. - if( isLogin() ) - { - auto contentFinderList = makeZonePacket< FFXIVIpcCFAvailableContents >( getId() ); + // only initialize the UI if the player in fact just logged in. + if( isLogin() ) + { + auto contentFinderList = makeZonePacket< FFXIVIpcCFAvailableContents >( getId() ); - for( auto i = 0; i < sizeof( contentFinderList->data().contents ); i++ ) - { - // unlock all contents for now - contentFinderList->data().contents[i] = 0xFF; - } - queuePacket( contentFinderList ); + for( auto i = 0; i < sizeof( contentFinderList->data().contents ); i++ ) + { + // unlock all contents for now + contentFinderList->data().contents[ i ] = 0xFF; + } + queuePacket( contentFinderList ); - queuePacket( boost::make_shared< InitUIPacket >( *this ) ); + queuePacket( boost::make_shared< InitUIPacket >( *this ) ); - auto classInfoPacket = makeZonePacket< FFXIVIpcPlayerClassInfo >( getId() ); - classInfoPacket->data().classId = static_cast< uint8_t >( getClass() ); - classInfoPacket->data().unknown = 1; - classInfoPacket->data().level = getLevel(); - classInfoPacket->data().level1 = getLevel(); - queuePacket( classInfoPacket ); + auto classInfoPacket = makeZonePacket< FFXIVIpcPlayerClassInfo >( getId() ); + classInfoPacket->data().classId = static_cast< uint8_t >( getClass() ); + classInfoPacket->data().unknown = 1; + classInfoPacket->data().level = getLevel(); + classInfoPacket->data().level1 = getLevel(); + queuePacket( classInfoPacket ); - m_itemLevel = calculateEquippedGearItemLevel(); - sendItemLevel(); - } + m_itemLevel = calculateEquippedGearItemLevel(); + sendItemLevel(); + } - auto initZonePacket = makeZonePacket< FFXIVIpcInitZone >( getId() ); - initZonePacket->data().zoneId = getCurrentZone()->getTerritoryId(); - initZonePacket->data().weatherId = static_cast< uint8_t >( getCurrentZone()->getCurrentWeather() ); - initZonePacket->data().bitmask = 0x1; - initZonePacket->data().unknown5 = 0x2A; - initZonePacket->data().festivalId = getCurrentZone()->getCurrentFestival(); - initZonePacket->data().pos.x = getPos().x; - initZonePacket->data().pos.y = getPos().y; - initZonePacket->data().pos.z = getPos().z; - queuePacket( initZonePacket ); + auto initZonePacket = makeZonePacket< FFXIVIpcInitZone >( getId() ); + initZonePacket->data().zoneId = getCurrentZone()->getTerritoryId(); + initZonePacket->data().weatherId = static_cast< uint8_t >( getCurrentZone()->getCurrentWeather() ); + initZonePacket->data().bitmask = 0x1; + initZonePacket->data().unknown5 = 0x2A; + initZonePacket->data().festivalId = getCurrentZone()->getCurrentFestival(); + initZonePacket->data().pos.x = getPos().x; + initZonePacket->data().pos.y = getPos().y; + initZonePacket->data().pos.z = getPos().z; + queuePacket( initZonePacket ); - if( isLogin() ) - { - auto unk322 = makeZonePacket< FFXIVARR_IPC_UNK322 >( getId() ); - queuePacket( unk322 ); + if( isLogin() ) + { + auto unk322 = makeZonePacket< FFXIVARR_IPC_UNK322 >( getId() ); + queuePacket( unk322 ); - auto unk320 = makeZonePacket< FFXIVARR_IPC_UNK320 >( getId() ); - queuePacket( unk320 ); - } + auto unk320 = makeZonePacket< FFXIVARR_IPC_UNK320 >( getId() ); + queuePacket( unk320 ); + } - if( getLastPing() == 0 ) - sendQuestInfo(); + if( getLastPing() == 0 ) + sendQuestInfo(); - getCurrentZone()->onPlayerZoneIn( *this ); + getCurrentZone()->onPlayerZoneIn( *this ); - m_bMarkedForZoning = false; + m_bMarkedForZoning = false; } void Core::Entity::Player::setDirectorInitialized( bool isInitialized ) { - m_directorInitialized = isInitialized; + m_directorInitialized = isInitialized; } bool Core::Entity::Player::isDirectorInitialized() const { - return m_directorInitialized; + return m_directorInitialized; } void Core::Entity::Player::sendTitleList() { - auto titleListPacket = makeZonePacket< FFXIVIpcPlayerTitleList >( getId() ); - memcpy( titleListPacket->data().titleList, getTitleList(), sizeof( titleListPacket->data().titleList ) ); + auto titleListPacket = makeZonePacket< FFXIVIpcPlayerTitleList >( getId() ); + memcpy( titleListPacket->data().titleList, getTitleList(), sizeof( titleListPacket->data().titleList ) ); - queuePacket( titleListPacket ); + queuePacket( titleListPacket ); } -void Core::Entity::Player::sendZoneInPackets( uint32_t param1, uint32_t param2 = 0, uint32_t param3 = 0, uint32_t param4 = 0, bool shouldSetStatus = false ) +void +Core::Entity::Player::sendZoneInPackets( uint32_t param1, uint32_t param2 = 0, uint32_t param3 = 0, uint32_t param4 = 0, + bool shouldSetStatus = false ) { - auto zoneInPacket = makeActorControl143( getId(), ZoneIn, param1, param2, param3, param4 ); - auto SetStatusPacket = makeActorControl142( getId(), SetStatus, static_cast< uint8_t >( Common::ActorStatus::Idle ) ); + auto zoneInPacket = makeActorControl143( getId(), ZoneIn, param1, param2, param3, param4 ); + auto SetStatusPacket = makeActorControl142( getId(), SetStatus, static_cast< uint8_t >( Common::ActorStatus::Idle ) ); - if( !getGmInvis() ) - sendToInRangeSet( zoneInPacket, true ); - if( shouldSetStatus ) - sendToInRangeSet( SetStatusPacket ); - else - queuePacket( zoneInPacket ); - if ( shouldSetStatus ) - queuePacket( SetStatusPacket ); + if( !getGmInvis() ) + sendToInRangeSet( zoneInPacket, true ); + if( shouldSetStatus ) + sendToInRangeSet( SetStatusPacket ); + else + queuePacket( zoneInPacket ); + if( shouldSetStatus ) + queuePacket( SetStatusPacket ); - setZoningType( Common::ZoneingType::None ); - unsetStateFlag( PlayerStateFlag::BetweenAreas ); + setZoningType( Common::ZoneingType::None ); + unsetStateFlag( PlayerStateFlag::BetweenAreas ); } void Core::Entity::Player::finishZoning() { - switch( getZoningType() ) - { - case ZoneingType::None: - sendZoneInPackets( 0x01 ); - break; - - case ZoneingType::Teleport: - sendZoneInPackets( 0x01, 0, 0, 110 ); - break; - - case ZoneingType::Return: - case ZoneingType::ReturnDead: - { - if( getStatus() == Common::ActorStatus::Dead ) - { - resetHp(); - resetMp(); - setStatus( Common::ActorStatus::Idle ); - sendZoneInPackets( 0x01, 0x01, 0, 111, true ); - } - else - sendZoneInPackets( 0x01, 0x00, 0, 111 ); - } + switch( getZoningType() ) + { + case ZoneingType::None: + sendZoneInPackets( 0x01 ); break; - case ZoneingType::FadeIn: - break; - } + case ZoneingType::Teleport: + sendZoneInPackets( 0x01, 0, 0, 110 ); + break; + + case ZoneingType::Return: + case ZoneingType::ReturnDead: + { + if( getStatus() == Common::ActorStatus::Dead ) + { + resetHp(); + resetMp(); + setStatus( Common::ActorStatus::Idle ); + sendZoneInPackets( 0x01, 0x01, 0, 111, true ); + } + else + sendZoneInPackets( 0x01, 0x00, 0, 111 ); + } + break; + + case ZoneingType::FadeIn: + break; + } } void Core::Entity::Player::emote( uint32_t emoteId, uint64_t targetId, bool isSilent ) { - sendToInRangeSet( makeActorControl144( getId(), ActorControlType::Emote, - emoteId, 0, isSilent ? 1 : 0, 0, targetId ) ); + sendToInRangeSet( makeActorControl144( getId(), ActorControlType::Emote, + emoteId, 0, isSilent ? 1 : 0, 0, targetId ) ); } void Core::Entity::Player::emoteInterrupt() { - sendToInRangeSet( makeActorControl142( getId(), ActorControlType::EmoteInterrupt ) ); + sendToInRangeSet( makeActorControl142( getId(), ActorControlType::EmoteInterrupt ) ); } void Core::Entity::Player::teleportQuery( uint16_t aetheryteId ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - // TODO: only register this action if enough gil is in possession - auto targetAetheryte = pExdData->get< Core::Data::Aetheryte >( aetheryteId ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + // TODO: only register this action if enough gil is in possession + auto targetAetheryte = pExdData->get< Core::Data::Aetheryte >( aetheryteId ); - if( targetAetheryte ) - { - auto fromAetheryte = pExdData->get< Core::Data::Aetheryte >( - pExdData->get< Core::Data::TerritoryType >( getZoneId() )->aetheryte ); + if( targetAetheryte ) + { + auto fromAetheryte = pExdData->get< Core::Data::Aetheryte >( + pExdData->get< Core::Data::TerritoryType >( getZoneId() )->aetheryte ); - // calculate cost - does not apply for favorite points or homepoints neither checks for aether tickets - auto cost = static_cast< uint16_t > ( ( sqrt( pow( fromAetheryte->aetherstreamX - targetAetheryte->aetherstreamX, 2 ) + - pow( fromAetheryte->aetherstreamY - targetAetheryte->aetherstreamY, 2 ) ) / 2 ) + 100 ); + // calculate cost - does not apply for favorite points or homepoints neither checks for aether tickets + auto cost = static_cast< uint16_t > ( + ( sqrt( pow( fromAetheryte->aetherstreamX - targetAetheryte->aetherstreamX, 2 ) + + pow( fromAetheryte->aetherstreamY - targetAetheryte->aetherstreamY, 2 ) ) / 2 ) + 100 ); - // cap at 999 gil - cost = cost > uint16_t{999} ? uint16_t{999} : cost; + // cap at 999 gil + cost = cost > uint16_t{ 999 } ? uint16_t{ 999 } : cost; - bool insufficientGil = getCurrency( Common::CurrencyType::Gil ) < cost; - // TODO: figure out what param1 really does - queuePacket( makeActorControl143( getId(), TeleportStart, insufficientGil ? 2 : 0, aetheryteId ) ); + bool insufficientGil = getCurrency( Common::CurrencyType::Gil ) < cost; + // TODO: figure out what param1 really does + queuePacket( makeActorControl143( getId(), TeleportStart, insufficientGil ? 2 : 0, aetheryteId ) ); - if( !insufficientGil ) - { - Action::ActionPtr pActionTeleport; - pActionTeleport = Action::make_ActionTeleport( getAsPlayer(), aetheryteId, cost ); - setCurrentAction( pActionTeleport ); - } - } + if( !insufficientGil ) + { + Action::ActionPtr pActionTeleport; + pActionTeleport = Action::make_ActionTeleport( getAsPlayer(), aetheryteId, cost ); + setCurrentAction( pActionTeleport ); + } + } } uint8_t Core::Entity::Player::getNextObjSpawnIndexForActorId( uint32_t actorId ) { - return m_objSpawnIndexAllocator.getNextFreeSpawnIndex( actorId ); + return m_objSpawnIndexAllocator.getNextFreeSpawnIndex( actorId ); } void Core::Entity::Player::resetObjSpawnIndex() { - m_objSpawnIndexAllocator.freeAllSpawnIndexes(); + m_objSpawnIndexAllocator.freeAllSpawnIndexes(); } void Core::Entity::Player::freeObjSpawnIndexForActorId( uint32_t actorId ) { - auto spawnId = m_objSpawnIndexAllocator.freeUsedSpawnIndex( actorId ); + auto spawnId = m_objSpawnIndexAllocator.freeUsedSpawnIndex( actorId ); - auto freeObjectSpawnPacket = makeZonePacket< FFXIVIpcObjectDespawn >( getId() ); - freeObjectSpawnPacket->data().spawnIndex = spawnId; - queuePacket( freeObjectSpawnPacket ); + auto freeObjectSpawnPacket = makeZonePacket< FFXIVIpcObjectDespawn >( getId() ); + freeObjectSpawnPacket->data().spawnIndex = spawnId; + queuePacket( freeObjectSpawnPacket ); } bool Core::Entity::Player::isObjSpawnIndexValid( uint8_t index ) { - return m_objSpawnIndexAllocator.isSpawnIndexValid( index ); + return m_objSpawnIndexAllocator.isSpawnIndexValid( index ); } void Core::Entity::Player::setOnEnterEventDone( bool isDone ) { - m_onEnterEventDone = isDone; + m_onEnterEventDone = isDone; } bool Core::Entity::Player::isOnEnterEventDone() const { - return m_onEnterEventDone; + return m_onEnterEventDone; } diff --git a/src/servers/sapphire_zone/Actor/Player.h b/src/servers/sapphire_zone/Actor/Player.h index 02720bab..43376fc7 100644 --- a/src/servers/sapphire_zone/Actor/Player.h +++ b/src/servers/sapphire_zone/Actor/Player.h @@ -17,753 +17,1008 @@ namespace Entity { struct QueuedZoning { - uint16_t m_targetZone; - Common::FFXIVARR_POSITION3 m_targetPosition; - float m_targetRotation; - uint64_t m_queueTime; + uint16_t m_targetZone; + Common::FFXIVARR_POSITION3 m_targetPosition; + float m_targetRotation; + uint64_t m_queueTime; - QueuedZoning( uint16_t targetZone, const Common::FFXIVARR_POSITION3& targetPosition, - uint64_t queuedTime, float targetRotation ) : - m_targetZone( targetZone ), - m_targetPosition( targetPosition ), - m_queueTime( queuedTime ), - m_targetRotation( targetRotation ) - {} + QueuedZoning( uint16_t targetZone, const Common::FFXIVARR_POSITION3& targetPosition, + uint64_t queuedTime, float targetRotation ) : + m_targetZone( targetZone ), + m_targetPosition( targetPosition ), + m_queueTime( queuedTime ), + m_targetRotation( targetRotation ) + { + } }; /** Class representing the Player * Inheriting from Actor * */ -class Player : public Chara +class Player : + public Chara { public: - /*! Contructor */ - Player(); - - /*! Destructor */ - ~Player(); - - void autoAttack( CharaPtr pTarget ) override; - - void injectPacket( std::string path ); - - // EventHandlers - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! start an event action */ - void eventActionStart( uint32_t eventId, uint32_t action, ActionCallback finishCallback, ActionCallback interruptCallback, uint64_t additional ); - /*! start an event item action */ - void eventItemActionStart( uint32_t eventId, uint32_t action, ActionCallback finishCallback, 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, uint32_t eventParam2 ); - /*! play a subevent */ - void playScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, uint32_t eventParam3 ); - - void playGilShop( uint32_t eventId, uint32_t flags, - Event::EventHandler::SceneReturnCallback eventCallback ); - - void directorPlayScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam3, uint32_t eventParam4, uint32_t eventParam5 = 0 ); - - /*! play a subevent */ - void playScene( uint32_t eventId, uint32_t scene, uint32_t flags, - uint32_t eventParam2, uint32_t eventParam3, Event::EventHandler::SceneReturnCallback eventReturnCallback ); - /*! play a subevent */ - void playScene( uint32_t eventId, uint32_t scene, uint32_t flags, - uint32_t eventParam2, uint32_t eventParam3, uint32_t eventParam4, - Event::EventHandler::SceneReturnCallback eventReturnCallback ); - /*! play a subevent */ - void playScene( uint32_t eventId, uint32_t scene, uint32_t flags, - Event::EventHandler::SceneReturnCallback eventReturnCallback ); - /*! play a subevent */ - void playScene( uint32_t eventId, uint32_t scene, uint32_t flags ); - /*! play a subevent */ - void playSceneChain( uint32_t eventId, uint32_t scene, uint32_t flags, - uint32_t eventParam2, uint32_t eventParam3, uint32_t eventParam4, - Event::EventHandler::SceneChainCallback sceneChainCallback ); - /*! play a subevent */ - void playSceneChain( uint32_t eventId, uint32_t scene, uint32_t flags, - uint32_t eventParam2, uint32_t eventParam3, - Event::EventHandler::SceneChainCallback sceneChainCallback ); - /*! play a subevent */ - void playSceneChain( uint32_t eventId, uint32_t scene, uint32_t flags, - Event::EventHandler::SceneChainCallback sceneChainCallback ); - /*! setup the event and return a ptr to it */ - Event::EventHandlerPtr bootstrapSceneEvent( uint32_t eventId, uint32_t flags ); - /*! finish / unregister an event */ - void eventFinish( uint32_t eventId, uint32_t freePlayer ); - /*! add an event to the event array */ - void addEvent( Event::EventHandlerPtr pEvent ); - /*! retrieve an event from the event array */ - Event::EventHandlerPtr getEvent( uint32_t eventId ); - /*! get number of active events */ - size_t getEventCount(); - /*! remove an event from the event array */ - void removeEvent( uint32_t eventId ); - /*! return the eventlist */ - std::map< uint32_t, Event::EventHandlerPtr >& eventList(); - - void checkEvent( uint32_t eventId ); - - - - // Events - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! Event to be called when zoning process gets triggered */ - void onZoneStart(); - /*! Event to be called when zoning process is finished */ - void onZoneDone(); - /*! Event to be called on login */ - void onLogin(); - /*! Event to be called on update tick */ - void onTick() override; - /*! Event to be called upon player death */ - void onDeath() override; - /*! Event called on every session iteration */ - void update( int64_t currTime ) override; - /*! Event to be called upon Bnpc kill */ - void onMobKill( uint16_t nameId ); - - - // Quest - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! load data for currently active quests */ - bool loadActiveQuests(); - /*! update quest ( register it as active quest if new ) */ - void updateQuest( uint16_t questId, uint8_t sequence ); - /*! return true if quest is currently active */ - bool hasQuest( uint32_t questId ); - /*! return the current quest sequence */ - uint8_t getQuestSeq( uint16_t questId ); - /*! send the quest tracker packet */ - void sendQuestTracker(); - /*! set quest tracker flag for a specified slot */ - void setQuestTracker( uint16_t index, int16_t flag ); - /*! return the index of a given quest in the players quest list */ - int8_t getQuestIndex( uint16_t questId ); - /*! finish a given quest */ - void finishQuest( uint16_t questId ); - /*! finish a given quest */ - void unfinishQuest( uint16_t questId ); - /*! remove a given quest */ - void removeQuest( uint16_t questId ); - /*! add a quest to the completed quests mask */ - void updateQuestsCompleted( uint32_t questId ); - /*! remove a quest from the completed quest mask */ - void removeQuestsCompleted( uint32_t questId ); - /*! get the curent opening sequence */ - uint8_t getOpeningSequence() const; - /*! set te current opening sequence */ - void setOpeningSequence( uint8_t seq ); - - bool giveQuestRewards( uint32_t questId, uint32_t optionalChoice ); - - boost::shared_ptr< Common::QuestActive > getQuestActive( uint16_t index ); - - uint8_t getQuestUI8A( uint16_t questId ); - uint8_t getQuestUI8B( uint16_t questId ); - uint8_t getQuestUI8C( uint16_t questId ); - uint8_t getQuestUI8D( uint16_t questId ); - uint8_t getQuestUI8E( uint16_t questId ); - uint8_t getQuestUI8F( uint16_t questId ); - uint8_t getQuestUI8AH( uint16_t questId ); - uint8_t getQuestUI8BH( uint16_t questId ); - uint8_t getQuestUI8CH( uint16_t questId ); - uint8_t getQuestUI8DH( uint16_t questId ); - uint8_t getQuestUI8EH( uint16_t questId ); - uint8_t getQuestUI8FH( uint16_t questId ); - uint8_t getQuestUI8AL( uint16_t questId ); - uint8_t getQuestUI8BL( uint16_t questId ); - uint8_t getQuestUI8CL( uint16_t questId ); - uint8_t getQuestUI8DL( uint16_t questId ); - uint8_t getQuestUI8EL( uint16_t questId ); - uint8_t getQuestUI8FL( uint16_t questId ); - uint16_t getQuestUI16A( uint16_t questId ); - uint16_t getQuestUI16B( uint16_t questId ); - uint16_t getQuestUI16C( uint16_t questId ); - uint32_t getQuestUI32A( uint16_t questId ); - - bool getQuestBitFlag8( uint16_t questId, uint8_t index ); - bool getQuestBitFlag16( uint16_t questId, uint8_t index ); - bool getQuestBitFlag24( uint16_t questId, uint8_t index ); - bool getQuestBitFlag32( uint16_t questId, uint8_t index ); - bool getQuestBitFlag40( uint16_t questId, uint8_t index ); - bool getQuestBitFlag48( uint16_t questId, uint8_t index ); - - - void setQuestUI8A( uint16_t questId, uint8_t val ); - void setQuestUI8B( uint16_t questId, uint8_t val ); - void setQuestUI8C( uint16_t questId, uint8_t val ); - void setQuestUI8D( uint16_t questId, uint8_t val ); - void setQuestUI8E( uint16_t questId, uint8_t val ); - void setQuestUI8F( uint16_t questId, uint8_t val ); - void setQuestUI8AH( uint16_t questId, uint8_t val ); - void setQuestUI8BH( uint16_t questId, uint8_t val ); - void setQuestUI8CH( uint16_t questId, uint8_t val ); - void setQuestUI8DH( uint16_t questId, uint8_t val ); - void setQuestUI8EH( uint16_t questId, uint8_t val ); - void setQuestUI8FH( uint16_t questId, uint8_t val ); - void setQuestUI8AL( uint16_t questId, uint8_t val ); - void setQuestUI8BL( uint16_t questId, uint8_t val ); - void setQuestUI8CL( uint16_t questId, uint8_t val ); - void setQuestUI8DL( uint16_t questId, uint8_t val ); - void setQuestUI8EL( uint16_t questId, uint8_t val ); - void setQuestUI8FL( uint16_t questId, uint8_t val ); - void setQuestUI16A( uint16_t questId, uint16_t val ); - void setQuestUI16B( uint16_t questId, uint16_t val ); - void setQuestUI16C( uint16_t questId, uint16_t val ); - void setQuestUI32A( uint16_t questId, uint32_t val ); - - void setQuestBitFlag8( uint16_t questId, uint8_t index, bool val ); - void setQuestBitFlag16( uint16_t questId, uint8_t index, bool val ); - void setQuestBitFlag24( uint16_t questId, uint8_t index, bool val ); - void setQuestBitFlag32( uint16_t questId, uint8_t index, bool val ); - void setQuestBitFlag40( uint16_t questId, uint8_t index, bool val ); - void setQuestBitFlag48( uint16_t questId, uint8_t index, bool val ); - - // Inventory / Item / Currency - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! equip an item to a specified slot */ - void equipItem( Common::GearSetSlot equipSlotId, ItemPtr pItem, bool sendModel ); - /*! remove an item from an equipment slot */ - void unequipItem( Common::GearSetSlot equipSlotId, ItemPtr pItem ); - /*! equip a weapon, possibly forcing a job change */ - void equipWeapon( ItemPtr pItem ); - /*! get player ilvl */ - uint16_t getItemLevel() const; - /*! send player ilvl */ - void sendItemLevel(); - /*! get the current main hand model */ - uint64_t getModelMainWeapon() const; - /*! get the current off hand model */ - uint64_t getModelSubWeapon() const; - /*! get the current system hand model */ - uint64_t getModelSystemWeapon() const; - /*! return a const pointer to the model array */ - const uint32_t* getModelArray() const; - /*! return the equipment model in a specified equipment slot */ - uint32_t getModelForSlot( Common::GearSetSlot slot ); - /*! set the equipment model in a specified equipment slot */ - void setModelForSlot( Common::GearSetSlot slot, uint32_t val ); - /*! add amount to the currency of type */ - void addCurrency( Common::CurrencyType type, uint32_t amount ); - /*! remove amount from the currency of type */ - void removeCurrency( Common::CurrencyType type, uint32_t amount ); - /*! return the current amount of crystals of type */ - uint32_t getCrystal( uint8_t type ) const; - - // Class / Job / Exp - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! returns the level of the currently active class / job */ - uint8_t getLevel() const override; - /*! returns the level of the provided class / job */ - uint8_t getLevelForClass( Common::ClassJob pClass ) const; - /*! returns if the classjob is unlocked */ - bool isClassJobUnlocked( Common::ClassJob classJob ) const; - /*! returns the exp of the currently active class / job */ - uint32_t getExp() const; - /*! sets the exp of the currently active class / job */ - void setExp( uint32_t amount ); - /*! adds exp to the currently active class / job */ - void gainExp( uint32_t amount ); - /*! gain a level on the currently active class / job */ - void gainLevel(); - /*! set level on the currently active class / job to given level */ - void setLevel( uint8_t level ); - /*! set level on the provided class / job to given level */ - void setLevelForClass( uint8_t level, Common::ClassJob classjob ); - /*! change class or job to given class / job */ - void setClassJob( Common::ClassJob classJob ); - /*! returns a pointer to the class array */ - uint16_t* getClassArray(); - /*! returns a const pointer to the class array */ - const uint16_t* getClassArray() const; - /*! returns a pointer to the exp array */ - uint32_t* getExpArray(); - /*! returns a const pointer to the exp array */ - const uint32_t* getExpArray() const; - - // Base Look / Stats / Params - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! return the birth day */ - uint8_t getBirthDay() const; - /*! return the birth month */ - uint8_t getBirthMonth() const; - /*! return the guardian diety Id */ - uint8_t getGuardianDeity() const; - /*! get look at specified index */ - uint8_t getLookAt( uint8_t index ) const; - /*! return the race */ - uint8_t getRace() const; - /*! return gender 0 male, 1 female */ - uint8_t getGender() const; - /*! return the id of the home town */ - uint8_t getStartTown() const; - /*! return the voice id */ - uint8_t getVoiceId() const; - /*! return the grand company */ - uint8_t getGc() const; - /*! return the grand company rank */ - const uint8_t* getGcRankArray() const; - /*! set look at index */ - void setLookAt( uint8_t index, uint8_t value ); - /*! set the voice Id */ - void setVoiceId( uint8_t voiceId ); - /*! set the grand company */ - void setGc( uint8_t gc ); - /*! set the grand company rank */ - void setGcRankAt( uint8_t index, uint8_t rank ); - /*! return a const pointer to the look array */ - const uint8_t* getLookArray() const; - /*! returns true if the player is currently in combat */ - bool isInCombat() const; - /*! sets players combat state */ - void setInCombat( bool mode ); - /*! return current online status depending on current state / activity */ - Common::OnlineStatus getOnlineStatus() const; - /*! sets the players zone, initiating a zoning process */ - void setZone( uint32_t zoneId ); - /*! sets the players instance & initiates zoning process */ - bool setInstance( uint32_t instanceContentId ); - /*! sets the players instance & initiates zoning process */ - bool setInstance( ZonePtr instance ); - /*! returns the player to their position before zoning into an instance */ - bool exitInstance(); - /*! sets the players territoryId */ - void setTerritoryId( uint32_t territoryId ); - /*! gets the players territoryId */ - uint32_t getTerritoryId() const; - - void forceZoneing( uint32_t zoneId ); - /*! return player to preset homepoint */ - void returnToHomepoint(); - /*! change position, sends update too */ - void changePosition( float x, float y, float z, float o ); - /*! return the contentId */ - uint64_t getContentId() const; - /*! return max hp */ - uint32_t getMaxHp(); - /*! return max mp */ - uint32_t getMaxMp(); - /*! return a players total play time */ - uint32_t getPlayTime() const; - /*! return true if the player has "new adventurere" status */ - bool isNewAdventurer() const; - /*! change the players "new adventurere" status */ - void setNewAdventurer( bool state ); - /*! sets the list of current online status */ - void setOnlineStatusMask( uint64_t status ); - /*! returns the current online status */ - uint64_t getOnlineStatusMask() const; - /*! perform a teleport of a specified type ( teleport,return,aethernet ) */ - void teleport( uint16_t aetheryteId, uint8_t type = 1 ); - /*! query teleport of a specified type */ - void teleportQuery( uint16_t aetheryteId ); - /*! prepares zoning / fades out the screen */ - void prepareZoning( uint16_t targetZone, bool fadeOut, uint8_t fadoutTime = 0, uint16_t animation = 0 ); - /*! get player's title list (available titles) */ - uint8_t* getTitleList(); - const uint8_t* getTitleList() const; - /*! get player's active title */ - uint16_t getTitle() const; - /*! add title to player title list */ - void addTitle( uint16_t titleId ); - /*! change player's active title */ - void setTitle( uint16_t titleId ); - /*! send the players title list */ - void sendTitleList(); - /*! change gear param state */ - void setEquipDisplayFlags( uint8_t state ); - /*! get gear param state */ - uint8_t getEquipDisplayFlags() const; - /*! mount the specified mount and send the packets */ - void mount( uint32_t id ); - /*! dismount the current mount and send the packets */ - void dismount(); - /*! get the current mount */ - uint8_t getCurrentMount() const; - /*! set current persistent emote */ - void setPersistentEmote( uint32_t emoteId ); - /*! get current persistent emote */ - uint32_t getPersistentEmote() const; - - void calculateStats() override; - void sendStats(); - - - // Aetheryte / Action / Attribute bitmasks - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! register aetheryte aetheryteId and send update */ - void registerAetheryte( uint8_t aetheryteId ); - /*! check if aetheryte is already registered */ - bool isAetheryteRegistered( uint8_t aetheryteId ) const; - /*! return a const pointer to the aetheryte unlock bitmask array */ - int8_t getAetheryteMaskAt( uint8_t index ) const; - /*! return a pointer to the aetheryte unlock bitmask array */ - uint8_t* getAetheryteArray(); - /*! set homepoint */ - void setHomepoint( uint8_t aetheryteId ); - /*! get homepoint */ - uint8_t getHomepoint() const; - /*! discover subarea subid fo map map_id, also send udpate packet */ - void discover( int16_t map_id, int16_t sub_id ); - /*! return a pointer to the discovery bitmask array */ - uint8_t* getDiscoveryBitmask(); - /*! helper/debug function to reset all discovered areas */ - void resetDiscovery(); - /*! get a pointer to the howto bitmask array */ - uint8_t* getHowToArray(); - /*! get a const pointer to the howto bitmask array */ - const uint8_t* getHowToArray() const; - /*! update bitmask for how-to's seen */ - void updateHowtosSeen( uint32_t howToId ); - /*! learn an action / update the unlock bitmask. */ - void learnAction( uint16_t actionId ); - /*! learn a song / update the unlock bitmask. */ - void learnSong( uint8_t songId, uint32_t itemId ); - /*! check if an action is already unlocked in the bitmask. */ - bool isActionLearned( uint8_t actionId ) const; - /*! return a const pointer to the unlock bitmask array */ - const uint8_t* getUnlockBitmask() const; - /*! return a const pointer to the orchestrion bitmask array */ - const uint8_t* getOrchestrionBitmask() const; - /*! return a const pointer to the mount guide bitmask array */ - const uint8_t* getMountGuideBitmask() const; - - - // Spawn handling - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! initialize the spawnId queue */ - void initSpawnIdQueue(); - /*! get the spawn id mapped to a specific actorId */ - uint8_t getSpawnIdForActorId( uint32_t actorId ); - /*! frees the spawnId assigned to the given actor */ - void freePlayerSpawnId( uint32_t actorId ); - /*! checks if the given spawn id is valid */ - bool isActorSpawnIdValid( uint8_t spawnId ); - /*! send spawn packets to pTarget */ - void spawn( PlayerPtr pTarget ) override; - /*! send despawn packets to pTarget */ - void despawn( PlayerPtr pTarget ) override; - - // Player State Handling - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /* return a const pointer to the state flag array */ - const uint8_t* getStateFlags() const; - /* set a specified state flag */ - void setStateFlag( Common::PlayerStateFlag flag ); - /* set a specified state flag */ - void setStateFlags( std::vector< Common::PlayerStateFlag > flags ); - /* check if a specified flag is set */ - bool hasStateFlag( Common::PlayerStateFlag flag ) const; - /* reset a specified flag */ - void unsetStateFlag( Common::PlayerStateFlag flag ); - - // Player Session Handling - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! return the userlevel */ - uint8_t getUserLevel() const; - /*! set timestamp for last received ping */ - void setLastPing( uint32_t ping ); - /*! get timestamp of last received ping */ - uint32_t getLastPing() const; - - // Player Database Handling - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! generate the update sql based on update flags */ - void updateSql(); - /*! load player from db, by id */ - bool load( uint32_t charId, SessionPtr pSession ); - /*! load active class data */ - bool loadClassData(); - /*! load search info */ - bool loadSearchInfo(); - - // Player Network Handling - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! send current models ( equipment ) */ - void sendModel(); - /*! send active state flags */ - void sendStateFlags(); - /*! send status update */ - void sendStatusUpdate( bool toSelf = true ) override; - /*! send the entire inventory sequence */ - void sendInventory(); - /*! send active quest list */ - void sendQuestInfo(); - /*! send a quest specific message */ - void sendQuestMessage( uint32_t questId, int8_t msgId, uint8_t type, uint32_t var1, uint32_t var2 ); - /*! queue a packet for the player */ - void queuePacket( Network::Packets::FFXIVPacketBasePtr pPacket ); - /*! queue a char connection packet for the player */ - void queueChatPacket( Network::Packets::FFXIVPacketBasePtr pPacket ); - /*! returns true if loading is complete ( 0x69 has been received ) */ - bool isLoadingComplete() const; - /*! set the loading complete bool */ - void setLoadingComplete( bool bComplete ); - /*! mark this player for zoning, notify worldserver */ - void performZoning( uint16_t zoneId, const Common::FFXIVARR_POSITION3& pos, float rotation ); - /*! return true if the player is marked for zoning */ - bool isMarkedForZoning() const; - - void emote( uint32_t emoteId, uint64_t targetId, bool isSilent ); - void emoteInterrupt(); - - - void sendZoneInPackets( uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, bool pSetStatus ); - - void finishZoning(); - - void sendZonePackets(); - - Common::ZoneingType getZoningType() const; - void setZoningType( Common::ZoneingType zoneingType ); - - void setSearchInfo( uint8_t selectRegion, uint8_t selectClass, const char* searchMessage ); - const char* getSearchMessage() const; - uint8_t getSearchSelectRegion() const; - uint8_t getSearchSelectClass() const; - - void sendNotice( const std::string& message ); - void sendUrgent( const std::string& message ); - void sendDebug( const std::string& message ); - - bool isDirectorInitialized() const; - void setDirectorInitialized( bool isInitialized ); - - // Player Battle Handling - ////////////////////////////////////////////////////////////////////////////////////////////////////// - void initHateSlotQueue(); - - void sendHateList(); - - bool actionHasCastTime( uint32_t actionId ); - - Core::Entity::ActorPtr lookupTargetById( uint64_t targetId ); - - bool isLogin() const; - void setIsLogin( bool bIsLogin ); - - uint16_t getZoneId() const; - - uint8_t getGmRank() const; - void setGmRank( uint8_t rank ); - - bool getGmInvis() const; - void setGmInvis( bool invis ); - - bool isActingAsGm() const; - - uint8_t getMode() const; - void setMode( uint8_t mode ); - - void setAutoattack( bool mode ); - bool isAutoattackOn() const; - - uint8_t getPose() const; - void setPose( uint8_t pose ); - - // Content Finder handling - ////////////////////////////////////////////////////////////////////////////////////////////////////// - /*! Get an unix time when the player can register into content finder again. */ - uint32_t getCFPenaltyTimestamp() const; - - /*! Set an unix time when the player can register into content finder again. */ - void setCFPenaltyTimestamp( uint32_t timestamp ); - - uint32_t getCFPenaltyMinutes() const; - void setCFPenaltyMinutes( uint32_t minutes ); + /*! Contructor */ + Player(); - void setEorzeaTimeOffset( uint64_t timestamp ); + /*! Destructor */ + ~Player(); - // Database - void updateDbAllQuests() const; - void deleteQuest( uint16_t questId ) const; - void insertQuest( uint16_t questId, uint8_t index, uint8_t seq ) const; - void updateDbSearchInfo() const; - void updateDbClass() const; - void insertDbClass( const uint8_t classJobIndex ) const; + void autoAttack( CharaPtr pTarget ) override; - void setMarkedForRemoval(); - bool isMarkedForRemoval() const; + void injectPacket( std::string path ); - void setOnEnterEventDone( bool isDone ); - bool isOnEnterEventDone() const; + // EventHandlers + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! start an event action */ + void eventActionStart( uint32_t eventId, uint32_t action, ActionCallback finishCallback, + ActionCallback interruptCallback, uint64_t additional ); - /*! gets the next available obj count */ - uint8_t getNextObjSpawnIndexForActorId( uint32_t actorId ); - /*! resets the players obj count */ - void resetObjSpawnIndex(); - /*! frees an obj count to be used by another eobj */ - void freeObjSpawnIndexForActorId( uint32_t actorId ); - /*! checks if a spawn index is valid */ - bool isObjSpawnIndexValid( uint8_t index ); + /*! start an event item action */ + void eventItemActionStart( uint32_t eventId, uint32_t action, ActionCallback finishCallback, + 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, + uint32_t eventParam2 ); - // Inventory Handling - ////////////////////////////////////////////////////////////////////////////////////////////////////// - void initInventory(); + /*! play a subevent */ + void playScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, uint32_t eventParam3 ); - using InvSlotPair = std::pair< uint16_t, int8_t >; - using InvSlotPairVec = std::vector< InvSlotPair >; + void playGilShop( uint32_t eventId, uint32_t flags, + Event::EventHandler::SceneReturnCallback eventCallback ); - ItemPtr createItem( uint32_t catalogId, uint32_t quantity = 1 ); - bool loadInventory(); - InvSlotPairVec getSlotsOfItemsInInventory( uint32_t catalogId ); - InvSlotPair getFreeBagSlot(); - Core::ItemPtr addItem( uint32_t catalogId, uint32_t quantity = 1, bool isHq = false, bool slient = false ); - void moveItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ); - void swapItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ); - void discardItem( uint16_t fromInventoryId, uint8_t fromSlotId ); - void splitItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot, uint16_t splitCount ); - void mergeItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ); + void + directorPlayScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam3, uint32_t eventParam4, + uint32_t eventParam5 = 0 ); - ItemPtr getItemAt( uint16_t containerId, uint8_t slotId ); + /*! play a subevent */ + void playScene( uint32_t eventId, uint32_t scene, uint32_t flags, + uint32_t eventParam2, uint32_t eventParam3, + Event::EventHandler::SceneReturnCallback eventReturnCallback ); - bool updateContainer( uint16_t storageId, uint8_t slotId, ItemPtr pItem ); + /*! play a subevent */ + void playScene( uint32_t eventId, uint32_t scene, uint32_t flags, + uint32_t eventParam2, uint32_t eventParam3, uint32_t eventParam4, + Event::EventHandler::SceneReturnCallback eventReturnCallback ); - /*! calculate and return player ilvl based off equipped gear */ - uint16_t calculateEquippedGearItemLevel(); - /*! return the current amount of currency of type */ - uint32_t getCurrency( Common::CurrencyType type ); + /*! play a subevent */ + void playScene( uint32_t eventId, uint32_t scene, uint32_t flags, + Event::EventHandler::SceneReturnCallback eventReturnCallback ); - void writeInventory( Common::InventoryType type ); - void writeItem( ItemPtr pItem ) const; - void deleteItemDb( ItemPtr pItem ) const; + /*! play a subevent */ + void playScene( uint32_t eventId, uint32_t scene, uint32_t flags ); - /*! return the crystal amount of currency of type */ - uint32_t getCrystal( Common::CrystalType type ); - /*! add amount to the crystal of type */ - void addCrystal( Common::CrystalType type, uint32_t amount ); - /*! remove amount from the crystals of type */ - void removeCrystal( Common::CrystalType type, uint32_t amount ); - bool isObtainable( uint32_t catalogId, uint8_t quantity ); + /*! play a subevent */ + void playSceneChain( uint32_t eventId, uint32_t scene, uint32_t flags, + uint32_t eventParam2, uint32_t eventParam3, uint32_t eventParam4, + Event::EventHandler::SceneChainCallback sceneChainCallback ); - void send(); + /*! play a subevent */ + void playSceneChain( uint32_t eventId, uint32_t scene, uint32_t flags, + uint32_t eventParam2, uint32_t eventParam3, + Event::EventHandler::SceneChainCallback sceneChainCallback ); - uint8_t getFreeSlotsInBags(); + /*! play a subevent */ + void playSceneChain( uint32_t eventId, uint32_t scene, uint32_t flags, + Event::EventHandler::SceneChainCallback sceneChainCallback ); - ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! setup the event and return a ptr to it */ + Event::EventHandlerPtr bootstrapSceneEvent( uint32_t eventId, uint32_t flags ); - uint64_t m_lastMoveTime; - uint8_t m_lastMoveflag; + /*! finish / unregister an event */ + void eventFinish( uint32_t eventId, uint32_t freePlayer ); + + /*! add an event to the event array */ + void addEvent( Event::EventHandlerPtr pEvent ); + + /*! retrieve an event from the event array */ + Event::EventHandlerPtr getEvent( uint32_t eventId ); + + /*! get number of active events */ + size_t getEventCount(); + + /*! remove an event from the event array */ + void removeEvent( uint32_t eventId ); + + /*! return the eventlist */ + std::map< uint32_t, Event::EventHandlerPtr >& eventList(); + + void checkEvent( uint32_t eventId ); + + + + // Events + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! Event to be called when zoning process gets triggered */ + void onZoneStart(); + + /*! Event to be called when zoning process is finished */ + void onZoneDone(); + + /*! Event to be called on login */ + void onLogin(); + + /*! Event to be called on update tick */ + void onTick() override; + + /*! Event to be called upon player death */ + void onDeath() override; + + /*! Event called on every session iteration */ + void update( int64_t currTime ) override; + + /*! Event to be called upon Bnpc kill */ + void onMobKill( uint16_t nameId ); + + + // Quest + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! load data for currently active quests */ + bool loadActiveQuests(); + + /*! update quest ( register it as active quest if new ) */ + void updateQuest( uint16_t questId, uint8_t sequence ); + + /*! return true if quest is currently active */ + bool hasQuest( uint32_t questId ); + + /*! return the current quest sequence */ + uint8_t getQuestSeq( uint16_t questId ); + + /*! send the quest tracker packet */ + void sendQuestTracker(); + + /*! set quest tracker flag for a specified slot */ + void setQuestTracker( uint16_t index, int16_t flag ); + + /*! return the index of a given quest in the players quest list */ + int8_t getQuestIndex( uint16_t questId ); + + /*! finish a given quest */ + void finishQuest( uint16_t questId ); + + /*! finish a given quest */ + void unfinishQuest( uint16_t questId ); + + /*! remove a given quest */ + void removeQuest( uint16_t questId ); + + /*! add a quest to the completed quests mask */ + void updateQuestsCompleted( uint32_t questId ); + + /*! remove a quest from the completed quest mask */ + void removeQuestsCompleted( uint32_t questId ); + + /*! get the curent opening sequence */ + uint8_t getOpeningSequence() const; + + /*! set te current opening sequence */ + void setOpeningSequence( uint8_t seq ); + + bool giveQuestRewards( uint32_t questId, uint32_t optionalChoice ); + + boost::shared_ptr< Common::QuestActive > getQuestActive( uint16_t index ); + + uint8_t getQuestUI8A( uint16_t questId ); + + uint8_t getQuestUI8B( uint16_t questId ); + + uint8_t getQuestUI8C( uint16_t questId ); + + uint8_t getQuestUI8D( uint16_t questId ); + + uint8_t getQuestUI8E( uint16_t questId ); + + uint8_t getQuestUI8F( uint16_t questId ); + + uint8_t getQuestUI8AH( uint16_t questId ); + + uint8_t getQuestUI8BH( uint16_t questId ); + + uint8_t getQuestUI8CH( uint16_t questId ); + + uint8_t getQuestUI8DH( uint16_t questId ); + + uint8_t getQuestUI8EH( uint16_t questId ); + + uint8_t getQuestUI8FH( uint16_t questId ); + + uint8_t getQuestUI8AL( uint16_t questId ); + + uint8_t getQuestUI8BL( uint16_t questId ); + + uint8_t getQuestUI8CL( uint16_t questId ); + + uint8_t getQuestUI8DL( uint16_t questId ); + + uint8_t getQuestUI8EL( uint16_t questId ); + + uint8_t getQuestUI8FL( uint16_t questId ); + + uint16_t getQuestUI16A( uint16_t questId ); + + uint16_t getQuestUI16B( uint16_t questId ); + + uint16_t getQuestUI16C( uint16_t questId ); + + uint32_t getQuestUI32A( uint16_t questId ); + + bool getQuestBitFlag8( uint16_t questId, uint8_t index ); + + bool getQuestBitFlag16( uint16_t questId, uint8_t index ); + + bool getQuestBitFlag24( uint16_t questId, uint8_t index ); + + bool getQuestBitFlag32( uint16_t questId, uint8_t index ); + + bool getQuestBitFlag40( uint16_t questId, uint8_t index ); + + bool getQuestBitFlag48( uint16_t questId, uint8_t index ); + + + void setQuestUI8A( uint16_t questId, uint8_t val ); + + void setQuestUI8B( uint16_t questId, uint8_t val ); + + void setQuestUI8C( uint16_t questId, uint8_t val ); + + void setQuestUI8D( uint16_t questId, uint8_t val ); + + void setQuestUI8E( uint16_t questId, uint8_t val ); + + void setQuestUI8F( uint16_t questId, uint8_t val ); + + void setQuestUI8AH( uint16_t questId, uint8_t val ); + + void setQuestUI8BH( uint16_t questId, uint8_t val ); + + void setQuestUI8CH( uint16_t questId, uint8_t val ); + + void setQuestUI8DH( uint16_t questId, uint8_t val ); + + void setQuestUI8EH( uint16_t questId, uint8_t val ); + + void setQuestUI8FH( uint16_t questId, uint8_t val ); + + void setQuestUI8AL( uint16_t questId, uint8_t val ); + + void setQuestUI8BL( uint16_t questId, uint8_t val ); + + void setQuestUI8CL( uint16_t questId, uint8_t val ); + + void setQuestUI8DL( uint16_t questId, uint8_t val ); + + void setQuestUI8EL( uint16_t questId, uint8_t val ); + + void setQuestUI8FL( uint16_t questId, uint8_t val ); + + void setQuestUI16A( uint16_t questId, uint16_t val ); + + void setQuestUI16B( uint16_t questId, uint16_t val ); + + void setQuestUI16C( uint16_t questId, uint16_t val ); + + void setQuestUI32A( uint16_t questId, uint32_t val ); + + void setQuestBitFlag8( uint16_t questId, uint8_t index, bool val ); + + void setQuestBitFlag16( uint16_t questId, uint8_t index, bool val ); + + void setQuestBitFlag24( uint16_t questId, uint8_t index, bool val ); + + void setQuestBitFlag32( uint16_t questId, uint8_t index, bool val ); + + void setQuestBitFlag40( uint16_t questId, uint8_t index, bool val ); + + void setQuestBitFlag48( uint16_t questId, uint8_t index, bool val ); + + // Inventory / Item / Currency + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! equip an item to a specified slot */ + void equipItem( Common::GearSetSlot equipSlotId, ItemPtr pItem, bool sendModel ); + + /*! remove an item from an equipment slot */ + void unequipItem( Common::GearSetSlot equipSlotId, ItemPtr pItem ); + + /*! equip a weapon, possibly forcing a job change */ + void equipWeapon( ItemPtr pItem ); + + /*! get player ilvl */ + uint16_t getItemLevel() const; + + /*! send player ilvl */ + void sendItemLevel(); + + /*! get the current main hand model */ + uint64_t getModelMainWeapon() const; + + /*! get the current off hand model */ + uint64_t getModelSubWeapon() const; + + /*! get the current system hand model */ + uint64_t getModelSystemWeapon() const; + + /*! return a const pointer to the model array */ + const uint32_t* getModelArray() const; + + /*! return the equipment model in a specified equipment slot */ + uint32_t getModelForSlot( Common::GearSetSlot slot ); + + /*! set the equipment model in a specified equipment slot */ + void setModelForSlot( Common::GearSetSlot slot, uint32_t val ); + + /*! add amount to the currency of type */ + void addCurrency( Common::CurrencyType type, uint32_t amount ); + + /*! remove amount from the currency of type */ + void removeCurrency( Common::CurrencyType type, uint32_t amount ); + + /*! return the current amount of crystals of type */ + uint32_t getCrystal( uint8_t type ) const; + + // Class / Job / Exp + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! returns the level of the currently active class / job */ + uint8_t getLevel() const override; + + /*! returns the level of the provided class / job */ + uint8_t getLevelForClass( Common::ClassJob pClass ) const; + + /*! returns if the classjob is unlocked */ + bool isClassJobUnlocked( Common::ClassJob classJob ) const; + + /*! returns the exp of the currently active class / job */ + uint32_t getExp() const; + + /*! sets the exp of the currently active class / job */ + void setExp( uint32_t amount ); + + /*! adds exp to the currently active class / job */ + void gainExp( uint32_t amount ); + + /*! gain a level on the currently active class / job */ + void gainLevel(); + + /*! set level on the currently active class / job to given level */ + void setLevel( uint8_t level ); + + /*! set level on the provided class / job to given level */ + void setLevelForClass( uint8_t level, Common::ClassJob classjob ); + + /*! change class or job to given class / job */ + void setClassJob( Common::ClassJob classJob ); + + /*! returns a pointer to the class array */ + uint16_t* getClassArray(); + + /*! returns a const pointer to the class array */ + const uint16_t* getClassArray() const; + + /*! returns a pointer to the exp array */ + uint32_t* getExpArray(); + + /*! returns a const pointer to the exp array */ + const uint32_t* getExpArray() const; + + // Base Look / Stats / Params + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! return the birth day */ + uint8_t getBirthDay() const; + + /*! return the birth month */ + uint8_t getBirthMonth() const; + + /*! return the guardian diety Id */ + uint8_t getGuardianDeity() const; + + /*! get look at specified index */ + uint8_t getLookAt( uint8_t index ) const; + + /*! return the race */ + uint8_t getRace() const; + + /*! return gender 0 male, 1 female */ + uint8_t getGender() const; + + /*! return the id of the home town */ + uint8_t getStartTown() const; + + /*! return the voice id */ + uint8_t getVoiceId() const; + + /*! return the grand company */ + uint8_t getGc() const; + + /*! return the grand company rank */ + const uint8_t* getGcRankArray() const; + + /*! set look at index */ + void setLookAt( uint8_t index, uint8_t value ); + + /*! set the voice Id */ + void setVoiceId( uint8_t voiceId ); + + /*! set the grand company */ + void setGc( uint8_t gc ); + + /*! set the grand company rank */ + void setGcRankAt( uint8_t index, uint8_t rank ); + + /*! return a const pointer to the look array */ + const uint8_t* getLookArray() const; + + /*! returns true if the player is currently in combat */ + bool isInCombat() const; + + /*! sets players combat state */ + void setInCombat( bool mode ); + + /*! return current online status depending on current state / activity */ + Common::OnlineStatus getOnlineStatus() const; + + /*! sets the players zone, initiating a zoning process */ + void setZone( uint32_t zoneId ); + + /*! sets the players instance & initiates zoning process */ + bool setInstance( uint32_t instanceContentId ); + + /*! sets the players instance & initiates zoning process */ + bool setInstance( ZonePtr instance ); + + /*! returns the player to their position before zoning into an instance */ + bool exitInstance(); + + /*! sets the players territoryId */ + void setTerritoryId( uint32_t territoryId ); + + /*! gets the players territoryId */ + uint32_t getTerritoryId() const; + + void forceZoneing( uint32_t zoneId ); + + /*! return player to preset homepoint */ + void returnToHomepoint(); + + /*! change position, sends update too */ + void changePosition( float x, float y, float z, float o ); + + /*! return the contentId */ + uint64_t getContentId() const; + + /*! return max hp */ + uint32_t getMaxHp(); + + /*! return max mp */ + uint32_t getMaxMp(); + + /*! return a players total play time */ + uint32_t getPlayTime() const; + + /*! return true if the player has "new adventurere" status */ + bool isNewAdventurer() const; + + /*! change the players "new adventurere" status */ + void setNewAdventurer( bool state ); + + /*! sets the list of current online status */ + void setOnlineStatusMask( uint64_t status ); + + /*! returns the current online status */ + uint64_t getOnlineStatusMask() const; + + /*! perform a teleport of a specified type ( teleport,return,aethernet ) */ + void teleport( uint16_t aetheryteId, uint8_t type = 1 ); + + /*! query teleport of a specified type */ + void teleportQuery( uint16_t aetheryteId ); + + /*! prepares zoning / fades out the screen */ + void prepareZoning( uint16_t targetZone, bool fadeOut, uint8_t fadoutTime = 0, uint16_t animation = 0 ); + + /*! get player's title list (available titles) */ + uint8_t* getTitleList(); + + const uint8_t* getTitleList() const; + + /*! get player's active title */ + uint16_t getTitle() const; + + /*! add title to player title list */ + void addTitle( uint16_t titleId ); + + /*! change player's active title */ + void setTitle( uint16_t titleId ); + + /*! send the players title list */ + void sendTitleList(); + + /*! change gear param state */ + void setEquipDisplayFlags( uint8_t state ); + + /*! get gear param state */ + uint8_t getEquipDisplayFlags() const; + + /*! mount the specified mount and send the packets */ + void mount( uint32_t id ); + + /*! dismount the current mount and send the packets */ + void dismount(); + + /*! get the current mount */ + uint8_t getCurrentMount() const; + + /*! set current persistent emote */ + void setPersistentEmote( uint32_t emoteId ); + + /*! get current persistent emote */ + uint32_t getPersistentEmote() const; + + void calculateStats() override; + + void sendStats(); + + + // Aetheryte / Action / Attribute bitmasks + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! register aetheryte aetheryteId and send update */ + void registerAetheryte( uint8_t aetheryteId ); + + /*! check if aetheryte is already registered */ + bool isAetheryteRegistered( uint8_t aetheryteId ) const; + + /*! return a const pointer to the aetheryte unlock bitmask array */ + int8_t getAetheryteMaskAt( uint8_t index ) const; + + /*! return a pointer to the aetheryte unlock bitmask array */ + uint8_t* getAetheryteArray(); + + /*! set homepoint */ + void setHomepoint( uint8_t aetheryteId ); + + /*! get homepoint */ + uint8_t getHomepoint() const; + + /*! discover subarea subid fo map map_id, also send udpate packet */ + void discover( int16_t map_id, int16_t sub_id ); + + /*! return a pointer to the discovery bitmask array */ + uint8_t* getDiscoveryBitmask(); + + /*! helper/debug function to reset all discovered areas */ + void resetDiscovery(); + + /*! get a pointer to the howto bitmask array */ + uint8_t* getHowToArray(); + + /*! get a const pointer to the howto bitmask array */ + const uint8_t* getHowToArray() const; + + /*! update bitmask for how-to's seen */ + void updateHowtosSeen( uint32_t howToId ); + + /*! learn an action / update the unlock bitmask. */ + void learnAction( uint16_t actionId ); + + /*! learn a song / update the unlock bitmask. */ + void learnSong( uint8_t songId, uint32_t itemId ); + + /*! check if an action is already unlocked in the bitmask. */ + bool isActionLearned( uint8_t actionId ) const; + + /*! return a const pointer to the unlock bitmask array */ + const uint8_t* getUnlockBitmask() const; + + /*! return a const pointer to the orchestrion bitmask array */ + const uint8_t* getOrchestrionBitmask() const; + + /*! return a const pointer to the mount guide bitmask array */ + const uint8_t* getMountGuideBitmask() const; + + + // Spawn handling + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! initialize the spawnId queue */ + void initSpawnIdQueue(); + + /*! get the spawn id mapped to a specific actorId */ + uint8_t getSpawnIdForActorId( uint32_t actorId ); + + /*! frees the spawnId assigned to the given actor */ + void freePlayerSpawnId( uint32_t actorId ); + + /*! checks if the given spawn id is valid */ + bool isActorSpawnIdValid( uint8_t spawnId ); + + /*! send spawn packets to pTarget */ + void spawn( PlayerPtr pTarget ) override; + + /*! send despawn packets to pTarget */ + void despawn( PlayerPtr pTarget ) override; + + // Player State Handling + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /* return a const pointer to the state flag array */ + const uint8_t* getStateFlags() const; + + /* set a specified state flag */ + void setStateFlag( Common::PlayerStateFlag flag ); + + /* set a specified state flag */ + void setStateFlags( std::vector< Common::PlayerStateFlag > flags ); + + /* check if a specified flag is set */ + bool hasStateFlag( Common::PlayerStateFlag flag ) const; + + /* reset a specified flag */ + void unsetStateFlag( Common::PlayerStateFlag flag ); + + // Player Session Handling + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! return the userlevel */ + uint8_t getUserLevel() const; + + /*! set timestamp for last received ping */ + void setLastPing( uint32_t ping ); + + /*! get timestamp of last received ping */ + uint32_t getLastPing() const; + + // Player Database Handling + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! generate the update sql based on update flags */ + void updateSql(); + + /*! load player from db, by id */ + bool load( uint32_t charId, SessionPtr pSession ); + + /*! load active class data */ + bool loadClassData(); + + /*! load search info */ + bool loadSearchInfo(); + + // Player Network Handling + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! send current models ( equipment ) */ + void sendModel(); + + /*! send active state flags */ + void sendStateFlags(); + + /*! send status update */ + void sendStatusUpdate( bool toSelf = true ) override; + + /*! send the entire inventory sequence */ + void sendInventory(); + + /*! send active quest list */ + void sendQuestInfo(); + + /*! send a quest specific message */ + void sendQuestMessage( uint32_t questId, int8_t msgId, uint8_t type, uint32_t var1, uint32_t var2 ); + + /*! queue a packet for the player */ + void queuePacket( Network::Packets::FFXIVPacketBasePtr pPacket ); + + /*! queue a char connection packet for the player */ + void queueChatPacket( Network::Packets::FFXIVPacketBasePtr pPacket ); + + /*! returns true if loading is complete ( 0x69 has been received ) */ + bool isLoadingComplete() const; + + /*! set the loading complete bool */ + void setLoadingComplete( bool bComplete ); + + /*! mark this player for zoning, notify worldserver */ + void performZoning( uint16_t zoneId, const Common::FFXIVARR_POSITION3& pos, float rotation ); + + /*! return true if the player is marked for zoning */ + bool isMarkedForZoning() const; + + void emote( uint32_t emoteId, uint64_t targetId, bool isSilent ); + + void emoteInterrupt(); + + + void sendZoneInPackets( uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, bool pSetStatus ); + + void finishZoning(); + + void sendZonePackets(); + + Common::ZoneingType getZoningType() const; + + void setZoningType( Common::ZoneingType zoneingType ); + + void setSearchInfo( uint8_t selectRegion, uint8_t selectClass, const char* searchMessage ); + + const char* getSearchMessage() const; + + uint8_t getSearchSelectRegion() const; + + uint8_t getSearchSelectClass() const; + + void sendNotice( const std::string& message ); + + void sendUrgent( const std::string& message ); + + void sendDebug( const std::string& message ); + + bool isDirectorInitialized() const; + + void setDirectorInitialized( bool isInitialized ); + + // Player Battle Handling + ////////////////////////////////////////////////////////////////////////////////////////////////////// + void initHateSlotQueue(); + + void sendHateList(); + + bool actionHasCastTime( uint32_t actionId ); + + Core::Entity::ActorPtr lookupTargetById( uint64_t targetId ); + + bool isLogin() const; + + void setIsLogin( bool bIsLogin ); + + uint16_t getZoneId() const; + + uint8_t getGmRank() const; + + void setGmRank( uint8_t rank ); + + bool getGmInvis() const; + + void setGmInvis( bool invis ); + + bool isActingAsGm() const; + + uint8_t getMode() const; + + void setMode( uint8_t mode ); + + void setAutoattack( bool mode ); + + bool isAutoattackOn() const; + + uint8_t getPose() const; + + void setPose( uint8_t pose ); + + // Content Finder handling + ////////////////////////////////////////////////////////////////////////////////////////////////////// + /*! Get an unix time when the player can register into content finder again. */ + uint32_t getCFPenaltyTimestamp() const; + + /*! Set an unix time when the player can register into content finder again. */ + void setCFPenaltyTimestamp( uint32_t timestamp ); + + uint32_t getCFPenaltyMinutes() const; + + void setCFPenaltyMinutes( uint32_t minutes ); + + void setEorzeaTimeOffset( uint64_t timestamp ); + + // Database + void updateDbAllQuests() const; + + void deleteQuest( uint16_t questId ) const; + + void insertQuest( uint16_t questId, uint8_t index, uint8_t seq ) const; + + void updateDbSearchInfo() const; + + void updateDbClass() const; + + void insertDbClass( const uint8_t classJobIndex ) const; + + void setMarkedForRemoval(); + + bool isMarkedForRemoval() const; + + void setOnEnterEventDone( bool isDone ); + + bool isOnEnterEventDone() const; + + /*! gets the next available obj count */ + uint8_t getNextObjSpawnIndexForActorId( uint32_t actorId ); + + /*! resets the players obj count */ + void resetObjSpawnIndex(); + + /*! frees an obj count to be used by another eobj */ + void freeObjSpawnIndexForActorId( uint32_t actorId ); + + /*! checks if a spawn index is valid */ + bool isObjSpawnIndexValid( uint8_t index ); + + + // Inventory Handling + ////////////////////////////////////////////////////////////////////////////////////////////////////// + void initInventory(); + + using InvSlotPair = std::pair< uint16_t, int8_t >; + using InvSlotPairVec = std::vector< InvSlotPair >; + + ItemPtr createItem( uint32_t catalogId, uint32_t quantity = 1 ); + + bool loadInventory(); + + InvSlotPairVec getSlotsOfItemsInInventory( uint32_t catalogId ); + + InvSlotPair getFreeBagSlot(); + + Core::ItemPtr addItem( uint32_t catalogId, uint32_t quantity = 1, bool isHq = false, bool slient = false ); + + void moveItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ); + + void swapItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ); + + void discardItem( uint16_t fromInventoryId, uint8_t fromSlotId ); + + void splitItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot, + uint16_t splitCount ); + + void mergeItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ); + + ItemPtr getItemAt( uint16_t containerId, uint8_t slotId ); + + bool updateContainer( uint16_t storageId, uint8_t slotId, ItemPtr pItem ); + + /*! calculate and return player ilvl based off equipped gear */ + uint16_t calculateEquippedGearItemLevel(); + + /*! return the current amount of currency of type */ + uint32_t getCurrency( Common::CurrencyType type ); + + void writeInventory( Common::InventoryType type ); + + void writeItem( ItemPtr pItem ) const; + + void deleteItemDb( ItemPtr pItem ) const; + + /*! return the crystal amount of currency of type */ + uint32_t getCrystal( Common::CrystalType type ); + + /*! add amount to the crystal of type */ + void addCrystal( Common::CrystalType type, uint32_t amount ); + + /*! remove amount from the crystals of type */ + void removeCrystal( Common::CrystalType type, uint32_t amount ); + + bool isObtainable( uint32_t catalogId, uint8_t quantity ); + + void send(); + + uint8_t getFreeSlotsInBags(); + + ////////////////////////////////////////////////////////////////////////////////////////////////////// + + uint64_t m_lastMoveTime; + uint8_t m_lastMoveflag; private: - uint32_t m_lastWrite; - uint32_t m_lastPing; + uint32_t m_lastWrite; + uint32_t m_lastPing; - bool m_bIsLogin; + bool m_bIsLogin; - uint64_t m_contentId; // This id will be the name of the folder for character settings in "My Games" + uint64_t m_contentId; // This id will be the name of the folder for character settings in "My Games" - uint8_t m_mode; + uint8_t m_mode; - bool m_markedForRemoval; + bool m_markedForRemoval; - bool m_directorInitialized; + bool m_directorInitialized; - bool m_onEnterEventDone; + bool m_onEnterEventDone; private: - using InventoryMap = std::map< uint16_t, Core::ItemContainerPtr >; + using InventoryMap = std::map< uint16_t, Core::ItemContainerPtr >; - InventoryMap m_storageMap; + InventoryMap m_storageMap; - Common::FFXIVARR_POSITION3 m_prevPos; - uint32_t m_prevZoneType; - uint32_t m_prevZoneId; - float m_prevRot; + Common::FFXIVARR_POSITION3 m_prevPos; + uint32_t m_prevZoneType; + uint32_t m_prevZoneId; + float m_prevRot; - uint8_t m_voice; + uint8_t m_voice; - uint64_t m_modelMainWeapon; - uint64_t m_modelSubWeapon; - uint64_t m_modelSystemWeapon; + uint64_t m_modelMainWeapon; + uint64_t m_modelSubWeapon; + uint64_t m_modelSystemWeapon; - uint32_t m_modelEquip[10]; + uint32_t m_modelEquip[10]; - bool m_bNewGame; + bool m_bNewGame; - uint8_t m_guardianDeity; - uint8_t m_birthDay; - uint8_t m_birthMonth; + uint8_t m_guardianDeity; + uint8_t m_birthDay; + uint8_t m_birthMonth; - struct RetainerInfo - { - uint32_t retainerId; - char retainerName[32]; - uint32_t createUnixTime; - bool isActive; - bool isRename; - uint8_t status; - } m_retainerInfo[8]; + struct RetainerInfo + { + uint32_t retainerId; + char retainerName[32]; + uint32_t createUnixTime; + bool isActive; + bool isRename; + uint8_t status; + } m_retainerInfo[8]; - uint16_t m_activeTitle; - uint8_t m_titleList[48]; - uint8_t m_howTo[33]; - uint8_t m_minions[37]; - uint8_t m_mountGuide[15]; - uint8_t m_homePoint; - uint8_t m_startTown; - uint16_t m_townWarpFstFlags; - uint8_t m_questCompleteFlags[396]; - uint8_t m_discovery[421]; - uint32_t m_playTime; + uint16_t m_activeTitle; + uint8_t m_titleList[48]; + uint8_t m_howTo[33]; + uint8_t m_minions[37]; + uint8_t m_mountGuide[15]; + uint8_t m_homePoint; + uint8_t m_startTown; + uint16_t m_townWarpFstFlags; + uint8_t m_questCompleteFlags[396]; + uint8_t m_discovery[421]; + uint32_t m_playTime; - uint16_t m_classArray[25]; - uint32_t m_expArray[25]; - uint8_t m_aetheryte[16]; - uint8_t m_unlocks[64]; - uint8_t m_orchestrion[40]; + uint16_t m_classArray[25]; + uint32_t m_expArray[25]; + uint8_t m_aetheryte[16]; + uint8_t m_unlocks[64]; + uint8_t m_orchestrion[40]; - uint8_t m_openingSequence; + uint8_t m_openingSequence; - uint16_t m_itemLevel; - std::map< uint32_t, Event::EventHandlerPtr > m_eventHandlerMap; + uint16_t m_itemLevel; + std::map< uint32_t, Event::EventHandlerPtr > m_eventHandlerMap; - std::queue< uint8_t > m_freeHateSlotQueue; // queue with "hate slots" free to be assigned - std::map< uint32_t, uint8_t > m_actorIdTohateSlotMap; + std::queue< uint8_t > m_freeHateSlotQueue; // queue with "hate slots" free to be assigned + std::map< uint32_t, uint8_t > m_actorIdTohateSlotMap; - std::map< uint32_t, uint8_t > m_questIdToQuestIdx; // quest mapping, quest id to quest container index - std::map< uint8_t, uint32_t > m_questIdxToQuestId; // quest mapping, quest container index to questId - boost::shared_ptr< Common::QuestActive > m_activeQuests[30]; - int16_t m_questTracking[5]; + std::map< uint32_t, uint8_t > m_questIdToQuestIdx; // quest mapping, quest id to quest container index + std::map< uint8_t, uint32_t > m_questIdxToQuestId; // quest mapping, quest container index to questId + boost::shared_ptr< Common::QuestActive > m_activeQuests[30]; + int16_t m_questTracking[5]; - uint8_t m_stateFlags[12]; - uint8_t m_gmRank; - uint16_t zoneId; - bool m_gmInvis = false; + uint8_t m_stateFlags[12]; + uint8_t m_gmRank; + uint16_t zoneId; + bool m_gmInvis = false; - uint8_t m_equipDisplayFlags; + uint8_t m_equipDisplayFlags; - bool m_bInCombat; - bool m_bLoadingComplete; - bool m_bAutoattack; + bool m_bInCombat; + bool m_bLoadingComplete; + bool m_bAutoattack; - Common::ZoneingType m_zoningType; + Common::ZoneingType m_zoningType; - bool m_bMarkedForZoning; - bool m_bNewAdventurer; - uint64_t m_onlineStatus; - boost::shared_ptr< QueuedZoning > m_queuedZoneing; + bool m_bMarkedForZoning; + bool m_bNewAdventurer; + uint64_t m_onlineStatus; + boost::shared_ptr< QueuedZoning > m_queuedZoneing; - // search info - char m_searchMessage[193]; // searchmessage to show in profile - uint8_t m_searchSelectRegion; // regions selected to show up in profile - uint8_t m_searchSelectClass; // class selected to show up in profile + // search info + char m_searchMessage[193]; // searchmessage to show in profile + uint8_t m_searchSelectRegion; // regions selected to show up in profile + uint8_t m_searchSelectClass; // class selected to show up in profile - // gc info - uint8_t m_gc; - uint8_t m_gcRank[3]; + // gc info + uint8_t m_gc; + uint8_t m_gcRank[3]; - // content finder info - uint32_t m_cfPenaltyUntil; // unix time + // content finder info + uint32_t m_cfPenaltyUntil; // unix time - uint32_t m_mount; - uint32_t m_emoteMode; - uint8_t m_pose; + uint32_t m_mount; + uint32_t m_emoteMode; + uint8_t m_pose; - Util::SpawnIndexAllocator< uint8_t > m_objSpawnIndexAllocator; - Util::SpawnIndexAllocator< uint8_t > m_actorSpawnIndexAllocator; + Util::SpawnIndexAllocator< uint8_t > m_objSpawnIndexAllocator; + Util::SpawnIndexAllocator< uint8_t > m_actorSpawnIndexAllocator; }; } diff --git a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp index 61d7e06c..44ceead9 100644 --- a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp @@ -27,223 +27,224 @@ using namespace Core::Network::Packets::Server; void Core::Entity::Player::addEvent( Event::EventHandlerPtr pEvent ) { - m_eventHandlerMap[pEvent->getId()] = pEvent; + m_eventHandlerMap[ pEvent->getId() ] = pEvent; } std::map< uint32_t, Core::Event::EventHandlerPtr >& Core::Entity::Player::eventList() { - return m_eventHandlerMap; + return m_eventHandlerMap; } Core::Event::EventHandlerPtr Core::Entity::Player::getEvent( uint32_t eventId ) { - auto it = m_eventHandlerMap.find( eventId ); - if( it != m_eventHandlerMap.end() ) - return it->second; + auto it = m_eventHandlerMap.find( eventId ); + if( it != m_eventHandlerMap.end() ) + return it->second; - return Event::EventHandlerPtr( nullptr ); + return Event::EventHandlerPtr( nullptr ); } size_t Core::Entity::Player::getEventCount() { - return m_eventHandlerMap.size(); + return m_eventHandlerMap.size(); } void Core::Entity::Player::removeEvent( uint32_t eventId ) { - auto it = m_eventHandlerMap.find( eventId ); - if( it != m_eventHandlerMap.end() ) - { - auto tmpEvent = it->second; - m_eventHandlerMap.erase( it ); - } + auto it = m_eventHandlerMap.find( eventId ); + if( it != m_eventHandlerMap.end() ) + { + auto tmpEvent = it->second; + m_eventHandlerMap.erase( it ); + } } void Core::Entity::Player::checkEvent( uint32_t eventId ) { - auto pEvent = getEvent( eventId ); + auto pEvent = getEvent( eventId ); - if( pEvent && !pEvent->hasPlayedScene() ) - eventFinish( eventId, 1 ); + if( pEvent && !pEvent->hasPlayedScene() ) + eventFinish( eventId, 1 ); } void Core::Entity::Player::directorPlayScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam3, uint32_t eventParam4, uint32_t eventParam5 ) { - if( flags & 0x02 ) - setStateFlag( PlayerStateFlag::WatchingCutscene ); + if( flags & 0x02 ) + setStateFlag( PlayerStateFlag::WatchingCutscene ); - auto pEvent = getEvent( eventId ); - if( !pEvent ) - { - auto pLog = g_fw.get< Logger >(); - pLog->error( "Could not find event " + std::to_string( eventId ) + ", event has not been started!" ); - return; - } + auto pEvent = getEvent( eventId ); + if( !pEvent ) + { + auto pLog = g_fw.get< Logger >(); + pLog->error( "Could not find event " + std::to_string( eventId ) + ", event has not been started!" ); + return; + } - pEvent->setPlayedScene( true ); - pEvent->setEventReturnCallback( nullptr ); - auto eventPlay = boost::make_shared< DirectorPlayScenePacket >( getId(), getId(), pEvent->getId(), - scene, flags, eventParam3, eventParam4, eventParam5 ); + pEvent->setPlayedScene( true ); + pEvent->setEventReturnCallback( nullptr ); + auto eventPlay = boost::make_shared< DirectorPlayScenePacket >( getId(), getId(), pEvent->getId(), + scene, flags, eventParam3, eventParam4, eventParam5 ); - queuePacket( eventPlay ); + queuePacket( eventPlay ); } -void Core::Entity::Player::eventStart( uint64_t actorId, uint32_t eventId, +void Core::Entity::Player::eventStart( uint64_t actorId, uint32_t eventId, Event::EventHandler::EventType eventType, uint8_t eventParam1, uint32_t eventParam2 ) { - auto newEvent = Event::make_EventHandler( this, actorId, eventId, eventType, eventParam2 ); + auto newEvent = Event::make_EventHandler( this, actorId, eventId, eventType, eventParam2 ); - addEvent( newEvent ); + addEvent( newEvent ); - setStateFlag( PlayerStateFlag::InNpcEvent ); + setStateFlag( PlayerStateFlag::InNpcEvent ); + + auto eventStart = boost::make_shared< EventStartPacket >( getId(), actorId, eventId, + eventType, eventParam1, eventParam2 ); + + queuePacket( eventStart ); - auto eventStart = boost::make_shared< EventStartPacket >( getId(), actorId, eventId, - eventType, eventParam1, eventParam2 ); - - queuePacket( eventStart ); - } void Core::Entity::Player::playScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, uint32_t eventParam3 ) { - playScene( eventId, scene, flags, eventParam2, eventParam3, nullptr ); + playScene( eventId, scene, flags, eventParam2, eventParam3, nullptr ); } void Core::Entity::Player::playScene( uint32_t eventId, uint32_t scene, uint32_t flags, Event::EventHandler::SceneReturnCallback eventCallback ) { - playScene( eventId, scene, flags, 0, 0, eventCallback ); + playScene( eventId, scene, flags, 0, 0, eventCallback ); } void Core::Entity::Player::playScene( uint32_t eventId, uint32_t scene, uint32_t flags ) { - playScene( eventId, scene, flags, 0, 0, nullptr ); + playScene( eventId, scene, flags, 0, 0, nullptr ); } void Core::Entity::Player::playScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, uint32_t eventParam3, Event::EventHandler::SceneReturnCallback eventCallback ) { - playScene( eventId, scene, flags, eventParam2, eventParam3, 0, eventCallback ); + playScene( eventId, scene, flags, eventParam2, eventParam3, 0, eventCallback ); } void Core::Entity::Player::playGilShop( uint32_t eventId, uint32_t flags, Event::EventHandler::SceneReturnCallback eventCallback ) { - auto pEvent = bootstrapSceneEvent( eventId, flags ); - if( !pEvent ) - return; + auto pEvent = bootstrapSceneEvent( eventId, flags ); + if( !pEvent ) + return; - pEvent->setPlayedScene( true ); - pEvent->setEventReturnCallback( eventCallback ); - pEvent->setSceneChainCallback( nullptr ); + pEvent->setPlayedScene( true ); + pEvent->setEventReturnCallback( eventCallback ); + pEvent->setSceneChainCallback( nullptr ); - auto openGilShopPacket = makeZonePacket< Server::FFXIVIpcEventOpenGilShop >( getId() ); - openGilShopPacket->data().eventId = eventId; - openGilShopPacket->data().sceneFlags = flags; - openGilShopPacket->data().actorId = getId(); + auto openGilShopPacket = makeZonePacket< Server::FFXIVIpcEventOpenGilShop >( getId() ); + openGilShopPacket->data().eventId = eventId; + openGilShopPacket->data().sceneFlags = flags; + openGilShopPacket->data().actorId = getId(); - openGilShopPacket->data().scene = 10; + openGilShopPacket->data().scene = 10; - queuePacket( openGilShopPacket ); + queuePacket( openGilShopPacket ); } Core::Event::EventHandlerPtr Core::Entity::Player::bootstrapSceneEvent( uint32_t eventId, uint32_t flags ) { - if( flags & 0x02 ) - setStateFlag( PlayerStateFlag::WatchingCutscene ); + if( flags & 0x02 ) + setStateFlag( PlayerStateFlag::WatchingCutscene ); - auto pEvent = getEvent( eventId ); - if( !pEvent && getEventCount() ) - { - // We're trying to play a nested event, need to start it first. - eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); - pEvent = getEvent( eventId ); - } - else if( !pEvent ) - { - auto pLog = g_fw.get< Logger >(); - pLog->error( "Could not find event " + std::to_string( eventId ) + ", event has not been started!" ); - return nullptr; - } + auto pEvent = getEvent( eventId ); + if( !pEvent && getEventCount() ) + { + // We're trying to play a nested event, need to start it first. + eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); + pEvent = getEvent( eventId ); + } + else if( !pEvent ) + { + auto pLog = g_fw.get< Logger >(); + pLog->error( "Could not find event " + std::to_string( eventId ) + ", event has not been started!" ); + return nullptr; + } - return pEvent; + return pEvent; } void Core::Entity::Player::playScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, - uint32_t eventParam3, uint32_t eventParam4, Event::EventHandler::SceneReturnCallback eventCallback ) + uint32_t eventParam3, uint32_t eventParam4, + Event::EventHandler::SceneReturnCallback eventCallback ) { - auto pEvent = bootstrapSceneEvent( eventId, flags ); - if( !pEvent ) - return; + auto pEvent = bootstrapSceneEvent( eventId, flags ); + if( !pEvent ) + return; - pEvent->setPlayedScene( true ); - pEvent->setEventReturnCallback( eventCallback ); - pEvent->setSceneChainCallback( nullptr ); - auto eventPlay = boost::make_shared< EventPlayPacket >( getId(), pEvent->getActorId(), pEvent->getId(), - scene, flags, eventParam2, eventParam3, eventParam4 ); + pEvent->setPlayedScene( true ); + pEvent->setEventReturnCallback( eventCallback ); + pEvent->setSceneChainCallback( nullptr ); + auto eventPlay = boost::make_shared< EventPlayPacket >( getId(), pEvent->getActorId(), pEvent->getId(), + scene, flags, eventParam2, eventParam3, eventParam4 ); - queuePacket( eventPlay ); + queuePacket( eventPlay ); } void Core::Entity::Player::playSceneChain( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, uint32_t eventParam3, uint32_t eventParam4, Core::Event::EventHandler::SceneChainCallback sceneChainCallback ) { - auto pEvent = bootstrapSceneEvent( eventId, flags ); - if( !pEvent ) - return; + auto pEvent = bootstrapSceneEvent( eventId, flags ); + if( !pEvent ) + return; - pEvent->setPlayedScene( true ); - pEvent->setSceneChainCallback( sceneChainCallback ); - pEvent->setEventReturnCallback( nullptr ); - auto eventPlay = boost::make_shared< EventPlayPacket >( getId(), pEvent->getActorId(), pEvent->getId(), - scene, flags, eventParam2, eventParam3, eventParam4 ); + pEvent->setPlayedScene( true ); + pEvent->setSceneChainCallback( sceneChainCallback ); + pEvent->setEventReturnCallback( nullptr ); + auto eventPlay = boost::make_shared< EventPlayPacket >( getId(), pEvent->getActorId(), pEvent->getId(), + scene, flags, eventParam2, eventParam3, eventParam4 ); - queuePacket( eventPlay ); + queuePacket( eventPlay ); } void Core::Entity::Player::playSceneChain( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, uint32_t eventParam3, Core::Event::EventHandler::SceneChainCallback sceneChainCallback ) { - playSceneChain( eventId, scene, flags, eventParam2, eventParam3, 0, sceneChainCallback ); + playSceneChain( eventId, scene, flags, eventParam2, eventParam3, 0, sceneChainCallback ); } void Core::Entity::Player::playSceneChain( uint32_t eventId, uint32_t scene, uint32_t flags, Core::Event::EventHandler::SceneChainCallback sceneChainCallback ) { - playSceneChain( eventId, scene, flags, 0, 0, 0, sceneChainCallback ); + playSceneChain( eventId, scene, flags, 0, 0, 0, sceneChainCallback ); } void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) { - auto pEvent = getEvent( eventId ); + auto pEvent = getEvent( eventId ); - if( !pEvent ) - { - auto pLog = g_fw.get< Logger >(); - pLog->error( "Could not find event " + std::to_string( eventId ) + ", event has not been started!" ); - return; - } + if( !pEvent ) + { + auto pLog = g_fw.get< Logger >(); + pLog->error( "Could not find event " + std::to_string( eventId ) + ", event has not been started!" ); + return; + } - if( getEventCount() > 1 && pEvent->getEventType() != Event::EventHandler::Nest ) - { - // this is the parent of a nested event, we can't finish it until the parent finishes - return; - } + if( getEventCount() > 1 && pEvent->getEventType() != Event::EventHandler::Nest ) + { + // this is the parent of a nested event, we can't finish it until the parent finishes + return; + } - switch( pEvent->getEventType() ) - { - case Event::EventHandler::Nest: - { + switch( pEvent->getEventType() ) + { + case Event::EventHandler::Nest: + { queuePacket( boost::make_shared< EventFinishPacket >( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam() ) ); removeEvent( pEvent->getId() ); @@ -253,32 +254,33 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) for( auto it : events ) { - if( it.second->hasPlayedScene() == false ) - { - // TODO: not happy with this, this is also prone to break wit more than one remaining event in there - queuePacket( boost::make_shared< EventFinishPacket >( getId(), it.second->getId(), - it.second->getEventType(), it.second->getEventParam() ) ); - removeEvent( it.second->getId() ); - } + if( it.second->hasPlayedScene() == false ) + { + // TODO: not happy with this, this is also prone to break wit more than one remaining event in there + queuePacket( boost::make_shared< EventFinishPacket >( getId(), it.second->getId(), + it.second->getEventType(), + it.second->getEventParam() ) ); + removeEvent( it.second->getId() ); + } } break; - } - default: - { + } + default: + { queuePacket( boost::make_shared< EventFinishPacket >( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam() ) ); break; - } - } + } + } - if( hasStateFlag( PlayerStateFlag::WatchingCutscene ) ) - unsetStateFlag( PlayerStateFlag::WatchingCutscene ); + if( hasStateFlag( PlayerStateFlag::WatchingCutscene ) ) + unsetStateFlag( PlayerStateFlag::WatchingCutscene ); - removeEvent( pEvent->getId() ); + removeEvent( pEvent->getId() ); - if( freePlayer == 1 ) - unsetStateFlag( PlayerStateFlag::InNpcEvent ); + if( freePlayer == 1 ) + unsetStateFlag( PlayerStateFlag::InNpcEvent ); } void Core::Entity::Player::eventActionStart( uint32_t eventId, @@ -287,28 +289,28 @@ void Core::Entity::Player::eventActionStart( uint32_t eventId, ActionCallback interruptCallback, uint64_t additional ) { - auto pEventAction = Action::make_EventAction( getAsChara(), eventId, action, - finishCallback, interruptCallback, additional ); + auto pEventAction = Action::make_EventAction( getAsChara(), eventId, action, + finishCallback, interruptCallback, additional ); - setCurrentAction( pEventAction ); - auto pEvent = getEvent( eventId ); + setCurrentAction( pEventAction ); + auto pEvent = getEvent( eventId ); - if( !pEvent && getEventCount() ) - { - // We're trying to play a nested event, need to start it first. - eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); - pEvent = getEvent( eventId ); - } - else if( !pEvent ) - { - auto pLog = g_fw.get< Logger >(); - pLog->error( "Could not find event " + std::to_string( eventId ) + ", event has not been started!" ); - return; - } + if( !pEvent && getEventCount() ) + { + // We're trying to play a nested event, need to start it first. + eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); + pEvent = getEvent( eventId ); + } + else if( !pEvent ) + { + auto pLog = g_fw.get< Logger >(); + pLog->error( "Could not find event " + std::to_string( eventId ) + ", event has not been started!" ); + return; + } - if( pEvent ) - pEvent->setPlayedScene( true ); - pEventAction->onStart(); + if( pEvent ) + pEvent->setPlayedScene( true ); + pEventAction->onStart(); } @@ -318,27 +320,27 @@ void Core::Entity::Player::eventItemActionStart( uint32_t eventId, ActionCallback interruptCallback, uint64_t additional ) { - Action::ActionPtr pEventItemAction = Action::make_EventItemAction( getAsChara(), eventId, action, - finishCallback, interruptCallback, additional ); + Action::ActionPtr pEventItemAction = Action::make_EventItemAction( getAsChara(), eventId, action, + finishCallback, interruptCallback, additional ); - setCurrentAction( pEventItemAction ); + setCurrentAction( pEventItemAction ); - pEventItemAction->onStart(); + pEventItemAction->onStart(); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Core::Entity::Player::onLogin() { - auto pConfig = g_fw.get< ConfigMgr >(); - auto motd = pConfig->getValue< std::string >( "General.MotD", "" ); + auto pConfig = g_fw.get< ConfigMgr >(); + auto motd = pConfig->getValue< std::string >( "General.MotD", "" ); - std::istringstream ss( motd ); - std::string msg; - while( std::getline( ss, msg, ';' ) ) - { - sendNotice( msg ); - } + std::istringstream ss( motd ); + std::string msg; + while( std::getline( ss, msg, ';' ) ) + { + sendNotice( msg ); + } } void Core::Entity::Player::onZoneStart() @@ -359,55 +361,55 @@ void Core::Entity::Player::onDeath() // TODO: slightly ugly here and way too static. Needs too be done properly void Core::Entity::Player::onTick() { - - bool sendUpdate = false; - if( !isAlive() || !isLoadingComplete() ) - return; + bool sendUpdate = false; - uint32_t addHp = static_cast< uint32_t >( getMaxHp() * 0.1f + 1 ); - uint32_t addMp = static_cast< uint32_t >( getMaxMp() * 0.06f + 1 ); - uint32_t addTp = 100; + if( !isAlive() || !isLoadingComplete() ) + return; - if( !m_actorIdTohateSlotMap.empty() ) - { - addHp = static_cast< uint32_t >( getMaxHp() * 0.01f + 1 ); - addMp = static_cast< uint32_t >( getMaxMp() * 0.02f + 1 ); - addTp = 60; - } + uint32_t addHp = static_cast< uint32_t >( getMaxHp() * 0.1f + 1 ); + uint32_t addMp = static_cast< uint32_t >( getMaxMp() * 0.06f + 1 ); + uint32_t addTp = 100; - if( m_hp < getMaxHp() ) - { + if( !m_actorIdTohateSlotMap.empty() ) + { + addHp = static_cast< uint32_t >( getMaxHp() * 0.01f + 1 ); + addMp = static_cast< uint32_t >( getMaxMp() * 0.02f + 1 ); + addTp = 60; + } - if( m_hp + addHp < getMaxHp() ) - m_hp += addHp; - else - m_hp = getMaxHp(); + if( m_hp < getMaxHp() ) + { - sendUpdate = true; - } + if( m_hp + addHp < getMaxHp() ) + m_hp += addHp; + else + m_hp = getMaxHp(); - if( m_mp < getMaxMp() ) - { + sendUpdate = true; + } - if( m_mp + addMp < getMaxMp() ) - m_mp += addMp; - else - m_mp = getMaxMp(); + if( m_mp < getMaxMp() ) + { - sendUpdate = true; - } + if( m_mp + addMp < getMaxMp() ) + m_mp += addMp; + else + m_mp = getMaxMp(); - if( m_tp < 1000 ) - { - if( m_tp + addTp < 1000 ) - m_tp += addTp; - else - m_tp = 1000; + sendUpdate = true; + } - sendUpdate = true; - } + if( m_tp < 1000 ) + { + if( m_tp + addTp < 1000 ) + m_tp += addTp; + else + m_tp = 1000; - if( sendUpdate ) - sendStatusUpdate(); + sendUpdate = true; + } + + if( sendUpdate ) + sendStatusUpdate(); } diff --git a/src/servers/sapphire_zone/Actor/PlayerInventory.cpp b/src/servers/sapphire_zone/Actor/PlayerInventory.cpp index 87e13d5d..52d7f943 100644 --- a/src/servers/sapphire_zone/Actor/PlayerInventory.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerInventory.cpp @@ -41,742 +41,743 @@ using namespace Core::Network::Packets::Server; using namespace Core::Network::ActorControl; - - void Core::Entity::Player::initInventory() { - auto setupContainer = [this]( InventoryType type, uint8_t maxSize, const std::string& tableName, bool isMultiStorage, bool isPersistentStorage = true ) - { m_storageMap[type] = make_ItemContainer( type, maxSize, tableName, isMultiStorage, isPersistentStorage ); }; + auto setupContainer = [ this ]( InventoryType type, uint8_t maxSize, const std::string& tableName, + bool isMultiStorage, bool isPersistentStorage = true ) + { m_storageMap[ type ] = make_ItemContainer( type, maxSize, tableName, isMultiStorage, isPersistentStorage ); }; - // main bags - setupContainer( Bag0, 34, "charaiteminventory", true ); - setupContainer( Bag1, 34, "charaiteminventory", true ); - setupContainer( Bag2, 34, "charaiteminventory", true ); - setupContainer( Bag3, 34, "charaiteminventory", true ); + // main bags + setupContainer( Bag0, 34, "charaiteminventory", true ); + setupContainer( Bag1, 34, "charaiteminventory", true ); + setupContainer( Bag2, 34, "charaiteminventory", true ); + setupContainer( Bag3, 34, "charaiteminventory", true ); - // gear set - setupContainer( GearSet0, 13, "charaitemgearset", true ); + // gear set + setupContainer( GearSet0, 13, "charaitemgearset", true ); - // gil contianer - setupContainer( Currency, 11, "charaiteminventory", true ); + // gil contianer + setupContainer( Currency, 11, "charaiteminventory", true ); - // crystals?? - setupContainer( Crystal, 11, "charaiteminventory", true ); + // crystals?? + setupContainer( Crystal, 11, "charaiteminventory", true ); - // armory weapons - 0 - setupContainer( ArmoryMain, 34, "charaiteminventory", true ); + // armory weapons - 0 + setupContainer( ArmoryMain, 34, "charaiteminventory", true ); - // armory offhand - 1 - setupContainer( ArmoryOff, 34, "charaiteminventory", true ); + // armory offhand - 1 + setupContainer( ArmoryOff, 34, "charaiteminventory", true ); - //armory head - 2 - setupContainer( ArmoryHead, 34, "charaiteminventory", true ); + //armory head - 2 + setupContainer( ArmoryHead, 34, "charaiteminventory", true ); - //armory body - 3 - setupContainer( ArmoryBody, 34, "charaiteminventory", true ); + //armory body - 3 + setupContainer( ArmoryBody, 34, "charaiteminventory", true ); - //armory hand - 4 - setupContainer( ArmoryHand, 34, "charaiteminventory", true ); + //armory hand - 4 + setupContainer( ArmoryHand, 34, "charaiteminventory", true ); - //armory waist - 5 - setupContainer( ArmoryWaist, 34, "charaiteminventory", true ); + //armory waist - 5 + setupContainer( ArmoryWaist, 34, "charaiteminventory", true ); - //armory legs - 6 - setupContainer( ArmoryLegs, 34, "charaiteminventory", true ); + //armory legs - 6 + setupContainer( ArmoryLegs, 34, "charaiteminventory", true ); - //armory feet - 7 - setupContainer( ArmoryFeet, 34, "charaiteminventory", true ); + //armory feet - 7 + setupContainer( ArmoryFeet, 34, "charaiteminventory", true ); - //neck - setupContainer( ArmoryNeck, 34, "charaiteminventory", true ); + //neck + setupContainer( ArmoryNeck, 34, "charaiteminventory", true ); - //earring - setupContainer( ArmoryEar, 34, "charaiteminventory", true ); + //earring + setupContainer( ArmoryEar, 34, "charaiteminventory", true ); - //wrist - setupContainer( ArmoryWrist, 34, "charaiteminventory", true ); + //wrist + setupContainer( ArmoryWrist, 34, "charaiteminventory", true ); - //armory rings - 11 - setupContainer( ArmoryRing, 34, "charaiteminventory", true ); + //armory rings - 11 + setupContainer( ArmoryRing, 34, "charaiteminventory", true ); - //soul crystals - 13 - setupContainer( ArmorySoulCrystal, 34, "charaiteminventory", true ); + //soul crystals - 13 + setupContainer( ArmorySoulCrystal, 34, "charaiteminventory", true ); - // item hand in container - // non-persistent container, will not save its contents - setupContainer( HandIn, 10, "", true, false ); + // item hand in container + // non-persistent container, will not save its contents + setupContainer( HandIn, 10, "", true, false ); - loadInventory(); + loadInventory(); } void Core::Entity::Player::sendItemLevel() { - queuePacket( makeActorControl142( getId(), SetItemLevel, getItemLevel(), 0 ) ); + queuePacket( makeActorControl142( getId(), SetItemLevel, getItemLevel(), 0 ) ); } void Core::Entity::Player::equipWeapon( ItemPtr pItem ) { - auto exdData = g_fw.get< Core::Data::ExdDataGenerated >(); - if( !exdData ) - return; + auto exdData = g_fw.get< Core::Data::ExdDataGenerated >(); + if( !exdData ) + return; - auto itemInfo = exdData->get< Core::Data::Item >( pItem->getId() ); - auto itemClassJob = itemInfo->classJobUse; + auto itemInfo = exdData->get< Core::Data::Item >( pItem->getId() ); + auto itemClassJob = itemInfo->classJobUse; - auto currentClass = getClass(); - auto newClassJob = static_cast< ClassJob >( itemClassJob ); + auto currentClass = getClass(); + auto newClassJob = static_cast< ClassJob >( itemClassJob ); - if( isClassJobUnlocked( newClassJob ) ) - return; + if( isClassJobUnlocked( newClassJob ) ) + return; - // todo: check if soul crystal is equipped and use job instead + // todo: check if soul crystal is equipped and use job instead - setClassJob( newClassJob ); + setClassJob( newClassJob ); } // equip an item void Core::Entity::Player::equipItem( Common::GearSetSlot equipSlotId, ItemPtr pItem, bool sendUpdate ) { - //g_framework.getLogger().debug( "Equipping into slot " + std::to_string( equipSlotId ) ); + //g_framework.getLogger().debug( "Equipping into slot " + std::to_string( equipSlotId ) ); - uint64_t model = pItem->getModelId1(); - uint64_t model2 = pItem->getModelId2(); + uint64_t model = pItem->getModelId1(); + uint64_t model2 = pItem->getModelId2(); - switch( equipSlotId ) - { - case Common::GearSetSlot::MainHand: + switch( equipSlotId ) + { + case Common::GearSetSlot::MainHand: m_modelMainWeapon = model; m_modelSubWeapon = model2; // TODO: add job change upon changing weapon if needed // equipWeapon( pItem ); break; - case Common::GearSetSlot::OffHand: + case Common::GearSetSlot::OffHand: m_modelSubWeapon = model; break; - case Common::GearSetSlot::SoulCrystal: + case Common::GearSetSlot::SoulCrystal: // TODO: add Job change on equipping crystal // change job break; - default: // any other slot - m_modelEquip[static_cast< uint8_t >( equipSlotId )] = static_cast< uint32_t >( model ); + default: // any other slot + m_modelEquip[ static_cast< uint8_t >( equipSlotId ) ] = static_cast< uint32_t >( model ); break; - } + } - if( sendUpdate ) - { - this->sendModel(); - m_itemLevel = calculateEquippedGearItemLevel(); - sendItemLevel(); - } + if( sendUpdate ) + { + this->sendModel(); + m_itemLevel = calculateEquippedGearItemLevel(); + sendItemLevel(); + } } void Core::Entity::Player::unequipItem( Common::GearSetSlot equipSlotId, ItemPtr pItem ) { - m_modelEquip[static_cast< uint8_t >( equipSlotId )] = 0; - sendModel(); + m_modelEquip[ static_cast< uint8_t >( equipSlotId ) ] = 0; + sendModel(); - m_itemLevel = calculateEquippedGearItemLevel(); - sendItemLevel(); + m_itemLevel = calculateEquippedGearItemLevel(); + sendItemLevel(); } // TODO: these next functions are so similar that they could likely be simplified void Core::Entity::Player::addCurrency( CurrencyType type, uint32_t amount ) { - auto slot = static_cast< uint8_t >( static_cast< uint8_t >( type ) - 1 ); - auto currItem = m_storageMap[Currency]->getItem( slot ); + auto slot = static_cast< uint8_t >( static_cast< uint8_t >( type ) - 1 ); + auto currItem = m_storageMap[ Currency ]->getItem( slot ); - if( !currItem ) - { - // TODO: map currency type to itemid - currItem = createItem( 1 ); - m_storageMap[Currency]->setItem( slot, currItem ); - } + if( !currItem ) + { + // TODO: map currency type to itemid + currItem = createItem( 1 ); + m_storageMap[ Currency ]->setItem( slot, currItem ); + } - uint32_t currentAmount = currItem->getStackSize(); - currItem->setStackSize( currentAmount + amount ); - writeItem( currItem ); + uint32_t currentAmount = currItem->getStackSize(); + currItem->setStackSize( currentAmount + amount ); + writeItem( currItem ); - updateContainer( Currency, slot, currItem ); + updateContainer( Currency, slot, currItem ); - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), - static_cast< uint8_t >( type ) - 1, - Common::InventoryType::Currency, - *currItem ); - queuePacket( invUpdate ); + auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), + static_cast< uint8_t >( type ) - 1, + Common::InventoryType::Currency, + *currItem ); + queuePacket( invUpdate ); } void Core::Entity::Player::removeCurrency( Common::CurrencyType type, uint32_t amount ) { - auto currItem = m_storageMap[Currency]->getItem( static_cast< uint8_t >( type ) - 1 ); + auto currItem = m_storageMap[ Currency ]->getItem( static_cast< uint8_t >( type ) - 1 ); - if( !currItem ) - return; + if( !currItem ) + return; - uint32_t currentAmount = currItem->getStackSize(); - if( amount > currentAmount ) - currItem->setStackSize( 0 ); - else - currItem->setStackSize( currentAmount - amount ); - writeItem( currItem ); + uint32_t currentAmount = currItem->getStackSize(); + if( amount > currentAmount ) + currItem->setStackSize( 0 ); + else + currItem->setStackSize( currentAmount - amount ); + writeItem( currItem ); - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), - static_cast< uint8_t >( type ) - 1, - Common::InventoryType::Currency, - *currItem ); - queuePacket( invUpdate ); + auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), + static_cast< uint8_t >( type ) - 1, + Common::InventoryType::Currency, + *currItem ); + queuePacket( invUpdate ); } void Core::Entity::Player::addCrystal( Common::CrystalType type, uint32_t amount ) { - auto currItem = m_storageMap[Crystal]->getItem( static_cast< uint8_t >( type ) - 1 ); + auto currItem = m_storageMap[ Crystal ]->getItem( static_cast< uint8_t >( type ) - 1 ); - if( !currItem ) - { - // TODO: map currency type to itemid - currItem = createItem( static_cast< uint8_t >( type ) + 1 ); - m_storageMap[Crystal]->setItem( static_cast< uint8_t >( type ) - 1, currItem ); - } + if( !currItem ) + { + // TODO: map currency type to itemid + currItem = createItem( static_cast< uint8_t >( type ) + 1 ); + m_storageMap[ Crystal ]->setItem( static_cast< uint8_t >( type ) - 1, currItem ); + } - uint32_t currentAmount = currItem->getStackSize(); + uint32_t currentAmount = currItem->getStackSize(); - currItem->setStackSize( currentAmount + amount ); + currItem->setStackSize( currentAmount + amount ); - writeItem( currItem ); + writeItem( currItem ); - writeInventory( Crystal ); + writeInventory( Crystal ); - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), - static_cast< uint8_t >( type ) - 1, - Common::InventoryType::Crystal, - *currItem ); - queuePacket( invUpdate ); - queuePacket( makeActorControl143( getId(), ItemObtainIcon, static_cast< uint8_t >( type ) + 1, amount ) ); + auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), + static_cast< uint8_t >( type ) - 1, + Common::InventoryType::Crystal, + *currItem ); + queuePacket( invUpdate ); + queuePacket( makeActorControl143( getId(), ItemObtainIcon, static_cast< uint8_t >( type ) + 1, amount ) ); } void Core::Entity::Player::removeCrystal( Common::CrystalType type, uint32_t amount ) { - auto currItem = m_storageMap[Crystal]->getItem( static_cast< uint8_t >( type ) - 1 ); + auto currItem = m_storageMap[ Crystal ]->getItem( static_cast< uint8_t >( type ) - 1 ); - if( !currItem ) - return; + if( !currItem ) + return; - uint32_t currentAmount = currItem->getStackSize(); - if( amount > currentAmount ) - currItem->setStackSize( 0 ); - else - currItem->setStackSize( currentAmount - amount ); + uint32_t currentAmount = currItem->getStackSize(); + if( amount > currentAmount ) + currItem->setStackSize( 0 ); + else + currItem->setStackSize( currentAmount - amount ); - writeItem( currItem ); + writeItem( currItem ); - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), - static_cast< uint8_t >( type ) - 1, - Common::InventoryType::Crystal, - *currItem ); - queuePacket( invUpdate ); + auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), + static_cast< uint8_t >( type ) - 1, + Common::InventoryType::Crystal, + *currItem ); + queuePacket( invUpdate ); } void Core::Entity::Player::sendInventory() { - InventoryMap::iterator it; + InventoryMap::iterator it; - int32_t count = 0; - for( it = m_storageMap.begin(); it != m_storageMap.end(); ++it, count++ ) - { + int32_t count = 0; + for( it = m_storageMap.begin(); it != m_storageMap.end(); ++it, count++ ) + { - auto pMap = it->second->getItemMap(); - auto itM = pMap.begin(); + auto pMap = it->second->getItemMap(); + auto itM = pMap.begin(); - for( ; itM != pMap.end(); ++itM ) + for( ; itM != pMap.end(); ++itM ) + { + if( !itM->second ) + return; + + if( it->second->getId() == InventoryType::Currency || it->second->getId() == InventoryType::Crystal ) { - if( !itM->second ) - return; - - if( it->second->getId() == InventoryType::Currency || it->second->getId() == InventoryType::Crystal ) - { - auto currencyInfoPacket = makeZonePacket< FFXIVIpcCurrencyCrystalInfo >( getId() ); - currencyInfoPacket->data().sequence = count; - currencyInfoPacket->data().catalogId = itM->second->getId(); - currencyInfoPacket->data().unknown = 1; - currencyInfoPacket->data().quantity = itM->second->getStackSize(); - currencyInfoPacket->data().containerId = it->second->getId(); - currencyInfoPacket->data().slot = 0; - queuePacket( currencyInfoPacket ); - } - else - { - auto itemInfoPacket = makeZonePacket< FFXIVIpcItemInfo >( getId() ); - itemInfoPacket->data().sequence = count; - itemInfoPacket->data().containerId = it->second->getId(); - itemInfoPacket->data().slot = itM->first; - itemInfoPacket->data().quantity = itM->second->getStackSize(); - itemInfoPacket->data().catalogId = itM->second->getId(); - itemInfoPacket->data().condition = 30000; - itemInfoPacket->data().spiritBond = 0; - itemInfoPacket->data().hqFlag = itM->second->isHq() ? 1 : 0; - queuePacket( itemInfoPacket ); - } + auto currencyInfoPacket = makeZonePacket< FFXIVIpcCurrencyCrystalInfo >( getId() ); + currencyInfoPacket->data().sequence = count; + currencyInfoPacket->data().catalogId = itM->second->getId(); + currencyInfoPacket->data().unknown = 1; + currencyInfoPacket->data().quantity = itM->second->getStackSize(); + currencyInfoPacket->data().containerId = it->second->getId(); + currencyInfoPacket->data().slot = 0; + queuePacket( currencyInfoPacket ); } + else + { + auto itemInfoPacket = makeZonePacket< FFXIVIpcItemInfo >( getId() ); + itemInfoPacket->data().sequence = count; + itemInfoPacket->data().containerId = it->second->getId(); + itemInfoPacket->data().slot = itM->first; + itemInfoPacket->data().quantity = itM->second->getStackSize(); + itemInfoPacket->data().catalogId = itM->second->getId(); + itemInfoPacket->data().condition = 30000; + itemInfoPacket->data().spiritBond = 0; + itemInfoPacket->data().hqFlag = itM->second->isHq() ? 1 : 0; + queuePacket( itemInfoPacket ); + } + } - auto containerInfoPacket = makeZonePacket< FFXIVIpcContainerInfo >( getId() ); - containerInfoPacket->data().sequence = count; - containerInfoPacket->data().numItems = it->second->getEntryCount(); - containerInfoPacket->data().containerId = it->second->getId(); - queuePacket( containerInfoPacket ); + auto containerInfoPacket = makeZonePacket< FFXIVIpcContainerInfo >( getId() ); + containerInfoPacket->data().sequence = count; + containerInfoPacket->data().numItems = it->second->getEntryCount(); + containerInfoPacket->data().containerId = it->second->getId(); + queuePacket( containerInfoPacket ); - } + } } Core::Entity::Player::InvSlotPairVec Core::Entity::Player::getSlotsOfItemsInInventory( uint32_t catalogId ) { - InvSlotPairVec outVec; - for( auto i : { Bag0, Bag1, Bag2, Bag3 } ) - { - auto inv = m_storageMap[i]; - for( auto item : inv->getItemMap() ) - { - if( item.second && item.second->getId() == catalogId ) - outVec.push_back( std::make_pair( i, static_cast< int8_t >( item.first ) ) ); - } - } - return outVec; + InvSlotPairVec outVec; + for( auto i : { Bag0, Bag1, Bag2, Bag3 } ) + { + auto inv = m_storageMap[ i ]; + for( auto item : inv->getItemMap() ) + { + if( item.second && item.second->getId() == catalogId ) + outVec.push_back( std::make_pair( i, static_cast< int8_t >( item.first ) ) ); + } + } + return outVec; } Core::Entity::Player::InvSlotPair Core::Entity::Player::getFreeBagSlot() { - for( auto i : { Bag0, Bag1, Bag2, Bag3 } ) - { - auto freeSlot = static_cast< int8_t >( m_storageMap[i]->getFreeSlot() ); + for( auto i : { Bag0, Bag1, Bag2, Bag3 } ) + { + auto freeSlot = static_cast< int8_t >( m_storageMap[ i ]->getFreeSlot() ); - if( freeSlot != -1 ) - return std::make_pair( i, freeSlot ); - } - // no room in inventory - return std::make_pair( 0, -1 ); + if( freeSlot != -1 ) + return std::make_pair( i, freeSlot ); + } + // no room in inventory + return std::make_pair( 0, -1 ); } Core::ItemPtr Core::Entity::Player::getItemAt( uint16_t containerId, uint8_t slotId ) { - return m_storageMap[containerId]->getItem( slotId ); + return m_storageMap[ containerId ]->getItem( slotId ); } uint32_t Core::Entity::Player::getCurrency( CurrencyType type ) { - auto currItem = m_storageMap[Currency]->getItem( static_cast< uint8_t >( type ) - 1 ); + auto currItem = m_storageMap[ Currency ]->getItem( static_cast< uint8_t >( type ) - 1 ); - if( !currItem ) - return 0; + if( !currItem ) + return 0; - return currItem->getStackSize(); + return currItem->getStackSize(); } uint32_t Core::Entity::Player::getCrystal( CrystalType type ) { - auto currItem = m_storageMap[Crystal]->getItem( static_cast< uint8_t >( type ) - 1 ); + auto currItem = m_storageMap[ Crystal ]->getItem( static_cast< uint8_t >( type ) - 1 ); - if( !currItem ) - return 0; + if( !currItem ) + return 0; - return currItem->getStackSize(); + return currItem->getStackSize(); } void Core::Entity::Player::writeInventory( InventoryType type ) { - auto pLog = g_fw.get< Logger >(); - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pLog = g_fw.get< Logger >(); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto storage = m_storageMap[type]; + auto storage = m_storageMap[ type ]; - if( !storage->isPersistentStorage() ) - return; + if( !storage->isPersistentStorage() ) + return; - std::string query = "UPDATE " + storage->getTableName() + " SET "; + std::string query = "UPDATE " + storage->getTableName() + " SET "; - for( int32_t i = 0; i <= storage->getMaxSize(); i++ ) - { - auto currItem = storage->getItem( i ); + for( int32_t i = 0; i <= storage->getMaxSize(); i++ ) + { + auto currItem = storage->getItem( i ); - if( i > 0 ) - query += ", "; + if( i > 0 ) + query += ", "; - query += "container_" + std::to_string( i ) + " = " + std::to_string( currItem ? currItem->getUId() : 0 ); - } + query += "container_" + std::to_string( i ) + " = " + std::to_string( currItem ? currItem->getUId() : 0 ); + } - query += " WHERE CharacterId = " + std::to_string( getId() ); + query += " WHERE CharacterId = " + std::to_string( getId() ); - if( storage->isMultiStorage() ) - query += " AND storageId = " + std::to_string( static_cast< uint16_t >( type ) ); + if( storage->isMultiStorage() ) + query += " AND storageId = " + std::to_string( static_cast< uint16_t >( type ) ); - pLog->debug( query ); - pDb->execute( query ); + pLog->debug( query ); + pDb->execute( query ); } void Core::Entity::Player::writeItem( Core::ItemPtr pItem ) const { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - pDb->execute( "UPDATE charaglobalitem SET stack = " + std::to_string( pItem->getStackSize() ) + " " + - // TODO: add other attributes - " WHERE itemId = " + std::to_string( pItem->getUId() ) ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + pDb->execute( "UPDATE charaglobalitem SET stack = " + std::to_string( pItem->getStackSize() ) + " " + + // TODO: add other attributes + " WHERE itemId = " + std::to_string( pItem->getUId() ) ); } void Core::Entity::Player::deleteItemDb( Core::ItemPtr item ) const { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - pDb->execute( "UPDATE charaglobalitem SET IS_DELETE = 1 WHERE itemId = " + std::to_string( item->getUId() ) ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + pDb->execute( "UPDATE charaglobalitem SET IS_DELETE = 1 WHERE itemId = " + std::to_string( item->getUId() ) ); } bool Core::Entity::Player::isObtainable( uint32_t catalogId, uint8_t quantity ) { - return true; + return true; } Core::ItemPtr Core::Entity::Player::addItem( uint32_t catalogId, uint32_t quantity, bool isHq, bool silent ) { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto itemInfo = pExdData->get< Core::Data::Item >( catalogId ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto itemInfo = pExdData->get< Core::Data::Item >( catalogId ); - // if item data doesn't exist or it's a blank field - if( !itemInfo || itemInfo->levelItem == 0 ) - { - return nullptr; - } + // if item data doesn't exist or it's a blank field + if( !itemInfo || itemInfo->levelItem == 0 ) + { + return nullptr; + } - quantity = std::min< uint32_t >( quantity, itemInfo->stackSize ); + quantity = std::min< uint32_t >( quantity, itemInfo->stackSize ); - // used for item obtain notification - uint32_t originalQuantity = quantity; + // used for item obtain notification + uint32_t originalQuantity = quantity; - // todo: for now we're just going to add any items to main inv + // todo: for now we're just going to add any items to main inv - std::pair< uint16_t, uint8_t > freeBagSlot; - bool foundFreeSlot = false; + std::pair< uint16_t, uint8_t > freeBagSlot; + bool foundFreeSlot = false; - std::vector< uint16_t > bags = { Bag0, Bag1, Bag2, Bag3 }; + std::vector< uint16_t > bags = { Bag0, Bag1, Bag2, Bag3 }; - // add the related armoury bag to the applicable bags and try and fill a free slot there before falling back to regular inventory - if( itemInfo->isEquippable && getEquipDisplayFlags() & StoreNewItemsInArmouryChest ) - { - auto bag = Items::Util::getCharaEquipSlotCategoryToArmoryId( itemInfo->equipSlotCategory ); + // add the related armoury bag to the applicable bags and try and fill a free slot there before falling back to regular inventory + if( itemInfo->isEquippable && getEquipDisplayFlags() & StoreNewItemsInArmouryChest ) + { + auto bag = Items::Util::getCharaEquipSlotCategoryToArmoryId( itemInfo->equipSlotCategory ); - bags.insert( bags.begin(), bag ); - } + bags.insert( bags.begin(), bag ); + } - for( auto bag : bags ) - { - auto storage = m_storageMap[bag]; + for( auto bag : bags ) + { + auto storage = m_storageMap[ bag ]; - for( uint8_t slot = 0; slot < storage->getMaxSize(); slot++ ) + for( uint8_t slot = 0; slot < storage->getMaxSize(); slot++ ) + { + auto item = storage->getItem( slot ); + + // add any items that are stackable + if( item && !itemInfo->isEquippable && item->getId() == catalogId ) { - auto item = storage->getItem( slot ); + uint32_t count = item->getStackSize(); + uint32_t maxStack = item->getMaxStackSize(); - // add any items that are stackable - if( item && !itemInfo->isEquippable && item->getId() == catalogId ) - { - uint32_t count = item->getStackSize(); - uint32_t maxStack = item->getMaxStackSize(); + // if slot is full, skip it + if( count >= maxStack ) + continue; - // if slot is full, skip it - if( count >= maxStack ) - continue; + // check slot is same quality + if( item->isHq() != isHq ) + continue; - // check slot is same quality - if( item->isHq() != isHq ) - continue; + // update stack + uint32_t newStackSize = count + quantity; + if( newStackSize > maxStack ) + { + quantity = newStackSize - maxStack; + newStackSize = maxStack; + } - // update stack - uint32_t newStackSize = count + quantity; - if( newStackSize > maxStack ) - { - quantity = newStackSize - maxStack; - newStackSize = maxStack; - } + item->setStackSize( newStackSize ); + writeItem( item ); - item->setStackSize( newStackSize ); - writeItem( item ); + auto slotUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), slot, bag, *item ); + queuePacket( slotUpdate ); - auto slotUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), slot, bag, *item ); - queuePacket( slotUpdate ); + // return existing stack if we have no overflow - items fit into a preexisting stack + if( quantity == 0 ) + { + queuePacket( makeActorControl143( getId(), ItemObtainIcon, catalogId, originalQuantity ) ); - // return existing stack if we have no overflow - items fit into a preexisting stack - if( quantity == 0 ) - { - queuePacket( makeActorControl143( getId(), ItemObtainIcon, catalogId, originalQuantity ) ); + return item; + } - return item; - } - - } - else if( !item && !foundFreeSlot ) - { - freeBagSlot = { bag, slot }; - foundFreeSlot = true; - } } - } + else if( !item && !foundFreeSlot ) + { + freeBagSlot = { bag, slot }; + foundFreeSlot = true; + } + } + } - // couldn't find a free slot and we still have some quantity of items left, shits fucked - if( !foundFreeSlot ) - return nullptr; + // couldn't find a free slot and we still have some quantity of items left, shits fucked + if( !foundFreeSlot ) + return nullptr; - auto item = createItem( catalogId, quantity ); - item->setHq( isHq ); + auto item = createItem( catalogId, quantity ); + item->setHq( isHq ); - auto storage = m_storageMap[freeBagSlot.first]; - storage->setItem( freeBagSlot.second, item ); + auto storage = m_storageMap[ freeBagSlot.first ]; + storage->setItem( freeBagSlot.second, item ); - writeInventory( static_cast< InventoryType >( freeBagSlot.first ) ); + writeInventory( static_cast< InventoryType >( freeBagSlot.first ) ); - if( !silent ) - { - auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), freeBagSlot.second, freeBagSlot.first, *item ); - queuePacket( invUpdate ); + if( !silent ) + { + auto invUpdate = boost::make_shared< UpdateInventorySlotPacket >( getId(), freeBagSlot.second, freeBagSlot.first, + *item ); + queuePacket( invUpdate ); - queuePacket( makeActorControl143( getId(), ItemObtainIcon, catalogId, originalQuantity ) ); - } + queuePacket( makeActorControl143( getId(), ItemObtainIcon, catalogId, originalQuantity ) ); + } - return item; + return item; } -void Core::Entity::Player::moveItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ) +void +Core::Entity::Player::moveItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ) { - auto tmpItem = m_storageMap[fromInventoryId]->getItem( fromSlotId ); - auto& itemMap = m_storageMap[fromInventoryId]->getItemMap(); + auto tmpItem = m_storageMap[ fromInventoryId ]->getItem( fromSlotId ); + auto& itemMap = m_storageMap[ fromInventoryId ]->getItemMap(); - if( tmpItem == nullptr ) - return; + if( tmpItem == nullptr ) + return; - itemMap[fromSlotId].reset(); + itemMap[ fromSlotId ].reset(); - m_storageMap[toInventoryId]->setItem( toSlot, tmpItem ); + m_storageMap[ toInventoryId ]->setItem( toSlot, tmpItem ); - writeInventory( static_cast< InventoryType >( toInventoryId ) ); + writeInventory( static_cast< InventoryType >( toInventoryId ) ); - if( fromInventoryId != toInventoryId ) - writeInventory( static_cast< InventoryType >( fromInventoryId ) ); + if( fromInventoryId != toInventoryId ) + writeInventory( static_cast< InventoryType >( fromInventoryId ) ); - if( static_cast< InventoryType >( toInventoryId ) == GearSet0 ) - equipItem( static_cast< GearSetSlot >( toSlot ), tmpItem, true ); + if( static_cast< InventoryType >( toInventoryId ) == GearSet0 ) + equipItem( static_cast< GearSetSlot >( toSlot ), tmpItem, true ); - if( static_cast< InventoryType >( fromInventoryId ) == GearSet0 ) - unequipItem( static_cast< GearSetSlot >( fromSlotId ), tmpItem ); + if( static_cast< InventoryType >( fromInventoryId ) == GearSet0 ) + unequipItem( static_cast< GearSetSlot >( fromSlotId ), tmpItem ); } bool Core::Entity::Player::updateContainer( uint16_t storageId, uint8_t slotId, ItemPtr pItem ) { - auto containerType = Items::Util::getContainerType( storageId ); + auto containerType = Items::Util::getContainerType( storageId ); - m_storageMap[storageId]->setItem( slotId, pItem ); + m_storageMap[ storageId ]->setItem( slotId, pItem ); - switch( containerType ) - { - case Armory: - case Bag: - case CurrencyCrystal: - { - writeInventory( static_cast< InventoryType >( storageId ) ); - break; - } + switch( containerType ) + { + case Armory: + case Bag: + case CurrencyCrystal: + { + writeInventory( static_cast< InventoryType >( storageId ) ); + break; + } - case GearSet: - { - if( pItem ) - equipItem( static_cast< GearSetSlot >( slotId ), pItem, true ); - else - unequipItem( static_cast< GearSetSlot >( slotId ), pItem ); + case GearSet: + { + if( pItem ) + equipItem( static_cast< GearSetSlot >( slotId ), pItem, true ); + else + unequipItem( static_cast< GearSetSlot >( slotId ), pItem ); - writeInventory( static_cast< InventoryType >( storageId ) ); - break; - } - default: - break; - } + writeInventory( static_cast< InventoryType >( storageId ) ); + break; + } + default: + break; + } - return true; + return true; } void Core::Entity::Player::splitItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot, uint16_t itemCount ) { - if( itemCount == 0 ) - return; + if( itemCount == 0 ) + return; - auto fromItem = m_storageMap[fromInventoryId]->getItem( fromSlotId ); - if( !fromItem ) - return; + auto fromItem = m_storageMap[ fromInventoryId ]->getItem( fromSlotId ); + if( !fromItem ) + return; - // check we have enough items in the origin slot - // nb: don't let the client 'split' a whole stack into another slot - if( fromItem->getStackSize() < itemCount ) - // todo: correct the invalid item split? does retail do this or does it just ignore it? - return; + // check we have enough items in the origin slot + // nb: don't let the client 'split' a whole stack into another slot + if( fromItem->getStackSize() < itemCount ) + // todo: correct the invalid item split? does retail do this or does it just ignore it? + return; - // make sure toInventoryId & toSlot are actually free so we don't orphan an item - if( m_storageMap[toInventoryId]->getItem( toSlot ) ) - // todo: correct invalid move? again, not sure what retail does here - return; + // make sure toInventoryId & toSlot are actually free so we don't orphan an item + if( m_storageMap[ toInventoryId ]->getItem( toSlot ) ) + // todo: correct invalid move? again, not sure what retail does here + return; - auto newItem = addItem( fromItem->getId(), itemCount, fromItem->isHq(), true ); - if( !newItem ) - return; + auto newItem = addItem( fromItem->getId(), itemCount, fromItem->isHq(), true ); + if( !newItem ) + return; - fromItem->setStackSize( fromItem->getStackSize() - itemCount ); + fromItem->setStackSize( fromItem->getStackSize() - itemCount ); - updateContainer( fromInventoryId, fromSlotId, fromItem ); - updateContainer( toInventoryId, toSlot, newItem ); + updateContainer( fromInventoryId, fromSlotId, fromItem ); + updateContainer( toInventoryId, toSlot, newItem ); - writeItem( fromItem ); + writeItem( fromItem ); } void Core::Entity::Player::mergeItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ) { - auto fromItem = m_storageMap[fromInventoryId]->getItem( fromSlotId ); - auto toItem = m_storageMap[toInventoryId]->getItem( toSlot ); + auto fromItem = m_storageMap[ fromInventoryId ]->getItem( fromSlotId ); + auto toItem = m_storageMap[ toInventoryId ]->getItem( toSlot ); - if( !fromItem || !toItem ) - return; + if( !fromItem || !toItem ) + return; - if( fromItem->getId() != toItem->getId() ) - return; + if( fromItem->getId() != toItem->getId() ) + return; - uint32_t stackSize = fromItem->getStackSize() + toItem->getStackSize(); - uint32_t stackOverflow = stackSize - std::min< uint32_t >( fromItem->getMaxStackSize(), stackSize ); + uint32_t stackSize = fromItem->getStackSize() + toItem->getStackSize(); + uint32_t stackOverflow = stackSize - std::min< uint32_t >( fromItem->getMaxStackSize(), stackSize ); - // we can destroy the original stack if there's no overflow - if( stackOverflow == 0 ) - { - m_storageMap[fromInventoryId]->removeItem( fromSlotId ); - deleteItemDb( fromItem ); - } - else - { - fromItem->setStackSize( stackOverflow ); - writeItem( fromItem ); - } + // we can destroy the original stack if there's no overflow + if( stackOverflow == 0 ) + { + m_storageMap[ fromInventoryId ]->removeItem( fromSlotId ); + deleteItemDb( fromItem ); + } + else + { + fromItem->setStackSize( stackOverflow ); + writeItem( fromItem ); + } - toItem->setStackSize( stackSize ); - writeItem( toItem ); + toItem->setStackSize( stackSize ); + writeItem( toItem ); - updateContainer( fromInventoryId, fromSlotId, fromItem ); - updateContainer( toInventoryId, toSlot, toItem ); + updateContainer( fromInventoryId, fromSlotId, fromItem ); + updateContainer( toInventoryId, toSlot, toItem ); } void Core::Entity::Player::swapItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot ) { - auto fromItem = m_storageMap[fromInventoryId]->getItem( fromSlotId ); - auto toItem = m_storageMap[toInventoryId]->getItem( toSlot ); - auto& itemMap = m_storageMap[fromInventoryId]->getItemMap(); + auto fromItem = m_storageMap[ fromInventoryId ]->getItem( fromSlotId ); + auto toItem = m_storageMap[ toInventoryId ]->getItem( toSlot ); + auto& itemMap = m_storageMap[ fromInventoryId ]->getItemMap(); - if( fromItem == nullptr || toItem == nullptr ) - return; + if( fromItem == nullptr || toItem == nullptr ) + return; - // An item is being moved from bag0-3 to equippment, meaning - // the swapped out item will be placed in the matching armory. - if( Items::Util::isEquipment( toInventoryId ) - && !Items::Util::isEquipment( fromInventoryId ) - && !Items::Util::isArmory( fromInventoryId ) ) - { - updateContainer( fromInventoryId, fromSlotId, nullptr ); - fromInventoryId = Items::Util::getCharaEquipSlotCategoryToArmoryId( toSlot ); - fromSlotId = static_cast < uint8_t >( m_storageMap[fromInventoryId]->getFreeSlot() ); - } + // An item is being moved from bag0-3 to equippment, meaning + // the swapped out item will be placed in the matching armory. + if( Items::Util::isEquipment( toInventoryId ) + && !Items::Util::isEquipment( fromInventoryId ) + && !Items::Util::isArmory( fromInventoryId ) ) + { + updateContainer( fromInventoryId, fromSlotId, nullptr ); + fromInventoryId = Items::Util::getCharaEquipSlotCategoryToArmoryId( toSlot ); + fromSlotId = static_cast < uint8_t >( m_storageMap[ fromInventoryId ]->getFreeSlot() ); + } - auto containerTypeFrom = Items::Util::getContainerType( fromInventoryId ); - auto containerTypeTo = Items::Util::getContainerType( toInventoryId ); + auto containerTypeFrom = Items::Util::getContainerType( fromInventoryId ); + auto containerTypeTo = Items::Util::getContainerType( toInventoryId ); - updateContainer( toInventoryId, toSlot, fromItem ); - updateContainer( fromInventoryId, fromSlotId, toItem ); + updateContainer( toInventoryId, toSlot, fromItem ); + updateContainer( fromInventoryId, fromSlotId, toItem ); } void Core::Entity::Player::discardItem( uint16_t fromInventoryId, uint8_t fromSlotId ) { - // i am not entirely sure how this should be generated or if it even is important for us... - uint32_t transactionId = 1; + // i am not entirely sure how this should be generated or if it even is important for us... + uint32_t transactionId = 1; - auto fromItem = m_storageMap[fromInventoryId]->getItem( fromSlotId ); + auto fromItem = m_storageMap[ fromInventoryId ]->getItem( fromSlotId ); - deleteItemDb( fromItem ); + deleteItemDb( fromItem ); - m_storageMap[fromInventoryId]->removeItem( fromSlotId ); - updateContainer( fromInventoryId, fromSlotId, nullptr ); + m_storageMap[ fromInventoryId ]->removeItem( fromSlotId ); + updateContainer( fromInventoryId, fromSlotId, nullptr ); - auto invTransPacket = makeZonePacket< FFXIVIpcInventoryTransaction >( getId() ); - invTransPacket->data().transactionId = transactionId; - invTransPacket->data().ownerId = getId(); - invTransPacket->data().storageId = fromInventoryId; - invTransPacket->data().catalogId = fromItem->getId(); - invTransPacket->data().stackSize = fromItem->getStackSize(); - invTransPacket->data().slotId = fromSlotId; - invTransPacket->data().type = 7; - queuePacket( invTransPacket ); + auto invTransPacket = makeZonePacket< FFXIVIpcInventoryTransaction >( getId() ); + invTransPacket->data().transactionId = transactionId; + invTransPacket->data().ownerId = getId(); + invTransPacket->data().storageId = fromInventoryId; + invTransPacket->data().catalogId = fromItem->getId(); + invTransPacket->data().stackSize = fromItem->getStackSize(); + invTransPacket->data().slotId = fromSlotId; + invTransPacket->data().type = 7; + queuePacket( invTransPacket ); - auto invTransFinPacket = makeZonePacket< FFXIVIpcInventoryTransactionFinish >( getId() ); - invTransFinPacket->data().transactionId = transactionId; - invTransFinPacket->data().transactionId1 = transactionId; - queuePacket( invTransFinPacket ); + auto invTransFinPacket = makeZonePacket< FFXIVIpcInventoryTransactionFinish >( getId() ); + invTransFinPacket->data().transactionId = transactionId; + invTransFinPacket->data().transactionId1 = transactionId; + queuePacket( invTransFinPacket ); } uint16_t Core::Entity::Player::calculateEquippedGearItemLevel() { - uint32_t iLvlResult = 0; + uint32_t iLvlResult = 0; - auto gearSetMap = m_storageMap[GearSet0]->getItemMap(); + auto gearSetMap = m_storageMap[ GearSet0 ]->getItemMap(); - auto it = gearSetMap.begin(); + auto it = gearSetMap.begin(); - while( it != gearSetMap.end() ) - { - auto currItem = it->second; + while( it != gearSetMap.end() ) + { + auto currItem = it->second; - if( currItem ) + if( currItem ) + { + iLvlResult += currItem->getItemLevel(); + + // If item is weapon and isn't one-handed + if( currItem->isWeapon() && !Items::Util::isOneHandedWeapon( currItem->getCategory() ) ) { - iLvlResult += currItem->getItemLevel(); - - // If item is weapon and isn't one-handed - if( currItem->isWeapon() && !Items::Util::isOneHandedWeapon( currItem->getCategory() ) ) - { - iLvlResult += currItem->getItemLevel(); - } + iLvlResult += currItem->getItemLevel(); } + } - it++; - } + it++; + } - return boost::algorithm::clamp( iLvlResult / 13, 0, 9999 ); + return boost::algorithm::clamp( iLvlResult / 13, 0, 9999 ); } uint8_t Core::Entity::Player::getFreeSlotsInBags() { - uint8_t slots = 0; - for( uint8_t container : { Bag0, Bag1, Bag2, Bag3 } ) - { - const auto& storage = m_storageMap[container]; - slots += ( storage->getMaxSize() - storage->getEntryCount() ); - } - return slots; + uint8_t slots = 0; + for( uint8_t container : { Bag0, Bag1, Bag2, Bag3 } ) + { + const auto& storage = m_storageMap[ container ]; + slots += ( storage->getMaxSize() - storage->getEntryCount() ); + } + return slots; } diff --git a/src/servers/sapphire_zone/Actor/PlayerQuest.cpp b/src/servers/sapphire_zone/Actor/PlayerQuest.cpp index c7e1a77c..e193cb9e 100644 --- a/src/servers/sapphire_zone/Actor/PlayerQuest.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerQuest.cpp @@ -18,1065 +18,1066 @@ using namespace Core::Network::Packets::Server; void Core::Entity::Player::finishQuest( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - removeQuest( questId ); - updateQuestsCompleted( questId ); + removeQuest( questId ); + updateQuestsCompleted( questId ); - sendQuestTracker(); + sendQuestTracker(); } void Core::Entity::Player::unfinishQuest( uint16_t questId ) { - removeQuestsCompleted( questId ); - sendQuestInfo(); + removeQuestsCompleted( questId ); + sendQuestInfo(); } void Core::Entity::Player::removeQuest( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( ( idx != -1 ) && ( m_activeQuests[idx] != nullptr ) ) - { + if( ( idx != -1 ) && ( m_activeQuests[ idx ] != nullptr ) ) + { - auto questUpdatePacket = makeZonePacket< FFXIVIpcQuestUpdate >( getId() ); - questUpdatePacket->data().slot = static_cast< uint8_t >( idx ); - questUpdatePacket->data().questInfo.c.questId = 0; - questUpdatePacket->data().questInfo.c.sequence = 0xFF; - queuePacket( questUpdatePacket ); + auto questUpdatePacket = makeZonePacket< FFXIVIpcQuestUpdate >( getId() ); + questUpdatePacket->data().slot = static_cast< uint8_t >( idx ); + questUpdatePacket->data().questInfo.c.questId = 0; + questUpdatePacket->data().questInfo.c.sequence = 0xFF; + queuePacket( questUpdatePacket ); - auto questFinishPacket = makeZonePacket< FFXIVIpcQuestFinish >( getId() ); - questFinishPacket->data().questId = questId; - questFinishPacket->data().flag1 = 1; - questFinishPacket->data().flag2 = 1; - queuePacket( questFinishPacket ); + auto questFinishPacket = makeZonePacket< FFXIVIpcQuestFinish >( getId() ); + questFinishPacket->data().questId = questId; + questFinishPacket->data().flag1 = 1; + questFinishPacket->data().flag2 = 1; + queuePacket( questFinishPacket ); - for( int32_t ii = 0; ii < 5; ii++ ) - { - if( m_questTracking[ii] == idx ) - m_questTracking[ii] = -1; - } + for( int32_t ii = 0; ii < 5; ii++ ) + { + if( m_questTracking[ ii ] == idx ) + m_questTracking[ ii ] = -1; + } - boost::shared_ptr< QuestActive > pQuest = m_activeQuests[idx]; - m_activeQuests[idx].reset(); + boost::shared_ptr< QuestActive > pQuest = m_activeQuests[ idx ]; + m_activeQuests[ idx ].reset(); - m_questIdToQuestIdx.erase( questId ); - m_questIdxToQuestId.erase( idx ); + m_questIdToQuestIdx.erase( questId ); + m_questIdxToQuestId.erase( idx ); - deleteQuest( questId ); - } + deleteQuest( questId ); + } - sendQuestTracker(); + sendQuestTracker(); } bool Core::Entity::Player::hasQuest( uint32_t questId ) { - return ( getQuestIndex( static_cast< uint16_t >( questId ) ) > -1 ); + return ( getQuestIndex( static_cast< uint16_t >( questId ) ) > -1 ); } int8_t Core::Entity::Player::getQuestIndex( uint16_t questId ) { - auto it = m_questIdToQuestIdx.find( questId ); - if( it != m_questIdToQuestIdx.end() ) - return it->second; + auto it = m_questIdToQuestIdx.find( questId ); + if( it != m_questIdToQuestIdx.end() ) + return it->second; - return -1; + return -1; } bool Core::Entity::Player::getQuestBitFlag8( uint16_t questId, uint8_t index ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - return pNewQuest->a.BitFlag8 & ( 1 << index ); - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + return pNewQuest->a.BitFlag8 & ( 1 << index ); + } - return false; + return false; } bool Core::Entity::Player::getQuestBitFlag16( uint16_t questId, uint8_t index ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - return pNewQuest->a.BitFlag16 & ( 1 << index ); - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + return pNewQuest->a.BitFlag16 & ( 1 << index ); + } - return false; + return false; } bool Core::Entity::Player::getQuestBitFlag24( uint16_t questId, uint8_t index ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - return pNewQuest->a.BitFlag24 & ( 1 << index ); - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + return pNewQuest->a.BitFlag24 & ( 1 << index ); + } - return false; + return false; } bool Core::Entity::Player::getQuestBitFlag32( uint16_t questId, uint8_t index ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - return pNewQuest->a.BitFlag32 & ( 1 << index ); - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + return pNewQuest->a.BitFlag32 & ( 1 << index ); + } - return false; + return false; } bool Core::Entity::Player::getQuestBitFlag40( uint16_t questId, uint8_t index ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - return pNewQuest->a.BitFlag40 & ( 1 << index ); - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + return pNewQuest->a.BitFlag40 & ( 1 << index ); + } - return false; + return false; } bool Core::Entity::Player::getQuestBitFlag48( uint16_t questId, uint8_t index ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - return pNewQuest->a.BitFlag48 & ( 1 << index ); - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + return pNewQuest->a.BitFlag48 & ( 1 << index ); + } - return false; + return false; } uint8_t Core::Entity::Player::getQuestUI8A( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->c.UI8A; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->c.UI8A; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8B( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->c.UI8B; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->c.UI8B; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8C( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->c.UI8C; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->c.UI8C; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8D( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->c.UI8D; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->c.UI8D; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8E( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->c.UI8E; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->c.UI8E; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8F( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->c.UI8F; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->c.UI8F; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8AH( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8AH; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8AH; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8BH( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8BH; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8BH; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8CH( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8CH; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8CH; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8DH( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8DH; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8DH; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8EH( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8EH; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8EH; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8FH( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8FH; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8FH; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8AL( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8AL; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8AL; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8BL( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8BL; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8BL; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8CL( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8CL; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8CL; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8DL( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8DL; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8DL; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8EL( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8EL; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8EL; + } - return value; + return value; } uint8_t Core::Entity::Player::getQuestUI8FL( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint8_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - value = pNewQuest->b.UI8FL; - } + int8_t idx = getQuestIndex( questId ); + uint8_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + value = pNewQuest->b.UI8FL; + } - return value; + return value; } uint16_t Core::Entity::Player::getQuestUI16A( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint16_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - // value = pNewQuest->d.UI16A; - } + int8_t idx = getQuestIndex( questId ); + uint16_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + // value = pNewQuest->d.UI16A; + } - return value; + return value; } uint16_t Core::Entity::Player::getQuestUI16B( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint16_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - // value = pNewQuest->d.UI16B; - } + int8_t idx = getQuestIndex( questId ); + uint16_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + // value = pNewQuest->d.UI16B; + } - return value; + return value; } uint16_t Core::Entity::Player::getQuestUI16C( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint16_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + int8_t idx = getQuestIndex( questId ); + uint16_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // value = pNewQuest->d.UI16C; - } + } - return value; + return value; } uint32_t Core::Entity::Player::getQuestUI32A( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); - uint32_t value = 0; - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - // value = pNewQuest->e.UI32A; - } + int8_t idx = getQuestIndex( questId ); + uint32_t value = 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + // value = pNewQuest->e.UI32A; + } - return value; + return value; } void Core::Entity::Player::setQuestUI8A( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->c.UI8A = val; + pNewQuest->c.UI8A = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8B( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->c.UI8B = val; + pNewQuest->c.UI8B = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8C( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->c.UI8C = val; + pNewQuest->c.UI8C = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8D( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->c.UI8D = val; + pNewQuest->c.UI8D = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8E( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->c.UI8E = val; + pNewQuest->c.UI8E = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8F( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->c.UI8F = val; + pNewQuest->c.UI8F = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8AH( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8AH = val; + pNewQuest->b.UI8AH = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8BH( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8BH = val; + pNewQuest->b.UI8BH = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8CH( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8CH = val; + pNewQuest->b.UI8CH = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8DH( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8DH = val; + pNewQuest->b.UI8DH = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8EH( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8EH = val; + pNewQuest->b.UI8EH = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8FH( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8FH = val; + pNewQuest->b.UI8FH = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8AL( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8AL = val; + pNewQuest->b.UI8AL = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8BL( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8BL = val; + pNewQuest->b.UI8BL = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8CL( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8CL = val; + pNewQuest->b.UI8CL = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8DL( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8DL = val; + pNewQuest->b.UI8DL = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8EL( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8EL = val; + pNewQuest->b.UI8EL = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI8FL( uint16_t questId, uint8_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - pNewQuest->b.UI8FL = val; + pNewQuest->b.UI8FL = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI16A( uint16_t questId, uint16_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - // pNewQuest->d.UI16A = val; + // pNewQuest->d.UI16A = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI16B( uint16_t questId, uint16_t val ) - { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // pNewQuest->d.UI16B = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI16C( uint16_t questId, uint16_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; // pNewQuest->d.UI16C = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestUI32A( uint16_t questId, uint32_t val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - // pNewQuest->e.UI32A = val; + // pNewQuest->e.UI32A = val; - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestBitFlag8( uint16_t questId, uint8_t index, bool val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - if( val ) - pNewQuest->a.BitFlag8 |= ( 1 << index ); - else - pNewQuest->a.BitFlag8 &= ~( 1 << index ); + if( val ) + pNewQuest->a.BitFlag8 |= ( 1 << index ); + else + pNewQuest->a.BitFlag8 &= ~( 1 << index ); - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestBitFlag16( uint16_t questId, uint8_t index, bool val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - if( val ) - pNewQuest->a.BitFlag16 |= ( 1 << index ); - else - pNewQuest->a.BitFlag16 &= ~( 1 << index ); + if( val ) + pNewQuest->a.BitFlag16 |= ( 1 << index ); + else + pNewQuest->a.BitFlag16 &= ~( 1 << index ); - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestBitFlag24( uint16_t questId, uint8_t index, bool val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - if( val ) - pNewQuest->a.BitFlag24 |= ( 1 << index ); - else - pNewQuest->a.BitFlag24 &= ~( 1 << index ); + if( val ) + pNewQuest->a.BitFlag24 |= ( 1 << index ); + else + pNewQuest->a.BitFlag24 &= ~( 1 << index ); - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestBitFlag32( uint16_t questId, uint8_t index, bool val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - if( val ) - pNewQuest->a.BitFlag32 |= ( 1 << index ); - else - pNewQuest->a.BitFlag32 &= ~( 1 << index ); + if( val ) + pNewQuest->a.BitFlag32 |= ( 1 << index ); + else + pNewQuest->a.BitFlag32 &= ~( 1 << index ); - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestBitFlag40( uint16_t questId, uint8_t index, bool val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - if( val ) - pNewQuest->a.BitFlag40 |= ( 1 << index ); - else - pNewQuest->a.BitFlag40 &= ~( 1 << index ); + if( val ) + pNewQuest->a.BitFlag40 |= ( 1 << index ); + else + pNewQuest->a.BitFlag40 &= ~( 1 << index ); - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } void Core::Entity::Player::setQuestBitFlag48( uint16_t questId, uint8_t index, bool val ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; - if( val ) - pNewQuest->a.BitFlag48 |= ( 1 << index ); - else - pNewQuest->a.BitFlag48 &= ~( 1 << index ); + if( val ) + pNewQuest->a.BitFlag48 |= ( 1 << index ); + else + pNewQuest->a.BitFlag48 &= ~( 1 << index ); - updateQuest( questId, pNewQuest->c.sequence ); - } + updateQuest( questId, pNewQuest->c.sequence ); + } } uint8_t Core::Entity::Player::getQuestSeq( uint16_t questId ) { - int8_t idx = getQuestIndex( questId ); + int8_t idx = getQuestIndex( questId ); - if( idx != -1 ) - { - boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[idx]; - return pNewQuest->c.sequence; - } - return 0; + if( idx != -1 ) + { + boost::shared_ptr< QuestActive > pNewQuest = m_activeQuests[ idx ]; + return pNewQuest->c.sequence; + } + return 0; } void Core::Entity::Player::updateQuest( uint16_t questId, uint8_t sequence ) { - if( hasQuest( questId ) ) - { - uint8_t index = getQuestIndex( questId ); - auto pNewQuest = m_activeQuests[index]; + if( hasQuest( questId ) ) + { + uint8_t index = getQuestIndex( questId ); + auto pNewQuest = m_activeQuests[ index ]; - auto questUpdatePacket = makeZonePacket< FFXIVIpcQuestUpdate >( getId() ); - pNewQuest->c.sequence = sequence; - questUpdatePacket->data().slot = index; - questUpdatePacket->data().questInfo = *pNewQuest; - queuePacket( questUpdatePacket ); + auto questUpdatePacket = makeZonePacket< FFXIVIpcQuestUpdate >( getId() ); + pNewQuest->c.sequence = sequence; + questUpdatePacket->data().slot = index; + questUpdatePacket->data().questInfo = *pNewQuest; + queuePacket( questUpdatePacket ); - } - else - { + } + else + { - uint8_t idx = 0; - bool hasFreeSlot = false; - for( ; idx < 30; idx++ ) - if( !m_activeQuests[idx] ) - { - hasFreeSlot = true; - break; - } - - if( !hasFreeSlot ) - return; - - boost::shared_ptr< QuestActive > pNewQuest( new QuestActive() ); - pNewQuest->c.questId = questId; - pNewQuest->c.sequence = sequence; - pNewQuest->c.padding = 0; - m_activeQuests[idx] = pNewQuest; - m_questIdToQuestIdx[questId] = idx; - m_questIdxToQuestId[idx] = questId; - - auto questUpdatePacket = makeZonePacket< FFXIVIpcQuestUpdate >( getId() ); - questUpdatePacket->data().slot = idx; - questUpdatePacket->data().questInfo = *pNewQuest; - queuePacket( questUpdatePacket ); - - for( int32_t ii = 0; ii < 5; ii++ ) + uint8_t idx = 0; + bool hasFreeSlot = false; + for( ; idx < 30; idx++ ) + if( !m_activeQuests[ idx ] ) { - if( m_questTracking[ii] == -1 ) - { - m_questTracking[ii] = idx; - break; - } + hasFreeSlot = true; + break; } - insertQuest( questId, idx, sequence ); - sendQuestTracker(); + if( !hasFreeSlot ) + return; - } + boost::shared_ptr< QuestActive > pNewQuest( new QuestActive() ); + pNewQuest->c.questId = questId; + pNewQuest->c.sequence = sequence; + pNewQuest->c.padding = 0; + m_activeQuests[ idx ] = pNewQuest; + m_questIdToQuestIdx[ questId ] = idx; + m_questIdxToQuestId[ idx ] = questId; + + auto questUpdatePacket = makeZonePacket< FFXIVIpcQuestUpdate >( getId() ); + questUpdatePacket->data().slot = idx; + questUpdatePacket->data().questInfo = *pNewQuest; + queuePacket( questUpdatePacket ); + + for( int32_t ii = 0; ii < 5; ii++ ) + { + if( m_questTracking[ ii ] == -1 ) + { + m_questTracking[ ii ] = idx; + break; + } + } + + insertQuest( questId, idx, sequence ); + sendQuestTracker(); + + } } void Core::Entity::Player::sendQuestTracker() { - auto trackerPacket = makeZonePacket< FFXIVIpcQuestTracker >( getId() ); + auto trackerPacket = makeZonePacket< FFXIVIpcQuestTracker >( getId() ); - for( int32_t ii = 0; ii < 5; ii++ ) - { - if( m_questTracking[ii] >= 0 ) - { - trackerPacket->data().entry[ii].active = 1; - trackerPacket->data().entry[ii].questIndex = static_cast< uint8_t >( m_questTracking[ii] ); - } - } - queuePacket( trackerPacket ); + for( int32_t ii = 0; ii < 5; ii++ ) + { + if( m_questTracking[ ii ] >= 0 ) + { + trackerPacket->data().entry[ ii ].active = 1; + trackerPacket->data().entry[ ii ].questIndex = static_cast< uint8_t >( m_questTracking[ ii ] ); + } + } + queuePacket( trackerPacket ); } void Core::Entity::Player::setQuestTracker( uint16_t index, int16_t flag ) { - if( flag == 0 ) - { - //remove - for( uint8_t ii = 0; ii < 5; ii++ ) + if( flag == 0 ) + { + //remove + for( uint8_t ii = 0; ii < 5; ii++ ) + { + if( m_questTracking[ ii ] == index ) { - if( m_questTracking[ii] == index ) - { - m_questTracking[ii] = -1; - break; - } + m_questTracking[ ii ] = -1; + break; } - } - else - { - //add - for( uint8_t ii = 0; ii < 5; ii++ ) + } + } + else + { + //add + for( uint8_t ii = 0; ii < 5; ii++ ) + { + if( m_questTracking[ ii ] == -1 ) { - if( m_questTracking[ii] == -1 ) - { - m_questTracking[ii] = index; - break; - } + m_questTracking[ ii ] = index; + break; } - } + } + } } void Core::Entity::Player::sendQuestInfo() { - auto activeQuestListPacket = makeZonePacket< FFXIVIpcQuestActiveList >( getId() ); + auto activeQuestListPacket = makeZonePacket< FFXIVIpcQuestActiveList >( getId() ); - for( int32_t i = 0; i < 30; i++ ) - { - uint8_t offset = i * 12; - if( m_activeQuests[i] != nullptr ) - { + for( int32_t i = 0; i < 30; i++ ) + { + uint8_t offset = i * 12; + if( m_activeQuests[ i ] != nullptr ) + { - auto& quest = activeQuestListPacket->data().activeQuests[i]; - quest = *m_activeQuests[i]; + auto& quest = activeQuestListPacket->data().activeQuests[ i ]; + quest = *m_activeQuests[ i ]; - } - } + } + } - queuePacket( activeQuestListPacket ); + queuePacket( activeQuestListPacket ); - auto completeQuestListPacket = makeZonePacket< FFXIVIpcQuestCompleteList >( getId() ); - memcpy( completeQuestListPacket->data().questCompleteMask, m_questCompleteFlags, sizeof( m_questCompleteFlags ) ); - queuePacket( completeQuestListPacket ); + auto completeQuestListPacket = makeZonePacket< FFXIVIpcQuestCompleteList >( getId() ); + memcpy( completeQuestListPacket->data().questCompleteMask, m_questCompleteFlags, sizeof( m_questCompleteFlags ) ); + queuePacket( completeQuestListPacket ); - sendQuestTracker(); + sendQuestTracker(); } -void Core::Entity::Player::sendQuestMessage( uint32_t questId, int8_t msgId, uint8_t type, uint32_t var1, uint32_t var2 ) +void +Core::Entity::Player::sendQuestMessage( uint32_t questId, int8_t msgId, uint8_t type, uint32_t var1, uint32_t var2 ) { - queuePacket( boost::make_shared< QuestMessagePacket >( getAsPlayer(), questId, msgId, type, var1, var2 ) ); + queuePacket( boost::make_shared< QuestMessagePacket >( getAsPlayer(), questId, msgId, type, var1, var2 ) ); } void Core::Entity::Player::updateQuestsCompleted( uint32_t questId ) { - uint8_t index = questId / 8; - uint8_t bitIndex = ( questId ) % 8; + uint8_t index = questId / 8; + uint8_t bitIndex = ( questId ) % 8; - uint8_t value = 0x80 >> bitIndex; + uint8_t value = 0x80 >> bitIndex; - m_questCompleteFlags[index] |= value; + m_questCompleteFlags[ index ] |= value; } void Core::Entity::Player::removeQuestsCompleted( uint32_t questId ) { - uint8_t index = questId / 8; - uint8_t bitIndex = ( questId ) % 8; + uint8_t index = questId / 8; + uint8_t bitIndex = ( questId ) % 8; - uint8_t value = 0x80 >> bitIndex; + uint8_t value = 0x80 >> bitIndex; - m_questCompleteFlags[index] ^= value; + m_questCompleteFlags[ index ] ^= value; } bool Core::Entity::Player::giveQuestRewards( uint32_t questId, uint32_t optionalChoice ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint32_t playerLevel = getLevel(); - auto questInfo = pExdData->get< Core::Data::Quest >( questId ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint32_t playerLevel = getLevel(); + auto questInfo = pExdData->get< Core::Data::Quest >( questId ); - if( !questInfo ) - return false; + if( !questInfo ) + return false; - auto paramGrowth = pExdData->get< Core::Data::ParamGrow >( questInfo->classJobLevel0 ); + auto paramGrowth = pExdData->get< Core::Data::ParamGrow >( questInfo->classJobLevel0 ); - // TODO: use the correct formula, this one is wrong - uint32_t exp = ( questInfo->expFactor * paramGrowth->questExpModifier * ( 45 + 5 * questInfo->classJobLevel0 ) ) / 100; - exp = exp + ( questInfo->expFactor / 100 ) * 10000; + // TODO: use the correct formula, this one is wrong + uint32_t exp = + ( questInfo->expFactor * paramGrowth->questExpModifier * ( 45 + 5 * questInfo->classJobLevel0 ) ) / 100; + exp = exp + ( questInfo->expFactor / 100 ) * 10000; - exp = questInfo->expFactor; + exp = questInfo->expFactor; - auto rewardItemCount = questInfo->itemReward0.size(); - uint16_t optionalItemCount = static_cast< uint16_t >( questInfo->itemReward1.size() ); + auto rewardItemCount = questInfo->itemReward0.size(); + uint16_t optionalItemCount = static_cast< uint16_t >( questInfo->itemReward1.size() ); - uint32_t gilReward = questInfo->gilReward; + uint32_t gilReward = questInfo->gilReward; - // TODO: check if there is room in inventory, else return false; - if( exp > 0 ) - gainExp( exp ); + // TODO: check if there is room in inventory, else return false; + if( exp > 0 ) + gainExp( exp ); - if( rewardItemCount > 0 ) - { - for( uint32_t i = 0; i < questInfo->itemReward0.size(); i++ ) - { - addItem( questInfo->itemCountReward0.at( i ) ); - } - } + if( rewardItemCount > 0 ) + { + for( uint32_t i = 0; i < questInfo->itemReward0.size(); i++ ) + { + addItem( questInfo->itemCountReward0.at( i ) ); + } + } - if( optionalItemCount > 0 ) - { - auto itemId = questInfo->itemReward1.at( optionalChoice ); - addItem( questInfo->itemCountReward1.at( optionalChoice ) ); - } + if( optionalItemCount > 0 ) + { + auto itemId = questInfo->itemReward1.at( optionalChoice ); + addItem( questInfo->itemCountReward1.at( optionalChoice ) ); + } - if( gilReward > 0 ) - addCurrency( CurrencyType::Gil, gilReward ); + if( gilReward > 0 ) + addCurrency( CurrencyType::Gil, gilReward ); - return true; + return true; } boost::shared_ptr< QuestActive > Core::Entity::Player::getQuestActive( uint16_t index ) { - return m_activeQuests[index]; + return m_activeQuests[ index ]; } diff --git a/src/servers/sapphire_zone/Actor/PlayerSql.cpp b/src/servers/sapphire_zone/Actor/PlayerSql.cpp index 13b0d4dd..7235fc42 100644 --- a/src/servers/sapphire_zone/Actor/PlayerSql.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerSql.cpp @@ -30,628 +30,628 @@ using namespace Core::Network::Packets::Server; // load player from the db bool Core::Entity::Player::load( uint32_t charId, SessionPtr pSession ) { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - auto pLog = g_fw.get< Logger >(); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pLog = g_fw.get< Logger >(); - const std::string char_id_str = std::to_string( charId ); + const std::string char_id_str = std::to_string( charId ); - auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_SEL ); + auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_SEL ); - stmt->setUInt( 1, charId ); - auto res = pDb->query( stmt ); + stmt->setUInt( 1, charId ); + auto res = pDb->query( stmt ); - if( !res->next() ) - return false; + if( !res->next() ) + return false; - m_id = charId; + m_id = charId; - auto name = res->getString( "Name" ); - strcpy( m_name, name.c_str() ); + auto name = res->getString( "Name" ); + strcpy( m_name, name.c_str() ); - auto zoneId = res->getUInt( "TerritoryId" ); - m_prevZoneId = res->getUInt( "OTerritoryId" ); - m_prevZoneType = res->getUInt( "OTerritoryType" ); + auto zoneId = res->getUInt( "TerritoryId" ); + m_prevZoneId = res->getUInt( "OTerritoryId" ); + m_prevZoneType = res->getUInt( "OTerritoryType" ); - // Position - m_pos.x = res->getFloat( "PosX" ); - m_pos.y = res->getFloat( "PosY" ); - m_pos.z = res->getFloat( "PosZ" ); - setRot( res->getFloat( "PosR" ) ); + // Position + m_pos.x = res->getFloat( "PosX" ); + m_pos.y = res->getFloat( "PosY" ); + m_pos.z = res->getFloat( "PosZ" ); + setRot( res->getFloat( "PosR" ) ); - m_prevPos.x = res->getFloat( "OPosX" ); - m_prevPos.y = res->getFloat( "OPosY" ); - m_prevPos.z = res->getFloat( "OPosZ" ); - m_prevRot = res->getFloat( "OPosR" ); + m_prevPos.x = res->getFloat( "OPosX" ); + m_prevPos.y = res->getFloat( "OPosY" ); + m_prevPos.z = res->getFloat( "OPosZ" ); + m_prevRot = res->getFloat( "OPosR" ); - ZonePtr pCurrZone = nullptr; + ZonePtr pCurrZone = nullptr; - // if the zone is an instanceContent zone, we need to actually find the instance - if( pTeriMgr->isInstanceContentTerritory( zoneId ) ) - { - // try to find an instance actually linked to this player - pCurrZone = pTeriMgr->getLinkedInstance( m_id ); - // if none found, revert to previous zone and position - if( !pCurrZone ) - { - zoneId = m_prevZoneId; - m_pos.x = m_prevPos.x; - m_pos.y = m_prevPos.y; - m_pos.z = m_prevPos.z; - setRot( m_prevRot ); - pCurrZone = pTeriMgr->getZoneByTerriId( zoneId ); - } - } - else - { - pCurrZone =pTeriMgr->getZoneByTerriId( zoneId ); - } + // if the zone is an instanceContent zone, we need to actually find the instance + if( pTeriMgr->isInstanceContentTerritory( zoneId ) ) + { + // try to find an instance actually linked to this player + pCurrZone = pTeriMgr->getLinkedInstance( m_id ); + // if none found, revert to previous zone and position + if( !pCurrZone ) + { + zoneId = m_prevZoneId; + m_pos.x = m_prevPos.x; + m_pos.y = m_prevPos.y; + m_pos.z = m_prevPos.z; + setRot( m_prevRot ); + pCurrZone = pTeriMgr->getZoneByTerriId( zoneId ); + } + } + else + { + pCurrZone = pTeriMgr->getZoneByTerriId( zoneId ); + } - m_zoneId = zoneId; + m_zoneId = zoneId; - // TODO: logic for instances needs to be added here - // see if a valid zone could be found for the character - if( !pCurrZone ) - { - pLog->error( "[" + char_id_str + "] Zone " + std::to_string( zoneId ) + " not found!" ); - pLog->error( "[" + char_id_str + "] Setting default zone instead" ); + // TODO: logic for instances needs to be added here + // see if a valid zone could be found for the character + if( !pCurrZone ) + { + pLog->error( "[" + char_id_str + "] Zone " + std::to_string( zoneId ) + " not found!" ); + pLog->error( "[" + char_id_str + "] Setting default zone instead" ); - // default to new gridania - // TODO: should probably just abort and mark character as corrupt - pCurrZone = pTeriMgr->getZoneByTerriId( 132 ); + // default to new gridania + // TODO: should probably just abort and mark character as corrupt + pCurrZone = pTeriMgr->getZoneByTerriId( 132 ); - m_pos.x = 0.0f; - m_pos.y = 0.0f; - m_pos.z = 0.0f; - setRot( 0.0f ); - } + m_pos.x = 0.0f; + m_pos.y = 0.0f; + m_pos.z = 0.0f; + setRot( 0.0f ); + } - // Stats + // Stats - m_hp = res->getUInt( "Hp" ); - m_mp = res->getUInt( "Mp" ); - m_tp = 0; + m_hp = res->getUInt( "Hp" ); + m_mp = res->getUInt( "Mp" ); + m_tp = 0; - // Model - auto custom = res->getBlobVector( "Customize" ); - memcpy( reinterpret_cast< char* >( m_customize ), custom.data(), custom.size() ); + // Model + auto custom = res->getBlobVector( "Customize" ); + memcpy( reinterpret_cast< char* >( m_customize ), custom.data(), custom.size() ); - m_modelMainWeapon = res->getUInt64( "ModelMainWeapon" ); + m_modelMainWeapon = res->getUInt64( "ModelMainWeapon" ); - auto modelEq = res->getBlobVector( "ModelEquip" ); - memcpy( reinterpret_cast< char* >( m_modelEquip ), modelEq.data(), modelEq.size() ); + auto modelEq = res->getBlobVector( "ModelEquip" ); + memcpy( reinterpret_cast< char* >( m_modelEquip ), modelEq.data(), modelEq.size() ); - // Minimal info + // Minimal info - m_guardianDeity = res->getUInt8( "GuardianDeity" ); - m_birthDay = res->getUInt8( "BirthDay" ); - m_birthMonth = res->getUInt8( "BirthMonth" ); - m_status = static_cast< ActorStatus >( res->getUInt( "Status" ) ); - m_emoteMode = res->getUInt( "EmoteModeType" ); + m_guardianDeity = res->getUInt8( "GuardianDeity" ); + m_birthDay = res->getUInt8( "BirthDay" ); + m_birthMonth = res->getUInt8( "BirthMonth" ); + m_status = static_cast< ActorStatus >( res->getUInt( "Status" ) ); + m_emoteMode = res->getUInt( "EmoteModeType" ); - m_activeTitle = res->getUInt16( "ActiveTitle" ); + m_activeTitle = res->getUInt16( "ActiveTitle" ); - m_class = static_cast< ClassJob >( res->getUInt( "Class" ) ); - m_homePoint = res->getUInt8( "Homepoint" ); + m_class = static_cast< ClassJob >( res->getUInt( "Class" ) ); + m_homePoint = res->getUInt8( "Homepoint" ); - // Additional data + // Additional data - m_contentId = res->getUInt64( "ContentId" ); - m_voice = res->getUInt8( "Voice" ); - m_startTown = res->getUInt8( "StartTown" ); - m_playTime = res->getUInt( "TotalPlayTime" ); + m_contentId = res->getUInt64( "ContentId" ); + m_voice = res->getUInt8( "Voice" ); + m_startTown = res->getUInt8( "StartTown" ); + m_playTime = res->getUInt( "TotalPlayTime" ); - m_bNewGame = res->getBoolean( "IsNewGame" ); - m_bNewAdventurer = res->getBoolean( "IsNewAdventurer" ); - m_openingSequence = res->getUInt8( "OpeningSequence" ); + m_bNewGame = res->getBoolean( "IsNewGame" ); + m_bNewAdventurer = res->getBoolean( "IsNewAdventurer" ); + m_openingSequence = res->getUInt8( "OpeningSequence" ); - m_gc = res->getUInt8( "GrandCompany" ); - m_cfPenaltyUntil = res->getUInt( "CFPenaltyUntil" ); - m_activeTitle = res->getUInt16( "ActiveTitle" ); + m_gc = res->getUInt8( "GrandCompany" ); + m_cfPenaltyUntil = res->getUInt( "CFPenaltyUntil" ); + m_activeTitle = res->getUInt16( "ActiveTitle" ); - m_gmRank = res->getUInt8( "GMRank" ); + m_gmRank = res->getUInt8( "GMRank" ); - m_equipDisplayFlags = res->getUInt8( "EquipDisplayFlags" ); + m_equipDisplayFlags = res->getUInt8( "EquipDisplayFlags" ); - m_pose = res->getUInt8( "Pose" ); + m_pose = res->getUInt8( "Pose" ); - // Blobs + // Blobs - auto howTo = res->getBlobVector( "HowTo" ); - memcpy( reinterpret_cast< char* >( m_howTo ), howTo.data(), howTo.size() ); + auto howTo = res->getBlobVector( "HowTo" ); + memcpy( reinterpret_cast< char* >( m_howTo ), howTo.data(), howTo.size() ); - auto questCompleteFlags = res->getBlobVector( "QuestCompleteFlags" ); - memcpy( reinterpret_cast< char* >( m_questCompleteFlags ), questCompleteFlags.data(), questCompleteFlags.size() ); + auto questCompleteFlags = res->getBlobVector( "QuestCompleteFlags" ); + memcpy( reinterpret_cast< char* >( m_questCompleteFlags ), questCompleteFlags.data(), questCompleteFlags.size() ); - auto questTracking = res->getBlobVector( "QuestTracking" ); - memcpy( reinterpret_cast< char* >( m_questTracking ), questTracking.data(), questTracking.size() ); + auto questTracking = res->getBlobVector( "QuestTracking" ); + memcpy( reinterpret_cast< char* >( m_questTracking ), questTracking.data(), questTracking.size() ); - auto aetheryte = res->getBlobVector( "Aetheryte" ); - memcpy( reinterpret_cast< char* >( m_aetheryte ), aetheryte.data(), aetheryte.size() ); + auto aetheryte = res->getBlobVector( "Aetheryte" ); + memcpy( reinterpret_cast< char* >( m_aetheryte ), aetheryte.data(), aetheryte.size() ); - auto unlocks = res->getBlobVector( "Unlocks" ); - memcpy( reinterpret_cast< char* >( m_unlocks ), unlocks.data(), unlocks.size() ); + auto unlocks = res->getBlobVector( "Unlocks" ); + memcpy( reinterpret_cast< char* >( m_unlocks ), unlocks.data(), unlocks.size() ); - auto discovery = res->getBlobVector( "Discovery" ); - memcpy( reinterpret_cast< char* >( m_discovery ), discovery.data(), discovery.size() ); + auto discovery = res->getBlobVector( "Discovery" ); + memcpy( reinterpret_cast< char* >( m_discovery ), discovery.data(), discovery.size() ); - auto titleList = res->getBlobVector( "TitleList" ); - memcpy( reinterpret_cast< char* >( m_titleList ), titleList.data(), titleList.size() ); + auto titleList = res->getBlobVector( "TitleList" ); + memcpy( reinterpret_cast< char* >( m_titleList ), titleList.data(), titleList.size() ); - auto mountGuide = res->getBlobVector( "Mounts" ); - memcpy( reinterpret_cast< char* >( m_mountGuide ), mountGuide.data(), mountGuide.size() ); + auto mountGuide = res->getBlobVector( "Mounts" ); + memcpy( reinterpret_cast< char* >( m_mountGuide ), mountGuide.data(), mountGuide.size() ); - auto orchestrion = res->getBlobVector( "Orchestrion" ); - memcpy( reinterpret_cast< char* >( m_orchestrion ), orchestrion.data(), orchestrion.size() ); + auto orchestrion = res->getBlobVector( "Orchestrion" ); + memcpy( reinterpret_cast< char* >( m_orchestrion ), orchestrion.data(), orchestrion.size() ); - auto gcRank = res->getBlobVector( "GrandCompanyRank" ); - memcpy( reinterpret_cast< char* >( m_gcRank ), gcRank.data(), gcRank.size() ); + auto gcRank = res->getBlobVector( "GrandCompanyRank" ); + memcpy( reinterpret_cast< char* >( m_gcRank ), gcRank.data(), gcRank.size() ); - res->free(); + res->free(); - m_pCell = nullptr; + m_pCell = nullptr; - if( !loadActiveQuests() || !loadClassData() || !loadSearchInfo() ) - pLog->error( "Player id " + char_id_str + " data corrupt!" ); + if( !loadActiveQuests() || !loadClassData() || !loadSearchInfo() ) + pLog->error( "Player id " + char_id_str + " data corrupt!" ); - m_maxHp = getMaxHp(); - m_maxMp = getMaxMp(); + m_maxHp = getMaxHp(); + m_maxMp = getMaxMp(); - m_mount = res->getUInt8( "Mount" ); + m_mount = res->getUInt8( "Mount" ); - m_modelSubWeapon = 0; - m_lastTickTime = 0; + m_modelSubWeapon = 0; + m_lastTickTime = 0; - calculateStats(); + calculateStats(); - // first login, run the script event - if( m_bNewGame ) - { - //g_framework.getScriptMgr().onPlayerFirstEnterWorld( pPlayer ); - m_bNewGame = false; - m_hp = getMaxHp(); - m_mp = getMaxMp(); - } + // first login, run the script event + if( m_bNewGame ) + { + //g_framework.getScriptMgr().onPlayerFirstEnterWorld( pPlayer ); + m_bNewGame = false; + m_hp = getMaxHp(); + m_mp = getMaxMp(); + } - if( m_hp > getMaxHp() ) - m_hp = getMaxHp(); + if( m_hp > getMaxHp() ) + m_hp = getMaxHp(); - if( m_mp > getMaxMp() ) - m_mp = getMaxMp(); + if( m_mp > getMaxMp() ) + m_mp = getMaxMp(); - if( m_hp == 0 ) - m_status = ActorStatus::Dead; + if( m_hp == 0 ) + m_status = ActorStatus::Dead; - // if( m_bNewAdventurer ) - // setStateFlag( PlayerStateFlag::NewAdventurer ); + // if( m_bNewAdventurer ) + // setStateFlag( PlayerStateFlag::NewAdventurer ); - setStateFlag( PlayerStateFlag::BetweenAreas ); + setStateFlag( PlayerStateFlag::BetweenAreas ); - //m_pInventory->load(); + //m_pInventory->load(); - initInventory(); + initInventory(); - initHateSlotQueue(); + initHateSlotQueue(); - initSpawnIdQueue(); + initSpawnIdQueue(); - if( !pTeriMgr->movePlayer( pCurrZone, getAsPlayer() ) ) - return false; + if( !pTeriMgr->movePlayer( pCurrZone, getAsPlayer() ) ) + return false; - return true; + return true; } bool Core::Entity::Player::loadActiveQuests() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_QUEST_SEL ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_QUEST_SEL ); - stmt->setUInt( 1, m_id ); - auto res = pDb->query( stmt ); + stmt->setUInt( 1, m_id ); + auto res = pDb->query( stmt ); - while( res->next() ) - { + while( res->next() ) + { - auto slotId = res->getUInt8( 2 ); + auto slotId = res->getUInt8( 2 ); - boost::shared_ptr< QuestActive > pActiveQuest( new QuestActive() ); - pActiveQuest->c.questId = res->getUInt16( 3 ); - pActiveQuest->c.sequence = res->getUInt8( 4 ); - pActiveQuest->c.flags = res->getUInt8( 5 ); - pActiveQuest->c.UI8A = res->getUInt8( 6 ); - pActiveQuest->c.UI8B = res->getUInt8( 7 ); - pActiveQuest->c.UI8C = res->getUInt8( 8 ); - pActiveQuest->c.UI8D = res->getUInt8( 9 ); - pActiveQuest->c.UI8E = res->getUInt8( 10 ); - pActiveQuest->c.UI8F = res->getUInt8( 11 ); - pActiveQuest->c.padding1 = res->getUInt8( 12 ); - m_activeQuests[slotId] = pActiveQuest; + boost::shared_ptr< QuestActive > pActiveQuest( new QuestActive() ); + pActiveQuest->c.questId = res->getUInt16( 3 ); + pActiveQuest->c.sequence = res->getUInt8( 4 ); + pActiveQuest->c.flags = res->getUInt8( 5 ); + pActiveQuest->c.UI8A = res->getUInt8( 6 ); + pActiveQuest->c.UI8B = res->getUInt8( 7 ); + pActiveQuest->c.UI8C = res->getUInt8( 8 ); + pActiveQuest->c.UI8D = res->getUInt8( 9 ); + pActiveQuest->c.UI8E = res->getUInt8( 10 ); + pActiveQuest->c.UI8F = res->getUInt8( 11 ); + pActiveQuest->c.padding1 = res->getUInt8( 12 ); + m_activeQuests[ slotId ] = pActiveQuest; - m_questIdToQuestIdx[pActiveQuest->c.questId] = slotId; - m_questIdxToQuestId[slotId] = pActiveQuest->c.questId; + m_questIdToQuestIdx[ pActiveQuest->c.questId ] = slotId; + m_questIdxToQuestId[ slotId ] = pActiveQuest->c.questId; - } + } - return true; + return true; } bool Core::Entity::Player::loadClassData() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - // ClassIdx, Exp, Lvl - auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_CLASS_SEL ); - stmt->setUInt( 1, m_id ); - auto res = pDb->query( stmt ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + // ClassIdx, Exp, Lvl + auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_CLASS_SEL ); + stmt->setUInt( 1, m_id ); + auto res = pDb->query( stmt ); - while( res->next() ) - { - auto index = res->getUInt16( 1 ); - auto exp = res->getUInt( 2 ); - auto lvl = res->getUInt8( 3 ); + while( res->next() ) + { + auto index = res->getUInt16( 1 ); + auto exp = res->getUInt( 2 ); + auto lvl = res->getUInt8( 3 ); - m_classArray[index] = lvl; - m_expArray[index] = exp; - } + m_classArray[ index ] = lvl; + m_expArray[ index ] = exp; + } - return true; + return true; } bool Core::Entity::Player::loadSearchInfo() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_SEARCHINFO_SEL ); - stmt->setUInt( 1, m_id ); - auto res = pDb->query( stmt ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_SEARCHINFO_SEL ); + stmt->setUInt( 1, m_id ); + auto res = pDb->query( stmt ); - if( !res->next() ) - return false; + if( !res->next() ) + return false; - m_searchSelectClass = res->getUInt8( 2 ); - m_searchSelectRegion = res->getUInt8( 3 ); + m_searchSelectClass = res->getUInt8( 2 ); + m_searchSelectRegion = res->getUInt8( 3 ); - // todo: internally use an std::string instead of a char[] - auto searchMessage = res->getString( 4 ); - std::copy( searchMessage.begin(), searchMessage.end(), m_searchMessage ); + // todo: internally use an std::string instead of a char[] + auto searchMessage = res->getString( 4 ); + std::copy( searchMessage.begin(), searchMessage.end(), m_searchMessage ); - return true; + return true; } void Core::Entity::Player::updateSql() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - /*"Hp 1, Mp 2, Tp 3, Gp 4, Mode 5, Mount 6, InvincibleGM 7, Voice 8, " - "Customize 9, ModelMainWeapon 10, ModelSubWeapon 11, ModelSystemWeapon 12, " - "ModelEquip 13, EmoteModeType 14, Language 15, IsNewGame 16, IsNewAdventurer 17, " - "TerritoryType 18, TerritoryId 19, PosX 20, PosY 21, PosZ 22, PosR 23, " - "OTerritoryType 24, OTerritoryId 25, OPosX 26, OPosY 27, OPosZ 28, OPosR 29, " - "Class 30, Status 31, TotalPlayTime 32, HomePoint 33, FavoritePoint 34, RestPoint 35, " - "ActiveTitle 36, TitleList 37, Achievement 38, Aetheryte 39, HowTo 40, Minions 41, Mounts 42, Orchestrion 43, " - "EquippedMannequin 44, ConfigFlags 45, QuestCompleteFlags 46, OpeningSequence 47, " - "QuestTracking 48, GrandCompany 49, GrandCompanyRank 50, Discovery 51, GMRank 52, Unlocks 53, " - "CFPenaltyUntil 54, Pose 55"*/ - auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_UP ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + /*"Hp 1, Mp 2, Tp 3, Gp 4, Mode 5, Mount 6, InvincibleGM 7, Voice 8, " + "Customize 9, ModelMainWeapon 10, ModelSubWeapon 11, ModelSystemWeapon 12, " + "ModelEquip 13, EmoteModeType 14, Language 15, IsNewGame 16, IsNewAdventurer 17, " + "TerritoryType 18, TerritoryId 19, PosX 20, PosY 21, PosZ 22, PosR 23, " + "OTerritoryType 24, OTerritoryId 25, OPosX 26, OPosY 27, OPosZ 28, OPosR 29, " + "Class 30, Status 31, TotalPlayTime 32, HomePoint 33, FavoritePoint 34, RestPoint 35, " + "ActiveTitle 36, TitleList 37, Achievement 38, Aetheryte 39, HowTo 40, Minions 41, Mounts 42, Orchestrion 43, " + "EquippedMannequin 44, ConfigFlags 45, QuestCompleteFlags 46, OpeningSequence 47, " + "QuestTracking 48, GrandCompany 49, GrandCompanyRank 50, Discovery 51, GMRank 52, Unlocks 53, " + "CFPenaltyUntil 54, Pose 55"*/ + auto stmt = pDb->getPreparedStatement( Db::CharaDbStatements::CHARA_UP ); - stmt->setInt( 1, getHp() ); - stmt->setInt( 2, getMp() ); - stmt->setInt( 3, 0 ); // TP - stmt->setInt( 4, 0 ); // GP - stmt->setInt( 5, 0 ); // Mode - stmt->setInt( 6, m_mount ); // Mount - stmt->setInt( 7, 0 ); // InvicibleGM - stmt->setInt( 8, m_voice ); + stmt->setInt( 1, getHp() ); + stmt->setInt( 2, getMp() ); + stmt->setInt( 3, 0 ); // TP + stmt->setInt( 4, 0 ); // GP + stmt->setInt( 5, 0 ); // Mode + stmt->setInt( 6, m_mount ); // Mount + stmt->setInt( 7, 0 ); // InvicibleGM + stmt->setInt( 8, m_voice ); - std::vector< uint8_t > customVec( sizeof( m_customize ) ); - memcpy( customVec.data(), m_customize, sizeof( m_customize ) ); - stmt->setBinary( 9, customVec ); + std::vector< uint8_t > customVec( sizeof( m_customize ) ); + memcpy( customVec.data(), m_customize, sizeof( m_customize ) ); + stmt->setBinary( 9, customVec ); - stmt->setInt64( 10, m_modelMainWeapon ); - stmt->setInt64( 11, m_modelSubWeapon ); - stmt->setInt64( 12, m_modelSystemWeapon ); + stmt->setInt64( 10, m_modelMainWeapon ); + stmt->setInt64( 11, m_modelSubWeapon ); + stmt->setInt64( 12, m_modelSystemWeapon ); - std::vector< uint8_t > modelVec( sizeof( m_modelEquip ) ); - memcpy( modelVec.data(), m_modelEquip, sizeof( m_modelEquip ) ); - stmt->setBinary( 13, modelVec ); + std::vector< uint8_t > modelVec( sizeof( m_modelEquip ) ); + memcpy( modelVec.data(), m_modelEquip, sizeof( m_modelEquip ) ); + stmt->setBinary( 13, modelVec ); - stmt->setInt( 14, m_emoteMode ); // EmodeModeType - stmt->setInt( 15, 0 ); // Language + stmt->setInt( 14, m_emoteMode ); // EmodeModeType + stmt->setInt( 15, 0 ); // Language - stmt->setInt( 16, static_cast< uint32_t >( m_bNewGame ) ); - stmt->setInt( 17, static_cast< uint32_t >( m_bNewAdventurer ) ); + stmt->setInt( 16, static_cast< uint32_t >( m_bNewGame ) ); + stmt->setInt( 17, static_cast< uint32_t >( m_bNewAdventurer ) ); - stmt->setInt( 18, 0 ); // TerritoryType - stmt->setInt( 19, m_zoneId ); // TerritoryId - stmt->setDouble( 20, m_pos.x ); - stmt->setDouble( 21, m_pos.y ); - stmt->setDouble( 22, m_pos.z ); - stmt->setDouble( 23, getRot() ); + stmt->setInt( 18, 0 ); // TerritoryType + stmt->setInt( 19, m_zoneId ); // TerritoryId + stmt->setDouble( 20, m_pos.x ); + stmt->setDouble( 21, m_pos.y ); + stmt->setDouble( 22, m_pos.z ); + stmt->setDouble( 23, getRot() ); - stmt->setInt( 24, m_prevZoneType ); // OTerritoryType - stmt->setInt( 25, m_prevZoneId ); // OTerritoryId - stmt->setDouble( 26, m_prevPos.x ); - stmt->setDouble( 27, m_prevPos.y ); - stmt->setDouble( 28, m_prevPos.z ); - stmt->setDouble( 29, m_prevRot ); + stmt->setInt( 24, m_prevZoneType ); // OTerritoryType + stmt->setInt( 25, m_prevZoneId ); // OTerritoryId + stmt->setDouble( 26, m_prevPos.x ); + stmt->setDouble( 27, m_prevPos.y ); + stmt->setDouble( 28, m_prevPos.z ); + stmt->setDouble( 29, m_prevRot ); - stmt->setInt( 30, static_cast< uint8_t >( getClass() ) ); - stmt->setInt( 31, static_cast< uint8_t >( getStatus() ) ); - stmt->setInt( 32, m_playTime ); - stmt->setInt( 33, m_homePoint ); + stmt->setInt( 30, static_cast< uint8_t >( getClass() ) ); + stmt->setInt( 31, static_cast< uint8_t >( getStatus() ) ); + stmt->setInt( 32, m_playTime ); + stmt->setInt( 33, m_homePoint ); - stmt->setBinary( 34, { 0, 0, 0 } ); // FavoritePoint - stmt->setInt( 35, 0 ); // RestPoint - stmt->setInt( 36, m_activeTitle ); // ActiveTitle + stmt->setBinary( 34, { 0, 0, 0 } ); // FavoritePoint + stmt->setInt( 35, 0 ); // RestPoint + stmt->setInt( 36, m_activeTitle ); // ActiveTitle - std::vector< uint8_t > titleListVec( sizeof ( m_titleList ) ); - stmt->setBinary( 37, titleListVec ); + std::vector< uint8_t > titleListVec( sizeof( m_titleList ) ); + stmt->setBinary( 37, titleListVec ); - std::vector< uint8_t > achievementVec( 16 ); - stmt->setBinary( 38, achievementVec ); + std::vector< uint8_t > achievementVec( 16 ); + stmt->setBinary( 38, achievementVec ); - std::vector< uint8_t > aetheryteVec( sizeof( m_aetheryte ) ); - memcpy( aetheryteVec.data(), m_aetheryte, sizeof( m_aetheryte ) ); - stmt->setBinary( 39, aetheryteVec ); + std::vector< uint8_t > aetheryteVec( sizeof( m_aetheryte ) ); + memcpy( aetheryteVec.data(), m_aetheryte, sizeof( m_aetheryte ) ); + stmt->setBinary( 39, aetheryteVec ); - std::vector< uint8_t > howToVec( sizeof( m_howTo ) ); - memcpy( howToVec.data(), m_howTo, sizeof( m_howTo ) ); - stmt->setBinary( 40, howToVec ); + std::vector< uint8_t > howToVec( sizeof( m_howTo ) ); + memcpy( howToVec.data(), m_howTo, sizeof( m_howTo ) ); + stmt->setBinary( 40, howToVec ); - std::vector< uint8_t > minionsVec( sizeof( m_minions ) ); - memcpy( minionsVec.data(), m_minions, sizeof( m_minions ) ); - stmt->setBinary( 41, minionsVec ); + std::vector< uint8_t > minionsVec( sizeof( m_minions ) ); + memcpy( minionsVec.data(), m_minions, sizeof( m_minions ) ); + stmt->setBinary( 41, minionsVec ); - std::vector< uint8_t > mountsVec( sizeof( m_mountGuide ) ); - memcpy( mountsVec.data(), m_mountGuide, sizeof( m_mountGuide ) ); - stmt->setBinary( 42, mountsVec ); + std::vector< uint8_t > mountsVec( sizeof( m_mountGuide ) ); + memcpy( mountsVec.data(), m_mountGuide, sizeof( m_mountGuide ) ); + stmt->setBinary( 42, mountsVec ); - std::vector< uint8_t > orchestrionVec( sizeof( m_orchestrion ) ); - memcpy( orchestrionVec.data(), m_orchestrion, sizeof( m_orchestrion ) ); - stmt->setBinary( 42, mountsVec ); + std::vector< uint8_t > orchestrionVec( sizeof( m_orchestrion ) ); + memcpy( orchestrionVec.data(), m_orchestrion, sizeof( m_orchestrion ) ); + stmt->setBinary( 42, mountsVec ); - stmt->setInt( 44, 0 ); // EquippedMannequin + stmt->setInt( 44, 0 ); // EquippedMannequin - stmt->setInt( 45, 0 ); // DisplayFlags - std::vector< uint8_t > questCompleteVec( sizeof( m_questCompleteFlags ) ); - memcpy( questCompleteVec.data(), m_questCompleteFlags, sizeof( m_questCompleteFlags ) ); - stmt->setBinary( 46, questCompleteVec ); + stmt->setInt( 45, 0 ); // DisplayFlags + std::vector< uint8_t > questCompleteVec( sizeof( m_questCompleteFlags ) ); + memcpy( questCompleteVec.data(), m_questCompleteFlags, sizeof( m_questCompleteFlags ) ); + stmt->setBinary( 46, questCompleteVec ); - stmt->setInt( 47, m_openingSequence ); + stmt->setInt( 47, m_openingSequence ); - std::vector< uint8_t > questTrackerVec( sizeof( m_questTracking ) ); - memcpy( questTrackerVec.data(), m_questTracking, sizeof( m_questTracking ) ); - stmt->setBinary( 48, questTrackerVec ); + std::vector< uint8_t > questTrackerVec( sizeof( m_questTracking ) ); + memcpy( questTrackerVec.data(), m_questTracking, sizeof( m_questTracking ) ); + stmt->setBinary( 48, questTrackerVec ); - stmt->setInt( 49, m_gc ); // DisplayFlags + stmt->setInt( 49, m_gc ); // DisplayFlags - stmt->setBinary( 50, { m_gcRank[0], m_gcRank[1], m_gcRank[2] } ); + stmt->setBinary( 50, { m_gcRank[ 0 ], m_gcRank[ 1 ], m_gcRank[ 2 ] } ); - std::vector< uint8_t > discoveryVec( sizeof( m_discovery ) ); - memcpy( discoveryVec.data(), m_discovery, sizeof( m_discovery ) ); - stmt->setBinary( 51, discoveryVec ); + std::vector< uint8_t > discoveryVec( sizeof( m_discovery ) ); + memcpy( discoveryVec.data(), m_discovery, sizeof( m_discovery ) ); + stmt->setBinary( 51, discoveryVec ); - stmt->setInt( 52, m_gmRank ); + stmt->setInt( 52, m_gmRank ); - stmt->setInt( 53, m_equipDisplayFlags ); + stmt->setInt( 53, m_equipDisplayFlags ); - std::vector< uint8_t > unlockVec( sizeof( m_unlocks ) ); - memcpy( unlockVec.data(), m_unlocks, sizeof( m_unlocks ) ); - stmt->setBinary( 54, unlockVec ); + std::vector< uint8_t > unlockVec( sizeof( m_unlocks ) ); + memcpy( unlockVec.data(), m_unlocks, sizeof( m_unlocks ) ); + stmt->setBinary( 54, unlockVec ); - stmt->setInt( 55, m_cfPenaltyUntil ); + stmt->setInt( 55, m_cfPenaltyUntil ); - stmt->setInt( 56, m_pose ); + stmt->setInt( 56, m_pose ); - stmt->setInt( 57, m_id ); + stmt->setInt( 57, m_id ); - pDb->execute( stmt ); + pDb->execute( stmt ); - ////// Searchinfo - updateDbSearchInfo(); + ////// Searchinfo + updateDbSearchInfo(); - ////// QUESTS - updateDbAllQuests(); + ////// QUESTS + updateDbAllQuests(); - ////// Class - updateDbClass(); + ////// Class + updateDbClass(); } void Core::Entity::Player::updateDbClass() const { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast( getClass() ) )->expArrayIndex; + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint8_t classJobIndex = pExdData->get< Core::Data::ClassJob >( static_cast( getClass() ) )->expArrayIndex; - //Exp = ?, Lvl = ? WHERE CharacterId = ? AND ClassIdx = ? - auto stmtS = pDb->getPreparedStatement( Db::CHARA_CLASS_UP ); - stmtS->setInt( 1, getExp() ); - stmtS->setInt( 2, getLevel() ); - stmtS->setInt( 3, m_id ); - stmtS->setInt( 4, classJobIndex ); - pDb->execute( stmtS ); + //Exp = ?, Lvl = ? WHERE CharacterId = ? AND ClassIdx = ? + auto stmtS = pDb->getPreparedStatement( Db::CHARA_CLASS_UP ); + stmtS->setInt( 1, getExp() ); + stmtS->setInt( 2, getLevel() ); + stmtS->setInt( 3, m_id ); + stmtS->setInt( 4, classJobIndex ); + pDb->execute( stmtS ); } void Core::Entity::Player::insertDbClass( const uint8_t classJobIndex ) const { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto stmtClass = pDb->getPreparedStatement( Db::CHARA_CLASS_INS ); - stmtClass->setInt( 1, getId() ); - stmtClass->setInt( 2, classJobIndex ); - stmtClass->setInt( 3, 0 ); - stmtClass->setInt( 4, 1 ); - pDb->directExecute( stmtClass ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto stmtClass = pDb->getPreparedStatement( Db::CHARA_CLASS_INS ); + stmtClass->setInt( 1, getId() ); + stmtClass->setInt( 2, classJobIndex ); + stmtClass->setInt( 3, 0 ); + stmtClass->setInt( 4, 1 ); + pDb->directExecute( stmtClass ); } void Core::Entity::Player::updateDbSearchInfo() const { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto stmtS = pDb->getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SELECTCLASS ); - stmtS->setInt( 1, m_searchSelectClass ); - stmtS->setInt( 2, m_id ); - pDb->execute( stmtS ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto stmtS = pDb->getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SELECTCLASS ); + stmtS->setInt( 1, m_searchSelectClass ); + stmtS->setInt( 2, m_id ); + pDb->execute( stmtS ); - auto stmtS1 = pDb->getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SELECTREGION ); - stmtS1->setInt( 1, m_searchSelectRegion ); - stmtS1->setInt( 2, m_id ); - pDb->execute( stmtS1 ); + auto stmtS1 = pDb->getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SELECTREGION ); + stmtS1->setInt( 1, m_searchSelectRegion ); + stmtS1->setInt( 2, m_id ); + pDb->execute( stmtS1 ); - auto stmtS2 = pDb->getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SEARCHCOMMENT ); - stmtS2->setString( 1, string( m_searchMessage != nullptr ? m_searchMessage : "" ) ); - stmtS2->setInt( 2, m_id ); - pDb->execute( stmtS2 ); + auto stmtS2 = pDb->getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SEARCHCOMMENT ); + stmtS2->setString( 1, string( m_searchMessage != nullptr ? m_searchMessage : "" ) ); + stmtS2->setInt( 2, m_id ); + pDb->execute( stmtS2 ); } void Core::Entity::Player::updateDbAllQuests() const { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - for( int32_t i = 0; i < 30; i++ ) - { - if( !m_activeQuests[i] ) - continue; + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + for( int32_t i = 0; i < 30; i++ ) + { + if( !m_activeQuests[ i ] ) + continue; - auto stmtS3 = pDb->getPreparedStatement( Db::CHARA_QUEST_UP ); - stmtS3->setInt( 1, m_activeQuests[i]->c.sequence ); - stmtS3->setInt( 2, m_activeQuests[i]->c.flags ); - stmtS3->setInt( 3, m_activeQuests[i]->c.UI8A ); - stmtS3->setInt( 4, m_activeQuests[i]->c.UI8B ); - stmtS3->setInt( 5, m_activeQuests[i]->c.UI8C ); - stmtS3->setInt( 6, m_activeQuests[i]->c.UI8D ); - stmtS3->setInt( 7, m_activeQuests[i]->c.UI8E ); - stmtS3->setInt( 8, m_activeQuests[i]->c.UI8F ); - stmtS3->setInt( 9, m_activeQuests[i]->c.padding1 ); - stmtS3->setInt( 10, m_id); - stmtS3->setInt( 11, m_activeQuests[i]->c.questId ); - pDb->execute( stmtS3 ); + auto stmtS3 = pDb->getPreparedStatement( Db::CHARA_QUEST_UP ); + stmtS3->setInt( 1, m_activeQuests[ i ]->c.sequence ); + stmtS3->setInt( 2, m_activeQuests[ i ]->c.flags ); + stmtS3->setInt( 3, m_activeQuests[ i ]->c.UI8A ); + stmtS3->setInt( 4, m_activeQuests[ i ]->c.UI8B ); + stmtS3->setInt( 5, m_activeQuests[ i ]->c.UI8C ); + stmtS3->setInt( 6, m_activeQuests[ i ]->c.UI8D ); + stmtS3->setInt( 7, m_activeQuests[ i ]->c.UI8E ); + stmtS3->setInt( 8, m_activeQuests[ i ]->c.UI8F ); + stmtS3->setInt( 9, m_activeQuests[ i ]->c.padding1 ); + stmtS3->setInt( 10, m_id ); + stmtS3->setInt( 11, m_activeQuests[ i ]->c.questId ); + pDb->execute( stmtS3 ); - } + } } void Core::Entity::Player::deleteQuest( uint16_t questId ) const { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto stmt = pDb->getPreparedStatement( Db::CHARA_QUEST_DEL ); - stmt->setInt( 1, m_id ); - stmt->setInt( 2, questId ); - pDb->execute( stmt ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto stmt = pDb->getPreparedStatement( Db::CHARA_QUEST_DEL ); + stmt->setInt( 1, m_id ); + stmt->setInt( 2, questId ); + pDb->execute( stmt ); } void Core::Entity::Player::insertQuest( uint16_t questId, uint8_t index, uint8_t seq ) const { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto stmt = pDb->getPreparedStatement( Db::CHARA_QUEST_INS ); - stmt->setInt( 1, m_id ); - stmt->setInt( 2, index ); - stmt->setInt( 3, questId ); - stmt->setInt( 4, seq ); - stmt->setInt( 5, 0 ); - stmt->setInt( 6, 0 ); - stmt->setInt( 7, 0 ); - stmt->setInt( 8, 0 ); - stmt->setInt( 9, 0 ); - stmt->setInt( 10, 0 ); - stmt->setInt( 11, 0 ); - stmt->setInt( 12, 0 ); - pDb->execute( stmt ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto stmt = pDb->getPreparedStatement( Db::CHARA_QUEST_INS ); + stmt->setInt( 1, m_id ); + stmt->setInt( 2, index ); + stmt->setInt( 3, questId ); + stmt->setInt( 4, seq ); + stmt->setInt( 5, 0 ); + stmt->setInt( 6, 0 ); + stmt->setInt( 7, 0 ); + stmt->setInt( 8, 0 ); + stmt->setInt( 9, 0 ); + stmt->setInt( 10, 0 ); + stmt->setInt( 11, 0 ); + stmt->setInt( 12, 0 ); + pDb->execute( stmt ); } Core::ItemPtr Core::Entity::Player::createItem( uint32_t catalogId, uint32_t quantity ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto itemInfo = pExdData->get< Core::Data::Item >( catalogId ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto itemInfo = pExdData->get< Core::Data::Item >( catalogId ); - if( !itemInfo ) - return nullptr; + if( !itemInfo ) + return nullptr; - if( !itemInfo ) - return nullptr; + if( !itemInfo ) + return nullptr; - uint8_t flags = 0; + uint8_t flags = 0; - ItemPtr pItem = make_Item( Items::Util::getNextUId(), - catalogId, - itemInfo->modelMain, - itemInfo->modelSub ); + ItemPtr pItem = make_Item( Items::Util::getNextUId(), + catalogId, + itemInfo->modelMain, + itemInfo->modelSub ); - pItem->setStackSize( quantity ); + pItem->setStackSize( quantity ); - pDb->execute( "INSERT INTO charaglobalitem ( CharacterId, itemId, catalogId, stack, flags ) VALUES ( " + - std::to_string( getId() ) + ", " + - std::to_string( pItem->getUId() ) + ", " + - std::to_string( pItem->getId() ) + ", " + - std::to_string( quantity ) + ", " + - std::to_string( flags ) + ");" ); + pDb->execute( "INSERT INTO charaglobalitem ( CharacterId, itemId, catalogId, stack, flags ) VALUES ( " + + std::to_string( getId() ) + ", " + + std::to_string( pItem->getUId() ) + ", " + + std::to_string( pItem->getId() ) + ", " + + std::to_string( quantity ) + ", " + + std::to_string( flags ) + ");" ); - return pItem; + return pItem; } bool Core::Entity::Player::loadInventory() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - ////////////////////////////////////////////////////////////////////////////////////////////////////// - // load active gearset - auto res = pDb->query( "SELECT storageId, container_0, container_1, container_2, container_3, " - "container_4, container_5, container_6, container_7, " - "container_8, container_9, container_10, container_11, " - "container_12, container_13 " - "FROM charaitemgearset " \ + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + ////////////////////////////////////////////////////////////////////////////////////////////////////// + // load active gearset + auto res = pDb->query( "SELECT storageId, container_0, container_1, container_2, container_3, " + "container_4, container_5, container_6, container_7, " + "container_8, container_9, container_10, container_11, " + "container_12, container_13 " + "FROM charaitemgearset " \ "WHERE CharacterId = " + std::to_string( getId() ) + " " \ "ORDER BY storageId ASC;" ); - while( res->next() ) - { - uint16_t storageId = res->getUInt16( 1 ); + while( res->next() ) + { + uint16_t storageId = res->getUInt16( 1 ); - for( uint32_t i = 1; i <= 14; i++ ) - { - uint64_t uItemId = res->getUInt64( i + 1 ); - if( uItemId == 0 ) - continue; + for( uint32_t i = 1; i <= 14; i++ ) + { + uint64_t uItemId = res->getUInt64( i + 1 ); + if( uItemId == 0 ) + continue; - ItemPtr pItem = Items::Util::loadItem( uItemId ); + ItemPtr pItem = Items::Util::loadItem( uItemId ); - if( pItem == nullptr ) - continue; + if( pItem == nullptr ) + continue; - m_storageMap[storageId]->getItemMap()[i - 1] = pItem; - equipItem( static_cast< GearSetSlot >( i - 1 ), pItem, false ); - } - } + m_storageMap[ storageId ]->getItemMap()[ i - 1 ] = pItem; + equipItem( static_cast< GearSetSlot >( i - 1 ), pItem, false ); + } + } - /////////////////////////////////////////////////////////////////////////////////////////////////////// - // Load everything - auto bagRes = pDb->query( "SELECT storageId, " - "container_0, container_1, container_2, container_3, container_4, " - "container_5, container_6, container_7, container_8, container_9, " - "container_10, container_11, container_12, container_13, container_14, " - "container_15, container_16, container_17, container_18, container_19, " - "container_20, container_21, container_22, container_23, container_24, " - "container_25, container_26, container_27, container_28, container_29, " - "container_30, container_31, container_32, container_33, container_34 " - "FROM charaiteminventory " \ + /////////////////////////////////////////////////////////////////////////////////////////////////////// + // Load everything + auto bagRes = pDb->query( "SELECT storageId, " + "container_0, container_1, container_2, container_3, container_4, " + "container_5, container_6, container_7, container_8, container_9, " + "container_10, container_11, container_12, container_13, container_14, " + "container_15, container_16, container_17, container_18, container_19, " + "container_20, container_21, container_22, container_23, container_24, " + "container_25, container_26, container_27, container_28, container_29, " + "container_30, container_31, container_32, container_33, container_34 " + "FROM charaiteminventory " \ "WHERE CharacterId = " + std::to_string( getId() ) + " " \ "ORDER BY storageId ASC;" ); - while( bagRes->next() ) - { - uint16_t storageId = bagRes->getUInt16( 1 ); - for( uint32_t i = 1; i <= m_storageMap[storageId]->getMaxSize(); i++ ) - { - uint64_t uItemId = bagRes->getUInt64( i + 1 ); - if( uItemId == 0 ) - continue; + while( bagRes->next() ) + { + uint16_t storageId = bagRes->getUInt16( 1 ); + for( uint32_t i = 1; i <= m_storageMap[ storageId ]->getMaxSize(); i++ ) + { + uint64_t uItemId = bagRes->getUInt64( i + 1 ); + if( uItemId == 0 ) + continue; - ItemPtr pItem = Items::Util::loadItem( uItemId ); + ItemPtr pItem = Items::Util::loadItem( uItemId ); - if( pItem == nullptr ) - continue; + if( pItem == nullptr ) + continue; - m_storageMap[storageId]->getItemMap()[i - 1] = pItem; - } - } + m_storageMap[ storageId ]->getItemMap()[ i - 1 ] = pItem; + } + } - return true; + return true; } diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommand.h b/src/servers/sapphire_zone/DebugCommand/DebugCommand.h index b3a121a4..76daf92c 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommand.h +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommand.h @@ -7,55 +7,55 @@ namespace Core { - class DebugCommandHandler; +class DebugCommandHandler; - class DebugCommand - { - public: +class DebugCommand +{ +public: - using pFunc = void ( DebugCommandHandler::* )( char *, Entity::Player&, boost::shared_ptr< DebugCommand > ); + using pFunc = void ( DebugCommandHandler::* )( char*, Entity::Player&, boost::shared_ptr< DebugCommand > ); - // String for the command - std::string m_commandName; + // String for the command + std::string m_commandName; - // command callback - pFunc m_pFunc; + // command callback + pFunc m_pFunc; - // helptext - std::string m_helpText; + // helptext + std::string m_helpText; - // userlevel needed to execute the command - uint8_t m_gmLevel; + // userlevel needed to execute the command + uint8_t m_gmLevel; - DebugCommand( const std::string& n, pFunc functionPtr, const std::string& hText, uint8_t uLevel ) - { - m_commandName = n; - m_pFunc = functionPtr; - m_helpText = hText; - m_gmLevel = uLevel; - } + DebugCommand( const std::string& n, pFunc functionPtr, const std::string& hText, uint8_t uLevel ) + { + m_commandName = n; + m_pFunc = functionPtr; + m_helpText = hText; + m_gmLevel = uLevel; + } - ~DebugCommand() - { + ~DebugCommand() + { - } + } - const std::string& getName() const - { - return m_commandName; - } + const std::string& getName() const + { + return m_commandName; + } - const std::string& getHelpText() const - { - return m_helpText; - } + const std::string& getHelpText() const + { + return m_helpText; + } - uint8_t getRequiredGmLevel() const - { - return m_gmLevel; - } + uint8_t getRequiredGmLevel() const + { + return m_gmLevel; + } - }; +}; } diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp index 04befe62..40c62bc9 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp @@ -45,73 +45,73 @@ using namespace Network::Packets::Server; // instanciate and initialize commands Core::DebugCommandHandler::DebugCommandHandler() { - // Push all commands onto the register map ( command name - function - description - required GM level ) - registerCommand( "set", &DebugCommandHandler::set, "Executes SET commands.", 1 ); - registerCommand( "get", &DebugCommandHandler::get, "Executes GET commands.", 1 ); - registerCommand( "add", &DebugCommandHandler::add, "Executes ADD commands.", 1 ); - registerCommand( "inject", &DebugCommandHandler::injectPacket, "Loads and injects a premade packet.", 1 ); - registerCommand( "injectc", &DebugCommandHandler::injectChatPacket, "Loads and injects a premade chat packet.", 1 ); - registerCommand( "replay", &DebugCommandHandler::replay, "Replays a saved capture folder.", 1 ); - registerCommand( "nudge", &DebugCommandHandler::nudge, "Nudges you forward/up/down.", 1 ); - registerCommand( "info", &DebugCommandHandler::serverInfo, "Show server info.", 0 ); - registerCommand( "help", &DebugCommandHandler::help, "Shows registered commands.", 0 ); - registerCommand( "script", &DebugCommandHandler::script, "Server script utilities.", 1 ); - registerCommand( "instance", &DebugCommandHandler::instance, "Instance utilities", 1 ); + // Push all commands onto the register map ( command name - function - description - required GM level ) + registerCommand( "set", &DebugCommandHandler::set, "Executes SET commands.", 1 ); + registerCommand( "get", &DebugCommandHandler::get, "Executes GET commands.", 1 ); + registerCommand( "add", &DebugCommandHandler::add, "Executes ADD commands.", 1 ); + registerCommand( "inject", &DebugCommandHandler::injectPacket, "Loads and injects a premade packet.", 1 ); + registerCommand( "injectc", &DebugCommandHandler::injectChatPacket, "Loads and injects a premade chat packet.", 1 ); + registerCommand( "replay", &DebugCommandHandler::replay, "Replays a saved capture folder.", 1 ); + registerCommand( "nudge", &DebugCommandHandler::nudge, "Nudges you forward/up/down.", 1 ); + registerCommand( "info", &DebugCommandHandler::serverInfo, "Show server info.", 0 ); + registerCommand( "help", &DebugCommandHandler::help, "Shows registered commands.", 0 ); + registerCommand( "script", &DebugCommandHandler::script, "Server script utilities.", 1 ); + registerCommand( "instance", &DebugCommandHandler::instance, "Instance utilities", 1 ); } // clear all loaded commands Core::DebugCommandHandler::~DebugCommandHandler() { - for( auto it = m_commandMap.begin(); it != m_commandMap.end(); ++it ) - ( *it ).second.reset(); + for( auto it = m_commandMap.begin(); it != m_commandMap.end(); ++it ) + ( *it ).second.reset(); } // add a command set to the register map void Core::DebugCommandHandler::registerCommand( const std::string& n, DebugCommand::pFunc functionPtr, const std::string& hText, uint8_t uLevel ) { - m_commandMap[std::string( n )] = boost::make_shared< DebugCommand >( n, functionPtr, hText, uLevel ); + m_commandMap[ std::string( n ) ] = boost::make_shared< DebugCommand >( n, functionPtr, hText, uLevel ); } // try to retrieve the command in question, execute if found -void Core::DebugCommandHandler::execCommand( char * data, Entity::Player& player ) +void Core::DebugCommandHandler::execCommand( char* data, Entity::Player& player ) { - // define callback pointer - void ( DebugCommandHandler::*pf )( char *, Entity::Player&, boost::shared_ptr< DebugCommand > ); + // define callback pointer + void ( DebugCommandHandler::*pf )( char*, Entity::Player&, boost::shared_ptr< DebugCommand > ); - std::string commandString; + std::string commandString; - // check if the command has parameters - std::string tmpCommand = std::string( data ); - std::size_t pos = tmpCommand.find_first_of( " " ); + // check if the command has parameters + std::string tmpCommand = std::string( data ); + std::size_t pos = tmpCommand.find_first_of( " " ); - if( pos != std::string::npos ) - // command has parameters, grab the first part - commandString = tmpCommand.substr( 0, pos ); - else - // no parameters, just get the command - commandString = tmpCommand; + if( pos != std::string::npos ) + // command has parameters, grab the first part + commandString = tmpCommand.substr( 0, pos ); + else + // no parameters, just get the command + commandString = tmpCommand; - // try to retrieve the command - auto it = m_commandMap.find( commandString ); + // try to retrieve the command + auto it = m_commandMap.find( commandString ); - if( it == m_commandMap.end() ) - // no command found, do something... or not - player.sendUrgent( "Command not found." ); - else - { - if( player.getGmRank() < it->second->getRequiredGmLevel() ) - { - player.sendUrgent( "You are not allowed to use this command." ); - return; - } - - // command found, call the callback function and pass parameters if present. - pf = ( *it ).second->m_pFunc; - ( this->*pf )( data, player, ( *it ).second ); + if( it == m_commandMap.end() ) + // no command found, do something... or not + player.sendUrgent( "Command not found." ); + else + { + if( player.getGmRank() < it->second->getRequiredGmLevel() ) + { + player.sendUrgent( "You are not allowed to use this command." ); return; - } + } + + // command found, call the callback function and pass parameters if present. + pf = ( *it ).second->m_pFunc; + ( this->*pf )( data, player, ( *it ).second ); + return; + } } @@ -123,839 +123,847 @@ void Core::DebugCommandHandler::execCommand( char * data, Entity::Player& player void Core::DebugCommandHandler::help( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) { - player.sendDebug( "Registered debug commands:" ); - for ( auto cmd : m_commandMap ) - { - if ( player.getGmRank( ) >= cmd.second->m_gmLevel ) + player.sendDebug( "Registered debug commands:" ); + for( auto cmd : m_commandMap ) + { + if( player.getGmRank() >= cmd.second->m_gmLevel ) + { + player.sendDebug( " - " + cmd.first + " - " + cmd.second->getHelpText() ); + } + } +} + +void Core::DebugCommandHandler::set( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +{ + auto pLog = g_fw.get< Logger >(); + auto pTerriMgr = g_fw.get< TerritoryMgr >(); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + std::string subCommand = ""; + std::string params = ""; + + // check if the command has parameters + std::string tmpCommand = std::string( data + command->getName().length() + 1 ); + + std::size_t pos = tmpCommand.find_first_of( " " ); + + if( pos != std::string::npos ) + // command has parameters, grab the first part + subCommand = tmpCommand.substr( 0, pos ); + else + // no subcommand given + subCommand = tmpCommand; + + if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) + params = std::string( data + command->getName().length() + 1 + pos + 1 ); + + pLog->debug( "[" + std::to_string( player.getId() ) + "] " + + "subCommand " + subCommand + " params: " + params ); + + if( ( ( subCommand == "pos" ) || ( subCommand == "posr" ) ) && ( params != "" ) ) + { + int32_t posX; + int32_t posY; + int32_t posZ; + + sscanf( params.c_str(), "%d %d %d", &posX, &posY, &posZ ); + + if( ( posX == 0xcccccccc ) || ( posY == 0xcccccccc ) || ( posZ == 0xcccccccc ) ) + { + player.sendUrgent( "Syntaxerror." ); + return; + } + + if( subCommand == "pos" ) + player.setPos( static_cast< float >( posX ), + static_cast< float >( posY ), + static_cast< float >( posZ ) ); + else + player.setPos( player.getPos().x + static_cast< float >( posX ), + player.getPos().y + static_cast< float >( posY ), + player.getPos().z + static_cast< float >( posZ ) ); + + auto setActorPosPacket = makeZonePacket< FFXIVIpcActorSetPos >( player.getId() ); + setActorPosPacket->data().x = player.getPos().x; + setActorPosPacket->data().y = player.getPos().y; + setActorPosPacket->data().z = player.getPos().z; + player.queuePacket( setActorPosPacket ); + + } + else if( ( subCommand == "tele" ) && ( params != "" ) ) + { + int32_t aetheryteId; + sscanf( params.c_str(), "%i", &aetheryteId ); + + player.teleport( aetheryteId ); + } + else if( ( subCommand == "discovery" ) && ( params != "" ) ) + { + int32_t map_id; + int32_t discover_id; + sscanf( params.c_str(), "%i %i", &map_id, &discover_id ); + + auto discoveryPacket = makeZonePacket< FFXIVIpcDiscovery >( player.getId() ); + discoveryPacket->data().map_id = map_id; + discoveryPacket->data().map_part_id = discover_id; + player.queuePacket( discoveryPacket ); + } + + else if( ( subCommand == "discovery_pos" ) && ( params != "" ) ) + { + int32_t map_id; + int32_t discover_id; + int32_t pos_id; + sscanf( params.c_str(), "%i %i %i", &pos_id, &map_id, &discover_id ); + + std::string query2 = "UPDATE IGNORE `discoveryinfo` SET `discover_id` = '" + std::to_string( discover_id ) + + "' WHERE `discoveryinfo`.`id` = " + std::to_string( pos_id ) + ";"; + + std::string query1 = + "INSERT IGNORE INTO `discoveryinfo` (`id`, `map_id`, `discover_id`) VALUES ('" + std::to_string( pos_id ) + + "', '" + std::to_string( map_id ) + + "', '" + std::to_string( discover_id ) + "')"; + + pDb->execute( query1 ); + pDb->execute( query2 ); + + } + + else if( subCommand == "discovery_reset" ) + { + player.resetDiscovery(); + player.queuePacket( boost::make_shared< InitUIPacket >( player ) ); + } + else if( subCommand == "classjob" ) + { + int32_t id; + + sscanf( params.c_str(), "%d", &id ); + + if( player.getLevelForClass( static_cast< Common::ClassJob > ( id ) ) == 0 ) + { + player.setLevelForClass( 1, static_cast< Common::ClassJob > ( id ) ); + player.setClassJob( static_cast< Common::ClassJob > ( id ) ); + } + else + player.setClassJob( static_cast< Common::ClassJob > ( id ) ); + } + else if( subCommand == "cfpenalty" ) + { + int32_t minutes; + sscanf( params.c_str(), "%d", &minutes ); + + player.setCFPenaltyMinutes( minutes ); + } + else if( subCommand == "eorzeatime" ) + { + uint64_t timestamp; + sscanf( params.c_str(), "%" SCNu64, ×tamp ); + + player.setEorzeaTimeOffset( timestamp ); + player.sendNotice( "Eorzea time offset: " + std::to_string( timestamp ) ); + } + else if( subCommand == "model" ) + { + uint32_t slot; + uint32_t val; + sscanf( params.c_str(), "%d %d", &slot, &val ); + + player.setModelForSlot( static_cast< Common::GearSetSlot >( slot ), val ); + player.sendModel(); + player.sendDebug( "Model updated" ); + } + else if( subCommand == "mount" ) + { + int32_t id; + sscanf( params.c_str(), "%d", &id ); + + player.dismount(); + player.mount( id ); + } + else if( subCommand == "msqguide" ) + { + int32_t id; + sscanf( params.c_str(), "%d", &id ); + + auto msqPacket = makeZonePacket< FFXIVIpcMSQTrackerProgress >( player.getId() ); + msqPacket->data().id = id; + player.queuePacket( msqPacket ); + + player.sendDebug( "MSQ Guide updated " ); + } + else if( subCommand == "msqdone" ) + { + int32_t id; + sscanf( params.c_str(), "%d", &id ); + + auto msqPacket = makeZonePacket< FFXIVIpcMSQTrackerComplete >( player.getId() ); + msqPacket->data().id = id; + player.queuePacket( msqPacket ); + + player.sendDebug( "MSQ Guide updated " ); + } + else if( subCommand == "weatheroverride" || subCommand == "wo" ) + { + uint32_t weatherId; + + sscanf( params.c_str(), "%d", &weatherId ); + + player.getCurrentZone()->setWeatherOverride( static_cast< Common::Weather >( weatherId ) ); + } + else if( subCommand == "festival" ) + { + uint16_t festivalId; + sscanf( params.c_str(), "%hu", &festivalId ); + + pTerriMgr->setCurrentFestival( festivalId ); + } + else if( subCommand == "festivaldisable" ) + { + pTerriMgr->disableCurrentFestival(); + } + else if( subCommand == "BitFlag" ) + { + uint16_t questId; + uint8_t questBit; + int8_t BitFlag; + sscanf( params.c_str(), "%hhu %hu %hhu", &BitFlag, &questId, &questBit ); + + if( !player.hasQuest( questId ) ) + { + player.sendDebug( "Player doesn't have the quest with ID: " + std::to_string( questId ) ); + return; + } + if( questBit == 0 || questId == 0 ) + { + player.sendDebug( "Params are not correct" ); + return; + } + + switch( BitFlag ) + { + case 8: { - player.sendDebug( " - " + cmd.first + " - " + cmd.second->getHelpText( ) ); + player.setQuestBitFlag8( questId, questBit, true ); + break; } - } -} - -void Core::DebugCommandHandler::set( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) -{ - auto pLog = g_fw.get< Logger >(); - auto pTerriMgr = g_fw.get< TerritoryMgr >(); - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - std::string subCommand = ""; - std::string params = ""; - - // check if the command has parameters - std::string tmpCommand = std::string( data + command->getName().length() + 1 ); - - std::size_t pos = tmpCommand.find_first_of( " " ); - - if( pos != std::string::npos ) - // command has parameters, grab the first part - subCommand = tmpCommand.substr( 0, pos ); - else - // no subcommand given - subCommand = tmpCommand; - - if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) - params = std::string( data + command->getName().length() + 1 + pos + 1 ); - - pLog->debug( "[" + std::to_string( player.getId() ) + "] " + - "subCommand " + subCommand + " params: " + params ); - - if( ( ( subCommand == "pos" ) || ( subCommand == "posr" ) ) && ( params != "" ) ) - { - int32_t posX; - int32_t posY; - int32_t posZ; - - sscanf( params.c_str(), "%d %d %d", &posX, &posY, &posZ ); - - if( ( posX == 0xcccccccc ) || ( posY == 0xcccccccc ) || ( posZ == 0xcccccccc ) ) + case 16: { - player.sendUrgent( "Syntaxerror." ); - return; + player.setQuestBitFlag16( questId, questBit, true ); + break; } - - if( subCommand == "pos" ) - player.setPos( static_cast< float >( posX ), - static_cast< float >( posY ), - static_cast< float >( posZ ) ); - else - player.setPos( player.getPos().x + static_cast< float >( posX ), - player.getPos().y + static_cast< float >( posY ), - player.getPos().z + static_cast< float >( posZ ) ); - - auto setActorPosPacket = makeZonePacket< FFXIVIpcActorSetPos >( player.getId() ); - setActorPosPacket->data().x = player.getPos().x; - setActorPosPacket->data().y = player.getPos().y; - setActorPosPacket->data().z = player.getPos().z; - player.queuePacket( setActorPosPacket ); - - } - else if( ( subCommand == "tele" ) && ( params != "" ) ) - { - int32_t aetheryteId; - sscanf( params.c_str(), "%i", &aetheryteId ); - - player.teleport( aetheryteId ); - } - else if( ( subCommand == "discovery" ) && ( params != "" ) ) - { - int32_t map_id; - int32_t discover_id; - sscanf( params.c_str(), "%i %i", &map_id, &discover_id ); - - auto discoveryPacket = makeZonePacket< FFXIVIpcDiscovery >( player.getId() ); - discoveryPacket->data().map_id = map_id; - discoveryPacket->data().map_part_id = discover_id; - player.queuePacket( discoveryPacket ); - } - - else if( ( subCommand == "discovery_pos" ) && ( params != "" ) ) - { - int32_t map_id; - int32_t discover_id; - int32_t pos_id; - sscanf( params.c_str(), "%i %i %i", &pos_id, &map_id, &discover_id ); - - std::string query2 = "UPDATE IGNORE `discoveryinfo` SET `discover_id` = '" + std::to_string( discover_id ) + - "' WHERE `discoveryinfo`.`id` = " + std::to_string( pos_id ) + ";"; - - std::string query1 = "INSERT IGNORE INTO `discoveryinfo` (`id`, `map_id`, `discover_id`) VALUES ('" + std::to_string( pos_id ) + - "', '" + std::to_string( map_id ) + - "', '" + std::to_string( discover_id ) + "')"; - - pDb->execute( query1 ); - pDb->execute( query2 ); - - } - - else if( subCommand == "discovery_reset" ) - { - player.resetDiscovery(); - player.queuePacket( boost::make_shared< InitUIPacket >( player ) ); - } - else if( subCommand == "classjob" ) - { - int32_t id; - - sscanf( params.c_str(), "%d", &id ); - - if( player.getLevelForClass( static_cast< Common::ClassJob > ( id ) ) == 0 ) - { - player.setLevelForClass( 1, static_cast< Common::ClassJob > ( id ) ); - player.setClassJob( static_cast< Common::ClassJob > ( id ) ); - } - else - player.setClassJob( static_cast< Common::ClassJob > ( id ) ); - } - else if ( subCommand == "cfpenalty" ) - { - int32_t minutes; - sscanf( params.c_str(), "%d", &minutes ); - - player.setCFPenaltyMinutes( minutes ); - } - else if ( subCommand == "eorzeatime" ) - { - uint64_t timestamp; - sscanf( params.c_str(), "%" SCNu64, ×tamp ); - - player.setEorzeaTimeOffset( timestamp ); - player.sendNotice( "Eorzea time offset: " + std::to_string( timestamp ) ); - } - else if ( subCommand == "model" ) - { - uint32_t slot; - uint32_t val; - sscanf( params.c_str(), "%d %d", &slot, &val ); - - player.setModelForSlot( static_cast< Common::GearSetSlot >( slot ), val ); - player.sendModel(); - player.sendDebug( "Model updated" ); - } - else if ( subCommand == "mount" ) - { - int32_t id; - sscanf( params.c_str(), "%d", &id ); - - player.dismount(); - player.mount( id ); - } - else if ( subCommand == "msqguide" ) - { - int32_t id; - sscanf( params.c_str(), "%d", &id ); - - auto msqPacket = makeZonePacket< FFXIVIpcMSQTrackerProgress >( player.getId() ); - msqPacket->data().id = id; - player.queuePacket( msqPacket ); - - player.sendDebug( "MSQ Guide updated " ); - } - else if ( subCommand == "msqdone") - { - int32_t id; - sscanf( params.c_str(), "%d", &id ); - - auto msqPacket = makeZonePacket< FFXIVIpcMSQTrackerComplete >( player.getId() ); - msqPacket->data().id = id; - player.queuePacket( msqPacket ); - - player.sendDebug( "MSQ Guide updated " ); - } - else if( subCommand == "weatheroverride" || subCommand == "wo" ) - { - uint32_t weatherId; - - sscanf( params.c_str(), "%d", &weatherId ); - - player.getCurrentZone()->setWeatherOverride( static_cast< Common::Weather >( weatherId ) ); - } - else if( subCommand == "festival" ) - { - uint16_t festivalId; - sscanf( params.c_str(), "%hu", &festivalId ); - - pTerriMgr->setCurrentFestival( festivalId ); - } - else if( subCommand == "festivaldisable" ) - { - pTerriMgr->disableCurrentFestival(); - } - else if ( subCommand == "BitFlag" ) - { - uint16_t questId; - uint8_t questBit; - int8_t BitFlag; - sscanf( params.c_str(), "%hhu %hu %hhu", &BitFlag, &questId, &questBit ); - - if( !player.hasQuest( questId ) ) + case 24: { - player.sendDebug( "Player doesn't have the quest with ID: " + std::to_string( questId ) ); - return; + player.setQuestBitFlag24( questId, questBit, true ); + break; } - if( questBit == 0 || questId == 0 ) + case 32: { - player.sendDebug( "Params are not correct" ); - return; + player.setQuestBitFlag32( questId, questBit, true ); + break; } - - switch ( BitFlag ) + case 40: { - case 8: - { - player.setQuestBitFlag8( questId, questBit, true ); - break; - } - case 16: - { - player.setQuestBitFlag16( questId, questBit, true ); - break; - } - case 24: - { - player.setQuestBitFlag24( questId, questBit, true ); - break; - } - case 32: - { - player.setQuestBitFlag32( questId, questBit, true ); - break; - } - case 40: - { - player.setQuestBitFlag40( questId, questBit, true ); - break; - } - case 48: - { - player.setQuestBitFlag48( questId, questBit, true ); - break; - } + player.setQuestBitFlag40( questId, questBit, true ); + break; } - } - else - { - player.sendUrgent( subCommand + " is not a valid SET command." ); - } - -} - -void Core::DebugCommandHandler::add( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) -{ - auto pLog = g_fw.get< Logger >(); - std::string subCommand; - std::string params = ""; - - // check if the command has parameters - std::string tmpCommand = std::string( data + command->getName().length() + 1 ); - - std::size_t pos = tmpCommand.find_first_of( " " ); - - if( pos != std::string::npos ) - // command has parameters, grab the first part - subCommand = tmpCommand.substr( 0, pos ); - else - // no subcommand given - subCommand = tmpCommand; - - if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) - params = std::string( data + command->getName().length() + 1 + pos + 1 ); - - pLog->debug( "[" + std::to_string( player.getId() ) + "] " + - "subCommand " + subCommand + " params: " + params ); - - - if( subCommand == "status" ) - { - int32_t id; - int32_t duration; - uint16_t param; - - sscanf( params.c_str(), "%d %d %hu", &id, &duration, ¶m ); - - auto effect = StatusEffect::make_StatusEffect( id, player.getAsPlayer(), player.getAsPlayer(), duration, 3000 ); - effect->setParam( param ); - - player.addStatusEffect( effect ); - } - else if( subCommand == "title" ) - { - uint32_t titleId; - sscanf( params.c_str(), "%u", &titleId ); - - player.addTitle( titleId ); - player.sendNotice( "Added title (ID: " + std::to_string( titleId ) + ")" ); - } - else if( subCommand == "op" ) - { - // temporary research packet - int32_t opcode; - sscanf( params.c_str(), "%x", &opcode ); - // TODO: fix for new setup - //auto pPe = Network::Packets::make_GamePacket( opcode, 0x30, player.getId(), player.getId() ); - //player.queuePacket( pPe ); - } - else if( subCommand == "actrl" ) - { - - // temporary research packet - - int32_t opcode; - int32_t param1; - int32_t param2; - int32_t param3; - int32_t param4; - int32_t param5; - int32_t param6; - int32_t playerId; - - sscanf( params.c_str(), "%x %x %x %x %x %x %x %x", &opcode, ¶m1, ¶m2, ¶m3, ¶m4, ¶m5, ¶m6, &playerId ); - - player.sendNotice( "Injecting ACTOR_CONTROL " + std::to_string( opcode ) ); - - auto actorControl = makeZonePacket< FFXIVIpcActorControl143 >( playerId, player.getId() ); - actorControl->data().category = opcode; - actorControl->data().param1 = param1; - actorControl->data().param2 = param2; - actorControl->data().param3 = param3; - actorControl->data().param4 = param4; - actorControl->data().param5 = param5; - actorControl->data().param6 = param6; - player.queuePacket( actorControl ); - - - /*sscanf(params.c_str(), "%x %x %x %x %x %x %x", &opcode, ¶m1, ¶m2, ¶m3, ¶m4, ¶m5, ¶m6, &playerId); - - Network::Packets::Server::ServerNoticePacket noticePacket( player, "Injecting ACTOR_CONTROL " + std::to_string( opcode ) ); - - player.queuePacket( noticePacket ); - - Network::Packets::Server::ActorControlPacket143 controlPacket( player, opcode, - param1, param2, param3, param4, param5, param6, playerId ); - player.queuePacket( controlPacket );*/ - - } - else if( subCommand == "unlock" ) - { - uint32_t id; - - sscanf( params.c_str(), "%d", &id ); - player.learnAction( id ); - } - else - { - player.sendUrgent( subCommand + " is not a valid ADD command." ); - } - - -} - -void Core::DebugCommandHandler::get( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) -{ - auto pLog = g_fw.get< Logger >(); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - std::string subCommand; - std::string params = ""; - - // check if the command has parameters - std::string tmpCommand = std::string( data + command->getName().length() + 1 ); - - std::size_t pos = tmpCommand.find_first_of( " " ); - - if( pos != std::string::npos ) - // command has parameters, grab the first part - subCommand = tmpCommand.substr( 0, pos ); - else - // no subcommand given - subCommand = tmpCommand; - - if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) - params = std::string( data + command->getName().length() + 1 + pos + 1 ); - - pLog->debug( "[" + std::to_string( player.getId() ) + "] " + - "subCommand " + subCommand + " params: " + params ); - - - if( ( subCommand == "pos" ) ) - { - - int16_t map_id = pExdData->get< Core::Data::TerritoryType >( player.getCurrentZone()->getTerritoryId() )->map; - - player.sendNotice( "Pos:\n" + - std::to_string( player.getPos().x ) + "\n" + - std::to_string( player.getPos().y ) + "\n" + - std::to_string( player.getPos().z ) + "\n" + - std::to_string( player.getRot() ) + "\nMapId: " + - std::to_string( map_id ) + "\nZoneID: " + - std::to_string(player.getCurrentZone()->getTerritoryId() ) + "\n" ); - } - else - { - player.sendUrgent( subCommand + " is not a valid GET command." ); - } - -} - -void Core::DebugCommandHandler::injectPacket( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) -{ - auto pServerZone = g_fw.get< ServerZone >(); - auto pSession = pServerZone->getSession( player.getId() ); - if( pSession ) - pSession->getZoneConnection()->injectPacket( data + 7, player ); -} - -void Core::DebugCommandHandler::injectChatPacket( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) -{ - auto pServerZone = g_fw.get< ServerZone >(); - auto pSession = pServerZone->getSession( player.getId() ); - if( pSession ) - pSession->getChatConnection()->injectPacket( data + 8, player ); -} - -void Core::DebugCommandHandler::replay( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) -{ - auto pLog = g_fw.get< Logger >(); - auto pServerZone = g_fw.get< ServerZone >(); - std::string subCommand; - std::string params = ""; - - // check if the command has parameters - std::string tmpCommand = std::string( data + command->getName().length() + 1 ); - - std::size_t pos = tmpCommand.find_first_of( " " ); - - if( pos != std::string::npos ) - // command has parameters, grab the first part - subCommand = tmpCommand.substr( 0, pos ); - else - // no subcommand given - subCommand = tmpCommand; - - if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) - params = std::string( data + command->getName().length() + 1 + pos + 1 ); - - pLog->debug( "[" + std::to_string( player.getId() ) + "] " + - "subCommand " + subCommand + " params: " + params ); - - - if( subCommand == "start" ) - { - auto pSession = pServerZone->getSession( player.getId() ); - if( pSession ) - pSession->startReplay( params ); - } - else if( subCommand == "stop" ) - { - auto pSession = pServerZone->getSession( player.getId() ); - if( pSession ) - pSession->stopReplay(); - } - else if( subCommand == "info" ) - { - auto pSession = pServerZone->getSession( player.getId() ); - if( pSession ) - pSession->sendReplayInfo(); - } - else - { - player.sendUrgent( subCommand + " is not a valid replay command." ); - } - - -} - -void Core::DebugCommandHandler::nudge( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) -{ - std::string subCommand; - - // check if the command has parameters - std::string tmpCommand = std::string( data + command->getName().length() + 1 ); - - std::size_t spos = tmpCommand.find_first_of( " " ); - - auto& pos = player.getPos(); - - int32_t offset = 0; - char direction[20]; - memset( direction, 0, 20 ); - - sscanf( tmpCommand.c_str(), "%d %s", &offset, direction ); - - if( direction[0] == 'u' || direction[0] == '+' ) - { - pos.y += offset; - player.sendNotice( "nudge: Placing up " + std::to_string( offset ) + " yalms" ); - } - else if( direction[0] == 'd' || direction[0] == '-' ) - { - pos.y -= offset; - player.sendNotice( "nudge: Placing down " + std::to_string( offset ) + " yalms" ); - - } - else - { - float angle = player.getRot() + ( PI / 2 ); - pos.x -= offset * cos( angle ); - pos.z += offset * sin( angle ); - player.sendNotice( "nudge: Placing forward " + std::to_string( offset ) + " yalms" ); - } - if( offset != 0 ) - { - auto setActorPosPacket = makeZonePacket< FFXIVIpcActorSetPos >( player.getId() ); - setActorPosPacket->data().x = player.getPos().x; - setActorPosPacket->data().y = player.getPos().y; - setActorPosPacket->data().z = player.getPos().z; - setActorPosPacket->data().r16 = Math::Util::floatToUInt16Rot( player.getRot() ); - player.queuePacket( setActorPosPacket ); - } -} - -void Core::DebugCommandHandler::serverInfo( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) -{ - auto pServerZone = g_fw.get< ServerZone >(); - player.sendDebug( "SapphireZone " + Version::VERSION + "\nRev: " + Version::GIT_HASH ); - player.sendDebug( "Compiled: " __DATE__ " " __TIME__ ); - player.sendDebug( "Sessions: " + std::to_string( pServerZone->getSessionCount() ) ); -} - -void Core::DebugCommandHandler::script( char* data, Entity::Player &player, boost::shared_ptr< DebugCommand > command ) -{ - auto pLog = g_fw.get< Logger >(); - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - std::string subCommand; - std::string params = ""; - - // check if the command has parameters - std::string tmpCommand = std::string( data + command->getName().length() + 1 ); - - std::size_t pos = tmpCommand.find_first_of( " " ); - - if( pos != std::string::npos ) - // command has parameters, grab the first part - subCommand = tmpCommand.substr( 0, pos ); - else - // no subcommand given - subCommand = tmpCommand; - - // todo: fix params so it's empty if there's no params - if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) - params = std::string( data + command->getName().length() + 1 + pos + 1 ); - - pLog->debug( "[" + std::to_string( player.getId() ) + "] " + - "subCommand " + subCommand + " params: " + params ); - - if( subCommand == "unload" ) - { - if ( subCommand == params ) - player.sendDebug( "Command failed: requires name of script" ); - else - if( pScriptMgr->getNativeScriptHandler().unloadScript( params ) ) - player.sendDebug( "Unloaded script successfully." ); - else - player.sendDebug( "Failed to unload script: " + params ); - } - else if( subCommand == "find" || subCommand == "f" ) - { - if( subCommand == params ) - player.sendDebug( "Because reasons of filling chat with nonsense, please enter a search term" ); - else + case 48: { - std::set< Core::Scripting::ScriptInfo* > scripts; - pScriptMgr->getNativeScriptHandler().findScripts( scripts, params ); - - if( !scripts.empty() ) - { - player.sendDebug( "Found " + std::to_string( scripts.size() ) + " scripts" ); - - for( auto it = scripts.begin(); it != scripts.end(); ++it ) - { - auto script = *it; - player.sendDebug( " - '" + script->library_name + "' loaded at @ 0x" + - boost::str( boost::format( "%|X|" ) % script->handle ) + - ", num scripts: " + std::to_string( script->scripts.size() ) ); - } - } - else - player.sendDebug( "No scripts found with search term: " + params ); - } - } - else if( subCommand == "load" || subCommand == "l" ) - { - if( subCommand == params ) - player.sendDebug( "Command failed: requires relative path to script" ); - else - { - if ( pScriptMgr->getNativeScriptHandler().loadScript( params ) ) - player.sendDebug( "Loaded '" + params + "' successfully" ); - else - player.sendDebug( "Failed to load '" + params + "'" ); + player.setQuestBitFlag48( questId, questBit, true ); + break; } + } + } + else + { + player.sendUrgent( subCommand + " is not a valid SET command." ); + } - } - else if( subCommand == "queuereload" || subCommand == "qrl" ) - { - if( subCommand == params ) - player.sendDebug( "Command failed: requires name of script to reload" ); - else - { - pScriptMgr->getNativeScriptHandler().queueScriptReload( params ); - player.sendDebug( "Queued script reload for script: " + params ); - } - } - else - { - player.sendDebug( "Unknown script subcommand: " + subCommand ); - } } -void Core::DebugCommandHandler::instance( char* data, Entity::Player &player, boost::shared_ptr< DebugCommand > command ) +void Core::DebugCommandHandler::add( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) { - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - std::string cmd( data ), params, subCommand; - auto cmdPos = cmd.find_first_of( ' ' ); + auto pLog = g_fw.get< Logger >(); + std::string subCommand; + std::string params = ""; - if( cmdPos != std::string::npos ) - { - params = cmd.substr( cmdPos + 1 ); + // check if the command has parameters + std::string tmpCommand = std::string( data + command->getName().length() + 1 ); - auto p = params.find_first_of( ' ' ); + std::size_t pos = tmpCommand.find_first_of( " " ); - if( p != std::string::npos ) + if( pos != std::string::npos ) + // command has parameters, grab the first part + subCommand = tmpCommand.substr( 0, pos ); + else + // no subcommand given + subCommand = tmpCommand; + + if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) + params = std::string( data + command->getName().length() + 1 + pos + 1 ); + + pLog->debug( "[" + std::to_string( player.getId() ) + "] " + + "subCommand " + subCommand + " params: " + params ); + + + if( subCommand == "status" ) + { + int32_t id; + int32_t duration; + uint16_t param; + + sscanf( params.c_str(), "%d %d %hu", &id, &duration, ¶m ); + + auto effect = StatusEffect::make_StatusEffect( id, player.getAsPlayer(), player.getAsPlayer(), duration, 3000 ); + effect->setParam( param ); + + player.addStatusEffect( effect ); + } + else if( subCommand == "title" ) + { + uint32_t titleId; + sscanf( params.c_str(), "%u", &titleId ); + + player.addTitle( titleId ); + player.sendNotice( "Added title (ID: " + std::to_string( titleId ) + ")" ); + } + else if( subCommand == "op" ) + { + // temporary research packet + int32_t opcode; + sscanf( params.c_str(), "%x", &opcode ); + // TODO: fix for new setup + //auto pPe = Network::Packets::make_GamePacket( opcode, 0x30, player.getId(), player.getId() ); + //player.queuePacket( pPe ); + } + else if( subCommand == "actrl" ) + { + + // temporary research packet + + int32_t opcode; + int32_t param1; + int32_t param2; + int32_t param3; + int32_t param4; + int32_t param5; + int32_t param6; + int32_t playerId; + + sscanf( params.c_str(), "%x %x %x %x %x %x %x %x", &opcode, ¶m1, ¶m2, ¶m3, ¶m4, ¶m5, ¶m6, + &playerId ); + + player.sendNotice( "Injecting ACTOR_CONTROL " + std::to_string( opcode ) ); + + auto actorControl = makeZonePacket< FFXIVIpcActorControl143 >( playerId, player.getId() ); + actorControl->data().category = opcode; + actorControl->data().param1 = param1; + actorControl->data().param2 = param2; + actorControl->data().param3 = param3; + actorControl->data().param4 = param4; + actorControl->data().param5 = param5; + actorControl->data().param6 = param6; + player.queuePacket( actorControl ); + + + /*sscanf(params.c_str(), "%x %x %x %x %x %x %x", &opcode, ¶m1, ¶m2, ¶m3, ¶m4, ¶m5, ¶m6, &playerId); + + Network::Packets::Server::ServerNoticePacket noticePacket( player, "Injecting ACTOR_CONTROL " + std::to_string( opcode ) ); + + player.queuePacket( noticePacket ); + + Network::Packets::Server::ActorControlPacket143 controlPacket( player, opcode, + param1, param2, param3, param4, param5, param6, playerId ); + player.queuePacket( controlPacket );*/ + + } + else if( subCommand == "unlock" ) + { + uint32_t id; + + sscanf( params.c_str(), "%d", &id ); + player.learnAction( id ); + } + else + { + player.sendUrgent( subCommand + " is not a valid ADD command." ); + } + + +} + +void Core::DebugCommandHandler::get( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +{ + auto pLog = g_fw.get< Logger >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + std::string subCommand; + std::string params = ""; + + // check if the command has parameters + std::string tmpCommand = std::string( data + command->getName().length() + 1 ); + + std::size_t pos = tmpCommand.find_first_of( " " ); + + if( pos != std::string::npos ) + // command has parameters, grab the first part + subCommand = tmpCommand.substr( 0, pos ); + else + // no subcommand given + subCommand = tmpCommand; + + if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) + params = std::string( data + command->getName().length() + 1 + pos + 1 ); + + pLog->debug( "[" + std::to_string( player.getId() ) + "] " + + "subCommand " + subCommand + " params: " + params ); + + + if( ( subCommand == "pos" ) ) + { + + int16_t map_id = pExdData->get< Core::Data::TerritoryType >( player.getCurrentZone()->getTerritoryId() )->map; + + player.sendNotice( "Pos:\n" + + std::to_string( player.getPos().x ) + "\n" + + std::to_string( player.getPos().y ) + "\n" + + std::to_string( player.getPos().z ) + "\n" + + std::to_string( player.getRot() ) + "\nMapId: " + + std::to_string( map_id ) + "\nZoneID: " + + std::to_string( player.getCurrentZone()->getTerritoryId() ) + "\n" ); + } + else + { + player.sendUrgent( subCommand + " is not a valid GET command." ); + } + +} + +void +Core::DebugCommandHandler::injectPacket( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +{ + auto pServerZone = g_fw.get< ServerZone >(); + auto pSession = pServerZone->getSession( player.getId() ); + if( pSession ) + pSession->getZoneConnection()->injectPacket( data + 7, player ); +} + +void Core::DebugCommandHandler::injectChatPacket( char* data, Entity::Player& player, + boost::shared_ptr< DebugCommand > command ) +{ + auto pServerZone = g_fw.get< ServerZone >(); + auto pSession = pServerZone->getSession( player.getId() ); + if( pSession ) + pSession->getChatConnection()->injectPacket( data + 8, player ); +} + +void Core::DebugCommandHandler::replay( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +{ + auto pLog = g_fw.get< Logger >(); + auto pServerZone = g_fw.get< ServerZone >(); + std::string subCommand; + std::string params = ""; + + // check if the command has parameters + std::string tmpCommand = std::string( data + command->getName().length() + 1 ); + + std::size_t pos = tmpCommand.find_first_of( " " ); + + if( pos != std::string::npos ) + // command has parameters, grab the first part + subCommand = tmpCommand.substr( 0, pos ); + else + // no subcommand given + subCommand = tmpCommand; + + if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) + params = std::string( data + command->getName().length() + 1 + pos + 1 ); + + pLog->debug( "[" + std::to_string( player.getId() ) + "] " + + "subCommand " + subCommand + " params: " + params ); + + + if( subCommand == "start" ) + { + auto pSession = pServerZone->getSession( player.getId() ); + if( pSession ) + pSession->startReplay( params ); + } + else if( subCommand == "stop" ) + { + auto pSession = pServerZone->getSession( player.getId() ); + if( pSession ) + pSession->stopReplay(); + } + else if( subCommand == "info" ) + { + auto pSession = pServerZone->getSession( player.getId() ); + if( pSession ) + pSession->sendReplayInfo(); + } + else + { + player.sendUrgent( subCommand + " is not a valid replay command." ); + } + + +} + +void Core::DebugCommandHandler::nudge( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +{ + std::string subCommand; + + // check if the command has parameters + std::string tmpCommand = std::string( data + command->getName().length() + 1 ); + + std::size_t spos = tmpCommand.find_first_of( " " ); + + auto& pos = player.getPos(); + + int32_t offset = 0; + char direction[20]; + memset( direction, 0, 20 ); + + sscanf( tmpCommand.c_str(), "%d %s", &offset, direction ); + + if( direction[ 0 ] == 'u' || direction[ 0 ] == '+' ) + { + pos.y += offset; + player.sendNotice( "nudge: Placing up " + std::to_string( offset ) + " yalms" ); + } + else if( direction[ 0 ] == 'd' || direction[ 0 ] == '-' ) + { + pos.y -= offset; + player.sendNotice( "nudge: Placing down " + std::to_string( offset ) + " yalms" ); + + } + else + { + float angle = player.getRot() + ( PI / 2 ); + pos.x -= offset * cos( angle ); + pos.z += offset * sin( angle ); + player.sendNotice( "nudge: Placing forward " + std::to_string( offset ) + " yalms" ); + } + if( offset != 0 ) + { + auto setActorPosPacket = makeZonePacket< FFXIVIpcActorSetPos >( player.getId() ); + setActorPosPacket->data().x = player.getPos().x; + setActorPosPacket->data().y = player.getPos().y; + setActorPosPacket->data().z = player.getPos().z; + setActorPosPacket->data().r16 = Math::Util::floatToUInt16Rot( player.getRot() ); + player.queuePacket( setActorPosPacket ); + } +} + +void +Core::DebugCommandHandler::serverInfo( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +{ + auto pServerZone = g_fw.get< ServerZone >(); + player.sendDebug( "SapphireZone " + Version::VERSION + "\nRev: " + Version::GIT_HASH ); + player.sendDebug( "Compiled: " __DATE__ " " __TIME__ ); + player.sendDebug( "Sessions: " + std::to_string( pServerZone->getSessionCount() ) ); +} + +void Core::DebugCommandHandler::script( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +{ + auto pLog = g_fw.get< Logger >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + std::string subCommand; + std::string params = ""; + + // check if the command has parameters + std::string tmpCommand = std::string( data + command->getName().length() + 1 ); + + std::size_t pos = tmpCommand.find_first_of( " " ); + + if( pos != std::string::npos ) + // command has parameters, grab the first part + subCommand = tmpCommand.substr( 0, pos ); + else + // no subcommand given + subCommand = tmpCommand; + + // todo: fix params so it's empty if there's no params + if( command->getName().length() + 1 + pos + 1 < strlen( data ) ) + params = std::string( data + command->getName().length() + 1 + pos + 1 ); + + pLog->debug( "[" + std::to_string( player.getId() ) + "] " + + "subCommand " + subCommand + " params: " + params ); + + if( subCommand == "unload" ) + { + if( subCommand == params ) + player.sendDebug( "Command failed: requires name of script" ); + else if( pScriptMgr->getNativeScriptHandler().unloadScript( params ) ) + player.sendDebug( "Unloaded script successfully." ); + else + player.sendDebug( "Failed to unload script: " + params ); + } + else if( subCommand == "find" || subCommand == "f" ) + { + if( subCommand == params ) + player.sendDebug( "Because reasons of filling chat with nonsense, please enter a search term" ); + else + { + std::set< Core::Scripting::ScriptInfo* > scripts; + pScriptMgr->getNativeScriptHandler().findScripts( scripts, params ); + + if( !scripts.empty() ) { - subCommand = params.substr( 0, p ); - params = params.substr( subCommand.length() + 1 ); + player.sendDebug( "Found " + std::to_string( scripts.size() ) + " scripts" ); + + for( auto it = scripts.begin(); it != scripts.end(); ++it ) + { + auto script = *it; + player.sendDebug( " - '" + script->library_name + "' loaded at @ 0x" + + boost::str( boost::format( "%|X|" ) % script->handle ) + + ", num scripts: " + std::to_string( script->scripts.size() ) ); + } } else - subCommand = params; - } - - if( subCommand == "create" || subCommand == "cr" ) - { - uint32_t instanceContentId; - sscanf( params.c_str(), "%d", &instanceContentId ); - - auto instance = pTeriMgr->createInstanceContent( instanceContentId ); - if( instance ) - player.sendDebug( "Created instance with id: " + std::to_string( instance->getGuId() ) + " -> " + instance->getName() ); + player.sendDebug( "No scripts found with search term: " + params ); + } + } + else if( subCommand == "load" || subCommand == "l" ) + { + if( subCommand == params ) + player.sendDebug( "Command failed: requires relative path to script" ); + else + { + if( pScriptMgr->getNativeScriptHandler().loadScript( params ) ) + player.sendDebug( "Loaded '" + params + "' successfully" ); else - player.sendDebug( "Failed to create instance with id: " + std::to_string( instanceContentId ) ); - } - else if( subCommand == "bind" ) - { - uint32_t instanceId; - sscanf( params.c_str(), "%d", &instanceId ); + player.sendDebug( "Failed to load '" + params + "'" ); + } - auto instance = pTeriMgr->getInstanceZonePtr( instanceId ); - if( instance ) - { - auto pInstanceContent = instance->getAsInstanceContent(); - pInstanceContent->bindPlayer( player.getId() ); - player.sendDebug( - "Now bound to instance with id: " + std::to_string( pInstanceContent->getGuId() ) + - " -> " + pInstanceContent->getName() ); - } - else - player.sendDebug( "Unknown instance with id: " + std::to_string( instanceId ) ); - } - else if( subCommand == "unbind" ) - { - uint32_t instanceId; - sscanf( params.c_str(), "%d", &instanceId ); + } + else if( subCommand == "queuereload" || subCommand == "qrl" ) + { + if( subCommand == params ) + player.sendDebug( "Command failed: requires name of script to reload" ); + else + { + pScriptMgr->getNativeScriptHandler().queueScriptReload( params ); + player.sendDebug( "Queued script reload for script: " + params ); + } + } + else + { + player.sendDebug( "Unknown script subcommand: " + subCommand ); + } +} - auto instance = pTeriMgr->getInstanceZonePtr( instanceId ); - if( !instance ) - { - player.sendDebug( "Unknown instance with id: " + std::to_string( instanceId ) ); - return; - } +void +Core::DebugCommandHandler::instance( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ) +{ + auto pTeriMgr = g_fw.get< TerritoryMgr >(); + std::string cmd( data ), params, subCommand; + auto cmdPos = cmd.find_first_of( ' ' ); + if( cmdPos != std::string::npos ) + { + params = cmd.substr( cmdPos + 1 ); + + auto p = params.find_first_of( ' ' ); + + if( p != std::string::npos ) + { + subCommand = params.substr( 0, p ); + params = params.substr( subCommand.length() + 1 ); + } + else + subCommand = params; + } + + if( subCommand == "create" || subCommand == "cr" ) + { + uint32_t instanceContentId; + sscanf( params.c_str(), "%d", &instanceContentId ); + + auto instance = pTeriMgr->createInstanceContent( instanceContentId ); + if( instance ) + player.sendDebug( + "Created instance with id: " + std::to_string( instance->getGuId() ) + " -> " + instance->getName() ); + else + player.sendDebug( "Failed to create instance with id: " + std::to_string( instanceContentId ) ); + } + else if( subCommand == "bind" ) + { + uint32_t instanceId; + sscanf( params.c_str(), "%d", &instanceId ); + + auto instance = pTeriMgr->getInstanceZonePtr( instanceId ); + if( instance ) + { auto pInstanceContent = instance->getAsInstanceContent(); - if( pInstanceContent->isPlayerBound( player.getId() ) ) - { - pInstanceContent->unbindPlayer( player.getId() ); - player.sendDebug( - "Now unbound from instance with id: " + std::to_string( pInstanceContent->getGuId() ) + - " -> " + pInstanceContent->getName() ); - } - else - player.sendDebug( "Player not bound to instance with id: " + std::to_string( instanceId ) ); + pInstanceContent->bindPlayer( player.getId() ); + player.sendDebug( + "Now bound to instance with id: " + std::to_string( pInstanceContent->getGuId() ) + + " -> " + pInstanceContent->getName() ); + } + else + player.sendDebug( "Unknown instance with id: " + std::to_string( instanceId ) ); + } + else if( subCommand == "unbind" ) + { + uint32_t instanceId; + sscanf( params.c_str(), "%d", &instanceId ); - } - else if( subCommand == "createzone" || subCommand == "crz" ) - { - uint32_t zoneId; - sscanf( params.c_str(), "%d", &zoneId ); + auto instance = pTeriMgr->getInstanceZonePtr( instanceId ); + if( !instance ) + { + player.sendDebug( "Unknown instance with id: " + std::to_string( instanceId ) ); + return; + } - auto instance = pTeriMgr->createTerritoryInstance( zoneId ); - if( instance ) - player.sendDebug( "Created instance with id: " + std::to_string( instance->getGuId() ) + " -> " + instance->getName() ); - else - player.sendDebug( "Failed to create instance with id: " + std::to_string( zoneId ) ); - } - else if( subCommand == "remove" || subCommand == "rm" ) - { - uint32_t terriId; - sscanf( params.c_str(), "%d", &terriId ); + auto pInstanceContent = instance->getAsInstanceContent(); + if( pInstanceContent->isPlayerBound( player.getId() ) ) + { + pInstanceContent->unbindPlayer( player.getId() ); + player.sendDebug( + "Now unbound from instance with id: " + std::to_string( pInstanceContent->getGuId() ) + + " -> " + pInstanceContent->getName() ); + } + else + player.sendDebug( "Player not bound to instance with id: " + std::to_string( instanceId ) ); - if( pTeriMgr->removeTerritoryInstance( terriId ) ) - player.sendDebug( "Removed instance with id: " + std::to_string( terriId ) ); - else - player.sendDebug( "Failed to remove instance with id: " + std::to_string( terriId ) ); - } - else if( subCommand == "return" || subCommand == "ret" ) - { - player.exitInstance(); - } - else if( subCommand == "set" ) - { - uint32_t index; - uint32_t value; - sscanf( params.c_str(), "%d %d", &index, &value ); + } + else if( subCommand == "createzone" || subCommand == "crz" ) + { + uint32_t zoneId; + sscanf( params.c_str(), "%d", &zoneId ); + + auto instance = pTeriMgr->createTerritoryInstance( zoneId ); + if( instance ) + player.sendDebug( + "Created instance with id: " + std::to_string( instance->getGuId() ) + " -> " + instance->getName() ); + else + player.sendDebug( "Failed to create instance with id: " + std::to_string( zoneId ) ); + } + else if( subCommand == "remove" || subCommand == "rm" ) + { + uint32_t terriId; + sscanf( params.c_str(), "%d", &terriId ); + + if( pTeriMgr->removeTerritoryInstance( terriId ) ) + player.sendDebug( "Removed instance with id: " + std::to_string( terriId ) ); + else + player.sendDebug( "Failed to remove instance with id: " + std::to_string( terriId ) ); + } + else if( subCommand == "return" || subCommand == "ret" ) + { + player.exitInstance(); + } + else if( subCommand == "set" ) + { + uint32_t index; + uint32_t value; + sscanf( params.c_str(), "%d %d", &index, &value ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); - if( !instance ) - return; + auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + if( !instance ) + return; - instance->setVar( static_cast< uint8_t >( index ), static_cast< uint8_t >( value ) ); - } - else if( subCommand == "objstate" ) - { - char objName[128]; - uint8_t state; + instance->setVar( static_cast< uint8_t >( index ), static_cast< uint8_t >( value ) ); + } + else if( subCommand == "objstate" ) + { + char objName[128]; + uint8_t state; - sscanf( params.c_str(), "%s %hhu", objName, &state ); + sscanf( params.c_str(), "%s %hhu", objName, &state ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); - if( !instance ) - return; + auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + if( !instance ) + return; - auto obj = instance->getEObjByName( objName ); - if( !obj ) - return; + auto obj = instance->getEObjByName( objName ); + if( !obj ) + return; - obj->setState( state ); - } - else if ( subCommand == "objflag" ) - { - char objName[256]; - uint32_t state1; - uint32_t state2; + obj->setState( state ); + } + else if( subCommand == "objflag" ) + { + char objName[256]; + uint32_t state1; + uint32_t state2; - sscanf( params.c_str(), "%s %i %i", objName, &state1, &state2 ); + sscanf( params.c_str(), "%s %i %i", objName, &state1, &state2 ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); - if( !instance ) - return; + auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + if( !instance ) + return; - auto obj = instance->getEObjByName( objName ); - if( !obj ) { - player.sendDebug( "No eobj found." ); - return; - } + auto obj = instance->getEObjByName( objName ); + if( !obj ) + { + player.sendDebug( "No eobj found." ); + return; + } - obj->setAnimationFlag( state1, state2 ); - } - else if( subCommand == "seq" ) - { - uint8_t seq; + obj->setAnimationFlag( state1, state2 ); + } + else if( subCommand == "seq" ) + { + uint8_t seq; - sscanf( params.c_str(), "%hhu", &seq ); + sscanf( params.c_str(), "%hhu", &seq ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); - if( !instance ) - return; + auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + if( !instance ) + return; - instance->setSequence( seq ); - } - else if( subCommand == "branch" ) - { - uint8_t branch; + instance->setSequence( seq ); + } + else if( subCommand == "branch" ) + { + uint8_t branch; - sscanf( params.c_str(), "%hhu", &branch ); + sscanf( params.c_str(), "%hhu", &branch ); - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); - if( !instance ) - return; + auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + if( !instance ) + return; - instance->setBranch( branch ); - } - else if ( subCommand == "qte_start" ) - { - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); - if ( !instance ) - return; + instance->setBranch( branch ); + } + else if( subCommand == "qte_start" ) + { + auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + if( !instance ) + return; - player.sendDebug( "qte start" ); - instance->startQte(); - } - else if ( subCommand == "event_start" ) - { - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); - if ( !instance ) - return; + player.sendDebug( "qte start" ); + instance->startQte(); + } + else if( subCommand == "event_start" ) + { + auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + if( !instance ) + return; - player.sendDebug( "evt start" ); - instance->startEventCutscene(); - } - else if ( subCommand == "event_end" ) - { - auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); - if ( !instance ) - return; + player.sendDebug( "evt start" ); + instance->startEventCutscene(); + } + else if( subCommand == "event_end" ) + { + auto instance = boost::dynamic_pointer_cast< InstanceContent >( player.getCurrentZone() ); + if( !instance ) + return; - player.sendDebug( "evt end" ); - instance->endEventCutscene(); - } - else if( subCommand == "bgm" ) - { - uint16_t bgmId; - sscanf( params.c_str(), "%hd", &bgmId ); + player.sendDebug( "evt end" ); + instance->endEventCutscene(); + } + else if( subCommand == "bgm" ) + { + uint16_t bgmId; + sscanf( params.c_str(), "%hd", &bgmId ); - if( auto instance = player.getCurrentInstance() ) - instance->setCurrentBGM( bgmId ); - } - else - { - player.sendDebug( "Unknown sub command." ); - } + if( auto instance = player.getCurrentInstance() ) + instance->setCurrentBGM( bgmId ); + } + else + { + player.sendDebug( "Unknown sub command." ); + } } diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.h b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.h index 69e192b7..fdd31db1 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.h +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.h @@ -14,39 +14,46 @@ namespace Core { class DebugCommandHandler { private: - // container mapping command string to command object - std::map< std::string, boost::shared_ptr< DebugCommand > > m_commandMap; + // container mapping command string to command object + std::map< std::string, boost::shared_ptr< DebugCommand > > m_commandMap; public: - DebugCommandHandler(); - ~DebugCommandHandler(); + DebugCommandHandler(); - // register command to command map - void registerCommand( const std::string& n, DebugCommand::pFunc, const std::string& hText, uint8_t uLevel ); + ~DebugCommandHandler(); - // execute command if registered - void execCommand( char * data, Entity::Player& player ); + // register command to command map + void registerCommand( const std::string& n, DebugCommand::pFunc, const std::string& hText, uint8_t uLevel ); - // help command - void help( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + // execute command if registered + void execCommand( char* data, Entity::Player& player ); - // command handler callbacks - void set( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void get( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void add( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - //void debug( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + // help command + void help( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void injectPacket( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void injectChatPacket( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void replay( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void nudge( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void serverInfo( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + // command handler callbacks + void set( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void unlockCharacter( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void get( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void instance( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void add( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + //void debug( char * data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); - void script( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + void injectPacket( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + + void injectChatPacket( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + + void replay( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + + void nudge( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + + void serverInfo( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + + void unlockCharacter( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + + void instance( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); + + void script( char* data, Entity::Player& player, boost::shared_ptr< DebugCommand > command ); }; diff --git a/src/servers/sapphire_zone/Event/Director.cpp b/src/servers/sapphire_zone/Event/Director.cpp index 3237c114..b84fc478 100644 --- a/src/servers/sapphire_zone/Event/Director.cpp +++ b/src/servers/sapphire_zone/Event/Director.cpp @@ -16,167 +16,167 @@ using namespace Core::Network::Packets::Server; using namespace Core::Network::ActorControl; Core::Event::Director::Director( Core::Event::Director::DirectorType type, uint16_t contentId ) : - m_contentId( contentId ), - m_type( type ), - m_directorId( ( static_cast< uint32_t >( type ) << 16 ) | contentId ), - m_sequence( 1 ), - m_branch( 0 ), - m_elapsedTime( 0 ) + m_contentId( contentId ), + m_type( type ), + m_directorId( ( static_cast< uint32_t >( type ) << 16 ) | contentId ), + m_sequence( 1 ), + m_branch( 0 ), + m_elapsedTime( 0 ) { - memset( m_unionData.arrData, 0, sizeof( m_unionData ) ); + memset( m_unionData.arrData, 0, sizeof( m_unionData ) ); } uint32_t Core::Event::Director::getDirectorId() const { - return m_directorId; + return m_directorId; } uint16_t Core::Event::Director::getContentId() const { - return m_contentId; + return m_contentId; } uint8_t Core::Event::Director::getSequence() const { - return m_sequence; + return m_sequence; } void Core::Event::Director::sendDirectorClear( Core::Entity::Player& player ) const { - player.queuePacket( makeActorControl143( player.getId(), DirectorClear, m_directorId ) ); + player.queuePacket( makeActorControl143( player.getId(), DirectorClear, m_directorId ) ); } void Core::Event::Director::sendDirectorVars( Core::Entity::Player& player ) const { - auto varPacket = makeZonePacket< FFXIVIpcDirectorVars >( player.getId() ); - varPacket->data().m_directorId = getDirectorId(); - varPacket->data().m_sequence = getSequence(); - varPacket->data().m_branch = 0; - memcpy( varPacket->data().m_unionData, m_unionData.arrData, sizeof( varPacket->data().m_unionData ) ); - player.queuePacket( varPacket ); + auto varPacket = makeZonePacket< FFXIVIpcDirectorVars >( player.getId() ); + varPacket->data().m_directorId = getDirectorId(); + varPacket->data().m_sequence = getSequence(); + varPacket->data().m_branch = 0; + memcpy( varPacket->data().m_unionData, m_unionData.arrData, sizeof( varPacket->data().m_unionData ) ); + player.queuePacket( varPacket ); } void Core::Event::Director::sendDirectorInit( Core::Entity::Player& player ) const { - player.queuePacket( makeActorControl143( player.getId(), DirectorInit, m_directorId, m_contentId ) ); + player.queuePacket( makeActorControl143( player.getId(), DirectorInit, m_directorId, m_contentId ) ); } Core::Event::Director::DirectorType Core::Event::Director::getType() const { - return m_type; + return m_type; } uint8_t Core::Event::Director::getBranch() const { - return m_branch; + return m_branch; } void Core::Event::Director::setDirectorUI8AL( uint8_t value ) { - m_unionData.ui8lh.UI8AL = value; + m_unionData.ui8lh.UI8AL = value; } void Core::Event::Director::setDirectorUI8AH( uint8_t value ) { - m_unionData.ui8lh.UI8AH = value; + m_unionData.ui8lh.UI8AH = value; } void Core::Event::Director::setDirectorUI8BL( uint8_t value ) { - m_unionData.ui8lh.UI8BL = value; + m_unionData.ui8lh.UI8BL = value; } void Core::Event::Director::setDirectorUI8BH( uint8_t value ) { - m_unionData.ui8lh.UI8BH = value; + m_unionData.ui8lh.UI8BH = value; } void Core::Event::Director::setDirectorUI8CL( uint8_t value ) { - m_unionData.ui8lh.UI8CL = value; + m_unionData.ui8lh.UI8CL = value; } void Core::Event::Director::setDirectorUI8CH( uint8_t value ) { - m_unionData.ui8lh.UI8CH = value; + m_unionData.ui8lh.UI8CH = value; } void Core::Event::Director::setDirectorUI8DL( uint8_t value ) { - m_unionData.ui8lh.UI8DL = value; + m_unionData.ui8lh.UI8DL = value; } void Core::Event::Director::setDirectorUI8DH( uint8_t value ) { - m_unionData.ui8lh.UI8DH = value; + m_unionData.ui8lh.UI8DH = value; } void Core::Event::Director::setDirectorUI8EL( uint8_t value ) { - m_unionData.ui8lh.UI8EL = value; + m_unionData.ui8lh.UI8EL = value; } void Core::Event::Director::setDirectorUI8EH( uint8_t value ) { - m_unionData.ui8lh.UI8EH = value; + m_unionData.ui8lh.UI8EH = value; } void Core::Event::Director::setDirectorUI8FL( uint8_t value ) { - m_unionData.ui8lh.UI8FL = value; + m_unionData.ui8lh.UI8FL = value; } void Core::Event::Director::setDirectorUI8FH( uint8_t value ) { - m_unionData.ui8lh.UI8FH = value; + m_unionData.ui8lh.UI8FH = value; } void Core::Event::Director::setDirectorUI8GL( uint8_t value ) { - m_unionData.ui8lh.UI8GL = value; + m_unionData.ui8lh.UI8GL = value; } void Core::Event::Director::setDirectorUI8GH( uint8_t value ) { - m_unionData.ui8lh.UI8GH = value; + m_unionData.ui8lh.UI8GH = value; } void Core::Event::Director::setDirectorUI8HL( uint8_t value ) { - m_unionData.ui8lh.UI8HL = value; + m_unionData.ui8lh.UI8HL = value; } void Core::Event::Director::setDirectorUI8HH( uint8_t value ) { - m_unionData.ui8lh.UI8HH = value; + m_unionData.ui8lh.UI8HH = value; } void Core::Event::Director::setDirectorUI8IL( uint8_t value ) { - m_unionData.ui8lh.UI8IL = value; + m_unionData.ui8lh.UI8IL = value; } void Core::Event::Director::setDirectorUI8IH( uint8_t value ) { - m_unionData.ui8lh.UI8IH = value; + m_unionData.ui8lh.UI8IH = value; } void Core::Event::Director::setDirectorUI8JL( uint8_t value ) { - m_unionData.ui8lh.UI8JL = value; + m_unionData.ui8lh.UI8JL = value; } void Core::Event::Director::setDirectorUI8JH( uint8_t value ) { - m_unionData.ui8lh.UI8JH = value; + m_unionData.ui8lh.UI8JH = value; } void Core::Event::Director::setDirectorBranch( uint8_t value ) { - m_branch = value; + m_branch = value; } void Core::Event::Director::setDirectorSequence( uint8_t value ) { - m_sequence = value; + m_sequence = value; } diff --git a/src/servers/sapphire_zone/Event/Director.h b/src/servers/sapphire_zone/Event/Director.h index 3be53a3e..8ee947c6 100644 --- a/src/servers/sapphire_zone/Event/Director.h +++ b/src/servers/sapphire_zone/Event/Director.h @@ -18,140 +18,157 @@ class Director { public: - enum DirectorType - { - BattleLeve = 0x8001, - GatheringLeve = 0x8002, - InstanceContent = 0x8003, // used for dungeons/raids - PublicContent = 0x8004, - QuestBattle = 0x8006, - CompanyLeve = 0x8007, - GoldSaucer = 0x800A, - DpsChallange = 0x800D, - Fate = 0x801A + enum DirectorType + { + BattleLeve = 0x8001, + GatheringLeve = 0x8002, + InstanceContent = 0x8003, // used for dungeons/raids + PublicContent = 0x8004, + QuestBattle = 0x8006, + CompanyLeve = 0x8007, + GoldSaucer = 0x800A, + DpsChallange = 0x800D, + Fate = 0x801A - }; + }; - Director( DirectorType type, uint16_t contentId ); + Director( DirectorType type, uint16_t contentId ); - uint32_t getDirectorId() const; - uint16_t getContentId() const; - DirectorType getType() const; - uint8_t getSequence() const; - uint8_t getBranch() const; + uint32_t getDirectorId() const; - void sendDirectorInit( Entity::Player& player ) const; - void sendDirectorClear( Entity::Player& player ) const; - void sendDirectorVars( Entity::Player& player ) const; + uint16_t getContentId() const; - void setDirectorUI8AL( uint8_t value ); - void setDirectorUI8AH( uint8_t value ); + DirectorType getType() const; - void setDirectorUI8BL( uint8_t value ); - void setDirectorUI8BH( uint8_t value ); + uint8_t getSequence() const; - void setDirectorUI8CL( uint8_t value ); - void setDirectorUI8CH( uint8_t value ); + uint8_t getBranch() const; - void setDirectorUI8DL( uint8_t value ); - void setDirectorUI8DH( uint8_t value ); + void sendDirectorInit( Entity::Player& player ) const; - void setDirectorUI8EL( uint8_t value ); - void setDirectorUI8EH( uint8_t value ); + void sendDirectorClear( Entity::Player& player ) const; - void setDirectorUI8FL( uint8_t value ); - void setDirectorUI8FH( uint8_t value ); + void sendDirectorVars( Entity::Player& player ) const; - void setDirectorUI8GL( uint8_t value ); - void setDirectorUI8GH( uint8_t value ); + void setDirectorUI8AL( uint8_t value ); - void setDirectorUI8HL( uint8_t value ); - void setDirectorUI8HH( uint8_t value ); + void setDirectorUI8AH( uint8_t value ); - void setDirectorUI8IL( uint8_t value ); - void setDirectorUI8IH( uint8_t value ); + void setDirectorUI8BL( uint8_t value ); - void setDirectorUI8JL( uint8_t value ); - void setDirectorUI8JH( uint8_t value ); + void setDirectorUI8BH( uint8_t value ); - void setDirectorSequence( uint8_t value ); - void setDirectorBranch( uint8_t value ); + void setDirectorUI8CL( uint8_t value ); + + void setDirectorUI8CH( uint8_t value ); + + void setDirectorUI8DL( uint8_t value ); + + void setDirectorUI8DH( uint8_t value ); + + void setDirectorUI8EL( uint8_t value ); + + void setDirectorUI8EH( uint8_t value ); + + void setDirectorUI8FL( uint8_t value ); + + void setDirectorUI8FH( uint8_t value ); + + void setDirectorUI8GL( uint8_t value ); + + void setDirectorUI8GH( uint8_t value ); + + void setDirectorUI8HL( uint8_t value ); + + void setDirectorUI8HH( uint8_t value ); + + void setDirectorUI8IL( uint8_t value ); + + void setDirectorUI8IH( uint8_t value ); + + void setDirectorUI8JL( uint8_t value ); + + void setDirectorUI8JH( uint8_t value ); + + void setDirectorSequence( uint8_t value ); + + void setDirectorBranch( uint8_t value ); private: - /*! Id of the content of the director */ - uint16_t m_contentId; + /*! Id of the content of the director */ + uint16_t m_contentId; - /*! DirectorType | ContentId */ - uint32_t m_directorId; + /*! DirectorType | ContentId */ + uint32_t m_directorId; - /*! currect sequence */ - uint8_t m_sequence; + /*! currect sequence */ + uint8_t m_sequence; - /*! current branch */ - uint8_t m_branch; + /*! current branch */ + uint8_t m_branch; - union - { - struct UI8LH - { - uint8_t UI8AL : 4; - uint8_t UI8AH : 4; - uint8_t UI8BL : 4; - uint8_t UI8BH : 4; - uint8_t UI8CL : 4; - uint8_t UI8CH : 4; - uint8_t UI8DL : 4; - uint8_t UI8DH : 4; - uint8_t UI8EL : 4; - uint8_t UI8EH : 4; - uint8_t UI8FL : 4; - uint8_t UI8FH : 4; - uint8_t UI8GL : 4; - uint8_t UI8GH : 4; - uint8_t UI8HL : 4; - uint8_t UI8HH : 4; - uint8_t UI8IL : 4; - uint8_t UI8IH : 4; - uint8_t UI8JL : 4; - uint8_t UI8JH : 4; - } ui8lh; + union + { + struct UI8LH + { + uint8_t UI8AL : 4; + uint8_t UI8AH : 4; + uint8_t UI8BL : 4; + uint8_t UI8BH : 4; + uint8_t UI8CL : 4; + uint8_t UI8CH : 4; + uint8_t UI8DL : 4; + uint8_t UI8DH : 4; + uint8_t UI8EL : 4; + uint8_t UI8EH : 4; + uint8_t UI8FL : 4; + uint8_t UI8FH : 4; + uint8_t UI8GL : 4; + uint8_t UI8GH : 4; + uint8_t UI8HL : 4; + uint8_t UI8HH : 4; + uint8_t UI8IL : 4; + uint8_t UI8IH : 4; + uint8_t UI8JL : 4; + uint8_t UI8JH : 4; + } ui8lh; - struct UI8 - { - uint8_t UI8A; - uint8_t UI8B; - uint8_t UI8C; - uint8_t UI8D; - uint8_t UI8E; - uint8_t UI8F; - uint8_t UI8G; - uint8_t UI8H; - uint8_t UI8I; - uint8_t UI8J; - } ui8; + struct UI8 + { + uint8_t UI8A; + uint8_t UI8B; + uint8_t UI8C; + uint8_t UI8D; + uint8_t UI8E; + uint8_t UI8F; + uint8_t UI8G; + uint8_t UI8H; + uint8_t UI8I; + uint8_t UI8J; + } ui8; - struct FLAGS - { - uint8_t flags80; - uint8_t flags72; - uint8_t flags64; - uint8_t flags56; - uint8_t flags48; - uint8_t flags40; - uint8_t flags32; - uint8_t flags24; - uint8_t flags16; - uint8_t flags8; - } flags; + struct FLAGS + { + uint8_t flags80; + uint8_t flags72; + uint8_t flags64; + uint8_t flags56; + uint8_t flags48; + uint8_t flags40; + uint8_t flags32; + uint8_t flags24; + uint8_t flags16; + uint8_t flags8; + } flags; - /*! raw storage for flags/vars */ - uint8_t arrData[10]; - } m_unionData; + /*! raw storage for flags/vars */ + uint8_t arrData[10]; + } m_unionData; - /*! type of the director */ - DirectorType m_type; + /*! type of the director */ + DirectorType m_type; - uint32_t m_elapsedTime; + uint32_t m_elapsedTime; }; @@ -161,5 +178,4 @@ private: } - #endif //SAPPHIRE_DIRECTOR_H diff --git a/src/servers/sapphire_zone/Event/EventDefs.h b/src/servers/sapphire_zone/Event/EventDefs.h index 7f1a008f..2d140ade 100644 --- a/src/servers/sapphire_zone/Event/EventDefs.h +++ b/src/servers/sapphire_zone/Event/EventDefs.h @@ -1,83 +1,82 @@ #ifndef SAPPHIRE_EVENTDEFS_H #define SAPPHIRE_EVENTDEFS_H -namespace Core +namespace Core { +enum EventFlags { - enum EventFlags - { - NONE = 0, - NO_DEFAULT_CAMERA = 0x00000001, - FADE_OUT = 0x00000002, - INVIS_ENPC = 0x00000004, - INVIS_EOBJ = 0x00000008, - INVIS_BNPC = 0x00000010, - INVIS_OTHER_PC = 0x00000020, - INVIS_PARTY_PC = 0x00000040, - INVIS_PARTY_BUDDY = 0x10000000, - INVIS_GATHERING_POINT = 0x00000080, - INVIS_AETHERYTE = 0x00000100, - INVIS_TREASURE = 0x00000200, - CONDITION_CUTSCENE = 0x00000400, - HIDE_UI = 0x00000800, - INVIS_ALL = 0xF80003FC, - AUTO_LOC_CAMERA = 0x00001000, - HIDE_HOTBAR = 0x00002000, - INVINCIBLE = 0x00004000, - SILENT_ENTER_TERRI_ENV = 0x00008000, - SILENT_ENTER_TERRI_BGM = 0x00010000, - SILENT_ENTER_TERRI_SE = 0x00020000, - SILENT_ENTER_TERRI_ALL = 0x00038000, - DISABLE_SKIP = 0x00080000, - HIDE_FESTIVAL = 0x00200000, - DISABLE_STEALTH = 0x00400000, - ROLLBACK_HIDE_UI = 0x00800000, - LOCK_HUD = 0x01000000, - LOCK_HOTBAR = 0x02000000, - DISABLE_CANCEL_EMOTE = 0x04000000, - INVIS_AOE = 0x08000000, - INVIS_ALLIANCE_PC = 0x20000000, - INVIS_ALLIANCE_BUDDY = 0x40000000, - INVIS_COMPANION = 0x80000000, - SET_BASE = 0xF8400EFB, - SET_INVIS_BASE = 0xF8400FFF, - SET_EOBJ_BASE = 0xF8400EF3 - }; + NONE = 0, + NO_DEFAULT_CAMERA = 0x00000001, + FADE_OUT = 0x00000002, + INVIS_ENPC = 0x00000004, + INVIS_EOBJ = 0x00000008, + INVIS_BNPC = 0x00000010, + INVIS_OTHER_PC = 0x00000020, + INVIS_PARTY_PC = 0x00000040, + INVIS_PARTY_BUDDY = 0x10000000, + INVIS_GATHERING_POINT = 0x00000080, + INVIS_AETHERYTE = 0x00000100, + INVIS_TREASURE = 0x00000200, + CONDITION_CUTSCENE = 0x00000400, + HIDE_UI = 0x00000800, + INVIS_ALL = 0xF80003FC, + AUTO_LOC_CAMERA = 0x00001000, + HIDE_HOTBAR = 0x00002000, + INVINCIBLE = 0x00004000, + SILENT_ENTER_TERRI_ENV = 0x00008000, + SILENT_ENTER_TERRI_BGM = 0x00010000, + SILENT_ENTER_TERRI_SE = 0x00020000, + SILENT_ENTER_TERRI_ALL = 0x00038000, + DISABLE_SKIP = 0x00080000, + HIDE_FESTIVAL = 0x00200000, + DISABLE_STEALTH = 0x00400000, + ROLLBACK_HIDE_UI = 0x00800000, + LOCK_HUD = 0x01000000, + LOCK_HOTBAR = 0x02000000, + DISABLE_CANCEL_EMOTE = 0x04000000, + INVIS_AOE = 0x08000000, + INVIS_ALLIANCE_PC = 0x20000000, + INVIS_ALLIANCE_BUDDY = 0x40000000, + INVIS_COMPANION = 0x80000000, + SET_BASE = 0xF8400EFB, + SET_INVIS_BASE = 0xF8400FFF, + SET_EOBJ_BASE = 0xF8400EF3 +}; - enum EventTypes - { - EVENT_TALK = 1, - EVENT_EMOTE = 2, - EVENT_DISTANCE_BELOW = 3, - EVENT_DISTANCE_OVER = 4, - EVENT_BATTLE_REWARD = 5, - EVENT_CRAFT = 6, - EVENT_NEST = 7, - EVENT_EVENT_ITEM = 8, - EVENT_DROP = 9, - EVENT_WITHIN_RANGE = 10, - EVENT_OUTSIDE_RANGE = 11, - EVENT_GAME_START = 12, - EVENT_GAME_PROGRESS = 13, - EVENT_ENTER_TERRITORY = 15, - EVENT_GAME_COME_BACK = 17, - EVENT_ACTION_RESULT = 18, - EVENT_MATERIA_CRAFT = 19, - EVENT_FISHING = 20, - EVENT_UI = 21, - EVENT_HOUSING = 22, - EVENT_SAY = 23, - EVENT_TABLE_GAME = 24 - }; +enum EventTypes +{ + EVENT_TALK = 1, + EVENT_EMOTE = 2, + EVENT_DISTANCE_BELOW = 3, + EVENT_DISTANCE_OVER = 4, + EVENT_BATTLE_REWARD = 5, + EVENT_CRAFT = 6, + EVENT_NEST = 7, + EVENT_EVENT_ITEM = 8, + EVENT_DROP = 9, + EVENT_WITHIN_RANGE = 10, + EVENT_OUTSIDE_RANGE = 11, + EVENT_GAME_START = 12, + EVENT_GAME_PROGRESS = 13, + EVENT_ENTER_TERRITORY = 15, + EVENT_GAME_COME_BACK = 17, + EVENT_ACTION_RESULT = 18, + EVENT_MATERIA_CRAFT = 19, + EVENT_FISHING = 20, + EVENT_UI = 21, + EVENT_HOUSING = 22, + EVENT_SAY = 23, + EVENT_TABLE_GAME = 24 +}; - enum DamageType - { - STD_DAMAGE = 0X03, - STD_HEAL = 0X04, - STD_MP_LOSS = 0X0A, - STD_MP_GAIN = 0X0B, - STD_TP_LOSS = 0X0C, - STD_TP_GAIN = 0X0D - }; +enum DamageType +{ + STD_DAMAGE = 0X03, + STD_HEAL = 0X04, + STD_MP_LOSS = 0X0A, + STD_MP_GAIN = 0X0B, + STD_TP_LOSS = 0X0C, + STD_TP_GAIN = 0X0D +}; } diff --git a/src/servers/sapphire_zone/Event/EventHandler.cpp b/src/servers/sapphire_zone/Event/EventHandler.cpp index 322e8c3e..66b44235 100644 --- a/src/servers/sapphire_zone/Event/EventHandler.cpp +++ b/src/servers/sapphire_zone/Event/EventHandler.cpp @@ -1,85 +1,86 @@ #include "EventHandler.h" -Core::Event::EventHandler::EventHandler( Entity::Player* pOwner, uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam ) : - m_pOwner( pOwner ), - m_actorId( actorId ), - m_eventId( eventId ), - m_eventType( eventType ), - m_playedScene( false ) +Core::Event::EventHandler::EventHandler( Entity::Player* pOwner, uint64_t actorId, uint32_t eventId, + EventType eventType, uint32_t eventParam ) : + m_pOwner( pOwner ), + m_actorId( actorId ), + m_eventId( eventId ), + m_eventType( eventType ), + m_playedScene( false ) { - m_entryId = static_cast< uint16_t >( eventId ); - m_type = static_cast< uint16_t >( eventId >> 16 ); - m_eventParam = eventParam; - m_returnCallback = nullptr; + m_entryId = static_cast< uint16_t >( eventId ); + m_type = static_cast< uint16_t >( eventId >> 16 ); + m_eventParam = eventParam; + m_returnCallback = nullptr; } uint64_t Core::Event::EventHandler::getActorId() const { - return m_actorId; + return m_actorId; } uint32_t Core::Event::EventHandler::getId() const { - return m_eventId; + return m_eventId; } uint8_t Core::Event::EventHandler::getEventType() const { - return m_eventType; + return m_eventType; } uint16_t Core::Event::EventHandler::getType() const { - return m_type; + return m_type; } uint16_t Core::Event::EventHandler::getEntryId() const { - return m_entryId; + return m_entryId; } uint32_t Core::Event::EventHandler::getEventParam() const { - return m_eventParam; + return m_eventParam; } Core::Event::EventHandler::SceneReturnCallback Core::Event::EventHandler::getEventReturnCallback() const { - return m_returnCallback; + return m_returnCallback; } void Core::Event::EventHandler::setEventReturnCallback( SceneReturnCallback callback ) { - m_returnCallback = callback; + m_returnCallback = callback; } Core::Event::EventHandler::SceneChainCallback Core::Event::EventHandler::getSceneChainCallback() const { - return m_chainCallback; + return m_chainCallback; } void Core::Event::EventHandler::setSceneChainCallback( Core::Event::EventHandler::SceneChainCallback callback ) { - m_chainCallback = callback; + m_chainCallback = callback; } bool Core::Event::EventHandler::hasPlayedScene() const { - return m_playedScene; + return m_playedScene; } void Core::Event::EventHandler::setPlayedScene( bool playedScene ) { - m_playedScene = playedScene; + m_playedScene = playedScene; } bool Core::Event::EventHandler::hasNestedEvent() const { - return m_pNestedEvent != nullptr; + return m_pNestedEvent != nullptr; } void Core::Event::EventHandler::removeNestedEvent() { - m_pNestedEvent.reset(); + m_pNestedEvent.reset(); } diff --git a/src/servers/sapphire_zone/Event/EventHandler.h b/src/servers/sapphire_zone/Event/EventHandler.h index 8821d6c5..e0badf13 100644 --- a/src/servers/sapphire_zone/Event/EventHandler.h +++ b/src/servers/sapphire_zone/Event/EventHandler.h @@ -4,126 +4,131 @@ #include "Forwards.h" namespace Core { - namespace Event { +namespace Event { - struct SceneResult - { - uint32_t eventId; - uint16_t param1; - uint16_t param2; - uint16_t param3; - uint16_t param4; - }; +struct SceneResult +{ + uint32_t eventId; + uint16_t param1; + uint16_t param2; + uint16_t param3; + uint16_t param4; +}; - class EventHandler - { - public: - enum EventType : uint8_t - { - Talk = 1, - Emote = 2, - DistanceBelow = 3, - DistanceOver = 4, - BattleReward = 5, - Craft = 6, - Nest = 7, - Item = 8, - Drop = 9, - WithinRange = 10, - OutsideRange = 11, - GameStart = 12, - GameProgress = 13, - EnterTerritory = 15, - GameComeBack = 17, - ActionResult = 18, - MateriaCraft = 19, - Fishing = 20, - UI = 21, - Housing = 22, - Say = 23, - TableGame = 24, - }; +class EventHandler +{ +public: + enum EventType : + uint8_t + { + Talk = 1, + Emote = 2, + DistanceBelow = 3, + DistanceOver = 4, + BattleReward = 5, + Craft = 6, + Nest = 7, + Item = 8, + Drop = 9, + WithinRange = 10, + OutsideRange = 11, + GameStart = 12, + GameProgress = 13, + EnterTerritory = 15, + GameComeBack = 17, + ActionResult = 18, + MateriaCraft = 19, + Fishing = 20, + UI = 21, + Housing = 22, + Say = 23, + TableGame = 24, + }; - enum EventHandlerType : uint16_t - { - Quest = 0x0001, - Warp = 0x0002, - Unknown = 0x0003, // Came up in the client with "Begin" unsure that means - Shop = 0x0004, - Aetheryte = 0x0005, - GuildLeveAssignment = 0x0006, - DefaultTalk = 0x0009, - CustomTalk = 0x000B, - CompanyLeveOfficer = 0x000C, - CraftLeve = 0x000E, - GimmickAccessor = 0x000F, - GimmickBill = 0x0010, - GimmickRect = 0x0011, - ChocoboTaxiStand = 0x0012, - Opening = 0x0013, - ExitRange = 0x0014, - GCShop = 0x0016, - GuildOrderGuide = 0x0017, - GuildOrderOfficer = 0x0018, - ContentNpc = 0x0019, - Story = 0x001A, - SpecialShop = 0x001B, - BahamutGuide = 0x001C, - FcTalk = 0x001F, - ICDirector = 0x8003, - }; + enum EventHandlerType : + uint16_t + { + Quest = 0x0001, + Warp = 0x0002, + Unknown = 0x0003, // Came up in the client with "Begin" unsure that means + Shop = 0x0004, + Aetheryte = 0x0005, + GuildLeveAssignment = 0x0006, + DefaultTalk = 0x0009, + CustomTalk = 0x000B, + CompanyLeveOfficer = 0x000C, + CraftLeve = 0x000E, + GimmickAccessor = 0x000F, + GimmickBill = 0x0010, + GimmickRect = 0x0011, + ChocoboTaxiStand = 0x0012, + Opening = 0x0013, + ExitRange = 0x0014, + GCShop = 0x0016, + GuildOrderGuide = 0x0017, + GuildOrderOfficer = 0x0018, + ContentNpc = 0x0019, + Story = 0x001A, + SpecialShop = 0x001B, + BahamutGuide = 0x001C, + FcTalk = 0x001F, + ICDirector = 0x8003, + }; - using SceneReturnCallback = std::function< void( Entity::Player&, const SceneResult& ) >; - using SceneChainCallback = std::function< void( Entity::Player& ) >; + using SceneReturnCallback = std::function< void( Entity::Player&, const SceneResult& ) >; + using SceneChainCallback = std::function< void( Entity::Player& ) >; - EventHandler( Entity::Player* pOwner, uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam ); + EventHandler( Entity::Player* pOwner, uint64_t actorId, uint32_t eventId, EventType eventType, + uint32_t eventParam ); - ~EventHandler() {} + ~EventHandler() + { + } - uint64_t getActorId() const; + uint64_t getActorId() const; - uint32_t getId() const; + uint32_t getId() const; - uint16_t getType() const; + uint16_t getType() const; - uint16_t getEntryId() const; + uint16_t getEntryId() const; - uint8_t getEventType() const; + uint8_t getEventType() const; - uint32_t getEventParam() const; + uint32_t getEventParam() const; - bool hasPlayedScene() const; + bool hasPlayedScene() const; - void setPlayedScene( bool playedScene ); + void setPlayedScene( bool playedScene ); - SceneReturnCallback getEventReturnCallback() const; + SceneReturnCallback getEventReturnCallback() const; - void setEventReturnCallback( SceneReturnCallback callback ); + void setEventReturnCallback( SceneReturnCallback callback ); - SceneChainCallback getSceneChainCallback() const; + SceneChainCallback getSceneChainCallback() const; - void setSceneChainCallback( SceneChainCallback callback ); + void setSceneChainCallback( SceneChainCallback callback ); - bool hasNestedEvent() const; + bool hasNestedEvent() const; - void removeNestedEvent(); + void removeNestedEvent(); - protected: - Entity::Player* m_pOwner; +protected: + Entity::Player* m_pOwner; - uint64_t m_actorId; - uint32_t m_eventId; - uint16_t m_entryId; - uint16_t m_type; - uint8_t m_eventType; - uint32_t m_eventParam; - EventHandlerPtr m_pNestedEvent; - bool m_playedScene; - SceneReturnCallback m_returnCallback; - SceneChainCallback m_chainCallback; - }; + uint64_t m_actorId; + uint32_t m_eventId; + uint16_t m_entryId; + uint16_t m_type; + uint8_t m_eventType; + uint32_t m_eventParam; + EventHandlerPtr m_pNestedEvent; + bool m_playedScene; + SceneReturnCallback m_returnCallback; + SceneChainCallback m_chainCallback; +}; - } +} } #endif diff --git a/src/servers/sapphire_zone/Event/EventHelper.cpp b/src/servers/sapphire_zone/Event/EventHelper.cpp index 63eb538d..fc8fc3f4 100644 --- a/src/servers/sapphire_zone/Event/EventHelper.cpp +++ b/src/servers/sapphire_zone/Event/EventHelper.cpp @@ -15,88 +15,88 @@ using namespace Core::Common; std::string Core::Event::getEventName( uint32_t eventId ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint16_t eventType = eventId >> 16; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint16_t eventType = eventId >> 16; - auto unknown = std::string{ "unknown" }; + auto unknown = std::string{ "unknown" }; - switch( eventType ) - { - case Event::EventHandler::EventHandlerType::Quest: - { + switch( eventType ) + { + case Event::EventHandler::EventHandlerType::Quest: + { auto questInfo = pExdData->get< Core::Data::Quest >( eventId ); if( !questInfo ) - return unknown + "Quest"; + return unknown + "Quest"; std::string name = questInfo->id; std::size_t pos = name.find_first_of( "_" ); return name.substr( 0, pos ); - } - case Event::EventHandler::EventHandlerType::CustomTalk: - { + } + case Event::EventHandler::EventHandlerType::CustomTalk: + { auto customTalkInfo = pExdData->get< Core::Data::CustomTalk >( eventId ); if( !customTalkInfo ) - return unknown + "CustomTalk"; + return unknown + "CustomTalk"; std::string name = customTalkInfo->name; std::size_t pos = name.find_first_of( "_" ); return customTalkInfo->name.substr( 0, pos ); - } - case Event::EventHandler::EventHandlerType::Opening: - { + } + case Event::EventHandler::EventHandlerType::Opening: + { auto openingInfo = pExdData->get< Core::Data::Opening >( eventId ); if( openingInfo ) - return openingInfo->name; + return openingInfo->name; return unknown + "Opening"; - } - case Event::EventHandler::EventHandlerType::Aetheryte: - { + } + case Event::EventHandler::EventHandlerType::Aetheryte: + { auto aetherInfo = pExdData->get< Core::Data::Aetheryte >( eventId & 0xFFFF ); if( aetherInfo->isAetheryte ) - return "Aetheryte"; + return "Aetheryte"; return "Aethernet"; - } - case Event::EventHandler::EventHandlerType::ICDirector: - { + } + case Event::EventHandler::EventHandlerType::ICDirector: + { auto contentInfo = pExdData->get< Core::Data::InstanceContent >( eventId & 0xFFFF ); std::string name = contentInfo->name; name.erase( boost::remove_if( name, boost::is_any_of( "★_ '()[]-\x1a\x1\x2\x1f\x1\x3.:" ) ), name.end() ); - name[0] = toupper( name[0] ); + name[ 0 ] = toupper( name[ 0 ] ); return name; - } + } - case Event::EventHandler::EventHandlerType::Warp: - { + case Event::EventHandler::EventHandlerType::Warp: + { auto warpInfo = pExdData->get< Core::Data::Warp >( eventId ); if( warpInfo ) - return "WarpTaxi"; + return "WarpTaxi"; return unknown + "ChocoboWarp"; //who know - } - case Event::EventHandler::EventHandlerType::Shop: - { + } + case Event::EventHandler::EventHandlerType::Shop: + { auto shopInfo = pExdData->get< Core::Data::GilShop >( eventId ); std::string name = shopInfo->name; if( shopInfo ) - return name; + return name; return unknown + "GilShop"; - } - default: - { + } + default: + { return unknown; - } - } + } + } } uint32_t Core::Event::mapEventActorToRealActor( uint32_t eventActorId ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto levelInfo = pExdData->get< Core::Data::Level >( eventActorId ); - if( levelInfo ) - return levelInfo->objectKey; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto levelInfo = pExdData->get< Core::Data::Level >( eventActorId ); + if( levelInfo ) + return levelInfo->objectKey; - return 0; + return 0; } diff --git a/src/servers/sapphire_zone/Event/EventHelper.h b/src/servers/sapphire_zone/Event/EventHelper.h index 5d7a1dbb..e74b431f 100644 --- a/src/servers/sapphire_zone/Event/EventHelper.h +++ b/src/servers/sapphire_zone/Event/EventHelper.h @@ -5,11 +5,11 @@ #include namespace Core { - namespace Event { +namespace Event { - std::string getEventName( uint32_t eventId ); +std::string getEventName( uint32_t eventId ); - uint32_t mapEventActorToRealActor( uint32_t eventActorId ); - } +uint32_t mapEventActorToRealActor( uint32_t eventActorId ); +} } #endif diff --git a/src/servers/sapphire_zone/Forwards.h b/src/servers/sapphire_zone/Forwards.h index abe6ccec..03161742 100644 --- a/src/servers/sapphire_zone/Forwards.h +++ b/src/servers/sapphire_zone/Forwards.h @@ -16,75 +16,90 @@ x ## Ptr make_ ## x( Args &&...args ) { \ return boost::make_shared< x >( std::forward< Args >( args ) ... ); }\ typedef std::vector< x > x ## PtrList; -namespace Core -{ - TYPE_FORWARD( Cell ); - TYPE_FORWARD( Zone ); - TYPE_FORWARD( HousingZone ); - TYPE_FORWARD( InstanceContent ); - TYPE_FORWARD( Item ); - TYPE_FORWARD( ItemContainer ); - TYPE_FORWARD( Session ); - TYPE_FORWARD( ZonePosition ) +namespace Core { +TYPE_FORWARD( Cell ); - namespace StatusEffect - { - TYPE_FORWARD( StatusEffect ); - TYPE_FORWARD( StatusEffectContainer ); - } +TYPE_FORWARD( Zone ); - namespace Entity - { - TYPE_FORWARD( Actor ); - TYPE_FORWARD( Chara ); - TYPE_FORWARD( Player ); - TYPE_FORWARD( EventObject ); - TYPE_FORWARD( BNpcTemplate ); - } +TYPE_FORWARD( HousingZone ); - namespace Event - { - TYPE_FORWARD( Director ); - TYPE_FORWARD( EventHandler ); - } +TYPE_FORWARD( InstanceContent ); - namespace Action - { - TYPE_FORWARD( Action ); - TYPE_FORWARD( ActionTeleport ); - TYPE_FORWARD( ActionCast ); - TYPE_FORWARD( ActionMount ); - TYPE_FORWARD( EventAction ); - TYPE_FORWARD( EventItemAction ); - } +TYPE_FORWARD( Item ); - namespace Network - { - TYPE_FORWARD( Hive ); - TYPE_FORWARD( Acceptor ); - TYPE_FORWARD( Connection ); - TYPE_FORWARD( GameConnection ); - TYPE_FORWARD( SessionConnection ); - TYPE_FORWARD( CustomMsgClientConnection ); +TYPE_FORWARD( ItemContainer ); - namespace Packets - { - TYPE_FORWARD( GamePacket ); - TYPE_FORWARD( FFXIVPacketBase ); - } - } +TYPE_FORWARD( Session ); - namespace ContentFinder - { - TYPE_FORWARD( ContentFinder ); - } +TYPE_FORWARD( ZonePosition ) - namespace Scripting - { - class NativeScriptMgr; - } +namespace StatusEffect { +TYPE_FORWARD( StatusEffect ); - typedef std::function< void( Entity::Player&, uint32_t, uint64_t ) > ActionCallback; +TYPE_FORWARD( StatusEffectContainer ); +} + +namespace Entity { +TYPE_FORWARD( Actor ); + +TYPE_FORWARD( Chara ); + +TYPE_FORWARD( Player ); + +TYPE_FORWARD( EventObject ); + +TYPE_FORWARD( BNpcTemplate ); +} + +namespace Event { +TYPE_FORWARD( Director ); + +TYPE_FORWARD( EventHandler ); +} + +namespace Action { +TYPE_FORWARD( Action ); + +TYPE_FORWARD( ActionTeleport ); + +TYPE_FORWARD( ActionCast ); + +TYPE_FORWARD( ActionMount ); + +TYPE_FORWARD( EventAction ); + +TYPE_FORWARD( EventItemAction ); +} + +namespace Network { +TYPE_FORWARD( Hive ); + +TYPE_FORWARD( Acceptor ); + +TYPE_FORWARD( Connection ); + +TYPE_FORWARD( GameConnection ); + +TYPE_FORWARD( SessionConnection ); + +TYPE_FORWARD( CustomMsgClientConnection ); + +namespace Packets { +TYPE_FORWARD( GamePacket ); + +TYPE_FORWARD( FFXIVPacketBase ); +} +} + +namespace ContentFinder { +TYPE_FORWARD( ContentFinder ); +} + +namespace Scripting { +class NativeScriptMgr; +} + +typedef std::function< void( Entity::Player&, uint32_t, uint64_t ) > ActionCallback; } diff --git a/src/servers/sapphire_zone/Inventory/Item.cpp b/src/servers/sapphire_zone/Inventory/Item.cpp index cf959296..08601604 100644 --- a/src/servers/sapphire_zone/Inventory/Item.cpp +++ b/src/servers/sapphire_zone/Inventory/Item.cpp @@ -8,127 +8,127 @@ extern Core::Framework g_fw; Core::Item::Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, bool isHq ) : - m_id( catalogId ), - m_uId( uId ), - m_model1( model1 ), - m_model2( model2 ), - m_isHq( isHq ) + m_id( catalogId ), + m_uId( uId ), + m_model1( model1 ), + m_model2( model2 ), + m_isHq( isHq ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto itemInfo = pExdData->get< Core::Data::Item >( catalogId ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto itemInfo = pExdData->get< Core::Data::Item >( catalogId ); - m_delayMs = itemInfo->delayms; - m_physicalDmg = itemInfo->damagePhys; - m_magicalDmg = itemInfo->damageMag; - m_weaponDmg = ( m_physicalDmg != 0 ) ? m_physicalDmg : m_magicalDmg; - m_autoAttackDmg = static_cast< float >( m_weaponDmg * m_delayMs ) / 3000; - m_category = static_cast< Common::ItemUICategory >( itemInfo->itemUICategory ); - m_itemLevel = itemInfo->levelItem; - m_maxStackSize = itemInfo->stackSize; + m_delayMs = itemInfo->delayms; + m_physicalDmg = itemInfo->damagePhys; + m_magicalDmg = itemInfo->damageMag; + m_weaponDmg = ( m_physicalDmg != 0 ) ? m_physicalDmg : m_magicalDmg; + m_autoAttackDmg = static_cast< float >( m_weaponDmg * m_delayMs ) / 3000; + m_category = static_cast< Common::ItemUICategory >( itemInfo->itemUICategory ); + m_itemLevel = itemInfo->levelItem; + m_maxStackSize = itemInfo->stackSize; } float Core::Item::getAutoAttackDmg() const { - return m_autoAttackDmg; + return m_autoAttackDmg; } uint16_t Core::Item::getDelay() const { - return m_delayMs; + return m_delayMs; } uint16_t Core::Item::getPhysicalDmg() const { - return m_physicalDmg; + return m_physicalDmg; } uint16_t Core::Item::getMagicalDmg() const { - return m_magicalDmg; + return m_magicalDmg; } uint16_t Core::Item::getItemLevel() const { - return m_itemLevel; + return m_itemLevel; } uint16_t Core::Item::getWeaponDmg() const { - return m_weaponDmg; + return m_weaponDmg; } bool Core::Item::isWeapon() const { - return (m_weaponDmg != 0); + return ( m_weaponDmg != 0 ); } uint32_t Core::Item::getId() const { - return m_id; + return m_id; } void Core::Item::setId( uint32_t id ) { - m_id = id; + m_id = id; } uint64_t Core::Item::getUId() const { - return m_uId; + return m_uId; } void Core::Item::setUId( uint64_t id ) { - m_uId = id; + m_uId = id; } void Core::Item::setStackSize( uint32_t size ) { - m_stackSize = std::min< uint32_t >( size, m_maxStackSize ); + m_stackSize = std::min< uint32_t >( size, m_maxStackSize ); } uint32_t Core::Item::getStackSize() const { - return m_stackSize; + return m_stackSize; } void Core::Item::setCategory( Common::ItemUICategory categoryId ) { - m_category = categoryId; + m_category = categoryId; } Core::Common::ItemUICategory Core::Item::getCategory() const { - return m_category; + return m_category; } void Core::Item::setModelIds( uint64_t model1, uint64_t model2 ) { - m_model1 = model1; - m_model2 = model2; + m_model1 = model1; + m_model2 = model2; } uint64_t Core::Item::getModelId1() const { - return m_model1; + return m_model1; } uint64_t Core::Item::getModelId2() const { - return m_model2; + return m_model2; } bool Core::Item::isHq() const { - return m_isHq; + return m_isHq; } void Core::Item::setHq( bool isHq ) { - m_isHq = isHq; + m_isHq = isHq; } uint32_t Core::Item::getMaxStackSize() const { - return m_maxStackSize; + return m_maxStackSize; } diff --git a/src/servers/sapphire_zone/Inventory/Item.h b/src/servers/sapphire_zone/Inventory/Item.h index f694fccb..1f30fbf0 100644 --- a/src/servers/sapphire_zone/Inventory/Item.h +++ b/src/servers/sapphire_zone/Inventory/Item.h @@ -9,74 +9,75 @@ class Item { public: - Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, bool isHq = false ); - ~Item() = default; + Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, bool isHq = false ); - uint32_t getId() const; + ~Item() = default; - void setId( uint32_t id ); + uint32_t getId() const; - uint64_t getUId() const; + void setId( uint32_t id ); - void setUId( uint64_t id ); + uint64_t getUId() const; - void setStackSize( uint32_t size ); + void setUId( uint64_t id ); - uint32_t getStackSize() const; + void setStackSize( uint32_t size ); - void setCategory( Common::ItemUICategory categoryId ); + uint32_t getStackSize() const; - Common::ItemUICategory getCategory() const; + void setCategory( Common::ItemUICategory categoryId ); - void setModelIds( uint64_t model1, uint64_t model2 ); + Common::ItemUICategory getCategory() const; - uint64_t getModelId1() const; + void setModelIds( uint64_t model1, uint64_t model2 ); - uint64_t getModelId2() const; + uint64_t getModelId1() const; - bool isHq() const; + uint64_t getModelId2() const; - void setHq( bool isHq ); + bool isHq() const; - uint16_t getDelay() const; + void setHq( bool isHq ); - uint16_t getPhysicalDmg() const; + uint16_t getDelay() const; - uint16_t getMagicalDmg() const; + uint16_t getPhysicalDmg() const; - uint16_t getWeaponDmg() const; + uint16_t getMagicalDmg() const; - bool isWeapon() const; + uint16_t getWeaponDmg() const; - float getAutoAttackDmg() const; + bool isWeapon() const; - uint16_t getItemLevel() const; + float getAutoAttackDmg() const; - uint32_t getMaxStackSize() const; + uint16_t getItemLevel() const; + + uint32_t getMaxStackSize() const; protected: - uint32_t m_id; + uint32_t m_id; - uint64_t m_uId; - - Common::ItemUICategory m_category; + uint64_t m_uId; - uint32_t m_stackSize; - uint32_t m_maxStackSize; - std::vector< uint8_t > m_classJobList; + Common::ItemUICategory m_category; - uint64_t m_model1; - uint64_t m_model2; + uint32_t m_stackSize; + uint32_t m_maxStackSize; + std::vector< uint8_t > m_classJobList; - bool m_isHq; + uint64_t m_model1; + uint64_t m_model2; - uint16_t m_delayMs; - uint16_t m_physicalDmg; - uint16_t m_magicalDmg; - uint16_t m_weaponDmg; - float m_autoAttackDmg; - uint16_t m_itemLevel; + bool m_isHq; + + uint16_t m_delayMs; + uint16_t m_physicalDmg; + uint16_t m_magicalDmg; + uint16_t m_weaponDmg; + float m_autoAttackDmg; + uint16_t m_itemLevel; }; diff --git a/src/servers/sapphire_zone/Inventory/ItemContainer.cpp b/src/servers/sapphire_zone/Inventory/ItemContainer.cpp index c02d17f1..09c05ec2 100644 --- a/src/servers/sapphire_zone/Inventory/ItemContainer.cpp +++ b/src/servers/sapphire_zone/Inventory/ItemContainer.cpp @@ -11,12 +11,13 @@ extern Core::Framework g_fw; -Core::ItemContainer::ItemContainer( uint16_t storageId, uint8_t maxSize, const std::string& tableName, bool isMultiStorage, bool isPersistentStorage ) : - m_id( storageId ), - m_size( maxSize ), - m_tableName( tableName ), - m_bMultiStorage( isMultiStorage ), - m_isPersistentStorage( isPersistentStorage ) +Core::ItemContainer::ItemContainer( uint16_t storageId, uint8_t maxSize, const std::string& tableName, + bool isMultiStorage, bool isPersistentStorage ) : + m_id( storageId ), + m_size( maxSize ), + m_tableName( tableName ), + m_bMultiStorage( isMultiStorage ), + m_isPersistentStorage( isPersistentStorage ) { } @@ -28,96 +29,96 @@ Core::ItemContainer::~ItemContainer() uint16_t Core::ItemContainer::getId() const { - return m_id; + return m_id; } uint8_t Core::ItemContainer::getEntryCount() const { - return static_cast< uint8_t >( m_itemMap.size() ); + return static_cast< uint8_t >( m_itemMap.size() ); } void Core::ItemContainer::removeItem( uint8_t slotId ) { - auto pLog = g_fw.get< Logger >(); - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - ItemMap::iterator it = m_itemMap.find( slotId ); + auto pLog = g_fw.get< Logger >(); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + ItemMap::iterator it = m_itemMap.find( slotId ); - if( it != m_itemMap.end() ) - { - if( m_isPersistentStorage ) - pDb->execute( "DELETE FROM charaglobalitem WHERE itemId = " + std::to_string( it->second->getUId() ) ); + if( it != m_itemMap.end() ) + { + if( m_isPersistentStorage ) + pDb->execute( "DELETE FROM charaglobalitem WHERE itemId = " + std::to_string( it->second->getUId() ) ); - m_itemMap.erase( it ); + m_itemMap.erase( it ); - pLog->debug( "Dropped item from slot " + std::to_string( slotId ) ); - } - else - { - pLog->debug( "Item could not be dropped from slot " + std::to_string( slotId ) ); - } + pLog->debug( "Dropped item from slot " + std::to_string( slotId ) ); + } + else + { + pLog->debug( "Item could not be dropped from slot " + std::to_string( slotId ) ); + } } Core::ItemMap& Core::ItemContainer::getItemMap() { - return m_itemMap; + return m_itemMap; } const Core::ItemMap& Core::ItemContainer::getItemMap() const { - return m_itemMap; + return m_itemMap; } int8_t Core::ItemContainer::getFreeSlot() { - for( uint8_t slotId = 0; slotId < m_size; slotId++ ) - { - ItemMap::iterator it = m_itemMap.find( slotId ); - if( it == m_itemMap.end() || - it->second == nullptr ) - return slotId; - } - return -1; + for( uint8_t slotId = 0; slotId < m_size; slotId++ ) + { + ItemMap::iterator it = m_itemMap.find( slotId ); + if( it == m_itemMap.end() || + it->second == nullptr ) + return slotId; + } + return -1; } Core::ItemPtr Core::ItemContainer::getItem( uint8_t slotId ) { - if( ( slotId > m_size ) ) - { - auto pLog = g_fw.get< Logger >(); - pLog->error( "Slot out of range " + std::to_string( slotId ) ); - return nullptr; - } + if( ( slotId > m_size ) ) + { + auto pLog = g_fw.get< Logger >(); + pLog->error( "Slot out of range " + std::to_string( slotId ) ); + return nullptr; + } - return m_itemMap[slotId]; + return m_itemMap[ slotId ]; } void Core::ItemContainer::setItem( uint8_t slotId, ItemPtr pItem ) { - if( slotId > m_size ) - return; + if( slotId > m_size ) + return; - m_itemMap[slotId] = pItem; + m_itemMap[ slotId ] = pItem; } uint8_t Core::ItemContainer::getMaxSize() const { - return m_size; + return m_size; } std::string Core::ItemContainer::getTableName() const { - return m_tableName; + return m_tableName; } bool Core::ItemContainer::isMultiStorage() const { - return m_bMultiStorage; + return m_bMultiStorage; } bool Core::ItemContainer::isPersistentStorage() const { - return m_isPersistentStorage; + return m_isPersistentStorage; } diff --git a/src/servers/sapphire_zone/Inventory/ItemContainer.h b/src/servers/sapphire_zone/Inventory/ItemContainer.h index 09a35c26..64750f3b 100644 --- a/src/servers/sapphire_zone/Inventory/ItemContainer.h +++ b/src/servers/sapphire_zone/Inventory/ItemContainer.h @@ -7,51 +7,52 @@ #include "Forwards.h" -namespace Core +namespace Core { + +using ItemMap = std::map< uint8_t, ItemPtr >; + +class ItemContainer { - using ItemMap = std::map< uint8_t, ItemPtr >; +public: + ItemContainer( uint16_t storageId, uint8_t maxSize, const std::string& tableName, bool isMultiStorage, + bool isPersistentStorage = true ); - class ItemContainer - { + ~ItemContainer(); - public: - ItemContainer( uint16_t storageId, uint8_t maxSize, const std::string& tableName, bool isMultiStorage, bool isPersistentStorage = true ); - ~ItemContainer(); + uint16_t getId() const; - uint16_t getId() const; + uint8_t getEntryCount() const; - uint8_t getEntryCount() const; + void removeItem( uint8_t slotId ); - void removeItem( uint8_t slotId ); + ItemMap& getItemMap(); - ItemMap& getItemMap(); + const ItemMap& getItemMap() const; - const ItemMap& getItemMap() const; + ItemPtr getItem( uint8_t slotId ); - ItemPtr getItem( uint8_t slotId ); + void setItem( uint8_t slotId, ItemPtr item ); - void setItem( uint8_t slotId, ItemPtr item ); + int8_t getFreeSlot(); - int8_t getFreeSlot(); + uint8_t getMaxSize() const; - uint8_t getMaxSize() const; + std::string getTableName() const; - std::string getTableName() const; + bool isMultiStorage() const; - bool isMultiStorage() const; + bool isPersistentStorage() const; - bool isPersistentStorage() const; - - private: - uint16_t m_id; - uint8_t m_size; - std::string m_tableName; - bool m_bMultiStorage; - bool m_isPersistentStorage; - ItemMap m_itemMap; - Entity::PlayerPtr m_pOwner; - }; +private: + uint16_t m_id; + uint8_t m_size; + std::string m_tableName; + bool m_bMultiStorage; + bool m_isPersistentStorage; + ItemMap m_itemMap; + Entity::PlayerPtr m_pOwner; +}; } diff --git a/src/servers/sapphire_zone/Inventory/ItemUtil.cpp b/src/servers/sapphire_zone/Inventory/ItemUtil.cpp index f02bdcc5..e332860a 100644 --- a/src/servers/sapphire_zone/Inventory/ItemUtil.cpp +++ b/src/servers/sapphire_zone/Inventory/ItemUtil.cpp @@ -14,177 +14,177 @@ extern Core::Framework g_fw; bool Core::Items::Util::isArmory( uint16_t containerId ) { - return - containerId == Common::ArmoryBody || - containerId == Common::ArmoryEar || - containerId == Common::ArmoryFeet || - containerId == Common::ArmoryHand || - containerId == Common::ArmoryHead || - containerId == Common::ArmoryLegs || - containerId == Common::ArmoryMain || - containerId == Common::ArmoryOff || - containerId == Common::ArmoryRing || - containerId == Common::ArmoryWaist || - containerId == Common::ArmoryWrist || - containerId == Common::ArmorySoulCrystal; + return + containerId == Common::ArmoryBody || + containerId == Common::ArmoryEar || + containerId == Common::ArmoryFeet || + containerId == Common::ArmoryHand || + containerId == Common::ArmoryHead || + containerId == Common::ArmoryLegs || + containerId == Common::ArmoryMain || + containerId == Common::ArmoryOff || + containerId == Common::ArmoryRing || + containerId == Common::ArmoryWaist || + containerId == Common::ArmoryWrist || + containerId == Common::ArmorySoulCrystal; } uint16_t Core::Items::Util::getCharaEquipSlotCategoryToArmoryId( uint8_t slotId ) { - switch( slotId ) - { - case Common::CharaHead: - return Common::ArmoryHead; + switch( slotId ) + { + case Common::CharaHead: + return Common::ArmoryHead; - case Common::CharaBody: - case Common::BodyDisallowHead: - case Common::BodyDisallowHandsLegsFeet: - case Common::BodyDisallowAll: - case Common::BodyDisallowHands: - case Common::BodyDisallowLegsFeet: - return Common::ArmoryBody; + case Common::CharaBody: + case Common::BodyDisallowHead: + case Common::BodyDisallowHandsLegsFeet: + case Common::BodyDisallowAll: + case Common::BodyDisallowHands: + case Common::BodyDisallowLegsFeet: + return Common::ArmoryBody; - case Common::CharaEars: - return Common::ArmoryEar; + case Common::CharaEars: + return Common::ArmoryEar; - case Common::CharaFeet: - return Common::ArmoryFeet; + case Common::CharaFeet: + return Common::ArmoryFeet; - case Common::CharaHands: - return Common::ArmoryHand; + case Common::CharaHands: + return Common::ArmoryHand; - case Common::CharaLegs: - case Common::LegsDisallowFeet: - return Common::ArmoryLegs; + case Common::CharaLegs: + case Common::LegsDisallowFeet: + return Common::ArmoryLegs; - case Common::CharaMainHand: - case Common::MainTwoHandedWeapon: - case Common::MainOrOffHand: - return Common::ArmoryMain; + case Common::CharaMainHand: + case Common::MainTwoHandedWeapon: + case Common::MainOrOffHand: + return Common::ArmoryMain; - case Common::CharaOffHand: - return Common::ArmoryOff; + case Common::CharaOffHand: + return Common::ArmoryOff; - case Common::CharaRing: - return Common::ArmoryRing; + case Common::CharaRing: + return Common::ArmoryRing; - case Common::CharaWaist: - return Common::ArmoryWaist; + case Common::CharaWaist: + return Common::ArmoryWaist; - case Common::CharaWrist: - return Common::ArmoryWrist; + case Common::CharaWrist: + return Common::ArmoryWrist; - case Common::CharaNeck: - return Common::ArmoryNeck; + case Common::CharaNeck: + return Common::ArmoryNeck; - case Common::CharaSoulCrystal: - return Common::ArmorySoulCrystal; + case Common::CharaSoulCrystal: + return Common::ArmorySoulCrystal; - default: - return 0; - } + default: + return 0; + } } - bool Core::Items::Util::isEquipment( uint16_t containerId ) { - return containerId == Common::GearSet0; + return containerId == Common::GearSet0; } bool Core::Items::Util::isOneHandedWeapon( Common::ItemUICategory weaponCategory ) { - switch ( weaponCategory ) - { - case Common::ItemUICategory::AlchemistsPrimaryTool: - case Common::ItemUICategory::ArmorersPrimaryTool: - case Common::ItemUICategory::BotanistsPrimaryTool: - case Common::ItemUICategory::CulinariansPrimaryTool: - case Common::ItemUICategory::OnehandedConjurersArm: - case Common::ItemUICategory::CarpentersPrimaryTool: - case Common::ItemUICategory::FishersPrimaryTool: - case Common::ItemUICategory::GladiatorsArm: - case Common::ItemUICategory::GoldsmithsPrimaryTool: - case Common::ItemUICategory::LeatherworkersPrimaryTool: - case Common::ItemUICategory::MinersPrimaryTool: - case Common::ItemUICategory::OnehandedThaumaturgesArm: - case Common::ItemUICategory::WeaversPrimaryTool: - case Common::ItemUICategory::BlacksmithsPrimaryTool: - return true; - default: - return false; - } + switch( weaponCategory ) + { + case Common::ItemUICategory::AlchemistsPrimaryTool: + case Common::ItemUICategory::ArmorersPrimaryTool: + case Common::ItemUICategory::BotanistsPrimaryTool: + case Common::ItemUICategory::CulinariansPrimaryTool: + case Common::ItemUICategory::OnehandedConjurersArm: + case Common::ItemUICategory::CarpentersPrimaryTool: + case Common::ItemUICategory::FishersPrimaryTool: + case Common::ItemUICategory::GladiatorsArm: + case Common::ItemUICategory::GoldsmithsPrimaryTool: + case Common::ItemUICategory::LeatherworkersPrimaryTool: + case Common::ItemUICategory::MinersPrimaryTool: + case Common::ItemUICategory::OnehandedThaumaturgesArm: + case Common::ItemUICategory::WeaversPrimaryTool: + case Common::ItemUICategory::BlacksmithsPrimaryTool: + return true; + default: + return false; + } } Core::ItemPtr Core::Items::Util::loadItem( uint64_t uId ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - // load actual item - auto itemRes = pDb->query( "SELECT catalogId, stack, flags FROM charaglobalitem WHERE itemId = " + std::to_string( uId ) + ";" ); - if( !itemRes->next() ) - return nullptr; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + // load actual item + auto itemRes = pDb->query( + "SELECT catalogId, stack, flags FROM charaglobalitem WHERE itemId = " + std::to_string( uId ) + ";" ); + if( !itemRes->next() ) + return nullptr; - try - { - auto itemInfo = pExdData->get< Core::Data::Item >( itemRes->getUInt( 1 ) ); - bool isHq = itemRes->getUInt( 3 ) == 1; + try + { + auto itemInfo = pExdData->get< Core::Data::Item >( itemRes->getUInt( 1 ) ); + bool isHq = itemRes->getUInt( 3 ) == 1; - ItemPtr pItem = make_Item( uId, - itemRes->getUInt( 1 ), - itemInfo->modelMain, - itemInfo->modelSub, - isHq ); + ItemPtr pItem = make_Item( uId, + itemRes->getUInt( 1 ), + itemInfo->modelMain, + itemInfo->modelSub, + isHq ); - pItem->setStackSize( itemRes->getUInt( 2 ) ); + pItem->setStackSize( itemRes->getUInt( 2 ) ); - return pItem; - } - catch( ... ) - { - return nullptr; - } + return pItem; + } + catch( ... ) + { + return nullptr; + } } Core::Common::ContainerType Core::Items::Util::getContainerType( uint32_t containerId ) { - if( containerId < 5 ) - { - return Common::Bag; - } - else if( containerId < 2000 ) - { - return Common::GearSet; - } - else if( containerId < 3200 ) - { - return Common::CurrencyCrystal; - } - else if( containerId < 3600 ) - { - return Common::Armory; - } - else - { - return Common::Unknown; - } + if( containerId < 5 ) + { + return Common::Bag; + } + else if( containerId < 2000 ) + { + return Common::GearSet; + } + else if( containerId < 3200 ) + { + return Common::CurrencyCrystal; + } + else if( containerId < 3600 ) + { + return Common::Armory; + } + else + { + return Common::Unknown; + } } uint32_t Core::Items::Util::getNextUId() { - uint32_t charId = 0; - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto pQR = pDb->query( "SELECT MAX(ItemId) FROM charaglobalitem" ); + uint32_t charId = 0; + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pQR = pDb->query( "SELECT MAX(ItemId) FROM charaglobalitem" ); - if( !pQR->next() ) - return 0x00500001; + if( !pQR->next() ) + return 0x00500001; - charId = pQR->getUInt( 1 ) + 1; - if( charId < 0x00500001 ) - return 0x00500001; + charId = pQR->getUInt( 1 ) + 1; + if( charId < 0x00500001 ) + return 0x00500001; - return charId; + return charId; } diff --git a/src/servers/sapphire_zone/Inventory/ItemUtil.h b/src/servers/sapphire_zone/Inventory/ItemUtil.h index b0e63b61..b79e8262 100644 --- a/src/servers/sapphire_zone/Inventory/ItemUtil.h +++ b/src/servers/sapphire_zone/Inventory/ItemUtil.h @@ -8,23 +8,24 @@ namespace Core { namespace Items { namespace Util { - ItemPtr loadItem( uint64_t uId ); +ItemPtr loadItem( uint64_t uId ); - /*! check if weapon category qualifies the weapon as onehanded */ - bool isOneHandedWeapon( Common::ItemUICategory weaponCategory ); +/*! check if weapon category qualifies the weapon as onehanded */ +bool isOneHandedWeapon( Common::ItemUICategory weaponCategory ); - bool isArmory( uint16_t containerId ); - bool isEquipment( uint16_t containerId ); - uint16_t getCharaEquipSlotCategoryToArmoryId( uint8_t slotId ); +bool isArmory( uint16_t containerId ); - Common::ContainerType getContainerType( uint32_t containerId ); +bool isEquipment( uint16_t containerId ); - uint32_t getNextUId(); +uint16_t getCharaEquipSlotCategoryToArmoryId( uint8_t slotId ); + +Common::ContainerType getContainerType( uint32_t containerId ); + +uint32_t getNextUId(); } } } - #endif //SAPPHIRE_ITEMMGR_H diff --git a/src/servers/sapphire_zone/Linkshell/Linkshell.cpp b/src/servers/sapphire_zone/Linkshell/Linkshell.cpp index da3fdd8c..257794e2 100644 --- a/src/servers/sapphire_zone/Linkshell/Linkshell.cpp +++ b/src/servers/sapphire_zone/Linkshell/Linkshell.cpp @@ -2,11 +2,11 @@ Core::Linkshell::Linkshell( uint64_t id, - const std::string &name, + const std::string& name, uint64_t masterId, - const std::set &members, - const std::set &leaders, - const std::set &invites ) : + const std::set< uint64_t >& members, + const std::set< uint64_t >& leaders, + const std::set< uint64_t >& invites ) : m_linkshellId( id ), m_name( name ), m_masterCharacterId( masterId ), @@ -19,77 +19,77 @@ Core::Linkshell::Linkshell( uint64_t id, uint64_t Core::Linkshell::getId() const { - return m_linkshellId; + return m_linkshellId; } uint64_t Core::Linkshell::getMasterId() const { - return m_masterCharacterId; + return m_masterCharacterId; } const std::set< uint64_t >& Core::Linkshell::getMemberIdList() const { - return m_memberIds; + return m_memberIds; } std::set< uint64_t >& Core::Linkshell::getMemberIdList() { - return m_memberIds; + return m_memberIds; } const std::string& Core::Linkshell::getName() const { - return m_name; + return m_name; } const std::set< uint64_t >& Core::Linkshell::getLeaderIdList() const { - return m_leaderIds; + return m_leaderIds; } std::set< uint64_t >& Core::Linkshell::getLeaderIdList() { - return m_leaderIds; + return m_leaderIds; } const std::set< uint64_t >& Core::Linkshell::getInviteIdList() const { - return m_inviteIds; + return m_inviteIds; } -std::set< uint64_t > &Core::Linkshell::getInviteIdList() +std::set< uint64_t >& Core::Linkshell::getInviteIdList() { - return m_inviteIds; + return m_inviteIds; } void Core::Linkshell::addMember( uint64_t memberId ) { - m_memberIds.insert( memberId ); + m_memberIds.insert( memberId ); } void Core::Linkshell::removeMember( uint64_t memberId ) { - m_memberIds.erase( memberId ); + m_memberIds.erase( memberId ); } void Core::Linkshell::addLeader( uint64_t memberId ) { - m_leaderIds.insert( memberId ); + m_leaderIds.insert( memberId ); } void Core::Linkshell::removeLeader( uint64_t memberId ) { - m_leaderIds.erase( memberId ); + m_leaderIds.erase( memberId ); } void Core::Linkshell::addInvite( uint64_t memberId ) { - m_inviteIds.insert( memberId ); + m_inviteIds.insert( memberId ); } void Core::Linkshell::removeInvite( uint64_t memberId ) { - m_inviteIds.erase( memberId ); + m_inviteIds.erase( memberId ); } diff --git a/src/servers/sapphire_zone/Linkshell/Linkshell.h b/src/servers/sapphire_zone/Linkshell/Linkshell.h index 32698e3b..2f4137c0 100644 --- a/src/servers/sapphire_zone/Linkshell/Linkshell.h +++ b/src/servers/sapphire_zone/Linkshell/Linkshell.h @@ -4,56 +4,61 @@ #include #include -namespace Core -{ +namespace Core { class Linkshell { private: - /*! unique ID of the linkshell */ - uint64_t m_linkshellId; - /*! ID of the master character */ - uint64_t m_masterCharacterId; - /*! ID list of all linkshell members */ - std::set< uint64_t > m_memberIds; - /*! Name of the linkshell */ - std::string m_name; - /*! List of member IDs with leader rank */ - std::set< uint64_t > m_leaderIds; - /*! list of IDs of pending character invites */ - std::set< uint64_t > m_inviteIds; + /*! unique ID of the linkshell */ + uint64_t m_linkshellId; + /*! ID of the master character */ + uint64_t m_masterCharacterId; + /*! ID list of all linkshell members */ + std::set< uint64_t > m_memberIds; + /*! Name of the linkshell */ + std::string m_name; + /*! List of member IDs with leader rank */ + std::set< uint64_t > m_leaderIds; + /*! list of IDs of pending character invites */ + std::set< uint64_t > m_inviteIds; public: - Linkshell( uint64_t id, - const std::string& name, - uint64_t masterId, - const std::set< uint64_t >& members, - const std::set< uint64_t >& leaders, - const std::set< uint64_t >& invites ); + Linkshell( uint64_t id, + const std::string& name, + uint64_t masterId, + const std::set< uint64_t >& members, + const std::set< uint64_t >& leaders, + const std::set< uint64_t >& invites ); - uint64_t getId() const; + uint64_t getId() const; - const std::string& getName() const; + const std::string& getName() const; - uint64_t getMasterId() const; + uint64_t getMasterId() const; - const std::set< uint64_t >& getMemberIdList() const; - std::set< uint64_t >& getMemberIdList(); + const std::set< uint64_t >& getMemberIdList() const; - const std::set< uint64_t >& getLeaderIdList() const; - std::set< uint64_t >& getLeaderIdList(); + std::set< uint64_t >& getMemberIdList(); - const std::set< uint64_t >& getInviteIdList() const; - std::set< uint64_t >& getInviteIdList(); + const std::set< uint64_t >& getLeaderIdList() const; - void addMember( uint64_t memberId ); - void removeMember( uint64_t memberId ); + std::set< uint64_t >& getLeaderIdList(); - void addLeader( uint64_t memberId ); - void removeLeader( uint64_t memberId ); + const std::set< uint64_t >& getInviteIdList() const; - void addInvite( uint64_t memberId ); - void removeInvite( uint64_t memberId ); + std::set< uint64_t >& getInviteIdList(); + + void addMember( uint64_t memberId ); + + void removeMember( uint64_t memberId ); + + void addLeader( uint64_t memberId ); + + void removeLeader( uint64_t memberId ); + + void addInvite( uint64_t memberId ); + + void removeInvite( uint64_t memberId ); }; diff --git a/src/servers/sapphire_zone/Linkshell/LinkshellMgr.cpp b/src/servers/sapphire_zone/Linkshell/LinkshellMgr.cpp index ab30816b..84b10609 100644 --- a/src/servers/sapphire_zone/Linkshell/LinkshellMgr.cpp +++ b/src/servers/sapphire_zone/Linkshell/LinkshellMgr.cpp @@ -16,67 +16,67 @@ Core::LinkshellMgr::LinkshellMgr() bool Core::LinkshellMgr::loadLinkshells() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto res = pDb->query( "SELECT LinkshellId, MasterCharacterId, CharacterIdList, " - "LinkshellName, LeaderIdList, InviteIdList " - "FROM infolinkshell " - "ORDER BY LinkshellId ASC;" ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto res = pDb->query( "SELECT LinkshellId, MasterCharacterId, CharacterIdList, " + "LinkshellName, LeaderIdList, InviteIdList " + "FROM infolinkshell " + "ORDER BY LinkshellId ASC;" ); - while( res->next() ) - { - uint64_t linkshellId = res->getUInt64( 1 ); - uint32_t masterId = res->getUInt( 2 ); - std::string name = res->getString( 4 ); + while( res->next() ) + { + uint64_t linkshellId = res->getUInt64( 1 ); + uint32_t masterId = res->getUInt( 2 ); + std::string name = res->getString( 4 ); - auto func = []( std::set< uint64_t >& outList, std::vector< char >& inData ) + auto func = []( std::set< uint64_t >& outList, std::vector< char >& inData ) + { + if( inData.size() ) { - if( inData.size() ) - { - std::vector< uint64_t > list( inData.size() / 8 ); - outList.insert( list.begin(), list.end() ); - } - }; + std::vector< uint64_t > list( inData.size() / 8 ); + outList.insert( list.begin(), list.end() ); + } + }; - std::set< uint64_t > members; - std::vector< char > membersBin; - membersBin = res->getBlobVector( 3 ); - func( members, membersBin ); + std::set< uint64_t > members; + std::vector< char > membersBin; + membersBin = res->getBlobVector( 3 ); + func( members, membersBin ); - std::set< uint64_t > leaders; - std::vector< char > leadersBin; - leadersBin = res->getBlobVector( 5 ); - func( members, leadersBin ); + std::set< uint64_t > leaders; + std::vector< char > leadersBin; + leadersBin = res->getBlobVector( 5 ); + func( members, leadersBin ); - std::set< uint64_t > invites; - std::vector< char > invitesBin; - invitesBin = res->getBlobVector( 6 ); - func( members, invitesBin ); + std::set< uint64_t > invites; + std::vector< char > invitesBin; + invitesBin = res->getBlobVector( 6 ); + func( members, invitesBin ); - auto lsPtr = boost::make_shared< Linkshell >( linkshellId, name, masterId, members, leaders, invites ); - m_linkshellIdMap[linkshellId] = lsPtr; - m_linkshellNameMap[name] = lsPtr; + auto lsPtr = boost::make_shared< Linkshell >( linkshellId, name, masterId, members, leaders, invites ); + m_linkshellIdMap[ linkshellId ] = lsPtr; + m_linkshellNameMap[ name ] = lsPtr; - } + } - return true; + return true; } Core::LinkshellPtr Core::LinkshellMgr::getLinkshellByName( const std::string& name ) { - auto it = m_linkshellNameMap.find( name ); - if( it == m_linkshellNameMap.end() ) - return nullptr; - else - return it->second; + auto it = m_linkshellNameMap.find( name ); + if( it == m_linkshellNameMap.end() ) + return nullptr; + else + return it->second; } Core::LinkshellPtr Core::LinkshellMgr::getLinkshellById( uint64_t lsId ) { - auto it = m_linkshellIdMap.find( lsId ); - if( it == m_linkshellIdMap.end() ) - return nullptr; - else - return it->second; + auto it = m_linkshellIdMap.find( lsId ); + if( it == m_linkshellIdMap.end() ) + return nullptr; + else + return it->second; } diff --git a/src/servers/sapphire_zone/Linkshell/LinkshellMgr.h b/src/servers/sapphire_zone/Linkshell/LinkshellMgr.h index e6274285..63e8c299 100644 --- a/src/servers/sapphire_zone/Linkshell/LinkshellMgr.h +++ b/src/servers/sapphire_zone/Linkshell/LinkshellMgr.h @@ -4,24 +4,25 @@ #include #include -namespace Core -{ +namespace Core { class Linkshell; + using LinkshellPtr = boost::shared_ptr< Linkshell >; class LinkshellMgr { private: - std::map< uint64_t, LinkshellPtr > m_linkshellIdMap; - std::map< std::string, LinkshellPtr > m_linkshellNameMap; + std::map< uint64_t, LinkshellPtr > m_linkshellIdMap; + std::map< std::string, LinkshellPtr > m_linkshellNameMap; - LinkshellPtr getLinkshellByName( const std::string& name ); - LinkshellPtr getLinkshellById( uint64_t lsId ); + LinkshellPtr getLinkshellByName( const std::string& name ); + + LinkshellPtr getLinkshellById( uint64_t lsId ); public: - LinkshellMgr(); + LinkshellMgr(); - bool loadLinkshells(); + bool loadLinkshells(); }; } diff --git a/src/servers/sapphire_zone/Math/CalcBattle.cpp b/src/servers/sapphire_zone/Math/CalcBattle.cpp index 5010537c..a3be3bed 100644 --- a/src/servers/sapphire_zone/Math/CalcBattle.cpp +++ b/src/servers/sapphire_zone/Math/CalcBattle.cpp @@ -33,15 +33,15 @@ using namespace Core::Entity; uint32_t CalcBattle::calculateHealValue( PlayerPtr pPlayer, uint32_t potency ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto classInfo = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( pPlayer->getClass() ) ); - auto paramGrowthInfo = pExdData->get< Core::Data::ParamGrow >( pPlayer->getLevel() ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto classInfo = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( pPlayer->getClass() ) ); + auto paramGrowthInfo = pExdData->get< Core::Data::ParamGrow >( pPlayer->getLevel() ); - if( !classInfo || !paramGrowthInfo ) - return 0; + if( !classInfo || !paramGrowthInfo ) + return 0; - //auto jobModVal = classInfoIt->second; + //auto jobModVal = classInfoIt->second; - // consider 3% variation - return potency / 10; + // consider 3% variation + return potency / 10; } diff --git a/src/servers/sapphire_zone/Math/CalcBattle.h b/src/servers/sapphire_zone/Math/CalcBattle.h index c1c12ca7..46887774 100644 --- a/src/servers/sapphire_zone/Math/CalcBattle.h +++ b/src/servers/sapphire_zone/Math/CalcBattle.h @@ -8,15 +8,15 @@ using namespace Core::Entity; namespace Core { namespace Math { - - class CalcBattle - { - public: - static uint32_t calculateHealValue( PlayerPtr pPlayer, uint32_t potency ); - private: +class CalcBattle +{ +public: + static uint32_t calculateHealValue( PlayerPtr pPlayer, uint32_t potency ); - }; +private: + +}; } } diff --git a/src/servers/sapphire_zone/Math/CalcStats.cpp b/src/servers/sapphire_zone/Math/CalcStats.cpp index 2f8932e6..966d50df 100644 --- a/src/servers/sapphire_zone/Math/CalcStats.cpp +++ b/src/servers/sapphire_zone/Math/CalcStats.cpp @@ -36,22 +36,22 @@ extern Core::Framework g_fw; float CalcStats::calculateBaseStat( PlayerPtr pPlayer ) { - float base = 0.0f; - uint8_t level = pPlayer->getLevel(); + float base = 0.0f; + uint8_t level = pPlayer->getLevel(); - // SB Base Stat Formula (Aligned) - if( level > 60 ) - { - base = static_cast< float >( ( ( ( level == 61 ) ? 224 : 220 ) + ( level - 61 ) * 8) ); - } - // HW Base Stat Formula (Aligned) - else if ( level > 50 ) - base = 1.63f * level + 121.02f; - // ARR Base Stat Formula (Off by one in several cases) - else - base = 0.052602f * ( level * level ) + ( 1.0179f * level ) + 19.6f; + // SB Base Stat Formula (Aligned) + if( level > 60 ) + { + base = static_cast< float >( ( ( ( level == 61 ) ? 224 : 220 ) + ( level - 61 ) * 8 ) ); + } + // HW Base Stat Formula (Aligned) + else if( level > 50 ) + base = 1.63f * level + 121.02f; + // ARR Base Stat Formula (Off by one in several cases) + else + base = 0.052602f * ( level * level ) + ( 1.0179f * level ) + 19.6f; - return base; + return base; } // Leggerless' HP Formula @@ -59,37 +59,38 @@ float CalcStats::calculateBaseStat( PlayerPtr pPlayer ) uint32_t CalcStats::calculateMaxHp( PlayerPtr pPlayer ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - // TODO: Replace ApproxBaseHP with something that can get us an accurate BaseHP. - // Is there any way to pull reliable BaseHP without having to manually use a pet for every level, and using the values from a table? - // More info here: https://docs.google.com/spreadsheets/d/1de06KGT0cNRUvyiXNmjNgcNvzBCCQku7jte5QxEQRbs/edit?usp=sharing - - auto classInfo = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( pPlayer->getClass() ) ); - auto paramGrowthInfo = pExdData->get< Core::Data::ParamGrow >( pPlayer->getLevel() ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + // TODO: Replace ApproxBaseHP with something that can get us an accurate BaseHP. + // Is there any way to pull reliable BaseHP without having to manually use a pet for every level, and using the values from a table? + // More info here: https://docs.google.com/spreadsheets/d/1de06KGT0cNRUvyiXNmjNgcNvzBCCQku7jte5QxEQRbs/edit?usp=sharing - if( !classInfo || !paramGrowthInfo ) - return 0; + auto classInfo = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( pPlayer->getClass() ) ); + auto paramGrowthInfo = pExdData->get< Core::Data::ParamGrow >( pPlayer->getLevel() ); - uint8_t level = pPlayer->getLevel(); + if( !classInfo || !paramGrowthInfo ) + return 0; - float baseStat = calculateBaseStat( pPlayer ); - uint16_t vitStat = pPlayer->getStats().vit; - uint16_t hpMod = paramGrowthInfo->hpModifier; - uint16_t jobModHp = classInfo->modifierHitPoints; - float approxBaseHp = 0.0f; // Read above + uint8_t level = pPlayer->getLevel(); - // These values are not precise. + float baseStat = calculateBaseStat( pPlayer ); + uint16_t vitStat = pPlayer->getStats().vit; + uint16_t hpMod = paramGrowthInfo->hpModifier; + uint16_t jobModHp = classInfo->modifierHitPoints; + float approxBaseHp = 0.0f; // Read above - if ( level >= 60 ) - approxBaseHp = static_cast< float >( 2600 + ( level - 60 ) * 100 ); - else if ( level >= 50 ) - approxBaseHp = 1700 + ( ( level - 50 ) * ( 1700 * 1.04325f ) ); - else - approxBaseHp = paramGrowthInfo->mpModifier * 0.7667f; + // These values are not precise. - uint16_t result = static_cast< uint16_t >( floor( jobModHp * ( approxBaseHp / 100.0f ) ) + floor( hpMod / 100.0f * ( vitStat - baseStat ) ) ); + if( level >= 60 ) + approxBaseHp = static_cast< float >( 2600 + ( level - 60 ) * 100 ); + else if( level >= 50 ) + approxBaseHp = 1700 + ( ( level - 50 ) * ( 1700 * 1.04325f ) ); + else + approxBaseHp = paramGrowthInfo->mpModifier * 0.7667f; - return result; + uint16_t result = static_cast< uint16_t >( floor( jobModHp * ( approxBaseHp / 100.0f ) ) + + floor( hpMod / 100.0f * ( vitStat - baseStat ) ) ); + + return result; } // Leggerless' MP Formula @@ -97,20 +98,21 @@ uint32_t CalcStats::calculateMaxHp( PlayerPtr pPlayer ) uint32_t CalcStats::calculateMaxMp( PlayerPtr pPlayer ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto classInfo = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( pPlayer->getClass() ) ); - auto paramGrowthInfo = pExdData->get< Core::Data::ParamGrow >( pPlayer->getLevel() ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto classInfo = pExdData->get< Core::Data::ClassJob >( static_cast< uint8_t >( pPlayer->getClass() ) ); + auto paramGrowthInfo = pExdData->get< Core::Data::ParamGrow >( pPlayer->getLevel() ); - if( !classInfo || !paramGrowthInfo ) - return 0; + if( !classInfo || !paramGrowthInfo ) + return 0; - float baseStat = calculateBaseStat( pPlayer ); - uint16_t piety = pPlayer->getStats().pie; - uint16_t pietyScalar = paramGrowthInfo->mpModifier; - uint16_t jobModMp = classInfo->modifierManaPoints; - uint16_t baseMp = paramGrowthInfo->mpModifier; + float baseStat = calculateBaseStat( pPlayer ); + uint16_t piety = pPlayer->getStats().pie; + uint16_t pietyScalar = paramGrowthInfo->mpModifier; + uint16_t jobModMp = classInfo->modifierManaPoints; + uint16_t baseMp = paramGrowthInfo->mpModifier; - uint16_t result = static_cast< uint16_t >( floor( floor( piety - baseStat ) * ( pietyScalar / 100 ) + baseMp ) * jobModMp / 100 ); + uint16_t result = static_cast< uint16_t >( floor( floor( piety - baseStat ) * ( pietyScalar / 100 ) + baseMp ) * + jobModMp / 100 ); - return result; + return result; } diff --git a/src/servers/sapphire_zone/Math/CalcStats.h b/src/servers/sapphire_zone/Math/CalcStats.h index ed11cfa0..2c9f5785 100644 --- a/src/servers/sapphire_zone/Math/CalcStats.h +++ b/src/servers/sapphire_zone/Math/CalcStats.h @@ -8,17 +8,19 @@ using namespace Core::Entity; namespace Core { namespace Math { - - class CalcStats - { - public: - static float calculateBaseStat( PlayerPtr pPlayer ); - static uint32_t calculateMaxMp( PlayerPtr pPlayer ); - static uint32_t calculateMaxHp( PlayerPtr pPlayer ); - private: +class CalcStats +{ +public: + static float calculateBaseStat( PlayerPtr pPlayer ); - }; + static uint32_t calculateMaxMp( PlayerPtr pPlayer ); + + static uint32_t calculateMaxHp( PlayerPtr pPlayer ); + +private: + +}; } } diff --git a/src/servers/sapphire_zone/Network/GameConnection.cpp b/src/servers/sapphire_zone/Network/GameConnection.cpp index d93953b3..949c3b38 100644 --- a/src/servers/sapphire_zone/Network/GameConnection.cpp +++ b/src/servers/sapphire_zone/Network/GameConnection.cpp @@ -30,77 +30,89 @@ using namespace Core::Network::Packets::Server; Core::Network::GameConnection::GameConnection( Core::Network::HivePtr pHive, Core::Network::AcceptorPtr pAcceptor ) - : Connection( pHive ) - , m_pAcceptor( pAcceptor ) - , m_conType( ConnectionType::None ) + : + Connection( pHive ), m_pAcceptor( pAcceptor ), m_conType( ConnectionType::None ) { - auto setZoneHandler = [=]( uint16_t opcode, std::string handlerName, GameConnection::Handler pHandler ) - { - m_zoneHandlerMap[opcode] = pHandler; - m_zoneHandlerStrMap[opcode] = handlerName; - }; + auto setZoneHandler = [ = ]( uint16_t opcode, std::string handlerName, GameConnection::Handler pHandler ) + { + m_zoneHandlerMap[ opcode ] = pHandler; + m_zoneHandlerStrMap[ opcode ] = handlerName; + }; - auto setChatHandler = [=]( uint16_t opcode, std::string handlerName, GameConnection::Handler pHandler ) - { - m_chatHandlerMap[opcode] = pHandler; - m_chatHandlerStrMap[opcode] = handlerName; - }; + auto setChatHandler = [ = ]( uint16_t opcode, std::string handlerName, GameConnection::Handler pHandler ) + { + m_chatHandlerMap[ opcode ] = pHandler; + m_chatHandlerStrMap[ opcode ] = handlerName; + }; - setZoneHandler( ClientZoneIpcType::PingHandler, "PingHandler", &GameConnection::pingHandler ); - setZoneHandler( ClientZoneIpcType::InitHandler, "InitHandler", &GameConnection::initHandler ); - setZoneHandler( ClientZoneIpcType::ChatHandler, "ChatHandler", &GameConnection::chatHandler ); + setZoneHandler( ClientZoneIpcType::PingHandler, "PingHandler", &GameConnection::pingHandler ); + setZoneHandler( ClientZoneIpcType::InitHandler, "InitHandler", &GameConnection::initHandler ); + setZoneHandler( ClientZoneIpcType::ChatHandler, "ChatHandler", &GameConnection::chatHandler ); - setZoneHandler( ClientZoneIpcType::FinishLoadingHandler, "FinishLoadingHandler", &GameConnection::finishLoadingHandler ); + setZoneHandler( ClientZoneIpcType::FinishLoadingHandler, "FinishLoadingHandler", + &GameConnection::finishLoadingHandler ); - setZoneHandler( ClientZoneIpcType::PlayTimeHandler, "PlayTimeHandler", &GameConnection::playTimeHandler ); - setZoneHandler( ClientZoneIpcType::LogoutHandler, "LogoutHandler", &GameConnection::logoutHandler ); + setZoneHandler( ClientZoneIpcType::PlayTimeHandler, "PlayTimeHandler", &GameConnection::playTimeHandler ); + setZoneHandler( ClientZoneIpcType::LogoutHandler, "LogoutHandler", &GameConnection::logoutHandler ); - setZoneHandler( ClientZoneIpcType::SocialListHandler, "SocialListHandler", &GameConnection::socialListHandler ); - setZoneHandler( ClientZoneIpcType::SetSearchInfoHandler, "SetSearchInfoHandler", &GameConnection::setSearchInfoHandler ); - setZoneHandler( ClientZoneIpcType::ReqSearchInfoHandler, "ReqSearchInfoHandler", &GameConnection::reqSearchInfoHandler ); + setZoneHandler( ClientZoneIpcType::SocialListHandler, "SocialListHandler", &GameConnection::socialListHandler ); + setZoneHandler( ClientZoneIpcType::SetSearchInfoHandler, "SetSearchInfoHandler", + &GameConnection::setSearchInfoHandler ); + setZoneHandler( ClientZoneIpcType::ReqSearchInfoHandler, "ReqSearchInfoHandler", + &GameConnection::reqSearchInfoHandler ); - setZoneHandler( ClientZoneIpcType::BlackListHandler, "BlackListHandler", &GameConnection::blackListHandler ); + setZoneHandler( ClientZoneIpcType::BlackListHandler, "BlackListHandler", &GameConnection::blackListHandler ); - setZoneHandler( ClientZoneIpcType::LinkshellListHandler, "LinkshellListHandler", &GameConnection::linkshellListHandler ); + setZoneHandler( ClientZoneIpcType::LinkshellListHandler, "LinkshellListHandler", + &GameConnection::linkshellListHandler ); - setZoneHandler( ClientZoneIpcType::FcInfoReqHandler, "FcInfoReqHandler", &GameConnection::fcInfoReqHandler ); + setZoneHandler( ClientZoneIpcType::FcInfoReqHandler, "FcInfoReqHandler", &GameConnection::fcInfoReqHandler ); - setZoneHandler( ClientZoneIpcType::ZoneLineHandler, "ZoneLineHandler", &GameConnection::zoneLineHandler ); - setZoneHandler( ClientZoneIpcType::ClientTrigger, "ClientTrigger", &GameConnection::clientTriggerHandler ); + setZoneHandler( ClientZoneIpcType::ZoneLineHandler, "ZoneLineHandler", &GameConnection::zoneLineHandler ); + setZoneHandler( ClientZoneIpcType::ClientTrigger, "ClientTrigger", &GameConnection::clientTriggerHandler ); - setZoneHandler( ClientZoneIpcType::DiscoveryHandler, "DiscoveryHandler", &GameConnection::discoveryHandler ); + setZoneHandler( ClientZoneIpcType::DiscoveryHandler, "DiscoveryHandler", &GameConnection::discoveryHandler ); - setZoneHandler( ClientZoneIpcType::SkillHandler, "ActionHandler", &GameConnection::actionHandler ); + setZoneHandler( ClientZoneIpcType::SkillHandler, "ActionHandler", &GameConnection::actionHandler ); - setZoneHandler( ClientZoneIpcType::GMCommand1, "GMCommand1", &GameConnection::gm1Handler ); - setZoneHandler( ClientZoneIpcType::GMCommand2, "GMCommand2", &GameConnection::gm2Handler ); + setZoneHandler( ClientZoneIpcType::GMCommand1, "GMCommand1", &GameConnection::gm1Handler ); + setZoneHandler( ClientZoneIpcType::GMCommand2, "GMCommand2", &GameConnection::gm2Handler ); - setZoneHandler( ClientZoneIpcType::UpdatePositionHandler,"UpdatePositionHandler", &GameConnection::updatePositionHandler ); + setZoneHandler( ClientZoneIpcType::UpdatePositionHandler, "UpdatePositionHandler", + &GameConnection::updatePositionHandler ); - setZoneHandler( ClientZoneIpcType::InventoryModifyHandler,"InventoryModifyHandler", &GameConnection::inventoryModifyHandler ); + setZoneHandler( ClientZoneIpcType::InventoryModifyHandler, "InventoryModifyHandler", + &GameConnection::inventoryModifyHandler ); - setZoneHandler( ClientZoneIpcType::TalkEventHandler, "EventHandlerTalk", &GameConnection::eventHandlerTalk ); - setZoneHandler( ClientZoneIpcType::EmoteEventHandler, "EventHandlerEmote", &GameConnection::eventHandlerEmote ); - setZoneHandler( ClientZoneIpcType::WithinRangeEventHandler, "EventHandlerWithinRange", &GameConnection::eventHandlerWithinRange ); - setZoneHandler( ClientZoneIpcType::OutOfRangeEventHandler, "EventHandlerOutsideRange", &GameConnection::eventHandlerOutsideRange ); - setZoneHandler( ClientZoneIpcType::EnterTeriEventHandler, "EventHandlerEnterTeri", &GameConnection::eventHandlerEnterTerritory ); + setZoneHandler( ClientZoneIpcType::TalkEventHandler, "EventHandlerTalk", &GameConnection::eventHandlerTalk ); + setZoneHandler( ClientZoneIpcType::EmoteEventHandler, "EventHandlerEmote", &GameConnection::eventHandlerEmote ); + setZoneHandler( ClientZoneIpcType::WithinRangeEventHandler, "EventHandlerWithinRange", + &GameConnection::eventHandlerWithinRange ); + setZoneHandler( ClientZoneIpcType::OutOfRangeEventHandler, "EventHandlerOutsideRange", + &GameConnection::eventHandlerOutsideRange ); + setZoneHandler( ClientZoneIpcType::EnterTeriEventHandler, "EventHandlerEnterTeri", + &GameConnection::eventHandlerEnterTerritory ); - setZoneHandler( ClientZoneIpcType::ReturnEventHandler, "EventHandlerReturn", &GameConnection::eventHandlerReturn ); - setZoneHandler( ClientZoneIpcType::TradeReturnEventHandler, "EventHandlerReturn", &GameConnection::eventHandlerReturn ); + setZoneHandler( ClientZoneIpcType::ReturnEventHandler, "EventHandlerReturn", &GameConnection::eventHandlerReturn ); + setZoneHandler( ClientZoneIpcType::TradeReturnEventHandler, "EventHandlerReturn", + &GameConnection::eventHandlerReturn ); - setZoneHandler( ClientZoneIpcType::LinkshellEventHandler, "LinkshellEventHandler", &GameConnection::eventHandlerLinkshell ); - setZoneHandler( ClientZoneIpcType::LinkshellEventHandler1, "LinkshellEventHandler1", &GameConnection::eventHandlerLinkshell ); + setZoneHandler( ClientZoneIpcType::LinkshellEventHandler, "LinkshellEventHandler", + &GameConnection::eventHandlerLinkshell ); + setZoneHandler( ClientZoneIpcType::LinkshellEventHandler1, "LinkshellEventHandler1", + &GameConnection::eventHandlerLinkshell ); - setZoneHandler( ClientZoneIpcType::CFDutyInfoHandler, "CFDutyInfoRequest", &GameConnection::cfDutyInfoRequest ); - setZoneHandler( ClientZoneIpcType::CFRegisterDuty, "CFRegisterDuty", &GameConnection::cfRegisterDuty ); - setZoneHandler( ClientZoneIpcType::CFRegisterRoulette, "CFRegisterRoulette", &GameConnection::cfRegisterRoulette ); - setZoneHandler( ClientZoneIpcType::CFCommenceHandler, "CFDutyAccepted", &GameConnection::cfDutyAccepted); + setZoneHandler( ClientZoneIpcType::CFDutyInfoHandler, "CFDutyInfoRequest", &GameConnection::cfDutyInfoRequest ); + setZoneHandler( ClientZoneIpcType::CFRegisterDuty, "CFRegisterDuty", &GameConnection::cfRegisterDuty ); + setZoneHandler( ClientZoneIpcType::CFRegisterRoulette, "CFRegisterRoulette", &GameConnection::cfRegisterRoulette ); + setZoneHandler( ClientZoneIpcType::CFCommenceHandler, "CFDutyAccepted", &GameConnection::cfDutyAccepted ); - setZoneHandler( ClientZoneIpcType::ReqEquipDisplayFlagsChange, "ReqEquipDisplayFlagsChange", &GameConnection::reqEquipDisplayFlagsHandler ); + setZoneHandler( ClientZoneIpcType::ReqEquipDisplayFlagsChange, "ReqEquipDisplayFlagsChange", + &GameConnection::reqEquipDisplayFlagsHandler ); - setZoneHandler( ClientZoneIpcType::PerformNoteHandler, "PerformNoteHandler", &GameConnection::performNoteHandler ); + setZoneHandler( ClientZoneIpcType::PerformNoteHandler, "PerformNoteHandler", &GameConnection::performNoteHandler ); - setChatHandler( ClientChatIpcType::TellReq, "TellReq", &GameConnection::tellHandler); + setChatHandler( ClientChatIpcType::TellReq, "TellReq", &GameConnection::tellHandler ); } @@ -108,368 +120,369 @@ Core::Network::GameConnection::~GameConnection() = default; // overwrite the parents onConnect for our game socket needs -void Core::Network::GameConnection::OnAccept( const std::string & host, uint16_t port ) +void Core::Network::GameConnection::OnAccept( const std::string& host, uint16_t port ) { - GameConnectionPtr connection( new GameConnection( m_hive, m_pAcceptor ) ); - m_pAcceptor->Accept( connection ); - auto pLog = g_fw.get< Logger >(); - pLog->info( "Connect from " + m_socket.remote_endpoint().address().to_string() ); + GameConnectionPtr connection( new GameConnection( m_hive, m_pAcceptor ) ); + m_pAcceptor->Accept( connection ); + auto pLog = g_fw.get< Logger >(); + pLog->info( "Connect from " + m_socket.remote_endpoint().address().to_string() ); } void Core::Network::GameConnection::OnDisconnect() { - auto pLog = g_fw.get< Logger >(); - pLog->debug( "GameConnection DISCONNECT" ); - m_pSession = nullptr; + auto pLog = g_fw.get< Logger >(); + pLog->debug( "GameConnection DISCONNECT" ); + m_pSession = nullptr; } -void Core::Network::GameConnection::OnRecv( std::vector< uint8_t > & buffer ) +void Core::Network::GameConnection::OnRecv( std::vector< uint8_t >& buffer ) { - // This is assumed packet always start with valid FFXIVARR_PACKET_HEADER for now. - auto pLog = g_fw.get< Logger >(); - Packets::FFXIVARR_PACKET_HEADER packetHeader{}; - const auto headerResult = Packets::getHeader( buffer, 0, packetHeader ); + // This is assumed packet always start with valid FFXIVARR_PACKET_HEADER for now. + auto pLog = g_fw.get< Logger >(); + Packets::FFXIVARR_PACKET_HEADER packetHeader{}; + const auto headerResult = Packets::getHeader( buffer, 0, packetHeader ); - if( headerResult == Incomplete ) - { - pLog->info( "Dropping connection due to incomplete packet header." ); - pLog->info( "FIXME: Packet message bounary is not implemented." ); - Disconnect(); - return; - } - else if( headerResult == Malformed ) - { - pLog->info( "Dropping connection due to malformed packet header." ); - Disconnect(); - return; - } - - // Dissect packet list - std::vector< Packets::FFXIVARR_PACKET_RAW > packetList; - const auto packetResult = Packets::getPackets( buffer, sizeof( struct FFXIVARR_PACKET_HEADER ), - packetHeader, packetList ); - - if( packetResult == Incomplete ) - { - pLog->info( "Dropping connection due to incomplete packets." ); - pLog->info( "FIXME: Packet message bounary is not implemented." ); - Disconnect(); - return; - } - else if( packetResult == Malformed ) - { - pLog->info( "Dropping connection due to malformed packets." ); - Disconnect(); - return; - } - - // Handle it - handlePackets( packetHeader, packetList ); + if( headerResult == Incomplete ) + { + pLog->info( "Dropping connection due to incomplete packet header." ); + pLog->info( "FIXME: Packet message bounary is not implemented." ); + Disconnect(); + return; + } + else if( headerResult == Malformed ) + { + pLog->info( "Dropping connection due to malformed packet header." ); + Disconnect(); + return; + } + + // Dissect packet list + std::vector< Packets::FFXIVARR_PACKET_RAW > packetList; + const auto packetResult = Packets::getPackets( buffer, sizeof( struct FFXIVARR_PACKET_HEADER ), + packetHeader, packetList ); + + if( packetResult == Incomplete ) + { + pLog->info( "Dropping connection due to incomplete packets." ); + pLog->info( "FIXME: Packet message bounary is not implemented." ); + Disconnect(); + return; + } + else if( packetResult == Malformed ) + { + pLog->info( "Dropping connection due to malformed packets." ); + Disconnect(); + return; + } + + // Handle it + handlePackets( packetHeader, packetList ); } -void Core::Network::GameConnection::OnError( const boost::system::error_code & error ) +void Core::Network::GameConnection::OnError( const boost::system::error_code& error ) { - auto pLog = g_fw.get< Logger >(); - pLog->debug( "GameConnection ERROR: " + error.message() ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( "GameConnection ERROR: " + error.message() ); } void Core::Network::GameConnection::queueInPacket( Core::Network::Packets::FFXIVARR_PACKET_RAW inPacket ) { - m_inQueue.push( inPacket ); + m_inQueue.push( inPacket ); } void Core::Network::GameConnection::queueOutPacket( Core::Network::Packets::FFXIVPacketBasePtr outPacket ) { - m_outQueue.push( outPacket ); + m_outQueue.push( outPacket ); } void Core::Network::GameConnection::handleZonePacket( Core::Network::Packets::FFXIVARR_PACKET_RAW& pPacket ) { - auto pLog = g_fw.get< Logger >(); - uint16_t opcode = *reinterpret_cast< uint16_t* >( &pPacket.data[0x02] ); - auto it = m_zoneHandlerMap.find( opcode ); + auto pLog = g_fw.get< Logger >(); + uint16_t opcode = *reinterpret_cast< uint16_t* >( &pPacket.data[ 0x02 ] ); + auto it = m_zoneHandlerMap.find( opcode ); - std::string sessionStr = "[" + std::to_string( m_pSession->getId() ) + "]"; + std::string sessionStr = "[" + std::to_string( m_pSession->getId() ) + "]"; - if( it != m_zoneHandlerMap.end() ) - { - auto itStr = m_zoneHandlerStrMap.find( opcode ); - std::string name = itStr != m_zoneHandlerStrMap.end() ? itStr->second : "unknown"; - // dont display packet notification if it is a ping or pos update, don't want the spam - if( opcode != PingHandler && - opcode != UpdatePositionHandler ) + if( it != m_zoneHandlerMap.end() ) + { + auto itStr = m_zoneHandlerStrMap.find( opcode ); + std::string name = itStr != m_zoneHandlerStrMap.end() ? itStr->second : "unknown"; + // dont display packet notification if it is a ping or pos update, don't want the spam + if( opcode != PingHandler && + opcode != UpdatePositionHandler ) - pLog->debug( sessionStr + " Handling Zone IPC : " + name + "( " + - boost::str( boost::format( "%|04X|" ) % - static_cast< uint32_t >( opcode ) ) + " )" ); - - ( this->*( it->second ) )( pPacket, *m_pSession->getPlayer() ); - } - else - { - pLog->debug( sessionStr + " Undefined Zone IPC : Unknown ( " + + pLog->debug( sessionStr + " Handling Zone IPC : " + name + "( " + boost::str( boost::format( "%|04X|" ) % - static_cast< uint32_t >( opcode ) ) + " )" ); - pLog->debug( "Dump:\n" + Util::binaryToHexDump( const_cast< uint8_t* >( &pPacket.data[0] ), pPacket.segHdr.size ) ); - } + static_cast< uint32_t >( opcode ) ) + " )" ); + + ( this->*( it->second ) )( pPacket, *m_pSession->getPlayer() ); + } + else + { + pLog->debug( sessionStr + " Undefined Zone IPC : Unknown ( " + + boost::str( boost::format( "%|04X|" ) % + static_cast< uint32_t >( opcode ) ) + " )" ); + pLog->debug( + "Dump:\n" + Util::binaryToHexDump( const_cast< uint8_t* >( &pPacket.data[ 0 ] ), pPacket.segHdr.size ) ); + } } void Core::Network::GameConnection::handleChatPacket( Core::Network::Packets::FFXIVARR_PACKET_RAW& pPacket ) { - auto pLog = g_fw.get< Logger >(); - uint16_t opcode = *reinterpret_cast< uint16_t* >( &pPacket.data[0x02] ); - auto it = m_chatHandlerMap.find( opcode ); + auto pLog = g_fw.get< Logger >(); + uint16_t opcode = *reinterpret_cast< uint16_t* >( &pPacket.data[ 0x02 ] ); + auto it = m_chatHandlerMap.find( opcode ); - std::string sessionStr = "[" + std::to_string( m_pSession->getId() ) + "]"; + std::string sessionStr = "[" + std::to_string( m_pSession->getId() ) + "]"; - if( it != m_chatHandlerMap.end() ) - { - auto itStr = m_chatHandlerStrMap.find( opcode ); - std::string name = itStr != m_chatHandlerStrMap.end() ? itStr->second : "unknown"; - // dont display packet notification if it is a ping or pos update, don't want the spam + if( it != m_chatHandlerMap.end() ) + { + auto itStr = m_chatHandlerStrMap.find( opcode ); + std::string name = itStr != m_chatHandlerStrMap.end() ? itStr->second : "unknown"; + // dont display packet notification if it is a ping or pos update, don't want the spam - pLog->debug( sessionStr + " Handling Chat IPC : " + name + "( " + - boost::str( boost::format( "%|04X|" ) % - static_cast< uint32_t >( opcode ) ) + " )" ); + pLog->debug( sessionStr + " Handling Chat IPC : " + name + "( " + + boost::str( boost::format( "%|04X|" ) % + static_cast< uint32_t >( opcode ) ) + " )" ); - ( this->*( it->second ) )( pPacket, *m_pSession->getPlayer() ); - } - else - { - pLog->debug( sessionStr + " Undefined Chat IPC : Unknown ( " + - boost::str( boost::format( "%|04X|" ) % - static_cast< uint32_t >( opcode ) ) + " )" ); - //pLog->debug( pPacket.toString() ); - } + ( this->*( it->second ) )( pPacket, *m_pSession->getPlayer() ); + } + else + { + pLog->debug( sessionStr + " Undefined Chat IPC : Unknown ( " + + boost::str( boost::format( "%|04X|" ) % + static_cast< uint32_t >( opcode ) ) + " )" ); + //pLog->debug( pPacket.toString() ); + } } void Core::Network::GameConnection::handlePacket( Core::Network::Packets::FFXIVARR_PACKET_RAW& pPacket ) { - if( !m_pSession ) - return; + if( !m_pSession ) + return; - switch( m_conType ) - { - case Network::ConnectionType::Zone: - handleZonePacket( pPacket ); - break; + switch( m_conType ) + { + case Network::ConnectionType::Zone: + handleZonePacket( pPacket ); + break; - case Network::ConnectionType::Chat: - handleChatPacket( pPacket ); - break; + case Network::ConnectionType::Chat: + handleChatPacket( pPacket ); + break; - default: - break; - } + default: + break; + } } void Core::Network::GameConnection::sendPackets( Packets::PacketContainer* pPacket ) { - //g_log.Log(LoggingSeverity::info, pPacket->toString()); - std::vector< uint8_t > sendBuffer; + //g_log.Log(LoggingSeverity::info, pPacket->toString()); + std::vector< uint8_t > sendBuffer; - pPacket->fillSendBuffer( sendBuffer ); - Send( sendBuffer ); + pPacket->fillSendBuffer( sendBuffer ); + Send( sendBuffer ); } void Core::Network::GameConnection::processInQueue() { - // handle the incoming game packets - while( m_inQueue.size() ) - { - auto pPacket = m_inQueue.pop(); - handlePacket( pPacket ); - } + // handle the incoming game packets + while( m_inQueue.size() ) + { + auto pPacket = m_inQueue.pop(); + handlePacket( pPacket ); + } } void Core::Network::GameConnection::processOutQueue() { - auto pLog = g_fw.get< Logger >(); - if( m_outQueue.size() < 1 ) - return; + auto pLog = g_fw.get< Logger >(); + if( m_outQueue.size() < 1 ) + return; - int32_t totalSize = 0; + int32_t totalSize = 0; - // create a new packet container - PacketContainer pRP = PacketContainer( m_pSession->getId() ); + // create a new packet container + PacketContainer pRP = PacketContainer( m_pSession->getId() ); - // get next packet off the queue - while( auto pPacket = m_outQueue.pop() ) - { - if( pPacket->getSize() == 0 ) - { - pLog->debug( "end of packet set" ); - break; - } + // get next packet off the queue + while( auto pPacket = m_outQueue.pop() ) + { + if( pPacket->getSize() == 0 ) + { + pLog->debug( "end of packet set" ); + break; + } - pRP.addPacket( pPacket ); - totalSize += pPacket->getSize(); - } + pRP.addPacket( pPacket ); + totalSize += pPacket->getSize(); + } - if( totalSize > 0 ) - sendPackets( &pRP ); + if( totalSize > 0 ) + sendPackets( &pRP ); } void Core::Network::GameConnection::sendSinglePacket( Core::Network::Packets::FFXIVPacketBasePtr pPacket ) { - PacketContainer pRP = PacketContainer(); - pRP.addPacket( pPacket ); - sendPackets( &pRP ); + PacketContainer pRP = PacketContainer(); + pRP.addPacket( pPacket ); + sendPackets( &pRP ); } void Core::Network::GameConnection::injectPacket( const std::string& packetpath, Core::Entity::Player& player ) { - char packet[0x11570]; - memset( packet, 0, 0x11570 ); + char packet[0x11570]; + memset( packet, 0, 0x11570 ); - // get the packet name / path from the command arguments - FILE *fp = nullptr; - fp = fopen( packetpath.c_str(), "rb" ); - if( fp == nullptr ) - { - player.sendDebug( "Packet " + packetpath + " not found!" ); + // get the packet name / path from the command arguments + FILE* fp = nullptr; + fp = fopen( packetpath.c_str(), "rb" ); + if( fp == nullptr ) + { + player.sendDebug( "Packet " + packetpath + " not found!" ); + return; + } + + // read the packet into the buffer + fseek( fp, 0, SEEK_END ); + int32_t size = ftell( fp ); + rewind( fp ); + if( fread( packet, sizeof( char ), size, fp ) != size ) + { + player.sendDebug( "Packet " + packetpath + " did not read full size: " + std::to_string( size ) ); + return; + } + fclose( fp ); + + // cycle through the packet entries and queue each one + for( int32_t k = 0x18; k < size; ) + { + uint32_t tmpId = player.getId(); + // replace ids in the entryheader if needed + if( !memcmp( packet + k + 0x04, packet + k + 0x08, 4 ) ) + { + memcpy( packet + k + 0x04, &tmpId, 4 ); + memcpy( packet + k + 0x08, &tmpId, 4 ); + } + else + memcpy( packet + k + 0x08, &tmpId, 4 ); + + uint16_t pSize = *reinterpret_cast< uint16_t* >( packet + k ); + // queue packet to the session + if( pSize == 0 ) return; - } - // read the packet into the buffer - fseek( fp, 0, SEEK_END ); - int32_t size = ftell( fp ); - rewind( fp ); - if ( fread( packet, sizeof( char ), size, fp ) != size ) - { - player.sendDebug( "Packet " + packetpath + " did not read full size: " + std::to_string( size ) ); - return; - } - fclose( fp ); + queueOutPacket( FFXIVPacketBasePtr( new FFXIVRawPacket( packet + k, pSize ) ) ); - // cycle through the packet entries and queue each one - for( int32_t k = 0x18; k < size; ) - { - uint32_t tmpId = player.getId(); - // replace ids in the entryheader if needed - if( !memcmp( packet + k + 0x04, packet + k + 0x08, 4 ) ) - { - memcpy( packet + k + 0x04, &tmpId, 4 ); - memcpy( packet + k + 0x08, &tmpId, 4 ); - } - else - memcpy( packet + k + 0x08, &tmpId, 4 ); - - uint16_t pSize = *reinterpret_cast< uint16_t* >( packet + k ); - // queue packet to the session - if( pSize == 0 ) - return; - - queueOutPacket( FFXIVPacketBasePtr( new FFXIVRawPacket( packet + k, pSize ) ) ); - - k += ( pSize ); - } + k += ( pSize ); + } } void Core::Network::GameConnection::handlePackets( const Core::Network::Packets::FFXIVARR_PACKET_HEADER& ipcHeader, const std::vector< Core::Network::Packets::FFXIVARR_PACKET_RAW >& packetData ) { - auto pLog = g_fw.get< Logger >(); - auto pServerZone = g_fw.get< ServerZone >(); - // if a session is set, update the last time it recieved a game packet - if( m_pSession ) - m_pSession->updateLastDataTime(); + auto pLog = g_fw.get< Logger >(); + auto pServerZone = g_fw.get< ServerZone >(); + // if a session is set, update the last time it recieved a game packet + if( m_pSession ) + m_pSession->updateLastDataTime(); - for( auto inPacket : packetData ) - { - switch( inPacket.segHdr.type ) - { + for( auto inPacket : packetData ) + { + switch( inPacket.segHdr.type ) + { case SEGMENTTYPE_SESSIONINIT: { - char* id = ( char* ) &( inPacket.data[4] ); - uint32_t playerId = boost::lexical_cast< uint32_t >( id ); - auto pCon = boost::static_pointer_cast< GameConnection, Connection >( shared_from_this() ); + char* id = ( char* ) &( inPacket.data[ 4 ] ); + uint32_t playerId = boost::lexical_cast< uint32_t >( id ); + auto pCon = boost::static_pointer_cast< GameConnection, Connection >( shared_from_this() ); - // try to retrieve the session for this id - auto session = pServerZone->getSession( playerId ); + // try to retrieve the session for this id + auto session = pServerZone->getSession( playerId ); - if( !session ) - { - pLog->info( "[" + std::string( id ) + "] Session not registered, creating" ); - // return; - if( !pServerZone->createSession( playerId ) ) - { - Disconnect(); - return; - } - session = pServerZone->getSession( playerId ); - } - //TODO: Catch more things in lobby and send real errors - else if( !session->isValid() || ( session->getPlayer() && session->getPlayer()->getLastPing() != 0 ) ) - { - pLog->error( "[" + std::string(id) + "] Session INVALID, disconnecting" ); + if( !session ) + { + pLog->info( "[" + std::string( id ) + "] Session not registered, creating" ); + // return; + if( !pServerZone->createSession( playerId ) ) + { Disconnect(); return; - } + } + session = pServerZone->getSession( playerId ); + } + //TODO: Catch more things in lobby and send real errors + else if( !session->isValid() || ( session->getPlayer() && session->getPlayer()->getLastPing() != 0 ) ) + { + pLog->error( "[" + std::string( id ) + "] Session INVALID, disconnecting" ); + Disconnect(); + return; + } - // if not set, set the session for this connection - if( !m_pSession && session ) - m_pSession = session; + // if not set, set the session for this connection + if( !m_pSession && session ) + m_pSession = session; - auto pe = boost::make_shared< FFXIVRawPacket >( 0x07, 0x18, 0, 0 ); - *(unsigned int*)(&pe->data()[0]) = 0xE0037603; - *(unsigned int*)(&pe->data()[4]) = static_cast< uint32_t >( time( nullptr ) ); - sendSinglePacket( pe ); + auto pe = boost::make_shared< FFXIVRawPacket >( 0x07, 0x18, 0, 0 ); + *( unsigned int* ) ( &pe->data()[ 0 ] ) = 0xE0037603; + *( unsigned int* ) ( &pe->data()[ 4 ] ) = static_cast< uint32_t >( time( nullptr ) ); + sendSinglePacket( pe ); - // main connection, assinging it to the session - if( ipcHeader.connectionType == ConnectionType::Zone ) - { - auto pe1 = boost::make_shared< FFXIVRawPacket >( 0x02, 0x38, 0, 0 ); - *(unsigned int*)(&pe1->data()[0]) = playerId; - sendSinglePacket( pe1 ); - pLog->info( "[" + std::string( id ) + "] Setting session for zone connection" ); - session->setZoneConnection( pCon ); - } - // chat connection, assinging it to the session - else if( ipcHeader.connectionType == ConnectionType::Chat ) - { - auto pe2 = boost::make_shared< FFXIVRawPacket >( 0x02, 0x38, 0, 0 ); - *(unsigned int*)(&pe2->data()[0]) = playerId; - sendSinglePacket( pe2 ); + // main connection, assinging it to the session + if( ipcHeader.connectionType == ConnectionType::Zone ) + { + auto pe1 = boost::make_shared< FFXIVRawPacket >( 0x02, 0x38, 0, 0 ); + *( unsigned int* ) ( &pe1->data()[ 0 ] ) = playerId; + sendSinglePacket( pe1 ); + pLog->info( "[" + std::string( id ) + "] Setting session for zone connection" ); + session->setZoneConnection( pCon ); + } + // chat connection, assinging it to the session + else if( ipcHeader.connectionType == ConnectionType::Chat ) + { + auto pe2 = boost::make_shared< FFXIVRawPacket >( 0x02, 0x38, 0, 0 ); + *( unsigned int* ) ( &pe2->data()[ 0 ] ) = playerId; + sendSinglePacket( pe2 ); - auto pe3 = boost::make_shared< FFXIVRawPacket >( 0x03, 0x28, playerId, playerId ); - *(unsigned short*)(&pe3->data()[2]) = 0x02; - sendSinglePacket( pe3 ); + auto pe3 = boost::make_shared< FFXIVRawPacket >( 0x03, 0x28, playerId, playerId ); + *( unsigned short* ) ( &pe3->data()[ 2 ] ) = 0x02; + sendSinglePacket( pe3 ); - pLog->info( "[" + std::string( id ) + "] Setting session for chat connection" ); - session->setChatConnection( pCon ); - } + pLog->info( "[" + std::string( id ) + "] Setting session for chat connection" ); + session->setChatConnection( pCon ); + } - break; + break; } case SEGMENTTYPE_IPC: // game packet { - queueInPacket( inPacket ); - break; + queueInPacket( inPacket ); + break; } case SEGMENTTYPE_KEEPALIVE: // keep alive { - uint32_t id = *( uint32_t* ) &inPacket.data[0]; - uint32_t timeStamp = *( uint32_t* ) &inPacket.data[4]; + uint32_t id = *( uint32_t* ) &inPacket.data[ 0 ]; + uint32_t timeStamp = *( uint32_t* ) &inPacket.data[ 4 ]; - auto pe4 = boost::make_shared< FFXIVRawPacket >( 0x08, 0x18, 0, 0 ); - *(unsigned int*)(&pe4->data()[0]) = id; - *(unsigned int*)(&pe4->data()[4]) = timeStamp; - sendSinglePacket( pe4 ); + auto pe4 = boost::make_shared< FFXIVRawPacket >( 0x08, 0x18, 0, 0 ); + *( unsigned int* ) ( &pe4->data()[ 0 ] ) = id; + *( unsigned int* ) ( &pe4->data()[ 4 ] ) = timeStamp; + sendSinglePacket( pe4 ); - break; + break; } case 8: { - break; - } + break; } + } - } + } } diff --git a/src/servers/sapphire_zone/Network/GameConnection.h b/src/servers/sapphire_zone/Network/GameConnection.h index e33a3471..d837ad4e 100644 --- a/src/servers/sapphire_zone/Network/GameConnection.h +++ b/src/servers/sapphire_zone/Network/GameConnection.h @@ -14,124 +14,154 @@ namespace Core { namespace Network { namespace Packets { - class GamePacket; +class GamePacket; } -enum ConnectionType : uint8_t +enum ConnectionType : + uint8_t { - Zone = 1, - Chat = 2, - Lobby = 3, - None + Zone = 1, + Chat = 2, + Lobby = 3, + None }; -class GameConnection : public Connection +class GameConnection : + public Connection { private: - typedef void ( GameConnection::* Handler )( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ); + typedef void ( GameConnection::* Handler )( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, + Entity::Player& player ); - using HandlerMap = std::map< uint16_t, Handler >; - using HandlerStrMap = std::map< uint16_t, std::string >; + using HandlerMap = std::map< uint16_t, Handler >; + using HandlerStrMap = std::map< uint16_t, std::string >; - AcceptorPtr m_pAcceptor; + AcceptorPtr m_pAcceptor; - // handler for game packets ( main type 0x03, connection type 1 ) - HandlerMap m_zoneHandlerMap; - HandlerStrMap m_zoneHandlerStrMap; + // handler for game packets ( main type 0x03, connection type 1 ) + HandlerMap m_zoneHandlerMap; + HandlerStrMap m_zoneHandlerStrMap; - // handler for game packets ( main type 0x03, connection type 2 ) - HandlerMap m_chatHandlerMap; - HandlerStrMap m_chatHandlerStrMap; + // handler for game packets ( main type 0x03, connection type 2 ) + HandlerMap m_chatHandlerMap; + HandlerStrMap m_chatHandlerStrMap; - SessionPtr m_pSession; + SessionPtr m_pSession; - LockedQueue< Core::Network::Packets::FFXIVARR_PACKET_RAW > m_inQueue; - LockedQueue< Packets::FFXIVPacketBasePtr > m_outQueue; + LockedQueue< Core::Network::Packets::FFXIVARR_PACKET_RAW > m_inQueue; + LockedQueue< Packets::FFXIVPacketBasePtr > m_outQueue; public: - ConnectionType m_conType; + ConnectionType m_conType; - GameConnection( HivePtr pHive, AcceptorPtr pAcceptor ); + GameConnection( HivePtr pHive, AcceptorPtr pAcceptor ); - ~GameConnection(); + ~GameConnection(); - // overwrite the parents onConnect for our game socket needs - void OnAccept( const std::string & host, uint16_t port ) override; + // overwrite the parents onConnect for our game socket needs + void OnAccept( const std::string& host, uint16_t port ) override; - void OnDisconnect() override; + void OnDisconnect() override; - void OnRecv( std::vector< uint8_t > & buffer ) override; + void OnRecv( std::vector< uint8_t >& buffer ) override; - void OnError( const boost::system::error_code & error ) override; + void OnError( const boost::system::error_code& error ) override; - void handlePackets( const Packets::FFXIVARR_PACKET_HEADER& ipcHeader, - const std::vector< Packets::FFXIVARR_PACKET_RAW >& packetData ); + void handlePackets( const Packets::FFXIVARR_PACKET_HEADER& ipcHeader, + const std::vector< Packets::FFXIVARR_PACKET_RAW >& packetData ); - void queueInPacket( Core::Network::Packets::FFXIVARR_PACKET_RAW inPacket ); - void queueOutPacket( Packets::FFXIVPacketBasePtr outPacket ); + void queueInPacket( Core::Network::Packets::FFXIVARR_PACKET_RAW inPacket ); - void processInQueue(); - void processOutQueue(); + void queueOutPacket( Packets::FFXIVPacketBasePtr outPacket ); - void handlePacket( Core::Network::Packets::FFXIVARR_PACKET_RAW& pPacket ); + void processInQueue(); - void handleZonePacket( Core::Network::Packets::FFXIVARR_PACKET_RAW& pPacket ); + void processOutQueue(); - void handleChatPacket( Core::Network::Packets::FFXIVARR_PACKET_RAW& pPacket ); + void handlePacket( Core::Network::Packets::FFXIVARR_PACKET_RAW& pPacket ); - void sendPackets( Packets::PacketContainer* pPacket ); + void handleZonePacket( Core::Network::Packets::FFXIVARR_PACKET_RAW& pPacket ); - void sendSinglePacket( Core::Network::Packets::FFXIVPacketBasePtr pPacket ); + void handleChatPacket( Core::Network::Packets::FFXIVARR_PACKET_RAW& pPacket ); - void injectPacket( const std::string& packetpath, Entity::Player& player ); + void sendPackets( Packets::PacketContainer* pPacket ); - DECLARE_HANDLER( initHandler ); - DECLARE_HANDLER( finishLoadingHandler ); - DECLARE_HANDLER( blackListHandler ); - DECLARE_HANDLER( socialListHandler ); - DECLARE_HANDLER( linkshellListHandler ); - DECLARE_HANDLER( playTimeHandler ); - DECLARE_HANDLER( pingHandler ); - DECLARE_HANDLER( fcInfoReqHandler ); - DECLARE_HANDLER( setSearchInfoHandler ); - DECLARE_HANDLER( reqSearchInfoHandler ); - DECLARE_HANDLER( updatePositionHandler ); - DECLARE_HANDLER( chatHandler ); - DECLARE_HANDLER( zoneLineHandler ); - DECLARE_HANDLER( clientTriggerHandler ); - DECLARE_HANDLER( inventoryModifyHandler ); - DECLARE_HANDLER( discoveryHandler ); - DECLARE_HANDLER( eventHandlerTalk ); - DECLARE_HANDLER( eventHandlerEmote ); - DECLARE_HANDLER( eventHandlerWithinRange ); - DECLARE_HANDLER( eventHandlerOutsideRange ); - DECLARE_HANDLER( eventHandlerEnterTerritory ); - DECLARE_HANDLER( eventHandlerReturn ); - DECLARE_HANDLER( eventHandlerLinkshell ); + void sendSinglePacket( Core::Network::Packets::FFXIVPacketBasePtr pPacket ); - DECLARE_HANDLER( logoutHandler ); - - DECLARE_HANDLER( cfDutyInfoRequest ); - DECLARE_HANDLER( cfRegisterDuty ); - DECLARE_HANDLER( cfRegisterRoulette ); - DECLARE_HANDLER( cfDutyAccepted ); + void injectPacket( const std::string& packetpath, Entity::Player& player ); + + DECLARE_HANDLER( initHandler ); + + DECLARE_HANDLER( finishLoadingHandler ); + + DECLARE_HANDLER( blackListHandler ); + + DECLARE_HANDLER( socialListHandler ); + + DECLARE_HANDLER( linkshellListHandler ); + + DECLARE_HANDLER( playTimeHandler ); + + DECLARE_HANDLER( pingHandler ); + + DECLARE_HANDLER( fcInfoReqHandler ); + + DECLARE_HANDLER( setSearchInfoHandler ); + + DECLARE_HANDLER( reqSearchInfoHandler ); + + DECLARE_HANDLER( updatePositionHandler ); + + DECLARE_HANDLER( chatHandler ); + + DECLARE_HANDLER( zoneLineHandler ); + + DECLARE_HANDLER( clientTriggerHandler ); + + DECLARE_HANDLER( inventoryModifyHandler ); + + DECLARE_HANDLER( discoveryHandler ); + + DECLARE_HANDLER( eventHandlerTalk ); + + DECLARE_HANDLER( eventHandlerEmote ); + + DECLARE_HANDLER( eventHandlerWithinRange ); + + DECLARE_HANDLER( eventHandlerOutsideRange ); + + DECLARE_HANDLER( eventHandlerEnterTerritory ); + + DECLARE_HANDLER( eventHandlerReturn ); + + DECLARE_HANDLER( eventHandlerLinkshell ); + + DECLARE_HANDLER( logoutHandler ); + + DECLARE_HANDLER( cfDutyInfoRequest ); + + DECLARE_HANDLER( cfRegisterDuty ); + + DECLARE_HANDLER( cfRegisterRoulette ); + + DECLARE_HANDLER( cfDutyAccepted ); - DECLARE_HANDLER( actionHandler ); + DECLARE_HANDLER( actionHandler ); - DECLARE_HANDLER( gm1Handler ); - DECLARE_HANDLER( gm2Handler ); + DECLARE_HANDLER( gm1Handler ); - DECLARE_HANDLER( reqEquipDisplayFlagsHandler ); + DECLARE_HANDLER( gm2Handler ); - DECLARE_HANDLER( performNoteHandler ); + DECLARE_HANDLER( reqEquipDisplayFlagsHandler ); - DECLARE_HANDLER( tellHandler ); + DECLARE_HANDLER( performNoteHandler ); + + DECLARE_HANDLER( tellHandler ); }; - } } diff --git a/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp b/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp index ef654d9f..ed82ae61 100644 --- a/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp @@ -39,100 +39,100 @@ using namespace Core::Network::ActorControl; void Core::Network::GameConnection::actionHandler( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - const auto packet = ZoneChannelPacket< Client::FFXIVIpcSkillHandler >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcSkillHandler >( inPacket ); - const auto& type = packet.data().type; - const auto& action = packet.data().actionId; - const auto& useCount = packet.data().useCount; - const auto& targetId = packet.data().targetId; + const auto& type = packet.data().type; + const auto& action = packet.data().actionId; + const auto& useCount = packet.data().useCount; + const auto& targetId = packet.data().targetId; - player.sendDebug( "Skill type:" + std::to_string( type ) ); + player.sendDebug( "Skill type:" + std::to_string( type ) ); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - switch( type ) - { - case Common::SkillType::Normal: + switch( type ) + { + case Common::SkillType::Normal: - if( action < 1000000 ) // normal action - { - std::string actionIdStr = boost::str( boost::format( "%|04X|" ) % action ); - player.sendDebug( "---------------------------------------" ); - player.sendDebug( "ActionHandler ( " + actionIdStr + " | " + - pExdData->get< Core::Data::Action >( action )->name + - " | " + std::to_string( targetId ) + " )" ); - - player.queuePacket( makeActorControl142( player.getId(), ActorControlType::ActionStart, 0x01, action ) ); - - if( action == 5 ) + if( action < 1000000 ) // normal action { - auto currentAction = player.getCurrentAction(); + std::string actionIdStr = boost::str( boost::format( "%|04X|" ) % action ); + player.sendDebug( "---------------------------------------" ); + player.sendDebug( "ActionHandler ( " + actionIdStr + " | " + + pExdData->get< Core::Data::Action >( action )->name + + " | " + std::to_string( targetId ) + " )" ); - // we should always have an action here, if not there is a bug - assert( currentAction ); - currentAction->onStart(); - } - else - { - Core::Entity::ActorPtr targetActor = player.getAsPlayer(); + player.queuePacket( makeActorControl142( player.getId(), ActorControlType::ActionStart, 0x01, action ) ); - if( targetId != player.getId() ) - { - targetActor = player.lookupTargetById( targetId ); - } + if( action == 5 ) + { + auto currentAction = player.getCurrentAction(); - // Check if we actually have an actor - if( !targetActor ) - { + // we should always have an action here, if not there is a bug + assert( currentAction ); + currentAction->onStart(); + } + else + { + Core::Entity::ActorPtr targetActor = player.getAsPlayer(); + + if( targetId != player.getId() ) + { + targetActor = player.lookupTargetById( targetId ); + } + + // Check if we actually have an actor + if( !targetActor ) + { // todo: interrupt a cast. player.sendDebug( "Invalid target." ); return; - } + } - if( !player.actionHasCastTime( action ) ) - { + if( !player.actionHasCastTime( action ) ) + { pScriptMgr->onCastFinish( player, targetActor->getAsChara(), action ); - } - else - { + } + else + { auto pActionCast = Action::make_ActionCast( player.getAsPlayer(), targetActor->getAsChara(), action ); player.setCurrentAction( pActionCast ); player.sendDebug( "setCurrentAction()" ); player.getCurrentAction()->onStart(); - } + } + } } - } - else if( action < 2000000 ) // craft action - { + else if( action < 2000000 ) // craft action + { - } - else if( action < 3000000 ) // item action - { - auto info = pExdData->get< Core::Data::EventItem >( action ); - if( info ) - { - pScriptMgr->onEventItem( player, action, info->quest, info->castTime, targetId ); - } - } - else if( action > 3000000 ) // unknown - { + } + else if( action < 3000000 ) // item action + { + auto info = pExdData->get< Core::Data::EventItem >( action ); + if( info ) + { + pScriptMgr->onEventItem( player, action, info->quest, info->castTime, targetId ); + } + } + else if( action > 3000000 ) // unknown + { - } + } - break; + break; - case Common::SkillType::MountSkill: + case Common::SkillType::MountSkill: - player.sendDebug( "Request mount " + std::to_string( action ) ); + player.sendDebug( "Request mount " + std::to_string( action ) ); - auto pActionMount = Action::make_ActionMount( player.getAsPlayer(), action ); - player.setCurrentAction( pActionMount ); - player.sendDebug( "setCurrentAction()" ); - player.getCurrentAction()->onStart(); + auto pActionMount = Action::make_ActionMount( player.getAsPlayer(), action ); + player.setCurrentAction( pActionMount ); + player.sendDebug( "setCurrentAction()" ); + player.getCurrentAction()->onStart(); - break; + break; - } + } } diff --git a/src/servers/sapphire_zone/Network/Handlers/CFHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/CFHandlers.cpp index dd49ed6d..f1f8c2ef 100644 --- a/src/servers/sapphire_zone/Network/Handlers/CFHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/CFHandlers.cpp @@ -26,82 +26,82 @@ using namespace Core::Network::Packets::Server; void Core::Network::GameConnection::cfDutyInfoRequest( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto dutyInfoPacket = makeZonePacket< FFXIVIpcCFDutyInfo >( player.getId() ); - auto penaltyMinutes = player.getCFPenaltyMinutes(); - if( penaltyMinutes > 255 ) - { - // cap it since it's uint8_t in packets - penaltyMinutes = 255; - } - dutyInfoPacket->data().penaltyTime = penaltyMinutes; - queueOutPacket( dutyInfoPacket ); + auto dutyInfoPacket = makeZonePacket< FFXIVIpcCFDutyInfo >( player.getId() ); + auto penaltyMinutes = player.getCFPenaltyMinutes(); + if( penaltyMinutes > 255 ) + { + // cap it since it's uint8_t in packets + penaltyMinutes = 255; + } + dutyInfoPacket->data().penaltyTime = penaltyMinutes; + queueOutPacket( dutyInfoPacket ); - auto inNeedsPacket = makeZonePacket< FFXIVIpcCFPlayerInNeed >( player.getId() ); - queueOutPacket( inNeedsPacket ); + auto inNeedsPacket = makeZonePacket< FFXIVIpcCFPlayerInNeed >( player.getId() ); + queueOutPacket( inNeedsPacket ); } void Core::Network::GameConnection::cfRegisterDuty( const Packets::FFXIVARR_PACKET_RAW& inPacket, - Entity::Player& player) + Entity::Player& player ) { - Packets::FFXIVARR_PACKET_RAW copy = inPacket; - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + Packets::FFXIVARR_PACKET_RAW copy = inPacket; + auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - std::vector< uint16_t > selectedContent; + std::vector< uint16_t > selectedContent; - for( uint32_t offset = 0x1E; offset <= 0x26; offset += 0x2 ) - { - auto id = *reinterpret_cast< uint16_t* >( ©.data[offset] ); - if( id == 0 ) - break; + for( uint32_t offset = 0x1E; offset <= 0x26; offset += 0x2 ) + { + auto id = *reinterpret_cast< uint16_t* >( ©.data[ offset ] ); + if( id == 0 ) + break; - player.sendDebug( "got contentId: " + std::to_string( id ) ); + player.sendDebug( "got contentId: " + std::to_string( id ) ); - selectedContent.push_back( id ); - } + selectedContent.push_back( id ); + } - // todo: rand bias problem, will do for now tho - auto index = std::rand() % selectedContent.size(); - auto contentId = selectedContent.at( index ); + // todo: rand bias problem, will do for now tho + auto index = std::rand() % selectedContent.size(); + auto contentId = selectedContent.at( index ); - player.sendDebug( "Duty register request for contentid: " + std::to_string( contentId ) ); + player.sendDebug( "Duty register request for contentid: " + std::to_string( contentId ) ); - // let's cancel it because otherwise you can't register it again - auto cfCancelPacket = makeZonePacket< FFXIVIpcCFNotify >( player.getId() ); - cfCancelPacket->data().state1 = 3; - cfCancelPacket->data().state2 = 1; // Your registration is withdrawn. - queueOutPacket( cfCancelPacket ); + // let's cancel it because otherwise you can't register it again + auto cfCancelPacket = makeZonePacket< FFXIVIpcCFNotify >( player.getId() ); + cfCancelPacket->data().state1 = 3; + cfCancelPacket->data().state2 = 1; // Your registration is withdrawn. + queueOutPacket( cfCancelPacket ); - auto cfCondition = pExdData->get< Core::Data::ContentFinderCondition >( contentId ); - if( !cfCondition ) - return; + auto cfCondition = pExdData->get< Core::Data::ContentFinderCondition >( contentId ); + if( !cfCondition ) + return; - auto instance = pTeriMgr->createInstanceContent( cfCondition->instanceContent ); - if( !instance ) - return; + auto instance = pTeriMgr->createInstanceContent( cfCondition->instanceContent ); + if( !instance ) + return; - auto pInstance = instance->getAsInstanceContent(); - pInstance->bindPlayer( player.getId() ); + auto pInstance = instance->getAsInstanceContent(); + pInstance->bindPlayer( player.getId() ); - player.sendDebug( "Created instance with id: " + std::to_string( instance->getGuId() ) ); + player.sendDebug( "Created instance with id: " + std::to_string( instance->getGuId() ) ); - player.setInstance( instance ); + player.setInstance( instance ); } void Core::Network::GameConnection::cfRegisterRoulette( const Packets::FFXIVARR_PACKET_RAW& inPacket, - Entity::Player& player) + Entity::Player& player ) { - auto cfCancelPacket = makeZonePacket< FFXIVIpcCFNotify >( player.getId() ); - cfCancelPacket->data().state1 = 3; - cfCancelPacket->data().state2 = 1; // Your registration is withdrawn. - queueOutPacket( cfCancelPacket ); + auto cfCancelPacket = makeZonePacket< FFXIVIpcCFNotify >( player.getId() ); + cfCancelPacket->data().state1 = 3; + cfCancelPacket->data().state2 = 1; // Your registration is withdrawn. + queueOutPacket( cfCancelPacket ); - player.sendDebug( "Roulette register" ); + player.sendDebug( "Roulette register" ); } void Core::Network::GameConnection::cfDutyAccepted( const Packets::FFXIVARR_PACKET_RAW& inPacket, - Entity::Player& player) + Entity::Player& player ) { - player.sendDebug( "TODO: Duty accept" ); + player.sendDebug( "TODO: Duty accept" ); } diff --git a/src/servers/sapphire_zone/Network/Handlers/ClientTriggerHandler.cpp b/src/servers/sapphire_zone/Network/Handlers/ClientTriggerHandler.cpp index 8da0b5ca..3282d68d 100644 --- a/src/servers/sapphire_zone/Network/Handlers/ClientTriggerHandler.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/ClientTriggerHandler.cpp @@ -43,226 +43,226 @@ using namespace Core::Network::ActorControl; void Core::Network::GameConnection::clientTriggerHandler( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto pLog = g_fw.get< Logger >(); + auto pLog = g_fw.get< Logger >(); - const auto packet = ZoneChannelPacket< Client::FFXIVIpcClientTrigger >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcClientTrigger >( inPacket ); - const auto& commandId = packet.data().commandId; - const auto& param1 = *reinterpret_cast< const uint64_t* >( &packet.data().param11 ); - const auto& param11 = packet.data().param11; - const auto& param12 = packet.data().param12; - const auto& param2 = packet.data().param2; - const auto& param3 = packet.data().param3; + const auto& commandId = packet.data().commandId; + const auto& param1 = *reinterpret_cast< const uint64_t* >( &packet.data().param11 ); + const auto& param11 = packet.data().param11; + const auto& param12 = packet.data().param12; + const auto& param2 = packet.data().param2; + const auto& param3 = packet.data().param3; - pLog->debug( "[" + std::to_string( m_pSession->getId() ) + "] Incoming action: " + - boost::str( boost::format( "%|04X|" ) % ( uint32_t ) ( commandId & 0xFFFF ) ) + - "\nparam1: " + boost::str( boost::format( "%|016X|" ) % ( uint64_t ) ( param1 & 0xFFFFFFFFFFFFFFF ) ) + - "\nparam2: " + boost::str( boost::format( "%|08X|" ) % ( uint32_t ) ( param2 & 0xFFFFFFFF ) ) + - "\nparam3: " + boost::str( boost::format( "%|016X|" ) % ( uint64_t ) ( param3 & 0xFFFFFFFFFFFFFFF ) ) - ); + pLog->debug( "[" + std::to_string( m_pSession->getId() ) + "] Incoming action: " + + boost::str( boost::format( "%|04X|" ) % ( uint32_t ) ( commandId & 0xFFFF ) ) + + "\nparam1: " + boost::str( boost::format( "%|016X|" ) % ( uint64_t ) ( param1 & 0xFFFFFFFFFFFFFFF ) ) + + "\nparam2: " + boost::str( boost::format( "%|08X|" ) % ( uint32_t ) ( param2 & 0xFFFFFFFF ) ) + + "\nparam3: " + boost::str( boost::format( "%|016X|" ) % ( uint64_t ) ( param3 & 0xFFFFFFFFFFFFFFF ) ) + ); - //g_log.Log(LoggingSeverity::debug, "[" + std::to_string(m_pSession->getId()) + "] " + pInPacket->toString()); + //g_log.Log(LoggingSeverity::debug, "[" + std::to_string(m_pSession->getId()) + "] " + pInPacket->toString()); - switch( commandId ) - { - case ClientTriggerType::ToggleSheathe: // Toggle sheathe - { - if ( param11 == 1 ) - player.setStance( Common::Stance::Active ); - else - { - player.setStance( Common::Stance::Passive ); - player.setAutoattack( false ); - } + switch( commandId ) + { + case ClientTriggerType::ToggleSheathe: // Toggle sheathe + { + if( param11 == 1 ) + player.setStance( Common::Stance::Active ); + else + { + player.setStance( Common::Stance::Passive ); + player.setAutoattack( false ); + } - player.sendToInRangeSet( makeActorControl142( player.getId(), 0, param11, 1 ) ); + player.sendToInRangeSet( makeActorControl142( player.getId(), 0, param11, 1 ) ); + break; + } + case ClientTriggerType::ToggleAutoAttack: // Toggle auto-attack + { + if( param11 == 1 ) + { + player.setAutoattack( true ); + player.setStance( Common::Stance::Active ); + } + else + player.setAutoattack( false ); + + player.sendToInRangeSet( makeActorControl142( player.getId(), 1, param11, 1 ) ); + + break; + } + case ClientTriggerType::ChangeTarget: // Change target + { + + uint64_t targetId = param1; + player.changeTarget( targetId ); + break; + } + case ClientTriggerType::DismountReq: + { + player.dismount(); + break; + } + case ClientTriggerType::RemoveStatusEffect: // Remove status (clicking it off) + { + // todo: check if status can be removed by client from exd + player.removeSingleStatusEffectById( static_cast< uint32_t >( param1 ) ); + break; + } + case ClientTriggerType::CastCancel: // Cancel cast + { + if( player.getCurrentAction() ) + player.getCurrentAction()->setInterrupted(); + break; + } + case ClientTriggerType::MarkPlayer: // Mark player + { + break; + } + case ClientTriggerType::SetTitleReq: // Set player title + { + player.setTitle( static_cast< uint16_t >( param1 ) ); + break; + } + case ClientTriggerType::TitleList: // Get title list + { + player.sendTitleList(); + break; + } + case ClientTriggerType::UpdatedSeenHowTos: // Update howtos seen + { + uint32_t howToId = param11; + player.updateHowtosSeen( howToId ); + break; + } + case ClientTriggerType::EmoteReq: // emote + { + uint64_t targetId = player.getTargetId(); + uint32_t emoteId = param11; + bool isSilent = param2 == 1; + + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto emoteData = pExdData->get< Data::Emote >( emoteId ); + + if( !emoteData ) + return; + + player.emote( emoteId, targetId, isSilent ); + + bool isPersistent = emoteData->emoteMode != 0; + + if( isPersistent ) + { + player.setStance( Common::Stance::Passive ); + player.setAutoattack( false ); + player.setPersistentEmote( emoteData->emoteMode ); + player.setStatus( Common::ActorStatus::EmoteMode ); + + player.sendToInRangeSet( makeActorControl142( player.getId(), ActorControlType::SetStatus, + static_cast< uint8_t >( Common::ActorStatus::EmoteMode ), + emoteData->hasCancelEmote ? 1 : 0 ), true ); + } + + if( emoteData->drawsWeapon ) + { + player.setStance( Common::Stance::Active ); + } + + break; + } + case ClientTriggerType::EmoteCancel: // emote + { + player.emoteInterrupt(); + break; + } + case ClientTriggerType::PersistentEmoteCancel: // cancel persistent emote + { + player.setPersistentEmote( 0 ); + player.emoteInterrupt(); + player.setStatus( Common::ActorStatus::Idle ); + auto pSetStatusPacket = makeActorControl142( player.getId(), SetStatus, + static_cast< uint8_t >( Common::ActorStatus::Idle ) ); + player.sendToInRangeSet( pSetStatusPacket ); + break; + } + case ClientTriggerType::PoseChange: // change pose + case ClientTriggerType::PoseReapply: // reapply pose + { + player.setPose( param12 ); + auto pSetStatusPacket = makeActorControl142( player.getId(), SetPose, param11, param12 ); + player.sendToInRangeSet( pSetStatusPacket, true ); + break; + } + case ClientTriggerType::PoseCancel: // cancel pose + { + player.setPose( param12 ); + auto pSetStatusPacket = makeActorControl142( player.getId(), SetPose, param11, param12 ); + player.sendToInRangeSet( pSetStatusPacket, true ); + break; + } + case ClientTriggerType::Return: // return dead / accept raise + { + switch( static_cast < ResurrectType >( param1 ) ) + { + case ResurrectType::RaiseSpell: + // todo: handle raise case (set position to raiser, apply weakness status, set hp/mp/tp as well as packet) + player.returnToHomepoint(); break; - } - case ClientTriggerType::ToggleAutoAttack: // Toggle auto-attack - { - if ( param11 == 1 ) - { - player.setAutoattack( true ); - player.setStance( Common::Stance::Active ); - } - else - player.setAutoattack( false ); + case ResurrectType::Return: + player.returnToHomepoint(); + break; + default: + break; + } - player.sendToInRangeSet( makeActorControl142( player.getId(), 1, param11, 1 ) ); + } + case ClientTriggerType::FinishZoning: // Finish zoning + { + player.finishZoning(); + break; + } - break; - } - case ClientTriggerType::ChangeTarget: // Change target - { + case ClientTriggerType::Teleport: // Teleport + { - uint64_t targetId = param1; - player.changeTarget( targetId ); - break; - } - case ClientTriggerType::DismountReq: - { - player.dismount(); - break; - } - case ClientTriggerType::RemoveStatusEffect: // Remove status (clicking it off) - { - // todo: check if status can be removed by client from exd - player.removeSingleStatusEffectById( static_cast< uint32_t >( param1 ) ); - break; - } - case ClientTriggerType::CastCancel: // Cancel cast - { - if( player.getCurrentAction() ) - player.getCurrentAction()->setInterrupted(); - break; - } - case ClientTriggerType::MarkPlayer: // Mark player - { - break; - } - case ClientTriggerType::SetTitleReq: // Set player title - { - player.setTitle( static_cast< uint16_t >( param1 ) ); - break; - } - case ClientTriggerType::TitleList: // Get title list - { - player.sendTitleList(); - break; - } - case ClientTriggerType::UpdatedSeenHowTos: // Update howtos seen - { - uint32_t howToId = param11; - player.updateHowtosSeen( howToId ); - break; - } - case ClientTriggerType::EmoteReq: // emote - { - uint64_t targetId = player.getTargetId(); - uint32_t emoteId = param11; - bool isSilent = param2 == 1; - - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto emoteData = pExdData->get< Data::Emote >( emoteId ); - - if( !emoteData ) - return; - - player.emote( emoteId, targetId, isSilent ); - - bool isPersistent = emoteData->emoteMode != 0; - - if( isPersistent ) - { - player.setStance( Common::Stance::Passive ); - player.setAutoattack( false ); - player.setPersistentEmote( emoteData->emoteMode ); - player.setStatus( Common::ActorStatus::EmoteMode ); - - player.sendToInRangeSet( makeActorControl142( player.getId(), ActorControlType::SetStatus, - static_cast< uint8_t >( Common::ActorStatus::EmoteMode ), - emoteData->hasCancelEmote ? 1 : 0 ), true ); - } - - if( emoteData->drawsWeapon ) - { - player.setStance( Common::Stance::Active ); - } - - break; - } - case ClientTriggerType::EmoteCancel: // emote - { - player.emoteInterrupt(); - break; - } - case ClientTriggerType::PersistentEmoteCancel: // cancel persistent emote - { - player.setPersistentEmote( 0 ); - player.emoteInterrupt(); - player.setStatus( Common::ActorStatus::Idle ); - auto pSetStatusPacket = makeActorControl142( player.getId(), SetStatus, - static_cast< uint8_t >( Common::ActorStatus::Idle ) ); - player.sendToInRangeSet( pSetStatusPacket ); - break; - } - case ClientTriggerType::PoseChange: // change pose - case ClientTriggerType::PoseReapply: // reapply pose - { - player.setPose( param12 ); - auto pSetStatusPacket = makeActorControl142( player.getId(), SetPose, param11, param12 ); - player.sendToInRangeSet( pSetStatusPacket, true ); - break; - } - case ClientTriggerType::PoseCancel: // cancel pose - { - player.setPose( param12 ); - auto pSetStatusPacket = makeActorControl142( player.getId(), SetPose, param11, param12 ); - player.sendToInRangeSet( pSetStatusPacket, true ); - break; - } - case ClientTriggerType::Return: // return dead / accept raise - { - switch ( static_cast < ResurrectType >( param1 ) ) - { - case ResurrectType::RaiseSpell: - // todo: handle raise case (set position to raiser, apply weakness status, set hp/mp/tp as well as packet) - player.returnToHomepoint(); - break; - case ResurrectType::Return: - player.returnToHomepoint(); - break; - default: - break; - } - - } - case ClientTriggerType::FinishZoning: // Finish zoning - { - player.finishZoning(); - break; - } - - case ClientTriggerType::Teleport: // Teleport - { - - player.teleportQuery( param11 ); - break; - } - case ClientTriggerType::DyeItem: // Dye item - { - break; - } - case ClientTriggerType::DirectorInitFinish: // Director init finish - { - player.getCurrentZone()->onInitDirector( player ); - break; - } - case ClientTriggerType::DirectorSync: // Director init finish - { - player.getCurrentZone()->onDirectorSync( player ); - break; - } - case ClientTriggerType::EnterTerritoryEventFinished:// this may still be something else. I think i have seen it elsewhere - { - player.setOnEnterEventDone( true ); - break; - } - case ClientTriggerType::RequestInstanceLeave: - { - // todo: apply cf penalty if applicable, make sure player isnt in combat - player.exitInstance(); - break; - } + player.teleportQuery( param11 ); + break; + } + case ClientTriggerType::DyeItem: // Dye item + { + break; + } + case ClientTriggerType::DirectorInitFinish: // Director init finish + { + player.getCurrentZone()->onInitDirector( player ); + break; + } + case ClientTriggerType::DirectorSync: // Director init finish + { + player.getCurrentZone()->onDirectorSync( player ); + break; + } + case ClientTriggerType::EnterTerritoryEventFinished:// this may still be something else. I think i have seen it elsewhere + { + player.setOnEnterEventDone( true ); + break; + } + case ClientTriggerType::RequestInstanceLeave: + { + // todo: apply cf penalty if applicable, make sure player isnt in combat + player.exitInstance(); + break; + } - default: - { - pLog->debug( "[" + std::to_string( m_pSession->getId() ) + "] Unhandled action: " + - boost::str( boost::format( "%|04X|" ) % (uint32_t) ( commandId & 0xFFFF ) ) ); - break; - } - } + default: + { + pLog->debug( "[" + std::to_string( m_pSession->getId() ) + "] Unhandled action: " + + boost::str( boost::format( "%|04X|" ) % ( uint32_t ) ( commandId & 0xFFFF ) ) ); + break; + } + } } diff --git a/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp index c2fb7132..9298a673 100644 --- a/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp @@ -34,44 +34,44 @@ using namespace Core::Network::Packets::Server; void Core::Network::GameConnection::eventHandlerTalk( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerTalk >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerTalk >( inPacket ); - const auto& actorId = packet.data().actorId; - const auto& eventId = packet.data().eventId; + const auto& actorId = packet.data().actorId; + const auto& eventId = packet.data().eventId; - auto eventType = static_cast< uint16_t >( eventId >> 16 ); + auto eventType = static_cast< uint16_t >( eventId >> 16 ); - std::string eventName = "onTalk"; - std::string objName = Event::getEventName( eventId ); + std::string eventName = "onTalk"; + std::string objName = Event::getEventName( eventId ); - player.sendDebug( "Chara: " + - std::to_string( actorId ) + " -> " + - std::to_string( Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) + - " \neventId: " + - std::to_string( eventId ) + - " (0x" + boost::str( boost::format( "%|08X|" ) - % static_cast< uint64_t >( eventId & 0xFFFFFFF ) ) + ")" ); + player.sendDebug( "Chara: " + + std::to_string( actorId ) + " -> " + + std::to_string( Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) + + " \neventId: " + + std::to_string( eventId ) + + " (0x" + boost::str( boost::format( "%|08X|" ) + % static_cast< uint64_t >( eventId & 0xFFFFFFF ) ) + ")" ); - player.sendDebug( "Calling: " + objName + "." + eventName ); - player.eventStart( actorId, eventId, Event::EventHandler::Talk, 0, 0 ); + player.sendDebug( "Calling: " + objName + "." + eventName ); + player.eventStart( actorId, eventId, Event::EventHandler::Talk, 0, 0 ); - if( auto instance = player.getCurrentInstance() ) - { - instance->onTalk( player, eventId, actorId ); - } - else if( !pScriptMgr->onTalk( player, actorId, eventId ) && - eventType == Event::EventHandler::EventHandlerType::Quest ) - { - auto questInfo = pExdData->get< Core::Data::Quest >( eventId ); - if( questInfo ) - player.sendUrgent( "Quest not implemented: " + questInfo->name + " (" + questInfo->id + ")" ); - } + if( auto instance = player.getCurrentInstance() ) + { + instance->onTalk( player, eventId, actorId ); + } + else if( !pScriptMgr->onTalk( player, actorId, eventId ) && + eventType == Event::EventHandler::EventHandlerType::Quest ) + { + auto questInfo = pExdData->get< Core::Data::Quest >( eventId ); + if( questInfo ) + player.sendUrgent( "Quest not implemented: " + questInfo->name + " (" + questInfo->id + ")" ); + } - player.checkEvent( eventId ); + player.checkEvent( eventId ); } @@ -79,177 +79,177 @@ void Core::Network::GameConnection::eventHandlerEmote( const Packets::FFXIVARR_P Entity::Player& player ) { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerEmote >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerEmote >( inPacket ); - const auto& actorId = packet.data().actorId; - const auto& eventId = packet.data().eventId; - const auto& emoteId = packet.data().emoteId; - const auto eventType = static_cast< uint16_t >( eventId >> 16 ); + const auto& actorId = packet.data().actorId; + const auto& eventId = packet.data().eventId; + const auto& emoteId = packet.data().emoteId; + const auto eventType = static_cast< uint16_t >( eventId >> 16 ); - std::string eventName = "onEmote"; - std::string objName = Event::getEventName( eventId ); + std::string eventName = "onEmote"; + std::string objName = Event::getEventName( eventId ); - player.sendDebug( "Chara: " + - std::to_string( actorId ) + " -> " + - std::to_string( Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) + - " \neventId: " + - std::to_string( eventId ) + - " (0x" + boost::str( boost::format( "%|08X|" ) - % static_cast< uint64_t >( eventId & 0xFFFFFFF ) ) + ")" ); + player.sendDebug( "Chara: " + + std::to_string( actorId ) + " -> " + + std::to_string( Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) + + " \neventId: " + + std::to_string( eventId ) + + " (0x" + boost::str( boost::format( "%|08X|" ) + % static_cast< uint64_t >( eventId & 0xFFFFFFF ) ) + ")" ); - player.sendDebug( "Calling: " + objName + "." + eventName ); + player.sendDebug( "Calling: " + objName + "." + eventName ); - player.eventStart( actorId, eventId, Event::EventHandler::Emote, 0, emoteId ); + player.eventStart( actorId, eventId, Event::EventHandler::Emote, 0, emoteId ); - if( !pScriptMgr->onEmote( player, actorId, eventId, static_cast< uint8_t >( emoteId ) ) && - eventType == Event::EventHandler::EventHandlerType::Quest ) - { - auto questInfo = pExdData->get< Core::Data::Quest >( eventId ); - if( questInfo ) - player.sendUrgent( "Quest not implemented: " + questInfo->name ); - } + if( !pScriptMgr->onEmote( player, actorId, eventId, static_cast< uint8_t >( emoteId ) ) && + eventType == Event::EventHandler::EventHandlerType::Quest ) + { + auto questInfo = pExdData->get< Core::Data::Quest >( eventId ); + if( questInfo ) + player.sendUrgent( "Quest not implemented: " + questInfo->name ); + } - player.checkEvent( eventId ); + player.checkEvent( eventId ); } void Core::Network::GameConnection::eventHandlerWithinRange( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerWithinRange >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerWithinRange >( inPacket ); - const auto& eventId = packet.data().eventId; - const auto& param1 = packet.data().param1; - const auto& pos = packet.data().position; + const auto& eventId = packet.data().eventId; + const auto& param1 = packet.data().param1; + const auto& pos = packet.data().position; - std::string eventName = "onWithinRange"; - std::string objName = Event::getEventName( eventId ); - player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) + - " p1: " + std::to_string( param1 ) ); + std::string eventName = "onWithinRange"; + std::string objName = Event::getEventName( eventId ); + player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) + + " p1: " + std::to_string( param1 ) ); - player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); + player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); - pScriptMgr->onWithinRange( player, eventId, param1, pos.x, pos.y, pos.z ); + pScriptMgr->onWithinRange( player, eventId, param1, pos.x, pos.y, pos.z ); - player.checkEvent( eventId ); + player.checkEvent( eventId ); } void Core::Network::GameConnection::eventHandlerOutsideRange( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerOutsideRange >( inPacket ); - const auto& eventId = packet.data().eventId; - const auto& param1 = packet.data().param1; - const auto& pos = packet.data().position; + const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerOutsideRange >( inPacket ); + const auto& eventId = packet.data().eventId; + const auto& param1 = packet.data().param1; + const auto& pos = packet.data().position; - std::string eventName = "onOutsideRange"; - std::string objName = Event::getEventName( eventId ); - player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) + - " p1: " + std::to_string( param1 ) ); + std::string eventName = "onOutsideRange"; + std::string objName = Event::getEventName( eventId ); + player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) + + " p1: " + std::to_string( param1 ) ); - player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); + player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); - pScriptMgr->onOutsideRange( player, eventId, param1, pos.x, pos.y, pos.z ); + pScriptMgr->onOutsideRange( player, eventId, param1, pos.x, pos.y, pos.z ); - player.checkEvent( eventId ); + player.checkEvent( eventId ); } void Core::Network::GameConnection::eventHandlerEnterTerritory( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - const auto packet = ZoneChannelPacket< Client::FFXIVIpcEnterTerritoryHandler >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcEnterTerritoryHandler >( inPacket ); - const auto& eventId = packet.data().eventId; - const auto& param1 = packet.data().param1; - const auto& param2 = packet.data().param2; + const auto& eventId = packet.data().eventId; + const auto& param1 = packet.data().param1; + const auto& param2 = packet.data().param2; - std::string eventName = "onEnterTerritory"; + std::string eventName = "onEnterTerritory"; - std::string objName = Event::getEventName( eventId ); + std::string objName = Event::getEventName( eventId ); - player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) ); + player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) ); - if( auto instance = player.getCurrentInstance() ) - { - player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 1, player.getZoneId() ); - instance->onEnterTerritory( player, eventId, param1, param2 ); - } - else - { - player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 0, player.getZoneId() ); - pScriptMgr->onEnterTerritory( player, eventId, param1, param2 ); - } + if( auto instance = player.getCurrentInstance() ) + { + player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 1, player.getZoneId() ); + instance->onEnterTerritory( player, eventId, param1, param2 ); + } + else + { + player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 0, player.getZoneId() ); + pScriptMgr->onEnterTerritory( player, eventId, param1, param2 ); + } - player.checkEvent( eventId ); + player.checkEvent( eventId ); } void Core::Network::GameConnection::eventHandlerReturn( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerReturn >( inPacket ); - const auto& eventId = packet.data().eventId; - const auto& scene = packet.data().scene; - const auto& param1 = packet.data().param1; - const auto& param2 = packet.data().param2; - const auto& param3 = packet.data().param3; - const auto& param4 = packet.data().param4; + const auto packet = ZoneChannelPacket< Client::FFXIVIpcEventHandlerReturn >( inPacket ); + const auto& eventId = packet.data().eventId; + const auto& scene = packet.data().scene; + const auto& param1 = packet.data().param1; + const auto& param2 = packet.data().param2; + const auto& param3 = packet.data().param3; + const auto& param4 = packet.data().param4; - std::string eventName = Event::getEventName( eventId ); + std::string eventName = Event::getEventName( eventId ); - player.sendDebug( "eventId: " + - std::to_string( eventId ) + - " ( 0x" + boost::str( boost::format( "%|08X|" ) % ( uint64_t ) ( eventId & 0xFFFFFFF ) ) + " ) " + - " scene: " + std::to_string( scene ) + - " p1: " + std::to_string( param1 ) + - " p2: " + std::to_string( param2 ) + - " p3: " + std::to_string( param3 ) ); + player.sendDebug( "eventId: " + + std::to_string( eventId ) + + " ( 0x" + boost::str( boost::format( "%|08X|" ) % ( uint64_t ) ( eventId & 0xFFFFFFF ) ) + " ) " + + " scene: " + std::to_string( scene ) + + " p1: " + std::to_string( param1 ) + + " p2: " + std::to_string( param2 ) + + " p3: " + std::to_string( param3 ) ); - auto pEvent = player.getEvent( eventId ); - if( pEvent ) - { - pEvent->setPlayedScene( false ); - // try to retrieve a stored callback - auto eventCallback = pEvent->getEventReturnCallback(); - // if there is one, proceed to call it - if( eventCallback ) - { - Event::SceneResult result; - result.eventId = eventId; - result.param1 = param1; - result.param2 = param2; - result.param3 = param3; - result.param4 = param4; - eventCallback( player, result ); - } + auto pEvent = player.getEvent( eventId ); + if( pEvent ) + { + pEvent->setPlayedScene( false ); + // try to retrieve a stored callback + auto eventCallback = pEvent->getEventReturnCallback(); + // if there is one, proceed to call it + if( eventCallback ) + { + Event::SceneResult result; + result.eventId = eventId; + result.param1 = param1; + result.param2 = param2; + result.param3 = param3; + result.param4 = param4; + eventCallback( player, result ); + } // we might have a scene chain callback instead so check for that too - else if( auto chainCallback = pEvent->getSceneChainCallback() ) - chainCallback( player ); + else if( auto chainCallback = pEvent->getSceneChainCallback() ) + chainCallback( player ); - } + } - player.checkEvent( eventId ); + player.checkEvent( eventId ); } void Core::Network::GameConnection::eventHandlerLinkshell( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - const auto packet = ZoneChannelPacket< Client::FFXIVIpcLinkshellEventHandler >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcLinkshellEventHandler >( inPacket ); - auto linkshellEvent = makeZonePacket< Server::FFXIVIpcEventLinkshell >( player.getId() ); - linkshellEvent->data().eventId = packet.data().eventId; - linkshellEvent->data().scene = static_cast< uint8_t >( packet.data().scene ); - linkshellEvent->data().param3 = 1; - linkshellEvent->data().unknown1 = 0x15a; - player.queuePacket( linkshellEvent ); + auto linkshellEvent = makeZonePacket< Server::FFXIVIpcEventLinkshell >( player.getId() ); + linkshellEvent->data().eventId = packet.data().eventId; + linkshellEvent->data().scene = static_cast< uint8_t >( packet.data().scene ); + linkshellEvent->data().param3 = 1; + linkshellEvent->data().unknown1 = 0x15a; + player.queuePacket( linkshellEvent ); } diff --git a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp index 23c50e6a..7a9a23f3 100644 --- a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp @@ -42,198 +42,198 @@ using namespace Core::Network::ActorControl; enum GmCommand { - Pos = 0x0000, - Lv = 0x0001, - Race = 0x0002, - Tribe = 0x0003, - Sex = 0x0004, - Time = 0x0005, - Weather = 0x0006, - Call = 0x0007, - Inspect = 0x0008, - Speed = 0x0009, - Invis = 0x000D, + Pos = 0x0000, + Lv = 0x0001, + Race = 0x0002, + Tribe = 0x0003, + Sex = 0x0004, + Time = 0x0005, + Weather = 0x0006, + Call = 0x0007, + Inspect = 0x0008, + Speed = 0x0009, + Invis = 0x000D, - Raise = 0x0010, - Kill = 0x000E, - Icon = 0x0012, + Raise = 0x0010, + Kill = 0x000E, + Icon = 0x0012, - Hp = 0x0064, - Mp = 0x0065, - Tp = 0x0066, - Gp = 0x0067, - Exp = 0x0068, - Inv = 0x006A, + Hp = 0x0064, + Mp = 0x0065, + Tp = 0x0066, + Gp = 0x0067, + Exp = 0x0068, + Inv = 0x006A, - Orchestrion = 0x0074, + Orchestrion = 0x0074, - Item = 0x00C8, - Gil = 0x00C9, - Collect = 0x00CA, + Item = 0x00C8, + Gil = 0x00C9, + Collect = 0x00CA, - QuestAccept = 0x012C, - QuestCancel = 0x012D, - QuestComplete = 0x012E, - QuestIncomplete = 0x012F, - QuestSequence = 0x0130, - QuestInspect = 0x0131, - GC = 0x0154, - GCRank = 0x0155, - Aetheryte = 0x015E, - Wireframe = 0x0226, - Teri = 0x0258, - Kick = 0x025C, - TeriInfo = 0x025D, - Jump = 0x025E, - JumpNpc = 0x025F, + QuestAccept = 0x012C, + QuestCancel = 0x012D, + QuestComplete = 0x012E, + QuestIncomplete = 0x012F, + QuestSequence = 0x0130, + QuestInspect = 0x0131, + GC = 0x0154, + GCRank = 0x0155, + Aetheryte = 0x015E, + Wireframe = 0x0226, + Teri = 0x0258, + Kick = 0x025C, + TeriInfo = 0x025D, + Jump = 0x025E, + JumpNpc = 0x025F, }; void Core::Network::GameConnection::gm1Handler( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - if( player.getGmRank() <= 0 ) - return; + if( player.getGmRank() <= 0 ) + return; - const auto packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand1 >( inPacket ); - const auto& commandId = packet.data().commandId; - const auto& param1 = packet.data().param1; - const auto& param2 = packet.data().param2; - const auto& param3 = packet.data().param3; + const auto packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand1 >( inPacket ); + const auto& commandId = packet.data().commandId; + const auto& param1 = packet.data().param1; + const auto& param2 = packet.data().param2; + const auto& param3 = packet.data().param3; - auto pLog = g_fw.get< Logger >(); - pLog->debug( player.getName() + " used GM1 commandId: " + std::to_string( commandId ) + - ", params: " + std::to_string( param1 ) + ", " + - std::to_string( param2 ) + ", " + std::to_string( param3 ) ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( player.getName() + " used GM1 commandId: " + std::to_string( commandId ) + + ", params: " + std::to_string( param1 ) + ", " + + std::to_string( param2 ) + ", " + std::to_string( param3 ) ); - Core::Entity::ActorPtr targetActor; + Core::Entity::ActorPtr targetActor; - if( player.getId() == param3 ) - { - targetActor = player.getAsPlayer(); - } - else - { - auto inRange = player.getInRangeActors(); - for( auto& actor : inRange ) - { - if( actor->getId() == param3 ) - targetActor = actor; - } - } + if( player.getId() == param3 ) + { + targetActor = player.getAsPlayer(); + } + else + { + auto inRange = player.getInRangeActors(); + for( auto& actor : inRange ) + { + if( actor->getId() == param3 ) + targetActor = actor; + } + } - if( !targetActor ) - return; - auto targetPlayer = targetActor->getAsPlayer(); + if( !targetActor ) + return; + auto targetPlayer = targetActor->getAsPlayer(); - switch( commandId ) - { - case GmCommand::Lv: - { + switch( commandId ) + { + case GmCommand::Lv: + { targetPlayer->setLevel( param1 ); player.sendNotice( "Level for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); break; - } - case GmCommand::Race: - { + } + case GmCommand::Race: + { targetPlayer->setLookAt( CharaLook::Race, param1 ); player.sendNotice( "Race for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); targetPlayer->spawn( targetPlayer ); auto inRange = targetPlayer->getInRangeActors(); for( auto actor : inRange ) { - targetPlayer->despawn( actor->getAsPlayer() ); - targetPlayer->spawn( actor->getAsPlayer() ); + targetPlayer->despawn( actor->getAsPlayer() ); + targetPlayer->spawn( actor->getAsPlayer() ); } break; - } - case GmCommand::Tribe: - { + } + case GmCommand::Tribe: + { targetPlayer->setLookAt( CharaLook::Tribe, param1 ); player.sendNotice( "Tribe for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); targetPlayer->spawn( targetPlayer ); auto inRange = targetPlayer->getInRangeActors(); for( auto actor : inRange ) { - targetPlayer->despawn( actor->getAsPlayer() ); - targetPlayer->spawn( actor->getAsPlayer() ); + targetPlayer->despawn( actor->getAsPlayer() ); + targetPlayer->spawn( actor->getAsPlayer() ); } break; - } - case GmCommand::Sex: - { + } + case GmCommand::Sex: + { targetPlayer->setLookAt( CharaLook::Gender, param1 ); player.sendNotice( "Sex for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); targetPlayer->spawn( targetPlayer ); auto inRange = targetActor->getInRangeActors(); for( auto actor : inRange ) { - targetPlayer->despawn( actor->getAsPlayer() ); - targetPlayer->spawn( actor->getAsPlayer() ); + targetPlayer->despawn( actor->getAsPlayer() ); + targetPlayer->spawn( actor->getAsPlayer() ); } break; - } - case GmCommand::Time: - { + } + case GmCommand::Time: + { player.setEorzeaTimeOffset( param2 ); player.sendNotice( "Eorzea time offset: " + std::to_string( param2 ) ); break; - } - case GmCommand::Weather: - { + } + case GmCommand::Weather: + { targetPlayer->getCurrentZone()->setWeatherOverride( static_cast< Common::Weather >( param1 ) ); player.sendNotice( "Weather in Zone \"" + targetPlayer->getCurrentZone()->getName() + "\" of " + - targetPlayer->getName() + " set in range." ); + targetPlayer->getName() + " set in range." ); break; - } - case GmCommand::Call: - { + } + case GmCommand::Call: + { if( targetPlayer->getZoneId() != player.getZoneId() ) - targetPlayer->setZone( player.getZoneId() ); + targetPlayer->setZone( player.getZoneId() ); targetPlayer->changePosition( player.getPos().x, player.getPos().y, player.getPos().z, player.getRot() ); player.sendNotice( "Calling " + targetPlayer->getName() ); break; - } - case GmCommand::Inspect: - { + } + case GmCommand::Inspect: + { player.sendNotice( "Name: " + targetPlayer->getName() + - "\nGil: " + std::to_string( targetPlayer->getCurrency( CurrencyType::Gil ) ) + - "\nZone: " + targetPlayer->getCurrentZone()->getName() + - "(" + std::to_string( targetPlayer->getZoneId() ) + ")" + - "\nClass: " + std::to_string( static_cast< uint8_t >( targetPlayer->getClass() ) ) + - "\nLevel: " + std::to_string( targetPlayer->getLevel() ) + - "\nExp: " + std::to_string( targetPlayer->getExp() ) + - "\nSearchMessage: " + targetPlayer->getSearchMessage() + - "\nPlayTime: " + std::to_string( targetPlayer->getPlayTime() ) ); + "\nGil: " + std::to_string( targetPlayer->getCurrency( CurrencyType::Gil ) ) + + "\nZone: " + targetPlayer->getCurrentZone()->getName() + + "(" + std::to_string( targetPlayer->getZoneId() ) + ")" + + "\nClass: " + std::to_string( static_cast< uint8_t >( targetPlayer->getClass() ) ) + + "\nLevel: " + std::to_string( targetPlayer->getLevel() ) + + "\nExp: " + std::to_string( targetPlayer->getExp() ) + + "\nSearchMessage: " + targetPlayer->getSearchMessage() + + "\nPlayTime: " + std::to_string( targetPlayer->getPlayTime() ) ); break; - } - case GmCommand::Speed: - { + } + case GmCommand::Speed: + { targetPlayer->queuePacket( makeActorControl143( player.getId(), Flee, param1 ) ); player.sendNotice( "Speed for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); break; - } - case GmCommand::Invis: - { + } + case GmCommand::Invis: + { player.setGmInvis( !player.getGmInvis() ); player.sendNotice( "Invisibility flag for " + player.getName() + - " was toggled to " + std::to_string( !player.getGmInvis() ) ); + " was toggled to " + std::to_string( !player.getGmInvis() ) ); for( auto actor : player.getInRangeActors() ) { - player.despawn( actor->getAsPlayer() ); - player.spawn( actor->getAsPlayer() ); + player.despawn( actor->getAsPlayer() ); + player.spawn( actor->getAsPlayer() ); } break; - } - case GmCommand::Kill: - { + } + case GmCommand::Kill: + { targetActor->getAsChara()->takeDamage( 9999999 ); player.sendNotice( "Killed " + std::to_string( targetActor->getId() ) ); break; - } - case GmCommand::Icon: - { + } + case GmCommand::Icon: + { targetPlayer->setOnlineStatusMask( param1 ); auto statusPacket = makeZonePacket< FFXIVIpcSetOnlineStatus >( player.getId() ); @@ -247,232 +247,237 @@ void Core::Network::GameConnection::gm1Handler( const Packets::FFXIVARR_PACKET_R targetPlayer->queuePacket( searchInfoPacket ); targetPlayer->sendToInRangeSet( makeActorControl142( player.getId(), SetStatusIcon, - static_cast< uint8_t >( player.getOnlineStatus() ) ), - true ); + static_cast< uint8_t >( player.getOnlineStatus() ) ), + true ); player.sendNotice( "Icon for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); break; - } - case GmCommand::Hp: - { + } + case GmCommand::Hp: + { targetPlayer->setHp( param1 ); player.sendNotice( "Hp for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); break; - } - case GmCommand::Mp: - { + } + case GmCommand::Mp: + { targetPlayer->setMp( param1 ); player.sendNotice( "Mp for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); break; - } - case GmCommand::Gp: - { + } + case GmCommand::Gp: + { targetPlayer->setHp( param1 ); player.sendNotice( "Gp for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); break; - } - case GmCommand::Exp: - { + } + case GmCommand::Exp: + { targetPlayer->gainExp( param1 ); player.sendNotice( std::to_string( param1 ) + " Exp was added to " + targetPlayer->getName() ); break; - } - case GmCommand::Inv: - { + } + case GmCommand::Inv: + { if( targetActor->getAsChara()->getInvincibilityType() == Common::InvincibilityType::InvincibilityRefill ) - targetActor->getAsChara()->setInvincibilityType( Common::InvincibilityType::InvincibilityNone ); + targetActor->getAsChara()->setInvincibilityType( Common::InvincibilityType::InvincibilityNone ); else - targetActor->getAsChara()->setInvincibilityType( Common::InvincibilityType::InvincibilityRefill ); + targetActor->getAsChara()->setInvincibilityType( Common::InvincibilityType::InvincibilityRefill ); player.sendNotice( "Invincibility for " + targetPlayer->getName() + - " was switched." ); + " was switched." ); break; - } - case GmCommand::Orchestrion: - { + } + case GmCommand::Orchestrion: + { if( param1 == 1 ) { - if( param2 == 0 ) - { - for( uint8_t i = 0; i < 255; i++ ) - targetActor->getAsPlayer()->learnSong( i, 0 ); + if( param2 == 0 ) + { + for( uint8_t i = 0; i < 255; i++ ) + targetActor->getAsPlayer()->learnSong( i, 0 ); - player.sendNotice( "All Songs for " + targetPlayer->getName() + - " were turned on." ); - } - else - { - targetActor->getAsPlayer()->learnSong( param2, 0 ); - player.sendNotice( "Song " + std::to_string( param2 ) + " for " + targetPlayer->getName() + - " was turned on." ); - } + player.sendNotice( "All Songs for " + targetPlayer->getName() + + " were turned on." ); + } + else + { + targetActor->getAsPlayer()->learnSong( param2, 0 ); + player.sendNotice( "Song " + std::to_string( param2 ) + " for " + targetPlayer->getName() + + " was turned on." ); + } } break; - } - case GmCommand::Item: - { + } + case GmCommand::Item: + { auto quantity = param2; if( quantity < 1 || quantity > 999 ) { - quantity = 1; + quantity = 1; } if( ( param1 == 0xcccccccc ) ) { - player.sendUrgent( "Syntaxerror." ); - return; + player.sendUrgent( "Syntaxerror." ); + return; } if( !targetPlayer->addItem( param1, quantity ) ) - player.sendUrgent( "Item " + std::to_string( param1 ) + " could not be added to inventory." ); + player.sendUrgent( "Item " + std::to_string( param1 ) + " could not be added to inventory." ); break; - } - case GmCommand::Gil: - { + } + case GmCommand::Gil: + { targetPlayer->addCurrency( CurrencyType::Gil, param1 ); player.sendNotice( "Added " + std::to_string( param1 ) + " Gil for " + targetPlayer->getName() ); break; - } - case GmCommand::Collect: - { + } + case GmCommand::Collect: + { uint32_t gil = targetPlayer->getCurrency( CurrencyType::Gil ); if( gil < param1 ) { - player.sendUrgent( "Player does not have enough Gil(" + std::to_string( gil ) + ")" ); + player.sendUrgent( "Player does not have enough Gil(" + std::to_string( gil ) + ")" ); } else { - targetPlayer->removeCurrency( CurrencyType::Gil, param1 ); - player.sendNotice( "Removed " + std::to_string( param1 ) + - " Gil from " + targetPlayer->getName() + - "(" + std::to_string( gil ) + " before)" ); + targetPlayer->removeCurrency( CurrencyType::Gil, param1 ); + player.sendNotice( "Removed " + std::to_string( param1 ) + + " Gil from " + targetPlayer->getName() + + "(" + std::to_string( gil ) + " before)" ); } break; - } - case GmCommand::QuestAccept: - { + } + case GmCommand::QuestAccept: + { targetPlayer->updateQuest( param1, 1 ); break; - } - case GmCommand::QuestCancel: - { + } + case GmCommand::QuestCancel: + { targetPlayer->removeQuest( param1 ); break; - } - case GmCommand::QuestComplete: - { + } + case GmCommand::QuestComplete: + { targetPlayer->finishQuest( param1 ); break; - } - case GmCommand::QuestIncomplete: - { + } + case GmCommand::QuestIncomplete: + { targetPlayer->unfinishQuest( param1 ); break; - } - case GmCommand::QuestSequence: - { + } + case GmCommand::QuestSequence: + { targetPlayer->updateQuest( param1, param2 ); break; - } - case GmCommand::GC: - { + } + case GmCommand::GC: + { targetPlayer->setGc( param1 ); player.sendNotice( "GC for " + targetPlayer->getName() + - " was set to " + std::to_string( targetPlayer->getGc() ) ); + " was set to " + std::to_string( targetPlayer->getGc() ) ); break; - } - case GmCommand::GCRank: - { + } + case GmCommand::GCRank: + { targetPlayer->setGcRankAt( targetPlayer->getGc() - 1, param1 ); player.sendNotice( "GC Rank for " + targetPlayer->getName() + - " for GC " + std::to_string( targetPlayer->getGc() ) + - " was set to " + std::to_string( targetPlayer->getGcRankArray()[targetPlayer->getGc() - 1] ) ); + " for GC " + std::to_string( targetPlayer->getGc() ) + + " was set to " + + std::to_string( targetPlayer->getGcRankArray()[ targetPlayer->getGc() - 1 ] ) ); break; - } - case GmCommand::Aetheryte: - { + } + case GmCommand::Aetheryte: + { if( param1 == 0 ) { - if( param2 == 0 ) - { - for( uint8_t i = 0; i < 255; i++ ) - targetActor->getAsPlayer()->registerAetheryte( i ); + if( param2 == 0 ) + { + for( uint8_t i = 0; i < 255; i++ ) + targetActor->getAsPlayer()->registerAetheryte( i ); - player.sendNotice( "All Aetherytes for " + targetPlayer->getName() + - " were turned on." ); - } - else - { - targetActor->getAsPlayer()->registerAetheryte( param2 ); - player.sendNotice( "Aetheryte " + std::to_string( param2 ) + " for " + targetPlayer->getName() + - " was turned on." ); - } + player.sendNotice( "All Aetherytes for " + targetPlayer->getName() + + " were turned on." ); + } + else + { + targetActor->getAsPlayer()->registerAetheryte( param2 ); + player.sendNotice( "Aetheryte " + std::to_string( param2 ) + " for " + targetPlayer->getName() + + " was turned on." ); + } } break; - } - case GmCommand::Wireframe: - { - player.queuePacket( boost::make_shared< ActorControlPacket143 >( player.getId(), ActorControlType::ToggleWireframeRendering ) ); + } + case GmCommand::Wireframe: + { + player.queuePacket( + boost::make_shared< ActorControlPacket143 >( player.getId(), ActorControlType::ToggleWireframeRendering ) ); player.sendNotice( "Wireframe Rendering for " + player.getName() + " was toggled" ); break; - } - case GmCommand::Teri: - { + } + case GmCommand::Teri: + { auto pTeriMgr = g_fw.get< TerritoryMgr >(); if( auto instance = pTeriMgr->getInstanceZonePtr( param1 ) ) { - player.sendDebug( "Found instance: " + instance->getName() + ", id: " + std::to_string( param1 ) ); + player.sendDebug( "Found instance: " + instance->getName() + ", id: " + std::to_string( param1 ) ); - // if the zone is an instanceContent instance, make sure the player is actually bound to it - auto pInstance = instance->getAsInstanceContent(); + // if the zone is an instanceContent instance, make sure the player is actually bound to it + auto pInstance = instance->getAsInstanceContent(); - // pInstance will be nullptr if you're accessing a normal zone via its allocated instance id rather than its zoneid - if( pInstance && !pInstance->isPlayerBound( player.getId() ) ) - { - player.sendUrgent( "Not able to join instance: " + std::to_string( param1 ) ); - player.sendUrgent( "Player not bound! ( run !instance bind first ) " + std::to_string( param1 ) ); - break; - } + // pInstance will be nullptr if you're accessing a normal zone via its allocated instance id rather than its zoneid + if( pInstance && !pInstance->isPlayerBound( player.getId() ) ) + { + player.sendUrgent( "Not able to join instance: " + std::to_string( param1 ) ); + player.sendUrgent( + "Player not bound! ( run !instance bind first ) " + std::to_string( param1 ) ); + break; + } - player.setInstance( instance ); + player.setInstance( instance ); } - else if( !pTeriMgr->isValidTerritory( param1 ) ) + else if( !pTeriMgr->isValidTerritory( param1 ) ) { - player.sendUrgent( "Invalid zone " + std::to_string( param1 ) ); + player.sendUrgent( "Invalid zone " + std::to_string( param1 ) ); } else { - auto pZone = pTeriMgr->getZoneByTerriId( param1 ); - if( !pZone ) - { - player.sendUrgent( "No zone instance found for " + std::to_string( param1 ) ); - break; - } + auto pZone = pTeriMgr->getZoneByTerriId( param1 ); + if( !pZone ) + { + player.sendUrgent( "No zone instance found for " + std::to_string( param1 ) ); + break; + } - targetPlayer->setPos( targetPlayer->getPos() ); - targetPlayer->performZoning( param1, targetPlayer->getPos(), 0 ); - player.sendNotice( targetPlayer->getName() + " was warped to zone " + - std::to_string( param1 ) + " (" + pZone->getName() + ")" ); + targetPlayer->setPos( targetPlayer->getPos() ); + targetPlayer->performZoning( param1, targetPlayer->getPos(), 0 ); + player.sendNotice( targetPlayer->getName() + " was warped to zone " + + std::to_string( param1 ) + " (" + pZone->getName() + ")" ); } break; - } - case GmCommand::TeriInfo: - { + } + case GmCommand::TeriInfo: + { auto pCurrentZone = player.getCurrentZone(); player.sendNotice( "ZoneId: " + std::to_string( player.getZoneId() ) + "\nName: " + pCurrentZone->getName() + "\nInternalName: " + pCurrentZone->getInternalName() + "\nGuId: " + std::to_string( pCurrentZone->getGuId() ) + "\nPopCount: " + std::to_string( pCurrentZone->getPopCount() ) + - "\nCurrentWeather: " + std::to_string( static_cast< uint8_t >( pCurrentZone->getCurrentWeather() ) ) + - "\nNextWeather: " + std::to_string( static_cast< uint8_t >( pCurrentZone->getNextWeather() ) ) ); + "\nCurrentWeather: " + + std::to_string( static_cast< uint8_t >( pCurrentZone->getCurrentWeather() ) ) + + "\nNextWeather: " + + std::to_string( static_cast< uint8_t >( pCurrentZone->getNextWeather() ) ) ); break; - } - case GmCommand::Jump: - { + } + case GmCommand::Jump: + { auto inRange = player.getInRangeActors(); @@ -481,59 +486,59 @@ void Core::Network::GameConnection::gm1Handler( const Packets::FFXIVARR_PACKET_R player.sendNotice( "Jumping to " + targetPlayer->getName() + " in range." ); break; - } + } - default: + default: player.sendUrgent( "GM1 Command not implemented: " + std::to_string( commandId ) ); break; - } + } } void Core::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - if( player.getGmRank() <= 0 ) + if( player.getGmRank() <= 0 ) + return; + + auto pLog = g_fw.get< Logger >(); + auto pServerZone = g_fw.get< ServerZone >(); + + const auto packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand2 >( inPacket ); + + const auto& commandId = packet.data().commandId; + const auto& param1 = std::string( packet.data().param1 ); + + pLog->debug( player.getName() + " used GM2 commandId: " + std::to_string( commandId ) + ", params: " + param1 ); + + auto targetSession = pServerZone->getSession( param1 ); + Core::Entity::CharaPtr targetActor; + + if( targetSession != nullptr ) + { + targetActor = targetSession->getPlayer(); + } + else + { + if( param1 == "self" ) + { + targetActor = player.getAsPlayer(); + } + else + { + player.sendUrgent( "Player " + param1 + " not found on this server." ); return; - - auto pLog = g_fw.get< Logger >(); - auto pServerZone = g_fw.get< ServerZone >(); + } + } - const auto packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand2 >( inPacket ); + if( !targetActor ) + return; - const auto& commandId = packet.data().commandId; - const auto& param1 = std::string( packet.data().param1 ); + auto targetPlayer = targetActor->getAsPlayer(); - pLog->debug( player.getName() + " used GM2 commandId: " + std::to_string( commandId ) + ", params: " + param1 ); - - auto targetSession = pServerZone->getSession( param1 ); - Core::Entity::CharaPtr targetActor; - - if( targetSession != nullptr ) - { - targetActor = targetSession->getPlayer(); - } - else - { - if( param1 == "self" ) - { - targetActor = player.getAsPlayer(); - } - else - { - player.sendUrgent( "Player " + param1 + " not found on this server." ); - return; - } - } - - if( !targetActor ) - return; - - auto targetPlayer = targetActor->getAsPlayer(); - - switch( commandId ) - { - case GmCommand::Raise: - { + switch( commandId ) + { + case GmCommand::Raise: + { targetPlayer->resetHp(); targetPlayer->resetMp(); targetPlayer->setStatus( Common::ActorStatus::Idle ); @@ -542,28 +547,29 @@ void Core::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACKET_R targetPlayer->sendToInRangeSet( makeActorControl143( player.getId(), ZoneIn, 0x01, 0x01, 0, 113 ), true ); targetPlayer->sendToInRangeSet( makeActorControl142( player.getId(), SetStatus, - static_cast< uint8_t >( Common::ActorStatus::Idle ) ), true ); + static_cast< uint8_t >( Common::ActorStatus::Idle ) ), + true ); player.sendNotice( "Raised " + targetPlayer->getName() ); break; - } - case GmCommand::Jump: - { + } + case GmCommand::Jump: + { if( targetPlayer->getZoneId() != player.getZoneId() ) { - player.setZone( targetPlayer->getZoneId() ); + player.setZone( targetPlayer->getZoneId() ); } player.changePosition( targetActor->getPos().x, targetActor->getPos().y, targetActor->getPos().z, targetActor->getRot() ); player.sendNotice( "Jumping to " + targetPlayer->getName() ); break; - } - case GmCommand::Call: - { + } + case GmCommand::Call: + { // We shouldn't be able to call a player into an instance, only call them out of one if( player.getCurrentInstance() ) { - player.sendUrgent( "You are unable to call a player while bound to a battle instance." ); - return; + player.sendUrgent( "You are unable to call a player while bound to a battle instance." ); + return; } targetPlayer->setInstance( player.getCurrentZone() ); @@ -571,10 +577,10 @@ void Core::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACKET_R targetPlayer->changePosition( player.getPos().x, player.getPos().y, player.getPos().z, player.getRot() ); player.sendNotice( "Calling " + targetPlayer->getName() ); break; - } - default: + } + default: player.sendUrgent( "GM2 Command not implemented: " + std::to_string( commandId ) ); break; - } + } } diff --git a/src/servers/sapphire_zone/Network/Handlers/InventoryHandler.cpp b/src/servers/sapphire_zone/Network/Handlers/InventoryHandler.cpp index 8b58fbe9..67ce0127 100644 --- a/src/servers/sapphire_zone/Network/Handlers/InventoryHandler.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/InventoryHandler.cpp @@ -30,62 +30,62 @@ using namespace Core::Network::Packets::Server; void Core::Network::GameConnection::inventoryModifyHandler( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - const auto packet = ZoneChannelPacket< Client::FFXIVIpcInventoryModifyHandler >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcInventoryModifyHandler >( inPacket ); - const auto& action = packet.data().action; - const auto& splitCount = packet.data().splitCount; + const auto& action = packet.data().action; + const auto& splitCount = packet.data().splitCount; - const auto& fromSlot = packet.data().fromSlot; - const auto& fromContainer = packet.data().fromContainer; - const auto& toSlot = packet.data().toSlot; - const auto& toContainer = packet.data().toContainer; + const auto& fromSlot = packet.data().fromSlot; + const auto& fromContainer = packet.data().fromContainer; + const auto& toSlot = packet.data().toSlot; + const auto& toContainer = packet.data().toContainer; - auto ackPacket = makeZonePacket< Server::FFXIVIpcInventoryActionAck >( player.getId() ); - ackPacket->data().sequence = packet.data().seq; - ackPacket->data().type = 7; - player.queuePacket( ackPacket ); - - auto pLog = g_fw.get< Logger >(); + auto ackPacket = makeZonePacket< Server::FFXIVIpcInventoryActionAck >( player.getId() ); + ackPacket->data().sequence = packet.data().seq; + ackPacket->data().type = 7; + player.queuePacket( ackPacket ); - pLog->debug( "InventoryAction: " + std::to_string( action ) ); + auto pLog = g_fw.get< Logger >(); - // TODO: other inventory operations need to be implemented - switch( action ) - { + pLog->debug( "InventoryAction: " + std::to_string( action ) ); - case InventoryOperation::Discard: // discard item action - { - player.discardItem( fromContainer, fromSlot ); - } + // TODO: other inventory operations need to be implemented + switch( action ) + { + + case InventoryOperation::Discard: // discard item action + { + player.discardItem( fromContainer, fromSlot ); + } break; - case InventoryOperation::Move: // move item action - { - player.moveItem( fromContainer, fromSlot, toContainer, toSlot ); - } + case InventoryOperation::Move: // move item action + { + player.moveItem( fromContainer, fromSlot, toContainer, toSlot ); + } break; - case InventoryOperation::Swap: // swap item action - { - player.swapItem( fromContainer, fromSlot, toContainer, toSlot ); - } + case InventoryOperation::Swap: // swap item action + { + player.swapItem( fromContainer, fromSlot, toContainer, toSlot ); + } break; - case InventoryOperation::Merge: // merge stack action - { - player.mergeItem( fromContainer, fromSlot, toContainer, toSlot ); - } + case InventoryOperation::Merge: // merge stack action + { + player.mergeItem( fromContainer, fromSlot, toContainer, toSlot ); + } break; - case InventoryOperation::Split: // split stack action - { - player.splitItem( fromContainer, fromSlot, toContainer, toSlot, splitCount ); - } + case InventoryOperation::Split: // split stack action + { + player.splitItem( fromContainer, fromSlot, toContainer, toSlot, splitCount ); + } break; - default: - break; + default: + break; - } + } } diff --git a/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp index 0a093c81..5880e5ec 100644 --- a/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp @@ -54,279 +54,280 @@ using namespace Core::Network::ActorControl; void Core::Network::GameConnection::fcInfoReqHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - // TODO: use new packet struct for this - //GamePacketPtr pPe( new GamePacket( 0xDD, 0x78, player.getId(), player.getId() ) ); - //pPe->setValAt< uint8_t >( 0x48, 0x01 ); - //queueOutPacket( pPe ); + // TODO: use new packet struct for this + //GamePacketPtr pPe( new GamePacket( 0xDD, 0x78, player.getId(), player.getId() ) ); + //pPe->setValAt< uint8_t >( 0x48, 0x01 ); + //queueOutPacket( pPe ); } void Core::Network::GameConnection::setSearchInfoHandler( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - const auto packet = ZoneChannelPacket< Client::FFXIVIpcSetSearchInfo >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcSetSearchInfo >( inPacket ); - const auto& inval = packet.data().status1; - const auto& inval1 = packet.data().status2; - const auto& status = packet.data().status; - const auto& selectRegion = packet.data().language; + const auto& inval = packet.data().status1; + const auto& inval1 = packet.data().status2; + const auto& status = packet.data().status; + const auto& selectRegion = packet.data().language; - player.setSearchInfo( selectRegion, 0, packet.data().searchComment ); + player.setSearchInfo( selectRegion, 0, packet.data().searchComment ); - player.setOnlineStatusMask( status ); + player.setOnlineStatusMask( status ); - if( player.isNewAdventurer() && !( inval & 0x01000000 ) ) - // mark player as not new adventurer anymore - player.setNewAdventurer( false ); - else if( inval & 0x01000000 ) - // mark player as new adventurer - player.setNewAdventurer( true ); + if( player.isNewAdventurer() && !( inval & 0x01000000 ) ) + // mark player as not new adventurer anymore + player.setNewAdventurer( false ); + else if( inval & 0x01000000 ) + // mark player as new adventurer + player.setNewAdventurer( true ); - auto statusPacket = makeZonePacket< FFXIVIpcSetOnlineStatus >( player.getId() ); - statusPacket->data().onlineStatusFlags = status; - queueOutPacket( statusPacket ); + auto statusPacket = makeZonePacket< FFXIVIpcSetOnlineStatus >( player.getId() ); + statusPacket->data().onlineStatusFlags = status; + queueOutPacket( statusPacket ); - auto searchInfoPacket = makeZonePacket< FFXIVIpcSetSearchInfo >( player.getId() ); - searchInfoPacket->data().onlineStatusFlags = status; - searchInfoPacket->data().selectRegion = player.getSearchSelectRegion(); - strcpy( searchInfoPacket->data().searchMessage, player.getSearchMessage() ); - queueOutPacket( searchInfoPacket ); + auto searchInfoPacket = makeZonePacket< FFXIVIpcSetSearchInfo >( player.getId() ); + searchInfoPacket->data().onlineStatusFlags = status; + searchInfoPacket->data().selectRegion = player.getSearchSelectRegion(); + strcpy( searchInfoPacket->data().searchMessage, player.getSearchMessage() ); + queueOutPacket( searchInfoPacket ); - player.sendToInRangeSet( makeActorControl142( player.getId(), SetStatusIcon, - static_cast< uint8_t >( player.getOnlineStatus() ) ), true ); + player.sendToInRangeSet( makeActorControl142( player.getId(), SetStatusIcon, + static_cast< uint8_t >( player.getOnlineStatus() ) ), true ); } void Core::Network::GameConnection::reqSearchInfoHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto searchInfoPacket = makeZonePacket< FFXIVIpcInitSearchInfo >( player.getId() ); - searchInfoPacket->data().onlineStatusFlags = player.getOnlineStatusMask(); - searchInfoPacket->data().selectRegion = player.getSearchSelectRegion(); - strcpy( searchInfoPacket->data().searchMessage, player.getSearchMessage() ); - queueOutPacket( searchInfoPacket ); + auto searchInfoPacket = makeZonePacket< FFXIVIpcInitSearchInfo >( player.getId() ); + searchInfoPacket->data().onlineStatusFlags = player.getOnlineStatusMask(); + searchInfoPacket->data().selectRegion = player.getSearchSelectRegion(); + strcpy( searchInfoPacket->data().searchMessage, player.getSearchMessage() ); + queueOutPacket( searchInfoPacket ); } void Core::Network::GameConnection::linkshellListHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto linkshellListPacket = makeZonePacket< FFXIVIpcLinkshellList >( player.getId() ); - queueOutPacket( linkshellListPacket ); + auto linkshellListPacket = makeZonePacket< FFXIVIpcLinkshellList >( player.getId() ); + queueOutPacket( linkshellListPacket ); } void Core::Network::GameConnection::updatePositionHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - // if the player is marked for zoning we no longer want to update his pos - if( player.isMarkedForZoning() ) - return; + // if the player is marked for zoning we no longer want to update his pos + if( player.isMarkedForZoning() ) + return; - Packets::FFXIVARR_PACKET_RAW copy = inPacket; + Packets::FFXIVARR_PACKET_RAW copy = inPacket; - struct testMov - { - uint32_t specialMovement : 23; // 0x00490FDA - uint32_t strafe : 7; - uint32_t moveBackward : 1; - uint32_t strafeRight : 1; // if 0, strafe left. - } IPC_OP_019A; + struct testMov + { + uint32_t specialMovement : 23; // 0x00490FDA + uint32_t strafe : 7; + uint32_t moveBackward : 1; + uint32_t strafeRight : 1; // if 0, strafe left. + } IPC_OP_019A; - struct testMov1 - { - uint16_t bit1 : 1; // 0x00490FDA - uint16_t bit2 : 1; - uint16_t bit3 : 1; - uint16_t bit4 : 1; - uint16_t bit5 : 1; - uint16_t bit6 : 1; - uint16_t bit7 : 1; - uint16_t bit8 : 1; - uint16_t bit9 : 1; // 0x00490FDA - uint16_t bit10 : 1; - uint16_t bit11 : 1; - uint16_t bit12 : 1; - uint16_t bit13 : 1; - uint16_t bit14 : 1; - uint16_t bit15 : 1; - uint16_t bit16 : 1; - } IPC_OP_019AB; + struct testMov1 + { + uint16_t bit1 : 1; // 0x00490FDA + uint16_t bit2 : 1; + uint16_t bit3 : 1; + uint16_t bit4 : 1; + uint16_t bit5 : 1; + uint16_t bit6 : 1; + uint16_t bit7 : 1; + uint16_t bit8 : 1; + uint16_t bit9 : 1; // 0x00490FDA + uint16_t bit10 : 1; + uint16_t bit11 : 1; + uint16_t bit12 : 1; + uint16_t bit13 : 1; + uint16_t bit14 : 1; + uint16_t bit15 : 1; + uint16_t bit16 : 1; + } IPC_OP_019AB; - auto flags = *reinterpret_cast< uint16_t* >( ©.data[0x18] ); - memcpy( &IPC_OP_019AB, &flags, 2 ); + auto flags = *reinterpret_cast< uint16_t* >( ©.data[ 0x18 ] ); + memcpy( &IPC_OP_019AB, &flags, 2 ); - auto flags1 = *reinterpret_cast< uint32_t* >( ©.data[0x18] ); - memcpy( &IPC_OP_019A, &flags1, 4 ); + auto flags1 = *reinterpret_cast< uint32_t* >( ©.data[ 0x18 ] ); + memcpy( &IPC_OP_019A, &flags1, 4 ); - auto pLog = g_fw.get< Logger >(); + auto pLog = g_fw.get< Logger >(); - bool bPosChanged = false; - if( ( player.getPos().x != *reinterpret_cast< float* >( ©.data[0x1C] ) ) || - ( player.getPos().y != *reinterpret_cast< float* >( ©.data[0x20] ) ) || - ( player.getPos().z != *reinterpret_cast< float* >( ©.data[0x24] ) ) ) - bPosChanged = true; - if( !bPosChanged && player.getRot() == *reinterpret_cast< float* >( ©.data[0x10] ) ) - return; + bool bPosChanged = false; + if( ( player.getPos().x != *reinterpret_cast< float* >( ©.data[ 0x1C ] ) ) || + ( player.getPos().y != *reinterpret_cast< float* >( ©.data[ 0x20 ] ) ) || + ( player.getPos().z != *reinterpret_cast< float* >( ©.data[ 0x24 ] ) ) ) + bPosChanged = true; + if( !bPosChanged && player.getRot() == *reinterpret_cast< float* >( ©.data[ 0x10 ] ) ) + return; - player.setRot( *reinterpret_cast< float* >( ©.data[0x10] ) ); - player.setPos( *reinterpret_cast< float* >( ©.data[0x1C] ), - *reinterpret_cast< float* >( ©.data[0x20] ), - *reinterpret_cast< float* >( ©.data[0x24] ) ); + player.setRot( *reinterpret_cast< float* >( ©.data[ 0x10 ] ) ); + player.setPos( *reinterpret_cast< float* >( ©.data[ 0x1C ] ), + *reinterpret_cast< float* >( ©.data[ 0x20 ] ), + *reinterpret_cast< float* >( ©.data[ 0x24 ] ) ); - if( ( player.getCurrentAction() != nullptr ) && bPosChanged ) - player.getCurrentAction()->setInterrupted(); + if( ( player.getCurrentAction() != nullptr ) && bPosChanged ) + player.getCurrentAction()->setInterrupted(); - // if no one is in range, don't bother trying to send a position update - if( !player.hasInRangeActor() ) - return; + // if no one is in range, don't bother trying to send a position update + if( !player.hasInRangeActor() ) + return; - auto moveState = *reinterpret_cast< uint8_t* >( ©.data[0x19] ); - auto moveType = *reinterpret_cast< uint8_t* >( ©.data[0x18] ); + auto moveState = *reinterpret_cast< uint8_t* >( ©.data[ 0x19 ] ); + auto moveType = *reinterpret_cast< uint8_t* >( ©.data[ 0x18 ] ); - uint8_t unk1 = 0; - uint8_t unk2 = 0; - uint8_t unk3 = moveState; - uint16_t unk4 = 0; + uint8_t unk1 = 0; + uint8_t unk2 = 0; + uint8_t unk3 = moveState; + uint16_t unk4 = 0; - // HACK: This part is hackish, we need to find out what all theese things really do. - //pLog->debug( std::to_string( moveState ) + " -- moveState " ); - //pLog->debug( std::to_string( moveType ) + " -- moveType " ); + // HACK: This part is hackish, we need to find out what all theese things really do. + //pLog->debug( std::to_string( moveState ) + " -- moveState " ); + //pLog->debug( std::to_string( moveType ) + " -- moveType " ); - if( moveType & MoveType::Running ) - { - unk1 = 0x7F; - unk2 = 0x00; - unk4 = 0x3C; - } + if( moveType & MoveType::Running ) + { + unk1 = 0x7F; + unk2 = 0x00; + unk4 = 0x3C; + } - if( moveType & MoveType::Strafing ) - { - unk2 = 0x40; - unk1 = 0x7F; - //if( IPC_OP_019A.strafeRight == 1 ) - // unk1 = 0xbf; - //else - // unk1 = 0x5f; - unk4 = 0x3C; - } + if( moveType & MoveType::Strafing ) + { + unk2 = 0x40; + unk1 = 0x7F; + //if( IPC_OP_019A.strafeRight == 1 ) + // unk1 = 0xbf; + //else + // unk1 = 0x5f; + unk4 = 0x3C; + } - if( moveType & MoveType::Walking ) - { - unk1 = 0x7F; + if( moveType & MoveType::Walking ) + { + unk1 = 0x7F; + unk2 = 0x02; + unk3 = 0x00; + unk4 = 0x18; + } + + if( moveType & MoveType::Walking && moveType & MoveType::Strafing ) + { + unk2 = 0x06; + unk1 = 0xFF; + unk4 = 0x18; + } + + if( moveType & MoveType::Jumping ) + { + + unk1 = 0x3F; + unk2 = 0x32; + unk4 = 0x5f18; + if( moveState == MoveState::Land ) unk2 = 0x02; - unk3 = 0x00; - unk4 = 0x18; - } - if( moveType & MoveType::Walking && moveType & MoveType::Strafing ) - { - unk2 = 0x06; - unk1 = 0xFF; - unk4 = 0x18; - } + } - if( moveType & MoveType::Jumping ) - { + uint64_t currentTime = Util::getTimeMs(); - unk1 = 0x3F; - unk2 = 0x32; - unk4 = 0x5f18; - if( moveState == MoveState::Land ) - unk2 = 0x02; + if( ( currentTime - player.m_lastMoveTime ) < 100 && player.m_lastMoveflag == moveState ) + return; - } + player.m_lastMoveTime = currentTime; + player.m_lastMoveflag = moveState; - uint64_t currentTime = Util::getTimeMs(); - - if( ( currentTime - player.m_lastMoveTime ) < 100 && player.m_lastMoveflag == moveState ) - return; - - player.m_lastMoveTime = currentTime; - player.m_lastMoveflag = moveState; - - auto movePacket = boost::make_shared< MoveActorPacket >( player, unk1, unk2, moveState, unk4 ); - player.sendToInRangeSet( movePacket ); + auto movePacket = boost::make_shared< MoveActorPacket >( player, unk1, unk2, moveState, unk4 ); + player.sendToInRangeSet( movePacket ); } -void Core::Network::GameConnection::reqEquipDisplayFlagsHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, - Entity::Player& player ) +void +Core::Network::GameConnection::reqEquipDisplayFlagsHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, + Entity::Player& player ) { - player.setEquipDisplayFlags( inPacket.data[0x10] ); + player.setEquipDisplayFlags( inPacket.data[ 0x10 ] ); - player.sendDebug( "EquipDisplayFlag CHANGE: " + std::to_string( player.getEquipDisplayFlags() ) ); + player.sendDebug( "EquipDisplayFlag CHANGE: " + std::to_string( player.getEquipDisplayFlags() ) ); } void Core::Network::GameConnection::zoneLineHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pTeriMgr = g_fw.get< TerritoryMgr >(); - const auto packet = ZoneChannelPacket< Client::FFXIVIpcZoneLineHandler >( inPacket ); - const auto& zoneLineId = packet.data().zoneLineId; + const auto packet = ZoneChannelPacket< Client::FFXIVIpcZoneLineHandler >( inPacket ); + const auto& zoneLineId = packet.data().zoneLineId; - player.sendDebug( "Walking ZoneLine " + std::to_string( zoneLineId ) ); + player.sendDebug( "Walking ZoneLine " + std::to_string( zoneLineId ) ); - auto pZone = player.getCurrentZone(); + auto pZone = player.getCurrentZone(); - auto pLine = pTeriMgr->getTerritoryPosition( zoneLineId ); + auto pLine = pTeriMgr->getTerritoryPosition( zoneLineId ); - Common::FFXIVARR_POSITION3 targetPos{}; - uint32_t targetZone; - float rotation = 0.0f; + Common::FFXIVARR_POSITION3 targetPos{}; + uint32_t targetZone; + float rotation = 0.0f; - if( pLine != nullptr ) - { - player.sendDebug( "ZoneLine " + std::to_string( zoneLineId ) + " found." ); - targetPos = pLine->getTargetPosition(); - targetZone = pLine->getTargetZoneId(); - rotation = pLine->getTargetRotation(); + if( pLine != nullptr ) + { + player.sendDebug( "ZoneLine " + std::to_string( zoneLineId ) + " found." ); + targetPos = pLine->getTargetPosition(); + targetZone = pLine->getTargetZoneId(); + rotation = pLine->getTargetRotation(); - auto preparePacket = makeZonePacket< FFXIVIpcPrepareZoning >( player.getId() ); - preparePacket->data().targetZone = targetZone; + auto preparePacket = makeZonePacket< FFXIVIpcPrepareZoning >( player.getId() ); + preparePacket->data().targetZone = targetZone; - //ActorControlPacket143 controlPacket( pPlayer, ActorControlType::DespawnZoneScreenMsg, - // 0x03, player.getId(), 0x01, targetZone ); - player.queuePacket( preparePacket ); - } - else - { - // No zoneline found, revert to last zone - player.sendUrgent( "ZoneLine " + std::to_string( zoneLineId ) + " not found." ); - targetPos.x = 0; - targetPos.y = 0; - targetPos.z = 0; - targetZone = pZone->getTerritoryId(); - } + //ActorControlPacket143 controlPacket( pPlayer, ActorControlType::DespawnZoneScreenMsg, + // 0x03, player.getId(), 0x01, targetZone ); + player.queuePacket( preparePacket ); + } + else + { + // No zoneline found, revert to last zone + player.sendUrgent( "ZoneLine " + std::to_string( zoneLineId ) + " not found." ); + targetPos.x = 0; + targetPos.y = 0; + targetPos.z = 0; + targetZone = pZone->getTerritoryId(); + } - player.performZoning( targetZone, targetPos, rotation); + player.performZoning( targetZone, targetPos, rotation ); } void Core::Network::GameConnection::discoveryHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - const auto packet = ZoneChannelPacket< Client::FFXIVIpcDiscoveryHandler >( inPacket ); - const auto& positionRef = packet.data().positionRef; + const auto packet = ZoneChannelPacket< Client::FFXIVIpcDiscoveryHandler >( inPacket ); + const auto& positionRef = packet.data().positionRef; - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto pQR = pDb->query( "SELECT id, map_id, discover_id " - "FROM discoveryinfo " - "WHERE id = " + std::to_string( positionRef ) + ";" ); + auto pQR = pDb->query( "SELECT id, map_id, discover_id " + "FROM discoveryinfo " + "WHERE id = " + std::to_string( positionRef ) + ";" ); - if( !pQR->next() ) - { - player.sendNotice( "Discovery ref pos ID: " + std::to_string( positionRef ) + " not found. " ); - return; - } + if( !pQR->next() ) + { + player.sendNotice( "Discovery ref pos ID: " + std::to_string( positionRef ) + " not found. " ); + return; + } - auto discoveryPacket = makeZonePacket< FFXIVIpcDiscovery >( player.getId() ); - discoveryPacket->data().map_id = pQR->getUInt( 2 ); - discoveryPacket->data().map_part_id = pQR->getUInt( 3 ); + auto discoveryPacket = makeZonePacket< FFXIVIpcDiscovery >( player.getId() ); + discoveryPacket->data().map_id = pQR->getUInt( 2 ); + discoveryPacket->data().map_part_id = pQR->getUInt( 3 ); - player.queuePacket( discoveryPacket ); - player.sendNotice( "Discovery ref pos ID: " + std::to_string( positionRef ) ); + player.queuePacket( discoveryPacket ); + player.sendNotice( "Discovery ref pos ID: " + std::to_string( positionRef ) ); - player.discover( pQR->getUInt16( 2 ), pQR->getUInt16( 3 ) ); + player.discover( pQR->getUInt16( 2 ), pQR->getUInt16( 3 ) ); } @@ -334,33 +335,33 @@ void Core::Network::GameConnection::discoveryHandler( const Core::Network::Packe void Core::Network::GameConnection::playTimeHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto playTimePacket = makeZonePacket< FFXIVIpcPlayTime >( player.getId() ); - playTimePacket->data().playTimeInMinutes = player.getPlayTime() / 60; - player.queuePacket( playTimePacket ); + auto playTimePacket = makeZonePacket< FFXIVIpcPlayTime >( player.getId() ); + playTimePacket->data().playTimeInMinutes = player.getPlayTime() / 60; + player.queuePacket( playTimePacket ); } void Core::Network::GameConnection::initHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - // init handler means this is a login procedure - player.setIsLogin( true ); + // init handler means this is a login procedure + player.setIsLogin( true ); - player.sendZonePackets(); + player.sendZonePackets(); } void Core::Network::GameConnection::blackListHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - uint8_t count = inPacket.data[0x11]; + uint8_t count = inPacket.data[ 0x11 ]; - auto blackListPacket = makeZonePacket< FFXIVIpcBlackList >( player.getId() ); - blackListPacket->data().sequence = count; - // TODO: Fill with actual blacklist data - //blackListPacket.data().entry[0].contentId = 1; - //sprintf( blackListPacket.data().entry[0].name, "Test Test" ); - queueOutPacket( blackListPacket ); + auto blackListPacket = makeZonePacket< FFXIVIpcBlackList >( player.getId() ); + blackListPacket->data().sequence = count; + // TODO: Fill with actual blacklist data + //blackListPacket.data().entry[0].contentId = 1; + //sprintf( blackListPacket.data().entry[0].name, "Test Test" ); + queueOutPacket( blackListPacket ); } @@ -368,145 +369,145 @@ void Core::Network::GameConnection::blackListHandler( const Core::Network::Packe void Core::Network::GameConnection::pingHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - const auto packet = ZoneChannelPacket< Client::FFXIVIpcPingHandler >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcPingHandler >( inPacket ); - queueOutPacket( boost::make_shared< Server::PingPacket >( player, packet.data().timestamp ) ); + queueOutPacket( boost::make_shared< Server::PingPacket >( player, packet.data().timestamp ) ); - player.setLastPing( static_cast< uint32_t >( time( nullptr ) ) ); + player.setLastPing( static_cast< uint32_t >( time( nullptr ) ) ); } void Core::Network::GameConnection::finishLoadingHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - player.getCurrentZone()->onFinishLoading( player ); + player.getCurrentZone()->onFinishLoading( player ); - // player is done zoning - player.setLoadingComplete( true ); + // player is done zoning + player.setLoadingComplete( true ); - // if this is a login event - if( player.isLogin() ) - { - // fire the onLogin Event - player.onLogin(); - player.setIsLogin( false ); - } + // if this is a login event + if( player.isLogin() ) + { + // fire the onLogin Event + player.onLogin(); + player.setIsLogin( false ); + } - // spawn the player for himself - player.spawn( player.getAsPlayer() ); + // spawn the player for himself + player.spawn( player.getAsPlayer() ); - // notify the zone of a change in position to force an "inRangeActor" update - player.getCurrentZone()->updateActorPosition(player); + // notify the zone of a change in position to force an "inRangeActor" update + player.getCurrentZone()->updateActorPosition( player ); } void Core::Network::GameConnection::socialListHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - uint8_t type = inPacket.data[0x1A]; - uint8_t count = inPacket.data[0x1B]; + uint8_t type = inPacket.data[ 0x1A ]; + uint8_t count = inPacket.data[ 0x1B ]; - if( type == 0x02 ) - { // party list + if( type == 0x02 ) + { // party list - auto listPacket = makeZonePacket< FFXIVIpcSocialList >( player.getId() ); + auto listPacket = makeZonePacket< FFXIVIpcSocialList >( player.getId() ); - listPacket->data().type = 2; - listPacket->data().sequence = count; + listPacket->data().type = 2; + listPacket->data().sequence = count; - int32_t entrysizes = sizeof( listPacket->data().entries ); - memset( listPacket->data().entries, 0, sizeof( listPacket->data().entries ) ); + int32_t entrysizes = sizeof( listPacket->data().entries ); + memset( listPacket->data().entries, 0, sizeof( listPacket->data().entries ) ); - listPacket->data().entries[0].bytes[2] = player.getCurrentZone()->getTerritoryId(); - listPacket->data().entries[0].bytes[3] = 0x80; - listPacket->data().entries[0].bytes[4] = 0x02; - listPacket->data().entries[0].bytes[6] = 0x3B; - listPacket->data().entries[0].bytes[11] = 0x10; - listPacket->data().entries[0].classJob = static_cast< uint8_t >( player.getClass() ); - listPacket->data().entries[0].contentId = player.getContentId(); - listPacket->data().entries[0].level = player.getLevel(); - listPacket->data().entries[0].zoneId = player.getCurrentZone()->getTerritoryId(); - listPacket->data().entries[0].zoneId1 = 0x0100; - // TODO: no idea what this does - //listPacket.data().entries[0].one = 1; + listPacket->data().entries[ 0 ].bytes[ 2 ] = player.getCurrentZone()->getTerritoryId(); + listPacket->data().entries[ 0 ].bytes[ 3 ] = 0x80; + listPacket->data().entries[ 0 ].bytes[ 4 ] = 0x02; + listPacket->data().entries[ 0 ].bytes[ 6 ] = 0x3B; + listPacket->data().entries[ 0 ].bytes[ 11 ] = 0x10; + listPacket->data().entries[ 0 ].classJob = static_cast< uint8_t >( player.getClass() ); + listPacket->data().entries[ 0 ].contentId = player.getContentId(); + listPacket->data().entries[ 0 ].level = player.getLevel(); + listPacket->data().entries[ 0 ].zoneId = player.getCurrentZone()->getTerritoryId(); + listPacket->data().entries[ 0 ].zoneId1 = 0x0100; + // TODO: no idea what this does + //listPacket.data().entries[0].one = 1; - memcpy( listPacket->data().entries[0].name, player.getName().c_str(), strlen( player.getName().c_str() ) ); + memcpy( listPacket->data().entries[ 0 ].name, player.getName().c_str(), strlen( player.getName().c_str() ) ); - // TODO: actually store and read language from somewhere - listPacket->data().entries[0].bytes1[0] = 0x01;//flags (lang) - // TODO: these flags need to be figured out - //listPacket.data().entries[0].bytes1[1] = 0x00;//flags - listPacket->data().entries[0].onlineStatusMask = player.getOnlineStatusMask(); + // TODO: actually store and read language from somewhere + listPacket->data().entries[ 0 ].bytes1[ 0 ] = 0x01;//flags (lang) + // TODO: these flags need to be figured out + //listPacket.data().entries[0].bytes1[1] = 0x00;//flags + listPacket->data().entries[ 0 ].onlineStatusMask = player.getOnlineStatusMask(); - queueOutPacket( listPacket ); + queueOutPacket( listPacket ); - } - else if( type == 0x0b ) - { // friend list - auto listPacket = makeZonePacket< FFXIVIpcSocialList >( player.getId() ); - listPacket->data().type = 0x0B; - listPacket->data().sequence = count; - memset( listPacket->data().entries, 0, sizeof( listPacket->data().entries ) ); + } + else if( type == 0x0b ) + { // friend list + auto listPacket = makeZonePacket< FFXIVIpcSocialList >( player.getId() ); + listPacket->data().type = 0x0B; + listPacket->data().sequence = count; + memset( listPacket->data().entries, 0, sizeof( listPacket->data().entries ) ); - } - else if( type == 0x0e ) - { // player search result - // TODO: implement player search - } + } + else if( type == 0x0e ) + { // player search result + // TODO: implement player search + } } void Core::Network::GameConnection::chatHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto pDebugCom = g_fw.get< DebugCommandHandler >(); + auto pDebugCom = g_fw.get< DebugCommandHandler >(); - const auto packet = ZoneChannelPacket< Client::FFXIVIpcChatHandler >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcChatHandler >( inPacket ); - if( packet.data().message[0] == '!' ) - { - // execute game console command - pDebugCom->execCommand( const_cast< char* >( packet.data().message ) + 1, player ); - return; - } + if( packet.data().message[ 0 ] == '!' ) + { + // execute game console command + pDebugCom->execCommand( const_cast< char* >( packet.data().message ) + 1, player ); + return; + } - auto chatType = packet.data().chatType; + auto chatType = packet.data().chatType; - //ToDo, need to implement sending GM chat types. - auto chatPacket = boost::make_shared< Server::ChatPacket >( player, chatType, packet.data().message ); + //ToDo, need to implement sending GM chat types. + auto chatPacket = boost::make_shared< Server::ChatPacket >( player, chatType, packet.data().message ); - switch( chatType ) - { - case ChatType::Say: - { - if ( player.isActingAsGm() ) - chatPacket->data().chatType = ChatType::GMSay; + switch( chatType ) + { + case ChatType::Say: + { + if( player.isActingAsGm() ) + chatPacket->data().chatType = ChatType::GMSay; player.getCurrentZone()->queueOutPacketForRange( player, 50, chatPacket ); break; - } - case ChatType::Yell: - { + } + case ChatType::Yell: + { if( player.isActingAsGm() ) - chatPacket->data().chatType = ChatType::GMYell; + chatPacket->data().chatType = ChatType::GMYell; player.getCurrentZone()->queueOutPacketForRange( player, 6000, chatPacket ); break; - } - case ChatType::Shout: - { + } + case ChatType::Shout: + { if( player.isActingAsGm() ) - chatPacket->data().chatType = ChatType::GMShout; + chatPacket->data().chatType = ChatType::GMShout; player.getCurrentZone()->queueOutPacketForRange( player, 6000, chatPacket ); break; - } - default: - { + } + default: + { player.getCurrentZone()->queueOutPacketForRange( player, 50, chatPacket ); break; - } - } + } + } } @@ -517,70 +518,70 @@ void Core::Network::GameConnection::chatHandler( const Core::Network::Packets::F void Core::Network::GameConnection::logoutHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto logoutPacket = makeZonePacket< FFXIVIpcLogout >( player.getId() ); - logoutPacket->data().flags1 = 0x02; - logoutPacket->data().flags2 = 0x2000; - queueOutPacket( logoutPacket ); + auto logoutPacket = makeZonePacket< FFXIVIpcLogout >( player.getId() ); + logoutPacket->data().flags1 = 0x02; + logoutPacket->data().flags2 = 0x2000; + queueOutPacket( logoutPacket ); - player.setMarkedForRemoval(); + player.setMarkedForRemoval(); } void Core::Network::GameConnection::tellHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - const auto packet = ZoneChannelPacket< Client::FFXIVIpcTellHandler >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcTellHandler >( inPacket ); - auto pZoneServer = g_fw.get< ServerZone >(); + auto pZoneServer = g_fw.get< ServerZone >(); - auto pSession = pZoneServer->getSession( packet.data().targetPCName ); + auto pSession = pZoneServer->getSession( packet.data().targetPCName ); - if( !pSession ) - { - auto tellErrPacket = makeZonePacket< FFXIVIpcTellErrNotFound >( player.getId() ); - strcpy( tellErrPacket->data().receipientName, packet.data().targetPCName ); - sendSinglePacket( tellErrPacket ); - return; - } + if( !pSession ) + { + auto tellErrPacket = makeZonePacket< FFXIVIpcTellErrNotFound >( player.getId() ); + strcpy( tellErrPacket->data().receipientName, packet.data().targetPCName ); + sendSinglePacket( tellErrPacket ); + return; + } - auto pTargetPlayer = pSession->getPlayer(); + auto pTargetPlayer = pSession->getPlayer(); - if( pTargetPlayer->hasStateFlag( PlayerStateFlag::BetweenAreas ) ) - { - // send error for player between areas - // TODO: implement me - return; - } + if( pTargetPlayer->hasStateFlag( PlayerStateFlag::BetweenAreas ) ) + { + // send error for player between areas + // TODO: implement me + return; + } - if( pTargetPlayer->hasStateFlag( PlayerStateFlag::BoundByDuty ) ) - { - // send error for player bound by duty - // TODO: implement me - return; - } + if( pTargetPlayer->hasStateFlag( PlayerStateFlag::BoundByDuty ) ) + { + // send error for player bound by duty + // TODO: implement me + return; + } - if( pTargetPlayer->getOnlineStatus() == OnlineStatus::Busy ) - { - // send error for player being busy - // TODO: implement me ( i've seen this done with packet type 67 i think ) - return; - } + if( pTargetPlayer->getOnlineStatus() == OnlineStatus::Busy ) + { + // send error for player being busy + // TODO: implement me ( i've seen this done with packet type 67 i think ) + return; + } - auto tellPacket = makeChatPacket< FFXIVIpcTell >( player.getId() ); - strcpy( tellPacket->data().msg, packet.data().message ); - strcpy( tellPacket->data().receipientName, player.getName().c_str() ); - // TODO: do these have a meaning? - //tellPacket.data().u1 = 0x92CD7337; - //tellPacket.data().u2a = 0x2E; - //tellPacket.data().u2b = 0x40; - pTargetPlayer->queueChatPacket( tellPacket ); + auto tellPacket = makeChatPacket< FFXIVIpcTell >( player.getId() ); + strcpy( tellPacket->data().msg, packet.data().message ); + strcpy( tellPacket->data().receipientName, player.getName().c_str() ); + // TODO: do these have a meaning? + //tellPacket.data().u1 = 0x92CD7337; + //tellPacket.data().u2a = 0x2E; + //tellPacket.data().u2b = 0x40; + pTargetPlayer->queueChatPacket( tellPacket ); } void Core::Network::GameConnection::performNoteHandler( const Core::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto performPacket = makeZonePacket< FFXIVIpcPerformNote >( player.getId() ); - memcpy( &performPacket->data().data[0], &inPacket.data[0x10], 32 ); - player.sendToInRangeSet( performPacket ); + auto performPacket = makeZonePacket< FFXIVIpcPerformNote >( player.getId() ); + memcpy( &performPacket->data().data[ 0 ], &inPacket.data[ 0x10 ], 32 ); + player.sendToInRangeSet( performPacket ); } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket142.h b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket142.h index 357f5eb5..6feca68e 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket142.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket142.h @@ -14,37 +14,37 @@ namespace Server { * @brief The Ping response packet. */ class ActorControlPacket142 : - public ZoneChannelPacket< FFXIVIpcActorControl142 > + public ZoneChannelPacket< FFXIVIpcActorControl142 > { public: - ActorControlPacket142( uint32_t actorId, - uint16_t category, - uint32_t param1 = 0, - uint32_t param2 = 0, - uint32_t param3 = 0, - uint32_t param4 = 0, - uint32_t padding1 = 0 ) : - ZoneChannelPacket< FFXIVIpcActorControl142 >( actorId, actorId ) - { - initialize( category, param1, param2, param3, param4 ); - }; + ActorControlPacket142( uint32_t actorId, + uint16_t category, + uint32_t param1 = 0, + uint32_t param2 = 0, + uint32_t param3 = 0, + uint32_t param4 = 0, + uint32_t padding1 = 0 ) : + ZoneChannelPacket< FFXIVIpcActorControl142 >( actorId, actorId ) + { + initialize( category, param1, param2, param3, param4 ); + }; private: - void initialize( uint16_t category, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4 ) - { - m_data.padding = 0; - m_data.category = category; - m_data.param1 = param1; - m_data.param2 = param2; - m_data.param3 = param3; - m_data.param4 = param4; - }; + void initialize( uint16_t category, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4 ) + { + m_data.padding = 0; + m_data.category = category; + m_data.param1 = param1; + m_data.param2 = param2; + m_data.param3 = param3; + m_data.param4 = param4; + }; }; template< typename... Args > boost::shared_ptr< ActorControlPacket142 > makeActorControl142( Args... args ) { - return boost::make_shared< ActorControlPacket142 >( args... ); + return boost::make_shared< ActorControlPacket142 >( args... ); } } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket143.h b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket143.h index fee5782d..9d7be33b 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket143.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket143.h @@ -15,39 +15,40 @@ namespace Server { * @brief The Ping response packet. */ class ActorControlPacket143 : - public ZoneChannelPacket< FFXIVIpcActorControl143 > + public ZoneChannelPacket< FFXIVIpcActorControl143 > { public: - ActorControlPacket143( uint32_t actorId, - uint16_t category, - uint32_t param1 = 0, - uint32_t param2 = 0, - uint32_t param3 = 0, - uint32_t param4 = 0, - uint32_t param5 = 0, - uint32_t padding1 = 0 ) : - ZoneChannelPacket< FFXIVIpcActorControl143 >( actorId, actorId ) - { - initialize( category, param1, param2, param3, param4, param5 ); - }; + ActorControlPacket143( uint32_t actorId, + uint16_t category, + uint32_t param1 = 0, + uint32_t param2 = 0, + uint32_t param3 = 0, + uint32_t param4 = 0, + uint32_t param5 = 0, + uint32_t padding1 = 0 ) : + ZoneChannelPacket< FFXIVIpcActorControl143 >( actorId, actorId ) + { + initialize( category, param1, param2, param3, param4, param5 ); + }; private: - void initialize( uint16_t category, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, uint32_t param5 ) - { - m_data.padding = 0; - m_data.category = category; - m_data.param1 = param1; - m_data.param2 = param2; - m_data.param3 = param3; - m_data.param4 = param4; - m_data.param5 = param5; - }; + void initialize( uint16_t category, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, + uint32_t param5 ) + { + m_data.padding = 0; + m_data.category = category; + m_data.param1 = param1; + m_data.param2 = param2; + m_data.param3 = param3; + m_data.param4 = param4; + m_data.param5 = param5; + }; }; template< typename... Args > boost::shared_ptr< ActorControlPacket143 > makeActorControl143( Args... args ) { - return boost::make_shared< ActorControlPacket143 >( args... ); + return boost::make_shared< ActorControlPacket143 >( args... ); } } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket144.h b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket144.h index 07265ed5..9696e2e5 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket144.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/ActorControlPacket144.h @@ -13,39 +13,40 @@ namespace Server { * @brief The Ping response packet. */ class ActorControlPacket144 : - public ZoneChannelPacket< FFXIVIpcActorControl144 > + public ZoneChannelPacket< FFXIVIpcActorControl144 > { public: - ActorControlPacket144( uint32_t actorId, - uint16_t category, - uint32_t param1 = 0, - uint32_t param2 = 0, - uint32_t param3 = 0, - uint32_t param4 = 0, - uint64_t targetId = 0, - uint32_t padding1 = 0 ) : - ZoneChannelPacket< FFXIVIpcActorControl144 >( actorId, actorId ) - { - initialize( category, param1, param2, param3, param4, targetId ); - }; + ActorControlPacket144( uint32_t actorId, + uint16_t category, + uint32_t param1 = 0, + uint32_t param2 = 0, + uint32_t param3 = 0, + uint32_t param4 = 0, + uint64_t targetId = 0, + uint32_t padding1 = 0 ) : + ZoneChannelPacket< FFXIVIpcActorControl144 >( actorId, actorId ) + { + initialize( category, param1, param2, param3, param4, targetId ); + }; private: - void initialize( uint16_t category, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, uint64_t targetId ) - { - m_data.padding = 0; - m_data.category = category; - m_data.param1 = param1; - m_data.param2 = param2; - m_data.param3 = param3; - m_data.param4 = param4; - m_data.targetId = targetId; - }; + void initialize( uint16_t category, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, + uint64_t targetId ) + { + m_data.padding = 0; + m_data.category = category; + m_data.param1 = param1; + m_data.param2 = param2; + m_data.param3 = param3; + m_data.param4 = param4; + m_data.targetId = targetId; + }; }; template< typename... Args > boost::shared_ptr< ActorControlPacket144 > makeActorControl144( Args... args ) { - return boost::make_shared< ActorControlPacket144 >( args... ); + return boost::make_shared< ActorControlPacket144 >( args... ); } } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/ChatPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/ChatPacket.h index c1a4780d..9a6d5b14 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/ChatPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/ChatPacket.h @@ -15,22 +15,22 @@ namespace Server { * @brief The Chat packet. */ class ChatPacket : - public ZoneChannelPacket< FFXIVIpcChat > + public ZoneChannelPacket< FFXIVIpcChat > { public: - ChatPacket( Entity::Player& player, Common::ChatType chatType, const std::string& msg ) : - ZoneChannelPacket< FFXIVIpcChat >( player.getId(), player.getId() ) - { - initialize( player, chatType, msg ); - }; + ChatPacket( Entity::Player& player, Common::ChatType chatType, const std::string& msg ) : + ZoneChannelPacket< FFXIVIpcChat >( player.getId(), player.getId() ) + { + initialize( player, chatType, msg ); + }; private: - void initialize( Entity::Player& player, Common::ChatType chatType, const std::string& msg ) - { - m_data.chatType = chatType; - strcpy( m_data.name, player.getName().c_str() ); - strcpy( m_data.msg, msg.c_str() ); - }; + void initialize( Entity::Player& player, Common::ChatType chatType, const std::string& msg ) + { + m_data.chatType = chatType; + strcpy( m_data.name, player.getName().c_str() ); + strcpy( m_data.msg, msg.c_str() ); + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/DirectorPlayScenePacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/DirectorPlayScenePacket.h index 8f097c38..6a5ae1b6 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/DirectorPlayScenePacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/DirectorPlayScenePacket.h @@ -12,54 +12,55 @@ namespace Server { /** * @brief The packet sent to play an event. */ -class DirectorPlayScenePacket : public ZoneChannelPacket< FFXIVIpcDirectorPlayScene > +class DirectorPlayScenePacket : + public ZoneChannelPacket< FFXIVIpcDirectorPlayScene > { public: - DirectorPlayScenePacket( uint32_t playerId, - uint64_t actorId, - uint32_t eventId, - uint16_t scene, - uint32_t flags, - uint8_t param3, - uint32_t param4 = 0, - uint32_t param5 = 0 ) : - ZoneChannelPacket< FFXIVIpcDirectorPlayScene >( playerId, playerId ) - { - initialize( actorId, eventId, scene, flags, param3, param4, param5 ); - }; + DirectorPlayScenePacket( uint32_t playerId, + uint64_t actorId, + uint32_t eventId, + uint16_t scene, + uint32_t flags, + uint8_t param3, + uint32_t param4 = 0, + uint32_t param5 = 0 ) : + ZoneChannelPacket< FFXIVIpcDirectorPlayScene >( playerId, playerId ) + { + initialize( actorId, eventId, scene, flags, param3, param4, param5 ); + }; private: - void initialize( uint64_t actorId, - uint32_t eventId, - uint16_t scene, - uint32_t flags, - uint8_t param3, - uint32_t param4, - uint32_t param5 ) - { - m_data.actorId = actorId; - m_data.eventId = eventId; - m_data.scene = scene; - m_data.flags = flags; - m_data.param3 = param3; - m_data.param4 = param4; - m_data.param5 = param5; - m_data.unknown[0] = 0x05; - m_data.unknown[4] = 0x22; - m_data.unknown[5] = 0xD6; - m_data.unknown[6] = 0x62; - m_data.unknown[7] = 0x59; - m_data.unknown[0x14] = 0x08; - m_data.unknown[0x15] = 0x02; + void initialize( uint64_t actorId, + uint32_t eventId, + uint16_t scene, + uint32_t flags, + uint8_t param3, + uint32_t param4, + uint32_t param5 ) + { + m_data.actorId = actorId; + m_data.eventId = eventId; + m_data.scene = scene; + m_data.flags = flags; + m_data.param3 = param3; + m_data.param4 = param4; + m_data.param5 = param5; + m_data.unknown[ 0 ] = 0x05; + m_data.unknown[ 4 ] = 0x22; + m_data.unknown[ 5 ] = 0xD6; + m_data.unknown[ 6 ] = 0x62; + m_data.unknown[ 7 ] = 0x59; + m_data.unknown[ 0x14 ] = 0x08; + m_data.unknown[ 0x15 ] = 0x02; - // time remaining in sec - m_data.unknown[0x18] = 0x19; - m_data.unknown[0x19] = 0x14; + // time remaining in sec + m_data.unknown[ 0x18 ] = 0x19; + m_data.unknown[ 0x19 ] = 0x14; - m_data.unknown[0x1C] = 0x23; - m_data.unknown[0x20] = 0x40; - m_data.unknown[0x24] = 0x80; - }; + m_data.unknown[ 0x1C ] = 0x23; + m_data.unknown[ 0x20 ] = 0x40; + m_data.unknown[ 0x24 ] = 0x80; + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/EffectPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/EffectPacket.h index 8e45fc23..b074e12e 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/EffectPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/EffectPacket.h @@ -11,50 +11,50 @@ namespace Packets { namespace Server { class EffectPacket : - public ZoneChannelPacket< FFXIVIpcEffect > + public ZoneChannelPacket< FFXIVIpcEffect > { public: - EffectPacket( uint64_t sourceId, uint32_t targetId, uint32_t actionId ) : - ZoneChannelPacket< FFXIVIpcEffect >( sourceId, targetId ) - { - m_data.header.actionId = actionId; - m_data.header.actionAnimationId = static_cast< uint16_t >( actionId ); + EffectPacket( uint64_t sourceId, uint32_t targetId, uint32_t actionId ) : + ZoneChannelPacket< FFXIVIpcEffect >( sourceId, targetId ) + { + m_data.header.actionId = actionId; + m_data.header.actionAnimationId = static_cast< uint16_t >( actionId ); - m_data.header.animationTargetId = targetId; - m_data.effectTargetId = targetId; - - m_data.header.effectDisplayType = Common::ActionEffectDisplayType::ShowActionName; - } + m_data.header.animationTargetId = targetId; + m_data.effectTargetId = targetId; - void addEffect( const Server::EffectEntry& effect ) - { - assert( m_data.header.effectCount <= 8 ); + m_data.header.effectDisplayType = Common::ActionEffectDisplayType::ShowActionName; + } - std::memcpy( &m_data.effects[m_data.header.effectCount++], &effect, sizeof( Server::EffectEntry ) ); - } + void addEffect( const Server::EffectEntry& effect ) + { + assert( m_data.header.effectCount <= 8 ); - void setAnimationId( uint16_t animationId ) - { - m_data.header.actionAnimationId = animationId; - } + std::memcpy( &m_data.effects[ m_data.header.effectCount++ ], &effect, sizeof( Server::EffectEntry ) ); + } - void setEffectFlags( uint32_t effectFlags ) - { - m_data.effectFlags = effectFlags; - } + void setAnimationId( uint16_t animationId ) + { + m_data.header.actionAnimationId = animationId; + } - void setRotation( uint16_t rotation ) - { - m_data.header.rotation = rotation; - } + void setEffectFlags( uint32_t effectFlags ) + { + m_data.effectFlags = effectFlags; + } - void setTargetActor( const uint32_t targetId ) - { - m_data.header.animationTargetId = targetId; - m_data.effectTargetId = targetId; + void setRotation( uint16_t rotation ) + { + m_data.header.rotation = rotation; + } - FFXIVPacketBase::setTargetActor( targetId ); - } + void setTargetActor( const uint32_t targetId ) + { + m_data.header.animationTargetId = targetId; + m_data.effectTargetId = targetId; + + FFXIVPacketBase::setTargetActor( targetId ); + } }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/EventFinishPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/EventFinishPacket.h index f04d455c..82038691 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/EventFinishPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/EventFinishPacket.h @@ -11,29 +11,30 @@ namespace Server { /** * @brief The packet sent to finish an event. */ -class EventFinishPacket : public ZoneChannelPacket< FFXIVIpcEventFinish > +class EventFinishPacket : + public ZoneChannelPacket< FFXIVIpcEventFinish > { public: - EventFinishPacket( uint32_t playerId, - uint32_t eventId, - uint8_t param1, - uint32_t param3 ) : - ZoneChannelPacket< FFXIVIpcEventFinish >( playerId, playerId ) - { - initialize( eventId, param1, param3 ); - }; + EventFinishPacket( uint32_t playerId, + uint32_t eventId, + uint8_t param1, + uint32_t param3 ) : + ZoneChannelPacket< FFXIVIpcEventFinish >( playerId, playerId ) + { + initialize( eventId, param1, param3 ); + }; private: - void initialize( uint32_t eventId, - uint8_t param1, - uint32_t param3 ) - { - m_data.eventId = eventId; - m_data.param1 = param1; - m_data.param2 = 1; - m_data.param3 = param3; + void initialize( uint32_t eventId, + uint8_t param1, + uint32_t param3 ) + { + m_data.eventId = eventId; + m_data.param1 = param1; + m_data.param2 = 1; + m_data.param3 = param3; - }; + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/EventPlayPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/EventPlayPacket.h index 933458d9..3567bc03 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/EventPlayPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/EventPlayPacket.h @@ -12,39 +12,40 @@ namespace Server { /** * @brief The packet sent to play an event. */ -class EventPlayPacket : public ZoneChannelPacket< FFXIVIpcEventPlay > +class EventPlayPacket : + public ZoneChannelPacket< FFXIVIpcEventPlay > { public: - EventPlayPacket( uint32_t playerId, - uint64_t actorId, - uint32_t eventId, - uint16_t scene, - uint32_t flags, - uint8_t param3, - uint32_t param4 = 0, - uint32_t param5 = 0 ) : - ZoneChannelPacket< FFXIVIpcEventPlay >( playerId, playerId ) - { - initialize( actorId, eventId, scene, flags, param3, param4, param5 ); - }; + EventPlayPacket( uint32_t playerId, + uint64_t actorId, + uint32_t eventId, + uint16_t scene, + uint32_t flags, + uint8_t param3, + uint32_t param4 = 0, + uint32_t param5 = 0 ) : + ZoneChannelPacket< FFXIVIpcEventPlay >( playerId, playerId ) + { + initialize( actorId, eventId, scene, flags, param3, param4, param5 ); + }; private: - void initialize( uint64_t actorId, - uint32_t eventId, - uint16_t scene, - uint32_t flags, - uint8_t param3, - uint32_t param4, - uint32_t param5 ) - { - m_data.actorId = actorId; - m_data.eventId = eventId; - m_data.scene = scene; - m_data.flags = flags; - m_data.param3 = param3; - m_data.param4 = param4; - m_data.param5 = param5; - }; + void initialize( uint64_t actorId, + uint32_t eventId, + uint16_t scene, + uint32_t flags, + uint8_t param3, + uint32_t param4, + uint32_t param5 ) + { + m_data.actorId = actorId; + m_data.eventId = eventId; + m_data.scene = scene; + m_data.flags = flags; + m_data.param3 = param3; + m_data.param4 = param4; + m_data.param5 = param5; + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/EventStartPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/EventStartPacket.h index 2058a593..7bae3514 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/EventStartPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/EventStartPacket.h @@ -12,34 +12,35 @@ namespace Server { /** * @brief The packet sent to start an event. */ -class EventStartPacket : public ZoneChannelPacket< FFXIVIpcEventStart > +class EventStartPacket : + public ZoneChannelPacket< FFXIVIpcEventStart > { public: - EventStartPacket( uint32_t playerId, - uint64_t actorId, - uint32_t eventId, - uint8_t param1 = 0, - uint8_t param2 = 0, - uint32_t param3 = 0 ) : - ZoneChannelPacket< FFXIVIpcEventStart >( playerId, playerId ) - { - initialize( actorId, eventId, param1, param2, param3 ); - }; + EventStartPacket( uint32_t playerId, + uint64_t actorId, + uint32_t eventId, + uint8_t param1 = 0, + uint8_t param2 = 0, + uint32_t param3 = 0 ) : + ZoneChannelPacket< FFXIVIpcEventStart >( playerId, playerId ) + { + initialize( actorId, eventId, param1, param2, param3 ); + }; private: - void initialize( uint64_t actorId, - uint32_t eventId, - uint8_t param1, - uint8_t param2, - uint32_t param3 ) - { - m_data.actorId = actorId; - m_data.eventId = eventId; - m_data.param1 = param1; - m_data.param2 = param2; - m_data.param3 = param3; + void initialize( uint64_t actorId, + uint32_t eventId, + uint8_t param1, + uint8_t param2, + uint32_t param3 ) + { + m_data.actorId = actorId; + m_data.eventId = eventId; + m_data.param1 = param1; + m_data.param2 = param2; + m_data.param3 = param3; - }; + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/InitUIPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/InitUIPacket.h index 14650c55..a9505653 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/InitUIPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/InitUIPacket.h @@ -15,79 +15,80 @@ namespace Server { * @brief The Client UI Initialization packet. This must be sent to the client * once upon connection to configure the UI. */ -class InitUIPacket : public ZoneChannelPacket< FFXIVIpcInitUI > +class InitUIPacket : + public ZoneChannelPacket< FFXIVIpcInitUI > { public: - InitUIPacket( Entity::Player& player ) : - ZoneChannelPacket< FFXIVIpcInitUI >( player.getId(), player.getId() ) - { - initialize( player ); - }; + InitUIPacket( Entity::Player& player ) : + ZoneChannelPacket< FFXIVIpcInitUI >( player.getId(), player.getId() ) + { + initialize( player ); + }; private: - void initialize( Entity::Player& player ) - { - m_data.contentId = player.getContentId(); + void initialize( Entity::Player& player ) + { + m_data.contentId = player.getContentId(); - // TODO: Support rested experience. - m_data.restedExp = 0; - //m_data.padding = 0x100; - m_data.charId = player.getId(); - m_data.race = player.getLookAt( Common::CharaLook::Race ); - m_data.tribe = player.getLookAt( Common::CharaLook::Tribe ); - m_data.gender = player.getLookAt( Common::CharaLook::Gender ); - m_data.currentClass = static_cast< uint8_t >( player.getClass() ); - m_data.currentJob = static_cast< uint8_t >( player.getClass() ); - m_data.maxLevel = player.getLevel(); - m_data.deity = static_cast< uint8_t >( player.getGuardianDeity() ); - m_data.namedayMonth = player.getBirthMonth(); - m_data.namedayDay = player.getBirthDay(); - // TODO: Support grand company status. - m_data.cityState = player.getStartTown(); - //m_data.gcRank = GCRank::None; + // TODO: Support rested experience. + m_data.restedExp = 0; + //m_data.padding = 0x100; + m_data.charId = player.getId(); + m_data.race = player.getLookAt( Common::CharaLook::Race ); + m_data.tribe = player.getLookAt( Common::CharaLook::Tribe ); + m_data.gender = player.getLookAt( Common::CharaLook::Gender ); + m_data.currentClass = static_cast< uint8_t >( player.getClass() ); + m_data.currentJob = static_cast< uint8_t >( player.getClass() ); + m_data.maxLevel = player.getLevel(); + m_data.deity = static_cast< uint8_t >( player.getGuardianDeity() ); + m_data.namedayMonth = player.getBirthMonth(); + m_data.namedayDay = player.getBirthDay(); + // TODO: Support grand company status. + m_data.cityState = player.getStartTown(); + //m_data.gcRank = GCRank::None; - m_data.homepoint = player.getHomepoint(); - m_data.pose = player.getPose(); + m_data.homepoint = player.getHomepoint(); + m_data.pose = player.getPose(); - memset( &m_data.name[0], 0, sizeof( m_data.name ) ); + memset( &m_data.name[ 0 ], 0, sizeof( m_data.name ) ); - strcpy( &m_data.name[0], player.getName().c_str() ); + strcpy( &m_data.name[ 0 ], player.getName().c_str() ); - memcpy( m_data.aetheryte, player.getAetheryteArray(), sizeof ( m_data.aetheryte ) ); + memcpy( m_data.aetheryte, player.getAetheryteArray(), sizeof( m_data.aetheryte ) ); - // Set the class levels and exp. - for( uint8_t i = 0; i < 25; i++ ) - { - m_data.levels[i] = player.getClassArray()[i]; - m_data.exp[i] = player.getExpArray()[i]; - } + // Set the class levels and exp. + for( uint8_t i = 0; i < 25; i++ ) + { + m_data.levels[ i ] = player.getClassArray()[ i ]; + m_data.exp[ i ] = player.getExpArray()[ i ]; + } - memcpy( m_data.orchestrionMask, player.getOrchestrionBitmask(), sizeof( m_data.orchestrionMask ) ); + memcpy( m_data.orchestrionMask, player.getOrchestrionBitmask(), sizeof( m_data.orchestrionMask ) ); - memcpy( m_data.mountGuideMask, player.getMountGuideBitmask(), sizeof( m_data.mountGuideMask) ); + memcpy( m_data.mountGuideMask, player.getMountGuideBitmask(), sizeof( m_data.mountGuideMask ) ); - memcpy( m_data.unlockBitmask, player.getUnlockBitmask(), sizeof( m_data.unlockBitmask ) ); + memcpy( m_data.unlockBitmask, player.getUnlockBitmask(), sizeof( m_data.unlockBitmask ) ); - memcpy( m_data.discovery, player.getDiscoveryBitmask(), sizeof( m_data.discovery ) ); + memcpy( m_data.discovery, player.getDiscoveryBitmask(), sizeof( m_data.discovery ) ); - memcpy( m_data.howto, player.getHowToArray(), sizeof( m_data.howto ) ); + memcpy( m_data.howto, player.getHowToArray(), sizeof( m_data.howto ) ); - // possibly max level or current level - m_data.maxLevel = 0x46; - m_data.expansion = 2; + // possibly max level or current level + m_data.maxLevel = 0x46; + m_data.expansion = 2; - // df stuff - // todo: actually do this properly + // df stuff + // todo: actually do this properly // m_data.unknown70[4] = 1; // enable df - // enable all raids/guildhests/dungeons - memset( m_data.unlockedDungeons, 0xFF, sizeof( m_data.unlockedDungeons ) ); - memset( m_data.unlockedGuildhests, 0xFF, sizeof( m_data.unlockedGuildhests ) ); - memset( m_data.unlockedPvp, 0xFF, sizeof( m_data.unlockedPvp ) ); - memset( m_data.unlockedRaids, 0xFF, sizeof( m_data.unlockedRaids ) ); - memset( m_data.unlockedTrials, 0xFF, sizeof( m_data.unlockedTrials ) ); + // enable all raids/guildhests/dungeons + memset( m_data.unlockedDungeons, 0xFF, sizeof( m_data.unlockedDungeons ) ); + memset( m_data.unlockedGuildhests, 0xFF, sizeof( m_data.unlockedGuildhests ) ); + memset( m_data.unlockedPvp, 0xFF, sizeof( m_data.unlockedPvp ) ); + memset( m_data.unlockedRaids, 0xFF, sizeof( m_data.unlockedRaids ) ); + memset( m_data.unlockedTrials, 0xFF, sizeof( m_data.unlockedTrials ) ); - }; + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/ModelEquipPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/ModelEquipPacket.h index 324e54a5..018b4232 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/ModelEquipPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/ModelEquipPacket.h @@ -14,26 +14,26 @@ namespace Server { * @brief The update model packet. */ class ModelEquipPacket : - public ZoneChannelPacket< FFXIVIpcModelEquip > + public ZoneChannelPacket< FFXIVIpcModelEquip > { public: - ModelEquipPacket( Entity::Player& player ) : - ZoneChannelPacket< FFXIVIpcModelEquip >( player.getId(), player.getId() ) - { - initialize( player ); - }; + ModelEquipPacket( Entity::Player& player ) : + ZoneChannelPacket< FFXIVIpcModelEquip >( player.getId(), player.getId() ) + { + initialize( player ); + }; private: - void initialize( Entity::Player& player ) - { - m_data.mainWeapon = player.getModelMainWeapon(); - m_data.offWeapon = player.getModelSubWeapon(); - m_data.models[0] = player.getModelForSlot( Common::GearSetSlot::Head ); - m_data.models[1] = player.getModelForSlot( Common::GearSetSlot::Body ); - m_data.models[2] = player.getModelForSlot( Common::GearSetSlot::Hands ); - m_data.models[3] = player.getModelForSlot( Common::GearSetSlot::Legs ); - m_data.models[4] = player.getModelForSlot( Common::GearSetSlot::Feet ); - }; + void initialize( Entity::Player& player ) + { + m_data.mainWeapon = player.getModelMainWeapon(); + m_data.offWeapon = player.getModelSubWeapon(); + m_data.models[ 0 ] = player.getModelForSlot( Common::GearSetSlot::Head ); + m_data.models[ 1 ] = player.getModelForSlot( Common::GearSetSlot::Body ); + m_data.models[ 2 ] = player.getModelForSlot( Common::GearSetSlot::Hands ); + m_data.models[ 3 ] = player.getModelForSlot( Common::GearSetSlot::Legs ); + m_data.models[ 4 ] = player.getModelForSlot( Common::GearSetSlot::Feet ); + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/MoveActorPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/MoveActorPacket.h index 23c3e713..e9b5817b 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/MoveActorPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/MoveActorPacket.h @@ -18,29 +18,29 @@ namespace Server { * once upon connection to configure the UI. */ class MoveActorPacket : - public ZoneChannelPacket< FFXIVIpcActorMove > + public ZoneChannelPacket< FFXIVIpcActorMove > { public: - MoveActorPacket( Entity::Chara& actor, uint8_t unk1, uint8_t unk2, uint8_t unk3, uint16_t unk4 ) : - ZoneChannelPacket< FFXIVIpcActorMove >( actor.getId(), actor.getId() ) - { - initialize( actor, unk1, unk2, unk3, unk4 ); - }; + MoveActorPacket( Entity::Chara& actor, uint8_t unk1, uint8_t unk2, uint8_t unk3, uint16_t unk4 ) : + ZoneChannelPacket< FFXIVIpcActorMove >( actor.getId(), actor.getId() ) + { + initialize( actor, unk1, unk2, unk3, unk4 ); + }; private: - void initialize( Entity::Chara& actor, uint8_t unk1, uint8_t unk2, uint8_t unk3, uint16_t unk4 ) - { - - m_data.rotation = Math::Util::floatToUInt8Rot( actor.getRot() ); - m_data.unknown_1 = unk1; - m_data.unknown_2 = unk2; - m_data.unknown_3 = unk3; - m_data.unknown_4 = unk4; - m_data.posX = Math::Util::floatToUInt16( actor.getPos().x ); - m_data.posY = Math::Util::floatToUInt16( actor.getPos().y ); - m_data.posZ = Math::Util::floatToUInt16( actor.getPos().z ); + void initialize( Entity::Chara& actor, uint8_t unk1, uint8_t unk2, uint8_t unk3, uint16_t unk4 ) + { - }; + m_data.rotation = Math::Util::floatToUInt8Rot( actor.getRot() ); + m_data.unknown_1 = unk1; + m_data.unknown_2 = unk2; + m_data.unknown_3 = unk3; + m_data.unknown_4 = unk4; + m_data.posX = Math::Util::floatToUInt16( actor.getPos().x ); + m_data.posY = Math::Util::floatToUInt16( actor.getPos().y ); + m_data.posZ = Math::Util::floatToUInt16( actor.getPos().z ); + + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/PingPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/PingPacket.h index c985d8c0..1250e3f4 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/PingPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/PingPacket.h @@ -14,20 +14,20 @@ namespace Server { * @brief The Ping response packet. */ class PingPacket : - public ZoneChannelPacket< FFXIVIpcPing > + public ZoneChannelPacket< FFXIVIpcPing > { public: - PingPacket( Entity::Player& player, int32_t inVal ) : - ZoneChannelPacket< FFXIVIpcPing >( player.getId(), player.getId() ) - { - initialize( player, inVal ); - }; + PingPacket( Entity::Player& player, int32_t inVal ) : + ZoneChannelPacket< FFXIVIpcPing >( player.getId(), player.getId() ) + { + initialize( player, inVal ); + }; private: - void initialize( Entity::Player& player, int32_t inVal ) - { - m_data.timeInMilliseconds = 0x000014D00000000 + inVal; - }; + void initialize( Entity::Player& player, int32_t inVal ) + { + m_data.timeInMilliseconds = 0x000014D00000000 + inVal; + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/PlayerSpawnPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/PlayerSpawnPacket.h index fcf7e5a4..98ef4994 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/PlayerSpawnPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/PlayerSpawnPacket.h @@ -14,131 +14,132 @@ namespace Network { namespace Packets { namespace Server { - /** - * @brief The packet sent to spawn a player. - */ - class PlayerSpawnPacket : - public ZoneChannelPacket< FFXIVIpcPlayerSpawn > +/** +* @brief The packet sent to spawn a player. +*/ +class PlayerSpawnPacket : + public ZoneChannelPacket< FFXIVIpcPlayerSpawn > +{ +public: + PlayerSpawnPacket( Entity::Player& player, Entity::Player& target ) : + ZoneChannelPacket< FFXIVIpcPlayerSpawn >( player.getId(), target.getId() ) + { + initialize( player, target ); + }; - { - public: - PlayerSpawnPacket( Entity::Player& player, Entity::Player& target ) : - ZoneChannelPacket< FFXIVIpcPlayerSpawn >( player.getId(), target.getId() ) - { - initialize( player, target ); - }; +private: + void initialize( Entity::Player& player, Entity::Player& target ) + { + // todo: figure out unkown offsets - private: - void initialize( Entity::Player& player, Entity::Player& target ) - { - // todo: figure out unkown offsets + m_data.classJob = static_cast< uint8_t >( player.getClass() ); + //m_data.status = static_cast< uint8_t >( pPlayer->getStatus() ); - m_data.classJob = static_cast< uint8_t >( player.getClass() ); - //m_data.status = static_cast< uint8_t >( pPlayer->getStatus() ); + m_data.hPCurr = player.getHp(); + m_data.mPCurr = player.getMp(); + m_data.tPCurr = player.getTp(); + m_data.hPMax = player.getMaxHp(); + m_data.mPMax = player.getMaxMp(); - m_data.hPCurr = player.getHp(); - m_data.mPCurr = player.getMp(); - m_data.tPCurr = player.getTp(); - m_data.hPMax = player.getMaxHp(); - m_data.mPMax = player.getMaxMp(); - - //m_data.tPMax = 3000; - m_data.level = player.getLevel(); - m_data.gmRank = player.getGmRank(); - m_data.pose = player.getPose(); + //m_data.tPMax = 3000; + m_data.level = player.getLevel(); + m_data.gmRank = player.getGmRank(); + m_data.pose = player.getPose(); - memcpy( m_data.look, player.getLookArray(), 26 ); + memcpy( m_data.look, player.getLookArray(), sizeof( m_data.look ) ); - auto item = player.getItemAt( Common::GearSet0, Common::GearSetSlot::MainHand ); - if( item ) - m_data.mainWeaponModel = item->getModelId1(); - m_data.secWeaponModel = player.getModelSubWeapon(); + auto item = player.getItemAt( Common::GearSet0, Common::GearSetSlot::MainHand ); + if( item ) + m_data.mainWeaponModel = item->getModelId1(); + m_data.secWeaponModel = player.getModelSubWeapon(); - m_data.models[0] = player.getModelForSlot( Common::GearSetSlot::Head ); - m_data.models[1] = player.getModelForSlot( Common::GearSetSlot::Body ); - m_data.models[2] = player.getModelForSlot( Common::GearSetSlot::Hands ); - m_data.models[3] = player.getModelForSlot( Common::GearSetSlot::Legs ); - m_data.models[4] = player.getModelForSlot( Common::GearSetSlot::Feet ); - strcpy( m_data.name, player.getName().c_str() ); + m_data.models[ 0 ] = player.getModelForSlot( Common::GearSetSlot::Head ); + m_data.models[ 1 ] = player.getModelForSlot( Common::GearSetSlot::Body ); + m_data.models[ 2 ] = player.getModelForSlot( Common::GearSetSlot::Hands ); + m_data.models[ 3 ] = player.getModelForSlot( Common::GearSetSlot::Legs ); + m_data.models[ 4 ] = player.getModelForSlot( Common::GearSetSlot::Feet ); + strcpy( m_data.name, player.getName().c_str() ); - m_data.pos.x = player.getPos().x; - m_data.pos.y = player.getPos().y; - m_data.pos.z = player.getPos().z; - m_data.rotation = Math::Util::floatToUInt16Rot( player.getRot() ); - + m_data.pos.x = player.getPos().x; + m_data.pos.y = player.getPos().y; + m_data.pos.z = player.getPos().z; + m_data.rotation = Math::Util::floatToUInt16Rot( player.getRot() ); - m_data.title = player.getTitle(); - m_data.voice = player.getVoiceId(); - m_data.currentMount = player.getCurrentMount(); - m_data.onlineStatus = static_cast< uint8_t >( player.getOnlineStatus() ); + m_data.title = player.getTitle(); + m_data.voice = player.getVoiceId(); + m_data.currentMount = player.getCurrentMount(); - //m_data.u23 = 0x04; - //m_data.u24 = 256; - m_data.state = static_cast< uint8_t >( player.getStatus() ); - m_data.modelType = player.getObjKind(); - if( target.getId() == player.getId() ) - { - m_data.spawnIndex = 0x00; - } - else - { - m_data.spawnIndex = target.getSpawnIdForActorId( player.getId() ); + m_data.onlineStatus = static_cast< uint8_t >( player.getOnlineStatus() ); - if( !target.isActorSpawnIdValid( m_data.spawnIndex ) ) - return; - } - // 0x20 == spawn hidden to be displayed by the spawneffect control - m_data.displayFlags = player.getStance(); + //m_data.u23 = 0x04; + //m_data.u24 = 256; + m_data.state = static_cast< uint8_t >( player.getStatus() ); + m_data.modelType = player.getObjKind(); + if( target.getId() == player.getId() ) + { + m_data.spawnIndex = 0x00; + } + else + { + m_data.spawnIndex = target.getSpawnIdForActorId( player.getId() ); - if( player.getZoningType() != Common::ZoneingType::None || player.getGmInvis() == true ) - { - m_data.displayFlags |= static_cast< uint8_t >( Common::DisplayFlags::Invisible ); - } + if( !target.isActorSpawnIdValid( m_data.spawnIndex ) ) + return; + } + // 0x20 == spawn hidden to be displayed by the spawneffect control + m_data.displayFlags = player.getStance(); - if( player.getEquipDisplayFlags() & Core::Common::EquipDisplayFlags::HideHead ) - { - m_data.displayFlags |= static_cast< uint8_t >( Common::DisplayFlags::HideHead ); - } + if( player.getZoningType() != Common::ZoneingType::None || player.getGmInvis() == true ) + { + m_data.displayFlags |= static_cast< uint16_t >( Common::DisplayFlags::Invisible ); + } - if( player.getEquipDisplayFlags() & Core::Common::EquipDisplayFlags::HideWeapon ) - { - m_data.displayFlags |= static_cast< uint8_t >( Common::DisplayFlags::HideWeapon ); - } + if( player.getEquipDisplayFlags() & Core::Common::EquipDisplayFlags::HideHead ) + { + m_data.displayFlags |= static_cast< uint16_t >( Common::DisplayFlags::HideHead ); + } - if( player.getEquipDisplayFlags() & Core::Common::EquipDisplayFlags::Visor ) - { - m_data.displayFlags |= static_cast< uint8_t >( Common::DisplayFlags::Visor ); - } + if( player.getEquipDisplayFlags() & Core::Common::EquipDisplayFlags::HideWeapon ) + { + m_data.displayFlags |= static_cast< uint16_t >( Common::DisplayFlags::HideWeapon ); + } - if( !( player.getEquipDisplayFlags() & Core::Common::EquipDisplayFlags::HideLegacyMark ) ) - { - m_data.look[0xC] = m_data.look[0xC] | 1 << 7; - } + if( player.getEquipDisplayFlags() & Core::Common::EquipDisplayFlags::Visor ) + { + m_data.displayFlags |= static_cast< uint16_t >( Common::DisplayFlags::Visor ); + } - m_data.currentMount = player.getCurrentMount(); - m_data.persistentEmote = player.getPersistentEmote(); + if( !( player.getEquipDisplayFlags() & Core::Common::EquipDisplayFlags::HideLegacyMark ) ) + { + m_data.look[ 0xC ] = m_data.look[ 0xC ] | 1 << 7; + } - m_data.targetId = player.getTargetId(); - //m_data.type = 1; - //m_data.unknown_33 = 4; - //m_data.unknown_38 = 0x70; - //m_data.unknown_60 = 3; - //m_data.unknown_61 = 7; + m_data.currentMount = player.getCurrentMount(); + m_data.persistentEmote = player.getPersistentEmote(); - uint64_t currentTimeMs = Core::Util::getTimeMs(); + m_data.targetId = player.getTargetId(); + //m_data.type = 1; + //m_data.unknown_33 = 4; + //m_data.unknown_38 = 0x70; + //m_data.unknown_60 = 3; + //m_data.unknown_61 = 7; - for( auto const& effect : player.getStatusEffectMap() ) - { - m_data.effect[effect.first].effect_id = effect.second->getId(); - m_data.effect[effect.first].duration = static_cast< float >( effect.second->getDuration() - - ( currentTimeMs - effect.second->getStartTimeMs() ) ) / 1000; - m_data.effect[effect.first].sourceActorId = effect.second->getSrcActorId(); - m_data.effect[effect.first].unknown1 = effect.second->getParam(); - } + uint64_t currentTimeMs = Core::Util::getTimeMs(); - }; - }; + for( auto const& effect : player.getStatusEffectMap() ) + { + m_data.effect[ effect.first ].effect_id = effect.second->getId(); + m_data.effect[ effect.first ].duration = static_cast< float >( effect.second->getDuration() - + ( currentTimeMs - + effect.second->getStartTimeMs() ) ) / + 1000; + m_data.effect[ effect.first ].sourceActorId = effect.second->getSrcActorId(); + m_data.effect[ effect.first ].unknown1 = effect.second->getParam(); + } + + }; +}; } } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/PlayerStateFlagsPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/PlayerStateFlagsPacket.h index 22b9fa06..9d7aa21b 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/PlayerStateFlagsPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/PlayerStateFlagsPacket.h @@ -14,40 +14,40 @@ namespace Server { * @brief Packet sent to set a players state, this impacts which actions he can perform. */ class PlayerStateFlagsPacket : - public ZoneChannelPacket< FFXIVIpcPlayerStateFlags > + public ZoneChannelPacket< FFXIVIpcPlayerStateFlags > { public: - PlayerStateFlagsPacket( Entity::Player& player ) : - ZoneChannelPacket< FFXIVIpcPlayerStateFlags >( player.getId(), player.getId() ) - { - initialize( player.getStateFlags() ); - } + PlayerStateFlagsPacket( Entity::Player& player ) : + ZoneChannelPacket< FFXIVIpcPlayerStateFlags >( player.getId(), player.getId() ) + { + initialize( player.getStateFlags() ); + } - PlayerStateFlagsPacket( Entity::Player& player, std::vector< Common::PlayerStateFlag > flags ) : - ZoneChannelPacket< FFXIVIpcPlayerStateFlags >( player.getId(), player.getId() ) - { - uint8_t newFlags[12]; - memset( newFlags, 0, 12 ); + PlayerStateFlagsPacket( Entity::Player& player, std::vector< Common::PlayerStateFlag > flags ) : + ZoneChannelPacket< FFXIVIpcPlayerStateFlags >( player.getId(), player.getId() ) + { + uint8_t newFlags[12]; + memset( newFlags, 0, 12 ); - for( auto& flag : flags ) - { - int32_t iFlag = static_cast< uint32_t >( flag ); - uint8_t index = iFlag / 8; - uint8_t bitIndex = iFlag % 8; + for( auto& flag : flags ) + { + int32_t iFlag = static_cast< uint32_t >( flag ); + uint8_t index = iFlag / 8; + uint8_t bitIndex = iFlag % 8; - uint8_t value = 1 << bitIndex; + uint8_t value = 1 << bitIndex; - newFlags[index] |= value; - } + newFlags[ index ] |= value; + } - initialize( newFlags ); - } + initialize( newFlags ); + } private: - void initialize( const uint8_t* flags ) - { - memcpy( m_data.flags, flags, 12 ); - }; + void initialize( const uint8_t* flags ) + { + memcpy( m_data.flags, flags, 12 ); + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/QuestMessagePacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/QuestMessagePacket.h index e87f7661..c07d7b38 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/QuestMessagePacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/QuestMessagePacket.h @@ -14,25 +14,25 @@ namespace Server { * @brief Packet to display a quest specific info message. */ class QuestMessagePacket : - public ZoneChannelPacket< FFXIVIpcQuestMessage > + public ZoneChannelPacket< FFXIVIpcQuestMessage > { public: - QuestMessagePacket( Entity::ActorPtr pActor, uint32_t questId, int8_t msgId, - uint8_t type = 0, uint32_t var1 = 0, uint32_t var2 = 0 ) : - ZoneChannelPacket< FFXIVIpcQuestMessage >( pActor->getId(), pActor->getId() ) - { - initialize( questId, msgId, type, var1, var2 ); - }; + QuestMessagePacket( Entity::ActorPtr pActor, uint32_t questId, int8_t msgId, + uint8_t type = 0, uint32_t var1 = 0, uint32_t var2 = 0 ) : + ZoneChannelPacket< FFXIVIpcQuestMessage >( pActor->getId(), pActor->getId() ) + { + initialize( questId, msgId, type, var1, var2 ); + }; private: - void initialize( uint32_t questId, int8_t msgId, uint8_t type, uint32_t var1, uint32_t var2 ) - { - m_data.questId = questId; - m_data.msgId = msgId; - m_data.type = type; - m_data.var1 = var1; - m_data.var2 = var2; - }; + void initialize( uint32_t questId, int8_t msgId, uint8_t type, uint32_t var1, uint32_t var2 ) + { + m_data.questId = questId; + m_data.msgId = msgId; + m_data.type = type; + m_data.var1 = var1; + m_data.var2 = var2; + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/ServerNoticePacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/ServerNoticePacket.h index 4bb7400d..9f8af3f3 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/ServerNoticePacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/ServerNoticePacket.h @@ -14,20 +14,20 @@ namespace Server { * @brief The Ping response packet. */ class ServerNoticePacket : - public ZoneChannelPacket< FFXIVIpcServerNotice > + public ZoneChannelPacket< FFXIVIpcServerNotice > { public: - ServerNoticePacket( uint32_t playerId, const std::string& message ) : - ZoneChannelPacket< FFXIVIpcServerNotice >( playerId, playerId ) - { - initialize( message ); - }; + ServerNoticePacket( uint32_t playerId, const std::string& message ) : + ZoneChannelPacket< FFXIVIpcServerNotice >( playerId, playerId ) + { + initialize( message ); + }; private: - void initialize( const std::string& message ) - { - strcpy( m_data.message, message.c_str() ); - }; + void initialize( const std::string& message ) + { + strcpy( m_data.message, message.c_str() ); + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/UpdateHpMpTpPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/UpdateHpMpTpPacket.h index 3a815c6a..342e30e5 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/UpdateHpMpTpPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/UpdateHpMpTpPacket.h @@ -14,22 +14,22 @@ namespace Server { * @brief The Ping response packet. */ class UpdateHpMpTpPacket : - public ZoneChannelPacket< FFXIVIpcUpdateHpMpTp > + public ZoneChannelPacket< FFXIVIpcUpdateHpMpTp > { public: - UpdateHpMpTpPacket( Entity::Chara& actor ) : - ZoneChannelPacket< FFXIVIpcUpdateHpMpTp >( actor.getId(), actor.getId() ) - { - initialize( actor ); - }; + UpdateHpMpTpPacket( Entity::Chara& actor ) : + ZoneChannelPacket< FFXIVIpcUpdateHpMpTp >( actor.getId(), actor.getId() ) + { + initialize( actor ); + }; private: - void initialize( Entity::Chara& actor ) - { - m_data.hp = actor.getHp(); - m_data.mp = actor.getMp(); - m_data.tp = actor.getTp(); - }; + void initialize( Entity::Chara& actor ) + { + m_data.hp = actor.getHp(); + m_data.mp = actor.getMp(); + m_data.tp = actor.getTp(); + }; }; } diff --git a/src/servers/sapphire_zone/Network/PacketWrappers/UpdateInventorySlotPacket.h b/src/servers/sapphire_zone/Network/PacketWrappers/UpdateInventorySlotPacket.h index 00a9e31a..d49b7e21 100644 --- a/src/servers/sapphire_zone/Network/PacketWrappers/UpdateInventorySlotPacket.h +++ b/src/servers/sapphire_zone/Network/PacketWrappers/UpdateInventorySlotPacket.h @@ -15,41 +15,41 @@ namespace Server { * @brief The update inventory-slot packet. */ class UpdateInventorySlotPacket : - public ZoneChannelPacket< FFXIVIpcUpdateInventorySlot > + public ZoneChannelPacket< FFXIVIpcUpdateInventorySlot > { public: - UpdateInventorySlotPacket( uint32_t playerId, uint8_t slot, uint16_t storageId, const Item& item ) : - ZoneChannelPacket< FFXIVIpcUpdateInventorySlot >( playerId, playerId ) - { - initialize( slot, storageId, item ); - }; + UpdateInventorySlotPacket( uint32_t playerId, uint8_t slot, uint16_t storageId, const Item& item ) : + ZoneChannelPacket< FFXIVIpcUpdateInventorySlot >( playerId, playerId ) + { + initialize( slot, storageId, item ); + }; private: - void initialize( uint8_t slot, uint16_t storageId, const Item& item ) - { - m_data.sequence = 0; - m_data.containerId = storageId; - m_data.slot = slot; - m_data.quantity = item.getStackSize(); - m_data.catalogId = item.getId(); - m_data.reservedFlag = 0; // no idea - m_data.signatureId = 0; - m_data.hqFlag = item.isHq() ? 1 : 0; - m_data.condition = 60000; // 200% - m_data.spiritBond = 0; - m_data.color = 0; - m_data.glamourCatalogId = 0; - m_data.materia1 = 0; - m_data.materia2 = 0; - m_data.materia3 = 0; - m_data.materia4 = 0; - m_data.materia5 = 0; - //m_data.buffer1; - //uint8_t buffer2; - //uint8_t buffer3; - //uint8_t buffer4; - //uint8_t buffer5; - }; + void initialize( uint8_t slot, uint16_t storageId, const Item& item ) + { + m_data.sequence = 0; + m_data.containerId = storageId; + m_data.slot = slot; + m_data.quantity = item.getStackSize(); + m_data.catalogId = item.getId(); + m_data.reservedFlag = 0; // no idea + m_data.signatureId = 0; + m_data.hqFlag = item.isHq() ? 1 : 0; + m_data.condition = 60000; // 200% + m_data.spiritBond = 0; + m_data.color = 0; + m_data.glamourCatalogId = 0; + m_data.materia1 = 0; + m_data.materia2 = 0; + m_data.materia3 = 0; + m_data.materia4 = 0; + m_data.materia5 = 0; + //m_data.buffer1; + //uint8_t buffer2; + //uint8_t buffer3; + //uint8_t buffer4; + //uint8_t buffer5; + }; }; } diff --git a/src/servers/sapphire_zone/Script/NativeScriptApi.h b/src/servers/sapphire_zone/Script/NativeScriptApi.h index 7a300f29..191f174d 100644 --- a/src/servers/sapphire_zone/Script/NativeScriptApi.h +++ b/src/servers/sapphire_zone/Script/NativeScriptApi.h @@ -26,123 +26,152 @@ using namespace Core; class ScriptObject { protected: - uint32_t m_id; - std::size_t m_type; + uint32_t m_id; + std::size_t m_type; public: - /*! - * @param id an ID which uniquely identifies this script in relation to it's type - * @param type The RTTI hash code of the implementing type to uniquely identify it - */ - ScriptObject( uint32_t id, std::size_t type ) : - m_id( id ), - m_type( type ) - { } + /*! + * @param id an ID which uniquely identifies this script in relation to it's type + * @param type The RTTI hash code of the implementing type to uniquely identify it + */ + ScriptObject( uint32_t id, std::size_t type ) : + m_id( id ), + m_type( type ) + { + } - /*! - * @brief Gets the ID set for this script - * - * @return The allocated ID of the script set during object construction - */ - virtual uint32_t getId() const - { - return m_id; - } + /*! + * @brief Gets the ID set for this script + * + * @return The allocated ID of the script set during object construction + */ + virtual uint32_t getId() const + { + return m_id; + } - /*! - * @brief Gets the unique identifier (hash_code) of the script - * - * @return The hash_code of the script - */ - virtual std::size_t getType() const - { - return m_type; - } + /*! + * @brief Gets the unique identifier (hash_code) of the script + * + * @return The hash_code of the script + */ + virtual std::size_t getType() const + { + return m_type; + } }; /*! * @brief The base class for any scripts that implement behaviour related to status effects. */ -class StatusEffectScript : public ScriptObject +class StatusEffectScript : + public ScriptObject { public: - explicit StatusEffectScript( uint32_t effectId ) : - ScriptObject( effectId, typeid( StatusEffectScript ).hash_code() ) - { } + explicit StatusEffectScript( uint32_t effectId ) : + ScriptObject( effectId, typeid( StatusEffectScript ).hash_code() ) + { + } - /*! - * @brief Called on each tick that a status effect is active on an actor - * - * @param actor the actor the status effect is ticking on - */ - virtual void onTick( Entity::Chara& actor ) { } + /*! + * @brief Called on each tick that a status effect is active on an actor + * + * @param actor the actor the status effect is ticking on + */ + virtual void onTick( Entity::Chara& actor ) + { + } - /*! - * @brief Called when the status effect is applied to an actor - * - * @param actor the actor on which the status effect was applied to - */ - virtual void onApply( Entity::Chara& actor ) { } + /*! + * @brief Called when the status effect is applied to an actor + * + * @param actor the actor on which the status effect was applied to + */ + virtual void onApply( Entity::Chara& actor ) + { + } - /*! - * @brief Called when the actor (usually a player) removes the status effect by right clicking it - * - * @param actor The actor on which the effect was removed from - */ - virtual void onRemove( Entity::Chara& actor ) { } + /*! + * @brief Called when the actor (usually a player) removes the status effect by right clicking it + * + * @param actor The actor on which the effect was removed from + */ + virtual void onRemove( Entity::Chara& actor ) + { + } - /*! - * @brief Called when the status effect expires - * - * @param actor The actor on which the efect expired on - */ - virtual void onExpire( Entity::Chara& actor ) { } + /*! + * @brief Called when the status effect expires + * + * @param actor The actor on which the efect expired on + */ + virtual void onExpire( Entity::Chara& actor ) + { + } - /*! - * @brief Called when the player with the status effect collides with another player, eg. hot potato - * - * @param actor The actor which has status effect - * @param actorHit The actor who collided with the status effect owner - */ - virtual void onPlayerCollision( Entity::Chara& actor, Entity::Chara& actorHit ) { } + /*! + * @brief Called when the player with the status effect collides with another player, eg. hot potato + * + * @param actor The actor which has status effect + * @param actorHit The actor who collided with the status effect owner + */ + virtual void onPlayerCollision( Entity::Chara& actor, Entity::Chara& actorHit ) + { + } - /*! - * @brief Called when the owner finishes a cast - * - * @param actor The actor who finished a cast - */ - virtual void onPlayerFinishCast( Entity::Chara& actor ) { } + /*! + * @brief Called when the owner finishes a cast + * + * @param actor The actor who finished a cast + */ + virtual void onPlayerFinishCast( Entity::Chara& actor ) + { + } - /*! - * @brief Called when the status effect owner was damaged - * - * @param actor The actor that was damaged - */ - virtual void onPlayerDamaged( Entity::Chara& actor ) { } + /*! + * @brief Called when the status effect owner was damaged + * + * @param actor The actor that was damaged + */ + virtual void onPlayerDamaged( Entity::Chara& actor ) + { + } - /*! - * @brief Called when the status effect owner dies - * - * @param actor The actor that died - */ - virtual void onPlayerDeath( Entity::Chara& actor ) { } + /*! + * @brief Called when the status effect owner dies + * + * @param actor The actor that died + */ + virtual void onPlayerDeath( Entity::Chara& actor ) + { + } }; /*! * @brief The base class for any scripts that implement behaviour related to actions */ -class ActionScript : public ScriptObject +class ActionScript : + public ScriptObject { public: - explicit ActionScript( uint32_t abilityId ) : - ScriptObject( abilityId, typeid( ActionScript ).hash_code() ) - { } + explicit ActionScript( uint32_t abilityId ) : + ScriptObject( abilityId, typeid( ActionScript ).hash_code() ) + { + } - virtual void onStart( Entity::Chara& sourceActor, Entity::Chara& targetActor ) { } - virtual void onCastFinish( Entity::Player& player, Entity::Chara& targetActor ) { } - virtual void onInterrupt( Entity::Chara& sourceActor/*, Core::Entity::Chara targetActor*/ ) { } + virtual void onStart( Entity::Chara& sourceActor, Entity::Chara& targetActor ) + { + } + + virtual void onCastFinish( Entity::Player& player, Entity::Chara& targetActor ) + { + } + + virtual void onInterrupt( Entity::Chara& sourceActor/*, Core::Entity::Chara targetActor*/ ) + { + } }; @@ -150,68 +179,112 @@ public: * @brief The base class for any scripts that implement behaviour related to the event system. * This includes but is not limited to: NPCs, shops, some world objects */ -class EventScript : public ScriptObject +class EventScript : + public ScriptObject { protected: - template< typename Ret, class Obj > - inline Event::EventHandler::SceneChainCallback bindScene( Ret ( Obj::*f )( Entity::Player& ) ) - { - return std::bind( f, static_cast< Obj* >( this ), std::placeholders::_1 ); - } + template< typename Ret, class Obj > + inline Event::EventHandler::SceneChainCallback bindScene( Ret ( Obj::*f )( Entity::Player& ) ) + { + return std::bind( f, static_cast< Obj* >( this ), std::placeholders::_1 ); + } public: - explicit EventScript( uint32_t questId ) : - ScriptObject( questId, typeid( EventScript ).hash_code() ) - { } + explicit EventScript( uint32_t questId ) : + ScriptObject( questId, typeid( EventScript ).hash_code() ) + { + } - virtual void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) { } - virtual void onNpcKill( uint32_t npcId, Entity::Player& player ) { } - virtual void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) { } - virtual void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) { } - virtual void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) { } - virtual void onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) { } - virtual void onEventItem( Entity::Player& player, uint32_t eventItemId, uint32_t eventId, uint32_t castTime, uint64_t targetId ) { } - virtual void onEventHandlerTradeReturn( Entity::Player& player, uint32_t eventId, uint16_t subEvent, uint16_t param, uint32_t catalogId ) { } + virtual void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) + { + } + + virtual void onNpcKill( uint32_t npcId, Entity::Player& player ) + { + } + + virtual void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) + { + } + + virtual void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) + { + } + + virtual void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) + { + } + + virtual void onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) + { + } + + virtual void + onEventItem( Entity::Player& player, uint32_t eventItemId, uint32_t eventId, uint32_t castTime, uint64_t targetId ) + { + } + + virtual void onEventHandlerTradeReturn( Entity::Player& player, uint32_t eventId, uint16_t subEvent, uint16_t param, + uint32_t catalogId ) + { + } }; /*! * @brief The base class for any scripts that implement behaviour related to BattleNPCs */ -class BattleNpcScript : public ScriptObject +class BattleNpcScript : + public ScriptObject { public: - explicit BattleNpcScript( uint32_t npcId ) : - ScriptObject( npcId, typeid( BattleNpcScript ).hash_code() ) - { } + explicit BattleNpcScript( uint32_t npcId ) : + ScriptObject( npcId, typeid( BattleNpcScript ).hash_code() ) + { + } }; /*! * @brief The base class for any scripts that implement behaviour related to zones */ -class ZoneScript : public ScriptObject +class ZoneScript : + public ScriptObject { public: - explicit ZoneScript( uint32_t zoneId ) : - ScriptObject( zoneId, typeid( ZoneScript ).hash_code() ) - { } + explicit ZoneScript( uint32_t zoneId ) : + ScriptObject( zoneId, typeid( ZoneScript ).hash_code() ) + { + } - virtual void onZoneInit() { } + virtual void onZoneInit() + { + } }; /*! * @brief The base class for any scripts that implement behaviour related to instance content zones */ -class InstanceContentScript : public ScriptObject +class InstanceContentScript : + public ScriptObject { public: - explicit InstanceContentScript( uint32_t instanceContentId ) : - ScriptObject( uint32_t{ 0x8003 } << 16 | instanceContentId, typeid( InstanceContentScript ).hash_code() ) - { } + explicit InstanceContentScript( uint32_t instanceContentId ) : + ScriptObject( uint32_t{ 0x8003 } << 16 | instanceContentId, typeid( InstanceContentScript ).hash_code() ) + { + } - virtual void onInit( InstanceContentPtr instance ) { } - virtual void onUpdate( InstanceContentPtr instance, uint32_t currTime ) { } - virtual void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) { } + virtual void onInit( InstanceContentPtr instance ) + { + } + + virtual void onUpdate( InstanceContentPtr instance, uint32_t currTime ) + { + } + + virtual void onEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ) + { + } }; #endif diff --git a/src/servers/sapphire_zone/Script/NativeScriptMgr.cpp b/src/servers/sapphire_zone/Script/NativeScriptMgr.cpp index b78e7d02..f6bb65c5 100644 --- a/src/servers/sapphire_zone/Script/NativeScriptMgr.cpp +++ b/src/servers/sapphire_zone/Script/NativeScriptMgr.cpp @@ -6,122 +6,121 @@ namespace Core { namespace Scripting { - bool NativeScriptMgr::loadScript( const std::string& path ) - { - auto module = m_loader.loadModule( path ); - if( !module ) - return false; +bool NativeScriptMgr::loadScript( const std::string& path ) +{ + auto module = m_loader.loadModule( path ); + if( !module ) + return false; - auto scripts = m_loader.getScripts( module->handle ); - if( !scripts ) - { - m_loader.unloadScript( module ); - return false; - } + auto scripts = m_loader.getScripts( module->handle ); + if( !scripts ) + { + m_loader.unloadScript( module ); + return false; + } - // - bool success = false; + // + bool success = false; - for( int i = 0; ; i++ ) - { - if( scripts[i] == nullptr ) - break; + for( int i = 0;; i++ ) + { + if( scripts[ i ] == nullptr ) + break; - auto script = scripts[i]; - module->scripts.push_back( script ); + auto script = scripts[ i ]; + module->scripts.push_back( script ); - m_scripts[script->getType()][script->getId()] = script; + m_scripts[ script->getType() ][ script->getId() ] = script; - success = true; - } + success = true; + } - if( !success ) - { - m_loader.unloadScript( module->handle ); - return false; - } + if( !success ) + { + m_loader.unloadScript( module->handle ); + return false; + } - return true; - } + return true; +} - const std::string NativeScriptMgr::getModuleExtension() - { - return m_loader.getModuleExtension(); - } +const std::string NativeScriptMgr::getModuleExtension() +{ + return m_loader.getModuleExtension(); +} - bool NativeScriptMgr::unloadScript( const std::string& name ) - { - auto info = m_loader.getScriptInfo( name ); - if( !info ) - return false; +bool NativeScriptMgr::unloadScript( const std::string& name ) +{ + auto info = m_loader.getScriptInfo( name ); + if( !info ) + return false; - return unloadScript( info ); - } + return unloadScript( info ); +} - bool NativeScriptMgr::unloadScript( ScriptInfo* info ) - { - for( auto& script : info->scripts ) - { - m_scripts[script->getType()].erase( script->getId() ); +bool NativeScriptMgr::unloadScript( ScriptInfo* info ) +{ + for( auto& script : info->scripts ) + { + m_scripts[ script->getType() ].erase( script->getId() ); - delete script; - } + delete script; + } - return m_loader.unloadScript( info ); - } + return m_loader.unloadScript( info ); +} - void NativeScriptMgr::queueScriptReload( const std::string &name ) - { - auto info = m_loader.getScriptInfo( name ); - if( !info ) - return; +void NativeScriptMgr::queueScriptReload( const std::string& name ) +{ + auto info = m_loader.getScriptInfo( name ); + if( !info ) + return; - // backup actual lib path - std::string libPath( info->library_path ); + // backup actual lib path + std::string libPath( info->library_path ); - if( !unloadScript( info ) ) - return; + if( !unloadScript( info ) ) + return; - m_scriptLoadQueue.push( libPath ); - } + m_scriptLoadQueue.push( libPath ); +} - void NativeScriptMgr::processLoadQueue() - { - std::vector< std::string > deferredLoads; +void NativeScriptMgr::processLoadQueue() +{ + std::vector< std::string > deferredLoads; - while( !m_scriptLoadQueue.empty() ) - { - auto item = m_scriptLoadQueue.front(); + while( !m_scriptLoadQueue.empty() ) + { + auto item = m_scriptLoadQueue.front(); - // if it fails, we defer the loading to the next tick - if( !loadScript( item ) ) - deferredLoads.push_back( item ); + // if it fails, we defer the loading to the next tick + if( !loadScript( item ) ) + deferredLoads.push_back( item ); - m_scriptLoadQueue.pop(); - } + m_scriptLoadQueue.pop(); + } - if( !deferredLoads.empty() ) - { - for( auto& item : deferredLoads ) - m_scriptLoadQueue.push( item ); - } - } + if( !deferredLoads.empty() ) + { + for( auto& item : deferredLoads ) + m_scriptLoadQueue.push( item ); + } +} - void NativeScriptMgr::findScripts( std::set< Core::Scripting::ScriptInfo* >& scripts, const std::string& search ) - { - return m_loader.findScripts( scripts, search ); - } +void NativeScriptMgr::findScripts( std::set< Core::Scripting::ScriptInfo* >& scripts, const std::string& search ) +{ + return m_loader.findScripts( scripts, search ); +} - bool NativeScriptMgr::isModuleLoaded( const std::string &name ) - { - return m_loader.isModuleLoaded( name ); - } +bool NativeScriptMgr::isModuleLoaded( const std::string& name ) +{ + return m_loader.isModuleLoaded( name ); +} - - boost::shared_ptr< NativeScriptMgr > createNativeScriptMgr() - { - return boost::make_shared< NativeScriptMgr >(); - } +boost::shared_ptr< NativeScriptMgr > createNativeScriptMgr() +{ + return boost::make_shared< NativeScriptMgr >(); +} } } diff --git a/src/servers/sapphire_zone/Script/NativeScriptMgr.h b/src/servers/sapphire_zone/Script/NativeScriptMgr.h index aabc5292..a4d3f6f0 100644 --- a/src/servers/sapphire_zone/Script/NativeScriptMgr.h +++ b/src/servers/sapphire_zone/Script/NativeScriptMgr.h @@ -13,122 +13,123 @@ namespace Core { namespace Scripting { - /*! - * @brief Contains all the functionality for easily loading, unloading, reloading and generally accessing scripts. - */ - class NativeScriptMgr - { - protected: - /*! - * @brief An internal list that maps script types to another list containing scripts indexed by their assoicated id - */ - std::unordered_map< std::size_t, std::unordered_map< uint32_t, ScriptObject* > > m_scripts; +/*! + * @brief Contains all the functionality for easily loading, unloading, reloading and generally accessing scripts. + */ +class NativeScriptMgr +{ +protected: + /*! + * @brief An internal list that maps script types to another list containing scripts indexed by their assoicated id + */ + std::unordered_map< std::size_t, std::unordered_map< uint32_t, ScriptObject* > > m_scripts; - ScriptLoader m_loader; + ScriptLoader m_loader; - /*! - * @brief The queue that scripts to be reloaded are placed into. - */ - std::queue< std::string > m_scriptLoadQueue; + /*! + * @brief The queue that scripts to be reloaded are placed into. + */ + std::queue< std::string > m_scriptLoadQueue; - /*! - * @brief Used to unload a script - * - * Used to unload a script, clears m_scripts of any scripts assoicated with a ScriptInfo and then unloads that module - * - * @param info A pointer to the ScriptInfo object that is to be erased - * @return true if successful, false if not - */ - bool unloadScript( ScriptInfo* info ); + /*! + * @brief Used to unload a script + * + * Used to unload a script, clears m_scripts of any scripts assoicated with a ScriptInfo and then unloads that module + * + * @param info A pointer to the ScriptInfo object that is to be erased + * @return true if successful, false if not + */ + bool unloadScript( ScriptInfo* info ); - public: - NativeScriptMgr() = default; +public: + NativeScriptMgr() = default; - /*! - * @brief Loads a script from a path - * - * This will populate m_scripts if it is successful and scripts will be available as soon as this returns. - * - * @param path The path to the module to load - * @return true if successful, false if not - */ - bool loadScript( const std::string& path ); + /*! + * @brief Loads a script from a path + * + * This will populate m_scripts if it is successful and scripts will be available as soon as this returns. + * + * @param path The path to the module to load + * @return true if successful, false if not + */ + bool loadScript( const std::string& path ); - /*! - * @brief Unloads a script - * - * @param name The module name of the script to unload - * @return true if successful - */ - bool unloadScript( const std::string& name ); + /*! + * @brief Unloads a script + * + * @param name The module name of the script to unload + * @return true if successful + */ + bool unloadScript( const std::string& name ); - /*! - * @brief Queues a script module to be reloaded - * - * Due to the nature of how this works, there's no return. - * It will just silently fail over and over again to infinity and beyond until the server restarts... not that should ever happen under normal circumstances. - * - * @param name The name of the module to be reloaded. - */ - void queueScriptReload( const std::string& name ); + /*! + * @brief Queues a script module to be reloaded + * + * Due to the nature of how this works, there's no return. + * It will just silently fail over and over again to infinity and beyond until the server restarts... not that should ever happen under normal circumstances. + * + * @param name The name of the module to be reloaded. + */ + void queueScriptReload( const std::string& name ); - /*! - * @brief Case-insensitive search for modules, useful for debug commands - * - * @param scripts a set of ScriptInfo ptrs - * @param search the search term - */ - void findScripts( std::set< Core::Scripting::ScriptInfo* >& scripts, const std::string& search ); + /*! + * @brief Case-insensitive search for modules, useful for debug commands + * + * @param scripts a set of ScriptInfo ptrs + * @param search the search term + */ + void findScripts( std::set< Core::Scripting::ScriptInfo* >& scripts, const std::string& search ); - /*! - * @brief Called on a regular interval, allows for scripts to be loaded from the internal load queue. - */ - void processLoadQueue(); + /*! + * @brief Called on a regular interval, allows for scripts to be loaded from the internal load queue. + */ + void processLoadQueue(); - /*! - * @brief Gets the module file extention for the current platform (windows, linux, osx) - * - * @return The file extension for the current platform - */ - const std::string getModuleExtension(); + /*! + * @brief Gets the module file extention for the current platform (windows, linux, osx) + * + * @return The file extension for the current platform + */ + const std::string getModuleExtension(); - /*! - * @brief Checks to see if a module with the specified name exists - * - * @param name The module name to lookup - * @return true if loaded, false if not - */ - bool isModuleLoaded( const std::string& name ); + /*! + * @brief Checks to see if a module with the specified name exists + * + * @param name The module name to lookup + * @return true if loaded, false if not + */ + bool isModuleLoaded( const std::string& name ); - /*! - * @brief Get a specific script from the internal table - * - * @tparam T The type of the script to search for - * @param scriptId The ID of the script to search for - * @return T* if successful, nullptr if the script doesn't exist - */ - template< typename T > - T* getScript( uint32_t scriptId ) - { - auto type = typeid( T ).hash_code(); + /*! + * @brief Get a specific script from the internal table + * + * @tparam T The type of the script to search for + * @param scriptId The ID of the script to search for + * @return T* if successful, nullptr if the script doesn't exist + */ + template< typename T > + T* getScript( uint32_t scriptId ) + { + auto type = typeid( T ).hash_code(); - auto script = m_scripts[type].find( scriptId ); - if( script == m_scripts[type].end() ) - return nullptr; + auto script = m_scripts[ type ].find( scriptId ); + if( script == m_scripts[ type ].end() ) + return nullptr; - return dynamic_cast< T* >( script->second ); - } - }; + return dynamic_cast< T* >( script->second ); + } +}; - /*! - * @brief Creates an instance of NativeScriptMgr - * - * @return a boost::shared_ptr to NativeScriptMgr - */ - boost::shared_ptr< NativeScriptMgr > createNativeScriptMgr(); -} } +/*! + * @brief Creates an instance of NativeScriptMgr + * + * @return a boost::shared_ptr to NativeScriptMgr + */ +boost::shared_ptr< NativeScriptMgr > createNativeScriptMgr(); +} +} #endif diff --git a/src/servers/sapphire_zone/Script/ScriptInfo.h b/src/servers/sapphire_zone/Script/ScriptInfo.h index 91bc902a..db9488dc 100644 --- a/src/servers/sapphire_zone/Script/ScriptInfo.h +++ b/src/servers/sapphire_zone/Script/ScriptInfo.h @@ -7,7 +7,9 @@ #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN + #include + typedef HMODULE ModuleHandle; #else typedef void* ModuleHandle; @@ -16,50 +18,50 @@ typedef void* ModuleHandle; namespace Core { namespace Scripting { - /*! - * @brief An internal class used to track information about loaded modules and their scripts. - * - * The main purpose of this is to maintain easy access to the module handle and the pointers to scripts that are loaded. - * Furthermore, allows for quick and easy cross platform access to the module paths associated with the runtime module cache and its original path. - */ - class ScriptInfo - { - public: - ScriptInfo() = default; +/*! + * @brief An internal class used to track information about loaded modules and their scripts. + * + * The main purpose of this is to maintain easy access to the module handle and the pointers to scripts that are loaded. + * Furthermore, allows for quick and easy cross platform access to the module paths associated with the runtime module cache and its original path. + */ +class ScriptInfo +{ +public: + ScriptInfo() = default; - /*! - * @brief The file name of the loaded library. - * - * On all platforms, this will be the full filename of the module, eg: - * - script_instances.dll on Windows - * - libscript_instances.so on Linux - */ - std::string library_name; + /*! + * @brief The file name of the loaded library. + * + * On all platforms, this will be the full filename of the module, eg: + * - script_instances.dll on Windows + * - libscript_instances.so on Linux + */ + std::string library_name; - /*! - * @brief The path to the module currently loaded in memory from the cached location. - */ - std::string cache_path; + /*! + * @brief The path to the module currently loaded in memory from the cached location. + */ + std::string cache_path; - /*! - * @brief The original path of the module before it was copied to the cache location. - */ - std::string library_path; + /*! + * @brief The original path of the module before it was copied to the cache location. + */ + std::string library_path; - /*! - * @brief A handle to the module. - * - * The underlying type for this depends on platform. On Windows it's some stupid shit, on everything else it's a void*. - */ - ModuleHandle handle; + /*! + * @brief A handle to the module. + * + * The underlying type for this depends on platform. On Windows it's some stupid shit, on everything else it's a void*. + */ + ModuleHandle handle; - /*! - * @brief An internal list of all the pointers to each ScriptObject - * - * This is tracked so when we unload this module we can call delete on each ScriptObject and correctly free it from memory. - */ - std::vector< ScriptObject* > scripts; - }; + /*! + * @brief An internal list of all the pointers to each ScriptObject + * + * This is tracked so when we unload this module we can call delete on each ScriptObject and correctly free it from memory. + */ + std::vector< ScriptObject* > scripts; +}; } } diff --git a/src/servers/sapphire_zone/Script/ScriptLoader.cpp b/src/servers/sapphire_zone/Script/ScriptLoader.cpp index 9e467c66..0b4c3810 100644 --- a/src/servers/sapphire_zone/Script/ScriptLoader.cpp +++ b/src/servers/sapphire_zone/Script/ScriptLoader.cpp @@ -10,6 +10,7 @@ #include #include "Framework.h" + extern Core::Framework g_fw; namespace fs = boost::filesystem; @@ -17,180 +18,182 @@ namespace fs = boost::filesystem; const std::string Core::Scripting::ScriptLoader::getModuleExtension() { #ifdef _WIN32 - return ".dll"; + return ".dll"; #elif __APPLE__ - return ".dylib"; + return ".dylib"; #else - return ".so"; + return ".so"; #endif } bool Core::Scripting::ScriptLoader::unloadModule( ModuleHandle handle ) { #ifdef _WIN32 - bool success = FreeLibrary( handle ) != 0; + bool success = FreeLibrary( handle ) != 0; #else - bool success = dlclose( handle ) == 0; + bool success = dlclose( handle ) == 0; #endif - - auto pLog = g_fw.get< Logger >(); - if( !success ) - { - pLog->error( "Failed to unload module @ 0x" + boost::str( boost::format( "%|08X|" ) % handle ) ); + auto pLog = g_fw.get< Logger >(); - return false; - } + if( !success ) + { + pLog->error( "Failed to unload module @ 0x" + boost::str( boost::format( "%|08X|" ) % handle ) ); - pLog->debug( "Unloaded module @ 0x" + boost::str( boost::format( "%|08X|" ) % handle ) ); + return false; + } - return true; + pLog->debug( "Unloaded module @ 0x" + boost::str( boost::format( "%|08X|" ) % handle ) ); + + return true; } Core::Scripting::ScriptInfo* Core::Scripting::ScriptLoader::loadModule( const std::string& path ) { - auto pLog = g_fw.get< Logger >(); - auto pConfig = g_fw.get< ConfigMgr >(); - fs::path f( path ); + auto pLog = g_fw.get< Logger >(); + auto pConfig = g_fw.get< ConfigMgr >(); + fs::path f( path ); - if( isModuleLoaded( f.stem().string() ) ) - { - pLog->error( "Unable to load module '" + f.stem().string() + "' as it is already loaded" ); - return nullptr; - } + if( isModuleLoaded( f.stem().string() ) ) + { + pLog->error( "Unable to load module '" + f.stem().string() + "' as it is already loaded" ); + return nullptr; + } - // copy to temp dir - fs::path cacheDir( f.parent_path() /= pConfig->getValue< std::string >( "Scripts.CachePath", "./cache/" ) ); - fs::create_directories( cacheDir ); - fs::path dest( cacheDir /= f.filename().string() ); + // copy to temp dir + fs::path cacheDir( f.parent_path() /= pConfig->getValue< std::string >( "Scripts.CachePath", "./cache/" ) ); + fs::create_directories( cacheDir ); + fs::path dest( cacheDir /= f.filename().string() ); - try - { - fs::copy_file( f, dest, fs::copy_option::overwrite_if_exists ); - } - catch( const boost::filesystem::filesystem_error& err ) - { - pLog->error( "Error copying file to cache: " + err.code().message() ); + try + { + fs::copy_file( f, dest, fs::copy_option::overwrite_if_exists ); + } + catch( const boost::filesystem::filesystem_error& err ) + { + pLog->error( "Error copying file to cache: " + err.code().message() ); - return nullptr; - } + return nullptr; + } #ifdef _WIN32 - ModuleHandle handle = LoadLibrary( dest.string().c_str() ); + ModuleHandle handle = LoadLibrary( dest.string().c_str() ); #else - ModuleHandle handle = dlopen( dest.string().c_str(), RTLD_LAZY ); + ModuleHandle handle = dlopen( dest.string().c_str(), RTLD_LAZY ); #endif - if( !handle ) - { - pLog->error( "Failed to load module from: " + path ); + if( !handle ) + { + pLog->error( "Failed to load module from: " + path ); - return nullptr; - } + return nullptr; + } - pLog->debug( "Loaded module '" + f.filename().string() + "' @ 0x" + boost::str( boost::format( "%|08X|" ) % handle ) ); + pLog->debug( + "Loaded module '" + f.filename().string() + "' @ 0x" + boost::str( boost::format( "%|08X|" ) % handle ) ); - auto info = new ScriptInfo; - info->handle = handle; - info->library_name = f.stem().string(); - info->cache_path = dest.string(); - info->library_path = f.string(); + auto info = new ScriptInfo; + info->handle = handle; + info->library_name = f.stem().string(); + info->cache_path = dest.string(); + info->library_path = f.string(); - m_scriptMap.insert( std::make_pair( f.stem().string(), info ) ); + m_scriptMap.insert( std::make_pair( f.stem().string(), info ) ); - return info; + return info; } ScriptObject** Core::Scripting::ScriptLoader::getScripts( ModuleHandle handle ) { - using getScripts = ScriptObject**( *)( ); - auto pLog = g_fw.get< Logger >(); + using getScripts = ScriptObject** ( * )(); + auto pLog = g_fw.get< Logger >(); #ifdef _WIN32 - getScripts func = reinterpret_cast< getScripts >( GetProcAddress( handle, "getScripts" ) ); + getScripts func = reinterpret_cast< getScripts >( GetProcAddress( handle, "getScripts" ) ); #else - getScripts func = reinterpret_cast< getScripts >( dlsym( handle, "getScripts" ) ); + getScripts func = reinterpret_cast< getScripts >( dlsym( handle, "getScripts" ) ); #endif - if( func ) - { - auto ptr = func(); + if( func ) + { + auto ptr = func(); - pLog->debug( "got ScriptObject array @ 0x" + boost::str( boost::format( "%|08X|" ) % ptr ) ); + pLog->debug( "got ScriptObject array @ 0x" + boost::str( boost::format( "%|08X|" ) % ptr ) ); - return ptr; - } - else - return nullptr; + return ptr; + } + else + return nullptr; } bool Core::Scripting::ScriptLoader::unloadScript( Core::Scripting::ScriptInfo* info ) { - return unloadScript( info->handle ); + return unloadScript( info->handle ); } bool Core::Scripting::ScriptLoader::unloadScript( ModuleHandle handle ) { - auto pLog = g_fw.get< Logger >(); - for( auto it = m_scriptMap.begin(); it != m_scriptMap.end(); ++it ) - { - if( it->second->handle == handle ) + auto pLog = g_fw.get< Logger >(); + for( auto it = m_scriptMap.begin(); it != m_scriptMap.end(); ++it ) + { + if( it->second->handle == handle ) + { + auto info = it->second; + + if( unloadModule( handle ) ) { - auto info = it->second; + m_scriptMap.erase( it ); - if( unloadModule( handle ) ) - { - m_scriptMap.erase( it ); + // remove cached file + fs::remove( info->cache_path ); - // remove cached file - fs::remove( info->cache_path ); + delete info; - delete info; - - return true; - } - - pLog->error( "failed to unload module: " + info->library_name ); - - return false; + return true; } - } - return false; + pLog->error( "failed to unload module: " + info->library_name ); + + return false; + } + } + + return false; } bool Core::Scripting::ScriptLoader::isModuleLoaded( std::string name ) { - for( auto it = m_scriptMap.begin(); it != m_scriptMap.end(); ++it ) - { - if( boost::iequals( it->second->library_name, name ) ) - return true; - } + for( auto it = m_scriptMap.begin(); it != m_scriptMap.end(); ++it ) + { + if( boost::iequals( it->second->library_name, name ) ) + return true; + } - return false; + return false; } Core::Scripting::ScriptInfo* Core::Scripting::ScriptLoader::getScriptInfo( std::string name ) { - for( auto it = m_scriptMap.begin(); it != m_scriptMap.end(); ++it ) - { - if( it->second->library_name == name ) - { - return it->second; - } - } + for( auto it = m_scriptMap.begin(); it != m_scriptMap.end(); ++it ) + { + if( it->second->library_name == name ) + { + return it->second; + } + } - return nullptr; + return nullptr; } -void Core::Scripting::ScriptLoader::findScripts( std::set< Core::Scripting::ScriptInfo* >& scripts, const std::string& search ) +void Core::Scripting::ScriptLoader::findScripts( std::set< Core::Scripting::ScriptInfo* >& scripts, + const std::string& search ) { - for( auto it = m_scriptMap.begin(); it != m_scriptMap.end(); ++it ) - { - if( it->second->library_name.find( search ) != std::string::npos ) - { - scripts.insert( it->second ); - } - } + for( auto it = m_scriptMap.begin(); it != m_scriptMap.end(); ++it ) + { + if( it->second->library_name.find( search ) != std::string::npos ) + { + scripts.insert( it->second ); + } + } } diff --git a/src/servers/sapphire_zone/Script/ScriptLoader.h b/src/servers/sapphire_zone/Script/ScriptLoader.h index 5acbb431..c1392315 100644 --- a/src/servers/sapphire_zone/Script/ScriptLoader.h +++ b/src/servers/sapphire_zone/Script/ScriptLoader.h @@ -11,6 +11,7 @@ #define WIN32_LEAN_AND_MEAN #include + using ModuleHandle = HMODULE; #else #include @@ -20,94 +21,92 @@ using ModuleHandle = void*; namespace Core { namespace Scripting { - /*! - * @brief Provides low level functionality for loading modules on different platforms along with managing those loaded modules. - */ - class ScriptLoader - { - protected: - /*! - * @brief The internal list of all modules that are loaded. - */ - std::unordered_map< std::string, ScriptInfo* > m_scriptMap; +/*! + * @brief Provides low level functionality for loading modules on different platforms along with managing those loaded modules. + */ +class ScriptLoader +{ +protected: + /*! + * @brief The internal list of all modules that are loaded. + */ + std::unordered_map< std::string, ScriptInfo* > m_scriptMap; - /*! - * @brief Unload a loaded module from it's ModuleHandle - * - * @return true if the unload was successful, false if not - */ - bool unloadModule( ModuleHandle ); + /*! + * @brief Unload a loaded module from it's ModuleHandle + * + * @return true if the unload was successful, false if not + */ + bool unloadModule( ModuleHandle ); - public: - ScriptLoader() = default; +public: + ScriptLoader() = default; - /*! - * @brief Gets the module file extention for the current platform (windows, linux, osx) - * - * @return The file extension for the current platform - */ - const std::string getModuleExtension(); + /*! + * @brief Gets the module file extention for the current platform (windows, linux, osx) + * + * @return The file extension for the current platform + */ + const std::string getModuleExtension(); - /*! - * @brief Load a module from a path - * - * Internally, this will also copy the module from it's original folder into the cache folder. - * - * @return A pointer to ScriptInfo if the load was successful, nullptr if it failed - */ - ScriptInfo* loadModule( const std::string& ); + /*! + * @brief Load a module from a path + * + * Internally, this will also copy the module from it's original folder into the cache folder. + * + * @return A pointer to ScriptInfo if the load was successful, nullptr if it failed + */ + ScriptInfo* loadModule( const std::string& ); - /*! - * @brief Unload a script from it's ScriptInfo object - * - * @return true if successful, false if not - */ - bool unloadScript( ScriptInfo* ); + /*! + * @brief Unload a script from it's ScriptInfo object + * + * @return true if successful, false if not + */ + bool unloadScript( ScriptInfo* ); - /*! - * @brief Unload a script via it's module handle - * - * @return true if successful, false if not - */ - bool unloadScript( ModuleHandle ); + /*! + * @brief Unload a script via it's module handle + * + * @return true if successful, false if not + */ + bool unloadScript( ModuleHandle ); - /*! - * @brief Look up a ScriptInfo* by a module name - * - * @param name The exact module name to search for, case-sensitive - * @return The ScriptInfo ptr if successful, nullptr if it wasn't found - */ - ScriptInfo* getScriptInfo( std::string name ); + /*! + * @brief Look up a ScriptInfo* by a module name + * + * @param name The exact module name to search for, case-sensitive + * @return The ScriptInfo ptr if successful, nullptr if it wasn't found + */ + ScriptInfo* getScriptInfo( std::string name ); - /*! - * @brief Get all scripts assoicated with a module - * - * @param handle The handle to the module - * @return An array of unknown size ending with nullptr if success, nullptr if not - */ - ScriptObject** getScripts( ModuleHandle handle ); + /*! + * @brief Get all scripts assoicated with a module + * + * @param handle The handle to the module + * @return An array of unknown size ending with nullptr if success, nullptr if not + */ + ScriptObject** getScripts( ModuleHandle handle ); - /*! - * @brief Checks to see if a module with the specified name exists - * - * @param name The module name to lookup - * @return true if loaded, false if not - */ - bool isModuleLoaded( std::string name ); + /*! + * @brief Checks to see if a module with the specified name exists + * + * @param name The module name to lookup + * @return true if loaded, false if not + */ + bool isModuleLoaded( std::string name ); - /*! - * @brief Case-insensitive search for modules, useful for debug commands - * - * @param scripts a set of ScriptInfo ptrs - * @param search the search term - */ - void findScripts( std::set< Core::Scripting::ScriptInfo* >& scripts, const std::string& search ); - }; + /*! + * @brief Case-insensitive search for modules, useful for debug commands + * + * @param scripts a set of ScriptInfo ptrs + * @param search the search term + */ + void findScripts( std::set< Core::Scripting::ScriptInfo* >& scripts, const std::string& search ); +}; } } - - #endif // CORE_SCRIPTLOADER_H diff --git a/src/servers/sapphire_zone/Script/ScriptMgr.cpp b/src/servers/sapphire_zone/Script/ScriptMgr.cpp index f9ca9890..e686b4f2 100644 --- a/src/servers/sapphire_zone/Script/ScriptMgr.cpp +++ b/src/servers/sapphire_zone/Script/ScriptMgr.cpp @@ -33,125 +33,129 @@ extern Core::Framework g_fw; Core::Scripting::ScriptMgr::ScriptMgr() : - m_firstScriptChangeNotificiation( false ) + m_firstScriptChangeNotificiation( false ) { - m_nativeScriptMgr = createNativeScriptMgr(); + m_nativeScriptMgr = createNativeScriptMgr(); } Core::Scripting::ScriptMgr::~ScriptMgr() { - Watchdog::unwatchAll(); + Watchdog::unwatchAll(); } void Core::Scripting::ScriptMgr::update() { - m_nativeScriptMgr->processLoadQueue(); + m_nativeScriptMgr->processLoadQueue(); } bool Core::Scripting::ScriptMgr::init() { - std::set< std::string > files; - auto pConfig = g_fw.get< ConfigMgr >(); - auto pLog = g_fw.get< Logger >(); + std::set< std::string > files; + auto pConfig = g_fw.get< ConfigMgr >(); + auto pLog = g_fw.get< Logger >(); - auto status = loadDir( pConfig->getValue< std::string >( "Scripts.Path", "./compiledscripts/" ), - files, m_nativeScriptMgr->getModuleExtension() ); + auto status = loadDir( pConfig->getValue< std::string >( "Scripts.Path", "./compiledscripts/" ), + files, m_nativeScriptMgr->getModuleExtension() ); - if( !status ) - { - pLog->error( std::string( __func__ ) + ": failed to load scripts, the server will not function correctly without scripts loaded." ); - return false; - } + if( !status ) + { + pLog->error( std::string( __func__ ) + + ": failed to load scripts, the server will not function correctly without scripts loaded." ); + return false; + } - uint32_t scriptsFound = 0; - uint32_t scriptsLoaded = 0; + uint32_t scriptsFound = 0; + uint32_t scriptsLoaded = 0; - for( auto itr = files.begin(); itr != files.end(); ++itr ) - { - auto& path = *itr; + for( auto itr = files.begin(); itr != files.end(); ++itr ) + { + auto& path = *itr; - scriptsFound++; + scriptsFound++; - if( m_nativeScriptMgr->loadScript( path ) ) - scriptsLoaded++; - } + if( m_nativeScriptMgr->loadScript( path ) ) + scriptsLoaded++; + } - pLog->info( "ScriptMgr: Loaded " + std::to_string( scriptsLoaded ) + "/" + std::to_string( scriptsFound ) + " modules" ); + pLog->info( + "ScriptMgr: Loaded " + std::to_string( scriptsLoaded ) + "/" + std::to_string( scriptsFound ) + " modules" ); - watchDirectories(); + watchDirectories(); - return true; + return true; } void Core::Scripting::ScriptMgr::watchDirectories() { - auto pConfig = g_fw.get< ConfigMgr >(); - auto shouldWatch = pConfig->getValue< bool >( "Scripts.HotSwap", true ); - if( !shouldWatch ) - return; + auto pConfig = g_fw.get< ConfigMgr >(); + auto shouldWatch = pConfig->getValue< bool >( "Scripts.HotSwap", true ); + if( !shouldWatch ) + return; - Watchdog::watchMany( pConfig->getValue< std::string >( "Scripts.Path", "./compiledscripts/" ) + "*" + m_nativeScriptMgr->getModuleExtension(), - [ this ]( const std::vector< ci::fs::path >& paths ) - { - if( !m_firstScriptChangeNotificiation ) - { - // for whatever reason, the first time this runs, it detects every file as changed - // so we're always going to ignore the first notification - m_firstScriptChangeNotificiation = true; - return; - } - auto pLog = g_fw.get< Logger >(); + Watchdog::watchMany( pConfig->getValue< std::string >( "Scripts.Path", "./compiledscripts/" ) + "*" + + m_nativeScriptMgr->getModuleExtension(), + [ this ]( const std::vector< ci::fs::path >& paths ) + { + if( !m_firstScriptChangeNotificiation ) + { + // for whatever reason, the first time this runs, it detects every file as changed + // so we're always going to ignore the first notification + m_firstScriptChangeNotificiation = true; + return; + } + auto pLog = g_fw.get< Logger >(); - for( auto path : paths ) - { - if( m_nativeScriptMgr->isModuleLoaded( path.stem().string() ) ) - { - pLog->debug( "Reloading changed script: " + path.stem().string() ); + for( auto path : paths ) + { + if( m_nativeScriptMgr->isModuleLoaded( path.stem().string() ) ) + { + pLog->debug( "Reloading changed script: " + path.stem().string() ); - m_nativeScriptMgr->queueScriptReload( path.stem( ).string( )); - } - else - { - pLog->debug( "Loading new script: " + path.stem().string() ); + m_nativeScriptMgr->queueScriptReload( path.stem().string() ); + } + else + { + pLog->debug( "Loading new script: " + path.stem().string() ); - m_nativeScriptMgr->loadScript( path.string() ); - } - } - }); + m_nativeScriptMgr->loadScript( path.string() ); + } + } + } ); } -bool Core::Scripting::ScriptMgr::loadDir( const std::string& dirname, std::set& files, const std::string& ext ) +bool Core::Scripting::ScriptMgr::loadDir( const std::string& dirname, std::set< std::string >& files, + const std::string& ext ) { - auto pLog = g_fw.get< Logger >(); - pLog->info( "ScriptMgr: loading scripts from " + dirname ); + auto pLog = g_fw.get< Logger >(); + pLog->info( "ScriptMgr: loading scripts from " + dirname ); - if( !boost::filesystem::exists( dirname ) ) - { - pLog->error( "ScriptMgr: scripts directory doesn't exist" ); - return false; - } + if( !boost::filesystem::exists( dirname ) ) + { + pLog->error( "ScriptMgr: scripts directory doesn't exist" ); + return false; + } - boost::filesystem::path targetDir( dirname ); + boost::filesystem::path targetDir( dirname ); - boost::filesystem::directory_iterator iter( targetDir ); - boost::filesystem::directory_iterator eod; + boost::filesystem::directory_iterator iter( targetDir ); + boost::filesystem::directory_iterator eod; - BOOST_FOREACH( boost::filesystem::path const& i, make_pair( iter, eod ) ) - { - if( is_regular_file( i ) && boost::filesystem::extension( i.string() ) == ext ) - { - files.insert( i.string() ); - } - } + BOOST_FOREACH( boost::filesystem::path const& i, make_pair( iter, eod ) ) + { + if( is_regular_file( i ) && boost::filesystem::extension( i.string() ) == ext ) + { + files.insert( i.string() ); + } + } - if( files.size() ) - return true; - else - { - pLog->error( "ScriptMgr: couldn't find any script modules" ); - return false; - } + if( files.size() ) + return true; + else + { + pLog->error( "ScriptMgr: couldn't find any script modules" ); + return false; + } } void Core::Scripting::ScriptMgr::onPlayerFirstEnterWorld( Entity::Player& player ) @@ -170,244 +174,245 @@ void Core::Scripting::ScriptMgr::onPlayerFirstEnterWorld( Entity::Player& player bool Core::Scripting::ScriptMgr::onTalk( Entity::Player& player, uint64_t actorId, uint32_t eventId ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint16_t eventType = eventId >> 16; - uint32_t scriptId = eventId; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + uint16_t eventType = eventId >> 16; + uint32_t scriptId = eventId; - // todo: replace this shit with something more flexible allowing for handlers for an entire type without a bunch of if statements - // aethernet/aetherytes need to be handled separately - if( eventType == Event::EventHandler::EventHandlerType::Aetheryte ) - { - auto aetherInfo = pExdData->get< Core::Data::Aetheryte >( eventId & 0xFFFF ); - scriptId = EVENTSCRIPT_AETHERYTE_ID; - if( !aetherInfo->isAetheryte ) - scriptId = EVENTSCRIPT_AETHERNET_ID; - } - else if( eventType == Event::EventHandler::EventHandlerType::Shop ) - { - scriptId = 0x00040001; - } + // todo: replace this shit with something more flexible allowing for handlers for an entire type without a bunch of if statements + // aethernet/aetherytes need to be handled separately + if( eventType == Event::EventHandler::EventHandlerType::Aetheryte ) + { + auto aetherInfo = pExdData->get< Core::Data::Aetheryte >( eventId & 0xFFFF ); + scriptId = EVENTSCRIPT_AETHERYTE_ID; + if( !aetherInfo->isAetheryte ) + scriptId = EVENTSCRIPT_AETHERNET_ID; + } + else if( eventType == Event::EventHandler::EventHandlerType::Shop ) + { + scriptId = 0x00040001; + } - auto script = m_nativeScriptMgr->getScript< EventScript >( scriptId ); - if( !script ) - return false; - script->onTalk( eventId, player, actorId ); - return true; + auto script = m_nativeScriptMgr->getScript< EventScript >( scriptId ); + if( !script ) + return false; + script->onTalk( eventId, player, actorId ); + return true; } bool Core::Scripting::ScriptMgr::onEnterTerritory( Entity::Player& player, uint32_t eventId, - uint16_t param1, uint16_t param2 ) + uint16_t param1, uint16_t param2 ) { - auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); - if( !script ) - return false; - script->onEnterTerritory( player, eventId, param1, param2 ); - return true; + auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); + if( !script ) + return false; + script->onEnterTerritory( player, eventId, param1, param2 ); + return true; } bool Core::Scripting::ScriptMgr::onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, - float x, float y, float z ) + float x, float y, float z ) { - auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); - if( !script ) - return false; - script->onWithinRange( player, eventId, param1, x, y, z ); - return true; + auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); + if( !script ) + return false; + script->onWithinRange( player, eventId, param1, x, y, z ); + return true; } bool Core::Scripting::ScriptMgr::onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, - float x, float y, float z ) + float x, float y, float z ) { - auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); - if( !script ) - return false; - script->onOutsideRange( player, eventId, param1, x, y, z ); - return true; + auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); + if( !script ) + return false; + script->onOutsideRange( player, eventId, param1, x, y, z ); + return true; } bool Core::Scripting::ScriptMgr::onEmote( Entity::Player& player, uint64_t actorId, - uint32_t eventId, uint8_t emoteId ) + uint32_t eventId, uint8_t emoteId ) { - auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); - if( !script ) - return false; - script->onEmote( actorId, eventId, emoteId, player ); - return true; + auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); + if( !script ) + return false; + script->onEmote( actorId, eventId, emoteId, player ); + return true; } bool Core::Scripting::ScriptMgr::onEventHandlerReturn( Entity::Player& player, uint32_t eventId, - uint16_t subEvent, uint16_t param1, uint16_t param2, - uint16_t param3 ) + uint16_t subEvent, uint16_t param1, uint16_t param2, + uint16_t param3 ) { - return false; + return false; } bool Core::Scripting::ScriptMgr::onEventHandlerTradeReturn( Entity::Player& player, uint32_t eventId, - uint16_t subEvent, uint16_t param, uint32_t catalogId ) + uint16_t subEvent, uint16_t param, uint32_t catalogId ) { - auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); - if( script ) - { - script->onEventHandlerTradeReturn( player, eventId, subEvent, param, catalogId ); - return true; - } + auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); + if( script ) + { + script->onEventHandlerTradeReturn( player, eventId, subEvent, param, catalogId ); + return true; + } - return false; + return false; } bool Core::Scripting::ScriptMgr::onEventItem( Entity::Player& player, uint32_t eventItemId, - uint32_t eventId, uint32_t castTime, uint64_t targetId ) + uint32_t eventId, uint32_t castTime, uint64_t targetId ) { - std::string eventName = "onEventItem"; - std::string objName = Event::getEventName( eventId ); - player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) ); + std::string eventName = "onEventItem"; + std::string objName = Event::getEventName( eventId ); + player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) ); - auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); - if( script ) - { - player.eventStart( targetId, eventId, Event::EventHandler::Item, 0, 0 ); + auto script = m_nativeScriptMgr->getScript< EventScript >( eventId ); + if( script ) + { + player.eventStart( targetId, eventId, Event::EventHandler::Item, 0, 0 ); - script->onEventItem( player, eventItemId, eventId, castTime, targetId ); - return true; - } + script->onEventItem( player, eventItemId, eventId, castTime, targetId ); + return true; + } - return false; + return false; } bool Core::Scripting::ScriptMgr::onMobKill( Entity::Player& player, uint16_t nameId ) { - std::string eventName = "onBnpcKill_" + std::to_string( nameId ); + std::string eventName = "onBnpcKill_" + std::to_string( nameId ); - // loop through all active quests and try to call available onMobKill callbacks - for( size_t i = 0; i < 30; i++ ) - { - auto activeQuests = player.getQuestActive( static_cast< uint16_t >( i ) ); - if( !activeQuests ) - continue; + // loop through all active quests and try to call available onMobKill callbacks + for( size_t i = 0; i < 30; i++ ) + { + auto activeQuests = player.getQuestActive( static_cast< uint16_t >( i ) ); + if( !activeQuests ) + continue; - uint16_t questId = activeQuests->c.questId; + uint16_t questId = activeQuests->c.questId; - auto script = m_nativeScriptMgr->getScript< EventScript >( questId ); - if( script ) - { - std::string objName = Event::getEventName( 0x00010000 | questId ); + auto script = m_nativeScriptMgr->getScript< EventScript >( questId ); + if( script ) + { + std::string objName = Event::getEventName( 0x00010000 | questId ); - player.sendDebug("Calling: " + objName + "." + eventName); + player.sendDebug( "Calling: " + objName + "." + eventName ); - script->onNpcKill( nameId, player ); - } - } + script->onNpcKill( nameId, player ); + } + } - return true; + return true; } bool Core::Scripting::ScriptMgr::onCastFinish( Entity::Player& player, Entity::CharaPtr pTarget, uint32_t actionId ) { - auto script = m_nativeScriptMgr->getScript< ActionScript >( actionId ); + auto script = m_nativeScriptMgr->getScript< ActionScript >( actionId ); - if( script ) - script->onCastFinish( player, *pTarget ); - return true; + if( script ) + script->onCastFinish( player, *pTarget ); + return true; } bool Core::Scripting::ScriptMgr::onStatusReceive( Entity::CharaPtr pActor, uint32_t effectId ) { - auto script = m_nativeScriptMgr->getScript< StatusEffectScript >( effectId ); + auto script = m_nativeScriptMgr->getScript< StatusEffectScript >( effectId ); - if( script ) - { - if( pActor->isPlayer() ) - pActor->getAsPlayer()->sendDebug( "Calling status receive for statusid: " + std::to_string( effectId ) ); + if( script ) + { + if( pActor->isPlayer() ) + pActor->getAsPlayer()->sendDebug( "Calling status receive for statusid: " + std::to_string( effectId ) ); - script->onApply( *pActor ); - return true; - } + script->onApply( *pActor ); + return true; + } - return false; + return false; } bool Core::Scripting::ScriptMgr::onStatusTick( Entity::CharaPtr pChara, Core::StatusEffect::StatusEffect& effect ) { - auto script = m_nativeScriptMgr->getScript< StatusEffectScript >( effect.getId() ); - if( script ) - { - if( pChara->isPlayer() ) - pChara->getAsPlayer()->sendDebug( "Calling status tick for statusid: " + std::to_string( effect.getId() ) ); + auto script = m_nativeScriptMgr->getScript< StatusEffectScript >( effect.getId() ); + if( script ) + { + if( pChara->isPlayer() ) + pChara->getAsPlayer()->sendDebug( "Calling status tick for statusid: " + std::to_string( effect.getId() ) ); - script->onTick( *pChara ); - return true; - } + script->onTick( *pChara ); + return true; + } - return false; + return false; } bool Core::Scripting::ScriptMgr::onStatusTimeOut( Entity::CharaPtr pChara, uint32_t effectId ) { - auto script = m_nativeScriptMgr->getScript< StatusEffectScript >( effectId ); - if( script ) - { - if( pChara->isPlayer() ) - pChara->getAsPlayer()->sendDebug( "Calling status timeout for statusid: " + std::to_string( effectId ) ); + auto script = m_nativeScriptMgr->getScript< StatusEffectScript >( effectId ); + if( script ) + { + if( pChara->isPlayer() ) + pChara->getAsPlayer()->sendDebug( "Calling status timeout for statusid: " + std::to_string( effectId ) ); - script->onExpire( *pChara ); - return true; - } + script->onExpire( *pChara ); + return true; + } - return false; + return false; } bool Core::Scripting::ScriptMgr::onZoneInit( ZonePtr pZone ) { - auto script = m_nativeScriptMgr->getScript< ZoneScript >( pZone->getTerritoryId() ); - if( script ) - { - script->onZoneInit(); - return true; - } + auto script = m_nativeScriptMgr->getScript< ZoneScript >( pZone->getTerritoryId() ); + if( script ) + { + script->onZoneInit(); + return true; + } - return false; + return false; } bool Core::Scripting::ScriptMgr::onInstanceInit( InstanceContentPtr instance ) { - auto script = m_nativeScriptMgr->getScript< InstanceContentScript >( instance->getDirectorId() ); - if( script ) - { - script->onInit( instance ); - return true; - } + auto script = m_nativeScriptMgr->getScript< InstanceContentScript >( instance->getDirectorId() ); + if( script ) + { + script->onInit( instance ); + return true; + } - return false; + return false; } bool Core::Scripting::ScriptMgr::onInstanceUpdate( InstanceContentPtr instance, uint32_t currTime ) { - auto script = m_nativeScriptMgr->getScript< InstanceContentScript >( instance->getDirectorId() ); + auto script = m_nativeScriptMgr->getScript< InstanceContentScript >( instance->getDirectorId() ); - if( script ) - { - script->onUpdate( instance, currTime ); - return true; - } + if( script ) + { + script->onUpdate( instance, currTime ); + return true; + } - return false; + return false; } -bool Core::Scripting::ScriptMgr::onInstanceEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) +bool Core::Scripting::ScriptMgr::onInstanceEnterTerritory( InstanceContentPtr instance, Entity::Player& player, + uint32_t eventId, uint16_t param1, uint16_t param2 ) { - auto script = m_nativeScriptMgr->getScript< InstanceContentScript >( instance->getDirectorId() ); - if( script ) - { - script->onEnterTerritory( instance, player, eventId, param1, param2 ); - return true; - } + auto script = m_nativeScriptMgr->getScript< InstanceContentScript >( instance->getDirectorId() ); + if( script ) + { + script->onEnterTerritory( instance, player, eventId, param1, param2 ); + return true; + } - return false; + return false; } Scripting::NativeScriptMgr& Core::Scripting::ScriptMgr::getNativeScriptHandler() { - return *m_nativeScriptMgr; + return *m_nativeScriptMgr; } diff --git a/src/servers/sapphire_zone/Script/ScriptMgr.h b/src/servers/sapphire_zone/Script/ScriptMgr.h index e165c517..885a7221 100644 --- a/src/servers/sapphire_zone/Script/ScriptMgr.h +++ b/src/servers/sapphire_zone/Script/ScriptMgr.h @@ -8,81 +8,95 @@ #include #include "Forwards.h" -namespace Core +namespace Core { +namespace Scripting { + +class ScriptMgr { - namespace Scripting - { +private: + /*! + * @brief A shared ptr to NativeScriptMgr, used for accessing and managing the native script system. + */ + boost::shared_ptr< NativeScriptMgr > m_nativeScriptMgr; - class ScriptMgr - { - private: - /*! - * @brief A shared ptr to NativeScriptMgr, used for accessing and managing the native script system. - */ - boost::shared_ptr< NativeScriptMgr > m_nativeScriptMgr; + std::function< std::string( Entity::Player & ) > m_onFirstEnterWorld; - std::function< std::string( Entity::Player& ) > m_onFirstEnterWorld; + /*! + * @brief Used to ignore the first change notification that Watchdog emits. + * Because reasons, it likes to emit an initial notification with all the files that match the filter, we don't want that so we ignore it. + */ + bool m_firstScriptChangeNotificiation; - /*! - * @brief Used to ignore the first change notification that Watchdog emits. - * Because reasons, it likes to emit an initial notification with all the files that match the filter, we don't want that so we ignore it. - */ - bool m_firstScriptChangeNotificiation; +public: + ScriptMgr(); - public: - ScriptMgr(); - ~ScriptMgr(); + ~ScriptMgr(); - /*! - * @brief Loads all the script modules and readies the ScriptMgr - * - * This gets all the modules inside the specified scripts folder and then attempts to load each one. - * After that, it starts the directory watcher so the server can reload modules at runtime when changes occur. - * - * @return true if init success - */ - bool init(); + /*! + * @brief Loads all the script modules and readies the ScriptMgr + * + * This gets all the modules inside the specified scripts folder and then attempts to load each one. + * After that, it starts the directory watcher so the server can reload modules at runtime when changes occur. + * + * @return true if init success + */ + bool init(); - /*! - * @brief Called on each tick or at a regular interval. Allows for the NativeScriptMgr to process module loading and reloading. - */ - void update(); + /*! + * @brief Called on each tick or at a regular interval. Allows for the NativeScriptMgr to process module loading and reloading. + */ + void update(); - /*! - * @brief Registers a directory watcher which allows for script modules to be reloaded when changes to the modules occur - */ - void watchDirectories(); + /*! + * @brief Registers a directory watcher which allows for script modules to be reloaded when changes to the modules occur + */ + void watchDirectories(); - void onPlayerFirstEnterWorld( Entity::Player& player ); + void onPlayerFirstEnterWorld( Entity::Player& player ); - bool onTalk( Entity::Player& player, uint64_t actorId, uint32_t eventId ); - bool onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ); - bool onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ); - bool onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ); - bool onEmote( Entity::Player& player, uint64_t actorId, uint32_t eventId, uint8_t emoteId ); - bool onEventItem( Entity::Player& player, uint32_t eventItemId, uint32_t eventId, uint32_t castTime, uint64_t targetId ); + bool onTalk( Entity::Player& player, uint64_t actorId, uint32_t eventId ); - bool onMobKill( Entity::Player& player, uint16_t nameId ); + bool onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ); - bool onCastFinish( Entity::Player& pPlayer, Entity::CharaPtr pTarget, uint32_t actionId ); + bool onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ); - bool onStatusReceive( Entity::CharaPtr pActor, uint32_t effectId ); - bool onStatusTick( Entity::CharaPtr pActor, Core::StatusEffect::StatusEffect& effect ); - bool onStatusTimeOut( Entity::CharaPtr pActor, uint32_t effectId ); + bool onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ); - bool onZoneInit( ZonePtr pZone ); + bool onEmote( Entity::Player& player, uint64_t actorId, uint32_t eventId, uint8_t emoteId ); - bool onEventHandlerReturn( Entity::Player& player, uint32_t eventId, uint16_t subEvent, uint16_t param1, uint16_t param2, uint16_t param3 ); - bool onEventHandlerTradeReturn( Entity::Player& player, uint32_t eventId, uint16_t subEvent, uint16_t param, uint32_t catalogId ); + bool onEventItem( Entity::Player& player, uint32_t eventItemId, uint32_t eventId, uint32_t castTime, + uint64_t targetId ); - bool onInstanceInit( InstanceContentPtr instance ); - bool onInstanceUpdate( InstanceContentPtr instance, uint32_t currTime ); - bool onInstanceEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ); + bool onMobKill( Entity::Player& player, uint16_t nameId ); - bool loadDir( const std::string& dirname, std::set &files, const std::string& ext ); + bool onCastFinish( Entity::Player& pPlayer, Entity::CharaPtr pTarget, uint32_t actionId ); - NativeScriptMgr& getNativeScriptHandler(); - }; - } + bool onStatusReceive( Entity::CharaPtr pActor, uint32_t effectId ); + + bool onStatusTick( Entity::CharaPtr pActor, Core::StatusEffect::StatusEffect& effect ); + + bool onStatusTimeOut( Entity::CharaPtr pActor, uint32_t effectId ); + + bool onZoneInit( ZonePtr pZone ); + + bool onEventHandlerReturn( Entity::Player& player, uint32_t eventId, uint16_t subEvent, uint16_t param1, + uint16_t param2, uint16_t param3 ); + + bool onEventHandlerTradeReturn( Entity::Player& player, uint32_t eventId, uint16_t subEvent, uint16_t param, + uint32_t catalogId ); + + bool onInstanceInit( InstanceContentPtr instance ); + + bool onInstanceUpdate( InstanceContentPtr instance, uint32_t currTime ); + + bool + onInstanceEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1, + uint16_t param2 ); + + bool loadDir( const std::string& dirname, std::set< std::string >& files, const std::string& ext ); + + NativeScriptMgr& getNativeScriptHandler(); +}; +} } #endif diff --git a/src/servers/sapphire_zone/ServerZone.cpp b/src/servers/sapphire_zone/ServerZone.cpp index a63a9fff..926d64d9 100644 --- a/src/servers/sapphire_zone/ServerZone.cpp +++ b/src/servers/sapphire_zone/ServerZone.cpp @@ -38,9 +38,9 @@ extern Core::Framework g_fw; Core::ServerZone::ServerZone( const std::string& configName ) : - m_configName( configName ), - m_bRunning( true ), - m_lastDBPingTime( 0 ) + m_configName( configName ), + m_bRunning( true ), + m_lastDBPingTime( 0 ) { } @@ -50,314 +50,314 @@ Core::ServerZone::~ServerZone() size_t Core::ServerZone::getSessionCount() const { - return m_sessionMapById.size(); + return m_sessionMapById.size(); } bool Core::ServerZone::loadSettings( int32_t argc, char* argv[] ) { - auto pLog = g_fw.get< Core::Logger >(); - auto pConfig = g_fw.get< Core::ConfigMgr >(); - auto pExd = g_fw.get< Data::ExdDataGenerated >(); - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pLog = g_fw.get< Core::Logger >(); + auto pConfig = g_fw.get< Core::ConfigMgr >(); + auto pExd = g_fw.get< Data::ExdDataGenerated >(); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - pLog->info( "Loading config " + m_configName ); + pLog->info( "Loading config " + m_configName ); - if( !pConfig->loadConfig( m_configName ) ) - { - pLog->fatal( "Error loading config " + m_configName ); - return false; - } + if( !pConfig->loadConfig( m_configName ) ) + { + pLog->fatal( "Error loading config " + m_configName ); + return false; + } - std::vector< std::string > args( argv + 1, argv + argc ); - for( uint32_t i = 0; i + 1 < args.size(); i += 2 ) - { - std::string arg( "" ); - std::string val( "" ); + std::vector< std::string > args( argv + 1, argv + argc ); + for( uint32_t i = 0; i + 1 < args.size(); i += 2 ) + { + std::string arg( "" ); + std::string val( "" ); - try + try + { + arg = boost::to_lower_copy( std::string( args[ i ] ) ); + val = std::string( args[ i + 1 ] ); + + // trim '-' from start of arg + arg = arg.erase( 0, arg.find_first_not_of( '-' ) ); + + if( arg == "ip" ) { - arg = boost::to_lower_copy( std::string( args[i] ) ); - val = std::string( args[i + 1] ); - - // trim '-' from start of arg - arg = arg.erase( 0, arg.find_first_not_of( '-' ) ); - - if( arg == "ip" ) - { - // todo: ip addr in config - pConfig->setValue< std::string >( "ZoneNetwork.ListenIp", val ); - } - else if( arg == "p" || arg == "port" ) - { - pConfig->setValue< std::string >( "ZoneNetwork.ListenPort", val ); - } - else if( arg == "exdpath" || arg == "datapath" ) - { - pConfig->setValue< std::string >( "GlobalParameters.DataPath", val ); - } - else if( arg == "h" || arg == "dbhost" ) - { - pConfig->setValue< std::string >( "Database.Host", val ); - } - else if( arg == "dbport" ) - { - pConfig->setValue< std::string >( "Database.Port", val ); - } - else if( arg == "u" || arg == "user" || arg == "dbuser" ) - { - pConfig->setValue< std::string >( "Database.Username", val ); - } - else if( arg == "pass" || arg == "dbpass" ) - { - pConfig->setValue< std::string >( "Database.Password", val ); - } - else if( arg == "d" || arg == "db" || arg == "database" ) - { - pConfig->setValue< std::string >( "Database.Database", val ); - } + // todo: ip addr in config + pConfig->setValue< std::string >( "ZoneNetwork.ListenIp", val ); } - catch( ... ) + else if( arg == "p" || arg == "port" ) { - pLog->error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); - pLog->error( "Usage: \n" ); + pConfig->setValue< std::string >( "ZoneNetwork.ListenPort", val ); } - } + else if( arg == "exdpath" || arg == "datapath" ) + { + pConfig->setValue< std::string >( "GlobalParameters.DataPath", val ); + } + else if( arg == "h" || arg == "dbhost" ) + { + pConfig->setValue< std::string >( "Database.Host", val ); + } + else if( arg == "dbport" ) + { + pConfig->setValue< std::string >( "Database.Port", val ); + } + else if( arg == "u" || arg == "user" || arg == "dbuser" ) + { + pConfig->setValue< std::string >( "Database.Username", val ); + } + else if( arg == "pass" || arg == "dbpass" ) + { + pConfig->setValue< std::string >( "Database.Password", val ); + } + else if( arg == "d" || arg == "db" || arg == "database" ) + { + pConfig->setValue< std::string >( "Database.Database", val ); + } + } + catch( ... ) + { + pLog->error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); + pLog->error( "Usage: \n" ); + } + } - pLog->info( "Setting up generated EXD data" ); - if( !pExd->init( pConfig->getValue< std::string >( "GlobalParameters.DataPath", "" ) ) ) - { - pLog->fatal( "Error setting up generated EXD data " ); - return false; - } + pLog->info( "Setting up generated EXD data" ); + if( !pExd->init( pConfig->getValue< std::string >( "GlobalParameters.DataPath", "" ) ) ) + { + pLog->fatal( "Error setting up generated EXD data " ); + return false; + } - Core::Db::DbLoader loader; + Core::Db::DbLoader loader; - Core::Db::ConnectionInfo info; - info.password = pConfig->getValue< std::string >( "Database.Password", "" ); - info.host = pConfig->getValue< std::string >( "Database.Host", "127.0.0.1" ); - info.database = pConfig->getValue< std::string >( "Database.Database", "sapphire" ); - info.port = pConfig->getValue< uint16_t >( "Database.Port", 3306 ); - info.user = pConfig->getValue< std::string >( "Database.Username", "root" ); - info.syncThreads = pConfig->getValue< uint8_t >( "Database.SyncThreads", 2 ); - info.asyncThreads = pConfig->getValue< uint8_t >( "Database.AsyncThreads", 2 ); + Core::Db::ConnectionInfo info; + info.password = pConfig->getValue< std::string >( "Database.Password", "" ); + info.host = pConfig->getValue< std::string >( "Database.Host", "127.0.0.1" ); + info.database = pConfig->getValue< std::string >( "Database.Database", "sapphire" ); + info.port = pConfig->getValue< uint16_t >( "Database.Port", 3306 ); + info.user = pConfig->getValue< std::string >( "Database.Username", "root" ); + info.syncThreads = pConfig->getValue< uint8_t >( "Database.SyncThreads", 2 ); + info.asyncThreads = pConfig->getValue< uint8_t >( "Database.AsyncThreads", 2 ); - loader.addDb( *pDb, info ); - if( !loader.initDbs() ) - return false; + loader.addDb( *pDb, info ); + if( !loader.initDbs() ) + return false; - m_port = pConfig->getValue< uint16_t >( "ZoneNetwork.ListenPort", 54992 ); - m_ip = pConfig->getValue< std::string >( "ZoneNetwork.ListenIp", "0.0.0.0" ); + m_port = pConfig->getValue< uint16_t >( "ZoneNetwork.ListenPort", 54992 ); + m_ip = pConfig->getValue< std::string >( "ZoneNetwork.ListenIp", "0.0.0.0" ); - return true; + return true; } void Core::ServerZone::run( int32_t argc, char* argv[] ) { - auto pLog = g_fw.get< Core::Logger >(); - auto pScript = g_fw.get< Scripting::ScriptMgr >(); - auto pLsMgr = g_fw.get< LinkshellMgr >(); - auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pLog = g_fw.get< Core::Logger >(); + auto pScript = g_fw.get< Scripting::ScriptMgr >(); + auto pLsMgr = g_fw.get< LinkshellMgr >(); + auto pTeriMgr = g_fw.get< TerritoryMgr >(); - printBanner(); + printBanner(); - if( !loadSettings( argc, argv ) ) - { - pLog->fatal( "Unable to load settings!" ); - return; - } + if( !loadSettings( argc, argv ) ) + { + pLog->fatal( "Unable to load settings!" ); + return; + } - pLog->info( "LinkshellMgr: Caching linkshells" ); - if( !pLsMgr->loadLinkshells() ) - { - pLog->fatal( "Unable to load linkshells!" ); - return; - } + pLog->info( "LinkshellMgr: Caching linkshells" ); + if( !pLsMgr->loadLinkshells() ) + { + pLog->fatal( "Unable to load linkshells!" ); + return; + } - Network::HivePtr hive( new Network::Hive() ); - Network::addServerToHive< Network::GameConnection >( m_ip, m_port, hive ); + Network::HivePtr hive( new Network::Hive() ); + Network::addServerToHive< Network::GameConnection >( m_ip, m_port, hive ); - pScript->init(); + pScript->init(); - pLog->info( "TerritoryMgr: Setting up zones" ); - pTeriMgr->init(); + pLog->info( "TerritoryMgr: Setting up zones" ); + pTeriMgr->init(); - std::vector< std::thread > thread_list; - thread_list.emplace_back( std::thread( std::bind( &Network::Hive::Run, hive.get() ) ) ); + std::vector< std::thread > thread_list; + thread_list.emplace_back( std::thread( std::bind( &Network::Hive::Run, hive.get() ) ) ); - pLog->info( "Zone server running on " + m_ip + ":" + std::to_string( m_port ) ); + pLog->info( "Zone server running on " + m_ip + ":" + std::to_string( m_port ) ); - mainLoop(); + mainLoop(); - for( auto& thread_entry : thread_list ) - { - thread_entry.join(); - } + for( auto& thread_entry : thread_list ) + { + thread_entry.join(); + } } void Core::ServerZone::printBanner() const { - auto pLog = g_fw.get< Core::Logger >(); + auto pLog = g_fw.get< Core::Logger >(); - pLog->info("===========================================================" ); - pLog->info( "Sapphire Server Project " ); - pLog->info( "Version: " + Version::VERSION ); - pLog->info( "Git Hash: " + Version::GIT_HASH ); - pLog->info( "Compiled: " __DATE__ " " __TIME__ ); - pLog->info( "===========================================================" ); + pLog->info( "===========================================================" ); + pLog->info( "Sapphire Server Project " ); + pLog->info( "Version: " + Version::VERSION ); + pLog->info( "Git Hash: " + Version::GIT_HASH ); + pLog->info( "Compiled: " __DATE__ " " __TIME__ ); + pLog->info( "===========================================================" ); } void Core::ServerZone::mainLoop() { - auto pLog = g_fw.get< Logger >(); - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pLog = g_fw.get< Logger >(); + auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - while( isRunning() ) - { - this_thread::sleep_for( chrono::milliseconds( 50 ) ); + while( isRunning() ) + { + this_thread::sleep_for( chrono::milliseconds( 50 ) ); - auto currTime = Util::getTimeSeconds(); + auto currTime = Util::getTimeSeconds(); - pTeriMgr->updateTerritoryInstances( currTime ); + pTeriMgr->updateTerritoryInstances( currTime ); - pScriptMgr->update(); + pScriptMgr->update(); - lock_guard< std::mutex > lock( this->m_sessionMutex ); - for( auto sessionIt : this->m_sessionMapById ) + lock_guard< std::mutex > lock( this->m_sessionMutex ); + for( auto sessionIt : this->m_sessionMapById ) + { + auto session = sessionIt.second; + if( session && session->getPlayer() ) { - auto session = sessionIt.second; - if( session && session->getPlayer() ) - { - // if the player is in a zone, let the zone handler take care of his updates - // else do it here. - if( !session->getPlayer()->getCurrentZone() ) - session->update(); - - } - } - - if( currTime - m_lastDBPingTime > 3 ) - { - pDb->keepAlive(); - m_lastDBPingTime = currTime; - } - - - auto it = this->m_sessionMapById.begin(); - for( ; it != this->m_sessionMapById.end(); ) - { - auto diff = std::difftime( currTime, it->second->getLastDataTime() ); - - auto pPlayer = it->second->getPlayer(); - - // remove session of players marked for removel ( logoff / kick ) - if( pPlayer->isMarkedForRemoval() && diff > 5 ) - { - it->second->close(); - // if( it->second.unique() ) - { - pLog->info("[" + std::to_string(it->second->getId() ) + "] Session removal" ); - it = this->m_sessionMapById.erase( it ); - removeSession( pPlayer->getName() ); - continue; - } - } - - // remove sessions that simply timed out - if( diff > 20 ) - { - pLog->info("[" + std::to_string( it->second->getId() ) + "] Session time out" ); - - it->second->close(); - // if( it->second.unique() ) - { - it = this->m_sessionMapById.erase( it ); - removeSession( pPlayer->getName() ); - } - } - else - { - ++it; - } + // if the player is in a zone, let the zone handler take care of his updates + // else do it here. + if( !session->getPlayer()->getCurrentZone() ) + session->update(); } + } - } + if( currTime - m_lastDBPingTime > 3 ) + { + pDb->keepAlive(); + m_lastDBPingTime = currTime; + } + + + auto it = this->m_sessionMapById.begin(); + for( ; it != this->m_sessionMapById.end(); ) + { + auto diff = std::difftime( currTime, it->second->getLastDataTime() ); + + auto pPlayer = it->second->getPlayer(); + + // remove session of players marked for removel ( logoff / kick ) + if( pPlayer->isMarkedForRemoval() && diff > 5 ) + { + it->second->close(); + // if( it->second.unique() ) + { + pLog->info( "[" + std::to_string( it->second->getId() ) + "] Session removal" ); + it = this->m_sessionMapById.erase( it ); + removeSession( pPlayer->getName() ); + continue; + } + } + + // remove sessions that simply timed out + if( diff > 20 ) + { + pLog->info( "[" + std::to_string( it->second->getId() ) + "] Session time out" ); + + it->second->close(); + // if( it->second.unique() ) + { + it = this->m_sessionMapById.erase( it ); + removeSession( pPlayer->getName() ); + } + } + else + { + ++it; + } + + } + + } } bool Core::ServerZone::createSession( uint32_t sessionId ) { - auto pLog = g_fw.get< Core::Logger>(); + auto pLog = g_fw.get< Core::Logger >(); - std::lock_guard< std::mutex > lock( m_sessionMutex ); + std::lock_guard< std::mutex > lock( m_sessionMutex ); - const std::string session_id_str = std::to_string( sessionId ); + const std::string session_id_str = std::to_string( sessionId ); - auto it = m_sessionMapById.find( sessionId ); + auto it = m_sessionMapById.find( sessionId ); - if( it != m_sessionMapById.end() ) - { - pLog->error( "[" + session_id_str + "] Error creating session" ); - return false; - } + if( it != m_sessionMapById.end() ) + { + pLog->error( "[" + session_id_str + "] Error creating session" ); + return false; + } - pLog->info( "[" + session_id_str + "] Creating new session" ); + pLog->info( "[" + session_id_str + "] Creating new session" ); - boost::shared_ptr newSession( new Session( sessionId ) ); - m_sessionMapById[sessionId] = newSession; + boost::shared_ptr< Session > newSession( new Session( sessionId ) ); + m_sessionMapById[ sessionId ] = newSession; - if( !newSession->loadPlayer() ) - { - pLog->error( "[" + session_id_str + "] Error loading player " + session_id_str ); - return false; - } + if( !newSession->loadPlayer() ) + { + pLog->error( "[" + session_id_str + "] Error loading player " + session_id_str ); + return false; + } - m_sessionMapByName[newSession->getPlayer()->getName()] = newSession; + m_sessionMapByName[ newSession->getPlayer()->getName() ] = newSession; - return true; + return true; } void Core::ServerZone::removeSession( uint32_t sessionId ) { - m_sessionMapById.erase( sessionId ); + m_sessionMapById.erase( sessionId ); } Core::SessionPtr Core::ServerZone::getSession( uint32_t id ) { - //std::lock_guard lock( m_sessionMutex ); + //std::lock_guard lock( m_sessionMutex ); - auto it = m_sessionMapById.find( id ); + auto it = m_sessionMapById.find( id ); - if( it != m_sessionMapById.end() ) - return ( it->second ); + if( it != m_sessionMapById.end() ) + return ( it->second ); - return nullptr; + return nullptr; } Core::SessionPtr Core::ServerZone::getSession( std::string playerName ) { - //std::lock_guard lock( m_sessionMutex ); + //std::lock_guard lock( m_sessionMutex ); - auto it = m_sessionMapByName.find( playerName ); + auto it = m_sessionMapByName.find( playerName ); - if (it != m_sessionMapByName.end()) - return (it->second); + if( it != m_sessionMapByName.end() ) + return ( it->second ); - return nullptr; + return nullptr; } void Core::ServerZone::removeSession( std::string playerName ) { - m_sessionMapByName.erase( playerName ); + m_sessionMapByName.erase( playerName ); } bool Core::ServerZone::isRunning() const { - return m_bRunning; + return m_bRunning; } diff --git a/src/servers/sapphire_zone/ServerZone.h b/src/servers/sapphire_zone/ServerZone.h index c28a94b7..7cd936dc 100644 --- a/src/servers/sapphire_zone/ServerZone.h +++ b/src/servers/sapphire_zone/ServerZone.h @@ -11,49 +11,53 @@ namespace Core { - class ServerZone - { - public: - ServerZone( const std::string& configName ); - ~ServerZone(); +class ServerZone +{ +public: + ServerZone( const std::string& configName ); - void run( int32_t argc, char* argv[] ); + ~ServerZone(); - bool createSession( uint32_t sessionId ); - void removeSession( uint32_t sessionId ); - void removeSession( std::string playerName ); + void run( int32_t argc, char* argv[] ); - bool loadSettings( int32_t argc, char* argv[] ); + bool createSession( uint32_t sessionId ); - SessionPtr getSession( uint32_t id ); - SessionPtr getSession( std::string playerName ); + void removeSession( uint32_t sessionId ); - size_t getSessionCount() const; + void removeSession( std::string playerName ); - void mainLoop(); + bool loadSettings( int32_t argc, char* argv[] ); - bool isRunning() const; + SessionPtr getSession( uint32_t id ); - void printBanner() const; + SessionPtr getSession( std::string playerName ); - private: + size_t getSessionCount() const; - uint16_t m_port; - std::string m_ip; - int64_t m_lastDBPingTime; + void mainLoop(); - bool m_bRunning; + bool isRunning() const; - std::string m_configName; + void printBanner() const; - std::mutex m_sessionMutex; +private: - std::map< uint32_t, SessionPtr > m_sessionMapById; - std::map< std::string, SessionPtr > m_sessionMapByName; + uint16_t m_port; + std::string m_ip; + int64_t m_lastDBPingTime; - std::map< uint32_t, uint32_t > m_zones; + bool m_bRunning; - }; + std::string m_configName; + + std::mutex m_sessionMutex; + + std::map< uint32_t, SessionPtr > m_sessionMapById; + std::map< std::string, SessionPtr > m_sessionMapByName; + + std::map< uint32_t, uint32_t > m_zones; + +}; } diff --git a/src/servers/sapphire_zone/Session.cpp b/src/servers/sapphire_zone/Session.cpp index a676f158..642f8bb2 100644 --- a/src/servers/sapphire_zone/Session.cpp +++ b/src/servers/sapphire_zone/Session.cpp @@ -15,10 +15,10 @@ extern Core::Framework g_fw; Core::Session::Session( uint32_t sessionId ) : - m_sessionId( sessionId ), - m_lastDataTime( Util::getTimeSeconds() ), - m_lastSqlTime( Util::getTimeSeconds() ), - m_isValid( false ) + m_sessionId( sessionId ), + m_lastDataTime( Util::getTimeSeconds() ), + m_lastSqlTime( Util::getTimeSeconds() ), + m_isValid( false ) { } @@ -28,201 +28,201 @@ Core::Session::~Session() void Core::Session::setZoneConnection( Network::GameConnectionPtr pZoneCon ) { - pZoneCon->m_conType = Network::ConnectionType::Zone; - m_pZoneConnection = pZoneCon; + pZoneCon->m_conType = Network::ConnectionType::Zone; + m_pZoneConnection = pZoneCon; } void Core::Session::setChatConnection( Network::GameConnectionPtr pChatCon ) { - pChatCon->m_conType = Network::ConnectionType::Chat; - m_pChatConnection = pChatCon; + pChatCon->m_conType = Network::ConnectionType::Chat; + m_pChatConnection = pChatCon; } Core::Network::GameConnectionPtr Core::Session::getZoneConnection() const { - return m_pZoneConnection; + return m_pZoneConnection; } Core::Network::GameConnectionPtr Core::Session::getChatConnection() const { - return m_pChatConnection; + return m_pChatConnection; } bool Core::Session::loadPlayer() { - m_pPlayer = Entity::make_Player(); + m_pPlayer = Entity::make_Player(); - if( !m_pPlayer->load( m_sessionId, shared_from_this() ) ) - { - m_isValid = false; - return false; - } - - m_isValid = true; + if( !m_pPlayer->load( m_sessionId, shared_from_this() ) ) + { + m_isValid = false; + return false; + } - return true; + m_isValid = true; + + return true; } void Core::Session::close() { - if( m_pZoneConnection ) - m_pZoneConnection->Disconnect(); + if( m_pZoneConnection ) + m_pZoneConnection->Disconnect(); - if( m_pChatConnection ) - m_pChatConnection->Disconnect(); + if( m_pChatConnection ) + m_pChatConnection->Disconnect(); - // remove the session from the player - if( m_pPlayer ) - // reset the zone, so the zone handler knows to remove the actor - m_pPlayer->setCurrentZone( nullptr ); + // remove the session from the player + if( m_pPlayer ) + // reset the zone, so the zone handler knows to remove the actor + m_pPlayer->setCurrentZone( nullptr ); } uint32_t Core::Session::getId() const { - return m_sessionId; + return m_sessionId; } int64_t Core::Session::getLastDataTime() const { - return m_lastDataTime; + return m_lastDataTime; } int64_t Core::Session::getLastSqlTime() const { - return m_lastSqlTime; + return m_lastSqlTime; } bool Core::Session::isValid() const { - return m_isValid; + return m_isValid; } void Core::Session::updateLastDataTime() { - m_lastDataTime = Util::getTimeSeconds(); + m_lastDataTime = Util::getTimeSeconds(); } void Core::Session::updateLastSqlTime() { - m_lastSqlTime = Util::getTimeSeconds(); + m_lastSqlTime = Util::getTimeSeconds(); } void Core::Session::startReplay( const std::string& path ) { - auto pLog = g_fw.get< Logger >(); - if( !boost::filesystem::exists( path ) ) - { - getPlayer()->sendDebug( "Couldn't find folder." ); - return; - } + auto pLog = g_fw.get< Logger >(); + if( !boost::filesystem::exists( path ) ) + { + getPlayer()->sendDebug( "Couldn't find folder." ); + return; + } - m_replayCache.clear(); + m_replayCache.clear(); - std::vector< std::tuple< uint64_t, std::string > > loadedSets; + std::vector< std::tuple< uint64_t, std::string > > loadedSets; - for( auto it = boost::filesystem::directory_iterator( boost::filesystem::path( path ) ); - it != boost::filesystem::directory_iterator(); ++it ) - { - // Get the filename of the current element - auto fileName = it->path().filename().string(); - auto unixTime = std::stoull( fileName.substr( 0, 14 ).c_str() ); + for( auto it = boost::filesystem::directory_iterator( boost::filesystem::path( path ) ); + it != boost::filesystem::directory_iterator(); ++it ) + { + // Get the filename of the current element + auto fileName = it->path().filename().string(); + auto unixTime = std::stoull( fileName.substr( 0, 14 ).c_str() ); - if( unixTime > 1000000000 ) - { - loadedSets.push_back( std::tuple< uint64_t, std::string >( unixTime, it->path().string() ) ); - } - } + if( unixTime > 1000000000 ) + { + loadedSets.push_back( std::tuple< uint64_t, std::string >( unixTime, it->path().string() ) ); + } + } - sort( loadedSets.begin(), loadedSets.end(), - []( const std::tuple< uint64_t, std::string >& left, const std::tuple< uint64_t, std::string >& right) - { - return std::get< 0 >( left ) < std::get< 0 >( right ); - } ); + sort( loadedSets.begin(), loadedSets.end(), + []( const std::tuple< uint64_t, std::string >& left, const std::tuple< uint64_t, std::string >& right ) + { + return std::get< 0 >( left ) < std::get< 0 >( right ); + } ); - uint64_t startTime = std::get< 0 >( loadedSets.at( 0 ) ); + uint64_t startTime = std::get< 0 >( loadedSets.at( 0 ) ); - 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 ) ) ); + 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 ) ) ); - pLog->info( "Registering " + std::get< 1 >( set ) + " for " + std::to_string( std::get< 0 >( set ) - startTime ) ); - } + pLog->info( "Registering " + std::get< 1 >( set ) + " for " + std::to_string( std::get< 0 >( set ) - startTime ) ); + } - getPlayer()->sendDebug( "Registered " + std::to_string( m_replayCache.size() ) + " sets for replay" ); - m_isReplaying = true; + getPlayer()->sendDebug( "Registered " + std::to_string( m_replayCache.size() ) + " sets for replay" ); + m_isReplaying = true; } void Core::Session::stopReplay() { - m_isReplaying = false; - m_replayCache.clear(); + m_isReplaying = false; + m_replayCache.clear(); } void Core::Session::processReplay() { - int at = 0; - for( const auto& set : m_replayCache ) - { - if( std::get< 0 >( set ) <= Util::getTimeMs() ) - { - m_pZoneConnection->injectPacket( std::get< 1 >( set ), *getPlayer().get() ); - m_replayCache.erase( m_replayCache.begin() + at ); - //g_framework.getLogger().info( "Sent for " + std::to_string( std::get< 0 >( set ) ) + ", left: " + std::to_string( m_replayCache.size() ) ); - } - at++; - } + int at = 0; + for( const auto& set : m_replayCache ) + { + if( std::get< 0 >( set ) <= Util::getTimeMs() ) + { + m_pZoneConnection->injectPacket( std::get< 1 >( set ), *getPlayer().get() ); + m_replayCache.erase( m_replayCache.begin() + at ); + //g_framework.getLogger().info( "Sent for " + std::to_string( std::get< 0 >( set ) ) + ", left: " + std::to_string( m_replayCache.size() ) ); + } + at++; + } - if( m_replayCache.size() == 0 ) - m_isReplaying = false; + if( m_replayCache.size() == 0 ) + m_isReplaying = false; } void Core::Session::sendReplayInfo() { - std::string message = std::to_string( m_replayCache.size() ) + " Sets left in cache, "; + std::string message = std::to_string( m_replayCache.size() ) + " Sets left in cache, "; - if( m_isReplaying ) - message += " is active"; - else - message += " is idle"; + if( m_isReplaying ) + message += " is active"; + else + message += " is idle"; - getPlayer()->sendDebug( message ); + getPlayer()->sendDebug( message ); } void Core::Session::update() { - if( m_isReplaying ) - processReplay(); + if( m_isReplaying ) + processReplay(); - if( m_pZoneConnection ) - { - m_pZoneConnection->processInQueue(); - - // SESSION LOGIC - m_pPlayer->update( Util::getTimeMs() ); + if( m_pZoneConnection ) + { + m_pZoneConnection->processInQueue(); - if( ( static_cast< uint32_t >( Util::getTimeSeconds() ) - static_cast< uint32_t >( getLastSqlTime() ) ) > 10 ) - { - updateLastSqlTime(); - m_pPlayer->updateSql(); - } + // SESSION LOGIC + m_pPlayer->update( Util::getTimeMs() ); - m_pZoneConnection->processOutQueue(); - } + if( ( static_cast< uint32_t >( Util::getTimeSeconds() ) - static_cast< uint32_t >( getLastSqlTime() ) ) > 10 ) + { + updateLastSqlTime(); + m_pPlayer->updateSql(); + } - if( m_pChatConnection ) - { - m_pChatConnection->processInQueue(); - m_pChatConnection->processOutQueue(); - } + m_pZoneConnection->processOutQueue(); + } + + if( m_pChatConnection ) + { + m_pChatConnection->processInQueue(); + m_pChatConnection->processOutQueue(); + } } Core::Entity::PlayerPtr Core::Session::getPlayer() const { - return m_pPlayer; + return m_pPlayer; } diff --git a/src/servers/sapphire_zone/Session.h b/src/servers/sapphire_zone/Session.h index 33269b67..2f933709 100644 --- a/src/servers/sapphire_zone/Session.h +++ b/src/servers/sapphire_zone/Session.h @@ -1,5 +1,6 @@ #ifndef _SESSION_H_ #define _SESSION_H_ + #include #include @@ -7,59 +8,67 @@ namespace Core { - class Session : public boost::enable_shared_from_this< Session > - { - public: - Session( uint32_t sessionId ); - ~Session(); +class Session : + public boost::enable_shared_from_this< Session > +{ +public: + Session( uint32_t sessionId ); - void setZoneConnection( Network::GameConnectionPtr zoneCon ); + ~Session(); - void setChatConnection( Network::GameConnectionPtr chatCon ); + void setZoneConnection( Network::GameConnectionPtr zoneCon ); - Network::GameConnectionPtr getZoneConnection() const; - Network::GameConnectionPtr getChatConnection() const; + void setChatConnection( Network::GameConnectionPtr chatCon ); - int64_t getLastDataTime() const; - int64_t getLastSqlTime() const; + Network::GameConnectionPtr getZoneConnection() const; - void updateLastDataTime(); - void updateLastSqlTime(); + Network::GameConnectionPtr getChatConnection() const; - void startReplay( const std::string& folderpath ); - void stopReplay(); - void processReplay(); - void sendReplayInfo(); + int64_t getLastDataTime() const; - void close(); + int64_t getLastSqlTime() const; - uint32_t getId() const; + void updateLastDataTime(); - bool loadPlayer(); + void updateLastSqlTime(); - void update(); + void startReplay( const std::string& folderpath ); - bool isValid() const; + void stopReplay(); - Entity::PlayerPtr getPlayer() const; + void processReplay(); - private: - uint32_t m_sessionId; + void sendReplayInfo(); - Entity::PlayerPtr m_pPlayer; + void close(); - int64_t m_lastDataTime; + uint32_t getId() const; - int64_t m_lastSqlTime; - bool m_isValid; + bool loadPlayer(); - bool m_isReplaying; - std::vector< std::tuple< uint64_t, std::string > > m_replayCache; + void update(); - Network::GameConnectionPtr m_pZoneConnection; - Network::GameConnectionPtr m_pChatConnection; + bool isValid() const; - }; + Entity::PlayerPtr getPlayer() const; + +private: + uint32_t m_sessionId; + + Entity::PlayerPtr m_pPlayer; + + int64_t m_lastDataTime; + + int64_t m_lastSqlTime; + bool m_isValid; + + bool m_isReplaying; + std::vector< std::tuple< uint64_t, std::string > > m_replayCache; + + Network::GameConnectionPtr m_pZoneConnection; + Network::GameConnectionPtr m_pChatConnection; + +}; } diff --git a/src/servers/sapphire_zone/StatusEffect/StatusEffect.cpp b/src/servers/sapphire_zone/StatusEffect/StatusEffect.cpp index 20b2c544..1bd37adb 100644 --- a/src/servers/sapphire_zone/StatusEffect/StatusEffect.cpp +++ b/src/servers/sapphire_zone/StatusEffect/StatusEffect.cpp @@ -25,27 +25,23 @@ using namespace Core::Network::Packets::Server; Core::StatusEffect::StatusEffect::StatusEffect( uint32_t id, Entity::CharaPtr sourceActor, Entity::CharaPtr targetActor, uint32_t duration, uint32_t tickRate ) - : m_id( id ) - , m_sourceActor( sourceActor ) - , m_targetActor( targetActor ) - , m_duration( duration ) - , m_startTime( 0 ) - , m_tickRate( tickRate ) - , m_lastTick( 0 ) + : + m_id( id ), m_sourceActor( sourceActor ), m_targetActor( targetActor ), m_duration( duration ), m_startTime( 0 ), + m_tickRate( tickRate ), m_lastTick( 0 ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto entry = pExdData->get< Core::Data::Status >( id ); - m_name = entry->name; - - std::replace( m_name.begin(), m_name.end(), ' ', '_' ); - std::replace( m_name.begin(), m_name.end(), ':', '_' ); - std::replace( m_name.begin(), m_name.end(), '&', '_' ); - std::replace( m_name.begin(), m_name.end(), '+', 'p' ); - boost::erase_all( m_name, "\'" ); - boost::erase_all( m_name, "&" ); - boost::erase_all( m_name, "-" ); - boost::erase_all( m_name, "(" ); - boost::erase_all( m_name, ")" ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto entry = pExdData->get< Core::Data::Status >( id ); + m_name = entry->name; + + std::replace( m_name.begin(), m_name.end(), ' ', '_' ); + std::replace( m_name.begin(), m_name.end(), ':', '_' ); + std::replace( m_name.begin(), m_name.end(), '&', '_' ); + std::replace( m_name.begin(), m_name.end(), '+', 'p' ); + boost::erase_all( m_name, "\'" ); + boost::erase_all( m_name, "&" ); + boost::erase_all( m_name, "-" ); + boost::erase_all( m_name, "(" ); + boost::erase_all( m_name, ")" ); } @@ -55,106 +51,106 @@ Core::StatusEffect::StatusEffect::~StatusEffect() void Core::StatusEffect::StatusEffect::registerTickEffect( uint8_t type, uint32_t param ) { - m_currTickEffect = std::make_pair( type, param ); + m_currTickEffect = std::make_pair( type, param ); } -std::pair< uint8_t, uint32_t> Core::StatusEffect::StatusEffect::getTickEffect() +std::pair< uint8_t, uint32_t > Core::StatusEffect::StatusEffect::getTickEffect() { - auto thisTick = m_currTickEffect; - m_currTickEffect = std::make_pair( 0, 0 ); - return thisTick; + auto thisTick = m_currTickEffect; + m_currTickEffect = std::make_pair( 0, 0 ); + return thisTick; } void Core::StatusEffect::StatusEffect::onTick() { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - m_lastTick = Util::getTimeMs(); - pScriptMgr->onStatusTick( m_targetActor, *this ); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + m_lastTick = Util::getTimeMs(); + pScriptMgr->onStatusTick( m_targetActor, *this ); } uint32_t Core::StatusEffect::StatusEffect::getSrcActorId() const { - return m_sourceActor->getId(); + return m_sourceActor->getId(); } uint32_t Core::StatusEffect::StatusEffect::getTargetActorId() const { - return m_targetActor->getId(); + return m_targetActor->getId(); } uint16_t Core::StatusEffect::StatusEffect::getParam() const { - return m_param; + return m_param; } void Core::StatusEffect::StatusEffect::applyStatus() { - m_startTime = Util::getTimeMs(); - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + m_startTime = Util::getTimeMs(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - // this is only right when an action is being used by the player - // else you probably need to use an actorcontrol + // this is only right when an action is being used by the player + // else you probably need to use an actorcontrol - //GamePacketNew< FFXIVIpcEffect > effectPacket( m_sourceActor->getId() ); - //effectPacket.data().targetId = m_sourceActor->getId(); - //effectPacket.data().actionAnimationId = 3; - //effectPacket.data().unknown_3 = 1; - //effectPacket.data().actionTextId = 3; - //effectPacket.data().unknown_5 = 1; - //effectPacket.data().unknown_6 = 321; - //effectPacket.data().rotation = ( uint16_t ) ( 0x8000 * ( ( m_sourceActor->getPos().getR() + 3.1415926 ) ) / 3.1415926 ); - //effectPacket.data().effectTargetId = m_sourceActor->getId(); - //effectPacket.data().effects[4].unknown_1 = 17; - //effectPacket.data().effects[4].bonusPercent = 30; - //effectPacket.data().effects[4].param1 = m_id; - //effectPacket.data().effects[4].unknown_5 = 0x80; - //m_sourceActor->sendToInRangeSet( effectPacket, true ); + //GamePacketNew< FFXIVIpcEffect > effectPacket( m_sourceActor->getId() ); + //effectPacket.data().targetId = m_sourceActor->getId(); + //effectPacket.data().actionAnimationId = 3; + //effectPacket.data().unknown_3 = 1; + //effectPacket.data().actionTextId = 3; + //effectPacket.data().unknown_5 = 1; + //effectPacket.data().unknown_6 = 321; + //effectPacket.data().rotation = ( uint16_t ) ( 0x8000 * ( ( m_sourceActor->getPos().getR() + 3.1415926 ) ) / 3.1415926 ); + //effectPacket.data().effectTargetId = m_sourceActor->getId(); + //effectPacket.data().effects[4].unknown_1 = 17; + //effectPacket.data().effects[4].bonusPercent = 30; + //effectPacket.data().effects[4].param1 = m_id; + //effectPacket.data().effects[4].unknown_5 = 0x80; + //m_sourceActor->sendToInRangeSet( effectPacket, true ); - pScriptMgr->onStatusReceive( m_targetActor, m_id ); + pScriptMgr->onStatusReceive( m_targetActor, m_id ); } void Core::StatusEffect::StatusEffect::removeStatus() { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - pScriptMgr->onStatusTimeOut( m_targetActor, m_id ); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + pScriptMgr->onStatusTimeOut( m_targetActor, m_id ); } uint32_t Core::StatusEffect::StatusEffect::getId() const { - return m_id; + return m_id; } uint32_t Core::StatusEffect::StatusEffect::getDuration() const { - return m_duration; + return m_duration; } uint32_t Core::StatusEffect::StatusEffect::getTickRate() const { - return m_tickRate; + return m_tickRate; } uint64_t Core::StatusEffect::StatusEffect::getLastTickMs() const { - return m_lastTick; + return m_lastTick; } uint64_t Core::StatusEffect::StatusEffect::getStartTimeMs() const { - return m_startTime; + return m_startTime; } void Core::StatusEffect::StatusEffect::setLastTick( uint64_t lastTick ) { - m_lastTick = lastTick; + m_lastTick = lastTick; } void Core::StatusEffect::StatusEffect::setParam( uint16_t param ) { - m_param = param; + m_param = param; } const std::string& Core::StatusEffect::StatusEffect::getName() const { - return m_name; + return m_name; } diff --git a/src/servers/sapphire_zone/StatusEffect/StatusEffect.h b/src/servers/sapphire_zone/StatusEffect/StatusEffect.h index 3a139ec0..b0cda26f 100644 --- a/src/servers/sapphire_zone/StatusEffect/StatusEffect.h +++ b/src/servers/sapphire_zone/StatusEffect/StatusEffect.h @@ -5,49 +5,61 @@ #include "Forwards.h" -namespace Core -{ -namespace StatusEffect -{ +namespace Core { +namespace StatusEffect { class StatusEffect { public: - StatusEffect( uint32_t id, Entity::CharaPtr sourceActor, Entity::CharaPtr targetActor, - uint32_t duration, uint32_t tickRate ); + StatusEffect( uint32_t id, Entity::CharaPtr sourceActor, Entity::CharaPtr targetActor, + uint32_t duration, uint32_t tickRate ); - ~StatusEffect(); + ~StatusEffect(); - void onTick(); - void applyStatus(); - void removeStatus(); + void onTick(); - uint32_t getId() const; - uint32_t getDuration() const; - uint32_t getTickRate() const; - uint32_t getSrcActorId() const; - uint32_t getTargetActorId() const; - uint64_t getLastTickMs() const; - uint64_t getStartTimeMs() const; - uint16_t getParam() const; - void setLastTick( uint64_t lastTick ); - void setParam( uint16_t param ); - void registerTickEffect( uint8_t type, uint32_t param ); - std::pair< uint8_t, uint32_t> getTickEffect(); - const std::string& getName() const; + void applyStatus(); + + void removeStatus(); + + uint32_t getId() const; + + uint32_t getDuration() const; + + uint32_t getTickRate() const; + + uint32_t getSrcActorId() const; + + uint32_t getTargetActorId() const; + + uint64_t getLastTickMs() const; + + uint64_t getStartTimeMs() const; + + uint16_t getParam() const; + + void setLastTick( uint64_t lastTick ); + + void setParam( uint16_t param ); + + void registerTickEffect( uint8_t type, uint32_t param ); + + std::pair< uint8_t, uint32_t > getTickEffect(); + + const std::string& getName() const; private: - uint32_t m_id; - Entity::CharaPtr m_sourceActor; - Entity::CharaPtr m_targetActor; - uint32_t m_duration; - uint64_t m_startTime; - uint32_t m_tickRate; - uint64_t m_lastTick; - uint16_t m_param; - std::string m_name; - std::pair< uint8_t, uint32_t> m_currTickEffect; + uint32_t m_id; + Entity::CharaPtr m_sourceActor; + Entity::CharaPtr m_targetActor; + uint32_t m_duration; + uint64_t m_startTime; + uint32_t m_tickRate; + uint64_t m_lastTick; + uint16_t m_param; + std::string m_name; + std::pair< uint8_t, uint32_t > m_currTickEffect; }; diff --git a/src/servers/sapphire_zone/Zone/Cell.cpp b/src/servers/sapphire_zone/Zone/Cell.cpp index 5f1feb1b..d9b7f600 100644 --- a/src/servers/sapphire_zone/Zone/Cell.cpp +++ b/src/servers/sapphire_zone/Zone/Cell.cpp @@ -6,133 +6,134 @@ #include #include "Framework.h" + extern Core::Framework g_fw; // TODO: the entire zone / areahandling is a bit outdated ( in parts i used this for the 1.0 iteration ) // likely this could be greatly improved or redone Core::Cell::Cell() : - m_bActive( false ), - m_bLoaded( false ), - m_playerCount( 0 ), - m_bUnloadPending( false ) + m_bActive( false ), + m_bLoaded( false ), + m_playerCount( 0 ), + m_bUnloadPending( false ) { - m_bForcedActive = false; + m_bForcedActive = false; } Core::Cell::~Cell() { - removeActors(); + removeActors(); } void Core::Cell::init( uint32_t x, uint32_t y, ZonePtr pZone ) { - m_pZone = pZone; - m_posX = x; - m_posY = y; + m_pZone = pZone; + m_posX = x; + m_posY = y; - m_actors.clear(); + m_actors.clear(); } void Core::Cell::addActor( Entity::ActorPtr pAct ) { - auto pLog = g_fw.get< Core::Logger >(); - if( pAct->isPlayer() ) - ++m_playerCount; + auto pLog = g_fw.get< Core::Logger >(); + if( pAct->isPlayer() ) + ++m_playerCount; - m_actors.insert( pAct ); + m_actors.insert( pAct ); } void Core::Cell::removeActor( Entity::ActorPtr pAct ) { - auto pLog = g_fw.get< Core::Logger >(); - if( pAct->isPlayer() ) - --m_playerCount; + auto pLog = g_fw.get< Core::Logger >(); + if( pAct->isPlayer() ) + --m_playerCount; - m_actors.erase( pAct ); + m_actors.erase( pAct ); } void Core::Cell::setActivity( bool state ) { - if( !m_bActive && state ) - { - // Move all objects to active set. - //for( auto itr = m_actors.begin(); itr != m_actors.end(); ++itr ) - //{ + if( !m_bActive && state ) + { + // Move all objects to active set. + //for( auto itr = m_actors.begin(); itr != m_actors.end(); ++itr ) + //{ - //} + //} - if( m_bUnloadPending ) - cancelPendingUnload(); + if( m_bUnloadPending ) + cancelPendingUnload(); - } - else if( m_bActive && !state ) - { - // Move all objects from active set. - //for(auto itr = m_actors.begin(); itr != m_actors.end(); ++itr) - //{ + } + else if( m_bActive && !state ) + { + // Move all objects from active set. + //for(auto itr = m_actors.begin(); itr != m_actors.end(); ++itr) + //{ - //} + //} - } + } - m_bActive = state; + m_bActive = state; } void Core::Cell::removeActors() { - //uint32_t ltime = getMSTime(); + //uint32_t ltime = getMSTime(); - m_actors.clear(); + m_actors.clear(); - //This time it's simpler! We just remove everything - Entity::ActorPtr pAct; //do this outside the loop! - for( auto itr = m_actors.begin(); itr != m_actors.end(); ) - { - pAct = (*itr); - itr++; + //This time it's simpler! We just remove everything + Entity::ActorPtr pAct; //do this outside the loop! + for( auto itr = m_actors.begin(); itr != m_actors.end(); ) + { + pAct = ( *itr ); + itr++; - if(!pAct) - { - continue; - } + if( !pAct ) + { + continue; + } - if(m_bUnloadPending) - { + if( m_bUnloadPending ) + { - } + } - } + } - m_playerCount = 0; - m_bLoaded = false; + m_playerCount = 0; + m_bLoaded = false; } void Core::Cell::queueUnloadPending() { - if( m_bUnloadPending ) - return; + if( m_bUnloadPending ) + return; - m_bUnloadPending = true; + m_bUnloadPending = true; } void Core::Cell::cancelPendingUnload() { - if( !m_bUnloadPending ) - return; + if( !m_bUnloadPending ) + return; } void Core::Cell::unload() { - assert( m_bUnloadPending ); - if( m_bActive ) - return; + assert( m_bUnloadPending ); + if( m_bActive ) + return; - removeActors(); - m_bUnloadPending = false; + removeActors(); + m_bUnloadPending = false; } diff --git a/src/servers/sapphire_zone/Zone/Cell.h b/src/servers/sapphire_zone/Zone/Cell.h index fb61ac43..adfde15d 100644 --- a/src/servers/sapphire_zone/Zone/Cell.h +++ b/src/servers/sapphire_zone/Zone/Cell.h @@ -9,112 +9,115 @@ namespace Core { - typedef std::set< Entity::ActorPtr > ActorSet; +typedef std::set< Entity::ActorPtr > ActorSet; - class Cell - { - friend class Zone; +class Cell +{ + friend class Zone; - private: - bool m_bForcedActive; - uint16_t m_posX; - uint16_t m_posY; - ActorSet m_actors; - bool m_bActive; - bool m_bLoaded; - bool m_bUnloadPending; +private: + bool m_bForcedActive; + uint16_t m_posX; + uint16_t m_posY; + ActorSet m_actors; + bool m_bActive; + bool m_bLoaded; + bool m_bUnloadPending; - uint16_t m_playerCount; - ZonePtr m_pZone; + uint16_t m_playerCount; + ZonePtr m_pZone; - public: - Cell(); - ~Cell(); +public: + Cell(); - void init( uint32_t x, uint32_t y, ZonePtr pZone ); + ~Cell(); - void addActor( Entity::ActorPtr pAct ); + void init( uint32_t x, uint32_t y, ZonePtr pZone ); - void removeActor( Entity::ActorPtr pAct ); + void addActor( Entity::ActorPtr pAct ); - bool hasActor( Entity::ActorPtr pAct ) - { - return ( m_actors.find(pAct) != m_actors.end() ); - } + void removeActor( Entity::ActorPtr pAct ); - bool hasPlayers() const - { - return ((m_playerCount > 0) ? true : false); - } + bool hasActor( Entity::ActorPtr pAct ) + { + return ( m_actors.find( pAct ) != m_actors.end() ); + } - size_t getActorCount() const - { - return m_actors.size(); - } + bool hasPlayers() const + { + return ( ( m_playerCount > 0 ) ? true : false ); + } - void removeActors(); + size_t getActorCount() const + { + return m_actors.size(); + } - ActorSet::iterator begin() - { - return m_actors.begin(); - } + void removeActors(); - ActorSet::iterator end() - { - return m_actors.end(); - } + ActorSet::iterator begin() + { + return m_actors.begin(); + } - void setActivity(bool state); + ActorSet::iterator end() + { + return m_actors.end(); + } - bool isActive() const - { - return m_bActive; - } + void setActivity( bool state ); - bool isLoaded() const - { - return m_bLoaded; - } + bool isActive() const + { + return m_bActive; + } - uint32_t getPlayerCount() const - { - return m_playerCount; - } + bool isLoaded() const + { + return m_bLoaded; + } - bool isUnloadPending() const - { - return m_bUnloadPending; - } + uint32_t getPlayerCount() const + { + return m_playerCount; + } - void setUnloadPending(bool up) - { - m_bUnloadPending = up; - } + bool isUnloadPending() const + { + return m_bUnloadPending; + } - void queueUnloadPending(); - void cancelPendingUnload(); - void unload(); + void setUnloadPending( bool up ) + { + m_bUnloadPending = up; + } - void setPermanentActivity(bool val) - { - m_bForcedActive = val; - } + void queueUnloadPending(); - bool isForcedActive() const - { - return m_bForcedActive; - } + void cancelPendingUnload(); - uint16_t getPosX() const - { - return m_posX; - } + void unload(); - uint16_t getPosY() const - { - return m_posY; - } - }; + void setPermanentActivity( bool val ) + { + m_bForcedActive = val; + } + + bool isForcedActive() const + { + return m_bForcedActive; + } + + uint16_t getPosX() const + { + return m_posX; + } + + uint16_t getPosY() const + { + return m_posY; + } +}; } #endif diff --git a/src/servers/sapphire_zone/Zone/CellHandler.h b/src/servers/sapphire_zone/Zone/CellHandler.h index 8c2ff8ff..d12e399b 100644 --- a/src/servers/sapphire_zone/Zone/CellHandler.h +++ b/src/servers/sapphire_zone/Zone/CellHandler.h @@ -14,164 +14,170 @@ #define _sizeX (TilesCount*CellsPerTile) #define _sizeY (TilesCount*CellsPerTile) -#define GetRelatCoord(Coord,CellCoord) ((_maxX-Coord)-CellCoord*_cellSize) +#define GetRelatCoord( Coord, CellCoord ) ((_maxX-Coord)-CellCoord*_cellSize) namespace Core { class Zone; -template +template< class T > class CellHandler { public: - CellHandler(); - ~CellHandler(); + CellHandler(); - T* getCellPtr( uint32_t x, uint32_t y ); - T* getCellByCoords( float x, float y ); - T* create( uint32_t x, uint32_t y ); - T* createByCoords( float x, float y ); - void remove( uint32_t x, uint32_t y ); + ~CellHandler(); - bool allocated( uint32_t x, uint32_t y ) - { - return m_pCells[x][y] != nullptr; - } + T* getCellPtr( uint32_t x, uint32_t y ); - static uint32_t getPosX( float x ); - static uint32_t getPosY( float y ); + T* getCellByCoords( float x, float y ); + + T* create( uint32_t x, uint32_t y ); + + T* createByCoords( float x, float y ); + + void remove( uint32_t x, uint32_t y ); + + bool allocated( uint32_t x, uint32_t y ) + { + return m_pCells[ x ][ y ] != nullptr; + } + + static uint32_t getPosX( float x ); + + static uint32_t getPosY( float y ); protected: - void _init(); + void _init(); - T *** m_pCells; + T*** m_pCells; }; -template -CellHandler::CellHandler() +template< class T > +CellHandler< T >::CellHandler() { - _init(); + _init(); } -template -void CellHandler::_init() +template< class T > +void CellHandler< T >::_init() { - m_pCells = new T**[_sizeX]; + m_pCells = new T** [_sizeX]; - assert( m_pCells ); - for( uint32_t i = 0; i < _sizeX; i++ ) - { - m_pCells[i] = nullptr; - } + assert( m_pCells ); + for( uint32_t i = 0; i < _sizeX; i++ ) + { + m_pCells[ i ] = nullptr; + } } -template -CellHandler::~CellHandler() +template< class T > +CellHandler< T >::~CellHandler() { - if( m_pCells ) - { - for( uint32_t i = 0; i < _sizeX; i++ ) + if( m_pCells ) + { + for( uint32_t i = 0; i < _sizeX; i++ ) + { + if( !m_pCells[ i ] ) { - if( !m_pCells[i] ) - { - continue; - } - - for( uint32_t j = 0; j < _sizeY; j++ ) - { - if( m_pCells[i][j] ) - { - delete m_pCells[i][j]; - } - } - delete[] m_pCells[i]; + continue; } - delete[] m_pCells; - } + + for( uint32_t j = 0; j < _sizeY; j++ ) + { + if( m_pCells[ i ][ j ] ) + { + delete m_pCells[ i ][ j ]; + } + } + delete[] m_pCells[ i ]; + } + delete[] m_pCells; + } } -template -T* CellHandler::create( uint32_t x, uint32_t y ) +template< class T > +T* CellHandler< T >::create( uint32_t x, uint32_t y ) { - if( x >= _sizeX || y >= _sizeY ) - { - return nullptr; - } + if( x >= _sizeX || y >= _sizeY ) + { + return nullptr; + } - if( !m_pCells[x] ) - { - m_pCells[x] = new T*[_sizeY]; - memset( m_pCells[x], 0, sizeof( T* )*_sizeY ); - } + if( !m_pCells[ x ] ) + { + m_pCells[ x ] = new T* [_sizeY]; + memset( m_pCells[ x ], 0, sizeof( T* ) * _sizeY ); + } - assert( m_pCells[x][y] == nullptr ); + assert( m_pCells[ x ][ y ] == nullptr ); - T *cls = new T; - m_pCells[x][y] = cls; + T* cls = new T; + m_pCells[ x ][ y ] = cls; - return cls; + return cls; } -template -T* CellHandler::createByCoords( float x, float y ) +template< class T > +T* CellHandler< T >::createByCoords( float x, float y ) { - return create( getPosX( x ), getPosY( y ) ); + return create( getPosX( x ), getPosY( y ) ); } -template -void CellHandler::remove( uint32_t x, uint32_t y ) +template< class T > +void CellHandler< T >::remove( uint32_t x, uint32_t y ) { - if( x >= _sizeX || y >= _sizeY ) - { - return; - } + if( x >= _sizeX || y >= _sizeY ) + { + return; + } - if( !m_pCells[x] ) - { - return; - } + if( !m_pCells[ x ] ) + { + return; + } - assert( m_pCells[x][y] != nullptr ); + assert( m_pCells[ x ][ y ] != nullptr ); - T *cls = m_pCells[x][y]; - m_pCells[x][y] = nullptr; + T* cls = m_pCells[ x ][ y ]; + m_pCells[ x ][ y ] = nullptr; - delete cls; + delete cls; } -template -T* CellHandler::getCellPtr( uint32_t x, uint32_t y ) +template< class T > +T* CellHandler< T >::getCellPtr( uint32_t x, uint32_t y ) { - if( !m_pCells[x] ) - { - return nullptr; - } + if( !m_pCells[ x ] ) + { + return nullptr; + } - return m_pCells[x][y]; + return m_pCells[ x ][ y ]; } -template -T* CellHandler::getCellByCoords( float x, float y ) +template< class T > +T* CellHandler< T >::getCellByCoords( float x, float y ) { - return getCellPtr(getPosX(x), getPosY(y)); + return getCellPtr( getPosX( x ), getPosY( y ) ); } -template -uint32_t CellHandler::getPosX( float x ) +template< class T > +uint32_t CellHandler< T >::getPosX( float x ) { - assert( ( x >= _minX ) && ( x <= _maxX ) ); - return ( uint32_t ) ( ( _maxX - x ) / _cellSize ); + assert( ( x >= _minX ) && ( x <= _maxX ) ); + return ( uint32_t ) ( ( _maxX - x ) / _cellSize ); } -template -uint32_t CellHandler::getPosY( float y ) +template< class T > +uint32_t CellHandler< T >::getPosY( float y ) { - assert( ( y >= _minY ) && ( y <= _maxY ) ); - return ( uint32_t ) ( ( _maxY - y ) / _cellSize ); + assert( ( y >= _minY ) && ( y <= _maxY ) ); + return ( uint32_t ) ( ( _maxY - y ) / _cellSize ); } } diff --git a/src/servers/sapphire_zone/Zone/HousingZone.cpp b/src/servers/sapphire_zone/Zone/HousingZone.cpp index db6dc972..8b0871b4 100644 --- a/src/servers/sapphire_zone/Zone/HousingZone.cpp +++ b/src/servers/sapphire_zone/Zone/HousingZone.cpp @@ -23,22 +23,22 @@ Core::HousingZone::HousingZone( uint8_t wardNum, uint32_t guId, const std::string& internalName, const std::string& contentName ) : - Zone( territoryId, guId, internalName, contentName ), - m_wardNum( wardNum ) + Zone( territoryId, guId, internalName, contentName ), + m_wardNum( wardNum ) { } bool Core::HousingZone::init() { - uint32_t landSetId; + uint32_t landSetId; - for( landSetId = 0; landSetId < 60; landSetId++ ) - { - //TODO: load house information here - } + for( landSetId = 0; landSetId < 60; landSetId++ ) + { + //TODO: load house information here + } - return true; + return true; } Core::HousingZone::~HousingZone() @@ -48,48 +48,48 @@ Core::HousingZone::~HousingZone() void Core::HousingZone::onPlayerZoneIn( Entity::Player& player ) { - auto pLog = g_fw.get< Logger >(); - pLog->debug( "HousingZone::onPlayerZoneIn: Zone#" + std::to_string( getGuId() ) + "|" + - + ", Entity#" + std::to_string( player.getId() ) ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( "HousingZone::onPlayerZoneIn: Zone#" + std::to_string( getGuId() ) + "|" + + +", Entity#" + std::to_string( player.getId() ) ); - uint32_t landSetId; - uint32_t yardPacketNum; - uint32_t yardPacketTotal = 8; + uint32_t landSetId; + uint32_t yardPacketNum; + uint32_t yardPacketTotal = 8; - auto wardInfoPacket = makeZonePacket< FFXIVIpcWardInfo >( player.getId() ); + auto wardInfoPacket = makeZonePacket< FFXIVIpcWardInfo >( player.getId() ); - wardInfoPacket->data().wardNum = m_wardNum; - wardInfoPacket->data().zoneId = player.getZoneId(); - //TODO: get current WorldId - wardInfoPacket->data().worldId = 67; - //TODO: handle Subdivision - wardInfoPacket->data().subInstance = 1; + wardInfoPacket->data().wardNum = m_wardNum; + wardInfoPacket->data().zoneId = player.getZoneId(); + //TODO: get current WorldId + wardInfoPacket->data().worldId = 67; + //TODO: handle Subdivision + wardInfoPacket->data().subInstance = 1; - for( landSetId = 0; landSetId < 30 ; landSetId++ ) - { - wardInfoPacket->data().landSet[landSetId].houseSize = 1; - wardInfoPacket->data().landSet[landSetId].houseState = 1; - } + for( landSetId = 0; landSetId < 30; landSetId++ ) + { + wardInfoPacket->data().landSet[ landSetId ].houseSize = 1; + wardInfoPacket->data().landSet[ landSetId ].houseState = 1; + } - player.queuePacket( wardInfoPacket ); + player.queuePacket( wardInfoPacket ); - for( yardPacketNum = 0; yardPacketNum < yardPacketTotal; yardPacketNum++ ) - { - auto wardYardInfoPacket = makeZonePacket< FFXIVIpcWardYardInfo >( player.getId() ); - wardYardInfoPacket->data().unknown1 = 0xFFFFFFFF; - wardYardInfoPacket->data().unknown2 = 0xFFFFFFFF; - wardYardInfoPacket->data().unknown3 = 0xFF; - wardYardInfoPacket->data().packetNum = yardPacketNum; - wardYardInfoPacket->data().packetTotal = yardPacketTotal; + for( yardPacketNum = 0; yardPacketNum < yardPacketTotal; yardPacketNum++ ) + { + auto wardYardInfoPacket = makeZonePacket< FFXIVIpcWardYardInfo >( player.getId() ); + wardYardInfoPacket->data().unknown1 = 0xFFFFFFFF; + wardYardInfoPacket->data().unknown2 = 0xFFFFFFFF; + wardYardInfoPacket->data().unknown3 = 0xFF; + wardYardInfoPacket->data().packetNum = yardPacketNum; + wardYardInfoPacket->data().packetTotal = yardPacketTotal; - //TODO: Add Objects here + //TODO: Add Objects here - player.queuePacket( wardYardInfoPacket ); - } + player.queuePacket( wardYardInfoPacket ); + } } uint8_t Core::HousingZone::getWardNum() const { - return m_wardNum; + return m_wardNum; } diff --git a/src/servers/sapphire_zone/Zone/HousingZone.h b/src/servers/sapphire_zone/Zone/HousingZone.h index 428c50c9..43d979e3 100644 --- a/src/servers/sapphire_zone/Zone/HousingZone.h +++ b/src/servers/sapphire_zone/Zone/HousingZone.h @@ -4,28 +4,30 @@ #include "Zone.h" #include "Forwards.h" -namespace Core +namespace Core { +class HousingZone : + public Zone { -class HousingZone : public Zone - { - public: - HousingZone( uint8_t wardNum, - uint16_t territoryId, - uint32_t guId, - const std::string& internalName, - const std::string& contentName ); - virtual ~HousingZone(); +public: + HousingZone( uint8_t wardNum, + uint16_t territoryId, + uint32_t guId, + const std::string& internalName, + const std::string& contentName ); - bool init() override; - void onPlayerZoneIn( Entity::Player& player ) override; + virtual ~HousingZone(); - /* returns current ward number for this zone */ - uint8_t getWardNum() const; + bool init() override; - const uint32_t m_wardMaxNum = 18; - private: - uint8_t m_wardNum; - }; + void onPlayerZoneIn( Entity::Player& player ) override; + + /* returns current ward number for this zone */ + uint8_t getWardNum() const; + + const uint32_t m_wardMaxNum = 18; +private: + uint8_t m_wardNum; +}; } #endif //SAPPHIRE_HOUSINGZONE_H diff --git a/src/servers/sapphire_zone/Zone/InstanceContent.cpp b/src/servers/sapphire_zone/Zone/InstanceContent.cpp index b267ab6d..860dbdf6 100644 --- a/src/servers/sapphire_zone/Zone/InstanceContent.cpp +++ b/src/servers/sapphire_zone/Zone/InstanceContent.cpp @@ -34,24 +34,25 @@ Core::InstanceContent::InstanceContent( boost::shared_ptr< Core::Data::InstanceC const std::string& internalName, const std::string& contentName, uint32_t instanceContentId ) - : Zone( static_cast< uint16_t >( pInstanceConfiguration->territoryType ), guId, internalName, contentName ), - Director( Event::Director::InstanceContent, instanceContentId ), - m_instanceConfiguration( pInstanceConfiguration ), - m_instanceContentId( instanceContentId ), - m_state( Created ), - m_pEntranceEObj( nullptr ), - m_instanceCommenceTime( 0 ), - m_currentBgm( pInstanceConfiguration->bGM ) + : + Zone( static_cast< uint16_t >( pInstanceConfiguration->territoryType ), guId, internalName, contentName ), + Director( Event::Director::InstanceContent, instanceContentId ), + m_instanceConfiguration( pInstanceConfiguration ), + m_instanceContentId( instanceContentId ), + m_state( Created ), + m_pEntranceEObj( nullptr ), + m_instanceCommenceTime( 0 ), + m_currentBgm( pInstanceConfiguration->bGM ) { } bool Core::InstanceContent::init() { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - pScriptMgr->onInstanceInit( getAsInstanceContent() ); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + pScriptMgr->onInstanceInit( getAsInstanceContent() ); - return true; + return true; } @@ -62,393 +63,396 @@ Core::InstanceContent::~InstanceContent() uint32_t Core::InstanceContent::getInstanceContentId() const { - return m_instanceContentId; + return m_instanceContentId; } Core::Data::ExdDataGenerated::InstanceContentPtr Core::InstanceContent::getInstanceConfiguration() const { - return m_instanceConfiguration; + return m_instanceConfiguration; } void Core::InstanceContent::onPlayerZoneIn( Entity::Player& player ) { - auto pLog = g_fw.get< Logger >(); - pLog->debug( "InstanceContent::onPlayerZoneIn: Zone#" + std::to_string( getGuId() ) + "|" - + std::to_string( getInstanceContentId() ) + - + ", Entity#" + std::to_string( player.getId() ) ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( "InstanceContent::onPlayerZoneIn: Zone#" + std::to_string( getGuId() ) + "|" + + std::to_string( getInstanceContentId() ) + + +", Entity#" + std::to_string( player.getId() ) ); - // mark player as "bound by duty" - player.setStateFlag( PlayerStateFlag::BoundByDuty ); + // mark player as "bound by duty" + player.setStateFlag( PlayerStateFlag::BoundByDuty ); - // if the instance was not started yet, director init is sent on enter event. - // else it will be sent on finish loading. - if( m_state == Created ) - sendDirectorInit( player ); + // if the instance was not started yet, director init is sent on enter event. + // else it will be sent on finish loading. + if( m_state == Created ) + sendDirectorInit( player ); } void Core::InstanceContent::onLeaveTerritory( Entity::Player& player ) { - auto pLog = g_fw.get< Logger >(); - pLog->debug( "InstanceContent::onLeaveTerritory: Zone#" + std::to_string( getGuId() ) + "|" - + std::to_string( getInstanceContentId() ) + - + ", Entity#" + std::to_string( player.getId() ) ); - sendDirectorClear( player ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( "InstanceContent::onLeaveTerritory: Zone#" + std::to_string( getGuId() ) + "|" + + std::to_string( getInstanceContentId() ) + + +", Entity#" + std::to_string( player.getId() ) ); + sendDirectorClear( player ); - player.setDirectorInitialized( false ); - // remove "bound by duty" state - player.unsetStateFlag( PlayerStateFlag::BoundByDuty ); + player.setDirectorInitialized( false ); + // remove "bound by duty" state + player.unsetStateFlag( PlayerStateFlag::BoundByDuty ); } void Core::InstanceContent::onUpdate( uint32_t currTime ) { - switch( m_state ) - { - case Created: + switch( m_state ) + { + case Created: + { + if( m_boundPlayerIds.size() == 0 ) + return; + + for( auto playerId : m_boundPlayerIds ) { - if( m_boundPlayerIds.size() == 0 ) - return; + auto it = m_playerMap.find( playerId ); + if( it == m_playerMap.end() ) + return; - for( auto playerId : m_boundPlayerIds ) - { - auto it = m_playerMap.find( playerId ); - if( it == m_playerMap.end() ) - return; - - auto player = it->second; - if( !player->isLoadingComplete() || - !player->isDirectorInitialized() || - !player->isOnEnterEventDone() || - player->hasStateFlag( PlayerStateFlag::WatchingCutscene ) ) - return; - } - - if( m_instanceCommenceTime == 0 ) - { - m_instanceCommenceTime = Util::getTimeMs() + instanceStartDelay; - return; - } - else if( Util::getTimeMs() < m_instanceCommenceTime ) - return; - - for( const auto& playerIt : m_playerMap ) - { - auto pPlayer = playerIt.second; - pPlayer->queuePacket( makeActorControl143( pPlayer->getId(), DirectorUpdate, - getDirectorId(), 0x40000001, - m_instanceConfiguration->timeLimitmin * 60u ) ); - } - - if( m_pEntranceEObj ) - m_pEntranceEObj->setState( 7 ); - m_state = DutyInProgress; - m_instanceExpireTime = Util::getTimeSeconds() + ( m_instanceConfiguration->timeLimitmin * 60u ); - break; + auto player = it->second; + if( !player->isLoadingComplete() || + !player->isDirectorInitialized() || + !player->isOnEnterEventDone() || + player->hasStateFlag( PlayerStateFlag::WatchingCutscene ) ) + return; } - - case DutyReset: - break; - - case DutyInProgress: + if( m_instanceCommenceTime == 0 ) { - break; + m_instanceCommenceTime = Util::getTimeMs() + instanceStartDelay; + return; + } + else if( Util::getTimeMs() < m_instanceCommenceTime ) + return; + + for( const auto& playerIt : m_playerMap ) + { + auto pPlayer = playerIt.second; + pPlayer->queuePacket( makeActorControl143( pPlayer->getId(), DirectorUpdate, + getDirectorId(), 0x40000001, + m_instanceConfiguration->timeLimitmin * 60u ) ); } + if( m_pEntranceEObj ) + m_pEntranceEObj->setState( 7 ); + m_state = DutyInProgress; + m_instanceExpireTime = Util::getTimeSeconds() + ( m_instanceConfiguration->timeLimitmin * 60u ); + break; + } - case DutyFinished: - break; - } - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - pScriptMgr->onInstanceUpdate( getAsInstanceContent(), currTime ); + case DutyReset: + break; + + case DutyInProgress: + { + break; + } + + + case DutyFinished: + break; + } + + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + pScriptMgr->onInstanceUpdate( getAsInstanceContent(), currTime ); } void Core::InstanceContent::onFinishLoading( Entity::Player& player ) { - sendDirectorInit( player ); + sendDirectorInit( player ); } void Core::InstanceContent::onInitDirector( Entity::Player& player ) { - sendDirectorVars( player ); - player.setDirectorInitialized( true ); + sendDirectorVars( player ); + player.setDirectorInitialized( true ); } void Core::InstanceContent::onDirectorSync( Entity::Player& player ) { - player.queuePacket( makeActorControl143( player.getId(), DirectorUpdate, 0x00110001, 0x80000000, 1 ) ); + player.queuePacket( makeActorControl143( player.getId(), DirectorUpdate, 0x00110001, 0x80000000, 1 ) ); } void Core::InstanceContent::setVar( uint8_t index, uint8_t value ) { - if( index > 19 ) - return; + if( index > 19 ) + return; - switch( index ) - { - case 0: - setDirectorUI8AL( value ); - break; - case 1: - setDirectorUI8AH( value ); - break; - case 2: - setDirectorUI8BL( value ); - break; - case 3: - setDirectorUI8BH( value ); - break; - case 4: - setDirectorUI8CL( value ); - break; - case 5: - setDirectorUI8CH( value ); - break; - case 6: - setDirectorUI8DL( value ); - break; - case 7: - setDirectorUI8DH( value ); - break; - case 8: - setDirectorUI8EL( value ); - break; - case 9: - setDirectorUI8EH( value ); - break; - case 10: - setDirectorUI8FL( value ); - break; - case 11: - setDirectorUI8FH( value ); - break; - case 12: - setDirectorUI8GL( value ); - break; - case 13: - setDirectorUI8GH( value ); - break; - case 14: - setDirectorUI8HL( value ); - break; - case 15: - setDirectorUI8HH( value ); - break; - case 16: - setDirectorUI8IL( value ); - break; - case 17: - setDirectorUI8IH( value ); - break; - case 18: - setDirectorUI8JL( value ); - break; - case 19: - setDirectorUI8JH( value ); - break; + switch( index ) + { + case 0: + setDirectorUI8AL( value ); + break; + case 1: + setDirectorUI8AH( value ); + break; + case 2: + setDirectorUI8BL( value ); + break; + case 3: + setDirectorUI8BH( value ); + break; + case 4: + setDirectorUI8CL( value ); + break; + case 5: + setDirectorUI8CH( value ); + break; + case 6: + setDirectorUI8DL( value ); + break; + case 7: + setDirectorUI8DH( value ); + break; + case 8: + setDirectorUI8EL( value ); + break; + case 9: + setDirectorUI8EH( value ); + break; + case 10: + setDirectorUI8FL( value ); + break; + case 11: + setDirectorUI8FH( value ); + break; + case 12: + setDirectorUI8GL( value ); + break; + case 13: + setDirectorUI8GH( value ); + break; + case 14: + setDirectorUI8HL( value ); + break; + case 15: + setDirectorUI8HH( value ); + break; + case 16: + setDirectorUI8IL( value ); + break; + case 17: + setDirectorUI8IH( value ); + break; + case 18: + setDirectorUI8JL( value ); + break; + case 19: + setDirectorUI8JH( value ); + break; - } + } - // todo: genericise this? - for( const auto& playerIt : m_playerMap ) - { - sendDirectorVars( *playerIt.second ); - } + // todo: genericise this? + for( const auto& playerIt : m_playerMap ) + { + sendDirectorVars( *playerIt.second ); + } } void Core::InstanceContent::setSequence( uint8_t value ) { - setDirectorSequence( value ); + setDirectorSequence( value ); - for( const auto& playerIt : m_playerMap ) - { - sendDirectorVars( *playerIt.second ); - } + for( const auto& playerIt : m_playerMap ) + { + sendDirectorVars( *playerIt.second ); + } } void Core::InstanceContent::setBranch( uint8_t value ) { - setDirectorBranch( value ); + setDirectorBranch( value ); - for( const auto& playerIt : m_playerMap ) - { - sendDirectorVars( *playerIt.second ); - } + for( const auto& playerIt : m_playerMap ) + { + sendDirectorVars( *playerIt.second ); + } } void Core::InstanceContent::startQte() { - for( const auto& playerIt : m_playerMap ) - { - auto player = playerIt.second; - player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x8000000A ) ); - } + for( const auto& playerIt : m_playerMap ) + { + auto player = playerIt.second; + player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x8000000A ) ); + } } void Core::InstanceContent::startEventCutscene() { - // TODO: lock player movement - for( const auto& playerIt : m_playerMap ) - { - auto player = playerIt.second; - player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000008 ) ); - } + // TODO: lock player movement + for( const auto& playerIt : m_playerMap ) + { + auto player = playerIt.second; + player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000008 ) ); + } } void Core::InstanceContent::endEventCutscene() { - for( const auto& playerIt : m_playerMap ) - { - auto player = playerIt.second; - player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000009 ) ); - } + for( const auto& playerIt : m_playerMap ) + { + auto player = playerIt.second; + player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000009 ) ); + } } void Core::InstanceContent::onRegisterEObj( Entity::EventObjectPtr object ) { - if( object->getName() != "none" ) - m_eventObjectMap[object->getName()] = object; - if( object->getObjectId() == 2000182 ) // start - m_pEntranceEObj = object; - - auto pLog = g_fw.get< Logger >(); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto objData = pExdData->get< Core::Data::EObj >( object->getObjectId() ); - if( objData ) - // todo: data should be renamed to eventId - m_eventIdToObjectMap[objData->data] = object; - else - pLog->error( "InstanceContent::onRegisterEObj Zone " + - m_internalName + ": No EObj data found for EObj with ID: " + - std::to_string( object->getObjectId() ) ); + if( object->getName() != "none" ) + m_eventObjectMap[ object->getName() ] = object; + if( object->getObjectId() == 2000182 ) // start + m_pEntranceEObj = object; + + auto pLog = g_fw.get< Logger >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto objData = pExdData->get< Core::Data::EObj >( object->getObjectId() ); + if( objData ) + // todo: data should be renamed to eventId + m_eventIdToObjectMap[ objData->data ] = object; + else + pLog->error( "InstanceContent::onRegisterEObj Zone " + + m_internalName + ": No EObj data found for EObj with ID: " + + std::to_string( object->getObjectId() ) ); } -bool Core::InstanceContent::hasPlayerPreviouslySpawned( Entity::Player &player ) const +bool Core::InstanceContent::hasPlayerPreviouslySpawned( Entity::Player& player ) const { - auto it = m_spawnedPlayers.find( player.getId() ); - return it != m_spawnedPlayers.end(); + auto it = m_spawnedPlayers.find( player.getId() ); + return it != m_spawnedPlayers.end(); } Core::InstanceContent::InstanceContentState Core::InstanceContent::getState() const { - return m_state; + return m_state; } void Core::InstanceContent::onBeforePlayerZoneIn( Core::Entity::Player& player ) { - // remove any players from the instance who aren't bound on zone in - if( !isPlayerBound( player.getId() ) ) - player.exitInstance(); + // remove any players from the instance who aren't bound on zone in + if( !isPlayerBound( player.getId() ) ) + player.exitInstance(); - // if a player has already spawned once inside this instance, don't move them if they happen to zone in again - if( !hasPlayerPreviouslySpawned( player ) ) - { - if( m_pEntranceEObj != nullptr ) - { - player.setRot( PI ); - player.setPos( m_pEntranceEObj->getPos() ); - } - else - { - player.setRot( PI ); - player.setPos( { 0.f, 0.f, 0.f } ); - } - } + // if a player has already spawned once inside this instance, don't move them if they happen to zone in again + if( !hasPlayerPreviouslySpawned( player ) ) + { + if( m_pEntranceEObj != nullptr ) + { + player.setRot( PI ); + player.setPos( m_pEntranceEObj->getPos() ); + } + else + { + player.setRot( PI ); + player.setPos( { 0.f, 0.f, 0.f } ); + } + } - player.resetObjSpawnIndex(); + player.resetObjSpawnIndex(); } Core::Entity::EventObjectPtr Core::InstanceContent::getEObjByName( const std::string& name ) { - auto it = m_eventObjectMap.find( name ); - if( it == m_eventObjectMap.end() ) - return nullptr; + auto it = m_eventObjectMap.find( name ); + if( it == m_eventObjectMap.end() ) + return nullptr; - return it->second; + return it->second; } void Core::InstanceContent::onTalk( Core::Entity::Player& player, uint32_t eventId, uint64_t actorId ) { - // todo: handle exit (and maybe shortcut?) behaviour here + // todo: handle exit (and maybe shortcut?) behaviour here - auto it = m_eventIdToObjectMap.find( eventId ); - if( it == m_eventIdToObjectMap.end() ) - return; + auto it = m_eventIdToObjectMap.find( eventId ); + if( it == m_eventIdToObjectMap.end() ) + return; - if( auto onTalk = it->second->getOnTalkHandler() ) - onTalk( player, it->second, getAsInstanceContent(), actorId ); - else - player.sendDebug( "No onTalk handler found for interactable eobj with EObjID: " + - std::to_string( it->second->getObjectId() ) + ", eventId: " + std::to_string( eventId ) ); + if( auto onTalk = it->second->getOnTalkHandler() ) + onTalk( player, it->second, getAsInstanceContent(), actorId ); + else + player.sendDebug( "No onTalk handler found for interactable eobj with EObjID: " + + std::to_string( it->second->getObjectId() ) + ", eventId: " + std::to_string( eventId ) ); } -void Core::InstanceContent::onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) +void +Core::InstanceContent::onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - pScriptMgr->onInstanceEnterTerritory( getAsInstanceContent(), player, eventId, param1, param2 ); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + pScriptMgr->onInstanceEnterTerritory( getAsInstanceContent(), player, eventId, param1, param2 ); - if( !hasPlayerPreviouslySpawned( player ) ) - { - m_spawnedPlayers.insert( player.getId() ); - player.directorPlayScene( getDirectorId(), 1, NO_DEFAULT_CAMERA | CONDITION_CUTSCENE | SILENT_ENTER_TERRI_ENV | - HIDE_HOTBAR | SILENT_ENTER_TERRI_BGM | SILENT_ENTER_TERRI_SE | - DISABLE_STEALTH | 0x00100000 | LOCK_HUD | LOCK_HOTBAR | // todo: wtf is 0x00100000 - DISABLE_CANCEL_EMOTE, 0, 0x9, getCurrentBGM() ); - } - else - player.directorPlayScene( getDirectorId(), 2, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 0x9, getCurrentBGM() ); + if( !hasPlayerPreviouslySpawned( player ) ) + { + m_spawnedPlayers.insert( player.getId() ); + player.directorPlayScene( getDirectorId(), 1, NO_DEFAULT_CAMERA | CONDITION_CUTSCENE | SILENT_ENTER_TERRI_ENV | + HIDE_HOTBAR | SILENT_ENTER_TERRI_BGM | SILENT_ENTER_TERRI_SE | + DISABLE_STEALTH | 0x00100000 | LOCK_HUD | LOCK_HOTBAR | + // todo: wtf is 0x00100000 + DISABLE_CANCEL_EMOTE, 0, 0x9, getCurrentBGM() ); + } + else + player.directorPlayScene( getDirectorId(), 2, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 0x9, getCurrentBGM() ); } void Core::InstanceContent::setCurrentBGM( uint16_t bgmIndex ) { - m_currentBgm = bgmIndex; + m_currentBgm = bgmIndex; - for( const auto& playerIt : m_playerMap ) - { - auto player = playerIt.second; - // note: retail do send a BGM_MUTE(1) first before any BGM transition, but YOLO in this case. - // also do note that this code can't control the bgm granularly. (i.e. per player for WoD submap.) oops. - // player->queuePacket( ActorControlPacket143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000001, 1 ) ); - player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000001, bgmIndex ) ); - } + for( const auto& playerIt : m_playerMap ) + { + auto player = playerIt.second; + // note: retail do send a BGM_MUTE(1) first before any BGM transition, but YOLO in this case. + // also do note that this code can't control the bgm granularly. (i.e. per player for WoD submap.) oops. + // player->queuePacket( ActorControlPacket143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000001, 1 ) ); + player->queuePacket( + makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000001, bgmIndex ) ); + } } void Core::InstanceContent::setPlayerBGM( Core::Entity::Player& player, uint16_t bgmId ) { - player.queuePacket( makeActorControl143( player.getId(), DirectorUpdate, getDirectorId(), 0x80000001, bgmId ) ); + player.queuePacket( makeActorControl143( player.getId(), DirectorUpdate, getDirectorId(), 0x80000001, bgmId ) ); } uint16_t Core::InstanceContent::getCurrentBGM() const { - return m_currentBgm; + return m_currentBgm; } bool Core::InstanceContent::bindPlayer( uint32_t playerId ) { - // if player already bound, return false - if( m_boundPlayerIds.count( playerId ) ) - return false; + // if player already bound, return false + if( m_boundPlayerIds.count( playerId ) ) + return false; - // TODO: do not allow binding of players if instance already has all it can take - // if( m_boundPlayerIds.size() >= party resttrictions ) - // return false; + // TODO: do not allow binding of players if instance already has all it can take + // if( m_boundPlayerIds.size() >= party restrictions ) + // return false; - m_boundPlayerIds.insert( playerId ); - return true; + m_boundPlayerIds.insert( playerId ); + return true; } bool Core::InstanceContent::isPlayerBound( uint32_t playerId ) const { - return m_boundPlayerIds.count( playerId ) > 0; + return m_boundPlayerIds.count( playerId ) > 0; } void Core::InstanceContent::unbindPlayer( uint32_t playerId ) { - m_boundPlayerIds.erase( playerId ); + m_boundPlayerIds.erase( playerId ); - auto it = m_playerMap.find( playerId ); - if( it != m_playerMap.end() ) - it->second->exitInstance(); + auto it = m_playerMap.find( playerId ); + if( it != m_playerMap.end() ) + it->second->exitInstance(); } diff --git a/src/servers/sapphire_zone/Zone/InstanceContent.h b/src/servers/sapphire_zone/Zone/InstanceContent.h index 39c68d4b..f451e0b6 100644 --- a/src/servers/sapphire_zone/Zone/InstanceContent.h +++ b/src/servers/sapphire_zone/Zone/InstanceContent.h @@ -5,96 +5,112 @@ #include "Event/Director.h" #include "Forwards.h" -namespace Core -{ - namespace Data - { - struct InstanceContent; - } -class InstanceContent : public Event::Director, public Zone +namespace Core { +namespace Data { +struct InstanceContent; +} +class InstanceContent : + public Event::Director, public Zone { public: - enum InstanceContentState - { - Created, - DutyReset, - DutyInProgress, - DutyFinished - }; + enum InstanceContentState + { + Created, + DutyReset, + DutyInProgress, + DutyFinished + }; - InstanceContent( boost::shared_ptr< Core::Data::InstanceContent > pInstanceConfiguration, - uint32_t guId, - const std::string& internalName, - const std::string& contentName, - uint32_t instanceContentId ); - virtual ~InstanceContent(); + InstanceContent( boost::shared_ptr< Core::Data::InstanceContent > pInstanceConfiguration, + uint32_t guId, + const std::string& internalName, + const std::string& contentName, + uint32_t instanceContentId ); - bool init() override; - void onBeforePlayerZoneIn( Entity::Player& player ) override; - void onPlayerZoneIn( Entity::Player& player ) override; - void onLeaveTerritory( Entity::Player& player ) override; - void onFinishLoading( Entity::Player& player ) override; - void onInitDirector( Entity::Player& player ) override; - void onDirectorSync( Entity::Player& player ) override; - void onUpdate( uint32_t currTime ) override; - void onTalk( Entity::Player& player, uint32_t eventId, uint64_t actorId ); - void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override; + virtual ~InstanceContent(); - void onRegisterEObj( Entity::EventObjectPtr object ) override; + bool init() override; - void setVar( uint8_t index, uint8_t value ); - void setSequence( uint8_t value ); - void setBranch( uint8_t value ); + void onBeforePlayerZoneIn( Entity::Player& player ) override; - void startQte(); - void startEventCutscene(); - void endEventCutscene(); + void onPlayerZoneIn( Entity::Player& player ) override; - /*! set the current bgm index (inside bgm.exd) */ - void setCurrentBGM( uint16_t bgmId ); - /*! set the current bgm for a specific player */ - void setPlayerBGM( Entity::Player& player, uint16_t bgmId ); - /*! get the currently playing bgm index */ - uint16_t getCurrentBGM() const; + void onLeaveTerritory( Entity::Player& player ) override; - bool hasPlayerPreviouslySpawned( Entity::Player& player ) const; - InstanceContentState getState() const; + void onFinishLoading( Entity::Player& player ) override; - boost::shared_ptr< Core::Data::InstanceContent > getInstanceConfiguration() const; + void onInitDirector( Entity::Player& player ) override; - uint32_t getInstanceContentId() const; + void onDirectorSync( Entity::Player& player ) override; - Entity::EventObjectPtr getEObjByName( const std::string& name ); + void onUpdate( uint32_t currTime ) override; - /*! binds a player to the instance */ - bool bindPlayer( uint32_t playerId ); + void onTalk( Entity::Player& player, uint32_t eventId, uint64_t actorId ); - /*! removes bind of player from the instance */ - void unbindPlayer( uint32_t playerId ); + void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override; - /*! return true if the player is bound to the instance */ - bool isPlayerBound( uint32_t playerId ) const; + void onRegisterEObj( Entity::EventObjectPtr object ) override; - /*! number of milliseconds after all players are ready for the instance to commence (spawn circle removed) */ - const uint32_t instanceStartDelay = 1250; + void setVar( uint8_t index, uint8_t value ); + + void setSequence( uint8_t value ); + + void setBranch( uint8_t value ); + + void startQte(); + + void startEventCutscene(); + + void endEventCutscene(); + + /*! set the current bgm index (inside bgm.exd) */ + void setCurrentBGM( uint16_t bgmId ); + + /*! set the current bgm for a specific player */ + void setPlayerBGM( Entity::Player& player, uint16_t bgmId ); + + /*! get the currently playing bgm index */ + uint16_t getCurrentBGM() const; + + bool hasPlayerPreviouslySpawned( Entity::Player& player ) const; + + InstanceContentState getState() const; + + boost::shared_ptr< Core::Data::InstanceContent > getInstanceConfiguration() const; + + uint32_t getInstanceContentId() const; + + Entity::EventObjectPtr getEObjByName( const std::string& name ); + + /*! binds a player to the instance */ + bool bindPlayer( uint32_t playerId ); + + /*! removes bind of player from the instance */ + void unbindPlayer( uint32_t playerId ); + + /*! return true if the player is bound to the instance */ + bool isPlayerBound( uint32_t playerId ) const; + + /*! number of milliseconds after all players are ready for the instance to commence (spawn circle removed) */ + const uint32_t instanceStartDelay = 1250; private: - boost::shared_ptr< Core::Data::InstanceContent > m_instanceConfiguration; - uint32_t m_instanceContentId; - InstanceContentState m_state; - uint16_t m_currentBgm; + boost::shared_ptr< Core::Data::InstanceContent > m_instanceConfiguration; + uint32_t m_instanceContentId; + InstanceContentState m_state; + uint16_t m_currentBgm; - int64_t m_instanceExpireTime; - uint64_t m_instanceCommenceTime; + int64_t m_instanceExpireTime; + uint64_t m_instanceCommenceTime; - Entity::EventObjectPtr m_pEntranceEObj; + Entity::EventObjectPtr m_pEntranceEObj; - std::map< std::string, Entity::EventObjectPtr > m_eventObjectMap; - std::unordered_map< uint32_t, Entity::EventObjectPtr > m_eventIdToObjectMap; - std::set< uint32_t > m_spawnedPlayers; + std::map< std::string, Entity::EventObjectPtr > m_eventObjectMap; + std::unordered_map< uint32_t, Entity::EventObjectPtr > m_eventIdToObjectMap; + std::set< uint32_t > m_spawnedPlayers; - // the players which are bound to the instance, regardless of inside or offline - std::set< uint32_t > m_boundPlayerIds; + // the players which are bound to the instance, regardless of inside or offline + std::set< uint32_t > m_boundPlayerIds; }; } diff --git a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp index a24033fa..105787eb 100644 --- a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp +++ b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp @@ -16,424 +16,425 @@ extern Core::Framework g_fw; Core::TerritoryMgr::TerritoryMgr() : - m_lastInstanceId( 10000 ) + m_lastInstanceId( 10000 ) { } void Core::TerritoryMgr::loadTerritoryTypeDetailCache() { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto idList = pExdData->getTerritoryTypeIdList(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto idList = pExdData->getTerritoryTypeIdList(); - for( auto id : idList ) - { - auto teri1 = pExdData->get< Core::Data::TerritoryType >( id ); + for( auto id : idList ) + { + auto teri1 = pExdData->get< Core::Data::TerritoryType >( id ); - if( !teri1->name.empty() ) - m_territoryTypeDetailCacheMap[id] = teri1; - } + if( !teri1->name.empty() ) + m_territoryTypeDetailCacheMap[ id ] = teri1; + } } bool Core::TerritoryMgr::isValidTerritory( uint32_t territoryTypeId ) const { - return !( m_territoryTypeDetailCacheMap.find( territoryTypeId ) == m_territoryTypeDetailCacheMap.end() ); + return !( m_territoryTypeDetailCacheMap.find( territoryTypeId ) == m_territoryTypeDetailCacheMap.end() ); } bool Core::TerritoryMgr::init() { - loadTerritoryTypeDetailCache(); - loadTerritoryPositionMap(); + loadTerritoryTypeDetailCache(); + loadTerritoryPositionMap(); - createDefaultTerritories(); - createHousingTerritories(); + createDefaultTerritories(); + createHousingTerritories(); - return true; + return true; } uint32_t Core::TerritoryMgr::getNextInstanceId() { - return ++m_lastInstanceId; + return ++m_lastInstanceId; } Core::Data::TerritoryTypePtr Core::TerritoryMgr::getTerritoryDetail( uint32_t territoryTypeId ) const { - auto tIt = m_territoryTypeDetailCacheMap.find( territoryTypeId ); - if( tIt == m_territoryTypeDetailCacheMap.end() ) - return nullptr; + auto tIt = m_territoryTypeDetailCacheMap.find( territoryTypeId ); + if( tIt == m_territoryTypeDetailCacheMap.end() ) + return nullptr; - return tIt->second; + return tIt->second; } bool Core::TerritoryMgr::isInstanceContentTerritory( uint32_t territoryTypeId ) const { - auto pTeri = getTerritoryDetail( territoryTypeId ); + auto pTeri = getTerritoryDetail( territoryTypeId ); - if( !pTeri ) - return false; + if( !pTeri ) + return false; - auto intendedUse = pTeri->territoryIntendedUse; + auto intendedUse = pTeri->territoryIntendedUse; - return intendedUse == TerritoryIntendedUse::AllianceRaid || - intendedUse == TerritoryIntendedUse::BeforeTrialDung || - intendedUse == TerritoryIntendedUse::Trial || - intendedUse == TerritoryIntendedUse::Dungeon || - intendedUse == TerritoryIntendedUse::OpenWorldInstanceBattle || - intendedUse == TerritoryIntendedUse::PalaceOfTheDead || - intendedUse == TerritoryIntendedUse::RaidFights || - intendedUse == TerritoryIntendedUse::Raids || - intendedUse == TerritoryIntendedUse::TreasureMapInstance || - intendedUse == TerritoryIntendedUse::EventTrial; + return intendedUse == TerritoryIntendedUse::AllianceRaid || + intendedUse == TerritoryIntendedUse::BeforeTrialDung || + intendedUse == TerritoryIntendedUse::Trial || + intendedUse == TerritoryIntendedUse::Dungeon || + intendedUse == TerritoryIntendedUse::OpenWorldInstanceBattle || + intendedUse == TerritoryIntendedUse::PalaceOfTheDead || + intendedUse == TerritoryIntendedUse::RaidFights || + intendedUse == TerritoryIntendedUse::Raids || + intendedUse == TerritoryIntendedUse::TreasureMapInstance || + intendedUse == TerritoryIntendedUse::EventTrial; } bool Core::TerritoryMgr::isPrivateTerritory( uint32_t territoryTypeId ) const { - auto pTeri = getTerritoryDetail( territoryTypeId ); + auto pTeri = getTerritoryDetail( territoryTypeId ); - if( !pTeri ) - return false; + if( !pTeri ) + return false; - return pTeri->territoryIntendedUse == TerritoryIntendedUse::OpeningArea || - pTeri->territoryIntendedUse == TerritoryIntendedUse::Inn || - pTeri->territoryIntendedUse == TerritoryIntendedUse::HousingPrivateArea || - pTeri->territoryIntendedUse == TerritoryIntendedUse::JailArea || - pTeri->territoryIntendedUse == TerritoryIntendedUse::MSQPrivateArea; + return pTeri->territoryIntendedUse == TerritoryIntendedUse::OpeningArea || + pTeri->territoryIntendedUse == TerritoryIntendedUse::Inn || + pTeri->territoryIntendedUse == TerritoryIntendedUse::HousingPrivateArea || + pTeri->territoryIntendedUse == TerritoryIntendedUse::JailArea || + pTeri->territoryIntendedUse == TerritoryIntendedUse::MSQPrivateArea; } bool Core::TerritoryMgr::createDefaultTerritories() { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pLog = g_fw.get< Logger >(); - // for each entry in territoryTypeExd, check if it is a normal and if so, add the zone object - for( const auto& territory : m_territoryTypeDetailCacheMap ) - { - auto territoryId = territory.first; - auto territoryInfo = territory.second; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pLog = g_fw.get< Logger >(); + // for each entry in territoryTypeExd, check if it is a normal and if so, add the zone object + for( const auto& territory : m_territoryTypeDetailCacheMap ) + { + auto territoryId = territory.first; + auto territoryInfo = territory.second; - // if the zone has no name set - if( territoryInfo->name.empty() ) - continue; + // if the zone has no name set + if( territoryInfo->name.empty() ) + continue; - auto pPlaceName = pExdData->get< Core::Data::PlaceName >( territoryInfo->placeName ); + auto pPlaceName = pExdData->get< Core::Data::PlaceName >( territoryInfo->placeName ); - if( !pPlaceName || pPlaceName->name.empty() || !isDefaultTerritory( territoryId ) ) - continue; + if( !pPlaceName || pPlaceName->name.empty() || !isDefaultTerritory( territoryId ) ) + continue; - uint32_t guid = getNextInstanceId(); - pLog->info( std::to_string( territoryId ) + - "\t" + std::to_string( guid ) + - "\t" + std::to_string( territoryInfo->territoryIntendedUse ) + - "\t" + ( territoryInfo->name.length() <= 4 ? territoryInfo->name + "\t" : territoryInfo->name ) + - "\t" + ( isPrivateTerritory( territoryId ) ? "PRIVATE" : "PUBLIC" ) + - "\t" + pPlaceName->name ); + uint32_t guid = getNextInstanceId(); + pLog->info( std::to_string( territoryId ) + + "\t" + std::to_string( guid ) + + "\t" + std::to_string( territoryInfo->territoryIntendedUse ) + + "\t" + ( territoryInfo->name.length() <= 4 ? territoryInfo->name + "\t" : territoryInfo->name ) + + "\t" + ( isPrivateTerritory( territoryId ) ? "PRIVATE" : "PUBLIC" ) + + "\t" + pPlaceName->name ); - auto pZone = make_Zone( territoryId, guid, territoryInfo->name, pPlaceName->name ); - pZone->init(); + auto pZone = make_Zone( territoryId, guid, territoryInfo->name, pPlaceName->name ); + pZone->init(); - InstanceIdToZonePtrMap instanceMap; - instanceMap[guid] = pZone; - m_instanceIdToZonePtrMap[guid] = pZone; - m_territoryIdToInstanceGuidMap[territoryId] = instanceMap; - m_zoneSet.insert( { pZone } ); + InstanceIdToZonePtrMap instanceMap; + instanceMap[ guid ] = pZone; + m_instanceIdToZonePtrMap[ guid ] = pZone; + m_territoryIdToInstanceGuidMap[ territoryId ] = instanceMap; + m_zoneSet.insert( { pZone } ); - } + } - return true; + return true; } bool Core::TerritoryMgr::createHousingTerritories() { - //separate housing zones from default - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pLog = g_fw.get< Logger >(); - for( const auto& territory : m_territoryTypeDetailCacheMap ) - { - auto territoryId = territory.first; - auto territoryInfo = territory.second; - uint32_t wardNum; - uint32_t wardMaxNum = 1; + //separate housing zones from default + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pLog = g_fw.get< Logger >(); + for( const auto& territory : m_territoryTypeDetailCacheMap ) + { + auto territoryId = territory.first; + auto territoryInfo = territory.second; + uint32_t wardNum; + uint32_t wardMaxNum = 1; - if( territoryInfo->name.empty() ) - continue; + if( territoryInfo->name.empty() ) + continue; - auto pPlaceName = pExdData->get< Core::Data::PlaceName >( territoryInfo->placeName ); + auto pPlaceName = pExdData->get< Core::Data::PlaceName >( territoryInfo->placeName ); - if( !pPlaceName || pPlaceName->name.empty() || !isHousingTerritory( territoryId ) ) - continue; + if( !pPlaceName || pPlaceName->name.empty() || !isHousingTerritory( territoryId ) ) + continue; - for( wardNum = 0; wardNum < wardMaxNum; wardNum++ ) - { - uint32_t guid = getNextInstanceId(); - pLog->info( std::to_string( territoryId ) + - "\t" + std::to_string( guid ) + - "\t" + std::to_string( territoryInfo->territoryIntendedUse ) + - "\t" + ( territoryInfo->name.length() <= 4 ? territoryInfo->name + "\t" : territoryInfo->name ) + - "\t" + "HOUSING" + - "\t" + pPlaceName->name + - "#" + std::to_string( wardNum ) ); + for( wardNum = 0; wardNum < wardMaxNum; wardNum++ ) + { + uint32_t guid = getNextInstanceId(); + pLog->info( std::to_string( territoryId ) + + "\t" + std::to_string( guid ) + + "\t" + std::to_string( territoryInfo->territoryIntendedUse ) + + "\t" + ( territoryInfo->name.length() <= 4 ? territoryInfo->name + "\t" : territoryInfo->name ) + + "\t" + "HOUSING" + + "\t" + pPlaceName->name + + "#" + std::to_string( wardNum ) ); - auto pHousingZone = make_HousingZone( wardNum, territoryId, guid, territoryInfo->name, pPlaceName->name ); - pHousingZone->init(); - wardMaxNum = pHousingZone->m_wardMaxNum; + auto pHousingZone = make_HousingZone( wardNum, territoryId, guid, territoryInfo->name, pPlaceName->name ); + pHousingZone->init(); + wardMaxNum = pHousingZone->m_wardMaxNum; - InstanceIdToZonePtrMap instanceMap; - instanceMap[guid] = pHousingZone; - m_instanceIdToZonePtrMap[guid] = pHousingZone; - m_territoryIdToInstanceGuidMap[territoryId][guid] = pHousingZone; - m_zoneSet.insert( { pHousingZone } ); - } + InstanceIdToZonePtrMap instanceMap; + instanceMap[ guid ] = pHousingZone; + m_instanceIdToZonePtrMap[ guid ] = pHousingZone; + m_territoryIdToInstanceGuidMap[ territoryId ][ guid ] = pHousingZone; + m_zoneSet.insert( { pHousingZone } ); + } - } + } - return true; + return true; } Core::ZonePtr Core::TerritoryMgr::createTerritoryInstance( uint32_t territoryTypeId ) { - if( !isValidTerritory( territoryTypeId ) ) - return nullptr; + if( !isValidTerritory( territoryTypeId ) ) + return nullptr; - if( isInstanceContentTerritory( territoryTypeId ) ) - return nullptr; + if( isInstanceContentTerritory( territoryTypeId ) ) + return nullptr; - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pLog = g_fw.get< Logger >(); - auto pTeri = getTerritoryDetail( territoryTypeId ); - auto pPlaceName = pExdData->get< Core::Data::PlaceName >( pTeri->placeName ); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pLog = g_fw.get< Logger >(); + auto pTeri = getTerritoryDetail( territoryTypeId ); + auto pPlaceName = pExdData->get< Core::Data::PlaceName >( pTeri->placeName ); - if( !pTeri || !pPlaceName ) - return nullptr; + if( !pTeri || !pPlaceName ) + return nullptr; - pLog->debug( "Starting instance for territory: " + std::to_string( territoryTypeId ) + " (" + pPlaceName->name + ")" ); + pLog->debug( + "Starting instance for territory: " + std::to_string( territoryTypeId ) + " (" + pPlaceName->name + ")" ); - auto pZone = make_Zone( territoryTypeId, getNextInstanceId(), pTeri->name, pPlaceName->name ); - pZone->init(); + auto pZone = make_Zone( territoryTypeId, getNextInstanceId(), pTeri->name, pPlaceName->name ); + pZone->init(); - m_instanceIdToZonePtrMap[pZone->getGuId()] = pZone; - m_territoryIdToInstanceGuidMap[pZone->getTerritoryId()][pZone->getGuId()] = pZone; - m_zoneSet.insert( { pZone } ); + m_instanceIdToZonePtrMap[ pZone->getGuId() ] = pZone; + m_territoryIdToInstanceGuidMap[ pZone->getTerritoryId() ][ pZone->getGuId() ] = pZone; + m_zoneSet.insert( { pZone } ); - return pZone; + return pZone; } Core::ZonePtr Core::TerritoryMgr::createInstanceContent( uint32_t instanceContentId ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pInstanceContent = pExdData->get< Core::Data::InstanceContent >( instanceContentId ); - if( !pInstanceContent ) - return nullptr; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pInstanceContent = pExdData->get< Core::Data::InstanceContent >( instanceContentId ); + if( !pInstanceContent ) + return nullptr; - if( !isInstanceContentTerritory( pInstanceContent->territoryType ) ) - return nullptr; + if( !isInstanceContentTerritory( pInstanceContent->territoryType ) ) + return nullptr; - auto pTeri = getTerritoryDetail( pInstanceContent->territoryType ); + auto pTeri = getTerritoryDetail( pInstanceContent->territoryType ); - if( !pTeri || pInstanceContent->name.empty() ) - return nullptr; + if( !pTeri || pInstanceContent->name.empty() ) + return nullptr; - auto pLog = g_fw.get< Logger >(); - pLog->debug( "Starting instance for InstanceContent id: " + std::to_string( instanceContentId ) + - " (" + pInstanceContent->name + ")" ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( "Starting instance for InstanceContent id: " + std::to_string( instanceContentId ) + + " (" + pInstanceContent->name + ")" ); - auto pZone = make_InstanceContent( pInstanceContent, getNextInstanceId(), - pTeri->name, pInstanceContent->name, instanceContentId ); - pZone->init(); + auto pZone = make_InstanceContent( pInstanceContent, getNextInstanceId(), + pTeri->name, pInstanceContent->name, instanceContentId ); + pZone->init(); - m_instanceContentToInstanceMap[instanceContentId][pZone->getGuId()] = pZone; - m_instanceIdToZonePtrMap[pZone->getGuId()] = pZone; - m_instanceZoneSet.insert( pZone ); + m_instanceContentToInstanceMap[ instanceContentId ][ pZone->getGuId() ] = pZone; + m_instanceIdToZonePtrMap[ pZone->getGuId() ] = pZone; + m_instanceZoneSet.insert( pZone ); - return pZone; + return pZone; } bool Core::TerritoryMgr::removeTerritoryInstance( uint32_t instanceId ) { - ZonePtr pZone; - if( ( pZone = getInstanceZonePtr( instanceId ) ) == nullptr ) - return false; + ZonePtr pZone; + if( ( pZone = getInstanceZonePtr( instanceId ) ) == nullptr ) + return false; - m_instanceIdToZonePtrMap.erase( pZone->getGuId() ); + m_instanceIdToZonePtrMap.erase( pZone->getGuId() ); - m_instanceZoneSet.erase( pZone ); - m_zoneSet.erase( pZone ); + m_instanceZoneSet.erase( pZone ); + m_zoneSet.erase( pZone ); - if( isInstanceContentTerritory( pZone->getTerritoryId() ) ) - { - auto instance = boost::dynamic_pointer_cast< InstanceContent >( pZone ); - m_instanceContentToInstanceMap[instance->getInstanceContentId()].erase( pZone->getGuId() ); - } - else - m_territoryIdToInstanceGuidMap[pZone->getTerritoryId()].erase( pZone->getGuId() ); + if( isInstanceContentTerritory( pZone->getTerritoryId() ) ) + { + auto instance = boost::dynamic_pointer_cast< InstanceContent >( pZone ); + m_instanceContentToInstanceMap[ instance->getInstanceContentId() ].erase( pZone->getGuId() ); + } + else + m_territoryIdToInstanceGuidMap[ pZone->getTerritoryId() ].erase( pZone->getGuId() ); - return true; + return true; } Core::ZonePtr Core::TerritoryMgr::getInstanceZonePtr( uint32_t instanceId ) const { - auto it = m_instanceIdToZonePtrMap.find( instanceId ); - if( it == m_instanceIdToZonePtrMap.end() ) - return nullptr; + auto it = m_instanceIdToZonePtrMap.find( instanceId ); + if( it == m_instanceIdToZonePtrMap.end() ) + return nullptr; - return it->second; + return it->second; } void Core::TerritoryMgr::loadTerritoryPositionMap() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto pQR = pDb->query( "SELECT id, target_zone_id, pos_x, pos_y, pos_z, pos_o, radius FROM zonepositions;" ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pQR = pDb->query( "SELECT id, target_zone_id, pos_x, pos_y, pos_z, pos_o, radius FROM zonepositions;" ); - while( pQR->next() ) - { - uint32_t id = pQR->getUInt( 1 ); - uint32_t targetZoneId = pQR->getUInt( 2 ); - Common::FFXIVARR_POSITION3 pos{}; - pos.x = pQR->getFloat( 3 ); - pos.y = pQR->getFloat( 4 ); - pos.z = pQR->getFloat( 5 ); - float posO = pQR->getFloat( 6 ); - uint32_t radius = pQR->getUInt( 7 ); + while( pQR->next() ) + { + uint32_t id = pQR->getUInt( 1 ); + uint32_t targetZoneId = pQR->getUInt( 2 ); + Common::FFXIVARR_POSITION3 pos{}; + pos.x = pQR->getFloat( 3 ); + pos.y = pQR->getFloat( 4 ); + pos.z = pQR->getFloat( 5 ); + float posO = pQR->getFloat( 6 ); + uint32_t radius = pQR->getUInt( 7 ); - m_territoryPositionMap[id] = make_ZonePosition( id, targetZoneId, pos, radius, posO ); - } + m_territoryPositionMap[ id ] = make_ZonePosition( id, targetZoneId, pos, radius, posO ); + } } bool Core::TerritoryMgr::isDefaultTerritory( uint32_t territoryTypeId ) const { - auto pTeri = getTerritoryDetail( territoryTypeId ); + auto pTeri = getTerritoryDetail( territoryTypeId ); - if( !pTeri ) - return false; + if( !pTeri ) + return false; - return pTeri->territoryIntendedUse == TerritoryIntendedUse::Inn || - pTeri->territoryIntendedUse == TerritoryIntendedUse::Town || - pTeri->territoryIntendedUse == TerritoryIntendedUse::OpenWorld || - pTeri->territoryIntendedUse == TerritoryIntendedUse::OpeningArea; + return pTeri->territoryIntendedUse == TerritoryIntendedUse::Inn || + pTeri->territoryIntendedUse == TerritoryIntendedUse::Town || + pTeri->territoryIntendedUse == TerritoryIntendedUse::OpenWorld || + pTeri->territoryIntendedUse == TerritoryIntendedUse::OpeningArea; } -bool Core::TerritoryMgr::isHousingTerritory(uint32_t territoryTypeId) const +bool Core::TerritoryMgr::isHousingTerritory( uint32_t territoryTypeId ) const { - auto pTeri = getTerritoryDetail( territoryTypeId ); + auto pTeri = getTerritoryDetail( territoryTypeId ); - if( !pTeri ) - return false; + if( !pTeri ) + return false; - return pTeri->territoryIntendedUse == TerritoryIntendedUse::HousingArea; + return pTeri->territoryIntendedUse == TerritoryIntendedUse::HousingArea; } Core::ZonePositionPtr Core::TerritoryMgr::getTerritoryPosition( uint32_t territoryPositionId ) const { - auto it = m_territoryPositionMap.find( territoryPositionId ); + auto it = m_territoryPositionMap.find( territoryPositionId ); - if( it != m_territoryPositionMap.end() ) - return it->second; + if( it != m_territoryPositionMap.end() ) + return it->second; - return nullptr; + return nullptr; } Core::ZonePtr Core::TerritoryMgr::getZoneByTerriId( uint32_t territoryId ) const { - auto zoneMap = m_territoryIdToInstanceGuidMap.find( territoryId ); - if( zoneMap == m_territoryIdToInstanceGuidMap.end() ) - return nullptr; + auto zoneMap = m_territoryIdToInstanceGuidMap.find( territoryId ); + if( zoneMap == m_territoryIdToInstanceGuidMap.end() ) + return nullptr; - // TODO: actually select the proper one - return zoneMap->second.begin()->second; + // TODO: actually select the proper one + return zoneMap->second.begin()->second; } void Core::TerritoryMgr::updateTerritoryInstances( uint32_t currentTime ) { - for( auto& zone : m_zoneSet ) - { - zone->update( currentTime ); - } + for( auto& zone : m_zoneSet ) + { + zone->update( currentTime ); + } - for( auto& zone : m_instanceZoneSet ) - { - zone->update( currentTime ); - } + for( auto& zone : m_instanceZoneSet ) + { + zone->update( currentTime ); + } } Core::TerritoryMgr::InstanceIdList Core::TerritoryMgr::getInstanceContentIdList( uint16_t instanceContentId ) const { - std::vector< uint32_t > idList; - auto zoneMap = m_instanceContentToInstanceMap.find( instanceContentId ); - if( zoneMap == m_instanceContentToInstanceMap.end() ) - return idList; + std::vector< uint32_t > idList; + auto zoneMap = m_instanceContentToInstanceMap.find( instanceContentId ); + if( zoneMap == m_instanceContentToInstanceMap.end() ) + return idList; - for( auto& entry : zoneMap->second ) - { - idList.push_back( entry.first ); - } + for( auto& entry : zoneMap->second ) + { + idList.push_back( entry.first ); + } - return idList; + return idList; } bool Core::TerritoryMgr::movePlayer( uint32_t territoryId, Core::Entity::PlayerPtr pPlayer ) { - auto pZone = getZoneByTerriId( territoryId ); - assert( pZone ); - return movePlayer( pZone, pPlayer ); + auto pZone = getZoneByTerriId( territoryId ); + assert( pZone ); + return movePlayer( pZone, pPlayer ); } bool Core::TerritoryMgr::movePlayer( ZonePtr pZone, Core::Entity::PlayerPtr pPlayer ) { - auto pLog = g_fw.get< Logger >(); - if( !pZone ) - { - pLog->error( "Zone not found on this server." ); - return false; - } + auto pLog = g_fw.get< Logger >(); + if( !pZone ) + { + pLog->error( "Zone not found on this server." ); + return false; + } - pPlayer->initSpawnIdQueue(); + pPlayer->initSpawnIdQueue(); - pPlayer->setTerritoryId( pZone->getTerritoryId() ); + pPlayer->setTerritoryId( pZone->getTerritoryId() ); - // mark character as zoning in progress - pPlayer->setLoadingComplete( false ); + // mark character as zoning in progress + pPlayer->setLoadingComplete( false ); - //if( pPlayer->getLastPing() != 0 ) - // pPlayer->getCurrentZone()->removeActor( pPlayer ); + //if( pPlayer->getLastPing() != 0 ) + // pPlayer->getCurrentZone()->removeActor( pPlayer ); - pPlayer->setCurrentZone( pZone ); - pZone->pushActor( pPlayer ); + pPlayer->setCurrentZone( pZone ); + pZone->pushActor( pPlayer ); - // map player to instanceId so it can be tracked. - m_playerIdToInstanceMap[pPlayer->getId()] = pZone->getGuId(); + // map player to instanceId so it can be tracked. + m_playerIdToInstanceMap[ pPlayer->getId() ] = pZone->getGuId(); - return true; + return true; } Core::ZonePtr Core::TerritoryMgr::getLinkedInstance( uint32_t playerId ) const { - auto it = m_playerIdToInstanceMap.find( playerId ); - if( it != m_playerIdToInstanceMap.end() ) - { - return getInstanceZonePtr( it->second ); - } - return nullptr; + auto it = m_playerIdToInstanceMap.find( playerId ); + if( it != m_playerIdToInstanceMap.end() ) + { + return getInstanceZonePtr( it->second ); + } + return nullptr; } const uint16_t Core::TerritoryMgr::getCurrentFestival() const { - return m_currentFestival; + return m_currentFestival; } void Core::TerritoryMgr::setCurrentFestival( uint16_t festivalId ) { - m_currentFestival = festivalId; + m_currentFestival = festivalId; - for( const auto& zone : m_zoneSet ) - { - zone->setCurrentFestival( m_currentFestival ); - } + for( const auto& zone : m_zoneSet ) + { + zone->setCurrentFestival( m_currentFestival ); + } } void Core::TerritoryMgr::disableCurrentFestival() { - setCurrentFestival( 0 ); + setCurrentFestival( 0 ); } diff --git a/src/servers/sapphire_zone/Zone/TerritoryMgr.h b/src/servers/sapphire_zone/Zone/TerritoryMgr.h index adafa145..8c31f310 100644 --- a/src/servers/sapphire_zone/Zone/TerritoryMgr.h +++ b/src/servers/sapphire_zone/Zone/TerritoryMgr.h @@ -5,172 +5,174 @@ #include #include -namespace Core +namespace Core { +namespace Data { +// TODO: this should actually not be here but should be generated in exdData aswell +struct PlaceName; +struct TerritoryType; +struct InstanceContent; + +using PlaceNamePtr = boost::shared_ptr< PlaceName >; +using TerritoryTypePtr = boost::shared_ptr< TerritoryType >; +using InstanceContentPtr = boost::shared_ptr< InstanceContent >; +} + +/*! + \class TerritoryMgr_c + \brief A class managing zones + + This class manages persistent and temporary instances alike. + +*/ +class TerritoryMgr { - namespace Data - { - // TODO: this should actually not be here but should be generated in exdData aswell - struct PlaceName; - struct TerritoryType; - struct InstanceContent; - using PlaceNamePtr = boost::shared_ptr< PlaceName >; - using TerritoryTypePtr = boost::shared_ptr< TerritoryType >; - using InstanceContentPtr = boost::shared_ptr< InstanceContent >; - } +public: + enum TerritoryIntendedUse : + uint8_t //ToDo: Add The Rest of The Territory Types and Have Better Names For Them + { + Town = 0, + OpenWorld = 1, + Inn = 2, + Dungeon = 3, + JailArea = 5, + OpeningArea = 6, + BeforeTrialDung = 7, + AllianceRaid = 8, + OpenWorldInstanceBattle = 9, + Trial = 10, + HousingArea = 13, + HousingPrivateArea = 14, + MSQPrivateArea = 15, + Raids = 16, + RaidFights = 17, + ChocoboTutorial = 21, + Wedding = 22, + BeginnerTutorial = 27, + FreeCompanyGarrison = 30, + PalaceOfTheDead = 31, + TreasureMapInstance = 33, + EventTrial = 36, + TheFeastArea = 37, + PrivateEventArea = 40, + //Eureka = 41, // wat + }; - /*! - \class TerritoryMgr_c - \brief A class managing zones + TerritoryMgr(); - This class manages persistent and temporary instances alike. + /*! initializes the territoryMgr */ + bool init(); - */ - class TerritoryMgr - { + bool createDefaultTerritories(); - public: - enum TerritoryIntendedUse : uint8_t //ToDo: Add The Rest of The Territory Types and Have Better Names For Them - { - Town = 0, - OpenWorld = 1, - Inn = 2, - Dungeon = 3, - JailArea = 5, - OpeningArea = 6, - BeforeTrialDung = 7, - AllianceRaid = 8, - OpenWorldInstanceBattle = 9, - Trial = 10, - HousingArea = 13, - HousingPrivateArea = 14, - MSQPrivateArea = 15, - Raids = 16, - RaidFights = 17, - ChocoboTutorial = 21, - Wedding = 22, - BeginnerTutorial = 27, - FreeCompanyGarrison = 30, - PalaceOfTheDead = 31, - TreasureMapInstance = 33, - EventTrial = 36, - TheFeastArea = 37, - PrivateEventArea = 40, - //Eureka = 41, // wat - }; + bool createHousingTerritories(); - TerritoryMgr(); + /*! caches TerritoryType details into m_territoryTypeMap */ + void loadTerritoryTypeDetailCache(); - /*! initializes the territoryMgr */ - bool init(); + /*! List of positions for zonelines */ + void loadTerritoryPositionMap(); - bool createDefaultTerritories(); + /*! returns true if the given territoryTypeId is in fact a valid zone + based on informations in the dats ( checks if an entry in the dats exists trhough cache ) */ + bool isValidTerritory( uint32_t territoryTypeId ) const; - bool createHousingTerritories(); + /*! returns the next available instanceId */ + uint32_t getNextInstanceId(); - /*! caches TerritoryType details into m_territoryTypeMap */ - void loadTerritoryTypeDetailCache(); + /*! returns true if the territoryType in question is not a persistant zone */ + bool isInstanceContentTerritory( uint32_t territoryTypeId ) const; - /*! List of positions for zonelines */ - void loadTerritoryPositionMap(); + /*! returns true if the territoryType in question is not a private zone */ + bool isPrivateTerritory( uint32_t territoryTypeId ) const; - /*! returns true if the given territoryTypeId is in fact a valid zone - based on informations in the dats ( checks if an entry in the dats exists trhough cache ) */ - bool isValidTerritory( uint32_t territoryTypeId ) const; + /*! returns true if the territoryType is a default non-instanced zone */ + bool isDefaultTerritory( uint32_t territoryTypeId ) const; - /*! returns the next available instanceId */ - uint32_t getNextInstanceId(); + /*! returns true if the territoryType is a housing zone */ + bool isHousingTerritory( uint32_t territoryTypeId ) const; - /*! returns true if the territoryType in question is not a persistant zone */ - bool isInstanceContentTerritory( uint32_t territoryTypeId ) const; + /*! creates a new instance for a given territoryTypeId */ + ZonePtr createTerritoryInstance( uint32_t territoryTypeId ); - /*! returns true if the territoryType in question is not a private zone */ - bool isPrivateTerritory( uint32_t territoryTypeId ) const; + ZonePtr createInstanceContent( uint32_t instanceContentId ); - /*! returns true if the territoryType is a default non-instanced zone */ - bool isDefaultTerritory( uint32_t territoryTypeId ) const; + /*! removes instance by instanceId, return true if successful */ + bool removeTerritoryInstance( uint32_t territoryTypeId ); - /*! returns true if the territoryType is a housing zone */ - bool isHousingTerritory( uint32_t territoryTypeId ) const; + /*! returns a ZonePtr to the instance or nullptr if not found */ + ZonePtr getInstanceZonePtr( uint32_t instanceId ) const; - /*! creates a new instance for a given territoryTypeId */ - ZonePtr createTerritoryInstance( uint32_t territoryTypeId ); + /*! returns the cached detail of a territory, nullptr if not found */ + Data::TerritoryTypePtr getTerritoryDetail( uint32_t territoryTypeId ) const; - ZonePtr createInstanceContent( uint32_t instanceContentId ); + /*! loop for processing territory logic, iterating all existing instances */ + void updateTerritoryInstances( uint32_t currentTime ); - /*! removes instance by instanceId, return true if successful */ - bool removeTerritoryInstance( uint32_t territoryTypeId ); + /*! returns a ZonePositionPtr if found, else nullptr */ + ZonePositionPtr getTerritoryPosition( uint32_t territoryPositionId ) const; - /*! returns a ZonePtr to the instance or nullptr if not found */ - ZonePtr getInstanceZonePtr( uint32_t instanceId ) const; + /*! returns a default Zone by territoryId + TODO: Mind multiple instances?! */ + ZonePtr getZoneByTerriId( uint32_t territoryId ) const; - /*! returns the cached detail of a territory, nullptr if not found */ - Data::TerritoryTypePtr getTerritoryDetail( uint32_t territoryTypeId ) const; + bool movePlayer( uint32_t territoryId, Entity::PlayerPtr pPlayer ); - /*! loop for processing territory logic, iterating all existing instances */ - void updateTerritoryInstances( uint32_t currentTime ); + bool movePlayer( ZonePtr, Entity::PlayerPtr pPlayer ); - /*! returns a ZonePositionPtr if found, else nullptr */ - ZonePositionPtr getTerritoryPosition( uint32_t territoryPositionId ) const; + /*! returns an instancePtr if the player is still bound to an isntance */ + ZonePtr getLinkedInstance( uint32_t playerId ) const; - /*! returns a default Zone by territoryId - TODO: Mind multiple instances?! */ - ZonePtr getZoneByTerriId( uint32_t territoryId ) const; + void setCurrentFestival( uint16_t festivalId ); - bool movePlayer( uint32_t territoryId, Entity::PlayerPtr pPlayer ); - bool movePlayer( ZonePtr, Entity::PlayerPtr pPlayer ); + void disableCurrentFestival(); - /*! returns an instancePtr if the player is still bound to an isntance */ - ZonePtr getLinkedInstance( uint32_t playerId ) const; + const uint16_t getCurrentFestival() const; - void setCurrentFestival( uint16_t festivalId ); - void disableCurrentFestival(); - const uint16_t getCurrentFestival() const; +private: + using TerritoryTypeDetailCache = std::unordered_map< uint16_t, Data::TerritoryTypePtr >; + using InstanceIdToZonePtrMap = std::unordered_map< uint32_t, ZonePtr >; + using TerritoryIdToInstanceMap = std::unordered_map< uint16_t, InstanceIdToZonePtrMap >; + using InstanceContentIdToInstanceMap = std::unordered_map< uint16_t, InstanceIdToZonePtrMap >; + using PlayerIdToInstanceIdMap = std::unordered_map< uint32_t, uint32_t >; + using PositionMap = std::unordered_map< int32_t, ZonePositionPtr >; + using InstanceIdList = std::vector< uint32_t >; - private: - using TerritoryTypeDetailCache = std::unordered_map< uint16_t, Data::TerritoryTypePtr >; - using InstanceIdToZonePtrMap = std::unordered_map< uint32_t, ZonePtr >; - using TerritoryIdToInstanceMap = std::unordered_map< uint16_t, InstanceIdToZonePtrMap >; - using InstanceContentIdToInstanceMap = std::unordered_map< uint16_t, InstanceIdToZonePtrMap >; - using PlayerIdToInstanceIdMap = std::unordered_map< uint32_t, uint32_t >; - using PositionMap = std::unordered_map< int32_t, ZonePositionPtr >; - using InstanceIdList = std::vector< uint32_t >; + /*! map holding details for territory templates */ + TerritoryTypeDetailCache m_territoryTypeDetailCacheMap; - /*! map holding details for territory templates */ - TerritoryTypeDetailCache m_territoryTypeDetailCacheMap; + /*! map holding actual instances of default territories */ + TerritoryIdToInstanceMap m_territoryIdToInstanceGuidMap; - /*! map holding actual instances of default territories */ - TerritoryIdToInstanceMap m_territoryIdToInstanceGuidMap; + /*! map holding actual instances of InstanceContent */ + InstanceContentIdToInstanceMap m_instanceContentToInstanceMap; - /*! map holding actual instances of InstanceContent */ - InstanceContentIdToInstanceMap m_instanceContentToInstanceMap; + /*! flat map for easier lookup of instances by guid */ + InstanceIdToZonePtrMap m_instanceIdToZonePtrMap; - /*! flat map for easier lookup of instances by guid */ - InstanceIdToZonePtrMap m_instanceIdToZonePtrMap; + /*! map holding positions for zonelines */ + PositionMap m_territoryPositionMap; - /*! map holding positions for zonelines */ - PositionMap m_territoryPositionMap; + /*! map storing playerIds to instanceIds, used for instanceContent */ + PlayerIdToInstanceIdMap m_playerIdToInstanceMap; - /*! map storing playerIds to instanceIds, used for instanceContent */ - PlayerIdToInstanceIdMap m_playerIdToInstanceMap; + /*! internal counter for instanceIds */ + uint32_t m_lastInstanceId; - /*! internal counter for instanceIds */ - uint32_t m_lastInstanceId; + /*! set of ZonePtrs for quick iteration*/ + std::set< ZonePtr > m_zoneSet; - /*! set of ZonePtrs for quick iteration*/ - std::set< ZonePtr > m_zoneSet; + /*! set of ZonePtrs for quick iteration*/ + std::set< ZonePtr > m_instanceZoneSet; - /*! set of ZonePtrs for quick iteration*/ - std::set< ZonePtr > m_instanceZoneSet; + /*! id of current festival to set for public zones from festival.exd */ + uint16_t m_currentFestival; - /*! id of current festival to set for public zones from festival.exd */ - uint16_t m_currentFestival; +public: + /*! returns a list of instanceContent InstanceIds currently active */ + InstanceIdList getInstanceContentIdList( uint16_t instanceContentId ) const; - public: - /*! returns a list of instanceContent InstanceIds currently active */ - InstanceIdList getInstanceContentIdList( uint16_t instanceContentId ) const; - - }; +}; } diff --git a/src/servers/sapphire_zone/Zone/Zone.cpp b/src/servers/sapphire_zone/Zone/Zone.cpp index 14cae262..02c91ed5 100644 --- a/src/servers/sapphire_zone/Zone/Zone.cpp +++ b/src/servers/sapphire_zone/Zone/Zone.cpp @@ -47,59 +47,59 @@ extern Core::Framework g_fw; * \brief */ Core::Zone::Zone() : - m_territoryId( 0 ), - m_guId( 0 ), - m_currentWeather( Weather::FairSkies ), - m_weatherOverride( Weather::None ), - m_lastMobUpdate( 0 ), - m_currentFestivalId( 0 ), - m_nextEObjId( 0x400D0000 ) + m_territoryId( 0 ), + m_guId( 0 ), + m_currentWeather( Weather::FairSkies ), + m_weatherOverride( Weather::None ), + m_lastMobUpdate( 0 ), + m_currentFestivalId( 0 ), + m_nextEObjId( 0x400D0000 ) { } Core::Zone::Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName ) : - m_currentWeather( Weather::FairSkies ), - m_nextEObjId( 0x400D0000 ) + m_currentWeather( Weather::FairSkies ), + m_nextEObjId( 0x400D0000 ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - m_guId = guId; + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + m_guId = guId; - m_territoryId = territoryId; - m_internalName = internalName; - m_placeName = placeName; - m_lastMobUpdate = 0; + m_territoryId = territoryId; + m_internalName = internalName; + m_placeName = placeName; + m_lastMobUpdate = 0; - m_weatherOverride = Weather::None; - m_territoryTypeInfo = pExdData->get< Core::Data::TerritoryType >( territoryId ); + m_weatherOverride = Weather::None; + m_territoryTypeInfo = pExdData->get< Core::Data::TerritoryType >( territoryId ); - loadWeatherRates(); + loadWeatherRates(); - m_currentWeather = getNextWeather(); + m_currentWeather = getNextWeather(); } void Core::Zone::loadWeatherRates() { - if( !m_territoryTypeInfo ) - return; + if( !m_territoryTypeInfo ) + return; - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - uint8_t weatherRateId = m_territoryTypeInfo->weatherRate > pExdData->getWeatherRateIdList().size() ? - uint8_t{ 0 } : m_territoryTypeInfo->weatherRate; + uint8_t weatherRateId = m_territoryTypeInfo->weatherRate > pExdData->getWeatherRateIdList().size() ? + uint8_t{ 0 } : m_territoryTypeInfo->weatherRate; - uint8_t sumPc = 0; - auto weatherRateFields = pExdData->m_WeatherRateDat.get_row( weatherRateId ); - for( size_t i = 0; i < 16; ) - { - int32_t weatherId = boost::get< int32_t >( weatherRateFields[i] ); + uint8_t sumPc = 0; + auto weatherRateFields = pExdData->m_WeatherRateDat.get_row( weatherRateId ); + for( size_t i = 0; i < 16; ) + { + int32_t weatherId = boost::get< int32_t >( weatherRateFields[ i ] ); - if( weatherId == 0 ) - break; + if( weatherId == 0 ) + break; - sumPc += boost::get< uint8_t >( weatherRateFields[i + 1] ); - m_weatherRateMap[sumPc] = weatherId; - i += 2; - } + sumPc += boost::get< uint8_t >( weatherRateFields[ i + 1 ] ); + m_weatherRateMap[ sumPc ] = weatherId; + i += 2; + } } Core::Zone::~Zone() @@ -108,43 +108,43 @@ Core::Zone::~Zone() bool Core::Zone::init() { - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - if( pScriptMgr->onZoneInit( shared_from_this() ) ) - { - // all good - } + if( pScriptMgr->onZoneInit( shared_from_this() ) ) + { + // all good + } - return true; + return true; } void Core::Zone::setWeatherOverride( Weather weather ) { - m_weatherOverride = weather; + m_weatherOverride = weather; } Weather Core::Zone::getCurrentWeather() const { - return m_currentWeather; + return m_currentWeather; } uint16_t Core::Zone::getCurrentFestival() const { - return m_currentFestivalId; + return m_currentFestivalId; } void Core::Zone::setCurrentFestival( uint16_t festivalId ) { - m_currentFestivalId = festivalId; + m_currentFestivalId = festivalId; - for( const auto& playerEntry : m_playerMap ) - { - auto player = playerEntry.second; + for( const auto& playerEntry : m_playerMap ) + { + auto player = playerEntry.second; - auto enableFestival = makeActorControl143( player->getId(), SetFestival, m_currentFestivalId ); - playerEntry.second->queuePacket( enableFestival ); - } + auto enableFestival = makeActorControl143( player->getId(), SetFestival, m_currentFestivalId ); + playerEntry.second->queuePacket( enableFestival ); + } } void Core::Zone::loadCellCache() @@ -153,192 +153,192 @@ void Core::Zone::loadCellCache() Weather Core::Zone::getNextWeather() { - uint32_t unixTime = static_cast< uint32_t >( Util::getTimeSeconds() ); - // Get Eorzea hour for weather start - uint32_t bell = unixTime / 175; - // Do the magic 'cause for calculations 16:00 is 0, 00:00 is 8 and 08:00 is 16 - int32_t increment = ( ( bell + 8 - ( bell % 8 ) ) ) % 24; + uint32_t unixTime = static_cast< uint32_t >( Util::getTimeSeconds() ); + // Get Eorzea hour for weather start + uint32_t bell = unixTime / 175; + // Do the magic 'cause for calculations 16:00 is 0, 00:00 is 8 and 08:00 is 16 + int32_t increment = ( ( bell + 8 - ( bell % 8 ) ) ) % 24; - // Take Eorzea days since unix epoch - uint32_t totalDays = ( unixTime / 4200 ); + // Take Eorzea days since unix epoch + uint32_t totalDays = ( unixTime / 4200 ); - uint32_t calcBase = ( totalDays * 0x64 ) + increment; + uint32_t calcBase = ( totalDays * 0x64 ) + increment; - uint32_t step1 = ( calcBase << 0xB ) ^ calcBase; - uint32_t step2 = ( step1 >> 8 ) ^ step1; + uint32_t step1 = ( calcBase << 0xB ) ^calcBase; + uint32_t step2 = ( step1 >> 8 ) ^step1; - auto rate = static_cast< uint8_t >( step2 % 0x64 ); + auto rate = static_cast< uint8_t >( step2 % 0x64 ); - for( auto entry : m_weatherRateMap ) - { - uint8_t sRate = entry.first; - auto weatherId = static_cast< Weather >( entry.second ); + for( auto entry : m_weatherRateMap ) + { + uint8_t sRate = entry.first; + auto weatherId = static_cast< Weather >( entry.second ); - if( rate <= sRate ) - return weatherId; - } + if( rate <= sRate ) + return weatherId; + } - return Weather::FairSkies; + return Weather::FairSkies; } void Core::Zone::pushActor( Entity::ActorPtr pActor ) { - float mx = pActor->getPos().x; - float my = pActor->getPos().z; - uint32_t cx = getPosX( mx ); - uint32_t cy = getPosY( my ); + float mx = pActor->getPos().x; + float my = pActor->getPos().z; + uint32_t cx = getPosX( mx ); + uint32_t cy = getPosY( my ); - Cell* pCell = getCellPtr(cx, cy); - if( !pCell ) - { - pCell = create( cx, cy ); - pCell->init( cx, cy, shared_from_this() ); - } + Cell* pCell = getCellPtr( cx, cy ); + if( !pCell ) + { + pCell = create( cx, cy ); + pCell->init( cx, cy, shared_from_this() ); + } - pCell->addActor( pActor ); + pCell->addActor( pActor ); - pActor->setCell( pCell ); + pActor->setCell( pCell ); - uint32_t cellX = getPosX( pActor->getPos().x ); - uint32_t cellY = getPosY( pActor->getPos().z ); + uint32_t cellX = getPosX( pActor->getPos().x ); + uint32_t cellY = getPosY( pActor->getPos().z ); - uint32_t endX = cellX <= _sizeX ? cellX + 1 : ( _sizeX - 1 ); - uint32_t endY = cellY <= _sizeY ? cellY + 1 : ( _sizeY - 1 ); - uint32_t startX = cellX > 0 ? cellX - 1 : 0; - uint32_t startY = cellY > 0 ? cellY - 1 : 0; - uint32_t posX, posY; + uint32_t endX = cellX <= _sizeX ? cellX + 1 : ( _sizeX - 1 ); + uint32_t endY = cellY <= _sizeY ? cellY + 1 : ( _sizeY - 1 ); + uint32_t startX = cellX > 0 ? cellX - 1 : 0; + uint32_t startY = cellY > 0 ? cellY - 1 : 0; + uint32_t posX, posY; - for( posX = startX; posX <= endX; ++posX ) - { - for( posY = startY; posY <= endY; ++posY ) - { - pCell = getCellPtr(posX, posY); - if( pCell ) - updateInRangeSet( pActor, pCell ); - } - } + for( posX = startX; posX <= endX; ++posX ) + { + for( posY = startY; posY <= endY; ++posY ) + { + pCell = getCellPtr( posX, posY ); + if( pCell ) + updateInRangeSet( pActor, pCell ); + } + } - if( pActor->isPlayer() ) - { - auto pPlayer = pActor->getAsPlayer(); + if( pActor->isPlayer() ) + { + auto pPlayer = pActor->getAsPlayer(); - auto pServerZone = g_fw.get< ServerZone >(); - auto pSession = pServerZone->getSession( pPlayer->getId() ); - if( pSession ) - m_sessionSet.insert( pSession ); - m_playerMap[pPlayer->getId()] = pPlayer; - updateCellActivity( cx, cy, 2 ); - } - } + auto pServerZone = g_fw.get< ServerZone >(); + auto pSession = pServerZone->getSession( pPlayer->getId() ); + if( pSession ) + m_sessionSet.insert( pSession ); + m_playerMap[ pPlayer->getId() ] = pPlayer; + updateCellActivity( cx, cy, 2 ); + } +} void Core::Zone::removeActor( Entity::ActorPtr pActor ) { - float mx = pActor->getPos().x; - float my = pActor->getPos().z; - uint32_t cx = getPosX( mx ); - uint32_t cy = getPosY( my ); + float mx = pActor->getPos().x; + float my = pActor->getPos().z; + uint32_t cx = getPosX( mx ); + uint32_t cy = getPosY( my ); - Cell* pCell = getCellPtr(cx, cy); - if( pCell && pCell->hasActor( pActor ) ) - pCell->removeActor( pActor ); + Cell* pCell = getCellPtr( cx, cy ); + if( pCell && pCell->hasActor( pActor ) ) + pCell->removeActor( pActor ); - if( pActor->isPlayer() ) - { + if( pActor->isPlayer() ) + { - // If it's a player and he's inside boundaries - update his nearby cells - if( pActor->getPos().x <= _maxX && pActor->getPos().x >= _minX && - pActor->getPos().z <= _maxY && pActor->getPos().z >= _minY ) - { - uint32_t x = getPosX( pActor->getPos().x ); - uint32_t y = getPosY( pActor->getPos().z ); - updateCellActivity( x, y, 3 ); - } - m_playerMap.erase( pActor->getId() ); + // If it's a player and he's inside boundaries - update his nearby cells + if( pActor->getPos().x <= _maxX && pActor->getPos().x >= _minX && + pActor->getPos().z <= _maxY && pActor->getPos().z >= _minY ) + { + uint32_t x = getPosX( pActor->getPos().x ); + uint32_t y = getPosY( pActor->getPos().z ); + updateCellActivity( x, y, 3 ); + } + m_playerMap.erase( pActor->getId() ); - onLeaveTerritory( *pActor->getAsPlayer() ); + onLeaveTerritory( *pActor->getAsPlayer() ); - } + } - // remove from lists of other actors - pActor->removeFromInRange(); - pActor->clearInRangeSet(); + // remove from lists of other actors + pActor->removeFromInRange(); + pActor->clearInRangeSet(); } void Core::Zone::queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, Network::Packets::FFXIVPacketBasePtr pPacketEntry ) { - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - if( pTeriMgr->isPrivateTerritory( getTerritoryId() ) ) - return; + auto pTeriMgr = g_fw.get< TerritoryMgr >(); + if( pTeriMgr->isPrivateTerritory( getTerritoryId() ) ) + return; - auto pServerZone = g_fw.get< ServerZone >(); - for( auto entry : m_playerMap ) - { - auto player = entry.second; - float distance = Math::Util::distance( sourcePlayer.getPos().x, - sourcePlayer.getPos().y, - sourcePlayer.getPos().z, - player->getPos().x, - player->getPos().y, - player->getPos().z ); + auto pServerZone = g_fw.get< ServerZone >(); + for( auto entry : m_playerMap ) + { + auto player = entry.second; + float distance = Math::Util::distance( sourcePlayer.getPos().x, + sourcePlayer.getPos().y, + sourcePlayer.getPos().z, + player->getPos().x, + player->getPos().y, + player->getPos().z ); - if( ( distance < range ) && sourcePlayer.getId() != player->getId() ) - { + if( ( distance < range ) && sourcePlayer.getId() != player->getId() ) + { - auto pSession = pServerZone->getSession( player->getId() ); - //pPacketEntry->setValAt< uint32_t >( 0x08, player->getId() ); - if( pSession ) - pSession->getZoneConnection()->queueOutPacket( pPacketEntry ); - } - } + auto pSession = pServerZone->getSession( player->getId() ); + //pPacketEntry->setValAt< uint32_t >( 0x08, player->getId() ); + if( pSession ) + pSession->getZoneConnection()->queueOutPacket( pPacketEntry ); + } + } } uint32_t Core::Zone::getTerritoryId() const { - return m_territoryId; + return m_territoryId; } uint32_t Core::Zone::getGuId() const { - return m_guId; + return m_guId; } const std::string& Core::Zone::getName() const { - return m_placeName; + return m_placeName; } const std::string& Core::Zone::getInternalName() const { - return m_internalName; + return m_internalName; } std::size_t Core::Zone::getPopCount() const { - return m_playerMap.size(); + return m_playerMap.size(); } bool Core::Zone::checkWeather() { - if( m_weatherOverride != Weather::None ) - { - if( m_weatherOverride != m_currentWeather ) - { - m_currentWeather = m_weatherOverride; - return true; - } - } - else - { - auto nextWeather = getNextWeather(); - if( nextWeather != m_currentWeather ) - { - m_currentWeather = nextWeather; - return true; - } - } - return false; + if( m_weatherOverride != Weather::None ) + { + if( m_weatherOverride != m_currentWeather ) + { + m_currentWeather = m_weatherOverride; + return true; + } + } + else + { + auto nextWeather = getNextWeather(); + if( nextWeather != m_currentWeather ) + { + m_currentWeather = nextWeather; + return true; + } + } + return false; } /* @@ -393,270 +393,272 @@ void Core::Zone::updateBnpcs( int64_t tickCount ) bool Core::Zone::update( uint32_t currTime ) { - int64_t tickCount = Util::getTimeMs(); + int64_t tickCount = Util::getTimeMs(); - //TODO: this should be moved to a updateWeather call and pulled out of updateSessions - bool changedWeather = checkWeather(); + //TODO: this should be moved to a updateWeather call and pulled out of updateSessions + bool changedWeather = checkWeather(); - updateSessions( changedWeather ); - //updateBnpcs( tickCount ); - onUpdate( currTime ); + updateSessions( changedWeather ); + //updateBnpcs( tickCount ); + onUpdate( currTime ); - return true; + return true; } void Core::Zone::updateSessions( bool changedWeather ) { - auto it = m_sessionSet.begin(); + auto it = m_sessionSet.begin(); - // update sessions in this zone - for( ; it != m_sessionSet.end(); ) - { + // update sessions in this zone + for( ; it != m_sessionSet.end(); ) + { - auto pSession = ( *it ); + auto pSession = ( *it ); - if( !pSession ) - { - it = m_sessionSet.erase(it ); - continue; - } + if( !pSession ) + { + it = m_sessionSet.erase( it ); + continue; + } - auto pPlayer = pSession->getPlayer(); + auto pPlayer = pSession->getPlayer(); - // this session is not linked to this area anymore, remove it from zone session list - if( ( !pPlayer->getCurrentZone() ) || ( pPlayer->getCurrentZone() != shared_from_this() ) ) - { - removeActor( pSession->getPlayer() ); + // this session is not linked to this area anymore, remove it from zone session list + if( ( !pPlayer->getCurrentZone() ) || ( pPlayer->getCurrentZone() != shared_from_this() ) ) + { + removeActor( pSession->getPlayer() ); - it = m_sessionSet.erase(it ); - continue; - } + it = m_sessionSet.erase( it ); + continue; + } - if( changedWeather ) - { - auto weatherChangePacket = makeZonePacket< FFXIVIpcWeatherChange >(pPlayer->getId() ); - weatherChangePacket->data().weatherId = static_cast< uint8_t >( m_currentWeather ); - weatherChangePacket->data().delay = 5.0f; - pSession->getPlayer()->queuePacket( weatherChangePacket ); - } + if( changedWeather ) + { + auto weatherChangePacket = makeZonePacket< FFXIVIpcWeatherChange >( pPlayer->getId() ); + weatherChangePacket->data().weatherId = static_cast< uint8_t >( m_currentWeather ); + weatherChangePacket->data().delay = 5.0f; + pSession->getPlayer()->queuePacket( weatherChangePacket ); + } - // perform session duties - pSession->update(); - ++it; - } + // perform session duties + pSession->update(); + ++it; + } } bool Core::Zone::isCellActive( uint32_t x, uint32_t y ) { - uint32_t endX = ( ( x + 1 ) <= _sizeX ) ? x + 1 : ( _sizeX - 1 ); - uint32_t endY = ( ( y + 1 ) <= _sizeY ) ? y + 1 : ( _sizeY - 1 ); - uint32_t startX = x > 0 ? x - 1 : 0; - uint32_t startY = y > 0 ? y - 1 : 0; - uint32_t posX; - uint32_t posY; + uint32_t endX = ( ( x + 1 ) <= _sizeX ) ? x + 1 : ( _sizeX - 1 ); + uint32_t endY = ( ( y + 1 ) <= _sizeY ) ? y + 1 : ( _sizeY - 1 ); + uint32_t startX = x > 0 ? x - 1 : 0; + uint32_t startY = y > 0 ? y - 1 : 0; + uint32_t posX; + uint32_t posY; - Cell* pCell; + Cell* pCell; - for( posX = startX; posX <= endX; posX++ ) - { - for( posY = startY; posY <= endY; posY++ ) - { - pCell = getCellPtr(posX, posY); + for( posX = startX; posX <= endX; posX++ ) + { + for( posY = startY; posY <= endY; posY++ ) + { + pCell = getCellPtr( posX, posY ); - if( pCell && ( pCell->hasPlayers() || pCell->isForcedActive() ) ) - return true; - } - } + if( pCell && ( pCell->hasPlayers() || pCell->isForcedActive() ) ) + return true; + } + } - return false; + return false; } void Core::Zone::updateCellActivity( uint32_t x, uint32_t y, int32_t radius ) { - uint32_t endX = ( x + radius ) <= _sizeX ? x + radius : ( _sizeX - 1 ); - uint32_t endY = ( y + radius ) <= _sizeY ? y + radius : ( _sizeY - 1 ); - uint32_t startX = x - radius > 0 ? x - radius : 0; - uint32_t startY = y - radius > 0 ? y - radius : 0; - uint32_t posX, posY; + uint32_t endX = ( x + radius ) <= _sizeX ? x + radius : ( _sizeX - 1 ); + uint32_t endY = ( y + radius ) <= _sizeY ? y + radius : ( _sizeY - 1 ); + uint32_t startX = x - radius > 0 ? x - radius : 0; + uint32_t startY = y - radius > 0 ? y - radius : 0; + uint32_t posX, posY; - Cell* pCell; + Cell* pCell; - for( posX = startX; posX <= endX; posX++ ) - { - for( posY = startY; posY <= endY; posY++ ) + for( posX = startX; posX <= endX; posX++ ) + { + for( posY = startY; posY <= endY; posY++ ) + { + pCell = getCellPtr( posX, posY ); + + if( !pCell ) { - pCell = getCellPtr(posX, posY); + if( isCellActive( posX, posY ) ) + { + pCell = create( posX, posY ); + pCell->init( posX, posY, shared_from_this() ); - if( !pCell ) - { - if( isCellActive( posX, posY ) ) - { - pCell = create( posX, posY ); - pCell->init( posX, posY, shared_from_this() ); + pCell->setActivity( true ); - pCell->setActivity( true ); + assert( !pCell->isLoaded() ); - assert( !pCell->isLoaded() ); - - } - } - else - { - //Cell is now active - if( isCellActive( posX, posY ) && !pCell->isActive() ) - { - pCell->setActivity( true ); - - if( !pCell->isLoaded() ) - { - - } - } - else if( !isCellActive( posX, posY ) && pCell->isActive() ) - pCell->setActivity( false ); - } + } } - } + else + { + //Cell is now active + if( isCellActive( posX, posY ) && !pCell->isActive() ) + { + pCell->setActivity( true ); + + if( !pCell->isLoaded() ) + { + + } + } + else if( !isCellActive( posX, posY ) && pCell->isActive() ) + pCell->setActivity( false ); + } + } + } } -void Core::Zone::updateActorPosition( Entity::Actor &actor ) +void Core::Zone::updateActorPosition( Entity::Actor& actor ) { - if( actor.getCurrentZone() != shared_from_this() ) - return; + if( actor.getCurrentZone() != shared_from_this() ) + return; - //actor.checkInRangeActors(); + //actor.checkInRangeActors(); - uint32_t cellX = getPosX( actor.getPos().x ); - uint32_t cellY = getPosY( actor.getPos().z ); + uint32_t cellX = getPosX( actor.getPos().x ); + uint32_t cellY = getPosY( actor.getPos().z ); - if( cellX >= _sizeX || cellY >= _sizeY ) - return; + if( cellX >= _sizeX || cellY >= _sizeY ) + return; - auto pCell = getCellPtr(cellX, cellY); + auto pCell = getCellPtr( cellX, cellY ); - auto pOldCell = actor.getCellPtr(); - if( !pCell ) - { - pCell = create( cellX, cellY ); - pCell->init( cellX, cellY, shared_from_this() ); - } + auto pOldCell = actor.getCellPtr(); + if( !pCell ) + { + pCell = create( cellX, cellY ); + pCell->init( cellX, cellY, shared_from_this() ); + } - // If object moved cell - if( pCell != pOldCell ) - { + // If object moved cell + if( pCell != pOldCell ) + { - if( pOldCell ) + if( pOldCell ) + { + auto pLog = g_fw.get< Logger >(); + pOldCell->removeActor( actor.shared_from_this() ); + } + + pCell->addActor( actor.shared_from_this() ); + actor.setCell( pCell ); + pOldCell = pCell; + + // if player we need to update cell activity + // radius = 2 is used in order to update both + // old and new cells + if( actor.isPlayer() ) + { + updateCellActivity( cellX, cellY, 2 ); + if( pOldCell != nullptr ) { - auto pLog = g_fw.get< Logger >(); - pOldCell->removeActor( actor.shared_from_this() ); + // only do the second check if theres -/+ 2 difference + if( abs( ( int32_t ) cellX - ( int32_t ) pOldCell->m_posX ) > 2 || + abs( ( int32_t ) cellY - ( int32_t ) pOldCell->m_posY ) > 2 ) + updateCellActivity( pOldCell->m_posX, pOldCell->m_posY, 2 ); } + } + } - pCell->addActor( actor.shared_from_this() ); - actor.setCell( pCell ); - pOldCell = pCell; + // update in range actor set + uint32_t endX = cellX <= _sizeX ? cellX + 1 : ( _sizeX - 1 ); + uint32_t endY = cellY <= _sizeY ? cellY + 1 : ( _sizeY - 1 ); + uint32_t startX = cellX > 0 ? cellX - 1 : 0; + uint32_t startY = cellY > 0 ? cellY - 1 : 0; + uint32_t posX, posY; - // if player we need to update cell activity - // radius = 2 is used in order to update both - // old and new cells - if( actor.isPlayer() ) - { - updateCellActivity( cellX, cellY, 2 ); - if( pOldCell != nullptr ) - { - // only do the second check if theres -/+ 2 difference - if( abs( ( int32_t ) cellX - ( int32_t ) pOldCell->m_posX ) > 2 || - abs( ( int32_t ) cellY - ( int32_t ) pOldCell->m_posY ) > 2 ) - updateCellActivity( pOldCell->m_posX, pOldCell->m_posY, 2 ); - } - } - } - - // update in range actor set - uint32_t endX = cellX <= _sizeX ? cellX + 1 : ( _sizeX - 1 ); - uint32_t endY = cellY <= _sizeY ? cellY + 1 : ( _sizeY - 1 ); - uint32_t startX = cellX > 0 ? cellX - 1 : 0; - uint32_t startY = cellY > 0 ? cellY - 1 : 0; - uint32_t posX, posY; - - for( posX = startX; posX <= endX; ++posX ) - { - for( posY = startY; posY <= endY; ++posY ) - { - pCell = getCellPtr(posX, posY); - if( pCell ) - updateInRangeSet( actor.shared_from_this(), pCell ); - } - } + for( posX = startX; posX <= endX; ++posX ) + { + for( posY = startY; posY <= endY; ++posY ) + { + pCell = getCellPtr( posX, posY ); + if( pCell ) + updateInRangeSet( actor.shared_from_this(), pCell ); + } + } } void Core::Zone::updateInRangeSet( Entity::ActorPtr pActor, Cell* pCell ) { - if( pCell == nullptr ) - return; + if( pCell == nullptr ) + return; - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - // TODO: make sure gms can overwrite this. Potentially temporary solution - if( pTeriMgr->isPrivateTerritory( getTerritoryId() ) ) - return; + auto pTeriMgr = g_fw.get< TerritoryMgr >(); + // TODO: make sure gms can overwrite this. Potentially temporary solution + if( pTeriMgr->isPrivateTerritory( getTerritoryId() ) ) + return; - auto iter = pCell->m_actors.begin(); + auto iter = pCell->m_actors.begin(); - float fRange = 70.0f; - int32_t count = 0; - while( iter != pCell->m_actors.end() ) - { - auto pCurAct = *iter; - ++iter; + float fRange = 70.0f; + int32_t count = 0; + while( iter != pCell->m_actors.end() ) + { + auto pCurAct = *iter; + ++iter; - if( !pCurAct || pCurAct == pActor ) - continue; + if( !pCurAct || pCurAct == pActor ) + continue; - float distance = Math::Util::distance( pCurAct->getPos().x, pCurAct->getPos().y, pCurAct->getPos().z, - pActor->getPos().x, pActor->getPos().y, pActor->getPos().z ); + float distance = Math::Util::distance( pCurAct->getPos().x, pCurAct->getPos().y, pCurAct->getPos().z, + pActor->getPos().x, pActor->getPos().y, pActor->getPos().z ); - bool isInRange = ( fRange == 0.0f || distance <= fRange ); - bool isInRangeSet = pActor->isInRangeSet( pCurAct ); + bool isInRange = ( fRange == 0.0f || distance <= fRange ); + bool isInRangeSet = pActor->isInRangeSet( pCurAct ); - // Add if range == 0 or distance is withing range. - if( isInRange && !isInRangeSet ) - { + // Add if range == 0 or distance is withing range. + if( isInRange && !isInRangeSet ) + { - if( pActor->isPlayer() && !pActor->getAsPlayer()->isLoadingComplete() ) - continue; + if( pActor->isPlayer() && !pActor->getAsPlayer()->isLoadingComplete() ) + continue; - if( pCurAct->isPlayer() && !pCurAct->getAsPlayer()->isLoadingComplete() ) - continue; + if( pCurAct->isPlayer() && !pCurAct->getAsPlayer()->isLoadingComplete() ) + continue; - pActor->addInRangeActor( pCurAct ); - pCurAct->addInRangeActor( pActor ); + pActor->addInRangeActor( pCurAct ); + pCurAct->addInRangeActor( pActor ); - // this is a hack to limit actor spawn in one packetset - if( count++ > 12 ) - break; - } - else if( !isInRange && isInRangeSet ) - { - pCurAct->removeInRangeActor( *pActor ); - pActor->removeInRangeActor( *pCurAct ); - } - } + // this is a hack to limit actor spawn in one packetset + if( count++ > 12 ) + break; + } + else if( !isInRange && isInRangeSet ) + { + pCurAct->removeInRangeActor( *pActor ); + pActor->removeInRangeActor( *pCurAct ); + } + } } -void Core::Zone::onPlayerZoneIn( Entity::Player &player ) +void Core::Zone::onPlayerZoneIn( Entity::Player& player ) { - auto pLog = g_fw.get< Logger >(); - pLog->debug( "Zone::onEnterTerritory: Zone#" + std::to_string( getGuId() ) + "|" + std::to_string( getTerritoryId() ) + - + ", Entity#" + std::to_string( player.getId() ) ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( + "Zone::onEnterTerritory: Zone#" + std::to_string( getGuId() ) + "|" + std::to_string( getTerritoryId() ) + + +", Entity#" + std::to_string( player.getId() ) ); } void Core::Zone::onLeaveTerritory( Entity::Player& player ) { - auto pLog = g_fw.get< Logger >(); - pLog->debug( "Zone::onLeaveTerritory: Zone#" + std::to_string( getGuId() ) + "|" + std::to_string( getTerritoryId() ) + - + ", Entity#" + std::to_string( player.getId() ) ); + auto pLog = g_fw.get< Logger >(); + pLog->debug( + "Zone::onLeaveTerritory: Zone#" + std::to_string( getGuId() ) + "|" + std::to_string( getTerritoryId() ) + + +", Entity#" + std::to_string( player.getId() ) ); } void Core::Zone::onUpdate( uint32_t currTime ) @@ -681,44 +683,45 @@ void Core::Zone::onEnterTerritory( Core::Entity::Player& player, uint32_t eventI void Core::Zone::registerEObj( Entity::EventObjectPtr object ) { - if( !object ) - return; - auto pLog = g_fw.get< Logger >(); - object->setId( getNextEObjId() ); - pushActor( object ); + if( !object ) + return; + auto pLog = g_fw.get< Logger >(); + object->setId( getNextEObjId() ); + pushActor( object ); - m_eventObjects[object->getId()] = object; + m_eventObjects[ object->getId() ] = object; - onRegisterEObj( object ); + onRegisterEObj( object ); - pLog->debug( "Registered instance eobj: " + std::to_string( object->getId() ) ); + pLog->debug( "Registered instance eobj: " + std::to_string( object->getId() ) ); } Core::Entity::EventObjectPtr Core::Zone::getEObj( uint32_t objId ) { - auto obj = m_eventObjects.find( objId ); - if( obj == m_eventObjects.end() ) - return nullptr; + auto obj = m_eventObjects.find( objId ); + if( obj == m_eventObjects.end() ) + return nullptr; - return obj->second; + return obj->second; } Core::InstanceContentPtr Core::Zone::getAsInstanceContent() { - return boost::dynamic_pointer_cast< InstanceContent, Zone >( shared_from_this() ); + return boost::dynamic_pointer_cast< InstanceContent, Zone >( shared_from_this() ); } uint32_t Core::Zone::getNextEObjId() { - return ++m_nextEObjId; + return ++m_nextEObjId; } -Core::Entity::EventObjectPtr Core::Zone::registerEObj( const std::string &name, uint32_t objectId, uint32_t mapLink, - uint8_t state, FFXIVARR_POSITION3 pos, float scale, float rotation ) +Core::Entity::EventObjectPtr Core::Zone::registerEObj( const std::string& name, uint32_t objectId, uint32_t mapLink, + uint8_t state, FFXIVARR_POSITION3 pos, float scale, + float rotation ) { - auto eObj = Entity::make_EventObject( getNextEObjId(), objectId, mapLink, state, pos, rotation, name ); - eObj->setScale( scale ); - registerEObj( eObj ); + auto eObj = Entity::make_EventObject( getNextEObjId(), objectId, mapLink, state, pos, rotation, name ); + eObj->setScale( scale ); + registerEObj( eObj ); - return eObj; + return eObj; } diff --git a/src/servers/sapphire_zone/Zone/Zone.h b/src/servers/sapphire_zone/Zone/Zone.h index 6595618f..7a1e69f4 100644 --- a/src/servers/sapphire_zone/Zone/Zone.h +++ b/src/servers/sapphire_zone/Zone/Zone.h @@ -23,105 +23,128 @@ class Session; class ZonePosition; using SessionSet = std::set< SessionPtr >; -namespace Data -{ - struct InstanceContent; - struct TerritoryType; +namespace Data { +struct InstanceContent; +struct TerritoryType; } -class Zone : public CellHandler< Cell >, public boost::enable_shared_from_this< Zone > +class Zone : + public CellHandler< Cell >, public boost::enable_shared_from_this< Zone > { protected: - uint32_t m_territoryId; - uint32_t m_guId; + uint32_t m_territoryId; + uint32_t m_guId; - std::string m_placeName; - std::string m_internalName; + std::string m_placeName; + std::string m_internalName; - std::unordered_map< int32_t, Entity::PlayerPtr > m_playerMap; - std::unordered_map< int32_t, Entity::EventObjectPtr > m_eventObjects; + std::unordered_map< int32_t, Entity::PlayerPtr > m_playerMap; + std::unordered_map< int32_t, Entity::EventObjectPtr > m_eventObjects; - SessionSet m_sessionSet; + SessionSet m_sessionSet; - Common::Weather m_currentWeather; - Common::Weather m_weatherOverride; + Common::Weather m_currentWeather; + Common::Weather m_weatherOverride; - uint64_t m_lastMobUpdate; + uint64_t m_lastMobUpdate; - uint16_t m_currentFestivalId; - boost::shared_ptr< Data::TerritoryType > m_territoryTypeInfo; + uint16_t m_currentFestivalId; + boost::shared_ptr< Data::TerritoryType > m_territoryTypeInfo; - std::map< uint8_t, int32_t> m_weatherRateMap; + std::map< uint8_t, int32_t > m_weatherRateMap; - uint32_t m_nextEObjId; + uint32_t m_nextEObjId; public: - Zone(); + Zone(); - Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName ); - virtual ~Zone(); + Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName ); - /*! overrides the zone's weather, set to 0 to unlock */ - void setWeatherOverride( Common::Weather weather ); + virtual ~Zone(); - Common::Weather getCurrentWeather() const; + /*! overrides the zone's weather, set to 0 to unlock */ + void setWeatherOverride( Common::Weather weather ); - uint16_t getCurrentFestival() const; - void setCurrentFestival( uint16_t festivalId ); + Common::Weather getCurrentWeather() const; - virtual bool init(); + uint16_t getCurrentFestival() const; - virtual void loadCellCache(); - virtual uint32_t getTerritoryId() const; - virtual void onBeforePlayerZoneIn( Entity::Player &player ) {}; - virtual void onPlayerZoneIn( Entity::Player &player ); - virtual void onFinishLoading( Entity::Player& player ); - virtual void onInitDirector( Entity::Player& player ); - virtual void onDirectorSync( Entity::Player& player ) {}; - virtual void onLeaveTerritory( Entity::Player& player ); - virtual void onUpdate( uint32_t currTime ); - virtual void onRegisterEObj( Entity::EventObjectPtr object ) {}; - virtual void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ); + void setCurrentFestival( uint16_t festivalId ); - Common::Weather getNextWeather(); + virtual bool init(); - void pushActor( Entity::ActorPtr pActor ); + virtual void loadCellCache(); - void removeActor( Entity::ActorPtr pActor ); + virtual uint32_t getTerritoryId() const; - void updateActorPosition( Entity::Actor &pActor ); + virtual void onBeforePlayerZoneIn( Entity::Player& player ) + { + }; - bool isCellActive( uint32_t x, uint32_t y ); + virtual void onPlayerZoneIn( Entity::Player& player ); - void updateCellActivity( uint32_t x, uint32_t y, int32_t radius ); + virtual void onFinishLoading( Entity::Player& player ); - void updateInRangeSet( Entity::ActorPtr pActor, Cell* pCell ); + virtual void onInitDirector( Entity::Player& player ); - void queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, Network::Packets::FFXIVPacketBasePtr pPacketEntry ); + virtual void onDirectorSync( Entity::Player& player ) + { + }; - uint32_t getGuId() const; + virtual void onLeaveTerritory( Entity::Player& player ); - uint32_t getNextEObjId(); + virtual void onUpdate( uint32_t currTime ); - const std::string& getName() const; - const std::string& getInternalName() const; + virtual void onRegisterEObj( Entity::EventObjectPtr object ) + { + }; - std::size_t getPopCount() const; - void loadWeatherRates(); - bool checkWeather(); - //void updateBnpcs( int64_t tickCount ); + virtual void onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ); - bool update( uint32_t currTime ); + Common::Weather getNextWeather(); - void updateSessions( bool changedWeather ); + void pushActor( Entity::ActorPtr pActor ); - Entity::EventObjectPtr registerEObj( const std::string& name, uint32_t objectId, uint32_t mapLink, - uint8_t state, Common::FFXIVARR_POSITION3 pos, float scale, float rotation ); + void removeActor( Entity::ActorPtr pActor ); - void registerEObj( Entity::EventObjectPtr object ); - Entity::EventObjectPtr getEObj( uint32_t objId ); + void updateActorPosition( Entity::Actor& pActor ); - InstanceContentPtr getAsInstanceContent(); + bool isCellActive( uint32_t x, uint32_t y ); + + void updateCellActivity( uint32_t x, uint32_t y, int32_t radius ); + + void updateInRangeSet( Entity::ActorPtr pActor, Cell* pCell ); + + void queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, + Network::Packets::FFXIVPacketBasePtr pPacketEntry ); + + uint32_t getGuId() const; + + uint32_t getNextEObjId(); + + const std::string& getName() const; + + const std::string& getInternalName() const; + + std::size_t getPopCount() const; + + void loadWeatherRates(); + + bool checkWeather(); + //void updateBnpcs( int64_t tickCount ); + + bool update( uint32_t currTime ); + + void updateSessions( bool changedWeather ); + + Entity::EventObjectPtr registerEObj( const std::string& name, uint32_t objectId, uint32_t mapLink, + uint8_t state, Common::FFXIVARR_POSITION3 pos, float scale, float rotation ); + + void registerEObj( Entity::EventObjectPtr object ); + + Entity::EventObjectPtr getEObj( uint32_t objId ); + + InstanceContentPtr getAsInstanceContent(); }; diff --git a/src/servers/sapphire_zone/Zone/ZonePosition.cpp b/src/servers/sapphire_zone/Zone/ZonePosition.cpp index 2e80e6c5..a1a1a6ee 100644 --- a/src/servers/sapphire_zone/Zone/ZonePosition.cpp +++ b/src/servers/sapphire_zone/Zone/ZonePosition.cpp @@ -1,19 +1,19 @@ #include "ZonePosition.h" Core::ZonePosition::ZonePosition() - : m_id(0) - , m_targetZoneId(0) - , m_radius(0) + : + m_id( 0 ), m_targetZoneId( 0 ), m_radius( 0 ) { } -Core::ZonePosition::ZonePosition( uint32_t id, uint32_t targetZoneId, const Common::FFXIVARR_POSITION3& targetPosition, uint32_t radius, float rotation ) +Core::ZonePosition::ZonePosition( uint32_t id, uint32_t targetZoneId, const Common::FFXIVARR_POSITION3& targetPosition, + uint32_t radius, float rotation ) { - m_id = id; - m_targetZoneId = targetZoneId; - m_targetPos = targetPosition; - m_radius = radius; - m_rotation = rotation; + m_id = id; + m_targetZoneId = targetZoneId; + m_targetPos = targetPosition; + m_radius = radius; + m_rotation = rotation; } Core::ZonePosition::~ZonePosition() @@ -22,22 +22,22 @@ Core::ZonePosition::~ZonePosition() uint32_t Core::ZonePosition::getId() const { - return m_id; + return m_id; } uint32_t Core::ZonePosition::getTargetZoneId() const { - return m_targetZoneId; + return m_targetZoneId; } -const Core::Common::FFXIVARR_POSITION3 & Core::ZonePosition::getTargetPosition() const +const Core::Common::FFXIVARR_POSITION3& Core::ZonePosition::getTargetPosition() const { - return m_targetPos; + return m_targetPos; } float Core::ZonePosition::getTargetRotation() const { - return m_rotation; + return m_rotation; } diff --git a/src/servers/sapphire_zone/Zone/ZonePosition.h b/src/servers/sapphire_zone/Zone/ZonePosition.h index 88b6a785..82ae6494 100644 --- a/src/servers/sapphire_zone/Zone/ZonePosition.h +++ b/src/servers/sapphire_zone/Zone/ZonePosition.h @@ -8,24 +8,27 @@ namespace Core { class ZonePosition { protected: - uint32_t m_id; - uint32_t m_targetZoneId; - Common::FFXIVARR_POSITION3 m_targetPos; - float m_rotation; - uint32_t m_radius; + uint32_t m_id; + uint32_t m_targetZoneId; + Common::FFXIVARR_POSITION3 m_targetPos; + float m_rotation; + uint32_t m_radius; public: - ZonePosition(); - ZonePosition( uint32_t id, uint32_t targetZoneId, const Common::FFXIVARR_POSITION3& targetPosition, uint32_t radius, float rotation ); - virtual ~ZonePosition(); + ZonePosition(); - uint32_t getId() const; + ZonePosition( uint32_t id, uint32_t targetZoneId, const Common::FFXIVARR_POSITION3& targetPosition, uint32_t radius, + float rotation ); - uint32_t getTargetZoneId() const; + virtual ~ZonePosition(); - const Common::FFXIVARR_POSITION3& getTargetPosition() const; + uint32_t getId() const; - float getTargetRotation() const; + uint32_t getTargetZoneId() const; + + const Common::FFXIVARR_POSITION3& getTargetPosition() const; + + float getTargetRotation() const; }; diff --git a/src/servers/sapphire_zone/mainGameServer.cpp b/src/servers/sapphire_zone/mainGameServer.cpp index 5b9572f3..cfd6ba7a 100644 --- a/src/servers/sapphire_zone/mainGameServer.cpp +++ b/src/servers/sapphire_zone/mainGameServer.cpp @@ -20,38 +20,38 @@ using namespace Core; bool setupFramework() { - auto pServer = boost::make_shared< ServerZone >( "zone.ini" ); - auto pLogger = boost::make_shared< Logger >(); - auto pExdData = boost::make_shared< Data::ExdDataGenerated >(); - auto pScript = boost::make_shared< Scripting::ScriptMgr >(); - auto pDb = boost::make_shared< Db::DbWorkerPool< Db::CharaDbConnection > >(); - auto pLsMgr = boost::make_shared< LinkshellMgr >(); - auto pTeriMgr = boost::make_shared< TerritoryMgr >(); - auto pDebugCom = boost::make_shared< DebugCommandHandler >(); - auto pConfig = boost::make_shared< ConfigMgr >(); + auto pServer = boost::make_shared< ServerZone >( "zone.ini" ); + auto pLogger = boost::make_shared< Logger >(); + auto pExdData = boost::make_shared< Data::ExdDataGenerated >(); + auto pScript = boost::make_shared< Scripting::ScriptMgr >(); + auto pDb = boost::make_shared< Db::DbWorkerPool< Db::CharaDbConnection > >(); + auto pLsMgr = boost::make_shared< LinkshellMgr >(); + auto pTeriMgr = boost::make_shared< TerritoryMgr >(); + auto pDebugCom = boost::make_shared< DebugCommandHandler >(); + auto pConfig = boost::make_shared< ConfigMgr >(); - pLogger->setLogPath( "log/SapphireZone_" ); - pLogger->init(); + pLogger->setLogPath( "log/SapphireZone_" ); + pLogger->init(); - g_fw.set< ServerZone >( pServer ); - g_fw.set< Logger >( pLogger ); - g_fw.set< Data::ExdDataGenerated >( pExdData ); - g_fw.set< Scripting::ScriptMgr >( pScript ); - g_fw.set< Db::DbWorkerPool< Db::CharaDbConnection > >( pDb ); - g_fw.set< LinkshellMgr >( pLsMgr ); - g_fw.set< TerritoryMgr >( pTeriMgr ); - g_fw.set< DebugCommandHandler >( pDebugCom ); - g_fw.set< ConfigMgr >( pConfig ); + g_fw.set< ServerZone >( pServer ); + g_fw.set< Logger >( pLogger ); + g_fw.set< Data::ExdDataGenerated >( pExdData ); + g_fw.set< Scripting::ScriptMgr >( pScript ); + g_fw.set< Db::DbWorkerPool< Db::CharaDbConnection > >( pDb ); + g_fw.set< LinkshellMgr >( pLsMgr ); + g_fw.set< TerritoryMgr >( pTeriMgr ); + g_fw.set< DebugCommandHandler >( pDebugCom ); + g_fw.set< ConfigMgr >( pConfig ); - // actuall catch errors here... - return true; + // actuall catch errors here... + return true; } int main( int32_t argc, char* argv[] ) { - if( !setupFramework() ) - return 0; // too fucking bad... + if( !setupFramework() ) + return 0; // too fucking bad... - g_fw.get< ServerZone >()->run( argc, argv ); - return 0; + g_fw.get< ServerZone >()->run( argc, argv ); + return 0; } diff --git a/src/tools/discovery_parser/lgb.h b/src/tools/discovery_parser/lgb.h index 11303655..4b76ee61 100644 --- a/src/tools/discovery_parser/lgb.h +++ b/src/tools/discovery_parser/lgb.h @@ -24,318 +24,343 @@ struct LGB_FILE_HEADER; struct LGB_GROUP; struct LGB_GROUP_HEADER; -enum class LgbEntryType : uint32_t +enum class LgbEntryType : + uint32_t { - BgParts = 1, - Light = 3, - Vfx = 4, - PositionMarker = 5, - Gimmick = 6, - SharedGroup6 = 6,// secondary variable is set to 2 - Sound = 7, - EventNpc = 8, - BattleNpc = 9, - Aetheryte = 12, - EnvSpace = 13, - Gathering = 14, - SharedGroup15 = 15,// secondary variable is set to 13 - Treasure = 16, - Weapon = 39, - PopRange = 40, - ExitRange = 41, - MapRange = 43, - NaviMeshRange = 44, - EventObject = 45, - EnvLocation = 47, - EventRange = 49, - QuestMarker = 51, - CollisionBox = 57, - DoorRange = 58, - LineVfx = 59, - ClientPath = 65, - ServerPath = 66, - GimmickRange = 67, - TargetMarker = 68, - ChairMarker = 69, - ClickableRange = 70, - PrefetchRange = 71, - FateRange = 72, - SphereCastRange = 75, + BgParts = 1, + Light = 3, + Vfx = 4, + PositionMarker = 5, + Gimmick = 6, + SharedGroup6 = 6,// secondary variable is set to 2 + Sound = 7, + EventNpc = 8, + BattleNpc = 9, + Aetheryte = 12, + EnvSpace = 13, + Gathering = 14, + SharedGroup15 = 15,// secondary variable is set to 13 + Treasure = 16, + Weapon = 39, + PopRange = 40, + ExitRange = 41, + MapRange = 43, + NaviMeshRange = 44, + EventObject = 45, + EnvLocation = 47, + EventRange = 49, + QuestMarker = 51, + CollisionBox = 57, + DoorRange = 58, + LineVfx = 59, + ClientPath = 65, + ServerPath = 66, + GimmickRange = 67, + TargetMarker = 68, + ChairMarker = 69, + ClickableRange = 70, + PrefetchRange = 71, + FateRange = 72, + SphereCastRange = 75, }; struct LGB_ENTRY_HEADER { - LgbEntryType type; - uint32_t unknown; - uint32_t nameOffset; - vec3 translation; - vec3 rotation; - vec3 scale; + LgbEntryType type; + uint32_t unknown; + uint32_t nameOffset; + vec3 translation; + vec3 rotation; + vec3 scale; }; class LGB_ENTRY { public: - char* m_buf; - uint32_t m_offset; - LGB_ENTRY_HEADER header; + char* m_buf; + uint32_t m_offset; + LGB_ENTRY_HEADER header; - LGB_ENTRY() - { - m_buf = nullptr; - m_offset = 0; - memset( &header, 0, sizeof( header ) ); - }; - LGB_ENTRY( char* buf, uint32_t offset ) - { - m_buf = buf; - m_offset = offset; - header = *reinterpret_cast< LGB_ENTRY_HEADER* >( buf + offset ); - }; - const LgbEntryType getType() const - { - return header.type; - }; - virtual ~LGB_ENTRY() {}; + LGB_ENTRY() + { + m_buf = nullptr; + m_offset = 0; + memset( &header, 0, sizeof( header ) ); + }; + + LGB_ENTRY( char* buf, uint32_t offset ) + { + m_buf = buf; + m_offset = offset; + header = *reinterpret_cast< LGB_ENTRY_HEADER* >( buf + offset ); + }; + + const LgbEntryType getType() const + { + return header.type; + }; + + virtual ~LGB_ENTRY() + { + }; }; -struct LGB_BGPARTS_HEADER : public LGB_ENTRY_HEADER +struct LGB_BGPARTS_HEADER : + public LGB_ENTRY_HEADER { - uint32_t modelFileOffset; - uint32_t collisionFileOffset; - uint32_t unknown4; - uint32_t unknown5; - uint32_t unknown6; - uint32_t unknown7; - uint32_t unknown8; - uint32_t unknown9; + uint32_t modelFileOffset; + uint32_t collisionFileOffset; + uint32_t unknown4; + uint32_t unknown5; + uint32_t unknown6; + uint32_t unknown7; + uint32_t unknown8; + uint32_t unknown9; }; -class LGB_BGPARTS_ENTRY : public LGB_ENTRY +class LGB_BGPARTS_ENTRY : + public LGB_ENTRY { public: - LGB_BGPARTS_HEADER header; - std::string name; - std::string modelFileName; - std::string collisionFileName; - LGB_BGPARTS_ENTRY() {}; - LGB_BGPARTS_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - modelFileName = std::string( buf + offset + header.modelFileOffset ); - collisionFileName = std::string( buf + offset + header.collisionFileOffset ); - }; + LGB_BGPARTS_HEADER header; + std::string name; + std::string modelFileName; + std::string collisionFileName; + + LGB_BGPARTS_ENTRY() + { + }; + + LGB_BGPARTS_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + modelFileName = std::string( buf + offset + header.modelFileOffset ); + collisionFileName = std::string( buf + offset + header.collisionFileOffset ); + }; }; -struct LGB_GIMMICK_HEADER : public LGB_ENTRY_HEADER +struct LGB_GIMMICK_HEADER : + public LGB_ENTRY_HEADER { - uint32_t gimmickFileOffset; - char unknownBytes[100]; + uint32_t gimmickFileOffset; + char unknownBytes[100]; }; -class LGB_GIMMICK_ENTRY : public LGB_ENTRY +class LGB_GIMMICK_ENTRY : + public LGB_ENTRY { public: - LGB_GIMMICK_HEADER header; - std::string name; - std::string gimmickFileName; + LGB_GIMMICK_HEADER header; + std::string name; + std::string gimmickFileName; - LGB_GIMMICK_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - gimmickFileName = std::string( buf + offset + header.gimmickFileOffset ); - //std::cout << "\t " << gimmickFileName << " unknown: " << header.unknown << "\n"; - }; + LGB_GIMMICK_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + gimmickFileName = std::string( buf + offset + header.gimmickFileOffset ); + //std::cout << "\t " << gimmickFileName << " unknown: " << header.unknown << "\n"; + }; }; -struct LGB_ENPC_HEADER : public LGB_ENTRY_HEADER +struct LGB_ENPC_HEADER : + public LGB_ENTRY_HEADER { - uint32_t enpcId; - uint8_t unknown1[0x24]; + uint32_t enpcId; + uint8_t unknown1[0x24]; }; -class LGB_ENPC_ENTRY : public LGB_ENTRY +class LGB_ENPC_ENTRY : + public LGB_ENTRY { public: - LGB_ENPC_HEADER header; - std::string name; + LGB_ENPC_HEADER header; + std::string name; - LGB_ENPC_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast< LGB_ENPC_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - //std::cout << "\t ENpc " << header.enpcId << " " << name << "\n"; - }; + LGB_ENPC_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast< LGB_ENPC_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + //std::cout << "\t ENpc " << header.enpcId << " " << name << "\n"; + }; }; -struct LGB_EOBJ_HEADER : public LGB_ENTRY_HEADER +struct LGB_EOBJ_HEADER : + public LGB_ENTRY_HEADER { - uint32_t eobjId; - uint32_t levelHierachyId; - uint8_t unknown1[0xC]; + uint32_t eobjId; + uint32_t levelHierachyId; + uint8_t unknown1[0xC]; }; -class LGB_EOBJ_ENTRY : public LGB_ENTRY +class LGB_EOBJ_ENTRY : + public LGB_ENTRY { public: - LGB_EOBJ_HEADER header; - std::string name; + LGB_EOBJ_HEADER header; + std::string name; - LGB_EOBJ_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast< LGB_EOBJ_HEADER* >( buf + offset ); - //std::cout << "\t " << header.eobjId << " " << name << " unknown: " << header.unknown << "\n"; - name = std::string( buf + offset + header.nameOffset ); - }; + LGB_EOBJ_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast< LGB_EOBJ_HEADER* >( buf + offset ); + //std::cout << "\t " << header.eobjId << " " << name << " unknown: " << header.unknown << "\n"; + name = std::string( buf + offset + header.nameOffset ); + }; }; -struct LGB_MAPRANGE_HEADER : public LGB_ENTRY_HEADER +struct LGB_MAPRANGE_HEADER : + public LGB_ENTRY_HEADER { - uint32_t type; - uint8_t unknown2; - uint8_t unknown2_1; - uint16_t unknown3; - uint32_t unknown5; - uint32_t mapId; - uint32_t offsetX, offsetY; - uint32_t unkInts[4]; - uint16_t unkShort; - uint8_t unkFlag; - uint8_t unkFlag2; - uint8_t discoveryIndex; - uint8_t unkFlag3; - uint8_t unkFlag4; - uint8_t unknown4[0x09]; + uint32_t type; + uint8_t unknown2; + uint8_t unknown2_1; + uint16_t unknown3; + uint32_t unknown5; + uint32_t mapId; + uint32_t offsetX, offsetY; + uint32_t unkInts[4]; + uint16_t unkShort; + uint8_t unkFlag; + uint8_t unkFlag2; + uint8_t discoveryIndex; + uint8_t unkFlag3; + uint8_t unkFlag4; + uint8_t unknown4[0x09]; }; -struct LGB_MAPRANGE_ENTRY : public LGB_ENTRY +struct LGB_MAPRANGE_ENTRY : + public LGB_ENTRY { public: - LGB_MAPRANGE_HEADER header; - std::string name; + LGB_MAPRANGE_HEADER header; + std::string name; - LGB_MAPRANGE_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast< LGB_MAPRANGE_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); + LGB_MAPRANGE_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast< LGB_MAPRANGE_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); - }; + }; }; struct LGB_GROUP_HEADER { - uint32_t unknown; - int32_t groupNameOffset; - int32_t entriesOffset; - int32_t entryCount; - uint32_t unknown2; - uint32_t unknown3; - uint32_t unknown4; - uint32_t unknown5; - uint32_t unknown6; - uint32_t unknown7; - uint32_t unknown8; - uint32_t unknown9; - uint32_t unknown10; + uint32_t unknown; + int32_t groupNameOffset; + int32_t entriesOffset; + int32_t entryCount; + uint32_t unknown2; + uint32_t unknown3; + uint32_t unknown4; + uint32_t unknown5; + uint32_t unknown6; + uint32_t unknown7; + uint32_t unknown8; + uint32_t unknown9; + uint32_t unknown10; }; struct LGB_GROUP { - LGB_FILE* parent; - LGB_GROUP_HEADER header; - std::string name; - std::vector< std::shared_ptr< LGB_ENTRY > > entries; + LGB_FILE* parent; + LGB_GROUP_HEADER header; + std::string name; + std::vector< std::shared_ptr< LGB_ENTRY > > entries; - LGB_GROUP( char* buf, LGB_FILE* parentStruct, uint32_t offset ) - { - parent = parentStruct; - header = *reinterpret_cast< LGB_GROUP_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.groupNameOffset ); - //entries.resize( header.entryCount ); - //std::cout << name << "\n\t unknown: " << header.unknown << "\n"; - const auto entriesOffset = offset + header.entriesOffset; - for( auto i = 0; i < header.entryCount; ++i ) + LGB_GROUP( char* buf, LGB_FILE* parentStruct, uint32_t offset ) + { + parent = parentStruct; + header = *reinterpret_cast< LGB_GROUP_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.groupNameOffset ); + //entries.resize( header.entryCount ); + //std::cout << name << "\n\t unknown: " << header.unknown << "\n"; + const auto entriesOffset = offset + header.entriesOffset; + for( auto i = 0; i < header.entryCount; ++i ) + { + const auto entryOffset = entriesOffset + *reinterpret_cast< int32_t* >( buf + ( entriesOffset + i * 4 ) ); + + try { - const auto entryOffset = entriesOffset + *reinterpret_cast< int32_t* >( buf + ( entriesOffset + i * 4 ) ); + const auto type = *reinterpret_cast( buf + entryOffset ); + // garbage to skip model loading + if( !ignoreModels && type == LgbEntryType::BgParts ) + { + entries.push_back( std::make_shared< LGB_BGPARTS_ENTRY >( buf, entryOffset ) ); + } + else if( !ignoreModels && type == LgbEntryType::Gimmick ) + { + entries.push_back( std::make_shared< LGB_GIMMICK_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::EventNpc ) + { + entries.push_back( std::make_shared< LGB_ENPC_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::EventObject ) + { + entries.push_back( std::make_shared< LGB_EOBJ_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::MapRange ) + { + entries.push_back( std::make_shared< LGB_MAPRANGE_ENTRY >( buf, entryOffset ) ); + } + /* + else + { + entries[i] = nullptr; + } + */ - try - { - const auto type = *reinterpret_cast( buf + entryOffset ); - // garbage to skip model loading - if( !ignoreModels && type == LgbEntryType::BgParts ) - { - entries.push_back( std::make_shared< LGB_BGPARTS_ENTRY >( buf, entryOffset ) ); - } - else if( !ignoreModels && type == LgbEntryType::Gimmick ) - { - entries.push_back( std::make_shared< LGB_GIMMICK_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::EventNpc ) - { - entries.push_back( std::make_shared< LGB_ENPC_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::EventObject ) - { - entries.push_back( std::make_shared< LGB_EOBJ_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::MapRange ) - { - entries.push_back( std::make_shared< LGB_MAPRANGE_ENTRY >( buf, entryOffset ) ); - } - /* - else - { - entries[i] = nullptr; - } - */ - - } - catch( std::exception& e ) - { - std::cout << name << " " << e.what() << std::endl; - } } - }; + catch( std::exception& e ) + { + std::cout << name << " " << e.what() << std::endl; + } + } + }; }; struct LGB_FILE_HEADER { - char magic[4]; // LGB 1 - uint32_t fileSize; - uint32_t unknown; - char magic2[4]; // LGP1 - uint32_t unknown2; - uint32_t unknown3; - uint32_t unknown4; - uint32_t unknown5; - int32_t groupCount; + char magic[4]; // LGB 1 + uint32_t fileSize; + uint32_t unknown; + char magic2[4]; // LGP1 + uint32_t unknown2; + uint32_t unknown3; + uint32_t unknown4; + uint32_t unknown5; + int32_t groupCount; }; struct LGB_FILE { - LGB_FILE_HEADER header; - std::vector< LGB_GROUP > groups; - std::string name; + LGB_FILE_HEADER header; + std::vector< LGB_GROUP > groups; + std::string name; - LGB_FILE( char* buf, const std::string& name ) - { - header = *reinterpret_cast< LGB_FILE_HEADER* >( buf ); - if( strncmp( &header.magic[0], "LGB1", 4 ) != 0 || strncmp( &header.magic2[0], "LGP1", 4 ) != 0 ) - throw std::runtime_error( "Invalid LGB file!" ); + LGB_FILE( char* buf, const std::string& name ) + { + header = *reinterpret_cast< LGB_FILE_HEADER* >( buf ); + if( strncmp( &header.magic[ 0 ], "LGB1", 4 ) != 0 || strncmp( &header.magic2[ 0 ], "LGP1", 4 ) != 0 ) + throw std::runtime_error( "Invalid LGB file!" ); - //groups.resize(header.groupCount); + //groups.resize(header.groupCount); - constexpr auto baseOffset = sizeof( header ); - for( auto i = 0; i < header.groupCount; ++i ) - { - const auto groupOffset = baseOffset + *reinterpret_cast< int32_t* >( buf + ( baseOffset + i * 4 ) ); - const auto group = LGB_GROUP( buf, this, groupOffset ); - groups.push_back( group ); - } - }; + constexpr auto baseOffset = sizeof( header ); + for( auto i = 0; i < header.groupCount; ++i ) + { + const auto groupOffset = baseOffset + *reinterpret_cast< int32_t* >( buf + ( baseOffset + i * 4 ) ); + const auto group = LGB_GROUP( buf, this, groupOffset ); + groups.push_back( group ); + } + }; }; /* diff --git a/src/tools/discovery_parser/main.cpp b/src/tools/discovery_parser/main.cpp index ed9e5d90..62165a2e 100644 --- a/src/tools/discovery_parser/main.cpp +++ b/src/tools/discovery_parser/main.cpp @@ -29,9 +29,9 @@ bool ignoreModels = false; struct ZoneInfo { - uint16_t id; - std::string name; - std::string path; + uint16_t id; + std::string name; + std::string path; }; // parsing shit @@ -49,576 +49,588 @@ xiv::exd::ExdData* eData = nullptr; void readFileToBuffer( const std::string& path, std::vector< char >& buf ); - // discovery shit struct vec2 { - float x, y; + float x, y; }; -struct DiscoveryMap : std::enable_shared_from_this< DiscoveryMap > +struct DiscoveryMap : + std::enable_shared_from_this< DiscoveryMap > { - std::string path; - Image img; - uint16_t mapScale; - int16_t mapOffsetX, mapOffsetY; - int mapId; - constexpr static int discoveryMapRows = 3; - constexpr static int discoveryMapCols = 4; - constexpr static int tileWidth = 128; - constexpr static int tiles = discoveryMapCols * discoveryMapRows; + std::string path; + Image img; + uint16_t mapScale; + int16_t mapOffsetX, mapOffsetY; + int mapId; + constexpr static int discoveryMapRows = 3; + constexpr static int discoveryMapCols = 4; + constexpr static int tileWidth = 128; + constexpr static int tiles = discoveryMapCols * discoveryMapRows; - uint32_t getColour( uint8_t mapIndex, float x, float y, float scale ) - { - auto ogX = x, ogY = y; - int col = ( mapIndex % ( int )( ( float )img.width / ( float )tileWidth ) ); - int row = ( mapIndex / ( ( float )img.width / ( float )tileWidth ) ); - x = ( x / 2048.f ) * ( float )tileWidth; - y = ( y / 2048.f ) * ( float )tileWidth; - int tileX = ( col * ( float )tileWidth ) + x; - int tileY = ( row * ( float )tileWidth ) + y; + uint32_t getColour( uint8_t mapIndex, float x, float y, float scale ) + { + auto ogX = x, ogY = y; + int col = ( mapIndex % ( int ) ( ( float ) img.width / ( float ) tileWidth ) ); + int row = ( mapIndex / ( ( float ) img.width / ( float ) tileWidth ) ); + x = ( x / 2048.f ) * ( float ) tileWidth; + y = ( y / 2048.f ) * ( float ) tileWidth; + int tileX = ( col * ( float ) tileWidth ) + x; + int tileY = ( row * ( float ) tileWidth ) + y; - if( tileX < 0 || tileY < 0 || tileY > img.data.size() - 1 || tileX > img.data[0].size() - 1 ) - { - std::cout << "Unable to find tile coord for " << x << " " << y << " mapIndex " << std::to_string( mapIndex ) << "\n"; - return 0; - } + if( tileX < 0 || tileY < 0 || tileY > img.data.size() - 1 || tileX > img.data[ 0 ].size() - 1 ) + { + std::cout << "Unable to find tile coord for " << x << " " << y << " mapIndex " << std::to_string( mapIndex ) + << "\n"; + return 0; + } - //std::cout << "getColour col " << col << " row " << row << " tileX " << tileX << " tileY " << tileY << " tile index " << std::to_string( unkFlag2 ) << "\n"; - auto colour = img.data[tileY][tileX]; + //std::cout << "getColour col " << col << " row " << row << " tileX " << tileX << " tileY " << tileY << " tile index " << std::to_string( unkFlag2 ) << "\n"; + auto colour = img.data[ tileY ][ tileX ]; - return colour; - } + return colour; + } - vec3 get3dPosFrom2d( float x, float y ) - { - vec3 ret; - float scale2 = ( float )mapScale / 100.0f; - ret.x = ( x * scale2 ) + ( ( float )img.height * 2.f ); //( x / scale2 ) - mapOffsetX; - ret.z = ( y * scale2 ) + ( ( float )img.height * 2.f ); //( y / scale2 ) - mapOffsetY; + vec3 get3dPosFrom2d( float x, float y ) + { + vec3 ret; + float scale2 = ( float ) mapScale / 100.0f; + ret.x = ( x * scale2 ) + ( ( float ) img.height * 2.f ); //( x / scale2 ) - mapOffsetX; + ret.z = ( y * scale2 ) + ( ( float ) img.height * 2.f ); //( y / scale2 ) - mapOffsetY; - return ret; - } + return ret; + } - vec2 get2dPosFrom3d( float x, float y, float scale ) - { - vec2 ret; - float scale2 = ( float )( ( float )mapScale / 100.f ); - ret.x = ( ( x * scale2 ) + 1024.f ); - ret.y = ( ( y * scale2 ) + 1024.f ); + vec2 get2dPosFrom3d( float x, float y, float scale ) + { + vec2 ret; + float scale2 = ( float ) ( ( float ) mapScale / 100.f ); + ret.x = ( ( x * scale2 ) + 1024.f ); + ret.y = ( ( y * scale2 ) + 1024.f ); - return ret; - } + return ret; + } }; + std::map< uint16_t, std::map< uint16_t, std::map< uint16_t, std::shared_ptr< DiscoveryMap > > > > discoveryMaps; - - -enum class TerritoryTypeExdIndexes : size_t +enum class TerritoryTypeExdIndexes : + size_t { - TerritoryType = 0, - Path = 1 + TerritoryType = 0, + Path = 1 }; using namespace std::chrono_literals; struct face { - int32_t f1, f2, f3; + int32_t f1, f2, f3; }; // init void initExd( const std::string& gamePath ) { - data1 = data1 ? data1 : new xiv::dat::GameData( gamePath ); - eData = eData ? eData : new xiv::exd::ExdData( *data1 ); + data1 = data1 ? data1 : new xiv::dat::GameData( gamePath ); + eData = eData ? eData : new xiv::exd::ExdData( *data1 ); } void getMapExdEntries( uint32_t zoneId ) { - static auto& cat = eData->get_category( "Map" ); - static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); - //static std::unique_ptr< Converter > pConverter = std::make_unique< Converter >(); + static auto& cat = eData->get_category( "Map" ); + static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); + //static std::unique_ptr< Converter > pConverter = std::make_unique< Converter >(); - static auto& rows = exd.get_rows(); - for( auto& row : rows ) - { - // fields from SaintCoinach https://github.com/ufx/SaintCoinach/blob/master/SaintCoinach/ex.json#L6358 - auto id = row.first; + static auto& rows = exd.get_rows(); + for( auto& row : rows ) + { + // fields from SaintCoinach https://github.com/ufx/SaintCoinach/blob/master/SaintCoinach/ex.json#L6358 + auto id = row.first; - auto& fields = row.second; + auto& fields = row.second; - /* TYPES !! - case DataType::boolean: 1 - case DataType::int8: 2 - case DataType::uint8: 3 - case DataType::int16: 4 - case DataType::uint16: 5 - case DataType::int32: 6 - case DataType::uint32: 7 - case DataType::float32: 8 - case DataType::uint64: 9 - */ - auto territory = *boost::get< uint16_t >( &fields.at( 14 ) ); - if( territory != zoneId ) - continue; - auto mapZoneIndex = *boost::get< int8_t >( &fields.at( 2 ) ); - auto hierarchy = *boost::get< uint8_t >( &fields.at( 3 ) ); - auto pathStr = *boost::get< std::string >( &fields.at( 5 ) ); - auto sizeFactor = *boost::get< uint16_t >( &fields.at( 6 ) ); - auto mapOffsetX = *boost::get< int16_t >( &fields.at( 7 ) ); - auto mapOffsetY = *boost::get< int16_t >( &fields.at( 8 ) ); - auto discoveryIdx = *boost::get< int16_t >( &fields.at( 12 ) ); - auto discoveryCompleteBitmask = *boost::get< uint32_t >( &fields.at( 13 ) ); - char texStr[255]; - auto teriStr = pathStr.substr( 0, pathStr.find_first_of( '/' ) ); - char discoveryFileName[255]; - sprintf( &discoveryFileName[0], "%s%02u", teriStr.c_str(), mapZoneIndex ); - sprintf( &texStr[0], "ui/map/%s/%sd.tex", pathStr.c_str(), &discoveryFileName[0] ); + /* TYPES !! + case DataType::boolean: 1 + case DataType::int8: 2 + case DataType::uint8: 3 + case DataType::int16: 4 + case DataType::uint16: 5 + case DataType::int32: 6 + case DataType::uint32: 7 + case DataType::float32: 8 + case DataType::uint64: 9 + */ + auto territory = *boost::get< uint16_t >( &fields.at( 14 ) ); + if( territory != zoneId ) + continue; + auto mapZoneIndex = *boost::get< int8_t >( &fields.at( 2 ) ); + auto hierarchy = *boost::get< uint8_t >( &fields.at( 3 ) ); + auto pathStr = *boost::get< std::string >( &fields.at( 5 ) ); + auto sizeFactor = *boost::get< uint16_t >( &fields.at( 6 ) ); + auto mapOffsetX = *boost::get< int16_t >( &fields.at( 7 ) ); + auto mapOffsetY = *boost::get< int16_t >( &fields.at( 8 ) ); + auto discoveryIdx = *boost::get< int16_t >( &fields.at( 12 ) ); + auto discoveryCompleteBitmask = *boost::get< uint32_t >( &fields.at( 13 ) ); + char texStr[255]; + auto teriStr = pathStr.substr( 0, pathStr.find_first_of( '/' ) ); + char discoveryFileName[255]; + sprintf( &discoveryFileName[ 0 ], "%s%02u", teriStr.c_str(), mapZoneIndex ); + sprintf( &texStr[ 0 ], "ui/map/%s/%sd.tex", pathStr.c_str(), &discoveryFileName[ 0 ] ); - if( discoveryMaps[territory].find( mapZoneIndex ) == discoveryMaps[territory].end() || - discoveryMaps[territory][mapZoneIndex].find( hierarchy ) == discoveryMaps[territory][mapZoneIndex].end() ) + if( discoveryMaps[ territory ].find( mapZoneIndex ) == discoveryMaps[ territory ].end() || + discoveryMaps[ territory ][ mapZoneIndex ].find( hierarchy ) == + discoveryMaps[ territory ][ mapZoneIndex ].end() ) + { + std::string fileName( discoveryFileName ); + + try { - std::string fileName( discoveryFileName ); + std::string rawTexFile( texStr ); + auto pDiscoveryMap = std::make_shared< DiscoveryMap >(); + auto& discoveryMap = *pDiscoveryMap; + std::ifstream discoveryFile( fileName + ".img", std::ios::binary ); + if( !discoveryFile.good() ) + { + auto texFile = data1->getFile( rawTexFile ); + texFile->exportToFile( fileName + ".tex" ); - try - { - std::string rawTexFile( texStr ); - auto pDiscoveryMap = std::make_shared< DiscoveryMap >(); - auto& discoveryMap = *pDiscoveryMap; - std::ifstream discoveryFile( fileName + ".img", std::ios::binary ); - if( !discoveryFile.good() ) - { - auto texFile = data1->getFile( rawTexFile ); - texFile->exportToFile( fileName + ".tex" ); - - auto tex = TEX_FILE( fileName + ".tex" ); + auto tex = TEX_FILE( fileName + ".tex" ); - int mipMapDivide = 1; - int h = tex.header.uncompressedHeight; - int w = tex.header.uncompressedWidth; - discoveryMap.img = DecodeTexDXT1( tex, tex.header.mipMaps[0], h / mipMapDivide, w / mipMapDivide, - ( h / mipMapDivide ) / 4, ( w / mipMapDivide ) / 4 - ); - discoveryMap.img.toFile( fileName + ".img" ); - } - else - { - std::stringstream ss; - ss << discoveryFile.rdbuf(); - discoveryMap.img = std::move( Image( &ss.str()[0] ) ); - discoveryFile.close(); - } + int mipMapDivide = 1; + int h = tex.header.uncompressedHeight; + int w = tex.header.uncompressedWidth; + discoveryMap.img = DecodeTexDXT1( tex, tex.header.mipMaps[ 0 ], h / mipMapDivide, w / mipMapDivide, + ( h / mipMapDivide ) / 4, ( w / mipMapDivide ) / 4 + ); + discoveryMap.img.toFile( fileName + ".img" ); + } + else + { + std::stringstream ss; + ss << discoveryFile.rdbuf(); + discoveryMap.img = std::move( Image( &ss.str()[ 0 ] ) ); + discoveryFile.close(); + } - discoveryMap.mapId = id; - discoveryMap.path = rawTexFile; - discoveryMap.mapOffsetX = mapOffsetX; - discoveryMap.mapOffsetY = mapOffsetY; - discoveryMap.mapScale = sizeFactor; + discoveryMap.mapId = id; + discoveryMap.path = rawTexFile; + discoveryMap.mapOffsetX = mapOffsetX; + discoveryMap.mapOffsetY = mapOffsetY; + discoveryMap.mapScale = sizeFactor; - std::cout << "Image Height: " << discoveryMap.img.height << " Width: " << discoveryMap.img.width << "\n"; + std::cout << "Image Height: " << discoveryMap.img.height << " Width: " << discoveryMap.img.width << "\n"; - discoveryMaps[territory][mapZoneIndex][hierarchy] = pDiscoveryMap; - } - catch( std::exception& e ) - { - std::cout << "[Error] " << std::string( texStr ) << " " << e.what() << "\n"; - } + discoveryMaps[ territory ][ mapZoneIndex ][ hierarchy ] = pDiscoveryMap; } - } - return; + catch( std::exception& e ) + { + std::cout << "[Error] " << std::string( texStr ) << " " << e.what() << "\n"; + } + } + } + return; } std::string zoneNameToPath( const std::string& name ) { - std::string path; - bool found = false; + std::string path; + bool found = false; - static auto& cat = eData->get_category( "TerritoryType" ); - static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); - static auto& rows = exd.get_rows(); + static auto& cat = eData->get_category( "TerritoryType" ); + static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); + static auto& rows = exd.get_rows(); - if( zoneInfoMap.size() == 0 ) - { - for( auto& row : rows ) + if( zoneInfoMap.size() == 0 ) + { + for( auto& row : rows ) + { + auto& fields = row.second; + auto teriName = *boost::get< std::string >( + &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::TerritoryType ) ) ); + if( teriName.empty() ) + continue; + auto teriPath = *boost::get< std::string >( + &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::Path ) ) ); + ZoneInfo info; + info.id = row.first; + info.path = teriPath; + info.name = teriName; + zoneInfoMap[ row.first ] = info; + + if( !found && boost::iequals( name, teriName ) ) { - auto& fields = row.second; - auto teriName = *boost::get< std::string >( &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::TerritoryType ) ) ); - if( teriName.empty() ) - continue; - auto teriPath = *boost::get< std::string >( &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::Path ) ) ); - ZoneInfo info; - info.id = row.first; - info.path = teriPath; - info.name = teriName; - zoneInfoMap[row.first] = info; - - if( !found && boost::iequals( name, teriName ) ) - { - found = true; - path = teriPath; - zoneId = info.id; - } + found = true; + path = teriPath; + zoneId = info.id; } - } - else - { - for( const auto& entry : zoneInfoMap ) + } + } + else + { + for( const auto& entry : zoneInfoMap ) + { + if( found = boost::iequals( name, entry.second.name ) ) { - if( found = boost::iequals( name, entry.second.name ) ) - { - path = entry.second.path; - zoneId = entry.second.id; - break; - } + path = entry.second.path; + zoneId = entry.second.id; + break; } - } + } + } - if( found ) - { - //path = path.substr( path.find_first_of( "/" ) + 1, path.size() - path.find_first_of( "/" )); - //path = std::string( "ffxiv/" ) + path; - path = std::string( "bg/" ) + path.substr( 0, path.find( "/level/" ) ); - std::cout << "[Info] " << "Found path for " << name << ": " << path << std::endl; - } - else - { - throw std::runtime_error( "Unable to find path for " + name + - ".\n\tPlease double check spelling or open 0a0000.win32.index with FFXIV Explorer and extract territorytype.exh as CSV\n\tand copy territorytype.exh.csv into pcb_reader.exe directory if using standalone" ); - } + if( found ) + { + //path = path.substr( path.find_first_of( "/" ) + 1, path.size() - path.find_first_of( "/" )); + //path = std::string( "ffxiv/" ) + path; + path = std::string( "bg/" ) + path.substr( 0, path.find( "/level/" ) ); + std::cout << "[Info] " << "Found path for " << name << ": " << path << std::endl; + } + else + { + throw std::runtime_error( "Unable to find path for " + name + + ".\n\tPlease double check spelling or open 0a0000.win32.index with FFXIV Explorer and extract territorytype.exh as CSV\n\tand copy territorytype.exh.csv into pcb_reader.exe directory if using standalone" ); + } - return path; + return path; } void loadEobjNames() { - static auto& cat = eData->get_category( "EObjName" ); - static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::en ) ); - for( auto& row : exd.get_rows() ) - { - auto id = row.first; - auto& fields = row.second; - auto name = *boost::get< std::string >( &fields.at( 0 ) ); - eobjNameMap[id] = name; - } + static auto& cat = eData->get_category( "EObjName" ); + static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::en ) ); + for( auto& row : exd.get_rows() ) + { + auto id = row.first; + auto& fields = row.second; + auto name = *boost::get< std::string >( &fields.at( 0 ) ); + eobjNameMap[ id ] = name; + } } void writeEobjEntry( std::ofstream& out, LGB_ENTRY* pObj ) { - static std::string mapRangeStr( "\"MapRange\", " ); - static std::ofstream discoverySql( "discovery.sql" , std::ios::app ); - uint32_t id; - uint32_t unknown2 = 0, unknown2_1 = 0, unknown3 = 0; - std::string name; - std::string typeStr; - uint32_t eobjlevelHierachyId = 0; - static std::map< uint32_t, std::map< uint32_t, uint32_t > > exportedMapRange; + static std::string mapRangeStr( "\"MapRange\", " ); + static std::ofstream discoverySql( "discovery.sql", std::ios::app ); + uint32_t id; + uint32_t unknown2 = 0, unknown2_1 = 0, unknown3 = 0; + std::string name; + std::string typeStr; + uint32_t eobjlevelHierachyId = 0; + static std::map< uint32_t, std::map< uint32_t, uint32_t > > exportedMapRange; - auto pMapRange = reinterpret_cast< LGB_MAPRANGE_ENTRY* >( pObj ); - id = pMapRange->header.unknown; - unknown2 = pMapRange->header.unknown2; - unknown2_1 = pMapRange->header.unknown2_1; - unknown3 = pMapRange->header.unknown3; - typeStr = mapRangeStr; + auto pMapRange = reinterpret_cast< LGB_MAPRANGE_ENTRY* >( pObj ); + id = pMapRange->header.unknown; + unknown2 = pMapRange->header.unknown2; + unknown2_1 = pMapRange->header.unknown2_1; + unknown3 = pMapRange->header.unknown3; + typeStr = mapRangeStr; - // discovery shit - vec2 pos{0}; - auto subArea = 0; - auto mapId = -1; - auto discoveryIndex = pMapRange->header.discoveryIndex; + // discovery shit + vec2 pos{ 0 }; + auto subArea = 0; + auto mapId = -1; + auto discoveryIndex = pMapRange->header.discoveryIndex; - vec3 translation = pObj->header.translation; + vec3 translation = pObj->header.translation; - bool found = false; - float scale = 100.f; //pMapRange->header.unknown2 + bool found = false; + float scale = 100.f; //pMapRange->header.unknown2 - if( pMapRange->header.mapId == 0 ) - { - auto it = discoveryMaps.find( zoneId ); - if( it != discoveryMaps.end() ) + if( pMapRange->header.mapId == 0 ) + { + auto it = discoveryMaps.find( zoneId ); + if( it != discoveryMaps.end() ) + { + for( const auto& mapHierarchy : it->second ) { - for( const auto& mapHierarchy : it->second ) - { - if( subArea > 0 ) - break; - for( const auto& levelHierarchy : mapHierarchy.second ) + if( subArea > 0 ) + break; + for( const auto& levelHierarchy : mapHierarchy.second ) + { + if( subArea > 0 ) + break; + + auto& map = *levelHierarchy.second; + pos = map.get2dPosFrom3d( translation.x, translation.z, scale ); + + mapId = map.mapId; + + for( int i = 0; i < map.tiles; i++ ) + { + auto colour = map.getColour( i, pos.x, pos.y, scale ); + auto a = ( colour >> 24 ) & 0xFF; + auto r = ( colour >> 16 ) & 0xFF; + auto g = ( colour >> 8 ) & 0xFF; + auto b = ( colour >> 0 ) & 0xFF; + if( a > 0 && ( r + b + g ) > 0 ) { - if( subArea > 0 ) - break; - - auto& map = *levelHierarchy.second; - pos = map.get2dPosFrom3d( translation.x, translation.z, scale ); - - mapId = map.mapId; - - for( int i = 0; i < map.tiles; i++ ) - { - auto colour = map.getColour( i, pos.x, pos.y, scale ); - auto a = ( colour >> 24 ) & 0xFF; - auto r = ( colour >> 16 ) & 0xFF; - auto g = ( colour >> 8 ) & 0xFF; - auto b = ( colour >> 0 ) & 0xFF; - if( a > 0 && ( r + b + g ) > 0 ) - { - if( r > 0 ) - { - // out of bounds - if( i == 0 ) - continue; - subArea = ( i * 3 ) + 1; - } - else if( g > 0 ) - { - subArea = ( i * 3 ) + 2; - } - else if( b > 0 ) - { - subArea = ( i * 3 ) + 3; - } - break; - } - } + if( r > 0 ) + { + // out of bounds + if( i == 0 ) + continue; + subArea = ( i * 3 ) + 1; + } + else if( g > 0 ) + { + subArea = ( i * 3 ) + 2; + } + else if( b > 0 ) + { + subArea = ( i * 3 ) + 3; + } + break; } - } + } + } } - subArea--; - } - else - { - mapId = pMapRange->header.mapId; - } - - subArea = pMapRange->header.discoveryIndex + 1; + } + subArea--; + } + else + { + mapId = pMapRange->header.mapId; + } - //if( discoveryIndex == subArea ) - { - //std::cout << std::to_string( id ) << " discoveryIndex " << std::to_string( discoveryIndex ) << " subArea " << subArea << "\n"; - } - - if( discoveryIndex == 0 ) - { - //std::cout << "\tUnable to find subarea for maprange " << std::to_string( id ) << " mapCoord " << pos.x << " " << pos.y << - // "\tzoneCoord " << translation.x << " " << translation.y << " " << translation.z << " " << "\n"; - return; - } - else if( mapId == -1 ) - { - //std::cout << "\tUnable to find subarea for maprange " << std::to_string(id) << " " << "\n"; - return; - } - if( exportedMapRange[id][mapId] == discoveryIndex ) - return; - exportedMapRange[id][mapId] = discoveryIndex; - std::string outStr( "INSERT INTO discoveryinfo VALUES (" + - std::to_string( id ) + ", " + std::to_string( mapId ) + ", " + std::to_string( discoveryIndex ) + ");\n" - //std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + std::to_string( pObj->header.translation.z ) + - //", " + std::to_string( subArea ) + "" + "\n" - ); - discoverySql.write( outStr.c_str(), outStr.size() ); - //out.write( outStr.c_str(), outStr.size() ); + subArea = pMapRange->header.discoveryIndex + 1; + + //if( discoveryIndex == subArea ) + { + //std::cout << std::to_string( id ) << " discoveryIndex " << std::to_string( discoveryIndex ) << " subArea " << subArea << "\n"; + } + + if( discoveryIndex == 0 ) + { + //std::cout << "\tUnable to find subarea for maprange " << std::to_string( id ) << " mapCoord " << pos.x << " " << pos.y << + // "\tzoneCoord " << translation.x << " " << translation.y << " " << translation.z << " " << "\n"; + return; + } + else if( mapId == -1 ) + { + //std::cout << "\tUnable to find subarea for maprange " << std::to_string(id) << " " << "\n"; + return; + } + if( exportedMapRange[ id ][ mapId ] == discoveryIndex ) + return; + exportedMapRange[ id ][ mapId ] = discoveryIndex; + std::string outStr( "INSERT INTO discoveryinfo VALUES (" + + std::to_string( id ) + ", " + std::to_string( mapId ) + ", " + std::to_string( discoveryIndex ) + + ");\n" + //std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + std::to_string( pObj->header.translation.z ) + + //", " + std::to_string( subArea ) + "" + "\n" + ); + discoverySql.write( outStr.c_str(), outStr.size() ); + //out.write( outStr.c_str(), outStr.size() ); } void readFileToBuffer( const std::string& path, std::vector< char >& buf ) { - auto inFile = std::ifstream( path, std::ios::binary ); - if( inFile.good() ) - { - inFile.seekg( 0, inFile.end ); - int32_t fileSize = (int32_t)inFile.tellg(); - buf.resize( fileSize ); - inFile.seekg( 0, inFile.beg ); - inFile.read( &buf[0], fileSize ); - inFile.close(); - } - else - { - throw std::runtime_error( "Unable to open " + path ); - } + auto inFile = std::ifstream( path, std::ios::binary ); + if( inFile.good() ) + { + inFile.seekg( 0, inFile.end ); + int32_t fileSize = ( int32_t ) inFile.tellg(); + buf.resize( fileSize ); + inFile.seekg( 0, inFile.beg ); + inFile.read( &buf[ 0 ], fileSize ); + inFile.close(); + } + else + { + throw std::runtime_error( "Unable to open " + path ); + } } bool isEx = false; int main( int argc, char* argv[] ) { - auto startTime = std::chrono::system_clock::now(); - auto entryStartTime = std::chrono::system_clock::now(); + auto startTime = std::chrono::system_clock::now(); + auto entryStartTime = std::chrono::system_clock::now(); - std::vector< std::string > argVec( argv + 1, argv + argc ); - std::string zoneName = "s1d1"; + std::vector< std::string > argVec( argv + 1, argv + argc ); + std::string zoneName = "s1d1"; - bool dumpAll = ignoreModels = std::remove_if( argVec.begin(), argVec.end(), []( auto arg ){ return arg == "--dump-all"; } ) != argVec.end(); - dumpAll = true; - ignoreModels = true; - if( argc > 1 ) - { - zoneName = argv[1]; - if( argc > 2 ) + bool dumpAll = ignoreModels = std::remove_if( argVec.begin(), argVec.end(), []( auto arg ) + { return arg == "--dump-all"; } ) != argVec.end(); + dumpAll = true; + ignoreModels = true; + if( argc > 1 ) + { + zoneName = argv[ 1 ]; + if( argc > 2 ) + { + std::string tmpPath( argv[ 2 ] ); + if( !tmpPath.empty() ) + gamePath = argv[ 2 ]; + } + } + + initExd( gamePath ); + std::ofstream discoverySql( "discovery.sql", std::ios::trunc ); + discoverySql.close(); + + if( dumpAll ) + { + zoneNameToPath( "r1f1" ); + + for( const auto& zone : zoneInfoMap ) + zoneDumpList.emplace( zone.second.name ); + } + else + { + zoneDumpList.emplace( zoneName ); + } + + LABEL_DUMP: + entryStartTime = std::chrono::system_clock::now(); + zoneName = *zoneDumpList.begin(); + try + { + const auto zonePath = zoneNameToPath( zoneName ); + + std::string listPcbPath( zonePath + "/collision/list.pcb" ); + std::string bgLgbPath( zonePath + "/level/bg.lgb" ); + std::string planmapLgbPath( zonePath + "/level/planmap.lgb" ); + std::string collisionFilePath( zonePath + "/collision/" ); + + isEx = bgLgbPath.find( "ex1" ) != -1 || bgLgbPath.find( "ex2" ) != -1; + std::vector< char > section; + std::vector< char > section1; + std::vector< char > section2; + + auto test_file = data1->getFile( bgLgbPath ); + section = test_file->access_data_sections().at( 0 ); + + auto planmap_file = data1->getFile( planmapLgbPath ); + section2 = planmap_file->access_data_sections().at( 0 ); + + auto test_file1 = data1->getFile( listPcbPath ); + section1 = test_file1->access_data_sections().at( 0 ); + + std::vector< std::string > stringList; + + uint32_t offset1 = 0x20; + + //loadEobjNames(); + getMapExdEntries( zoneId ); + + std::string eobjFileName( zoneName + "_eobj.csv" ); + std::ofstream eobjOut( eobjFileName, std::ios::trunc ); + if( !eobjOut.good() ) + throw std::string( "Unable to create " + zoneName + + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); + + eobjOut.close(); + eobjOut.open( eobjFileName, std::ios::app ); + + if( !eobjOut.good() ) + throw std::string( "Unable to create " + zoneName + + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); + + if( 0 ) + { + for( ;; ) { - std::string tmpPath( argv[2] ); - if( !tmpPath.empty() ) - gamePath = argv[2]; + + uint16_t trId = *( uint16_t* ) §ion1[ offset1 ]; + + char someString[200]; + sprintf( someString, "%str%04d.pcb", collisionFilePath.c_str(), trId ); + stringList.push_back( std::string( someString ) ); + //std::cout << someString << "\n"; + offset1 += 0x20; + + if( offset1 >= section1.size() ) + { + break; + } } - } + } + LGB_FILE bgLgb( §ion[ 0 ], "bg" ); + LGB_FILE planmapLgb( §ion2[ 0 ], "planmap" ); - initExd( gamePath ); - std::ofstream discoverySql( "discovery.sql", std::ios::trunc ); - discoverySql.close(); + std::vector< LGB_FILE > lgbList{ bgLgb, planmapLgb }; + uint32_t max_index = 0; - if( dumpAll ) - { - zoneNameToPath( "r1f1" ); + // dont bother if we cant write to a file + FILE* fp_out = nullptr; + //auto fp_out = ignoreModels ? ( FILE* )nullptr : fopen( ( zoneName + ".obj" ).c_str(), "w" ); + if( fp_out ) + { + fprintf( fp_out, "\n" ); + fclose( fp_out ); + } + else if( /*!ignoreModels*/ false ) + { + std::string errorMessage( "Cannot create " + zoneName + ".obj\n" + + " Check no programs have a handle to file and run as admin.\n" ); + std::cout << errorMessage; + throw std::runtime_error( errorMessage.c_str() ); + return 0; + } - for( const auto& zone : zoneInfoMap ) - zoneDumpList.emplace( zone.second.name ); - } - else - { - zoneDumpList.emplace( zoneName ); - } -LABEL_DUMP: - entryStartTime = std::chrono::system_clock::now(); - zoneName = *zoneDumpList.begin(); - try - { - const auto zonePath = zoneNameToPath( zoneName ); + { + std::map< std::string, PCB_FILE > pcbFiles; - std::string listPcbPath( zonePath + "/collision/list.pcb" ); - std::string bgLgbPath( zonePath + "/level/bg.lgb" ); - std::string planmapLgbPath( zonePath + "/level/planmap.lgb" ); - std::string collisionFilePath( zonePath + "/collision/" ); + std::cout << "[Info] " << ( ignoreModels ? "Dumping MapRange and EObj" : "Writing obj file " ) << "\n"; + uint32_t totalGroups = 0; + uint32_t totalGroupEntries = 0; - isEx = bgLgbPath.find( "ex1" ) != -1 || bgLgbPath.find( "ex2" ) != -1; - std::vector< char > section; - std::vector< char > section1; - std::vector< char > section2; - - auto test_file = data1->getFile( bgLgbPath ); - section = test_file->access_data_sections().at( 0 ); - - auto planmap_file = data1->getFile( planmapLgbPath ); - section2 = planmap_file->access_data_sections().at( 0 ); - - auto test_file1 = data1->getFile( listPcbPath ); - section1 = test_file1->access_data_sections().at( 0 ); - - std::vector< std::string > stringList; - - uint32_t offset1 = 0x20; - - //loadEobjNames(); - getMapExdEntries( zoneId ); - - std::string eobjFileName( zoneName + "_eobj.csv" ); - std::ofstream eobjOut( eobjFileName, std::ios::trunc ); - if( !eobjOut.good() ) - throw std::string( "Unable to create " + zoneName + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); - - eobjOut.close(); - eobjOut.open( eobjFileName, std::ios::app ); - - if( !eobjOut.good() ) - throw std::string( "Unable to create " + zoneName + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); - - if( 0 ) + for( const auto& lgb : lgbList ) { - for( ; ; ) - { - - uint16_t trId = *(uint16_t*)§ion1[offset1]; - - char someString[200]; - sprintf( someString, "%str%04d.pcb", collisionFilePath.c_str(), trId ); - stringList.push_back( std::string( someString ) ); - //std::cout << someString << "\n"; - offset1 += 0x20; - - if( offset1 >= section1.size() ) + for( const auto& group : lgb.groups ) + { + //std::cout << "\t" << group.name << " Size " << group.header.entryCount << "\n"; + totalGroups++; + for( const auto& pEntry : group.entries ) + { + if( pEntry->getType() == LgbEntryType::MapRange ) { - break; + totalGroupEntries++; + writeEobjEntry( eobjOut, pEntry.get() ); } - } + } + } } - LGB_FILE bgLgb( §ion[0], "bg" ); - LGB_FILE planmapLgb( §ion2[0], "planmap" ); + std::cout << "[Info] " << "Loaded " << pcbFiles.size() << " PCB Files \n"; + std::cout << "[Info] " << "Total Groups " << totalGroups << " Total entries " << totalGroupEntries << "\n"; + } + std::cout << "[Success] " << "Exported " << zoneName << " in " << + std::chrono::duration_cast< std::chrono::seconds >( + std::chrono::system_clock::now() - entryStartTime ).count() << " seconds\n"; + } + catch( std::exception& e ) + { + std::cout << "[Error] " << e.what() << std::endl; + std::cout << "[Error] " + << "Unable to extract collision data.\n\tIf using standalone ensure your working directory folder layout is \n\tbg/[ffxiv|ex1|ex2]/teri/type/zone/[level|collision]" + << std::endl; + std::cout << std::endl; + std::cout << "[Info] " << "Usage: pcb_reader2 territory \"path/to/game/sqpack/ffxiv\" " << std::endl; + } + std::cout << "\n\n\n"; + if( discoverySql.good() ) + discoverySql.flush(); - std::vector< LGB_FILE > lgbList { bgLgb, planmapLgb }; - uint32_t max_index = 0; - - // dont bother if we cant write to a file - FILE* fp_out = nullptr; - //auto fp_out = ignoreModels ? ( FILE* )nullptr : fopen( ( zoneName + ".obj" ).c_str(), "w" ); - if( fp_out ) - { - fprintf( fp_out, "\n" ); - fclose( fp_out ); - } - else if( /*!ignoreModels*/ false ) - { - std::string errorMessage( "Cannot create " + zoneName + ".obj\n" + - " Check no programs have a handle to file and run as admin.\n" ); - std::cout << errorMessage; - throw std::runtime_error( errorMessage.c_str() ); - return 0; - } + LABEL_NEXT_ZONE_ENTRY: + zoneDumpList.erase( zoneName ); + if( !zoneDumpList.empty() ) + goto LABEL_DUMP; - { - std::map< std::string, PCB_FILE > pcbFiles; + std::cout << "\n\n\n[Success] Finished all tasks in " << + std::chrono::duration_cast< std::chrono::seconds >( std::chrono::system_clock::now() - startTime ).count() + << " seconds\n"; - std::cout << "[Info] " << ( ignoreModels ? "Dumping MapRange and EObj" : "Writing obj file " ) << "\n"; - uint32_t totalGroups = 0; - uint32_t totalGroupEntries = 0; + getchar(); - for( const auto& lgb : lgbList ) - { - for( const auto& group : lgb.groups ) - { - //std::cout << "\t" << group.name << " Size " << group.header.entryCount << "\n"; - totalGroups++; - for( const auto& pEntry : group.entries ) - { - if( pEntry->getType() == LgbEntryType::MapRange ) - { - totalGroupEntries++; - writeEobjEntry( eobjOut, pEntry.get() ); - } - } - } - } - std::cout << "[Info] " << "Loaded " << pcbFiles.size() << " PCB Files \n"; - std::cout << "[Info] " << "Total Groups " << totalGroups << " Total entries " << totalGroupEntries << "\n"; - } - std::cout << "[Success] " << "Exported " << zoneName << " in " << - std::chrono::duration_cast< std::chrono::seconds >( std::chrono::system_clock::now() - entryStartTime ).count() << " seconds\n"; - } - catch( std::exception& e ) - { - std::cout << "[Error] " << e.what() << std::endl; - std::cout << "[Error] " << "Unable to extract collision data.\n\tIf using standalone ensure your working directory folder layout is \n\tbg/[ffxiv|ex1|ex2]/teri/type/zone/[level|collision]" << std::endl; - std::cout << std::endl; - std::cout << "[Info] " << "Usage: pcb_reader2 territory \"path/to/game/sqpack/ffxiv\" " << std::endl; - } - std::cout << "\n\n\n"; - if( discoverySql.good() ) - discoverySql.flush(); - - LABEL_NEXT_ZONE_ENTRY: - zoneDumpList.erase( zoneName ); - if( !zoneDumpList.empty() ) - goto LABEL_DUMP; - - - std::cout << "\n\n\n[Success] Finished all tasks in " << - std::chrono::duration_cast< std::chrono::seconds >( std::chrono::system_clock::now() - startTime ).count() << " seconds\n"; - - getchar(); - - if( eData ) - delete eData; - if( data1 ) - delete data1; - return 0; + if( eData ) + delete eData; + if( data1 ) + delete data1; + return 0; } diff --git a/src/tools/discovery_parser/matrix4.h b/src/tools/discovery_parser/matrix4.h index d02d2c84..fdcee84c 100644 --- a/src/tools/discovery_parser/matrix4.h +++ b/src/tools/discovery_parser/matrix4.h @@ -7,94 +7,105 @@ // https://github.com/jpd002/Play--Framework/tree/master/include/math struct matrix4 { - // 4x4 - float grid[16]; - matrix4() - { - memset( &grid[0], 0, sizeof( grid ) ); - } + // 4x4 + float grid[16]; - float operator()( int row, int col ) const - { - return grid[(row * 4) + col]; - } + matrix4() + { + memset( &grid[ 0 ], 0, sizeof( grid ) ); + } - float& operator()( int row, int col ) - { - return grid[(row * 4) + col]; - } - static matrix4 rotateX( float angle ) - { - matrix4 ret = matrix4(); - ret(0, 0) = 1.000000000f; - ret(1, 1) = cos(angle); - ret(1, 2) = -sin(angle); - ret(2, 1) = sin(angle); - ret(2, 2) = cos(angle); - ret(3, 3) = 1.000000000f; - return ret; - } + float operator()( int row, int col ) const + { + return grid[ ( row * 4 ) + col ]; + } - static matrix4 rotateY( float angle ) - { - matrix4 ret = matrix4(); - ret(0, 0) = cos(angle); - ret(0, 2) = sin(angle); - ret(1, 1) = 1.000000000f; - ret(2, 0) = -sin(angle); - ret(2, 2) = cos(angle); - ret(3, 3) = 1.000000000f; - return ret; - } + float& operator()( int row, int col ) + { + return grid[ ( row * 4 ) + col ]; + } - static matrix4 rotateZ( float angle ) - { - matrix4 ret = matrix4(); - ret(0, 0) = cos(angle); - ret(0, 1) = -sin(angle); - ret(1, 0) = sin(angle); - ret(1, 1) = cos(angle); - ret(2, 2) = 1.000000000f; - ret(3, 3) = 1.000000000f; - return ret; - } + static matrix4 rotateX( float angle ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = 1.000000000f; + ret( 1, 1 ) = cos( angle ); + ret( 1, 2 ) = -sin( angle ); + ret( 2, 1 ) = sin( angle ); + ret( 2, 2 ) = cos( angle ); + ret( 3, 3 ) = 1.000000000f; + return ret; + } - static matrix4 scale( float x, float y, float z ) - { - matrix4 ret = matrix4(); - ret(0, 0) = x; - ret(1, 1) = y; - ret(2, 2) = z; - ret(3, 3) = 1; + static matrix4 rotateY( float angle ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = cos( angle ); + ret( 0, 2 ) = sin( angle ); + ret( 1, 1 ) = 1.000000000f; + ret( 2, 0 ) = -sin( angle ); + ret( 2, 2 ) = cos( angle ); + ret( 3, 3 ) = 1.000000000f; + return ret; + } - return ret; - } + static matrix4 rotateZ( float angle ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = cos( angle ); + ret( 0, 1 ) = -sin( angle ); + ret( 1, 0 ) = sin( angle ); + ret( 1, 1 ) = cos( angle ); + ret( 2, 2 ) = 1.000000000f; + ret( 3, 3 ) = 1.000000000f; + return ret; + } - static matrix4 translate( float x, float y, float z ) - { - matrix4 ret = matrix4(); - ret(0, 0) = 1; - ret(1, 1) = 1; - ret(2, 2) = 1; - ret(3, 3) = 1; + static matrix4 scale( float x, float y, float z ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = x; + ret( 1, 1 ) = y; + ret( 2, 2 ) = z; + ret( 3, 3 ) = 1; - ret(3, 0) = x; - ret(3, 1) = y; - ret(3, 2) = z; - return ret; - } + return ret; + } - matrix4 operator *( const matrix4& rhs ) const - { - matrix4 ret; - for( unsigned int i = 0; i < 4; i++ ) - { - ret( i, 0 ) = (*this)(i, 0) * rhs( 0, 0 ) + (*this)(i, 1) * rhs( 1, 0 ) + (*this)(i, 2) * rhs( 2, 0 ) + (*this)(i, 3) * rhs( 3, 0 ); - ret( i, 1 ) = (*this)(i, 0) * rhs( 0, 1 ) + (*this)(i, 1) * rhs( 1, 1 ) + (*this)(i, 2) * rhs( 2, 1 ) + (*this)(i, 3) * rhs( 3, 1 ); - ret( i, 2 ) = (*this)(i, 0) * rhs( 0, 2 ) + (*this)(i, 1) * rhs( 1, 2 ) + (*this)(i, 2) * rhs( 2, 2 ) + (*this)(i, 3) * rhs( 3, 2 ); - ret( i, 3 ) = (*this)(i, 0) * rhs( 0, 3 ) + (*this)(i, 1) * rhs( 1, 3 ) + (*this)(i, 2) * rhs( 2, 3 ) + (*this)(i, 3) * rhs( 3, 3 ); - } - return ret; - } + static matrix4 translate( float x, float y, float z ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = 1; + ret( 1, 1 ) = 1; + ret( 2, 2 ) = 1; + ret( 3, 3 ) = 1; + + ret( 3, 0 ) = x; + ret( 3, 1 ) = y; + ret( 3, 2 ) = z; + return ret; + } + + matrix4 operator*( const matrix4& rhs ) const + { + matrix4 ret; + for( unsigned int i = 0; i < 4; i++ ) + { + ret( i, 0 ) = + ( *this )( i, 0 ) * rhs( 0, 0 ) + ( *this )( i, 1 ) * rhs( 1, 0 ) + ( *this )( i, 2 ) * rhs( 2, 0 ) + + ( *this )( i, 3 ) * rhs( 3, 0 ); + ret( i, 1 ) = + ( *this )( i, 0 ) * rhs( 0, 1 ) + ( *this )( i, 1 ) * rhs( 1, 1 ) + ( *this )( i, 2 ) * rhs( 2, 1 ) + + ( *this )( i, 3 ) * rhs( 3, 1 ); + ret( i, 2 ) = + ( *this )( i, 0 ) * rhs( 0, 2 ) + ( *this )( i, 1 ) * rhs( 1, 2 ) + ( *this )( i, 2 ) * rhs( 2, 2 ) + + ( *this )( i, 3 ) * rhs( 3, 2 ); + ret( i, 3 ) = + ( *this )( i, 0 ) * rhs( 0, 3 ) + ( *this )( i, 1 ) * rhs( 1, 3 ) + ( *this )( i, 2 ) * rhs( 2, 3 ) + + ( *this )( i, 3 ) * rhs( 3, 3 ); + } + return ret; + } }; + #endif diff --git a/src/tools/discovery_parser/pcb.h b/src/tools/discovery_parser/pcb.h index 4b775d84..77a50d81 100644 --- a/src/tools/discovery_parser/pcb.h +++ b/src/tools/discovery_parser/pcb.h @@ -6,87 +6,87 @@ struct PCB_HEADER { - uint32_t unknown_1; - uint32_t unknown_2; - uint32_t num_entries; // count starts at 0 - uint32_t total_indices; - uint64_t padding; + uint32_t unknown_1; + uint32_t unknown_2; + uint32_t num_entries; // count starts at 0 + uint32_t total_indices; + uint64_t padding; }; struct PCB_BLOCK_HEADER { - uint32_t type; // 0 for entry, 0x30 for group - uint32_t group_size; // when group size in bytes for the group block - // bounding box - float x; - float y; - float z; - float x1; - float y1; - float z1; - // number of vertices packed into 16 bit - uint16_t num_v16; - // number of indices - uint16_t num_indices; - // number of normal floar vertices - uint32_t num_vertices; + uint32_t type; // 0 for entry, 0x30 for group + uint32_t group_size; // when group size in bytes for the group block + // bounding box + float x; + float y; + float z; + float x1; + float y1; + float z1; + // number of vertices packed into 16 bit + uint16_t num_v16; + // number of indices + uint16_t num_indices; + // number of normal floar vertices + uint32_t num_vertices; }; struct PCB_VERTEXDATA { - float x; - float y; - float z; + float x; + float y; + float z; }; struct PCB_INDEXDATA { - uint8_t index[3]; - uint8_t unknown[3]; - uint8_t unknown1[6]; + uint8_t index[3]; + uint8_t unknown[3]; + uint8_t unknown1[6]; }; struct PCB_VERTEXDATAI16 { - uint16_t x; - uint16_t y; - uint16_t z; + uint16_t x; + uint16_t y; + uint16_t z; }; struct PCB_BLOCK_DATA { - std::vector< PCB_VERTEXDATA > vertices; - std::vector< PCB_VERTEXDATAI16 > vertices_i16; - std::vector< PCB_INDEXDATA > indices; + std::vector< PCB_VERTEXDATA > vertices; + std::vector< PCB_VERTEXDATAI16 > vertices_i16; + std::vector< PCB_INDEXDATA > indices; }; struct PCB_BLOCK_ENTRY { - PCB_BLOCK_HEADER header; - PCB_BLOCK_DATA data; + PCB_BLOCK_HEADER header; + PCB_BLOCK_DATA data; }; struct PCB_FILE { - PCB_HEADER header; - std::vector< PCB_BLOCK_ENTRY > entries; + PCB_HEADER header; + std::vector< PCB_BLOCK_ENTRY > entries; }; struct PCB_LIST_ENTRY { - uint32_t id; - float x, y, z, x2, y2, z2, rot; + uint32_t id; + float x, y, z, x2, y2, z2, rot; }; struct PCB_LIST_BASE_ENTRY { - float x, y, z, x2, y2, z2, rot; + float x, y, z, x2, y2, z2, rot; }; struct PCB_LIST_FILE { - uint32_t count; - PCB_LIST_BASE_ENTRY entry; - std::vector entries; + uint32_t count; + PCB_LIST_BASE_ENTRY entry; + std::vector< PCB_LIST_ENTRY > entries; }; #endif \ No newline at end of file diff --git a/src/tools/discovery_parser/sgb.h b/src/tools/discovery_parser/sgb.h index 2aa675aa..cf03c12e 100644 --- a/src/tools/discovery_parser/sgb.h +++ b/src/tools/discovery_parser/sgb.h @@ -25,188 +25,197 @@ struct SGB_GROUP; struct SGB_GROUP_HEADER; -enum SgbDataType : uint32_t +enum SgbDataType : + uint32_t { - Unknown0008 = 0x0008, - Group = 0x0100, + Unknown0008 = 0x0008, + Group = 0x0100, }; -enum SgbGroupEntryType : uint32_t +enum SgbGroupEntryType : + uint32_t { - Model = 0x01, + Model = 0x01, }; struct SGB_GROUP_HEADER { - SgbDataType type; - int32_t nameOffset; - uint32_t unknown08; - uint32_t unknown0C; + SgbDataType type; + int32_t nameOffset; + uint32_t unknown08; + uint32_t unknown0C; - uint32_t unknown10; - uint32_t unknown14; - uint32_t unknown18; - uint32_t unknown1C; + uint32_t unknown10; + uint32_t unknown14; + uint32_t unknown18; + uint32_t unknown1C; - int32_t entryCount; - uint32_t unknown24; - uint32_t unknown28; - uint32_t unknown2C; + int32_t entryCount; + uint32_t unknown24; + uint32_t unknown28; + uint32_t unknown2C; - uint32_t unknown30; - uint32_t unknown34; - uint32_t unknown38; - uint32_t unknown3C; + uint32_t unknown30; + uint32_t unknown34; + uint32_t unknown38; + uint32_t unknown3C; - uint32_t unknown40; - uint32_t unknown44; + uint32_t unknown40; + uint32_t unknown44; }; struct SGB_GROUP_ENTRY { public: - char* m_buf; - uint32_t m_offset; + char* m_buf; + uint32_t m_offset; - SGB_GROUP_ENTRY() - { - m_buf = nullptr; - m_offset = 0; - }; - SGB_GROUP_ENTRY( char* buf, uint32_t offset ) - { - m_buf = buf; - m_offset = offset; - }; - virtual ~SGB_GROUP_ENTRY() {}; + SGB_GROUP_ENTRY() + { + m_buf = nullptr; + m_offset = 0; + }; + + SGB_GROUP_ENTRY( char* buf, uint32_t offset ) + { + m_buf = buf; + m_offset = offset; + }; + + virtual ~SGB_GROUP_ENTRY() + { + }; }; struct SGB_ENTRY_HEADER { - SgbGroupEntryType type; - uint32_t unknown2; - int32_t nameOffset; - vec3 translation; - vec3 rotation; - vec3 scale; + SgbGroupEntryType type; + uint32_t unknown2; + int32_t nameOffset; + vec3 translation; + vec3 rotation; + vec3 scale; }; -struct SGB_MODEL_HEADER : public SGB_ENTRY_HEADER +struct SGB_MODEL_HEADER : + public SGB_ENTRY_HEADER { - int32_t modelFileOffset; - int32_t collisionFileOffset; + int32_t modelFileOffset; + int32_t collisionFileOffset; }; -struct SGB_MODEL_ENTRY : public SGB_GROUP_ENTRY +struct SGB_MODEL_ENTRY : + public SGB_GROUP_ENTRY { - SGB_MODEL_HEADER header; - SgbGroupEntryType type; - std::string name; - std::string modelFileName; - std::string collisionFileName; + SGB_MODEL_HEADER header; + SgbGroupEntryType type; + std::string name; + std::string modelFileName; + std::string collisionFileName; - SGB_MODEL_ENTRY( char* buf, uint32_t offset ) - { - header = *reinterpret_cast< SGB_MODEL_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - modelFileName = std::string( buf + offset + header.modelFileOffset ); - collisionFileName = std::string( buf + offset + header.collisionFileOffset ); - } + SGB_MODEL_ENTRY( char* buf, uint32_t offset ) + { + header = *reinterpret_cast< SGB_MODEL_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + modelFileName = std::string( buf + offset + header.modelFileOffset ); + collisionFileName = std::string( buf + offset + header.collisionFileOffset ); + } }; struct SGB_GROUP { - SGB_GROUP_HEADER header; - std::string name; - SGB_FILE* parent; - std::vector< std::shared_ptr< SGB_GROUP_ENTRY > > entries; + SGB_GROUP_HEADER header; + std::string name; + SGB_FILE* parent; + std::vector< std::shared_ptr< SGB_GROUP_ENTRY > > entries; - SGB_GROUP( char* buf, SGB_FILE* file, uint32_t fileSize, uint32_t offset ) - { - parent = file; - header = *reinterpret_cast< SGB_GROUP_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); + SGB_GROUP( char* buf, SGB_FILE* file, uint32_t fileSize, uint32_t offset ) + { + parent = file; + header = *reinterpret_cast< SGB_GROUP_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); - auto entriesOffset = offset + sizeof( header ); + auto entriesOffset = offset + sizeof( header ); - for( auto i = 0; i < header.entryCount; ++i ) + for( auto i = 0; i < header.entryCount; ++i ) + { + auto entryOffset = entriesOffset + *reinterpret_cast< uint32_t* >( buf + ( entriesOffset + ( i * 4 ) ) ); + if( entryOffset > fileSize ) + throw std::runtime_error( "SGB_GROUP entry offset was larger than SGB file size!" ); + auto type = *reinterpret_cast< uint32_t* >( buf + entryOffset ); + if( type == SgbGroupEntryType::Model && !ignoreModels ) { - auto entryOffset = entriesOffset + *reinterpret_cast< uint32_t* >( buf + ( entriesOffset + ( i * 4 ) ) ); - if( entryOffset > fileSize ) - throw std::runtime_error( "SGB_GROUP entry offset was larger than SGB file size!" ); - auto type = *reinterpret_cast< uint32_t* >( buf + entryOffset ); - if( type == SgbGroupEntryType::Model && !ignoreModels ) - { - entries.push_back( std::make_shared< SGB_MODEL_ENTRY >( buf, entryOffset ) ); - } - else - { - // std::cout << "\t\tUnknown SGB entry! Group: " << name << " type: " << type << " index: " << i << " entryOffset: " << entryOffset << "\n"; - } + entries.push_back( std::make_shared< SGB_MODEL_ENTRY >( buf, entryOffset ) ); } - } + else + { + // std::cout << "\t\tUnknown SGB entry! Group: " << name << " type: " << type << " index: " << i << " entryOffset: " << entryOffset << "\n"; + } + } + } }; struct SGB_HEADER { - char magic[4]; // SGB1 - uint32_t fileSize; - uint32_t unknown1; - char magic2[4]; // SCN1 + char magic[4]; // SGB1 + uint32_t fileSize; + uint32_t unknown1; + char magic2[4]; // SCN1 - uint32_t unknown10; - int32_t sharedOffset; - uint32_t unknown18; - int32_t offset1C; + uint32_t unknown10; + int32_t sharedOffset; + uint32_t unknown18; + int32_t offset1C; - uint32_t unknown20; - uint32_t unknown24; - uint32_t unknown28; - uint32_t unknown2C; + uint32_t unknown20; + uint32_t unknown24; + uint32_t unknown28; + uint32_t unknown2C; - uint32_t unknown30; - uint32_t unknown34; - uint32_t unknown38; - uint32_t unknown3C; + uint32_t unknown30; + uint32_t unknown34; + uint32_t unknown38; + uint32_t unknown3C; - uint32_t unknown40; - uint32_t unknown44; - uint32_t unknown48; - uint32_t unknown4C; + uint32_t unknown40; + uint32_t unknown44; + uint32_t unknown48; + uint32_t unknown4C; - uint32_t unknown50; - uint32_t unknown54; + uint32_t unknown50; + uint32_t unknown54; }; struct SGB_FILE { - SGB_HEADER header; - std::vector entries; + SGB_HEADER header; + std::vector< SGB_GROUP > entries; - SGB_FILE() - { - memset( &header, 0, sizeof( header ) ); - } - SGB_FILE( char* buf ) - { - constexpr int baseOffset = 0x14; - header = *reinterpret_cast< SGB_HEADER* >( buf ); + SGB_FILE() + { + memset( &header, 0, sizeof( header ) ); + } - if( strncmp( &header.magic[0], "SGB1", 4 ) != 0 || strncmp( &header.magic2[0], "SCN1", 4 ) != 0 ) - throw std::runtime_error( "Unable to load SGB File!" ); + SGB_FILE( char* buf ) + { + constexpr int baseOffset = 0x14; + header = *reinterpret_cast< SGB_HEADER* >( buf ); - try - { - auto group = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.sharedOffset ); - entries.push_back( group ); - auto group2 = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.offset1C ); - entries.push_back( group2 ); - } - catch( std::exception& e ) - { - std::cout << e.what() << "\n"; - } - }; + if( strncmp( &header.magic[ 0 ], "SGB1", 4 ) != 0 || strncmp( &header.magic2[ 0 ], "SCN1", 4 ) != 0 ) + throw std::runtime_error( "Unable to load SGB File!" ); + + try + { + auto group = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.sharedOffset ); + entries.push_back( group ); + auto group2 = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.offset1C ); + entries.push_back( group2 ); + } + catch( std::exception& e ) + { + std::cout << e.what() << "\n"; + } + }; }; diff --git a/src/tools/discovery_parser/tex.h b/src/tools/discovery_parser/tex.h index 79a6e310..d8b90829 100644 --- a/src/tools/discovery_parser/tex.h +++ b/src/tools/discovery_parser/tex.h @@ -13,53 +13,53 @@ struct TEX_HEADER { - uint32_t unknown; // 00 - uint16_t compressionType; // 04 - uint16_t unknown2; // 06 - uint16_t uncompressedWidth; // 08 - uint16_t uncompressedHeight; // 0A - uint16_t unknown5; // 0C - uint16_t numMipMaps; // 0F - uint16_t unknown4[0x0B]; // 11 - 0x1C - std::vector< uint32_t > mipMaps; + uint32_t unknown; // 00 + uint16_t compressionType; // 04 + uint16_t unknown2; // 06 + uint16_t uncompressedWidth; // 08 + uint16_t uncompressedHeight; // 0A + uint16_t unknown5; // 0C + uint16_t numMipMaps; // 0F + uint16_t unknown4[0x0B]; // 11 - 0x1C + std::vector< uint32_t > mipMaps; }; struct TEX_FILE { - std::string name; - TEX_HEADER header; - std::vector< char > data; + std::string name; + TEX_HEADER header; + std::vector< char > data; - TEX_FILE( const std::string& path ) - { - name = path; - std::ifstream in( path, std::ios::binary ); - if ( in.good() ) - { - std::size_t size = 0; - in.seekg( 0, in.end ); - size = in.tellg(); - in.seekg( 0, in.beg ); - data.resize( size ); - in.read( &data[0], size ); + TEX_FILE( const std::string& path ) + { + name = path; + std::ifstream in( path, std::ios::binary ); + if( in.good() ) + { + std::size_t size = 0; + in.seekg( 0, in.end ); + size = in.tellg(); + in.seekg( 0, in.beg ); + data.resize( size ); + in.read( &data[ 0 ], size ); - header = *reinterpret_cast< TEX_HEADER* >( &data[0] ); + header = *reinterpret_cast< TEX_HEADER* >( &data[ 0 ] ); - header.mipMaps.clear(); + header.mipMaps.clear(); - for( auto i = 0; i < header.numMipMaps; ++i) - header.mipMaps.push_back( *reinterpret_cast< uint32_t* >( &data[0x1C + ( i * 4 )] ) ); + for( auto i = 0; i < header.numMipMaps; ++i ) + header.mipMaps.push_back( *reinterpret_cast< uint32_t* >( &data[ 0x1C + ( i * 4 ) ] ) ); - std::cout << path << "\n\tcompressionType " << header.compressionType << " uncompressedWidth " << - header.uncompressedWidth << " uncompressedHeight " << header.uncompressedHeight << " numMipMaps " << - header.numMipMaps << " mipMaps " << header.mipMaps.size() << "\n"; - } - else - { - std::string errorStr( "Unable to open " + path ); - throw std::runtime_error( errorStr.c_str() ); - } - } + std::cout << path << "\n\tcompressionType " << header.compressionType << " uncompressedWidth " << + header.uncompressedWidth << " uncompressedHeight " << header.uncompressedHeight << " numMipMaps " << + header.numMipMaps << " mipMaps " << header.mipMaps.size() << "\n"; + } + else + { + std::string errorStr( "Unable to open " + path ); + throw std::runtime_error( errorStr.c_str() ); + } + } }; #endif \ No newline at end of file diff --git a/src/tools/discovery_parser/tex_decode.h b/src/tools/discovery_parser/tex_decode.h index f746dcc4..2cc14f56 100644 --- a/src/tools/discovery_parser/tex_decode.h +++ b/src/tools/discovery_parser/tex_decode.h @@ -11,240 +11,263 @@ struct Colour { - uint8_t r, g, b, a; + uint8_t r, g, b, a; - Colour( int r, int g, int b, int a ) - { - this->r = r; - this->g = g; - this->b = b; - this->a = a; - } + Colour( int r, int g, int b, int a ) + { + this->r = r; + this->g = g; + this->b = b; + this->a = a; + } - uint32_t getRGB() - { - return ( a << 24 ) | ( r << 16 ) | ( g << 8 ) | ( b << 0 ); - } + uint32_t getRGB() + { + return ( a << 24 ) | ( r << 16 ) | ( g << 8 ) | ( b << 0 ); + } }; struct ImageHeader { - uint32_t height; - uint32_t width; + uint32_t height; + uint32_t width; }; struct Image { - uint32_t height, width; - std::vector< std::vector< uint32_t > > data; + uint32_t height, width; + std::vector< std::vector< uint32_t > > data; - Image() - { + Image() + { - } + } - Image( int height, int width ) - { - this->height = height; - this->width = width; - } + Image( int height, int width ) + { + this->height = height; + this->width = width; + } - Image( char* buf ) - { - height = *reinterpret_cast< uint32_t* >( buf + 0 ); - width = *reinterpret_cast< uint32_t* >( buf + 4 ); - data.resize( *reinterpret_cast< uint32_t* >( buf + 8 ) ); + Image( char* buf ) + { + height = *reinterpret_cast< uint32_t* >( buf + 0 ); + width = *reinterpret_cast< uint32_t* >( buf + 4 ); + data.resize( *reinterpret_cast< uint32_t* >( buf + 8 ) ); - auto offset = 12; - for( auto y = 0; y < data.size(); ++y ) + auto offset = 12; + for( auto y = 0; y < data.size(); ++y ) + { + auto row = *reinterpret_cast< uint32_t* >( buf + offset ); + auto entries = *reinterpret_cast< uint32_t* >( buf + offset + 4 ); + data[ y ].resize( entries ); + offset += 8; + + for( auto x = 0; x < entries; ++x ) + data[ y ][ x ] = *reinterpret_cast< uint32_t* >( buf + offset + ( x * 4 ) ); + offset += entries * 4; + } + } + + void toFile( const std::string& path ) + { + std::ofstream out( path.c_str(), std::ios::trunc ); + out.close(); + out.open( path, std::ios::binary | std::ios::app ); + + out.write( reinterpret_cast< char* >( &height ), 4 ); // 0 + out.write( reinterpret_cast< char* >( &width ), 4 ); // 4 + + auto size = data.size(); + out.write( reinterpret_cast< char* >( &size ), 4 ); // 8 + + for( auto y = 0; y < data.size(); ++y ) + { + out.write( reinterpret_cast< char* >( &y ), 4 ); + auto entries = data[ y ].size(); + out.write( reinterpret_cast< char* >( &entries ), 4 ); + for( auto x = 0; x < data[ y ].size(); ++x ) { - auto row = *reinterpret_cast< uint32_t* >( buf + offset ); - auto entries = *reinterpret_cast< uint32_t* >( buf + offset + 4 ); - data[y].resize( entries ); - offset += 8; - - for( auto x = 0; x < entries; ++x ) - data[y][x] = *reinterpret_cast< uint32_t* >( buf + offset + ( x * 4 ) ); - offset += entries * 4; + out.write( reinterpret_cast< char* >( &data[ y ][ x ] ), 4 ); } - } + } + out.close(); + } - void toFile( const std::string& path ) - { - std::ofstream out( path.c_str(), std::ios::trunc ); - out.close(); - out.open( path, std::ios::binary | std::ios::app ); - - out.write( reinterpret_cast< char* >( &height ), 4 ); // 0 - out.write( reinterpret_cast< char* >( &width ), 4 ); // 4 - - auto size = data.size(); - out.write( reinterpret_cast< char* >( &size ), 4 ); // 8 - - for( auto y = 0; y < data.size(); ++y ) - { - out.write( reinterpret_cast< char* >( &y ), 4 ); - auto entries = data[y].size(); - out.write( reinterpret_cast< char* >( &entries ), 4); - for( auto x = 0; x < data[y].size(); ++x ) - { - out.write( reinterpret_cast< char* >( &data[y][x] ), 4 ); - } - } - out.close(); - } - - void setRGB( unsigned int x, unsigned int y, uint32_t colour ) - { - if( data.size() <= y ) - data.resize( y + 1 ); - if( data[y].size() <= x ) - data[y].resize( x + 1 ); - data[y][x] = colour; - } + void setRGB( unsigned int x, unsigned int y, uint32_t colour ) + { + if( data.size() <= y ) + data.resize( y + 1 ); + if( data[ y ].size() <= x ) + data[ y ].resize( x + 1 ); + data[ y ][ x ] = colour; + } }; -void DecompressBlockDTX1( int x, const int y, const int width, const int color0, const int color1, const int txl1, const int txl2, Image& img ) +void DecompressBlockDTX1( int x, const int y, const int width, const int color0, const int color1, const int txl1, + const int txl2, Image& img ) { - float temp = ((color0 >> 11) * 255.0f) + 16.0f; - const float r0 = (((temp / 32.0f) + temp) / 32.0f); - temp = (((color0 & 0x07E0) >> 5) * 255.0f) + 32.0f; - const float g0 = (((temp / 64.0f) + temp) / 64.0f); - temp = ((color0 & 0x001F) * 255.0f) + 16.0f; - const float b0 = (((temp / 32.0f) + temp) / 32.0f); - temp = ((color1 >> 11) * 255.0f) + 16.0f; - const float r1 = (((temp / 32.0f) + temp) / 32.0f); - temp = (((color1 & 0x07E0) >> 5) * 255.0f) + 32.0f; - const float g1 = (((temp / 64.0f) + temp) / 64.0f); - temp = ((color1 & 0x001F) * 255.0f) + 16.0f; - const float b1 = (((temp / 32.0f) + temp) / 32.0f); - for (int j = 0; j < 4; j++) { - for (int i = 0; i < 4; i++) { - // Color FinalColor; - const int d = (4 * j) + i; - int positionCode; - if ((d * 2) >= 16) { - positionCode = (txl2 >> ((d * 2) % 16)) & 0x03; - } else { - positionCode = (txl1 >> (d * 2)) & 0x03; - } - float fr, fg, fb, fa; - if (color0 > color1) { - switch (positionCode) { - case 0: { - fr = r0; - fg = g0; - fb = b0; - fa = 0; - break; - } - case 1: { - fr = r1; - fg = g1; - fb = b1; - fa = 0; - break; - } - case 2: { - fr = ((2.0f * (float) r0) + (float) r1) / 3.0f; - fg = ((2.0f * (float) g0) + (float) g1) / 3.0f; - fb = ((2.0f * (float) b0) + (float) b1) / 3.0f; - fa = 0; - break; - } - case 3: { - fr = ((float) r0 + (2.0f * (float) r1)) / 3.0f; - fg = ((float) g0 + (2.0f * (float) g1)) / 3.0f; - fb = ((float) b0 + (2.0f * (float) b1)) / 3.0f; - fa = 0; - break; - } - default: { - fr = 0; - fg = 0; - fb = 0; - fa = 0; - } - } - } else { - switch (positionCode) { - case 0: { - fr = r0; - fg = g0; - fb = b0; - fa = 0xff; - break; - } - case 1: { - fr = r1; - fg = g1; - fb = b1; - fa = 0xff; - break; - } - case 2: { - fr = ((float) r0 + (float) r1) / 2.0f; - fg = ((float) g0 + (float) g1) / 2.0f; - fb = ((float) b0 + (float) b1) / 2.0f; - fa = 0xff; - break; - } - case 3: { - fr = 0; - fg = 0; - fb = 0; - fa = 0xff; - break; - } - default: { - fr = 0; - fg = 0; - fb = 0; - fa = 0; - } - } - } - if ((x + i) < width) { - int alpha = 0; - if ((fr == fg) && (fr == fb) && (fr == 0)) { - alpha = 0xff; - } - img.setRGB(x + i, y + j, Colour((int) fr, (int) fg, (int) fb, 255 - alpha).getRGB()); - } + float temp = ( ( color0 >> 11 ) * 255.0f ) + 16.0f; + const float r0 = ( ( ( temp / 32.0f ) + temp ) / 32.0f ); + temp = ( ( ( color0 & 0x07E0 ) >> 5 ) * 255.0f ) + 32.0f; + const float g0 = ( ( ( temp / 64.0f ) + temp ) / 64.0f ); + temp = ( ( color0 & 0x001F ) * 255.0f ) + 16.0f; + const float b0 = ( ( ( temp / 32.0f ) + temp ) / 32.0f ); + temp = ( ( color1 >> 11 ) * 255.0f ) + 16.0f; + const float r1 = ( ( ( temp / 32.0f ) + temp ) / 32.0f ); + temp = ( ( ( color1 & 0x07E0 ) >> 5 ) * 255.0f ) + 32.0f; + const float g1 = ( ( ( temp / 64.0f ) + temp ) / 64.0f ); + temp = ( ( color1 & 0x001F ) * 255.0f ) + 16.0f; + const float b1 = ( ( ( temp / 32.0f ) + temp ) / 32.0f ); + for( int j = 0; j < 4; j++ ) + { + for( int i = 0; i < 4; i++ ) + { + // Color FinalColor; + const int d = ( 4 * j ) + i; + int positionCode; + if( ( d * 2 ) >= 16 ) + { + positionCode = ( txl2 >> ( ( d * 2 ) % 16 ) ) & 0x03; } - } + else + { + positionCode = ( txl1 >> ( d * 2 ) ) & 0x03; + } + float fr, fg, fb, fa; + if( color0 > color1 ) + { + switch( positionCode ) + { + case 0: + { + fr = r0; + fg = g0; + fb = b0; + fa = 0; + break; + } + case 1: + { + fr = r1; + fg = g1; + fb = b1; + fa = 0; + break; + } + case 2: + { + fr = ( ( 2.0f * ( float ) r0 ) + ( float ) r1 ) / 3.0f; + fg = ( ( 2.0f * ( float ) g0 ) + ( float ) g1 ) / 3.0f; + fb = ( ( 2.0f * ( float ) b0 ) + ( float ) b1 ) / 3.0f; + fa = 0; + break; + } + case 3: + { + fr = ( ( float ) r0 + ( 2.0f * ( float ) r1 ) ) / 3.0f; + fg = ( ( float ) g0 + ( 2.0f * ( float ) g1 ) ) / 3.0f; + fb = ( ( float ) b0 + ( 2.0f * ( float ) b1 ) ) / 3.0f; + fa = 0; + break; + } + default: + { + fr = 0; + fg = 0; + fb = 0; + fa = 0; + } + } + } + else + { + switch( positionCode ) + { + case 0: + { + fr = r0; + fg = g0; + fb = b0; + fa = 0xff; + break; + } + case 1: + { + fr = r1; + fg = g1; + fb = b1; + fa = 0xff; + break; + } + case 2: + { + fr = ( ( float ) r0 + ( float ) r1 ) / 2.0f; + fg = ( ( float ) g0 + ( float ) g1 ) / 2.0f; + fb = ( ( float ) b0 + ( float ) b1 ) / 2.0f; + fa = 0xff; + break; + } + case 3: + { + fr = 0; + fg = 0; + fb = 0; + fa = 0xff; + break; + } + default: + { + fr = 0; + fg = 0; + fb = 0; + fa = 0; + } + } + } + if( ( x + i ) < width ) + { + int alpha = 0; + if( ( fr == fg ) && ( fr == fb ) && ( fr == 0 ) ) + { + alpha = 0xff; + } + img.setRGB( x + i, y + j, Colour( ( int ) fr, ( int ) fg, ( int ) fb, 255 - alpha ).getRGB() ); + } + } + } } Image DecodeTexDXT1( const TEX_FILE& tex, uint32_t offset, uint32_t targetHeight, uint32_t targetWidth, - uint32_t compressedHeight, uint32_t compressedWidth ) + uint32_t compressedHeight, uint32_t compressedWidth ) { - if( offset > tex.data.size() ) - throw std::runtime_error( "Unable to decode TEX file " + tex.name + ": offset too large" ); - else if( tex.data.size() < ( ( targetHeight * targetWidth ) / 2 ) ) - throw std::runtime_error( "Unable to decode TEX file " + tex.name + ": data too small" ); + if( offset > tex.data.size() ) + throw std::runtime_error( "Unable to decode TEX file " + tex.name + ": offset too large" ); + else if( tex.data.size() < ( ( targetHeight * targetWidth ) / 2 ) ) + throw std::runtime_error( "Unable to decode TEX file " + tex.name + ": data too small" ); - std::vector< char > ret; - auto data = tex.data.data() + offset; - int pos = 0; + std::vector< char > ret; + auto data = tex.data.data() + offset; + int pos = 0; - Image img( targetHeight, targetWidth ); + Image img( targetHeight, targetWidth ); - for( int y = 0; y < compressedHeight; y++ ) - { - for( int x = 0; x < compressedWidth; x++ ) - { - const int t0 = *reinterpret_cast< const uint16_t* >( data + pos + 0 ) & 0xffff; - const int t1 = *reinterpret_cast< const uint16_t* >( data + pos + 2 ) & 0xffff; - const int t2 = *reinterpret_cast< const uint16_t* >( data + pos + 4 ) & 0xffff; - const int t3 = *reinterpret_cast< const uint16_t* >( data + pos + 6 ) & 0xffff; + for( int y = 0; y < compressedHeight; y++ ) + { + for( int x = 0; x < compressedWidth; x++ ) + { + const int t0 = *reinterpret_cast< const uint16_t* >( data + pos + 0 ) & 0xffff; + const int t1 = *reinterpret_cast< const uint16_t* >( data + pos + 2 ) & 0xffff; + const int t2 = *reinterpret_cast< const uint16_t* >( data + pos + 4 ) & 0xffff; + const int t3 = *reinterpret_cast< const uint16_t* >( data + pos + 6 ) & 0xffff; - pos += 8; - DecompressBlockDTX1( x * 4, y * 4, targetWidth, t0, t1, t2, t3, img ); - } - } - return img; + pos += 8; + DecompressBlockDTX1( x * 4, y * 4, targetWidth, t0, t1, t2, t3, img ); + } + } + return img; } #endif \ No newline at end of file diff --git a/src/tools/discovery_parser/vec3.h b/src/tools/discovery_parser/vec3.h index 19e510fc..612c9026 100644 --- a/src/tools/discovery_parser/vec3.h +++ b/src/tools/discovery_parser/vec3.h @@ -6,46 +6,55 @@ struct vec3 { - float x, y, z; - vec3() - { - x = 0.0f; - y = 0.0f; - z = 0.0f; - } - vec3(float x, float y, float z) - { - this->x = x; - this->y = y; - this->z = z; - }; + float x, y, z; + + vec3() + { + x = 0.0f; + y = 0.0f; + z = 0.0f; + } + + vec3( float x, float y, float z ) + { + this->x = x; + this->y = y; + this->z = z; + }; }; -static vec3 operator *(const vec3& lhs, const matrix4& rhs) + +static vec3 operator*( const vec3& lhs, const matrix4& rhs ) { - vec3 ret; - ret.x = rhs(0, 0) * lhs.x + rhs(0, 1) * lhs.y + rhs(0, 2) * lhs.z; - ret.y = rhs(1, 0) * lhs.x + rhs(1, 1) * lhs.y + rhs(1, 2) * lhs.z; - ret.z = rhs(2, 0) * lhs.x + rhs(2, 1) * lhs.y + rhs(2, 2) * lhs.z; - return ret; + vec3 ret; + ret.x = rhs( 0, 0 ) * lhs.x + rhs( 0, 1 ) * lhs.y + rhs( 0, 2 ) * lhs.z; + ret.y = rhs( 1, 0 ) * lhs.x + rhs( 1, 1 ) * lhs.y + rhs( 1, 2 ) * lhs.z; + ret.z = rhs( 2, 0 ) * lhs.x + rhs( 2, 1 ) * lhs.y + rhs( 2, 2 ) * lhs.z; + return ret; }; -static vec3 operator *(const vec3& lhs, float scalar) + +static vec3 operator*( const vec3& lhs, float scalar ) { - return {lhs.x * scalar, lhs.y * scalar, lhs.z * scalar}; + return { lhs.x * scalar, lhs.y * scalar, lhs.z * scalar }; } -static vec3 operator +(const vec3& lhs, const vec3& rhs) + +static vec3 operator+( const vec3& lhs, const vec3& rhs ) { - return {lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z}; + return { lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z }; } -static vec3 operator -(const vec3& lhs, const vec3& rhs) + +static vec3 operator-( const vec3& lhs, const vec3& rhs ) { - return {lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z}; + return { lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z }; } -static vec3 operator /(const vec3& lhs, const vec3& rhs) + +static vec3 operator/( const vec3& lhs, const vec3& rhs ) { - return {lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z}; + return { lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z }; } -static vec3 operator /(const vec3& lhs, float scalar) + +static vec3 operator/( const vec3& lhs, float scalar ) { - return {lhs.x / scalar, lhs.y / scalar, lhs.z / scalar}; + return { lhs.x / scalar, lhs.y / scalar, lhs.z / scalar }; } + #endif \ No newline at end of file diff --git a/src/tools/event_object_parser/lgb.h b/src/tools/event_object_parser/lgb.h index 9fe4c0f3..91f852b8 100644 --- a/src/tools/event_object_parser/lgb.h +++ b/src/tools/event_object_parser/lgb.h @@ -24,306 +24,331 @@ struct LGB_FILE_HEADER; struct LGB_GROUP; struct LGB_GROUP_HEADER; -enum class LgbEntryType : uint32_t +enum class LgbEntryType : + uint32_t { - BgParts = 1, - Light = 3, - Vfx = 4, - PositionMarker = 5, - Gimmick = 6, - SharedGroup6 = 6,// secondary variable is set to 2 - Sound = 7, - EventNpc = 8, - BattleNpc = 9, - Aetheryte = 12, - EnvSpace = 13, - Gathering = 14, - SharedGroup15 = 15,// secondary variable is set to 13 - Treasure = 16, - Weapon = 39, - PopRange = 40, - ExitRange = 41, - MapRange = 43, - NaviMeshRange = 44, - EventObject = 45, - EnvLocation = 47, - EventRange = 49, - QuestMarker = 51, - CollisionBox = 57, - DoorRange = 58, - LineVfx = 59, - ClientPath = 65, - ServerPath = 66, - GimmickRange = 67, - TargetMarker = 68, - ChairMarker = 69, - ClickableRange = 70, - PrefetchRange = 71, - FateRange = 72, - SphereCastRange = 75, + BgParts = 1, + Light = 3, + Vfx = 4, + PositionMarker = 5, + Gimmick = 6, + SharedGroup6 = 6,// secondary variable is set to 2 + Sound = 7, + EventNpc = 8, + BattleNpc = 9, + Aetheryte = 12, + EnvSpace = 13, + Gathering = 14, + SharedGroup15 = 15,// secondary variable is set to 13 + Treasure = 16, + Weapon = 39, + PopRange = 40, + ExitRange = 41, + MapRange = 43, + NaviMeshRange = 44, + EventObject = 45, + EnvLocation = 47, + EventRange = 49, + QuestMarker = 51, + CollisionBox = 57, + DoorRange = 58, + LineVfx = 59, + ClientPath = 65, + ServerPath = 66, + GimmickRange = 67, + TargetMarker = 68, + ChairMarker = 69, + ClickableRange = 70, + PrefetchRange = 71, + FateRange = 72, + SphereCastRange = 75, }; struct LGB_ENTRY_HEADER { - LgbEntryType type; - uint32_t unknown; - uint32_t nameOffset; - vec3 translation; - vec3 rotation; - vec3 scale; + LgbEntryType type; + uint32_t unknown; + uint32_t nameOffset; + vec3 translation; + vec3 rotation; + vec3 scale; }; class LGB_ENTRY { public: - char* m_buf; - uint32_t m_offset; - LGB_ENTRY_HEADER header; + char* m_buf; + uint32_t m_offset; + LGB_ENTRY_HEADER header; - LGB_ENTRY() - { - m_buf = nullptr; - m_offset = 0; - memset( &header, 0, sizeof( header ) ); - }; - LGB_ENTRY( char* buf, uint32_t offset ) - { - m_buf = buf; - m_offset = offset; - header = *reinterpret_cast< LGB_ENTRY_HEADER* >( buf + offset ); - }; - const LgbEntryType getType() const - { - return header.type; - }; - virtual ~LGB_ENTRY() {}; + LGB_ENTRY() + { + m_buf = nullptr; + m_offset = 0; + memset( &header, 0, sizeof( header ) ); + }; + + LGB_ENTRY( char* buf, uint32_t offset ) + { + m_buf = buf; + m_offset = offset; + header = *reinterpret_cast< LGB_ENTRY_HEADER* >( buf + offset ); + }; + + const LgbEntryType getType() const + { + return header.type; + }; + + virtual ~LGB_ENTRY() + { + }; }; -struct LGB_BGPARTS_HEADER : public LGB_ENTRY_HEADER +struct LGB_BGPARTS_HEADER : + public LGB_ENTRY_HEADER { - uint32_t modelFileOffset; - uint32_t collisionFileOffset; - uint32_t unknown4; - uint32_t unknown5; - uint32_t unknown6; - uint32_t unknown7; - uint32_t unknown8; - uint32_t unknown9; + uint32_t modelFileOffset; + uint32_t collisionFileOffset; + uint32_t unknown4; + uint32_t unknown5; + uint32_t unknown6; + uint32_t unknown7; + uint32_t unknown8; + uint32_t unknown9; }; -class LGB_BGPARTS_ENTRY : public LGB_ENTRY +class LGB_BGPARTS_ENTRY : + public LGB_ENTRY { public: - LGB_BGPARTS_HEADER header; - std::string name; - std::string modelFileName; - std::string collisionFileName; - LGB_BGPARTS_ENTRY() {}; - LGB_BGPARTS_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - modelFileName = std::string( buf + offset + header.modelFileOffset ); - collisionFileName = std::string( buf + offset + header.collisionFileOffset ); - }; + LGB_BGPARTS_HEADER header; + std::string name; + std::string modelFileName; + std::string collisionFileName; + + LGB_BGPARTS_ENTRY() + { + }; + + LGB_BGPARTS_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + modelFileName = std::string( buf + offset + header.modelFileOffset ); + collisionFileName = std::string( buf + offset + header.collisionFileOffset ); + }; }; -struct LGB_GIMMICK_HEADER : public LGB_ENTRY_HEADER +struct LGB_GIMMICK_HEADER : + public LGB_ENTRY_HEADER { - uint32_t gimmickFileOffset; - char unknownBytes[100]; + uint32_t gimmickFileOffset; + char unknownBytes[100]; }; -class LGB_GIMMICK_ENTRY : public LGB_ENTRY +class LGB_GIMMICK_ENTRY : + public LGB_ENTRY { public: - LGB_GIMMICK_HEADER header; - std::string name; - std::string gimmickFileName; + LGB_GIMMICK_HEADER header; + std::string name; + std::string gimmickFileName; - LGB_GIMMICK_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - gimmickFileName = std::string( buf + offset + header.gimmickFileOffset ); - //std::cout << "\t " << gimmickFileName << " unknown: " << header.unknown << "\n"; - }; + LGB_GIMMICK_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + gimmickFileName = std::string( buf + offset + header.gimmickFileOffset ); + //std::cout << "\t " << gimmickFileName << " unknown: " << header.unknown << "\n"; + }; }; -struct LGB_ENPC_HEADER : public LGB_ENTRY_HEADER +struct LGB_ENPC_HEADER : + public LGB_ENTRY_HEADER { - uint32_t enpcId; - uint8_t unknown1[0x24]; + uint32_t enpcId; + uint8_t unknown1[0x24]; }; -class LGB_ENPC_ENTRY : public LGB_ENTRY +class LGB_ENPC_ENTRY : + public LGB_ENTRY { public: - LGB_ENPC_HEADER header; - std::string name; + LGB_ENPC_HEADER header; + std::string name; - LGB_ENPC_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast< LGB_ENPC_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - //std::cout << "\t ENpc " << header.enpcId << " " << name << "\n"; - }; + LGB_ENPC_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast< LGB_ENPC_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + //std::cout << "\t ENpc " << header.enpcId << " " << name << "\n"; + }; }; -struct LGB_EOBJ_HEADER : public LGB_ENTRY_HEADER +struct LGB_EOBJ_HEADER : + public LGB_ENTRY_HEADER { - uint32_t eobjId; - uint32_t levelHierachyId; - uint8_t unknown1[0xC]; + uint32_t eobjId; + uint32_t levelHierachyId; + uint8_t unknown1[0xC]; }; -class LGB_EOBJ_ENTRY : public LGB_ENTRY +class LGB_EOBJ_ENTRY : + public LGB_ENTRY { public: - LGB_EOBJ_HEADER header; - std::string name; + LGB_EOBJ_HEADER header; + std::string name; - LGB_EOBJ_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast< LGB_EOBJ_HEADER* >( buf + offset ); - //std::cout << "\t " << header.eobjId << " " << name << " unknown: " << header.unknown << "\n"; - name = std::string( buf + offset + header.nameOffset ); - }; + LGB_EOBJ_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast< LGB_EOBJ_HEADER* >( buf + offset ); + //std::cout << "\t " << header.eobjId << " " << name << " unknown: " << header.unknown << "\n"; + name = std::string( buf + offset + header.nameOffset ); + }; }; -struct LGB_MAPRANGE_HEADER : public LGB_ENTRY_HEADER +struct LGB_MAPRANGE_HEADER : + public LGB_ENTRY_HEADER { - uint32_t type; - uint16_t unknown2; - uint16_t unknown3; - uint8_t unknown4[0x10]; + uint32_t type; + uint16_t unknown2; + uint16_t unknown3; + uint8_t unknown4[0x10]; }; -struct LGB_MAPRANGE_ENTRY : public LGB_ENTRY +struct LGB_MAPRANGE_ENTRY : + public LGB_ENTRY { public: - LGB_MAPRANGE_HEADER header; - std::string name; + LGB_MAPRANGE_HEADER header; + std::string name; - LGB_MAPRANGE_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast< LGB_MAPRANGE_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - }; + LGB_MAPRANGE_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast< LGB_MAPRANGE_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + }; }; struct LGB_GROUP_HEADER { - uint32_t unknown; - int32_t groupNameOffset; - int32_t entriesOffset; - int32_t entryCount; - uint32_t unknown2; - uint32_t unknown3; - uint32_t unknown4; - uint32_t unknown5; - uint32_t unknown6; - uint32_t unknown7; - uint32_t unknown8; - uint32_t unknown9; - uint32_t unknown10; + uint32_t unknown; + int32_t groupNameOffset; + int32_t entriesOffset; + int32_t entryCount; + uint32_t unknown2; + uint32_t unknown3; + uint32_t unknown4; + uint32_t unknown5; + uint32_t unknown6; + uint32_t unknown7; + uint32_t unknown8; + uint32_t unknown9; + uint32_t unknown10; }; struct LGB_GROUP { - LGB_FILE* parent; - LGB_GROUP_HEADER header; - std::string name; - std::vector< std::shared_ptr< LGB_ENTRY > > entries; + LGB_FILE* parent; + LGB_GROUP_HEADER header; + std::string name; + std::vector< std::shared_ptr< LGB_ENTRY > > entries; - LGB_GROUP( char* buf, LGB_FILE* parentStruct, uint32_t offset ) - { - parent = parentStruct; - header = *reinterpret_cast< LGB_GROUP_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.groupNameOffset ); - //entries.resize( header.entryCount ); - //std::cout << name << "\n\t unknown: " << header.unknown << "\n"; - const auto entriesOffset = offset + header.entriesOffset; - for( auto i = 0; i < header.entryCount; ++i ) + LGB_GROUP( char* buf, LGB_FILE* parentStruct, uint32_t offset ) + { + parent = parentStruct; + header = *reinterpret_cast< LGB_GROUP_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.groupNameOffset ); + //entries.resize( header.entryCount ); + //std::cout << name << "\n\t unknown: " << header.unknown << "\n"; + const auto entriesOffset = offset + header.entriesOffset; + for( auto i = 0; i < header.entryCount; ++i ) + { + const auto entryOffset = entriesOffset + *reinterpret_cast< int32_t* >( buf + ( entriesOffset + i * 4 ) ); + + try { - const auto entryOffset = entriesOffset + *reinterpret_cast< int32_t* >( buf + ( entriesOffset + i * 4 ) ); + const auto type = *reinterpret_cast( buf + entryOffset ); + // garbage to skip model loading + if( !ignoreModels && type == LgbEntryType::BgParts ) + { + entries.push_back( std::make_shared< LGB_BGPARTS_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::Gimmick ) + { + entries.push_back( std::make_shared< LGB_GIMMICK_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::EventNpc ) + { + entries.push_back( std::make_shared< LGB_ENPC_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::EventObject ) + { + entries.push_back( std::make_shared< LGB_EOBJ_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::MapRange ) + { + entries.push_back( std::make_shared< LGB_MAPRANGE_ENTRY >( buf, entryOffset ) ); + } + /* + else + { + entries[i] = nullptr; + } + */ - try - { - const auto type = *reinterpret_cast( buf + entryOffset ); - // garbage to skip model loading - if( !ignoreModels && type == LgbEntryType::BgParts ) - { - entries.push_back( std::make_shared< LGB_BGPARTS_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::Gimmick ) - { - entries.push_back( std::make_shared< LGB_GIMMICK_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::EventNpc ) - { - entries.push_back( std::make_shared< LGB_ENPC_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::EventObject ) - { - entries.push_back( std::make_shared< LGB_EOBJ_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::MapRange ) - { - entries.push_back( std::make_shared< LGB_MAPRANGE_ENTRY >( buf, entryOffset ) ); - } - /* - else - { - entries[i] = nullptr; - } - */ - - } - catch( std::exception& e ) - { - std::cout << name << " " << e.what() << std::endl; - } } - }; + catch( std::exception& e ) + { + std::cout << name << " " << e.what() << std::endl; + } + } + }; }; struct LGB_FILE_HEADER { - char magic[4]; // LGB 1 - uint32_t fileSize; - uint32_t unknown; - char magic2[4]; // LGP1 - uint32_t unknown2; - uint32_t unknown3; - uint32_t unknown4; - uint32_t unknown5; - int32_t groupCount; + char magic[4]; // LGB 1 + uint32_t fileSize; + uint32_t unknown; + char magic2[4]; // LGP1 + uint32_t unknown2; + uint32_t unknown3; + uint32_t unknown4; + uint32_t unknown5; + int32_t groupCount; }; struct LGB_FILE { - LGB_FILE_HEADER header; - std::vector< LGB_GROUP > groups; - std::string name; + LGB_FILE_HEADER header; + std::vector< LGB_GROUP > groups; + std::string name; - LGB_FILE( char* buf, const std::string& name ) - { - header = *reinterpret_cast< LGB_FILE_HEADER* >( buf ); - if( strncmp( &header.magic[0], "LGB1", 4 ) != 0 || strncmp( &header.magic2[0], "LGP1", 4 ) != 0 ) - throw std::runtime_error( "Invalid LGB file!" ); + LGB_FILE( char* buf, const std::string& name ) + { + header = *reinterpret_cast< LGB_FILE_HEADER* >( buf ); + if( strncmp( &header.magic[ 0 ], "LGB1", 4 ) != 0 || strncmp( &header.magic2[ 0 ], "LGP1", 4 ) != 0 ) + throw std::runtime_error( "Invalid LGB file!" ); - //groups.resize(header.groupCount); + //groups.resize(header.groupCount); - constexpr auto baseOffset = sizeof( header ); - for( auto i = 0; i < header.groupCount; ++i ) - { - const auto groupOffset = baseOffset + *reinterpret_cast< int32_t* >( buf + ( baseOffset + i * 4 ) ); - const auto group = LGB_GROUP( buf, this, groupOffset ); - groups.push_back( group ); - } - }; + constexpr auto baseOffset = sizeof( header ); + for( auto i = 0; i < header.groupCount; ++i ) + { + const auto groupOffset = baseOffset + *reinterpret_cast< int32_t* >( buf + ( baseOffset + i * 4 ) ); + const auto group = LGB_GROUP( buf, this, groupOffset ); + groups.push_back( group ); + } + }; }; /* diff --git a/src/tools/event_object_parser/main.cpp b/src/tools/event_object_parser/main.cpp index ac5633b0..bd672fdf 100644 --- a/src/tools/event_object_parser/main.cpp +++ b/src/tools/event_object_parser/main.cpp @@ -14,6 +14,7 @@ #include "sgb.h" #ifndef STANDALONE + #include #include #include @@ -23,6 +24,7 @@ #include #include #include + #endif // garbage to ignore models @@ -36,10 +38,10 @@ uint32_t zoneId; struct instanceContent { - uint32_t id; - std::string name; - std::string zoneName; - uint8_t type; + uint32_t id; + std::string name; + std::string zoneName; + uint8_t type; }; std::vector< instanceContent > contentList; @@ -49,626 +51,637 @@ std::set< std::string > zoneDumpList; xiv::dat::GameData* data1 = nullptr; xiv::exd::ExdData* eData = nullptr; -enum class TerritoryTypeExdIndexes : size_t +enum class TerritoryTypeExdIndexes : + size_t { - TerritoryType = 0, - Path = 1 + TerritoryType = 0, + Path = 1 }; using namespace std::chrono_literals; struct face { - int32_t f1, f2, f3; + int32_t f1, f2, f3; }; void initExd( const std::string& gamePath ) { - data1 = data1 ? data1 : new xiv::dat::GameData( gamePath ); - eData = eData ? eData : new xiv::exd::ExdData( *data1 ); + data1 = data1 ? data1 : new xiv::dat::GameData( gamePath ); + eData = eData ? eData : new xiv::exd::ExdData( *data1 ); } -int parseBlockEntry( char* data, std::vector& entries, int gOff ) +int parseBlockEntry( char* data, std::vector< PCB_BLOCK_ENTRY >& entries, int gOff ) { - int offset = 0; - bool isgroup = true; - while( isgroup ) - { - PCB_BLOCK_ENTRY block_entry; - memcpy( &block_entry.header, data + offset, sizeof( block_entry.header ) ); - isgroup = block_entry.header.type == 0x30; + int offset = 0; + bool isgroup = true; + while( isgroup ) + { + PCB_BLOCK_ENTRY block_entry; + memcpy( &block_entry.header, data + offset, sizeof( block_entry.header ) ); + isgroup = block_entry.header.type == 0x30; - //printf( " BLOCKHEADER_%X: type: %i, group_size: %i\n", gOff + offset, block_entry.header.type, block_entry.header.group_size ); + //printf( " BLOCKHEADER_%X: type: %i, group_size: %i\n", gOff + offset, block_entry.header.type, block_entry.header.group_size ); - if( isgroup ) + if( isgroup ) + { + parseBlockEntry( data + offset + 0x30, entries, gOff + offset ); + offset += block_entry.header.group_size; + } + else + { + /* printf( "\tnum_v16: %i, num_indices: %i, num_vertices: %i\n\n", + block_entry.header.num_v16, block_entry.header.num_indices, block_entry.header.num_vertices );*/ + int doffset = sizeof( block_entry.header ) + offset; + uint16_t block_size = sizeof( block_entry.header ) + + block_entry.header.num_vertices * 3 * 4 + + block_entry.header.num_v16 * 6 + + block_entry.header.num_indices * 6; + + if( block_entry.header.num_vertices != 0 ) { - parseBlockEntry( data + offset + 0x30, entries, gOff + offset ); - offset += block_entry.header.group_size; + block_entry.data.vertices.resize( block_entry.header.num_vertices ); + + int32_t size_vertexbuffer = block_entry.header.num_vertices * 3; + memcpy( &block_entry.data.vertices[ 0 ], data + doffset, size_vertexbuffer * 4 ); + doffset += size_vertexbuffer * 4; } - else + if( block_entry.header.num_v16 != 0 ) { - /* printf( "\tnum_v16: %i, num_indices: %i, num_vertices: %i\n\n", - block_entry.header.num_v16, block_entry.header.num_indices, block_entry.header.num_vertices );*/ - int doffset = sizeof( block_entry.header ) + offset; - uint16_t block_size = sizeof( block_entry.header ) + - block_entry.header.num_vertices * 3 * 4 + - block_entry.header.num_v16 * 6 + - block_entry.header.num_indices * 6; - - if( block_entry.header.num_vertices != 0 ) - { - block_entry.data.vertices.resize( block_entry.header.num_vertices ); - - int32_t size_vertexbuffer = block_entry.header.num_vertices * 3; - memcpy( &block_entry.data.vertices[0], data + doffset, size_vertexbuffer * 4 ); - doffset += size_vertexbuffer * 4; - } - if( block_entry.header.num_v16 != 0 ) - { - block_entry.data.vertices_i16.resize( block_entry.header.num_v16 ); - int32_t size_unknownbuffer = block_entry.header.num_v16 * 6; - memcpy( &block_entry.data.vertices_i16[0], data + doffset, size_unknownbuffer ); - doffset += block_entry.header.num_v16 * 6; - } - if( block_entry.header.num_indices != 0 ) - { - block_entry.data.indices.resize( block_entry.header.num_indices ); - int32_t size_indexbuffer = block_entry.header.num_indices * 12; - memcpy( &block_entry.data.indices[0], data + doffset, size_indexbuffer ); - doffset += size_indexbuffer; - } - entries.push_back( block_entry ); + block_entry.data.vertices_i16.resize( block_entry.header.num_v16 ); + int32_t size_unknownbuffer = block_entry.header.num_v16 * 6; + memcpy( &block_entry.data.vertices_i16[ 0 ], data + doffset, size_unknownbuffer ); + doffset += block_entry.header.num_v16 * 6; } - } + if( block_entry.header.num_indices != 0 ) + { + block_entry.data.indices.resize( block_entry.header.num_indices ); + int32_t size_indexbuffer = block_entry.header.num_indices * 12; + memcpy( &block_entry.data.indices[ 0 ], data + doffset, size_indexbuffer ); + doffset += size_indexbuffer; + } + entries.push_back( block_entry ); + } + } - return 0; + return 0; } void dumpLevelExdEntries( uint32_t zoneId, const std::string& name = std::string() ) { - static auto& cat = eData->get_category( "Level" ); - static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); + static auto& cat = eData->get_category( "Level" ); + static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); - std::string fileName( name + "_" + std::to_string( zoneId ) + "_Level" + ".csv" ); - std::ofstream outfile( fileName, std::ios::trunc ); - std::cout << "[Info] Writing level.exd entries to " << fileName << "\n"; - if( outfile.good() ) - { - outfile.close(); - outfile.open( fileName, std::ios::app ); - static auto rows = exd.get_rows(); - for( auto& row : rows ) + std::string fileName( name + "_" + std::to_string( zoneId ) + "_Level" + ".csv" ); + std::ofstream outfile( fileName, std::ios::trunc ); + std::cout << "[Info] Writing level.exd entries to " << fileName << "\n"; + if( outfile.good() ) + { + outfile.close(); + outfile.open( fileName, std::ios::app ); + static auto rows = exd.get_rows(); + for( auto& row : rows ) + { + auto id = row.first; + auto& fields = row.second; + auto x = *boost::get< float >( &fields.at( 0 ) ); + auto y = *boost::get< float >( &fields.at( 1 ) ); + auto z = *boost::get< float >( &fields.at( 2 ) ); + auto yaw = *boost::get< float >( &fields.at( 3 ) ); + auto radius = *boost::get< float >( &fields.at( 4 ) ); + auto type = *boost::get< uint8_t >( &fields.at( 5 ) ); + auto objectid = *boost::get< uint32_t >( &fields.at( 6 ) ); + auto zone = *boost::get< uint16_t >( &fields.at( 9 ) ); + + if( zone == zoneId ) { - auto id = row.first; - auto& fields = row.second; - auto x = *boost::get< float >( &fields.at( 0 ) ); - auto y = *boost::get< float >( &fields.at( 1 ) ); - auto z = *boost::get< float >( &fields.at( 2 ) ); - auto yaw = *boost::get< float >( &fields.at( 3 ) ); - auto radius = *boost::get< float >( &fields.at( 4 ) ); - auto type = *boost::get< uint8_t >( &fields.at( 5 ) ); - auto objectid = *boost::get< uint32_t >( &fields.at( 6 ) ); - auto zone = *boost::get< uint16_t >( &fields.at( 9 ) ); - - if( zone == zoneId ) - { - std::string outStr( - std::to_string( id ) + ", " + std::to_string( objectid ) + ", " + - std::to_string( x ) + ", " + std::to_string( y ) + ", " + std::to_string( z ) + ", " + - std::to_string( yaw ) + ", " + std::to_string( radius ) + ", " + std::to_string( type ) + "\n" - ); - outfile.write( outStr.c_str(), outStr.size() ); - } + std::string outStr( + std::to_string( id ) + ", " + std::to_string( objectid ) + ", " + + std::to_string( x ) + ", " + std::to_string( y ) + ", " + std::to_string( z ) + ", " + + std::to_string( yaw ) + ", " + std::to_string( radius ) + ", " + std::to_string( type ) + "\n" + ); + outfile.write( outStr.c_str(), outStr.size() ); } - } + } + } } std::string zoneNameToPath( const std::string& name ) { - std::string path; - bool found = false; + std::string path; + bool found = false; #ifdef STANDALONE - auto inFile = std::ifstream( "territorytype.exh.csv" ); - if( inFile.good() ) - { - std::string line; - std::regex re( "(\\d+),\"(.*)\",\"(.*)\",.*" ); - while( std::getline( inFile, line ) ) - { - std::smatch match; - if( std::regex_match( line, match, re ) - { - auto tmpId = std::stoul( match[1].str() ); - if( !found && name == match[2].str() ) - { - zoneId = tmpId; - path = match[3].str(); - found = true; - } - zoneNameMap[tmpId] = match[2].str(); - } - } - inFile.close(); - } + auto inFile = std::ifstream( "territorytype.exh.csv" ); + if( inFile.good() ) + { + std::string line; + std::regex re( "(\\d+),\"(.*)\",\"(.*)\",.*" ); + while( std::getline( inFile, line ) ) + { + std::smatch match; + if( std::regex_match( line, match, re ) + { + auto tmpId = std::stoul( match[1].str() ); + if( !found && name == match[2].str() ) + { + zoneId = tmpId; + path = match[3].str(); + found = true; + } + zoneNameMap[tmpId] = match[2].str(); + } + } + inFile.close(); + } #else - auto& cat = eData->get_category( "TerritoryType" ); - auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); - for( auto& row : exd.get_rows() ) - { - auto& fields = row.second; - auto teriName = *boost::get< std::string >( &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::TerritoryType ) ) ); - if( teriName.empty() ) - continue; - auto teriPath = *boost::get< std::string >( &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::Path ) ) ); - if( !found && boost::iequals( name, teriName ) ) - { - path = teriPath; - found = true; - zoneId = row.first; - } - zoneNameMap[row.first] = teriName; - } + auto& cat = eData->get_category( "TerritoryType" ); + auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); + for( auto& row : exd.get_rows() ) + { + auto& fields = row.second; + auto teriName = *boost::get< std::string >( + &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::TerritoryType ) ) ); + if( teriName.empty() ) + continue; + auto teriPath = *boost::get< std::string >( &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::Path ) ) ); + if( !found && boost::iequals( name, teriName ) ) + { + path = teriPath; + found = true; + zoneId = row.first; + } + zoneNameMap[ row.first ] = teriName; + } #endif - if( found ) - { - //path = path.substr( path.find_first_of( "/" ) + 1, path.size() - path.find_first_of( "/" )); - //path = std::string( "ffxiv/" ) + path; - path = std::string( "bg/" ) + path.substr( 0, path.find( "/level/" ) ); - std::cout << "[Info] " << "Found path for " << name << ": " << path << std::endl; - } - else - { - throw std::runtime_error( "Unable to find path for " + name + - ".\n\tPlease double check spelling or open 0a0000.win32.index with FFXIV Explorer and extract territorytype.exh as CSV\n\tand copy territorytype.exh.csv into pcb_reader.exe directory if using standalone" ); - } + if( found ) + { + //path = path.substr( path.find_first_of( "/" ) + 1, path.size() - path.find_first_of( "/" )); + //path = std::string( "ffxiv/" ) + path; + path = std::string( "bg/" ) + path.substr( 0, path.find( "/level/" ) ); + std::cout << "[Info] " << "Found path for " << name << ": " << path << std::endl; + } + else + { + throw std::runtime_error( "Unable to find path for " + name + + ".\n\tPlease double check spelling or open 0a0000.win32.index with FFXIV Explorer and extract territorytype.exh as CSV\n\tand copy territorytype.exh.csv into pcb_reader.exe directory if using standalone" ); + } - return path; + return path; } void loadEobjNames() { - auto& cat = eData->get_category( "EObjName" ); - auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::en ) ); - for( auto& row : exd.get_rows() ) - { - auto id = row.first; - auto& fields = row.second; - auto name = *boost::get< std::string >( &fields.at( 0 ) ); + auto& cat = eData->get_category( "EObjName" ); + auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::en ) ); + for( auto& row : exd.get_rows() ) + { + auto id = row.first; + auto& fields = row.second; + auto name = *boost::get< std::string >( &fields.at( 0 ) ); - if( !name.empty() ) - eobjNameMap[id] = name; - } + if( !name.empty() ) + eobjNameMap[ id ] = name; + } } void writeEobjEntry( std::ofstream& out, LGB_ENTRY* pObj ) { - static std::string mapRangeStr( "\"MapRange\", " ); - static std::string eobjStr( "\"EObj\", " ); + static std::string mapRangeStr( "\"MapRange\", " ); + static std::string eobjStr( "\"EObj\", " ); - uint32_t id; - uint32_t unknown = 0, unknown2 = 0; - std::string name; - std::string typeStr; - uint32_t eobjlevelHierachyId = 0; + uint32_t id; + uint32_t unknown = 0, unknown2 = 0; + std::string name; + std::string typeStr; + uint32_t eobjlevelHierachyId = 0; - if( pObj->getType() == LgbEntryType::EventObject ) - { - auto pEobj = reinterpret_cast< LGB_EOBJ_ENTRY* >( pObj ); - id = pEobj->header.eobjId; - unknown = pEobj->header.unknown; - name = eobjNameMap[id]; - typeStr = eobjStr; - eobjlevelHierachyId = pEobj->header.levelHierachyId; - } - else if( pObj->getType() == LgbEntryType::MapRange ) - { - auto pMapRange = reinterpret_cast< LGB_MAPRANGE_ENTRY* >( pObj ); - id = pMapRange->header.unknown; - unknown = pMapRange->header.unknown2; - unknown2 = pMapRange->header.unknown3; - typeStr = mapRangeStr; - } + if( pObj->getType() == LgbEntryType::EventObject ) + { + auto pEobj = reinterpret_cast< LGB_EOBJ_ENTRY* >( pObj ); + id = pEobj->header.eobjId; + unknown = pEobj->header.unknown; + name = eobjNameMap[ id ]; + typeStr = eobjStr; + eobjlevelHierachyId = pEobj->header.levelHierachyId; + } + else if( pObj->getType() == LgbEntryType::MapRange ) + { + auto pMapRange = reinterpret_cast< LGB_MAPRANGE_ENTRY* >( pObj ); + id = pMapRange->header.unknown; + unknown = pMapRange->header.unknown2; + unknown2 = pMapRange->header.unknown3; + typeStr = mapRangeStr; + } - std::string outStr( - std::to_string( id ) + ", " + typeStr + "\"" + name + "\", " + - std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + std::to_string( pObj->header.translation.z ) + - ", " + std::to_string( eobjlevelHierachyId ) + "\n" - ); - out.write( outStr.c_str(), outStr.size() ); + std::string outStr( + std::to_string( id ) + ", " + typeStr + "\"" + name + "\", " + + std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + + std::to_string( pObj->header.translation.z ) + + ", " + std::to_string( eobjlevelHierachyId ) + "\n" + ); + out.write( outStr.c_str(), outStr.size() ); } void loadAllInstanceContentEntries() { - auto& catInstance = eData->get_category( "InstanceContent" ); - auto exdInstance = static_cast< xiv::exd::Exd >( catInstance.get_data_ln( xiv::exd::Language::en ) ); + auto& catInstance = eData->get_category( "InstanceContent" ); + auto exdInstance = static_cast< xiv::exd::Exd >( catInstance.get_data_ln( xiv::exd::Language::en ) ); - if( zoneNameMap.size() == 0 ) - { - zoneNameToPath( "f1d1" ); - } + if( zoneNameMap.size() == 0 ) + { + zoneNameToPath( "f1d1" ); + } - std::ofstream out( "instancecontent.csv", std::ios::trunc ); - if( out.good() ) - { - out.close(); - } - out.open( "instancecontent.csv", std::ios::app ); - if( !out.good() ) - { - throw std::runtime_error( "Unable to create instancecontent.csv!" ); - } - std::cout << "[Info] Writing instancecontent.csv\n"; + std::ofstream out( "instancecontent.csv", std::ios::trunc ); + if( out.good() ) + { + out.close(); + } + out.open( "instancecontent.csv", std::ios::app ); + if( !out.good() ) + { + throw std::runtime_error( "Unable to create instancecontent.csv!" ); + } + std::cout << "[Info] Writing instancecontent.csv\n"; - for( auto& row : exdInstance.get_rows() ) - { - auto id = row.first; - auto& fields = row.second; + for( auto& row : exdInstance.get_rows() ) + { + auto id = row.first; + auto& fields = row.second; - auto name = *boost::get< std::string >( &fields.at( 3 ) ); - if( name.empty() ) - continue; - auto type = *boost::get< uint8_t >( &fields.at( 0 ) ); - auto teri = *boost::get< uint32_t >( &fields.at( 9 ) ); - auto i = 0; - while( ( i = name.find( ' ' ) ) != std::string::npos ) - name = name.replace( name.begin() + i, name.begin() + i + 1, { '_' } ); - std::string outStr( - std::to_string( id ) + ", \"" + name + "\", \"" + zoneNameMap[teri] + "\"," + std::to_string( teri ) + "\n" - ); - out.write( outStr.c_str(), outStr.size() ); - //zoneInstanceMap[zoneId].push_back( std::make_pair( id, name ) ); - zoneDumpList.emplace( zoneNameMap[teri] ); + auto name = *boost::get< std::string >( &fields.at( 3 ) ); + if( name.empty() ) + continue; + auto type = *boost::get< uint8_t >( &fields.at( 0 ) ); + auto teri = *boost::get< uint32_t >( &fields.at( 9 ) ); + auto i = 0; + while( ( i = name.find( ' ' ) ) != std::string::npos ) + name = name.replace( name.begin() + i, name.begin() + i + 1, { '_' } ); + std::string outStr( + std::to_string( id ) + ", \"" + name + "\", \"" + zoneNameMap[ teri ] + "\"," + std::to_string( teri ) + "\n" + ); + out.write( outStr.c_str(), outStr.size() ); + //zoneInstanceMap[zoneId].push_back( std::make_pair( id, name ) ); + zoneDumpList.emplace( zoneNameMap[ teri ] ); - name.erase( boost::remove_if( name, boost::is_any_of( "★_ '()[]-\x1a\x1\x2\x1f\x1\x3.:" ) ), name.end() ); - name[0] = toupper( name[0] ); - contentList.push_back( { id, name, zoneNameMap[teri], type } ); - } - out.close(); + name.erase( boost::remove_if( name, boost::is_any_of( "★_ '()[]-\x1a\x1\x2\x1f\x1\x3.:" ) ), name.end() ); + name[ 0 ] = toupper( name[ 0 ] ); + contentList.push_back( { id, name, zoneNameMap[ teri ], type } ); + } + out.close(); } void readFileToBuffer( const std::string& path, std::vector< char >& buf ) { - auto inFile = std::ifstream( path, std::ios::binary ); - if( inFile.good() ) - { - inFile.seekg( 0, inFile.end ); - int32_t fileSize = (int32_t)inFile.tellg(); - buf.resize( fileSize ); - inFile.seekg( 0, inFile.beg ); - inFile.read( &buf[0], fileSize ); - inFile.close(); - } - else - { - throw std::runtime_error( "Unable to open " + path ); - } + auto inFile = std::ifstream( path, std::ios::binary ); + if( inFile.good() ) + { + inFile.seekg( 0, inFile.end ); + int32_t fileSize = ( int32_t ) inFile.tellg(); + buf.resize( fileSize ); + inFile.seekg( 0, inFile.beg ); + inFile.read( &buf[ 0 ], fileSize ); + inFile.close(); + } + else + { + throw std::runtime_error( "Unable to open " + path ); + } } int main( int argc, char* argv[] ) { - auto startTime = std::chrono::system_clock::now(); - auto entryStartTime = std::chrono::system_clock::now(); + auto startTime = std::chrono::system_clock::now(); + auto entryStartTime = std::chrono::system_clock::now(); - std::vector< std::string > argVec( argv + 1, argv + argc ); - // todo: support expansions - std::string zoneName = "r2t2"; - bool dumpInstances = ignoreModels = std::remove_if( argVec.begin(), argVec.end(), []( auto arg ){ return arg == "--instance-dump"; } ) != argVec.end(); - ignoreModels = true; - dumpInstances = true; - if( argc > 1 ) - { - zoneName = argv[1]; - if( argc > 2 ) + std::vector< std::string > argVec( argv + 1, argv + argc ); + // todo: support expansions + std::string zoneName = "r2t2"; + bool dumpInstances = ignoreModels = std::remove_if( argVec.begin(), argVec.end(), []( auto arg ) + { return arg == "--instance-dump"; } ) != argVec.end(); + ignoreModels = true; + dumpInstances = true; + if( argc > 1 ) + { + zoneName = argv[ 1 ]; + if( argc > 2 ) + { + std::string tmpPath( argv[ 2 ] ); + if( !tmpPath.empty() ) + gamePath = argv[ 2 ]; + } + } + + std::map< uint8_t, std::string > contentTypeMap; + contentTypeMap[ 0 ] = ""; + contentTypeMap[ 1 ] = "raids"; + contentTypeMap[ 2 ] = "dungeons"; + contentTypeMap[ 3 ] = "guildhests"; + contentTypeMap[ 4 ] = "trials"; + contentTypeMap[ 5 ] = "pvp"; + contentTypeMap[ 6 ] = "pvp"; + contentTypeMap[ 7 ] = "questbattles"; + contentTypeMap[ 8 ] = "hallofthenovice"; + contentTypeMap[ 9 ] = "deepdungeon"; + contentTypeMap[ 10 ] = "treasurehunt"; + contentTypeMap[ 11 ] = "events"; + contentTypeMap[ 12 ] = "pvp"; + + if( !boost::filesystem::exists( "instance.tmpl" ) ) + throw std::runtime_error( "instance.tmpl is missing in working directory" ); + + initExd( gamePath ); + if( dumpInstances ) + { + loadAllInstanceContentEntries(); + } + else + { + zoneDumpList.emplace( zoneName ); + } + + for( auto entry : contentList ) + { + std::string eobjects = ""; + entryStartTime = std::chrono::system_clock::now(); + zoneName = entry.zoneName; + try + { + const auto& zonePath = zoneNameToPath( zoneName ); + + std::string listPcbPath( zonePath + "/collision/list.pcb" ); + std::string bgLgbPath( zonePath + "/level/bg.lgb" ); + std::string planmapLgbPath( zonePath + "/level/planmap.lgb" ); + std::string collisionFilePath( zonePath + "/collision/" ); + std::vector< char > section; + std::vector< char > section1; + std::vector< char > section2; + +#ifndef STANDALONE + const xiv::dat::Cat& test = data1->getCategory( "bg" ); + + auto test_file = data1->getFile( bgLgbPath ); + section = test_file->access_data_sections().at( 0 ); + + auto planmap_file = data1->getFile( planmapLgbPath ); + section2 = planmap_file->access_data_sections().at( 0 ); + +#else { - std::string tmpPath( argv[2] ); - if( !tmpPath.empty() ) - gamePath = argv[2]; + readFileToBuffer( bgLgbPath, section ); + readFileToBuffer( listPcbPath, section1 ); } - } +#endif - std::map< uint8_t, std::string > contentTypeMap; - contentTypeMap[0] = ""; - contentTypeMap[1] = "raids"; - contentTypeMap[2] = "dungeons"; - contentTypeMap[3] = "guildhests"; - contentTypeMap[4] = "trials"; - contentTypeMap[5] = "pvp"; - contentTypeMap[6] = "pvp"; - contentTypeMap[7] = "questbattles"; - contentTypeMap[8] = "hallofthenovice"; - contentTypeMap[9] = "deepdungeon"; - contentTypeMap[10] = "treasurehunt"; - contentTypeMap[11] = "events"; - contentTypeMap[12] = "pvp"; + std::vector< std::string > stringList; - if( !boost::filesystem::exists( "instance.tmpl" ) ) - throw std::runtime_error( "instance.tmpl is missing in working directory" ); + uint32_t offset1 = 0x20; - initExd( gamePath ); - if( dumpInstances ) - { - loadAllInstanceContentEntries(); - } - else - { - zoneDumpList.emplace( zoneName ); - } + loadEobjNames(); + //dumpLevelExdEntries( zoneId, zoneName ); + std::string eobjFileName( entry.name + "_eobj.csv" ); + std::ofstream eobjOut( eobjFileName, std::ios::trunc ); + if( !eobjOut.good() ) + throw std::string( "Unable to create " + zoneName + + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); - for( auto entry : contentList ) - { - std::string eobjects = ""; - entryStartTime = std::chrono::system_clock::now(); - zoneName = entry.zoneName; - try + eobjOut.close(); + eobjOut.open( eobjFileName, std::ios::app ); + + if( !eobjOut.good() ) + throw std::string( "Unable to create " + zoneName + + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); + + LGB_FILE bgLgb( §ion[ 0 ], "bg" ); + LGB_FILE planmapLgb( §ion2[ 0 ], "planmap" ); + + std::vector< LGB_FILE > lgbList{ bgLgb, planmapLgb }; + uint32_t max_index = 0; + + //if( ignoreModels ) { - const auto& zonePath = zoneNameToPath( zoneName ); - - std::string listPcbPath( zonePath + "/collision/list.pcb" ); - std::string bgLgbPath( zonePath + "/level/bg.lgb" ); - std::string planmapLgbPath( zonePath + "/level/planmap.lgb" ); - std::string collisionFilePath( zonePath + "/collision/" ); - std::vector< char > section; - std::vector< char > section1; - std::vector< char > section2; + std::map< std::string, SGB_FILE > sgbFiles; + auto loadSgbFile = [ & ]( const std::string& fileName )->bool + { + SGB_FILE sgbFile; + try + { + char* dataSection = nullptr; + //std::cout << fileName << " "; #ifndef STANDALONE - const xiv::dat::Cat& test = data1->getCategory( "bg" ); - - auto test_file = data1->getFile( bgLgbPath ); - section = test_file->access_data_sections().at( 0 ); - - auto planmap_file = data1->getFile( planmapLgbPath ); - section2 = planmap_file->access_data_sections().at( 0 ); - + auto file = data1->getFile( fileName ); + auto sections = file->get_data_sections(); + dataSection = §ions.at( 0 )[ 0 ]; #else - { - readFileToBuffer( bgLgbPath, section ); - readFileToBuffer( listPcbPath, section1 ); - } + std::vector< char > buf; + readFileToBuffer( fileName, buf ); + dataSection = &buf[0]; #endif + sgbFile = SGB_FILE( &dataSection[ 0 ] ); + sgbFiles.insert( std::make_pair( fileName, sgbFile ) ); + return true; + } + catch( std::exception& e ) + { + std::cout << "[Error] " << "Unable to load SGB " << fileName << "\n\tError:\n\t" << e.what() << "\n"; + sgbFiles.insert( std::make_pair( fileName, sgbFile ) ); + } + return false; + }; - std::vector< std::string > stringList; + std::cout << "[Info] " << ( ignoreModels ? "Dumping MapRange and EObj" : "Writing obj file " ) << "\n"; + uint32_t totalGroups = 0; + uint32_t totalGroupEntries = 0; - uint32_t offset1 = 0x20; - - loadEobjNames(); - //dumpLevelExdEntries( zoneId, zoneName ); - std::string eobjFileName( entry.name + "_eobj.csv" ); - std::ofstream eobjOut( eobjFileName, std::ios::trunc ); - if( !eobjOut.good() ) - throw std::string( "Unable to create " + zoneName + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); - - eobjOut.close(); - eobjOut.open( eobjFileName, std::ios::app ); - - if( !eobjOut.good() ) - throw std::string( "Unable to create " + zoneName + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); - - LGB_FILE bgLgb( §ion[0], "bg" ); - LGB_FILE planmapLgb( §ion2[0], "planmap" ); - - std::vector< LGB_FILE > lgbList{ bgLgb, planmapLgb }; - uint32_t max_index = 0; - - //if( ignoreModels ) - { - std::map< std::string, SGB_FILE > sgbFiles; - - auto loadSgbFile = [&]( const std::string& fileName ) -> bool + uint32_t count = 0; + for( const auto& lgb : lgbList ) + { + std::map< std::string, uint32_t > nameMap; + for( const auto& group : lgb.groups ) + { + //std::cout << "\t" << group.name << " Size " << group.header.entryCount << "\n"; + totalGroups++; + for( const auto& pEntry : group.entries ) { - SGB_FILE sgbFile; - try - { - char* dataSection = nullptr; - //std::cout << fileName << " "; -#ifndef STANDALONE - auto file = data1->getFile( fileName ); - auto sections = file->get_data_sections(); - dataSection = §ions.at( 0 )[0]; -#else - std::vector< char > buf; - readFileToBuffer( fileName, buf ); - dataSection = &buf[0]; -#endif - sgbFile = SGB_FILE( &dataSection[0] ); - sgbFiles.insert( std::make_pair( fileName, sgbFile ) ); - return true; - } - catch( std::exception& e ) - { - std::cout << "[Error] " << "Unable to load SGB " << fileName << "\n\tError:\n\t" << e.what() << "\n"; - sgbFiles.insert( std::make_pair( fileName, sgbFile ) ); - } - return false; - }; + auto pGimmick = dynamic_cast< LGB_GIMMICK_ENTRY* >( pEntry.get() ); + auto pBgParts = dynamic_cast< LGB_BGPARTS_ENTRY* >( pEntry.get() ); - std::cout << "[Info] " << ( ignoreModels ? "Dumping MapRange and EObj" : "Writing obj file " ) << "\n"; - uint32_t totalGroups = 0; - uint32_t totalGroupEntries = 0; + std::string fileName( "" ); + fileName.resize( 256 ); + totalGroupEntries++; - uint32_t count = 0; - for( const auto& lgb : lgbList ) - { - std::map< std::string, uint32_t> nameMap; - for( const auto& group : lgb.groups ) - { - //std::cout << "\t" << group.name << " Size " << group.header.entryCount << "\n"; - totalGroups++; - for( const auto& pEntry : group.entries ) + if( pEntry->getType() == LgbEntryType::EventObject ) + { + auto pObj = pEntry.get(); + static std::string eobjStr( "\"EObj\", " ); + + uint32_t id; + uint32_t unknown = 0, unknown2 = 0; + std::string name; + std::string typeStr; + uint32_t eobjlevelHierachyId = 0; + + auto pEobj = reinterpret_cast< LGB_EOBJ_ENTRY* >( pObj ); + id = pEobj->header.eobjId; + unknown = pEobj->header.unknown; + + + typeStr = eobjStr; + eobjlevelHierachyId = pEobj->header.levelHierachyId; + + std::string states = ""; + std::string gimmickName = ""; + for( const auto& pEntry1 : group.entries ) + { + auto pGObj = pEntry1.get(); + if( pGObj->getType() == LgbEntryType::Gimmick ) { - auto pGimmick = dynamic_cast< LGB_GIMMICK_ENTRY* >( pEntry.get() ); - auto pBgParts = dynamic_cast< LGB_BGPARTS_ENTRY* >( pEntry.get() ); + if( pGObj->header.unknown == pEobj->header.levelHierachyId ) + { + auto pGObjR = reinterpret_cast< LGB_GIMMICK_ENTRY* >( pGObj ); + char* dataSection = nullptr; + //std::cout << fileName << " "; - std::string fileName( "" ); - fileName.resize( 256 ); - totalGroupEntries++; + auto file = data1->getFile( pGObjR->gimmickFileName ); + auto sections = file->get_data_sections(); + dataSection = §ions.at( 0 )[ 0 ]; + auto sgbFile = SGB_FILE( &dataSection[ 0 ] ); - if( pEntry->getType() == LgbEntryType::EventObject ) - { - auto pObj = pEntry.get(); - static std::string eobjStr( "\"EObj\", " ); + auto pos = pGObjR->gimmickFileName.find_last_of( "/" ); - uint32_t id; - uint32_t unknown = 0, unknown2 = 0; - std::string name; - std::string typeStr; - uint32_t eobjlevelHierachyId = 0; + if( pos != std::string::npos ) + { + name = pGObjR->gimmickFileName.substr( pos + 1 ); + name = name.substr( 0, name.length() - 4 ); + gimmickName = name; + } - auto pEobj = reinterpret_cast< LGB_EOBJ_ENTRY* >( pObj ); - id = pEobj->header.eobjId; - unknown = pEobj->header.unknown; - - - typeStr = eobjStr; - eobjlevelHierachyId = pEobj->header.levelHierachyId; - - std::string states = ""; - std::string gimmickName = ""; - for( const auto& pEntry1 : group.entries ) + if( sgbFile.stateEntries.size() > 0 ) + { + states = " // States -> "; + for( auto entries1 : sgbFile.stateEntries ) { - auto pGObj = pEntry1.get(); - if( pGObj->getType() == LgbEntryType::Gimmick ) - { - if( pGObj->header.unknown == pEobj->header.levelHierachyId ) - { - auto pGObjR = reinterpret_cast< LGB_GIMMICK_ENTRY* >( pGObj ); - char* dataSection = nullptr; - //std::cout << fileName << " "; - - auto file = data1->getFile( pGObjR->gimmickFileName ); - auto sections = file->get_data_sections(); - dataSection = §ions.at( 0 )[0]; - auto sgbFile = SGB_FILE( &dataSection[0] ); - - auto pos = pGObjR->gimmickFileName.find_last_of( "/" ); - - if( pos != std::string::npos ) - { - name = pGObjR->gimmickFileName.substr( pos + 1 ); - name = name.substr( 0, name.length() - 4 ); - gimmickName = name; - } - - if( sgbFile.stateEntries.size() > 0 ) - { - states = " // States -> "; - for( auto entries1 : sgbFile.stateEntries ) - { - states += entries1.name + " "; - } - states += "\n"; - } - - break; - - } - } + states += entries1.name + " "; } - int state = 4; + states += "\n"; + } - if( eobjNameMap.find( id ) != eobjNameMap.end() ) - { - name = eobjNameMap[id]; - name.erase( boost::remove_if( name, boost::is_any_of( "★_ '()[]-\x1a\x1\x2\x1f\x1\x3.:" ) ), name.end() ); - name[0] = toupper( name[0] ); - } - if( name.empty() ) - name = "unknown_" + std::to_string( count++ ); + break; - if( id == 2000182 || gimmickName == "sgvf_w_lvd_b0095" ) - { - state = 5; - name = "Entrance"; - } - - auto count1 = 0; - if( nameMap.find( name ) == nameMap.end() ) - { - nameMap[name] = 0; - } - else - { - nameMap[name] = ++nameMap[name]; - count1 = nameMap[name]; - } - - if( count1 > 0 ) - name = name + "_" + std::to_string( count1 ); - - eobjects += " instance->registerEObj( \"" + name + "\", " + std::to_string( id ) + - ", " + std::to_string( eobjlevelHierachyId ) + ", " + std::to_string( state ) + - ", " + - "{ " + std::to_string( pObj->header.translation.x ) + "f, " - + std::to_string( pObj->header.translation.y ) + "f, " - + std::to_string( pObj->header.translation.z ) + "f }, " + - std::to_string( pObj->header.scale.x ) + "f, " + - - // for whatever reason, the rotation inside the sgbs is the inverse of what the game uses - std::to_string( pObj->header.rotation.y * -1.f ) + "f ); \n" + states; - - - std::string outStr( - std::to_string( id ) + ", " + typeStr + "\"" + name + "\", " + - std::to_string( pObj->header.translation.x ) + ", " + - std::to_string( pObj->header.translation.y ) + ", " + - std::to_string( pObj->header.translation.z ) + ", " + - std::to_string( eobjlevelHierachyId ) + "\n" - ); - //eobjOut.write( outStr.c_str(), outStr.size() ); - } + } } - } + } + int state = 4; + + if( eobjNameMap.find( id ) != eobjNameMap.end() ) + { + name = eobjNameMap[ id ]; + name.erase( boost::remove_if( name, boost::is_any_of( "★_ '()[]-\x1a\x1\x2\x1f\x1\x3.:" ) ), + name.end() ); + name[ 0 ] = toupper( name[ 0 ] ); + } + if( name.empty() ) + name = "unknown_" + std::to_string( count++ ); + + if( id == 2000182 || gimmickName == "sgvf_w_lvd_b0095" ) + { + state = 5; + name = "Entrance"; + } + + auto count1 = 0; + if( nameMap.find( name ) == nameMap.end() ) + { + nameMap[ name ] = 0; + } + else + { + nameMap[ name ] = ++nameMap[ name ]; + count1 = nameMap[ name ]; + } + + if( count1 > 0 ) + name = name + "_" + std::to_string( count1 ); + + eobjects += " instance->registerEObj( \"" + name + "\", " + std::to_string( id ) + + ", " + std::to_string( eobjlevelHierachyId ) + ", " + std::to_string( state ) + + ", " + + "{ " + std::to_string( pObj->header.translation.x ) + "f, " + + std::to_string( pObj->header.translation.y ) + "f, " + + std::to_string( pObj->header.translation.z ) + "f }, " + + std::to_string( pObj->header.scale.x ) + "f, " + + + // for whatever reason, the rotation inside the sgbs is the inverse of what the game uses + std::to_string( pObj->header.rotation.y * -1.f ) + "f ); \n" + states; + + + std::string outStr( + std::to_string( id ) + ", " + typeStr + "\"" + name + "\", " + + std::to_string( pObj->header.translation.x ) + ", " + + std::to_string( pObj->header.translation.y ) + ", " + + std::to_string( pObj->header.translation.z ) + ", " + + std::to_string( eobjlevelHierachyId ) + "\n" + ); + //eobjOut.write( outStr.c_str(), outStr.size() ); + } } - std::cout << "[Info] " << "Total Groups " << totalGroups << " Total entries " << totalGroupEntries << "\n"; - } - std::cout << "[Success] " << "Exported " << zoneName << " in " << - std::chrono::duration_cast< std::chrono::seconds >( std::chrono::system_clock::now() - entryStartTime ).count() << " seconds\n"; + } + } + std::cout << "[Info] " << "Total Groups " << totalGroups << " Total entries " << totalGroupEntries << "\n"; } - catch( std::exception& e ) - { - std::cout << "[Error] " << e.what() << std::endl; - std::cout << "[Error] " << "Unable to extract collision data.\n\tIf using standalone ensure your working directory folder layout is \n\tbg/[ffxiv|ex1|ex2]/teri/type/zone/[level|collision]" << std::endl; - std::cout << std::endl; - std::cout << "[Info] " << "Usage: pcb_reader2 territory \"path/to/game/sqpack/ffxiv\" " << std::endl; - } - std::cout << "\n\n\n"; + std::cout << "[Success] " << "Exported " << zoneName << " in " << + std::chrono::duration_cast< std::chrono::seconds >( + std::chrono::system_clock::now() - entryStartTime ).count() << " seconds\n"; + } + catch( std::exception& e ) + { + std::cout << "[Error] " << e.what() << std::endl; + std::cout << "[Error] " + << "Unable to extract collision data.\n\tIf using standalone ensure your working directory folder layout is \n\tbg/[ffxiv|ex1|ex2]/teri/type/zone/[level|collision]" + << std::endl; + std::cout << std::endl; + std::cout << "[Info] " << "Usage: pcb_reader2 territory \"path/to/game/sqpack/ffxiv\" " << std::endl; + } + std::cout << "\n\n\n"; - std::ifstream t( "instance.tmpl" ); - std::string instanceTpl( ( std::istreambuf_iterator( t ) ), - std::istreambuf_iterator() ); + std::ifstream t( "instance.tmpl" ); + std::string instanceTpl( ( std::istreambuf_iterator< char >( t ) ), + std::istreambuf_iterator< char >() ); - auto result = std::regex_replace( instanceTpl, std::regex( "\\INSTANCE_NAME" ), entry.name ); - result = std::regex_replace( result, std::regex( "\\INSTANCE_ID" ), std::to_string( entry.id ) ); - result = std::regex_replace( result, std::regex( "\\EOBJ_INIT" ), eobjects ); + auto result = std::regex_replace( instanceTpl, std::regex( "\\INSTANCE_NAME" ), entry.name ); + result = std::regex_replace( result, std::regex( "\\INSTANCE_ID" ), std::to_string( entry.id ) ); + result = std::regex_replace( result, std::regex( "\\EOBJ_INIT" ), eobjects ); - std::string subdir = ""; + std::string subdir = ""; - auto subdirIt = contentTypeMap.find( entry.type ); - if( subdirIt != contentTypeMap.end() ) - subdir = subdirIt->second + "/"; + auto subdirIt = contentTypeMap.find( entry.type ); + if( subdirIt != contentTypeMap.end() ) + subdir = subdirIt->second + "/"; - boost::filesystem::path outDir( "instances/" + subdir ); - boost::filesystem::create_directories( outDir ); + boost::filesystem::path outDir( "instances/" + subdir ); + boost::filesystem::create_directories( outDir ); - std::ofstream outH( outDir.string() + entry.name + ".cpp" ); - outH << result; - outH.close(); - - } + std::ofstream outH( outDir.string() + entry.name + ".cpp" ); + outH << result; + outH.close(); + + } - std::cout << "\n\n\n[Success] Finished all tasks in " << - std::chrono::duration_cast< std::chrono::seconds >( std::chrono::system_clock::now() - startTime ).count() << " seconds\n"; + std::cout << "\n\n\n[Success] Finished all tasks in " << + std::chrono::duration_cast< std::chrono::seconds >( std::chrono::system_clock::now() - startTime ).count() + << " seconds\n"; - getchar(); + getchar(); - if( eData ) - delete eData; - if( data1 ) - delete data1; - return 0; + if( eData ) + delete eData; + if( data1 ) + delete data1; + return 0; } diff --git a/src/tools/event_object_parser/matrix4.h b/src/tools/event_object_parser/matrix4.h index d02d2c84..fdcee84c 100644 --- a/src/tools/event_object_parser/matrix4.h +++ b/src/tools/event_object_parser/matrix4.h @@ -7,94 +7,105 @@ // https://github.com/jpd002/Play--Framework/tree/master/include/math struct matrix4 { - // 4x4 - float grid[16]; - matrix4() - { - memset( &grid[0], 0, sizeof( grid ) ); - } + // 4x4 + float grid[16]; - float operator()( int row, int col ) const - { - return grid[(row * 4) + col]; - } + matrix4() + { + memset( &grid[ 0 ], 0, sizeof( grid ) ); + } - float& operator()( int row, int col ) - { - return grid[(row * 4) + col]; - } - static matrix4 rotateX( float angle ) - { - matrix4 ret = matrix4(); - ret(0, 0) = 1.000000000f; - ret(1, 1) = cos(angle); - ret(1, 2) = -sin(angle); - ret(2, 1) = sin(angle); - ret(2, 2) = cos(angle); - ret(3, 3) = 1.000000000f; - return ret; - } + float operator()( int row, int col ) const + { + return grid[ ( row * 4 ) + col ]; + } - static matrix4 rotateY( float angle ) - { - matrix4 ret = matrix4(); - ret(0, 0) = cos(angle); - ret(0, 2) = sin(angle); - ret(1, 1) = 1.000000000f; - ret(2, 0) = -sin(angle); - ret(2, 2) = cos(angle); - ret(3, 3) = 1.000000000f; - return ret; - } + float& operator()( int row, int col ) + { + return grid[ ( row * 4 ) + col ]; + } - static matrix4 rotateZ( float angle ) - { - matrix4 ret = matrix4(); - ret(0, 0) = cos(angle); - ret(0, 1) = -sin(angle); - ret(1, 0) = sin(angle); - ret(1, 1) = cos(angle); - ret(2, 2) = 1.000000000f; - ret(3, 3) = 1.000000000f; - return ret; - } + static matrix4 rotateX( float angle ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = 1.000000000f; + ret( 1, 1 ) = cos( angle ); + ret( 1, 2 ) = -sin( angle ); + ret( 2, 1 ) = sin( angle ); + ret( 2, 2 ) = cos( angle ); + ret( 3, 3 ) = 1.000000000f; + return ret; + } - static matrix4 scale( float x, float y, float z ) - { - matrix4 ret = matrix4(); - ret(0, 0) = x; - ret(1, 1) = y; - ret(2, 2) = z; - ret(3, 3) = 1; + static matrix4 rotateY( float angle ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = cos( angle ); + ret( 0, 2 ) = sin( angle ); + ret( 1, 1 ) = 1.000000000f; + ret( 2, 0 ) = -sin( angle ); + ret( 2, 2 ) = cos( angle ); + ret( 3, 3 ) = 1.000000000f; + return ret; + } - return ret; - } + static matrix4 rotateZ( float angle ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = cos( angle ); + ret( 0, 1 ) = -sin( angle ); + ret( 1, 0 ) = sin( angle ); + ret( 1, 1 ) = cos( angle ); + ret( 2, 2 ) = 1.000000000f; + ret( 3, 3 ) = 1.000000000f; + return ret; + } - static matrix4 translate( float x, float y, float z ) - { - matrix4 ret = matrix4(); - ret(0, 0) = 1; - ret(1, 1) = 1; - ret(2, 2) = 1; - ret(3, 3) = 1; + static matrix4 scale( float x, float y, float z ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = x; + ret( 1, 1 ) = y; + ret( 2, 2 ) = z; + ret( 3, 3 ) = 1; - ret(3, 0) = x; - ret(3, 1) = y; - ret(3, 2) = z; - return ret; - } + return ret; + } - matrix4 operator *( const matrix4& rhs ) const - { - matrix4 ret; - for( unsigned int i = 0; i < 4; i++ ) - { - ret( i, 0 ) = (*this)(i, 0) * rhs( 0, 0 ) + (*this)(i, 1) * rhs( 1, 0 ) + (*this)(i, 2) * rhs( 2, 0 ) + (*this)(i, 3) * rhs( 3, 0 ); - ret( i, 1 ) = (*this)(i, 0) * rhs( 0, 1 ) + (*this)(i, 1) * rhs( 1, 1 ) + (*this)(i, 2) * rhs( 2, 1 ) + (*this)(i, 3) * rhs( 3, 1 ); - ret( i, 2 ) = (*this)(i, 0) * rhs( 0, 2 ) + (*this)(i, 1) * rhs( 1, 2 ) + (*this)(i, 2) * rhs( 2, 2 ) + (*this)(i, 3) * rhs( 3, 2 ); - ret( i, 3 ) = (*this)(i, 0) * rhs( 0, 3 ) + (*this)(i, 1) * rhs( 1, 3 ) + (*this)(i, 2) * rhs( 2, 3 ) + (*this)(i, 3) * rhs( 3, 3 ); - } - return ret; - } + static matrix4 translate( float x, float y, float z ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = 1; + ret( 1, 1 ) = 1; + ret( 2, 2 ) = 1; + ret( 3, 3 ) = 1; + + ret( 3, 0 ) = x; + ret( 3, 1 ) = y; + ret( 3, 2 ) = z; + return ret; + } + + matrix4 operator*( const matrix4& rhs ) const + { + matrix4 ret; + for( unsigned int i = 0; i < 4; i++ ) + { + ret( i, 0 ) = + ( *this )( i, 0 ) * rhs( 0, 0 ) + ( *this )( i, 1 ) * rhs( 1, 0 ) + ( *this )( i, 2 ) * rhs( 2, 0 ) + + ( *this )( i, 3 ) * rhs( 3, 0 ); + ret( i, 1 ) = + ( *this )( i, 0 ) * rhs( 0, 1 ) + ( *this )( i, 1 ) * rhs( 1, 1 ) + ( *this )( i, 2 ) * rhs( 2, 1 ) + + ( *this )( i, 3 ) * rhs( 3, 1 ); + ret( i, 2 ) = + ( *this )( i, 0 ) * rhs( 0, 2 ) + ( *this )( i, 1 ) * rhs( 1, 2 ) + ( *this )( i, 2 ) * rhs( 2, 2 ) + + ( *this )( i, 3 ) * rhs( 3, 2 ); + ret( i, 3 ) = + ( *this )( i, 0 ) * rhs( 0, 3 ) + ( *this )( i, 1 ) * rhs( 1, 3 ) + ( *this )( i, 2 ) * rhs( 2, 3 ) + + ( *this )( i, 3 ) * rhs( 3, 3 ); + } + return ret; + } }; + #endif diff --git a/src/tools/event_object_parser/pcb.h b/src/tools/event_object_parser/pcb.h index 4b775d84..77a50d81 100644 --- a/src/tools/event_object_parser/pcb.h +++ b/src/tools/event_object_parser/pcb.h @@ -6,87 +6,87 @@ struct PCB_HEADER { - uint32_t unknown_1; - uint32_t unknown_2; - uint32_t num_entries; // count starts at 0 - uint32_t total_indices; - uint64_t padding; + uint32_t unknown_1; + uint32_t unknown_2; + uint32_t num_entries; // count starts at 0 + uint32_t total_indices; + uint64_t padding; }; struct PCB_BLOCK_HEADER { - uint32_t type; // 0 for entry, 0x30 for group - uint32_t group_size; // when group size in bytes for the group block - // bounding box - float x; - float y; - float z; - float x1; - float y1; - float z1; - // number of vertices packed into 16 bit - uint16_t num_v16; - // number of indices - uint16_t num_indices; - // number of normal floar vertices - uint32_t num_vertices; + uint32_t type; // 0 for entry, 0x30 for group + uint32_t group_size; // when group size in bytes for the group block + // bounding box + float x; + float y; + float z; + float x1; + float y1; + float z1; + // number of vertices packed into 16 bit + uint16_t num_v16; + // number of indices + uint16_t num_indices; + // number of normal floar vertices + uint32_t num_vertices; }; struct PCB_VERTEXDATA { - float x; - float y; - float z; + float x; + float y; + float z; }; struct PCB_INDEXDATA { - uint8_t index[3]; - uint8_t unknown[3]; - uint8_t unknown1[6]; + uint8_t index[3]; + uint8_t unknown[3]; + uint8_t unknown1[6]; }; struct PCB_VERTEXDATAI16 { - uint16_t x; - uint16_t y; - uint16_t z; + uint16_t x; + uint16_t y; + uint16_t z; }; struct PCB_BLOCK_DATA { - std::vector< PCB_VERTEXDATA > vertices; - std::vector< PCB_VERTEXDATAI16 > vertices_i16; - std::vector< PCB_INDEXDATA > indices; + std::vector< PCB_VERTEXDATA > vertices; + std::vector< PCB_VERTEXDATAI16 > vertices_i16; + std::vector< PCB_INDEXDATA > indices; }; struct PCB_BLOCK_ENTRY { - PCB_BLOCK_HEADER header; - PCB_BLOCK_DATA data; + PCB_BLOCK_HEADER header; + PCB_BLOCK_DATA data; }; struct PCB_FILE { - PCB_HEADER header; - std::vector< PCB_BLOCK_ENTRY > entries; + PCB_HEADER header; + std::vector< PCB_BLOCK_ENTRY > entries; }; struct PCB_LIST_ENTRY { - uint32_t id; - float x, y, z, x2, y2, z2, rot; + uint32_t id; + float x, y, z, x2, y2, z2, rot; }; struct PCB_LIST_BASE_ENTRY { - float x, y, z, x2, y2, z2, rot; + float x, y, z, x2, y2, z2, rot; }; struct PCB_LIST_FILE { - uint32_t count; - PCB_LIST_BASE_ENTRY entry; - std::vector entries; + uint32_t count; + PCB_LIST_BASE_ENTRY entry; + std::vector< PCB_LIST_ENTRY > entries; }; #endif \ No newline at end of file diff --git a/src/tools/event_object_parser/sgb.h b/src/tools/event_object_parser/sgb.h index beaa8bfd..e6bcf2ce 100644 --- a/src/tools/event_object_parser/sgb.h +++ b/src/tools/event_object_parser/sgb.h @@ -25,219 +25,228 @@ struct SGB_GROUP; struct SGB_GROUP_HEADER; -enum SgbDataType : uint32_t +enum SgbDataType : + uint32_t { - Unknown0008 = 0x0008, - Group = 0x0100, + Unknown0008 = 0x0008, + Group = 0x0100, }; -enum SgbGroupEntryType : uint32_t +enum SgbGroupEntryType : + uint32_t { - Model = 0x01, + Model = 0x01, }; struct SGB_GROUP_HEADER { - SgbDataType type; - int32_t nameOffset; - uint32_t unknown08; - uint32_t unknown0C; + SgbDataType type; + int32_t nameOffset; + uint32_t unknown08; + uint32_t unknown0C; - uint32_t unknown10; - uint32_t unknown14; - uint32_t unknown18; - uint32_t unknown1C; + uint32_t unknown10; + uint32_t unknown14; + uint32_t unknown18; + uint32_t unknown1C; - int32_t entryCount; - uint32_t unknown24; - uint32_t unknown28; - uint32_t unknown2C; + int32_t entryCount; + uint32_t unknown24; + uint32_t unknown28; + uint32_t unknown2C; - uint32_t unknown30; - uint32_t unknown34; - uint32_t unknown38; - uint32_t unknown3C; + uint32_t unknown30; + uint32_t unknown34; + uint32_t unknown38; + uint32_t unknown3C; - uint32_t unknown40; - uint32_t unknown44; + uint32_t unknown40; + uint32_t unknown44; }; struct SGB_GROUP_ENTRY { public: - char* m_buf; - uint32_t m_offset; + char* m_buf; + uint32_t m_offset; - SGB_GROUP_ENTRY() - { - m_buf = nullptr; - m_offset = 0; - }; - SGB_GROUP_ENTRY( char* buf, uint32_t offset ) - { - m_buf = buf; - m_offset = offset; - }; - virtual ~SGB_GROUP_ENTRY() {}; + SGB_GROUP_ENTRY() + { + m_buf = nullptr; + m_offset = 0; + }; + + SGB_GROUP_ENTRY( char* buf, uint32_t offset ) + { + m_buf = buf; + m_offset = offset; + }; + + virtual ~SGB_GROUP_ENTRY() + { + }; }; struct SGB_ENTRY_HEADER { - SgbGroupEntryType type; - uint32_t unknown2; - int32_t nameOffset; - vec3 translation; - vec3 rotation; - vec3 scale; + SgbGroupEntryType type; + uint32_t unknown2; + int32_t nameOffset; + vec3 translation; + vec3 rotation; + vec3 scale; }; -struct SGB_MODEL_HEADER : public SGB_ENTRY_HEADER +struct SGB_MODEL_HEADER : + public SGB_ENTRY_HEADER { - int32_t modelFileOffset; - int32_t collisionFileOffset; + int32_t modelFileOffset; + int32_t collisionFileOffset; }; -struct SGB_MODEL_ENTRY : public SGB_GROUP_ENTRY +struct SGB_MODEL_ENTRY : + public SGB_GROUP_ENTRY { - SGB_MODEL_HEADER header; - SgbGroupEntryType type; - std::string name; - std::string modelFileName; - std::string collisionFileName; + SGB_MODEL_HEADER header; + SgbGroupEntryType type; + std::string name; + std::string modelFileName; + std::string collisionFileName; - SGB_MODEL_ENTRY( char* buf, uint32_t offset ) - { - header = *reinterpret_cast< SGB_MODEL_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - modelFileName = std::string( buf + offset + header.modelFileOffset ); - collisionFileName = std::string( buf + offset + header.collisionFileOffset ); - } + SGB_MODEL_ENTRY( char* buf, uint32_t offset ) + { + header = *reinterpret_cast< SGB_MODEL_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + modelFileName = std::string( buf + offset + header.modelFileOffset ); + collisionFileName = std::string( buf + offset + header.collisionFileOffset ); + } }; struct SGB_GROUP { - SGB_GROUP_HEADER header; - std::string name; - SGB_FILE* parent; - std::vector< std::shared_ptr< SGB_GROUP_ENTRY > > entries; + SGB_GROUP_HEADER header; + std::string name; + SGB_FILE* parent; + std::vector< std::shared_ptr< SGB_GROUP_ENTRY > > entries; - SGB_GROUP( char* buf, SGB_FILE* file, uint32_t fileSize, uint32_t offset ) - { - parent = file; - header = *reinterpret_cast< SGB_GROUP_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); + SGB_GROUP( char* buf, SGB_FILE* file, uint32_t fileSize, uint32_t offset ) + { + parent = file; + header = *reinterpret_cast< SGB_GROUP_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); - auto entriesOffset = offset + sizeof( header ); + auto entriesOffset = offset + sizeof( header ); - for( auto i = 0; i < header.entryCount; ++i ) + for( auto i = 0; i < header.entryCount; ++i ) + { + auto entryOffset = entriesOffset + *reinterpret_cast< uint32_t* >( buf + ( entriesOffset + ( i * 4 ) ) ); + if( entryOffset > fileSize ) + throw std::runtime_error( "SGB_GROUP entry offset was larger than SGB file size!" ); + auto type = *reinterpret_cast< uint32_t* >( buf + entryOffset ); + if( type == SgbGroupEntryType::Model && !ignoreModels ) { - auto entryOffset = entriesOffset + *reinterpret_cast< uint32_t* >( buf + ( entriesOffset + ( i * 4 ) ) ); - if( entryOffset > fileSize ) - throw std::runtime_error( "SGB_GROUP entry offset was larger than SGB file size!" ); - auto type = *reinterpret_cast< uint32_t* >( buf + entryOffset ); - if( type == SgbGroupEntryType::Model && !ignoreModels ) - { - entries.push_back( std::make_shared< SGB_MODEL_ENTRY >( buf, entryOffset ) ); - } - else - { - // std::cout << "\t\tUnknown SGB entry! Group: " << name << " type: " << type << " index: " << i << " entryOffset: " << entryOffset << "\n"; - } + entries.push_back( std::make_shared< SGB_MODEL_ENTRY >( buf, entryOffset ) ); } - } + else + { + // std::cout << "\t\tUnknown SGB entry! Group: " << name << " type: " << type << " index: " << i << " entryOffset: " << entryOffset << "\n"; + } + } + } }; struct SGB_HEADER { - char magic[4]; // SGB1 - uint32_t fileSize; - uint32_t unknown1; - char magic2[4]; // SCN1 + char magic[4]; // SGB1 + uint32_t fileSize; + uint32_t unknown1; + char magic2[4]; // SCN1 - uint32_t unknown10; - int32_t sharedOffset; - uint32_t unknown18; - int32_t offset1C; + uint32_t unknown10; + int32_t sharedOffset; + uint32_t unknown18; + int32_t offset1C; - uint32_t unknown20; - uint32_t statesOffset; - uint32_t unknown28; - uint32_t unknown2C; + uint32_t unknown20; + uint32_t statesOffset; + uint32_t unknown28; + uint32_t unknown2C; - uint32_t unknown30; - uint32_t unknown34; - uint32_t unknown38; - uint32_t unknown3C; + uint32_t unknown30; + uint32_t unknown34; + uint32_t unknown38; + uint32_t unknown3C; - uint32_t unknown40; - uint32_t unknown44; - uint32_t unknown48; - uint32_t unknown4C; + uint32_t unknown40; + uint32_t unknown44; + uint32_t unknown48; + uint32_t unknown4C; - uint32_t unknown50; - uint32_t unknown54; + uint32_t unknown50; + uint32_t unknown54; }; struct SGB_STATE_HEADER { - uint32_t id; - uint32_t nameOffset; - char unknown[0x24]; + uint32_t id; + uint32_t nameOffset; + char unknown[0x24]; }; struct SGB_STATE_ENTRY { - SGB_STATE_HEADER header; - std::string name; + SGB_STATE_HEADER header; + std::string name; - SGB_STATE_ENTRY( char* buf ) - { - header = *reinterpret_cast< SGB_STATE_HEADER* >( buf ); - name = std::string( buf + header.nameOffset ); - } + SGB_STATE_ENTRY( char* buf ) + { + header = *reinterpret_cast< SGB_STATE_HEADER* >( buf ); + name = std::string( buf + header.nameOffset ); + } }; struct SGB_FILE { - SGB_HEADER header; - std::vector entries; - std::vector stateEntries; + SGB_HEADER header; + std::vector< SGB_GROUP > entries; + std::vector< SGB_STATE_ENTRY > stateEntries; - SGB_FILE() - { - memset( &header, 0, sizeof( header ) ); - } - SGB_FILE( char* buf ) - { - constexpr int baseOffset = 0x14; - header = *reinterpret_cast< SGB_HEADER* >( buf ); + SGB_FILE() + { + memset( &header, 0, sizeof( header ) ); + } - if( strncmp( &header.magic[0], "SGB1", 4 ) != 0 || strncmp( &header.magic2[0], "SCN1", 4 ) != 0 ) - throw std::runtime_error( "Unable to load SGB File!" ); + SGB_FILE( char* buf ) + { + constexpr int baseOffset = 0x14; + header = *reinterpret_cast< SGB_HEADER* >( buf ); - try + if( strncmp( &header.magic[ 0 ], "SGB1", 4 ) != 0 || strncmp( &header.magic2[ 0 ], "SCN1", 4 ) != 0 ) + throw std::runtime_error( "Unable to load SGB File!" ); + + try + { + auto group = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.sharedOffset ); + entries.push_back( group ); + auto group2 = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.offset1C ); + entries.push_back( group2 ); + uint32_t stateCount = *reinterpret_cast< uint32_t* >( buf + baseOffset + header.statesOffset + 4 ); + if( stateCount > 0 ) { - auto group = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.sharedOffset ); - entries.push_back( group ); - auto group2 = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.offset1C ); - entries.push_back( group2 ); - uint32_t stateCount = *reinterpret_cast< uint32_t* >( buf + baseOffset + header.statesOffset + 4 ); - if( stateCount > 0 ) - { - stateCount = stateCount; - for( int i = 0; i < stateCount; ++i ) - { - auto state = SGB_STATE_ENTRY( buf + baseOffset + header.statesOffset + 8 + i * sizeof( SGB_STATE_HEADER ) ); - stateEntries.push_back( state ); - std::cout << state.name << "\n"; - } - } + stateCount = stateCount; + for( int i = 0; i < stateCount; ++i ) + { + auto state = SGB_STATE_ENTRY( buf + baseOffset + header.statesOffset + 8 + i * sizeof( SGB_STATE_HEADER ) ); + stateEntries.push_back( state ); + std::cout << state.name << "\n"; + } } - catch( std::exception& e ) - { - std::cout << e.what() << "\n"; - } - }; + } + catch( std::exception& e ) + { + std::cout << e.what() << "\n"; + } + }; }; diff --git a/src/tools/event_object_parser/vec3.h b/src/tools/event_object_parser/vec3.h index a8fdfbd1..2ff35fa2 100644 --- a/src/tools/event_object_parser/vec3.h +++ b/src/tools/event_object_parser/vec3.h @@ -6,26 +6,29 @@ struct vec3 { - float x, y, z; - vec3() - { - x = 0.0f; - y = 0.0f; - z = 0.0f; - } - vec3(float x, float y, float z) - { - this->x = x; - this->y = y; - this->z = z; - }; + float x, y, z; + + vec3() + { + x = 0.0f; + y = 0.0f; + z = 0.0f; + } + + vec3( float x, float y, float z ) + { + this->x = x; + this->y = y; + this->z = z; + }; }; -static vec3 operator *(const vec3& lhs, const matrix4& rhs) + +static vec3 operator*( const vec3& lhs, const matrix4& rhs ) { - vec3 ret; - ret.x = rhs(0, 0) * lhs.x + rhs(0, 1) * lhs.y + rhs(0, 2) * lhs.z; - ret.y = rhs(1, 0) * lhs.x + rhs(1, 1) * lhs.y + rhs(1, 2) * lhs.z; - ret.z = rhs(2, 0) * lhs.x + rhs(2, 1) * lhs.y + rhs(2, 2) * lhs.z; - return ret; + vec3 ret; + ret.x = rhs( 0, 0 ) * lhs.x + rhs( 0, 1 ) * lhs.y + rhs( 0, 2 ) * lhs.z; + ret.y = rhs( 1, 0 ) * lhs.x + rhs( 1, 1 ) * lhs.y + rhs( 1, 2 ) * lhs.z; + ret.z = rhs( 2, 0 ) * lhs.x + rhs( 2, 1 ) * lhs.y + rhs( 2, 2 ) * lhs.z; + return ret; }; #endif \ No newline at end of file diff --git a/src/tools/exd_common_gen/generated.h b/src/tools/exd_common_gen/generated.h index e0005ada..06a911ba 100644 --- a/src/tools/exd_common_gen/generated.h +++ b/src/tools/exd_common_gen/generated.h @@ -9,551 +9,567 @@ namespace Core { namespace Common { - /////////////////////////////////////////////////////////// - //ActionCategory.exd - enum class ActionCategory : uint8_t - { - Autoattack = 1, - Spell = 2, - Weaponskill = 3, - Ability = 4, - Item = 5, - DoLAbility = 6, - DoHAbility = 7, - Event = 8, - LimitBreak = 9, - System = 10, - Artillery = 11, - Mount = 12, - Glamour = 13, - ItemManipulation = 14, - AdrenalineRush = 15, - }; +/////////////////////////////////////////////////////////// +//ActionCategory.exd +enum class ActionCategory : + uint8_t +{ + Autoattack = 1, + Spell = 2, + Weaponskill = 3, + Ability = 4, + Item = 5, + DoLAbility = 6, + DoHAbility = 7, + Event = 8, + LimitBreak = 9, + System = 10, + Artillery = 11, + Mount = 12, + Glamour = 13, + ItemManipulation = 14, + AdrenalineRush = 15, +}; - /////////////////////////////////////////////////////////// - //BeastReputationRank.exd - enum class BeastReputationRank : uint8_t - { - None = 0, - Neutral = 1, - Recognized = 2, - Friendly = 3, - Trusted = 4, - Respected = 5, - Honored = 6, - Sworn = 7, - Allied = 8, - }; +/////////////////////////////////////////////////////////// +//BeastReputationRank.exd +enum class BeastReputationRank : + uint8_t +{ + None = 0, + Neutral = 1, + Recognized = 2, + Friendly = 3, + Trusted = 4, + Respected = 5, + Honored = 6, + Sworn = 7, + Allied = 8, +}; - /////////////////////////////////////////////////////////// - //BeastTribe.exd - enum class BeastTribe : uint8_t - { - }; +/////////////////////////////////////////////////////////// +//BeastTribe.exd +enum class BeastTribe : + uint8_t +{ +}; - /////////////////////////////////////////////////////////// - //ClassJob.exd - enum class ClassJob : uint8_t - { - Adventurer = 0, - Gladiator = 1, - Pugilist = 2, - Marauder = 3, - Lancer = 4, - Archer = 5, - Conjurer = 6, - Thaumaturge = 7, - Carpenter = 8, - Blacksmith = 9, - Armorer = 10, - Goldsmith = 11, - Leatherworker = 12, - Weaver = 13, - Alchemist = 14, - Culinarian = 15, - Miner = 16, - Botanist = 17, - Fisher = 18, - Paladin = 19, - Monk = 20, - Warrior = 21, - Dragoon = 22, - Bard = 23, - Whitemage = 24, - Blackmage = 25, - Arcanist = 26, - Summoner = 27, - Scholar = 28, - Rogue = 29, - Ninja = 30, - Machinist = 31, - Darkknight = 32, - Astrologian = 33, - Samurai = 34, - Redmage = 35, - }; +/////////////////////////////////////////////////////////// +//ClassJob.exd +enum class ClassJob : + uint8_t +{ + Adventurer = 0, + Gladiator = 1, + Pugilist = 2, + Marauder = 3, + Lancer = 4, + Archer = 5, + Conjurer = 6, + Thaumaturge = 7, + Carpenter = 8, + Blacksmith = 9, + Armorer = 10, + Goldsmith = 11, + Leatherworker = 12, + Weaver = 13, + Alchemist = 14, + Culinarian = 15, + Miner = 16, + Botanist = 17, + Fisher = 18, + Paladin = 19, + Monk = 20, + Warrior = 21, + Dragoon = 22, + Bard = 23, + Whitemage = 24, + Blackmage = 25, + Arcanist = 26, + Summoner = 27, + Scholar = 28, + Rogue = 29, + Ninja = 30, + Machinist = 31, + Darkknight = 32, + Astrologian = 33, + Samurai = 34, + Redmage = 35, +}; - /////////////////////////////////////////////////////////// - //ContentType.exd - enum class ContentType : uint8_t - { - DutyRoulette = 1, - Dungeons = 2, - Guildhests = 3, - Trials = 4, - Raids = 5, - PvP = 6, - QuestBattles = 7, - FATEs = 8, - TreasureHunt = 9, - Levequests = 10, - GrandCompany = 11, - Companions = 12, - BeastTribeQuests = 13, - OverallCompletion = 14, - PlayerCommendation = 15, - DisciplesoftheLand = 16, - DisciplesoftheHand = 17, - RetainerVentures = 18, - GoldSaucer = 19, - DeepDungeons = 21, - WondrousTails = 24, - CustomDeliveries = 25, - }; +/////////////////////////////////////////////////////////// +//ContentType.exd +enum class ContentType : + uint8_t +{ + DutyRoulette = 1, + Dungeons = 2, + Guildhests = 3, + Trials = 4, + Raids = 5, + PvP = 6, + QuestBattles = 7, + FATEs = 8, + TreasureHunt = 9, + Levequests = 10, + GrandCompany = 11, + Companions = 12, + BeastTribeQuests = 13, + OverallCompletion = 14, + PlayerCommendation = 15, + DisciplesoftheLand = 16, + DisciplesoftheHand = 17, + RetainerVentures = 18, + GoldSaucer = 19, + DeepDungeons = 21, + WondrousTails = 24, + CustomDeliveries = 25, +}; - /////////////////////////////////////////////////////////// - //EmoteCategory.exd - enum class EmoteCategory : uint8_t - { - General = 1, - Persistent = 2, - Expressions = 3, - }; +/////////////////////////////////////////////////////////// +//EmoteCategory.exd +enum class EmoteCategory : + uint8_t +{ + General = 1, + Persistent = 2, + Expressions = 3, +}; - /////////////////////////////////////////////////////////// - //ExVersion.exd - enum class ExVersion : uint8_t - { - ARealmReborn = 0, - Heavensward = 1, - Stormblood = 2, - }; +/////////////////////////////////////////////////////////// +//ExVersion.exd +enum class ExVersion : + uint8_t +{ + ARealmReborn = 0, + Heavensward = 1, + Stormblood = 2, +}; - /////////////////////////////////////////////////////////// - //GrandCompany.exd - enum class GrandCompany : uint8_t - { - None = 0, - Maelstrom = 1, - OrderoftheTwinAdder = 2, - ImmortalFlames = 3, - }; +/////////////////////////////////////////////////////////// +//GrandCompany.exd +enum class GrandCompany : + uint8_t +{ + None = 0, + Maelstrom = 1, + OrderoftheTwinAdder = 2, + ImmortalFlames = 3, +}; - /////////////////////////////////////////////////////////// - //GuardianDeity.exd - enum class GuardianDeity : uint8_t - { - HalonetheFury = 1, - MenphinatheLover = 2, - ThaliaktheScholar = 3, - NymeiatheSpinner = 4, - LlymlaentheNavigator = 5, - OschontheWanderer = 6, - ByregottheBuilder = 7, - RhalgrtheDestroyer = 8, - AzeymatheWarden = 9, - NaldthaltheTraders = 10, - NophicatheMatron = 11, - AlthyktheKeeper = 12, - }; +/////////////////////////////////////////////////////////// +//GuardianDeity.exd +enum class GuardianDeity : + uint8_t +{ + HalonetheFury = 1, + MenphinatheLover = 2, + ThaliaktheScholar = 3, + NymeiatheSpinner = 4, + LlymlaentheNavigator = 5, + OschontheWanderer = 6, + ByregottheBuilder = 7, + RhalgrtheDestroyer = 8, + AzeymatheWarden = 9, + NaldthaltheTraders = 10, + NophicatheMatron = 11, + AlthyktheKeeper = 12, +}; - /////////////////////////////////////////////////////////// - //ItemUICategory.exd - enum class ItemUICategory : uint8_t - { - PugilistsArm = 1, - GladiatorsArm = 2, - MaraudersArm = 3, - ArchersArm = 4, - LancersArm = 5, - OnehandedThaumaturgesArm = 6, - TwohandedThaumaturgesArm = 7, - OnehandedConjurersArm = 8, - TwohandedConjurersArm = 9, - ArcanistsGrimoire = 10, - Shield = 11, - CarpentersPrimaryTool = 12, - CarpentersSecondaryTool = 13, - BlacksmithsPrimaryTool = 14, - BlacksmithsSecondaryTool = 15, - ArmorersPrimaryTool = 16, - ArmorersSecondaryTool = 17, - GoldsmithsPrimaryTool = 18, - GoldsmithsSecondaryTool = 19, - LeatherworkersPrimaryTool = 20, - LeatherworkersSecondaryTool = 21, - WeaversPrimaryTool = 22, - WeaversSecondaryTool = 23, - AlchemistsPrimaryTool = 24, - AlchemistsSecondaryTool = 25, - CulinariansPrimaryTool = 26, - CulinariansSecondaryTool = 27, - MinersPrimaryTool = 28, - MinersSecondaryTool = 29, - BotanistsPrimaryTool = 30, - BotanistsSecondaryTool = 31, - FishersPrimaryTool = 32, - FishingTackle = 33, - Head = 34, - Body = 35, - Legs = 36, - Hands = 37, - Feet = 38, - Waist = 39, - Necklace = 40, - Earrings = 41, - Bracelets = 42, - Ring = 43, - Medicine = 44, - Ingredient = 45, - Meal = 46, - Seafood = 47, - Stone = 48, - Metal = 49, - Lumber = 50, - Cloth = 51, - Leather = 52, - Bone = 53, - Reagent = 54, - Dye = 55, - Part = 56, - Furnishing = 57, - Materia = 58, - Crystal = 59, - Catalyst = 60, - Miscellany = 61, - SoulCrystal = 62, - Other = 63, - ConstructionPermit = 64, - Roof = 65, - ExteriorWall = 66, - Window = 67, - Door = 68, - RoofDecoration = 69, - ExteriorWallDecoration = 70, - Placard = 71, - Fence = 72, - InteriorWall = 73, - Flooring = 74, - CeilingLight = 75, - OutdoorFurnishing = 76, - Table = 77, - Tabletop = 78, - Wallmounted = 79, - Rug = 80, - Minion = 81, - Gardening = 82, - Demimateria = 83, - RoguesArm = 84, - SeasonalMiscellany = 85, - TripleTriadCard = 86, - DarkKnightsArm = 87, - MachinistsArm = 88, - AstrologiansArm = 89, - AirshipHull = 90, - AirshipRigging = 91, - AirshipAftcastle = 92, - AirshipForecastle = 93, - OrchestrionRoll = 94, - Painting = 95, - SamuraisArm = 96, - RedMagesArm = 97, - ScholarsArm = 98, - FishersSecondaryTool = 99, - Currency = 100, - }; +/////////////////////////////////////////////////////////// +//ItemUICategory.exd +enum class ItemUICategory : + uint8_t +{ + PugilistsArm = 1, + GladiatorsArm = 2, + MaraudersArm = 3, + ArchersArm = 4, + LancersArm = 5, + OnehandedThaumaturgesArm = 6, + TwohandedThaumaturgesArm = 7, + OnehandedConjurersArm = 8, + TwohandedConjurersArm = 9, + ArcanistsGrimoire = 10, + Shield = 11, + CarpentersPrimaryTool = 12, + CarpentersSecondaryTool = 13, + BlacksmithsPrimaryTool = 14, + BlacksmithsSecondaryTool = 15, + ArmorersPrimaryTool = 16, + ArmorersSecondaryTool = 17, + GoldsmithsPrimaryTool = 18, + GoldsmithsSecondaryTool = 19, + LeatherworkersPrimaryTool = 20, + LeatherworkersSecondaryTool = 21, + WeaversPrimaryTool = 22, + WeaversSecondaryTool = 23, + AlchemistsPrimaryTool = 24, + AlchemistsSecondaryTool = 25, + CulinariansPrimaryTool = 26, + CulinariansSecondaryTool = 27, + MinersPrimaryTool = 28, + MinersSecondaryTool = 29, + BotanistsPrimaryTool = 30, + BotanistsSecondaryTool = 31, + FishersPrimaryTool = 32, + FishingTackle = 33, + Head = 34, + Body = 35, + Legs = 36, + Hands = 37, + Feet = 38, + Waist = 39, + Necklace = 40, + Earrings = 41, + Bracelets = 42, + Ring = 43, + Medicine = 44, + Ingredient = 45, + Meal = 46, + Seafood = 47, + Stone = 48, + Metal = 49, + Lumber = 50, + Cloth = 51, + Leather = 52, + Bone = 53, + Reagent = 54, + Dye = 55, + Part = 56, + Furnishing = 57, + Materia = 58, + Crystal = 59, + Catalyst = 60, + Miscellany = 61, + SoulCrystal = 62, + Other = 63, + ConstructionPermit = 64, + Roof = 65, + ExteriorWall = 66, + Window = 67, + Door = 68, + RoofDecoration = 69, + ExteriorWallDecoration = 70, + Placard = 71, + Fence = 72, + InteriorWall = 73, + Flooring = 74, + CeilingLight = 75, + OutdoorFurnishing = 76, + Table = 77, + Tabletop = 78, + Wallmounted = 79, + Rug = 80, + Minion = 81, + Gardening = 82, + Demimateria = 83, + RoguesArm = 84, + SeasonalMiscellany = 85, + TripleTriadCard = 86, + DarkKnightsArm = 87, + MachinistsArm = 88, + AstrologiansArm = 89, + AirshipHull = 90, + AirshipRigging = 91, + AirshipAftcastle = 92, + AirshipForecastle = 93, + OrchestrionRoll = 94, + Painting = 95, + SamuraisArm = 96, + RedMagesArm = 97, + ScholarsArm = 98, + FishersSecondaryTool = 99, + Currency = 100, +}; - /////////////////////////////////////////////////////////// - //ItemSearchCategory.exd - enum class ItemSearchCategory : uint8_t - { - PrimaryArms = 1, - PrimaryTools = 2, - PrimaryTools1 = 3, - Armor = 4, - Accessories = 5, - Medicines = 6, - Materials = 7, - Other = 8, - PugilistsArms = 9, - GladiatorsArms = 10, - MaraudersArms = 11, - ArchersArms = 12, - LancersArms = 13, - ThaumaturgesArms = 14, - ConjurersArms = 15, - ArcanistsArms = 16, - Shields = 17, - ThrowingWeapons = 18, - CarpentersTools = 19, - BlacksmithsTools = 20, - ArmorersTools = 21, - GoldsmithsTools = 22, - LeatherworkersTools = 23, - WeaversTools = 24, - AlchemistsTools = 25, - CulinariansTools = 26, - MinersTools = 27, - BotanistsTools = 28, - FishersTools = 29, - FishingTackle = 30, - Head = 31, - Undershirts = 32, - Body = 33, - Undergarments = 34, - Legs = 35, - Hands = 36, - Feet = 37, - Waist = 38, - Necklaces = 39, - Earrings = 40, - Bracelets = 41, - Rings = 42, - Medicine = 43, - Ingredients = 44, - Meals = 45, - Seafood = 46, - Stone = 47, - Metal = 48, - Lumber = 49, - Cloth = 50, - Leather = 51, - Bone = 52, - Reagents = 53, - Dyes = 54, - WeaponParts = 55, - Furnishings = 56, - Materia = 57, - Crystals = 58, - Catalysts = 59, - Miscellany = 60, - SoulCrystals = 61, - Arrows = 62, - QuestItems = 63, - Other1 = 64, - ExteriorFixtures = 65, - InteriorFixtures = 66, - OutdoorFurnishings = 67, - ChairsandBeds = 68, - Tables = 69, - Tabletop = 70, - Wallmounted = 71, - Rugs = 72, - RoguesArms = 73, - SeasonalMiscellany = 74, - Minions = 75, - DarkKnightsArms = 76, - MachinistsArms = 77, - AstrologiansArms = 78, - AirshipComponents = 79, - OrchestrionComponents = 80, - GardeningItems = 81, - Paintings = 82, - SamuraisArms = 83, - RedMagesArms = 84, - ScholarsArms = 85, - }; +/////////////////////////////////////////////////////////// +//ItemSearchCategory.exd +enum class ItemSearchCategory : + uint8_t +{ + PrimaryArms = 1, + PrimaryTools = 2, + PrimaryTools1 = 3, + Armor = 4, + Accessories = 5, + Medicines = 6, + Materials = 7, + Other = 8, + PugilistsArms = 9, + GladiatorsArms = 10, + MaraudersArms = 11, + ArchersArms = 12, + LancersArms = 13, + ThaumaturgesArms = 14, + ConjurersArms = 15, + ArcanistsArms = 16, + Shields = 17, + ThrowingWeapons = 18, + CarpentersTools = 19, + BlacksmithsTools = 20, + ArmorersTools = 21, + GoldsmithsTools = 22, + LeatherworkersTools = 23, + WeaversTools = 24, + AlchemistsTools = 25, + CulinariansTools = 26, + MinersTools = 27, + BotanistsTools = 28, + FishersTools = 29, + FishingTackle = 30, + Head = 31, + Undershirts = 32, + Body = 33, + Undergarments = 34, + Legs = 35, + Hands = 36, + Feet = 37, + Waist = 38, + Necklaces = 39, + Earrings = 40, + Bracelets = 41, + Rings = 42, + Medicine = 43, + Ingredients = 44, + Meals = 45, + Seafood = 46, + Stone = 47, + Metal = 48, + Lumber = 49, + Cloth = 50, + Leather = 51, + Bone = 52, + Reagents = 53, + Dyes = 54, + WeaponParts = 55, + Furnishings = 56, + Materia = 57, + Crystals = 58, + Catalysts = 59, + Miscellany = 60, + SoulCrystals = 61, + Arrows = 62, + QuestItems = 63, + Other1 = 64, + ExteriorFixtures = 65, + InteriorFixtures = 66, + OutdoorFurnishings = 67, + ChairsandBeds = 68, + Tables = 69, + Tabletop = 70, + Wallmounted = 71, + Rugs = 72, + RoguesArms = 73, + SeasonalMiscellany = 74, + Minions = 75, + DarkKnightsArms = 76, + MachinistsArms = 77, + AstrologiansArms = 78, + AirshipComponents = 79, + OrchestrionComponents = 80, + GardeningItems = 81, + Paintings = 82, + SamuraisArms = 83, + RedMagesArms = 84, + ScholarsArms = 85, +}; - /////////////////////////////////////////////////////////// - //OnlineStatus.exd - enum class OnlineStatus : uint8_t - { - Producer = 1, - GameMaster = 2, - GameMaster1 = 3, - GameMaster2 = 4, - Disconnected = 5, - WaitingforFriendListApproval = 6, - WaitingforLinkshellApproval = 7, - WaitingforFreeCompanyApproval = 8, - NotFound = 9, - Offline = 10, - Mentor = 11, - Busy = 12, - PvP = 13, - PlayingTripleTriad = 14, - ViewingCutscene = 15, - UsingaChocoboPorter = 16, - AwayfromKeyboard = 17, - CameraMode = 18, - LookingforRepairs = 19, - LookingtoRepair = 20, - LookingtoMeldMateria = 21, - Roleplaying = 22, - LookingforParty = 23, - SwordforHire = 24, - WaitingforDutyFinder = 25, - RecruitingPartyMembers = 26, - Mentor1 = 27, - PvEMentor = 28, - TradeMentor = 29, - PvPMentor = 30, - Returner = 31, - NewAdventurer = 32, - AllianceLeader = 33, - AlliancePartyLeader = 34, - AlliancePartyMember = 35, - PartyLeader = 36, - PartyMember = 37, - PartyLeaderCrossworld = 38, - PartyMemberCrossworld = 39, - AnotherWorld = 40, - SharingDuty = 41, - SimilarDuty = 42, - InDuty = 43, - TrialAdventurer = 44, - FreeCompany = 45, - GrandCompany = 46, - Online = 47, - }; +/////////////////////////////////////////////////////////// +//OnlineStatus.exd +enum class OnlineStatus : + uint8_t +{ + Producer = 1, + GameMaster = 2, + GameMaster1 = 3, + GameMaster2 = 4, + Disconnected = 5, + WaitingforFriendListApproval = 6, + WaitingforLinkshellApproval = 7, + WaitingforFreeCompanyApproval = 8, + NotFound = 9, + Offline = 10, + Mentor = 11, + Busy = 12, + PvP = 13, + PlayingTripleTriad = 14, + ViewingCutscene = 15, + UsingaChocoboPorter = 16, + AwayfromKeyboard = 17, + CameraMode = 18, + LookingforRepairs = 19, + LookingtoRepair = 20, + LookingtoMeldMateria = 21, + Roleplaying = 22, + LookingforParty = 23, + SwordforHire = 24, + WaitingforDutyFinder = 25, + RecruitingPartyMembers = 26, + Mentor1 = 27, + PvEMentor = 28, + TradeMentor = 29, + PvPMentor = 30, + Returner = 31, + NewAdventurer = 32, + AllianceLeader = 33, + AlliancePartyLeader = 34, + AlliancePartyMember = 35, + PartyLeader = 36, + PartyMember = 37, + PartyLeaderCrossworld = 38, + PartyMemberCrossworld = 39, + AnotherWorld = 40, + SharingDuty = 41, + SimilarDuty = 42, + InDuty = 43, + TrialAdventurer = 44, + FreeCompany = 45, + GrandCompany = 46, + Online = 47, +}; - /////////////////////////////////////////////////////////// - //Race.exd - enum class Race : uint8_t - { - Hyur = 1, - Elezen = 2, - Lalafell = 3, - Miqote = 4, - Roegadyn = 5, - AuRa = 6, - }; +/////////////////////////////////////////////////////////// +//Race.exd +enum class Race : + uint8_t +{ + Hyur = 1, + Elezen = 2, + Lalafell = 3, + Miqote = 4, + Roegadyn = 5, + AuRa = 6, +}; - /////////////////////////////////////////////////////////// - //Tribe.exd - enum class Tribe : uint8_t - { - Midlander = 1, - Highlander = 2, - Wildwood = 3, - Duskwight = 4, - Plainsfolk = 5, - Dunesfolk = 6, - SeekeroftheSun = 7, - KeeperoftheMoon = 8, - SeaWolf = 9, - Hellsguard = 10, - Raen = 11, - Xaela = 12, - }; +/////////////////////////////////////////////////////////// +//Tribe.exd +enum class Tribe : + uint8_t +{ + Midlander = 1, + Highlander = 2, + Wildwood = 3, + Duskwight = 4, + Plainsfolk = 5, + Dunesfolk = 6, + SeekeroftheSun = 7, + KeeperoftheMoon = 8, + SeaWolf = 9, + Hellsguard = 10, + Raen = 11, + Xaela = 12, +}; - /////////////////////////////////////////////////////////// - //Town.exd - enum class Town : uint8_t - { - Nowheresville = 0, - LimsaLominsa = 1, - Gridania = 2, - Uldah = 3, - Ishgard = 4, - Kugane = 7, - }; +/////////////////////////////////////////////////////////// +//Town.exd +enum class Town : + uint8_t +{ + Nowheresville = 0, + LimsaLominsa = 1, + Gridania = 2, + Uldah = 3, + Ishgard = 4, + Kugane = 7, +}; - /////////////////////////////////////////////////////////// - //Weather.exd - enum class Weather : uint8_t - { - ClearSkies = 1, - FairSkies = 2, - Clouds = 3, - Fog = 4, - Wind = 5, - Gales = 6, - Rain = 7, - Showers = 8, - Thunder = 9, - Thunderstorms = 10, - DustStorms = 11, - Sandstorms = 12, - HotSpells = 13, - HeatWaves = 14, - Snow = 15, - Blizzards = 16, - Gloom = 17, - Auroras = 18, - Darkness = 19, - Tension = 20, - Clouds1 = 21, - StormClouds = 22, - RoughSeas = 23, - RoughSeas1 = 24, - Louring = 25, - HeatWaves1 = 26, - Gloom1 = 27, - Gales1 = 28, - Eruptions = 29, - FairSkies1 = 30, - FairSkies2 = 31, - FairSkies3 = 32, - FairSkies4 = 33, - FairSkies5 = 34, - Irradiance = 35, - CoreRadiation = 36, - CoreRadiation1 = 37, - CoreRadiation2 = 38, - CoreRadiation3 = 39, - ShelfClouds = 40, - ShelfClouds1 = 41, - ShelfClouds2 = 42, - ShelfClouds3 = 43, - Oppression = 44, - Oppression1 = 45, - Oppression2 = 46, - Oppression3 = 47, - Oppression4 = 48, - UmbralWind = 49, - UmbralStatic = 50, - Smoke = 51, - FairSkies6 = 52, - RoyalLevin = 53, - Hyperelectricity = 54, - RoyalLevin1 = 55, - Oppression5 = 56, - Thunder1 = 57, - Thunder2 = 58, - CutScene = 59, - Multiplicity = 60, - Multiplicity1 = 61, - Rain1 = 62, - FairSkies7 = 63, - Rain2 = 64, - FairSkies8 = 65, - Dragonstorm = 66, - Dragonstorm1 = 67, - Subterrain = 68, - Concordance = 69, - Concordance1 = 70, - BeyondTime = 71, - BeyondTime1 = 72, - BeyondTime2 = 73, - DemonicInfinity = 74, - DemonicInfinity1 = 75, - DemonicInfinity2 = 76, - DimensionalDisruption = 77, - DimensionalDisruption1 = 78, - DimensionalDisruption2 = 79, - Revelstorm = 80, - Revelstorm1 = 81, - EternalBliss = 82, - EternalBliss1 = 83, - Wyrmstorm = 84, - Wyrmstorm1 = 85, - Revelstorm2 = 86, - Quicklevin = 87, - Thunder3 = 88, - DimensionalDisruption3 = 89, - FairSkies9 = 90, - }; +/////////////////////////////////////////////////////////// +//Weather.exd +enum class Weather : + uint8_t +{ + ClearSkies = 1, + FairSkies = 2, + Clouds = 3, + Fog = 4, + Wind = 5, + Gales = 6, + Rain = 7, + Showers = 8, + Thunder = 9, + Thunderstorms = 10, + DustStorms = 11, + Sandstorms = 12, + HotSpells = 13, + HeatWaves = 14, + Snow = 15, + Blizzards = 16, + Gloom = 17, + Auroras = 18, + Darkness = 19, + Tension = 20, + Clouds1 = 21, + StormClouds = 22, + RoughSeas = 23, + RoughSeas1 = 24, + Louring = 25, + HeatWaves1 = 26, + Gloom1 = 27, + Gales1 = 28, + Eruptions = 29, + FairSkies1 = 30, + FairSkies2 = 31, + FairSkies3 = 32, + FairSkies4 = 33, + FairSkies5 = 34, + Irradiance = 35, + CoreRadiation = 36, + CoreRadiation1 = 37, + CoreRadiation2 = 38, + CoreRadiation3 = 39, + ShelfClouds = 40, + ShelfClouds1 = 41, + ShelfClouds2 = 42, + ShelfClouds3 = 43, + Oppression = 44, + Oppression1 = 45, + Oppression2 = 46, + Oppression3 = 47, + Oppression4 = 48, + UmbralWind = 49, + UmbralStatic = 50, + Smoke = 51, + FairSkies6 = 52, + RoyalLevin = 53, + Hyperelectricity = 54, + RoyalLevin1 = 55, + Oppression5 = 56, + Thunder1 = 57, + Thunder2 = 58, + CutScene = 59, + Multiplicity = 60, + Multiplicity1 = 61, + Rain1 = 62, + FairSkies7 = 63, + Rain2 = 64, + FairSkies8 = 65, + Dragonstorm = 66, + Dragonstorm1 = 67, + Subterrain = 68, + Concordance = 69, + Concordance1 = 70, + BeyondTime = 71, + BeyondTime1 = 72, + BeyondTime2 = 73, + DemonicInfinity = 74, + DemonicInfinity1 = 75, + DemonicInfinity2 = 76, + DimensionalDisruption = 77, + DimensionalDisruption1 = 78, + DimensionalDisruption2 = 79, + Revelstorm = 80, + Revelstorm1 = 81, + EternalBliss = 82, + EternalBliss1 = 83, + Wyrmstorm = 84, + Wyrmstorm1 = 85, + Revelstorm2 = 86, + Quicklevin = 87, + Thunder3 = 88, + DimensionalDisruption3 = 89, + FairSkies9 = 90, +}; } } #endif diff --git a/src/tools/exd_common_gen/main.cpp b/src/tools/exd_common_gen/main.cpp index 0d6bc20b..feca65d3 100644 --- a/src/tools/exd_common_gen/main.cpp +++ b/src/tools/exd_common_gen/main.cpp @@ -21,105 +21,106 @@ Core::Data::ExdData g_exdData; //const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" ); -const std::string datLocation( "C:\\Data\\Games\\Final Fantasy XIV\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv" ); +const std::string datLocation( + "C:\\Data\\Games\\Final Fantasy XIV\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv" ); std::string generateEnum( const std::string& exd, int8_t nameIndex, const std::string& type, bool useLang = true ) { - xiv::dat::GameData data( datLocation ); - xiv::exd::ExdData eData( data ); + xiv::dat::GameData data( datLocation ); + xiv::exd::ExdData eData( data ); - std::map< std::string, uint32_t> nameMap; - - std::string result = "\n ///////////////////////////////////////////////////////////\n"; - result += " //" + exd + ".exd\n"; - result += " enum class " + exd + " : " + type + "\n"; - result += " {\n"; - auto lang = useLang ? xiv::exd::Language::en : xiv::exd::Language::none; - auto access = g_exdData.setupDatAccess( exd, lang ); - auto rows = access.get_rows(); + std::map< std::string, uint32_t > nameMap; - for( auto row : rows ) - { - auto& fields = row.second; - uint32_t id = row.first; - auto test = boost::get< std::string >( &fields.at( nameIndex ) ); - if( !test ) - continue; - auto str = *test; - str.erase( boost::remove_if( str, boost::is_any_of(",_-':!(){} \x02\x1f\x01\x03") ), str.end() ); - if( str.empty() ) - continue; - str[0] = std::toupper( str[0] ); - - auto it = nameMap.find( str ); - if( it != nameMap.end() ) - { - nameMap[str]++; - str = str + std::to_string( nameMap[str] ); - } - else - { - nameMap[str] = 0; - } - - result += " " + str + " = " + std::to_string( id ) + ",\n"; + std::string result = "\n ///////////////////////////////////////////////////////////\n"; + result += " //" + exd + ".exd\n"; + result += " enum class " + exd + " : " + type + "\n"; + result += " {\n"; + auto lang = useLang ? xiv::exd::Language::en : xiv::exd::Language::none; + auto access = g_exdData.setupDatAccess( exd, lang ); + auto rows = access.get_rows(); - } + for( auto row : rows ) + { + auto& fields = row.second; + uint32_t id = row.first; + auto test = boost::get< std::string >( &fields.at( nameIndex ) ); + if( !test ) + continue; + auto str = *test; + str.erase( boost::remove_if( str, boost::is_any_of( ",_-':!(){} \x02\x1f\x01\x03" ) ), str.end() ); + if( str.empty() ) + continue; + str[ 0 ] = std::toupper( str[ 0 ] ); - /* - result += - " bool operator==( const " + exd + "& t, const " + type + "& g ) { return static_cast< " + type + " >( t ) == g; }\n" - " bool operator==( const " + type + "& g, const " + exd + "& t ) { return static_cast< " + type + " >( t ) == g; }\n"; - */ + auto it = nameMap.find( str ); + if( it != nameMap.end() ) + { + nameMap[ str ]++; + str = str + std::to_string( nameMap[ str ] ); + } + else + { + nameMap[ str ] = 0; + } - result += " };\n"; + result += " " + str + " = " + std::to_string( id ) + ",\n"; - return result; + } + + /* + result += + " bool operator==( const " + exd + "& t, const " + type + "& g ) { return static_cast< " + type + " >( t ) == g; }\n" + " bool operator==( const " + type + "& g, const " + exd + "& t ) { return static_cast< " + type + " >( t ) == g; }\n"; + */ + + result += " };\n"; + + return result; } int main() { - g_log.init(); + g_log.init(); - g_log.info( "Setting up EXD data" ); - if( !g_exdData.init( datLocation ) ) - { - g_log.fatal( "Error setting up EXD data " ); - return 1; - } - - std::string result = "#ifndef _COMMON_GEN_H_\n#define _COMMON_GEN_H_\n"; + g_log.info( "Setting up EXD data" ); + if( !g_exdData.init( datLocation ) ) + { + g_log.fatal( "Error setting up EXD data " ); + return 1; + } - result += "\n#include \n\n"; + std::string result = "#ifndef _COMMON_GEN_H_\n#define _COMMON_GEN_H_\n"; - result += - "/* This file has been automatically generated.\n Changes will be lost upon regeneration.\n To change the content edit tools/exd_common_gen */\n"; + result += "\n#include \n\n"; + + result += + "/* This file has been automatically generated.\n Changes will be lost upon regeneration.\n To change the content edit tools/exd_common_gen */\n"; - result += "namespace Core {\n"; - result += "namespace Common {\n"; - result += generateEnum( "ActionCategory", 0, "uint8_t" ); - result += generateEnum( "BeastReputationRank", 1, "uint8_t" ); - result += generateEnum( "BeastTribe", 11, "uint8_t" ); - result += generateEnum( "ClassJob", 0, "uint8_t" ); - result += generateEnum( "ContentType", 0, "uint8_t" ); - result += generateEnum( "EmoteCategory", 0, "uint8_t" ); - result += generateEnum( "ExVersion", 0, "uint8_t" ); - result += generateEnum( "GrandCompany", 0, "uint8_t" ); - result += generateEnum( "GuardianDeity", 0, "uint8_t" ); - result += generateEnum( "ItemUICategory", 0, "uint8_t" ); - result += generateEnum( "ItemSearchCategory", 0, "uint8_t" ); - result += generateEnum( "OnlineStatus", 2, "uint8_t" ); - result += generateEnum( "Race", 1, "uint8_t" ); - result += generateEnum( "Tribe", 0, "uint8_t" ); - result += generateEnum( "Town", 0, "uint8_t" ); - result += generateEnum( "Weather", 1, "uint8_t" ); - result += "}\n"; - result += "}\n#endif\n"; - g_log.info( result ); - return 0; + result += "namespace Core {\n"; + result += "namespace Common {\n"; + result += generateEnum( "ActionCategory", 0, "uint8_t" ); + result += generateEnum( "BeastReputationRank", 1, "uint8_t" ); + result += generateEnum( "BeastTribe", 11, "uint8_t" ); + result += generateEnum( "ClassJob", 0, "uint8_t" ); + result += generateEnum( "ContentType", 0, "uint8_t" ); + result += generateEnum( "EmoteCategory", 0, "uint8_t" ); + result += generateEnum( "ExVersion", 0, "uint8_t" ); + result += generateEnum( "GrandCompany", 0, "uint8_t" ); + result += generateEnum( "GuardianDeity", 0, "uint8_t" ); + result += generateEnum( "ItemUICategory", 0, "uint8_t" ); + result += generateEnum( "ItemSearchCategory", 0, "uint8_t" ); + result += generateEnum( "OnlineStatus", 2, "uint8_t" ); + result += generateEnum( "Race", 1, "uint8_t" ); + result += generateEnum( "Tribe", 0, "uint8_t" ); + result += generateEnum( "Town", 0, "uint8_t" ); + result += generateEnum( "Weather", 1, "uint8_t" ); + result += "}\n"; + result += "}\n#endif\n"; + g_log.info( result ); + return 0; } diff --git a/src/tools/exd_struct_gen/main.cpp b/src/tools/exd_struct_gen/main.cpp index 4a7085a8..f3d350fc 100644 --- a/src/tools/exd_struct_gen/main.cpp +++ b/src/tools/exd_struct_gen/main.cpp @@ -32,75 +32,77 @@ Core::Logger g_log; Core::Data::ExdData g_exdData; bool skipUnmapped = true; -std::map< char, std::string > numberToStringMap -{ - { '0', "zero" }, - { '1', "one" }, - { '2', "two" }, - { '3', "three" }, - { '4', "four" }, - { '5', "five" }, - { '6', "six" }, - { '7', "seven" }, - { '8', "eight" }, - { '9', "nine" }, -}; +std::map< char, std::string > numberToStringMap + { + { '0', "zero" }, + { '1', "one" }, + { '2', "two" }, + { '3', "three" }, + { '4', "four" }, + { '5', "five" }, + { '6', "six" }, + { '7', "seven" }, + { '8', "eight" }, + { '9', "nine" }, + }; std::vector< std::string > cppKeyWords -{ - "new", - "class" -}; + { + "new", + "class" + }; //std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" ); std::string datLocation( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack" ); std::map< uint8_t, std::string > g_typeMap; -std::string generateDatAccessDecl( const std::string &exd ) +std::string generateDatAccessDecl( const std::string& exd ) { - return " xiv::exd::Exd m_" + exd + "Dat;\n"; + return " xiv::exd::Exd m_" + exd + "Dat;\n"; } -std::string generateIdListDecl( const std::string &exd ) +std::string generateIdListDecl( const std::string& exd ) { - return " std::set< uint32_t > m_" + exd + "IdList;\n"; + return " std::set< uint32_t > m_" + exd + "IdList;\n"; } std::string generateDirectGetters( const std::string& exd ) { - return " using " + exd + "Ptr = boost::shared_ptr< " + exd + " >;\n"; + return " using " + exd + "Ptr = boost::shared_ptr< " + exd + " >;\n"; } -std::string generateIdListGetter( const std::string &exd ) +std::string generateIdListGetter( const std::string& exd ) { - std::string IdListGetter = "const std::set< uint32_t >& get" + exd + "IdList()\n" - "{\n" - " if( m_" + exd + "IdList.size() == 0 )\n" - " loadIdList( m_" + exd + "Dat, m_" + exd + "IdList );\n" - " return m_" + exd + "IdList;\n" - "}\n"; - return IdListGetter; + std::string IdListGetter = "const std::set< uint32_t >& get" + exd + "IdList()\n" + "{\n" + " if( m_" + exd + "IdList.size() == 0 )\n" + " loadIdList( m_" + + exd + "Dat, m_" + exd + "IdList );\n" + " return m_" + exd + "IdList;\n" + "}\n"; + return IdListGetter; } -std::string generateSetDatAccessCall( const std::string &exd ) +std::string generateSetDatAccessCall( const std::string& exd ) { - auto& cat = g_exdData.m_exd_data->get_category( exd ); - auto exh = cat.get_header(); + auto& cat = g_exdData.m_exd_data->get_category( exd ); + auto exh = cat.get_header(); - std::string lang = "xiv::exd::Language::none"; - auto langs = exh.get_languages(); - if( langs.size() > 1 ) - lang = "xiv::exd::Language::en"; + std::string lang = "xiv::exd::Language::none"; + auto langs = exh.get_languages(); + if( langs.size() > 1 ) + lang = "xiv::exd::Language::en"; - return " m_" + exd + "Dat = setupDatAccess( \"" + exd + "\", " + lang + " );\n"; + return " m_" + exd + "Dat = setupDatAccess( \"" + exd + "\", " + lang + " );\n"; } std::string generateDirectGetterDef() { - std::string result = ""; - return result; + std::string result = ""; + return result; } + std::map< uint32_t, std::string > indexToNameMap; std::map< uint32_t, std::string > indexToTypeMap; std::map< uint32_t, std::string > indexToTarget; @@ -109,306 +111,319 @@ std::map< uint32_t, uint32_t > indexCountMap; std::map< std::string, std::string > nameTaken; -std::string generateStruct( const std::string &exd ) +std::string generateStruct( const std::string& exd ) { - auto& cat = g_exdData.m_exd_data->get_category( exd ); - auto exh = cat.get_header(); - auto exhMem = exh.get_exh_members(); + auto& cat = g_exdData.m_exd_data->get_category( exd ); + auto exh = cat.get_header(); + auto exhMem = exh.get_exh_members(); - int count = 0; + int count = 0; - using boost::property_tree::ptree; - ptree m_propTree; - boost::property_tree::read_json( "ex.json", m_propTree ); + using boost::property_tree::ptree; + ptree m_propTree; + boost::property_tree::read_json( "ex.json", m_propTree ); - BOOST_FOREACH( boost::property_tree::ptree::value_type &sheet, m_propTree.get_child( "sheets" ) ) - { - std::string name = sheet.second.get< std::string >( "sheet" ); - if( name != exd ) - continue; + BOOST_FOREACH( boost::property_tree::ptree::value_type& sheet, m_propTree.get_child( "sheets" ) ) + { + std::string name = sheet.second.get< std::string >( "sheet" ); + if( name != exd ) + continue; - BOOST_FOREACH( boost::property_tree::ptree::value_type &show, sheet.second.get_child( "definitions" ) ) + BOOST_FOREACH( boost::property_tree::ptree::value_type& show, sheet.second.get_child( "definitions" ) ) + { + uint32_t index; + std::string converterTarget = ""; + bool isRepeat = false; + int num = 0; + try + { + index = show.second.get< uint32_t >( "index" ); + } + catch( ... ) + { + index = 0; + } + try + { + std::string fieldName = show.second.get< std::string >( "name" ); + indexToNameMap[ index ] = fieldName; + } + catch( ... ) + { + } + + try + { + converterTarget = show.second.get< std::string >( "converter.target" ); + if( nameTaken.find( converterTarget ) != nameTaken.end() ) + indexToTarget[ index ] = converterTarget; + } + catch( ... ) + { + } + + try + { + show.second.get< std::string >( "type" ); + num = show.second.get< uint8_t >( "count" ); + isRepeat = true; + indexIsArrayMap[ index ] = true; + indexCountMap[ index ] = num; + std::string fName = show.second.get< std::string >( "definition.name" ); + indexToNameMap[ index ] = fName; + } + catch( ... ) + { + } + + } + } + + std::string result = "struct " + exd + "\n{\n"; + + + for( auto member : exhMem ) + { + auto typei = static_cast< uint8_t >( member.type ); + auto it = g_typeMap.find( typei ); + + std::string type; + if( it != g_typeMap.end() ) + type = it->second; + else + type = "bool"; + + std::string fieldName = "field" + std::to_string( count ); + if( indexToNameMap.find( count ) == indexToNameMap.end() ) + { + if( skipUnmapped ) { - uint32_t index; - std::string converterTarget = ""; - bool isRepeat = false; - int num = 0; - try - { - index = show.second.get< uint32_t >("index"); - } - catch( ... ) - { - index = 0; - } - try - { - std::string fieldName = show.second.get< std::string >( "name" ); - indexToNameMap[index] = fieldName; - } - catch( ... ) {} - - try - { - converterTarget = show.second.get< std::string >( "converter.target" ); - if( nameTaken.find( converterTarget ) != nameTaken.end() ) - indexToTarget[index] = converterTarget; - } - catch( ... ) {} - - try - { - show.second.get< std::string >( "type" ); - num = show.second.get< uint8_t >( "count" ); - isRepeat = true; - indexIsArrayMap[index] = true; - indexCountMap[index] = num; - std::string fName = show.second.get< std::string >( "definition.name" ); - indexToNameMap[index] = fName; - } - catch( ... ) {} - + count++; + continue; } - } + indexToNameMap[ count ] = fieldName; + } + else + { + fieldName = indexToNameMap[ count ]; + } + fieldName[ 0 ] = std::tolower( fieldName[ 0 ] ); + fieldName.erase( boost::remove_if( fieldName, boost::is_any_of( ",-':![](){}<>% \x02\x1f\x01\x03" ) ), + fieldName.end() ); - std::string result = "struct " + exd +"\n{\n"; - - - for( auto member : exhMem ) - { - auto typei = static_cast< uint8_t >( member.type ); - auto it = g_typeMap.find( typei ); - - std::string type; - if( it != g_typeMap.end() ) - type = it->second; - else - type = "bool"; - - std::string fieldName = "field" + std::to_string( count ); - if( indexToNameMap.find( count ) == indexToNameMap.end() ) + for( auto entry : numberToStringMap ) + { + if( fieldName[ 0 ] == entry.first ) { - if( skipUnmapped ) - { - count++; - continue; - } - indexToNameMap[count] = fieldName; + fieldName.erase( 0, 1 ); + fieldName.insert( 0, entry.second ); } - else - { - fieldName = indexToNameMap[count]; - } - fieldName[0] = std::tolower( fieldName[0] ); - fieldName.erase( boost::remove_if( fieldName, boost::is_any_of(",-':![](){}<>% \x02\x1f\x01\x03") ), fieldName.end() ); + } - for( auto entry : numberToStringMap ) - { - if( fieldName[0] == entry.first ) - { - fieldName.erase( 0, 1 ); - fieldName.insert( 0, entry.second ); - } - } + for( std::string keyword : cppKeyWords ) + { + if( fieldName == keyword ) + fieldName[ 0 ] = toupper( fieldName[ 0 ] ); + } - for( std::string keyword : cppKeyWords ) + indexToNameMap[ count ] = fieldName; + indexToTypeMap[ count ] = type; + if( indexToTarget.find( count ) != indexToTarget.end() ) + result += " boost::shared_ptr< " + indexToTarget[ count ] + "> " + fieldName + ";\n"; + else + { + if( indexIsArrayMap.find( count ) != indexIsArrayMap.end() ) { - if( fieldName == keyword ) - fieldName[0] = toupper( fieldName[0] ); + type = "std::vector< " + type + " >"; } + result += " " + type + " " + fieldName + ";\n"; - indexToNameMap[count] = fieldName; - indexToTypeMap[count] = type; - if( indexToTarget.find( count ) != indexToTarget.end() ) - result += " boost::shared_ptr< " + indexToTarget[count] + "> " + fieldName + ";\n"; - else - { - if( indexIsArrayMap.find( count ) != indexIsArrayMap.end() ) - { - type = "std::vector< " + type + " >"; - } - result += " " + type + " " + fieldName + ";\n"; - - } - - count++; - } + } - result += "\n " + exd + "( uint32_t row_id, Core::Data::ExdDataGenerated* exdData );\n"; - result += "};\n\n"; - - return result; + count++; + } + + result += "\n " + exd + "( uint32_t row_id, Core::Data::ExdDataGenerated* exdData );\n"; + result += "};\n\n"; + + return result; } std::string generateConstructorsDecl( const std::string& exd ) { - std::string result; + std::string result; - auto& cat = g_exdData.m_exd_data->get_category( exd ); - auto exh = cat.get_header(); - auto exhMem = exh.get_exh_members(); + auto& cat = g_exdData.m_exd_data->get_category( exd ); + auto exh = cat.get_header(); + auto exhMem = exh.get_exh_members(); - int count = 0; + int count = 0; - result += "\nCore::Data::" + exd + "::" + exd + "( uint32_t row_id, Core::Data::ExdDataGenerated* exdData )\n"; - result += "{\n"; - std::string indent = " "; - result += indent + "auto row = exdData->m_" + exd + "Dat.get_row( row_id );\n"; - for( auto member : exhMem ) - { - if( indexToNameMap.find( count ) == indexToNameMap.end() ) - { count++; continue; } - if( indexToTarget.find( count ) != indexToTarget.end() ) - result += indent + indexToNameMap[count] + " = boost::make_shared< " + indexToTarget[count] + ">( exdData->getField< " + - indexToTypeMap[count] + " >( row, " + std::to_string( count ) + " ), exdData );\n"; + result += "\nCore::Data::" + exd + "::" + exd + "( uint32_t row_id, Core::Data::ExdDataGenerated* exdData )\n"; + result += "{\n"; + std::string indent = " "; + result += indent + "auto row = exdData->m_" + exd + "Dat.get_row( row_id );\n"; + for( auto member : exhMem ) + { + if( indexToNameMap.find( count ) == indexToNameMap.end() ) + { + count++; + continue; + } + if( indexToTarget.find( count ) != indexToTarget.end() ) + result += indent + indexToNameMap[ count ] + " = boost::make_shared< " + indexToTarget[ count ] + + ">( exdData->getField< " + + indexToTypeMap[ count ] + " >( row, " + std::to_string( count ) + " ), exdData );\n"; + else + { + if( indexIsArrayMap.find( count ) == indexIsArrayMap.end() ) + result += indent + indexToNameMap[ count ] + " = exdData->getField< " + indexToTypeMap[ count ] + " >( row, " + + std::to_string( count ) + " );\n"; else { - if( indexIsArrayMap.find( count ) == indexIsArrayMap.end() ) - result += indent + indexToNameMap[count] + " = exdData->getField< " + indexToTypeMap[count] + " >( row, " + std::to_string( count ) + " );\n"; - else - { - uint32_t amount = indexCountMap[count]; - for( int i = 0; i < amount; i++ ) - { - - result += indent + indexToNameMap[count] + ".push_back( exdData->getField< " + indexToTypeMap[count] + " >( row, " + std::to_string( count + i ) + " ) );\n"; - - } + uint32_t amount = indexCountMap[ count ]; + for( int i = 0; i < amount; i++ ) + { + + result += indent + indexToNameMap[ count ] + ".push_back( exdData->getField< " + indexToTypeMap[ count ] + + " >( row, " + std::to_string( count + i ) + " ) );\n"; + + } - } } - count++; - } - result += "}\n"; + } + count++; + } + result += "}\n"; - indexToNameMap.clear(); - indexToTypeMap.clear(); - indexToTarget.clear(); - indexIsArrayMap.clear(); - indexCountMap.clear(); - return result; + indexToNameMap.clear(); + indexToTypeMap.clear(); + indexToTarget.clear(); + indexIsArrayMap.clear(); + indexCountMap.clear(); + return result; } int main( int argc, char** argv ) { - g_log.init(); - if( argc > 1 ) - { - g_log.info( "using dat path: " + std::string( argv[1] ) ); - datLocation = std::string( argv[1] ); - } + g_log.init(); + if( argc > 1 ) + { + g_log.info( "using dat path: " + std::string( argv[ 1 ] ) ); + datLocation = std::string( argv[ 1 ] ); + } - g_typeMap[0] = "std::string"; - g_typeMap[1] = "bool"; - g_typeMap[2] = "int8_t"; - g_typeMap[3] = "uint8_t"; - g_typeMap[4] = "int16_t"; - g_typeMap[5] = "uint16_t"; - g_typeMap[6] = "int32_t"; - g_typeMap[7] = "uint32_t"; - g_typeMap[9] = "float"; - g_typeMap[11] = "uint64_t"; + g_typeMap[ 0 ] = "std::string"; + g_typeMap[ 1 ] = "bool"; + g_typeMap[ 2 ] = "int8_t"; + g_typeMap[ 3 ] = "uint8_t"; + g_typeMap[ 4 ] = "int16_t"; + g_typeMap[ 5 ] = "uint16_t"; + g_typeMap[ 6 ] = "int32_t"; + g_typeMap[ 7 ] = "uint32_t"; + g_typeMap[ 9 ] = "float"; + g_typeMap[ 11 ] = "uint64_t"; - std::ifstream t( "ExdData.h.tmpl" ); - std::string exdH( ( std::istreambuf_iterator( t ) ), - std::istreambuf_iterator() ); + std::ifstream t( "ExdData.h.tmpl" ); + std::string exdH( ( std::istreambuf_iterator< char >( t ) ), + std::istreambuf_iterator< char >() ); - std::ifstream s( "ExdData.cpp.tmpl" ); - std::string exdC( ( std::istreambuf_iterator( s ) ), - std::istreambuf_iterator() ); + std::ifstream s( "ExdData.cpp.tmpl" ); + std::string exdC( ( std::istreambuf_iterator< char >( s ) ), + std::istreambuf_iterator< char >() ); - using boost::property_tree::ptree; - ptree m_propTree; - boost::property_tree::read_json( "ex.json", m_propTree ); + using boost::property_tree::ptree; + ptree m_propTree; + boost::property_tree::read_json( "ex.json", m_propTree ); - g_log.info( "Setting up EXD data" ); - if( !g_exdData.init( datLocation ) ) - { - g_log.fatal( "Error setting up EXD data " ); - return 0; - } - g_log.info( "Generating structs, this may take several minutes..." ); - g_log.info( "Go grab a coffee..." ); - - std::string structDefs; - std::string idListsDecl; - std::string dataDecl; - std::string getterDecl; - std::string datAccCall; - std::string getterDef; - std::string constructorDecl; - std::string forwards; - std::string idListGetters; + g_log.info( "Setting up EXD data" ); + if( !g_exdData.init( datLocation ) ) + { + g_log.fatal( "Error setting up EXD data " ); + return 0; + } + g_log.info( "Generating structs, this may take several minutes..." ); + g_log.info( "Go grab a coffee..." ); - //BOOST_FOREACH( boost::property_tree::ptree::value_type &sheet, m_propTree.get_child( "sheets" ) ) - //{ - //std::string name = sheet.second.get< std::string >( "sheet" ); - //nameTaken[name] = "1"; - //} + std::string structDefs; + std::string idListsDecl; + std::string dataDecl; + std::string getterDecl; + std::string datAccCall; + std::string getterDef; + std::string constructorDecl; + std::string forwards; + std::string idListGetters; - BOOST_FOREACH( boost::property_tree::ptree::value_type &sheet, m_propTree.get_child( "sheets" ) ) - { - std::string name = sheet.second.get< std::string >( "sheet" ); - - forwards += "struct " + name +";\n"; - structDefs += generateStruct( name ); - dataDecl += generateDatAccessDecl( name ); - idListsDecl += generateIdListDecl( name ); - getterDecl += generateDirectGetters( name ); - datAccCall += generateSetDatAccessCall( name ); - constructorDecl += generateConstructorsDecl( name ); - idListGetters += generateIdListGetter( name ); - } + //BOOST_FOREACH( boost::property_tree::ptree::value_type &sheet, m_propTree.get_child( "sheets" ) ) + //{ + //std::string name = sheet.second.get< std::string >( "sheet" ); + //nameTaken[name] = "1"; + //} - getterDecl += - "\n template< class T >\n" - " boost::shared_ptr< T > get( uint32_t id )\n" - " {\n" - " try\n" - " {\n" - " auto info = boost::make_shared< T >( id, this );\n" - " return info;\n" - " }\n" - " catch( ... )\n" - " {\n" - " return nullptr;\n" - " }\n" - " return nullptr;\n" - " }\n"; + BOOST_FOREACH( boost::property_tree::ptree::value_type& sheet, m_propTree.get_child( "sheets" ) ) + { + std::string name = sheet.second.get< std::string >( "sheet" ); - getterDef += generateDirectGetterDef(); + forwards += "struct " + name + ";\n"; + structDefs += generateStruct( name ); + dataDecl += generateDatAccessDecl( name ); + idListsDecl += generateIdListDecl( name ); + getterDecl += generateDirectGetters( name ); + datAccCall += generateSetDatAccessCall( name ); + constructorDecl += generateConstructorsDecl( name ); + idListGetters += generateIdListGetter( name ); + } - // for all sheets in the json i guess.... + getterDecl += + "\n template< class T >\n" + " boost::shared_ptr< T > get( uint32_t id )\n" + " {\n" + " try\n" + " {\n" + " auto info = boost::make_shared< T >( id, this );\n" + " return info;\n" + " }\n" + " catch( ... )\n" + " {\n" + " return nullptr;\n" + " }\n" + " return nullptr;\n" + " }\n"; - std::string result; - result = std::regex_replace( exdH, std::regex( "\\FORWARDS" ), forwards ); - result = std::regex_replace( result, std::regex( "\\STRUCTS" ), structDefs ); - result = std::regex_replace( result, std::regex( "\\DATACCESS" ), dataDecl ); - result = std::regex_replace( result, std::regex( "\\IDLISTS" ), idListsDecl ); - result = std::regex_replace( result, std::regex( "\\DIRECTGETTERS" ), getterDecl ); - result = std::regex_replace( result, std::regex( "\\IDLISTGETTERS" ), idListGetters ); + getterDef += generateDirectGetterDef(); + + // for all sheets in the json i guess.... + + std::string result; + result = std::regex_replace( exdH, std::regex( "\\FORWARDS" ), forwards ); + result = std::regex_replace( result, std::regex( "\\STRUCTS" ), structDefs ); + result = std::regex_replace( result, std::regex( "\\DATACCESS" ), dataDecl ); + result = std::regex_replace( result, std::regex( "\\IDLISTS" ), idListsDecl ); + result = std::regex_replace( result, std::regex( "\\DIRECTGETTERS" ), getterDecl ); + result = std::regex_replace( result, std::regex( "\\IDLISTGETTERS" ), idListGetters ); // g_log.info( result ); - std::ofstream outH("ExdDataGenerated.h"); - outH << result; - outH.close(); + std::ofstream outH( "ExdDataGenerated.h" ); + outH << result; + outH.close(); + + result = std::regex_replace( exdC, std::regex( "\\SETUPDATACCESS" ), datAccCall ); + result = std::regex_replace( result, std::regex( "\\DIRECTGETTERS" ), getterDef ); + result = std::regex_replace( result, std::regex( "\\CONSTRUCTORS" ), constructorDecl ); + + std::ofstream outC( "ExdDataGenerated.cpp" ); + outC << result; + outC.close(); - result = std::regex_replace( exdC, std::regex( "\\SETUPDATACCESS" ), datAccCall ); - result = std::regex_replace( result, std::regex( "\\DIRECTGETTERS" ), getterDef ); - result = std::regex_replace( result, std::regex( "\\CONSTRUCTORS" ), constructorDecl ); - - std::ofstream outC("ExdDataGenerated.cpp"); - outC << result; - outC.close(); - // g_log.info( result ); - return 0; + return 0; } diff --git a/src/tools/exd_struct_test/main.cpp b/src/tools/exd_struct_test/main.cpp index debf4f33..63ff31c1 100644 --- a/src/tools/exd_struct_test/main.cpp +++ b/src/tools/exd_struct_test/main.cpp @@ -32,26 +32,26 @@ const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" ); int main() { - g_log.init(); + g_log.init(); - g_log.info( "Setting up EXD data" ); - if( !g_exdData.init( datLocation ) ) - { - g_log.fatal( "Error setting up EXD data " ); - return 0; - } + g_log.info( "Setting up EXD data" ); + if( !g_exdData.init( datLocation ) ) + { + g_log.fatal( "Error setting up EXD data " ); + return 0; + } - - g_log.info( "getting id list " ); - auto idList = g_exdData.getTerritoryTypeIdList(); - g_log.info( "getting id list done" ); - for( auto id : idList ) - { - auto teri1 = g_exdData.get( id ); + g_log.info( "getting id list " ); + auto idList = g_exdData.getTerritoryTypeIdList(); - g_log.info( teri1->name ); - } + g_log.info( "getting id list done" ); + for( auto id : idList ) + { + auto teri1 = g_exdData.get< Core::Data::TerritoryType >( id ); - return 0; + g_log.info( teri1->name ); + } + + return 0; } diff --git a/src/tools/mob_parse/main.cpp b/src/tools/mob_parse/main.cpp index 5a1dfe4a..05dcdd53 100644 --- a/src/tools/mob_parse/main.cpp +++ b/src/tools/mob_parse/main.cpp @@ -33,196 +33,197 @@ const std::string datLocation( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Rebo struct StatusEffect { - uint16_t effect_id; - uint16_t unknown1; - float duration; - uint32_t sourceActorId; + uint16_t effect_id; + uint16_t unknown1; + float duration; + uint32_t sourceActorId; }; struct FFXIVIpcNpcSpawn { - uint32_t gimmickId; // needs to be existing in the map, mob will snap to it - uint8_t u2b; - uint8_t u2ab; - uint8_t gmRank; - uint8_t u3b; + uint32_t gimmickId; // needs to be existing in the map, mob will snap to it + uint8_t u2b; + uint8_t u2ab; + uint8_t gmRank; + uint8_t u3b; - uint8_t aggressionMode; // 1 passive, 2 aggressive - uint8_t onlineStatus; - uint8_t u3c; - uint8_t pose; + uint8_t aggressionMode; // 1 passive, 2 aggressive + uint8_t onlineStatus; + uint8_t u3c; + uint8_t pose; - uint32_t u4; + uint32_t u4; - uint64_t targetId; - uint32_t u6; - uint32_t u7; - uint64_t mainWeaponModel; - uint64_t secWeaponModel; - uint64_t craftToolModel; + uint64_t targetId; + uint32_t u6; + uint32_t u7; + uint64_t mainWeaponModel; + uint64_t secWeaponModel; + uint64_t craftToolModel; - uint32_t u14; - uint32_t u15; - uint32_t bNPCBase; - uint32_t bNPCName; - uint32_t u18; - uint32_t u19; - uint32_t directorId; - uint32_t spawnerId; - uint32_t parentActorId; - uint32_t hPMax; - uint32_t hPCurr; - uint32_t displayFlags; - uint16_t fateID; - uint16_t mPCurr; - uint16_t tPCurr; - uint16_t mPMax; - uint16_t tPMax; - uint16_t modelChara; - uint16_t rotation; - uint16_t activeMinion; - uint8_t spawnIndex; - uint8_t state; - uint8_t persistantEmote; - uint8_t modelType; - uint8_t subtype; - uint8_t voice; - uint16_t u25c; - uint8_t enemyType; - uint8_t level; - uint8_t classJob; - uint8_t u26d; - uint16_t u27a; - uint8_t currentMount; - uint8_t mountHead; - uint8_t mountBody; - uint8_t mountFeet; - uint8_t mountColor; - uint8_t scale; - uint32_t u29b; - uint32_t u30b; - StatusEffect effect[30]; - float posX; - float posY; - float posZ; - uint32_t models[10]; - char name[32]; - uint8_t look[26]; - char fcTag[6]; - uint32_t unk30; - uint32_t unk31; - uint8_t bNPCPartSlot; - uint8_t unk32; - uint16_t unk33; - uint32_t unk34; + uint32_t u14; + uint32_t u15; + uint32_t bNPCBase; + uint32_t bNPCName; + uint32_t u18; + uint32_t u19; + uint32_t directorId; + uint32_t spawnerId; + uint32_t parentActorId; + uint32_t hPMax; + uint32_t hPCurr; + uint32_t displayFlags; + uint16_t fateID; + uint16_t mPCurr; + uint16_t tPCurr; + uint16_t mPMax; + uint16_t tPMax; + uint16_t modelChara; + uint16_t rotation; + uint16_t activeMinion; + uint8_t spawnIndex; + uint8_t state; + uint8_t persistantEmote; + uint8_t modelType; + uint8_t subtype; + uint8_t voice; + uint16_t u25c; + uint8_t enemyType; + uint8_t level; + uint8_t classJob; + uint8_t u26d; + uint16_t u27a; + uint8_t currentMount; + uint8_t mountHead; + uint8_t mountBody; + uint8_t mountFeet; + uint8_t mountColor; + uint8_t scale; + uint32_t u29b; + uint32_t u30b; + StatusEffect effect[30]; + float posX; + float posY; + float posZ; + uint32_t models[10]; + char name[32]; + uint8_t look[26]; + char fcTag[6]; + uint32_t unk30; + uint32_t unk31; + uint8_t bNPCPartSlot; + uint8_t unk32; + uint16_t unk33; + uint32_t unk34; }; -std::vector< std::string > getAllFilesInDir( const std::string &dirPath, - const std::vector dirSkipList = {} ) +std::vector< std::string > getAllFilesInDir( const std::string& dirPath, + const std::vector< std::string > dirSkipList = {} ) { - // Create a vector of string - std::vector< std::string > listOfFiles; - try { - // Check if given path exists and points to a directory - if( filesys::exists( dirPath ) && filesys::is_directory( dirPath ) ) + // Create a vector of string + std::vector< std::string > listOfFiles; + try + { + // Check if given path exists and points to a directory + if( filesys::exists( dirPath ) && filesys::is_directory( dirPath ) ) + { + // Create a Recursive Directory Iterator object and points to the starting of directory + filesys::recursive_directory_iterator iter( dirPath ); + + // Create a Recursive Directory Iterator object pointing to end. + filesys::recursive_directory_iterator end; + + // Iterate till end + while( iter != end ) { - // Create a Recursive Directory Iterator object and points to the starting of directory - filesys::recursive_directory_iterator iter( dirPath ); + // Check if current entry is a directory and if exists in skip list + if( filesys::is_directory( iter->path() ) && + ( std::find( dirSkipList.begin(), dirSkipList.end(), iter->path().filename() ) != dirSkipList.end() ) ) + { + // Skip the iteration of current directory pointed by iterator +#ifdef USING_BOOST + // Boost Fileystsem API to skip current directory iteration + iter.no_push(); +#else + // c++17 Filesystem API to skip current directory iteration + iter.disable_recursion_pending(); +#endif + } + else + { + // Add the name in vector + listOfFiles.push_back( iter->path().string() ); + } - // Create a Recursive Directory Iterator object pointing to end. - filesys::recursive_directory_iterator end; - - // Iterate till end - while( iter != end ) - { - // Check if current entry is a directory and if exists in skip list - if( filesys::is_directory( iter->path() ) && - ( std::find(dirSkipList.begin(), dirSkipList.end(), iter->path().filename() ) != dirSkipList.end() ) ) - { - // Skip the iteration of current directory pointed by iterator - #ifdef USING_BOOST - // Boost Fileystsem API to skip current directory iteration - iter.no_push(); - #else - // c++17 Filesystem API to skip current directory iteration - iter.disable_recursion_pending(); - #endif - } - else - { - // Add the name in vector - listOfFiles.push_back( iter->path().string() ); - } - - error_code ec; - // Increment the iterator to point to next entry in recursive iteration - iter.increment( ec ); - if( ec ) - { - std::cerr << "Error While Accessing : " << iter->path().string() << " :: " << ec.message() << '\n'; - } - } + error_code ec; + // Increment the iterator to point to next entry in recursive iteration + iter.increment( ec ); + if( ec ) + { + std::cerr << "Error While Accessing : " << iter->path().string() << " :: " << ec.message() << '\n'; + } } - } - catch( std::system_error & e ) - { - std::cerr << "Exception :: " << e.what(); - } - return listOfFiles; + } + } + catch( std::system_error& e ) + { + std::cerr << "Exception :: " << e.what(); + } + return listOfFiles; } - int main() { - g_log.init(); + g_log.init(); - g_log.info( "Setting up EXD data" ); - if( !g_exdData.init( datLocation ) ) - { - g_log.fatal( "Error setting up EXD data " ); - return 0; - } + g_log.info( "Setting up EXD data" ); + if( !g_exdData.init( datLocation ) ) + { + g_log.fatal( "Error setting up EXD data " ); + return 0; + } - std::map< int, std::vector< FFXIVIpcNpcSpawn > > nameToPacketList; - std::map< int, std::vector< FFXIVIpcNpcSpawn > > zoneToPacketList; + std::map< int, std::vector< FFXIVIpcNpcSpawn > > nameToPacketList; + std::map< int, std::vector< FFXIVIpcNpcSpawn > > zoneToPacketList; - auto listOfFiles = getAllFilesInDir( "G:\\programming\\sapphire\\github\\ffxivmon\\bin\\CapturedNpcs", { ".svn", "logs", "backup" }); + auto listOfFiles = getAllFilesInDir( "G:\\programming\\sapphire\\github\\ffxivmon\\bin\\CapturedNpcs", + { ".svn", "logs", "backup" } ); - for( auto file : listOfFiles ) - { - if( !filesys::is_directory( file ) ) + for( auto file : listOfFiles ) + { + if( !filesys::is_directory( file ) ) + { + auto pos = file.find_last_of( "\\" ); + if( pos != std::string::npos ) { - auto pos = file.find_last_of( "\\" ); - if( pos != std::string::npos ) - { - auto str = file.substr( 0, pos ); - pos = str.find_last_of( "\\" ); - auto zone = str.substr( pos + 1 ); - //g_log.info( zone ); + auto str = file.substr( 0, pos ); + pos = str.find_last_of( "\\" ); + auto zone = str.substr( pos + 1 ); + //g_log.info( zone ); - FFXIVIpcNpcSpawn packet; - std::ifstream is; - is.open( file, std::ios::binary ); - is.seekg( 0x20, std::ios::beg ); - is.read( ( char* )&packet, sizeof( FFXIVIpcNpcSpawn ) ); - is.close(); + FFXIVIpcNpcSpawn packet; + std::ifstream is; + is.open( file, std::ios::binary ); + is.seekg( 0x20, std::ios::beg ); + is.read( ( char* ) &packet, sizeof( FFXIVIpcNpcSpawn ) ); + is.close(); - if( packet.subtype != 2 && - packet.subtype != 3 && - packet.enemyType != 0 && - packet.spawnerId == 0xE0000000 && - packet.fateID == 0 ) - zoneToPacketList[ std::stoi( zone ) ].push_back( packet ); - - } + if( packet.subtype != 2 && + packet.subtype != 3 && + packet.enemyType != 0 && + packet.spawnerId == 0xE0000000 && + packet.fateID == 0 ) + zoneToPacketList[ std::stoi( zone ) ].push_back( packet ); } + } + /* if( filesys::is_directory( file ) ) { auto pos = file.find_last_of( "\\" ); @@ -249,103 +250,103 @@ int main() } */ - } + } - for( auto entry : zoneToPacketList ) - { + for( auto entry : zoneToPacketList ) + { - //auto nameStruct = g_exdData.get< Core::Data::BNpcName >( entry.first ); - auto teri1 = g_exdData.get< Core::Data::TerritoryType >( entry.first ); - auto teriPlaceName = g_exdData.get< Core::Data::PlaceName >( teri1->placeName ); - g_log.info( std::to_string( entry.first ) + " - " + teri1->name + " - " + teriPlaceName->name ); - g_log.info( "Mob Count: " + std::to_string( entry.second.size() ) ); + //auto nameStruct = g_exdData.get< Core::Data::BNpcName >( entry.first ); + auto teri1 = g_exdData.get< Core::Data::TerritoryType >( entry.first ); + auto teriPlaceName = g_exdData.get< Core::Data::PlaceName >( teri1->placeName ); + g_log.info( std::to_string( entry.first ) + " - " + teri1->name + " - " + teriPlaceName->name ); + g_log.info( "Mob Count: " + std::to_string( entry.second.size() ) ); - for( auto mob : entry.second ) + for( auto mob : entry.second ) + { + nameToPacketList[ mob.bNPCName ].push_back( mob ); + + auto nameStruct = g_exdData.get< Core::Data::BNpcName >( mob.bNPCName ); + //g_log.info( nameStruct->singular + " " + std::to_string( packet.bNPCBase ) ); + } + + g_log.info( "Unique Mobs: " + std::to_string( nameToPacketList.size() ) ); + + for( auto mobName : nameToPacketList ) + { + auto nameStruct = g_exdData.get< Core::Data::BNpcName >( mobName.first ); + g_log.info( "|--> " + nameStruct->singular + "(" + std::to_string( mobName.second.size() ) + ")" ); + + for( FFXIVIpcNpcSpawn instance : mobName.second ) { - nameToPacketList[ mob.bNPCName ].push_back( mob ); - auto nameStruct = g_exdData.get< Core::Data::BNpcName >( mob.bNPCName ); - //g_log.info( nameStruct->singular + " " + std::to_string( packet.bNPCBase ) ); + std::string modelStr = "["; + + for( auto modelEntry : instance.models ) + { + modelStr += std::to_string( modelEntry ) + ", "; + } + + modelStr += "]"; + + + std::string cusStr = "["; + + for( auto cusEntry : instance.look ) + { + cusStr += std::to_string( cusEntry ) + ", "; + } + + cusStr += "]"; + + + //g_log.info( "|----> " + std::to_string( instance.bNPCBase ) + " " + std::to_string( instance.posX ) + ", " + std::to_string( instance.posY ) + ", " + std::to_string( instance.posZ ) ); + /*g_log.info( "|----> " + std::to_string( instance.bNPCBase ) + + " " + std::to_string( instance.mainWeaponModel ) + + ", " + std::to_string( instance.secWeaponModel ) + + ", " + std::to_string( instance.aggressionMode ) + + ", " + std::to_string( instance.enemyType ) + + ", " + std::to_string( instance.onlineStatus ) + + ", " + std::to_string( instance.pose ) + + ", " + std::to_string( instance.modelChara ) + + ", " + std::to_string( instance.displayFlags ) + ", " + modelStr + ", " + cusStr + ", " + std::to_string( instance.gimmickId ) );*/ + + g_log.info( "|----> " + std::to_string( instance.bNPCBase ) + + " " + std::to_string( instance.u2ab ) + + ", " + std::to_string( instance.u2b ) + + ", " + std::to_string( instance.u3b ) + + ", " + std::to_string( instance.u3c ) + + ", " + std::to_string( instance.u4 ) + + ", " + std::to_string( instance.u6 ) + + ", " + std::to_string( instance.u7 ) + + ", " + std::to_string( instance.u14 ) + + ", " + std::to_string( instance.u15 ) + + ", " + std::to_string( instance.u18 ) + + ", " + std::to_string( instance.u19 ) + + ", " + std::to_string( instance.u25c ) + + ", " + std::to_string( instance.u26d ) + + ", " + std::to_string( instance.u27a ) + + ", " + std::to_string( instance.u29b ) + + ", " + std::to_string( instance.u30b ) + + ", " + std::to_string( instance.unk30 ) + + ", " + std::to_string( instance.unk31 ) + + ", " + std::to_string( instance.unk32 ) + + ", " + std::to_string( instance.unk33 ) + + ", " + std::to_string( instance.unk34 ) ); } + } + nameToPacketList.clear(); + } - g_log.info( "Unique Mobs: " + std::to_string( nameToPacketList.size() ) ); + /*g_log.info( "getting id list " ); + auto idList = g_exdData.getTerritoryTypeIdList(); - for( auto mobName : nameToPacketList ) - { - auto nameStruct = g_exdData.get< Core::Data::BNpcName >( mobName.first ); - g_log.info( "|--> " + nameStruct->singular + "(" + std::to_string( mobName.second.size() ) + ")" ); + g_log.info( "getting id list done" ); + for( auto id : idList ) + { + auto teri1 = g_exdData.get( id ); - for( FFXIVIpcNpcSpawn instance : mobName.second ) - { + g_log.info( teri1->name ); + }*/ - std::string modelStr = "["; - - for( auto modelEntry : instance.models ) - { - modelStr += std::to_string( modelEntry ) + ", "; - } - - modelStr += "]"; - - - std::string cusStr = "["; - - for( auto cusEntry : instance.look ) - { - cusStr += std::to_string( cusEntry ) + ", "; - } - - cusStr += "]"; - - - //g_log.info( "|----> " + std::to_string( instance.bNPCBase ) + " " + std::to_string( instance.posX ) + ", " + std::to_string( instance.posY ) + ", " + std::to_string( instance.posZ ) ); - /*g_log.info( "|----> " + std::to_string( instance.bNPCBase ) + - " " + std::to_string( instance.mainWeaponModel ) + - ", " + std::to_string( instance.secWeaponModel ) + - ", " + std::to_string( instance.aggressionMode ) + - ", " + std::to_string( instance.enemyType ) + - ", " + std::to_string( instance.onlineStatus ) + - ", " + std::to_string( instance.pose ) + - ", " + std::to_string( instance.modelChara ) + - ", " + std::to_string( instance.displayFlags ) + ", " + modelStr + ", " + cusStr + ", " + std::to_string( instance.gimmickId ) );*/ - - g_log.info( "|----> " + std::to_string( instance.bNPCBase ) + - " " + std::to_string( instance.u2ab ) + - ", " + std::to_string( instance.u2b ) + - ", " + std::to_string( instance.u3b ) + - ", " + std::to_string( instance.u3c ) + - ", " + std::to_string( instance.u4 ) + - ", " + std::to_string( instance.u6 ) + - ", " + std::to_string( instance.u7 ) + - ", " + std::to_string( instance.u14 ) + - ", " + std::to_string( instance.u15 ) + - ", " + std::to_string( instance.u18 ) + - ", " + std::to_string( instance.u19 ) + - ", " + std::to_string( instance.u25c) + - ", " + std::to_string( instance.u26d ) + - ", " + std::to_string( instance.u27a ) + - ", " + std::to_string( instance.u29b ) + - ", " + std::to_string( instance.u30b ) + - ", " + std::to_string( instance.unk30 ) + - ", " + std::to_string( instance.unk31 ) + - ", " + std::to_string( instance.unk32 ) + - ", " + std::to_string( instance.unk33 ) + - ", " + std::to_string( instance.unk34 )); - } - } - nameToPacketList.clear(); - } - - /*g_log.info( "getting id list " ); - auto idList = g_exdData.getTerritoryTypeIdList(); - - g_log.info( "getting id list done" ); - for( auto id : idList ) - { - auto teri1 = g_exdData.get( id ); - - g_log.info( teri1->name ); - }*/ - - return 0; + return 0; } diff --git a/src/tools/pcb_reader/lgb.h b/src/tools/pcb_reader/lgb.h index 2b6aa003..76039e66 100644 --- a/src/tools/pcb_reader/lgb.h +++ b/src/tools/pcb_reader/lgb.h @@ -24,306 +24,331 @@ struct LGB_FILE_HEADER; struct LGB_GROUP; struct LGB_GROUP_HEADER; -enum class LgbEntryType : uint32_t +enum class LgbEntryType : + uint32_t { - BgParts = 1, - Light = 3, - Vfx = 4, - PositionMarker = 5, - Gimmick = 6, - SharedGroup6 = 6,// secondary variable is set to 2 - Sound = 7, - EventNpc = 8, - BattleNpc = 9, - Aetheryte = 12, - EnvSpace = 13, - Gathering = 14, - SharedGroup15 = 15,// secondary variable is set to 13 - Treasure = 16, - Weapon = 39, - PopRange = 40, - ExitRange = 41, - MapRange = 43, - NaviMeshRange = 44, - EventObject = 45, - EnvLocation = 47, - EventRange = 49, - QuestMarker = 51, - CollisionBox = 57, - DoorRange = 58, - LineVfx = 59, - ClientPath = 65, - ServerPath = 66, - GimmickRange = 67, - TargetMarker = 68, - ChairMarker = 69, - ClickableRange = 70, - PrefetchRange = 71, - FateRange = 72, - SphereCastRange = 75, + BgParts = 1, + Light = 3, + Vfx = 4, + PositionMarker = 5, + Gimmick = 6, + SharedGroup6 = 6,// secondary variable is set to 2 + Sound = 7, + EventNpc = 8, + BattleNpc = 9, + Aetheryte = 12, + EnvSpace = 13, + Gathering = 14, + SharedGroup15 = 15,// secondary variable is set to 13 + Treasure = 16, + Weapon = 39, + PopRange = 40, + ExitRange = 41, + MapRange = 43, + NaviMeshRange = 44, + EventObject = 45, + EnvLocation = 47, + EventRange = 49, + QuestMarker = 51, + CollisionBox = 57, + DoorRange = 58, + LineVfx = 59, + ClientPath = 65, + ServerPath = 66, + GimmickRange = 67, + TargetMarker = 68, + ChairMarker = 69, + ClickableRange = 70, + PrefetchRange = 71, + FateRange = 72, + SphereCastRange = 75, }; struct LGB_ENTRY_HEADER { - LgbEntryType type; - uint32_t unknown; - uint32_t nameOffset; - vec3 translation; - vec3 rotation; - vec3 scale; + LgbEntryType type; + uint32_t unknown; + uint32_t nameOffset; + vec3 translation; + vec3 rotation; + vec3 scale; }; class LGB_ENTRY { public: - char* m_buf; - uint32_t m_offset; - LGB_ENTRY_HEADER header; + char* m_buf; + uint32_t m_offset; + LGB_ENTRY_HEADER header; - LGB_ENTRY() - { - m_buf = nullptr; - m_offset = 0; - memset( &header, 0, sizeof( header ) ); - }; - LGB_ENTRY( char* buf, uint32_t offset ) - { - m_buf = buf; - m_offset = offset; - header = *reinterpret_cast< LGB_ENTRY_HEADER* >( buf + offset ); - }; - const LgbEntryType getType() const - { - return header.type; - }; - virtual ~LGB_ENTRY() {}; + LGB_ENTRY() + { + m_buf = nullptr; + m_offset = 0; + memset( &header, 0, sizeof( header ) ); + }; + + LGB_ENTRY( char* buf, uint32_t offset ) + { + m_buf = buf; + m_offset = offset; + header = *reinterpret_cast< LGB_ENTRY_HEADER* >( buf + offset ); + }; + + const LgbEntryType getType() const + { + return header.type; + }; + + virtual ~LGB_ENTRY() + { + }; }; -struct LGB_BGPARTS_HEADER : public LGB_ENTRY_HEADER +struct LGB_BGPARTS_HEADER : + public LGB_ENTRY_HEADER { - uint32_t modelFileOffset; - uint32_t collisionFileOffset; - uint32_t unknown4; - uint32_t unknown5; - uint32_t unknown6; - uint32_t unknown7; - uint32_t unknown8; - uint32_t unknown9; + uint32_t modelFileOffset; + uint32_t collisionFileOffset; + uint32_t unknown4; + uint32_t unknown5; + uint32_t unknown6; + uint32_t unknown7; + uint32_t unknown8; + uint32_t unknown9; }; -class LGB_BGPARTS_ENTRY : public LGB_ENTRY +class LGB_BGPARTS_ENTRY : + public LGB_ENTRY { public: - LGB_BGPARTS_HEADER header; - std::string name; - std::string modelFileName; - std::string collisionFileName; - LGB_BGPARTS_ENTRY() {}; - LGB_BGPARTS_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - modelFileName = std::string( buf + offset + header.modelFileOffset ); - collisionFileName = std::string( buf + offset + header.collisionFileOffset ); - }; + LGB_BGPARTS_HEADER header; + std::string name; + std::string modelFileName; + std::string collisionFileName; + + LGB_BGPARTS_ENTRY() + { + }; + + LGB_BGPARTS_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + modelFileName = std::string( buf + offset + header.modelFileOffset ); + collisionFileName = std::string( buf + offset + header.collisionFileOffset ); + }; }; -struct LGB_GIMMICK_HEADER : public LGB_ENTRY_HEADER +struct LGB_GIMMICK_HEADER : + public LGB_ENTRY_HEADER { - uint32_t gimmickFileOffset; - char unknownBytes[100]; + uint32_t gimmickFileOffset; + char unknownBytes[100]; }; -class LGB_GIMMICK_ENTRY : public LGB_ENTRY +class LGB_GIMMICK_ENTRY : + public LGB_ENTRY { public: - LGB_GIMMICK_HEADER header; - std::string name; - std::string gimmickFileName; + LGB_GIMMICK_HEADER header; + std::string name; + std::string gimmickFileName; - LGB_GIMMICK_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - gimmickFileName = std::string( buf + offset + header.gimmickFileOffset ); - //std::cout << "\t " << gimmickFileName << " unknown: " << header.unknown << "\n"; - }; + LGB_GIMMICK_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + gimmickFileName = std::string( buf + offset + header.gimmickFileOffset ); + //std::cout << "\t " << gimmickFileName << " unknown: " << header.unknown << "\n"; + }; }; -struct LGB_ENPC_HEADER : public LGB_ENTRY_HEADER +struct LGB_ENPC_HEADER : + public LGB_ENTRY_HEADER { - uint32_t enpcId; - uint8_t unknown1[0x24]; + uint32_t enpcId; + uint8_t unknown1[0x24]; }; -class LGB_ENPC_ENTRY : public LGB_ENTRY +class LGB_ENPC_ENTRY : + public LGB_ENTRY { public: - LGB_ENPC_HEADER header; - std::string name; + LGB_ENPC_HEADER header; + std::string name; - LGB_ENPC_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast< LGB_ENPC_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - //std::cout << "\t ENpc " << header.enpcId << " " << name << "\n"; - }; + LGB_ENPC_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast< LGB_ENPC_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + //std::cout << "\t ENpc " << header.enpcId << " " << name << "\n"; + }; }; -struct LGB_EOBJ_HEADER : public LGB_ENTRY_HEADER +struct LGB_EOBJ_HEADER : + public LGB_ENTRY_HEADER { - uint32_t eobjId; - uint32_t levelHierachyId; - uint8_t unknown1[0xC]; + uint32_t eobjId; + uint32_t levelHierachyId; + uint8_t unknown1[0xC]; }; -class LGB_EOBJ_ENTRY : public LGB_ENTRY +class LGB_EOBJ_ENTRY : + public LGB_ENTRY { public: - LGB_EOBJ_HEADER header; - std::string name; + LGB_EOBJ_HEADER header; + std::string name; - LGB_EOBJ_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast< LGB_EOBJ_HEADER* >( buf + offset ); - //std::cout << "\t " << header.eobjId << " " << name << " unknown: " << header.unknown << "\n"; - name = std::string( buf + offset + header.nameOffset ); - }; + LGB_EOBJ_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast< LGB_EOBJ_HEADER* >( buf + offset ); + //std::cout << "\t " << header.eobjId << " " << name << " unknown: " << header.unknown << "\n"; + name = std::string( buf + offset + header.nameOffset ); + }; }; -struct LGB_MAPRANGE_HEADER : public LGB_ENTRY_HEADER +struct LGB_MAPRANGE_HEADER : + public LGB_ENTRY_HEADER { - uint32_t type; - uint16_t unknown2; - uint16_t unknown3; - uint8_t unknown4[0x10]; + uint32_t type; + uint16_t unknown2; + uint16_t unknown3; + uint8_t unknown4[0x10]; }; -struct LGB_MAPRANGE_ENTRY : public LGB_ENTRY +struct LGB_MAPRANGE_ENTRY : + public LGB_ENTRY { public: - LGB_MAPRANGE_HEADER header; - std::string name; + LGB_MAPRANGE_HEADER header; + std::string name; - LGB_MAPRANGE_ENTRY( char* buf, uint32_t offset ) : LGB_ENTRY( buf, offset ) - { - header = *reinterpret_cast< LGB_MAPRANGE_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - }; + LGB_MAPRANGE_ENTRY( char* buf, uint32_t offset ) : + LGB_ENTRY( buf, offset ) + { + header = *reinterpret_cast< LGB_MAPRANGE_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + }; }; struct LGB_GROUP_HEADER { - uint32_t unknown; - int32_t groupNameOffset; - int32_t entriesOffset; - int32_t entryCount; - uint32_t unknown2; - uint32_t unknown3; - uint32_t unknown4; - uint32_t unknown5; - uint32_t unknown6; - uint32_t unknown7; - uint32_t unknown8; - uint32_t unknown9; - uint32_t unknown10; + uint32_t unknown; + int32_t groupNameOffset; + int32_t entriesOffset; + int32_t entryCount; + uint32_t unknown2; + uint32_t unknown3; + uint32_t unknown4; + uint32_t unknown5; + uint32_t unknown6; + uint32_t unknown7; + uint32_t unknown8; + uint32_t unknown9; + uint32_t unknown10; }; struct LGB_GROUP { - LGB_FILE* parent; - LGB_GROUP_HEADER header; - std::string name; - std::vector< std::shared_ptr< LGB_ENTRY > > entries; + LGB_FILE* parent; + LGB_GROUP_HEADER header; + std::string name; + std::vector< std::shared_ptr< LGB_ENTRY > > entries; - LGB_GROUP( char* buf, LGB_FILE* parentStruct, uint32_t offset ) - { - parent = parentStruct; - header = *reinterpret_cast< LGB_GROUP_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.groupNameOffset ); - //entries.resize( header.entryCount ); - //std::cout << name << "\n\t unknown: " << header.unknown << "\n"; - const auto entriesOffset = offset + header.entriesOffset; - for( auto i = 0; i < header.entryCount; ++i ) + LGB_GROUP( char* buf, LGB_FILE* parentStruct, uint32_t offset ) + { + parent = parentStruct; + header = *reinterpret_cast< LGB_GROUP_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.groupNameOffset ); + //entries.resize( header.entryCount ); + //std::cout << name << "\n\t unknown: " << header.unknown << "\n"; + const auto entriesOffset = offset + header.entriesOffset; + for( auto i = 0; i < header.entryCount; ++i ) + { + const auto entryOffset = entriesOffset + *reinterpret_cast< int32_t* >( buf + ( entriesOffset + i * 4 ) ); + + try { - const auto entryOffset = entriesOffset + *reinterpret_cast< int32_t* >( buf + ( entriesOffset + i * 4 ) ); + const auto type = *reinterpret_cast( buf + entryOffset ); + // garbage to skip model loading + if( !ignoreModels && type == LgbEntryType::BgParts ) + { + entries.push_back( std::make_shared< LGB_BGPARTS_ENTRY >( buf, entryOffset ) ); + } + else if( !ignoreModels && type == LgbEntryType::Gimmick ) + { + entries.push_back( std::make_shared< LGB_GIMMICK_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::EventNpc ) + { + entries.push_back( std::make_shared< LGB_ENPC_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::EventObject ) + { + entries.push_back( std::make_shared< LGB_EOBJ_ENTRY >( buf, entryOffset ) ); + } + else if( type == LgbEntryType::MapRange ) + { + entries.push_back( std::make_shared< LGB_MAPRANGE_ENTRY >( buf, entryOffset ) ); + } + /* + else + { + entries[i] = nullptr; + } + */ - try - { - const auto type = *reinterpret_cast( buf + entryOffset ); - // garbage to skip model loading - if( !ignoreModels && type == LgbEntryType::BgParts ) - { - entries.push_back( std::make_shared< LGB_BGPARTS_ENTRY >( buf, entryOffset ) ); - } - else if( !ignoreModels && type == LgbEntryType::Gimmick ) - { - entries.push_back( std::make_shared< LGB_GIMMICK_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::EventNpc ) - { - entries.push_back( std::make_shared< LGB_ENPC_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::EventObject ) - { - entries.push_back( std::make_shared< LGB_EOBJ_ENTRY >( buf, entryOffset ) ); - } - else if( type == LgbEntryType::MapRange ) - { - entries.push_back( std::make_shared< LGB_MAPRANGE_ENTRY >( buf, entryOffset ) ); - } - /* - else - { - entries[i] = nullptr; - } - */ - - } - catch( std::exception& e ) - { - std::cout << name << " " << e.what() << std::endl; - } } - }; + catch( std::exception& e ) + { + std::cout << name << " " << e.what() << std::endl; + } + } + }; }; struct LGB_FILE_HEADER { - char magic[4]; // LGB 1 - uint32_t fileSize; - uint32_t unknown; - char magic2[4]; // LGP1 - uint32_t unknown2; - uint32_t unknown3; - uint32_t unknown4; - uint32_t unknown5; - int32_t groupCount; + char magic[4]; // LGB 1 + uint32_t fileSize; + uint32_t unknown; + char magic2[4]; // LGP1 + uint32_t unknown2; + uint32_t unknown3; + uint32_t unknown4; + uint32_t unknown5; + int32_t groupCount; }; struct LGB_FILE { - LGB_FILE_HEADER header; - std::vector< LGB_GROUP > groups; - std::string name; + LGB_FILE_HEADER header; + std::vector< LGB_GROUP > groups; + std::string name; - LGB_FILE( char* buf, const std::string& name ) - { - header = *reinterpret_cast< LGB_FILE_HEADER* >( buf ); - if( strncmp( &header.magic[0], "LGB1", 4 ) != 0 || strncmp( &header.magic2[0], "LGP1", 4 ) != 0 ) - throw std::runtime_error( "Invalid LGB file!" ); + LGB_FILE( char* buf, const std::string& name ) + { + header = *reinterpret_cast< LGB_FILE_HEADER* >( buf ); + if( strncmp( &header.magic[ 0 ], "LGB1", 4 ) != 0 || strncmp( &header.magic2[ 0 ], "LGP1", 4 ) != 0 ) + throw std::runtime_error( "Invalid LGB file!" ); - //groups.resize(header.groupCount); + //groups.resize(header.groupCount); - constexpr auto baseOffset = sizeof( header ); - for( auto i = 0; i < header.groupCount; ++i ) - { - const auto groupOffset = baseOffset + *reinterpret_cast< int32_t* >( buf + ( baseOffset + i * 4 ) ); - const auto group = LGB_GROUP( buf, this, groupOffset ); - groups.push_back( group ); - } - }; + constexpr auto baseOffset = sizeof( header ); + for( auto i = 0; i < header.groupCount; ++i ) + { + const auto groupOffset = baseOffset + *reinterpret_cast< int32_t* >( buf + ( baseOffset + i * 4 ) ); + const auto group = LGB_GROUP( buf, this, groupOffset ); + groups.push_back( group ); + } + }; }; /* diff --git a/src/tools/pcb_reader/main.cpp b/src/tools/pcb_reader/main.cpp index 7ab7ecf5..1ca8e8b5 100644 --- a/src/tools/pcb_reader/main.cpp +++ b/src/tools/pcb_reader/main.cpp @@ -14,6 +14,7 @@ #include "sgb.h" #ifndef STANDALONE + #include #include #include @@ -21,6 +22,7 @@ #include #include #include + #endif // garbage to ignore models @@ -37,711 +39,725 @@ std::set< std::string > zoneDumpList; xiv::dat::GameData* data1 = nullptr; xiv::exd::ExdData* eData = nullptr; -enum class TerritoryTypeExdIndexes : size_t +enum class TerritoryTypeExdIndexes : + size_t { - TerritoryType = 0, - Path = 1 + TerritoryType = 0, + Path = 1 }; using namespace std::chrono_literals; struct face { - int32_t f1, f2, f3; + int32_t f1, f2, f3; }; void initExd( const std::string& gamePath ) { - data1 = data1 ? data1 : new xiv::dat::GameData( gamePath ); - eData = eData ? eData : new xiv::exd::ExdData( *data1 ); + data1 = data1 ? data1 : new xiv::dat::GameData( gamePath ); + eData = eData ? eData : new xiv::exd::ExdData( *data1 ); } -int parseBlockEntry( char* data, std::vector& entries, int gOff ) +int parseBlockEntry( char* data, std::vector< PCB_BLOCK_ENTRY >& entries, int gOff ) { - int offset = 0; - bool isgroup = true; - while( isgroup ) - { - PCB_BLOCK_ENTRY block_entry; - memcpy( &block_entry.header, data + offset, sizeof( block_entry.header ) ); - isgroup = block_entry.header.type == 0x30; + int offset = 0; + bool isgroup = true; + while( isgroup ) + { + PCB_BLOCK_ENTRY block_entry; + memcpy( &block_entry.header, data + offset, sizeof( block_entry.header ) ); + isgroup = block_entry.header.type == 0x30; - //printf( " BLOCKHEADER_%X: type: %i, group_size: %i\n", gOff + offset, block_entry.header.type, block_entry.header.group_size ); + //printf( " BLOCKHEADER_%X: type: %i, group_size: %i\n", gOff + offset, block_entry.header.type, block_entry.header.group_size ); - if( isgroup ) + if( isgroup ) + { + parseBlockEntry( data + offset + 0x30, entries, gOff + offset ); + offset += block_entry.header.group_size; + } + else + { + /* printf( "\tnum_v16: %i, num_indices: %i, num_vertices: %i\n\n", + block_entry.header.num_v16, block_entry.header.num_indices, block_entry.header.num_vertices );*/ + int doffset = sizeof( block_entry.header ) + offset; + uint16_t block_size = sizeof( block_entry.header ) + + block_entry.header.num_vertices * 3 * 4 + + block_entry.header.num_v16 * 6 + + block_entry.header.num_indices * 6; + + if( block_entry.header.num_vertices != 0 ) { - parseBlockEntry( data + offset + 0x30, entries, gOff + offset ); - offset += block_entry.header.group_size; + block_entry.data.vertices.resize( block_entry.header.num_vertices ); + + int32_t size_vertexbuffer = block_entry.header.num_vertices * 3; + memcpy( &block_entry.data.vertices[ 0 ], data + doffset, size_vertexbuffer * 4 ); + doffset += size_vertexbuffer * 4; } - else + if( block_entry.header.num_v16 != 0 ) { - /* printf( "\tnum_v16: %i, num_indices: %i, num_vertices: %i\n\n", - block_entry.header.num_v16, block_entry.header.num_indices, block_entry.header.num_vertices );*/ - int doffset = sizeof( block_entry.header ) + offset; - uint16_t block_size = sizeof( block_entry.header ) + - block_entry.header.num_vertices * 3 * 4 + - block_entry.header.num_v16 * 6 + - block_entry.header.num_indices * 6; - - if( block_entry.header.num_vertices != 0 ) - { - block_entry.data.vertices.resize( block_entry.header.num_vertices ); - - int32_t size_vertexbuffer = block_entry.header.num_vertices * 3; - memcpy( &block_entry.data.vertices[0], data + doffset, size_vertexbuffer * 4 ); - doffset += size_vertexbuffer * 4; - } - if( block_entry.header.num_v16 != 0 ) - { - block_entry.data.vertices_i16.resize( block_entry.header.num_v16 ); - int32_t size_unknownbuffer = block_entry.header.num_v16 * 6; - memcpy( &block_entry.data.vertices_i16[0], data + doffset, size_unknownbuffer ); - doffset += block_entry.header.num_v16 * 6; - } - if( block_entry.header.num_indices != 0 ) - { - block_entry.data.indices.resize( block_entry.header.num_indices ); - int32_t size_indexbuffer = block_entry.header.num_indices * 12; - memcpy( &block_entry.data.indices[0], data + doffset, size_indexbuffer ); - doffset += size_indexbuffer; - } - entries.push_back( block_entry ); + block_entry.data.vertices_i16.resize( block_entry.header.num_v16 ); + int32_t size_unknownbuffer = block_entry.header.num_v16 * 6; + memcpy( &block_entry.data.vertices_i16[ 0 ], data + doffset, size_unknownbuffer ); + doffset += block_entry.header.num_v16 * 6; } - } + if( block_entry.header.num_indices != 0 ) + { + block_entry.data.indices.resize( block_entry.header.num_indices ); + int32_t size_indexbuffer = block_entry.header.num_indices * 12; + memcpy( &block_entry.data.indices[ 0 ], data + doffset, size_indexbuffer ); + doffset += size_indexbuffer; + } + entries.push_back( block_entry ); + } + } - return 0; + return 0; } void dumpLevelExdEntries( uint32_t zoneId, const std::string& name = std::string() ) { - static auto& cat = eData->get_category( "Level" ); - static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); + static auto& cat = eData->get_category( "Level" ); + static auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); - std::string fileName( name + "_" + std::to_string( zoneId ) + "_Level" + ".csv" ); - std::ofstream outfile( fileName, std::ios::trunc ); - std::cout << "[Info] Writing level.exd entries to " << fileName << "\n"; - if( outfile.good() ) - { - outfile.close(); - outfile.open( fileName, std::ios::app ); - static auto rows = exd.get_rows(); - for( auto& row : rows ) + std::string fileName( name + "_" + std::to_string( zoneId ) + "_Level" + ".csv" ); + std::ofstream outfile( fileName, std::ios::trunc ); + std::cout << "[Info] Writing level.exd entries to " << fileName << "\n"; + if( outfile.good() ) + { + outfile.close(); + outfile.open( fileName, std::ios::app ); + static auto rows = exd.get_rows(); + for( auto& row : rows ) + { + auto id = row.first; + auto& fields = row.second; + auto x = *boost::get< float >( &fields.at( 0 ) ); + auto y = *boost::get< float >( &fields.at( 1 ) ); + auto z = *boost::get< float >( &fields.at( 2 ) ); + auto yaw = *boost::get< float >( &fields.at( 3 ) ); + auto radius = *boost::get< float >( &fields.at( 4 ) ); + auto type = *boost::get< uint8_t >( &fields.at( 5 ) ); + auto objectid = *boost::get< uint32_t >( &fields.at( 6 ) ); + auto zone = *boost::get< uint16_t >( &fields.at( 9 ) ); + + if( zone == zoneId ) { - auto id = row.first; - auto& fields = row.second; - auto x = *boost::get< float >( &fields.at( 0 ) ); - auto y = *boost::get< float >( &fields.at( 1 ) ); - auto z = *boost::get< float >( &fields.at( 2 ) ); - auto yaw = *boost::get< float >( &fields.at( 3 ) ); - auto radius = *boost::get< float >( &fields.at( 4 ) ); - auto type = *boost::get< uint8_t >( &fields.at( 5 ) ); - auto objectid = *boost::get< uint32_t >( &fields.at( 6 ) ); - auto zone = *boost::get< uint16_t >( &fields.at( 9 ) ); - - if( zone == zoneId ) - { - std::string outStr( - std::to_string( id ) + ", " + std::to_string( objectid ) + ", " + - std::to_string( x ) + ", " + std::to_string( y ) + ", " + std::to_string( z ) + ", " + - std::to_string( yaw ) + ", " + std::to_string( radius ) + ", " + std::to_string( type ) + "\n" - ); - outfile.write( outStr.c_str(), outStr.size() ); - } + std::string outStr( + std::to_string( id ) + ", " + std::to_string( objectid ) + ", " + + std::to_string( x ) + ", " + std::to_string( y ) + ", " + std::to_string( z ) + ", " + + std::to_string( yaw ) + ", " + std::to_string( radius ) + ", " + std::to_string( type ) + "\n" + ); + outfile.write( outStr.c_str(), outStr.size() ); } - } + } + } } std::string zoneNameToPath( const std::string& name ) { - std::string path; - bool found = false; + std::string path; + bool found = false; #ifdef STANDALONE - auto inFile = std::ifstream( "territorytype.exh.csv" ); - if( inFile.good() ) - { - std::string line; - std::regex re( "(\\d+),\"(.*)\",\"(.*)\",.*" ); - while( std::getline( inFile, line ) ) - { - std::smatch match; - if( std::regex_match( line, match, re ) - { - auto tmpId = std::stoul( match[1].str() ); - if( !found && name == match[2].str() ) - { - zoneId = tmpId; - path = match[3].str(); - found = true; - } - zoneNameMap[tmpId] = match[2].str(); - } - } - inFile.close(); - } + auto inFile = std::ifstream( "territorytype.exh.csv" ); + if( inFile.good() ) + { + std::string line; + std::regex re( "(\\d+),\"(.*)\",\"(.*)\",.*" ); + while( std::getline( inFile, line ) ) + { + std::smatch match; + if( std::regex_match( line, match, re ) + { + auto tmpId = std::stoul( match[1].str() ); + if( !found && name == match[2].str() ) + { + zoneId = tmpId; + path = match[3].str(); + found = true; + } + zoneNameMap[tmpId] = match[2].str(); + } + } + inFile.close(); + } #else - auto& cat = eData->get_category( "TerritoryType" ); - auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); - for( auto& row : exd.get_rows() ) - { - auto& fields = row.second; - auto teriName = *boost::get< std::string >( &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::TerritoryType ) ) ); - if( teriName.empty() ) - continue; - auto teriPath = *boost::get< std::string >( &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::Path ) ) ); - if( !found && boost::iequals( name, teriName ) ) - { - path = teriPath; - found = true; - zoneId = row.first; - } - zoneNameMap[row.first] = teriName; - } + auto& cat = eData->get_category( "TerritoryType" ); + auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::none ) ); + for( auto& row : exd.get_rows() ) + { + auto& fields = row.second; + auto teriName = *boost::get< std::string >( + &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::TerritoryType ) ) ); + if( teriName.empty() ) + continue; + auto teriPath = *boost::get< std::string >( &fields.at( static_cast< size_t >( TerritoryTypeExdIndexes::Path ) ) ); + if( !found && boost::iequals( name, teriName ) ) + { + path = teriPath; + found = true; + zoneId = row.first; + } + zoneNameMap[ row.first ] = teriName; + } #endif - if( found ) - { - //path = path.substr( path.find_first_of( "/" ) + 1, path.size() - path.find_first_of( "/" )); - //path = std::string( "ffxiv/" ) + path; - path = std::string( "bg/" ) + path.substr( 0, path.find( "/level/" ) ); - std::cout << "[Info] " << "Found path for " << name << ": " << path << std::endl; - } - else - { - throw std::runtime_error( "Unable to find path for " + name + - ".\n\tPlease double check spelling or open 0a0000.win32.index with FFXIV Explorer and extract territorytype.exh as CSV\n\tand copy territorytype.exh.csv into pcb_reader.exe directory if using standalone" ); - } + if( found ) + { + //path = path.substr( path.find_first_of( "/" ) + 1, path.size() - path.find_first_of( "/" )); + //path = std::string( "ffxiv/" ) + path; + path = std::string( "bg/" ) + path.substr( 0, path.find( "/level/" ) ); + std::cout << "[Info] " << "Found path for " << name << ": " << path << std::endl; + } + else + { + throw std::runtime_error( "Unable to find path for " + name + + ".\n\tPlease double check spelling or open 0a0000.win32.index with FFXIV Explorer and extract territorytype.exh as CSV\n\tand copy territorytype.exh.csv into pcb_reader.exe directory if using standalone" ); + } - return path; + return path; } void loadEobjNames() { - auto& cat = eData->get_category( "EObjName" ); - auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::en ) ); - for( auto& row : exd.get_rows() ) - { - auto id = row.first; - auto& fields = row.second; - auto name = *boost::get< std::string >( &fields.at( 0 ) ); - eobjNameMap[id] = name; - } + auto& cat = eData->get_category( "EObjName" ); + auto exd = static_cast< xiv::exd::Exd >( cat.get_data_ln( xiv::exd::Language::en ) ); + for( auto& row : exd.get_rows() ) + { + auto id = row.first; + auto& fields = row.second; + auto name = *boost::get< std::string >( &fields.at( 0 ) ); + eobjNameMap[ id ] = name; + } } void writeEobjEntry( std::ofstream& out, LGB_ENTRY* pObj ) { - static std::string mapRangeStr( "\"MapRange\", " ); - static std::string eobjStr( "\"EObj\", " ); + static std::string mapRangeStr( "\"MapRange\", " ); + static std::string eobjStr( "\"EObj\", " ); - uint32_t id; - uint32_t unknown = 0, unknown2 = 0; - std::string name; - std::string typeStr; - uint32_t eobjlevelHierachyId = 0; + uint32_t id; + uint32_t unknown = 0, unknown2 = 0; + std::string name; + std::string typeStr; + uint32_t eobjlevelHierachyId = 0; - if( pObj->getType() == LgbEntryType::EventObject ) - { - auto pEobj = reinterpret_cast< LGB_EOBJ_ENTRY* >( pObj ); - id = pEobj->header.eobjId; - unknown = pEobj->header.unknown; - name = eobjNameMap[id]; - typeStr = eobjStr; - eobjlevelHierachyId = pEobj->header.levelHierachyId; - } - else if( pObj->getType() == LgbEntryType::MapRange ) - { - auto pMapRange = reinterpret_cast< LGB_MAPRANGE_ENTRY* >( pObj ); - id = pMapRange->header.unknown; - unknown = pMapRange->header.unknown2; - unknown2 = pMapRange->header.unknown3; - typeStr = mapRangeStr; - } + if( pObj->getType() == LgbEntryType::EventObject ) + { + auto pEobj = reinterpret_cast< LGB_EOBJ_ENTRY* >( pObj ); + id = pEobj->header.eobjId; + unknown = pEobj->header.unknown; + name = eobjNameMap[ id ]; + typeStr = eobjStr; + eobjlevelHierachyId = pEobj->header.levelHierachyId; + } + else if( pObj->getType() == LgbEntryType::MapRange ) + { + auto pMapRange = reinterpret_cast< LGB_MAPRANGE_ENTRY* >( pObj ); + id = pMapRange->header.unknown; + unknown = pMapRange->header.unknown2; + unknown2 = pMapRange->header.unknown3; + typeStr = mapRangeStr; + } - std::string outStr( - std::to_string( id ) + ", " + typeStr + "\"" + name + "\", " + - std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + std::to_string( pObj->header.translation.z ) + - ", " + std::to_string( eobjlevelHierachyId ) + "\n" - ); - out.write( outStr.c_str(), outStr.size() ); + std::string outStr( + std::to_string( id ) + ", " + typeStr + "\"" + name + "\", " + + std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + + std::to_string( pObj->header.translation.z ) + + ", " + std::to_string( eobjlevelHierachyId ) + "\n" + ); + out.write( outStr.c_str(), outStr.size() ); } void loadAllInstanceContentEntries() { - auto& catInstance = eData->get_category( "InstanceContent" ); - auto exdInstance = static_cast< xiv::exd::Exd >( catInstance.get_data_ln( xiv::exd::Language::en ) ); + auto& catInstance = eData->get_category( "InstanceContent" ); + auto exdInstance = static_cast< xiv::exd::Exd >( catInstance.get_data_ln( xiv::exd::Language::en ) ); - if( zoneNameMap.size() == 0 ) - { - zoneNameToPath( "f1d1" ); - } + if( zoneNameMap.size() == 0 ) + { + zoneNameToPath( "f1d1" ); + } - std::ofstream out( "instancecontent.csv", std::ios::trunc ); - if( out.good() ) - { - out.close(); - } - out.open( "instancecontent.csv", std::ios::app ); - if( !out.good() ) - { - throw std::runtime_error( "Unable to create instancecontent.csv!" ); - } - std::cout << "[Info] Writing instancecontent.csv\n"; + std::ofstream out( "instancecontent.csv", std::ios::trunc ); + if( out.good() ) + { + out.close(); + } + out.open( "instancecontent.csv", std::ios::app ); + if( !out.good() ) + { + throw std::runtime_error( "Unable to create instancecontent.csv!" ); + } + std::cout << "[Info] Writing instancecontent.csv\n"; - for( auto& row : exdInstance.get_rows() ) - { - auto id = row.first; - auto& fields = row.second; + for( auto& row : exdInstance.get_rows() ) + { + auto id = row.first; + auto& fields = row.second; - auto name = *boost::get< std::string >( &fields.at( 3 ) ); - if( name.empty() ) - continue; - auto teri = *boost::get< uint32_t >( &fields.at( 9 ) ); - auto i = 0; - while( ( i = name.find( ' ' ) ) != std::string::npos ) - name = name.replace( name.begin() + i, name.begin() + i + 1, { '_' } ); - std::string outStr( - std::to_string( id ) + ", \"" + name + "\", \"" + zoneNameMap[teri] + "\"," + std::to_string( teri ) + "\n" - ); - out.write( outStr.c_str(), outStr.size() ); - //zoneInstanceMap[zoneId].push_back( std::make_pair( id, name ) ); - zoneDumpList.emplace( zoneNameMap[teri] ); - } - out.close(); + auto name = *boost::get< std::string >( &fields.at( 3 ) ); + if( name.empty() ) + continue; + auto teri = *boost::get< uint32_t >( &fields.at( 9 ) ); + auto i = 0; + while( ( i = name.find( ' ' ) ) != std::string::npos ) + name = name.replace( name.begin() + i, name.begin() + i + 1, { '_' } ); + std::string outStr( + std::to_string( id ) + ", \"" + name + "\", \"" + zoneNameMap[ teri ] + "\"," + std::to_string( teri ) + "\n" + ); + out.write( outStr.c_str(), outStr.size() ); + //zoneInstanceMap[zoneId].push_back( std::make_pair( id, name ) ); + zoneDumpList.emplace( zoneNameMap[ teri ] ); + } + out.close(); } void readFileToBuffer( const std::string& path, std::vector< char >& buf ) { - auto inFile = std::ifstream( path, std::ios::binary ); - if( inFile.good() ) - { - inFile.seekg( 0, inFile.end ); - int32_t fileSize = (int32_t)inFile.tellg(); - buf.resize( fileSize ); - inFile.seekg( 0, inFile.beg ); - inFile.read( &buf[0], fileSize ); - inFile.close(); - } - else - { - throw std::runtime_error( "Unable to open " + path ); - } + auto inFile = std::ifstream( path, std::ios::binary ); + if( inFile.good() ) + { + inFile.seekg( 0, inFile.end ); + int32_t fileSize = ( int32_t ) inFile.tellg(); + buf.resize( fileSize ); + inFile.seekg( 0, inFile.beg ); + inFile.read( &buf[ 0 ], fileSize ); + inFile.close(); + } + else + { + throw std::runtime_error( "Unable to open " + path ); + } } int main( int argc, char* argv[] ) { - auto startTime = std::chrono::system_clock::now(); - auto entryStartTime = std::chrono::system_clock::now(); + auto startTime = std::chrono::system_clock::now(); + auto entryStartTime = std::chrono::system_clock::now(); - std::vector< std::string > argVec( argv + 1, argv + argc ); - // todo: support expansions - std::string zoneName = "r2t2"; - bool dumpInstances = ignoreModels = std::remove_if( argVec.begin(), argVec.end(), []( auto arg ){ return arg == "--instance-dump"; } ) != argVec.end(); + std::vector< std::string > argVec( argv + 1, argv + argc ); + // todo: support expansions + std::string zoneName = "r2t2"; + bool dumpInstances = ignoreModels = std::remove_if( argVec.begin(), argVec.end(), []( auto arg ) + { return arg == "--instance-dump"; } ) != argVec.end(); - if( argc > 1 ) - { - zoneName = argv[1]; - if( argc > 2 ) - { - std::string tmpPath( argv[2] ); - if( !tmpPath.empty() ) - gamePath = argv[2]; - } - } + if( argc > 1 ) + { + zoneName = argv[ 1 ]; + if( argc > 2 ) + { + std::string tmpPath( argv[ 2 ] ); + if( !tmpPath.empty() ) + gamePath = argv[ 2 ]; + } + } - initExd( gamePath ); - if( dumpInstances ) - { - loadAllInstanceContentEntries(); - } - else - { - zoneDumpList.emplace( zoneName ); - } + initExd( gamePath ); + if( dumpInstances ) + { + loadAllInstanceContentEntries(); + } + else + { + zoneDumpList.emplace( zoneName ); + } -LABEL_DUMP: - entryStartTime = std::chrono::system_clock::now(); - zoneName = *zoneDumpList.begin(); - try - { - const auto& zonePath = zoneNameToPath( zoneName ); + LABEL_DUMP: + entryStartTime = std::chrono::system_clock::now(); + zoneName = *zoneDumpList.begin(); + try + { + const auto& zonePath = zoneNameToPath( zoneName ); - std::string listPcbPath( zonePath + "/collision/list.pcb" ); - std::string bgLgbPath( zonePath + "/level/bg.lgb" ); - std::string planmapLgbPath( zonePath + "/level/planmap.lgb" ); - std::string collisionFilePath( zonePath + "/collision/" ); - std::vector< char > section; - std::vector< char > section1; - std::vector< char > section2; + std::string listPcbPath( zonePath + "/collision/list.pcb" ); + std::string bgLgbPath( zonePath + "/level/bg.lgb" ); + std::string planmapLgbPath( zonePath + "/level/planmap.lgb" ); + std::string collisionFilePath( zonePath + "/collision/" ); + std::vector< char > section; + std::vector< char > section1; + std::vector< char > section2; #ifndef STANDALONE - const xiv::dat::Cat& test = data1->getCategory( "bg" ); + const xiv::dat::Cat& test = data1->getCategory( "bg" ); - auto test_file = data1->getFile( bgLgbPath ); - section = test_file->access_data_sections().at( 0 ); + auto test_file = data1->getFile( bgLgbPath ); + section = test_file->access_data_sections().at( 0 ); - auto planmap_file = data1->getFile( planmapLgbPath ); - section2 = planmap_file->access_data_sections().at( 0 ); + auto planmap_file = data1->getFile( planmapLgbPath ); + section2 = planmap_file->access_data_sections().at( 0 ); - auto test_file1 = data1->getFile( listPcbPath ); - section1 = test_file1->access_data_sections().at( 0 ); + auto test_file1 = data1->getFile( listPcbPath ); + section1 = test_file1->access_data_sections().at( 0 ); #else - { - readFileToBuffer( bgLgbPath, section ); - readFileToBuffer( listPcbPath, section1 ); - } + { + readFileToBuffer( bgLgbPath, section ); + readFileToBuffer( listPcbPath, section1 ); + } #endif - std::vector< std::string > stringList; + std::vector< std::string > stringList; - uint32_t offset1 = 0x20; + uint32_t offset1 = 0x20; - loadEobjNames(); - dumpLevelExdEntries( zoneId, zoneName ); - std::string eobjFileName( zoneName + "_eobj.csv" ); - std::ofstream eobjOut( eobjFileName, std::ios::trunc ); - if( !eobjOut.good() ) - throw std::string( "Unable to create " + zoneName + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); + loadEobjNames(); + dumpLevelExdEntries( zoneId, zoneName ); + std::string eobjFileName( zoneName + "_eobj.csv" ); + std::ofstream eobjOut( eobjFileName, std::ios::trunc ); + if( !eobjOut.good() ) + throw std::string( "Unable to create " + zoneName + + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); - eobjOut.close(); - eobjOut.open( eobjFileName, std::ios::app ); + eobjOut.close(); + eobjOut.open( eobjFileName, std::ios::app ); - if( !eobjOut.good() ) - throw std::string( "Unable to create " + zoneName + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); + if( !eobjOut.good() ) + throw std::string( "Unable to create " + zoneName + + "_eobj.csv for eobj entries. Run as admin or check there isnt already a handle on the file." ).c_str(); + + if( !ignoreModels ) + { + for( ;; ) + { + + uint16_t trId = *( uint16_t* ) §ion1[ offset1 ]; + + char someString[200]; + sprintf( someString, "%str%04d.pcb", collisionFilePath.c_str(), trId ); + stringList.push_back( std::string( someString ) ); + //std::cout << someString << "\n"; + offset1 += 0x20; + + if( offset1 >= section1.size() ) + { + break; + } + } + } + LGB_FILE bgLgb( §ion[ 0 ], "bg" ); + LGB_FILE planmapLgb( §ion2[ 0 ], "planmap" ); + + std::vector< LGB_FILE > lgbList{ bgLgb, planmapLgb }; + uint32_t max_index = 0; + + // dont bother if we cant write to a file + auto fp_out = ignoreModels ? ( FILE* ) nullptr : fopen( ( zoneName + ".obj" ).c_str(), "w" ); + if( fp_out ) + { + fprintf( fp_out, "\n" ); + fclose( fp_out ); + } + else if( !ignoreModels ) + { + std::string errorMessage( "Cannot create " + zoneName + ".obj\n" + + " Check no programs have a handle to file and run as admin.\n" ); + std::cout << errorMessage; + throw std::runtime_error( errorMessage.c_str() ); + return 0; + } + + if( ignoreModels || ( fp_out = fopen( ( zoneName + ".obj" ).c_str(), "ab+" ) ) ) + { + std::map< std::string, PCB_FILE > pcbFiles; + std::map< std::string, SGB_FILE > sgbFiles; + std::map< std::string, uint32_t > objCount; + auto loadPcbFile = [ & ]( const std::string& fileName )->bool + { + if( ignoreModels ) + return false; + try + { + if( fileName.find( '.' ) == std::string::npos ) + return false; + else if( fileName.substr( fileName.find_last_of( '.' ) ) != ".pcb" ) + throw std::runtime_error( "Not a PCB file." ); + + char* dataSection = nullptr; + //std::cout << fileName << " "; +#ifndef STANDALONE + auto file = data1->getFile( fileName ); + auto sections = file->get_data_sections(); + dataSection = §ions.at( 0 )[ 0 ]; +#else + std::vector< char > buf; + readFileToBuffer( fileName, buf ); + dataSection = &buf[0]; +#endif + //std::cout << sections.size() << "\n"; + + uint32_t offset = 0; + PCB_FILE pcb_file; + memcpy( &pcb_file.header, &dataSection[ 0 ], sizeof( pcb_file.header ) ); + offset += sizeof( pcb_file.header ); + pcb_file.entries.resize( pcb_file.header.num_entries ); + bool isgroup = true; + while( isgroup ) + { + PCB_BLOCK_ENTRY block_entry; + memcpy( &block_entry.header, &dataSection[ 0 ] + offset, sizeof( block_entry.header ) ); + isgroup = block_entry.header.type == 0x30; + + //printf( "BLOCKHEADER_%X: type: %i, group_size: %i\n", offset, block_entry.header.type, block_entry.header.group_size ); + // + if( isgroup ) + { + parseBlockEntry( &dataSection[ 0 ] + offset + 0x30, pcb_file.entries, offset ); + offset += block_entry.header.group_size; + } + else + { + parseBlockEntry( &dataSection[ 0 ] + offset, pcb_file.entries, offset ); + } + } + pcbFiles.insert( std::make_pair( fileName, pcb_file ) ); + return true; + } + catch( std::exception& e ) + { + std::cout << "[Error] " << "Unable to load collision mesh " << fileName << "\n\tError:\n\t" << e.what() + << "\n"; + return false; + } + }; + + auto loadSgbFile = [ & ]( const std::string& fileName )->bool + { + SGB_FILE sgbFile; + try + { + char* dataSection = nullptr; + //std::cout << fileName << " "; +#ifndef STANDALONE + auto file = data1->getFile( fileName ); + auto sections = file->get_data_sections(); + dataSection = §ions.at( 0 )[ 0 ]; +#else + std::vector< char > buf; + readFileToBuffer( fileName, buf ); + dataSection = &buf[0]; +#endif + sgbFile = SGB_FILE( &dataSection[ 0 ] ); + sgbFiles.insert( std::make_pair( fileName, sgbFile ) ); + return true; + } + catch( std::exception& e ) + { + std::cout << "[Error] " << "Unable to load SGB " << fileName << "\n\tError:\n\t" << e.what() << "\n"; + sgbFiles.insert( std::make_pair( fileName, sgbFile ) ); + } + return false; + }; + auto pushVerts = [ & ]( const PCB_FILE& pcb_file, const std::string& name, + const vec3* scale = nullptr, + const vec3* rotation = nullptr, + const vec3* translation = nullptr, + const SGB_MODEL_ENTRY* pSgbEntry = nullptr ) + { + if( ignoreModels ) + return; + char name2[0x100]; + memset( name2, 0, 0x100 ); + sprintf( &name2[ 0 ], "%s_%u", &name[ 0 ], objCount[ name ]++ ); + fprintf( fp_out, "o %s\n", &name2[ 0 ] ); + + uint32_t groupCount = 0; + for( const auto& entry : pcb_file.entries ) + { + float x_base = abs( float( entry.header.x1 - entry.header.x ) ); + float y_base = abs( float( entry.header.y1 - entry.header.y ) ); + float z_base = abs( float( entry.header.z1 - entry.header.z ) ); + + auto makeTranslation = [ & ]( vec3& v ) + { + if( pSgbEntry ) + { + v.x *= pSgbEntry->header.scale.x; + v.y *= pSgbEntry->header.scale.y; + v.z *= pSgbEntry->header.scale.z; + + v = v * matrix4::rotateX( pSgbEntry->header.rotation.x ); + v = v * matrix4::rotateY( pSgbEntry->header.rotation.y ); + v = v * matrix4::rotateZ( pSgbEntry->header.rotation.z ); + + v.x += pSgbEntry->header.translation.x; + v.y += pSgbEntry->header.translation.y; + v.z += pSgbEntry->header.translation.z; + } + if( scale ) + { + v.x *= scale->x; + v.y *= scale->y; + v.z *= scale->z; + + v = v * matrix4::rotateX( rotation->x ); + v = v * matrix4::rotateY( rotation->y ); + v = v * matrix4::rotateZ( rotation->z ); + + v.x += translation->x; + v.y += translation->y; + v.z += translation->z; + } + + }; + + for( auto& vertex : entry.data.vertices ) + { + vec3 v( vertex.x, vertex.y, vertex.z ); + makeTranslation( v ); + fprintf( fp_out, "v %f %f %f\n", v.x, v.y, v.z ); + } + + for( const auto& link : entry.data.vertices_i16 ) + { + vec3 v( float( link.x ) / 0xFFFF, float( link.y ) / 0xFFFF, float( link.z ) / 0xFFFF ); + + v.x = v.x * x_base + entry.header.x; + v.y = v.y * y_base + entry.header.y; + v.z = v.z * z_base + entry.header.z; + + makeTranslation( v ); + fprintf( fp_out, "v %f %f %f\n", v.x, v.y, v.z ); + } + + //fprintf( fp_out, "g %s_", (name2 + "_" + std::to_string( groupCount++ )).c_str() ); + for( const auto& index : entry.data.indices ) + { + fprintf( fp_out, "f %i %i %i\n", + index.index[ 0 ] + max_index + 1, + index.index[ 1 ] + max_index + 1, + index.index[ 2 ] + max_index + 1 ); + // std::cout << std::to_string( index.unknown[0] )<< " " << std::to_string( index.unknown[1] )<< " " << std::to_string( index.unknown[2]) << std::endl; + } + max_index += entry.data.vertices.size() + entry.data.vertices_i16.size(); + } + }; if( !ignoreModels ) { - for( ; ; ) - { - - uint16_t trId = *(uint16_t*)§ion1[offset1]; - - char someString[200]; - sprintf( someString, "%str%04d.pcb", collisionFilePath.c_str(), trId ); - stringList.push_back( std::string( someString ) ); - //std::cout << someString << "\n"; - offset1 += 0x20; - - if( offset1 >= section1.size() ) - { - break; - } - } + for( const auto& fileName : stringList ) + { + loadPcbFile( fileName ); + pushVerts( pcbFiles[ fileName ], fileName ); + } } - LGB_FILE bgLgb( §ion[0], "bg" ); - LGB_FILE planmapLgb( §ion2[0], "planmap" ); - std::vector< LGB_FILE > lgbList { bgLgb, planmapLgb }; - uint32_t max_index = 0; + std::cout << "[Info] " << ( ignoreModels ? "Dumping MapRange and EObj" : "Writing obj file " ) << "\n"; + uint32_t totalGroups = 0; + uint32_t totalGroupEntries = 0; - // dont bother if we cant write to a file - auto fp_out = ignoreModels ? ( FILE* )nullptr : fopen( ( zoneName + ".obj" ).c_str(), "w" ); - if( fp_out ) + for( const auto& lgb : lgbList ) { - fprintf( fp_out, "\n" ); - fclose( fp_out ); - } - else if( !ignoreModels ) - { - std::string errorMessage( "Cannot create " + zoneName + ".obj\n" + - " Check no programs have a handle to file and run as admin.\n" ); - std::cout << errorMessage; - throw std::runtime_error( errorMessage.c_str() ); - return 0; + for( const auto& group : lgb.groups ) + { + //std::cout << "\t" << group.name << " Size " << group.header.entryCount << "\n"; + totalGroups++; + for( const auto& pEntry : group.entries ) + { + auto pGimmick = dynamic_cast< LGB_GIMMICK_ENTRY* >( pEntry.get() ); + auto pBgParts = dynamic_cast< LGB_BGPARTS_ENTRY* >( pEntry.get() ); + + std::string fileName( "" ); + fileName.resize( 256 ); + totalGroupEntries++; + + // write files + auto writeOutput = [ & ]( const std::string& fileName, const vec3* scale, const vec3* rotation, + const vec3* translation, const SGB_MODEL_ENTRY* pModel = nullptr )->bool + { + { + const auto& it = pcbFiles.find( fileName ); + if( it == pcbFiles.end() ) + { + if( fileName.empty() || !loadPcbFile( fileName ) ) + return false; + //std::cout << "\t\tLoaded PCB File " << pBgParts->collisionFileName << "\n"; + } + } + const auto& it = pcbFiles.find( fileName ); + if( it != pcbFiles.end() ) + { + const auto& pcb_file = it->second; + pushVerts( pcb_file, fileName, scale, rotation, translation, pModel ); + } + return true; + }; + + if( pBgParts ) + { + fileName = pBgParts->collisionFileName; + writeOutput( fileName, &pBgParts->header.scale, &pBgParts->header.rotation, + &pBgParts->header.translation ); + } + + // gimmick entry + if( pGimmick ) + { + { + const auto& it = sgbFiles.find( pGimmick->gimmickFileName ); + if( it == sgbFiles.end() ) + { + // std::cout << "\tGIMMICK:\n\t\t" << pGimmick->gimmickFileName << "\n"; + loadSgbFile( pGimmick->gimmickFileName ); + } + } + const auto& it = sgbFiles.find( pGimmick->gimmickFileName ); + if( it != sgbFiles.end() ) + { + const auto& sgbFile = it->second; + for( const auto& group : sgbFile.entries ) + { + for( const auto& pEntry : group.entries ) + { + auto pModel = dynamic_cast< SGB_MODEL_ENTRY* >( pEntry.get() ); + fileName = pModel->collisionFileName; + writeOutput( fileName, &pGimmick->header.scale, &pGimmick->header.rotation, + &pGimmick->header.translation, pModel ); + } + } + } + } + + if( pEntry->getType() == LgbEntryType::EventObject || pEntry->getType() == LgbEntryType::MapRange ) + { + writeEobjEntry( eobjOut, pEntry.get() ); + writeOutput( fileName, &pEntry->header.scale, &pEntry->header.rotation, &pEntry->header.translation ); + } + } + } } + std::cout << "[Info] " << "Loaded " << pcbFiles.size() << " PCB Files \n"; + std::cout << "[Info] " << "Total Groups " << totalGroups << " Total entries " << totalGroupEntries << "\n"; + } + std::cout << "[Success] " << "Exported " << zoneName << " in " << + std::chrono::duration_cast< std::chrono::seconds >( + std::chrono::system_clock::now() - entryStartTime ).count() << " seconds\n"; + } + catch( std::exception& e ) + { + std::cout << "[Error] " << e.what() << std::endl; + std::cout << "[Error] " + << "Unable to extract collision data.\n\tIf using standalone ensure your working directory folder layout is \n\tbg/[ffxiv|ex1|ex2]/teri/type/zone/[level|collision]" + << std::endl; + std::cout << std::endl; + std::cout << "[Info] " << "Usage: pcb_reader2 territory \"path/to/game/sqpack/ffxiv\" " << std::endl; + } + std::cout << "\n\n\n"; + LABEL_NEXT_ZONE_ENTRY: + zoneDumpList.erase( zoneName ); + if( !zoneDumpList.empty() ) + goto LABEL_DUMP; - if( ignoreModels || ( fp_out = fopen( ( zoneName + ".obj" ).c_str(), "ab+" ) ) ) - { - std::map< std::string, PCB_FILE > pcbFiles; - std::map< std::string, SGB_FILE > sgbFiles; - std::map< std::string, uint32_t > objCount; - auto loadPcbFile = [&]( const std::string& fileName ) -> bool - { - if( ignoreModels ) - return false; - try - { - if( fileName.find( '.' ) == std::string::npos ) - return false; - else if( fileName.substr( fileName.find_last_of( '.' ) ) != ".pcb" ) - throw std::runtime_error( "Not a PCB file." ); + std::cout << "\n\n\n[Success] Finished all tasks in " << + std::chrono::duration_cast< std::chrono::seconds >( std::chrono::system_clock::now() - startTime ).count() + << " seconds\n"; - char* dataSection = nullptr; - //std::cout << fileName << " "; -#ifndef STANDALONE - auto file = data1->getFile( fileName ); - auto sections = file->get_data_sections(); - dataSection = §ions.at( 0 )[0]; -#else - std::vector< char > buf; - readFileToBuffer( fileName, buf ); - dataSection = &buf[0]; -#endif - //std::cout << sections.size() << "\n"; + getchar(); - uint32_t offset = 0; - PCB_FILE pcb_file; - memcpy( &pcb_file.header, &dataSection[0], sizeof( pcb_file.header ) ); - offset += sizeof( pcb_file.header ); - pcb_file.entries.resize( pcb_file.header.num_entries ); - bool isgroup = true; - while( isgroup ) - { - PCB_BLOCK_ENTRY block_entry; - memcpy( &block_entry.header, &dataSection[0] + offset, sizeof( block_entry.header ) ); - isgroup = block_entry.header.type == 0x30; - - //printf( "BLOCKHEADER_%X: type: %i, group_size: %i\n", offset, block_entry.header.type, block_entry.header.group_size ); - // - if( isgroup ) - { - parseBlockEntry( &dataSection[0] + offset + 0x30, pcb_file.entries, offset ); - offset += block_entry.header.group_size; - } - else - { - parseBlockEntry( &dataSection[0] + offset, pcb_file.entries, offset ); - } - } - pcbFiles.insert( std::make_pair( fileName, pcb_file ) ); - return true; - } - catch( std::exception& e ) - { - std::cout << "[Error] " << "Unable to load collision mesh " << fileName << "\n\tError:\n\t" << e.what() << "\n"; - return false; - } - }; - - auto loadSgbFile = [&]( const std::string& fileName ) -> bool - { - SGB_FILE sgbFile; - try - { - char* dataSection = nullptr; - //std::cout << fileName << " "; -#ifndef STANDALONE - auto file = data1->getFile( fileName ); - auto sections = file->get_data_sections(); - dataSection = §ions.at( 0 )[0]; -#else - std::vector< char > buf; - readFileToBuffer( fileName, buf ); - dataSection = &buf[0]; -#endif - sgbFile = SGB_FILE( &dataSection[0] ); - sgbFiles.insert( std::make_pair( fileName, sgbFile ) ); - return true; - } - catch( std::exception& e ) - { - std::cout << "[Error] " << "Unable to load SGB " << fileName << "\n\tError:\n\t" << e.what() << "\n"; - sgbFiles.insert( std::make_pair( fileName, sgbFile ) ); - } - return false; - }; - auto pushVerts = [&]( const PCB_FILE& pcb_file, const std::string& name, - const vec3* scale = nullptr, - const vec3* rotation = nullptr, - const vec3* translation = nullptr, - const SGB_MODEL_ENTRY* pSgbEntry = nullptr) - { - if( ignoreModels ) - return; - char name2[0x100]; - memset( name2, 0, 0x100 ); - sprintf( &name2[0], "%s_%u", &name[0], objCount[name]++ ); - fprintf( fp_out, "o %s\n", &name2[0] ); - - uint32_t groupCount = 0; - for( const auto &entry : pcb_file.entries ) - { - float x_base = abs( float( entry.header.x1 - entry.header.x ) ); - float y_base = abs( float( entry.header.y1 - entry.header.y ) ); - float z_base = abs( float( entry.header.z1 - entry.header.z ) ); - - auto makeTranslation = [&]( vec3& v ) - { - if( pSgbEntry ) - { - v.x *= pSgbEntry->header.scale.x; - v.y *= pSgbEntry->header.scale.y; - v.z *= pSgbEntry->header.scale.z; - - v = v * matrix4::rotateX( pSgbEntry->header.rotation.x ); - v = v * matrix4::rotateY( pSgbEntry->header.rotation.y ); - v = v * matrix4::rotateZ( pSgbEntry->header.rotation.z ); - - v.x += pSgbEntry->header.translation.x; - v.y += pSgbEntry->header.translation.y; - v.z += pSgbEntry->header.translation.z; - } - if( scale ) - { - v.x *= scale->x; - v.y *= scale->y; - v.z *= scale->z; - - v = v * matrix4::rotateX( rotation->x ); - v = v * matrix4::rotateY( rotation->y ); - v = v * matrix4::rotateZ( rotation->z ); - - v.x += translation->x; - v.y += translation->y; - v.z += translation->z; - } - - }; - - for( auto &vertex : entry.data.vertices ) - { - vec3 v( vertex.x, vertex.y, vertex.z ); - makeTranslation( v ); - fprintf( fp_out, "v %f %f %f\n", v.x, v.y, v.z ); - } - - for( const auto &link : entry.data.vertices_i16 ) - { - vec3 v( float( link.x ) / 0xFFFF, float( link.y ) / 0xFFFF, float( link.z ) / 0xFFFF ); - - v.x = v.x * x_base + entry.header.x; - v.y = v.y * y_base + entry.header.y; - v.z = v.z * z_base + entry.header.z; - - makeTranslation( v ); - fprintf( fp_out, "v %f %f %f\n", v.x, v.y, v.z ); - } - - //fprintf( fp_out, "g %s_", (name2 + "_" + std::to_string( groupCount++ )).c_str() ); - for( const auto &index : entry.data.indices ) - { - fprintf( fp_out, "f %i %i %i\n", - index.index[0] + max_index + 1, - index.index[1] + max_index + 1, - index.index[2] + max_index + 1 ); - // std::cout << std::to_string( index.unknown[0] )<< " " << std::to_string( index.unknown[1] )<< " " << std::to_string( index.unknown[2]) << std::endl; - } - max_index += entry.data.vertices.size() + entry.data.vertices_i16.size(); - } - }; - - if( !ignoreModels ) - { - for( const auto& fileName : stringList ) - { - loadPcbFile( fileName ); - pushVerts( pcbFiles[fileName], fileName ); - } - } - - std::cout << "[Info] " << ( ignoreModels ? "Dumping MapRange and EObj" : "Writing obj file " ) << "\n"; - uint32_t totalGroups = 0; - uint32_t totalGroupEntries = 0; - - for( const auto& lgb : lgbList ) - { - for( const auto& group : lgb.groups ) - { - //std::cout << "\t" << group.name << " Size " << group.header.entryCount << "\n"; - totalGroups++; - for( const auto& pEntry : group.entries ) - { - auto pGimmick = dynamic_cast< LGB_GIMMICK_ENTRY* >( pEntry.get() ); - auto pBgParts = dynamic_cast< LGB_BGPARTS_ENTRY* >( pEntry.get() ); - - std::string fileName( "" ); - fileName.resize( 256 ); - totalGroupEntries++; - - // write files - auto writeOutput = [&]( const std::string& fileName, const vec3* scale, const vec3* rotation, const vec3* translation, const SGB_MODEL_ENTRY* pModel = nullptr) -> bool - { - { - const auto& it = pcbFiles.find( fileName ); - if( it == pcbFiles.end() ) - { - if( fileName.empty() || !loadPcbFile( fileName ) ) - return false; - //std::cout << "\t\tLoaded PCB File " << pBgParts->collisionFileName << "\n"; - } - } - const auto& it = pcbFiles.find( fileName ); - if( it != pcbFiles.end() ) - { - const auto& pcb_file = it->second; - pushVerts( pcb_file, fileName, scale, rotation, translation, pModel ); - } - return true; - }; - - if( pBgParts ) - { - fileName = pBgParts->collisionFileName; - writeOutput( fileName, &pBgParts->header.scale, &pBgParts->header.rotation, &pBgParts->header.translation ); - } - - // gimmick entry - if( pGimmick ) - { - { - const auto& it = sgbFiles.find( pGimmick->gimmickFileName ); - if( it == sgbFiles.end() ) - { - // std::cout << "\tGIMMICK:\n\t\t" << pGimmick->gimmickFileName << "\n"; - loadSgbFile( pGimmick->gimmickFileName ); - } - } - const auto& it = sgbFiles.find( pGimmick->gimmickFileName ); - if( it != sgbFiles.end() ) - { - const auto& sgbFile = it->second; - for( const auto& group : sgbFile.entries ) - { - for( const auto& pEntry : group.entries ) - { - auto pModel = dynamic_cast< SGB_MODEL_ENTRY* >( pEntry.get() ); - fileName = pModel->collisionFileName; - writeOutput( fileName, &pGimmick->header.scale, &pGimmick->header.rotation, &pGimmick->header.translation, pModel ); - } - } - } - } - - if( pEntry->getType() == LgbEntryType::EventObject || pEntry->getType() == LgbEntryType::MapRange ) - { - writeEobjEntry( eobjOut, pEntry.get() ); - writeOutput( fileName, &pEntry->header.scale, &pEntry->header.rotation, &pEntry->header.translation ); - } - } - } - } - std::cout << "[Info] " << "Loaded " << pcbFiles.size() << " PCB Files \n"; - std::cout << "[Info] " << "Total Groups " << totalGroups << " Total entries " << totalGroupEntries << "\n"; - } - std::cout << "[Success] " << "Exported " << zoneName << " in " << - std::chrono::duration_cast< std::chrono::seconds >( std::chrono::system_clock::now() - entryStartTime ).count() << " seconds\n"; - } - catch( std::exception& e ) - { - std::cout << "[Error] " << e.what() << std::endl; - std::cout << "[Error] " << "Unable to extract collision data.\n\tIf using standalone ensure your working directory folder layout is \n\tbg/[ffxiv|ex1|ex2]/teri/type/zone/[level|collision]" << std::endl; - std::cout << std::endl; - std::cout << "[Info] " << "Usage: pcb_reader2 territory \"path/to/game/sqpack/ffxiv\" " << std::endl; - } - std::cout << "\n\n\n"; - LABEL_NEXT_ZONE_ENTRY: - zoneDumpList.erase( zoneName ); - if( !zoneDumpList.empty() ) - goto LABEL_DUMP; - - std::cout << "\n\n\n[Success] Finished all tasks in " << - std::chrono::duration_cast< std::chrono::seconds >( std::chrono::system_clock::now() - startTime ).count() << " seconds\n"; - - getchar(); - - if( eData ) - delete eData; - if( data1 ) - delete data1; - return 0; + if( eData ) + delete eData; + if( data1 ) + delete data1; + return 0; } diff --git a/src/tools/pcb_reader/matrix4.h b/src/tools/pcb_reader/matrix4.h index d02d2c84..fdcee84c 100644 --- a/src/tools/pcb_reader/matrix4.h +++ b/src/tools/pcb_reader/matrix4.h @@ -7,94 +7,105 @@ // https://github.com/jpd002/Play--Framework/tree/master/include/math struct matrix4 { - // 4x4 - float grid[16]; - matrix4() - { - memset( &grid[0], 0, sizeof( grid ) ); - } + // 4x4 + float grid[16]; - float operator()( int row, int col ) const - { - return grid[(row * 4) + col]; - } + matrix4() + { + memset( &grid[ 0 ], 0, sizeof( grid ) ); + } - float& operator()( int row, int col ) - { - return grid[(row * 4) + col]; - } - static matrix4 rotateX( float angle ) - { - matrix4 ret = matrix4(); - ret(0, 0) = 1.000000000f; - ret(1, 1) = cos(angle); - ret(1, 2) = -sin(angle); - ret(2, 1) = sin(angle); - ret(2, 2) = cos(angle); - ret(3, 3) = 1.000000000f; - return ret; - } + float operator()( int row, int col ) const + { + return grid[ ( row * 4 ) + col ]; + } - static matrix4 rotateY( float angle ) - { - matrix4 ret = matrix4(); - ret(0, 0) = cos(angle); - ret(0, 2) = sin(angle); - ret(1, 1) = 1.000000000f; - ret(2, 0) = -sin(angle); - ret(2, 2) = cos(angle); - ret(3, 3) = 1.000000000f; - return ret; - } + float& operator()( int row, int col ) + { + return grid[ ( row * 4 ) + col ]; + } - static matrix4 rotateZ( float angle ) - { - matrix4 ret = matrix4(); - ret(0, 0) = cos(angle); - ret(0, 1) = -sin(angle); - ret(1, 0) = sin(angle); - ret(1, 1) = cos(angle); - ret(2, 2) = 1.000000000f; - ret(3, 3) = 1.000000000f; - return ret; - } + static matrix4 rotateX( float angle ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = 1.000000000f; + ret( 1, 1 ) = cos( angle ); + ret( 1, 2 ) = -sin( angle ); + ret( 2, 1 ) = sin( angle ); + ret( 2, 2 ) = cos( angle ); + ret( 3, 3 ) = 1.000000000f; + return ret; + } - static matrix4 scale( float x, float y, float z ) - { - matrix4 ret = matrix4(); - ret(0, 0) = x; - ret(1, 1) = y; - ret(2, 2) = z; - ret(3, 3) = 1; + static matrix4 rotateY( float angle ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = cos( angle ); + ret( 0, 2 ) = sin( angle ); + ret( 1, 1 ) = 1.000000000f; + ret( 2, 0 ) = -sin( angle ); + ret( 2, 2 ) = cos( angle ); + ret( 3, 3 ) = 1.000000000f; + return ret; + } - return ret; - } + static matrix4 rotateZ( float angle ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = cos( angle ); + ret( 0, 1 ) = -sin( angle ); + ret( 1, 0 ) = sin( angle ); + ret( 1, 1 ) = cos( angle ); + ret( 2, 2 ) = 1.000000000f; + ret( 3, 3 ) = 1.000000000f; + return ret; + } - static matrix4 translate( float x, float y, float z ) - { - matrix4 ret = matrix4(); - ret(0, 0) = 1; - ret(1, 1) = 1; - ret(2, 2) = 1; - ret(3, 3) = 1; + static matrix4 scale( float x, float y, float z ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = x; + ret( 1, 1 ) = y; + ret( 2, 2 ) = z; + ret( 3, 3 ) = 1; - ret(3, 0) = x; - ret(3, 1) = y; - ret(3, 2) = z; - return ret; - } + return ret; + } - matrix4 operator *( const matrix4& rhs ) const - { - matrix4 ret; - for( unsigned int i = 0; i < 4; i++ ) - { - ret( i, 0 ) = (*this)(i, 0) * rhs( 0, 0 ) + (*this)(i, 1) * rhs( 1, 0 ) + (*this)(i, 2) * rhs( 2, 0 ) + (*this)(i, 3) * rhs( 3, 0 ); - ret( i, 1 ) = (*this)(i, 0) * rhs( 0, 1 ) + (*this)(i, 1) * rhs( 1, 1 ) + (*this)(i, 2) * rhs( 2, 1 ) + (*this)(i, 3) * rhs( 3, 1 ); - ret( i, 2 ) = (*this)(i, 0) * rhs( 0, 2 ) + (*this)(i, 1) * rhs( 1, 2 ) + (*this)(i, 2) * rhs( 2, 2 ) + (*this)(i, 3) * rhs( 3, 2 ); - ret( i, 3 ) = (*this)(i, 0) * rhs( 0, 3 ) + (*this)(i, 1) * rhs( 1, 3 ) + (*this)(i, 2) * rhs( 2, 3 ) + (*this)(i, 3) * rhs( 3, 3 ); - } - return ret; - } + static matrix4 translate( float x, float y, float z ) + { + matrix4 ret = matrix4(); + ret( 0, 0 ) = 1; + ret( 1, 1 ) = 1; + ret( 2, 2 ) = 1; + ret( 3, 3 ) = 1; + + ret( 3, 0 ) = x; + ret( 3, 1 ) = y; + ret( 3, 2 ) = z; + return ret; + } + + matrix4 operator*( const matrix4& rhs ) const + { + matrix4 ret; + for( unsigned int i = 0; i < 4; i++ ) + { + ret( i, 0 ) = + ( *this )( i, 0 ) * rhs( 0, 0 ) + ( *this )( i, 1 ) * rhs( 1, 0 ) + ( *this )( i, 2 ) * rhs( 2, 0 ) + + ( *this )( i, 3 ) * rhs( 3, 0 ); + ret( i, 1 ) = + ( *this )( i, 0 ) * rhs( 0, 1 ) + ( *this )( i, 1 ) * rhs( 1, 1 ) + ( *this )( i, 2 ) * rhs( 2, 1 ) + + ( *this )( i, 3 ) * rhs( 3, 1 ); + ret( i, 2 ) = + ( *this )( i, 0 ) * rhs( 0, 2 ) + ( *this )( i, 1 ) * rhs( 1, 2 ) + ( *this )( i, 2 ) * rhs( 2, 2 ) + + ( *this )( i, 3 ) * rhs( 3, 2 ); + ret( i, 3 ) = + ( *this )( i, 0 ) * rhs( 0, 3 ) + ( *this )( i, 1 ) * rhs( 1, 3 ) + ( *this )( i, 2 ) * rhs( 2, 3 ) + + ( *this )( i, 3 ) * rhs( 3, 3 ); + } + return ret; + } }; + #endif diff --git a/src/tools/pcb_reader/pcb.h b/src/tools/pcb_reader/pcb.h index 4b775d84..77a50d81 100644 --- a/src/tools/pcb_reader/pcb.h +++ b/src/tools/pcb_reader/pcb.h @@ -6,87 +6,87 @@ struct PCB_HEADER { - uint32_t unknown_1; - uint32_t unknown_2; - uint32_t num_entries; // count starts at 0 - uint32_t total_indices; - uint64_t padding; + uint32_t unknown_1; + uint32_t unknown_2; + uint32_t num_entries; // count starts at 0 + uint32_t total_indices; + uint64_t padding; }; struct PCB_BLOCK_HEADER { - uint32_t type; // 0 for entry, 0x30 for group - uint32_t group_size; // when group size in bytes for the group block - // bounding box - float x; - float y; - float z; - float x1; - float y1; - float z1; - // number of vertices packed into 16 bit - uint16_t num_v16; - // number of indices - uint16_t num_indices; - // number of normal floar vertices - uint32_t num_vertices; + uint32_t type; // 0 for entry, 0x30 for group + uint32_t group_size; // when group size in bytes for the group block + // bounding box + float x; + float y; + float z; + float x1; + float y1; + float z1; + // number of vertices packed into 16 bit + uint16_t num_v16; + // number of indices + uint16_t num_indices; + // number of normal floar vertices + uint32_t num_vertices; }; struct PCB_VERTEXDATA { - float x; - float y; - float z; + float x; + float y; + float z; }; struct PCB_INDEXDATA { - uint8_t index[3]; - uint8_t unknown[3]; - uint8_t unknown1[6]; + uint8_t index[3]; + uint8_t unknown[3]; + uint8_t unknown1[6]; }; struct PCB_VERTEXDATAI16 { - uint16_t x; - uint16_t y; - uint16_t z; + uint16_t x; + uint16_t y; + uint16_t z; }; struct PCB_BLOCK_DATA { - std::vector< PCB_VERTEXDATA > vertices; - std::vector< PCB_VERTEXDATAI16 > vertices_i16; - std::vector< PCB_INDEXDATA > indices; + std::vector< PCB_VERTEXDATA > vertices; + std::vector< PCB_VERTEXDATAI16 > vertices_i16; + std::vector< PCB_INDEXDATA > indices; }; struct PCB_BLOCK_ENTRY { - PCB_BLOCK_HEADER header; - PCB_BLOCK_DATA data; + PCB_BLOCK_HEADER header; + PCB_BLOCK_DATA data; }; struct PCB_FILE { - PCB_HEADER header; - std::vector< PCB_BLOCK_ENTRY > entries; + PCB_HEADER header; + std::vector< PCB_BLOCK_ENTRY > entries; }; struct PCB_LIST_ENTRY { - uint32_t id; - float x, y, z, x2, y2, z2, rot; + uint32_t id; + float x, y, z, x2, y2, z2, rot; }; struct PCB_LIST_BASE_ENTRY { - float x, y, z, x2, y2, z2, rot; + float x, y, z, x2, y2, z2, rot; }; struct PCB_LIST_FILE { - uint32_t count; - PCB_LIST_BASE_ENTRY entry; - std::vector entries; + uint32_t count; + PCB_LIST_BASE_ENTRY entry; + std::vector< PCB_LIST_ENTRY > entries; }; #endif \ No newline at end of file diff --git a/src/tools/pcb_reader/sgb.h b/src/tools/pcb_reader/sgb.h index 2aa675aa..cf03c12e 100644 --- a/src/tools/pcb_reader/sgb.h +++ b/src/tools/pcb_reader/sgb.h @@ -25,188 +25,197 @@ struct SGB_GROUP; struct SGB_GROUP_HEADER; -enum SgbDataType : uint32_t +enum SgbDataType : + uint32_t { - Unknown0008 = 0x0008, - Group = 0x0100, + Unknown0008 = 0x0008, + Group = 0x0100, }; -enum SgbGroupEntryType : uint32_t +enum SgbGroupEntryType : + uint32_t { - Model = 0x01, + Model = 0x01, }; struct SGB_GROUP_HEADER { - SgbDataType type; - int32_t nameOffset; - uint32_t unknown08; - uint32_t unknown0C; + SgbDataType type; + int32_t nameOffset; + uint32_t unknown08; + uint32_t unknown0C; - uint32_t unknown10; - uint32_t unknown14; - uint32_t unknown18; - uint32_t unknown1C; + uint32_t unknown10; + uint32_t unknown14; + uint32_t unknown18; + uint32_t unknown1C; - int32_t entryCount; - uint32_t unknown24; - uint32_t unknown28; - uint32_t unknown2C; + int32_t entryCount; + uint32_t unknown24; + uint32_t unknown28; + uint32_t unknown2C; - uint32_t unknown30; - uint32_t unknown34; - uint32_t unknown38; - uint32_t unknown3C; + uint32_t unknown30; + uint32_t unknown34; + uint32_t unknown38; + uint32_t unknown3C; - uint32_t unknown40; - uint32_t unknown44; + uint32_t unknown40; + uint32_t unknown44; }; struct SGB_GROUP_ENTRY { public: - char* m_buf; - uint32_t m_offset; + char* m_buf; + uint32_t m_offset; - SGB_GROUP_ENTRY() - { - m_buf = nullptr; - m_offset = 0; - }; - SGB_GROUP_ENTRY( char* buf, uint32_t offset ) - { - m_buf = buf; - m_offset = offset; - }; - virtual ~SGB_GROUP_ENTRY() {}; + SGB_GROUP_ENTRY() + { + m_buf = nullptr; + m_offset = 0; + }; + + SGB_GROUP_ENTRY( char* buf, uint32_t offset ) + { + m_buf = buf; + m_offset = offset; + }; + + virtual ~SGB_GROUP_ENTRY() + { + }; }; struct SGB_ENTRY_HEADER { - SgbGroupEntryType type; - uint32_t unknown2; - int32_t nameOffset; - vec3 translation; - vec3 rotation; - vec3 scale; + SgbGroupEntryType type; + uint32_t unknown2; + int32_t nameOffset; + vec3 translation; + vec3 rotation; + vec3 scale; }; -struct SGB_MODEL_HEADER : public SGB_ENTRY_HEADER +struct SGB_MODEL_HEADER : + public SGB_ENTRY_HEADER { - int32_t modelFileOffset; - int32_t collisionFileOffset; + int32_t modelFileOffset; + int32_t collisionFileOffset; }; -struct SGB_MODEL_ENTRY : public SGB_GROUP_ENTRY +struct SGB_MODEL_ENTRY : + public SGB_GROUP_ENTRY { - SGB_MODEL_HEADER header; - SgbGroupEntryType type; - std::string name; - std::string modelFileName; - std::string collisionFileName; + SGB_MODEL_HEADER header; + SgbGroupEntryType type; + std::string name; + std::string modelFileName; + std::string collisionFileName; - SGB_MODEL_ENTRY( char* buf, uint32_t offset ) - { - header = *reinterpret_cast< SGB_MODEL_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); - modelFileName = std::string( buf + offset + header.modelFileOffset ); - collisionFileName = std::string( buf + offset + header.collisionFileOffset ); - } + SGB_MODEL_ENTRY( char* buf, uint32_t offset ) + { + header = *reinterpret_cast< SGB_MODEL_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); + modelFileName = std::string( buf + offset + header.modelFileOffset ); + collisionFileName = std::string( buf + offset + header.collisionFileOffset ); + } }; struct SGB_GROUP { - SGB_GROUP_HEADER header; - std::string name; - SGB_FILE* parent; - std::vector< std::shared_ptr< SGB_GROUP_ENTRY > > entries; + SGB_GROUP_HEADER header; + std::string name; + SGB_FILE* parent; + std::vector< std::shared_ptr< SGB_GROUP_ENTRY > > entries; - SGB_GROUP( char* buf, SGB_FILE* file, uint32_t fileSize, uint32_t offset ) - { - parent = file; - header = *reinterpret_cast< SGB_GROUP_HEADER* >( buf + offset ); - name = std::string( buf + offset + header.nameOffset ); + SGB_GROUP( char* buf, SGB_FILE* file, uint32_t fileSize, uint32_t offset ) + { + parent = file; + header = *reinterpret_cast< SGB_GROUP_HEADER* >( buf + offset ); + name = std::string( buf + offset + header.nameOffset ); - auto entriesOffset = offset + sizeof( header ); + auto entriesOffset = offset + sizeof( header ); - for( auto i = 0; i < header.entryCount; ++i ) + for( auto i = 0; i < header.entryCount; ++i ) + { + auto entryOffset = entriesOffset + *reinterpret_cast< uint32_t* >( buf + ( entriesOffset + ( i * 4 ) ) ); + if( entryOffset > fileSize ) + throw std::runtime_error( "SGB_GROUP entry offset was larger than SGB file size!" ); + auto type = *reinterpret_cast< uint32_t* >( buf + entryOffset ); + if( type == SgbGroupEntryType::Model && !ignoreModels ) { - auto entryOffset = entriesOffset + *reinterpret_cast< uint32_t* >( buf + ( entriesOffset + ( i * 4 ) ) ); - if( entryOffset > fileSize ) - throw std::runtime_error( "SGB_GROUP entry offset was larger than SGB file size!" ); - auto type = *reinterpret_cast< uint32_t* >( buf + entryOffset ); - if( type == SgbGroupEntryType::Model && !ignoreModels ) - { - entries.push_back( std::make_shared< SGB_MODEL_ENTRY >( buf, entryOffset ) ); - } - else - { - // std::cout << "\t\tUnknown SGB entry! Group: " << name << " type: " << type << " index: " << i << " entryOffset: " << entryOffset << "\n"; - } + entries.push_back( std::make_shared< SGB_MODEL_ENTRY >( buf, entryOffset ) ); } - } + else + { + // std::cout << "\t\tUnknown SGB entry! Group: " << name << " type: " << type << " index: " << i << " entryOffset: " << entryOffset << "\n"; + } + } + } }; struct SGB_HEADER { - char magic[4]; // SGB1 - uint32_t fileSize; - uint32_t unknown1; - char magic2[4]; // SCN1 + char magic[4]; // SGB1 + uint32_t fileSize; + uint32_t unknown1; + char magic2[4]; // SCN1 - uint32_t unknown10; - int32_t sharedOffset; - uint32_t unknown18; - int32_t offset1C; + uint32_t unknown10; + int32_t sharedOffset; + uint32_t unknown18; + int32_t offset1C; - uint32_t unknown20; - uint32_t unknown24; - uint32_t unknown28; - uint32_t unknown2C; + uint32_t unknown20; + uint32_t unknown24; + uint32_t unknown28; + uint32_t unknown2C; - uint32_t unknown30; - uint32_t unknown34; - uint32_t unknown38; - uint32_t unknown3C; + uint32_t unknown30; + uint32_t unknown34; + uint32_t unknown38; + uint32_t unknown3C; - uint32_t unknown40; - uint32_t unknown44; - uint32_t unknown48; - uint32_t unknown4C; + uint32_t unknown40; + uint32_t unknown44; + uint32_t unknown48; + uint32_t unknown4C; - uint32_t unknown50; - uint32_t unknown54; + uint32_t unknown50; + uint32_t unknown54; }; struct SGB_FILE { - SGB_HEADER header; - std::vector entries; + SGB_HEADER header; + std::vector< SGB_GROUP > entries; - SGB_FILE() - { - memset( &header, 0, sizeof( header ) ); - } - SGB_FILE( char* buf ) - { - constexpr int baseOffset = 0x14; - header = *reinterpret_cast< SGB_HEADER* >( buf ); + SGB_FILE() + { + memset( &header, 0, sizeof( header ) ); + } - if( strncmp( &header.magic[0], "SGB1", 4 ) != 0 || strncmp( &header.magic2[0], "SCN1", 4 ) != 0 ) - throw std::runtime_error( "Unable to load SGB File!" ); + SGB_FILE( char* buf ) + { + constexpr int baseOffset = 0x14; + header = *reinterpret_cast< SGB_HEADER* >( buf ); - try - { - auto group = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.sharedOffset ); - entries.push_back( group ); - auto group2 = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.offset1C ); - entries.push_back( group2 ); - } - catch( std::exception& e ) - { - std::cout << e.what() << "\n"; - } - }; + if( strncmp( &header.magic[ 0 ], "SGB1", 4 ) != 0 || strncmp( &header.magic2[ 0 ], "SCN1", 4 ) != 0 ) + throw std::runtime_error( "Unable to load SGB File!" ); + + try + { + auto group = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.sharedOffset ); + entries.push_back( group ); + auto group2 = SGB_GROUP( buf, this, header.fileSize, baseOffset + header.offset1C ); + entries.push_back( group2 ); + } + catch( std::exception& e ) + { + std::cout << e.what() << "\n"; + } + }; }; diff --git a/src/tools/pcb_reader/vec3.h b/src/tools/pcb_reader/vec3.h index a8fdfbd1..2ff35fa2 100644 --- a/src/tools/pcb_reader/vec3.h +++ b/src/tools/pcb_reader/vec3.h @@ -6,26 +6,29 @@ struct vec3 { - float x, y, z; - vec3() - { - x = 0.0f; - y = 0.0f; - z = 0.0f; - } - vec3(float x, float y, float z) - { - this->x = x; - this->y = y; - this->z = z; - }; + float x, y, z; + + vec3() + { + x = 0.0f; + y = 0.0f; + z = 0.0f; + } + + vec3( float x, float y, float z ) + { + this->x = x; + this->y = y; + this->z = z; + }; }; -static vec3 operator *(const vec3& lhs, const matrix4& rhs) + +static vec3 operator*( const vec3& lhs, const matrix4& rhs ) { - vec3 ret; - ret.x = rhs(0, 0) * lhs.x + rhs(0, 1) * lhs.y + rhs(0, 2) * lhs.z; - ret.y = rhs(1, 0) * lhs.x + rhs(1, 1) * lhs.y + rhs(1, 2) * lhs.z; - ret.z = rhs(2, 0) * lhs.x + rhs(2, 1) * lhs.y + rhs(2, 2) * lhs.z; - return ret; + vec3 ret; + ret.x = rhs( 0, 0 ) * lhs.x + rhs( 0, 1 ) * lhs.y + rhs( 0, 2 ) * lhs.z; + ret.y = rhs( 1, 0 ) * lhs.x + rhs( 1, 1 ) * lhs.y + rhs( 1, 2 ) * lhs.z; + ret.z = rhs( 2, 0 ) * lhs.x + rhs( 2, 1 ) * lhs.y + rhs( 2, 2 ) * lhs.z; + return ret; }; #endif \ No newline at end of file diff --git a/src/tools/quest_parser/main.cpp b/src/tools/quest_parser/main.cpp index 9c4098f8..af195a96 100644 --- a/src/tools/quest_parser/main.cpp +++ b/src/tools/quest_parser/main.cpp @@ -24,392 +24,416 @@ Core::Logger g_log; Core::Data::ExdDataGenerated g_exdDataGen; const std::string onTalkStr( - " void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override\n" - " {\n" - " auto actor = Event::mapEventActorToRealActor( actorId );\n" - " }\n\n" + " void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override\n" + " {\n" + " auto actor = Event::mapEventActorToRealActor( actorId );\n" + " }\n\n" ); const std::string onWithinRangeStr( - " void onWithinRange( uint32_t eventId, Entity::Player& player, uint64_t eRangeId, float x, float y, float z ) override\n" - " {\n" - " }\n\n" + " void onWithinRange( uint32_t eventId, Entity::Player& player, uint64_t eRangeId, float x, float y, float z ) override\n" + " {\n" + " }\n\n" ); const std::string onEmoteStr( - " void onEmote( uint32_t eventId, Entity::Player& player, uint64_t actorId, uint32_t emoteId ) override\n" - " {\n" - " }\n\n" + " void onEmote( uint32_t eventId, Entity::Player& player, uint64_t actorId, uint32_t emoteId ) override\n" + " {\n" + " }\n\n" ); std::string titleCase( const std::string& str ) { - if( str.empty() ) - return str; + if( str.empty() ) + return str; - std::string retStr(str); - std::transform( str.begin(), str.end(), retStr.begin(), ::tolower ); - std::locale loc; - retStr[0] = std::toupper( str[0], loc ); - for( size_t i = 1; i < str.size(); ++i ) - { - if( str[i - 1] == ' ' || str[i - 1] == '_' || ( std::isdigit( str[i - 1], loc ) && !std::isdigit( str[i], loc ) ) ) - retStr[i] = std::toupper( str[i], loc ); - } - return retStr; + std::string retStr( str ); + std::transform( str.begin(), str.end(), retStr.begin(), ::tolower ); + std::locale loc; + retStr[ 0 ] = std::toupper( str[ 0 ], loc ); + for( size_t i = 1; i < str.size(); ++i ) + { + if( str[ i - 1 ] == ' ' || str[ i - 1 ] == '_' || + ( std::isdigit( str[ i - 1 ], loc ) && !std::isdigit( str[ i ], loc ) ) ) + retStr[ i ] = std::toupper( str[ i ], loc ); + } + return retStr; } -void createScript( boost::shared_ptr< Core::Data::Quest >& pQuestData, std::set< std::string >& additionalList, int questId ) +void +createScript( boost::shared_ptr< Core::Data::Quest >& pQuestData, std::set< std::string >& additionalList, int questId ) { - std::string header( - "// This is an automatically generated C++ script template\n" - "// Content needs to be added by hand to make it function\n" - "// In order for this script to be loaded, change its extension to .cpp\n" - "// and move it to the correct folder in /scripts/native/\n" - "\n" - "#include \n\n" - ); + std::string header( + "// This is an automatically generated C++ script template\n" + "// Content needs to be added by hand to make it function\n" + "// In order for this script to be loaded, change its extension to .cpp\n" + "// and move it to the correct folder in /scripts/native/\n" + "\n" + "#include \n\n" + ); - std::size_t splitPos( pQuestData->id.find( "_" ) ); - std::string className( pQuestData->id.substr( 0, splitPos ) ); - //className = "Quest" + className; - std::string sceneStr( " //////////////////////////////////////////////////////////////////////\n // Available Scenes in this quest, not necessarly all are used\n" ); - std::string seqStr; - seqStr.reserve( 0xFFF ); - seqStr += ( " // Steps in this quest ( 0 is before accepting, \n // 1 is first, 255 means ready for turning it in\n" ); - std::string questVarStr( " // Quest vars / flags used\n" ); + std::size_t splitPos( pQuestData->id.find( "_" ) ); + std::string className( pQuestData->id.substr( 0, splitPos ) ); + //className = "Quest" + className; + std::string sceneStr( + " //////////////////////////////////////////////////////////////////////\n // Available Scenes in this quest, not necessarly all are used\n" ); + std::string seqStr; + seqStr.reserve( 0xFFF ); + seqStr += ( " // Steps in this quest ( 0 is before accepting, \n // 1 is first, 255 means ready for turning it in\n" ); + std::string questVarStr( " // Quest vars / flags used\n" ); - seqStr += " enum Sequence : uint8_t\n {\n"; - for( auto &entry : additionalList ) - { - if( entry.find( "OnScene" ) != std::string::npos ) - { - std::string sceneName = entry.substr( 2 ); - std::string sceneId = entry.substr( 7 ); + seqStr += " enum Sequence : uint8_t\n {\n"; + for( auto& entry : additionalList ) + { + if( entry.find( "OnScene" ) != std::string::npos ) + { + std::string sceneName = entry.substr( 2 ); + std::string sceneId = entry.substr( 7 ); - std::size_t numOff = sceneId.find_first_not_of( "0" ); - sceneId = numOff != std::string::npos ? sceneId.substr( numOff ) : "0"; + std::size_t numOff = sceneId.find_first_not_of( "0" ); + sceneId = numOff != std::string::npos ? sceneId.substr( numOff ) : "0"; - sceneStr += std::string( - " void " + - sceneName + - "( Entity::Player& player )\n" - " {\n" - " player.eventPlay( this->getId(), " + - sceneId + - ", 0,\n" - " [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )\n" - " {\n" - " });\n" - " }\n\n" - ); - } - else if( entry.find( "Flag" ) != std::string::npos || - entry.find( "QuestUI" ) != std::string::npos ) - { - questVarStr += " // " + entry + "\n"; - } - else if( entry.find( "SEQ" ) != std::string::npos ) - { - if( entry.find( "SEQ_FINISH" ) != std::string::npos ) - { - seqStr += " SeqFinish = 255,\n"; - } - else if( entry.find( "SEQ_OFFER" ) != std::string::npos ) - { - } - else - { - std::string seqName = titleCase( entry ); - boost::replace_all( seqName, "_", "" ); - - std::string seqId = entry.substr( 4 ); - seqStr += " " + seqName + " = " + seqId + ",\n"; - } - } - } - seqStr += " };\n"; - std::string rewards; - rewards.reserve( 0xFFF ); - rewards += " // Quest rewards \n"; - rewards += ( pQuestData->expFactor != 0 ) ? " static constexpr auto RewardExpFactor = " + std::to_string( pQuestData->expFactor ) + ";\n" : ""; - rewards += ( pQuestData->gilReward != 0 ) ? " static constexpr auto RewardGil = " + std::to_string( pQuestData->gilReward ) + ";\n" : ""; - rewards += ( pQuestData->emoteReward != 0 ) ? " static constexpr auto RewardEmote = " + std::to_string( pQuestData->emoteReward ) + ";\n" : ""; - rewards += ( pQuestData->actionReward != 0 ) ? " static constexpr auto RewardAction = " + std::to_string( pQuestData->actionReward ) + ";\n" : ""; - rewards += ( pQuestData->generalActionReward[0] != 0 ) ? " static constexpr auto RewardGeneralAction1 = " + std::to_string( pQuestData->generalActionReward[0] ) + ";\n" : ""; - rewards += ( pQuestData->generalActionReward[1] != 0 ) ? " static constexpr auto RewardGeneralAction2 = " + std::to_string( pQuestData->generalActionReward[1] ) + ";\n" : ""; - rewards += ( pQuestData->gCSeals != 0 ) ? " static constexpr auto RewardGCSeals = " + std::to_string( pQuestData->gCSeals ) + ";\n" : ""; - rewards += ( pQuestData->otherReward != 0 ) ? " static constexpr auto RewardOther = " + std::to_string( pQuestData->otherReward ) + ";\n" : ""; - rewards += ( pQuestData->reputationReward != 0 ) ? " static constexpr auto RewardReputation = " + std::to_string( pQuestData->reputationReward ) + ";\n" : ""; - rewards += ( pQuestData->tomestoneReward != 0 ) ? " static constexpr auto RewardTomeType = " + std::to_string( pQuestData->tomestoneReward ) + ";\n" : ""; - rewards += ( pQuestData->tomestoneCountReward != 0 ) ? " static constexpr auto RewardTomeCount = " + std::to_string( pQuestData->tomestoneCountReward ) + ";\n" : ""; - rewards += ( pQuestData->instanceContentUnlock != 0 ) ? " static constexpr auto InstancedContentUnlock = " + std::to_string( pQuestData->instanceContentUnlock ) + ";\n" : ""; - - if( !pQuestData->itemReward0.empty() ) - { - rewards += " static constexpr auto RewardItem[] = { "; - for( size_t ca = 0; ca < pQuestData->itemReward0.size(); ca++ ) - { - rewards += std::to_string( pQuestData->itemReward0.at( ca ) ); - if( ca != pQuestData->itemReward0.size() - 1 ) - { - rewards += ", "; - } - } - rewards += " };\n"; - } - - if( !pQuestData->itemReward0.empty() ) - { - rewards += " static constexpr auto RewardItemCount[] = { "; - for( size_t ca = 0; ca < pQuestData->itemCountReward0.size(); ca++ ) - { - rewards += std::to_string( pQuestData->itemCountReward0.at( ca ) ); - if( ca != pQuestData->itemCountReward0.size() - 1 ) - { - rewards += ", "; - } - } - rewards += " };\n"; - } - - if( !pQuestData->itemReward1.empty() ) - { - rewards += " static constexpr auto RewardItemOptional[] = { "; - for( size_t ca = 0; ca < pQuestData->itemReward1.size(); ca++ ) - { - rewards += std::to_string( pQuestData->itemReward1.at( ca ) ); - if( ca != pQuestData->itemReward1.size() - 1 ) - { - rewards += ", "; - } - } - rewards += " };\n"; - } - - if( !pQuestData->itemCountReward1.empty() ) - { - rewards += " static constexpr auto RewardItemOptionalCount[] = { "; - for( size_t ca = 0; ca < pQuestData->itemCountReward1.size(); ca++ ) - { - rewards += std::to_string( pQuestData->itemCountReward1.at( ca ) ); - if( ca != pQuestData->itemCountReward1.size() - 1 ) - { - rewards += ", "; - } - } - rewards += " };\n"; - } - - bool hasERange = false; - bool hasEmote = false; - bool hasEnemies = false; - std::vector< uint32_t > enemy_ids; - std::vector< std::string > script_entities; - std::string sentities = " // Entities found in the script data of the quest\n"; - - for( size_t ca = 0; ca < pQuestData->scriptInstruction.size(); ca ++ ) - { - if( ( pQuestData->scriptInstruction.at( ca ).find( "HOWTO" ) != std::string::npos ) || ( pQuestData->scriptInstruction.at( ca ).find( "HOW_TO" ) != std::string::npos ) ) - continue; - - if( ( pQuestData->scriptInstruction.at( ca ).find( "EMOTENO" ) != std::string::npos ) || ( pQuestData->scriptInstruction.at( ca ).find( "EMOTEOK" ) != std::string::npos ) ) - hasEmote = true; - - if( pQuestData->scriptInstruction.at( ca ).find( "ENEMY" ) != std::string::npos ) - { - hasEnemies = true; - enemy_ids.push_back( pQuestData->scriptArg.at( ca ) ); - } - - if( !pQuestData->scriptInstruction.at( ca ).empty() ) - script_entities.push_back( pQuestData->scriptInstruction.at( ca ) + " = " + std::to_string( pQuestData->scriptArg.at( ca ) ) ); - } - std::sort( script_entities.begin(), script_entities.end() ); - for( auto& entity : script_entities ) - { - auto name = titleCase( entity ); - boost::replace_all( name, "_", "" ); - sentities += " static constexpr auto " + name + ";\n"; - } - - std::string additional = "// Quest Script: " + pQuestData->id + "\n"; - additional += "// Quest Name: " + pQuestData->name + "\n"; - additional += "// Quest ID: " + std::to_string( questId ) + "\n"; - additional += "// Start NPC: " + std::to_string( pQuestData->eNpcResidentStart ) + "\n"; - additional += "// End NPC: " + std::to_string( pQuestData->eNpcResidentEnd ) + "\n\n"; - - std::string scriptEntry; - scriptEntry.reserve(0xFFFF); - scriptEntry += " //////////////////////////////////////////////////////////////////////\n // Event Handlers\n"; - - scriptEntry += onTalkStr; - - if( hasERange ) - { - scriptEntry += onWithinRangeStr; - } - - if( hasEmote ) - { - scriptEntry += onEmoteStr; - } - - for( auto enemy : enemy_ids ) - { - scriptEntry += std::string( - " void onMobKill_" + std::to_string( enemy ) + "( Entity::Player& player )\n" - " {\n" - " }\n\n" + sceneStr += std::string( + " void " + + sceneName + + "( Entity::Player& player )\n" + " {\n" + " player.eventPlay( this->getId(), " + + sceneId + + ", 0,\n" + " [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )\n" + " {\n" + " });\n" + " }\n\n" ); - } + } + else if( entry.find( "Flag" ) != std::string::npos || + entry.find( "QuestUI" ) != std::string::npos ) + { + questVarStr += " // " + entry + "\n"; + } + else if( entry.find( "SEQ" ) != std::string::npos ) + { + if( entry.find( "SEQ_FINISH" ) != std::string::npos ) + { + seqStr += " SeqFinish = 255,\n"; + } + else if( entry.find( "SEQ_OFFER" ) != std::string::npos ) + { + } + else + { + std::string seqName = titleCase( entry ); + boost::replace_all( seqName, "_", "" ); - std::string constructor; - constructor += std::string( - " private:\n" - " // Basic quest information \n"); - constructor += questVarStr + "\n"; - constructor += seqStr + "\n"; - constructor += rewards + "\n"; - constructor += sentities + "\n"; - constructor += " public:\n"; - constructor += " " + className + "() : EventScript" + "( " + std::to_string( questId ) + " ){}; \n"; - constructor += " ~" + className + "(){}; \n"; + std::string seqId = entry.substr( 4 ); + seqStr += " " + seqName + " = " + seqId + ",\n"; + } + } + } + seqStr += " };\n"; + std::string rewards; + rewards.reserve( 0xFFF ); + rewards += " // Quest rewards \n"; + rewards += ( pQuestData->expFactor != 0 ) ? " static constexpr auto RewardExpFactor = " + + std::to_string( pQuestData->expFactor ) + ";\n" : ""; + rewards += ( pQuestData->gilReward != 0 ) ? " static constexpr auto RewardGil = " + + std::to_string( pQuestData->gilReward ) + ";\n" : ""; + rewards += ( pQuestData->emoteReward != 0 ) ? " static constexpr auto RewardEmote = " + + std::to_string( pQuestData->emoteReward ) + ";\n" : ""; + rewards += ( pQuestData->actionReward != 0 ) ? " static constexpr auto RewardAction = " + + std::to_string( pQuestData->actionReward ) + ";\n" : ""; + rewards += ( pQuestData->generalActionReward[ 0 ] != 0 ) ? " static constexpr auto RewardGeneralAction1 = " + + std::to_string( pQuestData->generalActionReward[ 0 ] ) + + ";\n" : ""; + rewards += ( pQuestData->generalActionReward[ 1 ] != 0 ) ? " static constexpr auto RewardGeneralAction2 = " + + std::to_string( pQuestData->generalActionReward[ 1 ] ) + + ";\n" : ""; + rewards += ( pQuestData->gCSeals != 0 ) ? " static constexpr auto RewardGCSeals = " + + std::to_string( pQuestData->gCSeals ) + ";\n" : ""; + rewards += ( pQuestData->otherReward != 0 ) ? " static constexpr auto RewardOther = " + + std::to_string( pQuestData->otherReward ) + ";\n" : ""; + rewards += ( pQuestData->reputationReward != 0 ) ? " static constexpr auto RewardReputation = " + + std::to_string( pQuestData->reputationReward ) + ";\n" : ""; + rewards += ( pQuestData->tomestoneReward != 0 ) ? " static constexpr auto RewardTomeType = " + + std::to_string( pQuestData->tomestoneReward ) + ";\n" : ""; + rewards += ( pQuestData->tomestoneCountReward != 0 ) ? " static constexpr auto RewardTomeCount = " + + std::to_string( pQuestData->tomestoneCountReward ) + ";\n" + : ""; + rewards += ( pQuestData->instanceContentUnlock != 0 ) ? " static constexpr auto InstancedContentUnlock = " + + std::to_string( pQuestData->instanceContentUnlock ) + ";\n" + : ""; - std::string classString( - "class " + className + " : public EventScript\n" - "{\n" + - constructor + - "\n" + - scriptEntry + - " private:\n" + - sceneStr + - "};\n\n" - ); + if( !pQuestData->itemReward0.empty() ) + { + rewards += " static constexpr auto RewardItem[] = { "; + for( size_t ca = 0; ca < pQuestData->itemReward0.size(); ca++ ) + { + rewards += std::to_string( pQuestData->itemReward0.at( ca ) ); + if( ca != pQuestData->itemReward0.size() - 1 ) + { + rewards += ", "; + } + } + rewards += " };\n"; + } - std::ofstream outputFile; + if( !pQuestData->itemReward0.empty() ) + { + rewards += " static constexpr auto RewardItemCount[] = { "; + for( size_t ca = 0; ca < pQuestData->itemCountReward0.size(); ca++ ) + { + rewards += std::to_string( pQuestData->itemCountReward0.at( ca ) ); + if( ca != pQuestData->itemCountReward0.size() - 1 ) + { + rewards += ", "; + } + } + rewards += " };\n"; + } - outputFile.open( "generated/" + className + ".cpp" ); - outputFile << header << additional << classString; - outputFile.close(); + if( !pQuestData->itemReward1.empty() ) + { + rewards += " static constexpr auto RewardItemOptional[] = { "; + for( size_t ca = 0; ca < pQuestData->itemReward1.size(); ca++ ) + { + rewards += std::to_string( pQuestData->itemReward1.at( ca ) ); + if( ca != pQuestData->itemReward1.size() - 1 ) + { + rewards += ", "; + } + } + rewards += " };\n"; + } + + if( !pQuestData->itemCountReward1.empty() ) + { + rewards += " static constexpr auto RewardItemOptionalCount[] = { "; + for( size_t ca = 0; ca < pQuestData->itemCountReward1.size(); ca++ ) + { + rewards += std::to_string( pQuestData->itemCountReward1.at( ca ) ); + if( ca != pQuestData->itemCountReward1.size() - 1 ) + { + rewards += ", "; + } + } + rewards += " };\n"; + } + + bool hasERange = false; + bool hasEmote = false; + bool hasEnemies = false; + std::vector< uint32_t > enemy_ids; + std::vector< std::string > script_entities; + std::string sentities = " // Entities found in the script data of the quest\n"; + + for( size_t ca = 0; ca < pQuestData->scriptInstruction.size(); ca++ ) + { + if( ( pQuestData->scriptInstruction.at( ca ).find( "HOWTO" ) != std::string::npos ) || + ( pQuestData->scriptInstruction.at( ca ).find( "HOW_TO" ) != std::string::npos ) ) + continue; + + if( ( pQuestData->scriptInstruction.at( ca ).find( "EMOTENO" ) != std::string::npos ) || + ( pQuestData->scriptInstruction.at( ca ).find( "EMOTEOK" ) != std::string::npos ) ) + hasEmote = true; + + if( pQuestData->scriptInstruction.at( ca ).find( "ENEMY" ) != std::string::npos ) + { + hasEnemies = true; + enemy_ids.push_back( pQuestData->scriptArg.at( ca ) ); + } + + if( !pQuestData->scriptInstruction.at( ca ).empty() ) + script_entities.push_back( + pQuestData->scriptInstruction.at( ca ) + " = " + std::to_string( pQuestData->scriptArg.at( ca ) ) ); + } + std::sort( script_entities.begin(), script_entities.end() ); + for( auto& entity : script_entities ) + { + auto name = titleCase( entity ); + boost::replace_all( name, "_", "" ); + sentities += " static constexpr auto " + name + ";\n"; + } + + std::string additional = "// Quest Script: " + pQuestData->id + "\n"; + additional += "// Quest Name: " + pQuestData->name + "\n"; + additional += "// Quest ID: " + std::to_string( questId ) + "\n"; + additional += "// Start NPC: " + std::to_string( pQuestData->eNpcResidentStart ) + "\n"; + additional += "// End NPC: " + std::to_string( pQuestData->eNpcResidentEnd ) + "\n\n"; + + std::string scriptEntry; + scriptEntry.reserve( 0xFFFF ); + scriptEntry += " //////////////////////////////////////////////////////////////////////\n // Event Handlers\n"; + + scriptEntry += onTalkStr; + + if( hasERange ) + { + scriptEntry += onWithinRangeStr; + } + + if( hasEmote ) + { + scriptEntry += onEmoteStr; + } + + for( auto enemy : enemy_ids ) + { + scriptEntry += std::string( + " void onMobKill_" + std::to_string( enemy ) + "( Entity::Player& player )\n" + " {\n" + " }\n\n" + ); + } + + std::string constructor; + constructor += std::string( + " private:\n" + " // Basic quest information \n" ); + constructor += questVarStr + "\n"; + constructor += seqStr + "\n"; + constructor += rewards + "\n"; + constructor += sentities + "\n"; + constructor += " public:\n"; + constructor += " " + className + "() : EventScript" + "( " + std::to_string( questId ) + " ){}; \n"; + constructor += " ~" + className + "(){}; \n"; + + std::string classString( + "class " + className + " : public EventScript\n" + "{\n" + + constructor + + "\n" + + scriptEntry + + " private:\n" + + sceneStr + + "};\n\n" + ); + + std::ofstream outputFile; + + outputFile.open( "generated/" + className + ".cpp" ); + outputFile << header << additional << classString; + outputFile.close(); } int main( int argc, char** argv ) { - g_log.init(); + g_log.init(); - bool unluac = false; + bool unluac = false; // std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" ); - //std::string datLocation( "C:/Program Files (x86)/SquareEnix/FINAL FANTASY XIV - A Realm Reborn/game/sqpack" ); - std::string datLocation( "C:/SquareEnix/FINAL FANTASY XIV - A Realm Reborn/game/sqpack" ); - if ( argc > 1 ) - datLocation = std::string( argv[1] ); - if ( argc > 2 ) - unluac = (bool)atoi( argv[2] ); + //std::string datLocation( "C:/Program Files (x86)/SquareEnix/FINAL FANTASY XIV - A Realm Reborn/game/sqpack" ); + std::string datLocation( "C:/SquareEnix/FINAL FANTASY XIV - A Realm Reborn/game/sqpack" ); + if( argc > 1 ) + datLocation = std::string( argv[ 1 ] ); + if( argc > 2 ) + unluac = ( bool ) atoi( argv[ 2 ] ); - unluac = true; + unluac = true; - g_log.info( "Setting up generated EXD data" ); - if( !g_exdDataGen.init( datLocation ) ) - { - std::cout << datLocation << "\n"; - g_log.fatal( "Error setting up EXD data " ); - std::cout << "Usage: quest_parser \"path/to/ffxiv/game/sqpack\" <1/0 unluac export toggle>\n"; + g_log.info( "Setting up generated EXD data" ); + if( !g_exdDataGen.init( datLocation ) ) + { + std::cout << datLocation << "\n"; + g_log.fatal( "Error setting up EXD data " ); + std::cout << "Usage: quest_parser \"path/to/ffxiv/game/sqpack\" <1/0 unluac export toggle>\n"; + return 0; + } + + xiv::dat::GameData data( datLocation ); + + auto rows = g_exdDataGen.getQuestIdList(); + + if( !boost::filesystem::exists( "./generated" ) ) + boost::filesystem::create_directory( "./generated" ); + + g_log.info( "Export in progress" ); + + uint32_t updateInterval = rows.size() / 20; + uint32_t i = 0; + for( const auto& row : rows ) + { + g_log.info( "Generating " + std::to_string( row ) ); + auto questInfo = g_exdDataGen.get< Core::Data::Quest >( row ); + + if( questInfo->name.empty() || questInfo->id.empty() ) + { + continue; + } + + size_t pos_seperator = questInfo->id.find_first_of( "_" ); + + std::string folder; + + if( pos_seperator != std::string::npos ) + { + folder = questInfo->id.substr( pos_seperator + 1, 3 ); + } + else + { return 0; - } + } - xiv::dat::GameData data( datLocation ); - auto rows = g_exdDataGen.getQuestIdList(); + const xiv::dat::Cat& test = data.getCategory( "game_script" ); - if ( !boost::filesystem::exists( "./generated" ) ) - boost::filesystem::create_directory( "./generated" ); + const std::string questPath = "game_script/quest/" + folder + "/" + questInfo->id + ".luab"; - g_log.info( "Export in progress" ); + const auto& test_file = data.getFile( questPath ); + auto& section = test_file->access_data_sections().at( 0 ); + int32_t size = *( uint32_t* ) §ion[ 4 ]; - uint32_t updateInterval = rows.size() / 20; - uint32_t i = 0; - for( const auto& row : rows ) - { - g_log.info( "Generating " + std::to_string( row ) ); - auto questInfo = g_exdDataGen.get( row ); + std::set< std::string > stringList; - if( questInfo->name.empty() || questInfo->id.empty() ) + uint32_t offset = 0; + + std::ofstream outputFile1; + outputFile1.open( "generated/" + questInfo->id + ".luab", std::ios::binary ); + outputFile1.write( §ion[ 0 ], section.size() ); + outputFile1.close(); + if( unluac ) + { + std::string command = + std::string( "java -jar unluac_2015_06_13.jar " ) + "generated/" + questInfo->id + ".luab" + ">> " + + "generated/" + questInfo->id + ".lua"; + if( system( command.c_str() ) == -1 ) { - continue; + g_log.error( "Error executing java command:\n" + command + "\nerrno: " + std::strerror( errno ) ); + return errno; + } + } + for( ;; ) + { + + std::string entry( §ion[ offset ] ); + offset += entry.size() + 1; + + if( entry.size() > 3 + && entry.find_first_not_of( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_-" ) == + std::string::npos ) + { + if( entry.find( "SEQ" ) != std::string::npos + || entry.find( "QuestUI" ) != std::string::npos + || entry.find( "OnScene" ) != std::string::npos + || entry.find( "Flag" ) != std::string::npos + || entry.find( "ACTOR" ) != std::string::npos + && entry.find( "_ACTOR" ) == std::string::npos ) + if( entry.find( "HOWTO" ) == std::string::npos ) + stringList.insert( entry ); } - size_t pos_seperator = questInfo->id.find_first_of( "_" ); - - std::string folder; - - if( pos_seperator != std::string::npos ) - { - folder = questInfo->id.substr( pos_seperator + 1, 3 ); - } - else - { - return 0; - } + if( offset >= section.size() ) + break; + } - - const xiv::dat::Cat& test = data.getCategory( "game_script" ); - - const std::string questPath = "game_script/quest/" + folder + "/" + questInfo->id + ".luab"; - - const auto &test_file = data.getFile( questPath ); - auto §ion = test_file->access_data_sections().at( 0 ); - int32_t size = *( uint32_t* ) §ion[4]; - - std::set stringList; - - uint32_t offset = 0; - - std::ofstream outputFile1; - outputFile1.open( "generated/" + questInfo->id + ".luab", std::ios::binary ); - outputFile1.write( §ion[0], section.size() ); - outputFile1.close(); - if( unluac ) - { - std::string command = std::string( "java -jar unluac_2015_06_13.jar " ) + "generated/" + questInfo->id + ".luab" + ">> " + "generated/" + questInfo->id + ".lua"; - if ( system( command.c_str() ) == -1 ) - { - g_log.error( "Error executing java command:\n" + command + "\nerrno: " + std::strerror( errno ) ); - return errno; - } - } - for( ; ; ) - { - - std::string entry( §ion[offset] ); - offset += entry.size() + 1; - - if( entry.size() > 3 - && entry.find_first_not_of( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_-" ) == std::string::npos ) - { - if( entry.find( "SEQ" ) != std::string::npos - || entry.find( "QuestUI" ) != std::string::npos - || entry.find( "OnScene" ) != std::string::npos - || entry.find( "Flag" ) != std::string::npos - || entry.find( "ACTOR" ) != std::string::npos - && entry.find( "_ACTOR" ) == std::string::npos ) - if( entry.find( "HOWTO" ) == std::string::npos ) - stringList.insert( entry ); - } - - if( offset >= section.size() ) - break; - } - - - createScript( questInfo, stringList, row ); - ++i; - if( i % updateInterval == 0 ) - std::cout << "."; + createScript( questInfo, stringList, row ); + ++i; + if( i % updateInterval == 0 ) + std::cout << "."; //break; - } - std::cout << "\nDone!"; - return 0; + } + std::cout << "\nDone!"; + return 0; }