Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - class go_blastenheimer_5000 : public GameObjectScript
 - {
 - public:
 - go_blastenheimer_5000() : GameObjectScript("go_blastenheimer_5000") { }
 - struct go_blastenheimer_5000AI : public GameObjectAI
 - {
 - go_blastenheimer_5000AI(GameObject* gameObject) : GameObjectAI(gameObject) { }
 - void OnStateChanged(uint32 state, Unit* /*unit*/)
 - {
 - if (state == GO_ACTIVATED)
 - {
 - if (Player* player = go->FindNearestPlayer(10.0f))
 - {
 - player->CastSpell(player, 24832, true);
 - player->SetMovement(MOVE_ROOT);
 - player->NearTeleportTo(-1326.711914f, 86.301125f, 133.093918f, 3.510725f, true);
 - respawnInFlow = true;
 - }
 - _respawnTimer = 2500;
 - }
 - }
 - void UpdateAI(uint32 diff)
 - {
 - if (!respawnInFlow)
 - return;
 - if (_respawnTimer <= diff)
 - {
 - if (Player* player = go->FindNearestPlayer(10.0f))
 - {
 - player->SetMovement(MOVE_UNROOT);
 - player->CastSpell(player, 42867, true);
 - respawnInFlow = false;
 - }
 - }
 - else _respawnTimer -= diff;
 - }
 - private:
 - uint32 _respawnTimer;
 - bool respawnInFlow;
 - };
 - GameObjectAI* GetAI(GameObject* go) const
 - {
 - return new go_blastenheimer_5000AI(go);
 - }
 - };
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment