AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
go_razorscale_harpoon Class Reference
Inheritance diagram for go_razorscale_harpoon:
GameObjectScript ScriptObject UpdatableScript< GameObject >

Classes

struct  go_razorscale_harpoonAI
 

Public Member Functions

 go_razorscale_harpoon ()
 
bool OnGossipHello (Player *, GameObject *go) override
 
GameObjectAI * GetAI (GameObject *go) const override
 
- Public Member Functions inherited from GameObjectScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipSelect (Player *, GameObject *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, GameObject *, uint32, uint32, char const *)
 
virtual bool OnQuestAccept (Player *, GameObject *, Quest const *)
 
virtual bool OnQuestReward (Player *, GameObject *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, GameObject *)
 
virtual void OnDestroyed (GameObject *, Player *)
 
virtual void OnDamaged (GameObject *, Player *)
 
virtual void OnModifyHealth (GameObject *, Unit *, int32 &, SpellInfo const *)
 
virtual void OnLootStateChanged (GameObject *, uint32, Unit *)
 
virtual void OnGameObjectStateChanged (GameObject *, uint32)
 
- Public Member Functions inherited from ScriptObject
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
std::string const & GetName () const
 
uint16 GetTotalAvailableHooks ()
 
- Public Member Functions inherited from UpdatableScript< GameObject >
virtual void OnUpdate (GameObject *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from GameObjectScript
 GameObjectScript (char const *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (char const *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ go_razorscale_harpoon()

go_razorscale_harpoon::go_razorscale_harpoon ( )
inlineexplicit
1275 : GameObjectScript("go_razorscale_harpoon")
1276 { }
Definition GameObjectScript.h:25

Member Function Documentation

◆ GetAI()

GameObjectAI * go_razorscale_harpoon::GetAI ( GameObject *  go) const
inlineoverridevirtual

Reimplemented from GameObjectScript.

1335 {
1336 return GetUlduarAI<go_razorscale_harpoonAI>(go);
1337 }

◆ OnGossipHello()

bool go_razorscale_harpoon::OnGossipHello ( Player *  ,
GameObject *  go 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

1279 {
1281 if (Creature* controller = go->FindNearestCreature(NPC_RAZORSCALE_CONTROLLER, 10.0f))
1282 {
1283 if (controller->HasUnitState(UNIT_STATE_CASTING))
1284 return true;
1285
1286 uint32 spell = 0;
1287 switch (go->GetEntry())
1288 {
1289 case GO_RAZOR_HARPOON_1:
1290 spell = SPELL_HARPOON_SHOT_1;
1291 break;
1292 case GO_RAZOR_HARPOON_2:
1293 spell = SPELL_HARPOON_SHOT_2;
1294 break;
1295 case GO_RAZOR_HARPOON_3:
1296 spell = SPELL_HARPOON_SHOT_3;
1297 break;
1298 case GO_RAZOR_HARPOON_4:
1299 spell = SPELL_HARPOON_SHOT_4;
1300 break;
1301 }
1302 if (spell)
1303 controller->CastSpell(controller, spell, true);
1304 }
1305 return true;
1306 }
std::uint32_t uint32
Definition Define.h:107
@ GO_FLAG_NOT_SELECTABLE
Definition SharedDefines.h:1611
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ SPELL_HARPOON_SHOT_1
Definition boss_razorscale.cpp:53
@ SPELL_HARPOON_SHOT_3
Definition boss_razorscale.cpp:55
@ SPELL_HARPOON_SHOT_4
Definition boss_razorscale.cpp:56
@ SPELL_HARPOON_SHOT_2
Definition boss_razorscale.cpp:54
Definition Creature.h:47
void SetGameObjectFlag(GameObjectFlags flags)
Definition GameObject.h:219
uint32 GetEntry() const
Definition Object.h:123
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2558
@ GO_RAZOR_HARPOON_4
Definition ulduar.h:325
@ GO_RAZOR_HARPOON_3
Definition ulduar.h:324
@ GO_RAZOR_HARPOON_2
Definition ulduar.h:323
@ GO_RAZOR_HARPOON_1
Definition ulduar.h:322
@ NPC_RAZORSCALE_CONTROLLER
Definition ulduar.h:192

References WorldObject::FindNearestCreature(), Object::GetEntry(), GO_FLAG_NOT_SELECTABLE, GO_RAZOR_HARPOON_1, GO_RAZOR_HARPOON_2, GO_RAZOR_HARPOON_3, GO_RAZOR_HARPOON_4, NPC_RAZORSCALE_CONTROLLER, GameObject::SetGameObjectFlag(), SPELL_HARPOON_SHOT_1, SPELL_HARPOON_SHOT_2, SPELL_HARPOON_SHOT_3, SPELL_HARPOON_SHOT_4, and UNIT_STATE_CASTING.


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