Public feed #601486

Untitled

public text v1 · immutable
Raw Edit
·published 2007-07-03 15:17 UTC
rendered paste body


#include "../sc_defines.h"


bool GossipHello_sc_mob_q9785_2(Player *player, Creature *_Creature )

{

player->ADD_GOSSIP_ITEM( 7, "Buff Mark of War", GOSSIP_SENDER_MAIN, 1203);


player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID());

return true;

}

void SendDefaultMenu_sc_mob_q9785_2(Player *player, Creature *_Creature, uint32 action )
{




if(player->isAttacked())
  {
    _Creature->Say("You are in combat!", LANG_UNIVERSAL, NULL);
   return;
}

  if( player->getLevel() < 58  )  
  
   {
      
      _Creature->Say("You should not be in outlands", LANG_UNIVERSAL, NULL);
      return;
   }

switch(action)
{
case 1203: // Cast Mark or War 31807
player->CLOSE_GOSSIP_MENU();
player->CastSpell(player, 31807, NULL, NULL, NULL, NULL);


break;
}

}

bool GossipSelect_sc_mob_q9785_2(Player *player, Creature *_Creature, uint32 sender, uint32 action )

{
// Main menu
if (sender == GOSSIP_SENDER_MAIN)
SendDefaultMenu_sc_mob_q9785_2(player, _Creature, action   );

return true;

}

void AddSC_sc_mob_q9785_2()

{

Script *newscript;

newscript = new Script;
newscript->Name="sc_mob_q9785_2";
newscript->pGossipHello = &GossipHello_sc_mob_q9785_2;
newscript->pGossipSelect = &GossipSelect_sc_mob_q9785_2;
newscript->pItemHello = NULL;
newscript->pGOHello = NULL;
newscript->pAreaTrigger = NULL;
newscript->pItemQuestAccept = NULL;
newscript->pGOQuestAccept = NULL;
newscript->pGOChooseReward = NULL;

m_scripts[nrscripts++] = newscript;

}