AzerothCore 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
 
uint16 GetTotalAvailableHooks ()
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ AreaTrigger_at_voltarus_middle()

AreaTrigger_at_voltarus_middle::AreaTrigger_at_voltarus_middle ( )
inline
46 : AreaTriggerScript("at_voltarus_middle")
47 {
48 }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

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

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