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
 
GameObjectAIGetAI (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
1221 : GameObjectScript("go_razorscale_harpoon")
1222 { }
Definition GameObjectScript.h:25

Member Function Documentation

◆ GetAI()

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

Reimplemented from GameObjectScript.

1281 {
1282 return GetUlduarAI<go_razorscale_harpoonAI>(go);
1283 }

◆ OnGossipHello()

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

Reimplemented from GameObjectScript.

1225 {
1227 if (Creature* controller = go->FindNearestCreature(NPC_RAZORSCALE_CONTROLLER, 10.0f))
1228 {
1229 if (controller->HasUnitState(UNIT_STATE_CASTING))
1230 return true;
1231
1232 uint32 spell = 0;
1233 switch (go->GetEntry())
1234 {
1235 case GO_RAZOR_HARPOON_1:
1236 spell = SPELL_HARPOON_SHOT_1;
1237 break;
1238 case GO_RAZOR_HARPOON_2:
1239 spell = SPELL_HARPOON_SHOT_2;
1240 break;
1241 case GO_RAZOR_HARPOON_3:
1242 spell = SPELL_HARPOON_SHOT_3;
1243 break;
1244 case GO_RAZOR_HARPOON_4:
1245 spell = SPELL_HARPOON_SHOT_4;
1246 break;
1247 }
1248 if (spell)
1249 controller->CastSpell(controller, spell, true);
1250 }
1251 return true;
1252 }
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:218
uint32 GetEntry() const
Definition Object.h:117
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2553
@ GO_RAZOR_HARPOON_4
Definition ulduar.h:305
@ GO_RAZOR_HARPOON_3
Definition ulduar.h:304
@ GO_RAZOR_HARPOON_2
Definition ulduar.h:303
@ GO_RAZOR_HARPOON_1
Definition ulduar.h:302
@ NPC_RAZORSCALE_CONTROLLER
Definition ulduar.h:186

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: