All pastes #707768 Raw Edit

Untitled

public text v1 · immutable
#707768 ·published 2007-09-23 08:08 UTC
rendered paste body
class DefiasCannon : public GameObjectAIScript
{
	public:
	DefiasCannon(GameObject* pGameObject) : GameObjectAIScript(pGameObject)
	{
	}
	void OnActivate(Player * pPlayer)
	{
	GameObject *pCannonDoor = _gameobject->GetMapMgr()->GetInterface()->GetObjectNearestCoords<GameObject, TYPEID_GAMEOBJECT>(
            16397, -101.344f, -665.815f, 7.422f);
        if(pCannonDoor == 0)
            return; else
		{
        // Open the door
        pCannonDoor->SetUInt32Value(GAMEOBJECT_FLAGS, 33);
        pCannonDoor->SetUInt32Value(GAMEOBJECT_STATE, 0);
	pCannonDoor->GetMapMgr()->GetInterface()->SpawnCreature(657, -102.617, -668.745, 7.416, 1.832, true, false, 0, 0);
	}
	}
	static GameObjectAIScript * Create(GameObject * g) { return new DefiasCannon(g); }
};