From 7b53154f96a07fa41b99de4a4335fad10b96c10f Mon Sep 17 00:00:00 2001 From: Pedro Cruz Date: Sat, 22 Jun 2024 21:22:32 -0300 Subject: [PATCH] fix: vip groups (#2703) Fix vip groups schema and update warnings of free id and group name already exists to debug to avoid spam in the console in production. --- schema.sql | 6 ------ src/creatures/players/vip/player_vip.cpp | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/schema.sql b/schema.sql index 2fbc7dd649b..af245067057 100644 --- a/schema.sql +++ b/schema.sql @@ -850,9 +850,3 @@ INSERT INTO `players` (4, 'Paladin Sample', 1, 1, 8, 3, 185, 185, 4200, 113, 115, 95, 39, 129, 0, 90, 90, 0, 8, '', 470, 1, 10, 0, 10, 0, 10, 0, 10, 0), (5, 'Knight Sample', 1, 1, 8, 4, 185, 185, 4200, 113, 115, 95, 39, 129, 0, 90, 90, 0, 8, '', 470, 1, 10, 0, 10, 0, 10, 0, 10, 0), (6, 'GOD', 6, 1, 2, 0, 155, 155, 100, 113, 115, 95, 39, 75, 0, 60, 60, 0, 8, '', 410, 1, 10, 0, 10, 0, 10, 0, 10, 0); - --- Create vip groups for GOD account -INSERT INTO `account_vipgroups` (`name`, `account_id`, `customizable`) VALUES -('Friends', 1, 0), -('Enemies', 1, 0), -('Trading Partners', 1, 0); diff --git a/src/creatures/players/vip/player_vip.cpp b/src/creatures/players/vip/player_vip.cpp index b4b1642ec69..95ebe91ad5f 100644 --- a/src/creatures/players/vip/player_vip.cpp +++ b/src/creatures/players/vip/player_vip.cpp @@ -143,13 +143,13 @@ std::shared_ptr PlayerVIP::getGroupByName(const std::string &name) con void PlayerVIP::addGroupInternal(uint8_t groupId, const std::string &name, bool customizable) { if (getGroupByName(name) != nullptr) { - g_logger().warn("{} - Group name already exists.", __FUNCTION__); + g_logger().debug("{} - Group name already exists.", __FUNCTION__); return; } const auto freeId = getFreeId(); if (freeId == 0) { - g_logger().warn("{} - No id available.", __FUNCTION__); + g_logger().debug("{} - No id available.", __FUNCTION__); return; }