trickerer / Trinity-Bots

NPCBots for TrinityCore and AzerothCore 3.3.5
https://github.com/trickerer/TrinityCore-3.3.5-with-NPCBots/
472 stars 156 forks source link

[TC] [AC] [Question] `NpcBot.Transmog.MixWeaponInventoryTypes` is used for? #667

Closed GesiIvy128 closed 1 year ago

GesiIvy128 commented 1 year ago

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

Description

May I ask what the parameter NpcBot.Transmog.MixWeaponInventoryTypes is used for? I understand that NpcBot.Transmog.MixWeaponClasses is intended to allow transmogrification between different weapon classes, but could you please clarify what MixWeaponInventoryTypes controls?

TrinityCore or AzerothCore

Both

Core rev. hash/commit

No response

Operating system

No response

trickerer commented 1 year ago

Normally mixing weapon classes is only allowed without mixing inventory types. For example: you can transmog a 1h mace into 1h sword. 'One-handed' in an inventory type here. Enabling inventory types mixing allows to transmogrify an off-hand dagger into a 2h axe and other crazy stuff like this.

GesiIvy128 commented 1 year ago

Normally mixing weapon classes is only allowed without mixing inventory types. For example: you can transmog a 1h mace into 1h sword. 'One-handed' in an inventory type here. Enabling inventory types mixing allows to transmogrify an off-hand dagger into a 2h axe and other crazy stuff like this.

Thank you for the response! When you have some free time, could you also take a look at my other question: https://github.com/trickerer/Trinity-Bots/issues/668#issue-1956794853

Additionally, if I organize the SQL statements for the entire localization file, would it be possible to send it to you for inclusion in this project? I'm planning to use GPT to refine and complete the localization for both Simplified and Traditional Chinese.

trickerer commented 1 year ago

I do accept PRs for translations. You can use file history to check authors of existing chinese locales. I know they are a bit outdated, but how correct they are - I cannot begin to tell you. In any case, it isn't that much text so I hope you at least skeem through that AI generated translation before making a PR. Thanks.

GesiIvy128 commented 1 year ago

I do accept PRs for translations. You can use file history to check authors of existing chinese locales. I know they are a bit outdated, but how correct they are - I cannot begin to tell you. In any case, it isn't that much text so I hope you at least skeem through that AI generated translation before making a PR. Thanks.

Oh no! It seems like I've stumbled upon a new bug. When I set NpcBot.Transmog.UseEquipmentSlots to 1, the appearances of all the weapons and shields on the bot vanish...

GesiIvy128 commented 1 year ago

Okay, for some reason, this BUG has been resolved. When I noticed the robot's weapon appearance had disappeared (happened after I deleted the Cache folder of the client and restarted), I forcefully transmogrified the weapon to another one from my bags and then reverted it, and the weapon appearance displayed normally again.

GesiIvy128 commented 1 year ago

Certainly, but I would like to ask how "NpcBot.Transmog.UseEquipmentSlots" works? @trickerer

trickerer commented 1 year ago

It makes transmog system, instead of item id, use inventory slots to determine the destination of new item model. Which means item subclass and inventory type are ignored completely (if item's equippable in that slot). The bug you encountered is probably due to somewhere in code 0 is not interpreted as invalid item id for transmog in that mode.

GesiIvy128 commented 1 year ago

It makes transmog system, instead of item id, use inventory slots to determine the destination of new item model. Which means item subclass and inventory type are ignored completely (if item's equippable in that slot). The bug you encountered is probably due to somewhere in code 0 is not interpreted as invalid item id for transmog in that mode.

Thank you! I've written a LUA script myself to delete records with fake_id='-1' each time the worldserver starts. This should resolve the issue.

local SQL_in = "DELETE FROM `characters_npcbot_transmog` WHERE (`fake_id` = '-1');"

CharDBExecute(SQL_in)
print(">>Script: NPC Transmog Fix LUA")
GesiIvy128 commented 1 year ago

It makes transmog system, instead of item id, use inventory slots to determine the destination of new item model. Which means item subclass and inventory type are ignored completely (if item's equippable in that slot). The bug you encountered is probably due to somewhere in code 0 is not interpreted as invalid item id for transmog in that mode.

Thank you! I've written a LUA script myself to delete records with fake_id='-1' each time the worldserver starts. This should resolve the issue.

local SQL_in = "DELETE FROM `characters_npcbot_transmog` WHERE (`fake_id` = '-1');"

CharDBExecute(SQL_in)
print(">>Script: NPC Transmog Fix LUA")

Alright, it doesn't work. When I hide the helmet, the appearance of the weapons and shield still disappears. Saddddd

@trickerer