TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
npc_wormhole Class Reference

Classes

struct  npc_wormholeAI
 

Public Member Functions

 npc_wormhole ()
 
bool OnGossipHello (Player *player, Creature *creature) override
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
CreatureAIGetAI (Creature *creature) const override
 
- Public Member Functions inherited from CreatureScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, Creature *)
 
virtual bool OnGossipSelectCode (Player *, Creature *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, Creature *, Quest const *)
 
virtual bool OnQuestSelect (Player *, Creature *, Quest const *)
 
virtual bool OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
- Public Member Functions inherited from UnitScript
virtual void OnHeal (Unit *, Unit *, uint32 &)
 
virtual void OnDamage (Unit *, Unit *, uint32 &)
 
virtual void ModifyPeriodicDamageAurasTick (Unit *, Unit *, uint32 &)
 
virtual void ModifyMeleeDamage (Unit *, Unit *, uint32 &)
 
virtual void ModifySpellDamageTaken (Unit *, Unit *, int32 &)
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 
- Public Member Functions inherited from UpdatableScript< Creature >
virtual void OnUpdate (Creature *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from CreatureScript
 CreatureScript (const char *name)
 
- Protected Member Functions inherited from UnitScript
 UnitScript (const char *name, bool addToScripts=true)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()
 
virtual ~UpdatableScript ()
 

Constructor & Destructor Documentation

npc_wormhole::npc_wormhole ( )
inline
1594 : CreatureScript("npc_wormhole") { }
CreatureScript(const char *name)
Definition: ScriptMgr.cpp:1586

Member Function Documentation

CreatureAI* npc_wormhole::GetAI ( Creature creature) const
inlineoverridevirtual

Reimplemented from CreatureScript.

1680  {
1681  return new npc_wormholeAI(creature);
1682  }
bool npc_wormhole::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

1623  {
1624  if (creature->IsSummon())
1625  {
1626  if (player == creature->ToTempSummon()->GetSummoner())
1627  {
1633 
1634  if (creature->AI()->GetData(DATA_SHOW_UNDERGROUND))
1636 
1637  player->PlayerTalkClass->SendGossipMenu(TEXT_WORMHOLE, creature->GetGUID());
1638  }
1639  }
1640 
1641  return true;
1642  }
Definition: npcs_special.cpp:1588
Definition: ScriptedGossip.h:71
Definition: npcs_special.cpp:1586
#define GOSSIP_ENGINEERING5
Definition: npcs_special.cpp:1574
#define GOSSIP_ENGINEERING3
Definition: npcs_special.cpp:1572
#define GOSSIP_ENGINEERING2
Definition: npcs_special.cpp:1571
#define GOSSIP_ENGINEERING4
Definition: npcs_special.cpp:1573
Unit * GetSummoner() const
Definition: TemporarySummon.cpp:37
TempSummon * ToTempSummon()
Definition: Unit.h:2206
CreatureAI * AI() const
Definition: Creature.h:525
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: GossipDef.h:59
virtual uint32 GetData(uint32) const
Definition: UnitAI.h:139
#define GOSSIP_ENGINEERING1
Definition: npcs_special.cpp:1570
bool IsSummon() const
Definition: Unit.h:1401
#define GOSSIP_ENGINEERING6
Definition: npcs_special.cpp:1575

+ Here is the call graph for this function:

bool npc_wormhole::OnGossipSelect ( Player player,
Creature creature,
uint32  ,
uint32  action 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

1645  {
1646  player->PlayerTalkClass->ClearMenus();
1647 
1648  switch (action)
1649  {
1650  case GOSSIP_ACTION_INFO_DEF + 1: // Borean Tundra
1651  player->CLOSE_GOSSIP_MENU();
1652  creature->CastSpell(player, SPELL_BOREAN_TUNDRA, false);
1653  break;
1654  case GOSSIP_ACTION_INFO_DEF + 2: // Howling Fjord
1655  player->CLOSE_GOSSIP_MENU();
1656  creature->CastSpell(player, SPELL_HOWLING_FJORD, false);
1657  break;
1658  case GOSSIP_ACTION_INFO_DEF + 3: // Sholazar Basin
1659  player->CLOSE_GOSSIP_MENU();
1660  creature->CastSpell(player, SPELL_SHOLAZAR_BASIN, false);
1661  break;
1662  case GOSSIP_ACTION_INFO_DEF + 4: // Icecrown
1663  player->CLOSE_GOSSIP_MENU();
1664  creature->CastSpell(player, SPELL_ICECROWN, false);
1665  break;
1666  case GOSSIP_ACTION_INFO_DEF + 5: // Storm peaks
1667  player->CLOSE_GOSSIP_MENU();
1668  creature->CastSpell(player, SPELL_STORM_PEAKS, false);
1669  break;
1670  case GOSSIP_ACTION_INFO_DEF + 6: // Underground
1671  player->CLOSE_GOSSIP_MENU();
1672  creature->CastSpell(player, SPELL_UNDERGROUND, false);
1673  break;
1674  }
1675 
1676  return true;
1677  }
Definition: npcs_special.cpp:1582
Definition: ScriptedGossip.h:71
Definition: npcs_special.cpp:1584
Definition: npcs_special.cpp:1581
Definition: npcs_special.cpp:1580
Definition: npcs_special.cpp:1583
Definition: npcs_special.cpp:1579
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: