AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
AreaTrigger_at_voltarus_middle Class Reference
Inheritance diagram for AreaTrigger_at_voltarus_middle:
AreaTriggerScript ScriptObject

Public Member Functions

 AreaTrigger_at_voltarus_middle ()
 
bool OnTrigger (Player *player, AreaTrigger const *) override
 
- Public Member Functions inherited from AreaTriggerScript
bool IsDatabaseBound () const override
 
virtual bool OnTrigger (Player *, AreaTrigger const *)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
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 ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ AreaTrigger_at_voltarus_middle()

AreaTrigger_at_voltarus_middle::AreaTrigger_at_voltarus_middle ( )
inline
48 : AreaTriggerScript("at_voltarus_middle")
49 {
50 }
Definition: ScriptMgr.h:800

Member Function Documentation

◆ OnTrigger()

bool AreaTrigger_at_voltarus_middle::OnTrigger ( Player player,
AreaTrigger const *   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

53 {
54 if (player->IsAlive() && !player->IsInCombat())
55 if (player->HasItemCount(39319)) // Scepter of Domination
56 {
57 player->TeleportTo(571, 6242.67f, -1972.10f, 484.783f, 0.6f);
58 return true;
59 }
60
61 return false;
62 }
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition: PlayerStorage.cpp:688
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options=0, Unit *target=nullptr, bool newInstance=false)
Definition: Player.cpp:1313
bool IsAlive() const
Definition: Unit.h:2024
bool IsInCombat() const
Definition: Unit.h:1724

References Player::HasItemCount(), Unit::IsAlive(), Unit::IsInCombat(), and Player::TeleportTo().