Skip to content

Instantly share code, notes, and snippets.

@mindsear
Created March 7, 2018 15:34
Show Gist options
  • Save mindsear/d0d42b638461ffa86fb6f82c7cc84bf7 to your computer and use it in GitHub Desktop.
Save mindsear/d0d42b638461ffa86fb6f82c7cc84bf7 to your computer and use it in GitHub Desktop.
latest tc 3.3.5 gameobject c++ script example
#include "ScriptedGossip.h"
#include "WorldSession.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "GameObject.h"
#include "GameObjectAI.h"
class example_go : public GameObjectScript
{
public:
example_go() : GameObjectScript("example_go") {}
struct example_go_AI : public GameObjectAI
{
example_go_AI(GameObject* go) : GameObjectAI(go) { }
bool GossipHello(Player* player)
{
// player->TeleportTo(mapID, x, y, z, o);
player->TeleportTo(574, 1443.1899f, 1556.3054f, 342.9152f, 3.680373f);
return true;
}
};
GameObjectAI* GetAI(GameObject* go) const override
{
return new example_go_AI(go);
}
};
void AddSC_example_go()
{
new example_go();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment