bool ToLegionHold(uint32 i, AuraPointer pAura, bool apply) { if ( pAura == NULL || pAura->GetUnitCaster() == NULL || !pAura->GetUnitCaster()->IsPlayer() ) return true; PlayerPointer pPlayer = TO_PLAYER( pAura->GetUnitCaster() ); CreaturePointer pJovaanCheck = pPlayer->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(-3310.743896f, 2951.929199f, 171.132538f, 21633); if ( pJovaanCheck != NULL ) return true; QuestLogEntry *pQuest = pPlayer->GetQuestLogForEntry( 10563 ); if ( pQuest == NULL ) { pQuest = pPlayer->GetQuestLogForEntry( 10596 ); if ( pQuest == NULL ) return true; } if ( apply ) { pPlayer->SetUInt32Value( UNIT_FIELD_DISPLAYID, 20366 ); pPlayer->Root(); CreaturePointer pJovaan = sEAS.SpawnCreature( pPlayer, 21633, -3310.743896f, 2951.929199f, 171.132538f, 5.054039f, 0 ); // Spawn Jovaan if ( pJovaan != NULL ) { pJovaan->SetUInt64Value( UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2 ); if ( pJovaan->GetAIInterface() != NULL ) { pJovaan->GetAIInterface()->SetAllowedToEnterCombat( false ); } } GameObjectPointer pGameObject = pPlayer->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 184834); if ( pGameObject != NULL ) { pGameObject->Despawn(60000); pPlayer->UpdateNearbyGameObjects(); } } else { if ( pQuest->GetMobCount( 2 ) < pQuest->GetQuest()->required_mobcount[2] ) { pQuest->SetMobCount( 2, pQuest->GetMobCount( 2 ) + 1 ); pQuest->SendUpdateAddKill( 2 ); pQuest->UpdatePlayerFields(); } pPlayer->SetUInt32Value( UNIT_FIELD_DISPLAYID, pPlayer->GetUInt32Value( UNIT_FIELD_NATIVEDISPLAYID ) ); pPlayer->UnRoot(); } return true; }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(2882); if(qle == NULL) return; CreaturePointer pirate = sEAS.SpawnCreature(pPlayer, 7899, pPlayer->GetPositionX()+RandomFloat(5.0f), pPlayer->GetPositionY()+RandomFloat(5.0f), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 0); if ( pirate != NULL ) pirate->Despawn(6*60*1000, 0); pirate = sEAS.SpawnCreature(pPlayer, 7899, pPlayer->GetPositionX()-RandomFloat(5.0f), pPlayer->GetPositionY()+RandomFloat(5.0f), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 0); if ( pirate != NULL ) pirate->Despawn(6*60*1000, 0); pirate = sEAS.SpawnCreature(pPlayer, 7901, pPlayer->GetPositionX()+RandomFloat(5.0f), pPlayer->GetPositionY()-RandomFloat(5.0f), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 0); if ( pirate != NULL ) pirate->Despawn(6*60*1000, 0); pirate = sEAS.SpawnCreature(pPlayer, 7901, pPlayer->GetPositionX()+RandomFloat(5.0f), pPlayer->GetPositionY()+RandomFloat(5.0f), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 0); if ( pirate != NULL ) pirate->Despawn(6*60*1000, 0); pirate = sEAS.SpawnCreature(pPlayer, 7902, pPlayer->GetPositionX()-RandomFloat(5.0f), pPlayer->GetPositionY()-RandomFloat(5.0f), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 0); if ( pirate != NULL ) pirate->Despawn(6*60*1000, 0); GameObjectPointer gobj = sEAS.SpawnGameobject(pPlayer, 142194, pPlayer->GetPositionX()+5, pPlayer->GetPositionY(), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 1, 0, 0, 0, 0); sEAS.GameobjectDelete(gobj, 10*60*1000); }
void GossipHello(ObjectPointer pObject, PlayerPointer plr, bool AutoSend) { GossipMenu *Menu; uint32 entry = pObject->GetEntry(); const char* text = ""; uint32 TextId = 0; if(entry == 17900) { text = "Grant me your mark, wise ancient."; TextId = 9176; } else if(entry == 17901) { text = "Grant me your mark, mighty ancient."; TextId = 9177; } objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), TextId, plr); if(plr->HasFinishedQuest(9785) || plr->GetQuestLogForEntry(9785)) Menu->AddItem(0, text, 1); if(AutoSend) Menu->SendTo(plr); }
void GossipSelectOption(ObjectPointer pObject, PlayerPointer plr, uint32 Id, uint32 IntId, const char * EnteredCode) { if(!plr) return; CreaturePointer highchief = TO_CREATURE(pObject); if (highchief == NULL) return; switch (IntId) { case 0: GossipHello(pObject, plr, true); 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; } } }
bool Carcass(uint32 i, SpellPointer pSpell) // Becoming a Shadoweave Tailor { if(!pSpell->u_caster->IsPlayer()) return true; PlayerPointer pPlayer = TO_PLAYER(pSpell->u_caster); QuestLogEntry *pQuest = pPlayer->GetQuestLogForEntry( 10804 ); CreaturePointer NetherDrake = pPlayer->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 21648); GameObjectPointer FlayerCarcass = pPlayer->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 185155); if ( FlayerCarcass == NULLGOB ) { FlayerCarcass = sEAS.SpawnGameobject(pPlayer, 185155, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 0, 1, 0, 0, 0, 0); FlayerCarcass->Despawn(60000); } if ( NetherDrake == NULL ) return true; if ( NetherDrake->HasActiveAura(38502) ) return true; if( pQuest!=NULL && pQuest->GetMobCount( 0 ) < pQuest->GetQuest()->required_mobcount[0] ) { NetherDrake->CastSpell(NetherDrake, dbcSpell.LookupEntry( 38502 ), true); NetherDrake->GetAIInterface()->m_moveFly = true; NetherDrake->GetAIInterface()->MoveTo(pPlayer->GetPositionX(), pPlayer->GetPositionY()+2, pPlayer->GetPositionZ(), 0); pQuest->SetMobCount( 0, pQuest->GetMobCount( 0 )+1); pQuest->SendUpdateAddKill( 0 ); pQuest->UpdatePlayerFields(); } return true; }
void GossipHello(ObjectPointer pObject, PlayerPointer plr, bool AutoSend) { GossipMenu *Menu; objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 11224, plr); if(plr->GetQuestLogForEntry(11142) != NULL){ Menu->AddItem( 0, GOSSIP_CASSA_CRIMSONWING, 1); }; if(AutoSend) Menu->SendTo(plr); }
void OnActivate(PlayerPointer pPlayer) { QuestLogEntry *pQuest = pPlayer->GetQuestLogForEntry(181433); if(pQuest && pQuest->GetMobCount(0) < pQuest->GetQuest()->required_mobcount[0]) { pQuest->SetMobCount(0, 1); pQuest->SendUpdateAddKill(0); pQuest->UpdatePlayerFields(); } }
void GossipHello(ObjectPointer pObject, PlayerPointer plr, bool AutoSend) { GossipMenu *Menu; if(plr->GetQuestLogForEntry(558)) { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 7012, plr); Menu->AddItem(0, "I know this is rather silly but i have a young ward who is a bit shy and would like your autograph.", 1); Menu->SendTo(plr); } }
void GossipHello(ObjectPointer pObject, PlayerPointer plr, bool AutoSend) { GossipMenu *Menu; if(plr->GetQuestLogForEntry(925)) { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 7013, plr); Menu->AddItem(0, "Give me hoofprint.", 1); Menu->SendTo(plr); } }
void GossipHello(ObjectPointer pObject, PlayerPointer plr, bool AutoSend) { if (plr->GetQuestLogForEntry(10814)) { GossipMenu *Menu; objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 10613, plr); Menu->AddItem( 0, "I am listening, dragon", 1); Menu->SendTo(plr); } }
void GossipHello(ObjectPointer pObject, PlayerPointer plr, bool AutoSend) { GossipMenu *Menu; if(plr->GetQuestLogForEntry(10279) || plr->HasFinishedQuest(10279)) { objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 9978, plr); Menu->AddItem( 0, "Please take me to the master's lair", 1); Menu->SendTo(plr); } }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(10111); if(qle == NULL) return; if(!pPlayer->HasAura(33382)) pPlayer->CastSpell(pPlayer, 33382, true); }
void OnActivate(PlayerPointer pPlayer) { QuestLogEntry *pQuest = pPlayer->GetQuestLogForEntry(10872); if(pQuest == NULL) return; pQuest->SetMobCount(0, pQuest->GetMobCount(0)+1); pQuest->SendUpdateAddKill(0); pQuest->UpdatePlayerFields(); }
void GossipHello(ObjectPointer pObject, PlayerPointer plr, bool AutoSend) { GossipMenu *Menu; objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 11469, plr); if(plr->GetQuestLogForEntry(11223)) Menu->AddItem( 0, GOSSIP_ARCHMAGE_MALIN, 1); if(AutoSend) Menu->SendTo(plr); }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(4296); if(qle == NULL) return; if(pPlayer->GetItemInterface()->GetItemCount(11470, 0) < 1) sEAS.AddItem(11470, pPlayer); }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(5381); if(qle == NULL) return; CreaturePointer demon = sEAS.SpawnCreature(pPlayer, 11876, -348.231, 1763.85, 138.371, 4.42728, 0); if ( demon != NULL ) demon->Despawn(6*60*1000, 0); }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(9689); if(qle == NULL) return; CreaturePointer razormaw = sEAS.SpawnCreature(pPlayer, 17592, -1203.8, -12424.7, 95.36, 4.7, 0); if ( razormaw != NULL ) razormaw->Despawn(6*60*1000, 0); }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(6027); if(qle == NULL) return; CreaturePointer naga = sEAS.SpawnCreature(pPlayer, 12369, 246.741, 2953.3, 5.8631, 1.078, 0); if ( naga != NULL ) naga->Despawn(6*60*1000, 0); }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(8481); if(qle == NULL) return; CreaturePointer xandivious = sEAS.SpawnCreature(pPlayer, 15623, pPlayer->GetPositionX()+5, pPlayer->GetPositionY(), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 0); if ( xandivious != NULL ) xandivious->Despawn(6*60*1000, 0); }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(10915); if(qle == NULL) return; CreaturePointer exarch = sEAS.SpawnCreature(pPlayer, 22452, -3365.9, 5143.19, -9.00132, 3.05, 0); if ( exarch != NULL ) exarch->Despawn(6*60*1000, 0); }
void GossipSelectOption(ObjectPointer pObject, PlayerPointer plr, uint32 Id, uint32 IntId, const char * Code) { if(IntId == 1) { QuestLogEntry *en = plr->GetQuestLogForEntry(9785); CreaturePointer casta = (TO_CREATURE(pObject)); switch (pObject->GetEntry()) { case 17900: { if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0]) { en->SetMobCount(0, 1); en->SendUpdateAddKill(0); en->UpdatePlayerFields(); } if(plr->GetStandingRank(942) == 4) casta->CastSpell(plr, 31808, true); else if(plr->GetStandingRank(942) == 5) casta->CastSpell(plr, 31810, true); else if(plr->GetStandingRank(942) == 6) casta->CastSpell(plr, 31811, true); else if(plr->GetStandingRank(942) == 7) casta->CastSpell(plr, 31815, true); }break; case 17901: { if(en && en->GetMobCount(1) < en->GetQuest()->required_mobcount[1]) { en->SetMobCount(1, 1); en->SendUpdateAddKill(1); en->UpdatePlayerFields(); } CreaturePointer casta = (TO_CREATURE(pObject)); if(plr->GetStandingRank(942) == 4) casta->CastSpell(plr, 31807, true); else if(plr->GetStandingRank(942) == 5) casta->CastSpell(plr, 31814, true); else if(plr->GetStandingRank(942) == 6) casta->CastSpell(plr, 31813, true); else if(plr->GetStandingRank(942) == 7) casta->CastSpell(plr, 31812, true); }break; } } }
void OnDied(UnitPointer mKiller) { fulborgskilled++; if(mKiller->IsPlayer()) { PlayerPointer mPlayer = TO_PLAYER(mKiller); if(fulborgskilled > 8&& mPlayer->GetQuestLogForEntry( 9667 )) { _unit->GetMapMgr()->GetInterface()->SpawnCreature(17702, -2419, -12166, 33, 3.45f, true, false, 0, 0)->Despawn(18000000, 0); fulborgskilled = 0; _unit->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "Chief, we need your help!"); } } }
void OnLootTaken(PlayerPointer pLooter, ItemPrototype *pItemInfo) { QuestLogEntry * en = pLooter->GetQuestLogForEntry(422); if(!en) return; float SSX = pLooter->GetPositionX(); float SSY = pLooter->GetPositionY(); float SSZ = pLooter->GetPositionZ(); float SSO = pLooter->GetOrientation(); CreaturePointer NewCreature = pLooter->GetMapMgr()->GetInterface()->SpawnCreature(1770, SSX, SSY, SSZ, SSO, true, false, 0, 0); if ( NewCreature != NULL ) NewCreature->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "The Sons of Arugal will rise against all who challenge the power of the Moonrage!"); }
void GossipSelectOption(ObjectPointer pObject, PlayerPointer plr, uint32 Id, uint32 IntId, const char * Code) { CreaturePointer pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?(TO_CREATURE(pObject)):NULLCREATURE; if(pCreature==NULLCREATURE) return; switch(IntId) { case 1: { plr->GetQuestLogForEntry(11142)->SendQuestComplete(); TaxiPath * path = sTaxiMgr.GetTaxiPath( 724 ); // Flight Path plr->TaxiStart( path, 1147, 0 ); // Gryph }break; } }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(10447); if(qle == NULL) return; if(qle->GetMobCount(1) < qle->GetQuest()->required_mobcount[1]) { qle->SetMobCount(1, qle->GetMobCount(1)+1); qle->SendUpdateAddKill(1); qle->UpdatePlayerFields(); } }
void OnActivate(PlayerPointer pPlayer) { if(!pPlayer) return; QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(3821); if(qle == NULL) return; CreaturePointer shaghost = pPlayer->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 9136); if(shaghost) return; CreaturePointer shaghostspawn = sEAS.SpawnCreature(pPlayer, 9136, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 0); if ( shaghostspawn != NULL ) shaghostspawn->Despawn(2*60*1000, 0); }
bool CrystalOfDeepShadows(uint32 i, SpellPointer pSpell) // Becoming a Shadoweave Tailor { if(!pSpell->u_caster->IsPlayer()) return true; PlayerPointer plr = TO_PLAYER(pSpell->u_caster); QuestLogEntry *qle = plr->GetQuestLogForEntry(10833); if(qle == NULL) return true; qle->SetMobCount(0, 1); qle->SendUpdateAddKill(0); qle->UpdatePlayerFields(); return true; }
void GossipHello(ObjectPointer pObject, PlayerPointer plr, bool AutoSend) { if(!plr) return; GossipMenu *Menu; CreaturePointer doctor = TO_CREATURE(pObject); if (doctor == NULL) return; objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, plr); if(plr->GetQuestLogForEntry(348) && plr->GetItemInterface()->GetItemCount(2799, 0) && !plr->GetItemInterface()->GetItemCount(2797, 0)) Menu->AddItem( 0, "I'm ready, Summon Him!", 1); if(AutoSend) Menu->SendTo(plr); }
void GossipHello( ObjectPointer pObject, PlayerPointer pPlayer, bool AutoSend ) { if ( pObject == NULL || pObject->GetTypeId() != TYPEID_ITEM || pPlayer == NULL ) return; QuestLogEntry* QuestEntry = pPlayer->GetQuestLogForEntry( 9452 ); if ( QuestEntry == NULL ) return; #ifndef BLIZZLIKE //if ( QuestEntry->GetMobCount( 0 ) >= QuestEntry->GetQuest()->required_mobcount[ 0 ] ) // return; #endif if ( pPlayer->GetMapMgr() == NULLMAPMGR ) return; // Meh, double object looking - we should find a way to remove this GameObjectPointer School = pPlayer->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords( pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 181616 ); if ( School == NULLGOB || pPlayer->CalcDistance( School ) > 5.0f ) return; #ifdef BLIZZLIKE sEventMgr.AddEvent( School, &GameObject::Despawn, static_cast< uint32 >( 20000 ), EVENT_GAMEOBJECT_ITEM_SPAWN, 1000, 1, 0 ); #else School->Despawn( 20000 ); #endif pPlayer->CastSpell( pPlayer, dbcSpell.LookupEntry( TO_ITEM( pObject )->GetProto()->Spells[ 0 ].Id ), false ); uint32 Chance = RandomUInt( 10 ); if ( Chance <= 3 ) { CreaturePointer NewCreature = sEAS.SpawnCreature( pPlayer, 17102, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 180000 ); if ( NewCreature != NULLCREATURE ) { NewCreature->GetAIInterface()->StopMovement( 500 ); NewCreature->setAttackTimer( 1000, false ); NewCreature->m_noRespawn = true; }; return; }; sEAS.AddItem( 23614, pPlayer ); QuestEntry->SendUpdateAddKill( 1 ); QuestEntry->UpdatePlayerFields(); pPlayer->Gossip_Complete(); };
void OnActivate(PlayerPointer pPlayer) { CreaturePointer commander = pPlayer->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 20482); if(commander) return; if(pPlayer->GetQuestLogForEntry(10339)) { float SSX = 4017.96f; float SSY = 2315.91f; float SSZ = 116.418f; float SSO = pPlayer->GetOrientation(); CreaturePointer NewCreature = pPlayer->GetMapMgr()->GetInterface()->SpawnCreature(20482, SSX, SSY, SSZ, SSO, true, false, 0, 0); if ( NewCreature != NULL ) NewCreature->Despawn(1*60*1000, 0); } }