本文整理汇总了C++中CreaturePointer::SendChatMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ CreaturePointer::SendChatMessage方法的具体用法?C++ CreaturePointer::SendChatMessage怎么用?C++ CreaturePointer::SendChatMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CreaturePointer
的用法示例。
在下文中一共展示了CreaturePointer::SendChatMessage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
示例2: 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 ) );
}
示例3: OnQuestComplete
void OnQuestComplete( 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 Zealot = mTarget->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(SSX, SSY, SSZ, 1931);
if(Zealot == NULL)
return;
Zealot->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "I. . . I. . .don't. . .feel. . .right. . .");
sEAS.EventCastSpell(Zealot, Zealot, 3287, 3000);
Zealot->GetAIInterface()->setMoveType(11);
Zealot->GetAIInterface()->StopMovement(3000);
sEAS.CreateCustomWaypointMap(Zealot);
sEAS.WaypointCreate(Zealot, 2289.649658f, 237.001389f, 27.089531f, 1.323f, 0, 256, 0);
sEAS.WaypointCreate(Zealot, 2291.700928f, 235.561844f, 27.089531f, 1.323f, 0, 256, 0);
sEAS.WaypointCreate(Zealot, 2292.835693f, 240.636948f, 27.089531f, 1.323f, 0, 256, 0);
sEAS.WaypointCreate(Zealot, 2288.737305f, 240.503952f, 27.088022f, 1.323f, 0, 256, 0);
sEAS.WaypointCreate(Zealot, 2287.812744f, 236.320938f, 27.088022f, 1.323f, 0, 256, 0);
sEAS.WaypointCreate(Zealot, 2292.643033f, 240.513489f, 27.088022f, 1.323f, 0, 256, 0);
sEAS.WaypointCreate(Zealot, 2289.628418f, 239.908279f, 27.088022f, 1.323f, 0, 256, 0);
}
示例4: OnLootTaken
void OnLootTaken(PlayerPointer pLooter, ItemPrototype *pItemInfo)
{
QuestLogEntry * en = pLooter->GetQuestLogForEntry(422);
if(!en)
return;
float SSX = pLooter->GetPositionX();
float SSY = pLooter->GetPositionY();
float SSZ = pLooter->GetPositionZ();
float SSO = pLooter->GetOrientation();
CreaturePointer NewCreature = pLooter->GetMapMgr()->GetInterface()->SpawnCreature(1770, SSX, SSY, SSZ, SSO, true, false, 0, 0);
if ( NewCreature != NULL )
NewCreature->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "The Sons of Arugal will rise against all who challenge the power of the Moonrage!");
}
示例5: OnQuestComplete
void OnQuestComplete( PlayerPointer mTarget, QuestLogEntry * qLogEntry)
{
if( mTarget == NULL || mTarget->GetMapMgr() == NULL || mTarget->GetMapMgr()->GetInterface() == NULL )
return;
float X = mTarget->GetPositionX();
float Y = mTarget->GetPositionY();
float Z = mTarget->GetPositionZ();
CreaturePointer MacKinley = mTarget->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(X, Y, Z, 2501);
if(MacKinley)
{
string say = "Bah! ";
say += mTarget->GetName();
say += ", this foot won't budge!";
MacKinley->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, say.c_str());
}
}