Skip to content

Commit

Permalink
everything except script bindings
Browse files Browse the repository at this point in the history
everything except disabling nag reminders

last?

rework

final, this actually works correctly. no reason to gate the correct packets, no great behavior to fix bug other than client patch

resolve comments
  • Loading branch information
catapultam-habeo committed Jan 22, 2025
1 parent c2ebc25 commit 7b89cd1
Show file tree
Hide file tree
Showing 16 changed files with 11,924 additions and 11,299 deletions.
7 changes: 7 additions & 0 deletions common/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "../common/repositories/raid_members_repository.h"
#include "../common/repositories/reports_repository.h"
#include "../common/repositories/variables_repository.h"
#include "../common/repositories/character_pet_name_repository.h"
#include "../common/events/player_event_logs.h"

// Disgrace: for windows compile
Expand Down Expand Up @@ -313,6 +314,12 @@ bool Database::ReserveName(uint32 account_id, const std::string& name)
return false;
}

const auto& p = CharacterPetNameRepository::GetWhere(*this, where_filter);
if (!p.empty()) {
LogInfo("Account [{}] requested name [{}] but name is already taken by an Pet", account_id, name);
return false;
}

auto e = CharacterDataRepository::NewEntity();

e.account_id = account_id;
Expand Down
13 changes: 13 additions & 0 deletions common/database/database_update_manifest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5805,6 +5805,19 @@ ALTER TABLE `zone`
ADD COLUMN `shard_at_player_count` int(11) NULL DEFAULT 0 AFTER `seconds_before_idle`;
)",
.content_schema_update = true
},
ManifestEntry{
.version = 9289,
.description = "2025_01_10_create_pet_names_table.sql",
.check = "SHOW TABLES LIKE 'character_pet_name'",
.condition = "empty",
.match = "",
.sql = R"(
CREATE TABLE `character_pet_name` (
`character_id` INT(11) NOT NULL PRIMARY KEY,
`name` VARCHAR(64) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
)",
}
// -- template; copy/paste this when you need to create a new entry
// ManifestEntry{
Expand Down
Loading

0 comments on commit 7b89cd1

Please sign in to comment.