diff --git a/data/sql/db-world/trasm_world_NPC.sql b/data/sql/db-world/trasm_world_NPC.sql index a0a53fc..97c33cf 100644 --- a/data/sql/db-world/trasm_world_NPC.sql +++ b/data/sql/db-world/trasm_world_NPC.sql @@ -1,7 +1,7 @@ SET @Entry = 190010, @Name = "Warpweaver"; -DELETE FROM `creature_template` WHERE `entry` = 190010; +DELETE FROM `creature_template` WHERE `entry` = @Entry; 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'); @@ -16,3 +16,26 @@ INSERT INTO `creature_template_locale` (`entry`, `locale`, `Name`, `Title`) VALU (@Entry, 'esES', @Name, "Transfigurador"), (@Entry, 'esMX', @Name, "Transfigurador"), (@Entry, 'ruRU', @Name, "Трансмогрификатор"); + +SET +@Entry = 190011, +@Name = "Ethereal Warpweaver"; +DELETE FROM `creature_template` WHERE `entry` = @Entry; + +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, "Трансмогрификатор"); + +DELETE FROM `spell_dbc` WHERE `ID` = 2000100; +INSERT INTO `spell_dbc` (`ID`, `Category`, `DispelType`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `ShapeshiftMask`, `unk_320_2`, `ShapeshiftExclude`, `unk_320_3`, `Targets`, `TargetCreatureType`, `RequiresSpellFocus`, `FacingCasterFlags`, `CasterAuraState`, `TargetAuraState`, `ExcludeCasterAuraState`, `ExcludeTargetAuraState`, `CasterAuraSpell`, `TargetAuraSpell`, `ExcludeCasterAuraSpell`, `ExcludeTargetAuraSpell`, `CastingTimeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `InterruptFlags`, `AuraInterruptFlags`, `ChannelInterruptFlags`, `ProcTypeMask`, `ProcChance`, `ProcCharges`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `PowerType`, `ManaCost`, `ManaCostPerLevel`, `ManaPerSecond`, `ManaPerSecondPerLevel`, `RangeIndex`, `Speed`, `ModalNextSpell`, `CumulativeAura`, `Totem_1`, `Totem_2`, `Reagent_1`, `Reagent_2`, `Reagent_3`, `Reagent_4`, `Reagent_5`, `Reagent_6`, `Reagent_7`, `Reagent_8`, `ReagentCount_1`, `ReagentCount_2`, `ReagentCount_3`, `ReagentCount_4`, `ReagentCount_5`, `ReagentCount_6`, `ReagentCount_7`, `ReagentCount_8`, `EquippedItemClass`, `EquippedItemSubclass`, `EquippedItemInvTypes`, `Effect_1`, `Effect_2`, `Effect_3`, `EffectDieSides_1`, `EffectDieSides_2`, `EffectDieSides_3`, `EffectRealPointsPerLevel_1`, `EffectRealPointsPerLevel_2`, `EffectRealPointsPerLevel_3`, `EffectBasePoints_1`, `EffectBasePoints_2`, `EffectBasePoints_3`, `EffectMechanic_1`, `EffectMechanic_2`, `EffectMechanic_3`, `ImplicitTargetA_1`, `ImplicitTargetA_2`, `ImplicitTargetA_3`, `ImplicitTargetB_1`, `ImplicitTargetB_2`, `ImplicitTargetB_3`, `EffectRadiusIndex_1`, `EffectRadiusIndex_2`, `EffectRadiusIndex_3`, `EffectAura_1`, `EffectAura_2`, `EffectAura_3`, `EffectAuraPeriod_1`, `EffectAuraPeriod_2`, `EffectAuraPeriod_3`, `EffectMultipleValue_1`, `EffectMultipleValue_2`, `EffectMultipleValue_3`, `EffectChainTargets_1`, `EffectChainTargets_2`, `EffectChainTargets_3`, `EffectItemType_1`, `EffectItemType_2`, `EffectItemType_3`, `EffectMiscValue_1`, `EffectMiscValue_2`, `EffectMiscValue_3`, `EffectMiscValueB_1`, `EffectMiscValueB_2`, `EffectMiscValueB_3`, `EffectTriggerSpell_1`, `EffectTriggerSpell_2`, `EffectTriggerSpell_3`, `EffectPointsPerCombo_1`, `EffectPointsPerCombo_2`, `EffectPointsPerCombo_3`, `EffectSpellClassMaskA_1`, `EffectSpellClassMaskA_2`, `EffectSpellClassMaskA_3`, `EffectSpellClassMaskB_1`, `EffectSpellClassMaskB_2`, `EffectSpellClassMaskB_3`, `EffectSpellClassMaskC_1`, `EffectSpellClassMaskC_2`, `EffectSpellClassMaskC_3`, `SpellVisualID_1`, `SpellVisualID_2`, `SpellIconID`, `ActiveIconID`, `SpellPriority`, `Name_Lang_enUS`, `Name_Lang_enGB`, `Name_Lang_koKR`, `Name_Lang_frFR`, `Name_Lang_deDE`, `Name_Lang_enCN`, `Name_Lang_zhCN`, `Name_Lang_enTW`, `Name_Lang_zhTW`, `Name_Lang_esES`, `Name_Lang_esMX`, `Name_Lang_ruRU`, `Name_Lang_ptPT`, `Name_Lang_ptBR`, `Name_Lang_itIT`, `Name_Lang_Unk`, `Name_Lang_Mask`, `NameSubtext_Lang_enUS`, `NameSubtext_Lang_enGB`, `NameSubtext_Lang_koKR`, `NameSubtext_Lang_frFR`, `NameSubtext_Lang_deDE`, `NameSubtext_Lang_enCN`, `NameSubtext_Lang_zhCN`, `NameSubtext_Lang_enTW`, `NameSubtext_Lang_zhTW`, `NameSubtext_Lang_esES`, `NameSubtext_Lang_esMX`, `NameSubtext_Lang_ruRU`, `NameSubtext_Lang_ptPT`, `NameSubtext_Lang_ptBR`, `NameSubtext_Lang_itIT`, `NameSubtext_Lang_Unk`, `NameSubtext_Lang_Mask`, `Description_Lang_enUS`, `Description_Lang_enGB`, `Description_Lang_koKR`, `Description_Lang_frFR`, `Description_Lang_deDE`, `Description_Lang_enCN`, `Description_Lang_zhCN`, `Description_Lang_enTW`, `Description_Lang_zhTW`, `Description_Lang_esES`, `Description_Lang_esMX`, `Description_Lang_ruRU`, `Description_Lang_ptPT`, `Description_Lang_ptBR`, `Description_Lang_itIT`, `Description_Lang_Unk`, `Description_Lang_Mask`, `AuraDescription_Lang_enUS`, `AuraDescription_Lang_enGB`, `AuraDescription_Lang_koKR`, `AuraDescription_Lang_frFR`, `AuraDescription_Lang_deDE`, `AuraDescription_Lang_enCN`, `AuraDescription_Lang_zhCN`, `AuraDescription_Lang_enTW`, `AuraDescription_Lang_zhTW`, `AuraDescription_Lang_esES`, `AuraDescription_Lang_esMX`, `AuraDescription_Lang_ruRU`, `AuraDescription_Lang_ptPT`, `AuraDescription_Lang_ptBR`, `AuraDescription_Lang_itIT`, `AuraDescription_Lang_Unk`, `AuraDescription_Lang_Mask`, `ManaCostPct`, `StartRecoveryCategory`, `StartRecoveryTime`, `MaxTargetLevel`, `SpellClassSet`, `SpellClassMask_1`, `SpellClassMask_2`, `SpellClassMask_3`, `MaxTargets`, `DefenseType`, `PreventionType`, `StanceBarOrder`, `EffectChainAmplitude_1`, `EffectChainAmplitude_2`, `EffectChainAmplitude_3`, `MinFactionID`, `MinReputation`, `RequiredAuraVision`, `RequiredTotemCategoryID_1`, `RequiredTotemCategoryID_2`, `RequiredAreasID`, `SchoolMask`, `RuneCostID`, `SpellMissileID`, `PowerDisplayID`, `EffectBonusMultiplier_1`, `EffectBonusMultiplier_2`, `EffectBonusMultiplier_3`, `SpellDescriptionVariableID`, `SpellDifficultyID`) VALUE +(2000100,0,0,0,262416,0,0,536870912,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,31,0,0,0,101,0,0,0,0,21,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,28,0,0,1,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1000,0,0,0,0,0,0,0,0,190011,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,458,0,2808,0,0,'Ethereal Warpweaver','','','','','','','','','','','','','','','',16712190,'','','','','','','','','','','','','','','','',16712190,'Right Click to summon and dismiss your Ethereal Warpweaver.','','','','','','','','','','','','','','','',16712190,'','','','','','','','','','','','','','','','',16712190,0,133,1500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); diff --git a/data/sql/db-world/trasm_world_texts.sql b/data/sql/db-world/trasm_world_texts.sql index fc84f1f..5348b6a 100644 --- a/data/sql/db-world/trasm_world_texts.sql +++ b/data/sql/db-world/trasm_world_texts.sql @@ -45,9 +45,10 @@ VALUES (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'); +DELETE FROM `command` WHERE `name` IN ('transmog', 'transmog add', 'transmog sync', 'transmog add set', 'transmog portable'); INSERT INTO `command` (`name`, `security`, `help`) VALUES ('transmog', 0, 'Syntax: .transmog \nAllows seeing transmogrified items and the transmogrifier NPC.'), ('transmog add', 1, 'Syntax: .transmog add $player $item\nAdds an item to a player\'s appearance collection.'), ('transmog sync', 0, 'Syntax: .transmog sync\nSyncs transmog addon appearances with the server.'), -('transmog add set', 1, 'Syntax: .transmog add set $player $itemSet\nAdds items of an item set to a player\'s appearance collection.'); +('transmog add set', 1, 'Syntax: .transmog add set $player $itemSet\nAdds items of an item set to a player\'s appearance collection.'), +('transmog portable', 1, 'Syntax: .transmog portable \nSummons the Ethereal Warpweaver, a portable version of the transmogrification NPC.'); diff --git a/src/Transmogrification.cpp b/src/Transmogrification.cpp index e257bc8..31f8edb 100644 --- a/src/Transmogrification.cpp +++ b/src/Transmogrification.cpp @@ -1033,6 +1033,7 @@ void Transmogrification::LoadConfig(bool reload) ResetRetroActiveAppearances = sConfigMgr->GetOption("Transmogrification.ResetRetroActiveAppearancesFlag", false); IsTransmogEnabled = sConfigMgr->GetOption("Transmogrification.Enable", true); + IsPortableNPCEnabled = sConfigMgr->GetOption("Transmogrification.EnablePortable", true); if (!sObjectMgr->GetItemTemplate(TokenEntry)) { diff --git a/src/Transmogrification.h b/src/Transmogrification.h index e2b3354..ee6b2f3 100644 --- a/src/Transmogrification.h +++ b/src/Transmogrification.h @@ -63,6 +63,11 @@ enum TransmogAcoreStrings // Language.h might have same entries, appears when ex LANG_CMD_TRANSMOG_COMPLETE_SYNC = 11116, }; +enum TransmogSpells +{ + SPELL_SUMMON_ETHEREAL_WARPWEAVER = 2000100 +}; + class Transmogrification { public: @@ -152,6 +157,7 @@ public: bool ResetRetroActiveAppearances; bool IsTransmogEnabled; + bool IsPortableNPCEnabled; bool IsAllowed(uint32 entry) const; bool IsNotAllowed(uint32 entry) const; diff --git a/src/cs_transmog.cpp b/src/cs_transmog.cpp index 965e49a..a4c15fa 100644 --- a/src/cs_transmog.cpp +++ b/src/cs_transmog.cpp @@ -40,9 +40,10 @@ public: static ChatCommandTable transmogTable = { - { "add", addCollectionTable }, - { "", HandleDisableTransMogVisual, SEC_PLAYER, Console::No }, - { "sync", HandleSyncTransMogCommand, SEC_PLAYER, Console::No }, + { "add", addCollectionTable }, + { "", HandleDisableTransMogVisual, SEC_PLAYER, Console::No }, + { "sync", HandleSyncTransMogCommand, SEC_PLAYER, Console::No }, + { "portable", HandleTransmogPortableCommand, SEC_MODERATOR, Console::No }, }; static ChatCommandTable commandTable = @@ -285,6 +286,22 @@ public: return true; } + + static bool HandleTransmogPortableCommand(ChatHandler* handler) + { + if (!sTransmogrification->IsPortableNPCEnabled) + { + handler->GetPlayer()->SendSystemMessage("The portable transmogrification NPC is disabled."); + handler->SetSentErrorMessage(true); + return true; + } + + if (Player* player = PlayerIdentifier::FromSelf(handler)->GetConnectedPlayer()) + { + player->CastSpell((Unit*)nullptr, SPELL_SUMMON_ETHEREAL_WARPWEAVER, true); + } + return true; + }; }; void AddSC_transmog_commandscript() diff --git a/src/transmog_scripts.cpp b/src/transmog_scripts.cpp index b85bfd8..732a2b6 100644 --- a/src/transmog_scripts.cpp +++ b/src/transmog_scripts.cpp @@ -355,6 +355,15 @@ public: bool CanBeSeen(Player const* player) override { Player* target = ObjectAccessor::FindConnectedPlayer(player->GetGUID()); + + if (sT->IsPortableNPCEnabled) + { + if (TempSummon* summon = me->ToTempSummon()) + { + return summon->GetOwner() == player; + } + } + return sTransmogrification->IsEnabled() && !target->GetPlayerSetting("mod-transmog", SETTING_HIDE_TRANSMOG).value; } }; @@ -836,7 +845,8 @@ public: } } - if (sendGossip) { + if (sendGossip) + { 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); @@ -943,6 +953,7 @@ public: ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(itemId); AddToDatabase(player, itemTemplate); } + for (uint8 i = 0; i < QUEST_REWARDS_COUNT; ++i) { uint32 itemId = uint32(quest->RewardItemId[i]);