1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 14:07:46 +00:00

Started using pregenerated common emuns, fixed a mysql field length issue with titlelists

This commit is contained in:
Mordred 2017-11-18 01:25:55 +01:00
parent f080a6f9f4
commit f043049d2b
18 changed files with 1471 additions and 1099 deletions

View file

@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS `charadetail` (
`RentalTimer` float DEFAULT NULL,
`StartTown` int(3) DEFAULT NULL,
`ActiveTitle` int(5) DEFAULT NULL,
`TitleList` binary(32) DEFAULT NULL,
`TitleList` binary(48) DEFAULT NULL,
`Achievement` binary(16) DEFAULT NULL,
`Aetheryte` binary(16) DEFAULT NULL,
`HowTo` binary(33) DEFAULT NULL,

View file

@ -6,13 +6,14 @@
#include <vector>
#include <boost/make_shared.hpp>
#include "CommonGen.h"
// +---------------------------------------------------------------------------
// The following enumerations are structures to require their type be included.
// They are also defined within the Core::Common namespace to avoid collisions.
// +---------------------------------------------------------------------------
namespace Core {
namespace Common {
namespace Common {
// 99 is the last spawn id that seems to spawn any actor
const uint8_t MAX_DISPLAYED_ACTORS = 99;
@ -95,15 +96,6 @@ namespace Core {
FreeCompanyCrystal = 22001
};
enum Race : uint8_t
{
Hyur = 1,
Elezen = 2,
Lalafell = 3,
Miqote = 4,
Roegadyn = 5,
AuRa = 6,
};
enum struct ZoneingType : uint8_t
{
@ -121,51 +113,13 @@ namespace Core {
Return = 8
};
enum 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,
};
enum Gender : uint8_t
{
Male = 0,
Female = 1,
};
enum GuardianDeity : uint8_t
{
Halone = 1, // the Fury
Menphina = 2, // the Lover
Thaliak = 3, // the Scholar
Nymeia = 4, // the Spinner
Llymlaen = 5, // the Navigator
Oschon = 6, // the Wanderer
Byregot = 7, // the Builder
Rhalgr = 8, // the Destroyer
Azeyma = 9, // the Warden
NaldThal = 10, // the Traders
Nophica = 11, // the Matron
Althyk = 12, // the Keeper
};
enum struct GrandCompany : uint8_t
{
None = 0,
Maelstrom = 1,
TwinAdder = 2,
ImmortalFlames = 3,
};
enum struct GCRank : uint8_t
{
@ -191,90 +145,6 @@ namespace Core {
Champion = 19,
};
enum struct Weather : uint8_t
{
None,
Clear,
Fair,
Overcast,
Fog,
Wind,
Gales,
Rain,
Showers,
Thunder,
Thunderstorms,
DustStorms,
Sandstorms,
HotSpells,
HeatWave,
Snow,
Blizzards,
Gloom,
Aurora,
Darkness,
Hopelessness,
Overcast1,
StormClouds,
Torrential,
Torrential1,
Lour,
HeatWave1,
Gloom1,
Gales1,
Eruptions,
Fair1
};
enum Town : uint8_t
{
LimsaLominsa = 1,
Gridania = 2,
Uldah = 3,
Ishgard = 4,
};
enum ClassJob : uint8_t
{
CLASS_ADV = 0, // purely internal
CLASS_GLADIATOR = 1, // gladiator
CLASS_PUGILIST = 2, // pugilist
CLASS_MARAUDER = 3, // marauder
CLASS_LANCER = 4, // lancer
CLASS_ARCHER = 5, // archer
CLASS_CONJURER = 6, // conjurer
CLASS_THAUMATURGE = 7, // thaumaturge
CLASS_WOODWORKER = 8, // carpenter
CLASS_BLACKSMIT = 9, // blacksmith
CLASS_ARMOURER = 10, // armorer
CLASS_GOLDSMITH = 11, // goldsmith
CLASS_TANNER = 12, // leatherworker
CLASS_WEAVER = 13, // weaver
CLASS_ALCHEMIST = 14, // alchemist
CLASS_CULINARIAN = 15, // culinarian
CLASS_MINER = 16, // miner
CLASS_HARVESTER = 17, // botanist
CLASS_FISHERMAN = 18, // fisher
JOB_KNIGHT = 19, // paladin
JOB_MONK = 20, // monk
JOB_WARRIOR = 21, // warrior
JOB_DRAGON = 22, // dragoon
JOB_BARD = 23, // bard
JOB_WHITEMAGE = 24, // white mage
JOB_BLACKMAGE = 25, // black mage
CLASS_ARCANIST = 26, // arcanist
JOB_SUMMONER = 27, // summoner
JOB_SCHOLAR = 28, // scholar
CLASS_ROGUE = 29, // rogue
JOB_NINJA = 30, // ninja
JOB_MACHINIST = 31, // machinist
JOB_DARKKNIGHT = 32, // darknight
JOB_ASTROLOGIAN = 33, // astro
JOB_SAMURAI = 34, // sam
JOB_REDMAGE = 35, // red mage
};
/**
* Structural representation of the packet sent by the server
* Send the entire StatusEffect list
@ -287,67 +157,6 @@ namespace Core {
uint32_t sourceActorId;
};
enum struct ItemCategory : uint8_t
{
not_set = 0,
PugWep = 1,
GlaWep = 2,
MrdWep = 3,
ArcWep = 4,
LncWep = 5,
ThmWep = 6,
Thm2Wep = 7,
CnjWep = 8,
Cnj2Wep = 9,
ArnWep = 10,
Shield = 11,
CrpPri = 12,
BlmPri = 13,
ArmPri = 14,
GldPri = 15,
LtwPri = 16,
WvrPri = 17,
AlcPri = 18,
ClnPri = 19,
MinPri = 20,
BotPri = 21,
FshPri = 22,
CrpSec = 23,
BsmSec = 24,
ArmSec = 25,
GldSec = 26,
LtwSec = 27,
WvrSec = 28,
AlcSec = 29,
ClnSec = 30,
MinSec = 31,
BotSec = 32,
FshSec = 33,
Throw = 34,
Head = 35,
Body = 36,
Hands = 37,
Waist = 38,
Legs = 39,
Feet = 40,
UndShirt = 41,
UndGarm = 42,
Earring = 43,
Necklace = 44,
Bracelet = 45,
Ring = 46,
Crystal = 47,
Materia = 48,
Material = 49,
Food = 50,
Enhancement = 51,
Curative = 52,
PLaceholder = 53,
Enfeeb = 54,
Medecine = 55,
};
enum RegionType : uint8_t
{
normal,
@ -699,59 +508,6 @@ namespace Core {
Completed = 8,
};
enum struct OnlineStatus : uint8_t
{
None = 0,
Producer,
GameMaster,
GameMaster1,
GameMaster2,
Disconnected,
WaitFriendlistApproval,
WaitLinkshellApproval,
WaitFCApproval,
NotFound,
Offline,
Mentor,
Busy,
PvP,
TripleTriad,
Cutscene,
ChocoPorter,
Afk,
CameraMode,
LfRepairs,
LfRepair,
LfMeld,
RolePlaying,
LfParty,
SwordForHire,
WaitDutyFinder,
RecPartyMembers,
Mentor1,
PvEMentor,
TradeMentor,
PvPMentor,
Returner,
NewAdventurer,
AllianceLead,
AlliancePartyLead,
AllianceMember,
PartyLeader,
PartyMember,
PartyLeaderCross,
PartyMemberCross,
AnotherWorld,
SharingDuty,
SimliarDuty,
InDuty,
TrialAdventurer,
FreeCompany,
GrandCompany,
Online
};
enum ActorControlType : uint16_t
{
ToggleWeapon = 0x01,
@ -1054,7 +810,7 @@ namespace Core {
typedef std::vector< PlayerStateFlag > PlayerStateFlagList;
} /* Common */
} /* Common */
} /* Core */
#endif

View file

@ -0,0 +1,39 @@
#include "CommonGen.h"
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; }
}
}

View file

@ -0,0 +1,574 @@
#ifndef _COMMON_GEN_H_
#define _COMMON_GEN_H_
/* This file has been automatically generated.
Changes will be lost upon regeneration.
To change the content edit tools/exd_common_gen */
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,
};
///////////////////////////////////////////////////////////
//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
{
};
///////////////////////////////////////////////////////////
//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,
};
///////////////////////////////////////////////////////////
//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,
};
///////////////////////////////////////////////////////////
//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,
};
///////////////////////////////////////////////////////////
//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,
};
///////////////////////////////////////////////////////////
//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,
};
///////////////////////////////////////////////////////////
//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,
};
///////////////////////////////////////////////////////////
//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

View file

@ -176,9 +176,9 @@ namespace Core {
switch( m_class )
{
case Core::Common::ClassJob::CLASS_CONJURER:
case Core::Common::ClassJob::CLASS_LANCER:
case Core::Common::ClassJob::CLASS_ARCHER:
case Core::Common::ClassJob::Conjurer:
case Core::Common::ClassJob::Lancer:
case Core::Common::ClassJob::Archer:
x = 127.0f;
y = -13.0f;
z = 147.0f;
@ -187,8 +187,8 @@ namespace Core {
startTown = 2;
break;
case Core::Common::ClassJob::CLASS_MARAUDER:
case Core::Common::ClassJob::CLASS_ARCANIST:
case Core::Common::ClassJob::Marauder:
case Core::Common::ClassJob::Arcanist:
x = -53.0f;
y = 18.0f;
z = 0.0f;
@ -197,9 +197,9 @@ namespace Core {
startZone = 181;
break;
case Core::Common::ClassJob::CLASS_THAUMATURGE:
case Core::Common::ClassJob::CLASS_PUGILIST:
case Core::Common::ClassJob::CLASS_GLADIATOR:
case Core::Common::ClassJob::Thaumaturge:
case Core::Common::ClassJob::Pugilist:
case Core::Common::ClassJob::Gladiator:
x = 42.0f;
y = 4.0f;
z = -157.6f;

View file

@ -65,7 +65,7 @@ Core::Entity::BattleNpc::BattleNpc( uint32_t modelId, uint32_t nameid, const Com
m_currentStance = Stance::Passive;
m_class = ClassJob::CLASS_GLADIATOR;
m_class = ClassJob::Gladiator;
m_level = level > 0 ? level : 60;
m_modelId = modelId;

View file

@ -59,7 +59,7 @@ uint32_t CalcBattle::calculateMaxHp( PlayerPtr pPlayer )
// Is there any way to pull 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 classInfoIt = g_exdData.m_classJobInfoMap.find( pPlayer->getClass() );
auto classInfoIt = g_exdData.m_classJobInfoMap.find( static_cast< uint8_t >( pPlayer->getClass() ) );
auto paramGrowthInfoIt = g_exdData.m_paramGrowthInfoMap.find( pPlayer->getLevel() );
if ( classInfoIt == g_exdData.m_classJobInfoMap.end() ||
@ -93,7 +93,7 @@ uint32_t CalcBattle::calculateMaxHp( PlayerPtr pPlayer )
uint32_t CalcBattle::calculateMaxMp( PlayerPtr pPlayer )
{
auto classInfoIt = g_exdData.m_classJobInfoMap.find( pPlayer->getClass() );
auto classInfoIt = g_exdData.m_classJobInfoMap.find( static_cast< uint8_t >( pPlayer->getClass() ) );
auto paramGrowthInfoIt = g_exdData.m_paramGrowthInfoMap.find( pPlayer->getLevel() );
if ( classInfoIt == g_exdData.m_classJobInfoMap.end() ||
@ -113,7 +113,7 @@ uint32_t CalcBattle::calculateMaxMp( PlayerPtr pPlayer )
uint32_t CalcBattle::calculateHealValue( PlayerPtr pPlayer, uint32_t potency )
{
auto classInfoIt = g_exdData.m_classJobInfoMap.find( pPlayer->getClass() );
auto classInfoIt = g_exdData.m_classJobInfoMap.find( static_cast< uint8_t >( pPlayer->getClass() ) );
auto paramGrowthInfoIt = g_exdData.m_paramGrowthInfoMap.find( pPlayer->getLevel() );
if ( classInfoIt == g_exdData.m_classJobInfoMap.end() ||

View file

@ -148,12 +148,12 @@ bool Core::Entity::Player::isMarkedForRemoval() const
Core::Common::OnlineStatus Core::Entity::Player::getOnlineStatus()
{
uint64_t newMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::NewAdventurer );
uint64_t afkMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::Afk );
uint64_t afkMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::AwayfromKeyboard );
uint64_t busyMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::Busy );
uint64_t dcMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::Disconnected );
uint64_t meldMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::LfMeld );
uint64_t ptMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::LfParty );
uint64_t rpMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::RolePlaying );
uint64_t meldMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::LookingtoMeldMateria );
uint64_t ptMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::LookingforParty );
uint64_t rpMask = uint64_t( 1 ) << static_cast< uint32_t >( OnlineStatus::Roleplaying );
OnlineStatus status = OnlineStatus::Online;
@ -162,7 +162,7 @@ Core::Common::OnlineStatus Core::Entity::Player::getOnlineStatus()
status = OnlineStatus::NewAdventurer;
if( m_onlineStatus & afkMask )
status = OnlineStatus::Afk;
status = OnlineStatus::AwayfromKeyboard;
if( m_onlineStatus & busyMask )
status = OnlineStatus::Busy;
@ -171,16 +171,16 @@ Core::Common::OnlineStatus Core::Entity::Player::getOnlineStatus()
status = OnlineStatus::Disconnected;
if( m_onlineStatus & meldMask )
status = OnlineStatus::LfMeld;
status = OnlineStatus::LookingtoMeldMateria;
if( m_onlineStatus & ptMask )
status = OnlineStatus::LfParty;
status = OnlineStatus::LookingforParty;
if( m_onlineStatus & rpMask )
status = OnlineStatus::RolePlaying;
status = OnlineStatus::Roleplaying;
if( hasStateFlag( PlayerStateFlag::WatchingCutscene ) || hasStateFlag( PlayerStateFlag::WatchingCutscene1 ) )
status = OnlineStatus::Cutscene;
status = OnlineStatus::ViewingCutscene;
// TODO: add all the logic for returning the proper online status, there probably is a better way for this alltogether
return status;
@ -210,7 +210,7 @@ void Core::Entity::Player::calculateStats()
{
uint8_t tribe = getLookAt( Common::CharaLook::Tribe );
uint8_t level = getLevel();
uint8_t job = getClass();
uint8_t job = static_cast< uint8_t >( getClass() );
auto classInfoIt = g_exdData.m_classJobInfoMap.find( job );
auto tribeInfoIt = g_exdData.m_tribeInfoMap.find( tribe );
@ -421,7 +421,7 @@ void Core::Entity::Player::setZone( uint32_t zoneId )
queuePacket( initUIPacket );
GamePacketNew< FFXIVIpcPlayerClassInfo, ServerZoneIpcType > classInfoPacket( getId() );
classInfoPacket.data().classId = getClass();
classInfoPacket.data().classId = static_cast< uint8_t >( getClass() );
classInfoPacket.data().unknown = 1;
classInfoPacket.data().level = getLevel();
classInfoPacket.data().level1 = getLevel();
@ -676,8 +676,8 @@ void Core::Entity::Player::gainLevel()
m_mp = getMaxMp();
GamePacketNew< FFXIVIpcStatusEffectList, ServerZoneIpcType > effectListPacket( getId() );
effectListPacket.data().classId = getClass();
effectListPacket.data().classId1 = getClass();
effectListPacket.data().classId = static_cast< uint8_t > ( getClass() );
effectListPacket.data().classId1 = static_cast< uint8_t > ( getClass() );
effectListPacket.data().level = getLevel();
effectListPacket.data().current_hp = getMaxHp();
effectListPacket.data().current_mp = getMaxMp();
@ -691,8 +691,8 @@ void Core::Entity::Player::gainLevel()
GamePacketNew< FFXIVIpcUpdateClassInfo, ServerZoneIpcType > classInfoPacket( getId() );
classInfoPacket.data().classId = getClass();
classInfoPacket.data().classId1 = getClass();
classInfoPacket.data().classId = static_cast< uint8_t > ( getClass() );
classInfoPacket.data().classId1 = static_cast< uint8_t > ( getClass() );
classInfoPacket.data().level = getLevel();
classInfoPacket.data().nextLevelIndex = getLevel();
classInfoPacket.data().currentExp = getExp();
@ -781,7 +781,7 @@ void Core::Entity::Player::setClassJob( Core::Common::ClassJob classJob )
m_tp = 0;
GamePacketNew< FFXIVIpcPlayerClassInfo, ServerZoneIpcType > classInfoPacket( getId() );
classInfoPacket.data().classId = getClass();
classInfoPacket.data().classId = static_cast< uint8_t >( getClass() );
classInfoPacket.data().level = getLevel();
queuePacket( classInfoPacket );
@ -792,7 +792,7 @@ void Core::Entity::Player::setClassJob( Core::Common::ClassJob classJob )
void Core::Entity::Player::setLevel( uint8_t level )
{
uint8_t classJobIndex = g_exdData.m_classJobInfoMap[static_cast< uint8_t >( getClass() )].exp_idx;
uint8_t classJobIndex = g_exdData.m_classJobInfoMap[static_cast< uint8_t >( static_cast< uint8_t >( getClass() ) )].exp_idx;
m_classArray[classJobIndex] = level;
}
@ -1065,9 +1065,9 @@ void Core::Entity::Player::update( int64_t currTime )
uint32_t range = 7;
// default autoattack range for ranged classes
if( getClass() == JOB_MACHINIST ||
getClass() == JOB_BARD ||
getClass() == CLASS_ARCHER )
if( getClass() == ClassJob::Machinist ||
getClass() == ClassJob::Bard ||
getClass() == ClassJob::Archer )
range = 25;
@ -1484,9 +1484,9 @@ void Core::Entity::Player::autoAttack( ActorPtr pTarget )
uint32_t damage = static_cast< uint32_t >( mainWeap->getAutoAttackDmg() );
uint32_t variation = 0 + rand() % 3;
if ( getClass() == JOB_MACHINIST ||
getClass() == JOB_BARD ||
getClass() == CLASS_ARCHER )
if ( getClass() == ClassJob::Machinist||
getClass() == ClassJob::Bard ||
getClass() == ClassJob::Archer )
{
GamePacketNew< FFXIVIpcEffect, ServerZoneIpcType > effectPacket(getId());
effectPacket.data().targetId = pTarget->getId();

View file

@ -28,48 +28,48 @@ void Core::Entity::Player::equipWeapon( Core::ItemPtr pItem )
switch( pItem->getCategory() )
{
case ItemCategory::PugWep:
if( currentClass != ClassJob::CLASS_PUGILIST &&
currentClass != ClassJob::JOB_MONK )
setClassJob( ClassJob::CLASS_PUGILIST );
case ItemUICategory::PugilistsArm:
if( currentClass != ClassJob::Pugilist &&
currentClass != ClassJob::Monk )
setClassJob( ClassJob::Pugilist );
break;
case ItemCategory::GlaWep:
if( currentClass != ClassJob::CLASS_GLADIATOR &&
currentClass != ClassJob::JOB_KNIGHT )
setClassJob( ClassJob::CLASS_GLADIATOR );
case ItemUICategory::GladiatorsArm:
if( currentClass != ClassJob::Gladiator &&
currentClass != ClassJob::Paladin )
setClassJob( ClassJob::Gladiator );
break;
case ItemCategory::MrdWep:
if( currentClass != ClassJob::CLASS_MARAUDER &&
currentClass != ClassJob::JOB_WARRIOR )
setClassJob( ClassJob::CLASS_MARAUDER );
case ItemUICategory::MaraudersArm:
if( currentClass != ClassJob::Marauder &&
currentClass != ClassJob::Warrior )
setClassJob( ClassJob::Marauder );
break;
case ItemCategory::ArcWep:
if( currentClass != ClassJob::CLASS_ARCHER &&
currentClass != ClassJob::JOB_BARD )
setClassJob( ClassJob::CLASS_ARCHER );
case ItemUICategory::ArchersArm:
if( currentClass != ClassJob::Archer &&
currentClass != ClassJob::Bard )
setClassJob( ClassJob::Archer );
break;
case ItemCategory::LncWep:
if( currentClass != ClassJob::CLASS_LANCER &&
currentClass != ClassJob::JOB_DRAGON )
setClassJob( ClassJob::CLASS_LANCER );
case ItemUICategory::LancersArm:
if( currentClass != ClassJob::Lancer &&
currentClass != ClassJob::Dragoon )
setClassJob( ClassJob::Lancer );
break;
case ItemCategory::ThmWep:
case ItemCategory::Thm2Wep:
if( currentClass != ClassJob::CLASS_THAUMATURGE &&
currentClass != ClassJob::JOB_BLACKMAGE )
setClassJob( ClassJob::CLASS_THAUMATURGE );
case ItemUICategory::OnehandedThaumaturgesArm:
case ItemUICategory::TwohandedThaumaturgesArm:
if( currentClass != ClassJob::Thaumaturge &&
currentClass != ClassJob::Blackmage )
setClassJob( ClassJob::Thaumaturge );
break;
case ItemCategory::CnjWep:
case ItemCategory::Cnj2Wep:
if( currentClass != ClassJob::CLASS_CONJURER &&
currentClass != ClassJob::JOB_WHITEMAGE )
setClassJob( ClassJob::CLASS_CONJURER );
case ItemUICategory::OnehandedConjurersArm:
case ItemUICategory::TwohandedConjurersArm:
if( currentClass != ClassJob::Conjurer &&
currentClass != ClassJob::Whitemage )
setClassJob( ClassJob::Conjurer );
break;
case ItemCategory::ArnWep:
if( currentClass != ClassJob::CLASS_ARCANIST &&
currentClass != ClassJob::JOB_SUMMONER &&
currentClass != ClassJob::JOB_SCHOLAR )
setClassJob( ClassJob::CLASS_ARCANIST );
case ItemUICategory::ArcanistsGrimoire:
if( currentClass != ClassJob::Arcanist &&
currentClass != ClassJob::Summoner &&
currentClass != ClassJob::Scholar )
setClassJob( ClassJob::Arcanist );
break;
default:
break;

View file

@ -153,7 +153,7 @@ Core::ItemPtr Core::Inventory::createItem( uint32_t catalogId, uint8_t quantity
pItem->setStackSize( itemAmount );
pItem->setUId( getNextUId() );
pItem->setModelIds( itemInfo->model_primary, itemInfo->model_secondary );
pItem->setCategory( static_cast< ItemCategory >( itemInfo->ui_category ) );
pItem->setCategory( static_cast< ItemUICategory >( itemInfo->ui_category ) );
g_charaDb.execute( "INSERT INTO charaglobalitem ( CharacterId, itemId, catalogId, stack, flags ) VALUES ( " +
std::to_string( m_pOwner->getId() ) + ", " +
@ -636,7 +636,7 @@ Core::ItemPtr Core::Inventory::loadItem( uint64_t uId )
itemInfo->id,
itemInfo->model_primary,
itemInfo->model_secondary,
static_cast< ItemCategory >( itemInfo->ui_category ),
static_cast< ItemUICategory >( itemInfo->ui_category ),
isHq ) );
pItem->setStackSize( itemRes->getUInt( 2 ) );

View file

@ -16,10 +16,10 @@ Core::Item::Item( uint32_t catalogId ) :
}
Core::Item::Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, Common::ItemCategory categoryId, bool isHq ) :
Core::Item::Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, Common::ItemUICategory categoryId, bool isHq ) :
m_id( catalogId ),
m_uId( uId ),
m_category( categoryId ),
m_category( static_cast< Common::ItemUICategory >( categoryId ) ),
m_model1( model1 ),
m_model2( model2 ),
m_isHq( isHq )
@ -92,12 +92,12 @@ uint32_t Core::Item::getStackSize() const
return m_stackSize;
}
void Core::Item::setCategory( Common::ItemCategory categoryId )
void Core::Item::setCategory( Common::ItemUICategory categoryId )
{
m_category = categoryId;
}
Core::Common::ItemCategory Core::Item::getCategory() const
Core::Common::ItemUICategory Core::Item::getCategory() const
{
return m_category;
}

View file

@ -11,7 +11,7 @@ class Item
public:
Item();
Item( uint32_t catalogId );
Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, Common::ItemCategory categoryId, bool isHq = false );
Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, Common::ItemUICategory categoryId, bool isHq = false );
~Item();
uint32_t getId() const;
@ -26,9 +26,9 @@ public:
uint32_t getStackSize() const;
void setCategory( Common::ItemCategory categoryId );
void setCategory( Common::ItemUICategory categoryId );
Common::ItemCategory getCategory() const;
Common::ItemUICategory getCategory() const;
void setModelIds( uint64_t model1, uint64_t model2 );
@ -56,7 +56,7 @@ protected:
uint64_t m_uId;
Common::ItemCategory m_category;
Common::ItemUICategory m_category;
uint32_t m_stackSize;
std::vector< uint8_t > m_classJobList;

View file

@ -497,7 +497,7 @@ void Core::Network::GameConnection::gm2Handler( const Packets::GamePacket& inPac
"\nGil: " + std::to_string( targetPlayer->getCurrency( 1 ) ) +
"\nZone: " + targetPlayer->getCurrentZone()->getName() +
"(" + std::to_string( targetPlayer->getZoneId() ) + ")" +
"\nClass: " + std::to_string( targetPlayer->getClass() ) +
"\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() +

View file

@ -29,7 +29,7 @@ private:
{
// TODO: temporary gm rank
m_data.gmRank = 0xff;
m_data.classJob = pPlayer->getClass();
m_data.classJob = static_cast< uint8_t >( pPlayer->getClass() );
m_data.status = static_cast< uint8_t >( pPlayer->getStatus() );
m_data.hPCurr = pPlayer->getHp();
m_data.mPCurr = pPlayer->getMp();

View file

@ -36,9 +36,9 @@ private:
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< Common::ClassJob >( player->getClass() );
m_data.currentJob = static_cast< Common::ClassJob >( player->getClass() );
m_data.deity = static_cast< Common::GuardianDeity >( player->getGuardianDeity() );
m_data.currentClass = static_cast< uint8_t >( player->getClass() );
m_data.currentJob = static_cast< uint8_t >( player->getClass() );
m_data.deity = static_cast< uint8_t >( player->getGuardianDeity() );
m_data.namedayMonth = player->getBirthMonth();
m_data.namedayDay = player->getBirthDay();
// TODO: Support grand company status.

View file

@ -36,7 +36,7 @@ namespace Server {
// TODO: temporary gm rank
//m_data.gmRank = 0xff;
m_data.classJob = pPlayer->getClass();
m_data.classJob = static_cast< uint8_t >( pPlayer->getClass() );
//m_data.status = static_cast< uint8_t >( pPlayer->getStatus() );
m_data.hPCurr = pPlayer->getHp();

View file

@ -46,7 +46,7 @@ Zone::Zone()
, m_layoutId( 0 )
, m_bPrivate( false )
, m_type( Common::RegionType::normal )
, m_currentWeather( static_cast<uint8_t>( Common::Weather::Fair ) )
, m_currentWeather( static_cast<uint8_t>( Common::Weather::FairSkies ) )
, m_weatherOverride( 0 )
, m_lastMobUpdate( 0 )
{
@ -54,7 +54,7 @@ Zone::Zone()
Zone::Zone( uint16_t zoneId, uint32_t layoutId, std::string name, std::string interName, bool bPrivate = false )
: m_type( Common::RegionType::normal )
, m_currentWeather( static_cast<uint8_t>( Common::Weather::Fair ) )
, m_currentWeather( static_cast<uint8_t>( Common::Weather::FairSkies ) )
{
m_layoutId = layoutId;

View file

@ -20,8 +20,8 @@ Core::Logger g_log;
Core::Data::ExdData g_exdData;
const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" );
//const std::string datLocation( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv" );
//const std::string datLocation( "/opt/sapphire_3_15_0/bin/sqpack" );
const std::string datLocation( "C:\\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 )
{
@ -66,10 +66,11 @@ std::string generateEnum( const std::string& exd, int8_t nameIndex, const std::s
result += " " + str + " = " + std::to_string( id ) + ",\n";
}
result += " };\n";
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;
}
@ -87,7 +88,9 @@ int main()
return 0;
}
std::string result =
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";
@ -110,7 +113,7 @@ int main()
result += generateEnum( "Town", 0, "uint8_t" );
result += generateEnum( "Weather", 1, "uint8_t" );
result += "}\n";
result += "}\n";
result += "}\n#endif\n";
g_log.info( result );
return 0;
}