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
906: 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.

909 {
910 if (quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD)
911 {
912 if (Creature* trigger = go->FindNearestCreature(15454, 100, player))
913 {
914 Unit* Merithra = trigger->SummonCreature(15378, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
915 Unit* Caelestrasz = trigger->SummonCreature(15379, -8032.767f, 1533.148f, 2.61f, 1.5f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
916 Unit* Arygos = trigger->SummonCreature(15380, -8034.52f, 1537.843f, 2.61f, 5.7f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
917 /* Unit* Fandral = */ trigger->SummonCreature(15382, -8028.462f, 1535.843f, 2.61f, 3.141592f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
918 Creature* Anachronos = trigger->SummonCreature(15381, -8028.75f, 1538.795f, 2.61f, 4, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
919
920 if (Merithra)
921 {
924 Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15420);
925 Merithra->SetFaction(FACTION_FRIENDLY);
926 }
927
928 if (Caelestrasz)
929 {
931 Caelestrasz->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
932 Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15419);
933 Caelestrasz->SetFaction(FACTION_FRIENDLY);
934 }
935
936 if (Arygos)
937 {
940 Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15418);
942 }
943
944 if (Anachronos)
945 {
947 anachronosAI->PlayerGUID = player->GetGUID();
948
950 {
951 triggerAI->Failed = false;
952 triggerAI->PlayerGUID = player->GetGUID();
953 triggerAI->EventStarted = true;
954 triggerAI->Announced = true;
955 }
956 }
957 }
958 }
959 return true;
960 }
@ QUEST_A_PAWN_ON_THE_ETERNAL_BOARD
Definition: zone_silithus.cpp:49
@ FACTION_FRIENDLY
Definition: SharedDefines.h:201
#define CAST_AI(a, b)
Definition: UnitAI.h:26
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: Object.h:46
@ UNIT_FIELD_DISPLAYID
Definition: UpdateFields.h:124
@ UNIT_FIELD_BYTES_1
Definition: UpdateFields.h:131
@ UNIT_NPC_FLAG_NONE
Definition: UnitDefines.h:293
Definition: Creature.h:43
CreatureAI * AI() const
Definition: Creature.h:140
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
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:2366
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2457
Definition: Unit.h:630
void SetFaction(uint32 faction)
Definition: Unit.cpp:10056
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21316
void ReplaceAllNpcFlags(NPCFlags flags)
Definition: Unit.h:728

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.