当前位置: 首页>>代码示例>>C++>>正文


C++ QuestLogEntry::GetMobCount方法代码示例

本文整理汇总了C++中QuestLogEntry::GetMobCount方法的典型用法代码示例。如果您正苦于以下问题:C++ QuestLogEntry::GetMobCount方法的具体用法?C++ QuestLogEntry::GetMobCount怎么用?C++ QuestLogEntry::GetMobCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QuestLogEntry的用法示例。


在下文中一共展示了QuestLogEntry::GetMobCount方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: TheSeersRelic

bool TheSeersRelic(uint32 i, Spell* pSpell)
{
  Player *pPlayer = (Player*)pSpell->u_caster;
  if(!pPlayer)
	  return true;

  if(!pSpell->u_caster->IsPlayer())
    return true;

  QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(9545);
  if(qle == NULL)
    return true;

	if(qle->GetMobCount(0) < qle->GetQuest()->required_mobcount[0])
	{
		qle->SetMobCount(0, qle->GetMobCount(0)+1);
		qle->SendUpdateAddKill(0);
		qle->UpdatePlayerFields();
	}

  return true;
}
开发者ID:miklasiak,项目名称:projekt,代码行数:22,代码来源:QIspells.cpp

示例2: OnActivate

	void OnActivate(PlayerPointer pPlayer)
	{
		if(!pPlayer)
			return;

		QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(9544);
		if(qle == NULL)
			return;

		if(qle->GetMobCount(0) < qle->GetQuest()->required_mobcount[0])
		{
			qle->SetMobCount(0, qle->GetMobCount(0)+1);
			qle->SendUpdateAddKill(0);
			qle->UpdatePlayerFields();
		}

		CreaturePointer prisoner = pPlayer->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 17375);
		if(!prisoner)
			return;

		prisoner->Despawn(1, 6*60*1000);
	}
开发者ID:Vanj-crew,项目名称:HearthStone-Emu,代码行数:22,代码来源:GameObjects.cpp

示例3: GossipHello

		void GossipHello(Object* pObject, Player * Plr, bool AutoSend)
		{
			GossipMenu * Menu;
			QuestLogEntry * en = Plr->GetQuestLogForEntry( 8304 );

			objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 7736, Plr);

			if ( en && en->GetMobCount(1) < en->GetQuest()->required_mobcount[1] )
				Menu->AddItem(0, "Hello, Rutgar. The Commander has sent me here to gather some information about his missing wife.", 3);

			if(AutoSend)
				Menu->SendTo(Plr);
		}
开发者ID:vata,项目名称:wowice,代码行数:13,代码来源:Quest_Silithus.cpp

示例4: RuthlessCunning

//Ruthless Cunning
bool RuthlessCunning(uint32 i, Spell * pSpell)
{
	if(!pSpell->u_caster->IsPlayer())
		return true;
	
	Player *plr = (Player*)pSpell->u_caster;
	Creature * kilsorrow = plr->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(plr->GetPositionX(), plr->GetPositionY() , plr->GetPositionZ());

	if(!kilsorrow || kilsorrow->isAlive())
		return true;

	QuestLogEntry *qle = plr->GetQuestLogForEntry(9927);

	if(qle && qle->GetMobCount(0) < qle->GetQuest()->required_mobcount[0])
	{
		kilsorrow->Despawn(0, 60000);
		qle->SetMobCount(0, qle->GetMobCount(0)+1);
		qle->SendUpdateAddKill(0);
		qle->UpdatePlayerFields();
	}
	return true;
}
开发者ID:miklasiak,项目名称:projekt,代码行数:23,代码来源:Nagrand.cpp

示例5: ConvertingSentry

bool ConvertingSentry(uint32 i, Spell* pSpell)
{
  Player* caster = pSpell->p_caster;
  if(caster == NULL)
    return true;

  Creature* target = TO_CREATURE(pSpell->GetUnitTarget());
  if(target == NULL)
    return true;

  // Erratic Sentry: 24972
  if(target->GetEntry() != 24972)
    return true;

  if(target->isAlive())
    return true;

  QuestLogEntry *qle = NULL;
  qle = caster->GetQuestLogForEntry(11525);
  if(qle == NULL)
  {
	qle = caster->GetQuestLogForEntry(11524);
	if(qle == NULL)
	{
       return true;
    }
  }

  if(qle->GetMobCount(0) == qle->GetQuest()->required_mobcount[0])
    return true;

  qle->SetMobCount(0, qle->GetMobCount(0)+1);
  qle->SendUpdateAddKill(0);
  qle->UpdatePlayerFields();

  target->Despawn(500, 2*60*1000);

  return true;
}
开发者ID:Bootz,项目名称:arcticdev,代码行数:39,代码来源:Isle_of_QuelDanas.cpp

示例6: InnkeeperTrain

void InnkeeperTrain(Player* pPlayer, Unit* pUnit)
{
    if(pUnit->GetEntry() == 6826)
    {
        QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(8355);
        if(qle == NULL)
            return;

        qle->SetMobCount(0, qle->GetMobCount(0)+1);
        qle->SendUpdateAddKill(0);
        qle->UpdatePlayerFields();
    }
    else if(pUnit->GetEntry() == 11814)
    {
        QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(8358);
        if(qle == NULL)
            return;

        qle->SetMobCount(0, qle->GetMobCount(0)+1);
        qle->SendUpdateAddKill(0);
        qle->UpdatePlayerFields();
    }
}
开发者ID:vata,项目名称:wowice,代码行数:23,代码来源:QuestHooks.cpp

示例7: DouseEternalFlame

bool DouseEternalFlame(uint32 i, Spell* pSpell)
{
    if (pSpell->u_caster == NULL || !pSpell->u_caster->IsPlayer())
        return true;

    Player* plr = TO_PLAYER(pSpell->u_caster);
    QuestLogEntry *qle = plr->GetQuestLogForEntry(9737);
    if(qle == NULL)
        return true;

    GameObject* Flame = plr->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(3678, -3640, 139, 182068);
    if(Flame != NULL)
    {
        if(plr->CalcDistance(plr, Flame) < 30)
            if(qle->GetMobCount(0) < qle->GetQuest()->required_mobcount[0])
            {
                qle->SetMobCount(0, qle->GetMobCount(0)+1);
                qle->SendUpdateAddKill(0);
                qle->UpdatePlayerFields();
            }
    }
    return true;
}
开发者ID:Bootz,项目名称:arcticdev,代码行数:23,代码来源:Paladin.cpp

示例8: InnkeeperFlex

void InnkeeperFlex(Player* pPlayer, Unit* pUnit)
{
    if(pUnit->getEntry() == 6740)
    {
        QuestLogEntry* qle = pPlayer->GetQuestLogForEntry(8356);
        if(qle == NULL)
            return;

        qle->SetMobCount(0, qle->GetMobCount(0) + 1);
        qle->SendUpdateAddKill(0);
        qle->UpdatePlayerFields();
    }
    else if(pUnit->getEntry() == 6929)
    {
        QuestLogEntry* qle = pPlayer->GetQuestLogForEntry(8359);
        if(qle == NULL)
            return;

        qle->SetMobCount(0, qle->GetMobCount(0) + 1);
        qle->SendUpdateAddKill(0);
        qle->UpdatePlayerFields();
    }
}
开发者ID:armm77,项目名称:AscEmu,代码行数:23,代码来源:QuestHooks.cpp

示例9: InnkeeperChicken

void InnkeeperChicken(Player* pPlayer, Unit* pUnit)
{
    if(pUnit->GetEntry() == 5111)
    {
        QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(8353);
        if(qle == NULL)
            return;

        qle->SetMobCount(0, qle->GetMobCount(0)+1);
        qle->SendUpdateAddKill(0);
        qle->UpdatePlayerFields();
    }
    else if(pUnit->GetEntry() == 6741)
    {
        QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(8354);
        if(qle == NULL)
            return;

        qle->SetMobCount(0, qle->GetMobCount(0)+1);
        qle->SendUpdateAddKill(0);
        qle->UpdatePlayerFields();
    }
}
开发者ID:vata,项目名称:wowice,代码行数:23,代码来源:QuestHooks.cpp

示例10: PoweringOurDefenses

bool PoweringOurDefenses(uint32 i, Spell* pSpell)
{
	if(pSpell->u_caster->IsPlayer() == false)
    return true;

	Player * plr = (Player*)pSpell->u_caster;
	if( plr == NULL )
		return true;

	QuestLogEntry *qle = plr->GetQuestLogForEntry( 8490 );
	if( qle == NULL )
		return true;

	// Angelis : Need to script the scourge attack

	if( qle && qle->GetMobCount(0) < qle->GetQuest()->required_mobcount[0] )
	{
		qle->SetMobCount(0, qle->GetMobCount(0)+1);
		qle->SendUpdateAddKill(0);
		qle->UpdatePlayerFields();
	}
	return true;
}
开发者ID:AtVirus,项目名称:Descent-Scripts,代码行数:23,代码来源:EversongWoods.cpp

示例11: InnkeeperDance

void InnkeeperDance(Player* pPlayer, Unit* pUnit)
{
    if(pUnit->GetEntry() == 6735)
    {
        QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(8357);
        if(qle == NULL)
            return;

        qle->SetMobCount(0, qle->GetMobCount(0)+1);
        qle->SendUpdateAddKill(0);
        qle->UpdatePlayerFields();
    }
    else if(pUnit->GetEntry() == 6746)
    {
        QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(8360);
        if(qle == NULL)
            return;

        qle->SetMobCount(0, qle->GetMobCount(0)+1);
        qle->SendUpdateAddKill(0);
        qle->UpdatePlayerFields();
    }
}
开发者ID:vata,项目名称:wowice,代码行数:23,代码来源:QuestHooks.cpp

示例12: ForceofNeltharakuSpell

bool ForceofNeltharakuSpell(uint32 i, SpellPointer pSpell) // Becoming a Shadoweave Tailor
{
	if(pSpell->u_caster->IsPlayer() == false)
		return true;

	PlayerPointer	pPlayer= TO_PLAYER(pSpell->u_caster);
	UnitPointer		pUnit	= TO_UNIT(pPlayer->GetMapMgr()->GetCreature(GET_LOWGUID_PART(pPlayer->GetSelection())));

	if(pUnit == NULLUNIT)
		return true;

	if(!pUnit->IsCreature())
		return true;

	CreaturePointer		 pTarget	= TO_CREATURE(pUnit);
	QuestLogEntry	 *pQuest	= pPlayer->GetQuestLogForEntry(10854);
	if(pQuest == NULL)
		return true;

	if(pTarget->GetEntry() == 21722 && pPlayer->CalcDistance(pUnit)<30)
	{
		if ( pQuest && pQuest->GetMobCount(0) < pQuest->GetQuest()->required_mobcount[0] )
		{
			pTarget->CastSpell(pPlayer, dbcSpell.LookupEntry(38775), true);
			pQuest->SetMobCount(0, pQuest->GetMobCount(0)+1);
			pQuest->SendUpdateAddKill(0);
			pQuest->UpdatePlayerFields();
			if ( pTarget->GetScript() != NULL )
			{
				MoonScriptCreatureAI *pDrakeAI = static_cast<MoonScriptCreatureAI*>(pTarget->GetScript());
				pDrakeAI->SetCanMove(true);
				pDrakeAI->SetWaypointToMove(0);
			}
		}
	}
	return true;
}
开发者ID:Vanj-crew,项目名称:HearthStone-Emu,代码行数:37,代码来源:Shadowmoon.cpp

示例13: GossipSelectOption

    void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode)
    {
        if(!plr)
            return;

        Creature* Prisoner22 = TO_CREATURE(pObject);
        if (Prisoner22 == NULL)
            return;

        switch (IntId)
        {
        case 0:
            GossipHello(pObject, plr, true);
            break;

        case 1:
        {
            QuestLogEntry *en = plr->GetQuestLogForEntry(9164);
            if(en && en->GetMobCount(1) < en->GetQuest()->required_mobcount[1])
            {
                en->SetMobCount(1, en->GetMobCount(1) + 1);
                en->SendUpdateAddKill(1);
                en->UpdatePlayerFields();

                if(!Prisoner22)
                    return;

                Prisoner22->Despawn(5000, 6*60*1000);
                Prisoner22->SetStandState(STANDSTATE_STAND);
                Prisoner22->SetUInt32Value(UNIT_NPC_EMOTESTATE, 7);
                return;
            }
            break;
        }
        }
    }
开发者ID:Bootz,项目名称:arcticdev,代码行数:36,代码来源:Ghostlands.cpp

示例14: OrbOfMurlocControl

bool OrbOfMurlocControl(uint32 i, Spell* pSpell)
{
  if(pSpell->u_caster->IsPlayer() == false)
    return true;

  Player *plr = (Player*)pSpell->u_caster;
  Unit *unit_target = (Unit*)plr->GetMapMgr()->GetCreature(GET_LOWGUID_PART(plr->GetSelection()));
  
  if(unit_target == NULL)
    return true;

  if(!unit_target->IsCreature())
    return true;

  Creature *target = (Creature*)unit_target;

  QuestLogEntry *qle = plr->GetQuestLogForEntry(11541);
  if(qle == NULL)
    return true;
  
  if(target->GetEntry() == 25084)
  {
      if(qle->GetMobCount(0) < qle->GetQuest()->required_mobcount[0])
      {
		uint32 newcount = qle->GetMobCount(0) + 1;
		qle->SetMobCount(0, newcount);
		qle->SendUpdateAddKill(0);		
		Creature *FreedGreengill = sEAS.SpawnCreature(plr, 25085, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0);
		FreedGreengill->Despawn(6*60*1000, 0);
		target->Despawn(0, 6*60*1000);
		qle->UpdatePlayerFields();
        return true;
      }  
  }
  return true;
}
开发者ID:Chero,项目名称:abcwow,代码行数:36,代码来源:Isle_of_QuelDanas.cpp

示例15: OnDied

	void OnDied(Unit * mKiller)
	{
		if ( mKiller == NULL || !mKiller->IsPlayer() )
			return;

		Player *pPlayer = static_cast< Player* >( mKiller );
		QuestLogEntry *pQuest = pPlayer->GetQuestLogForEntry( 10502 );
		if ( pQuest == NULL )
		{
			pQuest = pPlayer->GetQuestLogForEntry( 10505 );
			if ( pQuest == NULL )
			{
				return;
			}
		}

		if ( pQuest->GetMobCount( 0 ) < pQuest->GetQuest()->required_mobcount[0] )
		{
			uint32 NewCount = pQuest->GetMobCount( 0 ) + 1;
			pQuest->SetMobCount( 0, NewCount );
			pQuest->SendUpdateAddKill( 0 );
			pQuest->UpdatePlayerFields();
		}
	}
开发者ID:AtVirus,项目名称:Descent-Scripts,代码行数:24,代码来源:BladeEdge_Mountains.cpp


注:本文中的QuestLogEntry::GetMobCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。