This commit is contained in:
luis
2026-05-28 03:01:53 -03:00
parent 5c09bf8d04
commit dcbf03cc5a
4 changed files with 41 additions and 1 deletions
@@ -0,0 +1,13 @@
--
-- Bind the go_housing_door GameObjectScript to housing front-door GO templates
-- so OnGossipHello fires on click and performs the interior teleport.
-- Dynamic templates created by HousingMgr::EnsureDoorGameObjectTemplates already
-- set ScriptId programmatically; these are the known static entries from DB.
--
UPDATE `gameobject_template` SET `ScriptName` = 'go_housing_door' WHERE `entry` IN (
575017, -- Interior Front Door
586576, -- Front Door (Founder's Point)
587318, -- Razorwind Shores Front Door
602702, -- Front Door
602705 -- Front Door
);
+1
View File
@@ -1456,6 +1456,7 @@ void HousingMgr::EnsureDoorGameObjectTemplates()
goTemplate.goober.autoClose = 3000; // 3 seconds auto-close
goTemplate.goober.startOpen = 1; // start in open state
goTemplate.goober.spell = 1271876; // Housing Door Open spell used by retail client
goTemplate.ScriptId = sObjectMgr->GetScriptId("go_housing_door");
goTemplate.InitializeQueryData();
++created;
+1
View File
@@ -492,6 +492,7 @@ class TC_GAME_API Spell
void EffectRemovePhase();
void EffectIncreaseSkill();
void EffectForceEquipItem();
void EffectCraftItem();
typedef std::unordered_set<Aura*> UsedSpellMods;
+26 -1
View File
@@ -94,6 +94,9 @@
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
//WowCommunity
#include "Crafting.h"
//WowCommunity
NonDefaultConstructible<SpellEffectHandlerFn> SpellEffectHandlers[TOTAL_SPELL_EFFECTS] =
{
@@ -385,7 +388,7 @@ NonDefaultConstructible<SpellEffectHandlerFn> SpellEffectHandlers[TOTAL_SPELL_EF
&Spell::EffectNULL, //285 SPELL_EFFECT_MODIFY_KEYSTONE_2
&Spell::EffectGrantBattlePetExperience, //286 SPELL_EFFECT_GRANT_BATTLEPET_EXPERIENCE
&Spell::EffectNULL, //287 SPELL_EFFECT_SET_GARRISON_FOLLOWER_LEVEL
&Spell::EffectNULL, //288 SPELL_EFFECT_CRAFT_ITEM
&Spell::EffectCraftItem, //288 SPELL_EFFECT_CRAFT_ITEM
&Spell::EffectModifyAuraStacks, //289 SPELL_EFFECT_MODIFY_AURA_STACKS
&Spell::EffectModifyCooldown, //290 SPELL_EFFECT_MODIFY_COOLDOWN
&Spell::EffectModifyCooldowns, //291 SPELL_EFFECT_MODIFY_COOLDOWNS
@@ -7362,3 +7365,25 @@ void Spell::EffectForceEquipItem()
player->AutoUnequipOffhandIfNeed();
}
}
void Spell::EffectCraftItem()
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
Player* playerCaster = m_caster->ToPlayer();
if (!playerCaster)
return;
if (m_targets.ModifiedCraftingReagents.empty())
{
SendCastResult(SpellCastResult::SPELL_FAILED_NEED_MORE_ITEMS);
return;
}
Crafting craftingInstance = Crafting(playerCaster, this);
SpellCastResult result = craftingInstance.DoCraft(effectInfo->MiscValue);
if (result != SpellCastResult::SPELL_CAST_OK)
SendCastResult(result);
}