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

Public Member Functions

 at_hor_battered_hilt_throw ()
 
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

◆ at_hor_battered_hilt_throw()

at_hor_battered_hilt_throw::at_hor_battered_hilt_throw ( )
inline
2372: AreaTriggerScript("at_hor_battered_hilt_throw") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

2375 {
2376 if (player->HasAura(70013))
2377 if (InstanceScript* instance = player->GetInstanceScript())
2378 {
2379 uint32 bhd = instance->GetData(DATA_BATTERED_HILT);
2380 if (bhd != BHSF_STARTED)
2381 return true;
2382 player->CastSpell(player, 70698, true);
2383 player->DestroyItemCount(49766, 1, true);
2384 instance->SetData(DATA_BATTERED_HILT, 3);
2385 }
2386 return true;
2387 }
std::uint32_t uint32
Definition: Define.h:107
@ BHSF_STARTED
Definition: halls_of_reflection.h:112
@ DATA_BATTERED_HILT
Definition: halls_of_reflection.h:36
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
void DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check=false)
Definition: PlayerStorage.cpp:3127
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5669
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1168
Definition: InstanceScript.h:142

References BHSF_STARTED, Unit::CastSpell(), DATA_BATTERED_HILT, Player::DestroyItemCount(), WorldObject::GetInstanceScript(), and Unit::HasAura().