Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Core/GameObject: disable use gobs with not selectable flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightprince authored Dec 28, 2023
1 parent 3f6a712 commit 51bbda7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/game/Entities/GameObject/GameObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,10 @@ void GameObject::SwitchDoorOrButton(bool activate, bool alternative /* = false *

void GameObject::Use(Unit* user)
{
// we cannot use go with not selectable flags
if (HasFlag(GAMEOBJECT_FIELD_FLAGS, GO_FLAG_NOT_SELECTABLE))
return;

// by default spell caster is user
Unit* spellCaster = user;
uint32 spellId = 0;
Expand Down

0 comments on commit 51bbda7

Please sign in to comment.