void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode) { if(!plr) return; Creature *windwatcher = (Creature*)(pObject); if (windwatcher == NULL) return; switch (IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: { if(plr == NULL || plr->GetMapMgr() == NULL || plr->GetMapMgr()->GetInterface() == NULL) return; Creature *whirlwind = plr->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), 6239); if(whirlwind != NULL) { if(!whirlwind->isAlive()) { whirlwind->Delete(); } else return; } whirlwind = EAS::SpawnCreature(plr, 6239, plr->GetPositionX()+7, plr->GetPositionY()+7, plr->GetPositionZ(), plr->GetOrientation(), 0); whirlwind->Despawn(5*60*1000, 0); }break; } }
void GossipSelectOption(Object* pObject, Player* pPlayer, uint32 Id, uint32 IntId, const char * EnteredCode) { if(pPlayer == NULL || !pObject->IsCreature()) return; switch(IntId) { case 0: { GossipHello(pObject, pPlayer, true); }break; case 1: { GameObject* Door = pObject->GetMapMgr()->GetInterface()->GetGameObjectForce(120, 1603, 44, 186728); if(Door) { Door->SetUInt32Value(GAMEOBJECT_STATE, 0); Door->SaveState(); dynamic_cast<TIMEDEVENT*>(TO_CREATURE(pObject)->GetScript())->StartEvent(); } }break; } pPlayer->Gossip_Complete(); }
bool GossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action, std::string code) { CPlayer* pCPlayer = pPlayer->ToCPlayer(); pCPlayer->PlayerTalkClass->CloseGossip(); if (sender == 0) { if (action == 0) GossipHello(pPlayer, pCreature); else if (action == 1) TeleportPlayerToTeleName(pCPlayer, "tele_mall"); else if (action == 2) TeleportPlayerToTeleName(pCPlayer, "tele_guru"); else if (action == 3) pCPlayer->SendTalentWipeConfirm(pCreature->GetObjectGuid()); else if (action == 4) pCPlayer->SendPetSkillWipeConfirm(); else if (action == 5) TeleportPlayerToTeleName(pCPlayer, "tele_hearth"); } if (!pPlayer->PlayerTalkClass->GetGossipMenu().Empty()) pPlayer->PlayerTalkClass->SendGossipMenu("Your wish, my law!", pCreature->GetObjectGuid()); return true; }
void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code) { GossipMenu * Menu; switch(IntId) { case 0: // Return to start GossipHello(pObject, Plr, true); break; ////////////////////// // Main menu handlers ///// case 1: // Arena Vendor Plr->Gossip_SendPOI(5757, 583, 7, 6, 0, "Arena Vendor"); Plr->Gossip_Complete(); break; case 2: // Arena Battlemaster Plr->Gossip_SendPOI(5852, 609, 7, 6, 0, "Arena Battlemaster"); Plr->Gossip_Complete(); break; case 3: // Black Market Plr->Gossip_SendPOI(5919, 569, 7, 6, 0, "Black Market"); Plr->Gossip_Complete(); break; case 4: // Exit of Dalaran Plr->Gossip_SendPOI(5765, 753, 7, 6, 0, "Exit of dalaran"); SendQuickMenu(14020); break; } }
void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode) { Creature *Lump = (Creature*)(pObject); if (Lump == NULL) return; switch (IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: if(plr->GetQuestLogForEntry(9918)) { QuestLogEntry *en = plr->GetQuestLogForEntry(9918); if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0]) { uint32 newcount = en->GetMobCount(0) + 1; en->SetMobCount(0, newcount); en->SendUpdateAddKill(0); en->UpdatePlayerFields(); } } break; } }
void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char* EnteredCode) { if (!plr) return; Creature* Prisoner12 = TO_CREATURE(pObject); if (Prisoner12 == nullptr) return; switch (IntId) { case 0: GossipHello(pObject, plr); break; case 1: { QuestLogEntry* en = plr->GetQuestLogForEntry(9164); if (en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0]) { en->SetMobCount(0, en->GetMobCount(0) + 1); en->SendUpdateAddKill(0); en->UpdatePlayerFields(); Prisoner12->Despawn(5000, 6 * 60 * 1000); Prisoner12->SetStandState(STANDSTATE_STAND); Prisoner12->SetEmoteState(7); return; } break; } } }
void GossipSelectOption(Object * pObject, Player * plr, uint32 Id, uint32 IntId, const char * EnteredCode) { if(!plr) return; Creature * general = TO_CREATURE(pObject); if (general == NULL) return; switch (IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: { Creature * spawncheckcr = plr->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), 7750); if(!spawncheckcr) { Creature * general = sEAS.SpawnCreature(plr, 7750, -10619, -2997, 28.8, 4, 0); general->Despawn(3*60*1000, 0); } GameObject * spawncheckgobj = plr->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), 141980); if(!spawncheckgobj) { GameObject * generalsbox = sEAS.SpawnGameobject(plr, 141980, -10622, -2994, 28.6, 4, 4, 0, 0, 0, 0); sEAS.GameobjectDelete(generalsbox, 3*60*1000); } } } }
void GossipSelectOption(Object* pObject, Player * plr, uint32 Id, uint32 IntId, const char * Code) { if(pObject->GetTypeId()!=TYPEID_UNIT) return; GossipMenu * Menu; switch(IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, plr); // Text of status [The Alchemy lab is not quite yet ready, $N. Mar'nah says she is (percentual) percent done with its assembly.$Bhowever.$B$BIf you wold like to help her with that, you will find her inside the inn at the Sun's Reach Harbor.] Menu->AddItem( 0, GOSSIP_EXARCH_NASUUN_3, 0); Menu->SendTo(plr); }break; case 2: { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 12305, plr); Menu->AddItem( 0, GOSSIP_EXARCH_NASUUN_3, 0); Menu->SendTo(plr); }break; } }
void GossipSelectOption(ObjectPointer pObject, PlayerPointer plr, uint32 Id, uint32 IntId, const char * EnteredCode) { if(!plr) return; CreaturePointer spirit = TO_CREATURE(pObject); if (spirit == NULL) return; switch (IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: { QuestLogEntry *en = plr->GetQuestLogForEntry(3520); if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0]) { en->SetMobCount(0, en->GetMobCount(0) + 1); en->SendUpdateAddKill(0); en->UpdatePlayerFields(); } if(!spirit) return; spirit->Despawn(1, 0); return; } } }
void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char* Code) { switch(IntId) { case 0: GossipHello(pObject, Plr); return; break; case 1: Plr->CastSpell(Plr, 67834, true); break; case 2: Plr->CastSpell(Plr, 67838, true); break; case 3: Plr->CastSpell(Plr, 67835, true); break; case 4: Plr->CastSpell(Plr, 67836, true); break; case 5: Plr->CastSpell(Plr, 67837, true); break; case 6: Plr->CastSpell(Plr, 68081, true); break; } Plr->Gossip_Complete(); }
void GossipSelectOption(Object* pObject, Player* pPlayer, uint32 Id, uint32 IntId, const char * EnteredCode) { if(!pPlayer) return; Creature *Prisoner1 = (Creature*)(pObject); if (Prisoner1 == NULL) return; switch (IntId) { case 0: GossipHello(pObject, pPlayer, true); break; case 1: { QuestLogEntry *en = pPlayer->GetQuestLogForEntry(10368); if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0]) { en->SetMobCount(0, en->GetMobCount(0) + 1); en->SendUpdateAddKill(0); en->UpdatePlayerFields(); if(!Prisoner1) return; Prisoner1->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You've freed me! The winds speak to my people one again and grant us their strength. I thank you, stranger."); Prisoner1->Despawn(5000, 6*60*1000); Prisoner1->SetStandState(STANDSTATE_STAND); return; }break; } } }
void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode) { if(!plr) return; Creature *Prisoner32 = (Creature*)(pObject); if (Prisoner32 == NULL) return; switch (IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: { QuestLogEntry *en = plr->GetQuestLogForEntry(9164); if(en && en->GetMobCount(2) < en->GetQuest()->required_mobcount[2]) { en->SetMobCount(2, en->GetMobCount(2) + 1); en->SendUpdateAddKill(2); en->UpdatePlayerFields(); if(!Prisoner32) return; Prisoner32->Despawn(5000, 6*60*1000); Prisoner32->SetStandState(STANDSTATE_STAND); Prisoner32->SetUInt32Value(UNIT_NPC_EMOTESTATE, 7); return; }break; } } }
void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char* EnteredCode) { if(!plr) return; Creature* highchief = TO_CREATURE(pObject); if(highchief == NULL) return; switch(IntId) { case 0: GossipHello(pObject, plr); break; case 1: { QuestLogEntry* en = plr->GetQuestLogForEntry(9663); if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0]) { en->SetMobCount(0, en->GetMobCount(0) + 1); en->SendUpdateAddKill(0); en->UpdatePlayerFields(); return; } break; } } }
void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code) { Creature* pCreature = (pObject->GetTypeId()==TYPEID_UNIT) ? TO_CREATURE(pObject) : NULL; if(pObject == NULL) return; switch(IntId) { case 0: // Return to start GossipHello(pCreature, Plr, true); break; case 1: // Disciple of Naralex Casts Mark of the Wild on players. { pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Take this! It will be useful for you. I'll be waiting here when you have slain the 4 Fanglords to awake Naralex!"); pCreature->CastSpell(Plr, 5232, true); pCreature->Emote(EMOTE_ONESHOT_CHEER); Plr->Gossip_Complete(); } break; case 2: // Start Event { pCreature->SetUInt32Value(UNIT_NPC_FLAGS, 0); pCreature->GetAIInterface()->StopMovement(0); pCreature->GetAIInterface()->SetAIState(STATE_SCRIPTMOVE); pCreature->GetAIInterface()->setMoveType(MOVEMENTTYPE_WANTEDWP); pCreature->GetAIInterface()->setWaypointToMove(2); } break; } }
void GossipSelectOption(ObjectPointer pObject, PlayerPointer plr, uint32 Id, uint32 IntId, const char * EnteredCode) { if(!plr) return; CreaturePointer doctor = TO_CREATURE(pObject); if (doctor == NULL) return; switch (IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: { plr->GetItemInterface()->RemoveItemAmt(2799, 1); doctor->CastSpell(doctor, dbcSpell.LookupEntry(12380), true); if( !plr || !plr->GetMapMgr() || !plr->GetMapMgr()->GetInterface() ) return; CreaturePointer firstenemy = sEAS.SpawnCreature(plr, 1511, -13770.5, -6.79, 42.8, 5.7 , 0); firstenemy->GetAIInterface()->MoveTo(-13727.8, -26.2, 46.15, 4.07); firstenemy->Despawn(10*60*1000, 0); }break; } }
void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode) { if(!plr) return; Creature* doctor = TO_CREATURE(pObject); if (doctor == NULL) return; switch (IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: { plr->GetItemInterface()->RemoveItemAmt(2799, 1); QuestLogEntry *qle = plr->GetQuestLogForEntry(10201); if(qle && qle->GetMobCount(0) < qle->GetQuest()->required_mobcount[0]) { qle->SetMobCount(0, qle->GetMobCount(0)+1); qle->SendUpdateAddKill(0); qle->UpdatePlayerFields(); } }break; } }
void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char* Code) { if(!pObject->IsCreature()) return; Creature* pCreature = static_cast<Creature*>(pObject); GossipMenu* Menu; switch(IntId) { case 0: // Return to start GossipHello(pCreature, plr); break; case 1: //Horde { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4715, plr); Menu->SendTo(plr); QuestLogEntry* qle = plr->GetQuestLogForEntry(6002); if(qle == NULL) return; if(qle->CanBeFinished()) return; qle->Complete(); qle->SendQuestComplete(); qle->UpdatePlayerFields(); pCreature->Emote(EMOTE_ONESHOT_WAVE); pCreature->Despawn(240000, 0); } break; case 2: //Ally { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4715, plr); Menu->SendTo(plr); QuestLogEntry* qle = plr->GetQuestLogForEntry(6001); if(qle == NULL) return; if(qle->CanBeFinished()) return; qle->Complete(); qle->SendQuestComplete(); qle->UpdatePlayerFields(); pCreature->Emote(EMOTE_ONESHOT_WAVE); pCreature->Despawn(240000, 0); } break; } }
void GossipSelectOption(Object* pObject, Player * plr, uint32 Id, uint32 IntId, const char * Code) { Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL; if(pObject->GetTypeId()!=TYPEID_UNIT) return; GossipMenu * Menu; switch(IntId) { case 0: // Return to start GossipHello(pCreature, plr, true); break; case 1: //Horde { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4715, plr); Menu->SendTo(plr); QuestLogEntry *qle = plr->GetQuestLogForEntry(6002); if(qle == NULL) return; if(qle->GetMobCount(0) != 0) return; qle->SetMobCount(0, 1); qle->SendUpdateAddKill(0); qle->UpdatePlayerFields(); pCreature->Emote(EMOTE_ONESHOT_WAVE); pCreature->Despawn(2000,0); } break; case 2: //Ally { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4715, plr); Menu->SendTo(plr); QuestLogEntry *qle = plr->GetQuestLogForEntry(6001); if(qle == NULL) return; if(qle->GetMobCount(0) != 0) return; qle->SetMobCount(0, 1); qle->SendUpdateAddKill(0); qle->UpdatePlayerFields(); pCreature->Emote(EMOTE_ONESHOT_WAVE); pCreature->Despawn(2000,0); } break; } }
void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char* Code) { if(!pObject->IsCreature()) return; switch(IntId) { case 1: GossipHello(pObject, plr); break; } }
void GossipSelectOption(Object* pObject, Player * plr, uint32 Id, uint32 IntId, const char * Code) { if(pObject->GetTypeId()!=TYPEID_UNIT) return; switch(IntId) { case 1: GossipHello(pObject, plr, true); break; } }
void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char* Code) { switch(IntId) { case 0: GossipHello(pObject, Plr); break; case 1: Plr->CastSpell(Plr, 64795, true); break; } Plr->Gossip_Complete(); }
void GossipSelectOption(Object* pObject, Player* pPlayer, uint32 Id, uint32 IntId, const char* Code) { switch (IntId) { case 0: GossipHello(pObject, pPlayer); break; case 1: pPlayer->SafeTeleport(1, 0, 9951.52f, 2280.32f, 1341.39f, 0); break; case 2: pPlayer->SafeTeleport(1, 0, 4247.74f, 745.879f, -24.2967f, 4.36996f); break; } }
void GossipSelectOption(Object* pObject, Player* pPlayer, uint32 Id, uint32 IntId, const char* EnteredCode) { if(pPlayer == NULL) return; if(!pObject->IsCreature()) return; switch(IntId) { case 0: GossipHello(pObject, pPlayer); break; case 1: { int32 i = -1; Creature* pPrisoner = static_cast<Creature*>(pObject); switch(pPrisoner->GetEntry()) { case 20677: i = 0; break; case 20678: i = 1; break; case 20679: i = 2; break; } if(i == -1) return; QuestLogEntry* pQuest = pPlayer->GetQuestLogForEntry(10368); if(pQuest != NULL && pQuest->GetMobCount(i) < pQuest->GetQuest()->required_mobcount[i]) { pQuest->SetMobCount(i, pQuest->GetMobCount(i) + 1); pQuest->SendUpdateAddKill(i); pQuest->UpdatePlayerFields(); pPrisoner->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You've freed me! The winds speak to my people one again and grant us their strength. I thank you, stranger."); pPrisoner->Despawn(5000, 6 * 60 * 1000); pPrisoner->SetStandState(STANDSTATE_STAND); } } break; } }
void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char* Code) { switch (IntId) { case 0: // Return to start GossipHello(pObject, plr); break; case 1: // Give Item { plr->CastSpell(plr, sSpellCustomizations.GetSpellInfo(23122), true); plr->Gossip_Complete(); break; } break; } }
void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char* Code) { switch(IntId) { case 0: { GossipHello(pObject, Plr); } break; case 1: { TO_CREATURE(pObject)->SetUInt32Value(UNIT_NPC_FLAGS, 0); TO_CREATURE(pObject)->GetScript()->OnReachWP(1000, 0); } break; } }
void GossipSelectOption(Object * pObject, Player * plr, uint32 Id, uint32 IntId, const char * Code) { if(pObject->GetTypeId()!=TYPEID_UNIT) return; switch(IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: plr->Gossip_Complete(); plr->GetMapMgr()->GetInterface()->SpawnCreature(BG_DEMOLISHER, spawncoordinates[1][0], spawncoordinates[1][1], spawncoordinates[1][2], spawncoordinates[1][3], true, false, 0, 0); break; } }
void GossipSelectOption(Object * pObject, Player * plr, uint32 Id, uint32 IntId, const char * Code) { switch (IntId) { case 0: GossipHello(pObject, plr, true); break; case 1: // port to Darnassus plr->SafeTeleport(1, 0, 9951.52f, 2280.32f, 1341.39f, 0); break; case 2: // Port to entrance plr->SafeTeleport(1, 0, 4247.74f, 745.879f, -24.2967f, 4.36996f); break; } }
void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char* Code) { switch (IntId) { case 0: { GossipHello(pObject, Plr); } break; case 1: { static_cast<Creature*>(pObject)->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); static_cast<Creature*>(pObject)->GetScript()->OnReachWP(1000, 0); } break; } }
void GossipSelectOption(Object* pObject, Player* pPlayer, uint32 Id, uint32 IntId, const char* Code) { TheVioletHoldScript* pInstance = (TheVioletHoldScript*)pPlayer->GetMapMgr()->GetScript(); if (!pInstance) return; if(!pObject->IsCreature()) return; Creature* pCreature = TO_CREATURE(pObject); switch (IntId) { case 0: GossipHello(pObject, pPlayer); break; case 1: { GossipMenu* menu; objmgr.CreateGossipMenuForPlayer(&menu, pObject->GetGUID(), SINCLARI_ON_FINISH, pPlayer); menu->AddItem(ICON_CHAT, pPlayer->GetSession()->LocalizedGossipOption(SINCLARI_GET_SAFETY), 2); menu->SendTo(pPlayer); // New Encounter State included pInstance->SetInstanceData(Data_EncounterState, MAP_VIOLET_HOLD, State_PreProgress); }break; case 2: { TO_CREATURE(pObject)->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); pCreature->GetAIInterface()->setMoveType(MOVEMENTTYPE_NONE); //pCreature->MoveToWaypoint(1); pCreature->GetAIInterface()->StopMovement(10); }break; case 3: { Arcemu::Gossip::Menu::Complete(pPlayer); pPlayer->SafeTeleport(pPlayer->GetInstanceID(), MAP_VIOLET_HOLD, 1830.531006f, 803.939758f, 44.340508f, 6.281611f); }break; } }
void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char* Code) { GossipMenu* Menu; switch (IntId) { case 0: // Return to start GossipHello(pObject, plr); break; case 1: // Give Item { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 7014, plr); Menu->SendTo(plr); plr->CastSpell(plr, sSpellCustomizations.GetSpellInfo(23123), true); break; } break; } }