[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)

This commit is contained in:
bashermens
2026-01-19 22:45:28 +01:00
committed by GitHub
parent fd07e02a8a
commit 41c53365ae
1119 changed files with 27 additions and 27 deletions

View File

@@ -0,0 +1,38 @@
#include "UnlockItemAction.h"
#include "PlayerbotAI.h"
#include "ItemTemplate.h"
#include "WorldPacket.h"
#include "Player.h"
#include "ObjectMgr.h"
#include "SpellInfo.h"
#define PICK_LOCK_SPELL_ID 1804
bool UnlockItemAction::Execute(Event event)
{
bool foundLockedItem = false;
Item* item = botAI->FindLockedItem();
if (item)
{
UnlockItem(item);
foundLockedItem = true;
}
return foundLockedItem;
}
void UnlockItemAction::UnlockItem(Item* item)
{
// Use CastSpell to unlock the item
if (botAI->CastSpell(PICK_LOCK_SPELL_ID, bot, item))
{
std::ostringstream out;
out << "Used Pick Lock on: " << item->GetTemplate()->Name1;
botAI->TellMaster(out.str());
}
else
{
botAI->TellError("Failed to cast Pick Lock.");
}
}