本文整理汇总了C++中CreaturePointer::SetUInt32Value方法的典型用法代码示例。如果您正苦于以下问题:C++ CreaturePointer::SetUInt32Value方法的具体用法?C++ CreaturePointer::SetUInt32Value怎么用?C++ CreaturePointer::SetUInt32Value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CreaturePointer
的用法示例。
在下文中一共展示了CreaturePointer::SetUInt32Value方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnQuestStart
void OnQuestStart(PlayerPointer pPlayer, QuestLogEntry *pQuest)
{
if ( pPlayer == NULL || pPlayer->GetMapMgr() == NULL || pPlayer->GetMapMgr()->GetInterface() == NULL )
return;
CreaturePointer pAkida = sEAS.SpawnCreature( pPlayer, 17379, -4183.043457f, -12511.419922f, 44.361786f, 6.05629f, 0 );
if ( pAkida == NULL )
return;
pAkida->m_escorter = pPlayer;
pAkida->GetAIInterface()->setMoveType( RUN );
pAkida->GetAIInterface()->StopMovement( 1000 );
pAkida->GetAIInterface()->SetAllowedToEnterCombat( false );
pAkida->SendChatMessage( CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Follow me I shall result you on a place!" );
pAkida->SetUInt32Value( UNIT_NPC_FLAGS, 0 );
pAkida->CastSpell( pAkida, 25035, true ); // Apparition Effect
sEAS.CreateCustomWaypointMap( pAkida );
sEAS.WaypointCreate( pAkida, -4174.025879f, -12512.800781f, 44.361458f, 2.827430f, 0, 256, 16995 );
sEAS.WaypointCreate( pAkida, -4078.135986f, -12535.500977f, 43.066765f, 5.949394f, 0, 256, 16995 );
sEAS.WaypointCreate( pAkida, -4040.495361f, -12565.537109f, 43.698250f, 5.592041f, 0, 256, 16995 );
sEAS.WaypointCreate( pAkida, -4009.526367f, -12598.929688f, 53.168480f, 5.434962f, 0, 256, 16995 );
sEAS.WaypointCreate( pAkida, -3981.581543f, -12635.541602f, 63.896046f, 5.332861f, 0, 256, 16995 );
sEAS.WaypointCreate( pAkida, -3953.170410f, -12680.391602f, 75.433006f, 5.218981f, 0, 256, 16995 );
sEAS.WaypointCreate( pAkida, -3924.324951f, -12741.846680f, 95.187035f, 5.124734f, 0, 256, 16995 );
sEAS.WaypointCreate( pAkida, -3920.791260f, -12746.218750f, 96.887978f, 3.271200f, 0, 256, 16995 );
sEAS.EnableWaypoints( pAkida );
mAkidas.push_back( std::make_pair( pPlayer->GetGUID(), pAkida ) );
}
示例2: HandleNPCFlagCommand
bool ChatHandler::HandleNPCFlagCommand(const char* args, WorldSession *m_session)
{
if (!*args)
return false;
uint32 npcFlags = (uint32) atoi((char*)args);
uint64 guid = m_session->GetPlayer()->GetSelection();
if (guid == 0)
{
SystemMessage(m_session, "No selection.");
return true;
}
CreaturePointer pCreature = m_session->GetPlayer()->GetMapMgr()->GetCreature(GET_LOWGUID_PART(guid));
if(!pCreature)
{
SystemMessage(m_session, "You should select a creature.");
return true;
}
pCreature->SetUInt32Value(UNIT_NPC_FLAGS , npcFlags);
pCreature->SaveToDB();
SystemMessage(m_session, "Value saved, you may need to rejoin or clean your client cache.");
return true;
}
示例3: OnQuestStart
void OnQuestStart( PlayerPointer mTarget, QuestLogEntry * qLogEntry)
{
if( mTarget == NULL || mTarget->GetMapMgr() == NULL || mTarget->GetMapMgr()->GetInterface() == NULL )
return;
float SSX = mTarget->GetPositionX();
float SSY = mTarget->GetPositionY();
float SSZ = mTarget->GetPositionZ();
CreaturePointer Dashel = mTarget->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(SSX, SSY, SSZ, 4961);
if(Dashel == NULL)
return;
Dashel->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, 72);
Dashel->GetAIInterface()->disable_melee = false;
Dashel->GetAIInterface()->SetAllowedToEnterCombat(true);
uint32 chance = RandomUInt(100);
if(chance < 15)
{
string say = "Now you're gonna get it good, ";
say+=(TO_PLAYER(mTarget))->GetName();
say+="!";
Dashel->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, say.c_str());
}
CreaturePointer Thug1 = sEAS.SpawnCreature(mTarget, 4969, -8686.803711, 445.267792, 99.789223, 5.461184, 300000);
CreaturePointer Thug2 = sEAS.SpawnCreature(mTarget, 4969, -8675.571289, 444.162262, 99.644737, 3.834103, 300000);
}
示例4: OnQuestStart
void OnQuestStart( PlayerPointer mTarget, QuestLogEntry * qLogEntry)
{
if( mTarget == NULL || mTarget->GetMapMgr() == NULL || mTarget->GetMapMgr()->GetInterface() == NULL )
return;
float SSX = mTarget->GetPositionX();
float SSY = mTarget->GetPositionY();
float SSZ = mTarget->GetPositionZ();
CreaturePointer Dashel = mTarget->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(SSX, SSY, SSZ, 6784);
if(Dashel == NULL)
return;
Dashel->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, 28);
Dashel->GetAIInterface()->disable_melee = false;
Dashel->GetAIInterface()->SetAllowedToEnterCombat(true);
}