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

Public Member Functions

 go_crystalline_tear ()
 
bool OnQuestAccept (Player *player, GameObject *go, Quest const *quest) override
 
- Public Member Functions inherited from GameObjectScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, GameObject *)
 
virtual bool OnGossipSelect (Player *, GameObject *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, GameObject *, uint32, uint32, const char *)
 
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)
 
virtual GameObjectAIGetAI (GameObject *) 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 ()
 
- Public Member Functions inherited from UpdatableScript< GameObject >
virtual void OnUpdate (GameObject *, uint32)
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ go_crystalline_tear()

go_crystalline_tear::go_crystalline_tear ( )
inline
905: GameObjectScript("go_crystalline_tear") { }
Definition: GameObjectScript.h:25

Member Function Documentation

◆ OnQuestAccept()

bool go_crystalline_tear::OnQuestAccept ( Player player,
GameObject go,
Quest const *  quest 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

908 {
909 if (quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD)
910 {
911 if (Creature* trigger = go->FindNearestCreature(15454, 100, player))
912 {
913 Unit* Merithra = trigger->SummonCreature(15378, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
914 Unit* Caelestrasz = trigger->SummonCreature(15379, -8032.767f, 1533.148f, 2.61f, 1.5f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
915 Unit* Arygos = trigger->SummonCreature(15380, -8034.52f, 1537.843f, 2.61f, 5.7f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
916 /* Unit* Fandral = */ trigger->SummonCreature(15382, -8028.462f, 1535.843f, 2.61f, 3.141592f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
917 Creature* Anachronos = trigger->SummonCreature(15381, -8028.75f, 1538.795f, 2.61f, 4, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
918
919 if (Merithra)
920 {
923 Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15420);
924 Merithra->SetFaction(FACTION_FRIENDLY);
925 }
926
927 if (Caelestrasz)
928 {
930 Caelestrasz->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
931 Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15419);
932 Caelestrasz->SetFaction(FACTION_FRIENDLY);
933 }
934
935 if (Arygos)
936 {
939 Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15418);
941 }
942
943 if (Anachronos)
944 {
946 anachronosAI->PlayerGUID = player->GetGUID();
947
949 {
950 triggerAI->Failed = false;
951 triggerAI->PlayerGUID = player->GetGUID();
952 triggerAI->EventStarted = true;
953 triggerAI->Announced = true;
954 }
955 }
956 }
957 }
958 return true;
959 }
#define CAST_AI(a, b)
Definition: UnitAI.h:26
@ UNIT_NPC_FLAG_NONE
Definition: UnitDefines.h:293
@ UNIT_FIELD_DISPLAYID
Definition: UpdateFields.h:124
@ UNIT_FIELD_BYTES_1
Definition: UpdateFields.h:131
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: Object.h:45
@ QUEST_A_PAWN_ON_THE_ETERNAL_BOARD
Definition: zone_silithus.cpp:48
@ FACTION_FRIENDLY
Definition: SharedDefines.h:201
Definition: Creature.h:46
CreatureAI * AI() const
Definition: Creature.h:143
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2355
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
Definition: Unit.h:630
void SetFaction(uint32 faction)
Definition: Unit.cpp:10018
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21256
void ReplaceAllNpcFlags(NPCFlags flags)
Definition: Unit.h:697

References Creature::AI(), CAST_AI, FACTION_FRIENDLY, WorldObject::FindNearestCreature(), Object::GetGUID(), Quest::GetQuestId(), QUEST_A_PAWN_ON_THE_ETERNAL_BOARD, Unit::ReplaceAllNpcFlags(), Unit::SetFaction(), Unit::SetUInt32Value(), WorldObject::SummonCreature(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, UNIT_FIELD_BYTES_1, UNIT_FIELD_DISPLAYID, and UNIT_NPC_FLAG_NONE.