mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Fix line endings
This commit is contained in:
@@ -3689,7 +3689,7 @@ INSERT INTO `updates` VALUES
|
||||
('2022_10_03_01_characters.sql','7CF58BD9CC366301CC992017028568C8774C4BC2','ARCHIVED','2022-10-03 22:36:38',0),
|
||||
('2022_10_03_02_characters.sql','33135AB3132943F15F4849A16EC5EFEA402F24F6','ARCHIVED','2022-10-03 22:38:27',0),
|
||||
('2022_11_20_00_characters.sql','4EB8BB24CAF16B0962DF3EF92C77BE05E234CFA6','ARCHIVED','2022-11-20 11:05:20',0),
|
||||
('2022_12_16_00_characters.sql','ABD1E101FE6629E0520C91E98942E55067EDD492','RELEASED','2022-12-16 22:52:19',0),
|
||||
('2022_12_16_00_characters.sql','36D6220143109ECD37219CC4A84773B31EAE9E50','RELEASED','2022-12-16 22:52:19',0),
|
||||
('2022_12_17_00_characters.sql','3E005BD6B9C60653749B0B3C19CBC497092B9CCB','RELEASED','2022-12-17 18:26:43',0);
|
||||
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -1,47 +1,63 @@
|
||||
ALTER TABLE `character_inventory` ADD `newSlot` tinyint unsigned;
|
||||
ALTER TABLE `character_inventory` DROP INDEX `guid`;
|
||||
UPDATE `character_inventory` SET `newSlot`=`slot`;
|
||||
UPDATE `character_inventory` SET `newSlot`=`slot`+12 WHERE `slot`>=23 AND `bag`=0; -- free up space for reagent bag
|
||||
UPDATE `character_inventory` SET `newSlot`=`slot`+11 WHERE `slot` BETWEEN 19 AND 22 AND `bag`=0; -- free up space for profession equipment
|
||||
UPDATE `character_inventory` SET `slot`=`newSlot`;
|
||||
ALTER TABLE `character_inventory` ADD UNIQUE KEY `uk_location` (`guid`,`bag`,`slot`);
|
||||
ALTER TABLE `character_inventory` DROP `newSlot`;
|
||||
|
||||
UPDATE `characters` SET `equipmentCache`=CONCAT(`equipmentCache`, '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ');
|
||||
|
||||
--
|
||||
-- Table structure for table `character_trait_entry`
|
||||
--
|
||||
DROP TABLE IF EXISTS `character_trait_entry`;
|
||||
CREATE TABLE `character_trait_entry` (
|
||||
`guid` bigint unsigned NOT NULL,
|
||||
`traitConfigId` int NOT NULL,
|
||||
`traitNodeId` int NOT NULL,
|
||||
`traitNodeEntryId` int NOT NULL,
|
||||
`rank` int NOT NULL DEFAULT '0',
|
||||
`grantedRanks` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`guid`,`traitConfigId`,`traitNodeId`,`traitNodeEntryId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `character_trait_config`
|
||||
--
|
||||
DROP TABLE IF EXISTS `character_trait_config`;
|
||||
CREATE TABLE `character_trait_config` (
|
||||
`guid` bigint unsigned NOT NULL,
|
||||
`traitConfigId` int NOT NULL,
|
||||
`type` int NOT NULL,
|
||||
`chrSpecializationId` int DEFAULT NULL,
|
||||
`combatConfigFlags` int DEFAULT NULL,
|
||||
`localIdentifier` int DEFAULT NULL,
|
||||
`skillLineId` int DEFAULT NULL,
|
||||
`traitSystemId` int DEFAULT NULL,
|
||||
`name` varchar(260) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`guid`,`traitConfigId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
ALTER TABLE `character_action` ADD `traitConfigId` int NOT NULL DEFAULT 0 AFTER `spec`;
|
||||
ALTER TABLE `character_action` DROP PRIMARY KEY;
|
||||
ALTER TABLE `character_action` ADD PRIMARY KEY (`guid`,`spec`,`traitConfigId`,`button`);
|
||||
|
||||
DELETE FROM `character_talent`;
|
||||
|
||||
DROP PROCEDURE IF EXISTS apply_if_not_exists_2022_12_16_00_characters;
|
||||
|
||||
DELIMITER ';;'
|
||||
CREATE PROCEDURE apply_if_not_exists_2022_12_16_00_characters() BEGIN
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM `information_schema`.`columns` WHERE `table_schema`=SCHEMA() AND `table_name`='character_action' AND `column_name`='traitConfigId') THEN
|
||||
|
||||
ALTER TABLE `character_inventory` ADD `newSlot` tinyint unsigned;
|
||||
ALTER TABLE `character_inventory` DROP INDEX `guid`;
|
||||
UPDATE `character_inventory` SET `newSlot`=`slot`;
|
||||
UPDATE `character_inventory` SET `newSlot`=`slot`+12 WHERE `slot`>=23 AND `bag`=0; -- free up space for reagent bag
|
||||
UPDATE `character_inventory` SET `newSlot`=`slot`+11 WHERE `slot` BETWEEN 19 AND 22 AND `bag`=0; -- free up space for profession equipment
|
||||
UPDATE `character_inventory` SET `slot`=`newSlot`;
|
||||
ALTER TABLE `character_inventory` ADD UNIQUE KEY `uk_location` (`guid`,`bag`,`slot`);
|
||||
ALTER TABLE `character_inventory` DROP `newSlot`;
|
||||
|
||||
UPDATE `characters` SET `equipmentCache`=CONCAT(`equipmentCache`, '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ');
|
||||
|
||||
--
|
||||
-- Table structure for table `character_trait_entry`
|
||||
--
|
||||
DROP TABLE IF EXISTS `character_trait_entry`;
|
||||
CREATE TABLE `character_trait_entry` (
|
||||
`guid` bigint unsigned NOT NULL,
|
||||
`traitConfigId` int NOT NULL,
|
||||
`traitNodeId` int NOT NULL,
|
||||
`traitNodeEntryId` int NOT NULL,
|
||||
`rank` int NOT NULL DEFAULT '0',
|
||||
`grantedRanks` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`guid`,`traitConfigId`,`traitNodeId`,`traitNodeEntryId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `character_trait_config`
|
||||
--
|
||||
DROP TABLE IF EXISTS `character_trait_config`;
|
||||
CREATE TABLE `character_trait_config` (
|
||||
`guid` bigint unsigned NOT NULL,
|
||||
`traitConfigId` int NOT NULL,
|
||||
`type` int NOT NULL,
|
||||
`chrSpecializationId` int DEFAULT NULL,
|
||||
`combatConfigFlags` int DEFAULT NULL,
|
||||
`localIdentifier` int DEFAULT NULL,
|
||||
`skillLineId` int DEFAULT NULL,
|
||||
`traitSystemId` int DEFAULT NULL,
|
||||
`name` varchar(260) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`guid`,`traitConfigId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
ALTER TABLE `character_action` ADD `traitConfigId` int NOT NULL DEFAULT 0 AFTER `spec`;
|
||||
ALTER TABLE `character_action` DROP PRIMARY KEY;
|
||||
ALTER TABLE `character_action` ADD PRIMARY KEY (`guid`,`spec`,`traitConfigId`,`button`);
|
||||
|
||||
DELETE FROM `character_talent`;
|
||||
|
||||
END IF;
|
||||
END;;
|
||||
|
||||
DELIMITER ';'
|
||||
CALL apply_if_not_exists_2022_12_16_00_characters();
|
||||
|
||||
DROP PROCEDURE IF EXISTS apply_if_not_exists_2022_12_16_00_characters;
|
||||
|
||||
@@ -1,67 +1,67 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "WorldSession.h"
|
||||
#include "AdventureJournalPackets.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GossipDef.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
void WorldSession::HandleAdventureJournalOpenQuest(WorldPackets::AdventureJournal::AdventureJournalOpenQuest& openQuest)
|
||||
{
|
||||
if (ChrClassUIDisplayEntry const* uiDisplay = sDB2Manager.GetUiDisplayForClass(Classes(_player->GetClass())))
|
||||
if (!_player->MeetPlayerCondition(uiDisplay->AdvGuidePlayerConditionID))
|
||||
return;
|
||||
|
||||
AdventureJournalEntry const* adventureJournal = sAdventureJournalStore.LookupEntry(openQuest.AdventureJournalID);
|
||||
if (!adventureJournal)
|
||||
return;
|
||||
|
||||
if (!_player->MeetPlayerCondition(adventureJournal->PlayerConditionID))
|
||||
return;
|
||||
|
||||
Quest const* quest = sObjectMgr->GetQuestTemplate(adventureJournal->QuestID);
|
||||
if (!quest)
|
||||
return;
|
||||
|
||||
if (_player->CanTakeQuest(quest, true))
|
||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(quest, _player->GetGUID(), true, false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAdventureJournalUpdateSuggestions(WorldPackets::AdventureJournal::AdventureJournalUpdateSuggestions& updateSuggestions)
|
||||
{
|
||||
if (ChrClassUIDisplayEntry const* uiDisplay = sDB2Manager.GetUiDisplayForClass(Classes(_player->GetClass())))
|
||||
if (!_player->MeetPlayerCondition(uiDisplay->AdvGuidePlayerConditionID))
|
||||
return;
|
||||
|
||||
WorldPackets::AdventureJournal::AdventureJournalDataResponse response;
|
||||
response.OnLevelUp = updateSuggestions.OnLevelUp;
|
||||
|
||||
for (AdventureJournalEntry const* adventureJournal : sAdventureJournalStore)
|
||||
{
|
||||
if (_player->MeetPlayerCondition(adventureJournal->PlayerConditionID))
|
||||
{
|
||||
WorldPackets::AdventureJournal::AdventureJournalEntry adventureJournalData;
|
||||
adventureJournalData.AdventureJournalID = int32(adventureJournal->ID);
|
||||
adventureJournalData.Priority = int32(adventureJournal->PriorityMax);
|
||||
response.Entries.push_back(adventureJournalData);
|
||||
}
|
||||
}
|
||||
|
||||
SendPacket(response.Write());
|
||||
}
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "WorldSession.h"
|
||||
#include "AdventureJournalPackets.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GossipDef.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
void WorldSession::HandleAdventureJournalOpenQuest(WorldPackets::AdventureJournal::AdventureJournalOpenQuest& openQuest)
|
||||
{
|
||||
if (ChrClassUIDisplayEntry const* uiDisplay = sDB2Manager.GetUiDisplayForClass(Classes(_player->GetClass())))
|
||||
if (!_player->MeetPlayerCondition(uiDisplay->AdvGuidePlayerConditionID))
|
||||
return;
|
||||
|
||||
AdventureJournalEntry const* adventureJournal = sAdventureJournalStore.LookupEntry(openQuest.AdventureJournalID);
|
||||
if (!adventureJournal)
|
||||
return;
|
||||
|
||||
if (!_player->MeetPlayerCondition(adventureJournal->PlayerConditionID))
|
||||
return;
|
||||
|
||||
Quest const* quest = sObjectMgr->GetQuestTemplate(adventureJournal->QuestID);
|
||||
if (!quest)
|
||||
return;
|
||||
|
||||
if (_player->CanTakeQuest(quest, true))
|
||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(quest, _player->GetGUID(), true, false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAdventureJournalUpdateSuggestions(WorldPackets::AdventureJournal::AdventureJournalUpdateSuggestions& updateSuggestions)
|
||||
{
|
||||
if (ChrClassUIDisplayEntry const* uiDisplay = sDB2Manager.GetUiDisplayForClass(Classes(_player->GetClass())))
|
||||
if (!_player->MeetPlayerCondition(uiDisplay->AdvGuidePlayerConditionID))
|
||||
return;
|
||||
|
||||
WorldPackets::AdventureJournal::AdventureJournalDataResponse response;
|
||||
response.OnLevelUp = updateSuggestions.OnLevelUp;
|
||||
|
||||
for (AdventureJournalEntry const* adventureJournal : sAdventureJournalStore)
|
||||
{
|
||||
if (_player->MeetPlayerCondition(adventureJournal->PlayerConditionID))
|
||||
{
|
||||
WorldPackets::AdventureJournal::AdventureJournalEntry adventureJournalData;
|
||||
adventureJournalData.AdventureJournalID = int32(adventureJournal->ID);
|
||||
adventureJournalData.Priority = int32(adventureJournal->PriorityMax);
|
||||
response.Entries.push_back(adventureJournalData);
|
||||
}
|
||||
}
|
||||
|
||||
SendPacket(response.Write());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user