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