mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Gameobjects: Fixed GO_DYNFLAG_LO_HIGHLIGHT application (#30123)
Closes #27374 Closes #30213
This commit is contained in:
@@ -93,11 +93,8 @@ public:
|
||||
case GAMEOBJECT_TYPE_BUTTON:
|
||||
case GAMEOBJECT_TYPE_GOOBER:
|
||||
if (gameObject->HasConditionalInteraction() && gameObject->CanActivateForPlayer(receiver))
|
||||
{
|
||||
dynFlags |= GO_DYNFLAG_LO_HIGHLIGHT;
|
||||
if (gameObject->GetGoStateFor(receiver->GetGUID()) != GO_STATE_ACTIVE)
|
||||
dynFlags |= GO_DYNFLAG_LO_ACTIVATE;
|
||||
}
|
||||
dynFlags |= GO_DYNFLAG_LO_ACTIVATE | GO_DYNFLAG_LO_HIGHLIGHT;
|
||||
break;
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER:
|
||||
if (gameObject->CanActivateForPlayer(receiver))
|
||||
@@ -112,7 +109,7 @@ public:
|
||||
case GAMEOBJECT_TYPE_GENERIC:
|
||||
case GAMEOBJECT_TYPE_SPELL_FOCUS:
|
||||
if (gameObject->HasConditionalInteraction() && gameObject->CanActivateForPlayer(receiver))
|
||||
dynFlags |= GO_DYNFLAG_LO_SPARKLE | GO_DYNFLAG_LO_HIGHLIGHT;
|
||||
dynFlags |= GO_DYNFLAG_LO_SPARKLE;
|
||||
break;
|
||||
case GAMEOBJECT_TYPE_TRANSPORT:
|
||||
case GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT:
|
||||
@@ -137,8 +134,17 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!receiver->IsGameMaster() && !gameObject->MeetsInteractCondition(receiver))
|
||||
dynFlags |= GO_DYNFLAG_LO_NO_INTERACT;
|
||||
if (!receiver->IsGameMaster())
|
||||
{
|
||||
// GO_DYNFLAG_LO_INTERACT_COND should be applied to GOs with conditional interaction (without GO_FLAG_INTERACT_COND) to disable interaction
|
||||
// (Ignore GAMEOBJECT_TYPE_GATHERING_NODE as some profession-related GOs may include quest loot and can always be interacted with)
|
||||
if (gameObject->GetGoType() != GAMEOBJECT_TYPE_GATHERING_NODE)
|
||||
if (gameObject->HasConditionalInteraction() && !gameObject->HasFlag(GO_FLAG_INTERACT_COND))
|
||||
dynFlags |= GO_DYNFLAG_LO_INTERACT_COND;
|
||||
|
||||
if (!gameObject->MeetsInteractCondition(receiver))
|
||||
dynFlags |= GO_DYNFLAG_LO_NO_INTERACT;
|
||||
}
|
||||
|
||||
dynamicFlags = (uint32(pathProgress) << 16) | uint32(dynFlags);
|
||||
}
|
||||
|
||||
@@ -3032,7 +3032,8 @@ enum GameObjectDynamicLowFlags : uint16
|
||||
GO_DYNFLAG_LO_STOPPED = 0x0040, // Transport is stopped
|
||||
GO_DYNFLAG_LO_NO_INTERACT = 0x0080,
|
||||
GO_DYNFLAG_LO_INVERTED_MOVEMENT = 0x0100, // GAMEOBJECT_TYPE_TRANSPORT only
|
||||
GO_DYNFLAG_LO_HIGHLIGHT = 0x0200, // Allows object highlight when GO_DYNFLAG_LO_ACTIVATE or GO_DYNFLAG_LO_SPARKLE are set, not only when player is on quest determined by Data fields
|
||||
GO_DYNFLAG_LO_INTERACT_COND = 0x0200, // Cannot interact (requires GO_DYNFLAG_LO_ACTIVATE to enable interaction clientside)
|
||||
GO_DYNFLAG_LO_HIGHLIGHT = 0x4000, // Allows object highlight when GO_DYNFLAG_LO_ACTIVATE are set, not only when player is on quest determined by Data fields
|
||||
};
|
||||
|
||||
// client side GO show states
|
||||
|
||||
Reference in New Issue
Block a user