All pastes #554380 Raw Edit

Something

public text v1 · immutable
·published 2007-06-10 03:44 UTC
rendered paste body
#include "StdAfx.h"
#include "Setup.h"

class SCRIPT_DECL Tier6Gossip : public GossipScript
{
public:
    ADD_GOSSIP_FACTORY_FUNCTION(Tier6Gossip);
    void GossipHello(Creature* pCreature, Player* Plr, bool AutoSend);
    void GossipSelectOption(Creature* pCreature, Player* Plr, uint32 Id, uint32 IntId);
    void GossipEnd(Creature* pCreature, Player* Plr);
};

void Tier6Gossip::GossipHello(Creature* pCreature, Player* Plr, bool AutoSend)
{
    sLog.outDetail("Gossip_Tier6Gossip.cpp : Hello by %s", Plr->GetName());
    GossipMenu *Menu;
    uint32 TextID = 820;
    // Hello (First) Menu.
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), TextID, Plr);
        Menu->AddItem( 1, "gief item newb", 1 );
    if(AutoSend)
        Menu->SendTo(Plr);
}

#define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), textid, Plr); \
    Menu->SendTo(Plr);

void Tier6Gossip::GossipSelectOption(Creature* pCreature, Player* Plr, uint32 Id, uint32 IntId)
{
    sLog.outDebug("Gossip_Tier6.cpp : Select option %u by %s", IntId, Plr->GetName());
    switch(IntId)
    {
		case 1:
			objmgr.CreateItem(1327, Plr);
			break;
	}
}


void Tier6Gossip::GossipEnd(Creature* pCreature, Player* Plr)
{
    GossipScript::GossipEnd(pCreature, Plr);
}

void SetupTier6Gossip(ScriptMgr * mgr)
{
    /* Tier 6 List */
    mgr->register_gossip_script(21699, &Tier6Gossip::Create);      //Alliance NPC
}