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

Public Member Functions

 AreaTrigger_at_nats_landing ()
 
bool OnTrigger (Player *player, AreaTriggerEntry const *, bool) override
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 

Constructor & Destructor Documentation

AreaTrigger_at_nats_landing::AreaTrigger_at_nats_landing ( )
inline
266 : AreaTriggerScript("at_nats_landing") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

bool AreaTrigger_at_nats_landing::OnTrigger ( Player player,
AreaTriggerEntry const ,
bool   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

269  {
270  if (!player->IsAlive() || !player->HasAura(SPELL_FISH_PASTE))
271  return false;
272 
273  if (player->GetQuestStatus(QUEST_NATS_BARGAIN) == QUEST_STATUS_INCOMPLETE)
274  {
275  if (!player->FindNearestCreature(NPC_LURKING_SHARK, 20.0f))
276  {
277  if (Creature* shark = player->SummonCreature(NPC_LURKING_SHARK, -4246.243f, -3922.356f, -7.488f, 5.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 100000))
278  shark->AI()->AttackStart(player);
279 
280  return false;
281  }
282  }
283  return true;
284  }
Definition: areatrigger_scripts.cpp:259
Definition: areatrigger_scripts.cpp:260
Definition: Creature.h:467
Definition: areatrigger_scripts.cpp:258
Definition: QuestDef.h:113
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:


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