aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/NPCHandler.cpp
diff options
context:
space:
mode:
authorKrudor <erikstrandberg93@hotmail.com>2017-03-18 11:31:31 +0100
committerShauren <shauren.trinity@gmail.com>2017-03-18 11:31:31 +0100
commit5a36a2eb17aeec937b4375f341239fdb9dce5fda (patch)
treeeac8a498a243fa145877636402f8bf86528a7cfb /src/server/game/Handlers/NPCHandler.cpp
parent0a35c473c8df41ec5e0699873e0746700eeb6b41 (diff)
Core/Scripts: Add support for spawn specific C++ scripts
Closes #19247
Diffstat (limited to 'src/server/game/Handlers/NPCHandler.cpp')
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index 2a4a96a3827..53578310324 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -347,14 +347,14 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPackets::NPC::GossipSelec
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- if ((unit && unit->GetCreatureTemplate()->ScriptID != unit->LastUsedScriptID) || (go && go->GetGOInfo()->ScriptId != go->LastUsedScriptID))
+ if ((unit && unit->GetScriptId() != unit->LastUsedScriptID) || (go && go->GetScriptId() != go->LastUsedScriptID))
{
TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id");
if (unit)
- unit->LastUsedScriptID = unit->GetCreatureTemplate()->ScriptID;
+ unit->LastUsedScriptID = unit->GetScriptId();
if (go)
- go->LastUsedScriptID = go->GetGOInfo()->ScriptId;
+ go->LastUsedScriptID = go->GetScriptId();
_player->PlayerTalkClass->SendCloseGossip();
return;
}