Local languages (#128)

* set local languages

* Update Transmogrification.cpp

* Update transmog_scripts.cpp

* fix zhTW translate

* Update transmog_scripts.cpp
This commit is contained in:
Alejandro Moreno
2023-08-08 19:01:20 -05:00
committed by GitHub
parent e6fd023ade
commit 78529997ac
4 changed files with 580 additions and 70 deletions

View File

@@ -5,3 +5,14 @@ DELETE FROM `creature_template` WHERE `entry` = 190010;
INSERT INTO `creature_template` (`entry`, `modelid1`, `modelid2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `scale`, `rank`, `dmgschool`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `AIName`, `MovementType`, `HoverHeight`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES
(@Entry, 19646, 0, @Name, "Transmogrifier", NULL, 0, 80, 80, 2, 35, 1, 1, 0, 0, 2000, 0, 1, 0, 7, 138936390, 0, 0, 0, '', 0, 1, 0, 0, 1, 0, 0, 'npc_transmogrifier');
DELETE FROM `creature_template_locale` WHERE `entry` IN (@Entry);
INSERT INTO `creature_template_locale` (`entry`, `locale`, `Name`, `Title`) VALUES
(@Entry, 'koKR', @Name, "변형기"),
(@Entry, 'frFR', @Name, "Transmogrificateur"),
(@Entry, 'deDE', @Name, "Transmogrifier"),
(@Entry, 'zhCN', @Name, "变形者"),
(@Entry, 'zhTW', @Name, "幻化大師"),
(@Entry, 'esES', @Name, "Transfigurador"),
(@Entry, 'esMX', @Name, "Transfigurador"),
(@Entry, 'ruRU', @Name, "Трансмогрификатор");

View File

@@ -4,26 +4,46 @@ INSERT INTO `npc_text` (`ID`, `text0_0`) VALUES
(@TEXT_ID, 'Transmogrification allows you to change how your items look like without changing the stats of the items.\r\nItems used in transmogrification are no longer refundable, tradeable and are bound to you.\r\nUpdating a menu updates the view and prices.\r\n\r\nNot everything can be transmogrified with each other.\r\nRestrictions include but are not limited to:\r\nOnly armor and weapons can be transmogrified\r\nGuns, bows and crossbows can be transmogrified with each other\r\nFishing poles can not be transmogrified\r\nYou must be able to equip both items used in the process.\r\n\r\nTransmogrifications stay on your items as long as you own them.\r\nIf you try to put the item in guild bank or mail it to someone else, the transmogrification is stripped.\r\n\r\nYou can also remove transmogrifications for free at the transmogrifier.'),
(@TEXT_ID+1, 'You can save your own transmogrification sets.\r\n\r\nTo save, first you must transmogrify your equipped items.\r\nThen when you go to the set management menu and go to save set menu,\r\nall items you have transmogrified are displayed so you see what you are saving.\r\nIf you think the set is fine, you can click to save the set and name it as you wish.\r\n\r\nTo use a set you can click the saved set in the set management menu and then select use set.\r\nIf the set has a transmogrification for an item that is already transmogrified, the old transmogrification is lost.\r\nNote that the same transmogrification restrictions apply when trying to use a set as in normal transmogrification.\r\n\r\nTo delete a set you can go to the set\'s menu and select delete set.');
DELETE FROM `npc_text_locale` WHERE `ID` IN (@TEXT_ID,@TEXT_ID+1);
INSERT INTO `npc_text_locale` (`ID`, `Locale`, `Text0_0`) VALUES
(@TEXT_ID, 'koKR', ' .\r\n형변환에 .\r\n메뉴를 .\r\n\r\n모든 .\r\n제한사항에는 :\r\n갑옷과 .\r\n총, , \r\n낚싯대는 .\r\n이 .\r\n\r\n변환은 .\r\n시도하면 .\r\n\r\n변환기에서 .'),
(@TEXT_ID+1, 'koKR', ' .\r\n\r\n저장하려면 .\r\n그 \r\n모든 .\r\n세트가 .\r\n\r\n세트를 .\r\n세트에 .\r\n다음과 . .\r\n\r\n세트를 .'),
(@TEXT_ID, 'frFR', 'La transmogrification vous permet de modifier l''apparence de vos objets sans modifier les statistiques des objets.\\r\\nLes objets utilisés dans la transmogrification ne sont plus remboursables, échangeables et vous sont liés.\\r\\nLa mise à jour d''un menu met à jour la vue et les prix.\\ r\\n\\r\\nTout ne peut pas être transmogrifié les uns avec les autres.\\r\\nLes restrictions incluent, mais ne sont pas limitées à :\\r\\nSeules les armures et les armes peuvent être transmogrifiées\\r\\nLes fusils, les arcs et les arbalètes peuvent être transmogrifiés les uns avec les autres \\r\\nLes cannes à pêche ne peuvent pas être transmogrifiées\\r\\nVous devez être capable d''équiper les deux objets utilisés dans le processus.\\r\\n\\r\\nLes transmogrifications restent sur vos objets tant que vous les possédez.\\r\\nSi vous essayez pour mettre l''objet dans la banque de guilde ou l''envoyer à quelqu''un d''autre, la transmogrification est supprimée.\\r\\n\\r\\nVous pouvez également supprimer les transmogrifications gratuitement sur le transmogrificateur.'),
(@TEXT_ID+1, 'frFR', 'Vous pouvez enregistrer vos propres ensembles de transmogrification.\r\n\r\nPour enregistrer, vous devez d''abord transmogrifier vos objets équipés.\r\nEnsuite, lorsque vous accédez au menu de gestion des ensembles et accédez au menu de sauvegarde,\r\ntous les objets vous avez transmogrifié sont affichés afin que vous puissiez voir ce que vous enregistrez.\r\nSi vous pensez que l''ensemble est correct, vous pouvez cliquer pour enregistrer l''ensemble et le nommer comme vous le souhaitez.\r\n\r\nPour utiliser un ensemble, vous pouvez cliquer sur l''ensemble enregistré dans le menu de gestion de l''ensemble, puis sélectionnez utiliser l''ensemble.\r\nSi l''ensemble a une transmogrification pour un élément déjà transmogrifié, l''ancienne transmogrification est perdue.\r\nNotez que les mêmes restrictions de transmogrification s''appliquent lorsque essayer d''utiliser un ensemble comme dans une transmogrification normale.\r\n\r\nPour supprimer un ensemble, vous pouvez aller dans le menu de l''ensemble et sélectionner supprimer l''ensemble.'),
(@TEXT_ID, 'deDE', 'Mit der Transmogrifizierung können Sie das Aussehen Ihrer Gegenstände ändern, ohne die Werte der Gegenstände zu ändern.\r\nBei der Transmogrifizierung verwendete Gegenstände sind nicht mehr erstattungsfähig, handelbar und an Sie gebunden.\r\nDurch das Aktualisieren eines Menüs werden die Ansicht und die Preise aktualisiert.\ r\n\r\nNicht alles kann miteinander transmogrifiziert werden.\r\nZu den Einschränkungen gehören unter anderem:\r\nNur Rüstungen und Waffen können miteinander transmogrifiziert werden.\r\nWaffen, Bögen und Armbrüste können miteinander transmogrifiziert werden \r\nAngelruten können nicht transmogrifiziert werden.\r\nSie müssen in der Lage sein, beide dabei verwendeten Gegenstände auszurüsten.\r\n\r\nTransmogrifikationen bleiben auf Ihren Gegenständen, solange Sie sie besitzen.\r\nWenn Sie es versuchen Um den Gegenstand in die Gildenbank zu legen oder an jemand anderen zu verschicken, wird die Transmogrifikation entfernt.\r\n\r\nSie können Transmogrifikationen auch kostenlos beim Transmogrifizierer entfernen.'),
(@TEXT_ID+1, 'deDE', 'Sie können Ihre eigenen Transmogrifikationssets speichern.\r\n\r\nZum Speichern müssen Sie zuerst Ihre ausgerüsteten Gegenstände transmogrifizieren.\r\nWenn Sie dann zum Set-Verwaltungsmenü gehen und zum Set-Speichermenü gehen,\r\nalle Gegenstände Sie werden angezeigt, sodass Sie sehen, was Sie speichern.\r\nWenn Sie der Meinung sind, dass das Set in Ordnung ist, können Sie auf klicken, um das Set zu speichern und es nach Ihren Wünschen zu benennen.\r\n\r\nSo verwenden Sie ein Set Sie können im Setverwaltungsmenü auf das gespeicherte Set klicken und dann Set verwenden auswählen.\r\nWenn das Set eine Transmogrifizierung für einen Gegenstand hat, der bereits transmogrifiziert ist, geht die alte Transmogrifizierung verloren.\r\nBeachten Sie, dass die gleichen Transmogrifizierungsbeschränkungen gelten, wenn Ich versuche, ein Set wie bei der normalen Transmogrifizierung zu verwenden.\r\n\r\nUm ein Set zu löschen, gehen Sie zum Menü des Sets und wählen Sie Set löschen.'),
(@TEXT_ID, 'zhCN', '\r\n变形中使用的物品不再可退款\r\n更新菜单会更新视图和价格\ r\n\r\n并不是所有东西都可以互相变形\r\n限制包括但不限于\r\n只有盔甲和武器可以变形\r\n枪 \r\n鱼竿无法变形\r\n您必须能够装备在此过程中使用的两个物品\r\n\r\n只要您拥有它们\r\n如果您尝试 \r\n\r\n您也可以在变形器处免费移除变形'),
(@TEXT_ID+1, 'zhCN', '\r\n\r\n要保存\r\n然后当您进入套装管理菜单并进入保存套装菜单时\r\n所有物品 便\r\n如果您认为该集合没问题\r\n\r\n要使用您的集合 使\r\n如果该集合对已变形的项目有变形\r\n请注意 使\r\n\r\n要删除集合'),
(@TEXT_ID, 'zhTW', '\r\n在變身術中使用的物品將不再可退款\r\n更新菜單將更新視圖和價格\r\n\r\n並非所有物品都可以互相變身\r\n限制條件包括但不限於\r\n只有盔甲和武器可以變身\r\n槍械\r\n釣魚竿無法進行變身\r\n你必須能夠裝備在此過程中使用的兩件物品\r\n\r\n變身效果會持續存在於你的物品上\r\n如果你試圖將物品放入公會銀行或郵寄給他人\r\n\r\n你也可以在變身術轉化師處免費移除變身效果'),
(@TEXT_ID+1, 'zhTW', '\r\n\r\n要保存\r\n然後\r\n所有你已經變身的物品都會顯示出來\r\n如果你認為這套裝很好\r\n\r\n要使用一個套裝使\r\n如果該套裝中的物品已經有變身效果\r\n請注意使\r\n\r\n要刪除一個套裝'),
(@TEXT_ID, 'esES', 'La transfiguración permite cambiar la apariencia de tus objetos sin cambiar sus estadísticas.\r\nLos objetos utilizados en la transfiguración ya no son reembolsables, intercambiables y están vinculados a usted.\r\nActualizar un menú actualiza la vista y los precios.\ r\n\r\nNo todo se puede transfigurar entre .\r\nLas restricciones incluyen, pero no se limitan a:\r\nSolo se pueden transfigurar armaduras y armas\r\nArmas, arcos y ballestas se pueden transfigurar entre \r\nLas cañas de pescar no se pueden transfigurar.\r\nDebes poder equipar ambos elementos utilizados en el proceso.\r\n\r\nLas transfiguraciones permanecen en tus elementos mientras los tengas.\r\nSi lo intentas para poner el artículo en el banco del gremio o enviarlo por correo a otra persona, la transfiguración se elimina.\r\n\r\nTambién puedes eliminar las transfiguraciones de forma gratuita en el transfigurador.'),
(@TEXT_ID+1, 'esES', 'Puede guardar sus propios conjuntos de transfiguración.\r\n\r\nPara guardar, primero debe transfigurar sus elementos equipados.\r\nLuego, cuando vaya al menú de administración de conjuntos y vaya al menú Guardar conjunto,\r\ntodos los elementos que ha transfigurado se muestran para que vea lo que está guardando.\r\nSi cree que el conjunto está bien, puede hacer clic para guardar el conjunto y nombrarlo como desee.\r\n\r\nPara usar un conjunto puede hacer clic en el conjunto guardado en el menú de administración de conjuntos y luego seleccionar usar conjunto.\r\nSi el conjunto tiene una transfiguración para un elemento que ya está transfigurado, la transfiguración anterior se pierde.\r\nTenga en cuenta que se aplican las mismas restricciones de transfiguración cuando tratando de usar un conjunto como en la transfiguración normal.\r\n\r\nPara eliminar un conjunto, puede ir al menú del conjunto y seleccionar eliminar conjunto.'),
(@TEXT_ID, 'esMX', 'La transfiguración permite cambiar la apariencia de tus objetos sin cambiar sus estadísticas.\r\nLos objetos utilizados en la transfiguración ya no son reembolsables, intercambiables y están vinculados a usted.\r\nActualizar un menú actualiza la vista y los precios.\ r\n\r\nNo todo se puede transfigurar entre .\r\nLas restricciones incluyen, pero no se limitan a:\r\nSolo se pueden transfigurar armaduras y armas\r\nArmas, arcos y ballestas se pueden transfigurar entre \r\nLas cañas de pescar no se pueden transfigurar.\r\nDebes poder equipar ambos elementos utilizados en el proceso.\r\n\r\nLas transfiguraciones permanecen en tus elementos mientras los tengas.\r\nSi lo intentas para poner el artículo en el banco del gremio o enviarlo por correo a otra persona, la transfiguración se elimina.\r\n\r\nTambién puedes eliminar las transfiguraciones de forma gratuita en el transfigurador.'),
(@TEXT_ID+1, 'esMX', 'Puede guardar sus propios conjuntos de transfiguración.\r\n\r\nPara guardar, primero debe transfigurar sus elementos equipados.\r\nLuego, cuando vaya al menú de administración de conjuntos y vaya al menú Guardar conjunto,\r\ntodos los elementos que ha transfigurado se muestran para que vea lo que está guardando.\r\nSi cree que el conjunto está bien, puede hacer clic para guardar el conjunto y nombrarlo como desee.\r\n\r\nPara usar un conjunto puede hacer clic en el conjunto guardado en el menú de administración de conjuntos y luego seleccionar usar conjunto.\r\nSi el conjunto tiene una transfiguración para un elemento que ya está transfigurado, la transfiguración anterior se pierde.\r\nTenga en cuenta que se aplican las mismas restricciones de transfiguración cuando tratando de usar un conjunto como en la transfiguración normal.\r\n\r\nPara eliminar un conjunto, puede ir al menú del conjunto y seleccionar eliminar conjunto.'),
(@TEXT_ID, 'ruRU', 'Трансмогрификация позволяет вам изменить внешний вид ваших предметов без изменения характеристик предметов.\r\редметы, использованные в трансмогрификации, больше не подлежат возврату, обмену и привязаны к вам.\r\nОбновление меню обновляет вид и цены.\ r\n\r\nНе все можно трансмогрифицировать друг с другом.\r\nОграничения включают, но не ограничиваются:\r\nМожно трансмогрифицировать только доспехи и оружие\r\nОружие, луки и арбалеты можно трансмогрифицировать друг с другом \r\nУдочки не могут быть трансмогрифицированы\r\nВы должны быть в состоянии экипировать оба предмета, используемые в процессе.\r\n\r\реобразования остаются на ваших предметах, пока они у вас есть.\r\nЕсли вы попытаетесь чтобы положить предмет в банк гильдии или отправить кому-то другому, трансмогрификация снимается.\r\n\r\nВы также можете бесплатно удалить трансмогрификацию в трансмогрификаторе.'),
(@TEXT_ID+1, 'ruRU', 'Вы можете сохранять свои собственные наборы для трансмогрификации.\r\n\r\nЧтобы сохранить, сначала вы должны трансмогрифицировать свои экипированные предметы.\r\nЗатем, когда вы перейдете в меню управления наборами и перейдете в меню сохранения набора,\r\се предметы которые вы преобразовали, отображаются так, что вы видите, что вы сохраняете.\r\nЕсли вы считаете, что набор в порядке, вы можете нажать, чтобы сохранить набор и назвать его по своему желанию.\r\n\r\nЧтобы использовать набор, можно щелкнуть сохраненный набор в меню управления набором, а затем выбрать использовать набор.\r\nЕсли в наборе есть трансмогрификация предмета, который уже трансмогрифицирован, старая трансмогрификация теряется.\r\nОбратите внимание, что те же ограничения на трансмогрификацию применяются, когда пытается использовать набор, как при обычной трансмогрификации.\r\n\r\nЧтобы удалить набор, вы можете перейти в меню набора и выбрать удалить набор.');
SET @STRING_ENTRY := 11100;
DELETE FROM `acore_string` WHERE `entry` IN (@STRING_ENTRY+0,@STRING_ENTRY+1,@STRING_ENTRY+2,@STRING_ENTRY+3,@STRING_ENTRY+4,@STRING_ENTRY+5,@STRING_ENTRY+6,@STRING_ENTRY+7,@STRING_ENTRY+8,@STRING_ENTRY+9,@STRING_ENTRY+10, @STRING_ENTRY+11, @STRING_ENTRY+12, @STRING_ENTRY+13, @STRING_ENTRY+14, @STRING_ENTRY+15, @STRING_ENTRY+16);
INSERT INTO `acore_string` (`entry`, `content_default`) VALUES
(@STRING_ENTRY+0, 'Item successfully transmogrified.'),
(@STRING_ENTRY+1, 'Equipment slot is empty.'),
(@STRING_ENTRY+2, 'Invalid source item selected.'),
(@STRING_ENTRY+3, 'Source item does not exist.'),
(@STRING_ENTRY+4, 'Destination item does not exist.'),
(@STRING_ENTRY+5, 'Selected items are invalid.'),
(@STRING_ENTRY+6, 'You don''t have enough money.'),
(@STRING_ENTRY+7, 'You don''t have enough tokens.'),
(@STRING_ENTRY+8, 'All your transmogrifications were removed.'),
(@STRING_ENTRY+9, 'No transmogrification found.'),
(@STRING_ENTRY+10, 'Invalid name inserted.'),
(@STRING_ENTRY+11, 'Showing transmogrified items, relog to update the current area.'),
(@STRING_ENTRY+12, 'Hiding transmogrified items, relog to update the current area.'),
(@STRING_ENTRY+13, 'The selected item is not suitable for transmogrification.'),
(@STRING_ENTRY+14, 'The selected item cannot be used for transmogrification of the target player.'),
(@STRING_ENTRY+15, 'Performing transmog appearance sync....'),
(@STRING_ENTRY+16, 'Appearance sync complete.');
INSERT INTO `acore_string` (`entry`, `content_default`, `locale_koKR`, `locale_frFR`, `locale_deDE`, `locale_zhCN`, `locale_zhTW`, `locale_esES`, `locale_esMX`, `locale_ruRU`)
VALUES
(11100, 'Item successfully transmogrified.', ' ', 'Objet transmogrifié avec succès', 'Gegenstand erfolgreich transmogrifiziert', '', '', 'Objeto transfigurado con éxito', 'Objeto transfigurado con éxito', 'Предмет успешно трансмогрифицирован'),
(11101, 'Equipment slot is empty.', ' .', 'L''emplacement d''équipement est vide.', 'Der Ausrüstungsplatz ist leer.', '', '', 'La ranura de equipo está vacía.', 'La ranura de equipo está vacía.', 'Слот снаряжения пуст.'),
(11102, 'Invalid source item selected.', ' .', 'Élément source sélectionné non valide.', 'Ungültiges ausgewähltes Quellelement.', '', '', 'Elemento fuente seleccionado no válido.', 'Elemento fuente seleccionado no válido.', 'Недопустимый выбранный исходный элемент.'),
(11103, 'Source item does not exist.', ' .', 'L''élément source n''existe pas.', 'Das Quellelement existiert nicht.', '', '', 'El elemento de origen no existe.', 'El elemento de origen no existe.', 'Исходный элемент не существует.'),
(11104, 'Destination item does not exist.', ' .', 'L''élément cible n''existe pas.', 'Das Zielelement existiert nicht.', '', '', 'El elemento de destino no existe.', 'El elemento de destino no existe.', 'Целевой элемент не существует.'),
(11105, 'Selected items are invalid.', ' .', 'Les éléments sélectionnés ne sont pas valides', 'Die ausgewählten Elemente sind ungültig', '', '', 'Los elementos seleccionados no son válidos', 'Los elementos seleccionados no son válidos', 'Выбранные элементы недействительны'),
(11106, 'You don''t have enough money.', ' .', 'Vous n''avez pas assez d''argent.', 'Du hast nicht genug Geld.', '', '', 'No tienes suficiente dinero.', 'No tienes suficiente dinero.', 'У вас недостаточно денег.'),
(11107, 'You don''t have enough tokens.', ' .', 'Vous n''avez pas assez de jetons.', 'Du hast nicht genug Chips.', '', '', 'No tienes suficientes fichas.', 'No tienes suficientes fichas.', 'У вас недостаточно фишек.'),
(11108, 'All your transmogrifications were removed.', ' .', 'Suppression de toutes vos transmogrifications', 'Alle deine Transmogrifikationen wurden entfernt', '', '', 'Se eliminaron todas tus transfiguraciones', 'Se eliminaron todas tus transfiguraciones', 'Удалены все ваши трансмогрификации'),
(11109, 'No transmogrification found.', ' .', 'Aucune transfiguration trouvée.', 'Keine Verwandlung gefunden.', '', '', 'No se encontró transfiguración.', 'No se encontró transfiguración.', 'Трансфигурация не найдена.'),
(11110, 'Invalid name inserted.', ' .', 'Nom inséré non valide.', 'Ungültiger eingegebener Name.', '', '', 'Nombre insertado no válido.', 'Nombre insertado no válido.', 'Недопустимое вставленное имя.'),
(11111, 'Showing transmogrified items, relog to update the current area.', ' , .', 'En affichant les objets transmogrifiés, reconnectez-vous pour actualiser la zone actuelle.', 'Transmogrifizierte Gegenstände werden angezeigt. Melden Sie sich erneut an, um den aktuellen Bereich zu aktualisieren.', '', '', 'Mostrando elementos transfigurados, vuelva a iniciar sesión para actualizar el área actual.', 'Mostrando elementos transfigurados, vuelva a iniciar sesión para actualizar el área actual.', 'Отображение трансмогрифицированных предметов. Войдите в систему еще раз, чтобы обновить текущую область.'),
(11112, 'Hiding transmogrified items, relog to update the current area.', ' .', 'Masquez les objets transmogrifiés, reconnectez-vous pour actualiser la zone actuelle.', 'Transmogrifizierte Gegenstände ausblenden, erneut anmelden, um den aktuellen Bereich zu aktualisieren.', '', '', 'Ocultar elementos transfigurados, volver a iniciar sesión para actualizar el área actual.', 'Ocultar elementos transfigurados, volver a iniciar sesión para actualizar el área actual.', 'Скройте трансмогрифицированные предметы, войдите в систему, чтобы обновить текущую область.'),
(11113, 'The selected item is not suitable for transmogrification.', ' .', 'L''objet sélectionné ne convient pas à la métamorphose.', 'Der ausgewählte Gegenstand ist nicht für die Verwandlung geeignet.', '', '', 'El elemento seleccionado no es adecuado para la transfiguración.', 'El elemento seleccionado no es adecuado para la transfiguración.', 'Выбранный предмет не подходит для преображения.'),
(11114, 'The selected item cannot be used for transmogrification of the target player.', ' .', 'L''objet sélectionné ne peut pas être utilisé pour la transmogrification du joueur ciblé', 'Der ausgewählte Gegenstand kann nicht für die Transmogrifizierung des Zielspielers verwendet werden', '', '', 'El elemento seleccionado no se puede usar para la transfiguración del jugador objetivo', 'El elemento seleccionado no se puede usar para la transfiguración del jugador objetivo', 'Выбранный предмет нельзя использовать для трансмогрификации целевого игрока.'),
(11115, 'Performing transmog appearance sync...', ' ...', 'Exécution de la synchronisation de l''apparence de transmogrification...', 'Synchronisierung des Transmog-Erscheinungsbilds wird durchgeführt ...', ' Transmog ...', '...', 'Realizando sincronización de apariencia de transfiguración...', 'Realizando sincronización de apariencia de transfiguración...', 'Выполнение синхронизации внешнего вида Transmog...'),
(11116, 'Appearance sync complete.', ' ', 'Synchronisation complète de l''apparence', 'Vollständige Synchronisierung des Erscheinungsbilds', '', '', 'Sincronización de apariencia completa', 'Sincronización de apariencia completa', 'Полная синхронизация внешнего вида');
DELETE FROM `command` WHERE `name` IN ('transmog', 'transmog add', 'transmog sync', 'transmog add set');
INSERT INTO `command` (`name`, `security`, `help`) VALUES

View File

@@ -114,28 +114,187 @@ void Transmogrification::UnloadPlayerSets(ObjectGuid pGUID)
}
#endif
const char* Transmogrification::GetSlotName(uint8 slot, WorldSession* /*session*/) const
const char* Transmogrification::GetSlotName(uint8 slot, WorldSession* session) const
{
LOG_DEBUG("module", "Transmogrification::GetSlotName");
switch (slot)
{
case EQUIPMENT_SLOT_HEAD: return "Head";// session->GetAcoreString(LANG_SLOT_NAME_HEAD);
case EQUIPMENT_SLOT_SHOULDERS: return "Shoulders";// session->GetAcoreString(LANG_SLOT_NAME_SHOULDERS);
case EQUIPMENT_SLOT_BODY: return "Shirt";// session->GetAcoreString(LANG_SLOT_NAME_BODY);
case EQUIPMENT_SLOT_CHEST: return "Chest";// session->GetAcoreString(LANG_SLOT_NAME_CHEST);
case EQUIPMENT_SLOT_WAIST: return "Waist";// session->GetAcoreString(LANG_SLOT_NAME_WAIST);
case EQUIPMENT_SLOT_LEGS: return "Legs";// session->GetAcoreString(LANG_SLOT_NAME_LEGS);
case EQUIPMENT_SLOT_FEET: return "Feet";// session->GetAcoreString(LANG_SLOT_NAME_FEET);
case EQUIPMENT_SLOT_WRISTS: return "Wrists";// session->GetAcoreString(LANG_SLOT_NAME_WRISTS);
case EQUIPMENT_SLOT_HANDS: return "Hands";// session->GetAcoreString(LANG_SLOT_NAME_HANDS);
case EQUIPMENT_SLOT_BACK: return "Back";// session->GetAcoreString(LANG_SLOT_NAME_BACK);
case EQUIPMENT_SLOT_MAINHAND: return "Main hand";// session->GetAcoreString(LANG_SLOT_NAME_MAINHAND);
case EQUIPMENT_SLOT_OFFHAND: return "Off hand";// session->GetAcoreString(LANG_SLOT_NAME_OFFHAND);
case EQUIPMENT_SLOT_RANGED: return "Ranged";// session->GetAcoreString(LANG_SLOT_NAME_RANGED);
case EQUIPMENT_SLOT_TABARD: return "Tabard";// session->GetAcoreString(LANG_SLOT_NAME_TABARD);
default: return NULL;
LocaleConstant locale = session->GetSessionDbLocaleIndex();
std::unordered_map<uint8, const char*> defaultNames = {
{ EQUIPMENT_SLOT_HEAD, "Head" }, // session->GetAcoreString(LANG_SLOT_NAME_HEAD);
{ EQUIPMENT_SLOT_SHOULDERS, "Shoulders" }, // session->GetAcoreString(LANG_SLOT_NAME_SHOULDERS);
{ EQUIPMENT_SLOT_BODY, "Shirt" }, // session->GetAcoreString(LANG_SLOT_NAME_BODY);
{ EQUIPMENT_SLOT_CHEST, "Chest" }, // session->GetAcoreString(LANG_SLOT_NAME_CHEST);
{ EQUIPMENT_SLOT_WAIST, "Waist" }, // session->GetAcoreString(LANG_SLOT_NAME_WAIST);
{ EQUIPMENT_SLOT_LEGS, "Legs" }, // session->GetAcoreString(LANG_SLOT_NAME_LEGS);
{ EQUIPMENT_SLOT_FEET, "Feet" }, // session->GetAcoreString(LANG_SLOT_NAME_FEET);
{ EQUIPMENT_SLOT_WRISTS, "Wrists" }, // session->GetAcoreString(LANG_SLOT_NAME_WRISTS);
{ EQUIPMENT_SLOT_HANDS, "Hands" }, // session->GetAcoreString(LANG_SLOT_NAME_HANDS);
{ EQUIPMENT_SLOT_BACK, "Back" }, // session->GetAcoreString(LANG_SLOT_NAME_BACK);
{ EQUIPMENT_SLOT_MAINHAND, "Main Hand" }, // session->GetAcoreString(LANG_SLOT_NAME_MAINHAND);
{ EQUIPMENT_SLOT_OFFHAND, "Off Hand" }, // session->GetAcoreString(LANG_SLOT_NAME_OFFHAND);
{ EQUIPMENT_SLOT_RANGED, "Ranged" }, // session->GetAcoreString(LANG_SLOT_NAME_RANGED);
{ EQUIPMENT_SLOT_TABARD, "Tabard" }, // session->GetAcoreString(LANG_SLOT_NAME_TABARD);
};
std::unordered_map<uint8, std::unordered_map<LocaleConstant, const char*>> slotNames = {
{ EQUIPMENT_SLOT_HEAD, {
{ LOCALE_koKR, "머리" },
{ LOCALE_frFR, "Tête" },
{ LOCALE_deDE, "Kopf" },
{ LOCALE_zhCN, "头部" },
{ LOCALE_zhTW, "頭部" },
{ LOCALE_esES, "Cabeza" },
{ LOCALE_esMX, "Cabeza" },
{ LOCALE_ruRU, "Голова" }
} },
{ EQUIPMENT_SLOT_SHOULDERS, {
{ LOCALE_koKR, "어깨" },
{ LOCALE_frFR, "Épaules" },
{ LOCALE_deDE, "Schultern" },
{ LOCALE_zhCN, "肩部" },
{ LOCALE_zhTW, "肩部" },
{ LOCALE_esES, "Hombros" },
{ LOCALE_esMX, "Hombros" },
{ LOCALE_ruRU, "Плечи" }
} },
{ EQUIPMENT_SLOT_BODY, {
{ LOCALE_koKR, "셔츠" },
{ LOCALE_frFR, "Chemise" },
{ LOCALE_deDE, "Hemd" },
{ LOCALE_zhCN, "衬衫" },
{ LOCALE_zhTW, "襯衫" },
{ LOCALE_esES, "Camisa" },
{ LOCALE_esMX, "Camisa" },
{ LOCALE_ruRU, "Рубашка" }
} },
{ EQUIPMENT_SLOT_CHEST, {
{ LOCALE_koKR, "가슴" },
{ LOCALE_frFR, "Torse" },
{ LOCALE_deDE, "Brust" },
{ LOCALE_zhCN, "胸部" },
{ LOCALE_zhTW, "胸部" },
{ LOCALE_esES, "Pecho" },
{ LOCALE_esMX, "Pecho" },
{ LOCALE_ruRU, "Грудь" }
} },
{ EQUIPMENT_SLOT_WAIST, {
{ LOCALE_koKR, "허리" },
{ LOCALE_frFR, "Taille" },
{ LOCALE_deDE, "Taille" },
{ LOCALE_zhCN, "腰部" },
{ LOCALE_zhTW, "腰部" },
{ LOCALE_esES, "Cintura" },
{ LOCALE_esMX, "Cintura" },
{ LOCALE_ruRU, "Пояс" }
} },
{ EQUIPMENT_SLOT_LEGS, {
{ LOCALE_koKR, "다리" },
{ LOCALE_frFR, "Jambes" },
{ LOCALE_deDE, "Beine" },
{ LOCALE_zhCN, "腿部" },
{ LOCALE_zhTW, "腿部" },
{ LOCALE_esES, "Piernas" },
{ LOCALE_esMX, "Piernas" },
{ LOCALE_ruRU, "Ноги" }
} },
{ EQUIPMENT_SLOT_FEET, {
{ LOCALE_koKR, "" },
{ LOCALE_frFR, "Pieds" },
{ LOCALE_deDE, "Füße" },
{ LOCALE_zhCN, "" },
{ LOCALE_zhTW, "เท้า" },
{ LOCALE_esES, "Pies" },
{ LOCALE_esMX, "Pies" },
{ LOCALE_ruRU, "Ступни" }
} },
{ EQUIPMENT_SLOT_WRISTS, {
{ LOCALE_koKR, "손목" },
{ LOCALE_frFR, "Poignets" },
{ LOCALE_deDE, "Handgelenke" },
{ LOCALE_zhCN, "腕部" },
{ LOCALE_zhTW, "ข้อมือ" },
{ LOCALE_esES, "Muñecas" },
{ LOCALE_esMX, "Muñecas" },
{ LOCALE_ruRU, "Запястья" }
} },
{ EQUIPMENT_SLOT_HANDS, {
{ LOCALE_koKR, "" },
{ LOCALE_frFR, "Mains" },
{ LOCALE_deDE, "Hände" },
{ LOCALE_zhCN, "" },
{ LOCALE_zhTW, "มือ" },
{ LOCALE_esES, "Manos" },
{ LOCALE_esMX, "Manos" },
{ LOCALE_ruRU, "Кисти рук" }
} },
{ EQUIPMENT_SLOT_BACK, {
{ LOCALE_koKR, "" },
{ LOCALE_frFR, "Dos" },
{ LOCALE_deDE, "Rücken" },
{ LOCALE_zhCN, "背部" },
{ LOCALE_zhTW, "หลัง" },
{ LOCALE_esES, "Espalda" },
{ LOCALE_esMX, "Espalda" },
{ LOCALE_ruRU, "Спина" }
} },
{ EQUIPMENT_SLOT_MAINHAND, {
{ LOCALE_koKR, "주장비" },
{ LOCALE_frFR, "Main droite" },
{ LOCALE_deDE, "Haupthand" },
{ LOCALE_zhCN, "主手" },
{ LOCALE_zhTW, "มือหนึ่ง" },
{ LOCALE_esES, "Mano derecha" },
{ LOCALE_esMX, "Mano derecha" },
{ LOCALE_ruRU, "Правая рука" }
} },
{ EQUIPMENT_SLOT_OFFHAND, {
{ LOCALE_koKR, "보조장비" },
{ LOCALE_frFR, "Main gauche" },
{ LOCALE_deDE, "Nebenhand" },
{ LOCALE_zhCN, "副手" },
{ LOCALE_zhTW, "มือสอง" },
{ LOCALE_esES, "Mano izquierda" },
{ LOCALE_esMX, "Mano izquierda" },
{ LOCALE_ruRU, "Левая рука" }
} },
{ EQUIPMENT_SLOT_RANGED, {
{ LOCALE_koKR, "원거리" },
{ LOCALE_frFR, "À distance" },
{ LOCALE_deDE, "Distanz" },
{ LOCALE_zhCN, "远程" },
{ LOCALE_zhTW, "ระยะไกล" },
{ LOCALE_esES, "A distancia" },
{ LOCALE_esMX, "A distancia" },
{ LOCALE_ruRU, "Дальний бой" }
} },
{ EQUIPMENT_SLOT_TABARD, {
{ LOCALE_koKR, "휘장" },
{ LOCALE_frFR, "Tabard" },
{ LOCALE_deDE, "Wappenrock" },
{ LOCALE_zhCN, "战袍" },
{ LOCALE_zhTW, "戰袍" },
{ LOCALE_esES, "Tabardo" },
{ LOCALE_esMX, "Tabardo" },
{ LOCALE_ruRU, "Гербовая накидка" }
} },
};
auto it = slotNames.find(slot);
if (it != slotNames.end()) {
auto& namesByLocale = it->second;
auto nameIt = namesByLocale.find(locale);
if (nameIt != namesByLocale.end()) {
return nameIt->second;
}
}
auto defaultIt = defaultNames.find(slot);
if (defaultIt != defaultNames.end()) {
return defaultIt->second;
}
return NULL;
}
std::string Transmogrification::GetItemIcon(uint32 entry, uint32 width, uint32 height, int x, int y) const

View File

@@ -19,7 +19,7 @@ Blizzard might have changed the quality requirements.
Cant transmogrify rediculus items // Foereaper: would be fun to stab people with a fish
-- Cant think of any good way to handle this easily, could rip flagged items from cata DB
*/
#include <unordered_map>
#include "Transmogrification.h"
#include "ScriptedCreature.h"
#include "ItemTemplate.h"
@@ -28,6 +28,321 @@ Cant transmogrify rediculus items // Foereaper: would be fun to stab people with
#define sT sTransmogrification
#define GTS session->GetAcoreString // dropped translation support, no one using?
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_HOWWORKS = {
{LOCALE_enUS, "How does transmogrification work?"},
{LOCALE_koKR, "형상변환은 어떻게 작동합니까?"},
{LOCALE_frFR, "Comment fonctionne la transmogrification ?"},
{LOCALE_deDE, "Wie funktioniert Transmogrifizierung?"},
{LOCALE_zhCN, "变形术是如何运作的?"},
{LOCALE_zhTW, "幻化是如何運作的?"},
{LOCALE_esES, "¿Cómo funciona la transfiguración?"},
{LOCALE_esMX, "¿Cómo funciona la transfiguración?"},
{LOCALE_ruRU, "Как работает трансмогрификация?"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_MANAGESETS = {
{LOCALE_enUS, "Manage sets"},
{LOCALE_koKR, "세트 관리"},
{LOCALE_frFR, "Gérer les ensembles"},
{LOCALE_deDE, "Sets verwalten"},
{LOCALE_zhCN, "管理套装"},
{LOCALE_zhTW, "管理套裝"},
{LOCALE_esES, "Administrar conjuntos"},
{LOCALE_esMX, "Administrar conjuntos"},
{LOCALE_ruRU, "Управление комплектами"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_REMOVETRANSMOG = {
{LOCALE_enUS, "Remove all transmogrifications"},
{LOCALE_koKR, "모든 변형 제거"},
{LOCALE_frFR, "Supprimer toutes les transmogrifications"},
{LOCALE_deDE, "Alle Transmogrifikationen entfernen"},
{LOCALE_zhCN, "移除所有幻化"},
{LOCALE_zhTW, "移除所有幻化"},
{LOCALE_esES, "Eliminar todas las transfiguraciones"},
{LOCALE_esMX, "Eliminar todas las transfiguraciones"},
{LOCALE_ruRU, "Удалить все трансмогрификации"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_REMOVETRANSMOG_ASK = {
{LOCALE_enUS, "Remove transmogrifications from all equipped items?"},
{LOCALE_koKR, "장착한 모든 아이템의 변형을 제거합니까?"},
{LOCALE_frFR, "Supprimer les transmogrifications de tous les objets équipés ?"},
{LOCALE_deDE, "Transmogrifikationen von allen ausgerüsteten Gegenständen entfernen?"},
{LOCALE_zhCN, "是否要从所有已装备的物品中移除幻化?"},
{LOCALE_zhTW, "從所有已裝備物品中移除幻化?"},
{LOCALE_esES, "¿Eliminar las transfiguraciones de todos los objetos equipados?"},
{LOCALE_esMX, "¿Eliminar las transfiguraciones de todos los objetos equipados?"},
{LOCALE_ruRU, "Удалить трансмогрификации со всех экипированных предметов?"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_UPDATEMENU = {
{LOCALE_enUS, "Update menu"},
{LOCALE_koKR, "메뉴 업데이트"},
{LOCALE_frFR, "Mettre à jour le menu"},
{LOCALE_deDE, "Menü aktualisieren"},
{LOCALE_zhCN, "更新菜单"},
{LOCALE_zhTW, "更新選單"},
{LOCALE_esES, "Actualizar menú"},
{LOCALE_esMX, "Actualizar menú"},
{LOCALE_ruRU, "Обновить меню"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_HOWSETSWORK = {
{LOCALE_enUS, "How do sets work?"},
{LOCALE_koKR, "세트는 어떻게 작동합니까?"},
{LOCALE_frFR, "Comment fonctionnent les ensembles ?"},
{LOCALE_deDE, "Wie funktionieren Sets?"},
{LOCALE_zhCN, "套装是如何运作的?"},
{LOCALE_zhTW, "套裝如何運作?"},
{LOCALE_esES, "¿Cómo funcionan los conjuntos?"},
{LOCALE_esMX, "¿Cómo funcionan los conjuntos?"},
{LOCALE_ruRU, "Как работают комплекты?"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_SAVESET = {
{LOCALE_enUS, "Save set"},
{LOCALE_koKR, "세트 저장"},
{LOCALE_frFR, "Sauvegarder l'ensemble"},
{LOCALE_deDE, "Set speichern"},
{LOCALE_zhCN, "保存套装"},
{LOCALE_zhTW, "儲存套裝"},
{LOCALE_esES, "Guardar conjunto"},
{LOCALE_esMX, "Guardar conjunto"},
{LOCALE_ruRU, "Сохранить комплект"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_BACK = {
{LOCALE_enUS, "Back..."},
{LOCALE_koKR, "뒤로..."},
{LOCALE_frFR, "Retour..."},
{LOCALE_deDE, "Zurück..."},
{LOCALE_zhCN, "返回..."},
{LOCALE_zhTW, "返回..."},
{LOCALE_esES, "Atrás..."},
{LOCALE_esMX, "Atrás..."},
{LOCALE_ruRU, "Назад..."}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_USESET = {
{LOCALE_enUS, "Use this set"},
{LOCALE_koKR, "이 세트를 사용"},
{LOCALE_frFR, "Utiliser cet ensemble"},
{LOCALE_deDE, "Dieses Set verwenden"},
{LOCALE_zhCN, "使用此套装"},
{LOCALE_zhTW, "使用此套裝"},
{LOCALE_esES, "Usar este conjunto"},
{LOCALE_esMX, "Usar este conjunto"},
{LOCALE_ruRU, "Использовать этот комплект"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_CONFIRM_USESET = {
{LOCALE_enUS, "Using this set for transmogrify will bind transmogrified items to you and make them non-refundable and non-tradeable.\nDo you wish to continue?\n\n"},
{LOCALE_koKR, "이 세트를 변형에 사용하면 변형된 아이템이 계정에 제한되어 환불 및 거래가 불가능합니다.\n계속하시겠습니까?\n\n"},
{LOCALE_frFR, "En utilisant cet ensemble pour la transmogrification, les objets transmogrifiés seront liés à votre personnage et deviendront non remboursables et non échangeables.\nVoulez-vous continuer ?\n\n"},
{LOCALE_deDE, "Wenn du dieses Set für die Transmogrifikation verwendest, werden die transmogrifizierten Gegenstände an dich gebunden und können nicht erstattet oder gehandelt werden.\nMöchtest du fortfahren?\n\n"},
{LOCALE_zhCN, "将此套装用于幻化将使幻化后的物品与您绑定,并使其不可退还和不可交易。\n您是否要继续?\n\n"},
{LOCALE_zhTW, "使用此套裝進行幻化將使幻化後的物品與您綁定,並使其無法退款和無法交易。\n您是否希望繼續?\n\n"},
{LOCALE_esES, "Usar este conjunto para transfigurar vinculará los objetos transfigurados a ti y los volverá no reembolsables y no intercambiables.\n¿Deseas continuar?\n\n"},
{LOCALE_esMX, "Usar este conjunto para transfigurar vinculará los objetos transfigurados a ti y los volverá no reembolsables y no intercambiables.\n¿Deseas continuar?\n\n"},
{LOCALE_ruRU, "Использование этого комплекта для трансмогрификации привяжет трансмогрифицированные предметы к вам и сделает их неподлежащими возврату и обмену.\nЖелаете продолжить?\n\n"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_DELETESET = {
{LOCALE_enUS, "Delete set"},
{LOCALE_koKR, "세트 삭제"},
{LOCALE_frFR, "Supprimer l'ensemble"},
{LOCALE_deDE, "Set löschen"},
{LOCALE_zhCN, "删除套装"},
{LOCALE_zhTW, "刪除套裝"},
{LOCALE_esES, "Eliminar conjunto"},
{LOCALE_esMX, "Eliminar conjunto"},
{LOCALE_ruRU, "Удалить комплект"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_CONFIRM_DELETESET = {
{LOCALE_enUS, "Are you sure you want to delete "},
{LOCALE_koKR, "을(를) 삭제하시겠습니까 "},
{LOCALE_frFR, "Êtes-vous sûr de vouloir supprimer "},
{LOCALE_deDE, "Möchten Sie wirklich löschen "},
{LOCALE_zhCN, "您确定要删除吗 "},
{LOCALE_zhTW, "您確定要刪除 "},
{LOCALE_esES, "¿Estás seguro de que quieres eliminar "},
{LOCALE_esMX, "¿Estás seguro de que quieres eliminar "},
{LOCALE_ruRU, "Вы уверены, что хотите удалить "}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_INSERTSETNAME = {
{LOCALE_enUS, "Insert set name"},
{LOCALE_koKR, "세트 이름 입력"},
{LOCALE_frFR, "Insérer le nom de l'ensemble"},
{LOCALE_deDE, "Set-Namen einfügen"},
{LOCALE_zhCN, "插入套装名称"},
{LOCALE_zhTW, "輸入套裝名稱"},
{LOCALE_esES, "Insertar nombre del conjunto"},
{LOCALE_esMX, "Insertar nombre del conjunto"},
{LOCALE_ruRU, "Введите имя комплекта"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_SEARCH = {
{LOCALE_enUS, "Search..."},
{LOCALE_koKR, "검색..."},
{LOCALE_frFR, "Rechercher..."},
{LOCALE_deDE, "Suche..."},
{LOCALE_zhCN, "搜索..."},
{LOCALE_zhTW, "搜索..."},
{LOCALE_esES, "Buscar..."},
{LOCALE_esMX, "Buscar..."},
{LOCALE_ruRU, "Поиск..."}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_SEARCHING_FOR = {
{LOCALE_enUS, "Searching for: "},
{LOCALE_koKR, "검색 중: "},
{LOCALE_frFR, "Recherche en cours: "},
{LOCALE_deDE, "Suche nach: "},
{LOCALE_zhCN, "正在搜索: "},
{LOCALE_zhTW, "正在搜尋:"},
{LOCALE_esES, "Buscando:" },
{LOCALE_esMX, "Buscando: "},
{LOCALE_ruRU, "Поиск: "}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_SEARCH_FOR_ITEM = {
{LOCALE_enUS, "Search for what item?"},
{LOCALE_koKR, "어떤 아이템을 찾으시겠습니까?"},
{LOCALE_frFR, "Rechercher quel objet ?"},
{LOCALE_deDE, "Nach welchem Gegenstand suchen?"},
{LOCALE_zhCN, "搜索哪个物品?"},
{LOCALE_zhTW, "搜索哪個物品?"},
{LOCALE_esES, "¿Buscar un objeto?"},
{LOCALE_esMX, "¿Buscar un objeto?"},
{LOCALE_ruRU, "Поиск предмета:"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_CONFIRM_HIDE_ITEM = {
{LOCALE_enUS, "You are hiding the item in this slot.\nDo you wish to continue?\n\n"},
{LOCALE_koKR, "이 슬롯에 아이템을 감추고 있습니다.\n계속하시겠습니까?\n\n"},
{LOCALE_frFR, "Vous masquez l'objet dans cet emplacement.\nVoulez-vous continuer ?\n\n"},
{LOCALE_deDE, "Du versteckst das Item in diesem Slot.\nMöchtest du fortfahren?\n\n"},
{LOCALE_zhCN, "您正在隐藏此槽中的物品。\n您是否要继续?\n\n"},
{LOCALE_zhTW, "您正在隱藏此槽中的物品。\n您是否希望繼續?\n\n"},
{LOCALE_esES, "Estás ocultando el objeto en esta ranura.\n¿Deseas continuar?\n\n"},
{LOCALE_esMX, "Estás ocultando el objeto en esta ranura.\n¿Deseas continuar?\n\n"},
{LOCALE_ruRU, "Вы скрываете предмет в этом слоте.\nЖелаете продолжить?\n\n"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_HIDESLOT = {
{LOCALE_enUS, "Hide Slot"},
{LOCALE_koKR, "슬롯 숨기기"},
{LOCALE_frFR, "Cacher l'emplacement"},
{LOCALE_deDE, "Slot verbergen"},
{LOCALE_zhCN, "隐藏槽位"},
{LOCALE_zhTW, "隱藏槽位"},
{LOCALE_esES, "Ocultar ranura"},
{LOCALE_esMX, "Ocultar ranura"},
{LOCALE_ruRU, "Скрыть слот"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_REMOVETRANSMOG_SLOT = {
{LOCALE_enUS, "Remove transmogrification from the slot?"},
{LOCALE_koKR, "해당 슬롯의 형상변환을 제거합니까?"},
{LOCALE_frFR, "Supprimer la transmogrification de l'emplacement ?"},
{LOCALE_deDE, "Transmogrifikation aus dem Slot entfernen?"},
{LOCALE_zhCN, "是否要从该槽位中移除幻化?"},
{LOCALE_zhTW, "從該槽位移除幻化?"},
{LOCALE_esES, "¿Eliminar la transfiguración del espacio?"},
{LOCALE_esMX, "¿Eliminar la transfiguración del espacio?"},
{LOCALE_ruRU, "Удалить трансмогрификацию из ячейки?"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_CONFIRM_USEITEM = {
{LOCALE_enUS, "Using this item for transmogrify will bind it to you and make it non-refundable and non-tradeable.\nDo you wish to continue?\n\n"},
{LOCALE_koKR, "이 아이템을 변형에 사용하면 계정에 제한되어 환불 및 거래가 불가능하게 됩니다.\n계속하시겠습니까?\n\n"},
{LOCALE_frFR, "En utilisant cet objet pour la transmogrification, il sera lié à votre personnage et deviendra non remboursable et non échangeable.\nVoulez-vous continuer ?\n\n"},
{LOCALE_deDE, "Wenn du diesen Gegenstand für die Transmogrifikation verwendest, wird er an dich gebunden und kann nicht erstattet oder gehandelt werden.\nMöchtest du fortfahren?\n\n"},
{LOCALE_zhCN, "将此物品用于幻化将使其与您绑定,并使其不可退还和不可交易。\n您是否要继续?\n\n"},
{LOCALE_zhTW, "使用此物品進行幻化將使其與您綁定,並使其無法退款和無法交易。\n您是否希望繼續?\n\n"},
{LOCALE_esES, "Usar este objeto para transfigurar lo vinculará a ti y lo volverá no reembolsable y no intercambiable.\n¿Deseas continuar?\n\n"},
{LOCALE_esMX, "Usar este objeto para transfigurar lo vinculará a ti y lo volverá no reembolsable y no intercambiable.\n¿Deseas continuar?\n\n"},
{LOCALE_ruRU, "Использование этого предмета для трансмогрификации привяжет его к вам и сделает его неподлежащим возврату и обмену.\nЖелаете продолжить?\n\n"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_PREVIOUS_PAGE = {
{LOCALE_enUS, "Previous Page"},
{LOCALE_koKR, "이전 페이지"},
{LOCALE_frFR, "Page précédente"},
{LOCALE_deDE, "Vorherige Seite"},
{LOCALE_zhCN, "上一页"},
{LOCALE_zhTW, "上一頁"},
{LOCALE_esES, "Página anterior"},
{LOCALE_esMX, "Página anterior"},
{LOCALE_ruRU, "Предыдущая страница"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_NEXT_PAGE = {
{LOCALE_enUS, "Next Page"},
{LOCALE_koKR, "다음 페이지"},
{LOCALE_frFR, "Page suivante"},
{LOCALE_deDE, "Nächste Seite"},
{LOCALE_zhCN, "下一页"},
{LOCALE_zhTW, "下一頁"},
{LOCALE_esES, "Página siguiente"},
{LOCALE_esMX, "Página siguiente"},
{LOCALE_ruRU, "Следующая страница"}
};
const std::unordered_map<LocaleConstant, std::string> TRANSMOG_TEXT_ADDED_APPEARANCE = {
{LOCALE_enUS, "has been added to your appearance collection."},
{LOCALE_koKR, "이(가) 외형 컬렉션에 추가되었습니다."},
{LOCALE_frFR, "a été ajouté(e) à votre collection d'apparences."},
{LOCALE_deDE, "wurde deiner Transmog-Sammlung hinzugefügt."},
{LOCALE_zhCN, "已添加到外观收藏中。"},
{LOCALE_zhTW, "已加入您的外觀收藏。"},
{LOCALE_esES, "se ha añadido a tu colección de apariencias."},
{LOCALE_esMX, "se ha agregado a tu colección de apariencias."},
{LOCALE_ruRU, "был добавлен в вашу коллекцию обликов."}
};
std::unordered_map<std::string, const std::unordered_map<LocaleConstant, std::string>*> textMaps = {
{"how_works", &TRANSMOG_TEXT_HOWWORKS},
{"manage_sets", &TRANSMOG_TEXT_MANAGESETS},
{"remove_transmog", &TRANSMOG_TEXT_REMOVETRANSMOG},
{"remove_transmog_ask", &TRANSMOG_TEXT_REMOVETRANSMOG_ASK},
{"update_menu", &TRANSMOG_TEXT_UPDATEMENU},
{"how_sets_work", &TRANSMOG_TEXT_HOWSETSWORK},
{"save_set", &TRANSMOG_TEXT_SAVESET},
{"back", &TRANSMOG_TEXT_BACK},
{"use_set", &TRANSMOG_TEXT_USESET},
{"confirm_use_set", &TRANSMOG_TEXT_CONFIRM_USESET},
{"delete_set", &TRANSMOG_TEXT_DELETESET},
{"confirm_delete_set", &TRANSMOG_TEXT_CONFIRM_DELETESET},
{"insert_set_name", &TRANSMOG_TEXT_INSERTSETNAME},
{"search", &TRANSMOG_TEXT_SEARCH},
{"searching_for", &TRANSMOG_TEXT_SEARCHING_FOR},
{"search_for_item", &TRANSMOG_TEXT_SEARCH_FOR_ITEM},
{"confirm_hide_item", &TRANSMOG_TEXT_CONFIRM_HIDE_ITEM},
{"hide_slot", &TRANSMOG_TEXT_HIDESLOT},
{"remove_transmog_slot", &TRANSMOG_TEXT_REMOVETRANSMOG_SLOT},
{"confirm_use_item", &TRANSMOG_TEXT_CONFIRM_USEITEM},
{"previous_page", &TRANSMOG_TEXT_PREVIOUS_PAGE},
{"next_page", &TRANSMOG_TEXT_NEXT_PAGE},
{"added_appearance", &TRANSMOG_TEXT_ADDED_APPEARANCE}
};
std::string GetLocaleText(LocaleConstant locale, const std::string& titleType) {
auto textMapIt = textMaps.find(titleType);
if (textMapIt != textMaps.end()) {
const std::unordered_map<LocaleConstant, std::string>* textMap = textMapIt->second;
auto it = textMap->find(locale);
if (it != textMap->end()) {
return it->second;
}
}
return "";
}
class npc_transmogrifier : public CreatureScript
{
public:
@@ -52,12 +367,13 @@ public:
bool OnGossipHello(Player* player, Creature* creature) override
{
WorldSession* session = player->GetSession();
LocaleConstant locale = session->GetSessionDbLocaleIndex();
// Clear the search string for the player
sT->searchStringByPlayer.erase(player->GetGUID().GetCounter());
if (sT->GetEnableTransmogInfo())
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Book_11:30:30:-18:0|tHow does transmogrification work?", EQUIPMENT_SLOT_END + 9, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Book_11:30:30:-18:0|t" + GetLocaleText(locale, "how_works"), EQUIPMENT_SLOT_END + 9, 0);
for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
{
if (const char* slotName = sT->GetSlotName(slot, session))
@@ -70,10 +386,10 @@ public:
}
#ifdef PRESETS
if (sT->GetEnableSets())
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/RAIDFRAME/UI-RAIDFRAME-MAINASSIST:30:30:-18:0|tManage sets", EQUIPMENT_SLOT_END + 4, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/RAIDFRAME/UI-RAIDFRAME-MAINASSIST:30:30:-18:0|t" + GetLocaleText(locale, "manage_sets"), EQUIPMENT_SLOT_END + 4, 0);
#endif
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Enchant_Disenchant:30:30:-18:0|tRemove all transmogrifications", EQUIPMENT_SLOT_END + 2, 0, "Remove transmogrifications from all equipped items?", 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|tUpdate menu", EQUIPMENT_SLOT_END + 1, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Enchant_Disenchant:30:30:-18:0|t" + GetLocaleText(locale, "remove_transmog"), EQUIPMENT_SLOT_END + 2, 0, GetLocaleText(locale, "remove_transmog_ask"), 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|t" + GetLocaleText(locale, "update_menu"), EQUIPMENT_SLOT_END + 1, 0);
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
return true;
}
@@ -82,6 +398,7 @@ public:
{
player->PlayerTalkClass->ClearMenus();
WorldSession* session = player->GetSession();
LocaleConstant locale = session->GetSessionDbLocaleIndex();
// Next page
if (sender > EQUIPMENT_SLOT_END + 10)
{
@@ -142,13 +459,13 @@ public:
return true;
}
if (sT->GetEnableSetInfo())
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Book_11:30:30:-18:0|tHow do sets work?", EQUIPMENT_SLOT_END + 10, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Book_11:30:30:-18:0|t" + GetLocaleText(locale, "how_sets_work"), EQUIPMENT_SLOT_END + 10, 0);
for (Transmogrification::presetIdMap::const_iterator it = sT->presetByName[player->GetGUID()].begin(); it != sT->presetByName[player->GetGUID()].end(); ++it)
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Statue_02:30:30:-18:0|t" + it->second, EQUIPMENT_SLOT_END + 6, it->first);
if (sT->presetByName[player->GetGUID()].size() < sT->GetMaxSets())
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/GuildBankFrame/UI-GuildBankFrame-NewTab:30:30:-18:0|tSave set", EQUIPMENT_SLOT_END + 8, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack...", EQUIPMENT_SLOT_END + 1, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/GuildBankFrame/UI-GuildBankFrame-NewTab:30:30:-18:0|t" + GetLocaleText(locale, "save_set"), EQUIPMENT_SLOT_END + 8, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|t" + GetLocaleText(locale, "back"), EQUIPMENT_SLOT_END + 1, 0);
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
} break;
case EQUIPMENT_SLOT_END + 5: // Use preset
@@ -177,9 +494,9 @@ public:
for (Transmogrification::slotMap::const_iterator it = sT->presetById[player->GetGUID()][action].begin(); it != sT->presetById[player->GetGUID()][action].end(); ++it)
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(it->second, 30, 30, -18, 0) + sT->GetItemLink(it->second, session), sender, action);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Statue_02:30:30:-18:0|tUse this set", EQUIPMENT_SLOT_END + 5, action, "Using this set for transmogrify will bind transmogrified items to you and make them non-refundable and non-tradeable.\nDo you wish to continue?\n\n" + sT->presetByName[player->GetGUID()][action], 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-LeaveItem-Opaque:30:30:-18:0|tDelete set", EQUIPMENT_SLOT_END + 7, action, "Are you sure you want to delete " + sT->presetByName[player->GetGUID()][action] + "?", 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack...", EQUIPMENT_SLOT_END + 4, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Misc_Statue_02:30:30:-18:0|t" + GetLocaleText(locale, "use_set"), EQUIPMENT_SLOT_END + 5, action, GetLocaleText(locale, "confirm_use_set") + sT->presetByName[player->GetGUID()][action], 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-LeaveItem-Opaque:30:30:-18:0|t" + GetLocaleText(locale, "delete_set"), EQUIPMENT_SLOT_END + 7, action, GetLocaleText(locale, "confirm_delete_set") + sT->presetByName[player->GetGUID()][action] + "?", 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|t" + GetLocaleText(locale, "back"), EQUIPMENT_SLOT_END + 4, 0);
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
} break;
case EQUIPMENT_SLOT_END + 7: // Delete preset
@@ -226,20 +543,20 @@ public:
}
}
if (canSave)
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/GuildBankFrame/UI-GuildBankFrame-NewTab:30:30:-18:0|tSave set", 0, 0, "Insert set name", cost*sT->GetSetCostModifier() + sT->GetSetCopperCost(), true);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|tUpdate menu", sender, action);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack...", EQUIPMENT_SLOT_END + 4, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/GuildBankFrame/UI-GuildBankFrame-NewTab:30:30:-18:0|t" + GetLocaleText(locale, "save_set"), 0, 0, GetLocaleText(locale, "insert_set_name"), cost*sT->GetSetCostModifier() + sT->GetSetCopperCost(), true);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|t" + GetLocaleText(locale, "update_menu"), sender, action);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|t" + GetLocaleText(locale, "back"), EQUIPMENT_SLOT_END + 4, 0);
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
} break;
case EQUIPMENT_SLOT_END + 10: // Set info
{
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack...", EQUIPMENT_SLOT_END + 4, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|t" + GetLocaleText(locale, "back"), EQUIPMENT_SLOT_END + 4, 0);
SendGossipMenuFor(player, sT->GetSetNpcText(), creature->GetGUID());
} break;
#endif
case EQUIPMENT_SLOT_END + 9: // Transmog info
{
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack...", EQUIPMENT_SLOT_END + 1, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|t" + GetLocaleText(locale, "back"), EQUIPMENT_SLOT_END + 1, 0);
SendGossipMenuFor(player, sT->GetTransmogNpcText(), creature->GetGUID());
} break;
default: // Transmogrify
@@ -361,6 +678,7 @@ public:
void ShowTransmogItems(Player* player, Creature* creature, uint8 slot, uint16 gossipPageNumber) // Only checks bags while can use an item from anywhere in inventory
{
WorldSession* session = player->GetSession();
LocaleConstant locale = session->GetSessionDbLocaleIndex();
Item* oldItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot);
bool sendGossip = true;
bool hasSearchString;
@@ -394,17 +712,17 @@ public:
{
std::unordered_map<uint32, std::string>::iterator searchStringIterator = sT->searchStringByPlayer.find(player->GetGUID().GetCounter());
hasSearchString = !(searchStringIterator == sT->searchStringByPlayer.end());
std::string searchDisplayValue(hasSearchString ? searchStringIterator->second : "Search....");
std::string searchDisplayValue(hasSearchString ? searchStringIterator->second : GetLocaleText(locale, "search"));
// Offset values to add Search gossip item
if (pageNumber == 0)
{
if (hasSearchString)
{
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(30620, 30, 30, -18, 0) + "Searching for: " + searchDisplayValue, slot + 1, 0, "Search for what item?", 0, true);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(30620, 30, 30, -18, 0) + GetLocaleText(locale, "searching_for") + searchDisplayValue, slot + 1, 0, GetLocaleText(locale, "search_for_item"), 0, true);
}
else
{
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(30620, 30, 30, -18, 0) + "Search....", slot + 1, 0, "Search for what item?", 0, true);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(30620, 30, 30, -18, 0) + GetLocaleText(locale, "search"), slot + 1, 0, GetLocaleText(locale, "search_for_item"), 0, true);
}
}
else
@@ -423,7 +741,7 @@ public:
else
{
// Add invisible item entry
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "Hide Slot", slot, UINT_MAX, "You are hiding the item in this slot.\nDo you wish to continue?\n\n" + lineEnd, 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/inv_misc_enggizmos_27:30:30:-18:0|t" + GetLocaleText(locale, "hide_slot"), slot, UINT_MAX, GetLocaleText(locale, "confirm_hide_item") + lineEnd, 0, false);
}
}
for (uint32 newItemEntryId : sT->collectionCache[accountId]) {
@@ -448,23 +766,23 @@ public:
break;
}
Item* newItem = allowedItems.at(i);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(newItem->GetEntry(), 30, 30, -18, 0) + sT->GetItemLink(newItem, session), slot, newItem->GetEntry(), "Using this item for transmogrify will bind it to you and make it non-refundable and non-tradeable.\nDo you wish to continue?\n\n" + sT->GetItemIcon(newItem->GetEntry(), 40, 40, -15, -10) + sT->GetItemLink(newItem, session) + lineEnd, price, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(newItem->GetEntry(), 30, 30, -18, 0) + sT->GetItemLink(newItem, session), slot, newItem->GetEntry(), GetLocaleText(locale, "confirm_use_item") + sT->GetItemIcon(newItem->GetEntry(), 40, 40, -15, -10) + sT->GetItemLink(newItem, session) + lineEnd, price, false);
}
}
if (gossipPageNumber == EQUIPMENT_SLOT_END + 11)
{
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Previous Page", EQUIPMENT_SLOT_END, slot);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GetLocaleText(locale, "previous_page"), EQUIPMENT_SLOT_END, slot);
if (!lastPage)
{
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Next Page", gossipPageNumber + 1, slot);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GetLocaleText(locale, "next_page"), gossipPageNumber + 1, slot);
}
}
else if (gossipPageNumber > EQUIPMENT_SLOT_END + 11)
{
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Previous Page", gossipPageNumber - 1, slot);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GetLocaleText(locale, "previous_page"), gossipPageNumber - 1, slot);
if (!lastPage)
{
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Next Page", gossipPageNumber + 1, slot);
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GetLocaleText(locale, "next_page"), gossipPageNumber + 1, slot);
}
}
else if (!lastPage)
@@ -472,9 +790,9 @@ public:
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Next Page", EQUIPMENT_SLOT_END + 11, slot);
}
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Enchant_Disenchant:30:30:-18:0|tRemove transmogrification", EQUIPMENT_SLOT_END + 3, slot, "Remove transmogrification from the slot?", 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|tUpdate menu", EQUIPMENT_SLOT_END, slot);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack...", EQUIPMENT_SLOT_END + 1, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Enchant_Disenchant:30:30:-18:0|t" + GetLocaleText(locale, "remove_transmog"), EQUIPMENT_SLOT_END + 3, slot, GetLocaleText(locale, "remove_transmog_slot"), 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|t" + GetLocaleText(locale, "update_menu"), EQUIPMENT_SLOT_END, slot);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|t" + GetLocaleText(locale, "back"), EQUIPMENT_SLOT_END + 1, 0);
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
}
else
@@ -492,7 +810,7 @@ public:
if (sT->GetFakeEntry(oldItem->GetGUID()) == newItem->GetEntry())
continue;
++limit;
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(newItem->GetEntry(), 30, 30, -18, 0) + sT->GetItemLink(newItem, session), slot, newItem->GetGUID().GetCounter(), "Using this item for transmogrify will bind it to you and make it non-refundable and non-tradeable.\nDo you wish to continue?\n\n" + sT->GetItemIcon(newItem->GetEntry(), 40, 40, -15, -10) + sT->GetItemLink(newItem, session) + lineEnd, price, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(newItem->GetEntry(), 30, 30, -18, 0) + sT->GetItemLink(newItem, session), slot, newItem->GetGUID().GetCounter(), GetLocaleText(locale, "confirm_use_item") + sT->GetItemIcon(newItem->GetEntry(), 40, 40, -15, -10) + sT->GetItemLink(newItem, session) + lineEnd, price, false);
}
for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
@@ -512,16 +830,16 @@ public:
if (sT->GetFakeEntry(oldItem->GetGUID()) == newItem->GetEntry())
continue;
++limit;
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(newItem->GetEntry(), 30, 30, -18, 0) + sT->GetItemLink(newItem, session), slot, newItem->GetGUID().GetCounter(), "Using this item for transmogrify will bind it to you and make it non-refundable and non-tradeable.\nDo you wish to continue?\n\n" + sT->GetItemIcon(newItem->GetEntry(), 40, 40, -15, -10) + sT->GetItemLink(newItem, session) + ss.str(), price, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, sT->GetItemIcon(newItem->GetEntry(), 30, 30, -18, 0) + sT->GetItemLink(newItem, session), slot, newItem->GetGUID().GetCounter(), GetLocaleText(locale, "confirm_use_item") + sT->GetItemIcon(newItem->GetEntry(), 40, 40, -15, -10) + sT->GetItemLink(newItem, session) + ss.str(), price, false);
}
}
}
}
if (sendGossip) {
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Enchant_Disenchant:30:30:-18:0|tRemove transmogrification", EQUIPMENT_SLOT_END + 3, slot, "Remove transmogrification from the slot?", 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|tUpdate menu", EQUIPMENT_SLOT_END, slot);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|tBack...", EQUIPMENT_SLOT_END + 1, 0);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/INV_Enchant_Disenchant:30:30:-18:0|t" + GetLocaleText(locale, "remove_transmog"), EQUIPMENT_SLOT_END + 3, slot, GetLocaleText(locale, "remove_transmog_slot"), 0, false);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/PaperDollInfoFrame/UI-GearManager-Undo:30:30:-18:0|t" + GetLocaleText(locale, "update_menu"), EQUIPMENT_SLOT_END, slot);
AddGossipItemFor(player, GOSSIP_ICON_MONEY_BAG, "|TInterface/ICONS/Ability_Spy:30:30:-18:0|t" + GetLocaleText(locale, "back"), EQUIPMENT_SLOT_END + 1, 0);
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
}
}
@@ -542,6 +860,7 @@ private:
void AddToDatabase(Player* player, ItemTemplate const* itemTemplate)
{
LocaleConstant locale = player->GetSession()->GetSessionDbLocaleIndex();
if (!sT->GetTrackUnusableItems() && !sT->SuitableForTransmogrification(player, itemTemplate))
return;
if (itemTemplate->Class != ITEM_CLASS_ARMOR && itemTemplate->Class != ITEM_CLASS_WEAPON)
@@ -556,7 +875,8 @@ private:
if (sT->AddCollectedAppearance(accountId, itemId))
{
if (showChatMessage)
ChatHandler(player->GetSession()).PSendSysMessage( R"(|c%s|Hitem:%u:0:0:0:0:0:0:0:0|h[%s]|h|r has been added to your appearance collection.)", itemQuality.c_str(), itemId, itemName.c_str());
ChatHandler(player->GetSession()).PSendSysMessage( R"(|c%s|Hitem:%u:0:0:0:0:0:0:0:0|h[%s]|h|r %s)", itemQuality.c_str(), itemId, itemName.c_str(), GetLocaleText(locale, "added_appearance"));
CharacterDatabase.Execute( "INSERT INTO custom_unlocked_appearances (account_id, item_template_id) VALUES ({}, {})", accountId, itemId);
}
}