mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Core/SmartScripts): SMART_ACTION_ACTIVATE_GOBJECT should not rese… (#9178)
* fix(Core/SmartScripts): SMART_ACTION_ACTIVATE_GOBJECT should not reset loot state for doors. Fixes #8937
This commit is contained in:
@@ -790,12 +790,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
{
|
{
|
||||||
if (IsGameObject(*itr))
|
if (IsGameObject(*itr))
|
||||||
{
|
{
|
||||||
|
GameObject* go = (*itr)->ToGameObject();
|
||||||
|
|
||||||
// Activate
|
// Activate
|
||||||
// xinef: wtf is this shit?
|
if (go->GetGoType() != GAMEOBJECT_TYPE_DOOR)
|
||||||
(*itr)->ToGameObject()->SetLootState(GO_READY);
|
{
|
||||||
(*itr)->ToGameObject()->UseDoorOrButton(0, !!e.action.activateObject.alternative, unit);
|
go->SetLootState(GO_READY);
|
||||||
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. Gameobject %s activated",
|
}
|
||||||
(*itr)->GetGUID().ToString().c_str());
|
|
||||||
|
go->UseDoorOrButton(0, !!e.action.activateObject.alternative, unit);
|
||||||
|
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. Gameobject %s activated", go->GetGUID().ToString().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user