本文整理汇总了C++中QuestLogEntry::SendUpdateAddKill方法的典型用法代码示例。如果您正苦于以下问题:C++ QuestLogEntry::SendUpdateAddKill方法的具体用法?C++ QuestLogEntry::SendUpdateAddKill怎么用?C++ QuestLogEntry::SendUpdateAddKill使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QuestLogEntry
的用法示例。
在下文中一共展示了QuestLogEntry::SendUpdateAddKill方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
}
示例2: 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();
}
}
示例3: 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();
}
}
示例4: OnDied
void OnDied(Unit *mKiller)
{
if(mKiller->GetTypeId() != TYPEID_PLAYER)
return;
QuestLogEntry *qle = NULL;
qle = static_cast<Player*>(mKiller)->GetQuestLogForEntry(10255);
if(qle)
{
qle->SetMobCount(0,1);
qle->SendUpdateAddKill(0);
qle->UpdatePlayerFields();
}
}
示例5: 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();
}
}
示例6: Scratches
void Scratches(Player* pPlayer, uint32 AreaTrigger)
{
QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(10556);
if(qle == NULL)
return;
Creature* Kaliri = pPlayer->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 21468);
if(Kaliri == NULL)
return;
Kaliri->Despawn(0, 0);
qle->SetMobCount(0, qle->GetMobCount(0)+1);
qle->SendUpdateAddKill(0);
qle->UpdatePlayerFields();
}
示例7: OnDied
void OnDied(Unit * mKiller)
{
if (mKiller->IsPlayer())
{
QuestLogEntry *en = ((Player*)mKiller)->GetQuestLogForEntry(10836);
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();
return;
}
}
}
示例8: GossipSelectOption
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;
}
}
示例9: FindingTheKeymaster
bool FindingTheKeymaster(uint32 i, Spell * pSpell)
{
if(!pSpell->u_caster->IsPlayer())
return true;
Player *plr = (Player*)pSpell->u_caster;
QuestLogEntry *qle = plr->GetQuestLogForEntry(10256);
if(!qle)
return true;
qle->SetMobCount(0, qle->GetMobCount(0)+1);
qle->SendUpdateAddKill(0);
qle->UpdatePlayerFields();
return true;
}
示例10: OnActivate
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();
}
}
示例11: OnActivate
void OnActivate( Player *p ){
QuestLogEntry *qle = p->GetQuestLogForEntry(5097);
if(qle == NULL){
qle = p->GetQuestLogForEntry(5098);
if(qle == NULL)
return;
}
if(qle->GetMobCount(2) < qle->GetQuest()->required_mobcount[2]){
qle->SetMobCount(2, qle->GetMobCount(2)+1);
qle->SendUpdateAddKill(2);
qle->UpdatePlayerFields();
}
}
示例12: CrystalOfDeepShadows
bool CrystalOfDeepShadows(uint32 i, Spell* pSpell) // Becoming a Shadoweave Tailor
{
if(!pSpell->u_caster->IsPlayer())
return true;
Player *plr = (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;
}
示例13: GossipHello
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();
};
示例14: UnlockKarynakuChains
bool UnlockKarynakuChains(uint32 i, SpellPointer pSpell) // Becoming a Shadoweave Tailor
{
if(pSpell->u_caster->IsPlayer() == false)
return true;
PlayerPointer pPlayer= TO_PLAYER(pSpell->u_caster);
QuestLogEntry *pQuest = pPlayer->GetQuestLogForEntry(10872);
if(pQuest == NULL)
return true;
if ( pQuest && pQuest->GetMobCount(0) < pQuest->GetQuest()->required_mobcount[0] )
{
pQuest->SetMobCount(0, pQuest->GetMobCount(0)+1);
pQuest->SendUpdateAddKill(0);
pQuest->UpdatePlayerFields();
}
return true;
}
示例15: OnDied
void OnDied(Unit * mKiller)
{
if (mKiller->IsPlayer())
{
QuestLogEntry *qle = TO_PLAYER(mKiller)->GetQuestLogForEntry(11230);
if( qle != NULL )
{
if( qle->GetMobCount( 0 ) < qle->GetQuest()->required_mobcount[ 0 ] )
{
uint32 newcount = qle->GetMobCount( 0 ) + 1;
qle->SetMobCount( 0, newcount );
qle->SendUpdateAddKill( 0 );
qle->UpdatePlayerFields();
return;
}
}
}
}