Skip to content

Commit

Permalink
NPCBots: Fix a merge mistake in previous commit. Remove no longer nee…
Browse files Browse the repository at this point in the history
…ded portal use bot code
  • Loading branch information
trickerer committed Sep 7, 2024
1 parent 8f8b4b1 commit c9dd4be
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions src/server/game/Entities/GameObject/GameObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ void GameObject::Use(Unit* user)
}
//end npcbot

if (user->IsPlayer())
if (!user->IsPlayer())
return;

Player* player = user->ToPlayer();
Expand Down Expand Up @@ -1922,28 +1922,6 @@ void GameObject::Use(Unit* user)

if (info->spellcaster.partyOnly)
{
//npcbot
//if (!caster && GetOwnerGUID().IsCreature() && user->IsPlayer())
//{
// if (Creature const* bot = user->ToPlayer()->GetBotMgr()->GetBot(GetOwnerGUID()))
// caster = user->ToPlayer();
// else if (Group const* group = user->ToPlayer()->GetGroup())
// {
// for (GroupReference const* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
// {
// if (Player const* player = itr->GetSource())
// {
// bot = player->GetBotMgr()->GetBot(GetOwnerGUID());
// if (bot)
// {
// caster = player;
// break;
// }
// }
// }
// }
//}
//end npcbot
if (!user->IsPlayer())
return;
if (ObjectGuid ownerGuid = GetOwnerGUID())
Expand Down

0 comments on commit c9dd4be

Please sign in to comment.