Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum Myngvar
- {
- NPC_MISTCALLER_YNGVAR = 34965,
- QUEST_MISTCALLER_YNGVAR = 14102,
- GO_HEART_OF_THE_MISTS = 49678
- };
- class item_mistcaller_yngvar : public ItemScript
- {
- public:
- item_mistcaller_yngvar() : ItemScript("item_mistcaller_yngvar") { }
- bool OnUse(Player* player, GameObject* heartofthemists, Item* /*item*/, SpellCastTargets const& /*targets*/)
- {
- if (player->GetQuestStatus(QUEST_MISTCALLER_YNGVAR) == QUEST_STATUS_INCOMPLETE)
- {
- if (GameObject* heartofthemists = player->FindNearestGameObject(49678, 2.0f))
- {
- if (Creature* yngvar = player->SummonCreature(34965, 0.2f, 0.0f, 0.2f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000))
- yngvar->AI()->AttackStart(player);
- }
- }
- return true;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment