fix(Core): ScriptName not readable in creature and gameobject table fix (#8715)

This commit is contained in:
acidmanifesto
2021-10-25 08:25:13 -04:00
committed by GitHub
parent dc3ff71c70
commit bcd1a701ac
7 changed files with 45 additions and 15 deletions

View File

@@ -150,13 +150,13 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
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))
{
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;
}