本文整理汇总了C++中PlayerPointer::GetQuestLogForEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerPointer::GetQuestLogForEntry方法的具体用法?C++ PlayerPointer::GetQuestLogForEntry怎么用?C++ PlayerPointer::GetQuestLogForEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerPointer
的用法示例。
在下文中一共展示了PlayerPointer::GetQuestLogForEntry方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ToLegionHold
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;
}
示例2: OnActivate
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);
}
示例3: GossipHello
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);
}
示例4: GossipSelectOption
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;
}
}
}
示例5: Carcass
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;
}
示例6: GossipHello
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);
}
示例7: GossipHello
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);
}
}
示例8: GossipHello
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);
}
}
示例9: GossipHello
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);
}
}
示例10: OnActivate
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();
}
示例11: GossipHello
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);
}
示例12: GossipSelectOption
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;
}
}
}
示例13: OnDied
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!");
}
}
}
示例14: OnLootTaken
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!");
}
示例15: GossipSelectOption
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;
}
}