Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::set<uint64> test;
- class creation_event_2 : public CreatureScript
- {
- public:
- creation_event_2() : CreatureScript("creation_event_2") { }
- struct creation_event_2AI : public ScriptedAI
- {
- creation_event_2AI(Creature * pCreature) : ScriptedAI(pCreature){}
- void MoveInLineOfSight(Unit * player)
- {
- if(!player || !player->isAlive() || player->GetTypeId() != TYPEID_PLAYER || player->HasAura(44795))
- return;
- if(me->IsWithinDistInMap(player, 10.0f))
- {
- if(me->GetDistance(player) <= 10.0f)
- {
- if(test.find(player->GetGUID()) == test.end())
- test.insert(player->GetGUID());
- me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER);
- me->MonsterSay("Woohoo! Another survivor! At this rate we might have enough to gather an army!", LANG_UNIVERSAL, NULL);
- }
- }
- }
- }
- };
- CreatureAI * GetAI(Creature * c) const
- {
- return new creation_event_2AI(c);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement