mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
Fixed small event issues. Changed sapphire to use new DB setup. Database has to be created using the schema.sql and inserts.sql
This commit is contained in:
parent
b0f265bd9f
commit
66c3aba1f6
10 changed files with 9858 additions and 60 deletions
9185
sql/schema/inserts.sql
Normal file
9185
sql/schema/inserts.sql
Normal file
File diff suppressed because it is too large
Load diff
565
sql/schema/schema.sql
Normal file
565
sql/schema/schema.sql
Normal file
|
@ -0,0 +1,565 @@
|
|||
|
||||
CREATE TABLE `accounts` (
|
||||
`account_id` int(11) NOT NULL DEFAULT '0',
|
||||
`account_name` varchar(255) COLLATE latin1_general_ci NOT NULL,
|
||||
`account_pass` varchar(255) COLLATE latin1_general_ci NOT NULL,
|
||||
`account_created` int(11) NOT NULL DEFAULT '0',
|
||||
`account_status` tinyint(4) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`account_id`),
|
||||
UNIQUE KEY `accountname` (`account_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `bnpctemplate` (
|
||||
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` varchar(32) NOT NULL,
|
||||
`bNPCBaseId` int(10) DEFAULT NULL,
|
||||
`bNPCNameId` int(10) NOT NULL,
|
||||
`mainWeaponModel` bigint(20) DEFAULT NULL,
|
||||
`secWeaponModel` bigint(20) DEFAULT NULL,
|
||||
`aggressionMode` int(3) DEFAULT NULL,
|
||||
`enemyType` int(3) DEFAULT NULL,
|
||||
`pose` int(3) DEFAULT NULL,
|
||||
`modelChara` int(5) DEFAULT NULL,
|
||||
`displayFlags` int(10) DEFAULT NULL,
|
||||
`Look` binary(26) DEFAULT NULL,
|
||||
`Models` binary(40) DEFAULT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
KEY `templatename` (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charainfo` (
|
||||
`AccountId` int(11) NOT NULL,
|
||||
`CharacterId` int(20) NOT NULL,
|
||||
`ContentId` bigint(20) DEFAULT NULL,
|
||||
`Name` varchar(32) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL,
|
||||
`Hp` bigint(20) DEFAULT '200',
|
||||
`Mp` bigint(20) DEFAULT '200',
|
||||
`Tp` bigint(20) DEFAULT '0',
|
||||
`Gp` bigint(20) DEFAULT '0',
|
||||
`Mode` smallint(6) DEFAULT '0',
|
||||
`Mount` smallint(6) DEFAULT '0',
|
||||
`InvincibleGM` smallint(6) DEFAULT '0',
|
||||
`Voice` smallint(6) DEFAULT '0',
|
||||
`Customize` binary(26) DEFAULT NULL,
|
||||
`ModelMainWeapon` decimal(20,0) DEFAULT '0',
|
||||
`ModelSubWeapon` decimal(20,0) DEFAULT '0',
|
||||
`ModelSystemWeapon` decimal(20,0) DEFAULT '0',
|
||||
`ModelEquip` binary(40) DEFAULT NULL,
|
||||
`EmoteModeType` smallint(6) DEFAULT '0',
|
||||
`FirstLoginTime` decimal(20,0) DEFAULT '0',
|
||||
`Language` bigint(20) DEFAULT '0',
|
||||
`IsNewGame` smallint(6) DEFAULT '1',
|
||||
`IsNewAdventurer` int(1) NOT NULL DEFAULT '1',
|
||||
`TerritoryType` int(11) DEFAULT '0',
|
||||
`TerritoryId` decimal(20,0) DEFAULT '0',
|
||||
`PosX` float DEFAULT '0',
|
||||
`PosY` float DEFAULT '0',
|
||||
`PosZ` float DEFAULT '0',
|
||||
`PosR` float DEFAULT '0',
|
||||
`OTerritoryType` int(11) DEFAULT '0',
|
||||
`OTerritoryId` decimal(20,0) DEFAULT '0',
|
||||
`OPosX` float DEFAULT '0',
|
||||
`OPosY` float DEFAULT '0',
|
||||
`OPosZ` float DEFAULT '0',
|
||||
`OPosR` float DEFAULT '0',
|
||||
`GuardianDeity` int(3) DEFAULT '0',
|
||||
`BirthDay` int(3) DEFAULT '0',
|
||||
`BirthMonth` int(3) DEFAULT '0',
|
||||
`Class` int(3) DEFAULT '0',
|
||||
`Status` int(3) DEFAULT '0',
|
||||
`TotalPlayTime` int(10) DEFAULT '0',
|
||||
`FirstClass` int(3) DEFAULT '0',
|
||||
`HomePoint` int(3) DEFAULT '0',
|
||||
`FavoritePoint` binary(3) DEFAULT NULL,
|
||||
`RestPoint` int(10) DEFAULT '0',
|
||||
`StartTown` int(3) DEFAULT '0',
|
||||
`ActiveTitle` int(5) DEFAULT '0',
|
||||
`TitleList` binary(48) DEFAULT NULL,
|
||||
`Achievement` binary(16) DEFAULT NULL,
|
||||
`Aetheryte` binary(17) DEFAULT NULL,
|
||||
`HowTo` binary(33) DEFAULT NULL,
|
||||
`Minions` binary(40) DEFAULT NULL,
|
||||
`Mounts` binary(17) DEFAULT NULL,
|
||||
`Orchestrion` binary(40) DEFAULT NULL,
|
||||
`EquippedMannequin` int(5) DEFAULT '0',
|
||||
`ConfigFlags` smallint(5) NOT NULL DEFAULT '0',
|
||||
`QuestCompleteFlags` varbinary(396) DEFAULT NULL,
|
||||
`OpeningSequence` int(3) DEFAULT '0',
|
||||
`QuestTracking` binary(10) DEFAULT NULL,
|
||||
`GrandCompany` int(3) DEFAULT '0',
|
||||
`GrandCompanyRank` binary(3) DEFAULT NULL,
|
||||
`Discovery` varbinary(421) DEFAULT NULL,
|
||||
`GMRank` int(3) DEFAULT '0',
|
||||
`EquipDisplayFlags` int(3) DEFAULT '0',
|
||||
`Pose` int(3) DEFAULT '0',
|
||||
`Unlocks` binary(64) DEFAULT NULL,
|
||||
`CFPenaltyUntil` int(11) DEFAULT NULL,
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`CharacterId`),
|
||||
KEY `index` (`AccountId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `characlass` (
|
||||
`CharacterId` int(20) NOT NULL DEFAULT '0',
|
||||
`ClassIdx` int(3) DEFAULT '0',
|
||||
`Exp` int(10) DEFAULT '0',
|
||||
`Lvl` int(5) DEFAULT '0',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`,`ClassIdx`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charaglobalitem` (
|
||||
`CharacterId` int(20) NOT NULL DEFAULT '0',
|
||||
`itemId` int(20) NOT NULL DEFAULT '0',
|
||||
`storageId` int(5) NOT NULL DEFAULT '0',
|
||||
`containerIndex` int(5) NOT NULL DEFAULT '0',
|
||||
`stack` int(10) DEFAULT '1',
|
||||
`catalogId` int(10) DEFAULT '0',
|
||||
`reservedFlag` int(10) DEFAULT '0',
|
||||
`signatureId` int(20) DEFAULT '0',
|
||||
`flags` int(3) DEFAULT '0',
|
||||
`durability` int(5) DEFAULT '30000',
|
||||
`refine` int(5) DEFAULT '0',
|
||||
`materia_0` int(5) DEFAULT '0',
|
||||
`materia_1` int(5) DEFAULT '0',
|
||||
`materia_2` int(5) DEFAULT '0',
|
||||
`materia_3` int(5) DEFAULT '0',
|
||||
`materia_4` int(5) DEFAULT '0',
|
||||
`stain` int(3) DEFAULT '0',
|
||||
`pattern` int(10) DEFAULT '0',
|
||||
`buffer_0` int(3) DEFAULT '0',
|
||||
`buffer_1` int(3) DEFAULT '0',
|
||||
`buffer_2` int(3) DEFAULT '0',
|
||||
`buffer_3` int(3) DEFAULT '0',
|
||||
`buffer_4` int(3) DEFAULT '0',
|
||||
`deleted` int(1) DEFAULT '0',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`,`itemId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charainfoblacklist` (
|
||||
`CharacterId` int(20) NOT NULL,
|
||||
`CharacterIdList` blob,
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charainfolinkshell` (
|
||||
`CharacterId` int(20) NOT NULL,
|
||||
`LinkshellIdList` binary(64) DEFAULT NULL,
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charainfosearch` (
|
||||
`CharacterId` int(20) DEFAULT NULL,
|
||||
`SelectClassId` int(3) DEFAULT '0',
|
||||
`SelectRegion` int(3) DEFAULT '0',
|
||||
`SearchComment` binary(193) DEFAULT '\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\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\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\0\0\0\0',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charaitemcrystal` (
|
||||
`CharacterId` int(20) DEFAULT '0',
|
||||
`storageId` int(10) DEFAULT '2001',
|
||||
`type` int(5) DEFAULT '0',
|
||||
`idx` int(5) NOT NULL ,
|
||||
`container_0` int(20) DEFAULT '0',
|
||||
`container_1` int(20) DEFAULT '0',
|
||||
`container_2` int(20) DEFAULT '0',
|
||||
`container_3` int(20) DEFAULT '0',
|
||||
`container_4` int(20) DEFAULT '0',
|
||||
`container_5` int(20) DEFAULT '0',
|
||||
`container_6` int(20) DEFAULT '0',
|
||||
`container_7` int(20) DEFAULT '0',
|
||||
`container_8` int(20) DEFAULT '0',
|
||||
`container_9` int(20) DEFAULT '0',
|
||||
`container_10` int(20) DEFAULT '0',
|
||||
`container_11` int(20) DEFAULT '0',
|
||||
`container_12` int(20) DEFAULT '0',
|
||||
`container_13` int(20) DEFAULT '0',
|
||||
`container_14` int(20) DEFAULT '0',
|
||||
`container_15` int(20) DEFAULT '0',
|
||||
`container_16` int(20) DEFAULT '0',
|
||||
`container_17` int(20) DEFAULT '0',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`,`storageId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charaitemcurrency` (
|
||||
`CharacterId` int(20) NOT NULL,
|
||||
`storageId` int(10) DEFAULT '2000',
|
||||
`type` int(5) DEFAULT '0',
|
||||
`idx` int(5) NOT NULL,
|
||||
`container_0` int(20) DEFAULT '0',
|
||||
`container_1` int(20) DEFAULT '0',
|
||||
`container_2` int(20) DEFAULT '0',
|
||||
`container_3` int(20) DEFAULT '0',
|
||||
`container_4` int(20) DEFAULT '0',
|
||||
`container_5` int(20) DEFAULT '0',
|
||||
`container_6` int(20) DEFAULT '0',
|
||||
`container_7` int(20) DEFAULT '0',
|
||||
`container_8` int(20) DEFAULT '0',
|
||||
`container_9` int(20) DEFAULT '0',
|
||||
`container_10` int(20) DEFAULT '0',
|
||||
`container_11` int(20) DEFAULT '0',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`,`storageId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charaitemgearset` (
|
||||
`CharacterId` int(20) NOT NULL,
|
||||
`storageId` int(10) NOT NULL,
|
||||
`type` int(5) DEFAULT '0',
|
||||
`idx` int(5) NOT NULL,
|
||||
`container_0` int(20) DEFAULT '0',
|
||||
`container_1` int(20) DEFAULT '0',
|
||||
`container_2` int(20) DEFAULT '0',
|
||||
`container_3` int(20) DEFAULT '0',
|
||||
`container_4` int(20) DEFAULT '0',
|
||||
`container_5` int(20) DEFAULT '0',
|
||||
`container_6` int(20) DEFAULT '0',
|
||||
`container_7` int(20) DEFAULT '0',
|
||||
`container_8` int(20) DEFAULT '0',
|
||||
`container_9` int(20) DEFAULT '0',
|
||||
`container_10` int(20) DEFAULT '0',
|
||||
`container_11` int(20) DEFAULT '0',
|
||||
`container_12` int(20) DEFAULT '0',
|
||||
`container_13` int(20) DEFAULT '0',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`,`storageId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charaiteminventory` (
|
||||
`CharacterId` int(20) NOT NULL,
|
||||
`storageId` int(10) NOT NULL,
|
||||
`type` int(5) DEFAULT '0',
|
||||
`idx` int(5) NOT NULL,
|
||||
`container_0` int(20) DEFAULT '0',
|
||||
`container_1` int(20) DEFAULT '0',
|
||||
`container_2` int(20) DEFAULT '0',
|
||||
`container_3` int(20) DEFAULT '0',
|
||||
`container_4` int(20) DEFAULT '0',
|
||||
`container_5` int(20) DEFAULT '0',
|
||||
`container_6` int(20) DEFAULT '0',
|
||||
`container_7` int(20) DEFAULT '0',
|
||||
`container_8` int(20) DEFAULT '0',
|
||||
`container_9` int(20) DEFAULT '0',
|
||||
`container_10` int(20) DEFAULT '0',
|
||||
`container_11` int(20) DEFAULT '0',
|
||||
`container_12` int(20) DEFAULT '0',
|
||||
`container_13` int(20) DEFAULT '0',
|
||||
`container_14` int(20) DEFAULT '0',
|
||||
`container_15` int(20) DEFAULT '0',
|
||||
`container_16` int(20) DEFAULT '0',
|
||||
`container_17` int(20) DEFAULT '0',
|
||||
`container_18` int(20) DEFAULT '0',
|
||||
`container_19` int(20) DEFAULT '0',
|
||||
`container_20` int(20) DEFAULT '0',
|
||||
`container_21` int(20) DEFAULT '0',
|
||||
`container_22` int(20) DEFAULT '0',
|
||||
`container_23` int(20) DEFAULT '0',
|
||||
`container_24` int(20) DEFAULT '0',
|
||||
`container_25` int(20) DEFAULT '0',
|
||||
`container_26` int(20) DEFAULT '0',
|
||||
`container_27` int(20) DEFAULT '0',
|
||||
`container_28` int(20) DEFAULT '0',
|
||||
`container_29` int(20) DEFAULT '0',
|
||||
`container_30` int(20) DEFAULT '0',
|
||||
`container_31` int(20) DEFAULT '0',
|
||||
`container_32` int(20) DEFAULT '0',
|
||||
`container_33` int(20) DEFAULT '0',
|
||||
`container_34` int(20) DEFAULT '0',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`,`storageId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charaquest` (
|
||||
`CharacterId` int(20) DEFAULT '0',
|
||||
`slotId` int(20) DEFAULT '0',
|
||||
`QuestId` int(5) DEFAULT '0',
|
||||
`Sequence` int(3) DEFAULT '0',
|
||||
`Flags` int(3) DEFAULT '0',
|
||||
`Variables_0` int(3) DEFAULT '0',
|
||||
`Variables_1` int(3) DEFAULT '0',
|
||||
`Variables_2` int(3) DEFAULT '0',
|
||||
`Variables_3` int(3) DEFAULT '0',
|
||||
`Variables_4` int(3) DEFAULT '0',
|
||||
`Variables_5` int(3) DEFAULT '0',
|
||||
`Variables_6` int(3) DEFAULT '0',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`,`slotId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `charastatus` (
|
||||
`CharacterId` int(20) DEFAULT NULL,
|
||||
`Recast_0` binary(24) DEFAULT NULL,
|
||||
`Recast_1` binary(24) DEFAULT NULL,
|
||||
`Recast_2` binary(24) DEFAULT NULL,
|
||||
`Recast_3` binary(24) DEFAULT NULL,
|
||||
`Recast_4` binary(24) DEFAULT NULL,
|
||||
`Recast_5` binary(24) DEFAULT NULL,
|
||||
`Recast_6` binary(24) DEFAULT NULL,
|
||||
`Recast_7` binary(24) DEFAULT NULL,
|
||||
`Recast_8` binary(24) DEFAULT NULL,
|
||||
`Recast_9` binary(24) DEFAULT NULL,
|
||||
`Recast_10` binary(24) DEFAULT NULL,
|
||||
`Recast_11` binary(24) DEFAULT NULL,
|
||||
`Recast_12` binary(24) DEFAULT NULL,
|
||||
`Recast_13` binary(24) DEFAULT NULL,
|
||||
`Recast_14` binary(24) DEFAULT NULL,
|
||||
`Recast_15` binary(24) DEFAULT NULL,
|
||||
`Recast_16` binary(24) DEFAULT NULL,
|
||||
`Recast_17` binary(24) DEFAULT NULL,
|
||||
`Recast_18` binary(24) DEFAULT NULL,
|
||||
`Recast_19` binary(24) DEFAULT NULL,
|
||||
`Recast_20` binary(24) DEFAULT NULL,
|
||||
`Recast_21` binary(24) DEFAULT NULL,
|
||||
`Recast_22` binary(24) DEFAULT NULL,
|
||||
`Recast_23` binary(24) DEFAULT NULL,
|
||||
`Recast_24` binary(24) DEFAULT NULL,
|
||||
`Recast_25` binary(24) DEFAULT NULL,
|
||||
`Recast_26` binary(24) DEFAULT NULL,
|
||||
`Recast_27` binary(24) DEFAULT NULL,
|
||||
`Recast_28` binary(24) DEFAULT NULL,
|
||||
`Recast_29` binary(24) DEFAULT NULL,
|
||||
`Recast_30` binary(24) DEFAULT NULL,
|
||||
`Recast_31` binary(24) DEFAULT NULL,
|
||||
`Recast_32` binary(24) DEFAULT NULL,
|
||||
`Recast_33` binary(24) DEFAULT NULL,
|
||||
`Recast_34` binary(24) DEFAULT NULL,
|
||||
`Recast_35` binary(24) DEFAULT NULL,
|
||||
`Recast_36` binary(24) DEFAULT NULL,
|
||||
`Recast_37` binary(24) DEFAULT NULL,
|
||||
`Recast_38` binary(24) DEFAULT NULL,
|
||||
`Recast_39` binary(24) DEFAULT NULL,
|
||||
`Recast_40` binary(24) DEFAULT NULL,
|
||||
`Recast_41` binary(24) DEFAULT NULL,
|
||||
`Recast_42` binary(24) DEFAULT NULL,
|
||||
`Recast_43` binary(24) DEFAULT NULL,
|
||||
`Recast_44` binary(24) DEFAULT NULL,
|
||||
`Recast_45` binary(24) DEFAULT NULL,
|
||||
`Recast_46` binary(24) DEFAULT NULL,
|
||||
`Recast_47` binary(24) DEFAULT NULL,
|
||||
`Recast_48` binary(24) DEFAULT NULL,
|
||||
`Recast_49` binary(24) DEFAULT NULL,
|
||||
`Recast_50` binary(24) DEFAULT NULL,
|
||||
`Recast_51` binary(24) DEFAULT NULL,
|
||||
`Recast_52` binary(24) DEFAULT NULL,
|
||||
`Recast_53` binary(24) DEFAULT NULL,
|
||||
`Status_0` binary(78) DEFAULT NULL,
|
||||
`Status_1` binary(78) DEFAULT NULL,
|
||||
`Status_2` binary(78) DEFAULT NULL,
|
||||
`Status_3` binary(78) DEFAULT NULL,
|
||||
`Status_4` binary(78) DEFAULT NULL,
|
||||
`Status_5` binary(78) DEFAULT NULL,
|
||||
`Status_6` binary(78) DEFAULT NULL,
|
||||
`Status_7` binary(78) DEFAULT NULL,
|
||||
`Status_8` binary(78) DEFAULT NULL,
|
||||
`Status_9` binary(78) DEFAULT NULL,
|
||||
`Status_10` binary(78) DEFAULT NULL,
|
||||
`Status_11` binary(78) DEFAULT NULL,
|
||||
`Status_12` binary(78) DEFAULT NULL,
|
||||
`Status_13` binary(78) DEFAULT NULL,
|
||||
`Status_14` binary(78) DEFAULT NULL,
|
||||
`Status_15` binary(78) DEFAULT NULL,
|
||||
`Status_16` binary(78) DEFAULT NULL,
|
||||
`Status_17` binary(78) DEFAULT NULL,
|
||||
`Status_18` binary(78) DEFAULT NULL,
|
||||
`Status_19` binary(78) DEFAULT NULL,
|
||||
`Status_20` binary(78) DEFAULT NULL,
|
||||
`Status_21` binary(78) DEFAULT NULL,
|
||||
`Status_22` binary(78) DEFAULT NULL,
|
||||
`Status_23` binary(78) DEFAULT NULL,
|
||||
`Status_24` binary(78) DEFAULT NULL,
|
||||
`Status_25` binary(78) DEFAULT NULL,
|
||||
`Status_26` binary(78) DEFAULT NULL,
|
||||
`Status_27` binary(78) DEFAULT NULL,
|
||||
`Status_28` binary(78) DEFAULT NULL,
|
||||
`Status_29` binary(78) DEFAULT NULL,
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`CharacterId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `dbupdate` (
|
||||
`name` varchar(128) NOT NULL,
|
||||
`executionTime` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `discoveryinfo` (
|
||||
`id` int(10) NOT NULL,
|
||||
`map_id` int(3) NOT NULL,
|
||||
`discover_id` int(3) NOT NULL,
|
||||
PRIMARY KEY(`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `house` (
|
||||
`HouseId` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`LandSetId` int(10) UNSIGNED DEFAULT NULL,
|
||||
`BuildTime` bigint(20) DEFAULT NULL,
|
||||
`Aetheryte` smallint(6) DEFAULT NULL,
|
||||
`Welcome` smallint(6) DEFAULT NULL,
|
||||
`Comment` binary(193) DEFAULT '\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\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\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\0\0\0\0',
|
||||
`HouseName` binary(23) DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
`Endorsements` bigint(20) DEFAULT NULL,
|
||||
`HousePartModels` binary(32) DEFAULT '\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',
|
||||
`HousePartColours` binary(8) DEFAULT '\0\0\0\0\0\0\0\0',
|
||||
`HouseInteriorModels` binary(40) DEFAULT '\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',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`HouseId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `housepartsitem` (
|
||||
`HouseId` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`itemId` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`CharacterId` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`HouseId`),
|
||||
KEY `index` (`CharacterId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `housepartsstorage` (
|
||||
`LandSetId` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`HouseId` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`storageId` bigint(20) DEFAULT NULL,
|
||||
`type` int(11) DEFAULT NULL,
|
||||
`index` int(11) DEFAULT NULL,
|
||||
`container_0` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`container_1` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`container_2` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`container_3` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`container_4` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`container_5` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`container_6` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`container_7` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`LandSetId`,`HouseId`,`storageId`,`index`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `infolinkshell` (
|
||||
`LinkshellId` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`MasterCharacterId` int(20) DEFAULT NULL,
|
||||
`CharacterIdList` blob,
|
||||
`LinkshellName` varchar(32) DEFAULT NULL,
|
||||
`LeaderIdList` blob,
|
||||
`InviteIdList` blob,
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`LinkshellId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `land` (
|
||||
`LandSetId` bigint(20) UNSIGNED NOT NULL,
|
||||
`LandId` bigint(20) UNSIGNED NOT NULL,
|
||||
`Type` smallint(6) NOT NULL DEFAULT '0',
|
||||
`Size` smallint(6) DEFAULT NULL,
|
||||
`Status` smallint(6) DEFAULT NULL,
|
||||
`LandPrice` bigint(20) DEFAULT NULL,
|
||||
`UpdateTime` bigint(20) DEFAULT NULL,
|
||||
`OwnerId` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`HouseId` bigint(20) UNSIGNED DEFAULT NULL,
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`LandSetId`, `LandId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `landset` (
|
||||
`LandSetId` bigint(20) UNSIGNED NOT NULL,
|
||||
`LandId_0` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_1` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_2` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_3` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_4` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_5` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_6` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_7` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_8` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_9` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_10` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_11` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_12` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_13` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_14` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_15` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_16` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_17` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_18` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_19` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_20` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_21` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_22` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_23` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_24` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_25` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_26` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_27` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_28` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_29` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_30` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_31` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_32` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_33` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_34` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_35` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_36` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_37` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_38` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_39` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_40` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_41` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_42` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_43` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_44` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_45` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_46` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_47` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_48` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_49` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_50` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_51` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_52` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_53` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_54` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_55` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_56` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_57` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_58` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`LandId_59` bigint(20) UNSIGNED DEFAULT '0',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`LandSetId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `houseiteminventory` (
|
||||
`landIdent` BIGINT(20) UNSIGNED NOT NULL,
|
||||
`containerId` INT(10) UNSIGNED NOT NULL,
|
||||
`itemId` INT(20) NOT NULL,
|
||||
INDEX `landIdent` (`landIdent`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `spawngroup` (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`territoryTypeId` int(5) NOT NULL,
|
||||
`bNpcTemplateId` int(10) NOT NULL,
|
||||
`level` int(3) NOT NULL,
|
||||
`maxHp` int(10) NOT NULL,
|
||||
`gimmickId` int(10) NOT NULL,
|
||||
PRIMARY KEY(`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `uniqueiddata` (
|
||||
`NextId` int(20) NOT NULL AUTO_INCREMENT,
|
||||
`IdName` varchar(16) DEFAULT 'NOT SET',
|
||||
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(`NextId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `zonepositions` (
|
||||
`id` int(11) NOT NULL,
|
||||
`target_zone_id` int(11) NOT NULL,
|
||||
`pos_x` float NOT NULL,
|
||||
`pos_y` float NOT NULL,
|
||||
`pos_z` float NOT NULL,
|
||||
`pos_o` float NOT NULL,
|
||||
`radius` int(11) NOT NULL DEFAULT '2',
|
||||
PRIMARY KEY(`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
|
@ -142,19 +142,19 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements()
|
|||
|
||||
/// QUEST INFO
|
||||
prepareStatement( CHARA_QUEST_INS,
|
||||
"INSERT INTO charaquestnew ( CharacterId, SlotId, QuestId, Sequence, Flags, Variables_0, "
|
||||
"INSERT INTO charaquest ( 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 = ?, "
|
||||
prepareStatement( CHARA_QUEST_UP, "UPDATE charaquest 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 = ?;",
|
||||
prepareStatement( CHARA_QUEST_DEL, "DELETE FROM charaquest WHERE CharacterId = ? AND QuestId = ?;",
|
||||
CONNECTION_ASYNC );
|
||||
|
||||
prepareStatement( CHARA_SEL_QUEST, "SELECT * FROM charaquestnew WHERE CharacterId = ?;", CONNECTION_SYNC );
|
||||
prepareStatement( CHARA_SEL_QUEST, "SELECT * FROM charaquest WHERE CharacterId = ?;", CONNECTION_SYNC );
|
||||
|
||||
/// CLASS INFO
|
||||
prepareStatement( CHARA_CLASS_SEL, "SELECT ClassIdx, Exp, Lvl FROM characlass WHERE CharacterId = ?;",
|
||||
|
@ -188,7 +188,7 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements()
|
|||
CONNECTION_BOTH );
|
||||
|
||||
prepareStatement( CHARA_ITEMGLOBAL_DELETE,
|
||||
"UPDATE charaglobalitem SET IS_DELETE = 1 WHERE ItemId = ?;",
|
||||
"UPDATE charaglobalitem SET deleted = 1 WHERE ItemId = ?;",
|
||||
CONNECTION_BOTH );
|
||||
|
||||
/// HOUSING
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#include "DbManager.h"
|
||||
#include <MySqlConnector.h>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <streambuf>
|
||||
#include <sstream>
|
||||
|
||||
DbManager::DbManager( const std::string& host, const std::string& database, const std::string& user, const std::string& pw, uint16_t port ) :
|
||||
m_host( host ),
|
||||
m_database( database ),
|
||||
|
@ -114,10 +119,18 @@ bool DbManager::performAction()
|
|||
bool DbManager::modeInit()
|
||||
{
|
||||
|
||||
const std::string schemaFile = "sql/schema/schema.sql";
|
||||
const std::string insertFile = "sql/schema/inserts.sql";
|
||||
|
||||
bool result = false;
|
||||
|
||||
if( selectSchema() )
|
||||
{
|
||||
// TODO: allow init if database is empty
|
||||
// select count(*)
|
||||
// from information_schema.tables
|
||||
// where table_type = 'BASE TABLE'
|
||||
// and table_schema = 'your_database_name_here'
|
||||
m_lastError = "Database already existing, use <liquidate> mode first to remove it.";
|
||||
return false;
|
||||
}
|
||||
|
@ -125,12 +138,41 @@ bool DbManager::modeInit()
|
|||
if( !execute( "CREATE DATABASE " + m_database ) )
|
||||
return false;
|
||||
|
||||
if( !execute( "CREATE TABLE `dbversion` (\n"
|
||||
" `major` int(11) NOT NULL,\n"
|
||||
" `minor` int(11) NOT NULL\n"
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=latin1;" ) )
|
||||
if( !selectSchema() )
|
||||
{
|
||||
m_lastError = "Database not created.";
|
||||
return false;
|
||||
}
|
||||
|
||||
std::ifstream t( schemaFile );
|
||||
if( !t.is_open() )
|
||||
{
|
||||
m_lastError = "File " + schemaFile + " does not exist!";
|
||||
return false;
|
||||
}
|
||||
std::string content( ( std::istreambuf_iterator< char >( t ) ),
|
||||
( std::istreambuf_iterator< char >( ) ) );
|
||||
std::string delimiter = ";";
|
||||
|
||||
size_t pos = 0;
|
||||
std::string token;
|
||||
while( ( pos = content.find( delimiter ) ) != std::string::npos )
|
||||
{
|
||||
token = content.substr( 1, pos );
|
||||
size_t pos1 = token.find_first_not_of( "\r\n" );
|
||||
token = token.substr( pos1, token.size() );
|
||||
size_t pos2 = token.find_first_of( "\r\n" );
|
||||
std::cout << token.substr( 0, pos2 - 1 ) << std::endl;
|
||||
|
||||
if( !execute( token ) )
|
||||
return false;
|
||||
|
||||
content.erase(0, pos + delimiter.length());
|
||||
}
|
||||
|
||||
// we do not actually want this to stay atm...
|
||||
if( !execute( "DROP DATABASE " + m_database ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ private:
|
|||
{
|
||||
player.updateQuest( getId(), SEQ_FINISH );
|
||||
|
||||
player.eventStart( result.actorId, OPENING_EVENT_HANDLER, Event::EventHandler::Nest, 0, 0 );
|
||||
player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 );
|
||||
};
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ private:
|
|||
player.playScene( getId(), 3, NONE,
|
||||
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
player.eventStart( result.actorId, OPENING_EVENT_HANDLER, Event::EventHandler::Nest, 0, 0 );
|
||||
player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 1, 0 );
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ private:
|
|||
player.playScene( getId(), 2, HIDE_HOTBAR,
|
||||
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
player.eventStart( result.actorId, OPENING_EVENT_HANDLER, Event::EventHandler::Nest, 0, 0 );
|
||||
player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 );
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -250,14 +250,6 @@ void PlayerMinimal::saveAsNew()
|
|||
// "HomePoint, StartTown, Discovery, HowTo, QuestCompleteFlags, Unlocks, QuestTracking, "
|
||||
// "Aetheryte, GMRank, UPDATE_DATE )
|
||||
|
||||
// CharacterId, ClassIdx, Exp, Lvl
|
||||
auto stmtClass = g_charaDb.getPreparedStatement( Db::ZoneDbStatements::CHARA_CLASS_INS );
|
||||
stmtClass->setInt( 1, m_id );
|
||||
stmtClass->setInt( 2, g_exdDataGen.get< Sapphire::Data::ClassJob >( m_class )->expArrayIndex );
|
||||
stmtClass->setInt( 3, 0 );
|
||||
stmtClass->setInt( 4, 1 );
|
||||
g_charaDb.directExecute( stmtClass );
|
||||
|
||||
auto stmt = g_charaDb.getPreparedStatement( Db::ZoneDbStatements::CHARA_INS );
|
||||
stmt->setInt( 1, m_accountId );
|
||||
stmt->setInt( 2, m_id );
|
||||
|
@ -294,6 +286,14 @@ void PlayerMinimal::saveAsNew()
|
|||
stmt->setBinary( 33, orchestrion );
|
||||
g_charaDb.directExecute( stmt );
|
||||
|
||||
// CharacterId, ClassIdx, Exp, Lvl
|
||||
auto stmtClass = g_charaDb.getPreparedStatement( Db::ZoneDbStatements::CHARA_CLASS_INS );
|
||||
stmtClass->setInt( 1, m_id );
|
||||
stmtClass->setInt( 2, g_exdDataGen.get< Sapphire::Data::ClassJob >( m_class )->expArrayIndex );
|
||||
stmtClass->setInt( 3, 0 );
|
||||
stmtClass->setInt( 4, 1 );
|
||||
g_charaDb.directExecute( stmtClass );
|
||||
|
||||
auto stmtSearchInfo = g_charaDb.getPreparedStatement( Db::ZoneDbStatements::CHARA_SEARCHINFO_INS );
|
||||
stmtSearchInfo->setInt( 1, m_id );
|
||||
g_charaDb.directExecute( stmtSearchInfo );
|
||||
|
|
|
@ -206,7 +206,7 @@ void Sapphire::Network::SapphireAPI::deleteCharacter( std::string name, uint32_t
|
|||
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 charaquest WHERE CharacterId LIKE '" + std::to_string( id ) + "';" );
|
||||
}
|
||||
|
||||
std::vector< Sapphire::PlayerMinimal > Sapphire::Network::SapphireAPI::getCharList( uint32_t accountId )
|
||||
|
|
|
@ -182,16 +182,6 @@ void Sapphire::Entity::Player::playScene( uint32_t eventId, uint32_t scene,
|
|||
if( !pEvent )
|
||||
return;
|
||||
|
||||
if( pEvent->getEventType() == Event::EventHandler::Nest )
|
||||
{
|
||||
auto events = eventList();
|
||||
|
||||
for( auto it : events )
|
||||
{
|
||||
it.second->setPlayedScene( true );
|
||||
}
|
||||
}
|
||||
|
||||
pEvent->setPlayedScene( true );
|
||||
pEvent->setEventReturnCallback( eventCallback );
|
||||
pEvent->setSceneChainCallback( nullptr );
|
||||
|
@ -260,7 +250,20 @@ void Sapphire::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlaye
|
|||
|
||||
if( callback )
|
||||
callback( *this, pEvent->getActorId() );
|
||||
|
||||
else
|
||||
{
|
||||
auto events = eventList();
|
||||
for( auto it : events )
|
||||
{
|
||||
if( !it.second->hasPlayedScene() )
|
||||
{
|
||||
queuePacket( std::make_shared< EventFinishPacket >( getId(), it.second->getId(),
|
||||
it.second->getEventType(),
|
||||
it.second->getEventParam() ) );
|
||||
removeEvent( it.second->getId() );
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue