/* Copyright (C) 2006,2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>* This program is free software; you can redistribute it and/or modify* it under the terms of the GNU General Public License as published by* the Free Software Foundation; either version 2 of the License, or* (at your option) any later version.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the* GNU General Public License for more details.** You should have received a copy of the GNU General Public License* along with this program; if not, write to the Free Software* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/#include "../sc_defines.h"#include "../../../../game/Player.h"#include "../../../../game/GossipDef.h"//#include "../../../../game/GameEvent.h"#define CHAMPIONSHIP_OBSERVER 20#define CHAMPIONSHIP_SUBSCRIBER 21#define MAP_ID 1#define HORDE_SUBSCRIBER_POS_X 5020.213379#define HORDE_SUBSCRIBER_POS_Y -1799.101807#define HORDE_SUBSCRIBER_POS_Z 1321.635990#define HORDE_SUBSCRIBER_O 1.173823#define ALLIANCE_SUBSCRIBER_POS_X 5030.685059#define ALLIANCE_SUBSCRIBER_POS_Y -1698.464478#define ALLIANCE_SUBSCRIBER_POS_Z 1322.170290#define ALLIANCE_SUBSCRIBER_O 4.637429#define HORDE_OBSERVER_POS_X 5069.090820#define HORDE_OBSERVER_POS_Y -1793.661377#define HORDE_OBSERVER_POS_Z 1327.794560#define HORDE_OBSERVER_O 2.497209#define ALLIANCE_OBSERVER_POS_X 4978.686035#define ALLIANCE_OBSERVER_POS_Y -1737.485107#define ALLIANCE_OBSERVER_POS_Z 1342.308970#define ALLIANCE_OBSERVER_O 5.375701#define CHAMPION_TEXT "Jelentkezem a Bajnoksagra!"#define OBSERVER_TEXT "Jelentkezem Nezonek!"#define NO_MONEY "Nincs eleg penzed a jelentkezeshez!"bool GossipHello_npc_championship(Player *player, Creature *_Creature){ player->TalkedToCreature(_Creature->GetEntry(),_Creature->GetGUID()); _Creature->prepareGossipMenu(player,0); player->PlayerTalkClass->GetGossipMenu()->AddMenuItem(0, OBSERVER_TEXT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+CHAMPIONSHIP_OBSERVER, false); player->PlayerTalkClass->GetGossipMenu()->AddMenuItem(0, CHAMPION_TEXT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+CHAMPIONSHIP_SUBSCRIBER, false); _Creature->sendPreparedGossip( player ); return true;}bool GossipSelect_npc_championship(Player *player, Creature *_Creature, uint32 sender, uint32 action ){ if (action == GOSSIP_ACTION_INFO_DEF+CHAMPIONSHIP_SUBSCRIBER) { player->CLOSE_GOSSIP_MENU(); if(player->GetMoney() >= 4000) { if (player->getRace() == 1 || 3 || 4 || 7 || 11) //ALLIANCE { player->ModifyMoney(-4000); player->TeleportTo(MAP_ID,ALLIANCE_SUBSCRIBER_POS_X,ALLIANCE_SUBSCRIBER_POS_Y,ALLIANCE_SUBSCRIBER_POS_Z,ALLIANCE_SUBSCRIBER_O); } else if (player->getRace() == 2 || 5 || 6 || 8 || 10) //HORDE { player->ModifyMoney(-4000); player->TeleportTo(MAP_ID,HORDE_SUBSCRIBER_POS_X,HORDE_SUBSCRIBER_POS_Y,HORDE_SUBSCRIBER_POS_Z,HORDE_SUBSCRIBER_O); } return true; } else { _Creature->Say(NO_MONEY,LANG_UNIVERSAL,player->GetGUID()); return true; } } if (action == GOSSIP_ACTION_INFO_DEF+CHAMPIONSHIP_OBSERVER) { player->CLOSE_GOSSIP_MENU(); if (player->getRace() == 1 || 3 || 4 || 7 || 11) //ALLIANCE { player->TeleportTo(MAP_ID,ALLIANCE_OBSERVER_POS_X,ALLIANCE_OBSERVER_POS_Y,ALLIANCE_OBSERVER_POS_Z,ALLIANCE_OBSERVER_O); } else if (player->getRace() == 2 || 5 || 6 || 8 || 10) //HORDE { player->TeleportTo(MAP_ID,HORDE_OBSERVER_POS_X,HORDE_OBSERVER_POS_Y,HORDE_OBSERVER_POS_Z,HORDE_OBSERVER_O); } return true; } return false;}void AddSC_npc_championship(){ Script *newscript; newscript = new Script; newscript->Name="npc_championship"; newscript->pGossipHello = &GossipHello_npc_championship; newscript->pGossipSelect = &GossipSelect_npc_championship; m_scripts[nrscripts++] = newscript;}