TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
go_crystalline_tear Class Reference

Public Member Functions

 go_crystalline_tear ()
 
bool OnQuestAccept (Player *player, GameObject *go, Quest const *quest) override
 
- Public Member Functions inherited from GameObjectScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, GameObject *)
 
virtual bool OnGossipHello (Player *, GameObject *)
 
virtual bool OnGossipSelect (Player *, GameObject *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, GameObject *, uint32, uint32, const char *)
 
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 OnLootStateChanged (GameObject *, uint32, Unit *)
 
virtual void OnGameObjectStateChanged (GameObject *, uint32)
 
virtual GameObjectAIGetAI (GameObject *) const
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 
- 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)
 
virtual ~ScriptObject ()
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()
 
virtual ~UpdatableScript ()
 

Constructor & Destructor Documentation

go_crystalline_tear::go_crystalline_tear ( )
inline
1046 : GameObjectScript("go_crystalline_tear") { }
GameObjectScript(const char *name)
Definition: ScriptMgr.cpp:1592

Member Function Documentation

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

Reimplemented from GameObjectScript.

1049  {
1050  if (quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD)
1051  {
1052  if (Creature* trigger = go->FindNearestCreature(15454, 100))
1053  {
1054  Unit* Merithra = trigger->SummonCreature(15378, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1055  Unit* Caelestrasz = trigger->SummonCreature(15379, -8032.767f, 1533.148f, 2.61f, 1.5f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1056  Unit* Arygos = trigger->SummonCreature(15380, -8034.52f, 1537.843f, 2.61f, 5.7f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1057  /* Unit* Fandral = */ trigger->SummonCreature(15382, -8028.462f, 1535.843f, 2.61f, 3.141592f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1058  Creature* Anachronos = trigger->SummonCreature(15381, -8028.75f, 1538.795f, 2.61f, 4, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
1059 
1060  if (Merithra)
1061  {
1062  Merithra->SetUInt32Value(UNIT_NPC_FLAGS, 0);
1063  Merithra->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
1064  Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15420);
1065  Merithra->setFaction(35);
1066  }
1067 
1068  if (Caelestrasz)
1069  {
1070  Caelestrasz->SetUInt32Value(UNIT_NPC_FLAGS, 0);
1071  Caelestrasz->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
1072  Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15419);
1073  Caelestrasz->setFaction(35);
1074  }
1075 
1076  if (Arygos)
1077  {
1078  Arygos->SetUInt32Value(UNIT_NPC_FLAGS, 0);
1079  Arygos->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
1080  Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15418);
1081  Arygos->setFaction(35);
1082  }
1083 
1084  if (Anachronos)
1085  {
1087  anachronosAI->PlayerGUID = player->GetGUID();
1088 
1090  {
1091  triggerAI->Failed = false;
1092  triggerAI->PlayerGUID = player->GetGUID();
1093  triggerAI->EventStarted = true;
1094  triggerAI->Announced = true;
1095  }
1096  }
1097  }
1098  }
1099  return true;
1100  }
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:996
Definition: Creature.h:467
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
void setFaction(uint32 faction)
Definition: Unit.h:1467
#define CAST_AI(a, b)
Definition: ScriptedCreature.h:28
CreatureAI * AI() const
Definition: Creature.h:525
Definition: UpdateFields.h:117
Definition: UpdateFields.h:124
Definition: UpdateFields.h:135
Definition: Unit.h:1305
Definition: zone_silithus.cpp:159
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346
Definition: Object.h:54

+ Here is the call graph for this function:


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