All pastes #936984 Raw Edit

Stuff

public text v1 · immutable
·published 2008-03-10 19:37 UTC
rendered paste body
class Brokentoe : public QuestScript
{	
public:
	void OnQuestStart(Player * mTarget, QuestLogEntry * qLogEntry)
	{
		qGiver = bunch->of_shit->to_get->qgiver(); // initialize
		if(qGiver == NULL)
                   return;
		char msg[256];
		snprintf((char*)msg, 256, "Get in the Ring of Blood, %s . The fight is about to start!", mTarget->GetName());
		Qgiver->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, msg);
			TimedEvent * te = TimedEvent::Allocate(this, new CallbackP0<Brokentoe>(this, &Brokentoe::spawn), 1, 4000, 1); // made a timed event (has to have no parameters)
		qGiver->event_AddEvent(te);
	}
	void spawn() // the function were going to use in the timed event
	{
	if(qGiver == NULL)
            return;
	qGiver->GetMapMgr()->GetInterface()->SpawnCreature(18398, -713.427979f, 7930.669922f, 59.161800f, 4.165940f, true, false, 0, 0);		
	}
protected:
Unit *qGiver;
};