Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Character] Fix character copier due to schema change #3805

Merged
merged 2 commits into from
Dec 28, 2023

Conversation

Akkadius
Copy link
Member

Due to schema change in #3746 the character copier breaks because it attempts to copy the same auto inc id from the source character. This change sets id to 0 so the database engine assigns a new auto inc id for the destination row

image

This needs to be actually tested

@Akkadius
Copy link
Member Author

Testing

./bin/world character:copy-character Akkadius Akkadiustestt schecterx
 World |    Info    | CopyCharacter Attempting to copy character [Akkadius] to [Akkadiustestt] via account [schecterx] 
 World |   Query    | QueryDatabase SELECT id FROM character_data WHERE name = 'Akkadius' and deleted_at is NULL LIMIT 1 -- (1 row returned) (0.000158s)
 World |   Query    | QueryDatabase SELECT id FROM account WHERE name = 'schecterx' LIMIT 1 -- (1 row returned) (0.000048s)
 World |   Query    | QueryDatabase SELECT (MAX(id) + 1) as new_id from character_data -- (1 row returned) (0.000023s)
 World |   Query    | QueryDatabase START TRANSACTION -- (0 rows affected) (0.000034s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM adventure_stats -- (11 rows affected) (0.000495s)
 World |   Query    | QueryDatabase SELECT `player_id`,`guk_wins`,`mir_wins`,`mmc_wins`,`ruj_wins`,`tak_wins`,`guk_losses`,`mir_losses`,`mmc_losses`,`ruj_losses`,`tak_losses` FROM adventure_stats WHERE player_id = 1 -- (0 rows returned) (0.000037s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM buyer -- (6 rows affected) (0.000260s)
 World |   Query    | QueryDatabase SELECT `charid`,`buyslot`,`itemid`,`itemname`,`quantity`,`price` FROM buyer WHERE charid = 1 -- (0 rows returned) (0.000028s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM char_recipe_list -- (3 rows affected) (0.000213s)
 World |   Query    | QueryDatabase SELECT `char_id`,`recipe_id`,`madecount` FROM char_recipe_list WHERE char_id = 1 -- (0 rows returned) (0.000025s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_activities -- (5 rows affected) (0.000203s)
 World |   Query    | QueryDatabase SELECT `charid`,`taskid`,`activityid`,`donecount`,`completed` FROM character_activities WHERE charid = 1 -- (1 row returned) (0.000130s)
 World |   Query    | QueryDatabase DELETE FROM character_activities WHERE charid = 6 -- (1 row affected) (0.000075s)
 World |   Query    | QueryDatabase INSERT INTO character_activities (`charid`,`taskid`,`activityid`,`donecount`,`completed`) VALUES ('6','5745','0','0','0') -- (1 row affected) (0.000062s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_alt_currency -- (3 rows affected) (0.000257s)
 World |   Query    | QueryDatabase SELECT `char_id`,`currency_id`,`amount` FROM character_alt_currency WHERE char_id = 1 -- (0 rows returned) (0.000026s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_alternate_abilities -- (4 rows affected) (0.000205s)
 World |   Query    | QueryDatabase SELECT `id`,`aa_id`,`aa_value`,`charges` FROM character_alternate_abilities WHERE id = 1 -- (14 rows returned) (0.000099s)
 World |   Query    | QueryDatabase DELETE FROM character_alternate_abilities WHERE id = 6 -- (14 rows affected) (0.000077s)
 World |   Query    | QueryDatabase INSERT INTO character_alternate_abilities (`id`,`aa_id`,`aa_value`,`charges`) VALUES ('6','1371','1','0'),('6','1372','1','0'),('6','1373','1','0'),('6','1374','1','0'),('6','1375','1','0'),('6','1376','1','0'),('6','1377','1','0'),('6','4665','1','0'),('6','4700','1','0'),('6','5006','1','0'),('6','9000','1','0'),('6','9031','1','0'),('6','9032','1','0'),('6','9033','1','0') -- (14 rows affected) (0.000094s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_auras -- (3 rows affected) (0.000263s)
 World |   Query    | QueryDatabase SELECT `id`,`slot`,`spell_id` FROM character_auras WHERE id = 1 -- (0 rows returned) (0.000028s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_bandolier -- (6 rows affected) (0.000227s)
 World |   Query    | QueryDatabase SELECT `id`,`bandolier_id`,`bandolier_slot`,`item_id`,`icon`,`bandolier_name` FROM character_bandolier WHERE id = 1 -- (0 rows returned) (0.000026s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_bind -- (8 rows affected) (0.000225s)
 World |   Query    | QueryDatabase SELECT `id`,`slot`,`zone_id`,`instance_id`,`x`,`y`,`z`,`heading` FROM character_bind WHERE id = 1 -- (5 rows returned) (0.000156s)
 World |   Query    | QueryDatabase DELETE FROM character_bind WHERE id = 6 -- (5 rows affected) (0.000124s)
 World |   Query    | QueryDatabase INSERT INTO character_bind (`id`,`slot`,`zone_id`,`instance_id`,`x`,`y`,`z`,`heading`) VALUES ('6','0','29','0','-456','560','-26.62','192'),('6','1','29','0','-456','560','-26.62','192'),('6','2','29','0','-456','560','-26.62','192'),('6','3','29','0','-456','560','-26.62','192'),('6','4','29','0','-456','560','-26.62','192') -- (5 rows affected) (0.000107s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_buffs -- (17 rows affected) (0.000322s)
 World |   Query    | QueryDatabase SELECT `character_id`,`slot_id`,`spell_id`,`caster_level`,`caster_name`,`ticsremaining`,`counters`,`numhits`,`melee_rune`,`magic_rune`,`persistent`,`dot_rune`,`caston_x`,`caston_y`,`caston_z`,`ExtraDIChance`,`instrument_mod` FROM character_buffs WHERE character_id = 1 -- (0 rows returned) (0.000136s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_corpses -- (47 rows affected) (0.000611s)
 World |   Query    | QueryDatabase SELECT `id`,`charid`,`charname`,`zone_id`,`instance_id`,`x`,`y`,`z`,`heading`,`time_of_death`,`guild_consent_id`,`is_rezzed`,`is_buried`,`was_at_graveyard`,`is_locked`,`exp`,`size`,`level`,`race`,`gender`,`class`,`deity`,`texture`,`helm_texture`,`copper`,`silver`,`gold`,`platinum`,`hair_color`,`beard_color`,`eye_color_1`,`eye_color_2`,`hair_style`,`face`,`beard`,`drakkin_heritage`,`drakkin_tattoo`,`drakkin_details`,`wc_1`,`wc_2`,`wc_3`,`wc_4`,`wc_5`,`wc_6`,`wc_7`,`wc_8`,`wc_9` FROM character_corpses WHERE id = 1 -- (1 row returned) (0.000222s)
 World |   Query    | QueryDatabase DELETE FROM character_corpses WHERE id = 6 -- (1 row affected) (0.000237s)
 World |   Query    | QueryDatabase INSERT INTO character_corpses (`id`,`charid`,`charname`,`zone_id`,`instance_id`,`x`,`y`,`z`,`heading`,`time_of_death`,`guild_consent_id`,`is_rezzed`,`is_buried`,`was_at_graveyard`,`is_locked`,`exp`,`size`,`level`,`race`,`gender`,`class`,`deity`,`texture`,`helm_texture`,`copper`,`silver`,`gold`,`platinum`,`hair_color`,`beard_color`,`eye_color_1`,`eye_color_2`,`hair_style`,`face`,`beard`,`drakkin_heritage`,`drakkin_tattoo`,`drakkin_details`,`wc_1`,`wc_2`,`wc_3`,`wc_4`,`wc_5`,`wc_6`,`wc_7`,`wc_8`,`wc_9`) VALUES ('6','4','Syfemuph','29','0','315','546.6','5','0','2023-12-15 18:50:23','0','0','1','0','0','0','7','1','2','0','16','140','255','255','0','0','0','0','4','255','144','75','0','7','255','0','0','0','0','0','0','0','0','0','0','0','0') -- (1 row affected) (0.000241s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_currency -- (17 rows affected) (0.000504s)
 World |   Query    | QueryDatabase SELECT `id`,`platinum`,`gold`,`silver`,`copper`,`platinum_bank`,`gold_bank`,`silver_bank`,`copper_bank`,`platinum_cursor`,`gold_cursor`,`silver_cursor`,`copper_cursor`,`radiant_crystals`,`career_radiant_crystals`,`ebon_crystals`,`career_ebon_crystals` FROM character_currency WHERE id = 1 -- (1 row returned) (0.000245s)
 World |   Query    | QueryDatabase DELETE FROM character_currency WHERE id = 6 -- (1 row affected) (0.000085s)
 World |   Query    | QueryDatabase INSERT INTO character_currency (`id`,`platinum`,`gold`,`silver`,`copper`,`platinum_bank`,`gold_bank`,`silver_bank`,`copper_bank`,`platinum_cursor`,`gold_cursor`,`silver_cursor`,`copper_cursor`,`radiant_crystals`,`career_radiant_crystals`,`ebon_crystals`,`career_ebon_crystals`) VALUES ('6','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0') -- (1 row affected) (0.000149s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_data -- (103 rows affected) (0.000563s)
 World |   Query    | QueryDatabase SELECT `id`,`account_id`,`name`,`last_name`,`title`,`suffix`,`zone_id`,`zone_instance`,`y`,`x`,`z`,`heading`,`gender`,`race`,`class`,`level`,`deity`,`birthday`,`last_login`,`time_played`,`level2`,`anon`,`gm`,`face`,`hair_color`,`hair_style`,`beard`,`beard_color`,`eye_color_1`,`eye_color_2`,`drakkin_heritage`,`drakkin_tattoo`,`drakkin_details`,`ability_time_seconds`,`ability_number`,`ability_time_minutes`,`ability_time_hours`,`exp`,`exp_enabled`,`aa_points_spent`,`aa_exp`,`aa_points`,`group_leadership_exp`,`raid_leadership_exp`,`group_leadership_points`,`raid_leadership_points`,`points`,`cur_hp`,`mana`,`endurance`,`intoxication`,`str`,`sta`,`cha`,`dex`,`int`,`agi`,`wis`,`zone_change_count`,`toxicity`,`hunger_level`,`thirst_level`,`ability_up`,`ldon_points_guk`,`ldon_points_mir`,`ldon_points_mmc`,`ldon_points_ruj`,`ldon_points_tak`,`ldon_points_available`,`tribute_time_remaining`,`career_tribute_points`,`tribute_points`,`tribute_active`,`pvp_status`,`pvp_kills`,`pvp_deaths`,`pvp_current_points`,`pvp_career_points`,`pvp_best_kill_streak`,`pvp_worst_death_streak`,`pvp_current_kill_streak`,`pvp2`,`pvp_type`,`show_helm`,`group_auto_consent`,`raid_auto_consent`,`guild_auto_consent`,`leadership_exp_on`,`RestTimer`,`air_remaining`,`autosplit_enabled`,`lfp`,`lfg`,`mailkey`,`xtargets`,`firstlogon`,`e_aa_effects`,`e_percent_to_aa`,`e_expended_aa_spent`,`aa_points_spent_old`,`aa_points_old`,`e_last_invsnapshot`,`deleted_at` FROM character_data WHERE id = 1 -- (1 row returned) (0.000111s)
 World |   Query    | QueryDatabase DELETE FROM character_data WHERE id = 6 -- (0 rows affected) (0.000100s)
 World |   Query    | QueryDatabase INSERT INTO character_data (`id`,`account_id`,`name`,`last_name`,`title`,`suffix`,`zone_id`,`zone_instance`,`y`,`x`,`z`,`heading`,`gender`,`race`,`class`,`level`,`deity`,`birthday`,`last_login`,`time_played`,`level2`,`anon`,`gm`,`face`,`hair_color`,`hair_style`,`beard`,`beard_color`,`eye_color_1`,`eye_color_2`,`drakkin_heritage`,`drakkin_tattoo`,`drakkin_details`,`ability_time_seconds`,`ability_number`,`ability_time_minutes`,`ability_time_hours`,`exp`,`exp_enabled`,`aa_points_spent`,`aa_exp`,`aa_points`,`group_leadership_exp`,`raid_leadership_exp`,`group_leadership_points`,`raid_leadership_points`,`points`,`cur_hp`,`mana`,`endurance`,`intoxication`,`str`,`sta`,`cha`,`dex`,`int`,`agi`,`wis`,`zone_change_count`,`toxicity`,`hunger_level`,`thirst_level`,`ability_up`,`ldon_points_guk`,`ldon_points_mir`,`ldon_points_mmc`,`ldon_points_ruj`,`ldon_points_tak`,`ldon_points_available`,`tribute_time_remaining`,`career_tribute_points`,`tribute_points`,`tribute_active`,`pvp_status`,`pvp_kills`,`pvp_deaths`,`pvp_current_points`,`pvp_career_points`,`pvp_best_kill_streak`,`pvp_worst_death_streak`,`pvp_current_kill_streak`,`pvp2`,`pvp_type`,`show_helm`,`group_auto_consent`,`raid_auto_consent`,`guild_auto_consent`,`leadership_exp_on`,`RestTimer`,`air_remaining`,`autosplit_enabled`,`lfp`,`lfg`,`mailkey`,`xtargets`,`firstlogon`,`e_aa_effects`,`e_percent_to_aa`,`e_expended_aa_spent`,`aa_points_spent_old`,`aa_points_old`,`e_last_invsnapshot`,`deleted_at`) VALUES ('6','1','Akkadiustestt','','','','89','0','248','-1','42.5','256.75','0','2','1','80','211','1692504505','1703666038','185922','80','0','0','81','10','0','1','9','7','7','0','0','0','0','0','0','0','1072135231','1','0','0','0','0','0','0','0','10','21255','0','21559','0','113','130','55','70','60','87','70','0','0','4008','4008','0','0','0','0','0','0','0','4294967295','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','60','0','0','0','3E41A8C04F2C99DB','5','0','0','0','0','0','0','0',null) -- (1 row affected) (0.000178s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_disciplines -- (3 rows affected) (0.000334s)
 World |   Query    | QueryDatabase SELECT `id`,`slot_id`,`disc_id` FROM character_disciplines WHERE id = 1 -- (0 rows returned) (0.000029s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_enabledtasks -- (2 rows affected) (0.000244s)
 World |   Query    | QueryDatabase SELECT `charid`,`taskid` FROM character_enabledtasks WHERE charid = 1 -- (0 rows returned) (0.000025s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_exp_modifiers -- (5 rows affected) (0.000232s)
 World |   Query    | QueryDatabase SELECT `character_id`,`zone_id`,`instance_version`,`aa_modifier`,`exp_modifier` FROM character_exp_modifiers WHERE character_id = 1 -- (0 rows returned) (0.000027s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_expedition_lockouts -- (7 rows affected) (0.000229s)
 World |   Query    | QueryDatabase SELECT `id`,`character_id`,`expedition_name`,`event_name`,`expire_time`,`duration`,`from_expedition_uuid` FROM character_expedition_lockouts WHERE character_id = 1 -- (0 rows returned) (0.000027s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_inspect_messages -- (2 rows affected) (0.000212s)
 World |   Query    | QueryDatabase SELECT `id`,`inspect_message` FROM character_inspect_messages WHERE id = 1 -- (0 rows returned) (0.000045s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_instance_safereturns -- (9 rows affected) (0.000266s)
 World |   Query    | QueryDatabase SELECT `id`,`character_id`,`instance_zone_id`,`instance_id`,`safe_zone_id`,`safe_x`,`safe_y`,`safe_z`,`safe_heading` FROM character_instance_safereturns WHERE character_id = 1 -- (0 rows returned) (0.000031s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_item_recast -- (3 rows affected) (0.000209s)
 World |   Query    | QueryDatabase SELECT `id`,`recast_type`,`timestamp` FROM character_item_recast WHERE id = 1 -- (0 rows returned) (0.000024s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_languages -- (3 rows affected) (0.000205s)
 World |   Query    | QueryDatabase SELECT `id`,`lang_id`,`value` FROM character_languages WHERE id = 1 -- (2 rows returned) (0.000123s)
 World |   Query    | QueryDatabase DELETE FROM character_languages WHERE id = 6 -- (2 rows affected) (0.000076s)
 World |   Query    | QueryDatabase INSERT INTO character_languages (`id`,`lang_id`,`value`) VALUES ('6','0','100'),('6','1','100') -- (2 rows affected) (0.000062s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_leadership_abilities -- (3 rows affected) (0.000292s)
 World |   Query    | QueryDatabase SELECT `id`,`slot`,`rank` FROM character_leadership_abilities WHERE id = 1 -- (0 rows returned) (0.000035s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_material -- (7 rows affected) (0.000243s)
 World |   Query    | QueryDatabase SELECT `id`,`slot`,`blue`,`green`,`red`,`use_tint`,`color` FROM character_material WHERE id = 1 -- (0 rows returned) (0.000027s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_memmed_spells -- (3 rows affected) (0.000223s)
 World |   Query    | QueryDatabase SELECT `id`,`slot_id`,`spell_id` FROM character_memmed_spells WHERE id = 1 -- (0 rows returned) (0.000025s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_peqzone_flags -- (2 rows affected) (0.000207s)
 World |   Query    | QueryDatabase SELECT `id`,`zone_id` FROM character_peqzone_flags WHERE id = 1 -- (0 rows returned) (0.000025s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_pet_buffs -- (11 rows affected) (0.000234s)
 World |   Query    | QueryDatabase SELECT `char_id`,`pet`,`slot`,`spell_id`,`caster_level`,`castername`,`ticsremaining`,`counters`,`numhits`,`rune`,`instrument_mod` FROM character_pet_buffs WHERE char_id = 1 -- (0 rows returned) (0.000028s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_pet_info -- (9 rows affected) (0.000222s)
 World |   Query    | QueryDatabase SELECT `char_id`,`pet`,`petname`,`petpower`,`spell_id`,`hp`,`mana`,`size`,`taunting` FROM character_pet_info WHERE char_id = 1 -- (2 rows returned) (0.000117s)
 World |   Query    | QueryDatabase DELETE FROM character_pet_info WHERE char_id = 6 -- (2 rows affected) (0.000071s)
 World |   Query    | QueryDatabase INSERT INTO character_pet_info (`char_id`,`pet`,`petname`,`petpower`,`spell_id`,`hp`,`mana`,`size`,`taunting`) VALUES ('6','0','','0','0','0','0','0','0'),('6','1','','0','0','0','0','0','0') -- (2 rows affected) (0.000069s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_pet_inventory -- (4 rows affected) (0.000295s)
 World |   Query    | QueryDatabase SELECT `char_id`,`pet`,`slot`,`item_id` FROM character_pet_inventory WHERE char_id = 1 -- (0 rows returned) (0.000038s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_potionbelt -- (4 rows affected) (0.000236s)
 World |   Query    | QueryDatabase SELECT `id`,`potion_id`,`item_id`,`icon` FROM character_potionbelt WHERE id = 1 -- (0 rows returned) (0.000027s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_skills -- (3 rows affected) (0.000249s)
 World |   Query    | QueryDatabase SELECT `id`,`skill_id`,`value` FROM character_skills WHERE id = 1 -- (41 rows returned) (0.000145s)
 World |   Query    | QueryDatabase DELETE FROM character_skills WHERE id = 6 -- (41 rows affected) (0.000185s)
 World |   Query    | QueryDatabase INSERT INTO character_skills (`id`,`skill_id`,`value`) VALUES ('6','0','310'),('6','1','310'),('6','2','310'),('6','3','310'),('6','7','310'),('6','9','375'),('6','10','350'),('6','15','300'),('6','16','355'),('6','19','330'),('6','20','260'),('6','22','260'),('6','28','255'),('6','30','325'),('6','33','270'),('6','34','330'),('6','36','310'),('6','37','280'),('6','40','200'),('6','43','50'),('6','44','50'),('6','45','50'),('6','46','50'),('6','47','50'),('6','50','350'),('6','51','310'),('6','55','200'),('6','57','300'),('6','58','300'),('6','60','300'),('6','61','300'),('6','63','300'),('6','64','300'),('6','65','300'),('6','66','375'),('6','67','350'),('6','68','300'),('6','69','300'),('6','73','230'),('6','76','275'),('6','77','310') -- (41 rows affected) (0.000255s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_spells -- (3 rows affected) (0.000373s)
 World |   Query    | QueryDatabase SELECT `id`,`slot_id`,`spell_id` FROM character_spells WHERE id = 1 -- (0 rows returned) (0.000033s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_stats_record -- (74 rows affected) (0.000469s)
 World |   Query    | QueryDatabase SELECT `character_id`,`name`,`status`,`level`,`class`,`race`,`aa_points`,`hp`,`mana`,`endurance`,`ac`,`strength`,`stamina`,`dexterity`,`agility`,`intelligence`,`wisdom`,`charisma`,`magic_resist`,`fire_resist`,`cold_resist`,`poison_resist`,`disease_resist`,`corruption_resist`,`heroic_strength`,`heroic_stamina`,`heroic_dexterity`,`heroic_agility`,`heroic_intelligence`,`heroic_wisdom`,`heroic_charisma`,`heroic_magic_resist`,`heroic_fire_resist`,`heroic_cold_resist`,`heroic_poison_resist`,`heroic_disease_resist`,`heroic_corruption_resist`,`haste`,`accuracy`,`attack`,`avoidance`,`clairvoyance`,`combat_effects`,`damage_shield_mitigation`,`damage_shield`,`dot_shielding`,`hp_regen`,`mana_regen`,`endurance_regen`,`shielding`,`spell_damage`,`spell_shielding`,`strikethrough`,`stun_resist`,`backstab`,`wind`,`brass`,`string`,`percussion`,`singing`,`baking`,`alchemy`,`tailoring`,`blacksmithing`,`fletching`,`brewing`,`jewelry`,`pottery`,`research`,`alcohol`,`fishing`,`tinkering`,`created_at`,`updated_at` FROM character_stats_record WHERE character_id = 1 -- (1 row returned) (0.000252s)
 World |   Query    | QueryDatabase DELETE FROM character_stats_record WHERE character_id = 6 -- (1 row affected) (0.000099s)
 World |   Query    | QueryDatabase INSERT INTO character_stats_record (`character_id`,`name`,`status`,`level`,`class`,`race`,`aa_points`,`hp`,`mana`,`endurance`,`ac`,`strength`,`stamina`,`dexterity`,`agility`,`intelligence`,`wisdom`,`charisma`,`magic_resist`,`fire_resist`,`cold_resist`,`poison_resist`,`disease_resist`,`corruption_resist`,`heroic_strength`,`heroic_stamina`,`heroic_dexterity`,`heroic_agility`,`heroic_intelligence`,`heroic_wisdom`,`heroic_charisma`,`heroic_magic_resist`,`heroic_fire_resist`,`heroic_cold_resist`,`heroic_poison_resist`,`heroic_disease_resist`,`heroic_corruption_resist`,`haste`,`accuracy`,`attack`,`avoidance`,`clairvoyance`,`combat_effects`,`damage_shield_mitigation`,`damage_shield`,`dot_shielding`,`hp_regen`,`mana_regen`,`endurance_regen`,`shielding`,`spell_damage`,`spell_shielding`,`strikethrough`,`stun_resist`,`backstab`,`wind`,`brass`,`string`,`percussion`,`singing`,`baking`,`alchemy`,`tailoring`,`blacksmithing`,`fletching`,`brewing`,`jewelry`,`pottery`,`research`,`alcohol`,`fishing`,`tinkering`,`created_at`,`updated_at`) VALUES ('6','Akkadius','255','80','1','2','0','21255','0','21559','3505','403','440','393','428','395','372','383','575','575','575','575','575','15','48','85','38','73','40','17','28','0','0','0','0','0','0','145','150','1835','100','87','100','15','25','35','0','0','0','35','50','35','35','34','0','31','29','32','0','0','300','0','300','300','300','300','300','300','0','375','200','300','2023-08-19 23:08:29','2023-12-27 02:33:58') -- (1 row affected) (0.000151s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_task_timers -- (6 rows affected) (0.000374s)
 World |   Query    | QueryDatabase SELECT `id`,`character_id`,`task_id`,`timer_type`,`timer_group`,`expire_time` FROM character_task_timers WHERE character_id = 1 -- (0 rows returned) (0.000043s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_tasks -- (6 rows affected) (0.000290s)
 World |   Query    | QueryDatabase SELECT `charid`,`taskid`,`slot`,`type`,`acceptedtime`,`was_rewarded` FROM character_tasks WHERE charid = 1 -- (1 row returned) (0.000124s)
 World |   Query    | QueryDatabase DELETE FROM character_tasks WHERE charid = 6 -- (1 row affected) (0.000072s)
 World |   Query    | QueryDatabase INSERT INTO character_tasks (`charid`,`taskid`,`slot`,`type`,`acceptedtime`,`was_rewarded`) VALUES ('6','5745','0','2','1692513266','0') -- (1 row affected) (0.000059s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM character_tribute -- (4 rows affected) (0.000344s)
 World |   Query    | QueryDatabase SELECT `id`,`character_id`,`tier`,`tribute` FROM character_tribute WHERE character_id = 1 -- (0 rows returned) (0.000038s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM completed_tasks -- (4 rows affected) (0.000267s)
 World |   Query    | QueryDatabase SELECT `charid`,`completedtime`,`taskid`,`activityid` FROM completed_tasks WHERE charid = 1 -- (0 rows returned) (0.000033s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM data_buckets -- (7 rows affected) (0.000227s)
 World |   Query    | QueryDatabase SELECT `id`,`key`,`value`,`expires`,`character_id`,`npc_id`,`bot_id` FROM data_buckets WHERE character_id = 1 -- (0 rows returned) (0.000026s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM faction_values -- (4 rows affected) (0.000213s)
 World |   Query    | QueryDatabase SELECT `char_id`,`faction_id`,`current_value`,`temp` FROM faction_values WHERE char_id = 1 -- (0 rows returned) (0.000025s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM friends -- (3 rows affected) (0.000204s)
 World |   Query    | QueryDatabase SELECT `charid`,`type`,`name` FROM friends WHERE charid = 1 -- (0 rows returned) (0.000024s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM guild_members -- (10 rows affected) (0.000216s)
 World |   Query    | QueryDatabase SELECT `char_id`,`guild_id`,`rank`,`tribute_enable`,`total_tribute`,`last_tribute`,`banker`,`public_note`,`alt`,`online` FROM guild_members WHERE char_id = 1 -- (0 rows returned) (0.000026s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM guilds -- (10 rows affected) (0.000217s)
 World |   Query    | QueryDatabase SELECT `id`,`name`,`leader`,`minstatus`,`motd`,`tribute`,`motd_setter`,`channel`,`url`,`favor` FROM guilds WHERE id = 1 -- (0 rows returned) (0.000026s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM instance_list_player -- (2 rows affected) (0.000355s)
 World |   Query    | QueryDatabase SELECT `id`,`charid` FROM instance_list_player WHERE id = 1 -- (0 rows returned) (0.000033s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM inventory -- (16 rows affected) (0.000358s)
 World |   Query    | QueryDatabase SELECT `charid`,`slotid`,`itemid`,`charges`,`color`,`augslot1`,`augslot2`,`augslot3`,`augslot4`,`augslot5`,`augslot6`,`instnodrop`,`custom_data`,`ornamenticon`,`ornamentidfile`,`ornament_hero_model` FROM inventory WHERE charid = 1 -- (33 rows returned) (0.000443s)
 World |   Query    | QueryDatabase DELETE FROM inventory WHERE charid = 6 -- (33 rows affected) (0.000317s)
 World |   Query    | QueryDatabase INSERT INTO inventory (`charid`,`slotid`,`itemid`,`charges`,`color`,`augslot1`,`augslot2`,`augslot3`,`augslot4`,`augslot5`,`augslot6`,`instnodrop`,`custom_data`,`ornamenticon`,`ornamentidfile`,`ornament_hero_model`) VALUES ('6','1','102618','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','2','70853','0','4289691708','0','0','0','0','0','0','0','','0','0','0'),('6','3','102726','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','4','102590','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','5','102620','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','6','102621','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','7','102004','0','4286085340','0','0','0','0','0','0','0','','0','0','0'),('6','8','102552','1','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','9','67098','1','4286545791','0','0','0','0','0','0','0','','0','0','0'),('6','10','46887','1','4286098130','0','0','0','0','0','0','0','','0','0','0'),('6','11','102667','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','12','53364','0','4278190108','0','0','0','0','0','0','0','','0','0','0'),('6','13','102720','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','14','102649','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','15','102595','1','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','16','102623','1','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','17','83603','0','4290420037','0','0','0','0','0','0','0','','0','0','0'),('6','18','102005','0','4286085340','0','0','0','0','0','0','0','','0','0','0'),('6','19','76131','0','4282908672','0','0','0','0','0','0','0','','0','0','0'),('6','20','102624','1','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','23','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','24','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','25','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','26','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','27','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','28','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','29','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','30','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','31','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','32','17403','0','0','0','0','0','0','0','0','0','','0','0','0'),('6','251','12425','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','271','20883','0','4278190080','0','0','0','0','0','0','0','','0','0','0'),('6','2000','32601','1','0','0','0','0','0','0','0','0',null,'0','0','0') -- (33 rows affected) (0.000586s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM inventory_snapshots -- (17 rows affected) (0.000587s)
 World |   Query    | QueryDatabase SELECT `time_index`,`charid`,`slotid`,`itemid`,`charges`,`color`,`augslot1`,`augslot2`,`augslot3`,`augslot4`,`augslot5`,`augslot6`,`instnodrop`,`custom_data`,`ornamenticon`,`ornamentidfile`,`ornament_hero_model` FROM inventory_snapshots WHERE charid = 1 -- (0 rows returned) (0.000136s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM keyring -- (3 rows affected) (0.000431s)
 World |   Query    | QueryDatabase SELECT `id`,`char_id`,`item_id` FROM keyring WHERE char_id = 1 -- (1 row returned) (0.000125s)
 World |   Query    | QueryDatabase DELETE FROM keyring WHERE char_id = 6 -- (1 row affected) (0.000068s)
 World |   Query    | QueryDatabase INSERT INTO keyring (`id`,`char_id`,`item_id`) VALUES ('0','6','20883') -- (1 row affected) (0.000059s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM mail -- (8 rows affected) (0.000360s)
 World |   Query    | QueryDatabase SELECT `msgid`,`charid`,`timestamp`,`from`,`subject`,`body`,`to`,`status` FROM mail WHERE charid = 1 -- (0 rows returned) (0.000053s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM player_titlesets -- (3 rows affected) (0.000268s)
 World |   Query    | QueryDatabase SELECT `id`,`char_id`,`title_set` FROM player_titlesets WHERE char_id = 1 -- (0 rows returned) (0.000031s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM quest_globals -- (6 rows affected) (0.000255s)
 World |   Query    | QueryDatabase SELECT `charid`,`npcid`,`zoneid`,`name`,`value`,`expdate` FROM quest_globals WHERE charid = 1 -- (0 rows returned) (0.000031s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM timers -- (5 rows affected) (0.000243s)
 World |   Query    | QueryDatabase SELECT `char_id`,`type`,`start`,`duration`,`enable` FROM timers WHERE char_id = 1 -- (0 rows returned) (0.000030s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM trader -- (6 rows affected) (0.000237s)
 World |   Query    | QueryDatabase SELECT `char_id`,`item_id`,`serialnumber`,`charges`,`item_cost`,`slot_id` FROM trader WHERE char_id = 1 -- (0 rows returned) (0.000030s)
 World |   Query    | QueryDatabase SHOW COLUMNS FROM zone_flags -- (2 rows affected) (0.000228s)
 World |   Query    | QueryDatabase SELECT `charID`,`zoneID` FROM zone_flags WHERE charID = 1 -- (0 rows returned) (0.000030s)
 World |   Query    | QueryDatabase COMMIT -- (0 rows affected) (0.001903s)

@crotonrz
Copy link

image
Working as expected.

@Akkadius Akkadius merged commit 52763b6 into master Dec 28, 2023
2 checks passed
@Akkadius Akkadius deleted the akkadius/fix-character-copy branch December 28, 2023 02:04
@Akkadius Akkadius mentioned this pull request Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants