2010-07-06 03:27:41 +02:00
/*
2012-01-01 00:32:13 +01:00
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
2010-07-06 03:27:41 +02:00
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
2008-10-21 13:19:26 -05:00
*
2010-07-06 03:27:41 +02:00
* 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.
2008-10-21 13:19:26 -05:00
*
2010-07-06 03:27:41 +02:00
* 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, see <http://www.gnu.org/licenses/>.
2008-10-21 13:19:26 -05:00
*/
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
/* ScriptData
SDName: Zangarmarsh
SD%Complete: 100
2009-06-15 01:59:46 +02:00
SDComment: Quest support: 9752, 9785, 9803, 10009. Mark Of ... buffs.
2008-10-21 13:19:26 -05:00
SDCategory: Zangarmarsh
EndScriptData */
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
/* ContentData
npcs_ashyen_and_keleth
npc_cooshcoosh
npc_elder_kuruti
npc_mortog_steamhead
2009-01-09 23:56:25 +01:00
npc_kayra_longmane
2009-08-17 01:41:39 +02:00
npc_timothy_daniels
2008-10-21 13:19:26 -05:00
EndContentData */
2009-10-17 15:51:44 -07:00
2012-07-29 21:40:10 +02:00
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
2010-01-19 11:36:05 +01:00
#include "ScriptedEscortAI.h"
2012-11-17 05:18:37 +01:00
#include "Player.h"
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
/*######
## npcs_ashyen_and_keleth
######*/
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
#define GOSSIP_ITEM_BLESS_ASH "Grant me your mark, wise ancient."
#define GOSSIP_ITEM_BLESS_KEL "Grant me your mark, mighty ancient."
2011-04-29 20:47:02 +02:00
//signed for 17900 but used by 17900, 17901
2009-01-23 19:45:49 +01:00
#define GOSSIP_REWARD_BLESS -1000359
2008-10-21 13:19:26 -05:00
//#define TEXT_BLESSINGS "<You need higher standing with Cenarion Expedition to recive a blessing.>"
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
class npcs_ashyen_and_keleth : public CreatureScript
2008-10-21 13:19:26 -05:00
{
2010-08-07 13:04:00 +06:00
public :
npcs_ashyen_and_keleth () : CreatureScript ( "npcs_ashyen_and_keleth" ) { }
2011-07-02 22:52:42 +02:00
bool OnGossipHello ( Player * player , Creature * creature )
2008-10-21 13:19:26 -05:00
{
2011-07-02 22:52:42 +02:00
if ( player -> GetReputationRank ( 942 ) > REP_NEUTRAL )
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:18:03 +02:00
if ( creature -> GetEntry () == 17900 )
2011-07-02 22:52:42 +02:00
player -> ADD_GOSSIP_ITEM ( GOSSIP_ICON_CHAT , GOSSIP_ITEM_BLESS_ASH , GOSSIP_SENDER_MAIN , GOSSIP_ACTION_INFO_DEF + 1 );
2012-03-28 11:13:37 +08:00
2011-07-02 22:18:03 +02:00
if ( creature -> GetEntry () == 17901 )
2011-07-02 22:52:42 +02:00
player -> ADD_GOSSIP_ITEM ( GOSSIP_ICON_CHAT , GOSSIP_ITEM_BLESS_KEL , GOSSIP_SENDER_MAIN , GOSSIP_ACTION_INFO_DEF + 1 );
2010-08-07 13:04:00 +06:00
}
2011-07-02 22:52:42 +02:00
player -> SEND_GOSSIP_MENU ( player -> GetGossipTextId ( creature ), creature -> GetGUID ());
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
return true ;
}
2009-10-17 15:51:44 -07:00
2012-03-07 14:08:30 +01:00
bool OnGossipSelect ( Player * player , Creature * creature , uint32 /*sender*/ , uint32 action )
2008-10-21 13:19:26 -05:00
{
2011-07-02 22:52:42 +02:00
player -> PlayerTalkClass -> ClearMenus ();
2012-03-07 14:08:30 +01:00
if ( action == GOSSIP_ACTION_INFO_DEF + 1 )
2008-10-21 13:19:26 -05:00
{
2011-07-02 22:18:03 +02:00
creature -> setPowerType ( POWER_MANA );
creature -> SetMaxPower ( POWER_MANA , 200 ); //set a "fake" mana value, we can't depend on database doing it in this case
creature -> SetPower ( POWER_MANA , 200 );
2010-08-07 13:04:00 +06:00
2011-07-02 22:18:03 +02:00
if ( creature -> GetEntry () == 17900 ) //check which Creature we are dealing with
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:52:42 +02:00
switch ( player -> GetReputationRank ( 942 ))
2010-08-07 13:04:00 +06:00
{ //mark of lore
case REP_FRIENDLY :
2011-07-02 22:52:42 +02:00
creature -> CastSpell ( player , 31808 , true );
2011-07-02 22:18:03 +02:00
DoScriptText ( GOSSIP_REWARD_BLESS , creature );
2010-08-07 13:04:00 +06:00
break ;
case REP_HONORED :
2011-07-02 22:52:42 +02:00
creature -> CastSpell ( player , 31810 , true );
2011-07-02 22:18:03 +02:00
DoScriptText ( GOSSIP_REWARD_BLESS , creature );
2010-08-07 13:04:00 +06:00
break ;
case REP_REVERED :
2011-07-02 22:52:42 +02:00
creature -> CastSpell ( player , 31811 , true );
2011-07-02 22:18:03 +02:00
DoScriptText ( GOSSIP_REWARD_BLESS , creature );
2010-08-07 13:04:00 +06:00
break ;
case REP_EXALTED :
2011-07-02 22:52:42 +02:00
creature -> CastSpell ( player , 31815 , true );
2011-07-02 22:18:03 +02:00
DoScriptText ( GOSSIP_REWARD_BLESS , creature );
2010-08-07 13:04:00 +06:00
break ;
2010-08-24 14:44:56 +02:00
default :
break ;
2010-08-07 13:04:00 +06:00
}
2008-10-21 13:19:26 -05:00
}
2009-10-17 15:51:44 -07:00
2011-07-02 22:18:03 +02:00
if ( creature -> GetEntry () == 17901 )
2008-10-21 13:19:26 -05:00
{
2011-07-02 22:52:42 +02:00
switch ( player -> GetReputationRank ( 942 )) //mark of war
2010-08-07 13:04:00 +06:00
{
case REP_FRIENDLY :
2011-07-02 22:52:42 +02:00
creature -> CastSpell ( player , 31807 , true );
2011-07-02 22:18:03 +02:00
DoScriptText ( GOSSIP_REWARD_BLESS , creature );
2010-08-07 13:04:00 +06:00
break ;
case REP_HONORED :
2011-07-02 22:52:42 +02:00
creature -> CastSpell ( player , 31812 , true );
2011-07-02 22:18:03 +02:00
DoScriptText ( GOSSIP_REWARD_BLESS , creature );
2010-08-07 13:04:00 +06:00
break ;
case REP_REVERED :
2011-07-02 22:52:42 +02:00
creature -> CastSpell ( player , 31813 , true );
2011-07-02 22:18:03 +02:00
DoScriptText ( GOSSIP_REWARD_BLESS , creature );
2010-08-07 13:04:00 +06:00
break ;
case REP_EXALTED :
2011-07-02 22:52:42 +02:00
creature -> CastSpell ( player , 31814 , true );
2011-07-02 22:18:03 +02:00
DoScriptText ( GOSSIP_REWARD_BLESS , creature );
2010-08-07 13:04:00 +06:00
break ;
2010-08-24 14:44:56 +02:00
default :
break ;
2010-08-07 13:04:00 +06:00
}
2008-10-21 13:19:26 -05:00
}
2011-07-02 22:52:42 +02:00
player -> CLOSE_GOSSIP_MENU ();
player -> TalkedToCreature ( creature -> GetEntry (), creature -> GetGUID ());
2008-10-21 13:19:26 -05:00
}
2010-08-07 13:04:00 +06:00
return true ;
2008-10-21 13:19:26 -05:00
}
2010-08-07 13:04:00 +06:00
};
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
/*######
## npc_cooshcoosh
######*/
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
#define GOSSIP_COOSH "You owe Sim'salabim money. Hand them over or die!"
2009-10-17 15:51:44 -07:00
2009-10-17 07:42:48 -07:00
enum eCooshhooosh
2009-06-19 00:22:19 +02:00
{
SPELL_LIGHTNING_BOLT = 9532 ,
QUEST_CRACK_SKULLS = 10009 ,
FACTION_HOSTILE_CO = 45
};
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
class npc_cooshcoosh : public CreatureScript
2008-10-21 13:19:26 -05:00
{
2010-08-07 13:04:00 +06:00
public :
npc_cooshcoosh () : CreatureScript ( "npc_cooshcoosh" ) { }
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
struct npc_cooshcooshAI : public ScriptedAI
2008-10-21 13:19:26 -05:00
{
2012-03-14 09:20:36 +08:00
npc_cooshcooshAI ( Creature * creature ) : ScriptedAI ( creature )
2010-08-07 13:04:00 +06:00
{
2012-03-14 09:20:36 +08:00
m_uiNormFaction = creature -> getFaction ();
2010-08-07 13:04:00 +06:00
}
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
uint32 m_uiNormFaction ;
uint32 LightningBolt_Timer ;
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
void Reset ()
{
LightningBolt_Timer = 2000 ;
if ( me -> getFaction () != m_uiNormFaction )
me -> setFaction ( m_uiNormFaction );
}
2011-06-11 22:35:29 +02:00
void EnterCombat ( Unit * /*who*/ ) {}
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
void UpdateAI ( const uint32 diff )
2008-10-21 13:19:26 -05:00
{
2010-08-07 13:04:00 +06:00
if ( ! UpdateVictim ())
return ;
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
if ( LightningBolt_Timer <= diff )
{
DoCast ( me -> getVictim (), SPELL_LIGHTNING_BOLT );
LightningBolt_Timer = 5000 ;
} else LightningBolt_Timer -= diff ;
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
DoMeleeAttackIfReady ();
}
};
2009-10-17 15:51:44 -07:00
2011-07-02 22:18:03 +02:00
CreatureAI * GetAI ( Creature * creature ) const
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:18:03 +02:00
return new npc_cooshcooshAI ( creature );
2010-08-07 13:04:00 +06:00
}
2009-10-17 15:51:44 -07:00
2011-07-02 22:52:42 +02:00
bool OnGossipHello ( Player * player , Creature * creature )
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:52:42 +02:00
if ( player -> GetQuestStatus ( QUEST_CRACK_SKULLS ) == QUEST_STATUS_INCOMPLETE )
player -> ADD_GOSSIP_ITEM ( GOSSIP_ICON_CHAT , GOSSIP_COOSH , GOSSIP_SENDER_MAIN , GOSSIP_ACTION_INFO_DEF );
2009-10-17 15:51:44 -07:00
2011-07-02 22:52:42 +02:00
player -> SEND_GOSSIP_MENU ( 9441 , creature -> GetGUID ());
2010-08-07 13:04:00 +06:00
return true ;
}
2012-03-07 14:08:30 +01:00
bool OnGossipSelect ( Player * player , Creature * creature , uint32 /*sender*/ , uint32 action )
2008-10-21 13:19:26 -05:00
{
2011-07-02 22:52:42 +02:00
player -> PlayerTalkClass -> ClearMenus ();
2012-03-07 14:08:30 +01:00
if ( action == GOSSIP_ACTION_INFO_DEF )
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:52:42 +02:00
player -> CLOSE_GOSSIP_MENU ();
2011-07-02 22:18:03 +02:00
creature -> setFaction ( FACTION_HOSTILE_CO );
2011-07-02 22:52:42 +02:00
creature -> AI () -> AttackStart ( player );
2010-08-07 13:04:00 +06:00
}
return true ;
2008-10-21 13:19:26 -05:00
}
2010-08-07 13:04:00 +06:00
};
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
/*######
## npc_elder_kuruti
######*/
2009-10-17 15:51:44 -07:00
2009-12-06 20:32:16 -03:00
#define GOSSIP_ITEM_KUR1 "Greetings, elder. It is time for your people to end their hostility towards the draenei and their allies."
#define GOSSIP_ITEM_KUR2 "I did not mean to deceive you, elder. The draenei of Telredor thought to approach you in a way that would seem familiar to you."
#define GOSSIP_ITEM_KUR3 "I will tell them. Farewell, elder."
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
class npc_elder_kuruti : public CreatureScript
2008-10-21 13:19:26 -05:00
{
2010-08-07 13:04:00 +06:00
public :
npc_elder_kuruti () : CreatureScript ( "npc_elder_kuruti" ) { }
2009-10-17 15:51:44 -07:00
2011-07-02 22:52:42 +02:00
bool OnGossipHello ( Player * player , Creature * creature )
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:52:42 +02:00
if ( player -> GetQuestStatus ( 9803 ) == QUEST_STATUS_INCOMPLETE )
player -> ADD_GOSSIP_ITEM ( GOSSIP_ICON_CHAT , GOSSIP_ITEM_KUR1 , GOSSIP_SENDER_MAIN , GOSSIP_ACTION_INFO_DEF );
2009-10-17 15:51:44 -07:00
2011-07-02 22:52:42 +02:00
player -> SEND_GOSSIP_MENU ( 9226 , creature -> GetGUID ());
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
return true ;
}
2012-03-07 14:08:30 +01:00
bool OnGossipSelect ( Player * player , Creature * creature , uint32 /*sender*/ , uint32 action )
2008-10-21 13:19:26 -05:00
{
2011-07-02 22:52:42 +02:00
player -> PlayerTalkClass -> ClearMenus ();
2012-03-07 14:08:30 +01:00
switch ( action )
2008-10-21 13:19:26 -05:00
{
2010-08-07 13:04:00 +06:00
case GOSSIP_ACTION_INFO_DEF :
2011-07-02 22:52:42 +02:00
player -> ADD_GOSSIP_ITEM ( GOSSIP_ICON_CHAT , GOSSIP_ITEM_KUR2 , GOSSIP_SENDER_MAIN , GOSSIP_ACTION_INFO_DEF + 1 );
player -> SEND_GOSSIP_MENU ( 9227 , creature -> GetGUID ());
2010-08-07 13:04:00 +06:00
break ;
case GOSSIP_ACTION_INFO_DEF + 1 :
2011-07-02 22:52:42 +02:00
player -> ADD_GOSSIP_ITEM ( GOSSIP_ICON_CHAT , GOSSIP_ITEM_KUR3 , GOSSIP_SENDER_MAIN , GOSSIP_ACTION_INFO_DEF + 2 );
player -> SEND_GOSSIP_MENU ( 9229 , creature -> GetGUID ());
2010-08-07 13:04:00 +06:00
break ;
case GOSSIP_ACTION_INFO_DEF + 2 :
2008-10-21 13:19:26 -05:00
{
2012-10-23 13:11:08 +02:00
if ( ! player -> HasItemCount ( 24573 ))
2008-10-21 13:19:26 -05:00
{
2010-08-07 13:04:00 +06:00
ItemPosCountVec dest ;
uint32 itemId = 24573 ;
2011-08-03 11:23:08 +02:00
InventoryResult msg = player -> CanStoreNewItem ( NULL_BAG , NULL_SLOT , dest , itemId , 1 , NULL );
2010-08-07 13:04:00 +06:00
if ( msg == EQUIP_ERR_OK )
{
2011-07-02 22:52:42 +02:00
player -> StoreNewItem ( dest , itemId , true );
2010-08-07 13:04:00 +06:00
}
else
2011-07-02 22:52:42 +02:00
player -> SendEquipError ( msg , NULL , NULL , itemId );
2008-10-21 13:19:26 -05:00
}
2011-07-02 22:52:42 +02:00
player -> SEND_GOSSIP_MENU ( 9231 , creature -> GetGUID ());
2010-08-07 13:04:00 +06:00
break ;
2008-10-21 13:19:26 -05:00
}
}
2010-08-07 13:04:00 +06:00
return true ;
2008-10-21 13:19:26 -05:00
}
2010-08-07 13:04:00 +06:00
};
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
/*######
## npc_mortog_steamhead
######*/
2010-08-07 13:04:00 +06:00
class npc_mortog_steamhead : public CreatureScript
2008-10-21 13:19:26 -05:00
{
2010-08-07 13:04:00 +06:00
public :
npc_mortog_steamhead () : CreatureScript ( "npc_mortog_steamhead" ) { }
2009-10-17 15:51:44 -07:00
2011-07-02 22:52:42 +02:00
bool OnGossipHello ( Player * player , Creature * creature )
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:52:42 +02:00
if ( creature -> isVendor () && player -> GetReputationRank ( 942 ) == REP_EXALTED )
player -> ADD_GOSSIP_ITEM ( GOSSIP_ICON_VENDOR , GOSSIP_TEXT_BROWSE_GOODS , GOSSIP_SENDER_MAIN , GOSSIP_ACTION_TRADE );
2009-10-17 15:51:44 -07:00
2011-07-02 22:52:42 +02:00
player -> SEND_GOSSIP_MENU ( player -> GetGossipTextId ( creature ), creature -> GetGUID ());
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
return true ;
}
2012-03-07 14:08:30 +01:00
bool OnGossipSelect ( Player * player , Creature * creature , uint32 /*sender*/ , uint32 action )
2008-10-21 13:19:26 -05:00
{
2011-07-02 22:52:42 +02:00
player -> PlayerTalkClass -> ClearMenus ();
2012-03-07 14:08:30 +01:00
if ( action == GOSSIP_ACTION_TRADE )
2011-07-02 22:52:42 +02:00
player -> GetSession () -> SendListInventory ( creature -> GetGUID ());
2010-08-07 13:04:00 +06:00
return true ;
2008-10-21 13:19:26 -05:00
}
2010-08-07 13:04:00 +06:00
};
2009-10-17 15:51:44 -07:00
2009-01-09 23:56:25 +01:00
/*######
## npc_kayra_longmane
######*/
2009-10-17 15:51:44 -07:00
2009-10-17 07:42:48 -07:00
enum eKayra
2009-06-15 01:59:46 +02:00
{
2010-04-10 09:41:25 +02:00
SAY_START = - 1000343 ,
SAY_AMBUSH1 = - 1000344 ,
SAY_PROGRESS = - 1000345 ,
SAY_AMBUSH2 = - 1000346 ,
SAY_NEAR_END = - 1000347 ,
SAY_END = - 1000348 , //this is signed for 10646
2009-10-17 15:51:44 -07:00
2009-06-15 01:59:46 +02:00
QUEST_ESCAPE_FROM = 9752 ,
NPC_SLAVEBINDER = 18042
};
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
class npc_kayra_longmane : public CreatureScript
2009-01-09 23:56:25 +01:00
{
2010-08-07 13:04:00 +06:00
public :
npc_kayra_longmane () : CreatureScript ( "npc_kayra_longmane" ) { }
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
struct npc_kayra_longmaneAI : public npc_escortAI
2009-02-09 08:16:34 -05:00
{
2012-03-14 09:20:36 +08:00
npc_kayra_longmaneAI ( Creature * creature ) : npc_escortAI ( creature ) {}
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
void Reset () { }
2009-10-17 15:51:44 -07:00
2012-03-29 15:44:24 +08:00
void WaypointReached ( uint32 waypointId )
2009-02-09 08:16:34 -05:00
{
2011-07-02 22:52:42 +02:00
Player * player = GetPlayerForEscort ();
if ( ! player )
2010-08-07 13:04:00 +06:00
return ;
2012-03-29 15:44:24 +08:00
switch ( waypointId )
2010-08-07 13:04:00 +06:00
{
case 4 :
2011-07-02 22:52:42 +02:00
DoScriptText ( SAY_AMBUSH1 , me , player );
2010-08-07 13:04:00 +06:00
DoSpawnCreature ( NPC_SLAVEBINDER , - 10.0f , - 5.0f , 0.0f , 0.0f , TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT , 30000 );
DoSpawnCreature ( NPC_SLAVEBINDER , - 8.0f , 5.0f , 0.0f , 0.0f , TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT , 30000 );
break ;
case 5 :
2011-07-02 22:52:42 +02:00
DoScriptText ( SAY_PROGRESS , me , player );
2010-08-07 13:04:00 +06:00
SetRun ();
break ;
case 16 :
2011-07-02 22:52:42 +02:00
DoScriptText ( SAY_AMBUSH2 , me , player );
2010-08-07 13:04:00 +06:00
DoSpawnCreature ( NPC_SLAVEBINDER , - 10.0f , - 5.0f , 0.0f , 0.0f , TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT , 30000 );
DoSpawnCreature ( NPC_SLAVEBINDER , - 8.0f , 5.0f , 0.0f , 0.0f , TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT , 30000 );
break ;
case 17 :
SetRun ( false );
2011-07-02 22:52:42 +02:00
DoScriptText ( SAY_NEAR_END , me , player );
2010-08-07 13:04:00 +06:00
break ;
case 25 :
2011-07-02 22:52:42 +02:00
DoScriptText ( SAY_END , me , player );
player -> GroupEventHappens ( QUEST_ESCAPE_FROM , me );
2010-08-07 13:04:00 +06:00
break ;
}
2009-02-09 08:16:34 -05:00
}
2010-08-07 13:04:00 +06:00
};
2009-10-17 15:51:44 -07:00
2011-10-07 19:45:43 -05:00
bool OnQuestAccept ( Player * player , Creature * creature , Quest const * quest )
2009-01-09 23:56:25 +01:00
{
2011-10-07 19:45:43 -05:00
if ( quest -> GetQuestId () == QUEST_ESCAPE_FROM )
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:52:42 +02:00
DoScriptText ( SAY_START , creature , player );
2009-10-17 15:51:44 -07:00
2011-07-02 22:18:03 +02:00
if ( npc_escortAI * pEscortAI = CAST_AI ( npc_kayra_longmane :: npc_kayra_longmaneAI , creature -> AI ()))
2011-07-02 22:52:42 +02:00
pEscortAI -> Start ( false , false , player -> GetGUID ());
2010-08-07 13:04:00 +06:00
}
return true ;
2009-01-09 23:56:25 +01:00
}
2009-10-17 15:51:44 -07:00
2011-07-02 22:18:03 +02:00
CreatureAI * GetAI ( Creature * creature ) const
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:18:03 +02:00
return new npc_kayra_longmaneAI ( creature );
2010-08-07 13:04:00 +06:00
}
};
2009-10-17 15:51:44 -07:00
2009-08-17 01:41:39 +02:00
/*######
## npc_timothy_daniels
######*/
2009-10-17 15:51:44 -07:00
2009-08-17 01:41:39 +02:00
#define GOSSIP_TIMOTHY_DANIELS_ITEM1 "Specialist, eh? Just what kind of specialist are you, anyway?"
#define GOSSIP_TEXT_BROWSE_POISONS "Let me browse your reagents and poison supplies."
2009-10-17 15:51:44 -07:00
2009-10-17 07:42:48 -07:00
enum eTimothy
2009-08-17 01:41:39 +02:00
{
GOSSIP_TEXTID_TIMOTHY_DANIELS1 = 9239
};
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
class npc_timothy_daniels : public CreatureScript
2009-08-17 01:41:39 +02:00
{
2010-08-07 13:04:00 +06:00
public :
npc_timothy_daniels () : CreatureScript ( "npc_timothy_daniels" ) { }
2011-07-02 22:52:42 +02:00
bool OnGossipHello ( Player * player , Creature * creature )
2010-08-07 13:04:00 +06:00
{
2011-07-02 22:18:03 +02:00
if ( creature -> isQuestGiver ())
2011-07-02 22:52:42 +02:00
player -> PrepareQuestMenu ( creature -> GetGUID ());
2009-10-17 15:51:44 -07:00
2011-07-02 22:18:03 +02:00
if ( creature -> isVendor ())
2011-07-02 22:52:42 +02:00
player -> ADD_GOSSIP_ITEM ( GOSSIP_ICON_VENDOR , GOSSIP_TEXT_BROWSE_POISONS , GOSSIP_SENDER_MAIN , GOSSIP_ACTION_TRADE );
2009-10-17 15:51:44 -07:00
2011-07-02 22:52:42 +02:00
player -> ADD_GOSSIP_ITEM ( GOSSIP_ICON_CHAT , GOSSIP_TIMOTHY_DANIELS_ITEM1 , GOSSIP_SENDER_MAIN , GOSSIP_ACTION_INFO_DEF + 1 );
player -> SEND_GOSSIP_MENU ( player -> GetGossipTextId ( creature ), creature -> GetGUID ());
2010-08-07 13:04:00 +06:00
return true ;
}
2009-10-17 15:51:44 -07:00
2012-03-07 14:08:30 +01:00
bool OnGossipSelect ( Player * player , Creature * creature , uint32 /*sender*/ , uint32 action )
2009-08-17 01:41:39 +02:00
{
2011-07-02 22:52:42 +02:00
player -> PlayerTalkClass -> ClearMenus ();
2012-03-07 14:08:30 +01:00
switch ( action )
2010-08-07 13:04:00 +06:00
{
case GOSSIP_ACTION_INFO_DEF + 1 :
2011-07-02 22:52:42 +02:00
player -> SEND_GOSSIP_MENU ( GOSSIP_TEXTID_TIMOTHY_DANIELS1 , creature -> GetGUID ());
2010-08-07 13:04:00 +06:00
break ;
case GOSSIP_ACTION_TRADE :
2011-07-02 22:52:42 +02:00
player -> GetSession () -> SendListInventory ( creature -> GetGUID ());
2010-08-07 13:04:00 +06:00
break ;
}
2009-10-17 15:51:44 -07:00
2010-08-07 13:04:00 +06:00
return true ;
}
};
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
/*######
## AddSC
######*/
2009-10-17 15:51:44 -07:00
2008-10-21 13:19:26 -05:00
void AddSC_zangarmarsh ()
{
2010-08-07 13:04:00 +06:00
new npcs_ashyen_and_keleth ();
new npc_cooshcoosh ();
new npc_elder_kuruti ();
new npc_mortog_steamhead ();
new npc_kayra_longmane ();
new npc_timothy_daniels ();
2008-10-21 13:19:26 -05:00
}