aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Object/Updates/ViewerDependentValues.h20
-rw-r--r--src/server/game/Miscellaneous/SharedDefines.h3
2 files changed, 15 insertions, 8 deletions
diff --git a/src/server/game/Entities/Object/Updates/ViewerDependentValues.h b/src/server/game/Entities/Object/Updates/ViewerDependentValues.h
index 9e3461af947..f91f423b0cc 100644
--- a/src/server/game/Entities/Object/Updates/ViewerDependentValues.h
+++ b/src/server/game/Entities/Object/Updates/ViewerDependentValues.h
@@ -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);
}
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 703f57d2a53..3f48510e94a 100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -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