Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@PrivateDonut
Last active February 1, 2023 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save PrivateDonut/762a240db7a94913d1bb4b8762cbee70 to your computer and use it in GitHub Desktop.
Save PrivateDonut/762a240db7a94913d1bb4b8762cbee70 to your computer and use it in GitHub Desktop.
Cast a boss on a player when they enter the defined zone works for trinity core 3.3.5a.
#include "ScriptPCH.h"
#include "Player.h"
#include "Unit.h"
// Define your buffid and zoneid here!
#define buffid 48162
#define zoneid 12
class buff_zone : public PlayerScript
{
public:
buff_zone() : PlayerScript("buff_zone") {}
void OnUpdateZone(Player* player, uint32 newZone, uint32 /*newArea*/)
{
if (newZone == zoneid) {
player->AddAura(buffid, player);
}
else {
player->RemoveAurasDueToSpell(buffid);
}
}
};
void AddSC_Buff_Zone()
{
new buff_zone();
}
@PrivateDonut
Copy link
Author

Z

@xIvan0ff
Copy link

Zz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment