本文整理汇总了C++中PlayerPointer::GetStandingRank方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerPointer::GetStandingRank方法的具体用法?C++ PlayerPointer::GetStandingRank怎么用?C++ PlayerPointer::GetStandingRank使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerPointer
的用法示例。
在下文中一共展示了PlayerPointer::GetStandingRank方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetBuyPriceForItem
uint32 GetBuyPriceForItem( ItemPrototype* proto, uint32 count, PlayerPointer plr, CreaturePointer vendor )
{
int32 cost = proto->BuyPrice;
if( plr != NULL && vendor != NULL )
{
Standing plrstanding = plr->GetStandingRank( vendor->m_faction->Faction );
cost = float2int32( ceilf( float( proto->BuyPrice ) * pricemod[plrstanding] ) );
}
return cost * count;
}
示例2: 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;
}
}
}
示例3: GuardsOnWave
void GuardsOnWave(PlayerPointer pPlayer, UnitPointer pUnit)
{
if ( pPlayer == NULLPLR || pUnit == NULLUNIT )
return;
// Check if we are friendly with our Guards (they will wave only when You are)
if (((pUnit->GetEntry() == 68 || pUnit->GetEntry() == 1976) && pPlayer->GetStandingRank(72) >= FRIENDLY) || (pUnit->GetEntry() == 3296 && pPlayer->GetStandingRank(76) >= FRIENDLY))
{
uint32 EmoteChance = RandomUInt(100);
if(EmoteChance < 33) // 1/3 chance to get Bow from Guard
pUnit->Emote(EMOTE_ONESHOT_WAVE);
}
}